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: Tue, 15 Aug 2006 18:45:23 +0100	[thread overview]
Message-ID: <200608151845.24121.paul@nowt.org> (raw)
In-Reply-To: <BAY104-F2987F88A9C70ED3CAF05C3FF4F0@phx.gbl>

On Tuesday 15 August 2006 16:45, Blue Swirl wrote:
> >Why are we getting reads when no data is available? The command should
> >already
> >have completed.
>
> I don't know. Should all SCSI commands return something with the transfer
> mechanism? Or is it a bug in OpenBIOS, should it get the SCSI error status
> somehow without transferring data?

The scsi_read_data and scsi_write_data routines correspond directly to the 
SCSI DATA IN and DATA OUT phases.

It's up to the HBA (ie. esp) emulation to keep track of the SCSI phase based 
on the return value of scsi_send_command and whether the command completion 
routine has been called.
It's also up to the HBA to implement the SCSI STATUS phase based on the sense 
code passed to the completion routine. Calling completion routine with 
SCSI_REASON_DONE indicates that the command has finished (success is 
determined by the sense code) and the disk is ready for the next command.

Commands can fail at any time, including before any data has been transferred. 
On LSI HBA this causes an invalid phase exception to be raised when data 
transfer is attempted. I don't remember offhand how the ESP controller 
handles this. There are also some commands that complete successfully without 
transfering any data.

> The background here is that OpenBIOS probes for SCSI devices, but when
> probing of capacity for nonexistent CDROM, the command fails.

The read capacity command deliberately fails when there is no media present.

Paul

      reply	other threads:[~2006-08-15 17:45 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 ` [Qemu-devel] " Paul Brook
2006-08-15 15:45   ` Blue Swirl
2006-08-15 17:45     ` Paul Brook [this message]

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=200608151845.24121.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).