Thread (17 messages) 17 messages, 7 authors, 2012-07-06

Re: [ 38/48] SCSI & usb-storage: add try_rc_10_first flag

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-07-02 22:23:41
Also in: linux-scsi, lkml

On Mon, Jul 2, 2012 at 1:39 PM, James Bottomley
[off-list ref] wrote:
It's not idiotic.  It's, unfortunately, required by the standard to
check for protection capable devices.
 [.. dleted ]
 Martin Petersen did extensive testing of devices when we
changed it and doing RC16 first is hedged around by claiming support not
only for SCSI_3 but also for SBC_2 in your INQUIRY data.
Umm. That just smells like BS to me.

The "extensive testing" part was clearly not true, and it seems that
SCSI people sometimes forget that the biggest user (by *far*) is the
USB storage layer.

Also, your protection claim seems to be invalidated by the actual
code. Yes, it checks if the device claims to support protection. But
it *also* says "let's do that 16b command if "scsi_level >
SCSI_SPC_2". So your claim that it hedges around it by looking at the
inquiry data is pure crap. It's simply not true. Just look at the
code:

        if (sdp->host->max_cmd_len < 16)
                return 0;
        if (sdp->try_rc_10_first)
                return 0;
        if (sdp->scsi_level > SCSI_SPC_2)
                return 1;
        if (scsi_device_protection(sdp))
                return 1;
        return 0;

Notice how for high enough scsi_levels, it never even gets to that
scsi_device_protection() check, which does indeed look into protection
data.

So no, I simply don't see the careful testing or the checking that you
claim exists.

                 Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help