| .. | .. |
|---|
| 258 | 258 | {0x126c, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, |
|---|
| 259 | 259 | {0x1743, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, |
|---|
| 260 | 260 | {0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, |
|---|
| 261 | + {0x16ec, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, |
|---|
| 261 | 262 | |
|---|
| 262 | 263 | #ifdef CONFIG_SH_SECUREEDGE5410 |
|---|
| 263 | 264 | /* Bogus 8139 silicon reports 8129 without external PROM :-( */ |
|---|
| .. | .. |
|---|
| 641 | 642 | static void mdio_write (struct net_device *dev, int phy_id, int location, |
|---|
| 642 | 643 | int val); |
|---|
| 643 | 644 | static void rtl8139_start_thread(struct rtl8139_private *tp); |
|---|
| 644 | | -static void rtl8139_tx_timeout (struct net_device *dev); |
|---|
| 645 | +static void rtl8139_tx_timeout (struct net_device *dev, unsigned int txqueue); |
|---|
| 645 | 646 | static void rtl8139_init_ring (struct net_device *dev); |
|---|
| 646 | 647 | static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb, |
|---|
| 647 | 648 | struct net_device *dev); |
|---|
| .. | .. |
|---|
| 977 | 978 | pdev->subsystem_vendor == PCI_VENDOR_ID_ATHEROS && |
|---|
| 978 | 979 | pdev->subsystem_device == PCI_DEVICE_ID_REALTEK_8139) { |
|---|
| 979 | 980 | pr_info("OQO Model 2 detected. Forcing PIO\n"); |
|---|
| 980 | | - use_io = 1; |
|---|
| 981 | + use_io = true; |
|---|
| 981 | 982 | } |
|---|
| 982 | 983 | |
|---|
| 983 | 984 | dev = rtl8139_init_board (pdev); |
|---|
| .. | .. |
|---|
| 1661 | 1662 | |
|---|
| 1662 | 1663 | napi_disable(&tp->napi); |
|---|
| 1663 | 1664 | netif_stop_queue(dev); |
|---|
| 1664 | | - synchronize_sched(); |
|---|
| 1665 | + synchronize_rcu(); |
|---|
| 1665 | 1666 | |
|---|
| 1666 | 1667 | netdev_dbg(dev, "Transmit timeout, status %02x %04x %04x media %02x\n", |
|---|
| 1667 | 1668 | RTL_R8(ChipCmd), RTL_R16(IntrStatus), |
|---|
| .. | .. |
|---|
| 1699 | 1700 | spin_unlock_bh(&tp->rx_lock); |
|---|
| 1700 | 1701 | } |
|---|
| 1701 | 1702 | |
|---|
| 1702 | | -static void rtl8139_tx_timeout (struct net_device *dev) |
|---|
| 1703 | +static void rtl8139_tx_timeout(struct net_device *dev, unsigned int txqueue) |
|---|
| 1703 | 1704 | { |
|---|
| 1704 | 1705 | struct rtl8139_private *tp = netdev_priv(dev); |
|---|
| 1705 | 1706 | |
|---|
| .. | .. |
|---|
| 2602 | 2603 | spin_unlock_irqrestore (&tp->lock, flags); |
|---|
| 2603 | 2604 | } |
|---|
| 2604 | 2605 | |
|---|
| 2605 | | -#ifdef CONFIG_PM |
|---|
| 2606 | | - |
|---|
| 2607 | | -static int rtl8139_suspend (struct pci_dev *pdev, pm_message_t state) |
|---|
| 2606 | +static int __maybe_unused rtl8139_suspend(struct device *device) |
|---|
| 2608 | 2607 | { |
|---|
| 2609 | | - struct net_device *dev = pci_get_drvdata (pdev); |
|---|
| 2608 | + struct net_device *dev = dev_get_drvdata(device); |
|---|
| 2610 | 2609 | struct rtl8139_private *tp = netdev_priv(dev); |
|---|
| 2611 | 2610 | void __iomem *ioaddr = tp->mmio_addr; |
|---|
| 2612 | 2611 | unsigned long flags; |
|---|
| 2613 | | - |
|---|
| 2614 | | - pci_save_state (pdev); |
|---|
| 2615 | 2612 | |
|---|
| 2616 | 2613 | if (!netif_running (dev)) |
|---|
| 2617 | 2614 | return 0; |
|---|
| .. | .. |
|---|
| 2630 | 2627 | |
|---|
| 2631 | 2628 | spin_unlock_irqrestore (&tp->lock, flags); |
|---|
| 2632 | 2629 | |
|---|
| 2633 | | - pci_set_power_state (pdev, PCI_D3hot); |
|---|
| 2634 | | - |
|---|
| 2635 | 2630 | return 0; |
|---|
| 2636 | 2631 | } |
|---|
| 2637 | 2632 | |
|---|
| 2638 | | - |
|---|
| 2639 | | -static int rtl8139_resume (struct pci_dev *pdev) |
|---|
| 2633 | +static int __maybe_unused rtl8139_resume(struct device *device) |
|---|
| 2640 | 2634 | { |
|---|
| 2641 | | - struct net_device *dev = pci_get_drvdata (pdev); |
|---|
| 2635 | + struct net_device *dev = dev_get_drvdata(device); |
|---|
| 2642 | 2636 | |
|---|
| 2643 | | - pci_restore_state (pdev); |
|---|
| 2644 | 2637 | if (!netif_running (dev)) |
|---|
| 2645 | 2638 | return 0; |
|---|
| 2646 | | - pci_set_power_state (pdev, PCI_D0); |
|---|
| 2639 | + |
|---|
| 2647 | 2640 | rtl8139_init_ring (dev); |
|---|
| 2648 | 2641 | rtl8139_hw_start (dev); |
|---|
| 2649 | 2642 | netif_device_attach (dev); |
|---|
| 2650 | 2643 | return 0; |
|---|
| 2651 | 2644 | } |
|---|
| 2652 | 2645 | |
|---|
| 2653 | | -#endif /* CONFIG_PM */ |
|---|
| 2654 | | - |
|---|
| 2646 | +static SIMPLE_DEV_PM_OPS(rtl8139_pm_ops, rtl8139_suspend, rtl8139_resume); |
|---|
| 2655 | 2647 | |
|---|
| 2656 | 2648 | static struct pci_driver rtl8139_pci_driver = { |
|---|
| 2657 | 2649 | .name = DRV_NAME, |
|---|
| 2658 | 2650 | .id_table = rtl8139_pci_tbl, |
|---|
| 2659 | 2651 | .probe = rtl8139_init_one, |
|---|
| 2660 | 2652 | .remove = rtl8139_remove_one, |
|---|
| 2661 | | -#ifdef CONFIG_PM |
|---|
| 2662 | | - .suspend = rtl8139_suspend, |
|---|
| 2663 | | - .resume = rtl8139_resume, |
|---|
| 2664 | | -#endif /* CONFIG_PM */ |
|---|
| 2653 | + .driver.pm = &rtl8139_pm_ops, |
|---|
| 2665 | 2654 | }; |
|---|
| 2666 | 2655 | |
|---|
| 2667 | 2656 | |
|---|