Greg KH wrote:
On Tue, Apr 28, 2009 at 05:46:24PM +0530, Viral Mehta wrote:
+void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
+{
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+ unsigned long flags;
+
+ if (udev->slot_id == 0)
+ return;
+
+ spin_lock_irqsave(&xhci->lock, flags);
+ if (queue_slot_control(xhci, TRB_DISABLE_SLOT, udev->slot_id)) {
+ spin_unlock_irqrestore(&xhci->lock, flags);
+ xhci_dbg(xhci, "FIXME: allocate a command ring segment\n");
+ return;
+ }
+ ring_cmd_db(xhci);
You may like to remove xhci_dbg(...) function call from ring_cmd_db()
function; as it may sleep while holding spin_lock_irqsave
printk is safe to call with a spinlock held. Or I thought it used to
be, did something change?
Yes. printk is safe. it just copies buffer to kernel ring buffer.
thanks,
greg k-h
Email Scanned for Virus & Dangerous Content by : www.CleanMailGateway.com
--
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