patch-2.4.0-test2 linux/drivers/net/epic100.c
Next file: linux/drivers/net/es3210.c
Previous file: linux/drivers/net/eexpress.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Mon Jun 19 13:30:58 2000
- Orig file:
v2.4.0-test1/linux/drivers/net/epic100.c
- Orig date:
Tue May 23 15:31:35 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/net/epic100.c linux/drivers/net/epic100.c
@@ -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);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)