Loading ...
Sorry, an error occurred while loading the content.
 

Re: usbhost_storage.c : the driver should be able to handle STALL as a response for USBSTRG_REQ_GETMAXLUN

Expand Messages
  • Gregory N
    Hi, Sheref, I have incorporated your recommended change. ... The only thing that I wondered about was the DRVR_CTRLIN macro return value. Not equal to OK does
    Message 1 of 2 , Jul 1, 2011
      Hi, Sheref,

      I have incorporated your recommended change.

      > if(DRVR_CTRLIN(priv->drvr, req, priv->tbuffer) != OK)
      > {
      > /* devices that does not support multible LUN may stall this
      > command
      > single LUN is assumed */
      > *(priv->tbuffer) = 0;
      > }
      > return OK;

      The only thing that I wondered about was the DRVR_CTRLIN macro return value. Not equal to OK does not necessary mean a stall. Couldn't the DRVR_CTRLIN fail for some other. But looking at the following logic I think it is okay. If the function returns success, the driver will just try more communications and if there is something seriously wrong, other communication failures should be caught and handled anyway.

      In fact, usbhost_maxlunreq() really should just be a function returning void now.

      Thanks for the bug report! I hate making mistakes but not as much as I hate having bugs in NuttX.

      Greg
    Your message has been successfully submitted and would be delivered to recipients shortly.