dwc3 spin_lock_irq flags

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

 



Hi,

Typically when we use spin_lock_irqsave and spin_unlock_irqrestore,
we save the irq state in the "flags" variable and pass it down to any
function that may need to do spin_unlock_irqrestore and update the flags
again.

I don't see that we're doing it for dwc3 when we give back the requests:

void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
		int status)
{
	struct dwc3			*dwc = dep->dwc;

	dwc3_gadget_del_and_unmap_request(dep, req, status);
	req->status = DWC3_REQUEST_STATUS_COMPLETED;

	spin_unlock(&dwc->lock);
	usb_gadget_giveback_request(&dep->endpoint, &req->request);
	spin_lock(&dwc->lock);
}

Then we would use the stale "flags" to do spin_unlock_irqrestore() at a later
time. Maybe someone can help shed some light on what issue this would cause
(if any). From our hardware testing, there's no obvious failure or performance
impact that we see.

Thanks,
Thinh




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux