Mismatch in TRB_LEN bit mask for Transfer Event TRBs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sarah,


While going through the code for Handling Transfer Events
(drivers/usb/host/xhci-ring.c), i hit upon this problem.
As defined in "drivers/usb/host/xhci.h"

        /* Normal TRB fields */
        /* transfer_len bitmasks - bits 0:16 */
        #define TRB_LEN(p)              ((p) & 0x1ffff)

And the same macro i could see being used while Handling Trasfer
events "handle_tx_event()", and further in
process_ctrl_td(), process_isoc_td(), and process_bulk_intr_td().

However, as per XHCI specs (Rev 1.0, 5/21/10) section 6.4.2.1 for
Transfer event TRBs, the transfer length is bits 0:23
thereby something like below could be valid:

        /* Transfer event TRB length bit mask */
        /* bits 0:23 */
        #define        EVENT_TRB_LEN(p)                ((p) & 0xffffff)

This difference is confusing somewhat.
I hope the current code must be pretty much fine, and there could be
something that i might be stupidly missing.
Would you please help me understand this .


Thanks,



-- 
Best Regards
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux