Fix reported USB MSC product/revision
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4495 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
b761211fff
commit
953a846512
@ -1289,7 +1289,7 @@ static int pic32mx_rdcomplete(struct pic32mx_usbdev_s *priv,
|
|||||||
bdtout = privep->bdtout;
|
bdtout = privep->bdtout;
|
||||||
epno = USB_EPNO(privep->ep.eplog);
|
epno = USB_EPNO(privep->ep.eplog);
|
||||||
|
|
||||||
ullvdbg("EP%d: len=%d xfrd=%d [%p]\n",
|
ullvdbg("EP%d: len=%d xfrd=%d\n",
|
||||||
epno, privreq->req.len, privreq->req.xfrd);
|
epno, privreq->req.len, privreq->req.xfrd);
|
||||||
bdtdbg("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
bdtdbg("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
||||||
epno, bdtout, bdtout->status, bdtout->addr);
|
epno, bdtout, bdtout->status, bdtout->addr);
|
||||||
@ -2713,11 +2713,11 @@ static int pic32mx_interrupt(int irq, void *context)
|
|||||||
usbtrace(TRACE_INTDECODE(PIC32MX_TRACEINTID_RESET), usbir);
|
usbtrace(TRACE_INTDECODE(PIC32MX_TRACEINTID_RESET), usbir);
|
||||||
|
|
||||||
/* Reset interrupt received. Restore our initial state. NOTE: the
|
/* Reset interrupt received. Restore our initial state. NOTE: the
|
||||||
* hardware automatically resets the USB address, so we just need
|
* hardware automatically resets the USB address, so we really just
|
||||||
* reset any existing configuration/transfer states.
|
* need reset any existing configuration/transfer states.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pic32mx_swreset(priv);
|
pic32mx_reset(priv);
|
||||||
priv->devstate = DEVSTATE_DEFAULT;
|
priv->devstate = DEVSTATE_DEFAULT;
|
||||||
|
|
||||||
#ifdef CONFIG_USBOTG
|
#ifdef CONFIG_USBOTG
|
||||||
@ -3554,14 +3554,14 @@ static int pic32mx_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin)
|
|||||||
bdt->status = (USB_BDT_UOWN | USB_BDT_BSTALL);
|
bdt->status = (USB_BDT_UOWN | USB_BDT_BSTALL);
|
||||||
bdt->addr = 0;
|
bdt->addr = 0;
|
||||||
|
|
||||||
|
/* Stop any queued requests. Hmmm.. is there a race condition here? */
|
||||||
|
|
||||||
|
pic32mx_rqstop(privep);
|
||||||
|
|
||||||
bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n",
|
bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||||
epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr);
|
epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr);
|
||||||
bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n",
|
bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||||
epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr);
|
epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr);
|
||||||
|
|
||||||
/* Stop any queued requests. Hmmm.. is there a race condition here? */
|
|
||||||
|
|
||||||
pic32mx_rqstop(privep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -616,7 +616,7 @@ static inline int usbmsc_cmdinquiry(FAR struct usbmsc_dev_s *priv,
|
|||||||
|
|
||||||
len = strlen(g_mscserialstr);
|
len = strlen(g_mscserialstr);
|
||||||
DEBUGASSERT(len <= 4);
|
DEBUGASSERT(len <= 4);
|
||||||
memcpy(response->productid, g_mscserialstr, len);
|
memcpy(response->revision, g_mscserialstr, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user