Hello!

The ViPowER USB-IDE enclosure based on the SMCS chipset does not work
with 2.4.x kernels (tested with 2.4.26) when used with ATAPI devices
(like a DVD-RW drive).  However, it works with 2.4.x when used with an
IDE disk; it also works with 2.6.10 with IDE or ATAPI devices.

Here is the /proc/bus/usb/devices data for the USB-IDE bridge:

T:  Bus=01 Lev=02 Prnt=19 Port=03 Cnt=01 Dev#= 20 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0424 ProdID=20cd Rev= 1.50
S:  Manufacturer=ViPowER
S:  Product=ViPowER USB 2.0 Device
S:  SerialNumber=0000000440DC
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Here is the usb-storage debug log with the unpatched kernel (there was a DVD-RW
drive inside - obviously the detection does not work correctly):

Dec 30 14:15:28 xeon kernel: Initializing USB Mass Storage driver...
Dec 30 14:15:28 xeon kernel: usb.c: registered new driver usb-storage
Dec 30 14:15:28 xeon kernel: usb-storage: act_altsettting is 0
Dec 30 14:15:28 xeon kernel: usb-storage: id_index calculated to be: 118
Dec 30 14:15:28 xeon kernel: usb-storage: Array length appears to be: 120
Dec 30 14:15:28 xeon kernel: usb-storage: USB Mass Storage device detected
Dec 30 14:15:28 xeon kernel: usb-storage: Endpoints: In: 0xed87d434 Out: 
0xed87d420 Int: 0x00000000 (Period 0)
Dec 30 14:15:29 xeon kernel: usb-storage: New GUID 042420cd00000000000440dc
Dec 30 14:15:29 xeon kernel: usb-storage: GetMaxLUN command result is -32, data 
is 128
Dec 30 14:15:29 xeon kernel: usb-storage: clearing endpoint halt for pipe 
0x80000c80
Dec 30 14:15:29 xeon kernel: usb-storage: Transport: Bulk
Dec 30 14:15:29 xeon kernel: usb-storage: Protocol: Transparent SCSI
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: scsi5 : SCSI emulation for USB Mass Storage devices
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Command INQUIRY (6 bytes)
Dec 30 14:15:29 xeon kernel: usb-storage: 12 00 00 00 ff 00 65 f6 fd ef 03 00
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x1 Trg 0 
LUN 0 L 255 F 128 CL 6
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): xfer 255 
bytes
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_bulk_msg() returned -32 
xferred 0/255
Dec 30 14:15:29 xeon kernel: usb-storage: clearing endpoint halt for pipe 
0xc0010c80
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_clear_halt: result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): unknown 
error
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk data transfer result 0x2
Dec 30 14:15:29 xeon kernel: usb-storage: Attempting to get CSW...
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status result = 0
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x1 R -1 
Stat 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: Fixing INQUIRY data to show SCSI rev 
2 - was 0
Dec 30 14:15:29 xeon kernel: usb-storage: scsi cmd done, result=0x0
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel:   Vendor:           Model:                   Rev:  
   
Dec 30 14:15:29 xeon kernel:   Type:   WORM                               ANSI 
SCSI revision: 02
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (1/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (2/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (3/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (4/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (5/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (6/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Bad target number (7/0)
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: Attached scsi CD-ROM sr1 at scsi5, channel 0, id 
0, lun 0
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Command MODE_SENSE (6 bytes)
Dec 30 14:15:29 xeon kernel: usb-storage: 1a 00 2a 00 80 00 00 00 3a 00 00 00
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x2 Trg 0 
LUN 0 L 128 F 128 CL 6
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): xfer 128 
bytes
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_bulk_msg() returned -32 
xferred 0/128
Dec 30 14:15:29 xeon kernel: usb-storage: clearing endpoint halt for pipe 
0xc0010c80
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_clear_halt: result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): unknown 
error
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk data transfer result 0x2
Dec 30 14:15:29 xeon kernel: usb-storage: Attempting to get CSW...
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status result = 0
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x2 R 
128 Stat 0x1
Dec 30 14:15:29 xeon kernel: usb-storage: -- transport indicates command failure
Dec 30 14:15:29 xeon kernel: usb-storage: Issuing auto-REQUEST_SENSE
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x3 Trg 0 
LUN 0 L 18 F 128 CL 6
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): xfer 18 
bytes
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0 
xferred 18/18
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): transfer 
complete
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk data transfer result 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: Attempting to get CSW...
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status result = 0
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x3 R 0 
Stat 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: -- Result from auto-sense is 0
Dec 30 14:15:29 xeon kernel: usb-storage: -- code: 0x70, key: 0x6, ASC: 0x29, 
ASCQ: 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: Unit Attention: device reset occurred
Dec 30 14:15:29 xeon kernel: usb-storage: scsi cmd done, result=0x2
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: usb-storage: queuecommand() called
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread awakened.
Dec 30 14:15:29 xeon kernel: usb-storage: Command MODE_SENSE (6 bytes)
Dec 30 14:15:29 xeon kernel: usb-storage: 1a 00 2a 00 80 00 00 00 3a 00 00 00
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x4 Trg 0 
LUN 0 L 128 F 128 CL 6
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): xfer 128 
bytes
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_bulk_msg() returned -32 
xferred 0/128
Dec 30 14:15:29 xeon kernel: usb-storage: clearing endpoint halt for pipe 
0xc0010c80
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_clear_halt: result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): unknown 
error
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk data transfer result 0x2
Dec 30 14:15:29 xeon kernel: usb-storage: Attempting to get CSW...
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status result = 0
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x4 R 
128 Stat 0x1
Dec 30 14:15:29 xeon kernel: usb-storage: -- transport indicates command failure
Dec 30 14:15:29 xeon kernel: usb-storage: Issuing auto-REQUEST_SENSE
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x5 Trg 0 
LUN 0 L 18 F 128 CL 6
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): xfer 18 
bytes
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0 
xferred 18/18
Dec 30 14:15:29 xeon kernel: usb-storage: usb_stor_transfer_partial(): transfer 
complete
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk data transfer result 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: Attempting to get CSW...
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status result = 0
Dec 30 14:15:29 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x5 R 0 
Stat 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: -- Result from auto-sense is 0
Dec 30 14:15:29 xeon kernel: usb-storage: -- code: 0x70, key: 0x5, ASC: 0x20, 
ASCQ: 0x0
Dec 30 14:15:29 xeon kernel: usb-storage: Illegal Request: invalid command 
operation code
Dec 30 14:15:29 xeon kernel: usb-storage: scsi cmd done, result=0x2
Dec 30 14:15:29 xeon kernel: usb-storage: *** thread sleeping.
Dec 30 14:15:29 xeon kernel: sr1: scsi-1 drive
Dec 30 14:15:29 xeon kernel: WARNING: USB Mass Storage data integrity not 
assured
Dec 30 14:15:29 xeon kernel: USB Mass Storage device found at 12
Dec 30 14:15:29 xeon kernel: USB Mass Storage support registered.

As you see, the INQUIRY command fails, therefore the device type and
identification data are garbage (in fact, some random garbage from
memory is used as the device type - "Disk", "Printer", some other
things were observed).  However, cdrecord can work with the device
even in this state, and can receive valid INQUIRY responce from it,
because it uses a 36-byte request instead of a 255-byte one used by
the 2.4.x SCSI layer:

Dec 30 14:48:25 xeon kernel: usb-storage: Command INQUIRY (6 bytes)
Dec 30 14:48:25 xeon kernel: usb-storage: 12 00 00 00 24 00 b0 ef 00 00 00 00
Dec 30 14:48:25 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x14 Trg 
0 LUN 0 L 36 F 128 CL 6
Dec 30 14:48:25 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 30 14:48:25 xeon kernel: usb-storage: usb_stor_transfer_partial(): xfer 36 
bytes
Dec 30 14:48:25 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0 
xferred 36/36
Dec 30 14:48:25 xeon kernel: usb-storage: usb_stor_transfer_partial(): transfer 
complete
Dec 30 14:48:25 xeon kernel: usb-storage: Bulk data transfer result 0x0
Dec 30 14:48:25 xeon kernel: usb-storage: Attempting to get CSW...
Dec 30 14:48:25 xeon kernel: usb-storage: Bulk status result = 0
Dec 30 14:48:25 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x14 R 0 
Stat 0x0
Dec 30 14:48:25 xeon kernel: usb-storage: Fixing INQUIRY data to show SCSI rev 
2 - was 0
Dec 30 14:48:25 xeon kernel: usb-storage: scsi cmd done, result=0x0

Limiting the INQUIRY length to 36 bytes has fixed the detection
problem; however, the 6-byte MODE_SENSE command still was failing, and
the device was detected as just a SCSI-1 CD-ROM drive:

Dec 31 11:47:34 xeon kernel: Initializing USB Mass Storage driver...
Dec 31 11:47:34 xeon kernel: Initializing USB Mass Storage driver...
Dec 31 11:47:34 xeon kernel: usb.c: registered new driver usb-storage
Dec 31 11:47:34 xeon kernel: usb-storage: act_altsettting is 0
Dec 31 11:47:34 xeon kernel: usb-storage: id_index calculated to be: 6
Dec 31 11:47:34 xeon kernel: usb-storage: Array length appears to be: 121
Dec 31 11:47:34 xeon kernel: usb-storage: Vendor: ViPowER
Dec 31 11:47:34 xeon kernel: usb-storage: Product: ViPowER USB 2.0 Device
Dec 31 11:47:34 xeon kernel: usb-storage: USB Mass Storage device detected
Dec 31 11:47:34 xeon kernel: usb-storage: Endpoints: In: 0xf56183b4 Out:  
0xf56183a0 Int: 0x00000000 (Period 0)
Dec 31 11:47:34 xeon kernel: usb-storage: New GUID 042420cd00000000000440dc
Dec 31 11:47:34 xeon kernel: usb-storage: GetMaxLUN command result is -32,  
data is 128
Dec 31 11:47:34 xeon kernel: usb-storage: clearing endpoint halt for pipe  
0x80001e80
Dec 31 11:47:34 xeon kernel: usb-storage: Transport: Bulk
Dec 31 11:47:34 xeon kernel: usb-storage: Protocol: Transparent SCSI
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: scsi5 : SCSI emulation for USB Mass Storage  
devices
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Command INQUIRY (6 bytes)
Dec 31 11:47:34 xeon kernel: usb-storage: 12 00 00 00 ff 00 65 f6 fd ef 03  00
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x1  Trg 
0 LUN 0 L 36 F 128 CL 6
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_transfer_partial():  xfer 36 
bytes
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0  
xferred 36/36
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_transfer_partial():  
transfer complete
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk data transfer result 0x0
Dec 31 11:47:34 xeon kernel: usb-storage: Attempting to get CSW...
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk status result = 0
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x1  R 0 
Stat 0x0
Dec 31 11:47:34 xeon kernel: usb-storage: Fixing INQUIRY data to show SCSI  rev 
2 - was 0
Dec 31 11:47:34 xeon kernel: usb-storage: scsi cmd done, result=0x0
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (1/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (2/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (3/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (4/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (5/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (6/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Bad target number (7/0)
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: usb-storage: queuecommand() called
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread awakened.
Dec 31 11:47:34 xeon kernel: usb-storage: Command MODE_SENSE (6 bytes)
Dec 31 11:47:34 xeon kernel: usb-storage: 1a 00 2a 00 80 00 20 00 3a 00 00  00
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x2  Trg 
0 LUN 0 L 128 F 128 CL 6
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_transfer_partial():  xfer 
128 bytes
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_bulk_msg() returned -32  
xferred 0/128
Dec 31 11:47:34 xeon kernel: usb-storage: clearing endpoint halt for pipe  
0xc0011e80
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_clear_halt: result=0
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_transfer_partial():  unknown 
error
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk data transfer result 0x2
Dec 31 11:47:34 xeon kernel: usb-storage: Attempting to get CSW...
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk status result = 0
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x2  R 
128 Stat 0x1
Dec 31 11:47:34 xeon kernel: usb-storage: -- transport indicates command  
failure
Dec 31 11:47:34 xeon kernel: usb-storage: Issuing auto-REQUEST_SENSE
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x3  Trg 
0 LUN 0 L 18 F 128 CL 6
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_transfer_partial():  xfer 18 
bytes
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0  
xferred 18/18
Dec 31 11:47:34 xeon kernel: usb-storage: usb_stor_transfer_partial():  
transfer complete
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk data transfer result 0x0
Dec 31 11:47:34 xeon kernel: usb-storage: Attempting to get CSW...
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk status result = 0
Dec 31 11:47:34 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x3  R 0 
Stat 0x0
Dec 31 11:47:34 xeon kernel: usb-storage: -- Result from auto-sense is 0
Dec 31 11:47:34 xeon kernel: usb-storage: -- code: 0x70, key: 0x2, ASC:  0x3a, 
ASCQ: 0x0
Dec 31 11:47:34 xeon kernel: usb-storage: Not Ready: media not present
Dec 31 11:47:34 xeon kernel: usb-storage: scsi cmd done, result=0x2
Dec 31 11:47:34 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 11:47:34 xeon kernel: WARNING: USB Mass Storage data integrity not  
assured
Dec 31 11:47:34 xeon kernel: USB Mass Storage device found at 30
Dec 31 11:47:34 xeon kernel: USB Mass Storage support registered.

Dec 31 11:47:34 xeon kernel:   Vendor: LITE-ON   Model: DVDRW LDW-411S    Rev: 
FS0K
Dec 31 11:47:34 xeon kernel:   Type:   CD-ROM                             ANSI 
SCSI revision: 02
Dec 31 11:47:34 xeon kernel: Attached scsi CD-ROM sr1 at scsi5, channel 0, id 
0, lun 0
Dec 31 11:47:34 xeon kernel: sr1: scsi-1 drive

After some more investigations limiting INQUIRY length to 36 bytes was
found to be excessive - limiting to 252 bytes worked just fine;
however, the drive was still detected as a SCSI-1 CD-ROM.  The second
issue was fixed by adding the US_FL_MODE_XLATE flag to the
unusual_devs.h entry - apparently the device does not like the 6-byte
MODE_SENSE, but accepts the 10-byte version.

Here is the usb-storage debug output after applying the patch:

Dec 31 14:14:01 xeon kernel: Initializing USB Mass Storage driver...
Dec 31 14:14:01 xeon kernel: usb.c: registered new driver usb-storage
Dec 31 14:14:01 xeon kernel: usb-storage: act_altsettting is 0
Dec 31 14:14:01 xeon kernel: usb-storage: id_index calculated to be: 6
Dec 31 14:14:01 xeon kernel: usb-storage: Array length appears to be: 121
Dec 31 14:14:01 xeon kernel: usb-storage: Vendor: ViPowER
Dec 31 14:14:01 xeon kernel: usb-storage: Product: ViPowER USB 2.0 Device
Dec 31 14:14:01 xeon kernel: usb-storage: USB Mass Storage device detected
Dec 31 14:14:01 xeon kernel: usb-storage: Endpoints: In: 0xf40ab634 Out:  
0xf40ab620 Int: 0x00000000 (Period 0)
Dec 31 14:14:01 xeon kernel: usb-storage: New GUID 042420cd00000000000440dc
Dec 31 14:14:01 xeon kernel: usb-storage: GetMaxLUN command result is -32,  
data is 128
Dec 31 14:14:01 xeon kernel: usb-storage: clearing endpoint halt for pipe  
0x80002880
Dec 31 14:14:01 xeon kernel: usb-storage: Transport: Bulk
Dec 31 14:14:01 xeon kernel: usb-storage: Protocol: Transparent SCSI
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: scsi5 : SCSI emulation for USB Mass Storage  
devices
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Command INQUIRY (6 bytes)
Dec 31 14:14:01 xeon kernel: usb-storage: 12 00 00 00 ff 00 65 f6 fd ef 03  00
Dec 31 14:14:01 xeon kernel: usb-storage: Limiting INQUIRY length to 252  (was 
255)
Dec 31 14:14:01 xeon kernel: usb-storage: Invoking Mode Translation
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x1  Trg 
0 LUN 0 L 252 F 128 CL 6
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 31 14:14:01 xeon kernel: usb-storage: usb_stor_transfer_partial():  xfer 
252 bytes
Dec 31 14:14:01 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0  
xferred 96/252
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk data transfer result 0x1
Dec 31 14:14:01 xeon kernel: usb-storage: Attempting to get CSW...
Dec 31 14:14:01 xeon kernel: usb-storage: clearing endpoint halt for pipe  
0xc0012880
Dec 31 14:14:01 xeon kernel: usb-storage: usb_stor_clear_halt: result=0
Dec 31 14:14:01 xeon kernel: usb-storage: Attempting to get CSW (2nd  try)...
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk status result = 0
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x1  R 
156 Stat 0x0
Dec 31 14:14:01 xeon kernel: usb-storage: Fixing INQUIRY data to show SCSI  rev 
2 - was 0
Dec 31 14:14:01 xeon kernel: usb-storage: scsi cmd done, result=0x0
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (1/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (2/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (3/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (4/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (5/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (6/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Bad target number (7/0)
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: usb-storage: queuecommand() called
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread awakened.
Dec 31 14:14:01 xeon kernel: usb-storage: Command MODE_SENSE (6 bytes)
Dec 31 14:14:01 xeon kernel: usb-storage: 1a 00 2a 00 80 00 00 00 3a 00 00  00
Dec 31 14:14:01 xeon kernel: usb-storage: Invoking Mode Translation
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk command S 0x43425355 T 0x2  Trg 
0 LUN 0 L 128 F 128 CL 12
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk command transfer result=0
Dec 31 14:14:01 xeon kernel: usb-storage: usb_stor_transfer_partial():  xfer 
128 bytes
Dec 31 14:14:01 xeon kernel: usb-storage: usb_stor_bulk_msg() returned 0  
xferred 72/128
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk data transfer result 0x1
Dec 31 14:14:01 xeon kernel: usb-storage: Attempting to get CSW...
Dec 31 14:14:01 xeon kernel: usb-storage: clearing endpoint halt for pipe  
0xc0012880
Dec 31 14:14:01 xeon kernel: usb-storage: usb_stor_clear_halt: result=0
Dec 31 14:14:01 xeon kernel: usb-storage: Attempting to get CSW (2nd  try)...
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk status result = 0
Dec 31 14:14:01 xeon kernel: usb-storage: Bulk status Sig 0x53425355 T 0x2  R 
56 Stat 0x0
Dec 31 14:14:01 xeon kernel: usb-storage: -- converting 10 byte sense data  to 
6 byte
Dec 31 14:14:01 xeon kernel: usb-storage: scsi cmd done, result=0x0
Dec 31 14:14:01 xeon kernel: usb-storage: *** thread sleeping.
Dec 31 14:14:01 xeon kernel: WARNING: USB Mass Storage data integrity not  
assured
Dec 31 14:14:01 xeon kernel: USB Mass Storage device found at 40
Dec 31 14:14:01 xeon kernel: USB Mass Storage support registered.

Dec 31 14:14:01 xeon kernel:   Vendor: LITE-ON   Model: DVDRW LDW-411S    Rev: 
FS0K
Dec 31 14:14:01 xeon kernel:   Type:   CD-ROM                             ANSI 
SCSI revision: 02
Dec 31 14:14:01 xeon kernel: Attached scsi CD-ROM sr1 at scsi5, channel 0, id 
0, lun 0
Dec 31 14:14:01 xeon kernel: sr1: scsi3-mmc drive: 40x/40x writer cd/rw 
xa/form2 cdda tray


Here is the patch itself.  A new quirk flag is added -
US_FL_INQUIRY_252; when this flag is set,
usb_stor_transparent_scsi_command() limits the INQUIRY command length
to no more than 252 bytes.

Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>

diff -urNp linux-2.4.29-rc1/drivers/usb/storage/protocol.c 
linux-2.4.29-rc1.usb-storage-vipower/drivers/usb/storage/protocol.c
--- linux-2.4.29-rc1/drivers/usb/storage/protocol.c     2003-11-28 21:26:20 
+0300
+++ linux-2.4.29-rc1.usb-storage-vipower/drivers/usb/storage/protocol.c 
2005-01-09 21:42:48 +0300
@@ -330,6 +330,17 @@ void usb_stor_transparent_scsi_command(S
 {
        int old_cmnd = 0;
 
+       /* Limit INQUIRY length to 252 for some devices which are confused by
+        * the initial INQUIRY command (2.4.x SCSI layer asks for 255 bytes).
+        */
+       if ((us->flags & US_FL_INQUIRY_252) && (srb->cmnd[0] == INQUIRY)) {
+               if (srb->cmnd[4] > 252) {
+                       US_DEBUGP("Limiting INQUIRY length to 252 (was %d)\n",
+                                 srb->cmnd[4]);
+                       srb->cmnd[4] = 252;
+               }
+       }
+
        /* This code supports devices which do not support {READ|WRITE}_6
         * Apparently, neither Windows or MacOS will use these commands,
         * so some devices do not support them
diff -urNp linux-2.4.29-rc1/drivers/usb/storage/unusual_devs.h 
linux-2.4.29-rc1.usb-storage-vipower/drivers/usb/storage/unusual_devs.h
--- linux-2.4.29-rc1/drivers/usb/storage/unusual_devs.h 2004-11-17 14:54:21 
+0300
+++ linux-2.4.29-rc1.usb-storage-vipower/drivers/usb/storage/unusual_devs.h     
2005-01-09 21:42:48 +0300
@@ -83,6 +83,23 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY ),
 
+/* Submitted by Sergey Vlasov <[EMAIL PROTECTED]>
+ *
+ * When this USB-IDE bridge is used with an ATAPI device, the initial INQUIRY
+ * command from the 2.4.x SCSI layer fails - apparently the bridge is unable to
+ * handle the length of 255 in this command.  US_FL_INQUIRY_252 is needed as a
+ * workaround.  (This is a 2.4.x-specific problem - in 2.6.x the SCSI layer
+ * does not send INQUIRY with length 255.)
+ *
+ * Also, the 6-byte MODE_SENSE seems to fail with code: 0x70, key: 0x2, ASC:
+ * 0x3a, ASCQ: 0x0 (Not Ready: media not present) - therefore US_FL_MODE_XLATE.
+ */
+UNUSUAL_DEV(  0x0424, 0x20cd, 0x0150, 0x0150,
+               "ViPowER",
+               "ViPowER USB 2.0 Device",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_INQUIRY_252 | US_FL_MODE_XLATE ),
+
 #ifdef CONFIG_USB_STORAGE_DPCM
 UNUSUAL_DEV(  0x0436, 0x0005, 0x0100, 0x0100,
                "Microtech",
diff -urNp linux-2.4.29-rc1/drivers/usb/storage/usb.h 
linux-2.4.29-rc1.usb-storage-vipower/drivers/usb/storage/usb.h
--- linux-2.4.29-rc1/drivers/usb/storage/usb.h  2004-08-08 03:26:05 +0400
+++ linux-2.4.29-rc1.usb-storage-vipower/drivers/usb/storage/usb.h      
2005-01-09 21:42:48 +0300
@@ -103,6 +103,7 @@ struct us_unusual_dev {
 #define US_FL_SCM_MULT_TARG   0x00000020 /* supports multiple targets */
 #define US_FL_FIX_INQUIRY     0x00000040 /* INQUIRY response needs fixing */
 #define US_FL_FIX_CAPACITY    0x00000080 /* READ_CAPACITY response too big */
+#define US_FL_INQUIRY_252     0x00000100 /* limit INQUIRY length to 252 */
 
 #define USB_STOR_STRING_LEN 32
 

-- 
Sergey Vlasov

Attachment: pgphmYwiAloq2.pgp
Description: PGP signature

Reply via email to