From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GCe3H-00076d-Q1 for qemu-devel@nongnu.org; Mon, 14 Aug 2006 11:08:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GCe3C-00074a-UC for qemu-devel@nongnu.org; Mon, 14 Aug 2006 11:08:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCe3C-00074V-OB for qemu-devel@nongnu.org; Mon, 14 Aug 2006 11:08:22 -0400 Received: from [62.241.163.6] (helo=astro.systems.pipex.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GCe92-0004Qk-AC for qemu-devel@nongnu.org; Mon, 14 Aug 2006 11:14:24 -0400 From: Paul Brook Date: Mon, 14 Aug 2006 16:08:20 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608141608.20776.paul@nowt.org> Subject: [Qemu-devel] Re: [PATCH] Fix sparc booting with no CD in drive Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On Sunday 13 August 2006 21:00, Blue Swirl wrote: > If there is no CD in drive, sparc system emulator fails to boot. This > happens because error handling is a bit broken in scsi-disk.c. The older > OpenBIOS just didn't care. > Index: qemu/hw/scsi-disk.c > =================================================================== > --- qemu.orig/hw/scsi-disk.c 2006-08-13 19:44:42.000000000 +0000 > +++ qemu/hw/scsi-disk.c 2006-08-13 19:49:58.000000000 +0000 > @@ -109,8 +109,10 @@ > uint32_t n; > > DPRINTF("Read %d (%d/%d)\n", len, s->buf_len, s->sector_count); > - if (s->buf_len == 0 && s->sector_count == 0) > + if (s->buf_len == 0 && s->sector_count == 0) { > + scsi_command_complete(s, SENSE_NO_SENSE); > return 1; > + } > Why are we getting reads when no data is available? The command should already have completed. > @@ -447,6 +449,7 @@ > s->buf_len = 8; > } else { > scsi_command_complete(s, SENSE_NOT_READY); > + return 0; > } > break; > case 0x08: This bit looks ok. Paul