• Pat LaVarre's avatar
    [PATCH] USB: storage: cbw/csw trace in order · 0c2dfb88
    Pat LaVarre authored
    Via this patch ...
    
    We change only when CONFIG_USB_STORAGE_DEBUG=y.
    
    To /proc/kmsg etc. we now trace the fields of
    the cbw as we order those fields in ram and as
    we order those fields in time on the bus, to
    avoid disorientating those of us who view those
    canonical orders often.
    
    Also we no longer print "S" or "Sig" to
    "Signature", instead we always print "S".  We
    chose "S" over "Sig" because it is the "T"
    signature (aka "Tag") that actually makes each
    cbw/csw pair distinct, whereas the so-called
    Signatures only distinguish cbw from csw by
    flipping one bit.
    
    Also in the trace we uppercase a 'C' and an 'S'
    to keep cbw from csw typographically distinct.
    
    For example, what was:
    
    <7>usb-storage: Command INQUIRY (6 bytes)
    <7>usb-storage:  12 00 00 00 24 00
    <7>usb-storage: Bulk command S 0x43425355 T 0x1f13 Trg 0 LUN 0 L 36 F 128 CL 6
    ...
    <7>usb-storage: Bulk status Sig 0x53425355 T 0x1f13 R 0 Stat 0x0
    
    becomes:
    
    <7>usb-storage: Command INQUIRY (6 bytes)
    <7>usb-storage:  12 00 00 00 24 00
    <7>usb-storage: Bulk Command S 0x43425355 T 0x1f3b L 36 F 128 Trg 0 LUN 0 CL 6
    ...
    <7>usb-storage: Bulk Status S 0x53425355 T 0x1f3b R 0 Stat 0x0
    0c2dfb88
transport.c 34.9 KB