AnsweredAssumed Answered

SendStatusCSW (Blackfin USB MSC driver src)

Question asked by xingsing on Aug 20, 2012
Latest reply on Aug 24, 2012 by xingsing

Hi all,


I am working on a stripped down driver for USB Mass storage device and is referring to the driver source code in Blackfin\lib\src\drivers\class\peripheral\mass_storage\ and found strange implementation of SendStatusCSW inside adi_usb_msd_support.c:

In SendStatusCSW(), a block of comment said "if this was an error we MUST STALL the endpoint before sending th CSW", and then it called SetStallEndpoint(); then it prepared the CSW buffer, however, it then immediately called ClearStallEndpoint() BEFORE calling adi_dev_write to send the CSW buffer.


I wonder if this is the proper implementation to return CSW to host?