Re: Unable to access 3TB USB drive via IB-351

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

 



Alan --

You realize that's an okay patch for testing, but not as a final
solution, right?  8020 can't accept the short commands; they need to
be at least 12 bytes....

Matt

On Mon, Oct 24, 2011 at 9:36 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 24 Oct 2011, Matthew Dharm wrote:
>
>> Alan / Simon --
>>
>> If you look at the device descriptors, it reports itself as an
>> SFF-8020i device.  This kicks-in code to force all commands to
>> 12-byte, as (I think) required by 8020i.  Of course, for a large
>> device like this, you might need 16-byte commands.
>>
>> This probably needs a protocol override to force it back to
>> transparent SCSI mode.  Either that, or someone needs to take a longer
>> look at the 8020 spec, 8020 devices, and see if there is a way to make
>> it work without an override...
>
> Ooh, you're right.  I never noticed.
>
> I don't know if 8020i is restricted to <= 12 bytes.  MMC isn't.  But we
> may as well accept larger commands too, without padding.  (Or maybe
> they'll need to be padded to 16 bytes.)  And we may as well treat UFI
> devices the same way.
>
> Simon, this patch ought to do the trick.  Let us know what happens.
>
> Alan Stern
>
>
>
> Index: usb-3.1/drivers/usb/storage/protocol.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/storage/protocol.c
> +++ usb-3.1/drivers/usb/storage/protocol.c
> @@ -66,9 +66,6 @@ void usb_stor_pad12_command(struct scsi_
>        for (; srb->cmd_len<12; srb->cmd_len++)
>                srb->cmnd[srb->cmd_len] = 0;
>
> -       /* set command length to 12 bytes */
> -       srb->cmd_len = 12;
> -
>        /* send the command to the transport layer */
>        usb_stor_invoke_transport(srb, us);
>  }
> @@ -86,9 +83,6 @@ void usb_stor_ufi_command(struct scsi_cm
>        for (; srb->cmd_len<12; srb->cmd_len++)
>                srb->cmnd[srb->cmd_len] = 0;
>
> -       /* set command length to 12 bytes (this affects the transport layer) */
> -       srb->cmd_len = 12;
> -
>        /* XXX We should be constantly re-evaluating the need for these */
>
>        /* determine the correct data length for these commands */
>
>



-- 
Matthew Dharm
Maintainer, USB Mass Storage driver for Linux
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux