qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@nowt.org>
To: Blue Swirl <blueswir1@hotmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Fix sparc booting with no CD in drive
Date: Mon, 14 Aug 2006 16:08:20 +0100	[thread overview]
Message-ID: <200608141608.20776.paul@nowt.org> (raw)
In-Reply-To: <BAY104-F634C1EF58CA1827AC4D31FF490@phx.gbl>

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

  reply	other threads:[~2006-08-14 15:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-13 20:00 [Qemu-devel] [PATCH] Fix sparc booting with no CD in drive Blue Swirl
2006-08-14 15:08 ` Paul Brook [this message]
2006-08-15 15:45   ` [Qemu-devel] " Blue Swirl
2006-08-15 17:45     ` Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200608141608.20776.paul@nowt.org \
    --to=paul@nowt.org \
    --cc=blueswir1@hotmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).