Скачиваний:
31
Добавлен:
02.05.2014
Размер:
3.51 Mб
Скачать

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

8.3.2 Notification Information

Asynchronous notification messages are sent back on the notification endpoint. All Wire Adapters return Transfer Completion notifications on the notification endpoint. The format and use of a Transfer Completion notification is given in Section 8.3.3.3.

Host Wire Adapter specific notifications are detailed in Section 8.5.4. Device Wire Adapter specific notifications are detailed in Section 8.4.5.

8.3.3 Transfer Requests

To initiate a transfer, the host must first configure an RPipe to the target endpoint on the target device. The index of the configured RPipe is then used in the transfer requests.

After configuring the RPipe, the host submits a transfer request and an arbitrary amount of data to the Wire Adapter via the Data Transfer Write endpoint. The amount of data accompanying the transfer request is controlled by the total amount of data in the transfer and the amount of buffering available to the RPipe. The amount of buffer available on the RPipe is indicated in the RPipe descriptor. RPipes must support at least two concurrent requests per Interrupt RPipe in order to support Interrupt transfers. In addition an HWA must support at least four concurrent requests per Isochronous RPipe to support Isochronous transfers.

8.3.3.1 Control Transfers

Control Transfers are performed using a Control Transfer Request as shown in Table 8-10. The format of this request includes the setup data for the control transfer to be performed to the downstream connected device. Table 8-11 describes the operational requirements of the Wire Adapter when it receives a Control Transfer Request segment.

It is the responsibility of the host to insure that the amount of data to be transferred for all Control Transfer Request segments except for the last Control Transfer Request segment is a multiple of the wMaxPacketSize field in the RPipe descriptor so as to maintain USB short packet semantics. The Wire Adapter must send back intermediate transfer completion notifications (See Section 8.3.3.3) and transfer results (See Section 8.3.3.4) when it completes each Control Transfer Request segment. It is the responsibility of the Wire Adapter to perform a status stage transaction when the last Control Transfer Request segment of the data stage is completed or if it receives a short packet from the device in any Control Transfer Request segment of the data stage.

The data for each segment of a non zero length Control Write Transfer is sent immediately after each Control Transfer Request segment in the next packet.

Table 8-10. Control Transfer Request

Offset

Field

Size

Value

Description

 

 

 

 

 

0

bLength

1

18H

Length of this request

 

 

 

 

 

1

bRequestType

1

80H

REQUEST_TYPE_CONTROL – indicates a control

 

 

 

 

transfer

 

 

 

 

 

2

wRPipe

2

Number

RPipe this transfer is targeted to

 

 

 

 

 

4

dwTransferID

4

Number

Host-assigned ID for this transfer. All pending

 

 

 

 

dwTransferID are unique.

 

 

 

 

 

8

dwTransferLength

4

Number

Amount of data following for an OUT transfer or the

 

 

 

 

maximum amount of returned data for an IN transfer

212

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

Table 8-10. Control Transfer Request (cont.)

Offset

Field

Size

Value

 

Description

 

 

 

 

 

 

12

bTransferSegment

1

Bitmap

Bit

Description

 

 

 

 

6:0

Segment Number

 

 

 

 

7

Last Segment

 

 

 

 

 

 

13

bmAttribute

1

Bitmap

Bit

Description

 

 

 

 

0

Control Transfer direction

 

 

 

 

 

Value

Meaning

 

 

 

 

 

0

Control transfer write

 

 

 

 

 

1

Control transfer read

 

 

 

 

7:1

Reserved, must be zero

 

 

 

 

 

 

14

wReserved

2

Zero

Reserved, must be zero.

 

 

 

 

 

 

 

16

baSetupData

8

Byte

8-byte setup packet data

 

 

 

 

array

 

 

 

 

 

 

 

 

 

 

Table 8-11. WA Control Transfer Request Operational Requirements

bRequestType

Segment

Last

Operational Requirement

Number

Segment

 

 

 

 

 

 

REQUEST_TYPE_CONTROL

0

1

Send contents of baSetupData

 

 

 

The transfer request describes the complete USB

 

 

 

control transfer

 

 

 

The WA must perform a status stage transaction after

 

 

 

the data stage if any

REQUEST_TYPE_CONTROL

0

0

Send contents of baSetupData

 

 

 

The transfer request describes a USB control transfer

 

 

 

with the first segment of the data transfer stage

 

 

 

The WA must perform a status stage transaction if it

 

 

 

receives a short packet from the device during this

 

 

 

transfer segment

REQUEST_TYPE_CONTROL

>0

0

The transfer request describes a subsequent segment

 

 

 

of the data transfer stage of a USB control transfer

 

 

 

The WA must perform a status stage transaction if it

 

 

 

receives a short packet from the device during this

 

 

 

transfer segment

REQUEST_TYPE_CONTROL

>0

1

The transfer request describes the last segment of the

 

 

 

data transfer stage of a USB control transfer

 

 

 

The WA must perform a status stage transaction if it

 

 

 

receives a short packet from the device during this

 

 

 

transfer segment or at the end of this transfer segment

8.3.3.2 Bulk and Interrupt Transfers

Bulk and Interrupt transfers use the Bulk or Interrupt Transfer Request as shown in Table 8-12. This request type allows large transfers to be segmented into multiple smaller transfers to avoid RPipe buffer overflow on the Wire Adapter. When transfers are segmented, the host must insure that the amount of data for all segments except for the last segment is a multiple of the wMaxPacketSize field in the RPipe descriptor. This is necessary to maintain USB short-packet semantics.

213

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

For OUT transfers, the request and the data are sent as consecutive transactions. This allows the Wire Adapter to receive and interpret the request first and prepare to receive the data.

Table 8-12. Bulk or Interrupt Transfer Request

Offset

Field

Size

Value

 

Description

 

 

 

 

 

0

bLength

1

10H

Length of this request

 

 

 

 

 

1

bRequestType

1

81H

REQUEST_TYPE_BULK_OR_INTERRUPT –

 

 

 

 

indicates a bulk/interrupt transfer

2

wRPipe

2

Number

RPipe this transfer is targeted to

 

 

 

 

 

4

dwTransferID

4

Number

Host-assigned ID for this transfer

 

 

 

 

 

8

dwTransferLength

4

Number

Amount of data following for an OUT transfer or the

 

 

 

 

maximum amount of returned data for an IN transfer

 

 

 

 

 

 

12

bTransferSegment

1

Bitmap

Bit

Description

 

 

 

 

6:0

Segment Number

 

 

 

 

7

Last segment

 

 

 

 

 

13

bReserved

1

Zero

Reserved for future use, must be zero.

 

 

 

 

 

14

wReserved

2

Zero

Reserved for future use, must be zero.

 

 

 

 

 

 

8.3.3.3 Transfer Completion Notification

When the Wire Adapter completes a transfer or a portion of a segmented transfer, it will return a Transfer completion notification on the Notification endpoint. The Transfer Notification format is shown in Table 8-13. The data transfer endpoint on which the transfer result and data if any is available is given in the bEndpoint field. The type of the notification is indicated in the bNotifyType field.

Table 8-13. Transfer Notification

Offset

Field

Size

Value

Description

 

 

 

 

 

0

bLength

1

4

Length of this block of data

 

 

 

 

 

1

bNotifyType

1

93H

NOTIFY_TYPE_TRANSFER

 

 

 

 

 

2

bEndpoint

1

Number

Endpoint on which the transfer result is available

 

 

 

 

 

3

bReserved

1

Number

Reserved

 

 

 

 

 

8.3.3.4 Transfer Result

Host software can get the Transfer Result from the Data Transfer Read endpoint number indicated in the previous transfer completion notification. If the corresponding transfer was an IN transfer (Bulk/Interrupt IN or Control Transfer Read), the transfer result and the IN data will be returned as separate and consecutive transfers. This allows the host to receive the result packet, interpret the results and identify the correct host buffer in which to receive the IN data. The Transfer Result format is illustrated in Table 8-14.

Table 8-14. Transfer Result

Offset

Field

Size

Value

Description

 

 

 

 

 

0

bLength

1

10H

Length of this block of data (not counting transfer

 

 

 

 

data)

1

bResultType

1

83H

RESULT_TYPE_TRANSFER – indicates result type

 

 

 

 

 

2

dwTransferID

4

Number

Host-assigned ID for this transfer

 

 

 

 

 

6

dwTransferLength

4

Number

Amount of data transferred for either OUT or IN

 

 

 

 

 

214

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

Table 8-14. Transfer Result (cont.)

Offset

Field

Size

Value

 

Description

 

 

 

 

 

 

10

bTransferSegment

1

Bitmap

Bit

Description

 

 

 

 

6:0

Segment Number

 

 

 

 

7

Last segment

 

 

 

 

 

11

bTransferStatus

1

Number

The transfer status

 

 

 

 

 

12

dwNumOfPackets

4

Number

Number of Packet lengths and status following. This

 

 

 

 

will be zero for non Isochronous transfers.

 

 

 

 

This field is reserved and must be set to zero for

 

 

 

 

DWAs.

 

 

 

 

 

 

 

The Transfer (or Packet) Status field in the Transfer Result (or Packet Status) returned to host software is used to decode whether a transfer completed successfully or the type of error that occurred while performing the transfer described by a previously received transfer request. The set of legal Transfer/Packet Status values is defined in Table 8-15.

Table 8-15. Transfer/Packet Status

Bit

 

Description

 

 

 

5:0

 

 

 

Status Value

Description

 

0

TRANSFER_STATUS_SUCCESS

 

 

The transfer completed successfully. Bit 6 and 7 are set to zero.

 

1

TRANSFER_STATUS_HALTED

 

 

This means that the endpoint that this transfer was attempted on is currently halted.

 

2

TRANSFER_STATUS_DATA_BUFFER_ERROR

 

 

There was a data buffer under/over run.

 

3

TRANSFER_STATUS_BABBLE

 

 

A babble was detected on the transfer. This could be either Frame babble or Packet

 

 

babble or both.

 

4

Reserved

 

5

TRANSFER_STATUS_NOT_FOUND

 

 

Returned as a response to an Abort Transfer request that has an invalid or already

 

 

completed TransferID.

 

6

TRANSFER_STATUS_INSUFFICIENT_RESOURCE

 

 

Returned in the transfer result when the Wire Adapter could not get enough

 

 

resources to complete a previously accepted transfer request.

 

Note unless mentioned otherwise, bit 7 is set for all status values.

 

 

 

215

Соседние файлы в папке Wireless USB Specification Revision 1.0 May 12, 2005