This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

L138: Questions on Teardown Descriptor

Hi,

I would like to clarify my understanding on Teardown Descriptor.

(1) They can be in any Memory Region which has the descriptor size of 32 bytes.

(2) The software just need to set the Descriptor Type to 0x13 for Teardown Descriptor. The rest of the fileds will be set accordingly by hardware in the event of teardown.

(3) Push these descriptors into one of the Unassigned Queues (queue number starting 28)

(4) Let the hardware know the selected queue number by setting TDFDQ.TD_DESC_QNUM.

(5) I know software can initiate teardown event by setting a bit in either TXGCRn.TX_TEARDOWN or RXGCRn.RX_TEARDOWN. Will the hardware (either USB controller or CDMA controller) initiate teardown event ?

rgds,

kc Wong

  • Hi,

    I have done step (1) to (5) in the previous post. I also set the completion queue that is able to generate interrupt (24, 25 for TX and 26, 27 for RX).

    Then, I am trying to simulate an teardown event by setting either TXGCRn.TX_TEARDOWN or RXGCRn.RX_TEARDOWN and also the TEARDOWN.TX_TDOWN or TEARDOWN.TX_TDOWN in USBOTG controller.

    I am expecting interrupt to happen, and a teardown descriptor to be queued into one of the completion queues, but nothing happen.

    Am I doing anything wrong here ?

    I am also trying to follow the usb_tx_ch_teardwon() function in \linux-03.20.00.14\drivers\musb\cppi41_dma.c, which is continuous polling the respective completion queue by reading the queue together with a timeout. But, I always get timeout.

    The teardown event just not happening. Any advice ?????

    rgds,

    kc Wong