public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* request_buffer versus buffer in Scsi_Cmnd
@ 2002-09-27  9:15 Jeremy Higdon
  2002-09-27 16:29 ` Mike Anderson
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Higdon @ 2002-09-27  9:15 UTC (permalink / raw)
  To: linux-scsi

I notice that the qlogicfc driver calls pci_map_sg with the request_buffer
field and pci_unmap_sg with the buffer field.

>From looking at the code in drivers/scsi/scsi*, it would appear that they
are mostly the same, and the fact that qlogicfc works would seem to confirm
that.  However, the fact that there are two different fields leads me
to ask what the difference is supposed to be.

thanks

jeremy

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

* Re: request_buffer versus buffer in Scsi_Cmnd
  2002-09-27  9:15 request_buffer versus buffer in Scsi_Cmnd Jeremy Higdon
@ 2002-09-27 16:29 ` Mike Anderson
  2002-09-28  1:50   ` Jeremy Higdon
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Anderson @ 2002-09-27 16:29 UTC (permalink / raw)
  To: Jeremy Higdon; +Cc: linux-scsi


Jeremy Higdon [jeremy@classic.engr.sgi.com] wrote:
> I notice that the qlogicfc driver calls pci_map_sg with the request_buffer
> field and pci_unmap_sg with the buffer field.
> 
> >From looking at the code in drivers/scsi/scsi*, it would appear that they
> are mostly the same, and the fact that qlogicfc works would seem to confirm
> that.  However, the fact that there are two different fields leads me
> to ask what the difference is supposed to be.
> 

There are a few fields in the Scsi_Cmnd that are duplicated to contain
the original values that the scsi cmd was submitted with mostly for retry.

Some Pairs:
	request_buffer, buffer
	request_bufflen, bufflen
	use_sg, old_use_sg
	etc.

a few more are listed in the scsi_retry_command.

-andmike
--
Michael Anderson
andmike@us.ibm.com


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

* Re: request_buffer versus buffer in Scsi_Cmnd
  2002-09-27 16:29 ` Mike Anderson
@ 2002-09-28  1:50   ` Jeremy Higdon
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Higdon @ 2002-09-28  1:50 UTC (permalink / raw)
  To: Mike Anderson; +Cc: linux-scsi

On Sep 27,  9:29am, Mike Anderson wrote:
> 
> Jeremy Higdon [jeremy@classic.engr.sgi.com] wrote:
> > I notice that the qlogicfc driver calls pci_map_sg with the request_buffer
> > field and pci_unmap_sg with the buffer field.
> > 
> > >From looking at the code in drivers/scsi/scsi*, it would appear that they
> > are mostly the same, and the fact that qlogicfc works would seem to confirm
> > that.  However, the fact that there are two different fields leads me
> > to ask what the difference is supposed to be.
> > 
> 
> There are a few fields in the Scsi_Cmnd that are duplicated to contain
> the original values that the scsi cmd was submitted with mostly for retry.
> 
> Some Pairs:
> 	request_buffer, buffer
> 	request_bufflen, bufflen
> 	use_sg, old_use_sg
> 	etc.
> 
> a few more are listed in the scsi_retry_command.
> 
> -andmike
> --
> Michael Anderson
> andmike@us.ibm.com
> 
>-- End of excerpt from Mike Anderson

Okay, thanks.  It sounds as though we should never use the buffer field,
then.  It also sounds as though the qlogicfc code is a bug, but that
it won't bite unless buffer and request_buffer are different (would that
be for a Request Sense after check condition, which qlogicfc would
never need?).

jeremy

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

end of thread, other threads:[~2002-09-28  1:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-27  9:15 request_buffer versus buffer in Scsi_Cmnd Jeremy Higdon
2002-09-27 16:29 ` Mike Anderson
2002-09-28  1:50   ` Jeremy Higdon

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