public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* evaluation of scsi_cmnd->resid
@ 2005-04-12 18:04 Andreas Herrmann
  2005-04-12 21:38 ` Douglas Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Herrmann @ 2005-04-12 18:04 UTC (permalink / raw)
  To: Linux SCSI

Hi,

Am I right in the assumption that scsi_cmnd->resid is just of use for
requests initiated by sg?

How does the SCSI-stack handle normal (non-sg) requests for SCSI disks
for which a scsi_cmnd->resid is set?  AFAIK, resid is ignored by
sd. So, such requests are returned to the block layer although the
amount of data transferred is less the amount of data that should have
been transferred.  For FCP-drivers this means that some error situations
cannot be handled by just using scsi_cmnd->resid.

What am I missing here?


Regards,

Andreas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: evaluation of scsi_cmnd->resid
  2005-04-12 18:04 evaluation of scsi_cmnd->resid Andreas Herrmann
@ 2005-04-12 21:38 ` Douglas Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2005-04-12 21:38 UTC (permalink / raw)
  To: Andreas Herrmann; +Cc: Linux SCSI

Andreas Herrmann wrote:
> Hi,
> 
> Am I right in the assumption that scsi_cmnd->resid is just of use for
> requests initiated by sg?
> 
> How does the SCSI-stack handle normal (non-sg) requests for SCSI disks
> for which a scsi_cmnd->resid is set?  AFAIK, resid is ignored by
> sd. So, such requests are returned to the block layer although the
> amount of data transferred is less the amount of data that should have
> been transferred.  For FCP-drivers this means that some error situations
> cannot be handled by just using scsi_cmnd->resid.
> 
> What am I missing here?

Andreas,
sd, sr, st, ch and osst (and the mid level when it issues
SCSI commands) need to be modified to use resid.

resid is initialized to zero (by the mid level). So older
LLDs that do not set resid will not change the current
situation for the ULDs mentioned above :-)

Doug Gilbert


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-12 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-12 18:04 evaluation of scsi_cmnd->resid Andreas Herrmann
2005-04-12 21:38 ` Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox