Commit 57de9f3e authored by Jeff Garzik's avatar Jeff Garzik

Merge pobox.com:/garz/repo/netdev-2.6/tmp

into pobox.com:/garz/repo/netdev-2.6/8139too
parents 2ab08734 6c05f484
...@@ -390,8 +390,14 @@ enum rx_mode_bits { ...@@ -390,8 +390,14 @@ enum rx_mode_bits {
/* Bits in TxConfig. */ /* Bits in TxConfig. */
enum tx_config_bits { enum tx_config_bits {
TxIFG1 = (1 << 25), /* Interframe Gap Time */
TxIFG0 = (1 << 24), /* Enabling these bits violates IEEE 802.3 */ /* Interframe Gap Time. Only TxIFG96 doesn't violate IEEE 802.3 */
TxIFGShift = 24,
TxIFG84 = (0 << TxIFGShift), /* 8.4us / 840ns (10 / 100Mbps) */
TxIFG88 = (1 << TxIFGShift), /* 8.8us / 880ns (10 / 100Mbps) */
TxIFG92 = (2 << TxIFGShift), /* 9.2us / 920ns (10 / 100Mbps) */
TxIFG96 = (3 << TxIFGShift), /* 9.6us / 960ns (10 / 100Mbps) */
TxLoopBack = (1 << 18) | (1 << 17), /* enable loopback test mode */ TxLoopBack = (1 << 18) | (1 << 17), /* enable loopback test mode */
TxCRC = (1 << 16), /* DISABLE appending CRC to end of Tx packets */ TxCRC = (1 << 16), /* DISABLE appending CRC to end of Tx packets */
TxClearAbt = (1 << 0), /* Clear abort (WO) */ TxClearAbt = (1 << 0), /* Clear abort (WO) */
...@@ -723,17 +729,14 @@ static const unsigned int rtl8139_rx_config = ...@@ -723,17 +729,14 @@ static const unsigned int rtl8139_rx_config =
#endif #endif
static const unsigned int rtl8139_tx_config = static const unsigned int rtl8139_tx_config =
(TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); TxIFG96 | (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift);
static void __rtl8139_cleanup_dev (struct net_device *dev) static void __rtl8139_cleanup_dev (struct net_device *dev)
{ {
struct rtl8139_private *tp; struct rtl8139_private *tp = netdev_priv(dev);
struct pci_dev *pdev; struct pci_dev *pdev;
assert (dev != NULL); assert (dev != NULL);
assert (dev->priv != NULL);
tp = dev->priv;
assert (tp->pci_dev != NULL); assert (tp->pci_dev != NULL);
pdev = tp->pci_dev; pdev = tp->pci_dev;
...@@ -785,7 +788,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, ...@@ -785,7 +788,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
*dev_out = NULL; *dev_out = NULL;
/* dev and dev->priv zeroed in alloc_etherdev */ /* dev and priv zeroed in alloc_etherdev */
dev = alloc_etherdev (sizeof (*tp)); dev = alloc_etherdev (sizeof (*tp));
if (dev == NULL) { if (dev == NULL) {
printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev)); printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev));
...@@ -794,7 +797,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, ...@@ -794,7 +797,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
tp = dev->priv; tp = netdev_priv(dev);
tp->pci_dev = pdev; tp->pci_dev = pdev;
/* enable device (incl. PCI PM wakeup and hotplug setup) */ /* enable device (incl. PCI PM wakeup and hotplug setup) */
...@@ -976,8 +979,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -976,8 +979,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
return i; return i;
assert (dev != NULL); assert (dev != NULL);
tp = dev->priv; tp = netdev_priv(dev);
assert (tp != NULL);
ioaddr = tp->mmio_addr; ioaddr = tp->mmio_addr;
assert (ioaddr != NULL); assert (ioaddr != NULL);
...@@ -1010,8 +1013,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -1010,8 +1013,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
dev->irq = pdev->irq; dev->irq = pdev->irq;
/* dev->priv/tp zeroed and aligned in alloc_etherdev */ /* tp zeroed and aligned in alloc_etherdev */
tp = dev->priv; tp = netdev_priv(dev);
/* note: tp->chipset set in rtl8139_init_board */ /* note: tp->chipset set in rtl8139_init_board */
tp->drv_flags = board_info[ent->driver_data].hw_flags; tp->drv_flags = board_info[ent->driver_data].hw_flags;
...@@ -1116,11 +1119,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -1116,11 +1119,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
static void __devexit rtl8139_remove_one (struct pci_dev *pdev) static void __devexit rtl8139_remove_one (struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata (pdev); struct net_device *dev = pci_get_drvdata (pdev);
struct rtl8139_private *np;
assert (dev != NULL); assert (dev != NULL);
np = dev->priv;
assert (np != NULL);
unregister_netdev (dev); unregister_netdev (dev);
...@@ -1234,7 +1234,7 @@ static void mdio_sync (void *mdio_addr) ...@@ -1234,7 +1234,7 @@ static void mdio_sync (void *mdio_addr)
static int mdio_read (struct net_device *dev, int phy_id, int location) static int mdio_read (struct net_device *dev, int phy_id, int location)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
int retval = 0; int retval = 0;
#ifdef CONFIG_8139TOO_8129 #ifdef CONFIG_8139TOO_8129
void *mdio_addr = tp->mmio_addr + Config4; void *mdio_addr = tp->mmio_addr + Config4;
...@@ -1276,7 +1276,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) ...@@ -1276,7 +1276,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location)
static void mdio_write (struct net_device *dev, int phy_id, int location, static void mdio_write (struct net_device *dev, int phy_id, int location,
int value) int value)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
#ifdef CONFIG_8139TOO_8129 #ifdef CONFIG_8139TOO_8129
void *mdio_addr = tp->mmio_addr + Config4; void *mdio_addr = tp->mmio_addr + Config4;
int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value;
...@@ -1319,7 +1319,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, ...@@ -1319,7 +1319,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location,
static int rtl8139_open (struct net_device *dev) static int rtl8139_open (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
int retval; int retval;
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
...@@ -1367,7 +1367,7 @@ static int rtl8139_open (struct net_device *dev) ...@@ -1367,7 +1367,7 @@ static int rtl8139_open (struct net_device *dev)
static void rtl_check_media (struct net_device *dev, unsigned int init_media) static void rtl_check_media (struct net_device *dev, unsigned int init_media)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
if (tp->phys[0] >= 0) { if (tp->phys[0] >= 0) {
mii_check_media(&tp->mii, netif_msg_link(tp), init_media); mii_check_media(&tp->mii, netif_msg_link(tp), init_media);
...@@ -1377,7 +1377,7 @@ static void rtl_check_media (struct net_device *dev, unsigned int init_media) ...@@ -1377,7 +1377,7 @@ static void rtl_check_media (struct net_device *dev, unsigned int init_media)
/* Start the hardware at open or resume. */ /* Start the hardware at open or resume. */
static void rtl8139_hw_start (struct net_device *dev) static void rtl8139_hw_start (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
u32 i; u32 i;
u8 tmp; u8 tmp;
...@@ -1399,8 +1399,6 @@ static void rtl8139_hw_start (struct net_device *dev) ...@@ -1399,8 +1399,6 @@ static void rtl8139_hw_start (struct net_device *dev)
tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys; tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys;
RTL_W32 (RxConfig, tp->rx_config); RTL_W32 (RxConfig, tp->rx_config);
/* Check this value: the documentation for IFG contradicts ifself. */
RTL_W32 (TxConfig, rtl8139_tx_config); RTL_W32 (TxConfig, rtl8139_tx_config);
tp->cur_rx = 0; tp->cur_rx = 0;
...@@ -1446,7 +1444,7 @@ static void rtl8139_hw_start (struct net_device *dev) ...@@ -1446,7 +1444,7 @@ static void rtl8139_hw_start (struct net_device *dev)
/* Initialize the Rx and Tx rings, along with various 'dev' bits. */ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */
static void rtl8139_init_ring (struct net_device *dev) static void rtl8139_init_ring (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
int i; int i;
tp->cur_rx = 0; tp->cur_rx = 0;
...@@ -1613,7 +1611,7 @@ static inline void rtl8139_thread_iter (struct net_device *dev, ...@@ -1613,7 +1611,7 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
static int rtl8139_thread (void *data) static int rtl8139_thread (void *data)
{ {
struct net_device *dev = data; struct net_device *dev = data;
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
unsigned long timeout; unsigned long timeout;
daemonize("%s", dev->name); daemonize("%s", dev->name);
...@@ -1645,7 +1643,7 @@ static int rtl8139_thread (void *data) ...@@ -1645,7 +1643,7 @@ static int rtl8139_thread (void *data)
static void rtl8139_start_thread(struct net_device *dev) static void rtl8139_start_thread(struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
tp->thr_pid = -1; tp->thr_pid = -1;
tp->twistie = 0; tp->twistie = 0;
...@@ -1673,7 +1671,7 @@ static inline void rtl8139_tx_clear (struct rtl8139_private *tp) ...@@ -1673,7 +1671,7 @@ static inline void rtl8139_tx_clear (struct rtl8139_private *tp)
static void rtl8139_tx_timeout (struct net_device *dev) static void rtl8139_tx_timeout (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
int i; int i;
u8 tmp8; u8 tmp8;
...@@ -1718,7 +1716,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) ...@@ -1718,7 +1716,7 @@ static void rtl8139_tx_timeout (struct net_device *dev)
static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
unsigned int entry; unsigned int entry;
unsigned int len = skb->len; unsigned int len = skb->len;
...@@ -1766,7 +1764,6 @@ static void rtl8139_tx_interrupt (struct net_device *dev, ...@@ -1766,7 +1764,6 @@ static void rtl8139_tx_interrupt (struct net_device *dev,
unsigned long dirty_tx, tx_left; unsigned long dirty_tx, tx_left;
assert (dev != NULL); assert (dev != NULL);
assert (tp != NULL);
assert (ioaddr != NULL); assert (ioaddr != NULL);
dirty_tx = tp->dirty_tx; dirty_tx = tp->dirty_tx;
...@@ -2125,7 +2122,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev, ...@@ -2125,7 +2122,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev,
static int rtl8139_poll(struct net_device *dev, int *budget) static int rtl8139_poll(struct net_device *dev, int *budget)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
int orig_budget = min(*budget, dev->quota); int orig_budget = min(*budget, dev->quota);
int done = 1; int done = 1;
...@@ -2163,7 +2160,7 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, ...@@ -2163,7 +2160,7 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) dev_instance; struct net_device *dev = (struct net_device *) dev_instance;
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
u16 status, ackstat; u16 status, ackstat;
int link_changed = 0; /* avoid bogus "uninit" warning */ int link_changed = 0; /* avoid bogus "uninit" warning */
...@@ -2239,7 +2236,7 @@ static void rtl8139_poll_controller(struct net_device *dev) ...@@ -2239,7 +2236,7 @@ static void rtl8139_poll_controller(struct net_device *dev)
static int rtl8139_close (struct net_device *dev) static int rtl8139_close (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
int ret = 0; int ret = 0;
unsigned long flags; unsigned long flags;
...@@ -2302,7 +2299,7 @@ static int rtl8139_close (struct net_device *dev) ...@@ -2302,7 +2299,7 @@ static int rtl8139_close (struct net_device *dev)
other threads or interrupts aren't messing with the 8139. */ other threads or interrupts aren't messing with the 8139. */
static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
void *ioaddr = np->mmio_addr; void *ioaddr = np->mmio_addr;
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
...@@ -2336,7 +2333,7 @@ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) ...@@ -2336,7 +2333,7 @@ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
aren't messing with the 8139. */ aren't messing with the 8139. */
static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
void *ioaddr = np->mmio_addr; void *ioaddr = np->mmio_addr;
u32 support; u32 support;
u8 cfg3, cfg5; u8 cfg3, cfg5;
...@@ -2376,7 +2373,7 @@ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) ...@@ -2376,7 +2373,7 @@ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
strcpy(info->driver, DRV_NAME); strcpy(info->driver, DRV_NAME);
strcpy(info->version, DRV_VERSION); strcpy(info->version, DRV_VERSION);
strcpy(info->bus_info, pci_name(np->pci_dev)); strcpy(info->bus_info, pci_name(np->pci_dev));
...@@ -2385,7 +2382,7 @@ static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo * ...@@ -2385,7 +2382,7 @@ static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *
static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
mii_ethtool_gset(&np->mii, cmd); mii_ethtool_gset(&np->mii, cmd);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
...@@ -2394,7 +2391,7 @@ static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -2394,7 +2391,7 @@ static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
int rc; int rc;
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
rc = mii_ethtool_sset(&np->mii, cmd); rc = mii_ethtool_sset(&np->mii, cmd);
...@@ -2404,25 +2401,25 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -2404,25 +2401,25 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
static int rtl8139_nway_reset(struct net_device *dev) static int rtl8139_nway_reset(struct net_device *dev)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
return mii_nway_restart(&np->mii); return mii_nway_restart(&np->mii);
} }
static u32 rtl8139_get_link(struct net_device *dev) static u32 rtl8139_get_link(struct net_device *dev)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
return mii_link_ok(&np->mii); return mii_link_ok(&np->mii);
} }
static u32 rtl8139_get_msglevel(struct net_device *dev) static u32 rtl8139_get_msglevel(struct net_device *dev)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
return np->msg_enable; return np->msg_enable;
} }
static void rtl8139_set_msglevel(struct net_device *dev, u32 datum) static void rtl8139_set_msglevel(struct net_device *dev, u32 datum)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
np->msg_enable = datum; np->msg_enable = datum;
} }
...@@ -2433,13 +2430,13 @@ static void rtl8139_set_msglevel(struct net_device *dev, u32 datum) ...@@ -2433,13 +2430,13 @@ static void rtl8139_set_msglevel(struct net_device *dev, u32 datum)
#else #else
static int rtl8139_get_regs_len(struct net_device *dev) static int rtl8139_get_regs_len(struct net_device *dev)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
return np->regs_len; return np->regs_len;
} }
static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
regs->version = RTL_REGS_VER; regs->version = RTL_REGS_VER;
...@@ -2456,7 +2453,7 @@ static int rtl8139_get_stats_count(struct net_device *dev) ...@@ -2456,7 +2453,7 @@ static int rtl8139_get_stats_count(struct net_device *dev)
static void rtl8139_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) static void rtl8139_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
data[0] = np->xstats.early_rx; data[0] = np->xstats.early_rx;
data[1] = np->xstats.tx_buf_mapped; data[1] = np->xstats.tx_buf_mapped;
...@@ -2488,7 +2485,7 @@ static struct ethtool_ops rtl8139_ethtool_ops = { ...@@ -2488,7 +2485,7 @@ static struct ethtool_ops rtl8139_ethtool_ops = {
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
struct rtl8139_private *np = dev->priv; struct rtl8139_private *np = netdev_priv(dev);
int rc; int rc;
if (!netif_running(dev)) if (!netif_running(dev))
...@@ -2504,7 +2501,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2504,7 +2501,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) static struct net_device_stats *rtl8139_get_stats (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
unsigned long flags; unsigned long flags;
...@@ -2523,7 +2520,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) ...@@ -2523,7 +2520,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev)
static void __set_rx_mode (struct net_device *dev) static void __set_rx_mode (struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
u32 mc_filter[2]; /* Multicast hash filter */ u32 mc_filter[2]; /* Multicast hash filter */
int i, rx_mode; int i, rx_mode;
...@@ -2572,7 +2569,7 @@ static void __set_rx_mode (struct net_device *dev) ...@@ -2572,7 +2569,7 @@ static void __set_rx_mode (struct net_device *dev)
static void rtl8139_set_rx_mode (struct net_device *dev) static void rtl8139_set_rx_mode (struct net_device *dev)
{ {
unsigned long flags; unsigned long flags;
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
spin_lock_irqsave (&tp->lock, flags); spin_lock_irqsave (&tp->lock, flags);
__set_rx_mode(dev); __set_rx_mode(dev);
...@@ -2584,7 +2581,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev) ...@@ -2584,7 +2581,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev)
static int rtl8139_suspend (struct pci_dev *pdev, u32 state) static int rtl8139_suspend (struct pci_dev *pdev, u32 state)
{ {
struct net_device *dev = pci_get_drvdata (pdev); struct net_device *dev = pci_get_drvdata (pdev);
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
unsigned long flags; unsigned long flags;
......
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