Right now, I've somewhat come up with:
- client request occurs
- call device send_command()
- if result is 0, assume my complete() was called with
SCSI_REASON_DONE
- else, use sign of result for transfer direction, store the
absolute value as the total expected transfer len and call
the device scsi_data_read()/write() and wait for complete()
- when complete() is called:
- if SCSI_REASON_DONE, complete client request
- else perform the client "DMA" for "arg" bytes
- call the device scsi_data_read()/write() again
No, this is exactly as I'm expecting the SCSI layer to work.
Yes.
So from the light of this the patch to scsi-generic is valid.
Yes.
And it really looks like papering over a bug in the lsi HBA code.
Indeed. If the patch breaks lsi I'd agree that it is lsi's fault.
Anyone tested whenever current upstream lsi actually breaks with the
patch applied?
I've attempted to convert lsi to use iovecs a while ago, and *that*
version definitively had problems with short transfers, so maybe this is
a leftover from those days where scsi hacking was based on that branch ...
cheers,
Gerd