request_buffer versus buffer in Scsi_Cmnd
I notice that the qlogicfc driver calls pci_map_sg with the request_buffer field and pci_unmap_sg with the buffer field.
Quoted 1 line
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
Quoted 8 lines · Jeremy Higdon [[email protected]] wrote:
I notice that the qlogicfc driver calls
pci_map_sgwith therequest_bufferfield andpci_unmap_sgwith the buffer field.Quoted 1 line
From looking at the code in
drivers/scsi/scsi*, it would appear that theyare 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
[email protected]
Quoted 20 lines · Mike Anderson
Quoted 8 lines · Jeremy Higdon [[email protected]] wrote:
I notice that the qlogicfc driver calls
pci_map_sgwith therequest_bufferfield andpci_unmap_sgwith the buffer field.Quoted 1 line
From looking at the code in
drivers/scsi/scsi*, it would appear that theyare 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_Cmndthat 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.
Quoted 8 lines
a few more are listed in the
scsi_retry_command.-andmike
--
Michael Anderson
[email protected]-- 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