* [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN
@ 2014-09-20 0:06 Eric Nelson
2014-09-20 7:01 ` Marek Vasut
0 siblings, 1 reply; 5+ messages in thread
From: Eric Nelson @ 2014-09-20 0:06 UTC (permalink / raw)
To: u-boot
Without this flag, tools like Alex Page's USB Image Tool
won't see drives exposed over USB Gadget as removable,
and won't allow access to them.
http://www.alexpage.de/usb-image-tool/
The code was pulled from the main-line kernel:
drivers/usb/gadget/function/f_mass_storage.c
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
drivers/usb/gadget/f_mass_storage.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index f274d96..e045957 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -1110,6 +1110,7 @@ static int do_inquiry(struct fsg_common *common, struct fsg_buffhd *bh)
memset(buf, 0, 8);
buf[0] = TYPE_DISK;
+ buf[1] = curlun->removable ? 0x80 : 0;
buf[2] = 2; /* ANSI SCSI level 2 */
buf[3] = 2; /* SCSI-2 INQUIRY data format */
buf[4] = 31; /* Additional length */
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN
2014-09-20 0:06 [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN Eric Nelson
@ 2014-09-20 7:01 ` Marek Vasut
2014-09-22 6:45 ` Lukasz Majewski
2014-09-22 16:00 ` Lukasz Majewski
0 siblings, 2 replies; 5+ messages in thread
From: Marek Vasut @ 2014-09-20 7:01 UTC (permalink / raw)
To: u-boot
On Saturday, September 20, 2014 at 02:06:46 AM, Eric Nelson wrote:
> Without this flag, tools like Alex Page's USB Image Tool
> won't see drives exposed over USB Gadget as removable,
> and won't allow access to them.
> http://www.alexpage.de/usb-image-tool/
>
> The code was pulled from the main-line kernel:
> drivers/usb/gadget/function/f_mass_storage.c
>
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
I'm OK with this. This should go to current release too. Lukasz, do you agree ?
Do you want to pick it + send me PR or shall I apply directly ?
Eric, please CC Lukasz on the gadget patches, he's the gadget guru.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN
2014-09-20 7:01 ` Marek Vasut
@ 2014-09-22 6:45 ` Lukasz Majewski
2014-09-22 16:00 ` Lukasz Majewski
1 sibling, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2014-09-22 6:45 UTC (permalink / raw)
To: u-boot
Hi Marek, Eric
> On Saturday, September 20, 2014 at 02:06:46 AM, Eric Nelson wrote:
> > Without this flag, tools like Alex Page's USB Image Tool
> > won't see drives exposed over USB Gadget as removable,
> > and won't allow access to them.
> > http://www.alexpage.de/usb-image-tool/
> >
> > The code was pulled from the main-line kernel:
> > drivers/usb/gadget/function/f_mass_storage.c
> >
> > Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>
> I'm OK with this. This should go to current release too. Lukasz, do
> you agree ? Do you want to pick it + send me PR or shall I apply
> directly ?
>
> Eric, please CC Lukasz on the gadget patches, he's the gadget guru.
I will do my best to look into those patches today or tomorrow.
>
> Best regards,
> Marek Vasut
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN
2014-09-20 7:01 ` Marek Vasut
2014-09-22 6:45 ` Lukasz Majewski
@ 2014-09-22 16:00 ` Lukasz Majewski
2014-09-22 16:14 ` Eric Nelson
1 sibling, 1 reply; 5+ messages in thread
From: Lukasz Majewski @ 2014-09-22 16:00 UTC (permalink / raw)
To: u-boot
Hi Marek,
> On Saturday, September 20, 2014 at 02:06:46 AM, Eric Nelson wrote:
> > Without this flag, tools like Alex Page's USB Image Tool
> > won't see drives exposed over USB Gadget as removable,
> > and won't allow access to them.
> > http://www.alexpage.de/usb-image-tool/
> >
> > The code was pulled from the main-line kernel:
> > drivers/usb/gadget/function/f_mass_storage.c
> >
> > Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>
> I'm OK with this. This should go to current release too. Lukasz, do
> you agree ? Do you want to pick it + send me PR or shall I apply
> directly ?
Eric thanks for your patch.
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW (Trats - Exynos 4210)
I've applied this patch to u-boot-dfu branch.
I will send PR to Marek in a few days time.
>
> Eric, please CC Lukasz on the gadget patches, he's the gadget guru.
>
> Best regards,
> Marek Vasut
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN
2014-09-22 16:00 ` Lukasz Majewski
@ 2014-09-22 16:14 ` Eric Nelson
0 siblings, 0 replies; 5+ messages in thread
From: Eric Nelson @ 2014-09-22 16:14 UTC (permalink / raw)
To: u-boot
On 09/22/2014 09:00 AM, Lukasz Majewski wrote:
> Hi Marek,
>
>> On Saturday, September 20, 2014 at 02:06:46 AM, Eric Nelson wrote:
>>> Without this flag, tools like Alex Page's USB Image Tool
>>> won't see drives exposed over USB Gadget as removable,
>>> and won't allow access to them.
>>> http://www.alexpage.de/usb-image-tool/
>>>
>>> The code was pulled from the main-line kernel:
>>> drivers/usb/gadget/function/f_mass_storage.c
>>>
>>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>>
>> I'm OK with this. This should go to current release too. Lukasz, do
>> you agree ? Do you want to pick it + send me PR or shall I apply
>> directly ?
>
> Eric thanks for your patch.
>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
>
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Test HW (Trats - Exynos 4210)
>
> I've applied this patch to u-boot-dfu branch.
>
> I will send PR to Marek in a few days time.
>
Thanks Lukasz and Marek.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-22 16:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-20 0:06 [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN Eric Nelson
2014-09-20 7:01 ` Marek Vasut
2014-09-22 6:45 ` Lukasz Majewski
2014-09-22 16:00 ` Lukasz Majewski
2014-09-22 16:14 ` Eric Nelson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox