Read PCI device id instead of PCI revision id. Also checks the read

device id is JMC260 family. Previously it just verified the deivce
is JMC260 Rev A0. This will make it easy for newer JMC2xx support.

Pointed out by:	bouyer at NetBSD
This commit is contained in:
Pyun YongHyeon 2008-10-13 01:11:28 +00:00
parent f5803010bb
commit a8061cb7e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183814
2 changed files with 4 additions and 2 deletions

View File

@ -624,8 +624,8 @@ jme_attach(device_t dev)
goto fail;
}
sc->jme_rev = pci_get_revid(dev);
if (sc->jme_rev == DEVICEID_JMC260) {
sc->jme_rev = pci_get_device(dev);
if ((sc->jme_rev & DEVICEID_JMC2XX_MASK) == DEVICEID_JMC260) {
sc->jme_flags |= JME_FLAG_FASTETH;
sc->jme_flags |= JME_FLAG_NOJUMBO;
}

View File

@ -48,6 +48,8 @@
#define DEVICEID_JMC260 0x0260
#define DEVICEREVID_JMC260_A0 0x00
#define DEVICEID_JMC2XX_MASK 0x0FF0
/* JMC250 PCI configuration register. */
#define JME_PCI_BAR0 0x10 /* 16KB memory window. */