qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] scsi-generic: bugfixes for 'SCSIRequest' co


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Re: [PATCH] scsi-generic: bugfixes for 'SCSIRequest' conversion
Date: Thu, 25 Nov 2010 10:25:02 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat/3.1.3-1.el6 Thunderbird/3.1.3

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]