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:
parent
f5803010bb
commit
a8061cb7e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183814
@ -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;
|
||||
}
|
||||
|
@ -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. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user