Skip to content

Commit 10b63e8

Browse files
hkallweitdavem330
authored andcommitted
r8169: remove PCI DAC support
The old non-PCIe chip versions support PCI DAC, however this feature seems to be fragile, see comment in the PCI error handler. Therefore it's disabled per default. I think meanwhile it's time remove support for this legacy feature. This helps to reduce complexity of the driver. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6dc8b74 commit 10b63e8

File tree

1 file changed

+1
-17
lines changed
  • drivers/net/ethernet/realtek

1 file changed

+1
-17
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
229229

230230
MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
231231

232-
static int use_dac = -1;
233232
static struct {
234233
u32 msg_enable;
235234
} debug = { -1 };
@@ -704,8 +703,6 @@ struct rtl8169_private {
704703

705704
MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
706705
MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
707-
module_param(use_dac, int, 0);
708-
MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
709706
module_param_named(debug, debug.msg_enable, int, 0);
710707
MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)");
711708
MODULE_SOFTDEP("pre: realtek");
@@ -6180,14 +6177,6 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
61806177
PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_REC_MASTER_ABORT |
61816178
PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_SIG_TARGET_ABORT));
61826179

6183-
/* The infamous DAC f*ckup only happens at boot time */
6184-
if ((tp->cp_cmd & PCIDAC) && !tp->cur_rx) {
6185-
netif_info(tp, intr, dev, "disabling PCI DAC\n");
6186-
tp->cp_cmd &= ~PCIDAC;
6187-
RTL_W16(tp, CPlusCmd, tp->cp_cmd);
6188-
dev->features &= ~NETIF_F_HIGHDMA;
6189-
}
6190-
61916180
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
61926181
}
61936182

@@ -7241,13 +7230,8 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
72417230

72427231
tp->cp_cmd = RTL_R16(tp, CPlusCmd);
72437232

7244-
if (sizeof(dma_addr_t) > 4 && (use_dac == 1 || (use_dac == -1 &&
7245-
tp->mac_version >= RTL_GIGA_MAC_VER_18)) &&
7233+
if (sizeof(dma_addr_t) > 4 && tp->mac_version >= RTL_GIGA_MAC_VER_18 &&
72467234
!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
7247-
7248-
/* CPlusCmd Dual Access Cycle is only needed for non-PCIe */
7249-
if (!pci_is_pcie(pdev))
7250-
tp->cp_cmd |= PCIDAC;
72517235
dev->features |= NETIF_F_HIGHDMA;
72527236
} else {
72537237
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));

0 commit comments

Comments
 (0)