cvs commit: src/sys/cam/scsi scsi_da.c src/sys/dev/usb umass.c usbdevs

Matthew Jacob mj at feral.com
Thu Feb 2 14:13:07 PST 2006


>> 
>> No. But a device could have it turned off and you wouldn't then infer that 
>> you *could*.
>
> I guess I don't follow.  There was a suggestion to read page 8 during 
> the da device probe, cache the WCE value, and act on it accordingly 
> later on.  There was also a suggestion to read the page on demand as 
> part of the immediate decision to do the SYNC CACHE.  As much of a 
> hassle as it could be, the latter is likely the better approach as it 
> eliminates the messy state tracking that you'd have to do on the user. 
> Who wants to hack up the pass driver to trap mode page writes and then 
> try to correlate which da device to pass that info on to?  And yeah, 
> if the device is able to change the state on its own, there is no way 
> the first approach can work.
>

Okay- I was a bit fatigued (up until 2AM last night worrying over core 
emails)

The WCE bit from page 8 is either the current state, the persistent 
state, or whether you can change that bit (the PCF fields).

All you can infer from this bit is whether WCE is currently enabled, or 
whether the default is for it to be enabled or not. You cannot infer 
whether the device correctly supports it or not. You could infer from 
the CHANGEABLE version as to whether you can change the state.

I guess what is being suggested by inference here is that if the WCE bit 
is off at attach time, we don't issue a SYNC CACHE. If you want your 
drive to be cacheable, you run camcontrol on it (saving the page) and 
reboot.

I suppose this isn't so bad, because you could then also begin to think 
about using FUA as well.

-matt



More information about the freebsd-scsi mailing list