From 619dbefbddd679ed12c9ea0c65e3f299dfe01b8d Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 11 Feb 2006 03:30:17 +0000 Subject: 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. --- sys/dev/usb/uplcom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- cgit v1.1