Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43238
b: refs/heads/master
c: d03902b
h: refs/heads/master
v: v3
  • Loading branch information
Francois Romieu authored and Francois Romieu committed Dec 3, 2006
1 parent 214698b commit 1c124e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2
refs/heads/master: d03902b8864d7814c938f67befade5a3bba68708
17 changes: 13 additions & 4 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);

static int rx_copybreak = 200;
static int use_dac;
static int ignore_parity_err;
static struct {
u32 msg_enable;
} debug = { -1 };
Expand Down Expand Up @@ -469,6 +470,8 @@ module_param(use_dac, int, 0);
MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
module_param_named(debug, debug.msg_enable, int, 0);
MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)");
module_param_named(ignore_parity_err, ignore_parity_err, bool, 0);
MODULE_PARM_DESC(ignore_parity_err, "Ignore PCI parity error as target. Default: false");
MODULE_LICENSE("GPL");
MODULE_VERSION(RTL8169_VERSION);

Expand Down Expand Up @@ -2380,12 +2383,17 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
/*
* The recovery sequence below admits a very elaborated explanation:
* - it seems to work;
* - I did not see what else could be done.
* - I did not see what else could be done;
* - it makes iop3xx happy.
*
* Feel free to adjust to your needs.
*/
pci_write_config_word(pdev, PCI_COMMAND,
pci_cmd | PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
if (ignore_parity_err)
pci_cmd &= ~PCI_COMMAND_PARITY;
else
pci_cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY;

pci_write_config_word(pdev, PCI_COMMAND, pci_cmd);

pci_write_config_word(pdev, PCI_STATUS,
pci_status & (PCI_STATUS_DETECTED_PARITY |
Expand All @@ -2399,10 +2407,11 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
tp->cp_cmd &= ~PCIDAC;
RTL_W16(CPlusCmd, tp->cp_cmd);
dev->features &= ~NETIF_F_HIGHDMA;
rtl8169_schedule_work(dev, rtl8169_reinit_task);
}

rtl8169_hw_reset(ioaddr);

rtl8169_schedule_work(dev, rtl8169_reinit_task);
}

static void
Expand Down

0 comments on commit 1c124e5

Please sign in to comment.