]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/tc35815.c
3c59x: Handle pci_enable_device() failure while resuming
[linux-2.6-omap-h63xx.git] / drivers / net / tc35815.c
index 81ed82f0b52073da356b58be80c5b09fd75ab9aa..e3a7e3ceab772e42de6f3481bc262a1527c8de03 100644 (file)
@@ -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 {
-               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
@@ -1703,19 +1703,6 @@ static void tc35815_chip_init(struct net_device *dev)
        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,
@@ -1732,6 +1719,11 @@ static void __exit tc35815_cleanup_module(void)
 {
        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;
@@ -1740,6 +1732,9 @@ static void __exit tc35815_cleanup_module(void)
                free_netdev(dev);
                root_tc35815_dev = next_dev;
        }
+
+       pci_unregister_driver(&tc35815_driver);
 }
+
 module_init(tc35815_init_module);
 module_exit(tc35815_cleanup_module);