Naohiko,
I have one of these devices in my possesion. The new code to support them
has not yet been intergrated into the publically available linux kernels.
I'll be releasing a patch later (perhaps monday -- I'm travelling this
weekend) which will add support for this device.
However, you are correct -- the auto-sense is sent to the wrong LUN. My
private development code (available by anonymous CVS from sourceforge.net)
has the fix for this. Please visit www.sourceforge.net and
linux-usb.sourceforge.net for information about how to get this code.
Tho, the device also shows more unusual behavior (which is causing the
delay of the patch). Apparently this device cannot handle a GET_STATUS
request while there is other pending I/O -- the normal usb_clear_halt()
function uses this request to verify that the STALL condition has been
cleared. Thus special code must be added to support this device -- this is
not hard in itself, but I am still pondering as to how I want to handle
this unusual (and out of spec) limitation of the device.
Matt Dharm
On Wed, Jun 07, 2000 at 02:51:18PM +0900, Naohiko Toyokura wrote:
> Hello!
>
> I am trying to get the Hagiwara FlashGate -DUAL- working at
> 2.4.0-test1-ac9. This is a new product which was put on sale on the 19th
> of last month. This device has two slots, SmartMedia Card slot and ATA
> FlashCard (PC-Card) slot. So it is constructed from two LUN.
>
> About the LUN, it may have a problem. Log messages said:
>
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Bulk command S 0x43425355 T 0xdf LUN
>1 L 0 F 0 CL 6
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Bulk command transfer result=0
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Attempting to get CSW...
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Bulk status result = 0
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Bulk status S 0x53425355 T 0xdf R 0 V
>0x1
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: -- transport indicates command
>failure
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Issuing auto-REQUEST_SENSE
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Bulk command S 0x43425355 T 0xdf LUN
>0 L 18 F 128 CL 6
> Jun 7 11:04:26 toyozo2 kernel: usb-storage.c: Bulk command transfer result=0
>
> We send the command to LUN _1_. However, when the auto-sense, it send to LUN _0_.
>
> I think,
>
> In usb-storage.c invoke_transport():
> srb->cmnd[0] = REQUEST_SENSE;
> srb->cmnd[1] = 0;
> srb->cmnd[2] = 0;
> srb->cmnd[3] = 0;
> srb->cmnd[4] = 18;
> srb->cmnd[5] = 0;
> it should change from "srb->cmnd[1] = 0;" to "srb->cmnd[1] = srb->cmnd[1] & 0xE0;"
>
> OR
>
> In Bulk_transport():
> bcb.Lun = srb->cmnd[1] >> 5;
> it should be changed to "bcb.Lun = srb->lun;".
>
> Regards,
>
> -----
> Naohiko Toyokura
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Matthew Dharm Home: [EMAIL PROTECTED]
Senior Engineer, QCP Inc. Work: [EMAIL PROTECTED]
It's not that hard. No matter what the problem is, tell the customer
to reinstall Windows.
-- Nurse
User Friendly, 3/22/1998
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]