USB scsiglue does not work with Adaptec USBXChange + SCSI scanner

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

 



Hallo.

I bought an Adaptec USBXChange USB to SCSI converter, found a firmware
uploader patch and started to test it.

SCSI Bernoulli disc works perfectly with the adapter but scanning on
UMAX Astra 1200S hangs early.

Reading large kernel logs I suspect that scanner transfers incomplete
SCSI frames. They are converted to incomplete USB frames and it seems
that they cause switching the kernel or the device into an erroneous
state and never reach sane-umax using /dev/sg0 interface. The device
starts to respond ENODEV.

Attaching SG_IO as they were captured with strace with USB to SCSI
converter and with PCI SCSI card.

Tested on openSUSE's linux-2.6.31.12.

Full kernel logs:
http://www.penguin.cz/~utx/temp/usbscsi-scan-logs.tar.bz2
http://www.penguin.cz/~utx/temp/usbscsi-scan-logs2.tar.bz2 

Modified René Rebe's firmware downloader patch:
http://ftp.penguin.cz/pub/users/utx/Adaptec_USBXchange/adaptec-usbxchange.patch

With USBXChange scanning starts but hangs early:
ioctl(10, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 00, 02, 00, 05, 00], mx_sb_len=64, iovec_count=0, dxfer_len=5, timeout=120000, flags=0, data[5]=["\6\10\2\2\234"], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=7, info=0}) = 0
ioctl(10, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 00, 02, 00, a1, 00], mx_sb_len=64, iovec_count=0, dxfer_len=161, timeout=120000, flags=0, data[161]=["\6\10\2\2\234\0\0\0UMAX    Astra 1200S     "...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=1, duration=35, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=5, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[16, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=5, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[10]=[24, 00, 00, 00, 00, 00, 00, 00, 5a, 00], mx_sb_len=64, iovec_count=0, dxfer_len=90, timeout=120000, flags=0, data[90]=["\0\0\0\0\0\0\0R\0\0\0A\0A\0\0\0\0\0\0\0\0\0\0'\327\0\0A\237\177\262"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=118, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[6]=[1b, 00, 00, 00, 01, 80], mx_sb_len=64, iovec_count=0, dxfer_len=1, timeout=120000, flags=0, data[1]=["\0"], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=5, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x7, driver_status=0, resid=0, duration=1036, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x7, driver_status=0, resid=0, duration=1036, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x7, driver_status=0, resid=0, duration=1036, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x7, driver_status=0, resid=0, duration=1037, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=803, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0}) = -1 ENODEV (No such device)
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[17, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0}) = -1 ENODEV (No such device)
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[17, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0}) = -1 ENODEV (No such device)
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[10]=[31, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0}) = -1 ENODEV (No such device)
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[10]=[31, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0}) = -1 ENODEV (No such device)

With a PCI SCSI card (DC395) scanning works as expected:
ioctl(10, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 00, 02, 00, 05, 00], mx_sb_len=64, iovec_count=0, dxfer_len=5, timeout=120000, flags=0, data[5]=["\6\10\2\2\234"], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=4, info=0}) = 0
ioctl(10, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 00, 02, 00, a1, 00], mx_sb_len=64, iovec_count=0, dxfer_len=161, timeout=120000, flags=0, data[161]=["\6\10\2\2\234\0\0\0UMAX    Astra 1200S     "...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=1, duration=33, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=3, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[16, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=4, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[10]=[24, 00, 00, 00, 00, 00, 00, 00, 5a, 00], mx_sb_len=64, iovec_count=0, dxfer_len=90, timeout=120000, flags=0, data[90]=["\0\0\0\0\0\0\0R\0\0\0A\0A\0\0\0\0\0\0\0\0\0\0'\327\0\0A\237\177\262"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=116, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[6]=[1b, 00, 00, 00, 01, 80], mx_sb_len=64, iovec_count=0, dxfer_len=1, timeout=120000, flags=0, data[1]=["\0"], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=3, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=250, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=249, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=249, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=249, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=249, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=250, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0x1, driver_status=0, resid=0, duration=249, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=08, masked_status=04, sb[0]=[], host_status=0x7, driver_status=0, resid=0, duration=106, info=0x1}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=3, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\340\0\0\0\0\0\0\0\0\5\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=6, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\340\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=6, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=113, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=114, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0, data[690]=["\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=119, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
ioctl(8, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[10]=[28, 00, 00, 00, 00, 00, 00, 02, b2, 00], mx_sb_len=64, iovec_count=0, dxfer_len=690, timeout=120000, flags=0 <unfinished ...>
... repeats many times ...
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[17, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=3, info=0}) = 0
ioctl(8, SG_IO, {'S', SG_DXFER_NONE, cmd[10]=[31, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=64, iovec_count=0, dxfer_len=0, timeout=120000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=4, info=0}) = 0


________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux