Re: 9.0 - USB init failed err=18

2012-03-15 Thread Andrew Reilly
Hi,

Unrelated, I think, but since Hans is here:

Since (I think) the switch-over to 9_STABLE (or at least at about the time of 
the 9.0
release) my i3 headless server box does not restart (shutdown -r) successfully. 
 When I
plug a keyboard and screen into it, to see what is going on, the last thing on 
the screen
is always something about usb.  Besides the keyboard (in this situation) the 
only USB
device in the system is an external (WD) hard drive.  Anything I can usefully 
report or
analyse to figure out what is going wrong?  The present situation isn't 
immediately fatal,
because the hang doesn't seem to happen until all of the file system buffers 
have been
flushed, so the reboot is ultimately clean, but it requires me to reset the box 
from the
switch on the front: not good for doing remotely...

USB-related dmesg output includes:

ehci0: Intel PCH USB 2.0 controller USB-B mem 0xf0522400-0xf05227ff irq 16 at 
device 26.0
on pci0
usbus0: EHCI version 1.0
usbus0: Intel PCH USB 2.0 controller USB-B on ehci0

ehci1: Intel PCH USB 2.0 controller USB-A mem 0xf0522000-0xf05223ff irq 23 at 
device 29.0
on pci0
usbus1: EHCI version 1.0
usbus1: Intel PCH USB 2.0 controller USB-A on ehci1

uhub3: 8 ports with 8 removable, self powered
Root mount waiting for: usbus1 usbus0
ugen0.3: Western Digital at usbus0
umass0: MSC Bulk-Only Transport on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x
umass0:9:0:-1: Attached to scbus9
da0 at umass-sim0 bus 0 scbus9 target 0 lun 0
da0: WD My Book 1140 1003 Fixed Direct Access SCSI-6 device 
da0: 40.000MB/s transfers
da0: 2861556MB (732558336 4096 byte sectors: 255H 63S/T 45599C)
ses0 at umass-sim0 bus 0 scbus9 target 0 lun 1
ses0: WD SES Device 1003 Fixed Enclosure Services SCSI-6 device 
ses0: 40.000MB/s transfers
ses0: SCSI-3 SES Device
Root mount waiting for: usbus0
ugen0.4: vendor 0x04d9 at usbus0
ukbd0: vendor 0x04d9 USB Keyboard, class 0/0, rev 1.10/3.90, addr 4 on usbus0
kbd2 at ukbd0
ums0: vendor 0x04d9 USB Keyboard, class 0/0, rev 1.10/3.90, addr 4 on usbus0
Root mount waiting for: usbus0

Hmm.  Could the ums0: line be an issue there?  I've never plugged a mouse into 
this box.

Cheers,

-- 
Andrew


On Mon, Feb 27, 2012 at 08:27:39PM +0100, Hans Petter Selasky wrote:
 On Monday 27 February 2012 17:59:51 David Noel wrote:
  Since upgrading to 9.0 I've been getting a handful of EHCI-related
  dmesg errors and USB 1.0 performance from my ICH5's 2.0 ports. I
  booted an 8.3 memstick to be certain it wasn't a hardware issue and
  was able to push a few GB over USB at full 2.0 speeds. The system is a
  PowerEdge SC1420 running amd64 (GENERIC); relevant dmesg below:
  
  ...
  ehci0: Intel 82801EB/R (ICH5) USB 2.0 controller mem
  0xcff0-0xcff003ff irq 23 at device 29.7 on pci0
  ioapic0: routing intpin 23 (PCI IRQ 23) to lapic 0 vector 54
  usbus4: EHCI version ff.ff
  usbus4: reset timeout
  usbus4: reset timeout
  ehci0: USB init failed err=18
  unknown: reset timeout
  device_attach: ehci0 attach returned 6
  ...
  
  A full boot -v can be found here: http://pastebin.com/pXi9kruw
  
 
 Hi,
 
 This might have something to do with ACPI USB handover. I think this feature 
 was supposed to be moved into the loader, but I'm not fully sure.
 
 http://svnweb.freebsd.org/base?view=revisionrevision=224269
 
 --HPS
 ___
 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
___
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


USB UHCI Problems on 8-Stable

2012-03-15 Thread Holm Tiffe
Hi,

For some time I had problems with my Cam (Olympus FE-230), it wouldn't get
recognized again after unplugging it from the USB Connector.

Now I have a very similar Problem while trying to get an J-Link V8
compatible Jtag debugger working in conjunction with openocd.
Maybe there are bugs in openocd, but the bigger ones seems to be in
FreeBSDs USB drivers.

In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world
and kernel. I've commented the ?hci drivers out of the kernel config and
set USB_DEBUG.


At fist please Cc me, I'm not on freebsd-usb.

After Loading the uhci module:

Mar 15 13:21:09 unicorn kernel: uhci1: VIA 83C572 USB controller port 
0xd000-0xd01f irq 15 at device 16.1 on pci0
Mar 15 13:21:09 unicorn kernel: uhci1: [ITHREAD]
Mar 15 13:21:09 unicorn kernel: usbus0: 12Mbps Full Speed USB v1.0
Mar 15 13:21:10 unicorn kernel: usb_bus_port_set_device: bus 0xc6e44cf0 
devices[1] = 0xc5608800
Mar 15 13:21:10 unicorn kernel: ugen0.1: VIA at usbus0
Mar 15 13:21:10 unicorn kernel: uhub0: VIA UHCI root HUB, class 9/0, rev 
1.00/1.00, addr 1 on usbus0
Mar 15 13:21:10 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, 
parent-selfpowered=0
Mar 15 13:21:10 unicorn kernel: uhub_attach: Getting HUB descriptor
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: 
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: No root HUB
Mar 15 13:21:10 unicorn kernel: usbus1: VIA 83C572 USB controller on uhci1
Mar 15 13:21:10 unicorn kernel: usbus1: 12Mbps Full Speed USB v1.0
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: 
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: No root HUB
Mar 15 13:21:10 unicorn kernel: uhci2: VIA 83C572 USB controller port 
0xd400-0xd41f irq 5 at device 16.2 on pci0
Mar 15 13:21:10 unicorn kernel: uhci2: [ITHREAD]
Mar 15 13:21:10 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 
devices[1] = 0xc5511c00
Mar 15 13:21:10 unicorn kernel: ugen1.1: VIA at usbus1
Mar 15 13:21:10 unicorn kernel: uhub1: VIA UHCI root HUB, class 9/0, rev 
1.00/1.00, addr 1 on usbus1
Mar 15 13:21:10 unicorn kernel: uhub_attach: depth=0 selfpowered=1, parent=0, 
parent-selfpowered=0
Mar 15 13:21:10 unicorn kernel: uhub_attach: Getting HUB descriptor
Mar 15 13:21:10 unicorn kernel: uhub_attach: turn on port 1 power
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: 
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: No root HUB
Mar 15 13:21:10 unicorn kernel: usbus2: VIA 83C572 USB controller on uhci2
Mar 15 13:21:10 unicorn kernel: usbus2: 12Mbps Full Speed USB v1.0
Mar 15 13:21:10 unicorn kernel: usb_needs_explore: 

...

# usbconfig list
ugen0.1: UHCI root HUB VIA at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen1.1: UHCI root HUB VIA at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen2.1: UHCI root HUB VIA at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
# 

Now connecting the J-Link

Mar 15 13:23:41 unicorn kernel: usb_bus_powerd: Recomputing power masks Mar 15 
13:23:41 unicorn kernel: uhub_explore: udev=0xc5511c00 addr=1
Mar 15 13:23:41 unicorn kernel: uhub_read_port_status: port 1, 
wPortStatus=0x0108, wPortChange=0x, err=USB_ERR_NORMAL_COMPLETION
Mar 15 13:23:41 unicorn kernel: uhub_read_port_status: port 2, 
wPortStatus=0x0109, wPortChange=0x0003, err=USB_ERR_NORMAL_COMPLETION
Mar 15 13:23:41 unicorn kernel: uhub_reattach_port: reattaching port 2
Mar 15 13:23:41 unicorn kernel: uhub_read_port_status: port 2, 
wPortStatus=0x0109, wPortChange=0x, err=USB_ERR_NORMAL_COMPLETION
Mar 15 13:23:41 unicorn kernel: uhub_reattach_port: Port 2 is in Host Mode
Mar 15 13:23:42 unicorn root: Unknown USB device: vendor 0x1366 product 0x0101 
bus uhub1
Mar 15 13:23:42 unicorn kernel: uhub_read_port_status: port 2, 
wPortStatus=0x010b, wPortChange=0x, err=USB_ERR_NORMAL_COMPLETION
Mar 15 13:23:42 unicorn kernel: usbd_transfer_power_ref: Adding type 0 to power 
state
Mar 15 13:23:42 unicorn kernel: usbd_transfer_power_ref: needs power
Mar 15 13:23:42 unicorn kernel: usb_bus_port_set_device: bus 0xc6ed4cf0 
devices[2] = 0xc5602400
Mar 15 13:23:42 unicorn kernel: ugen1.2: SEGGER at usbus1
Mar 15 13:23:42 unicorn kernel: usb_needs_explore: 
Mar 15 13:23:42 unicorn kernel: usb_bus_powerd: bus=0xc6e44cf0
Mar 15 13:23:42 unicorn kernel: usb_bus_powerd: Recomputing power masks
Mar 15 13:23:42 unicorn kernel: uhub_explore: udev=0xc5608800 addr=1
Mar 15 13:23:42 unicorn kernel: uhub_read_port_status: port 1, 
wPortStatus=0x0108, wPortChange=0x, err=USB_ERR_NORMAL_COMPLETION
Mar 15 13:23:42 unicorn kernel: uhub_read_port_status: port 2, 
wPortStatus=0x0108, wPortChange=0x, err=USB_ERR_NORMAL_COMPLETION
Mar 15 13:23:42 unicorn kernel: usb_needs_explore: 

..

# usbconfig list
ugen0.1: UHCI root HUB VIA at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen1.1: UHCI root HUB VIA at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen2.1: UHCI root HUB VIA at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
ugen1.2: J-Link SEGGER at usbus1, cfg=0 md=HOST spd=FULL 

Re: 9.0 - USB init failed err=18

2012-03-15 Thread Hans Petter Selasky
On Thursday 15 March 2012 12:13:12 Andrew Reilly wrote:
 Hi,
 
 Unrelated, I think, but since Hans is here:
 
 Since (I think) the switch-over to 9_STABLE (or at least at about the time
 of the 9.0 release) my i3 headless server box does not restart (shutdown
 -r) successfully.  When I plug a keyboard and screen into it, to see what
 is going on, the last thing on the screen is always something about usb. 
 Besides the keyboard (in this situation) the only USB device in the system
 is an external (WD) hard drive.  Anything I can usefully report or analyse
 to figure out what is going wrong?  The present situation isn't
 immediately fatal, because the hang doesn't seem to happen until all of
 the file system buffers have been flushed, so the reboot is ultimately
 clean, but it requires me to reset the box from the switch on the front:
 not good for doing remotely...

Hi,

Is the external USB hard drive mounted when the system is shutting down.

Most likely some device driver is not detaching. I've seen and notified 
Alexander Motin about some of these, but we don't know yet who is refcounting 
wrong, except that it is in CAM/SCSI.

There is a flag which you can set to avoid the this waiting:

sysctl hw.usb.no_shutdown_wait=1

It might work as a temporary workaround until umass is fixed.


Simply run a config loop with UMASS, and you'll see the eventual/hang and 
panic happening.


while true
do
usbconfig -d X.Y set_config 0
usbconfig -d X.Y set_config 1
done

 
 Hmm.  Could the ums0: line be an issue there?  I've never plugged a mouse
 into this box.

USB audio devices are also known to block, if an application has /dev/dsp 
opened still during shutdown.

--HPS
___
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: 9.0 - USB init failed err=18

2012-03-15 Thread Hans Petter Selasky
On Thursday 15 March 2012 18:58:18 Hans Petter Selasky wrote:
 while true
 do
 usbconfig -d X.Y set_config 0
 usbconfig -d X.Y set_config 1
 done

Should be:

usbconfig -d X.Y set_config 255
usbconfig -d X.Y set_config 0
___
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: USB UHCI Problems on 8-Stable

2012-03-15 Thread Hans Petter Selasky
On Thursday 15 March 2012 13:48:40 Holm Tiffe wrote:
 Hi,
 
 For some time I had problems with my Cam (Olympus FE-230), it wouldn't get
 recognized again after unplugging it from the USB Connector.
 
 Now I have a very similar Problem while trying to get an J-Link V8
 compatible Jtag debugger working in conjunction with openocd.
 Maybe there are bugs in openocd, but the bigger ones seems to be in
 FreeBSDs USB drivers.
 
 In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world
 and kernel. I've commented the ?hci drivers out of the kernel config and
 set USB_DEBUG.
 
 
 At fist please Cc me, I'm not on freebsd-usb.
 
 After Loading the uhci module:

Hi,

Could you log the USB traffic on the UHCI controller using usbdump ?

It would be interesting to see what is going on.

Have you tried using an external High-Speed HUB?

--HPS
___
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: USB UHCI Problems on 8-Stable

2012-03-15 Thread Holm Tiffe
 Hi,
 
 For some time I had problems with my Cam (Olympus FE-230), it wouldn't
get
 recognized again after unplugging it from the USB Connector.
 
 Now I have a very similar Problem while trying to get an J-Link V8
 compatible Jtag debugger working in conjunction with openocd.
 Maybe there are bugs in openocd, but the bigger ones seems to be in
 FreeBSDs USB drivers.
 
 In the meantime I've cvs-supped to 8.3PRERELEASE (yesterday) built world
 and kernel. I've commented the ?hci drivers out of the kernel config and
 set USB_DEBUG.
 
 
 At fist please Cc me, I'm not on freebsd-usb.
 
 After Loading the uhci module:

Hi,

Could you log the USB traffic on the UHCI controller using usbdump ?

It would be interesting to see what is going on.

Have you tried using an external High-Speed HUB?

--HPS


Here is the dump: http://www.tiffe.de/other/usbus1.dump

This is connecting the J-link, starting openocd twice, removing 
and reconnecting the J-link followed by a kldunload uhci.

Can't provide a dump while kldloading since usbdump stops when the driver
is unloaded.

I have no Highspeedr-Hub so this was a direct connect. Results are the same
regardless whcih interface is used.


Regards,

Holm

-- 
  Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, 
 Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583
  www.tsht.de, i...@tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741
___
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