[PATCH] 2.4.0-test1-ac12 - epic100.c

From: Francois romieu (romieu@ensta.fr)
Date: Sat Jun 10 2000 - 13:21:25 EDT

  • Next message: Richard Gooch: "[PATCH] devfs v99.15 available"

    Take the following for what it's worth.
    Here :
    - the code compiles,
    - the module ceases to BUG,
    - ping -f looks right,
    - love and wealth are back.

    --- linux-2.4.0-test1-ac12.orig/drivers/net/epic100.c Sat May 13 11:19:21 2000
    +++ linux-2.4.0-test1-ac12/drivers/net/epic100.c Sat Jun 10 14:45:14 2000
    @@ -384,6 +384,8 @@
                             duplex = full_duplex[card_idx];
             }
     
    + pdev->driver_data = dev;
    +
             dev->base_addr = ioaddr;
             dev->irq = pdev->irq;
             printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ",
    @@ -1054,7 +1056,7 @@
                     printk(KERN_DEBUG " In epic_rx(), entry %d %8.8x.\n", entry,
                                ep->rx_ring[entry].rxstatus);
             /* If we own the next entry, it's a new packet. Send it up. */
    - while ( ! le32_to_cpu(ep->rx_ring[entry].rxstatus) & DescOwn) {
    + while (!(le32_to_cpu(ep->rx_ring[entry].rxstatus) & DescOwn)) {
                     int status = le32_to_cpu(ep->rx_ring[entry].rxstatus);
     
                     if (debug > 4)
    @@ -1295,9 +1297,6 @@
     {
             struct net_device *dev = pdev->driver_data;
             
    - if (!dev)
    - BUG();
    -
             unregister_netdev(dev);
     #ifndef USE_IO_OPS
             iounmap ((void*) dev->base_addr);
    @@ -1315,9 +1314,6 @@
             struct net_device *dev = pdev->driver_data;
             long ioaddr = dev->base_addr;
     
    - if (!dev)
    - BUG();
    -
             epic_pause(dev);
             /* Put the chip into low-power mode. */
             outl(0x0008, ioaddr + GENCTL);
    @@ -1327,9 +1323,6 @@
     static void epic_resume (struct pci_dev *pdev)
     {
             struct net_device *dev = pdev->driver_data;
    -
    - if (!dev)
    - BUG();
     
             epic_restart (dev);
     }

    -- 
    Ueimor
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Jun 10 2000 - 13:27:28 EDT