diff options
author | Al Cooper <alcooperx@gmail.com> | 2015-07-24 23:09:36 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-07-27 18:15:06 +0300 |
commit | 02c3b4c75994888e58a6e6e8176640cde9822597 (patch) | |
tree | 1c1d20dbe23a48c896c70f9d6745eb22664df276 /drivers/usb/gadget/udc/bdc/bdc_ep.c | |
parent | cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff) | |
download | linux-02c3b4c75994888e58a6e6e8176640cde9822597.tar.xz |
usb: gadget: bdc: fix a driver crash on disconnect
ep_dequeue() in bdc_ep.c was capturing the hw dequeue pointer
incorrectly by reading the wrong register for the upper 32 bits.
Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/bdc/bdc_ep.c')
-rw-r--r-- | drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index b04980cf6dc4..1efa61265d8d 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c @@ -779,7 +779,7 @@ static int ep_dequeue(struct bdc_ep *ep, struct bdc_req *req) /* The current hw dequeue pointer */ tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS0(0)); deq_ptr_64 = tmp_32; - tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS0(1)); + tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS1(0)); deq_ptr_64 |= ((u64)tmp_32 << 32); /* we have the dma addr of next bd that will be fetched by hardware */ |