From owner-freebsd-current@FreeBSD.ORG Mon Sep 15 14:15:53 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 669DE1065672 for ; Mon, 15 Sep 2008 14:15:53 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 3BF378FC08 for ; Mon, 15 Sep 2008 14:15:52 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id AE7DE1632B6 for ; Mon, 15 Sep 2008 10:00:32 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 15 Sep 2008 10:00:32 -0400 X-Sasl-enc: VMfrHceJccHyNVRVwkY2oBEy17PK4A+urTNEhoub9cvc 1221487232 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2D53113043 for ; Mon, 15 Sep 2008 10:00:32 -0400 (EDT) Message-ID: <48CE6A7E.8010306@incunabulum.net> Date: Mon, 15 Sep 2008 15:00:30 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: FreeBSD Current X-Enigmail-Version: 0.95.6 Content-Type: multipart/mixed; boundary="------------070109030907050207000703" Subject: [PATCH] Fix get max luns delay for QEMU USB disks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 14:15:53 -0000 This is a multi-part message in MIME format. --------------070109030907050207000703 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------070109030907050207000703 Content-Type: text/plain; name="qemu-umass.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-umass.diff" --- umass.c.orig 2008-09-15 14:35:10.000000000 +0100 +++ umass.c 2008-09-15 14:34:18.000000000 +0100 @@ -822,6 +822,10 @@ 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 @@ -62,6 +62,7 @@ * 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. @@ -2291,6 +2292,9 @@ /* 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 --------------070109030907050207000703--