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

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

8.1.7 Downstream Host Controller

A Wire Adapter has a host controller on which it creates, schedules, and manages the transaction protocol to devices connected downstream. The downstream host controller receives the transfer information from Transfer Requests and the associated RPipe Descriptor to schedule the newly added transfer to the system. At the same time, it manages the schedule following the protocol of the downstream bus. The downstream host controller also controls the downstream ports on a DWA for data transfer.

A Host Wire Adapter must be a Wireless USB Host Controller to devices ‘connected’ downstream.

A Device Wire Adapter must be a USB 2.0 Host Controller which is described in Chapter 10 of the USB 2.0 Specification.

8.1.8 Upstream Endpoint Controller

All Wire Adapters must have at least the following four endpoints:

Default Control Endpoint

Notification Endpoint

Data Transfer Pair (Write (Bulk OUT) Endpoint and a matching Read (Bulk IN) Endpoint).

Wire Adapters may have additional endpoints depending on what additional features they support. For example a DWA that supports Isochronous streaming will have one or more isochronous endpoints. In the case of an HWA, it has a Radio Control Interrupt endpoint as part of the Radio Control Interface.

8.1.9 Remote Pipe Controller

This section describes how the Remote Pipes are used.

8.1.9.1 RPipe Descriptor

The RPipe descriptor holds all the information necessary to perform data transfers between a Wire Adapter and an endpoint on a device connected downstream of it. It has to be configured before performing any transaction with a downstream endpoint. Host software uses the SetRPipeDescriptor request to configure a Remote Pipe.

The descriptor may be overwritten to retarget the Remote Pipe at a different endpoint using another SetRPipeDescriptor request. Host software is responsible to save the current state of the Remote Pipe before retargeting a Remote Pipe to a different endpoint. Host software can get the current state of a Remote Pipe by sending a GetRPipeDescriptor request to the Wire Adapter.

Host software can send a SetRPipeDescriptor request to a Remote Pipe only when that Remote Pipe is in the Idle or UnConfigured state. Host software is required to correctly multiplex the available Remote Pipes over the downstream endpoints that need to be serviced.

8.1.9.2 Bulk OUT Overview

For a Host to Device (OUT) data stream, the basic model is that the Host sends data to the Wire Adapter in the context of a Remote Pipe and the Wire Adapter moves the data to the Wired or Wireless USB Endpoint, utilizing the information present in the previously configured Remote Pipe.

The Host can determine from the RPipe Descriptor exactly how much buffering the Wire Adapter has allocated or can allocate to this Remote Pipe. Figure 8-4 illustrates the generic data flow model for an OUT-bound Bulk data stream. It shows the transfer request/data stream and the feedback/transfer status stream.

199

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

 

Feedback

 

Data

Request Buffer

Requests

Request Buffer

N+1

N

Host may partition client

 

request buffer into

 

smaller portions,

 

depending on

Request Queues &

capabilities of Wire

OUT Data

Adapter

 

Figure 8-4. Wire Adapter Bulk OUT Operational Data Flow Model

In order to move the client buffer into the Wire Adapter, host software may have to divide the client buffer into smaller chunks and forward them to the Wire Adapter. Host software is required to send data to the Wire Adapter only in multiples of the Remote Pipe’s Maximum Packet Size field. The lone exception to this rule is when the buffer remaining is not an even multiple of the Remote Pipe’s Maximum Packet Size field. In this case the last data payload from the host to the Wire Adapter is the residual of the client data buffer. Host software must not concatenate client data buffers in order to fill a data payload of the Remote Pipe’s Maximum Packet Size field.

The size of each chunk depends on how much buffering has been allocated to the Remote Pipe. Each OUT pipe transfer request is followed by the data for the Remote Pipe. The Wire Adapter is required to move the data portions sent by the host software to the Wired or Wireless USB Endpoint in the same order as the host sent them.

It is important that the visibility of the original client buffer boundaries be preserved into the Wire Adapter. Pertransfer attributes are used to inform the Wire Adapter how to manage the buffer portions. For example, the attributes include information about whether this is a first, middle or end buffer portion. In addition, the host software may be allowed to queue buffer portions of more than one buffer to the Wire Adapter (at the same time). Therefore all transfer requests associated with the same client buffer must have a unique identifier (i.e. tag). Host software is responsible for generating unique transfer request identifiers. The Wire Adapter will send these identifiers back to the host software in a transfer result when it completes a transfer request.

8.1.9.3 Bulk IN Overview

For a Device to Host (IN) data stream, once host software has client buffer space available, it sends a transfer request to the Wire adapter to begin requesting data from a downstream connected Wired or Wireless USB endpoint. It ensures that it does not ask for more data from the Wired or Wireless USB endpoint than the Wire Adapter has buffering. Figure 8-5 illustrates the general data flow model of a Bulk IN data stream.

200

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

 

Data & Status

 

Feedback

Request Buffer

Request Buffer

N+1

N

 

Data

 

Request(s)

IN-

bound

Data &

Status

IN Transfer

Request Queue

Figure 8-5. Wire Adapter IN Operational Data Flow Model

Host software may queue multiple transfer requests to the Wire Adapter. Each transfer request maps to a single client input buffer. The size of the transfer request is allowed to be up to 2^32 - 1. If the client buffer is larger than the Wire Adapter has buffering for, host software will split the buffer into multiple segments that the Wire Adapter can accommodate and then manage the appropriate short packet semantics when short packets occur in the data stream. Host software will tag each IN transfer request with a unique identifier. The maximum number of IN requests per Remote Pipe the Wire Adapter may accommodate is determined by an attribute provided in the RPipe descriptor.

The feedback data stream is multiplexed data and transfer status information. The Wire Adapter may implement a shared IN data buffer across all IN Remote Pipes. It may optionally implement individual buffering for each IN Remote Pipe. The granularity and frequency of data/transfer status communications to the USB Host on the feedback stream is implementation dependent. However, feedback communications must occur frequently enough to deliver data to the host without causing frequent data streaming stalls.

Whenever the Wire Adapter observes that the associated Wired or Wireless USB IN Endpoint provides a short packet, the Wire Adapter will send the residual queued data to the host with a transfer status indicating the transfer request is completed. It will then begin servicing the next transfer request queued for the Remote Pipe at the next appropriate opportunity.

As feedback communications arrive at the Host, host software must parse the multiplexed data/status stream, copying data into the client buffer and noting or responding to status feedback as appropriate.

8.1.9.4 Control Transfer Overview

A USB control transfer has 2 (Setup and Status only) or 3 (Setup, Data and Status) stages depending on the request. If the size of the data stage of the USB control transfer is less than or equal to the buffer available on the Remote Pipe then the USB control transfer can be completely described in one transfer request and the Wire Adapter is responsible for completing all stages of the USB control transfer.

If the USB control transfer has a data stage larger than the buffer available on the Remote Pipe, host software will split the transfer into multiple segments. The first transfer request segment will have a valid set of bytes in the Setup data and describe the amount of data that needs to be sent or received from the device. The subsequent transfer request segments will not have any valid bytes in the Setup data field. A Wire Adapter must only decode and send the Setup data included in the first transfer request segment of a multi-segment transfer request. All segments of the transfer request must describe a buffer that is an exact multiple of the Remote Pipe’s Maximum Packet Size field except for the final segment of the transfer request. This is required so that the Wire Adapter can perform a status stage transaction either when a short packet occurs in one of the transfer request segments or when the last transfer request segment has completed. Each transfer request segment is

201

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