From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EA8BC208AE3FC for ; Tue, 19 Feb 2019 00:54:32 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 737F55A1EA; Tue, 19 Feb 2019 08:54:32 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-156.rdu2.redhat.com [10.10.120.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10E4417B64; Tue, 19 Feb 2019 08:54:28 +0000 (UTC) To: Gerd Hoffmann Cc: Ray Ni , qemu devel list , edk2-devel-01 , Markus Armbruster References: <20190219084916.yinhlryf4sgx7t5p@sirius.home.kraxel.org> From: Laszlo Ersek Message-ID: <547c2b61-3f31-e958-ca7c-a5215dc8b017@redhat.com> Date: Tue, 19 Feb 2019 09:54:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190219084916.yinhlryf4sgx7t5p@sirius.home.kraxel.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 19 Feb 2019 08:54:32 +0000 (UTC) Subject: Re: nonzero LUN on USB Bulk Only Transfer fails with QEMU+edk2 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 08:54:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/19/19 09:49, Gerd Hoffmann wrote: > Hi, > >> (2) If I change the cmdline to "lun=5", then the exchange is: > > Not supported (by the usb protocol). > > The protocol has a control message to query the number of devices (grep > for GetMaxLun in qemu). LUNs are not allowed to be sparse. So, with a > single storage device the LUN must be zero. With two devices the LUNs > must be 0,1, with three 0,1,2 etc., you get the idea :) Yes, Phil explained the same -- I originally missed this part of the documentation (because the requirement is documented, so the fault is clearly mine). However, once I fixed the configuration (so that I'd have LUNs 0 and 1), edk2 still tripped an assert. Please see my message elsewhere in this thread; the fixed config case is marked as item (4). Thanks! Laszlo > Maybe usb-bot should check for that and throw an error, I think right > now we only have the generic scsi code check which will verify the lun > isn't too big (<= 15) but will not check the non-sparse requirement. > > cheers, > Gerd >