Bug in xHCI command cancellation

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

 



Hi Elric,

I was looking at the xHCI command cancellation code, and I realized that
xhci_cancel_cmd() calls xhci_abort_cmd_ring() with the xHCI spinlock
held.  That function spins for up to 5 seconds, waiting for the command
ring running bit to be clear.

We really can't have the spinlock held for that long, since other things
like port status change events can cause the interrupt handler to be
called (which would attempt to acquire the spinlock).

Would it be OK to drop the spinlock in xhci_abort_cmd_ring() before
spinning on the CRR?  Or were you trying to protect some other xHCI
structures/registers with the lock while you waited to abort the command
ring?

It's commit ID b92cc66c047ff7cf587b318fe377061a353c120f "xHCI: add
aborting command ring function" if you need to refresh your memory.

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