Re: TYPE_RBC cache fixes (sbp2.c affected)

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

 



On Mon, May 16, 2005 at 01:26:54PM +1000, Douglas Gilbert wrote:
> >TYPE_RBC - these guys have writeback cache flag there and are not 
> >guaranteed
> >to have page 8 at all.
> 
> The Write(back) Cache Disable (WCD) flag in mode page 6
> is logically flipped from WCE in DASD (i.e. disk) caching
> mode page (page number 8).

Thus the
                if (modepage == 8) {
                        sdkp->WCE = ((buffer[offset + 2] & 0x04) != 0);
                        sdkp->RCD = ((buffer[offset + 2] & 0x01) != 0);
                } else {
                        sdkp->WCE = ((buffer[offset + 2] & 0x01) == 0);
                        sdkp->RCD = 0;
                }
in there - note the inverse check in the second case.

> >	f) sbp2 sets sdev->use_10_for_rw and sdev->use_10_for_ms instead
> >of bothering to remap READ6/WRITE6/MOD_SENSE, so most of the conversions
> >in there are gone now.
> 
> RBC makes MODE_SENSE/SELECT (6) support mandatory but does
> not support MODE_SENSE/SELECT(10).

I know.  However, behaviour of sbp2 before that patch was to remap
MODE_SENSE(6) to MODE_SENSE(10).  I'd rather not change that without
heavy testing - note that here we are talking about firewire devices
that talk sbp2 and happen to claim RBC as command set.  *IF* they
work with driver in Linus' tree, they will with ->use_10_for_...;
if/when we decide to change that behaviour, we'd better get ready for
random breakage.  IMO that's a separate story - let's keep the current
behaviour for now and just get rid of (badly broken) remapping in
favour of using flags.
-
: 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