Re: SAVE_DATA / RESTORE_POINTERS message confusion

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

 



From: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Date: Mon, 30 Apr 2007 13:24:07 -0500

> On Mon, 2007-04-30 at 20:15 +0200, Guennadi Liakhovetski wrote:
> > Ok, looking through t10 docs there seem to be quite a few functions for 
> > the SAVE DATA POINTERS / MODIFY DATA POINTER / RESTORE POINTERS (btw, even 
> > POINTER vs. POINTERS use was inconsistent between the spi5r06, s2-r10l, 
> > ana a random book I have) also apart from the usual DISCONNECT / RESELECT, 
> > like re-requesting command / data / status.
> > 
> > Is there a SCSI driver that does all this pointer management correctly? 
> > And that's easy enough to understand and use as an example? For example, 
> > tmscsim just would reject MODIFY DP. And for every RESTORE POINTERS with 
> > sg there would be a KERN_INFO printk...
> 
> What most drivers do is to ignore the messages.  They assume they
> already know what the pointers are ... they're really only useful for
> disconnect and reconnect.  This is predicated on the assumption that the
> device won't use the save/restore to rewind in a transfer (i.e. save
> data pointers, accept more data and then disconnect) since all drivers
> seem to automatically save the pointer state at the moment of
> disconnect.

The new ESP driver in esp_scsi.c is a good example of doing at least
SAVE and RESTORE pointer management properly.  I plan to add the
necessary MODIFY bits soon.

I think it's important to get this right because a target can use
this to recover from internal errors during an I/O, in order to
transfer some block of the data again.

I am pretty sure that the firmware in the aic7xxx, sym53c8xx, et
al. have extensive code to handle this completely.  That's why there
aren't any good driver examples, not because it isn't being handled,
but because all the logic and important details are done in the scsi
adapter firmware.

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux