summaryrefslogtreecommitdiffstats
path: root/sys/dev/hme
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2003-07-01 14:11:04 +0000
committertmm <tmm@FreeBSD.org>2003-07-01 14:11:04 +0000
commit1624ae9eccdc16224084693958679941cb2a47cb (patch)
treef701d62e15e9b35ff20b5d9a2d934f6a8f64d082 /sys/dev/hme
parente8331fe2626d7026214cc367d516271b160e1eb0 (diff)
downloadFreeBSD-src-1624ae9eccdc16224084693958679941cb2a47cb.zip
FreeBSD-src-1624ae9eccdc16224084693958679941cb2a47cb.tar.gz
Some gem and hme hardware bogusly has the intpin register hardwired to
0; detect this case and correct it. While being there, clean up nearby comments.
Diffstat (limited to 'sys/dev/hme')
-rw-r--r--sys/dev/hme/if_hme_pci.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/hme/if_hme_pci.c b/sys/dev/hme/if_hme_pci.c
index 8a89b6b..f113921 100644
--- a/sys/dev/hme/if_hme_pci.c
+++ b/sys/dev/hme/if_hme_pci.c
@@ -132,13 +132,15 @@ hme_pci_attach(device_t dev)
struct hme_softc *sc = &hsc->hsc_hme;
int error;
+ pci_enable_busmaster(dev);
/*
- * Enable memory-space and bus master accesses. This is kinda of
- * gross; but the hme comes up with neither enabled.
+ * Some Sun HMEs do have their intpin register bogusly set to 0,
+ * although it should be 1. correct that.
*/
- pci_enable_busmaster(dev);
+ if (pci_get_intpin(dev) == 0)
+ pci_set_intpin(dev, 1);
- sc->sc_pci = 1; /* XXXXX should all be done in bus_dma. */
+ sc->sc_pci = 1;
sc->sc_dev = dev;
/*
OpenPOWER on IntegriCloud