Commit e8d91394 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://gkernel.bkbits.net/net-drivers-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents 6490b110 e9e3cd4b
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#define DRV_MODULE_NAME "b44" #define DRV_MODULE_NAME "b44"
#define PFX DRV_MODULE_NAME ": " #define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.91" #define DRV_MODULE_VERSION "0.92"
#define DRV_MODULE_RELDATE "Oct 3, 2003" #define DRV_MODULE_RELDATE "Nov 4, 2003"
#define B44_DEF_MSG_ENABLE \ #define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \ (NETIF_MSG_DRV | \
...@@ -942,6 +942,8 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu) ...@@ -942,6 +942,8 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu)
b44_init_hw(bp); b44_init_hw(bp);
spin_unlock_irq(&bp->lock); spin_unlock_irq(&bp->lock);
b44_enable_ints(bp);
return 0; return 0;
} }
...@@ -1558,6 +1560,8 @@ static int b44_ethtool_ioctl (struct net_device *dev, void *useraddr) ...@@ -1558,6 +1560,8 @@ static int b44_ethtool_ioctl (struct net_device *dev, void *useraddr)
netif_wake_queue(bp->dev); netif_wake_queue(bp->dev);
spin_unlock_irq(&bp->lock); spin_unlock_irq(&bp->lock);
b44_enable_ints(bp);
return 0; return 0;
} }
case ETHTOOL_GPAUSEPARAM: { case ETHTOOL_GPAUSEPARAM: {
...@@ -1601,6 +1605,8 @@ static int b44_ethtool_ioctl (struct net_device *dev, void *useraddr) ...@@ -1601,6 +1605,8 @@ static int b44_ethtool_ioctl (struct net_device *dev, void *useraddr)
} }
spin_unlock_irq(&bp->lock); spin_unlock_irq(&bp->lock);
b44_enable_ints(bp);
return 0; return 0;
} }
}; };
...@@ -1752,6 +1758,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, ...@@ -1752,6 +1758,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
} }
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev,&pdev->dev);
/* No interesting netdevice features in this card... */ /* No interesting netdevice features in this card... */
dev->features |= 0; dev->features |= 0;
...@@ -1852,11 +1859,56 @@ static void __devexit b44_remove_one(struct pci_dev *pdev) ...@@ -1852,11 +1859,56 @@ static void __devexit b44_remove_one(struct pci_dev *pdev)
} }
} }
static int b44_suspend(struct pci_dev *pdev, u32 state)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct b44 *bp = dev->priv;
if (!netif_running(dev))
return 0;
del_timer_sync(&bp->timer);
spin_lock_irq(&bp->lock);
b44_halt(bp);
netif_carrier_off(bp->dev);
netif_device_detach(bp->dev);
b44_free_rings(bp);
spin_unlock_irq(&bp->lock);
return 0;
}
static int b44_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct b44 *bp = dev->priv;
if (!netif_running(dev))
return 0;
spin_lock_irq(&bp->lock);
b44_init_rings(bp);
b44_init_hw(bp);
netif_device_attach(bp->dev);
spin_unlock_irq(&bp->lock);
bp->timer.expires = jiffies + HZ;
add_timer(&bp->timer);
b44_enable_ints(bp);
return 0;
}
static struct pci_driver b44_driver = { static struct pci_driver b44_driver = {
.name = DRV_MODULE_NAME, .name = DRV_MODULE_NAME,
.id_table = b44_pci_tbl, .id_table = b44_pci_tbl,
.probe = b44_init_one, .probe = b44_init_one,
.remove = __devexit_p(b44_remove_one), .remove = __devexit_p(b44_remove_one),
.suspend = b44_suspend,
.resume = b44_resume,
}; };
static int __init b44_init(void) static int __init b44_init(void)
......
...@@ -1376,6 +1376,10 @@ pcnet32_rx(struct net_device *dev) ...@@ -1376,6 +1376,10 @@ pcnet32_rx(struct net_device *dev)
if (!rx_in_place) { if (!rx_in_place) {
skb_reserve(skb,2); /* 16 byte align */ skb_reserve(skb,2); /* 16 byte align */
skb_put(skb,pkt_len); /* Make room */ skb_put(skb,pkt_len); /* Make room */
pci_dma_sync_single(lp->pci_dev,
lp->rx_dma_addr[entry],
PKT_BUF_SZ,
PCI_DMA_FROMDEVICE);
eth_copy_and_sum(skb, eth_copy_and_sum(skb,
(unsigned char *)(lp->rx_skbuff[entry]->tail), (unsigned char *)(lp->rx_skbuff[entry]->tail),
pkt_len,0); pkt_len,0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment