Sergei,
        I would like to clarify the below observation that you have made here

        " AFAIK, this code is partly authored by MontaVista."

        These modifications were solely authored by me and the proof for the 
same can be found in the 2.6.10 Davinci releases that accompany DaVinci EVM's 
(for more than 2 years) and the same is available in the TI external sites for 
community to downloa.  

        I had stated some time back that we are forward porting these changes 
to the GIT as part of our DaVinci USB learning propagation effort.

        Pl. verify your sources w.r.t claiming authorship for MV of the changes 
and I can very well help you if need help from my end in that effort.

        I will respond to STALL handling part in the next the thread that you 
have explained.
        

Regards

Swami

(Type "pspproducts" in you web browser for PSP info)

http://dbdwss01.india.ti.com/pspproducts/

PSP downloads at : 
http://software.ti.com/swcoe/intranet/reports/pds/PSP_releases.php

Office : +91-80-25048629


-----Original Message-----
From: Sergei Shtylyov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2008 10:37 PM
To: Subbrathnam, Swaminathan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
[email protected]
Subject: Re: [PATCH 3/3] MUSB : Fix for STALL handling in musb gadget code

Swaminathan S wrote:

> Fixes the SENTSTALL handling code to look for EP busy status before
> returning the request.  If EP is not busy do not giveback the request and
> restart the request in the context of CLEAR STALL feature from the
> host.

> Signed-off-by: Swaminathan S <[EMAIL PROTECTED]>

    AFAIK, this code is partly authored by MontaVista.


> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
> index d6a802c..491a3e7 100644
> --- a/drivers/usb/musb/musb_gadget.c
> +++ b/drivers/usb/musb/musb_gadget.c
[...]
> @@ -429,7 +429,7 @@ void musb_g_tx(struct musb *musb, u8 epnum)
>                               musb->dma_controller->channel_abort(dma);
>                       }
>  
> -                     if (request)
> +                     if (request && musb_ep->busy)
>                               musb_g_giveback(musb_ep, request, -EPIPE);
>  
>                       break;
> @@ -759,7 +759,7 @@ void musb_g_rx(struct musb *musb, u8 epnum)
>               csr &= ~MUSB_RXCSR_P_SENTSTALL;
>               musb_writew(epio, MUSB_RXCSR, csr);
>  
> -             if (request)
> +             if (request && musb_ep->busy)
>                       musb_g_giveback(musb_ep, request, -EPIPE);
>               goto done;
>       }

    NAK this part. The STALL handling is totally insane in this driver and 
this is a palliatve, not a fix. I'm hoping to post a real fix RSN.

WBR, Sergei

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to