Re: [PATCH 12/23] xhci: Allocate and address USB devices

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

 



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?

thanks,

greg k-h
--
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