* USB harddrive not working (2.4, 2.5)
@ 2003-03-19 10:21 Andrey Panin
2003-03-19 15:28 ` [Linux-usb-users] " Stephen J. Gowdy
2003-03-21 18:22 ` Jan Harkes
0 siblings, 2 replies; 4+ messages in thread
From: Andrey Panin @ 2003-03-19 10:21 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-usb-users
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
Hi,
ISD200 based hard drive bay doesn't work with 2.4 & 2.5,
can someone assist me with it?
Kernel message log appended.
Best regards.
--
Andrey Panin | Embedded systems software developer
pazke@orbita1.ru | PGP key: wwwkeys.pgp.net
[-- Attachment #2: usb.log --]
[-- Type: text/plain, Size: 9355 bytes --]
drivers/usb/core/usb.c: registered new driver hub
drivers/usb/host/uhci-hcd.c: USB Universal Host Controller Interface driver v2.0
PCI: Found IRQ 11 for device 00:1f.2
PCI: Setting latency timer of device 00:1f.2 to 64
uhci-hcd 00:1f.2: Intel Corp. 82801AA USB
uhci-hcd 00:1f.2: irq 11, io base 0000d000
uhci-hcd 00:1f.2: new USB bus registered, assigned bus number 1
hub 1-0:0: USB hub found
hub 1-0:0: 2 ports detected
hub 1-0:0: debounce: port 2: delay 100ms stable 4 status 0x101
hub 1-0:0: new USB device on port 2, assigned address 2
Initializing USB Mass Storage driver...
usb-storage: act_altsetting is 0
usb-storage: id_index calculated to be: 32
usb-storage: Array length appears to be: 81
usb-storage: Vendor: In-System
usb-storage: Product: USB/IDE Bridge (ATA/ATAPI)
usb-storage: USB Mass Storage device detected
usb-storage: Endpoints: In: 0xc336b934 Out: 0xc336b920 Int: 0xc336b948 (Period 32)
usb-storage: GetMaxLUN command result is 1, data is 0
usb-storage: Transport: Bulk
usb-storage: Protocol: ISD200 ATA/ATAPI
usb-storage: Allocating usb_ctrlrequest
usb-storage: Allocating URB
usb-storage: Allocating scatter-gather request block
usb-storage: ISD200 Initialization...
usb-storage: Entering isd200_get_inquiry_data
usb-storage: Entering isd200_manual_enum
usb-storage: Entering isd200_read_config
usb-storage: usb_stor_ctrl_transfer(): rq=02 rqtype=c0 value=0000 index=02 len=8
usb-storage: Status code 0; transferred 8/8
usb-storage: -- transfer complete
usb-storage: Retrieved the following ISD200 Config Data:
usb-storage: Event Notification: 0x0
usb-storage: External Clock: 0x0
usb-storage: ATA Init Timeout: 0x19
usb-storage: ATAPI Command Block Size: 0x0
usb-storage: Master/Slave Selection: 0x0
usb-storage: ATAPI Reset: 0x0
usb-storage: ATA Timing: 0x1
usb-storage: ATA Major Command: 0x24
usb-storage: ATA Minor Command: 0x24
usb-storage: Init Status: 0x0
usb-storage: Config Descriptor 2: 0x0
usb-storage: Skip Device Boot: 0x0
usb-storage: ATA 3 State Supsend: 0x0
usb-storage: Descriptor Override: 0x8
usb-storage: Last LUN Identifier: 0x0
usb-storage: SRST Enable: 0x0
usb-storage: Leaving isd200_read_config 00000000
usb-storage: isd200_action(ENUM,0xa0)
usb-storage: Bulk command S 0x43425355 T 0x0 Trg 0 LUN 1 L 0 F 0 CL 0
usb-storage: usb_stor_bulk_transfer_buf(): xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf(): xfer 13 bytes
usb-storage: Status code -32; transferred 0/13
usb-storage: clearing endpoint halt for pipe 0xc0010280
usb-storage: usb_stor_clear_halt: result=0
usb-storage: Attempting to get CSW (2nd try)...
usb-storage: usb_stor_bulk_transfer_buf(): xfer 13 bytes
usb-storage: Status code -32; transferred 0/13
usb-storage: clearing endpoint halt for pipe 0xc0010280
usb-storage: usb_stor_clear_halt: result=0
usb-storage: Bulk status result = 2
usb-storage: isd200_action(0x04) error: 2
usb-storage: Setting Master/Slave selection to 0
usb-storage: Entering isd200_write_config
usb-storage: Writing the following ISD200 Config Data:
usb-storage: Event Notification: 0x0
usb-storage: External Clock: 0x0
usb-storage: ATA Init Timeout: 0x19
usb-storage: ATAPI Command Block Size: 0x0
usb-storage: Master/Slave Selection: 0x0
usb-storage: ATAPI Reset: 0x0
usb-storage: ATA Timing: 0x1
usb-storage: ATA Major Command: 0x24
usb-storage: ATA Minor Command: 0x24
usb-storage: Init Status: 0x0
usb-storage: Config Descriptor 2: 0x0
usb-storage: Skip Device Boot: 0x0
usb-storage: ATA 3 State Supsend: 0x0
usb-storage: Descriptor Override: 0x8
usb-storage: Last LUN Identifier: 0x0
usb-storage: SRST Enable: 0x0
usb-storage: usb_stor_ctrl_transfer(): rq=01 rqtype=40 value=0000 index=02 len=8
usb-storage: Status code 0; transferred 8/8
usb-storage: -- transfer complete
usb-storage: ISD200 Config Data was written successfully
usb-storage: Leaving isd200_write_config 00000000
usb-storage: Leaving isd200_manual_enum 00000000
usb-storage: Protocol changed to: Transparent SCSI
usb-storage: Leaving isd200_get_inquiry_data 00000000
usb-storage: ISD200 Initialization complete
usb-storage: *** thread sleeping.
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command INQUIRY (6 bytes)
usb-storage: 12 00 00 00 24 00
usb-storage: Bulk command S 0x43425355 T 0x1 Trg 0 LUN 0 L 36 F 128 CL 6
usb-storage: usb_stor_bulk_transfer_buf(): xfer 31 bytes
usb-storage: Status code -32; transferred 31/31
usb-storage: clearing endpoint halt for pipe 0xc0008200
usb-storage: usb_stor_clear_halt: result=0
usb-storage: Bulk command transfer result=2
usb-storage: -- transport indicates error, resetting
usb-storage: Bulk reset requested
usb-storage: command_abort() called
usb-storage: usb_stor_abort_transport called
usb-storage: Soft reset: clearing bulk-in endpoint halt
usb-storage: Soft reset: clearing bulk-out endpoint halt
usb-storage: Soft reset done
usb-storage: scsi cmd done, result=0x70000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage: 00 00 00 00 00 00
usb-storage: Bulk command S 0x43425355 T 0x1 Trg 0 LUN 0 L 0 F 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf(): xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf(): xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x1 R 0 Stat 0x2
usb-storage: -- transport indicates error, resetting
usb-storage: Bulk reset requested
usb-storage: command_abort() called
usb-storage: usb_stor_abort_transport called
usb-storage: Soft reset: clearing bulk-in endpoint halt
usb-storage: Soft reset: clearing bulk-out endpoint halt
usb-storage: Soft reset done
usb-storage: scsi cmd done, result=0x70000
usb-storage: *** thread sleeping.
usb-storage: device_reset() called
usb-storage: Bulk reset requested
usb-storage: Soft reset: clearing bulk-in endpoint halt
usb-storage: Soft reset: clearing bulk-out endpoint halt
usb-storage: Soft reset done
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage: 00 00 00 00 00 00
usb-storage: Bulk command S 0x43425355 T 0x1 Trg 0 LUN 0 L 0 F 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf(): xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf(): xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk status Sig 0x53425355 T 0x1 R 0 Stat 0x2
usb-storage: -- transport indicates error, resetting
usb-storage: Bulk reset requested
usb-storage: command_abort() called
usb-storage: usb_stor_abort_transport called
usb-storage: Soft reset: clearing bulk-in endpoint halt
usb-storage: Soft reset: clearing bulk-out endpoint halt
usb-storage: Soft reset done
usb-storage: scsi cmd done, result=0x70000
usb-storage: *** thread sleeping.
usb-storage: bus_reset() called
drivers/usb/core/hub.c: USB device not accepting new address (error=-22)
usb-storage: usb_reset_device returns -22
scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 0 lun 0
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (1/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (2/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (3/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (4/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (5/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (6/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand() called
usb-storage: *** thread awakened.
usb-storage: Bad target number (7/0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
drivers/usb/core/usb.c: registered new driver usb-storage
USB Mass Storage support registered.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Linux-usb-users] USB harddrive not working (2.4, 2.5)
2003-03-19 10:21 USB harddrive not working (2.4, 2.5) Andrey Panin
@ 2003-03-19 15:28 ` Stephen J. Gowdy
2003-03-21 18:22 ` Jan Harkes
1 sibling, 0 replies; 4+ messages in thread
From: Stephen J. Gowdy @ 2003-03-19 15:28 UTC (permalink / raw)
To: Andrey Panin; +Cc: linux-kernel, linux-usb-users
The error "USB device not accepting new address" can sometimes be a
symptom of an interrupt problem. Do you see interrupts increasing for this
device in /proc/interrupts? There is some more info on this in the FAQ at
http://www.linux-usb.org .
On Wed, 19 Mar 2003, Andrey Panin wrote:
> Hi,
>
> ISD200 based hard drive bay doesn't work with 2.4 & 2.5,
> can someone assist me with it?
>
> Kernel message log appended.
>
> Best regards.
>
>
--
/------------------------------------+-------------------------\
|Stephen J. Gowdy | SLAC, MailStop 34, |
|http://www.slac.stanford.edu/~gowdy/ | 2575 Sand Hill Road, |
|http://calendar.yahoo.com/gowdy | Menlo Park CA 94025, USA |
|EMail: gowdy@slac.stanford.edu | Tel: +1 650 926 3144 |
\------------------------------------+-------------------------/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB harddrive not working (2.4, 2.5)
2003-03-19 10:21 USB harddrive not working (2.4, 2.5) Andrey Panin
2003-03-19 15:28 ` [Linux-usb-users] " Stephen J. Gowdy
@ 2003-03-21 18:22 ` Jan Harkes
2003-03-24 10:04 ` Andrey Panin
1 sibling, 1 reply; 4+ messages in thread
From: Jan Harkes @ 2003-03-21 18:22 UTC (permalink / raw)
To: Andrey Panin; +Cc: linux-kernel, linux-usb-users
On Wed, Mar 19, 2003 at 01:21:17PM +0300, Andrey Panin wrote:
> Hi,
>
> ISD200 based hard drive bay doesn't work with 2.4 & 2.5,
> can someone assist me with it?
This looks like the same problem I was seeing with my Archos. The
initial probes for ATA devices fail and the driver falls back to
'transparent scsi mode', where it passes everything along unchanged.
Probably works fine when an ATAPI device is attached, but not with my
drive.
> usb-storage: isd200_action(ENUM,0xa0)
> usb-storage: Bulk command S 0x43425355 T 0x0 Trg 0 LUN 1 L 0 F 0 CL 0
> usb-storage: usb_stor_bulk_transfer_buf(): xfer 31 bytes
> usb-storage: Status code 0; transferred 31/31
> usb-storage: -- transfer complete
> usb-storage: Bulk command transfer result=0
> usb-storage: Attempting to get CSW...
> usb-storage: usb_stor_bulk_transfer_buf(): xfer 13 bytes
> usb-storage: Status code -32; transferred 0/13
The isd200 driver is not correctly initializing the srb.cmd_len field,
which is the main reason why things fail. I also noticed that the
usb_stor_bulk functions are interpreting the ATA commands as if they
were scsi, so the packet was sent to the wrong lun, but that might not
really matter much.
Here is a patch agains 2.5.64 that fixes both of these problems for me.
It will probably apply to 2.5.65 as well.
Jan
--- drivers/usb/storage/isd200.c.orig 2003-02-10 15:51:05.000000000 -0500
+++ drivers/usb/storage/isd200.c 2003-03-16 14:24:12.000000000 -0500
@@ -405,11 +405,14 @@
{
union ata_cdb ata;
struct scsi_cmnd srb;
+ struct scsi_device srb_dev;
struct isd200_info *info = (struct isd200_info *)us->extra;
int status;
memset(&ata, 0, sizeof(ata));
memset(&srb, 0, sizeof(srb));
+ memset(&srb_dev, 0, sizeof(srb_dev));
+ srb.device = &srb_dev;
ata.generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
ata.generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
@@ -479,6 +482,7 @@
}
memcpy(srb.cmnd, &ata, sizeof(ata.generic));
+ srb.cmd_len = sizeof(ata.generic);
status = usb_stor_Bulk_transport(&srb, us);
if (status == USB_STOR_TRANSPORT_GOOD)
status = ISD200_GOOD;
@@ -538,6 +542,7 @@
/* send the command to the transport layer */
srb->resid = 0;
memcpy(srb->cmnd, ataCdb, sizeof(ataCdb->generic));
+ srb->cmd_len = sizeof(ataCdb->generic);
transferStatus = usb_stor_Bulk_transport(srb, us);
/* if the command gets aborted by the higher layers, we need to
--- drivers/usb/storage/transport.c.orig 2003-02-25 23:27:18.000000000 -0500
+++ drivers/usb/storage/transport.c 2003-03-16 13:42:22.000000000 -0500
@@ -893,7 +893,7 @@
bcb.DataTransferLength = cpu_to_le32(transfer_length);
bcb.Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
bcb.Tag = srb->serial_number;
- bcb.Lun = srb->cmnd[1] >> 5;
+ bcb.Lun = srb->device->lun;
if (us->flags & US_FL_SCM_MULT_TARG)
bcb.Lun |= srb->device->id << 4;
bcb.Length = srb->cmd_len;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: USB harddrive not working (2.4, 2.5)
2003-03-21 18:22 ` Jan Harkes
@ 2003-03-24 10:04 ` Andrey Panin
0 siblings, 0 replies; 4+ messages in thread
From: Andrey Panin @ 2003-03-24 10:04 UTC (permalink / raw)
To: linux-kernel, linux-usb-users
On 080, 03 21, 2003 at 01:22:30 -0500, Jan Harkes wrote:
> On Wed, Mar 19, 2003 at 01:21:17PM +0300, Andrey Panin wrote:
> > Hi,
> >
> > ISD200 based hard drive bay doesn't work with 2.4 & 2.5,
> > can someone assist me with it?
>
> This looks like the same problem I was seeing with my Archos. The
> initial probes for ATA devices fail and the driver falls back to
> 'transparent scsi mode', where it passes everything along unchanged.
> Probably works fine when an ATAPI device is attached, but not with my
> drive.
>
> > usb-storage: isd200_action(ENUM,0xa0)
> > usb-storage: Bulk command S 0x43425355 T 0x0 Trg 0 LUN 1 L 0 F 0 CL 0
> > usb-storage: usb_stor_bulk_transfer_buf(): xfer 31 bytes
> > usb-storage: Status code 0; transferred 31/31
> > usb-storage: -- transfer complete
> > usb-storage: Bulk command transfer result=0
> > usb-storage: Attempting to get CSW...
> > usb-storage: usb_stor_bulk_transfer_buf(): xfer 13 bytes
> > usb-storage: Status code -32; transferred 0/13
>
> The isd200 driver is not correctly initializing the srb.cmd_len field,
> which is the main reason why things fail. I also noticed that the
> usb_stor_bulk functions are interpreting the ATA commands as if they
> were scsi, so the packet was sent to the wrong lun, but that might not
> really matter much.
>
> Here is a patch agains 2.5.64 that fixes both of these problems for me.
> It will probably apply to 2.5.65 as well.
I don't have this drive at this time, but i'll test your patch and report
results ASAP.
--
Andrey Panin | Embedded systems software developer
pazke@orbita1.ru | PGP key: wwwkeys.pgp.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-24 9:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-19 10:21 USB harddrive not working (2.4, 2.5) Andrey Panin
2003-03-19 15:28 ` [Linux-usb-users] " Stephen J. Gowdy
2003-03-21 18:22 ` Jan Harkes
2003-03-24 10:04 ` Andrey Panin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox