diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2004-05-18 22:37:26 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2004-05-18 22:37:26 +0000 |
commit | e824686f820cabf340b3bf0ff8cdb0428ae0d1bf (patch) | |
tree | 3bf1cb63271d7e5d74f6d8a39c927a931e7a65b8 /sys/dev/pci/if_fxp_pci.c | |
parent | bdf74c0b530f383102220f8cd8b606746db94abb (diff) |
fix from netbsd to twiddle the fxp eeprom to disable dynamic standby mode
on cards that have issues with this creating pci errors in 10 mbps mode
tested by many, including me, nick, and pval.
ok jason@, markus@
Diffstat (limited to 'sys/dev/pci/if_fxp_pci.c')
-rw-r--r-- | sys/dev/pci/if_fxp_pci.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c index b02a14144b9..e9832152c82 100644 --- a/sys/dev/pci/if_fxp_pci.c +++ b/sys/dev/pci/if_fxp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fxp_pci.c,v 1.25 2004/02/25 12:25:09 markus Exp $ */ +/* $OpenBSD: if_fxp_pci.c,v 1.26 2004/05/18 22:37:25 beck Exp $ */ /* * Copyright (c) 1995, David Greenman @@ -201,6 +201,23 @@ fxp_pci_attach(parent, self, aux) break; } + /* + * Cards for which we should WRITE TO THE EEPROM + * to turn off dynamic standby mode to avoid + * a problem where the card will fail to resume when + * entering the IDLE state. We use this nasty if statement + * and corresponding pci dev numbers directly so that people + * know not to add new cards to this unless you are really + * certain what you are doing and are not going to end up + * killing people's eeproms. + */ + if ((PCI_VENDOR(pa->pa_id) == PCI_VENDOR_INTEL) && + (PCI_PRODUCT(pa->pa_id) == 0x2449 || + (PCI_PRODUCT(pa->pa_id) > 0x1030 && + PCI_PRODUCT(pa->pa_id) < 0x1039) || + (PCI_PRODUCT(pa->pa_id) == 0x1229 && (rev == 8 || rev == 9)))) + sc->sc_flags |= FXPF_DISABLE_STANDBY; + /* enable bus mastering */ pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, PCI_COMMAND_MASTER_ENABLE | |