[PATCH V4 11/16] scsi: aha152x: use sg helper to operate scatterlist
ming.lei at redhat.com
Tue Jun 18 00:15:37 UTC 2019
On Tue, Jun 18, 2019 at 09:35:48AM +1000, Finn Thain wrote:
> On Mon, 17 Jun 2019, Finn Thain wrote:
> > On Mon, 17 Jun 2019, Ming Lei wrote:
> > > Use the scatterlist iterators and remove direct indexing of the
> > > scatterlist array.
> > >
> > > This way allows us to pre-allocate one small scatterlist, which can be
> > > chained with one runtime allocated scatterlist if the pre-allocated one
> > > isn't enough for the whole request.
> > >
> > > Finn added the change to replace SCp.buffers_residual with sg_is_last()
> > > for fixing updating it, and the similar change has been applied on
> > > NCR5380.c
> > >
> > > Cc: Finn Thain <fthain at telegraphics.com.au>
> > > Signed-off-by: Ming Lei <ming.lei at redhat.com>
> > Reviewed-by: Finn Thain <fthain at telegraphics.com.au>
> I have to retract that. I think this patch is still wrong.
> GETSTCNT() appears to be the number of bytes sent since datao_init() and
> not the number of bytes sent since the start of the command. (Note the
> CLRSTCNT in datao_init() which appears to clear the transfer counter.) I
> don't see how the existing datao_end() could work otherwise. (Juergen?)
> So here's another attempt. Ming, I'd be happy to take the blame/credit (in
> the form of a From tag etc.) in case you don't want to spend more time on
Sure, will do that in V5.
More information about the devel