projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PPPoE]: miscellaneous smaller cleanups
[cascardo/linux.git]
/
drivers
/
net
/
tc35815.c
diff --git
a/drivers/net/tc35815.c
b/drivers/net/tc35815.c
index
60f0265
..
d7741e2
100644
(file)
--- a/
drivers/net/tc35815.c
+++ b/
drivers/net/tc35815.c
@@
-453,7
+453,7
@@
static int __devinit tc35815_probe1(struct pci_dev *pdev, unsigned int base_addr
static int tc35815_open(struct net_device *dev);
static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev);
static void tc35815_tx_timeout(struct net_device *dev);
static int tc35815_open(struct net_device *dev);
static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev);
static void tc35815_tx_timeout(struct net_device *dev);
-static irqreturn_t tc35815_interrupt(int irq, void *dev_id
, struct pt_regs *regs
);
+static irqreturn_t tc35815_interrupt(int irq, void *dev_id);
static void tc35815_rx(struct net_device *dev);
static void tc35815_txdone(struct net_device *dev);
static int tc35815_close(struct net_device *dev);
static void tc35815_rx(struct net_device *dev);
static void tc35815_txdone(struct net_device *dev);
static int tc35815_close(struct net_device *dev);
@@
-657,7
+657,7
@@
tc35815_init_queues(struct net_device *dev)
dma_cache_wback_inv((unsigned long)lp->fd_buf, PAGE_SIZE * FD_PAGE_NUM);
#endif
} else {
dma_cache_wback_inv((unsigned long)lp->fd_buf, PAGE_SIZE * FD_PAGE_NUM);
#endif
} else {
-
clear_page(lp->fd_buf
);
+
memset(lp->fd_buf, 0, PAGE_SIZE * FD_PAGE_NUM
);
#ifdef __mips__
dma_cache_wback_inv((unsigned long)lp->fd_buf, PAGE_SIZE * FD_PAGE_NUM);
#endif
#ifdef __mips__
dma_cache_wback_inv((unsigned long)lp->fd_buf, PAGE_SIZE * FD_PAGE_NUM);
#endif
@@
-1044,7
+1044,7
@@
static void tc35815_fatal_error_interrupt(struct net_device *dev, int status)
* The typical workload of the driver:
* Handle the network interface interrupts.
*/
* The typical workload of the driver:
* Handle the network interface interrupts.
*/
-static irqreturn_t tc35815_interrupt(int irq, void *dev_id
, struct pt_regs * regs
)
+static irqreturn_t tc35815_interrupt(int irq, void *dev_id)
{
struct net_device *dev = dev_id;
struct tc35815_regs *tr;
{
struct net_device *dev = dev_id;
struct tc35815_regs *tr;
@@
-1145,7
+1145,6
@@
tc35815_rx(struct net_device *dev)
break;
}
skb_reserve(skb, 2); /* 16 bit alignment */
break;
}
skb_reserve(skb, 2); /* 16 bit alignment */
- skb->dev = dev;
data = skb_put(skb, pkt_len);
data = skb_put(skb, pkt_len);
@@
-1703,19
+1702,6
@@
static void tc35815_chip_init(struct net_device *dev)
spin_unlock_irqrestore(&lp->lock, flags);
}
spin_unlock_irqrestore(&lp->lock, flags);
}
-/* XXX */
-void
-tc35815_killall(void)
-{
- struct net_device *dev;
-
- for (dev = root_tc35815_dev; dev; dev = ((struct tc35815_local *)dev->priv)->next_module) {
- if (dev->flags&IFF_UP){
- dev->stop(dev);
- }
- }
-}
-
static struct pci_driver tc35815_driver = {
.name = TC35815_MODULE_NAME,
.probe = tc35815_probe,
static struct pci_driver tc35815_driver = {
.name = TC35815_MODULE_NAME,
.probe = tc35815_probe,
@@
-1732,6
+1718,11
@@
static void __exit tc35815_cleanup_module(void)
{
struct net_device *next_dev;
{
struct net_device *next_dev;
+ /*
+ * TODO: implement a tc35815_driver.remove hook, and
+ * move this code into that function. Then, delete
+ * all root_tc35815_dev list handling code.
+ */
while (root_tc35815_dev) {
struct net_device *dev = root_tc35815_dev;
next_dev = ((struct tc35815_local *)dev->priv)->next_module;
while (root_tc35815_dev) {
struct net_device *dev = root_tc35815_dev;
next_dev = ((struct tc35815_local *)dev->priv)->next_module;
@@
-1740,6
+1731,9
@@
static void __exit tc35815_cleanup_module(void)
free_netdev(dev);
root_tc35815_dev = next_dev;
}
free_netdev(dev);
root_tc35815_dev = next_dev;
}
+
+ pci_unregister_driver(&tc35815_driver);
}
}
+
module_init(tc35815_init_module);
module_exit(tc35815_cleanup_module);
module_init(tc35815_init_module);
module_exit(tc35815_cleanup_module);