Commit 9da90297 authored by David S. Miller's avatar David S. Miller

Merge branch 'r8169-series-with-smaller-improvements'

Heiner Kallweit says:

====================
r8169: series with smaller improvements

This series includes smaller improvements, nothing exciting.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents edad8d26 a0456790
...@@ -77,8 +77,6 @@ static const int multicast_filter_limit = 32; ...@@ -77,8 +77,6 @@ static const int multicast_filter_limit = 32;
#define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc)) #define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc))
#define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc)) #define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc))
#define RTL8169_TX_TIMEOUT (6*HZ)
/* write/read MMIO register */ /* write/read MMIO register */
#define RTL_W8(tp, reg, val8) writeb((val8), tp->mmio_addr + (reg)) #define RTL_W8(tp, reg, val8) writeb((val8), tp->mmio_addr + (reg))
#define RTL_W16(tp, reg, val16) writew((val16), tp->mmio_addr + (reg)) #define RTL_W16(tp, reg, val16) writew((val16), tp->mmio_addr + (reg))
...@@ -1354,7 +1352,8 @@ static void rtl_irq_enable_all(struct rtl8169_private *tp) ...@@ -1354,7 +1352,8 @@ static void rtl_irq_enable_all(struct rtl8169_private *tp)
static void rtl8169_irq_mask_and_ack(struct rtl8169_private *tp) static void rtl8169_irq_mask_and_ack(struct rtl8169_private *tp)
{ {
rtl_irq_disable(tp); rtl_irq_disable(tp);
rtl_ack_events(tp, RTL_EVENT_NAPI | tp->event_slow); rtl_ack_events(tp, 0xffff);
/* PCI commit */
RTL_R8(tp, ChipCmd); RTL_R8(tp, ChipCmd);
} }
...@@ -7347,11 +7346,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7347,11 +7346,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp->cp_cmd = RTL_R16(tp, CPlusCmd); tp->cp_cmd = RTL_R16(tp, CPlusCmd);
if ((sizeof(dma_addr_t) > 4) && if (sizeof(dma_addr_t) > 4 && (use_dac == 1 || (use_dac == -1 &&
(use_dac == 1 || (use_dac == -1 && pci_is_pcie(pdev) && tp->mac_version >= RTL_GIGA_MAC_VER_18)) &&
tp->mac_version >= RTL_GIGA_MAC_VER_18)) && !dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
!pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
/* CPlusCmd Dual Access Cycle is only needed for non-PCIe */ /* CPlusCmd Dual Access Cycle is only needed for non-PCIe */
if (!pci_is_pcie(pdev)) if (!pci_is_pcie(pdev))
...@@ -7367,14 +7364,12 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7367,14 +7364,12 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rtl_init_rxcfg(tp); rtl_init_rxcfg(tp);
rtl_irq_disable(tp); rtl8169_irq_mask_and_ack(tp);
rtl_hw_initialize(tp); rtl_hw_initialize(tp);
rtl_hw_reset(tp); rtl_hw_reset(tp);
rtl_ack_events(tp, 0xffff);
pci_set_master(pdev); pci_set_master(pdev);
rtl_init_mdio_ops(tp); rtl_init_mdio_ops(tp);
...@@ -7414,7 +7409,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7414,7 +7409,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->dev_addr[i] = RTL_R8(tp, MAC0 + i); dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
dev->ethtool_ops = &rtl8169_ethtool_ops; dev->ethtool_ops = &rtl8169_ethtool_ops;
dev->watchdog_timeo = RTL8169_TX_TIMEOUT;
netif_napi_add(dev, &tp->napi, rtl8169_poll, NAPI_POLL_WEIGHT); netif_napi_add(dev, &tp->napi, rtl8169_poll, NAPI_POLL_WEIGHT);
......
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