grub-devel
[Top][All Lists]
Advanced

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

Re: [RFT] Re: [Patch] [bug #26237] multiple problems with usb devices


From: Aleš Nesrsta
Subject: Re: [RFT] Re: [Patch] [bug #26237] multiple problems with usb devices
Date: Thu, 03 Jun 2010 13:47:41 +0200

Hello Vladimir,

only shortly:

> > Oh, I find probably the mistake right now - there is missing my older
> > small patch in usbms.c - there is fast "hand made" "patch", I have no
> > more time, sorry:
> > usbms.c, line 240:
> > -   cbw.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
> > +   cbw.lun = scsi->lun; /* In USB MS CBW are LUN bits on another place
> > than in SCSI CDB, both should be set correctly. */
> >
> >   
> Perhaps (scsi->lun << GRUB_SCSI_LUN_SHIFT) | scsi->lun ?

I think no, simply in this way:

cbw.lun = scsi->lun;

Look in http://www.usb.org/developers/devclass_docs/usbmassbulk_10.pdf
("Universal Serial Bus Mass Storage Class Bulk-Only Transport, Revision
1.0, September 31, 1999"), chapter 5.1 Command Block Wrapper (CBW).
Field bCBWLUN is in 13-th byte in low four bytes, i.e. it should be
directly GRUB cbw.lun.

This small patch was included in my some previous patch (I think
usb_patch_100523_0) and it worked. But if somebody have multi-LUN
device, please test it (usually some "X in one" card readers are
multi-LUN, I tested it on "Trust CR-1200 16-in-1" with SD and CF cards
inserted in).

Best regards
Ales




reply via email to

[Prev in Thread] Current Thread [Next in Thread]