Re: Re: BUG in kernel: Wrong Handling of USB HDD’s in scsiglue(slave_configure) and scsi/sd(sd_read_cache_type)

From: Alan Stern
Date: Mon Oct 03 2011 - 14:11:00 EST


On Mon, 3 Oct 2011, Douglas Gilbert wrote:

> The RBC device parameters mode page followed by a Power
> Condition mode page. The RBC device parameters mode page
> is the only SCSI page I have seen (mode, log, VPD, etc)
> with a 5 byte field!
>
> Decoded response to a probable MODE SENSE(6) "fetch all
> pages" command:
> RBC device parameters mpage:
> WCD=0 [double negative: write cache enabled]
> Logical block size: 512 bytes
> Number of logical blocks: 0x12A19EB0 *** [160 GB]
> Power/performance: 0x3c
> READD: 0 [READ enabled]
> WRITED: 0 [WRITE enabled]
> FORMATD: 0 [FORMAT UNIT enabled]
> LOCKD: 1 [media cannot be locked]
> Power Condition mpage:
> IDLE=0
> STANDBY=1
> IDLE_CONDITION_TIMER=0
> STANDBY_CONDITION_TIMER=0xbb8 [300 seconds]
>
> References: rbc-r10a.pdf [1999] + spc3r26 [2005]
>
> Hopefully Seagate will switch to UAS(P) in the near future.
>
>
> *** That is _not_ the address of the last valid LB as in
> the SCSI READ CAPACITY command!

Thanks for the explanation.

> > Would it make sense to assume write caching is present and enabled if
> > the drive does not provide a Caching page?
>
> No. You need to also take into account the RBC
> device parameters mode page if present. See above.

All right, suppose neither page is present. Does it then make sense to
assume by default that write caching is enabled?

Alan Stern

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