Re: Failed to read CSW: USB_ERR_STALLED

2013-03-05 Thread Krzysztof Parzyszek

On 3/4/2013 9:46 AM, Krzysztof Parzyszek wrote:

On 3/4/2013 2:20 AM, Hans Petter Selasky wrote:


Looks like your device is not complying to SCSI standards??

Try this:

usbconfig -d X.Y add_quirk UQ_MSC_NO_INQUIRY

Replug your device.


Thanks.  I will try it tonight.  The device is a Mediasonic 4-bay
enclosure (which apparently do have buggy USB3 implementation).


Didn't work.  I'm getting the same errors (SCSI read failures).

-Krzysztof

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: Failed to read CSW: USB_ERR_STALLED

2013-03-04 Thread Krzysztof Parzyszek

On 3/4/2013 2:20 AM, Hans Petter Selasky wrote:


Looks like your device is not complying to SCSI standards??

Try this:

usbconfig -d X.Y add_quirk UQ_MSC_NO_INQUIRY

Replug your device.


Thanks.  I will try it tonight.  The device is a Mediasonic 4-bay 
enclosure (which apparently do have buggy USB3 implementation).


What is surprising to me is that this combination (i.e. this device with 
USB2) worked before, and now it doesn't.  I've found some other threads 
related to similar umass issues, and in one of them someone described a 
case of a memory stick which worked with FreeBSD, but after being used 
with Linux or Windows, it would no longer work with the same FreeBSD 
machine.  Do devices retain some sort of modifiable configuration data 
even after power-off?


-Krzysztof

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Failed to read CSW: USB_ERR_STALLED

2013-03-02 Thread Krzysztof Parzyszek

Hi,
I have a PowerMac G5, and a 4-bay USB3 enclosure. Until a few days ago I 
was using it as a USB2 device with ZFS and everything worked fine (at 
least in terms of functionality).  After one disk failed, the 
resilvering of a new one was taking a very long time so I put an Iomega 
USB3 card in, and connected the enclosure to it.  Things went a LOT 
faster, but after a few hours the problems began.  With USB3/XHCI at 
first I was getting xhci_do_command: command timeout, the devices 
would be lost (disconnect/disappear).  I removed the USB3 card, compiled 
XHCI out of the kernel and reverted back to USB2, but the enclosure 
would no longer work: I get SCSI read/write errors (again, as if the 
drives disappeared).  I'm attaching the ending of the dmesg log 
(hw.usb.umass.debug=-1).  I have the whole log, starting at boot, but 
it's 800kb long.


This happens with two USB ports (I haven't tested all of them), and at 
least one of the ports works fine with other umass device.  (I suspect 
the ports themselves are ok.)


A dump of raw 1MB from /dev/da0p1 (using dd) works fine, but the problem 
appears almost immediately after zpool status.


Does anyone have any ideas as to what is happening?  The computer works 
fine otherwise.  I could provide more information if needed.


Thanks,
-Krzysztof


umass0:umass_t_bbb_data_write_callback: max_bulk=131072, data_rem=65536
umass0:umass_t_bbb_data_write_callback: max_bulk=131072, data_rem=0
umass0:umass_transfer_start: transfer index = 8
umass0:umass_bbb_dump_csw: CSW 1352: sig = 0x53425355 (valid), tag = 
0x0548, res = 0, status = 0x00 (good)
umass0:umass_cam_action: 5:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b 
cmd/65536b data/252b sense
umass0:umass_bbb_dump_cbw: CBW 1353: cmd = 10b (0x28008708d465...), data 
= 65536b, lun = 0, dir = in

umass0:umass_transfer_start: transfer index = 4
umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=65536
umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0
umass0:umass_transfer_start: transfer index = 8
umass0:umass_bbb_dump_csw: CSW 1353: sig = 0x53425355 (valid), tag = 
0x0549, res = 0, status = 0x00 (good)
umass0:umass_cam_action: 5:0:1:XPT_SCSI_IO: cmd: 0x2a, flags: 0x80, 10b 
cmd/65536b data/252b sense
umass0:umass_dump_buffer: 0x 9d756ba95c94e1a7f42b8263e2ee6cf0 
buffer=0xc0002157e000, buflen=655369d756ba95c94e1a7f42b8263e2ee6cf0

umass0:umass_dump_buffer: 0x 42b01146acb6fa4465bde50c811b044b
umass0:umass_dump_buffer: 0x e92808a22527f170a371c776963aebf0 ...
umass0:umass_bbb_dump_cbw: CBW 1354: cmd = 10b (0x2a208708d34d...), data 
= 65536b, lun = 1, dir = out

umass0:umass_transfer_start: transfer index = 6
umass0:umass_t_bbb_data_write_callback: max_bulk=131072, data_rem=65536
umass0:umass_t_bbb_data_write_callback: max_bulk=131072, data_rem=0
umass0:umass_transfer_start: transfer index = 8
umass0:umass_bbb_dump_csw: CSW 1354: sig = 0x53425355 (valid), tag = 
0x054a, res = 0, status = 0x00 (good)
umass0:umass_cam_action: 5:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b 
cmd/65536b data/252b sense
umass0:umass_bbb_dump_cbw: CBW 1355: cmd = 10b (0x28008708d4e5...), data 
= 65536b, lun = 0, dir = in

umass0:umass_transfer_start: transfer index = 4
umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=65536
umass0:umass_transfer_start: transfer index = 5
umass0:umass_transfer_start: transfer index = 8
umass0:umass_bbb_dump_csw: CSW 1355: sig = 0x53425355 (valid), tag = 
0x054b, res = 32768, status = 0x01 (failed)

umass0:umass_t_bbb_status_callback: Command failed, residue = 32768
umass0:umass_cam_cb: Fetching 252 bytes of sense data
umass0:umass_bbb_dump_cbw: CBW 1356: cmd = 6b (0x0300fc00), data = 
252b, lun = 0, dir = in

umass0:umass_transfer_start: transfer index = 4
umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=252
umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0
umass0:umass_transfer_start: transfer index = 8
umass0:umass_t_bbb_status_callback: Failed to read CSW: USB_ERR_STALLED, 
try 0

umass0:umass_transfer_start: transfer index = 5
umass0:umass_transfer_start: transfer index = 8
umass0:umass_bbb_dump_csw: CSW 1356: sig = 0x53425355 (valid), tag = 
0x054c, res = 234, status = 0x00 (good)

(da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 87 8 d4 e5 0 0 80 0
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ABORTED COMMAND asc:0,0 (No 
additional sense information)

(da0:umass-sim0:0:0:0): Retrying command (per sense data)
umass0:umass_cam_action: 5:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b 
cmd/65536b data/252b sense
umass0:umass_bbb_dump_cbw: CBW 1357: cmd = 10b (0x28008708d4e5...), data 
= 65536b, lun = 0, dir = in

umass0:umass_transfer_start: transfer index = 4
umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=65536
umass0:umass_transfer_start: transfer index = 5
umass0:umass_transfer_start: transfer 

Re: Failed to read CSW: USB_ERR_STALLED

2013-03-02 Thread Krzysztof Parzyszek

Here's the beginning of dmesg:

Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.1-STABLE #6 r247608: Fri Mar  1 21:27:49 CST 2013
root@apple5:/usr/obj/usr/src/sys/APPLE5 powerpc
cpu0: IBM PowerPC 970MP revision 1.1, 2500.32 MHz
cpu0: Features dc00PPC32,PPC64,ALTIVEC,FPU,MMU
cpu0: HID0 1511081DEEPNAP,NAP,DPM,NHR,TBEN,ENATTN
real memory  = 17159626752 (16364 MB)
avail memory = 16319057920 (15563 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
cpu0: dev=ff89d680 (BSP)
cpu1: dev=ff89eb70
cpu2: dev=ff89f248
cpu3: dev=ff89f920
kbd0 at kbdmux0
nexus0: Open Firmware Nexus device
cpulist0: Open Firmware CPU Group on nexus0
cpu0: Open Firmware CPU on cpulist0
pcr0: PPC 970 Power Control Register on cpu0
cpu1: Open Firmware CPU on cpulist0
pcr1: PPC 970 Power Control Register on cpu1
cpu2: Open Firmware CPU on cpulist0
pcr2: PPC 970 Power Control Register on cpu2
cpu3: Open Firmware CPU on cpulist0
pcr3: PPC 970 Power Control Register on cpu3
powermac_nvram0: Apple NVRAM on nexus0
powermac_nvram0: bank0 generation 736, bank1 generation 737
unin0: Apple UniNorth System Controller on nexus0
unin0: Version 66
iichb0: Keywest I2C controller mem 0xf8001000-0xf8001fff irq 0 on unin0
iicbus0: OFW I2C bus on iichb0
iicbus0: unknown card at addr 0x94
iicbus0: unknown card at addr 0x96
iicbus0: unknown card at addr 0x98
iicbus0: unknown card at addr 0x9c
htpic0: OpenPIC Interrupt Controller mem 0xf804-0xf807 on unin0
pcib0: IBM CPC945 PCI Express Root on nexus0
pci0: OFW PCI bus on pcib0
pcib1: IBM CPC9X5 HyperTransport Tunnel on nexus0
pcib1: 86 HT IRQs on device 7.0
pci1: OFW PCI bus on pcib1
pcib1: Enabling MSI window for HyperTransport slave at pci1:0:1:0
pcib2: OFW PCI-PCI bridge at device 1.0 on pci1
pci2: OFW PCI bus on pcib2
pcib3: OFW PCI-PCI bridge at device 2.0 on pci1
pci3: OFW PCI bus on pcib3
bge0: Broadcom BCM5714 B3, ASIC rev. 0x008003 mem 
0xfa53-0xfa53,0xfa52-0xfa52 irq 66 at device 4.0 on pci3

bge0: CHIP ID 0x8003; ASIC REV 0x08; CHIP REV 0x80; PCI-X 33 MHz
miibus0: MII bus on bge0
brgphy0: BCM5780 1000BASE-T media interface PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow

bge0: Ethernet address: 00:16:cb:37:e2:e0
bge1: Broadcom BCM5714 B3, ASIC rev. 0x008003 mem 
0xfa51-0xfa51,0xfa50-0xfa50 irq 67 at device 4.1 on pci3

bge1: CHIP ID 0x8003; ASIC REV 0x08; CHIP REV 0x80; PCI-X 33 MHz
miibus1: MII bus on bge1
brgphy1: BCM5780 1000BASE-T media interface PHY 1 on miibus1
brgphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow

bge1: Ethernet address: 00:16:cb:37:e2:e1
pcib4: OFW PCI-PCI bridge at device 3.0 on pci1
pci4: OFW PCI bus on pcib4
pcib5: OFW PCI-PCI bridge at device 4.0 on pci1
pci5: OFW PCI bus on pcib5
pcib6: OFW PCI-PCI bridge at device 5.0 on pci1
pci6: OFW PCI bus on pcib6
vgapci0: VGA-compatible display mem 
0x8200-0x82ff,0x8800-0x8fff,0x8100-0x81ff irq 63 
at device 0.0 on pci6

pcib7: OFW PCI-PCI bridge at device 6.0 on pci1
pci7: OFW PCI bus on pcib7
pcib8: OFW PCI-PCI bridge at device 7.0 on pci1
pci8: OFW PCI bus on pcib8
gem0: Apple Shasta GMAC Ethernet mem 0xfa20-0xfa3f at device 
15.0 on pci8

gem0: failed to allocate resources
device_attach: gem0 attach returned 6
pcib9: OFW PCI-PCI bridge at device 8.0 on pci1
pci9: OFW PCI bus on pcib9
macio0: Shasta I/O Controller mem 0x8000-0x8007 at device 7.0 
on pci9

macgpio0: MacIO GPIO Controller mem 0x50-0x8a on macio0
scc0: Zilog Z8530 dual channel SCC mem 
0x13000-0x13fff,0x8400-0x84ff,0x8500-0x85ff,0x8600-0x86ff,0x8700-0x87ff 
irq 23,17,18,24,19,20 on macio0

uart0: z8530, channel A on scc0
uart1: z8530, channel B on scc0
iichb1: Keywest I2C controller mem 0x18000-0x18fff irq 27 on macio0
iicbus1: OFW I2C bus on iichb1
iicbus1: unknown card at addr 0x8c
iicbus1: unknown card at addr 0x24
ohci0: NEC uPD 9210 USB controller mem 0x80082000-0x80082fff irq 70 at 
device 11.0 on pci9

usbus0 on ohci0
ohci1: NEC uPD 9210 USB controller mem 0x80081000-0x80081fff irq 70 at 
device 11.1 on pci9

usbus1 on ohci1
ehci0: NEC uPD 720100 USB 2.0 controller mem 0x8008-0x800800ff irq 
70 at device 11.2 on pci9

usbus2: EHCI version 1.0
usbus2 on ehci0
pcib10: OFW PCI-PCI bridge at device 9.0 on pci1
pci10: OFW PCI bus on pcib10
atapci0: ServerWorks K2 SATA150 controller mem 0xfa402000-0xfa403fff 
irq 10 at device 12.0 on pci10

pcib1: failed to reserve resource for pcib10
atapci0: 0x10 bytes of rid 0x20 res 4 failed (0, 0x).
ata2: ATA channel at channel 0 on atapci0
ata3: ATA channel at channel 1 on atapci0
ata4: ATA channel at