Merge tag 'fixes-for-v3.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes: usb: fixes for v3.9-rc4 udc-core learned that it shouldn't use invalid pointers when unloading a gadget driver. net2272 and net2280 got a fix for a regression caused by the udc_start/udc_stop conversion. We're defining a static inline no-op for otg_ulpi_create() to prevent build errors when that driver isn't enabled. FunctionFS got a fix for an off-by-one error when binding and unbinding instances of FunctionFS. MUSB learned that it shouldn't try to unmap buffers which weren't previously mapped. f_rndis got a fix for a possible NULL pointer dereference in a debugging message code. MUSB's DA8xx glue layer got a build fix due to a typo.
Цей коміт міститься в:
@@ -327,7 +327,7 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
|
||||
u8 devctl = musb_readb(mregs, MUSB_DEVCTL);
|
||||
int err;
|
||||
|
||||
err = musb->int_usb & USB_INTR_VBUSERROR;
|
||||
err = musb->int_usb & MUSB_INTR_VBUSERROR;
|
||||
if (err) {
|
||||
/*
|
||||
* The Mentor core doesn't debounce VBUS as needed
|
||||
|
@@ -141,7 +141,9 @@ static inline void map_dma_buffer(struct musb_request *request,
|
||||
static inline void unmap_dma_buffer(struct musb_request *request,
|
||||
struct musb *musb)
|
||||
{
|
||||
if (!is_buffer_mapped(request))
|
||||
struct musb_ep *musb_ep = request->ep;
|
||||
|
||||
if (!is_buffer_mapped(request) || !musb_ep->dma)
|
||||
return;
|
||||
|
||||
if (request->request.dma == DMA_ADDR_INVALID) {
|
||||
@@ -195,7 +197,10 @@ __acquires(ep->musb->lock)
|
||||
|
||||
ep->busy = 1;
|
||||
spin_unlock(&musb->lock);
|
||||
unmap_dma_buffer(req, musb);
|
||||
|
||||
if (!dma_mapping_error(&musb->g.dev, request->dma))
|
||||
unmap_dma_buffer(req, musb);
|
||||
|
||||
if (request->status == 0)
|
||||
dev_dbg(musb->controller, "%s done request %p, %d/%d\n",
|
||||
ep->end_point.name, request,
|
||||
|
Посилання в новій задачі
Заблокувати користувача