[PATCH] Fix get max luns delay for QEMU USB disks

From: Bruce M Simpson <bms_at_incunabulum.net>
Date: Mon, 15 Sep 2008 15:00:30 +0100
Hi,

QEMU will allow you to emulate umass devices using files.

However it does so with a VID/PID of 0, and does not support "get max 
lun" which causes a brief hang on boot.

This patch is against RELENG_7 but you get the general idea.

Any objections?

BMS

--- umass.c.orig	2008-09-15 14:35:10.000000000 +0100
+++ umass.c	2008-09-15 14:34:18.000000000 +0100
_at__at_ -822,6 +822,10 _at__at_
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  NO_QUIRKS
 	},
+	{ USB_VENDOR_UNKNOWN0, USB_PRODUCT_UNKNOWN0_UNKNOWN0, RID_WILDCARD,
+	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+	  NO_GETMAXLUN
+	},
 	{ USB_VENDOR_VIA, USB_PRODUCT_VIA_USB2IDEBRIDGE, RID_WILDCARD,
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  NO_SYNCHRONIZE_CACHE
--- usbdevs.orig	2008-09-15 14:31:04.000000000 +0100
+++ usbdevs	2008-09-15 14:32:09.000000000 +0100
_at__at_ -62,6 +62,7 _at__at_
  * make the device recognised by the appropriate device driver.
  */
 
+vendor UNKNOWN0		0x0000	Unknown vendor
 vendor UNKNOWN1		0x0053	Unknown vendor
 vendor UNKNOWN2		0x0105	Unknown vendor
 vendor EGALAX2		0x0123	eGalax, Inc.
_at__at_ -2291,6 +2292,9 _at__at_
 /* VIA Technologies products */
 product VIA USB2IDEBRIDGE	0x6204	USB 2.0 IDE Bridge
 
+/* Unknown vendor: QEMU typically presents zeroed VID/PID for disk images */
+product UNKNOWN0 UNKNOWN0	0x0000	Unknown device
+
 /* USI products */
 product USI MC60		0x10c5	MC60 Serial
 
Received on Mon Sep 15 2008 - 12:15:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:35 UTC