Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1e615df6
Commit
1e615df6
authored
Jan 27, 2009
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solos: Kill existing connections on link down event
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
87ebb186
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
drivers/atm/solos-pci.c
drivers/atm/solos-pci.c
+28
-2
No files found.
drivers/atm/solos-pci.c
View file @
1e615df6
...
...
@@ -132,6 +132,7 @@ static int fpga_tx(struct solos_card *);
static
irqreturn_t
solos_irq
(
int
irq
,
void
*
dev_id
);
static
struct
atm_vcc
*
find_vcc
(
struct
atm_dev
*
dev
,
short
vpi
,
int
vci
);
static
int
list_vccs
(
int
vci
);
static
void
release_vccs
(
struct
atm_dev
*
dev
);
static
int
atm_init
(
struct
solos_card
*
);
static
void
atm_remove
(
struct
solos_card
*
);
static
int
send_command
(
struct
solos_card
*
card
,
int
dev
,
const
char
*
buf
,
size_t
size
);
...
...
@@ -332,7 +333,10 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb
str
=
next_string
(
skb
);
if
(
!
strcmp
(
str
,
"Showtime"
))
state
=
ATM_PHY_SIG_FOUND
;
else
state
=
ATM_PHY_SIG_LOST
;
else
{
state
=
ATM_PHY_SIG_LOST
;
release_vccs
(
card
->
atmdev
[
port
]);
}
card
->
atmdev
[
port
]
->
link_rate
=
rate_down
;
card
->
atmdev
[
port
]
->
signal
=
state
;
...
...
@@ -683,7 +687,7 @@ static int list_vccs(int vci)
vcc
->
vci
);
}
}
else
{
for
(
i
=
0
;
i
<
32
;
i
++
){
for
(
i
=
0
;
i
<
VCC_HTABLE_SIZE
;
i
++
){
head
=
&
vcc_hash
[
i
];
sk_for_each
(
s
,
node
,
head
)
{
num_found
++
;
...
...
@@ -699,6 +703,28 @@ static int list_vccs(int vci)
return
num_found
;
}
static
void
release_vccs
(
struct
atm_dev
*
dev
)
{
int
i
;
write_lock_irq
(
&
vcc_sklist_lock
);
for
(
i
=
0
;
i
<
VCC_HTABLE_SIZE
;
i
++
)
{
struct
hlist_head
*
head
=
&
vcc_hash
[
i
];
struct
hlist_node
*
node
,
*
tmp
;
struct
sock
*
s
;
struct
atm_vcc
*
vcc
;
sk_for_each_safe
(
s
,
node
,
tmp
,
head
)
{
vcc
=
atm_sk
(
s
);
if
(
vcc
->
dev
==
dev
)
{
vcc_release_async
(
vcc
,
-
EPIPE
);
sk_del_node_init
(
s
);
}
}
}
write_unlock_irq
(
&
vcc_sklist_lock
);
}
static
int
popen
(
struct
atm_vcc
*
vcc
)
{
...
...
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