Some usb flash drives report silly number of LUNs (e.g. 80) even though the maximum allowed is 15. Fix by masking off high order bits in maxlun. Reference: /n/sources/patch/applied/usb-disk-maxlun Date: Sat May 22 16:35:13 CES 2010 Signed-off-by: miller@hamnavoe.com --- /sys/src/cmd/usb/disk/disk.c Sat May 22 16:33:20 2010 +++ /sys/src/cmd/usb/disk/disk.c Sat May 22 16:33:17 2010 @@ -59,7 +59,7 @@ dprint(2, "disk: %s: getmaxlun failed: %r\n", dev->dir); }else dprint(2, "disk: %s: maxlun %d\n", dev->dir, max); - return max; + return max&0xF; } static int