MA USB V1.0a-Final
MA USB V1.0a-Final
MA USB V1.0a-Final
Release 1.0a
Contributors
Will Harris Advanced Micro Devices
Simon Black Atmel Corporation
Chris Kelly Atmel Corporation
Roel Peeters Atmel Corporation
Ananthateerta Ashwini Broadcom Corporation
Randal Erman Broadcom Corporation
Gang Lu Broadcom Corporation
Sandy (Alexander) MacInnis Broadcom Corporation
Murat Mese Broadcom Corporation
Payam Torab Broadcom Corporation
Freeman Wang Broadcom Corporation
Jing Wang Broadcom Corporation
Hui Xu Broadcom Corporation
Dan Ellis DisplayLink Ltd.
Richard Petrie DisplayLink Ltd.
Carlos Cordeiro Intel Corporation
Marek Dabek Intel Corporation
Kris Fleming Intel Corporation
John Howard Intel Corporation
Abdul Rahman Ismail Intel Corporation
Oren Kedem Intel Corporation
Maciej Kurczewski Intel Corporation
Elad Levy Intel Corporation
Guoqing Li Intel Corporation
Wojciech Omilian Intel Corporation
Venkatesh Rajendran Intel Corporation
Bahareh Sadeghi (Editor) Intel Corporation
Etan Shirron Intel Corporation
Solomon Trainin Intel Corporation
Rafal Wielicki Intel Corporation
Xiaowen Lu MCCI Corporation
Terry Moore MCCI Corporation
Chris Yokum MCCI Corporation
Chao-Chun Wang MediaTek Inc.
James Yee MediaTek Inc.
Randy Aull Microsoft Corporation
Constantine Elster Qualcomm Inc.
Xiaolong Huang Qualcomm Inc.
Ali Raissinia Qualcomm Inc.
Vamsi Samavedam Qualcomm Inc.
Lochan Verma Qualcomm Inc.
Xiaodong Wang Qualcomm Inc.
Page 2
Media Agnostic Universal Serial Bus Specification Release 1.0
Chiu Ngu Samsung Electronics Co.
Huai-Rong Shao Samsung Electronics Co.
Karthik Srinivasa Gopalan Samsung Electronics Co.
Dmitry Cherniavsky Silicon Image
Page 3
Media Agnostic Universal Serial Bus Specification Release 1.0
Page 4
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table of Contents
2 1 INTRODUCTION ............................................................................................................................................................................... 14
3 1.1 Motivation.....................................................................................................................................................................................14
4 1.2 Objective of the specification ....................................................................................................................................................14
5 1.3 Scope of the document ...............................................................................................................................................................14
6 1.4 Document organization ..............................................................................................................................................................14
7 2 NORMATIVE REFER ENCES ....................................................................................................................................................... 16
8 3 DEFINITIONS, ACRONYMS AND ABBREVIATIONS........................................................................................................ 17
9 3.1 Definitions ....................................................................................................................................................................................17
10 3.2 Acronyms and abbreviations .....................................................................................................................................................18
11 4 ARCHITECTURAL OVERVIEW ................................................................................................................................................. 19
12 4.1 Architectural elements ................................................................................................................................................................19
13 4.1.1 MA USB host .........................................................................................................................................................19
14 4.1.2 MA USB device .....................................................................................................................................................20
15 4.1.3 MA USB hub ..........................................................................................................................................................21
16 4.2 USB topology...............................................................................................................................................................................22
17 4.3 MA USB co mmun ication model ..............................................................................................................................................23
18 4.4 MA USB addressing ...................................................................................................................................................................24
19 4.4.1 MA USB device address.......................................................................................................................................25
20 4.4.2 Device handle .........................................................................................................................................................25
21 4.4.3 Endpoint handle .....................................................................................................................................................25
22 4.4.4 Container ID ...........................................................................................................................................................25
23 4.5 Media dependent functions ........................................................................................................................................................26
24 4.5.1 Relation of MA USB addressing to network addressing ................................................................................26
25 4.5.2 MA USB PAL identification ...............................................................................................................................27
26 4.5.2.1 Identification in 802.11 mode ............................................................................................................................27
27 4.5.2.2 Identification in IP mode....................................................................................................................................27
28 4.5.3 Network requirements...........................................................................................................................................27
29 4.5.3.1 Requirements for 802.11 mode ..........................................................................................................................28
30 4.5.3.2 Requirements for IP mode .................................................................................................................................28
31 4.5.3.3 M edia specific protocol constants......................................................................................................................28
32 4.5.4 Device discovery....................................................................................................................................................28
33 4.5.4.1 Device discovery in 802.11 mode......................................................................................................................28
34 4.5.4.2 Device discovery in IP mode .............................................................................................................................28
35 4.5.5 Packetizat ion...........................................................................................................................................................28
36 4.5.5.1 Packetization in 802.11 mode ............................................................................................................................28
37 4.5.5.2 Packetization in IP mode....................................................................................................................................28
Page 5
Media Agnostic Universal Serial Bus Specification Release 1.0
1 5.6 Link-managed OUT transfers....................................................................................................................................................69
2 5.6.1 Transfer description...............................................................................................................................................69
3 5.6.2 Transfer mode selection........................................................................................................................................72
4 5.7 Control transfers ..........................................................................................................................................................................73
5 5.7.1 Setup stage ..............................................................................................................................................................73
6 5.7.2 Data stage for control OUT transfers .................................................................................................................74
7 5.7.3 Data stage for control IN transfers ......................................................................................................................74
8 5.7.4 Status stage..............................................................................................................................................................74
9 5.8 Bulk transfers ...............................................................................................................................................................................74
10 5.9 Interrupt transfers ........................................................................................................................................................................75
11 5.10 Isochronous transfers ..................................................................................................................................................................75
12 5.10.1 Packetizat ion...........................................................................................................................................................76
13 5.10.1.1 Isochronous data blocks .....................................................................................................................................77
14 5.10.1.2 Isochronous read size blocks..............................................................................................................................81
15 5.10.2 Isochronous IN transfers.......................................................................................................................................82
16 5.10.2.1 MA USB host requirements ...............................................................................................................................86
17 5.10.2.2 MA USB device requirements ...........................................................................................................................87
18 5.10.2.3 Application design guidelines ............................................................................................................................87
19 5.10.3 Isochronous OUT transfers ..................................................................................................................................88
20 5.10.3.1 MA USB host requirements ...............................................................................................................................92
21 5.10.3.2 MA USB device requirements ...........................................................................................................................95
22 5.10.3.3 Application design guidelines ............................................................................................................................95
23 5.11 Device notifications ....................................................................................................................................................................96
24 5.12 Reliab ility......................................................................................................................................................................................96
25 5.13 Efficiency ......................................................................................................................................................................................96
26 6 PROTOCOL LAYER......................................................................................................................................................................... 97
27 6.1 Packet types ..................................................................................................................................................................................97
28 6.2 Packet formats..............................................................................................................................................................................97
29 6.2.1 Co mmon header fields ..........................................................................................................................................97
30 6.2.1.1 Version ...............................................................................................................................................................98
31 6.2.1.2 Flags ...................................................................................................................................................................98
32 6.2.1.3 Type and Subtype...............................................................................................................................................98
33 6.2.1.4 Length ..............................................................................................................................................................101
34 6.2.1.5 EP Handle/Device Handle ...............................................................................................................................101
35 6.2.1.6 Device Address ................................................................................................................................................101
36 6.2.1.7 SSID .................................................................................................................................................................101
37 6.2.1.8 Status Code ......................................................................................................................................................101
38 6.3 Management packets.................................................................................................................................................................103
39 6.3.1 Co mmon header fields ........................................................................................................................................103
40 6.3.1.1 Dialog Token....................................................................................................................................................103
41 6.3.2 MA USB Capability Request (CapReq) ..........................................................................................................103
42 6.3.2.1 Synchronization Capabilities descriptor ..........................................................................................................104
43 6.3.2.2 Link Sleep Capability descriptor......................................................................................................................105
44 6.3.3 MA USB Capability Response (CapResp)......................................................................................................105
45 6.3.3.1 Speed Capability descriptor .............................................................................................................................107
46 6.3.3.2 P-managed OUT Capabilities descriptor .........................................................................................................108
47 6.3.3.3 Isochronous Capabilities descriptor.................................................................................................................108
48 6.3.3.4 Synchronization Capabilities descriptor ..........................................................................................................109
49 6.3.3.5 Container ID Capability descriptor..................................................................................................................109
50 6.3.3.6 Link Sleep Capability descriptor......................................................................................................................110
51 6.3.4 USB Device Handle Request (USBDevHandleReq).....................................................................................110
52 6.3.5 USB Device Handle Response (USBDevHandleResp) ................................................................................111
53 6.3.6 Endpoint Handle Request (EPHandleReq) ......................................................................................................111
54 6.3.7 Endpoint Handle Response (EPHandleResp) .................................................................................................112
55 6.3.8 Endpoint Activate Request (EPActivateReq) .................................................................................................114
56 6.3.9 Endpoint Activate Response (EPActivateResp) .............................................................................................114
57 6.3.10 Endpoint Inactivate Request (EPInactivateReq) ............................................................................................115
58 6.3.11 Endpoint Inactivate Response (EPInactivateResp) ........................................................................................115
59 6.3.12 Endpoint Reset Request (EPResetReq)............................................................................................................116
60 6.3.13 Endpoint Reset Response (EPResetResp) .......................................................................................................117
Page 6
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.3.14 Clear Transfers Request (ClearTransfersReq) ................................................................................................117
2 6.3.15 Clear Transfers Response (ClearTransfersResp)............................................................................................118
3 6.3.16 Endpoint Handle Delete Request (EPHandleDeleteReq) .............................................................................119
4 6.3.17 Endpoint Handle Delete Response (EPHandleDeleteResp) .........................................................................119
5 6.3.18 MA USB Device Reset Request (DevResetReq) ...........................................................................................120
6 6.3.19 MA USB Device Reset Response (DevResetResp).......................................................................................120
7 6.3.20 Modify EP0 Request (ModifyEP0Req) ...........................................................................................................120
8 6.3.21 Modify EP0 Response (ModifyEP0Resp) .......................................................................................................120
9 6.3.22 Set USB Dev ice Address Request (SetUSBDevAddrReq) ..........................................................................121
10 6.3.23 Set USB Dev ice Address Response (SetUSBDevAddrResp) ......................................................................121
11 6.3.24 Update Device Request (UpdateDevReq) .......................................................................................................122
12 6.3.25 Update Device Response (UpdateDevResp)...................................................................................................123
13 6.3.26 USB Device Disconnect Request (USBDevDisconnectReq) ......................................................................123
14 6.3.27 USB Device Disconnect Response (USBDevDisconnectResp) ..................................................................123
15 6.3.28 USB Suspend Request (USBSuspendReq) .....................................................................................................123
16 6.3.29 USB Suspend Response (USBSuspendResp).................................................................................................123
17 6.3.30 USB Resume Request (USBResumeReq) .......................................................................................................124
18 6.3.31 USB Resume Response (USBResu meResp) ..................................................................................................124
19 6.3.32 Remote Wake Request (RemoteWakeReq) ....................................................................................................124
20 6.3.33 Remote Wake Response (RemoteWakeResp) ................................................................................................124
21 6.3.34 Ping Request (PingReq)......................................................................................................................................125
22 6.3.35 Ping Response (PingResp) .................................................................................................................................125
23 6.3.36 MA USB Device Disconnect Request (DevDisconnectReq) .......................................................................125
24 6.3.37 MA USB Device Disconnect Response (DevDisconnectResp) ..................................................................125
25 6.3.38 MA USB device Initiated Disconnect Request (DevInit DisconnectReq)..................................................125
26 6.3.39 MA USB device Initiated Disconnect Response (DevInitDisconnectResp) .............................................125
27 6.3.40 Synchronization Request (SynchReq)..............................................................................................................125
28 6.3.41 Synchronization Response (SynchResp) .........................................................................................................126
29 6.3.42 Cancel Transfer Request (CancelTransferReq) ..............................................................................................126
30 6.3.43 Cancel Transfer Response (CancelTransferResp)..........................................................................................126
31 6.3.44 Endpoint Open Stream Request (EPOpenStreamReq ) ..................................................................................127
32 6.3.45 Endpoint Open Stream Response (EPOpenStreamResp) .............................................................................128
33 6.3.46 Endpoint Close Stream Request (EPCloseStreamReq ) .................................................................................129
34 6.3.47 Endpoint Close Stream Response (EPCloseStreamResp) ............................................................................129
35 6.3.48 USB Device Reset Request (USBDevResetReq)...........................................................................................129
36 6.3.49 USB Device Reset Response (USBDevResetResp) ......................................................................................130
37 6.3.50 Device Notification Request (DevNotificationReq) ......................................................................................130
38 6.3.51 Device Notification Response (DevNotificationResp) .................................................................................130
39 6.3.52 Endpoint Set Keep-A live Request (EPSetKeepAliveReq) ...........................................................................130
40 6.3.53 Endpoint Set Keep-A live Response (EPSetKeepAliveResp) ......................................................................131
41 6.3.54 Get Port Bandwidth Request (GetPo rtBW Req) .............................................................................................131
42 6.3.55 Get Port Bandwidth Response (GetPortBW Resp) .........................................................................................132
43 6.3.56 Sleep Request (SleepReq) ..................................................................................................................................133
44 6.3.57 Sleep Response (SleepResp)..............................................................................................................................133
45 6.3.58 Wake Request (WakeReq) .................................................................................................................................134
46 6.3.59 Wake Response (WakeResp).............................................................................................................................134
47 6.3.60 Vendor Specific Request (VendorSpecificReq) .............................................................................................134
48 6.3.61 Vendor Specific Response (VendorSpecificResp).........................................................................................134
49 6.4 Control packets ..........................................................................................................................................................................135
50 6.4.1 Transfer Setup Request (TransferSetupReq)...................................................................................................135
51 6.4.2 Transfer Setup Response (TransferSetupResp) ..............................................................................................135
52 6.4.3 Transfer Tear Down Confirmat ion (TransferTearDown Conf) ....................................................................135
53 6.5 Data packets ...............................................................................................................................................................................136
54 6.5.1 Co mmon data header fields ................................................................................................................................136
55 6.5.1.1 EPS...................................................................................................................................................................136
56 6.5.1.2 T-Flags .............................................................................................................................................................137
57 6.5.1.3 Stream ID (non-isochronous data packets) ......................................................................................................137
58 6.5.1.4 Sequence Number ............................................................................................................................................137
59 6.5.1.5 Request ID........................................................................................................................................................138
Page 7
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.5.1.6 Remaining Size/Credit (non-isochronous data packets) ..................................................................................138
2 6.5.1.7 Number of Headers (isochronous data packets) ..............................................................................................138
3 6.5.1.8 I-Flags (isochronous data packets)...................................................................................................................138
4 6.5.1.9 Presentation Time (isochronous data packets).................................................................................................138
5 6.5.1.10 Number of Segments (isochronous data packets) ............................................................................................139
6 6.5.1.11 MA USB Timestamp (isochronous data packets)............................................................................................139
7 6.5.1.12 M edia Time/Transmission Delay (isochronous data packets) .........................................................................139
8 6.5.2 Transfer Request (TransferReq) ........................................................................................................................140
9 6.5.3 Transfer Response (TransferResp) ...................................................................................................................140
10 6.5.4 Transfer Acknowledgement (TransferAck) ....................................................................................................140
11 6.5.5 Isochronous Transfer Request (IsochTransferReq) .......................................................................................141
12 6.5.6 Isochronous Transfer Response (IsochTransferResp) ...................................................................................141
13 6.6 Clock synchronization ..............................................................................................................................................................141
14 6.6.1 Clock model..........................................................................................................................................................141
15 6.6.2 Synchronization....................................................................................................................................................142
16 7 MA USB DEVIC E FRAMEW ORK .............................................................................................................................................144
17 7.1 Device states...............................................................................................................................................................................144
18 7.2 EP handle states .........................................................................................................................................................................144
19 7.2.1 Active state............................................................................................................................................................144
20 7.2.2 Halted state............................................................................................................................................................144
21 7.2.3 Inactive state .........................................................................................................................................................145
22 7.2.4 Unassigned state...................................................................................................................................................145
23 7.3 Device set up ..............................................................................................................................................................................146
24 7.3.1 Discovery mechanism .........................................................................................................................................146
25 7.3.2 USB device enu merat ion ....................................................................................................................................146
26 7.3.2.1 USB device handle allocation ..........................................................................................................................148
27 7.3.2.2 Endpoint handle allocation...............................................................................................................................149
28 7.3.2.3 M odification of EP0 parameters ......................................................................................................................149
29 7.3.2.4 USB device address allocation .........................................................................................................................150
30 7.3.2.5 Update of USB device parameters ...................................................................................................................150
31 7.3.3 Enu merat ion of a USB device downstream of an MA USB hub .................................................................150
32 7.3.4 Support of Stream Protocol ................................................................................................................................152
33 7.3.5 USB device reset..................................................................................................................................................152
34 8 MA USB HOST IMPLEMENTATION ......................................................................................................................................154
35 8.1 Session management .................................................................................................................................................................154
36 8.1.1 Session states ........................................................................................................................................................154
37 8.1.1.1 Session Down state ..........................................................................................................................................154
38 8.1.1.2 Session Connecting state..................................................................................................................................154
39 8.1.1.3 Session Active state .........................................................................................................................................155
40 8.1.1.4 Session Inactive state .......................................................................................................................................155
41 8.1.2 Session setup.........................................................................................................................................................155
42 8.1.2.1 MA USB device reset ......................................................................................................................................156
43 8.1.2.2 Capability exchange .........................................................................................................................................157
44 8.1.3 Session tear down ................................................................................................................................................157
45 8.1.3.1 Implicit session tear down................................................................................................................................157
46 8.1.3.2 Host initiated session tear down.......................................................................................................................158
47 8.1.3.3 Device initiated session tear down...................................................................................................................159
48 8.1.3.4 USB device removal procedure .......................................................................................................................160
49 8.2 Power management ...................................................................................................................................................................160
50 8.2.1 Transition to Session Inactive state ..................................................................................................................161
51 8.2.1.1 Initiation by the M A USB host ........................................................................................................................161
52 8.2.1.2 Initiation by the M A USB device ....................................................................................................................162
53 8.2.2 Transition to Session Active state .....................................................................................................................164
54 8.2.2.1 Initiation by the M A USB host ........................................................................................................................164
55 8.2.2.2 Initiation by an M A USB device......................................................................................................................165
56 9 MA USB HUB .....................................................................................................................................................................................168
57 9.1 MA USB hub enumerat ion ......................................................................................................................................................168
58 9.2 MA USB hub session tear down .............................................................................................................................................168
59 9.2.1 Removal p rocedure for a USB device downstream of an MA USB hub ...................................................168
Page 8
Media Agnostic Universal Serial Bus Specification Release 1.0
1 9.3 MA USB hub power management..........................................................................................................................................168
2 10 PROTOCOL CONS TANTS ...........................................................................................................................................................170
3 APPENDIX A – DISCOVERY INFORMATION PRIOR TO ESTAB LIS HING A S ECURE CONNECTION ...........171
4 A.1 User identification of a device ....................................................................................................................................................171
5 A.2 Platform driver matching .............................................................................................................................................................172
6 A.2.1 Driver Identification ...........................................................................................................................................172
7 A.2.2 Configuration Descriptor Set ............................................................................................................................172
8 A.2.3 Morphing devices ...............................................................................................................................................173
9 APPENDIX B – WIGIG SPECIFIC REQUIREMENTS ...............................................................................................................174
10 B.1 Reco mmended MAC and PHY features for MA USB p roducts using WiGig Certified radios ......................................174
11 B.2 W iGig MA USB Protocol Constants .........................................................................................................................................174
12 B.3 Synchronization in WiGig ...........................................................................................................................................................175
13 B.4 W iGig implementation of L-managed OUT transfer ..............................................................................................................175
14
Page 9
Media Agnostic Universal Serial Bus Specification Release 1.0
1 List of Figures
2
3 Figure 1—Build ing blocks of an MA USB host and relationship to existing USB infrastructure .................................................. 19
4 Figure 2—Build ing blocks of an MA USB device and relationship to existing USB infrastructure .............................................. 20
5 Figure 3—Build ing blocks of an MA USB hub ....................................................................................................................................... 22
6 Figure 4—Examp le MA USB hub hosting multip le USB devices ....................................................................................................... 22
7 Figure 5—MA USB Service Set and equivalent USB topology ........................................................................................................... 23
8 Figure 6—MA USB co mmun ication model ............................................................................................................................................. 23
9 Figure 7—MA USB Management and data channel latencies .............................................................................................................. 24
10 Figure 8—Concurrent MA USB device and host operation in an IEEE 802.11 BSS ........................................................................ 25
11 Figure 9—MA USB protocol hierarchy..................................................................................................................................................... 26
12 Figure 10—Net work addressing in 802.11 and IP modes ...................................................................................................................... 27
13 Figure 11—Default t imings for management packet exchange............................................................................................................. 30
14 Figure 12—Default t imings for data packet immediate exchange ........................................................................................................ 32
15 Figure 13—Default t imings to keep an MA USB transfer alive ........................................................................................................... 32
16 Figure 14—Taxono my of MA USB transfers........................................................................................................................................... 35
17 Figure 15—MA USB IN t ransfer................................................................................................................................................................ 36
18 Figure 16—Data packets and header fields used for IN transfers ......................................................................................................... 42
19 Figure 17—P-managed MA USB OUT transfers .................................................................................................................................... 54
20 Figure 18—Data packets and header fields used for p-managed OUT transfers................................................................................ 60
21 Figure 19—Link-managed OUT transfer .................................................................................................................................................. 72
22 Figure 20—MA USB Control OUT and IN Transfers ............................................................................................................................ 73
23 Figure 21—MA USB isochronous data packet formats .......................................................................................................................... 77
24 Figure 22—Format of isochronous data packets with isochronous payload ....................................................................................... 78
25 Figure 23—Isochronous header formats.................................................................................................................................................... 79
26 Figure 24—S-Flags field .............................................................................................................................................................................. 79
27 Figure 25—Examples of packet izing isochronous segments ................................................................................................................. 81
28 Figure 26—Format of Isochronous Transfer Request packets for IN transfers .................................................................................. 81
29 Figure 27—Isochronous read size block formats ..................................................................................................................................... 82
30 Figure 28—MA USB isochronous IN transfer ......................................................................................................................................... 84
31 Figure 29—Continuous isochronous IN streaming using mu ltip le levels of buffering ..................................................................... 88
32 Figure 30—MA USB isochronous OUT transfer..................................................................................................................................... 90
33 Figure 31—Example of buffer estimate for isochronous OUT t imed delivery .................................................................................. 94
34 Figure 32—Example of buffer estimate for isochronous OUT ASAP delivery ................................................................................. 94
35 Figure 33—Continuous isochronous OUT streaming using mult iple levels of buffering ................................................................ 96
36 Figure 34— Co mmon header fo r MA USB packets ................................................................................................................................ 98
37 Figure 35—Flags field .................................................................................................................................................................................. 98
38 Figure 36—EP Handle field ....................................................................................................................................................................... 101
39 Figure 37—Co mmon header for MA USB management packets ....................................................................................................... 103
40 Figure 38—Co mmon header for MA USB control packets ................................................................................................................. 135
41 Figure 39—Co mmon header for MA USB non-isochronus data packets.......................................................................................... 136
42 Figure 40—Co mmon header for MA USB isochronus data packets .................................................................................................. 136
43 Figure 41—T-Flags field ............................................................................................................................................................................ 137
44 Figure 42—I-Flags field ............................................................................................................................................................................. 138
45 Figure 43—Presentation Time field format ............................................................................................................................................ 139
46 Figure 44—MA USB clock model and distribution .............................................................................................................................. 141
47 Figure 45—MA USB Global Time (M GT) fo rmat ............................................................................................................................... 142
48 Figure 46—EP handle state diagram ........................................................................................................................................................ 144
49 Figure 47—Enu meration of an integrated USB device ......................................................................................................................... 148
50 Figure 48—Enu meration of a USB device downstream of an MA USB hub ................................................................................... 151
51 Figure 49—Example of Open Stream Request and Response packet exchanges............................................................................. 152
52 Figure 50—USB device reset .................................................................................................................................................................... 153
53 Figure 51—MA USB session state diagram ........................................................................................................................................... 154
54 Figure 52—MA USB device session setup ............................................................................................................................................. 156
55 Figure 53—Imp licit session tear down .................................................................................................................................................... 158
56 Figure 54—Host init iated session tear down .......................................................................................................................................... 159
57 Figure 55—Dev ice initiated session tear down ...................................................................................................................................... 159
Page 10
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Figure 56—USB Device Removal Procedure ........................................................................................................................................ 160
2 Figure 57—Transition to Session Inactive state initiated by the MA USB host .............................................................................. 162
3 Figure 58—Transition to Session Inactive state initiated by an MA USB device............................................................................ 163
4 Figure 59—Transition to Session Active state initiated by the MA USB host ................................................................................. 164
5 Figure 60—Transition to Session Active state initiated by an MA USB device (exp licit request)............................................... 165
6 Figure 61—Transition to Session Active state initiated by an MA USB device (remote wake) ................................................... 166
7 Figure 62—Transition to Session Active state initiated by an MA USB device (IN transfer) ....................................................... 167
8 Figure 63—Link-managed OUT transfer in W iGig imp lementation ................................................................................................. 176
9
Page 11
Media Agnostic Universal Serial Bus Specification Release 1.0
1 List of Tables
2
3 Table 1—S-Flags subfields .......................................................................................................................................................................... 79
4 Table 2—Timing parameters specific to the MA USB isochronous IN transfer model .................................................................... 86
5 Table 3—Timing parameters specific to the MA USB isochronous OUT transfer model ............................................................... 91
6 Table 4—Flags subfields .............................................................................................................................................................................. 98
7 Table 5—Type and Subtype values for MA USB packet variants ........................................................................................................ 98
8 Table 6—Status Code values ..................................................................................................................................................................... 102
9 Table 7—MA USB Capability Request fields ........................................................................................................................................ 104
10 Table 8—Format of MA Host Capability descriptors ........................................................................................................................... 104
11 Table 9—MA Host Capability Type values ............................................................................................................................................ 104
12 Table 10—Synchronization Capabilit ies descriptor .............................................................................................................................. 104
13 Table 11—Lin k Sleep Capability descriptor........................................................................................................................................... 105
14 Table 12—MA USB Capability Response fields ................................................................................................................................... 105
15 Table 13—Format of MA Device Capability descriptors..................................................................................................................... 106
16 Table 14—MA Device Capability Type values ..................................................................................................................................... 106
17 Table 15—Speed Capability descriptor ................................................................................................................................................... 107
18 Table 16—P-managed OUT Capabilities descriptor ............................................................................................................................. 108
19 Table 17—P-managed OUT Capability Bit map fo rmat ....................................................................................................................... 108
20 Table 18—Isochronous Capabilit ies descriptor...................................................................................................................................... 108
21 Table 19—Synchronization Capabilit ies descriptor .............................................................................................................................. 109
22 Table 20—Container ID Capability descriptor....................................................................................................................................... 109
23 Table 21—Lin k Sleep Capability descriptor........................................................................................................................................... 110
24 Table 22—USB Dev ice Handle Request fields ...................................................................................................................................... 110
25 Table 23—USB Dev ice Handle Response fields ................................................................................................................................... 111
26 Table 24—Endpoint Handle Request fields ............................................................................................................................................ 112
27 Table 25—EP descriptor ............................................................................................................................................................................ 112
28 Table 26—EP Handle Response fields .................................................................................................................................................... 113
29 Table 27—MA USB EP descriptor format ............................................................................................................................................. 113
30 Table 28—Endpoint Activate Request fields .......................................................................................................................................... 114
31 Table 29—Endpoint Activate Response fields ....................................................................................................................................... 115
32 Table 30—Endpoint Inactivate Request fields ....................................................................................................................................... 115
33 Table 31—Endpoint Inactivate Response fields .................................................................................................................................... 116
34 Table 32—Endpoint Reset Request fields ............................................................................................................................................... 116
35 Table 33—EP reset information block..................................................................................................................................................... 116
36 Table 34—Endpoint Reset Response fields ............................................................................................................................................ 117
37 Table 35—Endpoint Clear Transfers Request fields ............................................................................................................................. 117
38 Table 36—Endpoint Clear Transfers Response fields .......................................................................................................................... 118
39 Table 37—Endpoint Handle Delete Request fields ............................................................................................................................... 119
40 Table 38—Endpoint Handle Delete Response fields ............................................................................................................................ 120
41 Table 39—Modify EP0 Request fields .................................................................................................................................................... 120
42 Table 40—Modify EP0 Response fields.................................................................................................................................................. 121
43 Table 41—Set USB Device Address Response fields ........................................................................................................................... 121
44 Table 42—Set USB Device Address Response fields ........................................................................................................................... 121
45 Table 43—Update Device Request fields ................................................................................................................................................ 122
46 Table 44—Device descriptor ..................................................................................................................................................................... 123
47 Table 45—Remote Wake Request fields................................................................................................................................................. 124
48 Table 46—Synchronization Request fields ............................................................................................................................................. 125
49 Table 47—Cancel Transfer Request fields .............................................................................................................................................. 126
50 Table 48—Cancel Transfer Response fields ........................................................................................................................................... 127
51 Table 49—Endpoint Open Streams Request fields ................................................................................................................................ 127
52 Table 50—Endpoint Open Stream Response fields ............................................................................................................................... 128
53 Table 51—Stream ID interval block ........................................................................................................................................................ 128
54 Table 52—Endpoint Close Stream Request fields ................................................................................................................................. 129
55 Table 53—Device Notificat ion Request fields ....................................................................................................................................... 130
56 Table 54—Endpoint Set Keep-Alive Request fields ............................................................................................................................. 130
57 Table 55—Endpoint Set Keep-Alive Response fields .......................................................................................................................... 131
Page 12
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 56— Get USB Port Bandwidth Request fields ............................................................................................................................ 131
2 Table 57— Get USB Port Bandwidth Response fields ......................................................................................................................... 132
3 Table 58—SleepReq fields......................................................................................................................................................................... 133
4 Table 59—Vendor Specific Request fields ............................................................................................................................................. 134
5 Table 60—Vendor Specific Response fields .......................................................................................................................................... 134
6 Table 61—Transfer Setup Request fields ................................................................................................................................................ 135
7 Table 62—EPS field values ....................................................................................................................................................................... 136
8 Table 63—T-Flags subfields...................................................................................................................................................................... 137
9 Table 64—I-Flags subfields....................................................................................................................................................................... 138
10 Table 65—Presentation Time subfields ................................................................................................................................................... 139
11 Table 66—MA USB Global Time (M GT) subfields ............................................................................................................................. 142
12 Table 67—USB system management actions, events, and entities..................................................................................................... 146
13 Table 68—MA USB p rotocol constants .................................................................................................................................................. 170
14 Table 69—MA USB p rotocol variables ................................................................................................................................................... 170
15 Table 70—Reco mmended 802.11ad MA C and PHY features for MA USB products.................................................................... 174
16 Table 71—MA USB p rotocol constants for WiGig............................................................................................................................... 175
17
Page 13
Media Agnostic Universal Serial Bus Specification Release 1.0
1 1 Introduction
2 1.1 Motivation
3 The motivation for the Media Agnostic (MA) Universal Serial Bus (USB) is to provide USB
4 connectivity over medium other than USB, for example, wireless or IP links, while making maximal use
5 of the existing USB infrastructure, present in the form of
6 open application programming interfaces in every major operating system,
7 USB class specifications by USB-IF device working groups,
8 a wealth of open-source/OS specific drivers for USB classes, and
9 vendor-specific device drivers for a multitude of USB vendor-specific devices.
10 For example, it is possible for a peripheral device vendor to reuse a device driver designed for high-
11 speed USB 2.0 in conjunction with an MA USB device implementation that embeds a USB function
12 through a high-speed interface (i.e., without a physical USB connection to the function), and achieve
13 gigabit transfer rates.
Page 14
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Chapter 9 describes the MA USB hub, which is an MA USB device that integrates a USB hub. An MA
2 USB hub performs extra functions to enable enumeration and data transfer for USB devices connected
3 to its integrated hub.
4 All key parameters of the MA USB protocol are defined in Chapter 10. Parameters fundamental to
5 interoperability are defined as constants. All compliant implementations are required to have the same
6 setting for these parameters. Other parameters, labeled as protocol variables, are defined together with a
7 recommended setting. Implementations may choose different values for these parameters depending on
8 the application and design specifics.
Page 15
Media Agnostic Universal Serial Bus Specification Release 1.0
1 2 Normative references
2 The following referenced documents are indispensab le for the application of this standard. For dated
3 references, only the edition cited applies. For undated references, the latest edition of the referenced
4 document (including any amendments or corrigenda) applies.
5 [IEEE 802.11] IEEE Std 802.11™-2012--IEEE Standard for Information Technology--
6 Telecommunications and information exchange between systems--Local and
7 metropolitan area networks--Specific requirements, Part 11: Wireless LAN
8 Medium Access Control (MAC) and Physical Layer (PHY) specifications
9 [USB 2.0] Universal Serial Bus Specification, Revision 2.0
10 [USB 3.1] Universal Serial Bus Specification, Revision 3.1
11 [WMC 1.1] CDC Subclass for Wireless Mobile Communication Devices, Revision 1.1
12 [OTG&EH3] USB On-The-Go and Embedded Host Supplement to the USB 3.0 Specification,
13 Revision 1.1
14
Page 16
Media Agnostic Universal Serial Bus Specification Release 1.0
Page 17
Media Agnostic Universal Serial Bus Specification Release 1.0
1 3.2 Acronyms and abbreviations
2 ACK Acknowledgment
3 BSS Basic Service Set
4 DSAP Destination Service Access Point
5 DWORD Double Word
6 EP Endpoint
7 FS Full-Speed USB
8 GB Gibibyte (1,073,741,824 bytes)
9 HID Human Interface Device
10 HS High-Speed USB
11 HSIC High Speed Inter-Chip
12 IAD Interface Association Descriptor
13 KB Kibibyte (1,024 bytes)
14 LLC Logical Link Control layer
15 LS Low-Speed USB
16 MA USB Media Agnostic Universal Serial Bus
17 MAC Medium Access Control
18 MB Mebibyte (1,048,576 bytes)
19 MGT MA USB Global Time
20 MPDU MAC Protocol Data Unit
21 MSDU MAC Service Data Unit
22 MSS MA USB Service Set
23 MTU Maximum Transmission Unit
24 OS Operating System
25 PAL Protocol Adaptation Layer
26 PBSS Personal Basic Service Set
27 PDU Protocol Data Unit
28 PHY Physical layer
29 SAP Service Access Point
30 SNAP Subnetwork Access Protocol
31 SSAP Source Service Access Point
32 SSID Service Set Identifier
33 TID Traffic Identifier
34 USB Universal Serial Bus
35 USBDI USB Driver Interface (OS-specific)
36 WHCM Wireless Handset Control Module
Page 18
Media Agnostic Universal Serial Bus Specification Release 1.0
1 4 Architectural overview
2 4.1 Architectural elements
3 MA USB protocol functions are asymmetrically split between a host element, responsible for creating
4 the topology and at the center of all data flows, and one or more MA USB devices representing
5 peripheral devices. The collection of an MA USB host and MA USB devices it manages is called an MA
6 USB Service Set (MSS).
USBDI
Page 19
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Device, etc.) can run over the MA USB protocol layer with no change. In particular, all MA USB
2 abstractions are strictly “PAL-to-PAL” and are not exposed to these drivers.
3 When defining the MA USB topology and applications, the term “MA USB host” is also used to refer to
4 the computing platform (e.g., a personal computer) that houses the MA USB host defined in this section,
5 as well as all class drivers and application software provided through the Operating System or USB
6 product vendors.
MA USB device
Existing USB infrastructure
25
26 Figure 2—Building blocks of an MA USB device and relationship to existing USB
27 infrastructure
28 Also shown in Figure 2 is how MA USB device building blocks replace or complement the existing
29 USB infrastructure in a USB peripheral device. Similar to the MA USB host case, existing device-side
30 class drivers can run over the MA USB protocol layer with no change. Also similar to the MA USB host
31 case, all MA USB abstractions are strictly “PAL-to-PAL” and are not exposed to these drivers.
Page 20
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The interface between the USB device logic block and device-side class drivers is application-specific
2 and outside the scope of this specification. The interface between the MA USB device PAL and the USB
3 device logic is platform-specific.
4 An MA USB device manages, with some autonomy, an integrated USB device. The integrated device
5 may be removable or non-removable, and may be connected through wired USB (USB cable, USB chip-
6 to-chip interconnect, etc.) or other technologies, but through the MA USB device, it is presented as a
7 USB device compliant with Revision 2.0 or 3.1 of the USB specification. It can belong to any USB
8 class, including the Hub class. The integrated USB device is said to operate “behind” the MA USB
9 device, and the MA USB device is said to “host” it, although many (but not all) USB host functions are
10 performed inside the MA USB host. In summary, a USB device integrated into an MA USB device (or
11 hosted by the MA USB device) may be logical or physical, and may be removable or non-removable.
12 In an MA USB device other than an MA USB hub, the MA USB protocol capabilities may be profiled
13 according to the function of the integrated USB device. For example, an MA USB HID device may
14 support the MA USB protocol functions pertaining to interrupt transfers and not isochronous or bulk
15 transfers.
16 When defining the MA USB topology and applications, the term “MA USB device” is also used to refer
17 to the computing platform (e.g., portable electronic device) that houses the MA USB device defined in
18 this section, as well as all device-side class drivers and application software required to implement a
19 peripheral device.
Page 21
Media Agnostic Universal Serial Bus Specification Release 1.0
MA USB hub
MA USB hub
16
17 Figure 4—Example MA USB hub hosting multiple USB devices
Page 22
Media Agnostic Universal Serial Bus Specification Release 1.0
1 USB device integrated into an MA USB device (including the physical or virtual hub integrated into an
2 MA USB hub) falls in Tier 2 of the hierarchy. USB devices behind an MA USB hub fall in Tier 3.
3 Figure 5 illustrates an example of an MA USB system and its equivalent USB topology.
MA USB host
Host
Tier 1
Root hub
Virtual root hub ports
(a) Example MA USB Service Set (MSS) (b) Equivalent USB topology for the MSS
4
5 Figure 5—MA USB Service Set and equivalent USB topology
Page 23
Media Agnostic Universal Serial Bus Specification Release 1.0
MA USB
MA USB device PAL received through the received through a
device
management channel data channel
Physical
t2 ≤ aDataChannelDelay
link
t1 t2
t1 ≤ aManagementChannelDelay
1
2 Figure 7—MA USB Management and data channel latencies
Page 24
Media Agnostic Universal Serial Bus Specification Release 1.0
(a) Example of a MA USB dual-role element with (b) Routing of MA USB packets to the
concurrent operation as a MA USB host and a MA correct MA USB device or host PAL
USB device over a common IEEE 802.11 radio instance inside the dual-role element
1
2 Figure 8—Concurrent MA USB device and host operation in an IEEE 802.11 BSS
9 There is no MA USB address assigned to the MA USB host. All MA USB packets are originated by or
10 targeted at the MA USB host, which makes including an MA USB host address field in MA USB
11 packets redundant; instead, a single bit in each MA USB packet indicates whether the packet is
12 originated by or targeted at the MA USB host. See Section 6.2.1.2 for details.
22 4.4.4 Container ID
23 An MA USB device may be able to connect over USB 2.0 or 3.1 as well as MA links. It is also possible
24 that multiple different types of MA links are supported. To ensure that the MA USB device may be
25 detected as the same device regardless of whether it is connected over USB 2.0 or 3.1 link or an MA
Page 25
Media Agnostic Universal Serial Bus Specification Release 1.0
1 link, MA USB devices which support connectivity over USB 2.0 or USB 3.1 in addition to MA links
2 shall support the Container ID descriptor as defined in [USB 3.1]. The same container ID shall be
3 provided by an MA USB device over all USB and MA links supported.
Page 26
Media Agnostic Universal Serial Bus Specification Release 1.0
1 addresses in 802.11 mode, where each full LLC address is the logical concatenation of an EUI-48 MAC
2 address and an LLC Source or Destination Service Access Point (LLC SSAP/DSAP).
Address format: Address format:
SSID:: MA USB PAL MA USB PAL SSID::
MA USB Device Address MA USB Device Address
Address format:
EUI-48 MAC Address
802.11 MAC sublayer MAC sublayer
Page 27
Media Agnostic Universal Serial Bus Specification Release 1.0
1 protocol data unit (MPDU) is retransmitted in a controlled manner based on MAC-level settings such as
2 MSDU lifetime. Reliability settings in the lower layers for MA USB packets are application and
3 implementation-dependent, and can range from no retransmission to practically unlimited number of
4 retransmissions. In addition, MA USB utilizes PAL-level retries to recover from link loss (including
5 MAC and PHY failures), which applies to a portion of or to an entire MA USB transfer, and is repeated
6 for a specified number of times that depends on the transfer mode.
7 4.5.3.1 Requirements for 802.11 mode
8 This specification does not introduce any network requirements for 802.11 mode.
9 4.5.3.2 Requirements for IP mode
10 MA USB operation in IP mode makes use of TCP and UDP transport protocols. Support for TCP
11 protocol is mandatory. For isochronous streams support for UDP protocol is mandatory.
12 4.5.3.3 Media specific protocol constants
13 Table 70 provides the list of MA USB protocol constants, including media dependent constants. The
14 values of the media dependent constants are out of scope of this specification and need to be specified
15 for each specific medium.
22 4.5.5 Packetization
23 4.5.5.1 Packetization in 802.11 mode
24 When operating in 802.11 mode, each MA USB packet is carried as a single 802.11 MAC service data
25 unit (MSDU), i.e., there is no MA USB segmentation and reassembly function defined across MAC
26 service data units. In particular, MA USB packets are limited in size by the maximum MSDU size for
27 the particular 802.11 MAC and PHY that carry those packets.
28 4.5.5.2 Packetization in IP mode
29 When operating in IP mode, all MA USB packets other than isochronous data packets are delivered as
30 byte streams over TCP connections, and therefore are not constrained by the network MTU size.
31 Isochronous data packets are carried in UDP datagrams, and are limited in size by the payload available
32 to each UDP datagram.
33
Page 28
Media Agnostic Universal Serial Bus Specification Release 1.0
32 Unless otherwise specified, if a requesting PAL does not receive a response packet by
33 aManagementRequestTimeout after it has successfully submitted the request packet to the management
34 channel, it shall retransmit the request packet by releasing another copy of the request packet to the
35 management channel, keeping all packet fields the same as those in the original request packet, except
36 the Retry field, which shall be set to1. If necessary, the requesting PAL shall repeat transmitting the
37 request packet for a number of times not exceeding aManagementRetries. If the corresponding response
38 packet is not received after aManagementRetries retries and the request packet is not a PingReq packet
39 (Section 6.3.34), the requesting PAL may start the Ping protocol (Section 5.2.2), and if the Ping protocol
40 is successful, the requesting PAL may attempt to transmit the request packet again up to the same
41 maximum number of times attempted before the Ping protocol. If the Ping protocol fails, or if the
42 requesting PAL decides not to exercise the Ping protocol, the requesting PAL shall transition to the
43 Session Down state (Section 8.1.1.1) and inform the lower layers of the session state transition.
Page 29
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — Number of retries does not include possible local retries before the request packet is successfully released
2 to the management channel. An example of a local retry is resubmitting the request packet to a local transmission
3 queue after observing the queue to be full.
4 MEDIA DEPENDENT NOTE — Section 5.2.4.2 of [IEEE 802.11] lists more possible reasons for local failures in
5 802.11 mode.
6 A responding PAL shall respond to a request packet that has the Retry field set to 1, even if it has
7 responded to an earlier instance of the request packet. The responding PAL is not required to repeat any
8 action in response to the duplicate request packet other than retransmitting the corresponding response
9 packet.
10 Figure 11 illustrates the timings related to exchange of management packets.
MA link interface t2
(e.g., 802.11 MAC and PHY plus 802.2 LLC,
t2 ≤ aManagementResponseTime
or an IP stack plus TCP/UDP transport)
Management channel
MA link
t1 t3
t1 ≤ aManagementChannelDelay t3 ≤ aManagementChannelDelay
MA link interface
host/device
aManagementRequestTimeout
aManagementRequestTimeout >
aManagementResponseTime + 2 × aManagementChannelDelay
11
12 Figure 11—Default timings for management packet exchange
13 5.2.1.2 Data packet exchange
14 MA USB transfers are executed through MA USB packets of type 2 (Data type). All data packets are
15 transmitted over one or more data channels.
16 MA USB transfers generally involve several data packets. The allowable latencies between these
17 packets, and the behavior associated with potential timeouts are more complex than a simple request-
18 response management exchange; transfer timings and associated timeout behaviors are specified in
19 Sections 5.4, 5.5 and 5.10.
20 There are protocol conditions during a non-isochronous MA USB transfer where two data packets can
21 be identified as having a request-response relationship, with the MA USB PAL transmitting the request
22 packet (the requesting PAL) expecting an immediate response packet from the target MA USB PAL (the
23 responding PAL). In the absence of a timely response packet, the requesting PAL needs to take
24 corrective actions such as retransmitting the request packet or initiating the Ping protocol. These
25 protocol conditions, referred to as immediate exchanges, are described in Sections 5.4 and 5.5. The
26 default timings and retransmission behavior for immediate exchanges are described next.
27 NOTE — An example of a data packet pair that may form an immediate exchange is a Transfer Request
28 (TransferReq) and a Transfer Response (TransferResp) packet. Another example is a Transfer Response
29 (TransferResp) and a Transfer Acknowledgment (TransferAck) packet. Not all data packet exchanges are
30 immediate. See sections 5.4 and 5.5 for details.
Page 30
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Unless otherwise specified, a responding PAL in an immediate response exchange shall release the
2 response packet to the assigned data channel within aTransferResponseTime from the moment it
3 receives the corresponding request packet over the assigned data channel.
4 NOTE — MA USB PAL timings do not include management or data channel latencies; the equivalent timings for
5 an MA USB host or device (which in addition to a PAL instance include interfaces to management and data
6 channels) include management or data channel latencies as appropriate. For example, the above PAL timing
7 requirement is equivalent to the response packet appearing over the medium within aTransferResponseTime +
8 aDataChannelDelay from the moment the corresponding request packet is received over the medium, or within
9 aTransferResponseTime + 2×aDataChannelDelay from the moment the corresponding request packet is released to
10 the assigned data channel.
11 Unless otherwise specified, if a requesting PAL in an immediate exchange does not receive a response
12 packet by aTransferTimeout after it has successfully submitted the request packet to the assigned data
13 channel, it shall retransmit the request packet by releasing another copy of the request packet to the
14 assigned data channel, keeping all packet fields the same as those in the original request packet, except
15 the Retry field, which shall be set to 1. If necessary, the requesting PAL shall repeat transmitting the
16 request packet for a number of times not exceeding a protocol constant that depends on the transfer type,
17 specifically, aControlTransferRetries, aBulkTransferRetries and aInterruptTransferRetries for control,
18 bulk and interrupt transfers, respectively. If the corresponding response packet is not received after the
19 maximum number of retries, the requesting PAL shall start the Ping protocol (Section 5.2.2) to verify
20 and possibly re-establish network connectivity with the responding PAL, unless the requesting PAL is
21 an MA USB device PAL, in which case starting the Ping protocol is optional. If the Ping protocol is
22 successful the requesting PAL may still decide to fail the transfer and report the appropriate USBDI
23 error indicating the transfer failure to the application, or it may attempt to transmit the request packet
24 again up to the same maximum number of times attempted before the Ping protocol. If the Ping protocol
25 fails, the requesting PAL shall report the appropriate USBDI error indicating the transfer failure to the
26 application, move to Session Down state (Section 8.1.1.1), and inform the lower layers of the transition
27 of the session to the Session Down state.
28 NOTE — In certain cases data packets may carry updated field values when retried; the Retry field is set to 0 in
29 these packets. See Sections 5.4 and 5.5 for details.
30 NOTE — Number of retries does not include possible local retries before the request packet is successfully released
31 to a data channel. An example of a local retry is resubmitting the request packet to a local transmission queue after
32 observing the queue to be full.
33 NOTE — A requesting MA USB device PAL may choose not to exercise the Ping protocol and wait indefinitely for
34 a packet from the MA USB host PAL, or follow another implementation-dependent behavior.
35 NOTE — It is possible that a responding PAL in a transient or corrupted state fails to respond to a request data
36 packet but responds to a PingReq packet; a requesting PAL may or may not tie the status of an individual transfer to
37 the Ping protocol outcome.
38 NOTE — MA USB host and device PAL implementations should report transfer failures to the application in a
39 timely manner.
40 A responding PAL shall respond to a request packet that has the Retry field set to 1, even if it has
41 responded to an earlier instance of the request packet. The responding PAL is not required to repeat any
42 action in response to the duplicate request packet other than retransmitting the corresponding response
43 packet.
44 Figure 12 illustrates the immediate exchange default timings.
Page 31
Media Agnostic Universal Serial Bus Specification Release 1.0
device/host
MA USB responding PAL
received through the released to the assigned
MA USB
(device or host PAL)
assigned data channel data channel
MA link interface t2
(e.g., 802.11 MAC and PHY plus 802.2 LLC,
t2 ≤ aTransferResponseTime
or an IP stack plus TCP/UDP transport)
Data channel
MA link
t1 t3
t1 ≤ aDataChannelDelay t3 ≤ aDataChannelDelay
MA link interface
host/device
Request data packet The latest time response data Request data packet
MA USB requesting PAL
released to the assigned packet may arrive through the retried if response data
(host or device PAL)
data channel assigned data channel packet is not received
aTransferTimeout
aTransferTimeout >
aTransferResponseTime + 2 × aDataChannelDelay
1
2 Figure 12—Default timings for data packet immediate exchange
3 In addition to immediate exchange, there are protocol conditions during a non-isochronous MA USB
4 transfer where a transmitting PAL is expected to transmit data packets faster than a minimum rate, or the
5 receiving PAL may take inquiring actions to verify the transfer is still alive. These protocol conditions
6 are described in Sections 5.4 and 5.5.
7 Unless otherwise specified, a transmitting PAL that is expected to keep a transfer alive shall release
8 successive data packets to the assigned data channel no more than aTransferRepeatTime apart.
9 Unless otherwise specified, a receiving PAL that expects a transfer to be kept alive shall start an
10 inquiring action such as releasing another transfer request packet to the assigned data channel if it does
11 not receive a new data packet by aTransferKeepAlive after it receives the last data packet over the
12 assigned data channel.
13 NOTE — The default timeout period of aTransferKeepAlive can dynamically increase to a multiple of
14 aTransferKeepAlive during an IN transfer. See Section 5.4 for details.
15 Figure 13 illustrates the default timings to keep an MA USB transfer alive.
MA link interface t2
(e.g., 802.11 MAC and PHY plus 802.2 LLC,
t2 ≤ aTransferRepeatTime
or an IP stack plus TCP/UDP transport)
Data channel
MA link
t1 t3
t1 ≤ aDataChannelDelay t3 ≤ aDataChannelDelay
MA link interface
host/device
The earliest time response data The latest time follow-on response Inquiring action taken
MA USB requesting PAL
packet may arrive through the data packet may arrive through the to verify that the
(host or device PAL)
assigned data channel assigned data channel transfer is alive
aTransferKeepAlive
aTransferKeepAlive >
aTransferRepeatTime + aDataChannelDelay
16
17 Figure 13—Default timings to keep an MA USB transfer alive
Page 32
Media Agnostic Universal Serial Bus Specification Release 1.0
1 5.2.2 Ping protocol
2 The Ping protocol enables an MA USB host or MA USB device to verify and possibly re-establish
3 connectivity with a target MA USB device or the MA USB host. The protocol involves exchange of two
4 management packets: A Ping Request (PingReq) packet (Section 6.3.34) and a Ping Response
5 (PingResp) packet (Section 6.3.35). Receiving a PingResp packet from a target MA USB device enables
6 the address resolution function of an MA USB host PAL to associate the MA USB device address of the
7 target MA USB device with a local and remote network address pair through which the target MA USB
8 device can be reached. Similarly, receiving a PingResp packet from the MA USB host enables the
9 address resolution function of an MA USB device PAL to identify the local and a remote network
10 address through which the MA USB host can be reached.
11 NOTE — The Ping protocol can be used to re-discover a peer MA USB PAL over a different network interface
12 without using a network-level discovery protocol. For example, an MA USB host PAL can transmit a PingReq
13 packet over different network interfaces (e.g., over different 802.11 radios in 802.11 mode operation) to target the
14 same MA USB device. Receiving a PingResp packet over any of the network interfaces enables the MA USB host
15 PAL to associate the target MA USB device address with a local network interface and a remote network address
16 through which the target MA USB device can be reached .
17 A PingReq packet transmitted by the MA USB host can target all MA USB devices in its Service Set by
18 setting the Device Address field (Section 6.2.1.6) in the PingReq packet to the broadcast address of
19 0xFF. Any MA USB device that receives a PingReq packet with the Device Address field set to its
20 device address or broadcast address and the SSID field matching the MA USB device Service Set shall
21 respond with a PingResp packet with the Device Address field set to the MA USB address of that
22 device. A PingReq packet transmitted by the MA USB device shall carry the device MA USB address in
23 the Device Address field. An MA USB host receiving a PingReq packet with the SSID field matching its
24 Service Set shall respond with a PingResp packet with the Device Address field set to the same value as
25 the Device Address field in the PingReq packet. An MA USB device shall not transmit a PingReq
26 packet with the Device Address field set to broadcast address.
27 NOTE — Broadcast management packets may be transmitted using network-level multicast or broadcast, which
28 may make them less reliable than unicast packets.
29 The Ping protocol packet exchange follows the same timings as other management packet exchanges
30 (Section 5.2.1.1); in particular, if a PingResp packet is not received within
31 aManagementRequestTimeout after releasing the last PingReq packet retry to the management channel,
32 the MA USB PAL transmitting the PingReq packet shall transition to the Session Down state (Section
33 8.1.1.1) and inform the lower layers of the session state transition.
34 A trigger for start of the Ping protocol shall result in a PingReq packet only if there is not another
35 PingReq packet pending a response.
Page 33
Media Agnostic Universal Serial Bus Specification Release 1.0
1 placed in the receive buffer designated by the MA USB host PAL. An MA USB OUT transfer is not
2 complete until all transmitted USB payload is successfully delivered to the target USB endpoint. In
3 particular, successful delivery of MA USB packets over the network is not sufficient to declare an MA
4 USB transfer complete.
5 The starting point for MA USB transfers is a read or write request made through the USBDI interface at
6 the MA USB host. MA USB host services each read or write request through one or more MA USB
7 transfers. The number and size of each MA USB transfer is implementation-specific, and generally
8 depends on the buffer space available to the MA USB host, the buffer space available to the target MA
9 USB device, or both. Each MA USB transfer is identified by a Transfer Request ID or Request ID for
10 short. All MA USB packets belonging to the same MA USB transfer carry the same Request ID.
11 Concurrent MA USB transfers targeting different endpoints may use the same Request ID.
Page 34
Media Agnostic Universal Serial Bus Specification Release 1.0
MA USB transfers
IN OUT IN OUT
Protocol- Link-
1 managed managed
3 5.4 IN transfers
4 An MA USB IN data flow is a unidirectional stream of bytes delivered from a target USB IN endpoint
5 or a stream buffer within an Enhanced SuperSpeed bulk IN endpoint that supports the Enhanced
6 SuperSpeed Stream Protocol [USB 3.1] to the MA USB host.
7 NOTE — Throughout this specification the term “endpoint flow” refers to the unidirectional byte stream targeting
8 an endpoint, and the term “stream flow" refers to the unidirectional byte stream targeting a stream within an
9 Enhanced SuperSpeed bulk endpoint that supports the Enhanced SuperSpeed Stream Protocol.
10 The MA USB IN data flow is illustrated in Figure 15. The MA USB host PAL initiates an MA USB IN
11 transfer by transmitting a TransferReq packet (Section 6.5.2) to a target MA USB device. The MA USB
12 host PAL assigns a Request ID to each transfer request and associated TransferReq packet. Request ID
13 is reset to 0 at session initialization or upon any configuration event that returns the state of the endpoint
14 or stream flow to the initial state, and is incremented by 1 for each new transfer request, with
15 wraparound to 0 after reaching the maximum value of aMaxRequestID.
16 Each TransferReq packet includes a Remaining Size field that carries the number of remaining bytes the
17 MA USB host PAL expects to receive to complete the transfer.
18 Each TransferReq packet also includes a Sequence Number field that carries the sequence number value
19 the MA USB host is expecting to receive next. The sequence number is set to 0 upon any configuration
20 event that returns the state of the target endpoint or stream flow to the initial state.
21 NOTE — Configuration events that return the state of an endpoint or stream flow to the initial state are triggered in
22 response to various events at the MA USB host or device, and are normally communicated through appropriate
23 management packets. As a result, the time an endpoint or stream flow makes the transition to its initial state depends
24 on whether the event is viewed from the MA USB host or from the target MA USB device perspective. For
25 example, the MA USB host is assumed to have initialized a target endpoint flow when it transmits an
26 EPHandleDeleteReq or USBDevDisconnectReq packet that targets the endpoint; the target MA USB device on the
27 other hand, can be assumed to have initialized the endpoint flow when it transmits a corresponding response packet
28 to the MA USB host with a status code that indicates the endpoint state was reset (e.g. status code of SUCCESS).
29
Page 35
Media Agnostic Universal Serial Bus Specification Release 1.0
USBDI MA Link Interface MA Link Interface USB Logic EP
endpoint or stream
MA USB host PAL MA USB device PAL
Target USB
Read request
Read size 30 KB MA USB IN transfer
Request ID 0
Transfer size 30 KB
TransferReq(Request ID 0, Sequence No. 0,
Remaining Size 30 KB) TransferResp(Request ID 0, Sequence No. 0,
First TransferResp packet expected within Remaining Size 24 KB, Status Code
All TransferResp NO_ERROR, EOT 0, ARQ 0)
packets with Status aTransferTimeout after releasing the
TransferReq packet to the assigned data channel TransferResp(Request ID 0, Sequence No. 1,
Code set to
Remaining Size 18 KB, Status Code
NO_ERROR are TransferAck(Request ID 0, Sequence No. 1, NO_ERROR, EOT 0, ARQ 1)
carrying 6 KB of Status Code NO_ERROR)
USB payload TransferResp(Request ID 0, Sequence No. 2,
Remaining Size 12 KB, Status Code
NO_ERROR, EOT 0, ARQ 0)
Read request
MA USB IN transfer TransferResp(Request ID 0, Sequence No. 3,
Read size 36 KB
Request ID 1 Remaining Size 6 KB, Status Code
Transfer size 36 KB NO_ERROR. EOT 0, ARQ 0)
TransferReq(Request ID 1, Sequence No. 4,
Remaining Size 36 KB)
TransferResp(Request ID 0, Sequence No. 4,
Data transfer complete with no error Remaining Size 0 KB, Status Code
Read response NO_ERROR, EOT 1, ARQ 0/1)
Status OK TransferAck(Request ID 0, Sequence No. 4,
Status Code NO_ERROR)
Acknowledged data is removed from the
A TransferReq packet with the Sequence target MA USB device buffer
Number field set to 5 or higher may also serve as
the above TransferAck packet TransferResp(Request ID 1, Sequence No. 5,
Remaining Size 30 KB, Status Code
No TransferResp packet received within
NO_ERROR, EOT 0, ARQ 0)
aTransferKeepAlive after the last TransferResp
packet; another TransferReq packet is issued No data received from the target USB
with possibly updated Sequence Number field endpoint or stream; no TransferResp
transmitted in this example
TransferReq(Request ID 1, Sequence No. 6,
Remaining Size 30 KB, Retry 0) TransferResp(Request ID 1, Sequence No.
<reserved>, Remaining Size 30 KB, Status
Code TRANSFER_PENDING, EOT 0, ARQ 0)
TransferResp packet expected within MA USB device may ask for
aTransferTimeout after TransferReq acknowledgement by setting the ARQ
transmission; receiving Status Code of field to 1
TRANSFER_PENDING results in the
TransferReq retransmission not to be triggered.
Data received from the target USB
endpoint or stream; transfer resumes
TransferResp(Request ID 1, Sequence No. 6,
Remaining Size 24 KB, Status Code
TransferAck(Request ID 1, Sequence No. 6, NO_ERROR, EOT 0, ARQ 1) STALL
Status Code NO_ERROR)
TransferResp(Request ID 1, Sequence No. 7,
Data transfer complete with STALL error Remaining Size 20 KB, Status Code
Read response TRANSFER_EP_STALL, EOT 1, ARQ 0/1)
Status STALL TransferAck(Request ID 1, Sequence No. 7,
Status Code TRANSFER_EP_STALL)
1
2 Figure 15—MA USB IN transfer
3 In response to a TransferReq packet, the target MA USB device shall transmit one or more TransferResp
4 packets (Section 6.5.3) to the MA USB host to transfer the USB payload from the target USB endpoint
5 or stream in the strict order it was received from the target endpoint or stream. Each TransferResp
6 packet carries the same EP Handle, Stream ID, and Request ID as in the TransferReq packet that
7 initiated the transfer. To enable the MA USB host to identify missing data packets, each TransferResp
8 packet carries a Sequence Number field, which is set to 0 at session initialization or upon any
9 configuration event that returns the state of the endpoint or stream flow to the initial state. The Sequence
10 Number value is incremented by 1 after each new (i.e., not retried) TransferResp packet, with
11 wraparound to 0 after reaching the maximum value of aMaxSequenceNumber. The Sequence Number
12 values keep increasing across successive transfers.
Page 36
Media Agnostic Universal Serial Bus Specification Release 1.0
1 To avoid ambiguity in tracking the TransferResp packets pending completion, the MA USB device shall
2 have no more than (aMaxSequenceNumber +1)/2 (half the size of the Sequence Number space)
3 outstanding TransferResp packets.
4 In the absence of an active IN transfer, and if the target endpoint or stream has USB data to transmit, a
5 TransferReq packet and the first corresponding TransferResp packet form an immediate exchange with
6 timings and behavior defined in Section 5.2.1.2, except that a retried TransferReq packet may carry an
7 updated Sequence Number value, in which case it is transmitted with the Retry field set to 0. While an
8 MA USB IN transfer on a target endpoint or stream is in progress, the MA USB host may transmit
9 additional TransferReq packets to target the same endpoint or steam, with the value of the Request ID
10 field incremented by 1 for each new transfer request. The target MA USB device queues the received
11 TransferReq packets in a request buffer in the increasing order of Request ID values for subsequent
12 processing. Upon completion of an IN transfer, the target MA USB device shall immediately process the
13 next TransferReq packet in its request buffer if it is not empty, resulting in an immediate exchange with
14 timings and behavior defined in Section 5.2.1.2, except that a retried TransferReq packet may carry an
15 updated Sequence Number value and is transmitted with the Retry bit set to 0.
16 NOTE — A retried TransferReq packet for an active transfer may not change th e size of the transfer.
17 NOTE — The target MA USB device may transmit a null TransferResp packet (a TransferResp packet with no
18 payload) with the Status Code field set to TRANSFER_PENDING in response to a TransferReq packet if the target
19 endpoint or stream has no USB payload to transmit, i.e., the MA USB device does not have to wait for the MA USB
20 host retrying a TransferReq packet before it can communicate the target endpoint or stream pending status.
21 The MA USB host shall not retry a TransferReq packet unless all previous transfer requests have been
22 completed, and the MA USB host has not received a corresponding TransferResp packet for more than
23 aTransferTimeout since the last time the MA USB host acknowledged the last TransferResp packet
24 belonging to the immediately preceding MA USB transfer.
25 To avoid ambiguity in tracking the outstanding TransferReq packets, the MA USB host shall have no
26 more than (aMaxRequestID +1)/2 (half the size of the Request ID space) outstanding TransferReq
27 packets for each target IN endpoint or stream. Also, the total number of outstanding transfers across all
28 IN and OUT endpoints and streams shall not exceed the number returned by the target MA USB device
29 in the Number of Outstanding Requests field in the CapResp packet (Section 6.3.3).
30 NOTE — MA USB devices with multiple endpoints or streams are recommended to use a shared buffer to store the
31 state information for all outstanding transfers, as the number of outstanding transfer on each target endpoint or
32 stream is decided by the MA USB host.
33 A TransferReq packet queued by the target MA USB device is not acknowledged unless it is invalid
34 (e.g., a gap is detected in the packet Request ID field), in which case the target MA USB device PAL
35 shall discard the invalid TransferReq packet, and shall return a null TransferResp packet, i.e., a
36 TransferResp packet with no payload, within aTransferResponseTime from the moment it received the
37 invalid TransferReq packet, with the TransferResp packet Request ID field set to the next Request ID
38 value the MA USB device is expecting, and the Status Code field set to MISSING_REQUEST_ID if the
39 received TransferReq packet is valid but shows a gap in its Request ID field, or INVALID_REQUEST
40 if the received TransferReq packet is invalid independent of the value of its Request ID field. In
41 response to a TransferResp packet with the Status Code field set to MISSING_REQUEST_ID or
42 INVALID_REQUEST, the MA USB host shall invalidate all outstanding TransferReq packets with
43 request ID fields set to values larger than indicated in the TransferResp packet and start transmitting new
44 TransferReq packets starting with the Request ID value in the TransferResp packet.
45 NOTE — These new TransferReq packets may carry updated information such as new values for the Remaining
46 Size and Sequence Number fields, and are not considered retransmissions.
Page 37
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — The target MA USB device may use the Sequence Number field in an incoming TransferReq packet to
2 update its internal state, even if there is a gap in the packet Request ID field.
3 NOTE — It is possible that a target MA USB device silently drops a valid incoming TransferReq packet if it cannot
4 admit the packet into its request buffer; this scenario is no different from the pa cket being lost over the medium, and
5 is recovered though a detected gap in subsequent TransferReq packets, or through an MA USB host timeout.
6 The target MA USB device fulfills an IN transfer request by transmitting one or more TransferResp
7 packets. The interval between the release times of two successive TransferResp packets belonging to the
8 same IN transfer to the assigned data channel shall not exceed aTransferRepeatTime, unless no data is
9 available from the target USB endpoint or stream, in which case the target MA USB device may indicate
10 a pending status and enter longer periods of inactivity as described later in this section.
11 NOTE — The above timing means that the interval between two successive TransferResp packets corresponding to
12 the same IN transfer appearing over the medium is not to exceed aTransferResponseTime + aDataChannelDelay as
13 long as there is USB payload to transmit.
14 For an active IN transfer involving multiple TransferResp packets, if the MA USB host PAL expects a
15 TransferResp packet and does not receive the packet within aTransferKeepAlive from the moment it
16 received the last TransferResp packet through the assigned data channel, it shall transmit a TransferReq
17 packet to the target MA USB device with the Request ID field set to the value identifying the IN
18 transfer, the Sequence Number field set to the value the MA USB host is expecting next, and the
19 Remaining Size field set to the remaining number of bytes expected to complete the transfer. This
20 TransferReq packet starts an immediate exchange with timings and behavior defined in Section 5.2.1.2,
21 except that a retried TransferReq packet may carry an updated Sequence Number value and is
22 transmitted with the Retry bit set to 0.
23 NOTE — A retried TransferReq packet for an active transfer may not change the size of the transfer.
24 An MA USB device that is experiencing delay in receiving data from a target USB endpoint or stream
25 shall indicate a pending status and transition to a longer timeout by transmitting a null TransferResp
26 packet, i.e., a TransferResp packet with no payload, with the Status Code field set to
27 TRANSFER_PENDING and optionally the ARQ field set to 1; the Sequence Number and Remaining
28 Size fields in the null TransferResp packet are set to aInvalidSequenceNumber and reserved,
29 respectively. If the ARQ field in the null TransferResp packet is set to 1, the packet starts an immediate
30 exchange with the MA USB host that requires the host to acknowledge the null TransferResp packet
31 through a TransferAck packet with the same Request ID and Status Code field values as those in the null
32 TransferResp packet; the timings and behavior for the immediate exchange are defined in Section
33 5.2.1.2. The first TransferResp packet with payload that follows a null TransferResp packet with Status
34 Code field set to TRANSFER_PENDING shall have the ARQ field set to 1, resulting in an immediate
35 exchange with the MA USB host, with timings and behavior defined in Section 5.2.1.2.
36 NOTE — The null TransferResp packet indicating a pending status can be transmitted as part of the flow of
37 TransferResp packets transmitted to the MA USB host (unsolicited), or in response to a TransferReq packet
38 (solicited).
39 NOTE — A TransferResp packet with payload (i.e., valid Sequence Number field value) and the Status Code field
40 set to NO_ERROR can be acknowledged by a TransferAck packet with the same Request ID value, the same
41 Sequence Number value, and the same Status Code value (NO_ERROR), or alternatively, by a TransferReq packet
42 (including a new outstanding transfer request) with the same or larger Request ID value, larger Sequence Number
43 value, and the same Status Code value (NO_ERROR). A TransferResp packet with the Status Code field set to any
44 value other than NO_ERROR (e.g., a null TransferResp packet with the Status Code field set to
45 TRANSFER_PENDING and the Sequence Number field set to aInvalidSequenceNumber) can be acknowledged
46 only by a TransferAck packet with the same Request ID value, the same Sequence Number value (unless the value
47 of the field in the TransferResp packet is set to aInvalidSequenceNumber, in which case the value of the Sequence
48 Number field in the TransferAck packet is also set to aInvalidSequenceNumber), and the same Status Code value.
49 Also see the rules for removing IN transfer data from the MA USB device buffer later in this section.
Page 38
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Once the MA USB host PAL receives a TransferResp packet with the Status Code field set to
2 TRANSFER_PENDING, it shall reset the TransferReq retry logic, and set the transfer timeout period to
3 K × aTransferKeepAlive, where K ≥ 0 is a per-transfer variable with the default value of
4 aDefaultKeepAliveDuration that the MA USB host establishes by responding to an EPSetKeepAliveReq
5 packet (Section 6.3.52) transmitted by the target MA USB device. The MA USB host PAL shall
6 maintain the extended timeout period as long as the target endpoint or stream is in pending state, and
7 shall change it to aTransferKeepAlive after receiving the first TransferResp packet with the Status Code
8 field set to a value other than TRANSFER_PENDING.
9 NOTE — The special value of K = 0 is reserved for infinite transfer timeout, meaning that the MA USB host PAL
10 will not have to poll the endpoint once it receives a null TransferResp packet with the Status Code field set to
11 TRANSFER_PENDING.
12 NOTE — The TransferReq packet that the MA USB host PAL transmits after not receiving a TransferResp packet
13 for the target endpoint or stream in pending state for K × aTransferKeepAlive starts an immediate exchange with
14 timings and behavior defined in Section 5.2.1.2. In particular, once the MA USB host transmits a TransferReq
15 packet, the period between successive retries of the packet in case the MA USB host PAL does not receive a
16 response packet stays at aTransferKeepAlive. Receiving a new TransferResp packet that repeats the
17 TRANSFER_PENDING Status Code value resets the transfer timeout period to K × aTransferKeepAlive.
18 NOTE — The target MA USB device may request a new value for the multiplicative factor K, with the intention of
19 establishing the factor for the target endpoint, specifically, for all IN transfers targeting the endpoint or streams
20 within the endpoint; however, the MA USB transfer to which a new value of K applies is decided by the MA USB
21 host PAL and can be an arbitrary transfer in the future, which makes K (and the transfer timeout period) transfer-
22 dependent.
23 NOTE — Following communicating the pending status of the target endpoint or stream to the MA USB host, the
24 MA USB device does not have to wait for the MA USB host to retry a TransferReq packet before it can transmit a
25 TransferResp packet carrying payload.
26 NOTE — The pending status of one or more endpoints, does not prevent the MA USB host from communicating with other
27 endpoints on the MA USB device. The target MA USB device shall mark the last TransferResp packet
28 belonging to an IN transfer by setting the EoT field to 1, which results in an immediate exchange that
29 requires the MA USB host to acknowledge the packet through a TransferAck packet, or optionally,
30 through an outstanding TransferReq packet if the TransferResp packet has the Status Code field set to
31 NO_ERROR. If acknowledging by a TransferAck packet, the TransferAck packet shall have the same
32 values for the Request ID, Sequence Number and Status Code fields as the corresponding values in the
33 TransferResp packet. If the total data delivered to the MA USB host is less than the amount indicated in
34 the Remaining Size field of the TransferReq packet, then the TransferResp packet carrying EOT field set
35 to 1 shall have the Status Code field set to TRANSFER_SHORT_TRANSFER.
36 NOTE — The target MA USB device may also set the ARQ field to 1 when it sets the EoT field to 1; a
37 TransferResp packet with the EoT field or the ARQ field set to 1 results in an immediate exchange with the MA
38 USB host with timings and behavior defined in Section 5.2.1.2, except that the target MA USB device is generally
39 not required to retry the TransferResp packet if it does not receive an acknowledgement. An exception is the first
40 TransferResp packet with payload transmitted after the target endpoint or stream has no longer a pending status,
41 which has to be retried if needed.
42 A null TransferResp packet with the Status Code field set to TRANSFER_PENDING shall not have the
43 EoT field set to 1.
44 If the target endpoint returns a STALL handshake during a transfer, the target MA USB device shall
45 proceed to deliver the entire payload it has received from the target endpoint or stream to the MA USB
46 host before concluding the transfer in error. Specifically, the target MA USB device shall set the Status
47 Code field to NO_ERROR in all TransferResp packets it transmits as part of the transfer, except the last
48 TransferResp packet, which shall have the Status Code field set to TRANSFER_EP_STALL, the EoT
49 field set to 1, and optionally the ARQ field set to1. The last TransferResp packet initiates an immediate
Page 39
Media Agnostic Universal Serial Bus Specification Release 1.0
1 exchange with the MA USB host, requiring the host to acknowledge the TransferResp packet through a
2 TransferAck packet, with timings and behavior defined in Section 5.2.1.2. The TransferAck packet shall
3 have the same values for the Request ID, Sequence Number and Status Code fields as the corresponding
4 values in the TransferResp packet. The target MA USB device shall queue any new transfer request that
5 targets a stalled endpoint or stream for possible later processing.
6 NOTE — The last TransferResp packet belonging to an IN transfer that experiences a STALL condition has a
7 nonzero Remaining Size field, although the EoT field in the packet is set t o1.
8 The MA USB host PAL may stop tracking the state of an IN transfer and release the associated
9 resources once it has acknowledged the last TransferResp packet belonging to the transfer, and the MA
10 USB host PAL does not receive a TransferResp packet for aMaxTransferLifetime since it last released
11 the acknowledgement packet to the last TransferResp packet to the assigned data channel.
12 NOTE — This condition is defined to ensure the target MA USB device has received the acknowledgement packet.
13 In response to a TransferResp packet with gap in the Sequence Number field, the MA USB host PAL
14 shall release to the assigned data channel a TransferReq packet with the Request ID field identifying the
15 transfer request the earliest missing Sequence Number value belongs to, the Sequence Number field set
16 to the earliest missing Sequence Number value, the Remaining Size field set to the remaining size of the
17 transfer identified by the Request ID field value, and the Status Code field set to NO_ERROR, within
18 aTransferResponseTime from the moment the MA USB host PAL receives the TransferResp packet.
19 NOTE — The target MA USB device may transmit multiple TransferResp packets belonging to successive IN
20 transfers, without waiting for the last TransferResp packet of each transfer to be acknowledged. A TransferReq
21 packet with the Sequence Number field set to N also acknowledges TransferResp packets with Sequence Number
22 values smaller than N, up to the first TransferResp packet with a nonzero Status Code value.
23 A target MA USB device shall not remove any transfer data associated with an MA USB IN transfer from
24 its buffer unless it receives one of the following packets,
25 A TransferAck packet acknowledging all TransferResp packets with Sequence Number values less
26 than or equal to the value of the Sequence Number field in the packet in which case all
27 acknowledged data is removed from the MA USB device buffer.
28 A TransferReq packet (including new outstanding transfer requests) acknowledge all TransferResp
29 packets with Sequence Number values less than the value of the Sequence Number field in the
30 packet, in which case all acknowledged data is removed from the MA USB device buffer.
31 A DevResetReq packet (Section 6.3.18) or DevDisconnectReq packet (Section 6.3.36), in which
32 case all data for all endpoints and streams is removed from the MA USB device buffer.
33 A ClearTransfersReq packet (Section 6.3.14), in which case all data related to corresponding
34 endpoint(s) is removed from the MA USB device buffer.
35 A USBDevDisconnectReq packet (Section 6.3.26) for the target USB device, in which case all
36 data related to the target USB device is removed from the MA USB device buffer.
37 A CancelTransferReq packet (Section 6.3.42), in which case all data related to the target request
38 is removed from the MA USB device buffer.
39 A target MA USB device that receives a CancelTransferReq packet (Section 6.3.42) should remove
40 from its buffer all the data corresponding to the transfer identified by the CancelTransferReq packet,
41 except for the data that is already received from the target endpoint or stream (and hence allocated a
42 sequence number) and has not been acknowledged by the host. The specific behavior of the MA USB
43 device and the MA USB host depends on the state of the transfer at the time that the CancelTransferReq
44 is processed by the MA USB device:
Page 40
Media Agnostic Universal Serial Bus Specification Release 1.0
1 If the transfer was cancelled before any data was moved from the USB device (i.e., the
2 Cancellation Status field in CancelTransferResp packet set to 1): The MA USB devices shall
3 respond to a TransferReq packet for the cancelled transfer with a TransferResp packet with EOT
4 set to 1, Status Code field set to TRANSFER_CANCELLED, the Remaining Size field set to 0,
5 and ARQ field set to 1. Additionally the MA USB device shall keep the state of the transfer until
6 it receives the TransferAck packet from the MA USB host. The MA USB host shall transmit the
7 TransferAck packet only after it has received all the TransferResp packets as well as the
8 CancelTransferResp packet related to the cancelled transfer.
9 If the transfer was cancelled after some data was moved from the USB device (i.e., the
10 Cancellation Status field in CancelTransferResp packet set to 2): The MA USB device shall
11 transmit all the data received from the USB device to the MA USB host in TransferResp packets.
12 The last TransferResp packet of the transfer shall carry EOT field set to 1 with the Status Code
13 field set to TRANSFER_CANCELLED. The TransferResp packets other than the last in the
14 transfer may carry Status Code field set to TRANSFER_CANCELLED or SUCCESS.
15 Additionally the MA USB device shall keep the state of the transfer until it receives the
16 TransferAck packet from the MA USB host. The MA USB host shall transmit the TransferAck
17 packet only after it has received all the TransferResp packets as well as the CancelTransferResp
18 packet related to the cancelled transfer.
19 If the transfer was completed (i.e., the Cancellation Status field in CancelTransferResp packet set
20 to 3): The MA USB device shall transmit all the data received from the USB device to the MA
21 USB host in TransferResp packets, with the Status Code field set to the appropriate values (the
22 same values carried if the transfer was not cancelled). The last TransferResp packet of the
23 transfer shall carry EOT field set to 1. The MA USB device shall keep the state of the transfer
24 until it receives the TransferAck packet from the MA USB host. The MA USB host shall
25 transmit the TransferAck packet only after it has received all the TransferResp packets as well as
26 the CancelTransferResp packet related to the cancelled transfer.
27 If the transfer was not yet received (i.e., the Cancellation Status field in CancelTransferResp
28 packet set to 4): The MA USB device is not required to keep cancel information for a transfer it
29 has not yet received. If a TransferReq packet is received at the MA USB device, the MA USB
30 device shall respond to it with no required knowledge of whether the transfer was previously
31 cancelled. The MA USB host, following the receipt of the TransferResp packet, may either
32 retransmit the CancelTransferReq or wait for the completion of the transfer.
33 If the transfer with RequestID was serviced as part of ClearTransfersReq processing without any
34 data being moved from the USB Device (i.e., the Cancellation Status field in
35 CancelTransferResp packet set to 5): The MA USB device is not required to keep the cancel
36 information for a transfer it already cleared, It shall generate CancelTransferResp without
37 generating TransferResp. This status indicates that the MA-USB device doesn’t expect
38 TransferAck from MA USB host. The MA USB host, following receipt of the
39 CancelTransferResp packet, shall not wait for TransferResp packets for this transfer.
40 A target MA USB device that receives a ClearTransfersReq packet (Section 6.3.14) should remove from
41 its buffer all the data corresponding to the transfers identified by the ClearTransfersReq packet (i.e., all
42 the data related to all the transfers with Request ID values preceding the value of Start Request ID field
43 in the ClearTransfersReq packet), except for the data that is already received from the target endpoint
44 (and hence allocated a sequence number) and has not been acknowledged by the host. The MA USB
45 device shall deliver all the data received from the target endpoint to the MA USB host through
46 TransferResp packets; if the transfer is cancelled before its completion (i.e., not all data related to the
Page 41
Media Agnostic Universal Serial Bus Specification Release 1.0
1 transfer is received from the target endpoint), the last TransferResp packet carrying data related to the
2 transfer shall carry EOT field set to 1 with the Status Code field set to TRANSFER_CANCELLED. The
3 TransferResp packets related to transfers that are completed without cancellation shall not set the Status
4 Code field to TRANSFER_CANCELLED.
5 In addition, the MA USB device shall discard any TransferReq packet received for a cancelled transfer
6 (TransferReq packets carrying a Request ID value less than the value indicated in the Start Request ID
7 field in the ClearTransfersReq packet). The MA USB device shall respond to a ClearTransfersReq
8 packet with a ClearTransfersResp packet, only after all the TransferResp packets for the data already
9 received from cancelled transfers are generated. The MA USB host shall reset the Sequence Number
10 value to 0 before transmitting a TransferReq packet with Request ID value indicated in the Start Request
11 ID field in the ClearTransfersReq packet.
Page 42
Media Agnostic Universal Serial Bus Specification Release 1.0
1 to 0 at session initialization or upon any configuration event that returns the state of the endpoint
2 or stream flow to the initial state, and incremented by 1 when the entire payload belonging to a
3 transfer has been received (not necessarily acknowledged), with wraparound to 0 after reaching
4 the maximum value of aMaxRequestID.
5 EarliestRequestIDR (8 bits, unsigned): The Request ID value of the earliest transfer request
6 whose state needs to be tracked; initialized to 0 at session initialization or upon any configuration
7 event that returns the state of the endpoint or stream flow to the initial state, and incremented by
8 1 when it is determined that the acknowledgement for the entire payload belonging to the
9 transfer has been received by the target MA USB device PAL, with wraparound to 0 after
10 reaching the maximum value of aMaxRequestID.
11 SeqNumberR (24 bits, unsigned): Expected value of the Sequence Number field of the next
12 original TransferResp packet to be received; initialized to 0 at session initialization or upon any
13 configuration event that returns the state of the endpoint or stream flow to the initial state, and
14 incremented by 1 when an original TransferResp packet is received and admitted to the receive
15 buffer, with wraparound to 0 after reaching the maximum value of aMaxSequenceNumber.
16 KeepAliveTimerR (signed): A decrementing counter to track the elapsed time between successive
17 TransferResp packets belonging to the active transfer; set to aTransferKeepAlive each time the
18 MA USB host moves to processing a new transfer, and reset to aTransferKeepAlive or a transfer-
19 dependent multiple of aTransferKeepAlive each time a TransferResp packet is received, with the
20 reset value depending on the transfer state and the Status Code value received in the
21 TransferResp packet; decremented by aTransferTimerTick at every transfer timer tick event.
22 TransferReqRetryCounterR (unsigned): A decrementing counter to track the number of retries for
23 a TransferReq packet that requires an immediate exchange (Section 5.2.1.2); set to
24 TransferReqRetriesR when a new round of retries is to be attempted, and decremented by 1 after
25 each retry.
26 TransferReqRetriesR (unsigned): The reload value of the TransferReqRetryCounterR counter, set
27 to aControlTransferRetries, aBulkTransferRetries or aInterruptTransferRetries for control, bulk
28 and interrupt transfers respectively.
29 The remaining state variables have a finer scope of a single MA USB transfer targeting the endpoint
30 or stream; specifically, for a given MA USB IN transfer with Request ID equal to r,
31 RemSizeR[r] (32 bits, unsigned): The number of bytes expected to be received; set to the transfer
32 size in bytes at transfer initialization, and decremented throughout the transfer.
33 TransferErrorR[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE upon
34 detecting an error in the transfer.
35 TransferCompleteR[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE when it
36 is no longer necessary to track the state of the transfer.
37 EndOfTransferDetectedR[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE
38 upon receiving the last TransferResp packet belonging to the transfer.
39 TransferAcknowledgedR[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE
40 upon releasing a TransferReq or TransferAck packet to the assigned data channel that
41 acknowledges the last TransferResp packet belonging to the transfer.
42 LastTransferSN R[r] (24 bits, unsigned): The value of the Sequence Number field in the
43 TransferResp packet that carries the last portion of the payload belonging to the transfer.
Page 43
Media Agnostic Universal Serial Bus Specification Release 1.0
1 TransferCompletionTimerR[r] (signed): A decrementing counter to verify the transfer
2 acknowledgement was received; set to aMaxTransferLifetime after the last TransferResp packet
3 belonging to the transfer was acknowledged, and decremented by aTransferTimerTick at every
4 transfer timer tick event.
5 KR[r] (unsigned): A transfer-dependent multiplicative factor used to reload KeepAliveTimerR
6 when a TransferResp packet with the Status Code field set to TRANSFER_PENDING is
7 received.
8 NOTE — The target MA USB device may request a new value for the multiplicative factor KR [r], with the intention
9 of establishing the factor for the target endpoint, specifically for all IN transfers targeting the endpoint or streams
10 within the endpoint; however, the MA USB transfer to which a new value of KR [r] applies is decided by the MA
11 USB host and can be an arbitrary transfer in the future, which makes KR [r] transfer-dependent.
12 The MA USB host PAL operation is defined in terms of the processes described below.
13 Initialization process
14 Invoked on any configuration event intended to return the state of the endpoint or stream flow to the
15 initial state.
16
17 I. Set RequestIDR = 0.
18 II. Set SeqNumberR = 0.
19 NOTE — The SeqNumberR variable keeps increasing across successive transfers.
Page 44
Media Agnostic Universal Serial Bus Specification Release 1.0
1 I. Let SN denote the value of the Sequence Number field in the TransferReq packet.
2 II. Release the TransferReq packet to the assigned data channel.
3 III. If there are open transfer requests,
4 (a) For each open transfer request u in the interval EarliestRequestIDR ≤ u <
5 ActiveRequestIDR, and in increasing order of u,
6 (1) If EndOfTransferDetectedR[u] = TRUE and TransferErrorR[u] = FALSE and
7 LastTransferSNR[u] < SN,
8 (i) Set TransferAcknowledgedR[r] = TRUE.
9 (ii) Set TransferCompletionTimerR[u] = aMaxTransferLifetime.
10 (2) Otherwise, break the loop and exit the process.
11
12 TransferResp reception process
13 Invoked upon reception of a TransferResp packet.
14
15 I. Let r, SN, Retry, EndOfTransfer, AckRequest and Status respectively denote the values of the
16 Request ID, Sequence Number, Retry, EoT, ARQ and Status Code fields in the received
17 TransferResp packet. Let PayloadSize denote the size of the payload in the received
18 TransferResp packet.
19 II. If r < EarliestRequestIDR or r ≥ RequestIDR drop the packet.
20 III. Otherwise, if r > ActiveRequestIDR,
21 (a) If Status = INVALID_REQUEST or Status = MISSING_REQUEST_ID,
22 (1) Invalidate all outstanding transfer requests with Request ID values r to
23 RequestIDR – 1.
24 (2) Set RequestIDR = r.
25 (b) Otherwise, if SN = SeqNumberR,
26 (1) Submit a TransferAck packet to the TransferAck transmission process with
27 the Request ID field set to r, the Sequence Number field set to SN, and the
28 Status Code field set to MISSING_REQUEST_ID.
29 (c) Otherwise, run Step VI below (which effectively generates a response based on the
30 Sequence Number value in the TransferResp packet).
31 IV. Otherwise, if TransferCompleteR[r] = TRUE or TransferErrorR[r] = TRUE drop the packet.
32 V. Otherwise, if Status = TRANSFER_PENDING,
33 (a) Set KeepAliveTimerR = KR[r] × aTransferKeepAlive.
34 (b) Set TransferReqRetryCounterR[r] = TransferReqRetriesR.
35 (c) If AckRequest = 1, submit a TransferAck packet to the TransferAck transmission
36 process with the Request ID field set to r and the Status Code field set to
37 TRANSFR_PENDING.
38 NOTE — The value of the Sequence Number field in the above TransferAck packet is set to
39 aInvalidSequenceNumber.
40 NOTE — The KeepAliveTimerR variable is set to 0 when KR [r] = 0, which stops the MA USB host PAL from
41 polling the pending endpoint.
42 VI. Otherwise,
43 (a) Set KeepAliveTimerR = aTransferKeepAlive.
44 (b) Set TransferReqRetryCounterR[r] = TransferReqRetries R
45 (c) If SN = SeqNumberR,
46 (1) If RemSizeR[r] ≥ PayloadSize,
47 (i) Admit the received payload into the host buffer.
Page 45
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (ii) Set SeqNumberR = SeqNumberR + 1.
2 (iii) Set RemSizeR[r] = RemSizeR[r] – PayloadSize.
3 (iv) If EndOfTransfer = 1,
4 (a) Set EndOfTransferDetectedR[r] = TRUE.
5 (b) Set LastTransferSN R[r] = SN.
6 (c) Set ActiveRequestIDR = ActiveRequestIDR + 1.
7 (d) If Status = NO_ERROR,
8 (1) Submit a TransferAck packet to the TransferAck
9 transmission process with the Request ID field set to r,
10 the Sequence Number field set to SN, and the Status
11 Code field set to Status (NO_ERROR), or alternatively,
12 initiate a new transfer, which will result in transmitting
13 a TransferReq packet serving as acknowledgement.
14 (2) If RemSizeR[r] > 0, set TransferErrorR[r] = TRUE.
15 NOTE — A short read is reported to the application with a suitable error code, but does not result in transmitting an
16 error code to the target MA USB device.
17 (e) Otherwise,
18 (1) Submit a TransferAck packet to the TransferAck
19 transmission process with the Request ID field set to r,
20 the Sequence Number field set to SN, and the Status
21 Code field set to Status, and set TransferErrorR[r] =
22 TRUE.
23 (f) Return the entire payload received for the transfer to the
24 application, together with a status code that matches the Status
25 and TransferErrorR[r].
26 (v) Otherwise, if AckRequest = 1,
27 (a) Submit a TransferAck packet to the TransferAck transmission
28 process with the Request ID field set to r, the Sequence
29 Number field set to SN, and the Status Code field set to Status,
30 or alternatively, and only if Status = NO_ERROR, initiate a
31 new transfer, which will result in transmitting a TransferReq
32 packet serving as acknowledgement.
33 (2) Otherwise,
34 (i) Drop the TransferResp packet, or optionally admit up to RemSizeR[r]
35 bytes of the receive payload into the host buffer.
36 (ii) Submit a TransferAck packet to the TransferAck transmission process
37 with the Request ID field set to r, the Sequence Number field set to
38 SN, and the Status Code field set to TRANSFER_SIZE_ERROR.
39 (iii) Set TransferErrorR[r] = TRUE.
40 NOTE — The target MA USB device PAL response to a received TRANSFER_SIZE_ERROR is implementation-
41 dependent; the MA USB host normally takes corrective actions such as clearing all outstanding transfers on the
42 endpoint or stream in this case.
43 (d) Otherwise,
44 (1) Drop the TransferResp packet.
45 (2) Submit a TransferReq packet to the TransferReq transmission process with the
46 Request ID field set to r, the Sequence Number field set to SeqNumberR, and
47 the Remaining Size field set to RemSizeR[r].
Page 46
Media Agnostic Universal Serial Bus Specification Release 1.0
1 TransferAck transmission process
2 Invoked to release a TransferAck packet to the assigned data channel.
3
4 I. Let SN and Status respectively denote the value of the Sequence Number and Status Code
5 fields in the TransferAck packet.
6 I. Release the TransferAck packet to the assigned data channel.
7 II. If Status ≠ TRANSFER_PENDING,
8 (a) For each open transfer request u in the interval EarliestRequestIDR ≤ u <
9 ActiveRequestIDR, and in increasing order of u,
10 (1) If EndOfTransferDetectedR[u] = TRUE,
11 (i) If TransferErrorR[u] = FALSE and LastTransferSNR[u] ≤ SN, or
12 TransferErrorR[u] = TRUE and u = r,
13 (a) Set TransferAcknowledgedR[r] = TRUE.
14 (b) Set TransferCompletionTimerR[u] = aMaxTransferLifetime.
15 (ii) Otherwise, break the loop,
16 (2) Otherwise, break the loop.
17 Timer process
18 Invoked at every transfer timer tick event, as long as there are open transfer requests.
19
20 I. For each open transfer request u in the interval EarliestRequestIDR ≤ u < ActiveRequestIDR,
21 and in increasing order of u,
22 (a) If TransferAcknowledgedR[u] = TRUE,
23 (1) Set TransferCompletionTimerR[u] = TransferCompletionTimerR[u] –
24 aTransferTimerTick.
25 (2) If TransferCompletionTimerR[u] ≤ 0, set TransferCompleteR[u] = TRUE.
26 (3) Otherwise, set EarliestRequestIDR = u and break the loop (go to Step II).
27 (b) Otherwise, set EarliestRequestIDR = u and break the loop (go to Step II).
28 II. If KeepAliveTimerR >0,
29 (a) Set KeepAliveTimerR = KeepAliveTimerR – aTransferTimerTick.
30 (b) If KeepAliveTimerR ≤ 0,
31 (1) If TransferReqRetryCounterR > 0,
32 (i) Submit a TransferReq packet to the appropriate transmission process
33 with the Request ID field set to r and the Sequence Number field set to
34 SeqNumberR.
35 (ii)
36 (iii) Set KeepAliveTimerR = aTransferKeepAlive. Set
37 TransferReqRetryCounterR = TransferReqRetryCounterR – 1.
38 (2) Otherwise,
39 (i) Start the Ping protocol (Section 5.2.2).
40 (ii) If the Ping protocol is successful, optionally,
41 (a) Set KeepAliveTimerR = aTransferKeepAlive.
42 (b) Set TransferReqRetryCounterR = TransferReqRetriesR.
43 (c) Quit the Timer process and wait for the next transfer timer tick
44 event.
45 (iii) If the Ping protocol fails, or if the optional path in the previous step is
46 not followed,
47 (a) Set TransferErrorR[ActiveRequestIDR] = TRUE.
Page 47
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (b) Indicate a transfer timeout error to the application, and wait for
2 a corrective action.
3 NOTE — The Status Code field in all outgoing TransferReq packets is set to NO_ERROR; also the Retry field in all
4 these packets is set to 0, as they may include updated Sequence Number values .
5 NOTE — The MA USB host moves the session state to Session Down state (Section 8.1.1.1) after Ping protocol
6 failure, which may result in a configuration event that returns the state of all endpoint and stream flows on the target
7 MA USB device to the initial state. Also, regardless of the Ping protocol outcome, the MA USB host cannot proceed
8 to the next IN transfer request if the current transfer fails as a result of timeout, unless a corrective action such as
9 clearing all outstanding transfer requests and restarting the endpoint takes place. The above transfer-oriented
10 description does not capture broader configuration events applied to the target endpoint or stream, or to the MA
11 USB device.
Page 48
Media Agnostic Universal Serial Bus Specification Release 1.0
1 ResponseTimerO (signed): A decrementing counter to track the response time for a TransferResp
2 packet that requires an immediate exchange (Section 5.2.1.2); set to aTransferTimeout every
3 time a TransferResp packet that requires an immediate exchange is released to the assigned data
4 channel, and decremented by aTransferTimerTick at every transfer timer tick event.
5 TransferRespRetryCounterO (unsigned): A decrementing counter to track the retries of a
6 TransferResp packet that requires an immediate exchange (Section 5.2.1.2); set to
7 TransferRespRetriesO when a new round of retries is to be attempted, and decremented by 1 after
8 each retry.
9 TransferRespRetriesO (unsigned): The reload value of the TransferRespRetryCounterO counter,
10 set to aControlTransferRetries, aBulkTransferRetries or aInterruptTransferRetries for control,
11 bulk and interrupt transfers, respectively.
12 DelayedO (boolean): Indicates if the rate of TransferResp packet transmission for the active
13 transfer has fallen below a minimum rate; initialized to FALSE at session initialization or upon
14 any configuration event that returns the state of the endpoint or stream flow to the initial state,
15 and also when a new transfer request becomes active, and set to TRUE if the interval between
16 two successive TransferResp packets belonging to the active transfer exceeds
17 aTransferRepeatTime.
18 The remaining state variables have a finer scope of a single MA USB transfer targeting the endpoint
19 or stream; specifically, for a given MA USB IN transfer with Request ID equal to r,
20 RemSizeO[r] (32 bits, unsigned): The number of bytes that the MA USB host can accept for the
21 transfer; set to the transfer size in bytes at transfer initialization, and decremented throughout the
22 transfer.
23 TransferErrorO[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE upon
24 detecting an error in the transfer.
25 TransferCompleteO[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE when
26 it is no longer necessary to track the state of the transfer.
27 EndOfTransferDetectedO[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE
28 upon releasing the last TransferResp packet belonging to the transfer to the assigned data
29 channel.
30 LastTransferSN O[r] (24 bits, unsigned): The value of the Sequence Number field in the
31 TransferResp packet that carries the last portion of the payload belonging to the transfer.
32 The MA USB device PAL operation is defined in terms of the processes described below.
33 Initialization process
34 Invoked on any configuration event intended to return the state of the endpoint or stream flow to the
35 initial state.
36
37 I. Set RequestIDO = 0.
38 II. Set ActiveRequestIDO = 0.
39 III. Set EarliestRequestIDO = 0.
40 IV. Set SeqNumberO = 0.
41 V. Set EarliestUnacknowledgedO = 0.
42 VI. Set DelayedO = FALSE.
43 NOTE — The SeqNumberO and EarliestUnacknowledged O variables keep increasing across successive transfers.
Page 49
Media Agnostic Universal Serial Bus Specification Release 1.0
1 TransferReq reception process
2 Invoked upon reception of a TransferReq packet.
3
4 I. Let r, SN and RemSize respectively denote the value of the Request ID, Sequence Number
5 and Remaining Size fields in the received TransferReq packet.
6 II. If EarliestRequestIDO – [(aMaxRequestID + 1)/2] ≤ r < EarliestRequestIDO, or
7 EarliestUnacknowledgedO – [(aMaxSequenceNumber + 1)/2] ≤ SN <
8 EarliestUnacknowledgedO, or SeqNumberO < SN < SeqNumberO + [(aMaxSequenceNumber
9 + 1)/2],
10 (a) Drop the TransferReq packet.
11 (b) Submit a null TransferResp packet with no payload to the TransferResp transmission
12 process with the Request ID field set to RequestIDO, the Retry, EoT and ARQ fields
13 set to 0, and the Status Code field set to INVALID_REQUEST.
14 NOTE — The value of the Sequence Number field in a null TransferResp packet is set to aInvalidSequenceNumber.
Page 50
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Invoked to release a TransferResp packet to the assigned data channel, as long as SeqNumberO <
2 EarliestUnacknowledgedO + [(aMaxSequenceNumber + 1)/2].
3
4 I. Let EndOfTransfer and AckRequest respectively denote the values of the EoT and ARQ
5 fields in the TransferResp packet.
6 II. Release the TransferResp packet to the assigned data channel.
7 III. If EndOfTransfer = 1 or AckRequest = 1, and ResponseTimerO ≤ 0,
8 (a) Set ResponseTimerO = aTransferTimeout.
9 (b) Set TransferRespRetryCounterO = TransferRespRetriesO.
10 TransferResp generation process
11 Invoked to generate TransferResp packets as long as there is an active transfer request.
12
13 I. While ActiveRequestIDO < RequestIDO,
14 (a) Set r = ActiveRequestIDO.
15 (b) Let PayloadSize (implementation-dependent) denote the payload size for the next
16 TransferResp packet to be generated, with 0 < PayloadSize ≤ RemSizeO[r].
17 (c) Define boolean variables EndOfTransfer and AckRequest, initialized to 0.
18 (d) Define a variable Status, initialized to NO_ERROR.
19 (e) If RemSizeO[r] = PayloadSize, or if RemSizeO[r] > PayloadSize and no more data is
20 going to be available as a result of an error,
21 (1) Set EndOfTransfer = 1, and optionally set AckRequest = 1.
22 (2) If TransferErrorO[r] = 1, set Status to an appropriate error code.
23 (f) Optionally, set AckRequest = 1.
24 (g) Set RemSizeO[r] = RemSizeO[r] – PayloadSize.
25 (h) Submit a TransferResp packet to the TransferResp transmission process, with the
26 Request ID field set to r, the Sequence Number field set to SeqNumberO, the
27 Remaining Size field set to RemSizeO[r], the Retry field set to 0, the EoT field set to
28 EndOfTransfer, the ARQ field set to AckRequest, and the Status Code field set to
29 Status.
30 (i) Set SeqNumberO = SeqNumberO + 1.
31 (j) If EndOfTransfer = 1,
32 (1) If TransferErrorO[r] = 0, set ActiveRequestIDO = ActiveRequestIDO + 1.
33 (2) Otherwise, stop the process and wait for corrective action.
34 NOTE — Example of a corrective action is the MA USB host clearing all transfers and restarting the endpoint.
35 NOTE — The payload of a transmitted TransferResp packet is not released from the MA USB device memory until
36 it is acknowledged by the MA USB host.
37 TransferAck reception process
38 Invoked upon reception of a TransferAck packet.
39
40 I. Let r, SN and Status respectively denote the value of the Request ID, Sequence Number and
41 Status Code fields in the received TransferAck packet.
42 II. If r > RequestIDO or EarliestRequestIDO – [(aMaxRequestID + 1)/2] ≤ r <
43 EarliestRequestIDO drop the TransferAck packet.
44 III. If Status = TRANSFER_PENDING,
45 (a) If r ≠ ActiveRequestIDO, drop the TransferAck packet.
46 (b) Otherwise, possibly start power saving measures, understanding that the MA USB
47 host will inquire about the status of the transfer based on an extended timeout.
Page 51
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — See the definition of KR [r] and the extended timeout in the MA USB host PAL operation (Section
2 5.4.1.1).
3 NOTE — The value of the Sequence Number field in a TransferAck packet with the Status Code field set to
4 TRANSFER_PENDING is set to aInvalidSequenceNumber.
5 IV. Otherwise, if EarliestUnacknowledgedO – [(aMaxSequenceNumber + 1)/2] ≤ SN <
6 EarliestUnacknowledgedO, or SeqNumberO < SN < SeqNumberO + [(aMaxSequenceNumber
7 + 1)/2], drop the TransferAck packet.
8 V. Otherwise,
9 VI. if EarliestUnacknowledgedO ≤ SN < SeqNumberO,
10 (a) Set EarliestUnacknowledgedO = SN + 1.
11 (b) For each open transfer request u in the interval EarliestRequestIDO ≤ u <
12 ActiveRequestIDO, and in increasing order of u,
13 (1) If EndOfTransferDetectedO[u] = TRUE,
14 (i) If TransferErrorO[u] = FALSE and LastTransferSN O[u] < SN, or
15 TransferErrorO[u] = TRUE and u = r,
16 (a) Set TransferCompleteO[u] = TRUE.
17 (ii) Otherwise, set EarliestRequestIDO = u and break the loop.
18 (2) Otherwise, set EarliestRequestIDO = u and break the loop.
19 Timer process
20 Invoked at every transfer timer tick event, as long as there is an active transfer request.
21
22 I. If KeepAliveTimerO > 0,
23 (a) Set KeepAliveTimerO = KeepAliveTimerO – aTransferTimerTick.
24 (b) If KeepAliveTimerO ≤ 0,
25 (1) Set DelayedO = TRUE.
26 II. Optionally, if ResponseTimerO > 0,
27 (a) Set ResponseTimerO = ResponseTimerO – aTransferTimerTick.
28 (b) If ResponseTimerO ≤ 0,
29 (1) If TransferRespRetryCounterO > 0,
30 (i) Submit the earliest TransferResp packet that requires
31 acknowledgement to the TransferResp transmission process, with all
32 packet fields the same, except the Retry field, which is set to 1.
33 (ii) Set ResponseTimerO = aTransferTimeout.
34 (iii) Set TransferRespRetryCounterO = TransferRespRetryCounterO – 1.
35 (2) Otherwise, wait indefinitely for corrective actions, or optionally,
36 (i) Start the Ping protocol (Section 5.2.2).
37 (ii) If the Ping protocol is successful, optionally,
38 (a) Set ResponseTimerO = aTransferTimeout.
39 (b) Set TransferRespRetryCounterO = TransferRespRetriesO.
40 (c) Quit the Timer process and wait for the next transfer timer tick
41 event.
42 (iii) If the Ping protocol fails, or if the optional path in the previous step is
43 not followed,
44 (a) Set TransferErrorO[ActiveRequestIDO] = TRUE.
45 (b) Indicate a transfer timeout error to the application, and wait for
46 a corrective action.
Page 52
Media Agnostic Universal Serial Bus Specification Release 1.0
1 5.5 Protocol-managed OUT transfers
2 An MA USB OUT data flow is a unidirectional stream of bytes delivered to a target USB OUT endpoint
3 or a stream buffer within an Enhanced SuperSpeed bulk OUT endpoint that supports the Enhanced
4 SuperSpeed Stream Protocol [USB 3.1] from the MA USB host.
5 NOTE — Throughout this specification the term “endpoint flow” refers to the unidirectional byte stream targeting
6 an endpoint, and the term “stream flow" refers to the unidirectional byte stream targeting a stream within an
7 Enhanced SuperSpeed bulk endpoint that supports the Enhanced SuperSpeed Stream Protocol.
8 The MA USB host data flow is illustrated in Figure 17. The MA USB host PAL initiates an MA USB
9 OUT transfer by transmitting a TransferReq packet (Section 6.5.2) to a target MA USB device, which
10 also carries some payload belonging to the transfer; remaining payload is transferred through additional
11 TransferReq packets. All TransferReq packets belonging to the transfer, except possibly the last
12 TransferReq packet, shall include a multiple of maximum packet size of data supported by the target
13 endpoint, where the maximum packet size is defined by the wMaxPacketSize field of the endpoint
14 descriptor. The MA USB host assigns a request ID to each transfer request and all associated
15 TransferReq packets. Request ID is reset to 0 at session initialization or upon any configuration event
16 that returns the state of the endpoint or stream flow to the initial state, and is incremented by 1 for each
17 new transfer request, with wraparound to 0 after reaching the maximum value of aMaxRequestID. To
18 avoid ambiguity in tracking the outstanding TransferReq packets, the MA USB host shall have no more
19 than (aMaxRequestID +1)/2 (half the size of the Request ID space) outstanding TransferReq packets for
20 each target OUT endpoint or stream. Also, the total number of outstanding transfers across all IN and
21 OUT endpoints and streams shall not exceed the number returned by the target MA USB device in the
22 Number of Outstanding Requests field in the CapResp packet (Section 6.3.3).
23 NOTE — MA USB devices with multiple endpoints or streams are recommended to use a shared buffer to store the
24 state information for all outstanding transfers, as the number of outstanding transfer on each target endpoint or
25 stream is decided by the MA USB host.
Page 53
Media Agnostic Universal Serial Bus Specification Release 1.0
USBDI MA Link Interface MA Link Interface USB Logic EP
endpoint or stream
MA USB host PAL MA USB device PAL
Target USB
The MA USB host PAL is aware of the
credit available for the OUT transfer via the
EPHandleResp packet; the credit identifies
the amount of data the MA USB host PAL
may transmit to the device.
Credit = 30 KB
Write request
Write size 30 KB MA USB OUT transfer
Request ID 0
Transfer size 30 KB
1
2 Figure 17—P-managed MA USB OUT transfers
3 To complete an MA USB OUT transfer, the MA USB host PAL transmits one or more TransferReq
4 packets (Section 6.5.2) to the target MA USB device PAL to transfer the USB payload to the target USB
5 endpoint or stream in the strict order it is available in the host system. Each TransferReq packet carries
6 the same EP Handle, Stream ID, and Request ID as in the TransferReq packet that initiated the transfer.
7 To enable the MA USB device PAL to identify missing data packets, each TransferReq packet carries a
8 Sequence Number field, which is set to 0 at session initialization or upon any configuration event that
9 returns the state of the endpoint or stream flow to the initial state. The Sequence Number value is
10 incremented by 1 after each new (i.e., not retried) TransferReq packet, with wraparound to 0 after
11 reaching the maximum value of aMaxSequenceNumber. Sequence Number values keep increasing
12 across successive transfers.
13 NOTE — Configuration events that return the state of an endpoint or stream flow to the initial state are triggered in
14 response to various events at the MA USB host or device, and are normally communicated through appropriate
15 management packets. As a result, the time an endpoint or stream flow makes the transition to its initial state depends
Page 54
Media Agnostic Universal Serial Bus Specification Release 1.0
1 on whether the event is viewed from the MA USB host or from the target MA USB device perspective. For
2 example, the MA USB host is assumed to have initialized a target endpoint flow when it transmits an
3 EPHandleDeleteReq or USBDevDisconnectReq packet that targets the endpoint; the target MA USB device on the
4 other hand, can be assumed to have initialized the endpoint flow when it transmits a corresponding response packet
5 to the MA USB host with a status code that indicates the endpoint state was reset (e.g. status code of SUCCESS).
6 To avoid ambiguity in tracking the TransferResp packets pending completion, the MA USB host PAL
7 shall have no more than (aMaxSequenceNumber +1)/2 (half the size of the Sequence Number space)
8 outstanding TransferReq packets.
9 Each TransferReq packet includes a Remaining Size field that carries the number of remaining bytes the
10 host expects to transmit to complete the transfer.
11 While an MA USB OUT transfer on a target endpoint or stream is in progress, the MA USB host PAL
12 may transmit additional TransferReq packets to target the same endpoint or steam, with the value of the
13 Request ID field incremented by 1 for each new transfer request. The target MA USB device queues the
14 received TransferReq packets in the increasing order of Request ID and Sequence Number values for
15 subsequent processing.
16 In response to a TransferReq packet with an unexpected Request ID value, or a TransferReq packet that
17 is invalid independent of its Request ID and Sequence Number values, the target MA USB device PAL
18 shall discard the TransferReq packet, and release to the assigned data channel a TransferResp packet
19 within aTransferResponseTime from the moment it receives the invalid TransferReq packet, with the
20 TransferResp packet Request ID and Sequence Number fields set to the Request ID and Sequence
21 Number values of the last TransferReq packet received in order, and the Status Code field set to
22 MISSING_REQUEST_ID if the received TransferReq packet is valid but shows a gap in its Request ID
23 field, or INVALID_REQUEST if the received TransferReq packet is invalid independent of the value of
24 its Request ID field. In response to a TransferResp packet with the Status Code field set to
25 MISSING_REQUEST_ID or INVALID_REQUEST, the MA USB host PAL shall invalidate all
26 outstanding TransferReq packets and start transmitting new TransferReq packets starting with the
27 Request ID and Sequence Number values in the TransferResp packet.
28 NOTE — A retried TransferReq packet for an active transfer may not carry a different payload size, and may not
29 change the size of the transfer.
30 NOTE — It is possible that a target MA USB device silently drops a valid incoming TransferReq packet if it cannot
31 admit the packet into its buffer; this scenario is no different from the packet being lost over the medium, and is
32 recovered though a detected gap in subsequent TransferReq packets, or through an MA USB host timeout.
33 In response to a valid TransferReq packet with the ARQ field set to 1, the target MA USB device PAL
34 shall release a TransferResp packet to the assigned data channel with the Request ID and Sequence
35 Number fields set to the Request ID and Sequence Number values the last TransferReq packet the MA
36 USB device PAL has received in order. A TransferReq packet with the ARQ field set to 1, and the
37 resulting TransferResp packet form an immediate exchange with timings and behavior defined in
38 Section 5.2.1.2. A TransferResp packet acknowledges receipt of all TransferReq packets up to and
39 including the Request ID and Sequence Number fields in the TransferResp packet.
40 NOTE — The acknowledged TransferReq packets may belong to multiple transfer requests with successive Request
41 ID values; however, at least one TransferResp packet is transmitted for each transfer request to indicate the transfer
42 conclusion.
43 The target MA USB device PAL shall deliver all received USB payload to the target endpoint or stream
44 in the strict order of Sequence Number value, and transfer requests shall be completed in strict order of
45 Request ID value. To notify the MA USB host PAL of the completion of the transfer on the target USB
46 endpoint or stream, the MA USB device PAL shall transmit a TransferResp packet with the Request ID
47 field identifying the completed transfer, the Sequence Number field set to the latest Sequence Number
Page 55
Media Agnostic Universal Serial Bus Specification Release 1.0
1 value received by the device PAL, updated Credit field, the EoT field set to 1, and the Status Code field
2 set accordingly.
3 NOTE — The time a TransferResp packet with EoT field set to 1 is transmitted and the value of the Request ID
4 field in that packet are independent of other packet exchanges for subsequent transfers.
5 The MA USB host PAL shall acknowledge the receipt of a valid TransferResp packet with the EoT field
6 set to 1 by transmitting a TransferAck packet to the MA USB device PAL with the Request ID,
7 Sequence Number and Status Code fields set to the same values as those in the TransferResp packet.
8 The TransferResp and TransferAck packets form an immediate exchange with timings and behavior
9 defined in Section 5.2.1.2.
10 In response to a valid TransferReq packet with gap in the Sequence Number value, the target MA USB
11 device PAL shall release a TransferResp packet to the assigned data channel within
12 aTransferResponseTime from the moment the MA USB device PAL receives the TransferReq packet,
13 with the Request ID and Sequence Number fields set to the Request ID and Sequence Number values
14 the MA USB device PAL is expecting next, and the Status Code field set to
15 MISSING_SEQUENCE_NUMBER.
16 If the target endpoint returns a STALL handshake during a transfer, the target MA USB device shall
17 transmit a TransferResp packet to the MA USB host, with the Request ID field set to the Request ID
18 value of the transfer a STALL handshake was returned for and Sequence Number field set to the
19 Sequence Number value of the last TransferReq packet received in order, the EoT field is set to1, and
20 the Status Code field set to TRANSFER_EP_STALL. Receiving a TransferResp packet with the Status
21 Code field set to TRANSFER_EP_STALL results in completion of the transfer on the MA USB host.
22 The MA USB device shall discard but acknowledge any subsequent data received for the transfer that
23 experienced the STALL condition. Furthermore, until the MA USB host clears the STALL condition
24 and the target EP handle returns to the Active state, the target MA USB device shall buffer and
25 acknowledge each TransferReq packet received that does not belong to the transfer request that
26 experienced the STALL condition by transmitting a TransferResp packet with the Status Code field set
27 to INVALID_EP_HANDLE_STATE. The MA USB host shall not remove any unacknowledged data
28 associated with an endpoint in STALL condition.
29 NOTE — Once the STALL condition is experienced, any TransferReq p acket received results in transmitting a
30 TransferResp packet with the Status Code field set to INVALID_EP_HANDLE_ STATE.
31 If the MA USB device PAL receives a CancelTransferReq packet corresponding to an active transfer, it
32 should discard all the data corresponding to the transfer identified in the CancelTransferReq packet,
33 however it shall keep account of the sequence numbers of the TransferReq packets received. The
34 specific behavior of the MA USB device and the MA USB host depends on the state of the transfer at
35 the time that the CancelTransferReq is processed at the MA USB device:
36 If the transfer was cancelled before any data was moved to the USB device (i.e., the Cancellation
37 Status field in CancelTransferResp packet set to 1): The MA USB devices shall respond to a
38 TransferReq packet for the cancelled transfer with a TransferResp packet with EOT set to 1,
39 Status Code field set to TRANSFER_CANCELLED, and Sequence Number field set to
40 aInvalidSequenceNumber. Additionally the MA USB device shall keep the state of the transfer
41 until it receives the TransferAck packet from the MA USB host. The MA USB host shall
42 transmit the TransferAck packet only after it has received all the TransferResp packets as well as
43 the CancelTransferResp packet related to the cancelled transfer.
44 If the transfer was cancelled after some data was moved to the USB device (i.e., the Cancellation
45 Status field in CancelTransferResp packet set to 2): The MA USB devices shall transmit a
46 TransferResp packet with EOT set to 1, Status Code field set to TRANSFER_CANCELLED.
Page 56
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Additionally the MA USB device shall keep the state of the transfer until it receives the
2 TransferAck packet from the MA USB host. The MA USB host shall transmit the TransferAck
3 packet only after it has received all the TransferResp packets as well as the CancelTransferResp
4 packet related to the cancelled transfer.
5 If the transfer was completed (i.e., the Cancellation Status field in CancelTransferResp packet set
6 to 3): The MA USB devices shall transmit a TransferResp packet with EOT set to 1, Status Code
7 field set to the appropriate value (the same value carried if the transfer was not cancelled). The
8 MA USB device shall keep the state of the transfer until it receives the TransferAck packet from
9 the MA USB host. The MA USB host shall transmit the TransferAck packet only after it has
10 received all the TransferResp packets as well as the CancelTransferResp packet related to the
11 cancelled transfer.
12 If the transfer was not yet received (i.e., the Cancellation Status field in CancelTransferResp
13 packet set to 4): The MA USB device is not required to keep cancel information for a transfer it
14 has not yet received. If a TransferReq packet is received at the MA USB device, the MA USB
15 device shall respond to it with no required knowledge of whether the transfer was previously
16 cancelled. The MA USB host, following receipt of the CancelTransferResp packet, may either
17 retransmit the CancelTransferReq or wait for the completion of the transfer.
18 If the transfer with RequestID was serviced as part of ClearTransfersReq processing without any
19 data being moved to the USB Device (i.e., the Cancellation Status field in CancelTransferResp
20 packet set to 5): The MA USB device is not required to keep the cancel information for a transfer
21 it already cleared, It shall generate CancelTransferResp without generating TransferResp. This
22 status indicates that the MA-USB device doesn’t expect TransferAck from MA USB host. The
23 MA USB host, following receipt of the CancelTransferResp packet, shall not wait for
24 TransferResp packets for this transfer.
25 If the MA USB device PAL receives a ClearTransfersReq packet corresponding to an endpoint with
26 active transfers, it should discard all the data corresponding to the endpoint identified in the
27 ClearTransfersReq packet, however it shall keep account of the sequence numbers of the TransferReq
28 packets received. If the MA USB device receives a TransferReq packet for a cancelled transfer
29 (TransferReq packets carrying a Request ID value less than the value indicated in the Start Request ID
30 field in the ClearTransfersReq packet) and it has not yet delivered any data related to the transfer to the
31 device, it shall discard the TransferReq packet, otherwise it shall respond with a TransferResp packet; if
32 the transfer is cancelled before its completion (i.e., not all data related to the transfer is delivered to the
33 target endpoint), the last TransferResp packet related to the transfer shall carry EOT field set to 1 with
34 the Status Code field set to TRANSFER_CANCELLED. The Status Code field shall not be set to
35 TRANSFER_CANCELLED if the transfer is completed. The MA USB host shall not remove the data
36 for any unacknowledged TransferReq packets of a cancelled transfer before receiving the
37 ClearTransfersResp packet. The MA USB host shall reset the Sequence Number value to 0 before
38 transmitting a TransferReq packet with Request ID value indicated in the Start Request ID field in the
39 ClearTransfersReq packet.
Page 57
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The MA USB device PAL is responsible for managing its buffer space; it is required to inform the MA
2 USB host PAL of its available buffer space for each USB endpoint behind the MA USB device PAL.
3 The MA USB device PAL notifies the MA USB host PAL of the available buffer space for each
4 endpoint by use of credits. The credits are the number of bytes of data that the MA USB device PAL is
5 ready to accept into its buffer at the time that the credit information was submitted by the MA USB
6 device PAL for transmission. In order to allow devices flexibility in managing the local buffer, an MA
7 USB device will report to the MA USB host the Credit Consumption Unit (CCU) for each endpoint;
8 CCU is the unit by which the MA USB host shall keep track of the buffer space available on the MA
9 USB device. An MA USB device may allow the MA USB host to not strictly follow the credit
10 advertised for the target endpoint by setting the Elastic Buffer Capability field in the MA USB
11 Capability Response (CapResp) packet to 1. If the MA USB device supports the Elastic Buffer
12 Capability, it may return a negative credit value if the memory currently consumed for target endpoint
13 exceeds the credit advertised for the endpoint. The MA USB device additionally may choose to report a
14 DROPPED_PACKET status every time it has to drop an incoming TransferReq packet because of buffer
15 shortage.
16 The MA USB device delivers the initial credit for an endpoint to the MA USB host using the Buffer
17 Size field in the EPHandleResp packet. Credits are allocated at the MA USB device PAL for each
18 endpoint. Note that in case of an Enhanced SuperSpeed bulk OUT endpoint that supports Enhanced
19 SuperSpeed Stream Protocol [USB 3.1], the allocated credits are the total available for all the streams.
20 The counter used to track credits for each endpoint is initialized to the value of the Buffer Size field in
21 the EPHandleResp packet at any configuration event intended to return the state of an endpoint to the
22 initial state.
23 Credits are de-allocated when a deliverable TransferReq packet arrives and its data payload is accepted
24 into the buffer. The MA USB device PAL uses the Sequence Number value in the TransferReq packet to
25 determine whether the payload in the TransferReq packet is deliverable to the target endpoint. The data
26 associated with a TransferReq packet targeted to an endpoint is deliverable if the data for all preceding
27 TransferReq packets targeted to the endpoint has successfully been accepted. If the TransferReq packet
28 has the Retry field set to 1 and the associated data has already been accepted by the MA USB device
29 PAL, the data is dropped.
30 Credits are allocated when data is removed from the buffer. A target MA USB device PAL shall not
31 remove any transfer data associated with an MA USB OUT transfer from its buffer unless it has
32 successfully transmitted the data to the target endpoint or it receives one of the following packets:
33 A DevResetReq packet (Section 6.3.18) or DevDisconnectReq packet (Section 6.3.36), in which
34 case all the data for all endpoints and streams is removed from the MA USB device buffer.
35 A ClearTransfersReq packet (Section 6.3.14), in which case all data related to corresponding
36 endpoint(s) is removed from the MA USB device buffer.
37 A USBDevDisconnectReq packet (Section 6.3.26) for the target USB device, in which case all
38 data related to the target USB device is removed from the MA USB device buffer.
39 A CancelTransferReq packet (Section 6.3.42), in which case all data related to the target request is
40 removed from the MA USB device buffer.
41 The MA USB device PAL may modify the buffer space allocated to each endpoint at any time.
42 MA USB device shall provide credits for each of the endpoints in multiples of Credit Consumption Unit
43 of that endpoint. The credits are delivered to MA USB host PAL using the following mechanisms:
44 In Buffer size field in the EPHandleResp packet.
Page 58
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The MA USB device may update the credit by retransmitting the latest TransferResp packet
2 which had the EoT field set to 1, and including an updated value for the credit in the Credit field.
3 The MA USB device may reduce the credit by retransmitting the latest TransferResp packet
4 which had the EoT field set to 1, and including the reduced value for the credit in the Credit
5 field. If the Elastic Buffer Capability bit in the CapResp packet is set to 0 then the local
6 accounting for this credit allocation using the TransferResp packet is applied only after reception
7 of the matching TransferAck packet.
8 The MA USB device PAL should attempt to reduce the overhead of transmitting TransferResp packets
9 while ensuring the MA USB host does not stall waiting for credits.
10 The MA USB host PAL is able to compute the amount of credit available for a given endpoint at any
11 given time by computing the difference between the last credit value and its associated Sequence
12 Number value received from the MA USB device PAL and the amount of unacknowledged data
13 transmitted. (Note that in case of retransmissions, the retransmitted data does not count toward
14 unacknowledged data.) The MA USB host shall set its local counter for tracking credits on an endpoint
15 to the value of the Credit field in a received TransferResp or EPHandleResp packet.
16 The MA USB host shall accurately track credits available and used during data streaming. Credits are
17 consumed (released) when the TransferResp packet associated with those credits is received.
18 The MA USB host shall account for consumed credits in multiples of Credit Consumption Unit of that
19 endpoint.
20 NOTE — For example if an MA USB device reports a Credit Consumption Unit of 512 bytes for a particular
21 endpoint, the MA USB host will always account for used credits for that endpoint in units of 512 regardless of the
22 number of bytes transmitted; i.e., an MA USB payload of 2064 byte accounts for 5 Credit Consumption Units of 512
23 bytes.
24 If the Elastic Buffer Capability field in the CapResp packet is set to 0, the MA USB host PAL shall not
25 transmit TransferReq packets targeted for an endpoint unless it has credits for transmitting data to that
26 endpoint. Moreover, it shall limit the amount of data transmission to the target endpoint to the credit
27 available for that endpoint.
Page 59
Media Agnostic Universal Serial Bus Specification Release 1.0
MA USB host PAL MA USB device PAL
TransferReq(Request ID, Sequence Number,
Remaining Size, Retry, ARQ)
RequestIDO RequestIDR
SeqNumberO TransferResp(Request ID, Sequence Number, SeqNumberR
... Credit, Retry, EOT, Status Code) ...
KeepAliveTimerO ResponseTimerR
TransferReqRetryCounter O TransferRespRetryCounterR
TransferAck(Request ID, Sequence Number,
Status Code)
1
2 Figure 18—Data packets and header fields used for p-managed OUT transfers
3 5.5.2.1 MA USB host PAL operation
4 The MA USB host operation is defined in terms of a series of state variables maintained in the context
5 of a single target endpoint or stream,
6 RequestIDO (8 bits, unsigned): The Request ID value of the next original transfer request;
7 initialized to 0 at session initialization or upon any configuration event that returns the state of
8 the endpoint or stream flow to the initial state, and incremented by 1 when a new transfer request
9 is generated, with wraparound to 0 after reaching the maximum value of aMaxRequestID.
10 ActiveRequestIDO (8 bits, unsigned): The Request ID field of the active transfer request, i.e., the
11 request expected to be served by the next original TransferReq packet; initialized to 0 at session
12 initialization or upon any configuration event that returns the state of the endpoint or stream flow
13 to the initial state, and incremented by 1 when the entire payload belonging to the transfer has
14 been transmitted (not necessarily acknowledged), with wraparound to 0 after reaching the
15 maximum value of aMaxRequestID.
16 EarliestRequestIDO (8 bits, unsigned): The Request ID value of the earliest transfer request
17 whose state needs to be tracked; initialized to 0 at session initialization or upon any configuration
18 event that returns the state of the endpoint or stream flow to the initial state, and incremented by
19 1 when it is determined that the acknowledgement to the transfer completion has been received
20 by the target MA USB device PAL, with wraparound to 0 after reaching the maximum value of
21 aMaxRequestID.
22 SeqNumberO (24 bits, unsigned): The Sequence Number value to be placed into the next original
23 TransferReq packet that the host transmits; initialized to 0 at session initialization or upon any
24 configuration event that returns the state of the endpoint or stream flow to the initial state, and
25 incremented by 1 when an original TransferReq packet is transmitted, with wraparound to 0 after
26 reaching the maximum value of aMaxSequenceNumber.
27 EarliestUnacknowledgedO (24 bits, unsigned): The Sequence Number value of the earliest
28 transmitted but unacknowledged TransferReq packet; initialized to 0 at session initialization or
29 upon any configuration event that returns the state of the endpoint or stream flow to the initial
30 state, and incremented throughout the transfer as described below, with wraparound to 0 after
31 reaching the maximum value of aMaxSequenceNumber.
32 TransferReqRetriesO (unsigned): The reload value of the TransferReqRetryCounterO[] counters,
33 set to aControlTransferRetries, aBulkTransferRetries or aInterruptTransferRetries for control,
34 bulk and interrupt transfers respectively.
Page 60
Media Agnostic Universal Serial Bus Specification Release 1.0
1 RxBufSizeO (25 bits, signed): The size (in bytes) of the target MA USB device buffer available to
2 transfers based on the most recent TransferResp packet received. An RxBufSizeO value of 0 or
3 negative suggests that the MA USB device may not be able to accept more TransferReq packets,
4 or may drop some of the already transmitted TransferReq packets assuming no change in the free
5 buffer available to transfers since the received TransferResp packet was.
6 The remaining state variables have a finer scope of a single MA USB transfer targeting the endpoint
7 or stream; specifically, for a given MA USB OUT transfer with Request ID equal to r,
8 RemSizeO[r] (32 bits, unsigned): The number of bytes that the MA USB host needs to transmit to
9 complete the transfer; set to the transfer size (in bytes) at transfer initialization, and decremented
10 throughout the transfer.
11 TransferErrorO[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE upon
12 detecting an error in the transfer.
13 TransferCompleteO[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE when
14 it is no longer necessary to track the state of the transfer.
15 TransferAcknowledgedO[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE
16 upon releasing a TransferAck packet to the assigned data channel that acknowledges the
17 TransferResp packet that indicated the completion of the transfer on the target endpoint or
18 stream.
19 ResponseTimerO[r] (signed): A decrementing counter to track the response time for a
20 TransferReq packet that requires an immediate exchange (Section 5.2.1.2); set to
21 aTransferTimeout every time a TransferReq packet that requires an immediate exchange is
22 released to the assigned data channel, and decremented by aTransferTimerTick at every transfer
23 timer tick event.
24 TransferReqRetryCounterO[r] (unsigned): A decrementing counter to track the number of retries
25 for a TransferReq packet belonging to the transfer that requires an immediate exchange (Section
26 5.2.1.2); set to TransferReqRetriesR when a new round of retries is to be attempted, and
27 decremented by 1 after each retry.
28 AckTransferSNO[r] (24 bits, unsigned): The value of the Sequence Number field in the last
29 TransferReq packet that belongs to the transfer and has the ARQ field set to 1.
30 NOTE — The last TransferReq packet for a transfer that has the ARQ field set to 1 can be different from the
31 TransferReq packet that carries the last portion of the payload belonging to the transfer. Also, setting the ARQ field
32 to 1 in a TransferReq packet (including a retransmitted packet) cancels the immediate exchan ge associated with any
33 earlier TransferReq packet with the ARQ field set to 1and belonging to the same transfer, i.e., for each transfer
34 request, there can be only one TransferReq packet that is waiting for acknowledgement.
35 The MA USB host PAL operation is defined in terms of the processes described below.
36 Initialization process
37 Invoked on any configuration event intended to return the state of the endpoint or stream flow to the
38 initial state.
39
40 I. Set RequestIDO = 0.
41 II. Set SeqNumberO = 0.
42 III. Set EarliestUnacknowledgedO = 0.
43 IV. Set RxBufSizeO = Initial size of the target MA USB device buffer available to transfers as
44 specified in Section 5.5.
Page 61
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — The SeqNumberO and EarliestUnacknowledged O variables keep increasing across successive transfers.
2 Transfer initialization process (starting a new transfer)
3 Invoked every time a new transfer request is initiated.
4
5 I. Select r = RequestIDO as the Request ID assigned to the transfer.
6 II. Initialize the following variables to manage the transfer,
7 (a) Set TransferErrorO[r] = FALSE.
8 (b) Set TransferCompleteO[r] = FALSE.
9 (c) Set EndOfTransferDetectedO[r] = FALSE.
10 (d) Set TransferAcknowledgedO[r] = FALSE.
11 (e) Set ResponseTimerO[r] = –1.
12 (f) Set RemSizeO[r] = Transfer size in bytes, as indicated by the application.
13 III. If there is no active request,
14 (a) Set ActiveRequestIDO = RequestIDO.
15 (b) Set EarliestRequestIDO = RequestIDO.
16 IV. Set RequestIDO = RequestIDO + 1.
17 NOTE — The difference between RequestIDO and EarliestRequestIDO does not exceed (aMaxRequestID + 1)/2 at
18 any point in time; the difference may be further limited by the total number of outstanding transfers that the target
19 MA USB device supports across all its endpoints and streams.
20 NOTE — The Status Code field in all outgoing TransferReq packets is set to NO_ERROR.
21 NOTE — Handling of possible local transmission failures is implementation-dependent.
22 TransferReq generation process
23 Invoked to generate TransferReq packets as long as there is a transfer request.
24
25 I. While ActiveRequestIDO < RequestIDO,
26 (a) Set r = ActiveRequestIDO.
27 (b) Let PayloadSize (implementation-dependent) denote the payload size for the next
28 TransferReq packet to be generated, with 0 < PayloadSize ≤ RemSizeO[r].
29 (c) Set RemSizeO[r] = RemSizeO[r] – PayloadSize.
30 (d) Submit a TransferReq packet to the TransferReq transmission process, with the
31 Request ID field set to r, the Sequence Number field set to SeqNumberO, the
32 Remaining Size field set to RemSizeO[r], the Retry field set to 0, and the ARQ field
33 set to 0 or 1.
34 (e) Set SeqNumberO = SeqNumberO + 1.
35 (f) Set RemSizeO[r] = RemSizeO[r] – PayloadSize.
36 (g) If RemSizeO[r] = 0, set ActiveRequestIDO = ActiveRequestIDO + 1.
37 NOTE — Transfer payload is not removed from the MA USB host memory until an acknowledgement is received
38 that indicates the completion of the transfer on the target endpoint or stream.
Page 62
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (b) Set RxBufSizeO = RxBufSizeO – PayloadSize/CCUnit×CCUnit
2 (c) If AckRequest = 1,
3 (1) Set AckTransferSNO[r] = SN.
4 (2) Set ResponseTimerO[r] = aTransferTimeout.
5 (3) Set TransferReqRetryCounterO[r] = TransferReqRetriesO.
6 III. Otherwise, try to transmit the packet at a later time (flow control event).
7 NOTE — CCUnit is the target endpoint credit consumption unit, as indicated by the Credit Consumption Unit
8 (CCU) field in the EPHandleResp packet returning the EP handle of the target endpoint (Section 7.3.2.2).
9 NOTE — If the target MA USB device PAL indicates support for Elastic Buffer Capability, the MA USB host may
10 still proceed with transmitting a TransferReq packet with RxBufSizeO <PayloadSize/CCUnit×CCUnit.
11 Implementations must balance the trade-off between aggressive transmission and possible packet loss as a result of
12 buffer overrun at the target MA USB device.
Page 63
Media Agnostic Universal Serial Bus Specification Release 1.0
1 MISSING_SEQUENCE_NUMBER status, except possibly to use these packets to update its estimate of the target
2 MA USB device available buffer. This optional behavior is not reflected in the transfer description.
3 NOTE — A DROPPED_PACKET status indicates that a TransferReq packet was received but could not be admitted
4 into local buffer; the MA USB host PAL may use this additional knowledge to pace its transmission rate.
5 (1) If Status equals any of the non-recoverable transfer errors,
6 (i) Set TransferErrorO[r] = TRUE.
7 TransferAck transmission process
8 Invoked to release a TransferAck packet to the assigned data channel.
9
10 I. Let r and SN respectively denote the values of the Request ID and Sequence Number fields
11 of the received packet.
12 II. Release the TransferAck packet to the assigned data channel.
13 III. For each open transfer request u in the interval EarliestRequestIDO ≤ u ≤ r,
14 (a) Set TransferAcknowledgedO[r] = TRUE.
15 (b) Set TransferCompletionTimerO[u] = aMaxTransferLifetime.
16 Timer process
17 Invoked at every transfer timer tick event, as long as there is an active transfer request.
18
19 I. For each open transfer request u in the interval EarliestRequestIDR ≤ u < ActiveRequestIDR,
20 and in increasing order of u,
21 (a) If TransferAcknowledgedO[u] = TRUE,
22 (1) Set TransferCompletionTimerO[u] = TransferCompletionTimerO[u] –
23 aTransferTimerTick.
24 (2) If TransferCompletionTimerO[u] ≤ 0, set TransferCompleteO[u] = TRUE.
25 (3) Otherwise, set EarliestRequestIDO = u and break the loop (go to Step II).
26 (b) Otherwise, set EarliestRequestIDO = u and break the loop (go to Step II).
27 II. For each open transfer request u in the interval EarliestRequestIDO ≤ u ≤ r, and in the
28 increasing order of u,
29 (a) If ResponseTimerO[u] > 0,
30 (1) Set ResponseTimerO[u] = ResponseTimerO[u] – aTransferTimerTick.
31 (2) If ResponseTimerO[u] ≤ 0,
32 (i) If TransferReqRetryCounterO[u] > 0,
33 (a) Submit the TransferReq packet that requires acknowledgement
34 to the TransferReq transmission process, with all packet fields
35 the same, except the Retry field, which is set to 1.
36 (b) Set ResponseTimerO[u] = aTransferTimeout.
37 (c) Set TransferReqRetryCounterO[u] =
38 TransferReqRetryCounterO[u] – 1.
39 (ii) Otherwise,
40 (a) Start the Ping protocol (Section 5.2.2).
41 (b) If the Ping protocol is successful, optionally,
42 (1) Set ResponseTimerO[u] = aTransferTimeout.
43 (2) Set TransferReqRetryCounterO[u] =
44 TransferReqRetriesO.
45 (3) Quit the Timer process and wait for the next transfer
46 timer tick event.
47 (c) If the Ping protocol fails,
Page 64
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (1) Set TransferErrorO[u] = TRUE.
2 (2) Indicate a transfer timeout error to the application, and
3 wait for a corrective action.
4 5.5.2.2 MA USB device PAL operation
5 The MA USB device operation is defined in terms of a series of state variables maintained in the context
6 of a single target endpoint or stream,
7 RequestIDR (8 bits, unsigned): The Request ID value of the next original transfer request;
8 initialized to 0 at session initialization or upon any configuration event that returns the state of
9 the endpoint or stream flow to the initial state, and incremented by 1 when a new transfer request
10 is accepted, with wraparound to 0 after reaching the maximum value of aMaxRequestID.
11 EarliestRequestIDR (8 bits, unsigned): The Request ID value of the earliest transfer request
12 whose state needs to be tracked; initialized to 0 at session initialization or upon any configuration
13 event that returns the state of the endpoint or stream flow to the initial state, and incremented by
14 1 when the transfer completion on the target endpoint or stream has been acknowledged, with
15 wraparound to 0 after reaching the maximum value of aMaxRequestID.
16 SeqNumberR (24 bits, unsigned): Expected value of the Sequence Number field of the next
17 original TransferReq packet to be received; initialized to 0 at session initialization or upon any
18 configuration event that returns the state of the endpoint or stream flow to the initial state, and
19 incremented by 1 every time an original TransferReq packet is received and successfully
20 admitted to the receive buffer, with wraparound to 0 after reaching the maximum value of
21 aMaxSequenceNumber.
22 ResponseTimerR (signed): A decrementing counter to track the response time for a TransferResp
23 packet that requires an immediate exchange (Section 5.2.1.2); set to aTransferTimeout every
24 time a TransferResp packet that requires an immediate exchange is released to the assigned data
25 channel, and decremented by aTransferTimerTick at every transfer timer tick event.
26 TransferRespRetryCounterR (unsigned): A decrementing counter to track the retries of a
27 TransferResp packet that requires an immediate exchange (Section 5.2.1.2); set to
28 TransferRespRetriesO when a new round of retries is to be attempted, and decremented by 1 after
29 each retry.
30 TransferRespRetriesR (unsigned): The reload value of the TransferRespRetryCounterR counter,
31 set to aControlTransferRetries, aBulkTransferRetries or aInterruptTransferRetries for control,
32 bulk and interrupt transfers, respectively.
33 RxBufSizeR (32 bits, unsigned): Size (in bytes) of the receive buffer available to the target
34 endpoint or stream.
35 OccupancyR (unsigned): Size (in bytes) of the payload accepted into the receive buffer.
36 The remaining state variables have a finer scope of a single MA USB transfer targeting the endpoint or
37 stream; specifically, for a given MA USB OUT transfer with Request ID equal to r,
38 RemSizeR[r] (32 bits, unsigned): The number of bytes expected to be received; set to the value of
39 the Remaining Size field in the first TransferReq packet belonging to the transfer, and
40 decremented throughout the transfer.
41 TransferErrorR[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE upon
42 detecting an error in the transfer.
Page 65
Media Agnostic Universal Serial Bus Specification Release 1.0
1 TransferCompleteR[r] (boolean): Set to FALSE at transfer initialization, and set to TRUE when it
2 is no longer necessary to track the state of the transfer.
3 EndOfTransferDetectedR[r]: A boolean variable initialized to FALSE at transfer initialization,
4 and set to TRUE when the transfer payload has been delivered to the target endpoint or stream,
5 with or without error.
6 The MA USB device PAL operation is defined in terms of the processes described below.
7 Initialization process
8 Invoked on any configuration event intended to return the state of an endpoint or stream flow to the
9 initial state.
10
11 I. Set RequestIDR = 0.
12 II. Set EarliestRequestIDR = 0.
13 III. Set SeqNumberR = 0.
14 IV. Set OccupancyR = 0.
15 V. Set RxBufSizeR = Initial value of the receive buffer size.
16 NOTE — The SeqNumberR variable keep increasing across successive transfers.
Page 66
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (b) If PayloadSize + OccupancyR ≤ RxBufSizeR, or if the Elastic Buffer (Section 5.5.1)
2 capability is supported,
3 (1) If r = RequestIDR,
4 (i) Create a new transfer with Request ID value r.
5 (ii) Set TransferErrorR[r] = FALSE.
6 (iii) Set TransferCompleteR[r] = FALSE.
7 (iv) Set EndOfTransferDetectedR[r] = FALSE.
8 (v) Set RequestIDR = RequestIDR +1.
9 (2) Set SeqNumberR = SeqNumberR + 1.
10 (3) Set OccupancyR = OccupancyR + PayloadSize.
11 (4) If AckRequest = 1, or OccupancyR > RxBufSizeR, or optionally,
12 (i) Submit a TransferResp packet to the TransferResp transmission
13 process with the Request ID field set to ActiveRequestIDR, the
14 Sequence Number field set to SeqNumberR – 1, the Credit field set to
15 RxBufSizeR – OccupancyR, the Retry and EoT fields set to 0, and the
16 Status Code field set to NO_ERROR.
17 (c) Otherwise,
18 (1) Drop the TransferReq packet.
19 (2) Submit a TransferResp packet to the TransferResp transmission process with
20 the Request ID field set to r, the Sequence Number field set to SeqNumberR –
21 1, the Credit field set to RxBufSizeR – OccupancyR, the Retry and EoT fields
22 set to 0, and the Status Code field set to DROPPED_PACKET if the Drop
23 Notification (Section 6.3.3.2) capability is supported, and set to
24 MISSING_SEQUENCE_NUMBER otherwise.
25 TransferResp transmission process
26 Invoked to release a TransferResp packet to the assigned data channel.
27
28 I. Let EndOfTransfer denote the value of the EoT fields in the TransferResp packet.
29 II. Release the TransferResp packet to the assigned data channel.
30 III. If EndOfTransfer = 1, and ResponseTimerR ≤ 0,
31 (a) Set ResponseTimerR = aTransferTimeout.
32 (b) Set TransferRespRetryCounterR = TransferRespRetriesR.
33 TransferAck reception process
34 Invoked upon receiving a TransferAck packet.
35
36 I. Let r denote the value of the Request ID field in the received TransferAck packet.
37 II. If r < EarliestRequestIDR or r > RequestIDR, drop the TransferAck packet.
38 III. Otherwise,
39 (a) For each open transfer request u in the interval EarliestRequestIDR ≤ u ≤ r, and in
40 increasing order of u, set TransferCompleteR[u] = TRUE.
41 Payload delivery process
42 Invoked to deliver the transfer payload to the target endpoint or stream.
43
44 I. Attempt to deliver the payload to the target endpoint or stream.
45 Payload delivery confirmation process
46 Invoked to indicate successful or failed completion of payload delivery for transfer request r to the target
47 endpoint or stream.
Page 67
Media Agnostic Universal Serial Bus Specification Release 1.0
1
2 I. If payload delivery has failed, or optionally,
3 (a) Set EndOfTransferDetectedR[r] = TRUE.
4 (b) Submit a TransferResp packet to the TransferResp transmission process with the
5 Request ID field set to r, the Sequence Number field set to SeqNumberR – 1, the
6 Credit field set to RxBufSizeR – OccupancyR, the Retry field set to 0, the Retry field
7 set to 0, the EoT field set to 1, and the Status Code field set to NO_ERROR or
8 appropriate error code.
9 NOTE — A TransferResp packet with the Request ID field set to r and the EoT field set to 1 indicates successful or
10 failed delivery of the payload belonging to transfer r to the target endpoint or stream, as well as successful delivery
11 of the payload belonging to all past transfer requests .
12 Buffer size change process
13 Invoked to change the buffer size available to the target endpoint or stream.
14
15 I. Change the receive buffer size, and
16 (a) Set RxBufSizeR to the new buffer size value.
17 (b) Optionally, submit a TransferResp packet to the TransferResp transmission process
18 with the Request ID field set to ActiveRequestIDR, the Sequence Number field set to
19 SeqNumberR – 1, the Credit field set to RxBufSizeR – OccupancyR, the Retry and EoT
20 fields set to 0, and the Status Code field set to NO_ERROR.
21 NOTE — The buffer used by a transfer that has completed delivery to the target endpoint or stream cannot be
22 assumed to be available before receiving the MA USB host PAL acknowledgement to the delivery completion.
23 Timer process
24 Invoked at every transfer time event, as long as there is an active transfer request.
25
26 I. If ResponseTimerR > 0,
27 (a) Set ResponseTimerR = ResponseTimerR – aTransferTimerTick.
28 (b) If ResponseTimerR ≤0,
29 (1) If TransferRespRetryCounterR > 0,
30 (i) Submit the earliest TransferResp packet that requires
31 acknowledgement to the TransferResp transmission process with all
32 packet fields the same, except possibly the Sequence Number field,
33 which is set to SeqNumberR – 1, and the Credit field, which is set to
34 RxBufSizeR – OccupancyR.
35 (ii) Set ResponseTimerR = aTransferTimeout.
36 (iii) Set TransferRespRetryCounterR = TransferRespRetryCounterR – 1.
37 (2) Otherwise, wait indefinitely for corrective actions, or optionally,
38 (i) Start the Ping protocol (Section 5.2.2).
39 (ii) If the Ping protocol is successful, optionally,
40 (a) Set ResponseTimerR = aTransferTimeout.
41 (b) Set TransferRespRetryCounterR = TransferRespRetriesR.
42 (c) Quit the Timer process and wait for the next transfer timer tick
43 event.
44 (iii) If the Ping protocol fails, or if the optional path in the previous step is
45 not followed,
46 (a) Set TransferErrorR[EarliestRequestIDR] = TRUE.
47 (b) Indicate a transfer timeout error to the application, and wait for
48 a corrective action.
Page 68
Media Agnostic Universal Serial Bus Specification Release 1.0
1 5.6 Link-managed OUT transfers
2 The link-managed (l-managed) transfer model assumes a connection-oriented operation with end-to-end
3 flow control between the target USB endpoint and the MA USB host PAL. It simplifies the transfer
4 protocol by relying on link-level flow control.
5 A complete l-managed transfer consists of three phases,
6 Set up phase, when link resources are set up and allocated to the transfer
7 Data phase, when data flows between the client buffer on the host system and the target USB
8 endpoint
9 Tear down phase, when the link resources allocated to the transfer are released
10 MA USB host normally follows the same model for all transfers targeting a given USB endpoint as long
11 as the endpoint is active. For example, to write to a bulk OUT endpoint on a continuous basis, the MA
12 USB host may set up the required link resources to support a link-managed transfer once, use the
13 established flow-controlled connection to transfer data to the target endpoint as long as the endpoint is
14 active, and tear down the connection only after the target USB endpoint is not operational. Alternatively,
15 the MA USB host may frequently release the link resources allocated to a transfer and allocate them to a
16 different transfer targeting a different endpoint on a time-shared basis, making the set up and tear down
17 phases more frequent.
Page 69
Media Agnostic Universal Serial Bus Specification Release 1.0
1 a payload size restriction), the payload size for each TransferReq packet belonging to a transfer is a
2 multiple of the maximum packet size the target endpoint supports, i.e., a multiple of the
3 wMaxPacketSize field of the target endpoint descriptor. All TransferReq packets belonging to the same
4 transfer carry the same number for the Request ID field. Request ID is selected by the MA USB host and
5 shall be unique within the scope of a target endpoint. The MA USB host may send other TransferReq
6 packets with different Request IDs before it has received all required TransferResp packet for a given
7 Request ID. The Request ID used for each new transfer shall be strictly increasing, with no gaps. The
8 MA USB host shall not have more than one pending transfer using the same Request ID and targeting
9 the same endpoint. To enable the MA USB device to identify missing data packets, each TransferReq
10 packet carries a sequence number, which is set to zero in the first TransferReq packet for a given
11 transfer, and is incremented by one in every subsequent TransferReq packet. In addition, each
12 TransferReq packet carries in its Transfer Size field the number of remaining bytes for the transfer
13 assuming the payload in the packet is successfully processed by the MA USB device.
14 The target MA USB device shall send a Transfer Response (TransferResp) packet (Section 6.5.3) to the
15 MA USB host once one of the following conditions occurs,
16 The payload in the final TransferReq packet belonging to a transfer (as marked by Remaining
17 Size field set to zero) is successfully delivered to the target endpoint: In this case, the target MA
18 USB device shall send a TransferResp packet with the Request ID and Sequence Number fields
19 set to the same values as those in the final TransferReq packet, the Remaining Size field set to 0,
20 and the Status field set to SUCCESS.
21 Delivering the payload in any of the TransferReq packets belonging to a transfer to the target
22 endpoint faces a locally non-recoverable error: In this case, the target MA USB device shall send
23 a TransferResp packet with the Request ID and Sequence Number fields set to the same values
24 as those in the TransferReq packet whose payload experienced the error, the Remaining Size
25 field set to the transfer size minus the number of bytes successfully delivered to the endpoint,
26 and the Status field set to an appropriate error code from the list in Table 6.
27 The interval between when the final TransferReq packet is received by the target MA USB device and
28 when the corresponding TransferResp packet appears over the link on the MA USB device side shall not
29 exceed aTransferKeepAlive. If the MA USB host does not receive a TransferResp packet by
30 aTransferKeepAlive after it has successfully submitted the final TransferReq packet for a transfer for
31 transmission, it shall attempt to solicit a TransferResp packet by sending another TransferReq packet
32 with all packet fields set to the same values as those in the final TransferReq packet for the transfer,
33 except for the Retry bit, which is set to 1. If necessary, the MA USB host shall repeat sending the
34 TransferReq packet for a maximum number of times equal to aControlTransferRetries for control
35 transfers, aBulkTransferRetries for bulk transfers and aInterruptTransferRetries for interrupt transfers.
36 The number of retries does not include the number of possible local retries before a TransferReq packet
37 is successfully submitted for transmission. If no TransferResp packet is received after the maximum
38 number of retries allowable for the transfer type, the MA USB host shall return the appropriate USBDI
39 error to the application indicating the transfer failure, and shall start the tear down phase of the transfer.
40 From the MA USB host perspective, an OUT transfer is complete when one of the following conditions
41 occurs,
42 MA USB host receives a TransferResp packet with the Status field set to a value other than
43 SUCCESS: In this case, MA USB host shall return to the application a status code that indicates
44 failure of the write request that prompted the MA USB transfer, as well as the reason for the
45 failure. MA USB host may also return the number of bytes confirmed to be delivered to the
46 target endpoint.
Page 70
Media Agnostic Universal Serial Bus Specification Release 1.0
1 MA USB host receives a TransferResp packet with the Status field set to SUCCESS and the
2 Remaining Size field set to zero: In this case, if the final TransferReq packet associated with the
3 transfer has not been sent, or the Sequence Number in the TransferResp packet does not equal
4 the Sequence Number in the final TransferReq packet, the MA USB host shall return to the
5 application a status code that indicates failure of the write request that prompted the MA USB
6 transfer, as well as the reason for the failure. The MA USB host may additionally return the
7 number of bytes that were confirmed to be delivered to the target endpoint. If the final
8 TransferReq packet associated with the transfer has been sent, and the Sequence Number in the
9 TransferResp packet equals the Sequence Number in the final TransferReq packet, the MA USB
10 host shall assume the OUT transfer is complete with no error. Once all OUT transfers serving a
11 common application- level write request are complete with no error, the MA USB host shall
12 return a status code to the application that indicates the success of the write request.
13 At any point during the set up or data phase of an l-managed transfer, the MA USB host may start the
14 tear down phase by tearing down the lower-layer link resources set up in support of the transfer, and
15 sending a Transfer Tear Down Confirmation (TransferTearDownConf) packet (Section 6.4.3) to the
16 target MA USB device on the control channel. The TransferTearDownConf packet is not retried at the
17 PAL level. It is simply a confirmation that the MA USB host will not send more TransferReq packets on
18 the target endpoint following the packet. A target MA USB device that detects releasing of lower-layer
19 link resources associated with an l-managed transfer on a target endpoint, or receives a
20 TransferTearDownConf packet for an l-managed transfer on a target endpoint, shall stop sending
21 TransferResp packets for any pending transfer requests, and shall silently discard all transfer requests
22 associated with the target endpoint.
23 Figure 19 illustrates the three phases of l-managed OUT transfers. In the scenario shown in the figure,
24 the first OUT transfer (which completes with no error) goes through set up and data phases, and the
25 second transfer (which experiences a STALL error) goes through data and tear down phases.
26
Page 71
Media Agnostic Universal Serial Bus Specification Release 1.0
TransferSetupResp
(MA USB EP Handle ep, Connection ID id)
flow-controlled
TransferReq(Request Id r, Sequence No. 3,
ERDY
Remaining Size S4≤S3) Link-level flow control; MA USB device cannot
MA USB host flow-controlled accept more TransferReq packets (when the flow
control event is cleared is not shown in the picture)
TransferReq(Request Id r, Sequence No. 4, USB data flow
Remaining Size S5=0) resumes
Page 72
Media Agnostic Universal Serial Bus Specification Release 1.0
1 managed transfer set up may be unsuccessful due to resource limitations, even if the target endpoint has
2 indicated support for l-managed transfer mode.
Page 73
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (For control IN and OUT transfers) includes the 8 bytes of setup data as payload.
2 (For control OUT transfers) includes as many bytes of the control write data that the target MA
3 USB device can accept.
4 A device shall transmit a TransferResp packet to the start of a new control transfer. For control OUT
5 transfers, the TransferResp packet shall include the Credit field for subsequent data TransferReq packets
6 and initialize its expected sequence number to 1.
Page 74
Media Agnostic Universal Serial Bus Specification Release 1.0
1 5.9 Interrupt transfers
2 Interrupt transfers are generally non periodic transfers which require bounded latency. In a USB
3 interrupt IN transfer the host regularly polls the device. In MA USB however, interrupt IN transfers use
4 the MA USB IN transfer defined in Section 5.4, where the host issues a transfer request and waits for the
5 response from the device. The behavior of the MA USB host and the MA USB device in case of a
6 pending response is also described in Section 5.4.
7 Similarly, Interrupt OUT transfers use MA USB OUT transfers defined in Sections 5.5 and 5.6.
25 The size of an isochronous transfer is specified by the application, and can span consecutive target
26 Service Intervals. The size of each segment depends on the isochronous endpoint attributes and the
27 amount of data available at the time of transfer. For example, an application- level read request for 4
28 segments, which targets an Enhanced SuperSpeed isochronous IN endpoint with a Service Interval of 4
29 milliseconds (bInterval = 6), maximum USB packet size of 1024 bytes (wMaxPacketSize =1024), up to
30 three packet bursts in each Service Interval (bmAttributes = 2), and up to 16 USB packets in each burst
31 (bMaxBurst =15) should secure enough buffer to receive up to 48 KB (1024 * 3 * 16 bytes) for each
32 segment, or up to 192 KB in total. The target endpoint in this example may not generate the maximum
33 of 48 KB over each target SI, resulting in isochronous segments that are smaller than 48 KB, and an MA
34 USB isochronous transfer size of less than 192 KB.
35 NOTE — The bmAttributes and bMaxBurst parameters belong to the Enhanced SuperSpeed Endpoint Companion
36 descriptor in this example.
37 The MA USB isochronous transfer model has been designed with the following observations,
38 Isochronous segments can see a wide variation in size (zero bytes to 48 KB for an Enhanced
39 SuperSpeed endpoint)
40 Different links to different MA USB devices can have different MTU values, even if they
41 employ the same technology (native Wi-Fi, native WiGig, IP, etc.)
42 Acknowledging isochronous data packets at the MA USB protocol level is generally difficult or
43 inefficient over half-duplex links such as native Wi-Fi and WiGig
Page 75
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Isochronous data packets may be delivered out-of-order with some network technologies and
2 link protocol choices
3 Application-level data units are generally not aligned with USB isochronous packets, nor are
4 they fully contained within an isochronous segment (the collective isochronous payload
5 delivered over a Service Interval); a single application- level data unit may span multiple USB
6 isochronous packets or even multiple isochronous segments
7 There is no protocol-level retransmission defined for MA USB isochronous data packets. The
8 underlying link is expected to provide a reasonable reliability with the understanding that isochronous
9 applications are tolerant to data loss. It is recommended to implement some level of reliability in the
10 form of limited retransmissions at the network layer to support isochronous applications.
11 5.10.1 Packetization
12 MA USB isochronous transfers make use of two data packet subtypes: Isochronous Transfer Request
13 (IsochTransferReq) packet, which is used to initiate an IN or OUT transfer, and also to carry
14 isochronous payload for OUT transfers, and Isochronous Transfer Response (IsochTransferResp), which
15 is used to provide transfer status updates and also to carry isochronous payload for IN transfers.
16 Each MA USB isochronous transfer may use multiple isochronous data packets to carry one or more
17 isochronous segments. Some isochronous segments may experience fragmentation as a result of
18 packetization. Conversely, small isochronous segments belonging to the same transfer may be carried
19 inside the same isochronous data packet for transport efficiency. A complete or partial isochronous
20 segment carried inside an isochronous data packet is referred to as an isochronous data block, or data
21 block for short. To be able to identify and reassemble the fragments of an isochronous segment, and also
22 to be able to pack multiple isochronous segments in each isochronous data packet, each isochronous data
23 packet with payload also carries a set of isochronous headers associated with the data blocks in the
24 packet. The format of isochronous data blocks and associated isochronous headers is defined in Section
25 5.10.1.1. For isochronous IN transfers, the MA USB host needs to specify the isochronous transfer size
26 in the form of a series of maximum segment length values, where each value in the series indicates the
27 size of the largest isochronous segment that the MA USB host can accept during one or more
28 consecutive target Service Intervals. Maximum segment length values are defined in the form of a series
29 of isochronous read size (IRS) blocks, where each block defines the maximum acceptable segment
30 length for a number of consecutive target Service Intervals. The format of IRS block is defined in
31 Section 5.10.1.2.
32 Figure 21 illustrates the isochronous data packet formats for isochronous IN and OUT transfers.
Page 76
Media Agnostic Universal Serial Bus Specification Release 1.0
Isochronous data Isochronous data Isochronous data Isochronous data
packet header packet header packet header packet header
Isochronous Transfer Request Isochronous Transfer Response Isochronous Transfer Request Isochronous Transfer Response
(IsochTransferReq) (IsochTransferResp) (IsochTransferReq) (IsochTransferResp)
Page 77
Media Agnostic Universal Serial Bus Specification Release 1.0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Isochronous header 1 (1, 2 or 3 DWORDs – all segment headers in the packet have the same length)
Isochronous header 2 (1, 2 or 3 DWORDs – all segment headers in the packet have the same length)
Isochronous header N (1, 2 or 3 DWORDs – all segment headers in the packet have the same length)
Page 78
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — The long format for isochronous headers shall not be used unless the packet is carrying a fragment of an
2 isochronous segment that is larger than 64 KB. This does not happen with FS, HS and Enhanced SuperSpeed
3 isochronous endpoints.
b0 b15 b0 b11 b0 b3
Block Length Segment Number S-Flags
Bits: 16 12 4
Short format (4 bytes, does not support fragmentation)
Bits: 16 12 4 16 16
Standard format (8 bytes, supports fragmentation of segments as large as 64 KBytes)
Bits: 16 12 4 32 32
Long format (12 bytes, supports fragmentation of segments as large as 4 GBytes)
4
5 Figure 23—Isochronous header formats
6 The 16-bit Block Length field carries the length of the associated data block in bytes.
7 The 12-bit Segment Number identifies the segment the data block belongs to. Segment Number 0 refers
8 to the first segment belonging to an isochronous transfer, Segment Number 1 refers to the second
9 segment, and so on. Isochronous segments are sent in order, and segments with no data may be skipped,
10 i.e., the Segment Number fields observed in any isochronous data packet are strictly increasing but are
11 allowed to have gaps.
12 NOTE — MA USB architecture does not assume in-order delivery for isochronous data packets. Therefore, the
13 Segment Number fields across sequentially received isochronous data packets belonging to the same MA USB
14 transfer may not be strictly increasing.
15 NOTE — Any segment, including the first segment and the last segment of an isochronous transfer, may be skipped
16 if it carries no data. Alternatively, an isochronous header with the Block Length field set to 0 and the Fragment bit
17 (see below) set to 0 may be used to indicate a zero-payload (null) data block. No null data block shall be sent with
18 the Fragment bit set to 1.
19 The 4-bit S-Flags field defines the contents of the data block, and also carries information related to the
20 fragment transport and reassembly in case the associated data block is carrying a fragment. The field is
21 shown in Figure 24, with the subfields defined in Table 1.
b0 b1 b2 b3
Fragment Last Fragment Reserved
22
23 Figure 24—S-Flags field
24 Table 1—S-Flags subfields
Bit(s) Description
b0 Fragment. Set to 1 if the data block associated with the isochronous header is
carrying an incomplete isochronous segment (a fragment), and 0 otherwise.
This subfield is set to zero in short isochronous headers with no fragmentation
support.
Page 79
Media Agnostic Universal Serial Bus Specification Release 1.0
b1 Last Fragment. Set to 1 if the carried fragment is the last fragment of an
isochronous segment, and 0 otherwise. This subfield is defined only when the
Fragment subfield is set to 1, and is reserved otherwise.
b3, b2 Reserved.
1 The long and extended isochronous header formats include two more fields:
2 The Segment Length field indicates the length of the isochronous segment in bytes, i.e., the sum
3 of the lengths of all data blocks carrying the segment. The field is 2 bytes long in the long format
4 and 4 bytes long in the extended format.
5 The Fragment Offset field indicates the byte offset of the carried fragment relative to the
6 segment beginning. The field is 2 bytes long in the long format and 4 bytes long in the extended
7 format.
8 NOTE — The short, long and extended isochronous header formats are defined to support very large isochronous
9 segments as USB technology evolves while staying bit-efficient when carrying small segments.
10 NOTE — An isochronous header with long or extended format that corresponds to a full isochronous segment (i.e.,
11 no fragment) has the Segment Length and Block Length fields set to the segment size, and the Fragment Offset field
12 set to 0.
13 The Last Fragment bit of the S-Flags field is set to 1 to indicate that the fragment carried by the
14 isochronous data block is the last fragment of an isochronous segment.
15 NOTE — The Last Fragment bit has been defined to accelerate the logic to detect the last fragment of an
16 isochronous segment; the Last Fragment bit is logically equ ivalent to the following Boolean function,
17 Segment Length = Fragment Offset + Block Length
18 NOTE — The Last Fragment bit (or the equivalent Boolean function above) assists the packet receiver in
19 reassembly and delivery of fragmented segments. However, implementations must be prepared for the loss of the
20 isochronous data packet that contains the last fragment of an isochronous segment. See Sections 5.10.2 and 5.10.3
21 for details.
22 No isochronous data packet shall include more than two fragments. The first fragment, if present, shall
23 satisfy exactly one of the following conditions. The second fragment, if present, shall satisfy the third
24 condition.
25 (1) The fragment is the last fragment of an isochronous segment (Last Fragment = 1), and is carried
26 by the first data block in the isochronous data packet.
27 (2) The fragment is a fragment in the middle of an isochronous segment (Last Fragment = 0,
28 Fragment Offset ≠ 0), and is carried by the only data block present in the isochronous data
29 packet.
30 (3) The fragment is the first fragment of an isochronous segment (Fragment Offset field = 0), and is
31 carried by the last data block in the isochronous data packet.
32 Isochronous transfers are expected to operate correctly with packet loss. Loss of an isochronous data
33 packet translates to partial or complete loss of some isochronous segments. Segments experiencing
34 partial loss may be discarded, or may be delivered to the USB application or the target endpoint up to
35 anywhere before the lost bytes in the segment. No incomplete segments shall be delivered with lost
36 bytes (gap) in the middle. Device and host implementations should balance their use of fragmentation
37 (packetization efficiency) against increased likelihood of dropped or incomplete segments. For example,
38 all packetization schemes in Figure 25 send the same number of isochronous segments using the same
39 number of isochronous data packets, but they are different in the number of isochronous segments they
40 subject to fragmentation and potential partial loss.
Page 80
Media Agnostic Universal Serial Bus Specification Release 1.0
Segment 1 Segment 2 Segment 3 Segment 1 Segment 2 Segment 3 Segment 1 Segment 2
MA USB MA USB MA USB
Packet 1 Packet 1 Packet 1
Fragment=0 Fragment=0 Fragment=1 Fragment=0 Fragment=0 Fragment=1 Fragment=0 Fragment=0
Isochronous read size block 1 (1 or 2 DWORDs – all read size blocks in the packet have the same length)
Isochronous read size block 2 (1 or 2 DWORDs – all read size blocks in the packet have the same length)
Isochronous read size block M (1 or 2 DWORDs – all read size blocks in the packet have the same length)
21
22 Figure 26—Format of Isochronous Transfer Request packets for IN transfers
23 All IRS blocks in a packet have the same length, which can be 4 or 8 bytes. The format (and length) of
24 these blocks is defined by the Isochronous Header Type field (Section 6.5.1.8) in the IsochTransferReq
25 packet header. Specifically, all IRS blocks in a packet take one of the two forms shown in Figure 27,
Page 81
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The standard format (Isochronous Header Format = 0) is 4 bytes in length and allows maximum
2 segment length values of up to 1 MB; the segment size available through this format is sufficient
3 to support FS, HS and Enhanced SuperSpeed USB devices.
4 The long format (Isochronous Header Format = 1) is 8 bytes in length, and allows maximum
5 segment length values of up to 4 GB; this format is defined to be able to support future revisions
6 of the USB protocol.
7 NOTE — Each IRS block is transmitted staring with Bit 0 of the Service Intervals field and ending with Bit 19
8 (standard format) or bit 31 (extended format) of the Maximum Segment Length field.
9 NOTE — The common format for all IRS blocks in a packet is to enable efficient packet processing. IRS blocks in
10 different packets (including packets that target the same endpoint) may assume different formats.
11 NOTE — The long format for IRS blocks shall not be used unles s the IsochTransferReq packet needs to specify at
12 least one Maximum Segment Length value that exceeds 1 MB. This does not happen with FS, HS and Enhanced
13 SuperSpeed isochronous endpoints.
b0 b11 b0 b19
Service Intervals Maximum Segment Length
Bits: 12 20
Standard format (4 bytes, supports segment lengths of up to 1 MByte)
Bits: 12 20 32
Long format (8 bytes, supports segment lengths of up to 4 GBytes)
14
15 Figure 27—Isochronous read size block formats
16 The 12-bit Service Intervals field defines the number of consecutive target Service Intervals to which the
17 IRS block applies.
18 The Maximum Segment Length field indicates the size of the largest isochronous segment (in bytes) that
19 the MA USB host can receive during any of the target Service Intervals the IRS block applies to.
20 The IRS blocks in an IsochTransferReq packet apply to the target Service Intervals in strict order. For
21 example, an IsochTransferReq packet that includes exactly two IRS blocks, with Service Intervals fields
22 respectively set to S1 and S2 intervals, and Maximum Segment Length fields respectively set to M1 and
23 M2 , specifies a maximum segment length of M1 for the first S1 target service intervals, and a maximum
24 segment length of M2 for the next S2 target service intervals. IsochTransferReq packets shall not include
25 an IRS block with the Service Intervals field set to 0. The sum of the values in the Service Intervals
26 fields of all IRS blocks in an IsochTransferReq packet shall be equal to the value of the Number of
27 Segments field in the IsochTransferReq packet header (Section 6.5.5).
28 NOTE — Application-level isochronous IN requests that target a large number of Service Intervals with disparate
29 maximu m segment length values may result in a large number of IRS blocks. The MA USB host PAL may service
30 such requests through multiple MA USB isochronous transfers to be able to meet the network MTU size for the
31 generated IsochTransferReq packets.
Page 82
Media Agnostic Universal Serial Bus Specification Release 1.0
1 specified by the application- level request, or may start “as soon as possible”, in which case its beginning
2 time is decided by the target MA USB device. The MA USB host fulfills the application-level request
3 through one or more MA USB isochronous IN transfers, which have the same general semantics as the
4 application- level request; in particular, each MA USB isochronous IN transfer targets an isochronous IN
5 endpoint over one or more Service Intervals, which may start at a specified time in the future, or at the
6 convenience of the target MA USB device.
7 The MA USB host initiates an isochronous IN transfer by sending an Isochronous Transfer Request
8 (IsochTransferReq) packet (Section 6.5.5) to the target MA USB device, indicating the target
9 isochronous endpoint on the MA USB device, the Request ID assigned to the transfer request by the MA
10 USB host, the number of isochronous segments that are being requested (one segment for each Service
11 Interval), the beginning time of the first target Service Interval (in the Presentation Time field) or “as
12 soon as possible” delivery option (using the ASAP subfield in the I-Flags field), and a set of isochronous
13 read size (IRS) blocks as defined in Section 5.10.1.2.
14 The Request ID assigned to each transfer shall be unique within the scope of the target endpoint. The
15 MA USB host may initiate other isochronous IN transfers targeting the same endpoint before an ongoing
16 isochronous IN transfer has been completed. The rules for assigning Request IDs to successive
17 isochronous transfers are the same as other MA USB IN transfers; in particular, (1) Request ID starts at
18 zero for the first isochronous transfer after any configuration event intended to return the state of an
19 endpoint flow to the initial state, (2) Request ID is incremented by 1 for each successive request, and (3)
20 the MA USB host shall not have more than one pending isochronous transfer using the same Request ID
21 and targeting the same endpoint. The rules for assigning Sequence Numbers to successive
22 IsochTransferResp packets belonging to the same transfer (same request ID) are also the same as other
23 MA USB IN transfers, except that the Sequence Number field is reset to zero for every new MA USB
24 isochronous transfer. The Presentation Time field in successive IsochTransferReq packets that target the
25 same endpoint and do not indicate ASAP delivery shall be strictly increasing.
26 In response to an IsochTransferReq packet, the target MA USB device programs its local resources to
27 read from the target endpoint during the target Service Intervals. The read operation for each target
28 Service Interval may happen anytime during that Service Interval. The target MA USB device shall
29 packetize the isochronous payload as defined in Section 5.10.1, and shall transmit the payload back to
30 the MA USB host in the strict order it was received from the target endpoint, using one or more
31 Isochronous Transfer Response (IsochTransferResp) packets (Section 6.5.6). The target MA USB device
32 may choose to deliver the isochronous segments that suffer a partial loss over the local connection up to
33 any point before the first lost byte, including dropping them altogether. To reduce latency, the target MA
34 USB device should packetize and transmit isochronous segments as they become available, avoiding
35 excessive aggregation. Also, as discussed in Section 5.10.1, the target MA USB device should avoid
36 excessive fragmentation in the interest of higher likelihood of delivering error-free segments.
37 Each IsochTransferResp packet belonging to an isochronous IN transfer carries the Request ID that was
38 present in the IsochTransferReq packet that initiated the transfer. To enable the MA USB host to
39 identify missing isochronous data packets, each IsochTransferResp packet carries a sequence number,
40 which is set to zero in the first IsochTransferResp packet for a given transfer, and is incremented by one
41 in every subsequent IsochTransferResp packet belonging to that transfer. In addition, each
42 IsochTransferResp packet carries in its Presentation Time field the Global Time (MGT) pointing to the
43 beginning of the Service Interval corresponding to the first isochronous segment or fragment carried in
44 the packet. The EoT field shall be set to 0 in all IsochTransferResp packets belonging to an isochronous
45 IN transfer, except in the last packet, where it shall be set to 1. The EPS and Status Code fields in each
46 IsochTransferResp packet carry the status of the endpoint and the status code related to the transfer. The
47 actual transfer size (i.e., the total size of the payload generated by the target isochronous endpoint over
Page 83
Media Agnostic Universal Serial Bus Specification Release 1.0
1 target Service Intervals) may be smaller than the requested transfer size, including zero. The target MA
2 USB device shall transmit an IsochTransferResp packet (with Number of Segments field set to 0, and
3 EoT field set to 1) when the MA USB isochronous IN transfer has not generated any data.
4 NOTE — While isochronous data packets are allowed to be transmitted unreliably, it is recommended to exercise a
5 high reliability at lower layers when sending any IsochTransferReq packet that initiates an isochronous IN transfer,
6 the final IsochTransferResp packet belonging to an IN transfer, and also any IsochTransferResp packet that indicates
7 an error.
8 Figure 28 illustrates the lifecycle of an MA USB isochronous IN transfer with specified delivery time:
9 An IsochTransferReq packet initiates the transfer, targeting a remote isochronous IN endpoint over S
10 successive Service Intervals, with the first Service Interval starting at the MA USB Global Time of F:M
11 (Frame F, Microframe M). The target MA USB device, synchronized with the MA USB host, schedules
12 one or more isochronous IN transfers on the local bus, and packetizes and transmits isochronous
13 segments through one or more IsochTransferResp packets as segments become available.
14 NOTE — An MA USB isochronous IN transfer may also indicate “as soon as possible” (ASAP) delivery, in which
15 case the start time of the isochronous transfer on the local bus is decided by the MA USB device.
16 NOTE — A single application-level isochronous read request may be served by multiple MA USB transfers.
17 The Presentation Time field in all IsochTransferResp packets belonging to an MA USB transfer carries
18 the actual delivery time of the first isochronous segment (more precisely, the MGT value at the time the
19 first byte of the first isochronous segment was released to the local bus), except when the target MA
20 USB device experiences an error during the transfer (as indicated by the Status Code field in at least one
21 of the returned IsochTransferResp packets), in which case, the Presentation Time field is reserved.
Local USB clock (Bus Interval numbers and Local host controller (SS) on IN ACK
boundaries) synchronized with the MA USB host the target MA USB device
First target Service
Interval starting at
DATA USB device
Frame F, Microframe M
Local USB segment
MA USB device
MA USB transfer t5
t2 carrying isochronous t5 ≤ aMaxIsochLinkDelay
segments for Service
t2 ≤ aMaxIsochLinkDelay
Intervals N to N+S-1
Access Controller
MA USB host IsochTransferReq
packet transmitted
MA USB host
Service Service
Interval Target Service Intervals Interval
N-1-X (Service Intervals N to N+S-1) N+S+Y
(X ≥ 0) (Y ≥ 0)
Application-level request to read from the target Global Time F:M Global Time increased by Return the received isochronous
isochronous endpoint for a period of S Service (Frame=F, Microframe=M) (S * Service Interval duration in data for Service Intervals N to
Intervals starting at Global Time F:M microframes) microframes N+S-1 to the application
22
23 Figure 28—MA USB isochronous IN transfer
Page 84
Media Agnostic Universal Serial Bus Specification Release 1.0
1 MA USB isochronous IN transfers generally follow a time-based delivery model, and their correct
2 operation is guaranteed only if (1) certain system timings, related to the operation of the MA USB host,
3 the network, and the target MA USB device, are bounded under normal operating conditions, and (2) the
4 MA USB transfer follows certain rules formulated in terms of these upper bounds.
5 The most important timing parameter in the MA USB isochronous delivery model is the network delay:
6 The delivery model requires isochronous data packets to be delivered under a bounded delay contract
7 with the network. Part of the delay is intrinsic to the network, and the other depends on local decisions
8 such as retransmission policy and packet lifetime. The overall delay for those isochronous data packets
9 that are received (some packets may be lost) is expected not to exceed the protocol constant
10 aMaxIsochLinkDelay, which is defined by this specification for each network technology.
11 Referring to Figure 28, the rules for isochronous IN transfers are defined in terms of upper bounds on
12 the following timing parameters,
13 t 1 : The time from the moment an application- level isochronous read request is presented to the
14 MA USB host PAL, to the moment the first bit of the first IsochTransferReq packet serving the
15 read request is released to the network; this time is (MA USB host) implementation-dependent,
16 although the application is expected to understand its impact when making isochronous read
17 requests. The implementation guidelines in this section assume an upper bound of
18 pMaxHostIsochINReqDelay for this timing parameter when discussing the impact.
19 t 2 : The time from the moment the first bit of an IsochTransferReq packet corresponding to an
20 MA USB isochronous IN transfer is released to the network, to the moment that bit is received
21 (if not dropped) at the target MA USB device network interface; this time is expected not to
22 exceed the protocol constant aMaxIsochLinkDelay.
23 t 3 : The time from the moment the first bit of an IsochTransferReq packet corresponding to an
24 MA USB isochronous IN transfer is received by a target MA USB device, to the moment the
25 programming of the first isochronous IN transfer corresponding to the IsochTransferReq packet
26 on the local bus is complete; this time is assumed to have an (MA USB device) implementation-
27 dependent upper bound of pMaxDeviceIsochINProgDelay, which is made available to the MA
28 USB host by the target MA USB device, together with the endpoint handle (Section 6.3.7).
29 t 4 : The time from the end of the last Service Interval an MA USB IN transfer targets, to the
30 moment the first bit of the last IsochTransferResp packet corresponding to the transfer is released
31 to the network; this time is assumed to have an (MA USB device) implementation-dependent
32 upper bound of pMaxDeviceIsochIN RespDelay, which is made available to the MA USB host by
33 the target MA USB device, together with the endpoint handle (Section 6.3.7).
34 t 5 : The time from the moment the first bit of the last IsochTransferReq packet corresponding to
35 an MA USB isochronous IN transfer request is released to the network, to the moment that bit is
36 received (if not dropped) at the MA USB host network interface; this time is expected not to
37 exceed the protocol constant aMaxIsochLinkDelay.
38 t 6 : The time from the moment the first bit of the last IsochTransferResp packet corresponding to
39 an application- level isochronous read request is received at the MA USB host network interface,
40 to the moment the MA USB host PAL returns to the application with the isochronous payload;
41 this time is (MA USB host) implementation-dependent, although the application is expected to
42 understand its impact when making isochronous read requests. The implementation guidelines in
43 this section assume an upper bound of pMaxHostIsochINRespDelay for this timing parameter
44 when discussing the impact.
Page 85
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 2 summarizes the timing parameters specific to the MA USB isochronous IN transfer model.
2 Table 2—Timing parameters specific to the MA USB isochronous IN transfer model
Timing parameter Description Source
pMaxHostIsochINReqDelay Maximum time from the moment an MA USB host
application-level isochronous read implementation-dependent
request is presented to the MA USB host
PAL, to the moment the first bit of the
first IsochTransferReq packet
corresponding to the request is released
to the network
pMaxDeviceIsochINProgDelay Maximum time from the moment the MA USB device
first bit of an IsochTransferReq packet is implementation-dependent;
received by the target MA USB device, made available to the MA
to the moment the programming of the USB host by the MA USB
first isochronous IN transfer device, together with the
corresponding to the IsochTransferReq endpoint handle (Section
packet on the local bus is complete 7.3.2.2)
NOTE — The value of this parameter is
inclusive of the minimum value of time
required for posting of isochronous
transfers before their scheduled
execution time.
pMaxDeviceIsochINRespDelay Maximum time from the end of the last MA USB device
Service Interval an MA USB implementation-dependent;
isochronous IN transfer targets, to the made available to the MA
moment the first bit of the last USB host by the MA USB
IsochTransferResp packet corresponding device, together with the
to the transfer is released to the network endpoint handle (Section
7.3.2.2)
pMaxHostIsochINRespDelay Maximum time from the moment the MA USB host
first bit of the last IsochTransferResp implementation-dependent
packet corresponding to the last MA
USB isochronous IN transfer serving an
application-level isochronous read
request is received at the MA USB host
network interface, to the moment the
MA USB host PAL returns to the
application with the isochronous payload
Page 86
Media Agnostic Universal Serial Bus Specification Release 1.0
1 to the application, to hide or alter the above timing requirement. It should be understood that skewing the Global
2 Time presentation may not be suitable for applications or architectures that require synchronization across multiple
3 USB systems, including multiple MA USB Service Sets.
4 The MA USB host PAL shall not release an IsochTransferReq to the network that indicates a start time
5 (Presentation Time) more than aMaxFrameDistance USB frames before or after the MA USB Global
6 Time (MGT) at the moment the first bit of the packet is released to the network.
7 The MA USB host PAL shall conclude a pending MA USB isochronous IN transfer (1) when it receives
8 an IsochTransferResp packet that belongs to the transfer and has the EoT subfield set to 1, or (2) when it
9 receives an IsochTransferResp packet that belongs to the transfer and indicates a non-recoverable error
10 such as ISOCH_TIME_EXPIRED, or (3) at pMaxDeviceIsochINRespDelay + aMaxIsochLinkDelay
11 time units after the end of the last Service Interval targeted by the transfer.
12 NOTE — The last condition guarantees the conclusion of the transfer under packet loss.
13 Once all pending MA USB isochronous IN transfers corresponding to an application- level isochronous
14 read request are concluded, the MA USB host PAL shall return to the application with all isochronous
15 segments received in entirety during the target Service Intervals. An exception is when the MA USB
16 host PAL receives an IsochTransferResp packet that indicates an error, in which case the MA USB host
17 PAL may return the appropriate USBDI error code to the application without further delay. The MA
18 USB host PAL may also return partially received isochronous segments, up to any point before the first
19 lost byte of each segment.
20 5.10.2.2 MA USB device requirements
21 In response to an IsochTransferReq packet that indicates any Presentation Time more than
22 aMaxFrameDistance USB frames before or after the current MA USB Global Time (MGT), the target
23 MA USB device shall send an IsochTransferResp packet with the same Request ID as the
24 IsochTransferReq packet, and with the Status Code field set to ISOCH_TIME_INVALID. In response to
25 an IsochTransferReq packet that indicates a valid Presentation Time, but (considering all the requested
26 Service Intervals) the presentation time points to a time before the current MGT, or the presentation time
27 falls within pMaxDeviceIsochINProgDelay of the current MGT, the target MA USB device shall send
28 an IsochTransferResp packet with the same Request ID as the IsochTransferReq packet, and with the
29 Status Code field set to ISOCH_TIME_EXPIRED.
30 NOTE — MA USB device PAL implementations may reject, or partially admit any IsochTransferReq packet that
31 does not meet the recommended timing (e.g., they may skip any target Service Interval that is too near to the time of
32 programming).
Page 87
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Figure 29 shows two examples of continuous IN streaming using double buffering and triple buffering.
2 It is generally possible to achieve uninterrupted streaming using k+1 buffer units (with each buffer unit
3 sized for one Service Interval) when roundtrip times do not exceed k Service Intervals. Implementations
4 may choose a different level of buffering to adapt to roundtrip variations or to be able to target multiple
5 Service Intervals through a single request.
Service ≤ 1× Service Interval ≤ 1× Service Interval ≤ 1× Service Interval ≤ 1× Service Interval
Interval N N+1 N+2 N+3 N+4 N+5
MA USB
device
IsochTran
IsochTran
IsochTran
IsochTran
IsochTran
N, N+ rReq
N+2 rReq
N+3 rReq
N+4 rReq
N+5 rReq
sfe
sfe
sfe
sfe
sfe
1
N+1
N+4
N+2
N+3
Tran
Tran
Tran
Tran
Tran
N
sferResp
sferResp
sferResp
sferResp
sferResp
Isoch
Isoch
Isoch
Isoch
Isoch
MA USB
host
Read Read Read Read Read Read Read Read Read Read
request response request response request response request response request response
(N, N+1) (N) (N+2) (N+1) (N+3) (N+2) (N+4) (N+3) (N+5) (N+4)
(a) Continuous IN streaming using double buffering when the roundtrip time does not exceed one Service Interval
Service ≤ 2× Service Interval ≤ 2× Service Interval ≤ 2× Service Interval
Interval N N+1 N+2 N+3 N+4 N+5
MS USB
device
IsochTransferResp
N, N+ sferReq
Iso
N+5 rReq
ch N+
2
1, N+
Tra 1
Iso
sfe
eq
q
ch Iso
Tran
n sf
rR
4 rRe
N
T ch
Tran
sfe ra T
erR
N+ nsfe
n ran
ran 3 N+ sfe
Isoch
T N+ sferR
esp
Isoch
h N+ 2 rRe
ra
Is oc 3 es
T
sp
ch
p
MA USB Iso
host
(b) Continuous IN streaming using triple buffering when roundtrip time does not exceed two Service Intervals
6
7 Figure 29—Continuous isochronous IN streaming using multiple levels of buffering
Page 88
Media Agnostic Universal Serial Bus Specification Release 1.0
1 targeting the same endpoint before an ongoing isochronous OUT transfer is completed. The rules for
2 assigning Request IDs to successive isochronous transfers are the same as other MA USB OUT
3 transfers; in particular, (1) Request ID starts at zero for the first isochronous transfer after any
4 configuration event intended to return the state of an endpoint flow to the initial state, (2) Request ID is
5 incremented by 1 for each successive request, and (3) the MA USB host shall not have more than one
6 pending isochronous transfer using the same Request ID and targeting the same endpoint. The rules for
7 assigning Sequence Numbers to successive IsochTransferReq packets belonging to the same transfer
8 (same request ID) are also the same as other MA USB OUT transfers, except that the Sequence Number
9 field is reset to zero for every new MA USB isochronous transfer. The Presentation Time field in
10 successive IsochTransferReq packets that target the same endpoint and do not indicate ASAP delivery
11 shall be strictly increasing.
12 Each IsochTransferReq packet carries one or more partial or complete isochronous segments subject to
13 the packetization rules defined in Section 5.10.1.
14 In response to each IsochTransferReq packet, the target MA USB device programs its local resources to
15 write to the target endpoint during the target Service Intervals. The write operation for each target
16 Service Interval may happen anytime during that Service Interval. The target MA USB device may
17 choose to deliver the isochronous segments that suffer a partial loss over the local connection up to any
18 point before the first lost byte, including dropping them altogether. To reduce latency, the MA USB host
19 should packetize and transmit isochronous segments as they become available, avoiding excessive
20 aggregation. Also, as discussed in Section 5.10.1, the MA USB host should avoid excessive
21 fragmentation in the interest of higher likelihood of delivering error-free segments.
22 NOTE — MA USB architecture allows out-of-order delivery of isochronous data packets (transmission is always in-
23 order). The target MA USB device may choose to discard out-of-order isochronous payload, or perform a re-order
24 function if the presentation time of the received isochronous payload provides enough time for the function.
25 MEDIA DEPENDENT NOTE — While out-of-order delivery does not happen with direct operation over 802.11
26 radios, it is possible to experience out-of-order delivery when operating over IP (e.g., isochronous data packets
27 carried inside UDP datagrams).
28 Figure 30 illustrates the lifecycle of an MA USB isochronous OUT transfer with specified delivery time:
29 One or more IsochTransferReq packets carry the isochronous payload targeting a remote isochronous
30 OUT endpoint over S successive Service Intervals, with the first Service Interval starting at the Global
31 Time of F:M (Frame F, Microframe M). The target MA USB device, synchronized with the MA USB
32 host, schedules one or more isochronous OUT transfers on the local bus, and packetizes and transmits
33 the isochronous segments as they are received from the host. During delivery of isochronous segments
34 on the local bus, or upon detecting errors, the target MA USB device transmits one or more
35 IsochTransferResp packets to the MA USB host to indicate the status of the transfer. The Number of
36 Segments field in each IsochTransferResp packet indicates the number of isochronous segments that
37 have been delivered in entirety to the target endpoint.
38 NOTE — The frequency of IsochTransferResp packets is decided by the target MA USB device. For example, the
39 target MA USB device may choose to transmit a single IsochTransferResp packet once all isochronous segments
40 belonging to an MA USB transfer have been delivered to the target endpoint, or alternatively, transmit multiple
41 IsochTransferResp packets to provide incremental updates to the MA USB host. For large isochronous transfers that
42 include several segments, MA USB devices are recommended to provide incremental updates through multiple
43 IsochTransferResp packets , to help the MA USB host better estimate the buffer available to the target endpoint.
44 NOTE — A single application-level isochronous write request may be served by multiple MA USB transfers.
45 NOTE — An MA USB isochronous OUT transfer may also indicate “as soon as possible” (ASAP) delivery, in
46 which case the start time of the isochronous transfer on the local bus is decided by the MA USB device.
Page 89
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The Presentation Time field in the IsochTransferResp packet carries the actual delivery time of the first
2 isochronous segment (more precisely, the MGT value at the time the first byte of the first isochronous
3 segment belonging to the MA USB transfer was released to the local bus), except when the target MA
4 USB device experiences an error during the transfer (as indicated by the Status Code field in the
5 returned IsochTransferResp packet), in which case, the Presentation Time field is reserved.
6
Local USB clock (Bus Interval numbers and Local host controller (SS) on DATA
boundaries) synchronized with the MA USB host the target MA USB device
First target Service
Interval starting at
Frame F, Microframe M USB device
Local USB segment
MA USB device
First IsochTransferResp
packet transmitted
t2
MA link
MA USB transfer t5 t5
t2 ≤ aMaxIsochLinkDelay carrying isochronous t5 ≤ aMaxIsochLinkDelay t5 ≤ aMaxIsochLinkDelay
segments for Service
First Intervals N to N+S-1
IsochTransferReq
Access Controller packet transmitted
MA USB host
First IsochTransferResp
MA USB host
MA USB host t6
interface to t6 ≤ pMaxHostIsochOUTRespDelay
application
Service Service
Interval Target Service Intervals Interval
N-1-X (Service Intervals N to N+S-1) N+S+Y
(X ≥ 0) (Y ≥ 0)
Application-level request to write to the target Global Time F:M Global Time increased by Return the status of the
isochronous endpoint for a period of S Service (Frame=F, Microframe=M) (S * Service Interval duration in application-level write request
Intervals starting at Global Time F:M microframes) microframes
7
8 Figure 30—MA USB isochronous OUT transfer
9 Similar to MA USB isochronous IN transfers, MA USB isochronous OUT transfers generally follow a
10 time-based delivery model and their correct operation is guaranteed only if (1) certain system timings,
11 related to the operation of the MA USB host, the network, and the target MA USB device, are bounded
12 under normal operating conditions, and (2) the MA USB transfer follows certain rules formulated in
13 terms of these upper bounds. In particular, the upper bound on network-induced delay for isochronous
14 data packets (the protocol constant aMaxIsochLinkDelay defined in Section 5.10.2) is again the key
15 timing parameter for MA USB isochronous OUT transfers.
16 Referring to Figure 30, the rules for isochronous OUT transfers are defined in terms of upper bounds on
17 the following timing parameters,
18 t 1 : The time from the moment an application- level isochronous write request is presented to the
19 MA USB host PAL, to the moment the first bit of the first IsochTransferReq packet serving the
20 write request is released to the network; this time is (MA USB host) implementation-dependent,
21 although the application is expected to understand its impact when making isochronous write
Page 90
Media Agnostic Universal Serial Bus Specification Release 1.0
1 requests. The implementation guidelines in this section assume an upper bound of
2 pMaxHostIsochOUTReqDelay for this timing parameter when discussing the impact.
3 t 2 : The time from the moment the first bit of the first IsochTransferReq packet corresponding to
4 an MA USB isochronous OUT transfer is released to the network, to the moment that bit is
5 received (if not dropped) at the target MA USB device network interface; this time is expected
6 not to exceed the protocol constant aMaxIsochLinkDelay.
7 t 3 : The time from the moment the first bit of the first IsochTransferReq packet corresponding to
8 an MA USB isochronous OUT transfer is received by a target MA USB device, to the moment
9 the programming of the first isochronous OUT transfer corresponding to the IsochTransferReq
10 packet on the local bus is complete; this time is assumed to have an (MA USB device)
11 implementation-dependent upper bound of pMaxDeviceIsochOUTProgDelay, which is made
12 available to the MA USB host by the target MA USB device, together with the endpoint handle
13 (Section 6.3.7).
14 t 4 : The time from the end of the last Service Interval an MA USB OUT transfer targets, to the
15 moment the first bit of the IsochTransferResp packet corresponding to the transfer is released to
16 the network; this time is assumed to have an (MA USB device) implementation-dependent upper
17 bound of pMaxDeviceIsochOUTRespDelay, which is made available to the MA USB host by the
18 target MA USB device, together with the endpoint handle (Section 6.3.7).
19 t 5 : The time from the moment the first bit of an IsochTransferReq packet corresponding to an
20 MA USB isochronous OUT transfer request is released to the network, to the moment that bit is
21 received (if not dropped) at the MA USB host network interface; this time is expected not to
22 exceed the protocol constant aMaxIsochLinkDelay.
23 t 6 : The time from the moment the first bit of the IsochTransferResp packet corresponding to the
24 last MA USB isochronous OUT transfer serving an application-level isochronous write request is
25 received at the MA USB host network interface, to the moment the MA USB host PAL returns to
26 the application the status of the isochronous write operation; this time is (MA USB host)
27 implementation-dependent, although the application is expected to understand its impact when
28 making isochronous read requests. The implementation guidelines in this section assume an
29 upper bound of pMaxHostIsochOUTRespDelay for this timing parameter when discussing the
30 impact.
31 Table 3 summarizes the timing parameters specific to the MA USB isochronous OUT transfer model.
32 Table 3—Timing parameters specific to the MA USB isochronous OUT transfer
33 model
Timing parameter Description Source
pMaxHostIsochOUTReqDelay Maximum time from the moment an MA USB host
application-level isochronous write implementation-dependent
request is presented to the MA USB host
PAL, to the moment the first bit of the
first IsochTransferReq packet
corresponding to the request is released
to the network
Page 91
Media Agnostic Universal Serial Bus Specification Release 1.0
pMaxDeviceIsochOUTProgDelay Maximum time from the moment the MA USB device
first bit of the first IsochTransferReq implementation-dependent;
packet corresponding to an isochronous made available to the MA
OUT transfer is received by the target USB host by the MA USB
MA USB device, to the moment the device, together with the
programming of the first isochronous endpoint handle (Section
OUT transfer corresponding to the 7.3.2.2)
IsochTransferReq packet on the local bus
is complete
NOTE — The value of this parameter is
inclusive of the minimum value of time
required for posting of isochronous
transfers before their scheduled
execution time.
pMaxDeviceIsochOUTRespDelay Maximum time from the end of the last MA USB device
Service Interval an MA USB implementation-dependent;
isochronous OUT transfer targets, to the made available to the MA
moment the first bit of the USB host by the MA USB
IsochTransferResp packet corresponding device, together with the
to the transfer is released to the network endpoint handle (Section
7.3.2.2)
pMaxHostIsochOUTRespDelay Maximum time from the moment the MA USB host
first bit of the IsochTransferResp packet implementation-dependent
corresponding to the last MA USB
isochronous OUT transfer serving an
application-level isochronous write
request is received at the MA USB host
network interface, to the moment the
MA USB host PAL returns to the
application the status of the isochronous
write operation
Page 92
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The buffer model takes into account the transmitted isochronous payload, targeted Service Intervals, and
2 the response packets received from the MA USB device.
3 NOTE — Insufficient buffer space allocated to an isochronous OUT endpoint on the MA USB device may result in
4 scheduling complexity for the MA USB host, increased network activity and power consumption for the MA USB
5 host and device, and possibly interruption of isochronous traffic stream. MA USB devices are recommended to
6 allocate a buffer space to each isochronous OUT endpoint larger than the product of the expected data transmission
7 rate to the endpoint multiplied by the endpoint access latency aMaxIsochLinkDelay +
8 pMaxHostIsochOUTReqDelay + pMaxDeviceIsochOUTProgDelay. See Section 5.10.3.3 for more discussion.
9 For timed delivery (i.e., when isochronous presentation times are specified by the MA USB host), a
10 model of the buffer available to a target isochronous OUT endpoint at time t can be defined as following
11 ABE(t) = TB – [IP(t) – max(EIP(t), AIP(t))]
12 ABE(t): (Available Buffer Estimate) Host estimate of the available buffer at time t
13 TB: (Total Buffer) Total buffer allocated to the target isochronous OUT endpoint, indicated
14 by the Buffer Size field in the MA USB EP descriptor (Section 6.3.7)
15 IP(t): (Isochronous Payload) Total isochronous payload transmitted before time t
16 DPT(t): (Delivered Presentation Time) Upper bound on presentation times that are expected to
17 have been delivered to the target endpoint at time t; defined as the largest multiple of the
18 endpoint service interval that does not exceed the current time (mathematically,
19 MF/Interval × Interval, where MF denotes the current absolute microframe number and
20 Interval denotes the endpoint service interval in microframes); at any point in time t, all
21 received isochronous payload with presentation time strictly earlier than DPT(t) is
22 expected to have left the MA USB device buffer allocated to the endpoint
23 EIP(t): (Expired Isochronous Payload) Transmitted isochronous payload with presentation time
24 earlier than DPT(t); this is the isochronous payload that is expected to have left the MA
25 USB device buffer allocated to the target isochronous endpoint in the absence of any
26 indication by the MA USB device
27 AIP(t): (Acknowledged Isochronous Payload) Isochronous payload transmitted before time t that
28 is known to have left the MA USB device buffer through received IsochTransferResp
29 packets
30 NOTE — For example, for an isochronous OUT endpoint with a service interval of 4 milliseconds (Interval = 32),
31 at Global time t = (100, 5) (Frame number = 100, Microframe number = 5), the upper bound on delivered
32 presentation times is given by DPT(t) = (100 × 8 + 5)/32 × 32 = 800 microframes = (100, 0) (Frame number =
33 100, Microframe number = 0), meaning no isochronous payload with presentation time strictly earlier than (100, 0)
34 is expected to reside in the MA USB device buffer allocated to the endpoint.
35 NOTE — The accumulative format of the buffer model (defining buffer and payload quantities in terms of absolute
36 numbers since the system start up) is mainly to illustrate the model; implementations likely use a differential format
37 to track changes in the buffer size.
38 NOTE — Additional implementation details are needed to handle rollover in MGT and presentation times.
39 Figure 31 illustrates an example of how the MA USB host may estimate the buffer available to an
40 isochronous OUT endpoint with timed delivery. Available buffer estimate can be updated as soon as an
41 isochronous segment is guaranteed to have been delivered to the target endpoint, or an
42 IsochTransferResp packet is received that confirms the delivery of an isochronous segment.
Page 93
Media Agnostic Universal Serial Bus Specification Release 1.0
+P23
+P12
Service Interval, aligned to
Service Intervals
the MA USB device Service
+P11 targeted by the second
Interval boundary
transfer request
t1 T1 t2 T2
+P21+P22+P23
Service Intervals Service Intervals
targeted by the first targeted by the second
transfer request transfer request
T1 T2
Page 94
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — The last condition guarantees the conclusion of the transfer under packet loss.
2 Once all pending MA USB isochronous OUT transfers corresponding to an application- level
3 isochronous write request are concluded, the MA USB host PAL shall return to the application the status
4 of the isochronous write operation. An exception is when the MA USB host PAL receives an
5 IsochTransferResp packet that indicates an error, in which case the MA USB host PAL may return the
6 appropriate USBDI error to the application without further delay.
7 5.10.3.2 MA USB device requirements
8 In response to an IsochTransferReq packet that indicates any Presentation Time more than
9 aMaxFrameDistance USB frames before or after the current Global Time (MGT), the target MA USB
10 device shall send an IsochTransferResp packet with the same Request ID as the IsochTransferReq
11 packet, and with the Status Code field set to ISOCH_TIME_INVALID. In response to an
12 IsochTransferReq packet that indicates a valid Presentation Time, but (considering all the requested
13 Service Intervals) the presentation time points to a time before the current MGT, or the presentation time
14 falls within pMaxDeviceIsochOUTProgDelay of the current MGT, the target MA USB device shall send
15 an IsochTransferResp packet with the same Request ID as the IsochTransferReq packet, and with the
16 Status Code field set to ISOCH_TIME_EXPIRED.
17 NOTE — MA USB device PAL implementations may reject, or partially admit any IsochTransferReq packet that
18 does not meet the recommended timing (e.g., they may skip any target Service Interval that is too near to the time of
19 programming).
Page 95
Media Agnostic Universal Serial Bus Specification Release 1.0
Service ≤ 1× Service Interval ≤ 1× Service Interval ≤ 1× Service Interval ≤ 1× Service Interval
Interval N N+1 N+2 N+3 N+4 N+5
MA USB
device
IsochTran
IsochTran
IsochTran
IsochTran
IsochTran
N, N+ rReq
N+2 rReq
N+3 rReq
N+4 rReq
N+5 rReq
sfe
sfe
sfe
sfe
sfe
1
N+1
N+4
N+2
N+3
Tran
Tran
Tran
Tran
Tran
N
sferResp
sferResp
sferResp
sferResp
sferResp
Isoch
Isoch
Isoch
Isoch
Isoch
MA USB
host
Write Write Write Write Write Write Write Write Write Write
request response request response request response request response request response
(N, N+1) (N) (N+2) (N+1) (N+3) (N+2) (N+4) (N+3) (N+5) (N+4)
(a) Continuous OUT streaming using double buffering when the roundtrip time does not exceed one Service Interval
Service ≤ 2× Service Interval ≤ 2× Service Interval ≤ 2× Service Interval
Interval N N+1 N+2 N+3 N+4 N+5
MA USB
device
IsochTransferResp
N, N+ sferReq
Iso
N+5 rReq
ch N+
2
1, N+
Tra 1
Iso
sfe
q
q
Re ch Iso
Tran
n sf
4 rRe
N
fer T ch
Tran
ra T
ns
erR
N+ nsfe
a n ran
N+ sfe
Isoch
r
hT N+3 N+ sferR
esp
Isoch
2 rRe
ra
Is oc 3 es
T
sp
ch
p
Iso
MA USB
host
(b) Continuous OUT streaming using triple buffering when roundtrip time does not exceed two Service Intervals
1
2 Figure 33—Continuous isochronous OUT streaming using multiple levels of buffering
13 5.12 Reliability
14 The MA USB protocol does not have specific reliability requirements for the physical layer. Reliable
15 delivery is required at the link layer (802.11 mode) and network layer (IP mode) for all MA USB
16 packets except isochronous data packets. The MA USB protocol defines mechanisms such as protocol-
17 level retransmission to ensure data integrity in the event of network transients.
18 5.13 Efficiency
19 The MA USB protocol achieves transfer efficiency by sizing its data packets according to the MTU of
20 the underlying link or network layer.
Page 96
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6 Protocol layer
2 6.1 Packet types
3 MA USB packets are broadly categorized into three types, each with one or more subtypes,
4 Management packets transfer MA USB-specific information to manage entities such as
5 endpoint handles. The information contained in these packets is strictly for MA USB PAL
6 management; no USB payload of any type is carried in these packets. MA USB Capability
7 Request (CapReq) and Endpoint Handle Request (EPHandleReq) are examples of a management
8 packet.
9 Control packets contain MA USB-specific information to control the flow of data packets
10 carrying USB payload. Transfer Setup Request (TransferSetupReq) is an example of a control
11 packet.
12 Data packets transfer USB payload between MA USB host and MA USB devices. USB payload
13 for all USB transfers, including control transfers, is carried in data packets.
14 Each packet carries a protocol header that contains the protocol version, the packet type and subtype, the
15 MSS, and the MA USB device the packet is targeting. These are the key information a packet receiver
16 needs to accept or reject an incoming packet, and to route the accepted packet to the correct protocol
17 instance when multiple PAL instances (e.g., an MA USB host and an MA USB device PAL) are
18 operating in parallel. MA USB packets can be as large as 64 KB; in practice, they are sized in
19 accordance with the network MTU to minimize fragmentation.
20 MA USB does not define any header or payload protection mechanism such as Cyclic Redundancy
21 Check (CRC) codes; all protocol content (header and payload) is assumed to be delivered error-free by
22 the network. Similarly, MA USB does not define any data confidentiality mechanism; confidentiality, if
23 required, is assumed to be provided by the network.
Page 97
Media Agnostic Universal Serial Bus Specification Release 1.0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Length Type Subtype Flags Version DWORD 0
Page 98
Media Agnostic Universal Serial Bus Specification Release 1.0
Type Description Subtype Packet full name Packet short name
00b Management 000100b Endpoint Handle Request EPHandleReq
00b Management 000101b Endpoint Handle Response EPHandleResp
00b Management 000110b Endpoint Activate Request EPActivateReq
00b Management 000111b Endpoint Activate Response EPActivateResp
00b Management 001000b Endpoint Inactivate Request EPInactivateReq
00b Management 001001b Endpoint Inactivate Response EPInactivateResp
00b Management 001010b Endpoint Reset Request EPResetReq
00b Management 001011b Endpoint Reset Response EPResetResp
00b Management 001100b Clear Transfers Request ClearTransfersReq
00b Management 001101b Clear Transfers Response ClearTransfersResp
00b Management 001110b Endpoint Handle Delete EPHandleDeleteReq
Request
00b Management 001111b Endpoint Handle Delete EPHandleDeleteResp
Response
00b Management 010000b MA USB Device Reset Request DevResetReq
00b Management 010001b MA USB Device Reset DevResetResp
Response
00b Management 010010b Modify EP0 Request ModifyEP0Req
00b Management 010011b Modify EP0 Response ModifyEP0Resp
00b Management 010100b Set USB Device Address SetUSBDevAddrReq
Request
00b Management 010101b Set USB Device Address SetUSBDevAddrResp
Response
00b Management 010110b Update Device Request UpdateDevReq
00b Management 010111b Update Device Response UpdateDevResp
00b Management 011000b USB Device Disconnect USBDevDisconnectReq
Request
00b Management 011001b USB Device Disconnect USBDevDisconnectResp
Response
00b Management 011010b USB Suspend Request USBSuspendReq
00b Management 011011b USB Suspend Response USBSuspendResp
00b Management 011100b USB Resume Request USBResumeReq
00b Management 011101b USB Resume Response USBResumeResp
00b Management 011110b Remote Wake Request RemoteWakeReq
00b Management 011111b Remote Wake Response RemoteWakeResp
00b Management 100000b Ping Request PingReq
00b Management 100001b Ping Response PingResp
00b Management 100010b MA USB Device Disconnect DevDisconnectReq
Request
00b Management 100011b MA USB Device Disconnect DevDisconnectResp
Response
Page 99
Media Agnostic Universal Serial Bus Specification Release 1.0
Type Description Subtype Packet full name Packet short name
00b Management 100100b MA USB Device Initiated DevInitDisconnectReq
Disconnect Request
00b Management 100101b MA USB Device Initiated DevInitDisconnectResp
Disconnect Response
00b Management 100110b Synchronization Request SynchReq
00b Management 100111b Synchronization Response SynchResp
00b Management 101000b Cancel Transfer Request CancelTransferReq
00b Management 101001b Cancel Transfer Response CancelTransferResp
00b Management 101010b Endpoint Open Stream Request EPOpenStreamReq
00b Management 101011b Endpoint Open Stream EPOpenStreamResp
Response
00b Management 101100b Endpoint Close Stream Request EPCloseStreamReq
00b Management 101101b Endpoint Close Stream EPCloseStreamResp
Response
00b Management 101110b USB Device Reset Request USBDevResetReq
00b Management 101111b USB Device Reset Response USBDevResetResp
00b Management 110000b Device Notification Request DevNotificationReq
00b Management 110001b Device Notification Response DevNotificationResp
00b Management 110010b Endpoint Set Keep-Alive EPSetKeepAliveReq
Request
00b Management 110011b Endpoint Set Keep-Alive EPSetKeepAliveResp
Response
00b Management 110100b Get Port Bandwidth Request GetPortBWReq
00b Management 110101b Get Port Bandwidth Response GetPortBWResp
00b Management 110110b Sleep Request SleepReq
00b Management 110111b Sleep Response SleepResp
00b Management 111000b Wake Request WakeReq
00b Management 111001b Wake Response WakeResp
00b Management 111110b Vendor Specific Request VendorSpecificReq
00b Management 111111b Vendor Specific Response VendorSpecificResp
01b Control 000000b Transfer Setup Request TransferSetupReq
01b Control 000001b Transfer Setup Response TransferSetupResp
01b Control 000010b Transfer Tear Down TransferTearDownConf
Confirmation
10b Data 000000b Transfer Request TransferReq
10b Data 000001b Transfer Response TransferResp
10b Data 000010b Transfer Acknowledgement TransferAck
10b Data 000011b Isochronous Transfer Request IsochTransferReq
10b Data 000100b Isochronous Transfer Response IsochTransferResp
Page 100
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.2.1.4 Length
2 The 16-bit Length field (offset 0:16) carries the length of the MA USB packet, including the packet
3 header, in bytes.
4 6.2.1.5 EP Handle/Device Handle
5 This 16-bit field (offset 1:0) carries a handle for a USB device or a USB endpoint. When pointing to a
6 USB device (in MA USB packets of type management), the field is referred to as Device Handle, and is
7 unstructured. When pointing to a USB endpoint (EP) (in MA USB packets of type control and data), the
8 field is referred to as EP Handle, and is structured as shown in Figure 36.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bus Number USB Device Address EP Number D
9
10 Figure 36—EP Handle field
11 The Bus Number subfield carries the USB bus number for the EP assigned by the MA USB device PAL.
12 For virtual USB devices the Bus Number subfield is set to the reserved value of 15. For physical USB
13 devices it is set to the value of the USB bus number allocated by the MA USB device PAL. This
14 subfield is used to ensure uniqueness of the EP handle value when there are multiple USB devices with
15 the same USB address present.
16 NOTE — A USB host controller implementation can choose to treat each downstream port as a different bus
17 instance (Enhanced SuperSpeed and USB 2.0 speeds) while assigning addresses to the devices connected to the
18 downstream ports (in the case of a host controller with 2 Enhanced SuperSpeed ports and 2 USB 2.0 ports there can
19 be up to 4 separate bus instances). Additionally, a host controller implementation may choose to assign USB
20 addresses independently on each bus instance (starting at device address 1, for example).
21 The USB Device Address subfield carries the USB address of the USB device to which the EP belongs.
22 The USB address is allocated by the MA USB device. For virtual USB devices the USB Device Address
23 subfield is set by the MA USB device PAL. For physical USB devices it is set to the USB address of the
24 device. Prior to allocation of the USB address to the device, this field is set to the default value of 0.
25 The EP Number subfield carries the EP number as defined in [USB 2.0]. Prior to allocating an address,
26 the only valid EP Number is zero.
27 The Direction (D) subfield carries the direction of the EP as defined in [USB 2.0].
28 6.2.1.6 Device Address
29 The 8-bit Device Address field (offset 1:16) carries the address assigned by an MA USB host to an MA
30 USB device, or a value of 0xFF to indicate any MA USB device within the MSS.
31 6.2.1.7 SSID
32 The 8-bit SSID field (offset 1:24) identifies the MA USB Service Set (MSS) to which the target MA
33 USB device belongs.
34 6.2.1.8 Status Code
35 The 8-bit Status Code field (offset 2:0) is used to communicate a status code, e.g., the success or failure
36 of a requested operation. If an operation is successful, or involves no error, the Status Code is set to 0
37 (SUCCESS, or NO_ERROR). Otherwise, depending on the operation, one of the values in Table 6 is
38 returned in a response packet. Management packets with Status Code field set to values other than 0,
39 shall still carry all the fields defined for the packet subtype.
Page 101
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 6—Status Code values
Value Description
0 SUCCESS (NO_ERROR). Used when no error condition is being reported.
1-127 Reserved values
128 UNSUCCESSFUL. The operation did not succeed due an unidentified error.
129 INVALID_MA_USB_SESSION_STATE. The MA USB session is in an invalid state
for the requested operation.
130 INVALID_DEVICE_HANDLE. Provided device handle is invalid.
131 INVALID_EP_HANDLE. Provided EP handle is invalid.
132 INVALID_EP_HANDLE_STATE. Provided EP handle is an invalid state for the
requested operation.
133 INVALID_REQUEST. The received Transfer Request was invalid or did not match
the endpoint capabilities.
134 MISSING_SEQUENCE_NUMBER. A sequence number gap was detected.
135 TRANSFER_PENDING. Used in response to a duplicate IN Transfer Request to
indicate that the Transfer Request has been received but the data is not being received
from the target USB endpoint.
136 TRANSFER_EP_STALL. Transfer request ended with the USB endpoint returning
STALL handshake.
137 TRANSFER_SIZE_ERROR. The TransferResp packet includes an unexpected
number of bytes in its payload.
138 TRANSFER_DATA_BUFFER_ERROR. Overrun of incoming data or under-run of
outgoing data has occurred.
139 TRANSFER_BABBLE_DETECTED. Babble error returned by the WSB device.
140 TRANSFER_TRANSACTION_ERROR. Transaction error returned by the target
USB device.
141 TRANSFER_SHORT_TRANSFER. Transfer request ended with the short packet.
142 TRANSFER_CANCELLED. The received Transfer Request corresponds to a
cancelled transfer.
143 INSUFFICIENT_RESOURCES. There are not enough resources on the MA USB
device to perform the operation.
144 NOT_SUFFICIENT_BANDWIDTH. There is not enough bandwidth to support the
endpoint(s).
145 INTERNAL_ERROR. MA USB device encountered an internal error.
146 DATA_OVERRUN. The isochronous transfer exceeded the bandwidth allocated to the
endpoint.
147 DEVICE_NOT_ACCESSED. The USB device is not accessible.
148 BUFFER_OVERRUN. The USB device attempted transfer of more data than the
scheduled amount per service interval for an isochronous IN transfer.
149 BUSY. An attempt was made to close an endpoint with outstanding transfers.
150 DROPPED_PACKET. MA USB device dropped a TransferReq packet.
151 ISOCH_TIME_EXPIRED. Isochronous payload was delivered later than its intended
presentation time.
152 ISOCH_TIME_INVALID. The presentation time is invalid.
Page 102
Media Agnostic Universal Serial Bus Specification Release 1.0
153 NO_USB_PING_RESPONSE. Completion of data transfer to an Enhanced
SuperSpeed isochronous endpoint within the service interval is not possible because the
USB device has not responded to a PING with a PING_RESPONSE in the required
time [USB 3.1].
154 NOT_SUPPORTED. The value of the Subtype field is not recognized or the requested
operation is not supported.
155 REQUEST_DENIED. A protocol operation request was denied.
156 MISSING_REQUEST_ID. A Request ID gap was detected.
157-255 Reserved values
Page 103
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The CapReq packet carries the fields listed in Table 7 after the management header.
2 Table 7—MA USB Capability Request fields
Width Offset Description
(bits) (DW:bit)
12 3:0 Number of Outstanding Management Requests. Indicates the maximum
number of device initiated outstanding management requests that MA USB
host can track.
NOTE—The MA USB host is recommended to be able to track at least 127
outstanding requests per each MA USB device it supports.
20 3:12 Reserved.
3 In addition, the CapReq packet may carry one or multiple MA Host Capability descriptors. The format
4 of the MA Host Capability descriptors is defined in Table 8. The MA Host Capability descriptors are
5 byte aligned.
6 Table 8—Format of MA Host Capability descriptors
Width Offset Description
(bits) (DW:bit)
8 N:n Length. Indicates the length of the descriptor in bytes.
8 N:n+8 MA Host Capability Type. Indicates the type of the descriptor. Descriptor
types are listed in Table 9.
Variable N:n+16 Descriptor specific format.
7 The valid MA Host Capability Types to be carried in the CapReq packet are listed in Table 9.
8 Table 9—MA Host Capability Type values
MA Host Capability Type Value Description
Synchronization Capabilities 3 Indicates the synchronization related capabilities
of the MA USB host. Shall be present if the MA
USB host has access to Media Time.
Link Sleep Capability 5 Indicates the capability of the MA USB host
related to the session state transition to Session
Inactive. Shall be present if the MA USB host
supports transition of the session state to Session
Inactive without the integrated USB device being
suspended.
Page 104
Media Agnostic Universal Serial Bus Specification Release 1.0
8 N:n+8 MA Host Capability Type. Indicates the type of the descriptor. Set to the
value of Synchronization Capabilities in Table 9.
1 N:n+16 Media Time Available. Indicates whether the MA USB host has access to a
synchronized Media Time.
Value Meaning
0 MA USB host does not have access to Media Time
1 MA USB host has access to Media Time
7 N:n+17 Reserved.
Page 105
Media Agnostic Universal Serial Bus Specification Release 1.0
5 3:24 Number of Streams. 2 to the power of the value of this field is the maximum
number of streams supported by the MA USB device for any of its Enhanced
SuperSpeed bulk endpoints.
3 3:29 Device Type. Indicates whether the MA USB device is an MA USB hub or
not.
Value Meaning
0 Not an MA USB hub
1 MA USB hub with an integrated USB 2.0 hub
2 MA USB hub with an integrated USB 3.1 hub
3-8 Reserved
8 4:0 Descriptors Count. Indicates the total number of MA Device Capabilities
descriptors present.
24 4:8 Descriptors Length. Indicates the total size of MA Device Capabilities
descriptors in bytes.
16 5:0 Number of Outstanding Transfer Requests. Indicates the maximum number
of total outstanding transfer requests that the MA USB device can track.
12 5:16 Number of Outstanding Management Requests. Indicates the maximum
number of host initiated outstanding management requests that MA USB
device can track.
NOTE—It is recommended that the number of outstanding management
requests the MA USB device supports should be at least 2 times the
maximu m number of endpoints plus 2 times the total number of devices it
supports.
4 5:28 Reserved.
1 In addition, the CapResp packet may carry one or multiple MA Device Capability descriptors. The
2 format of the MA Device Capability descriptors is defined in Table 13. The MA Device Capability
3 descriptors are byte aligned.
4 Table 13—Format of MA Device Capability descriptors
Width Offset Description
(bits) (DW:bit)
8 N:n Length. Indicates the length of the descriptor in bytes.
8 N:n+8 MA Device Capability Type. Indicates the type of the descriptor. Descriptor
types are listed in Table 14.
Variable N:n+16 Descriptor specific format.
5 The valid MA Device Capability Types to be carried in the CapResp packet are listed in Table 14.
6 Table 14—MA Device Capability Type values
MA Device Capability Type Value Description
Speed Capability 0 Indicates the speed capability of the USB device
behind the MA USB device. If the Device Type
field is set to 0 or 2, the Speed Capability
descriptor shall be present.
Page 106
Media Agnostic Universal Serial Bus Specification Release 1.0
MA Device Capability Type Value Description
P-managed OUT Capabilities 1 Indicates the optional capabilities related to P-
managed OUT transfers that the MA USB device
supports. Shall be present if the MA USB device
supports any of the P-managed OUT optional
capabilities.
Isochronous Capabilities 2 Indicates the isochronous related capabilities of
the MA USB device. Shall be present if the
Device Type field is not set to 0, or if the MA
USB device supports isochronous endpoints.
Synchronization Capabilities 3 Indicates the synchronization related capabilities
of the MA USB device. Shall be present if the
Device Type field is not set to 0, or if the MA
USB device supports isochronous endpoints.
Container ID Capability 4 Indicates the capability related to support of
Container ID descriptor by the integrated USB
device behind the MA USB device PAL. Shall be
present if the integrated USB device supports
Container ID descriptor (Section 4.4.4).
Link Sleep Capability 5 Indicates the capability of the MA USB device
related to the session state transition to Session
Inactive. Shall be present if the MA USB device
supports transition of the session state to Session
Inactive without the integrated USB device being
suspended.
1 The following sections define the MA Device Capability descriptors.
2 6.3.3.1 Speed Capability descriptor
3 If the Device Type field is set to 0 the CapResp packet carries the Speed Capability descriptor for the
4 single USB device behind the MA USB device. If the Device Type field is set to 2 the CapResp packet
5 carries the Speed Capability descriptor for the integrated Enhanced SuperSpeed hub in the MA USB
6 hub. Table 15 illustrates the format of the Speed Capability descriptor.
7 Table 15—Speed Capability descriptor
Width Offset Description
(bits) (DW:bit)
8 N:n Length. Indicates the length of the descriptor in bytes. Set to 4.
8 N:n+8 MA Capability Type. Indicates the type of the descriptor. Set to the value of
Speed Capability in Table 14.
4 N:n+16 Reserved.
4 N:n+20 Speed. Indicates the speed of the USB device behind the MA USB device.
Value Meaning
0 Low-Speed
1 Full-Speed
2 High-Speed
3 SuperSpeed
4 SuperSpeedPlus
5-15 Reserved
Page 107
Media Agnostic Universal Serial Bus Specification Release 1.0
4 N:n+24 Reserved.
2 N:n+28 Lane Speed Exponent (LSE). Indicates the LSE of the USB device as defined
in [USB 3.1] if the Speed field is set to SuperSpeed or SuperSpeedPlus.
Reserved otherwise.
2 N:n+30 Reserved.
Page 108
Media Agnostic Universal Serial Bus Specification Release 1.0
8 N:n Length. Indicates the length of the descriptor in bytes. Set to 3.
8 N:n+8 MA Capability Type. Indicates the type of the descriptor. Set to the value of
Isochronous Capabilities in Table 14.
1 N:n+16 Isochronous payload alignment. Indicates whether the MA USB device
requires DWORD aligned payload for isochronous transfers.
Value Meaning
0 MA USB device transmits and expects to receive byte-aligned
isochronous payload
1 MA USB device transmits and expects to receive DWORD-
aligned isochronous payload
7 N:n+17 Reserved.
Page 109
Media Agnostic Universal Serial Bus Specification Release 1.0
(bits) (DW:bit)
8 N:n Length. Indicates the length of the descriptor in bytes. Set to 18.
8 N:n+8 MA Capability Type. Indicates the type of the descriptor. Set to the value of
Container ID Capability in Table 14.
128 N:n+16 Container ID. Indicates the value of Container ID.
Page 110
Media Agnostic Universal Serial Bus Specification Release 1.0
2 High-Speed
3 SuperSpeed
4 SuperSpeedPlus
5-15 Reserved
8 3:24 Reserved.
16 4:0 Hub. Identifies the device handle of the hub inside the MA USB hub through
which the USB device is accessed (USB device may not be directly attached to
this hub). Reserved for integrated USB devices.
16 4:16 Reserved.
16 5:0 Parent HS Hub. If the device is LS or FS (including an LS or FS hub) and is
accessed through an HS hub, this field identifies the device handle of the
“parent” HS hub that isolates LS or FS signaling on its downstream facing port
from HS signaling on its upstream facing port. Reserved for other device
speeds.
4 5:16 Parent HS Hub Port. If the device is LS or FS (including an LS or FS hub)
accessed through an HS hub, this field identifies the port number on the parent
HS hub (identified by the Parent HS Hub field above) to which the LS or FS
device is directly attached. Reserved for other device speeds.
1 5:20 MTT (Multiple Transaction Translators). Set to 1 for an LS or FS USB
device, if it is connected through an HS hub that has Multiple TTs support
enabled by software. The value of the field is set to 0 otherwise. See [USB 2.0]
for details.
2 5:21 Lane Speed Exponent (LSE). Indicates the LSE of the USB device as defined
in [USB 3.1] if the Speed field is set to SuperSpeed or SuperSpeedPlus.
Reserved otherwise.
9 5:23 Reserved.
Page 111
Media Agnostic Universal Serial Bus Specification Release 1.0
1 The EPHandleReq packet carries the fields listed in Table 24 after the management header.
2 Table 24—Endpoint Handle Request fields
Width Offset Description
(bits) (DW:bit)
5 3:0 Number of EP Descriptors. Indicates the number of EP descriptors carried in
the EPHandleReq packet.
6 3:5 Size of EP Descriptor. Indicates the size of each EP descriptor included in the
EPHandleReq packet, in bytes. The size is inclusive of the bytes padded to
make each EP descriptor DWORD-aligned.
21 3:11 Reserved.
3 In addition, each EPHandleReq packet carries one or more EP descriptors. All of the EP descriptors
4 included in an EP Handle Request packet are of the same size, defined by the Size of EP Descriptor
5 field.
6 Table 25 illustrates the format of each EP descriptor. The size of the EP descriptor depends on the speed
7 of the USB device to which the EP belongs:
8 For an LS, FS, or HS device, the EP descriptor takes 8 bytes (including 1 byte of zero padding).
9 For an Enhanced SuperSpeed device the EP descriptor takes 16 bytes (including 3 bytes of zero
10 padding).
11 For an Enhanced SuperSpeed device operating at above Gen 1 speed with isochronous
12 endpoint(s), the EP descriptor takes 24 bytes (including 3 bytes of zero padding).
13 Table 25—EP descriptor
Width Offset Description
(bytes) (DW:bit)
7 N:0 Standard endpoint descriptor, as defined in [USB 2.0].
6 N+1:24 (For Enhanced SuperSpeed devices only) SuperSpeed Endpoint Companion
Descriptor, as defined in [USB 3.1].
8 N+3:8 (For Enhanced SuperSpeed devices operating at above Gen 1 speed with
isochronous EPs only) SuperSpeedPlus Isochronous Endpoint Companion
Descriptor, as defined in [USB 3.1].
Variable Variable Zero padding to make the EP descriptor DWORD-aligned.
Page 112
Media Agnostic Universal Serial Bus Specification Release 1.0
1
2 Table 26—EP Handle Response fields
Width Offset Description
(bits) (DW:bit)
5 3:0 Number of MA USB EP Descriptors. Indicates the number of MA USB EP
descriptors carried in the EPHandleResp packet. This field is set to the same
value as the Number of EP Descriptors field in the corresponding
EPHandleReq packet.
27 3:5 Reserved.
3 In addition, the EPHandleResp packet carries one or more MA USB EP descriptors. MA USB EP
4 descriptors are inserted in the same order as the corresponding EP descriptors in the EPHandleReq
5 packet.
6 Table 27 illustrates the format of each MA USB EP descriptor. Each descriptor takes 16 bytes.
7 Table 27—MA USB EP descriptor format
Width Offset Description
(bits) (DW:bit)
16 N:0 EP Handle. The handle of the endpoint requested in the EPHandleReq packet.
1 N:16 Direction. Endpoint direction.
Value Meaning
0 Control or OUT endpoint
1 IN endpoint
1 N:17 Isochronous. Indicates an isochronous endpoint.
Value Meaning
0 Non-isochronous endpoint
1 Isochronous endpoint
1 N:18 L-managed. For a control or non-isochronous OUT endpoint, indicates
whether the endpoint can be accessed through an l-managed transfer (in
addition to the mandatory p-managed transfer). The field is reserved for all
other endpoint types.
Value Meaning
0 L-managed transfers not supported
1 L-managed transfers supported
1 N:19 Valid. Indicates whether the handle for the endpoint was successfully allocated
and the handle in the EP Handle field is valid.
Value Meaning
0 The handle is valid.
1 The handle is not valid.
NOTE — If the handle is not valid the EP handle remains in Unassigned state.
12 N:20 Reserved.
16 N+1:0 Credit Consumption Unit (CCU). For a control or non-isochronous OUT
endpoint, the field indicates the buffer size (in bytes) that the MA USB host
must assume as the unit of credit consumption for all p-managed transfers
targeting the endpoint. The field is reserved for all other endpoints.
16 N+1:16 Reserved.
Page 113
Media Agnostic Universal Serial Bus Specification Release 1.0
32 N+2:0 Buffer Size. For control and OUT endpoints, the field indicates the buffer size
(in bytes) available to transfers targeting the endpoint. The field is reserved for
IN endpoints.
16 N+3:0 Isochronous Programming Delay. For isochronous endpoints, the field
indicates the maximum time, in microseconds, from the moment the first bit of
an IsochTransferReq packet is received by the MA USB device to the moment
the programming of the first isochronous transfer corresponding to that
IsochTransferReq packet on the local bus is complete. The field is reserved for
non-isochronous endpoints.
NOTE — The value of this field is denoted by
pMaxDeviceIsochINProgDelay for isochronous IN endpoints (Section
5.10.2), and by pMaxDeviceIsochOUTProgDelay for isochronous OUT
endpoints (Section 5.10.3).
16 N+3:16 Isochronous Response Delay. For isochronous endpoints, the field indicates
the maximum time, in microseconds, from the moment the end of the last
Service Interval an isochronous MA USB transfer targets to the moment the
first bit of the last IsochTransferResp packet corresponding to the transfer is
released to the network. The field is reserved for non-isochronous endpoints.
NOTE — The value of this field is denoted by
pMaxDeviceIsochINRespDelay for isochronous IN endpoints (Section
5.10.2), and by pMaxDeviceIsochOUTRespDelay for isochronous OUT
endpoints (Section 5.10.3).
Page 114
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 29—Endpoint Activate Response fields
Width Offset Description
(bits) (DW:bit)
5 3:0 Number of EP Handles with Error. Number of EP handles whose activation
did not complete. This field is nonzero only if the Status Code field in the
packet carries a value other than SUCCESS (NO_ERROR).
27 3:5 Reserved.
Variable 4:0 EP Handle List. List of EP handles whose activation failed, concatenated in
16-bit increments. The list is empty when all EP handles in the corresponding
EPActivateReq packet were successfully activated. If the Endpoint Activate
Request is executed as an atomic operation then the list may be empty when
the Status Code field is set to Failure.
Page 115
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 31—Endpoint Inactivate Response fields
Width Offset Description
(bits) (DW:bit)
5 3:0 Number of EP Handles with Error. Number of EP handles whose
inactivation did not successfully complete. This field is nonzero only if the
Status Code field in the packet carries a value other than SUCCESS
(NO_ERROR).
27 3:5 Reserved.
Variable 4:0 EP Handle List. List of EP handles whose inactivation failed, concatenated in
16-bit increments. The list is empty when all endpoints specified in the
corresponding EPInactivateReq packet have been successfully inactivated. If
the Endpoint Inactivate Request is executed as an atomic operation then the list
may be empty when the Status Code field is set to Failure. The Endpoint
Inactivate Request is expected to be successfully completed unless the
command is not valid.
Page 116
Media Agnostic Universal Serial Bus Specification Release 1.0
NOTE — Resetting data toggle [USB 2.0] or sequence number [USB 3.1] of
an endpoint not in a halted state, requires the MA USB host to first inactivate
the endpoint if the endpoint handle is in Active State (using EPInactivateReq
packet), then delete the handle of the endpoint (using EPHandleDeleteReq
packet), and then request a new endpoint handle with the original EP
descriptor (using EPHandleReq packet).
Page 117
Media Agnostic Universal Serial Bus Specification Release 1.0
NOTE — The MA USB host may be required to limit the number of clear
transfers information blocks included in the packet streams to meet the MA
link MTU size.
24 3:8 Reserved.
1 In addition, each ClearTransfersReq packet carries a set of clear transfer Information blocks; the format
2 of each block is shown in Table 36.
3 Table 36—Clear transfers information block
Width Offset Description
(bits) (DW:bit)
16 N:0 EP Handle. The Endpoint Handle the request is targeting.
16 N:16 Stream ID. Indicates the target stream when the target endpoint is an
Enhanced SuperSpeed bulk endpoint that supports the Enhanced SuperSpeed
Stream Protocol; reserved otherwise.
8 N+1:0 Start Request ID. Indicates the value of the Request ID that MA USB host
uses following the ClearTransfersReq packet, which is not the target of this
request; i.e., The ClearTransfersReq targets all the transfers carrying a
preceding request ID values. The scope of cancellation are transfers carrying
Request IDs less than Start Request ID. A transfer with Request ID set to Start
Request ID or larger is not in the scope of cancellation. .
24 N+1:8 Reserved.
Page 118
Media Agnostic Universal Serial Bus Specification Release 1.0
16 N:16 Stream ID. Indicates the stream to which the response is related when the
endpoint identified in the EP Handle field is an Enhanced SuperSpeed bulk
endpoint that supports the Enhanced SuperSpeed Stream Protocol; reserved
otherwise.
1 N+1:0 Cancellation Status. Set to 1 if the request was successfully completed for
the transfers identified by the EP Handle, Stream ID, and Start Request ID of
the corresponding request or the Status Code field is set to SUCCESS. Set to 0
otherwise.
1 N+1:1 Partial Delivery. Set to 1 if the last cancelled transfer was not completed, i.e.,
some (but not all) data related to the transfer was moved to/from the device
before its cancellation.
30 N+1:2 Reserved.
8 N+2:0 Last Request ID. Indicates the value of the Request ID field in the last
TransferResp packet created by the MA USB Device.
24 N+2:8 Delivered Sequence Number. For an OUT transfer, indicates the last
sequence number delivered to the device. Valid if Partial Delivery field is set
to 1 and reserved otherwise. Reserved for IN transfers.
32 N+3:0 Delivered Byte Offset. Indicates the total amount of data related to the
transfer delivered to the device identified by the sequence number value in the
Delivered Sequence Number field. Valid if partial delivery field is set to 1 and
reserved otherwise. Reserved for IN transfers.
Page 119
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 40—Endpoint Handle Delete Response fields
Width Offset Description
(bits) (DW:bit)
5 3:0 Number of EP Handles with Error. Number of EP handles that could not be
deleted. This field is nonzero only if the Status Code field in the packet carries
a value other than SUCCESS (NO_ERROR).
27 3:5 Reserved.
Variable 4:0 EP Handle List. List of EP handles that could not be deleted, concatenated in
16-bit increments. The list is empty when all EP handles in the corresponding
EPHandleDeleteReq packet were successfully deleted. If the Endpoint Handle
Delete Request is executed as an atomic operation then the list may be empty
when the Status Code field is set to Failure.
Page 120
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (Management) and 19 (ModifyEP0Resp), respectively. The Status Code field indicates whether the
2 request was successfully completed.
3 The ModifyEP0Resp packet carries the fields listed in Table 42 after the management header.
4 Table 42—Modify EP0 Response fields
Width Offset Description
(bits) (DW:bit)
16 3:0 EP0 Handle. Present only in the following cases:
a) The USB Address subfield of the EP0 Handle field in the corresponding
ModifyEP0Req packet is set to 0, and the USB device identified by the Device
Handle field is in the addressed state [USB 2.0]. The EP0 Handle field
contains the EP0 handle of the USB device with a nonzero USB Address
subfield.
b) The USB Address subfield of the EP0 Handle field in the corresponding
ModifyEP0Req packet is not 0, and the USB device identified by the Device
Handle field is in Default state [USB 2.0]. The EP0 Handle field contains the
EP0 handle of the USB device with a USB Address subfield set to 0.
16 3:16 Reserved.
Page 121
Media Agnostic Universal Serial Bus Specification Release 1.0
Width Offset Description
(bits) (DW:bit)
7 3:0 USB Device Address. The USB address of the USB device requested in
SetUSBDevAddrReq packet.
25 3:7 Reserved.
Page 122
Media Agnostic Universal Serial Bus Specification Release 1.0
NOTE — The MA USB device is expected to be aware of the value of the
integrated hub latency.
7 3:25 Reserved.
1 In addition, the UpdateDevReq packet carries the device descriptor.
2 Table 46 illustrates the format of the device descriptor of the target USB device. The descriptor takes 18
3 bytes.
4 Table 46—Device descriptor
Width Offset Description
(bytes) (DW:bit)
18 4:0 Standard device descriptor, as defined in [USB 2.0] and [USB 3.1].
2 8:16 Reserved.
Page 123
Media Agnostic Universal Serial Bus Specification Release 1.0
1 fields are set to 0 (Management) and 27 (USBSuspendResp), respectively. The Status Code value
2 indicates whether the request was successfully completed.
Page 124
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.3.34 Ping Request (PingReq)
2 The Ping Request (PingReq) packet is transmitted by the MA USB host or the MA USB device to verify
3 or possibly re-establish network connectivity with a target MA USB device. The Device Address field is
4 set to the address of the target MA USB device, or to 0xFF (any device). The Device Handle field is
5 reserved. The Type and Subtype fields are set to 0 (Management) and 32 (PingReq), respectively. The
6 Status Code field is set to 0 (NO_ERROR).
Page 125
Media Agnostic Universal Serial Bus Specification Release 1.0
1 3:0 MTD Valid. Defined in Section 6.5.1.8 (Table 66).
1 3:1 Response Required. Set to 1 if a SynchResp packet is required.
NOTE — For broadcast SynchReq packets that have this field set to1, only
MA USB devices that have requested to receive MA USB timestamps are
required to respond.
30 3:2 Reserved.
32 4:0 MA USB Timestamp. Defined in Section 6.5.1.11.
32 5:0 Media Time/Transmission Delay. Defined in Section 6.5.1.12.
Page 126
Media Agnostic Universal Serial Bus Specification Release 1.0
1 (CancelTransferResp), respectively. The Status Code field indicates whether the request was
2 successfully completed. The Dialog Token field is reserved.
3 The CancelTransferResp packet carries the fields listed in Table 50 after the management header.
4 Table 50—Cancel Transfer Response fields
Width Offset Description
(bits) (DW:bit)
16 3:0 EP Handle. Indicates the endpoint for which the response is being returned.
16 3:16 Stream ID. Indicates the stream to which the response is related when the
endpoint identified in the EP Handle field is an Enhanced SuperSpeed
bulk endpoint that supports the Enhanced SuperSpeed Stream Protocol;
reserved otherwise.
8 4:0 Request ID. Indicates the request for which the response is being returned.
3 4:8 Cancellation Status. Set to 0 if the Status Code field is not set to SUCCESS.
Set to 1 if the transfer was cancelled before any data was moved to/from the
USB device. Set to 2 if the transfer was cancelled after some data was moved
to/from the USB device. Set to 3 if the transfer was completed. Set to 4 if the
transfer was not yet received. Set to 5 if the transfer was cleared without any
data moved during ClearTransfersReq processing.
21 4:11 Reserved.
24 5:0 Delivered Sequence Number. For an OUT transfer, indicates the last
sequence number delivered to the device. Valid if Cancellation Status field is
set to 2 and reserved otherwise. Reserved for IN transfers.
8 5:24 Reserved.
32 6:0 Delivered Byte Offset. Indicates the amount of data identified by the sequence
number value in the Delivered Sequence Number field delivered to the device.
Valid if Cancellation Status field is set to 2 and reserved otherwise. Reserved
for IN transfers.
Page 127
Media Agnostic Universal Serial Bus Specification Release 1.0
16 4:0 Stream ID Index. Indicates the lower bound for the stream IDs the MA USB
host is retrieving, if the value of Open Stream field is set to 0. Reserved
otherwise.
1 4:16 Allocation mode. Indicates the rules associated with allocation of stream IDs;
may be set to 1 only if the number of streams is less than 256.
Value Meaning
0 The allocation of stream IDs is free of rules.
1 The allocation of stream IDs shall be sequential and start at 1.
1 4:17 Open Stream. Indicates whether the request is to open new streams or retrieve
previously opened streams.
Value Meaning
0 The request is to retrieve stream IDs of previously opened
streams
1 The request is to open new streams
14 4:18 Reserved.
9 In addition, each EPOpenStreamResp packet carries a set of stream ID interval blocks. Each block
10 identifies a range of consecutive stream IDs. The format of each block is shown in Table 53. The stream
11 ID interval blocks shall be included in the increasing order of the stream ID values.
12 Table 53—Stream ID interval block
Width Offset Description
(bits) (DW:bit)
Page 128
Media Agnostic Universal Serial Bus Specification Release 1.0
16 N:0 First Stream ID. Indicates the value of the first stream ID in the interval
block.
16 N:16 Last Stream ID. Indicates the value of the last stream ID in the interval block.
If the values of the Last Stream ID and First Stream ID fields are equal there is
only one Stream ID identified in the block.
Page 129
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.3.49 USB Device Reset Response (USBDevResetResp)
2 The USB Device Reset Response (USBDevResetResp) packet is transmitted by the target MA USB
3 device to the MA USB host in response to a USBDevResetReq packet. The Device Handle field carries
4 the handle of the USB device for which the response is being returned. The Type and Subtype fields are
5 set to 0 (Management) 47 (USBDevResetResp), respectively. The Status Code field indicates whether
6 the request was successfully completed.
Page 130
Media Agnostic Universal Serial Bus Specification Release 1.0
16 3:0 Keep-alive duration. The duration of the keep-alive measured in units of
aTransferKeepAlive. If this value is 0 the keep-alive is reset to the default
value aDefaultKeepAliveDuration.
16 3:16 EP Handle. Indicates the endpoint the request is targeting.
Page 131
Media Agnostic Universal Serial Bus Specification Release 1.0
Value Meaning
0 Low-Speed
1 Full-Speed
2 High-Speed
3 SuperSpeed
4 SuperSpeedPlus
5-15 Reserved
2 3:4 Lane Speed Exponent (LSE). Indicates the LSE of the USB device as defined
in [USB 3.1] if the Speed field is set to SuperSpeed or SuperSpeedPlus.
Reserved otherwise.
4 3:6 Lane Count. Indicates the lane count of the USB device as defined in [USB
3.1] if the Speed field is set to SuperSpeed or SuperSpeedPlus. Reserved
otherwise.
2 3:10 Link Protocol. Indicates the link protocol of the USB device as defined in
[USB 3.1] if the Speed field is set to SuperSpeed or SuperSpeedPlus. Reserved
otherwise.
4 3:12 Reserved.
16 3:16 Lane Speed Mantissa (LSM). Indicates the LSM of the USB device as
defined in [USB 3.1] if the Speed field is set to SuperSpeed or
SuperSpeedPlus. Reserved otherwise.
Page 132
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.3.56 Sleep Request (SleepReq)
2 The Sleep Request (SleepReq) packet is transmitted by an MA USB PAL to indicate the desire to move
3 the session state to Session Inactive (Section 8.1.1.4). The Device Handle field is reserved. The Type
4 and Subtype fields are set to 0 (Management) and 54 (SleepReq), respectively. The Status Code field is
5 set to 0 (NO_ERROR).
6 The SleepReq packet carries the fields listed in Table 60 after the management header.
7 Table 60—SleepReq fields
Width Offset Description
(bits) (DW:bit)
32 3:0 Management Request Timeout. Indicates the maximum time (in
milliseconds) between the moment the remote MA USB PAL releases a
management packet requiring a response to the management channel, and the
moment it can expect the corresponding response packet through the
management channel, while its session is in Session Inactive state.
32 4:0 Data Request Timeout. Indicates the maximum time (in milliseconds)
between the moment the remote MA USB PAL releases a control or data
packet requiring a response to the assigned data channel, and the moment it
can expect the corresponding response packet through the assigned data
channel, while its session is in Session Inactive state.
8 NOTE — Management Request Timeout and Data Request Timeout values are respectively equivalent to
9 aManagementRequestTimeout and aTransferTimeout p rotocol constants when session is in Session Active state.
Page 133
Media Agnostic Universal Serial Bus Specification Release 1.0
1 USB device has to exercise a timeout value of 4 seconds when initiating a management packet exchange that targets
2 the MA USB host. A SleepResp packet transmitted by the MA USB host with Status Code value of
3 REQUEST_DENIED and a Management Request Timeout value of 4,000 indicate s that the MA USB host has not
4 moved its session state to Session Inactive, but may accept the request to move its session state to Session Inactive if
5 the Management Request Timeout value in a future SleepReq packet does not exceed 4,000 milliseconds.
Page 134
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.4 Control packets
2 MA USB control packets share the control header shown in Figure 38. All control header fields are
3 defined in Section 6.2.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Length Type Subtype Flags Version DWORD 0
Page 135
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.5 Data packets
2 Non-isochronous data packets share the header shown in Figure 39. Isochronous data packets share the
3 header shown in Figure 40. Header fields not defined in Section 6.2 are defined in Section 6.5.1. Data
4 packet subtypes are defined in Sections 6.5.2 through 6.5.6.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Length Type Subtype Flags Version DWORD 0
Page 136
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.5.1.2 T-Flags
2 The 6-bit T-Flags field (offset 2:10), shown in Figure 41, contains the bit fields listed in Table 65.
15 14 13 12 11 10 9 8
Reserved Transfer Type EoT NEG ARQ DWORD 2
3
4 Figure 41—T-Flags field
5 Table 65—T-Flags subfields
Width Offset Description
(bits) (DW:bit)
1 2:10 ARQ (Acknowledgment Request). Set to 1 to indicate an acknowledgment
request and 0 otherwise. Reserved for all data packet subtypes other than
Transfer Request and Transfer Response.
1 2:11 NEG (Negative Credit). A logical extension of the 32-bit Credit field to form
a 33-bit signed integer using two’s complement format. If set to 0, the 32-bit
credit field is carrying a positive number in the range 0 to 232 – 1. If set to 1,
the 33-bit number made of concatenation of this bit and the Credit field is
carrying a negative number in the range –1 to –232 . This field may be set to 1
only if the device indicates support for elastic buffer capability in the CapResp
packet it sends to the MA USB host.
1 2:12 EoT (End of Transfer). In an OUT transfer, set to 1 to indicate the
completion of the transfer, i.e., delivery of the data to the endpoint. In an IN
transfer, set to 1 to indicate the last TransferResp packet related to the transfer.
2 2:13 Transfer Type. Indicates the transfer type of the data packet,
Value Meaning
00b Control
01b Isochronous
10b Bulk
11b Interrupt
NOTE — In a Control TransferReq packet with the Sequence Number field
set to 0, the first 2 DWORDs of the payload in the packet are control transfer
setup data.
1 2:15 Reserved.
Page 137
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.5.1.5 Request ID
2 The 8-bit Request ID field (offset 3:24) carries the identifier assigned by the MA USB host to an MA
3 USB transfer to identify it among all outstanding transfers targeting the same endpoint. All data packets
4 (request or response) belonging to the same MA USB transfer carry the same Request ID.
5 6.5.1.6 Remaining Size/Credit (non-isochronous data packets)
6 The 32-bit Remaining Size/Credit field (offset 3:0) carries the number of bytes remaining to complete a
7 transfer (assuming the current packet is successfully received), or the number of bytes that the receiver
8 can accept. The exact function of this field depends on the transfer direction and data packet subtype.
9 6.5.1.7 Number of Headers (isochronous data packets)
10 When sent in an MA USB isochronous transfer request packet for an OUT transfer or an MA USB
11 isochronous transfer response for an IN transfer, the 12-bit Number of Headers field (offset 2:16) carries
12 the number of isochronous headers that are present in the packet. When sent in an MA USB isochronous
13 transfer request packet for an IN transfer, the Number of Headers field carries the number of IRS
14 headers that are present in the packet. The Number of Headers field is reserved otherwise.
15 6.5.1.8 I-Flags (isochronous data packets)
16 The 4-bit I-Flags field (offset 2:28) is formatted as shown in Figure 42, with the subfields defined in Table
17 66.
31 30 29 28 27 26 25 24
ASAP Isochronous Header Format MTD Valid DWORD 2
18
19 Figure 42—I-Flags field
20 Table 66—I-Flags subfields
Width Offset Description
(bits) (DW:bit)
1 2:28 MTD Valid. Set to 1 if the Media Time/Transmission Delay field in the packet
carries a valid value and set to 0 otherwise.
NOTE — The MTD Valid subfield can be set to 0 both at transmission (e.g.,
before releasing the MA USB packet to the lower network layer to indicate
that the field has not been uninitialized) and reception (e.g., after receiving
the MA USB packet from the lower network layer and detecting inaccuracy
in the Media Time/Transmission Delay field.).
2 2:29 Isochronous Header Format. Indicates the format of all isochronous headers
or isochronous read size (IRS) blocks in the packet. When applied to
isochronous headers, valid values for this subfield are 0 (short format), 1
(standard format) and 2 (long format). When applied to isochronous read size
(IRS) blocks, valid values are 0 (standard format) and 1 (long format).
1 2:31 ASAP. Set to 1 to request immediate (as soon as possible) delivery to or from
the target isochronous endpoint, or to 0 to indicate delivery at the time
specified by the Presentation Time field in an isochronous transfer request
packet. This field is reserved for isochronous transfer response packets.
Page 138
Media Agnostic Universal Serial Bus Specification Release 1.0
1 isochronous endpoint. The time of delivery for each subsequent segment (if any) embedded in the packet
2 is implicitly defined according to the Service Interval associated with the target isochronous endpoint.
3 The field is reserved in isochronous transfer request packets that indicate as soon as possible (ASAP)
4 delivery. The Presentation Time field has the format shown in Figure 43, with the subfields defined in
5 Table 67.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Microframe
Frame Number DWORD 4
Number
6
7 Figure 43—Presentation Time field format
8 Table 67—Presentation Time subfields
Width Offset Description
(bits) (DW:bit)
3 4:0 Microframe Number. Indicates the modulo-8 number of the USB microframe
(the 125 μs time base) at the time of interest. Set to 0 when not supported.
17 4:3 Frame Number. Indicates the USB frame number, i.e., the 1 millisecond time
base established by the MA USB host. Frame number is maintained modulo
217 or a smaller number, but not smaller than 211 .
Page 139
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Media Time and Transmission Delay values have accuracy requirements. For Media Time, there is an
2 additional sampling accuracy requirement applicable at transmission. See Section 6.6 for details.
Page 140
Media Agnostic Universal Serial Bus Specification Release 1.0
1 6.5.5 Isochronous Transfer Request (IsochTransferReq)
2 The Isochronous Transfer Request (IsochTransferReq) packet initiates an MA USB isochronous IN or
3 OUT transfer. It carries the data header shown in Figure 40. When initiating an isochronous IN transfer,
4 the packet carries no payload. When initiating an isochronous OUT transfer, the packet additionally
5 carries the first segment of the OUT transfer payload.
6 The Type and Subtype fields are set to 2 (Data) and 3 (IsochTransferReq), respectively. The Status Code
7 field is set to 0 (NO_ERROR). The EPS field is reserved.
8 The Sequence Number field is set to aInvalidSequenceNumber for IN transfers. It is set according to
9 Section 6.5.1.4 for OUT transfers.
MA USB USB
device MA link with MA link without segment USB
synchronization function synchronization function device
(MA USB Timestamp, MA USB (MA USB Timestamp,
MA USB
Media Time) host Transmission Delay)
device
31
32 Figure 44—MA USB clock model and distribution
33 Each sample of the MA USB Global Clock designates the MA USB Global Time (MGT) at the
34 sampling instant. The MGT format is shown in Figure 45, with the subfields defined in Table 68.
Page 141
Media Agnostic Universal Serial Bus Specification Release 1.0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Nominal Bus Interval Delta DWORD N
1
2 Figure 45—MA USB Global Time (MGT) format
3 Table 68—MA USB Global Time (MGT) subfields
Width Offset Description
(bits) (DW:bit)
13 N:0 Delta. Indicates the value of Delta field in Isochronous Timestamp Packet as
defined in [USB 3.1]. Delta is maintained in units of 8 nominal HS bit times,
i.e., 8/480 μs (nominal).
19 N:13 Nominal Bus Interval. Indicates the nominal USB microframe number, i.e.,
the 125 μs time base. Nominal Bus Interval is maintained modulo 219 .
4 6.6.2 Synchronization
5 Clock synchronization in MA USB is achieved by the MA USB host transmitting samples of the MA
6 USB Global Clock through timestamp fields of certain management and data packets. Specifically, the
7 MA USB host carries the MA USB Global Time in the MA USB Timestamp field of SynchReq (Section
8 6.3.40) and IsochTransferReq (Section 6.5.5) packets.
9 Because of the loose coupling between MA USB protocol and the PHY layer of each MA link, this
10 specification defines mechanisms to enable the receiver of an MA USB timestamp to compensate for the
11 variable latency MA USB packets experience across an MA link.
12 Compensation through a synchronized “Media Time”: Some MA links provide access to a
13 synchronized “Media Clock”, possibly implemented for networking purposes outside MA USB.
14 By providing a reading of the Media Clock (referred to as Media Time) at the moment the MA
15 USB Timestamp field in an outgoing MA USB packet is initialized, an additional point of
16 reference is made available to the receiver of the MA USB timestamp to adjust the received
17 timestamp for additional latencies. The Media Clock of an MA link shall have an accuracy of
18 ±aMaxMediaTimeError, i.e., the Media Time at the two ends of an MA link shall not be different
19 by more than 2×aMaxMediaTimeError. Media Time is carried in the Media Time field of the
20 MA USB packet containing an MA USB timestamp. Sampling of the Media Clock shall have an
21 accuracy of ±aMaxMediaTimeSamplingError, i.e., the value inserted into the Media Time field
22 of an MA USB packet shall not be more than ±aMaxMediaTimeSamplingError different from
23 the value of the Media Time at the moment of insertion.
24 NOTE — The Media Time format depends on the Media Clock and is media-specific.
25 NOTE — The synchronization function of a Media Clock may be required to compensate for the MA link average
26 latency (path delay) to meet the Media Clock accuracy requirement.
27 NOTE — A received MA USB timestamp carries an error no smaller than the difference between the local Media
28 Time at the moment the MA USB timestamp is captured and the Media Time transmitted in the MA USB packet.
29 Implementations need to consider additional complexities when applying an error term to the complex (frame,
30 microframe) MGT format.
Page 142
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — As the name implies, the transmission delay estimate does not cover additional latencies incurred at the
2 receiver; compensating for latencies local to the receiver is a matter of receiver implementation and outside the
3 scope of this specification.
4 The compensation method for each MA link is decided by the MA USB host and does not change
5 through the lifetime of an MA link. The MA USB host indicates access to a synchronized Media Time
6 by setting the Media Time Available field in any CapReq packet it transmits to a target MA USB device.
7 The target MA USB device also indicates access to the same synchronized Media Time by setting the
8 Media Time Available bit in any CapResp packet it transmits to the MA USB host. The latency
9 compensation method applied to the MA link in both directions shall be based on Media Time if both
10 MA USB host and device have indicated Media Time availability, and shall be based on Transmission
11 Delay otherwise.
12 NOTE — The type and characteristics (e.g., accuracy) of the Media Clock are assumed to be known to both MA
13 USB host and device by virtue of the MA Link type and the discovery context, i.e., MA USB host and device refer
14 to the same Media Clock when announcing the Clock availability.
15 The MA USB host distributes the MGT through a combination of broadcast and unicast SynchReq
16 (Section 6.3.40) packets as well as IsochTransferReq (Section 6.5.5) packets. The MA USB host shall
17 not transmit unicast SynchReq packets to an MA USB device that has not requested to receive MA USB
18 timestamps.
19 For monitoring and diagnostic purposes, the MA USB host may request an MA USB device that has
20 requested to receive MA USB timestamps to share its local instance of the MGT through an appropriate
21 response packet. An MA USB device that has requested to receive MA USB timestamps
22 shall respond to a unicast or broadcast SynchReq packet that has a Response Required bit set to 1
23 with a SynchResp packet that includes a local reading of the MGT;
24 may insert a local reading of the MGT in any of the IsochTransferResp (Section 6.5.6) packets it
25 transmits to the MA USB host.
26 The MA USB host shall distribute the MGT to each MA USB device in Session Active state (Section
27 8.1.1.3) that has at least one configured isochronous endpoint. MGT shall be delivered at least once
28 every aMinSynchFrequencyActive if the target MA USB device has at least one active isochronous
29 endpoint (i.e., a configured isochronous endpoint that has not been idle for more than
30 aMinSynchFrequencyIdle), and at least every aMinSynchFrequencyIdle otherwise.
31 NOTE — The MA USB host may distribute the MGT to an MA USB hub prior to the enumeration of the integrated
32 USB hub and following the transition of the integrated USB hub out of a low power state.
33 NOTE — The clock synchronization mechanism for MA USB described in this specification assumes a hardware
34 implementation.
Page 143
Media Agnostic Universal Serial Bus Specification Release 1.0
Assigned
Halted
Unassigned
EPActivateReq
9
10 Figure 46—EP handle state diagram
Page 144
Media Agnostic Universal Serial Bus Specification Release 1.0
1 While in Halted State the endpoint is not capable of USB transactions. Any TransferReq packet received
2 targeting the EP shall be buffered and acknowledged with a TransferResp packet with status code set to
3 INVALID_EP_HANDLE_STATE.
4 This state exits when:
5 The MA USB device receives an EPResetReq packet (Section 6.3.12) from the MA USB host.
6 The MA USB device receives a DevResetReq packet (Section 6.3.18).
7 NOTE — rules for entering and exiting the Halted state for endpoints are as defined in USB specification;
8 specifically as defined in Section 5.6.5 of [USB 2.0] for isochronous endpoints and Section 5.5.5 of [USB 2.0] for
9 control endpoints.
Page 145
Media Agnostic Universal Serial Bus Specification Release 1.0
1 If the MA USB device receives a USBDevDisconnectReq packet (Section 6.3.26) from the MA USB
2 host targeting a device to which the EP handle belongs.
3 If the MA USB device receives a DevDisconnectReq packet (Section 6.3.36) from the MA USB host.
4 This state exits when the MA USB device receives an EPHandleReq packet (Section 6.3.6) from the MA
5 USB host.
6 If the MA USB PAL receives a TransferReq packet targeting an EP handle in the Unassigned state, then
7 the MA USB device shall respond with a TransferResp packet with status code set to
8 INVALID_EP_HANDLE.
Page 146
Media Agnostic Universal Serial Bus Specification Release 1.0
Modify EP0 USB Full-speed devices are allowed to implement a default control
endpoint maximum packet size of 8, 16, 32 or 64 bytes. The device
reports the size of the implementation in its device descriptor. An
operational nuance is that the host system must read the device
descriptor before knowing the size of the endpoint. Many host
implementations make an assumption about the size of the control
endpoint, read the device descriptor and then modify the endpoint
object to set the new packet size.
Address device A USB host core system manages the state of an attached device
based on the canonical device state diagram in Chapter 9 of the
Universal Serial Bus Specification, revision 1.0. A USB port reset
drives the device attached to that port to device address zero (called
the Default device state). The host system will then initiate an action
to assign a nonzero address to the device and transition it to the
Address state.
Evaluate device There are situations where additional device parameters are
determined by policies of the host system software or are obtained in
the later phases of enumeration. This event represents the projection
of host system policies that need to be recorded in the device object
for proper operation on the bus.
Configure device Before a device can be used (other than the default control endpoint),
it must be explicitly configured. In typical USB host systems, the
client device driver requests USB system software to set a specific
configuration on the device. The USB host system software will
allocate endpoint objects for the endpoints described in the selected
configuration and will issue a SetConfiguration request to the device.
Port manipulation USB core system software provides standard methods for upper level
entities (like the hub driver) to manipulate fields in downstream
facing port registers (e.g. read status, write control bits). Port
manipulation represents the use of any of these methods activated by
USB host system software.
1
Event Description
Port status change USB downstream facing ports in Hosts and Hubs have associated
port registers in which are contained control, status and status change
bits. Whenever a status bit in a port register changes as a result of a
device interaction, the event is recorded in a corresponding status
change bit. A status change bit usually results in a notification being
delivered to the USB host system software that a status change bit is
set in a particular port.
2
Entity Description
MA USB host USB This represents the USB system software on the host platform that
core system provides enumeration, device and endpoint management, and transfer
services to USB client drivers.
Page 147
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Integrated USB device enumeration follows successful establishment of MA USB device connection
2 with the MA USB host, i.e., following completion of capability exchange.
3 Example generalized sequences of the integrated USB device enumeration procedure is shown in Figure
4 47.
USBDevHandleReq
USBDevHandleResp
Device level resources allocated
Open EP action (for EP0)
EPHandleReq(EP0)
EPHandleResp(EP0) USB Device in
Default state
Control URB (Read device descriptor)
ModifyEP0Resp
Port reset (port manipulation action)
Handled locally by MA USB host
USB Device in
SetUSBDevAddressResp Address state
ModifyEP0Req
ModifyEP0Resp(EP0Handle)
UpdateDevReq
UpdateDevResp
Control URB (Read configuration
descriptor)
EPHandleReq
EPHandleResp
USB Device in
Control Transfer Response Configured state
5
6 Figure 47—Enumeration of an integrated USB device
7 Following the MA USB session establishment, the MA USB host PAL emulates a port status change
8 event equivalent of connecting a wired USB device to one of the root ports, which will trigger port
9 manipulation actions by the MA USB host USB core system. These actions are handled locally by the
10 MA USB host PAL.
11 7.3.2.1 USB device handle allocation
12 The Open Device action triggers the MA USB host to transmit a USB Device Handle Request
13 (USBDevHandleReq) packet (Section 6.3.4) to the MA USB device managing the target USB device.
14 The USBDevHandleReq packet carries the USB route string (as defined in [USB 3.1]) for the USB
15 device, the port number on which the USB device is connected to its parent hub (root port for the
Page 148
Media Agnostic Universal Serial Bus Specification Release 1.0
1 integrated USB device on MA USB device), and the speed of the USB device which is learnt as part of
2 the capability exchange.
3 Upon receipt of the USBDevHandleReq packet, the target MA USB device shall respond with a USB
4 Device Handle Response (USBDevHandleResp) packet (Section 6.3.5) to inform the MA USB host
5 whether the request was successfully completed. If the target USB device is already allocated a device
6 handle, then the MA USB device shall respond with a USBDevHandleReq packet carrying the device
7 handle of the USB device and the value of the Status Code field set to INVALID_REQUEST.
8 The MA USB host shall ensure that at any given time there is only one USBDevHandleReq packet
9 pending a response.
10 7.3.2.2 Endpoint handle allocation
11 Both Open EP and Configure device actions trigger the MA USB host to transmit an EP Handle Request
12 (EPHandleReq) packet (Section 6.3.6) to the MA USB device managing the target USB device
13 (identified by the Device Handle field in the EPHandleReq packet).
14 The EPHandleReq packet is only valid after USB device handle allocation has been successfully
15 completed.
16 When triggered by an Open EP action, the EPHandleReq packet is transmitted to request an EP handle
17 for the default control endpoint (endpoint 0) on the target USB device. In this case, the EPHandleReq
18 packet carries a single EP descriptor, corresponding to the default control endpoint on the device. The
19 USB descriptor fields embedded inside the EP descriptor are set as follows: bLength=7,
20 bDescriptorType=5 (ENDPOINT), bEndpointAddress =00h, bmAttributes=0, wMaxPacketSize=8 for an
21 LS or FS device, 64 for an HS device and 512 for an Enhanced SuperSpeed device, and bInterval=0.
22 When triggered by a Configure Device action, the EPHandleReq packet is transmitted to request EP
23 handles for a number of endpoints on the target USB device. In this case, the EPHandleReq packet
24 carries an EP descriptor for each of the endpoints activated under the selected device configuration.
25 Upon receipt of the EPHandleReq packet, the target MA USB device shall respond with an EP Handle
26 Response (EPHandleResp) packet (Section 6.3.7) to inform the MA USB host whether the request was
27 successfully completed, and also to return MA USB attributes of the EP handle such as the credit
28 consumption unit (Section 5.5.1). Note that for EP0 the USB Address subfield in EP handle is set to the
29 default value 0.
30 7.3.2.3 Modification of EP0 parameters
31 The Modify EP0 action has two usages,
32 It may be invoked to modify the maximum packet size for the default control endpoint of an FS
33 USB device from its initial value.
34 It is also invoked to request an updated EP0 handle after the USB device has been assigned a
35 USB address, i.e., after the MA USB host receives a Set USB Device Address Response
36 (SetUSBDevAddrResp) packet (Section 6.3.22).
37 The action triggers the MA USB host to transmit a Modify EP0 Request (ModifyEP0Req) packet
38 (Section 6.3.20) to the MA USB device in control of the target USB device, which includes the device
39 handle of the target USB device, as well as the EP0 handle and the maximum packet size for endpoint 0.
40 The MA USB host shall transmit a ModifyEP0Req packet after receiving the response to a Set USB
41 Device Address Request packet sent to a USB device in Default or Address states.
Page 149
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Upon receipt of the ModifyEP0Req packet, the target MA USB device shall respond with a Modify EP0
2 Response (ModifyEP0Resp) packet (Section 6.3.21) to inform the MA USB host whether the request
3 was successfully completed. The ModifyEP0Resp packet shall include a new EP0 handle if the EP0
4 handle in the ModifyEP0Req packet carried the default USB address (00h) (refer to the EP handle
5 structure in Section 6.2.1.5), and the target USB device is in Address state. The MA USB host PAL shall
6 return the result of the ModifyEP0Req to the MA USB host USB core system.
7 7.3.2.4 USB device address allocation
8 The address device action triggers the MA USB host to transmit a Set USB Device Address Request
9 (SetUSBDevAddrReq) packet (Section 6.3.22) to the MA USB device managing the target USB device.
10 The SetUSBDevAddrReq packet carries the device handle of the USB device for which the set address
11 request is targeted.
12 Upon receipt of a SetUSBDevAddrReq packet, the target MA USB device shall respond with a Set USB
13 Device Address Response (SetUSBDevAddrResp) packet (Section 6.3.23) to inform the MA USB host
14 whether the request was successfully completed and return the USB device address to the MA USB
15 host.
16 7.3.2.5 Update of USB device parameters
17 The evaluate device action triggers the MA USB host to transmit an Update Device Request
18 (UpdateDevReq) packet (Section 6.3.24) to the target MA USB device. The UpdateDevReq packet
19 includes the USB device handle for which the request and the USB device parameters are targeted.
20 NOTE — The host may choose not to transmit an Update Device Request packet when enumerating a non-hub
21 integrated USB device.
22 Upon receipt of the UpdateDevReq packet, the target MA USB device shall respond with an Update
23 Device Response (UpdateDevResp) packet (Section 6.3.25) to inform the MA USB host whether the
24 request was successfully completed. The MA USB host shall return the result of Update Device Request
25 to MA USB host USB core system.
Page 150
Media Agnostic Universal Serial Bus Specification Release 1.0
USBDevHandleReq
USBDevHandleResp
Device level resources allocated
Open EP action (for EP0)
EPHandleReq(EP0)
EPHandleResp(EP0) USB Device in
“default state”
Control URB (Read device descriptor)
ModifyEP0Resp
USB Device in
SetUSBDevAddressResp “address state”
ModifyEP0Req
ModifyEP0Resp(EP0Handle)
UpdateDevReq
UpdateDevResp
Control URB (Read device descriptor)
EPHandleReq
EPHandleResp
USB Device in
Control Transfer Response “configured state”
1
2 Figure 48—Enumeration of a USB device downstream of an MA USB hub
Page 151
Media Agnostic Universal Serial Bus Specification Release 1.0
1 7.3.4 Support of Stream Protocol
2 In order to use the Enhanced SuperSpeed Stream Protocol [USB 3.1] on a bulk endpoint, the MA USB
3 host first opens the streams on the endpoint by transmitting an Endpoint Open Streams Request
4 (EPOpenStreamReq) packet (Section 6.3.44) indicating the number of streams to be opened. The MA
5 USB host shall ensure that the requested number of streams is supported by the MA USB device (as
6 indicated in CapResp packet). The MA USB device shall respond to an EPOpenStreamReq packet with
7 an Endpoint Open Streams Response (EPOpenStreamResp) packet (Section 6.3.45) and inform the MA
8 USB host whether the Endpoint Open Streams Request was successfully completed and return the
9 Stream IDs for the opened streams. If the number of streams requested by the host is larger than the
10 value supported by the MA USB device, the MA USB device shall set the value of the Status Code field
11 in EPOpenStreamResp packet to INSUFFICIENT_RESOURCES. The number of streams that are
12 included in the EPOpenStreamResp may be less than the number of streams requested by the MA USB
13 host to meet the MA link MTU size. An MA USB host that receives a smaller number of Stream IDs
14 than it asked for may transmit additional EPOpenStreamReq packets with the Open Stream field set to 0
15 to retrieve the remaining Stream IDs. Figure 49 illustrates an example in which the MA USB host
16 transmits multiple EPOpenStreamReq packets to retrieve all the requested Stream IDs.
USBDI MA Link Interface MA Link Interface USB Logic EP
Page 152
Media Agnostic Universal Serial Bus Specification Release 1.0
1 relevant actions if applicable (in case of an xHCI, for example, the USB controller would initiate USB
2 Reset Device command). If the MA USB device does not implement a physical USB controller then the
3 USBDevResetReq packet may result in no operation by the MA USB device.
4 The MA USB device shall respond to a USBDevResetReq packet with a USB Device Reset Response
5 (USBDevResetResp) packet (Section 6.3.49).
USBDevResetResp
USB controller, if present, is notified of the
USB device transition to Default state; relevant
actions, if applicable, are taken (in case of an
xHCI implementatio USB Device Reset
command is issued).
ModifyEP0Req
ModifyEP0Resp(EP0Handle)
6
7 Figure 50—USB device reset
8 Note that with transitioning of a USB device to Default state, its USB device address is set to 0 and
9 hence the EP0 Handle for the USB device is modified. The MA USB host shall follow a
10 USBDevResetResp packet with ModifyEP0Req packet to receive the updated EP0 Handle from the MA
11 USB device. The receipt of the USBDevResetReq packet results in transition of the assigned EP0
12 Handle to Active state and returns the state of the endpoint to the initial state. It is expected that next
13 “address device action” in the MA USB host would trigger transmission of SetUSBDevAddrReq packet
14 and consequently transition the MA USB device to Address state (Section 7.3.2).
Page 153
Media Agnostic Universal Serial Bus Specification Release 1.0
Session
Session Down Session Active Session Inactive
Connecting
13 While in Session Down state, there is no communication between the MA USB host and the MA USB
14 device and neither MA USB host nor MA USB device is active. In this state the lower layers of the MA
15 USB device and the MA USB host are involved in discovery of either an MA USB host or MA USB
16 devices with which the MA USB device and the MA USB host may connect, respectively.
17 The state exits when:
18 The MA USB host/MA USB device receives an indication from the lower layers that discovery of an
19 MA USB device/MA USB host is completed.
25 Entering this state triggers the session setup procedure by the MA USB host, consisting of MA USB
26 reset and capability exchange mechanisms (Section 8.1.2). While in this state, the MA USB host may
27 optionally initiate the MA USB session teardown mechanism (Section 8.1.3).
Page 154
Media Agnostic Universal Serial Bus Specification Release 1.0
1 While in this state the MA USB device waits for either session setup related packets (Section 8.1.2) or
2 MA USB session teardown related packets (Section 8.1.3) from the MA USB host.
3 The state exits on the following events:
4 USBDevHandleReq/Resp packet exchange (Section 6.3.4), following completion of Session setup
5 (Section 8.1.2) and the decision to continue the session with the MA USB device.
6 There is a management packet transmission failure (Section 5.2.1).
7 DevDisconnectReq/Resp packet exchange (Section 8.1.3).
14 While in this state, the MA USB host and the MA USB device may exchange management, control, or
15 data packets.
16 The state exits on following events:
17 DevResetReq/Resp packet exchange (Section 8.1.2).
18 There is a management packet transmission failure (Section 5.2.1.1).
19 DevDisconnectReq/Resp packet exchange (Section 8.1.3).
20 SleepReq/Resp packet exchange (Section 8.2).
24 While in this state, there is no communication between the MA USB host and the MA USB device
25 except for the power management related packets including implicit WakeReq/Resp packets (Section
26 8.2) and the MA USB host and/or the MA USB device may be in a low power state. The state exits on
27 the following events:
28 There is an indication of loss of connection from lower layers.
29 There is a management packet transmission failure (Section 5.2.1.1).
30 WakeReq/Resp packet exchange (Section 8.2).
31 An implicit WakeReq/Resp packet exchange (Section 8.2).
Page 155
Media Agnostic Universal Serial Bus Specification Release 1.0
Discovery completed
DevResetReq
DevResetResp
CapReq
CapResp
1
2 Figure 52—MA USB device session setup
3 8.1.2.1 MA USB device reset
4 The MA USB host transmits an MA USB Device Reset Request (DevResetReq) packet (Section 6.3.18)
5 to the target MA USB device, to request the MA USB device to clear all its internal states and join the
6 MSS operated by the MA USB host.
7 The target MA USB device is reached through a network address normally determined after media-
8 specific discovery. The DevResetReq packet includes the SSID selected by the MA USB host (in the
9 SSID field), as well as the nonzero address assigned to the MA USB device by the MA USB host (in the
10 Device Address field). The SSID value selected by the MA USB host shall be a random integer between
11 1 and 254, and shall be different from any SSID values that the MA USB host has possibly observed
12 during media-agnostic discovery as well as during normal operation after discovery. SSID values 0 and
13 255 are reserved for future protocol extensions, including diagnostics. The MA USB device address
14 carried in the Device Address field shall be unique within the MSS in which the MA USB device is
15 operating.
16 The target MA USB device shall respond to a DevResetReq packet with an MA USB Device Reset
17 Response (DevResetResp) packet (Section 6.3.19) to indicate its willingness to join the MSS (i.e., move
18 the state of its session with the MA USB host to Session Connecting), and whether the reset operation
19 was successfully completed. A target MA USB device that responds to a DevResetReq packet and
20 indicates successful reset shall store the SSID and the device address it received in the DevResetReq
21 packet, and shall ignore any MA USB packets, other than possibly another DevResetReq packet, which
22 does not carry the same SSID and device address values (with the exception of PingReq packets with the
23 Device Address field set to 0xFF). The MA USB host shall use the same SSID and device address
24 values in all following packet exchanges with the target MA USB device. The MA USB host shall not
25 transmit any packet other than DevResetReq packet to a target MA USB device unless it receives a
26 DevResetResp packet from the device with the status code of SUCCESS.
27 NOTE — An MA USB device may choose not to respond to a DevResetReq packet if it is not willing to join the
28 MSS indicated in the DevResetReq packet. For example, an active MA USB device may choose to ignore a
29 DevResetReq packet indicating a different MSS from what the device is operating in. The context for a received
30 DevResetReq packet is normally made available through media-specific discovery mechanisms and is beyond the
31 scope of this specification.
32 NOTE — MA USB device reset is different from USB device reset (Section 7.3.5).
Page 156
Media Agnostic Universal Serial Bus Specification Release 1.0
1 8.1.2.2 Capability exchange
2 For MA USB capability exchange, the MA USB host transmits an MA USB Capability Request
3 (CapReq) packet (Section 6.3.2) to the target MA USB device. The MA USB device shall respond with
4 an MA USB Capability Response (CapResp) packet (Section 6.3.3) to inform the MA USB host whether
5 the MA USB Capability Request was successfully completed on the MA USB device, and if yes include
6 the maximum number of devices and the maximum number of endpoints for which the MA USB device
7 can track state.
8 After a successful MA USB device capability exchange the session between the MA USB host and the
9 MA USB device is considered established.
10 Establishment of MA USB session shall trigger emulation of one Port Status Change event (Section
11 7.3.2) in the MA USB host if the session is established with an MA USB device or an MA USB hub
12 with an integrated USB 2.0 hub, and two Port Status Change events if the session is established with an
13 MA USB hub with an integrated USB 3.1 hub.
Page 157
Media Agnostic Universal Serial Bus Specification Release 1.0
Page 158
Media Agnostic Universal Serial Bus Specification Release 1.0
DevDisconnectReq
DevDisconnectResp
All allocated resources are removed All allocated resources are removed
1
2 Figure 54—Host initiated session tear down
3 8.1.3.3 Device initiated session tear down
4 In device initiated session tear down (Figure 55), the MA USB device notifies the MA USB host of the
5 MA USB device’s intention of tearing down the session by transmitting an MA USB device Initiated
6 Disconnect Request (DevInitDisconnectReq) packet (Section 6.3.38) to the MA USB host. The MA
7 USB host shall respond to a DevInitDisconnectReq packet with an MA USB device Initiated Disconnect
8 Response (DevInitDisconnectResp) packet (Section 6.3.39).
9 Following receipt of a DevInitDisconnectReq, the MA USB host shall initiate the session teardown, as
10 specified in Section 8.1.3.2.
DevDisconnectReq
DevDisconnectResp
All allocated resources are removed All allocated resources are removed
11
12 Figure 55—Device initiated session tear down
Page 159
Media Agnostic Universal Serial Bus Specification Release 1.0
1 8.1.3.4 USB device removal procedure
2 The USB device removal procedure (Figure 56) consists of four steps:
3 1. The MA USB host inactivates and clears all the outstanding transfers on all the active endpoints.
4 This step can occur in two different ways; in alternative 1 the host uses CancelTransferReq and
5 EPInactivateReq packets (Sections 6.3.42 and 6.3.10) to stop the endpoint and clear the transfers;
6 and in alternative 2 the host uses the EPInactivateReq packet (Section 6.3.10) followed by
7 ClearTransfersReq packet (Section 6.3.14).
8 2. The MA USB host deletes all the EP handles, except for EP handle of EP 0.
9 3. The MA USB host deletes the EP handle of EP0.
10 4. The MA USB host sends a USB Disconnect Device Request (USBDevDisconnectReq) packet
11 (Section 6.3.26) to the MA USB device to trigger the MA USB device to remove all the resources
12 allocated to the USB device, including the device handle.
Stop EP
Clear outstanding transfer
CancelTransferResp(Request ID active,
Status Code SUCCESS)
EPInactivateReq(EPHandle active)
Applicable to all
active EPs
EPInactivateResp(EPHandle active,
Status Code SUCCESS)
EPInactivateResp(EPHandle active,
Status Code SUCCESS)
EPClearTransferReq(EPHandle active)
Clear all outstanding transfers
EPClearTransferResp(EPHandle active,
Status Code SUCCESS)
EPs except for EP0
Applicable to all
EPHandleDeleteReq(EPHandle active)
EPHandleDeleteResp(EPHandle active,
Status Code SUCCESS)
EPInacti vateReq(EPHandle 0)
EPInactivateResp(EPHandle 0,
Allocated resources t o t he EP are removed Status Code SUCCESS)
EPHandleDeleteReq(EPHandle 0)
EPHandleDeleteResp(EPHandle 0,
Status Code SUCCESS)
USBDevDisconnectReq
USBDevDisconnectResp
Page 160
Media Agnostic Universal Serial Bus Specification Release 1.0
1 8.2.1 Transition to Session Inactive state
2 8.2.1.1 Initiation by the MA USB host
3 The MA USB host may initiate the process to move its session state to Session Inactive by following
4 these steps in order: (1) inactivating all EP handles on the target MA USB device, (2) suspending the
5 integrated USB device behind the target MA USB device, and (3) transmitting a SleepReq packet
6 (Section 6.3.56) to the target MA USB device. To inactivate EP handles on the target MA USB device,
7 the MA USB host transmits one or more EPInactivateReq packets (Section 6.3.10) to the MA USB
8 device; the MA USB device responds to each EPInactivateReq packet with an EPInactivateResp packet
9 (Section 6.3.11) to indicate whether the inactivate request was successful. To suspend the integrated
10 USB device behind the target MA USB device the MA USB host transmits a USBSuspendReq packet
11 (Section 6.3.28) to the MA USB device; the MA USB device responds to a USBSuspendReq packet
12 with a USBSuspendResp packet (Section 6.3.29) to indicate whether the suspend request was successful.
13 The SleepReq packet carries the timeout values the target MA USB device has to observe when it
14 initiates a management, control or data packet exchange in Session Inactive state. Upon receiving the
15 SleepReq packet, the target MA USB device shall respond with a SleepResp packet with the Status
16 Code field set to 0 (NO_ERROR) if it grants the transition request, and set to REQUEST_DENIED
17 otherwise. Should the target MA USB device accept the request to move its session state to Session
18 Inactive, through the SleepResp packet it shall indicate its own timeout values for management, control
19 and data packet exchanges initiated by the MA USB host in Session Inactive state, with all timeout
20 values less than or equal to the corresponding timeout values in the SleepReq packet.
21 NOTE — The MA USB device is not allowed to deny the SleepReq packet with the timeout fields set to zero
22 following the transition of the integrated USB device to suspend state.
23 After the target MA USB device transmits a SleepResp packet with the Status Code field set to 0
24 (NO_ERROR), it will move its session state to Session Inactive, and instruct its local management entity
25 for the MA link connecting the MA USB device and the MA USB host to perform required actions to
26 put the MA link in a suitable low-power mode that meets the timeout values specified in the SleepResp
27 packet.
28 NOTE — The MA USB device is still required to respond to a possible SleepReq packet retried by the M A USB
29 host. The MA USB host should use the Management Request Timeout value indicated in the SleepReq packet for
30 the retried SleepReq packets.
31 Once the MA USB host receives a SleepResp packet with the Status Code field set to 0 (NO_ERROR),
32 it will move its session state to Session Inactive, and instruct its local management entity for the MA
33 link connecting the MA USB host and the target MA USB device to perform required actions to put the
34 MA link in a suitable low-power mode that meets the timeout values specified in the SleepReq packet.
35 Figure 57 illustrates the steps to move the session state to Session Inactive.
Page 161
Media Agnostic Universal Serial Bus Specification Release 1.0
1
USBDI MA Link Interface MA Link Interface USB Logic EP
Page 162
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Once the MA USB device receives the MA USB host acknowledgement to the pending state for all its
2 IN endpoints, it may initiate the process to move its session state to Session Inactive by transmitting a
3 SleepReq packet (Section 6.3.56) to the MAUSB host, which also carries the timeout values the MA
4 USB host has to observe in Session Inactive state when it initiates a management, control or data packet
5 exchange. Upon receiving the SleepReq packet, the MA USB host shall respond with a SleepResp
6 packet with the Status Code field set to 0 (NO_ERROR) if it grants the transition request, and set to
7 REQUEST_DENIED otherwise. Should the MA USB host accept the request to move its session state to
8 Session Inactive, through the SleepResp packet it shall indicate its own timeout values for management,
9 control and data packet exchanges initiated by the target MA USB device in Session Inactive state, with
10 all timeout values less than or equal to the corresponding timeout value in the SleepReq packet.
11 NOTE — The MA USB host may deny the MA USB device request to move the session state to Session Inactive for
12 any reason, including for example, an upcoming control transfer that targets the MA USB device.
13 After the MA USB host transmits a SleepResp packet with the Status Code field set to 0 (NO_ERROR),
14 it will move its session state to Session Inactive, and instruct its local management entity for the MA
15 link connecting the MA USB host and the MA USB device to perform required actions to put the MA
16 link in a suitable low-power mode that meets the timeout values specified in the SleepResp packet.
17 NOTE — The MA USB host is still required to respond to a possible SleepReq packet retried by the MA USB
18 device.
19 Once the MA USB device receives a SleepResp packet with the Status Code field set to 0
20 (NO_ERROR), it will move its session state to Session Inactive, and instruct its local management entity
21 for the MA link connecting the MA USB device and the MA USB host to put the MA link in a suitable
22 low-power mode that meets the timeout values specified in the SleepReq packet.
23 Figure 58 illustrates the method to move the session state to Session Inactive through a SleepReq packet.
USBDI MA Link Interface MA Link Interface USB Logic EP
SleepReq()
Page 163
Media Agnostic Universal Serial Bus Specification Release 1.0
1 8.2.2 Transition to Session Active state
2 8.2.2.1 Initiation by the MA USB host
3 The MA USB host may move its session state from Session Inactive to Session Active (and trigger a
4 similar transition in a target MA USB device) to resume exchange of a broader set of packets with the
5 target MA USB device PAL.
6 The method to move the session state to Session Active is explicit, as it makes use of dedicated
7 management packets.
8 The MA USB host instructs its local management entity for the MA link connecting the MA USB host
9 and the target MA USB device to perform required actions to exit the low-power mode, and transmits a
10 WakeReq packet (Section 6.3.58) to the target MA USB device. In response to a WakeReq packet, the
11 target MA USB device shall release a WakeResp packet (Section 6.3.59) with the Status Code field set
12 to 0 (NO_ERROR) to the management channel, move its session state to Session Active, and instruct its
13 local management entity for the link connecting the MA USB device and the MA USB host to perform
14 required actions to exit the low-power mode. The MA USB host moves its session state to Session
15 Active after it receives a WakeResp packet.
16 Figure 59 illustrates the session state transition to Session Active when initiated by the MA USB host
17 PAL.
USBDI MA Link Interface MA Link Interface USB Logic EP
The MA USB host PAL instructs the local MA The MA USB device PAL may be notified
link management entity to perform required by the local MA link management entity
actions to exit low-power mode that the MA link is not in low-power mode;
the MA USB device PAL does not move
WakeReq() the session state to Session Active yet
USBResumeReq(Device Handle)
USBResumeResp(Device Handle)
18
19 Figure 59—Transition to Session Active state initiated by the MA USB host
20 After receiving a WakeResp packet and moving its session state to Session Active, the MA USB host
21 PAL can exchange management packets including USBResumeReq and EPActivateReq to move the
22 integrated USB device out of the Suspend state and activate the relevant endpoints on the MA USB
23 device.
Page 164
Media Agnostic Universal Serial Bus Specification Release 1.0
1 8.2.2.2 Initiation by an MA USB device
2 An MA USB device with session in Session Inactive state may initiate the process to move its session
3 state to Session Active for a number of reasons described below.
4 Move to Session Active state through a WakeReq packet (explicit request)
5 If both the MA USB host and the MA USB device indicate support for the Link Sleep capability
6 (Sections 6.3.2.2 and 6.3.3.6), and the MA USB device has moved its session state to Session Inactive,
7 the MA USB device may transmit a WakeReq (Section 6.3.58) packet to initiate the process to move its
8 session state to Session Active. The MA USB device instructs its local management entity for the MA
9 link connecting the MA USB device and the MA USB host to perform required actions to exit the low-
10 power mode, and transmits a WakeReq packet to the MA USB host. In response to a WakeReq packet,
11 the MA USB host shall release a WakeResp packet with the Status Code field set to 0 (NO_ERROR) to
12 the management channel, move its session state to Session Active, and instruct its local MA link
13 management entity to perform required actions to exit the low-power mode. The exchange of WakeReq
14 and WakeResp packets follows the management packet exchange behavior defined in Section 5.2.1.1
15 except that the timeout value is the value of the Management Request Timeout field in the SleepReq or
16 SleepResp packet that the MA USB host PAL transmitted when moving its session state to Session
17 Inactive.
18 Figure 60 illustrates the explicit method to move the session state to Session Active through a WakeReq
19 packet.
USBDI MA Link Interface MA Link Interface USB Logic EP
Page 165
Media Agnostic Universal Serial Bus Specification Release 1.0
1 NOTE — An MA USB device does not transmit a RemoteWakeReq packet unless the USB
2 DEVICE_REMOTE_WAKEUP feature is set for its integrated USB device [USB 2.0].
3 NOTE — An MA USB device that receives a remote wake indication after it has initiated the process to move its
4 session state to Session Inactive completes the move to Session Inactive state before transmitting a RemoteWakeReq
5 packet.
6 Upon receiving a RemoteWakeReq packet while in Session Inactive session state, the MA USB host
7 shall move its session state to Session Active (i.e., the RemoteWakeReq packet serves as an implicit
8 WakeReq packet). The MA USB host shall acknowledge a received RemoteWakeReq packet with a
9 Remote Wake Response (RemoteWakeResp) packet (Section 6.3.33), with the Device Handle field set
10 to the same value as the Device Handle field in the corresponding RemoteWakeReq packet.
11 In response to a RemoteWakeReq packet with the USB Device Resumed field set to 0, the MA USB
12 host shall first move the integrated USB device behind the MA USB device PAL out of the Suspend
13 state by transmitting a USBResumeReq packet (Section 6.3.30), and then activate the relevant endpoints
14 on the MA USB device by transmitting one or more EPActivateReq packets (Section 6.3.8).
15 In response to a RemoteWakeReq packet with the USB Device Resumed field set to 1, the MA USB
16 host shall directly activate the relevant endpoints on the MA USB device without transmitting the
17 USBResumeReq packet to the MA USB device.
18 Figure 61 illustrates the implicit method to move the session state to Session Active through the USB
19 remote wake function.
USBDI MA Link Interface MA Link Interface USB Logic EP
USBResumeReq(Device Handle)
USBResumeResp(Device Handle,
Status Code NO_ERROR)
20
21 Figure 61—Transition to Session Active state initiated by an MA USB device (remote
22 wake)
23 Data or management packet exchange (implicit request)
24 When both the MA USB host and the target MA USB device indicate support for Link Sleep capability
25 (Sections 6.3.2.2 and 6.3.3.6), the MA USB device may move its session state from Session Inactive to
26 Session Active (and trigger a similar transition in the MA USB host) by transmitting any packet that
27 requires a response. The timeout applicable to the initial exchange is given by the Management Request
28 Timeout or Data Request Timeout field in the SleepReq or SleepResp packet transmitted by the MA
29 USB host when it moved its session state to Session Inactive. For example, an MA USB device with
Page 166
Media Agnostic Universal Serial Bus Specification Release 1.0
1 pending IN endpoints may initiate the process to move its session state to Session Active once an IN
2 endpoint in pending state has data to transmit to the MA USB host.
3 NOTE — This method is exclusive to an MA USB device with control o r non-isochronous IN endpoints only (e.g.,
4 a native MA USB device with non-isochronous IN endpoints only, an MA USB hub with no USB device
5 downstream, or an MA USB hub with USB devices downstream with non -isochronous IN endpoints only) that has
6 all IN endpoints in the pending state, and has had the pending state for each IN endpoint acknowledged by the MA
7 USB host.
8 In response to detecting traffic from a previously pending IN endpoint, the MA USB device instructs its
9 local management entity for the MA link connecting the MA USB device and the MA USB host to
10 perform required actions to exit the low-power mode, and resumes a pending IN transfer by transmitting
11 one or more TransferResp packets belonging to the transfer, with the EoT field set to 1in at least the first
12 TransferResp packet that the MA USB device PAL transmits.
13 NOTE — The follow-on TransferResp packets may have the ARQ field set to 1 to solicit the MA USB host for a
14 TransferReq or TransferAck packet that serves as an implicit WakeReq packet.
15 In response to the first TransferResp packet received while its session is in Session Inactive state, the
16 MA USB host shall move its session state to Session Active (i.e., the TransferResp packet serves as an
17 implicit WakeReq packet), instruct its local management entity for the MA link connecting the MA USB
18 host and the MA USB device to perform required actions to exit the low-power mode, and reset the
19 transfer timers for the pending transfer request the received TransferResp packet identifies through its
20 Request ID field. The exchange of the first TransferResp packet and the corresponding TransferAck
21 packet follows the data packet exchange behavior defined in Section 5.2.1.2, except that the timeout
22 value is the value of the Data Request Timeout field in the SleepReq or SleepResp packet that the MA
23 USB host transmitted when moving its session state to Session Inactive.
24 NOTE — For example, if the received TransferResp packet has the EoT field set to 0, the MA USB host will expect
25 to receive a follow-on TransferResp packet no later than aTransferKeepAlive after it receives the first TransferResp
26 packet, or the MA USB host will transmit a TransferReq packet to inquire abo ut the transfer status.
27 Figure 62 illustrates the implicit method to move the session state to Session Active through resuming a
28 pending IN transfer.
USBDI MA Link interface MA Link interface USB Logic EP
Page 167
Media Agnostic Universal Serial Bus Specification Release 1.0
1 9 MA USB hub
2 9.1 MA USB hub enumeration
3 The enumeration of an integrated USB hub on MA USB device is the same as enumeration of a non-hub
4 integrated USB device, except for the case that the integrated hub is a USB 3.1 hub. In that case the
5 following modifications apply:
6 The integrated USB device enumeration procedure will occur twice, i.e., the MA USB host learns
7 whether the integrated USB device is a USB 3.1 hub as part of the capability exchange. If it is a USB 3.1
8 hub, then the MA USB host emulates two port status change events.
9 NOTE—For a fully compliant hub it does not matter which hub is enumerated first, but it is recommended that the
10 Enhanced SuperSpeed hub be enumerated first.
11 Hence, enumeration of the MA USB hub with an integrated USB 3.1 hub consists of the enumeration of
12 the Enhanced SuperSpeed hub as a standalone integrated USB device (as described in Section 7.3.2 and
13 depicted in Figure 47) followed by the enumeration of the USB 2.0 hub as a standalone integrated USB
14 device (again as described in Section 7.3.2 and depicted in Figure 47).
Page 168
Media Agnostic Universal Serial Bus Specification Release 1.0
1 packets for each integrated hub and the transition of all the endpoints (and their corresponding endpoint
2 handles) on and behind the integrated USB 2.0 and/or the Enhanced SuperSpeed hubs to Active state.
Page 169
Media Agnostic Universal Serial Bus Specification Release 1.0
1 10 Protocol constants
2 Table 70 lists the MA USB protocol constants.
3 Table 70—MA USB protocol constants
Protocol constant Value
aDataChannelDelay Media dependent
aManagementChannelDelay Media dependent
aMaxIsochLinkDelay Media dependent
aMaxFrameDistance 895 frames
aManagementResponseTime 5 msec
aManagementRequestTimeout aManagementResponseTime + 2×aManagementChannelDelay
aTransferResponseTime 10 msec
aTransferTimeout aTransferResponseTime + 2×aDataChannelDelay
aTransferKeepAlive aTransferResponseTime + aDataChannelDelay
aDefaultKeepAliveDuration 0
aMaxTransferLifetime 1 sec
aTransferRepeatTime 10 msec
aMaxMediaTimeError 10 µs
aMaxMediaTimeSamplingError 10 µs
aMaxTransmissionDelayError 10 µs
aMinSynchFrequencyActive 20 msec
aMinSynchFrequencyIdle 1 sec
aMaxRequestID 28 – 1
aMaxSequenceNumber 224 – 2
aInvalidSequenceNumber 224 – 1
aMaxDialogToken 210 – 1
aMinControlTransferBufferSize 4,104 Bytes
4 Table 71 lists the MA USB protocol variables.
5 Table 71—MA USB protocol variables
Protocol variables Value
aBulkTransferRetries Minimum value 5
aControlTransferRetries Minimum value 5
aInterruptTransferRetries Minimum value 3
aManagementRetries Minimum value 4
aTransferSetupRetries Minimum value 4
6
Page 170
Media Agnostic Universal Serial Bus Specification Release 1.0
Page 171
Media Agnostic Universal Serial Bus Specification Release 1.0
1 A.2 Platform driver matching
2 The information and process required to successfully determine driver support for a given host is
3 complex. However, it is potentially possible to determine driver support with a minimal amount of
4 information.
Page 172
Media Agnostic Universal Serial Bus Specification Release 1.0
1 o Only required if a Control Endpoint is being emulated otherwise some other means can
2 be used to identify GET_DESCRIPTOR requests.
3 bRequest=8 (GET_DESCRIPTOR)
4 o Only required if a Control Endpoint is being emulated otherwise some other means can
5 be used to identify GET_DESCRIPTOR requests.
6 wValue:
7 o High Byte=Descriptor Type (as defined in Table 9-6 of [USB3.1])
8 o Low Byte=Index into required configuration or string descriptor
9 wIndex=zero or Language ID (see list on http://www.usb.org/developers/docs/)
10 wLength=Descriptor Length
11 Multiple of these GET_DESCRIPTOR requests can be aggregated at one time in order to retrieve
12 multiple descriptors.
13 Devices support one or more Configurations; a “bundle” of descriptors describing a particular set of
14 functions which can be selected. Each of these descriptor sets can typically be up to 4 KB long. By using
15 the Number of Configurations value it is possible to retrieve all available Configurations if required.
16 Devices may support multiple strings contained in an indexed table of strings. For each string there can
17 be multiple languages supported. It is possible to retrieve all strings for a given language or all available
18 strings if required.
Page 173
Media Agnostic Universal Serial Bus Specification Release 1.0
Page 174
Media Agnostic Universal Serial Bus Specification Release 1.0
1 Table 73—MA USB protocol constants for WiGig
Protocol constant Value (802.11 mode) Value (IP mode)
aDataChannelDelay 25 msec 100 msec
aMaxIsochLinkDelay 25 msec 100 msec
aManagementChannelDelay 25 msec 100 msec
Page 175
Media Agnostic Universal Serial Bus Specification Release 1.0
1 OUT transfer without going through the set up phase. The second transfer experiences a STALL
2 condition on the target endpoint, which triggers the MA USB device to send a TransferResp packet
3 reporting the error. The MA USB host in this case releases the resources allocated to the transfer and
4 sends a TransferTearDownConf packet to the target MA USB device.
Page 176