summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-02-11 03:30:17 +0000
committerimp <imp@FreeBSD.org>2006-02-11 03:30:17 +0000
commit619dbefbddd679ed12c9ea0c65e3f299dfe01b8d (patch)
tree486272405bb98d259620d450b62b413e2a6b1fdd
parent86559abeb94223f57e28c0708feeeb6479160e02 (diff)
downloadFreeBSD-src-619dbefbddd679ed12c9ea0c65e3f299dfe01b8d.zip
FreeBSD-src-619dbefbddd679ed12c9ea0c65e3f299dfe01b8d.tar.gz
Use the release version as a floor, not an exact match. Add comment to that
effect and draw attention to the fact that the list has stronger ordering requirements than before.
-rw-r--r--sys/dev/usb/uplcom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index a427b2c..cdf43b1 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -224,6 +224,9 @@ static const struct uplcom_product {
uint16_t product;
int32_t release; /* release is a 16bit entity,
* if -1 is specified we "don't care"
+ * This is a floor value. The table
+ * must have newer revs before older
+ * revs (and -1 last).
*/
char chiptype;
} uplcom_products [] = {
@@ -320,7 +323,7 @@ USB_MATCH(uplcom)
for (i = 0; uplcom_products[i].vendor != 0; i++) {
if (uplcom_products[i].vendor == uaa->vendor &&
uplcom_products[i].product == uaa->product &&
- (uplcom_products[i].release == uaa->release ||
+ (uplcom_products[i].release <= uaa->release ||
uplcom_products[i].release == -1)) {
return (UMATCH_VENDOR_PRODUCT);
}
OpenPOWER on IntegriCloud