Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Oct 2005 23:40:43 +0200
From:      Fredrik Lindberg <fli+freebsd-current@shapeshifter.se>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        benlutz@datacomm.ch, current@freebsd.org
Subject:   Re: Linksys EG1032 rev. 3 patch
Message-ID:  <4341A55B.1070209@shapeshifter.se>
In-Reply-To: <20051003.132634.20912224.imp@bsdimp.com>
References:  <433F6018.2050900@datacomm.ch>	<433F976F.6090501@samsco.org>	<433FB9B9.9020207@shapeshifter.se> <20051003.132634.20912224.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
M. Warner Losh wrote:
> Is rev the right thing to filter based on, or is the subvendor id and
> subvendor device?  if a vendor sets the vendor id/vendor device fields
> wrong, who is to say that we can know based on the pci revision field
> if this device is right or not.  The revision field tends to change a
> lot and having a sample size of 1 or 2 (or even 5) likely is
> insufficient to know if it can be relied upon to not cause problems
> with the next container load of the cards arrives...
> 
> I know that the re vs rl decision is made based on the revision in the
> device's I/O space right now:
> 
> 	while (t->rl_name != NULL) {
> 		if ((pci_get_vendor(dev) == t->rl_vid) &&
> 		    (pci_get_device(dev) == t->rl_did)) {
> ... map I/O
> 			hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV;
> ... unmap I/O
> 			if (t->rl_basetype == hwrev) {
> 				device_set_desc(dev, t->rl_name);
> 				return (BUS_PROBE_DEFAULT);
> 			}
> 		}
> 		t++;
> 	}
> 	return (ENXIO);
> 
> Checking for 0x10 vs 0x15 for a card that has gone from rev 2 to rev 3
> just strikes me as unwise.
> 
> Warner

Filtering on subvendor/subdevice might be better, I didn't even think
of that and revision filtering seemed to be quite popular among
exsisting drivers.

The subdevice id for a rev.3 card seems to be 0x0024 (subvendor 0x1737).
I don't own a rev. 2 card but google says that the rev.2 card has
subdevice id 0x0015 (subvendor 0x1737).

	Fredrik



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4341A55B.1070209>