qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Fix sparc booting with no CD in drive


From: Paul Brook
Subject: [Qemu-devel] Re: [PATCH] Fix sparc booting with no CD in drive
Date: Mon, 14 Aug 2006 16:08:20 +0100
User-agent: KMail/1.9.3

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 via email to

[Prev in Thread] Current Thread [Next in Thread]