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
97d759d3
Commit
97d759d3
authored
Mar 17, 2009
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solos: Reset device on unload, free pending skbs
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
f87b2ed2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
drivers/atm/solos-pci.c
drivers/atm/solos-pci.c
+29
-1
No files found.
drivers/atm/solos-pci.c
View file @
97d759d3
...
...
@@ -1206,10 +1206,28 @@ static void atm_remove(struct solos_card *card)
for
(
i
=
0
;
i
<
card
->
nr_ports
;
i
++
)
{
if
(
card
->
atmdev
[
i
])
{
struct
sk_buff
*
skb
;
dev_info
(
&
card
->
dev
->
dev
,
"Unregistering ATM device %d
\n
"
,
card
->
atmdev
[
i
]
->
number
);
sysfs_remove_group
(
&
card
->
atmdev
[
i
]
->
class_dev
.
kobj
,
&
solos_attr_group
);
atm_dev_deregister
(
card
->
atmdev
[
i
]);
skb
=
card
->
rx_skb
[
i
];
if
(
skb
)
{
pci_unmap_single
(
card
->
dev
,
SKB_CB
(
skb
)
->
dma_addr
,
RX_DMA_SIZE
,
PCI_DMA_FROMDEVICE
);
dev_kfree_skb
(
skb
);
}
skb
=
card
->
tx_skb
[
i
];
if
(
skb
)
{
pci_unmap_single
(
card
->
dev
,
SKB_CB
(
skb
)
->
dma_addr
,
skb
->
len
,
PCI_DMA_TODEVICE
);
dev_kfree_skb
(
skb
);
}
while
((
skb
=
skb_dequeue
(
&
card
->
tx_queue
[
i
])))
dev_kfree_skb
(
skb
);
}
}
}
...
...
@@ -1218,12 +1236,22 @@ static void fpga_remove(struct pci_dev *dev)
{
struct
solos_card
*
card
=
pci_get_drvdata
(
dev
);
/* Disable IRQs */
iowrite32
(
0
,
card
->
config_regs
+
IRQ_EN_ADDR
);
/* Reset FPGA */
iowrite32
(
1
,
card
->
config_regs
+
FPGA_MODE
);
(
void
)
ioread32
(
card
->
config_regs
+
FPGA_MODE
);
atm_remove
(
card
);
iowrite32
(
0
,
card
->
config_regs
+
IRQ_EN_ADDR
);
free_irq
(
dev
->
irq
,
card
);
tasklet_kill
(
&
card
->
tlet
);
/* Release device from reset */
iowrite32
(
0
,
card
->
config_regs
+
FPGA_MODE
);
(
void
)
ioread32
(
card
->
config_regs
+
FPGA_MODE
);
pci_iounmap
(
dev
,
card
->
buffers
);
pci_iounmap
(
dev
,
card
->
config_regs
);
...
...
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