Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
af780656
Commit
af780656
authored
Jan 28, 2009
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solos: Add SNR and Attn to status packet, fix oops on load
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
b28a4b9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
drivers/atm/solos-pci.c
drivers/atm/solos-pci.c
+23
-7
No files found.
drivers/atm/solos-pci.c
View file @
af780656
...
...
@@ -303,8 +303,8 @@ static char *next_string(struct sk_buff *skb)
*/
static
int
process_status
(
struct
solos_card
*
card
,
int
port
,
struct
sk_buff
*
skb
)
{
char
*
str
,
*
end
;
int
ver
,
rate_up
,
rate_down
,
state
;
char
*
str
,
*
end
,
*
state_str
;
int
ver
,
rate_up
,
rate_down
,
state
,
snr
,
attn
;
if
(
!
card
->
atmdev
[
port
])
return
-
ENODEV
;
...
...
@@ -330,19 +330,35 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb
if
(
*
end
)
return
-
EIO
;
str
=
next_string
(
skb
);
if
(
!
strcmp
(
str
,
"Showtime"
))
st
ate_st
r
=
next_string
(
skb
);
if
(
!
strcmp
(
st
ate_st
r
,
"Showtime"
))
state
=
ATM_PHY_SIG_FOUND
;
else
{
state
=
ATM_PHY_SIG_LOST
;
release_vccs
(
card
->
atmdev
[
port
]);
}
str
=
next_string
(
skb
);
snr
=
simple_strtol
(
str
,
&
end
,
10
);
if
(
*
end
)
return
-
EIO
;
str
=
next_string
(
skb
);
attn
=
simple_strtol
(
str
,
&
end
,
10
);
if
(
*
end
)
return
-
EIO
;
if
(
state
==
ATM_PHY_SIG_LOST
&&
!
rate_up
&&
!
rate_down
)
dev_info
(
&
card
->
dev
->
dev
,
"Port %d ATM state: %s
\n
"
,
port
,
state_str
);
else
dev_info
(
&
card
->
dev
->
dev
,
"Port %d ATM state: %s (%d/%d kb/s, SNR %ddB, Attn %ddB)
\n
"
,
port
,
state_str
,
rate_up
/
1000
,
rate_down
/
1000
,
snr
,
attn
);
card
->
atmdev
[
port
]
->
link_rate
=
rate_down
;
card
->
atmdev
[
port
]
->
signal
=
state
;
dev_info
(
&
card
->
dev
->
dev
,
"ATM state: '%s', %d/%d kb/s up/down.
\n
"
,
str
,
rate_up
/
1000
,
rate_down
/
1000
);
return
0
;
}
...
...
@@ -851,7 +867,7 @@ static int fpga_tx(struct solos_card *card)
dev_vdbg
(
&
card
->
dev
->
dev
,
"TX Flags are %X
\n
"
,
tx_pending
);
for
(
port
=
0
;
port
<
card
->
nr_ports
;
port
++
)
{
if
(
!
(
tx_pending
&
(
1
<<
port
)))
{
if
(
card
->
atmdev
[
port
]
&&
!
(
tx_pending
&
(
1
<<
port
)))
{
spin_lock
(
&
card
->
tx_queue_lock
);
skb
=
skb_dequeue
(
&
card
->
tx_queue
[
port
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment