aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c8fa9b1b229..7438049ca6d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -225,6 +225,7 @@ MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
225 225
226static int rx_copybreak = 200; 226static int rx_copybreak = 200;
227static int use_dac; 227static int use_dac;
228static int ignore_parity_err;
228static struct { 229static struct {
229 u32 msg_enable; 230 u32 msg_enable;
230} debug = { -1 }; 231} debug = { -1 };
@@ -469,6 +470,8 @@ module_param(use_dac, int, 0);
469MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot."); 470MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
470module_param_named(debug, debug.msg_enable, int, 0); 471module_param_named(debug, debug.msg_enable, int, 0);
471MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)"); 472MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)");
473module_param_named(ignore_parity_err, ignore_parity_err, bool, 0);
474MODULE_PARM_DESC(ignore_parity_err, "Ignore PCI parity error as target. Default: false");
472MODULE_LICENSE("GPL"); 475MODULE_LICENSE("GPL");
473MODULE_VERSION(RTL8169_VERSION); 476MODULE_VERSION(RTL8169_VERSION);
474 477
@@ -2380,12 +2383,17 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
2380 /* 2383 /*
2381 * The recovery sequence below admits a very elaborated explanation: 2384 * The recovery sequence below admits a very elaborated explanation:
2382 * - it seems to work; 2385 * - it seems to work;
2383 * - I did not see what else could be done. 2386 * - I did not see what else could be done;
2387 * - it makes iop3xx happy.
2384 * 2388 *
2385 * Feel free to adjust to your needs. 2389 * Feel free to adjust to your needs.
2386 */ 2390 */
2387 pci_write_config_word(pdev, PCI_COMMAND, 2391 if (ignore_parity_err)
2388 pci_cmd | PCI_COMMAND_SERR | PCI_COMMAND_PARITY); 2392 pci_cmd &= ~PCI_COMMAND_PARITY;
2393 else
2394 pci_cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY;
2395
2396 pci_write_config_word(pdev, PCI_COMMAND, pci_cmd);
2389 2397
2390 pci_write_config_word(pdev, PCI_STATUS, 2398 pci_write_config_word(pdev, PCI_STATUS,
2391 pci_status & (PCI_STATUS_DETECTED_PARITY | 2399 pci_status & (PCI_STATUS_DETECTED_PARITY |
@@ -2399,10 +2407,11 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
2399 tp->cp_cmd &= ~PCIDAC; 2407 tp->cp_cmd &= ~PCIDAC;
2400 RTL_W16(CPlusCmd, tp->cp_cmd); 2408 RTL_W16(CPlusCmd, tp->cp_cmd);
2401 dev->features &= ~NETIF_F_HIGHDMA; 2409 dev->features &= ~NETIF_F_HIGHDMA;
2402 rtl8169_schedule_work(dev, rtl8169_reinit_task);
2403 } 2410 }
2404 2411
2405 rtl8169_hw_reset(ioaddr); 2412 rtl8169_hw_reset(ioaddr);
2413
2414 rtl8169_schedule_work(dev, rtl8169_reinit_task);
2406} 2415}
2407 2416
2408static void 2417static void