Re: The dmesg files requested

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

 



On Tue, 14 Dec 2010, Sarah Sharp wrote:

> Yes, I can reproduce this.  I was trying to figure out if it's a
> hardware or a software issue, so I looked at the state diagram in figure
> 33 of the xHCI 1.0 spec.
> 
> On a write to disable the port, the host state machine should transition
> back to the disabled state.  When a USB disconnect is detected, the host
> should transition to the disconnect state, set CSC = 1, clear CCS, and
> clear the port disabled bit.  I see an xHCI port status change when
> there's a device disconnect, but I'm not sure what the port status is,
> as khubd doesn't seem to poll the port status when I kick it for that
> port.  I get no interrupts when I plug a device in.  Perhaps because the
> USB core never cleared the connect status change on disconnect?

That seems very likely.

> In fact, I think this code in handle_port_status() is the problem:
> 
> if ((temp & PORT_CONNECT) && (hcd->state == HC_STATE_SUSPENDED)) {
> 	xhci_dbg(xhci, "resume root hub\n");
> 	usb_hcd_resume_root_hub(hcd);
> }
> 
> khubd is getting kicked because of the disconnect status, but because
> the roothub is never resumed, it doesn't do anything with it.  Then a
> new device is connected, the CSC flag is still not cleared, so the HW
> doesn't re-interrupt the system for that port.
> 
> Andiry, why were you only resuming the roothub when something was
> connected to the port?  If I remove the first conditional, then the
> system works as expected and I see a new connect after the 'remove'
> sysfs file is written.

Note that the other HCDs call usb_hcd_resume_root_hub() whenever a port 
status change occurs while the root hub is suspended, regardless of 
what kind of status change it is.

> Maddog, I'll send you a patch to test shortly.
> 
> Sarah Sharp
> 
> p.s. I can see that Nautilus tries to write to power/level and gets a
> deprecated notification when the "Safely Remove" option is selected.
> Nautilus then segfaults because of it.

Ah.  The segfault can't caused by the deprecation notice (which is
merely a kernel log message).  It may caused by the fact that
power/level no longer supports "suspend".

>  Nautilus is probably doing a
> similar thing in Maddog's environment, so that's what is auto-suspending
> the USB hard drive.

Could be.

Alan Stern

--
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