lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Feb 2010 22:05:50 +0100
From:	Ákos Maróy <akos@...oy.hu>
To:	Alan Stern <stern@...land.harvard.edu>
CC:	Sarah Sharp <sarah.a.sharp@...el.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	Greg KH <gregkh@...e.de>, USB list <linux-usb@...r.kernel.org>
Subject: Re: pm_op(): usb_dev_suspend+0x0/0x10 returns -2 on USB device 8087:0020

Alan Stern wrote:
> It is the driver for USB-3.0 controllers.  It's relatively new and not 
> as mature as the USB-2.0 drivers.
> 
> I'm a little surprised that it is running on your system.  Why would 
> you have USB-3.0 hardware?

I might - this is a brand new HP Envy 15 laptop, which seems to be 'too
new' for Linux in a number of ways (e.g. video card, with the latest
10.2 official AMD binary driver 'sort of' working, hardware raid
controller for SSD, which only the mainline grub can handle, WiFi card
that is only supported in 2.6.32.x, etc.)

actually, it has 3 USB ports - two of them seem to have these issues.
the third USB port, which is phyisically both a USB and en eSATA port,
seems to work as expected.

> This is something Sarah should look into.  She's the main developer 
> behind xhci-hcd.

thanks for CC'ing her in..


Sarah Sharp wrote:
> USB 3.0 hosts and devices are now available commercially.  I think the
> HP envy laptop has an integrated USB 3.0 host.  Ákos, which host
> controller do you have?  Is it a PCIe add-in card, a PCI express card,
> or a port on a laptop?

see above, these are two ports on the side of the laptop.

> The xHCI driver doesn't support PCI suspend, and it also doesn't support
> suspending devices under the xHCI host.  The xHCI hardware needs to do
> some extra work when a device is suspended, and I haven't added that API
> to the USB core yet.  In short, power management sucks under xHCI. :-/

for suspend, I seem to get along find with unloading / reloading the
xhci kernel module, as a workaround

> Oh, freezes are not good.  I wonder if the xHCI host is taking a long
> time to respond to a hardware command?  Can you turn on
> CONFIG_USB_XHCI_HCD_DEBUGGING and send me the dmesg when you plug in the
> device?

ok, I'll do that..

> Did you plug in the DVD device behind a USB hub?  Or is the hub a part
> of the device?

I didn't use a USB hub. I plugged in the USB DVD right into the USB port
on the laptop. the HP Envy 15 does not have a built-in optical drive,
but you can order an external USB DVD-RW drive as an option. this is
what I have.

> That looks like a rather long polling interval.  Can you post the output
> of `lsusb -vvv -d 058f:6254`?

sure, here you go:

# lsusb -vvv -d 058f:6254

Bus 002 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x058f Alcor Micro Corp.
  idProduct          0x6254 USB Hub
  bcdDevice            1.00
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             3
  wHubCharacteristic 0x0080
    Ganged power switching
    Ganged overcurrent protection
    TT think time 8 FS bits
    Port indicators
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered



though let me remind you that the same long delay happens when I plug in
other devices, like simple USB mice. also, if I plug in the same device
into the third USB port, it seems to work just fine. no 5 second freeze,
etc.

> Can you read the DVD at this point?

yes, after the first plug, it works as expected. after the unplug -
replug, it doesn't work. unless I unload the xhci module, and reload it.

> Did you unmount the DVD before you removed it?  I'm not sure what the
> VFS errors are, but it looks like VFS doesn't like you removing the
> disk.

IMHO it got automatically mounted by gnome... (I saw it on my desktop as
a DVD drive)


Alan Stern wrote:
> You must have plugged it into a different port this time, yes?

I might have used the different of the two proplematic USB ports..


Sarah Sharp wrote:
> True.  I can't tell exactly what's going on without
> CONFIG_USB_XHCI_HCD_DEBUGGING.  It's possible the xHCI host never
> notified the driver of the disconnect, or there's a bug in the xHCI hub
> emulation code.

I'm recompiling the kernel with the above configuration setting, and
will send you an output..

thanks for spending time on this issue...


BTW, any ideas on why suspend works with unloading xhci, but hibernate
not working?


Akos

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ