From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAMaL-0003jZ-CR for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:51:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAMaF-0003gu-Sn for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:51:00 -0500 Received: from [199.232.76.173] (port=53009 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAMaF-0003gU-Ew for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:50:55 -0500 Received: from verein.lst.de ([213.95.11.210]:45534) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NAMa9-0004te-HV for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:50:50 -0500 Date: Tue, 17 Nov 2009 12:50:47 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code. Message-ID: <20091117115047.GA1330@lst.de> References: <1258453071-3496-1-git-send-email-kraxel@redhat.com> <1258453071-3496-10-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1258453071-3496-10-git-send-email-kraxel@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org The subject is a bit confusing - it's not the full request parsing but just some helpers. > +static int scsi_req_length(SCSIRequest *req, uint8_t *cmd) > +{ > + switch (cmd[0] >> 5) { I know qemu code tends to be very uncommented and the code this is lifted from too, but some comments on how transfer and command length related to the group in the higher bit of the command would be pretty useful for the casual observer of this code.