On Fri, Apr 20, 2012 at 4:23 AM, Martin Mokrejs <mmokrejs@xxxxxxxxxxxxxxxxxx> wrote: > Yinghai Lu wrote: >> On Thu, Apr 19, 2012 at 2:48 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: >>> On Thu, Apr 19, 2012 at 4:16 PM, Martin Mokrejs >>>> I just tried something similar under linux, with all the patches I accumulated for 3.4-rc3 >>>> and posted in my previous emails. It seems linux flips some value so on every second card >>>> removal it really does realize it was just unplugged. >>> >>> that is really looks like silicon problem. >>> >> please check attached patch. Hope link change bit is flip around... >> if there is change, we could add some logic: >> check if the device is there, or will reset link to normal state. > > I don't think it helped but maybe you will see some difference: No, the interrupt still get delayed. > > Complete dmesg is attached. OK, the "60sec" delay is when xhci_hcd gives away its attempts. > I am not knowlegeable of the kernel at all but it is my impression that because of the > card presence detection there is no way to prevent that. But, if I get it right, now when I > pluging the card+USB disk in it into the computer before those "60sec" it gets detected, > so my problem is gone (xhci cancels the timeout because a "new card" was popped in with a "new" > device. > > So, although I am now not sure whether I need your last patch, for the practical purpose that > I want to plugin a new card with a device into my computer, it works now. (added Sarah Sharp > into CC: just to make her aware of this scenario, no problem with xhci_hcd in my eyes) > ;) please try to "safely remove the card" before removing the card physically like: echo 1 > /sys/bus/pci/devices/0000:11:00.0/remove that will stop the drivers and remove pci device in the kernel. Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html