This disclosure relates to processing an information payload in a communication interface.
Some electronic devices communicate with other electronic devices by exchanging digitally-encoded information through a communication interface. In one example, a computer system may communicate through a communication interface to transfer information to or from a mass storage device. One type of mass storage device is a hard disc drive (HDD). A HDD may include physical media on which information may be stored, for example, in magnetic form.
Various communication interfaces, each with a particular protocol, may be used to communicate information between different electronic devices, such as mass storage devices and computers. One such communication interface is an advanced technology attachment (ATA) bus. A universal serial bus (USB) is also commonly used in some computers and other electronic devices. Another communication interface that is common in computers is a small computer system interface (SCSI).
An ATA bus is commonly used to connect a computer device and a mass storage device such as, for example, a HDD, a CD-ROM device, or a tape device. For example, an ATA bus allows a computer to use a common cable, connector set, protocol, and command set to communicate with ATA-configured mass storage devices.
USB interfaces are commonly used to connect a computer device and one or more peripheral devices such as, for example, a keyboard or mouse, printers, scanners, digital cameras, or external mass storage devices. In many applications, a USB interface provides a means for connecting peripheral devices to a computer without powering down the computer, with little or no software configuration, and with few limitations as to the number of other peripheral devices that may be simultaneously connected to the computer.
A SCSI bus is commonly used to connect an enterprise server to one or more HDDs. In many applications, a server architecture may benefit from longer cable lengths and additional addressing capabilities of SCSI. Many applications also benefit from a common cable and connector set, protocol and command set to connect to SCSI-configured mass storage devices. Some SCSI commands are also used by some other communication interfaces, such as, for example, some USB interfaces.
In some cases, different communication interfaces may be able to communicate by transferring packets of information through a bridge device. In such cases, a bridge may enable certain information to be exchanged, even though each communication interface uses a different protocol.
In a bridge between a first bus and a second bus, a method and associated apparatus for processing a packet of information includes receiving from the first bus the packet of information containing a “wrapper,” an operations code (opcode), and an information payload, separating the wrapper from the information payload and identifying the opcode, and sending the information payload over the second bus without substantial alteration if the identified opcode is a predetermined opcode. The information payload may have more than ten bytes and be in a format compatible with the second bus.
In one illustrative example, a bridge connecting a universal serial bus (USB) interface and an advanced technology attachment (ATA) interface may decode a customized small computer system interface (SCSI) command to enable the system to send ATA commands over the USB interface. A customized SCSI command may implement a “pass-through” feature that allows the system to support logical block addresses (LBA) of 48 or more bits, and Self-Monitoring and Reporting Technology (SMART) commands associated with a hard disc drive (HDD). The customized SCSI command may be associated with a predetermined opcode. In conjunction with the bridge, the system may send an ATA-command payload, within a wrapper. The bridge may remove the wrapper without substantially altering the payload, and send the ATA-command payload over the ATA bus.
Various embodiments may have one or more advantages. For example, sending an ATA command over a USB interface within a SCSI command wrapper may extend functionality of an existing system, protocol, or command. A customized SCSI command may support larger addresses than may be characterized in recent versions of ATA. A customized SCSI command may further support particular ATA features, such as Self-Monitoring Analysis and Reporting Technology (SMART) and up to 48-bit logical block addressing (LBA). Development time and cost reductions may be realized while providing extended functionality and performance capabilities using expanded protocols and commands.
The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims.
Like reference symbols in the various drawings indicate like elements.
In some embodiments, a communication interface may comprise a universal serial bus (USB) interface, a bridge, and an advanced technology attachment (ATA) interface. The USB interface may use a protocol and command set similar to those used by a small computer system interface (SCSI). The bridge may process information payloads passing between the USB and ATA interfaces. For example, the bridge may permit ATA commands to be sent directly over the USB interface. A customized SCSI command may facilitate one method of sending ATA commands over the USB interface. The customized SCSI command may transport an ATA command to a bridge, and the bridge may extract the ATA command portion and send it over the ATA interface.
The USB interface 104 may follow conventions outlined in Universal Serial Bus Mass Storage Class Specification Overview, revision 1.2, Jun. 23, 2003. This document is publicly available from http://www.usb.org. The USB interface 104 may connect to another device (not shown) such as, for example, a computer device or a camera device.
The storage device 102 further includes a USB interface block 106, which includes a bridge 110 and an Interface Descriptor 112. The bridge 110 couples the USB interface 104 to the ATA device 108 via an ATA interface 114. Functionally, the bridge 110 may receive data in USB-compatible format from the USB interface 104; process it, for example to convert it to an ATA-compatible format; and transmit the data over the ATA interface 114. Similarly, the bridge 110 may receive data in an ATA-compatible format from the ATA interface 114, convert it to a USB-compatible format, and transmit the data over the USB interface 104.
The format of data in either the USB interface 104 or in the ATA interface 114 may be characterized by a predefined protocol and by a predefined set of commands. For example, the aforementioned Universal Serial Bus Mass Storage Class Specification Overview describes an Interface Descriptor that includes several parameters that may relate to various aspects of a particular interface. Two such parameters are depicted in
In general, buses such as USB may transport messages among two or more electronic devices. In some implementations, the messages are formatted into packets of information for transport over an information channel coupled to a communication interface. The information packets may be transported, for example, from a source to at least one destination. In some implementations, an information packet includes an information payload and a “wrapper.”
In various implementations, the information payload in an information packet may include address, data, control, command, programming, status, metadata, or other information. Metadata may include information about other information, and in particular examples, metadata may relate to the intended use or application of a particular information payload. In some examples, the information payload may relate to the operation of one or more electronic devices with communication interfaces. As for one example, an information payload may relate to one or more operations for storing or retrieving information from a particular ATA device. References herein to a particular command payload may refer to an information payload that may contain command or other information.
In some embodiments, the “wrapper” in an information packet may include one or more types of information associated with the information payload. The wrapper may contain, but is not limited to, the following types of information: source address, destination address, control, status, time stamp, network routing, priority, encryption, error detection, error correction, size, or other information related to the transport or content of the information payload. The wrapper may be formatted as a header, footer, or may otherwise be integrated with the information payload in an information packet. For one example, a wrapper formatted in compliance with the Bulk-Only Transport (BOT) protocol specification may be used to wrap an information payload into an information packet for transport over a USB physical bus.
An exemplary packet of information that may be transmitted over the USB interface 104 is a command block wrapper (CBW) 200, as shown in
A command may comprise an operation code (opcode) 212 and a control field 214. The opcode 212 may comprise one byte of data that uniquely identifies a particular operation. The control field 214 may provide additional control for the particular operation identified by the opcode 212. Other bytes 216 may provide additional parameters for the operation identified by the opcode. For example, if the opcode 212 specifies a read data command, the other bytes 216 may provide a device identifier and address from which data should be read.
Opcodes and corresponding commands that may be included in the CBW 200 of this example may be described in the document SCSI-3 Block Commands (SBC), Revision 8c, Nov. 13, 1997. This document is publicly available from http://www.t10.org. Exemplary command opcodes may comprise eight bits. As described in the SCSI-3 Block Commands (SBC) document, some commands may be available as vendor-specific commands. For example, as described in the SBC, as of its noted publication date, commands between 0×C0 and 0×FF may be available as vendor-specific commands and may be used to create “custom” commands. Over time, the characterization of some of vendor-specific commands may enjoy widespread acceptance—to the extent that they become de facto “standard” commands. De facto standard commands may be incorporated into a future revision of the SBC or into some other document that characterizes SCSI commands.
As shown, the CSW 300 comprises 13 bytes of data and a number of fields. For example, the CSW 300 includes a signature field 302, a status information field 304, and a tag field 306. The signature field 302 may indicate that the communication is a BOT-protocol CSW 300. The status information field 306 may indicate a result associated with a previous command. For example, the status information field 306 may indicate whether a previous command, such as a command included in the payload portion 204 of the CBW 200, executed successfully. The tag field 304 may be an identifier that links the CSW 300 to the CBW 200 for which status is being reported. If the command included in the CBW 200 failed, the status information field 306 may also include information about the failure.
The method 500 includes receiving, in an action 502, an information payload from a first bus. For example, in the exemplary system 100, the bridge 110 may receive a USB-compatible information payload from the USB interface 104. The USB-compatible information payload may comprise a SCSI CBW, for example the CBW 200. The CBW 200 may include a header portion 202 and a payload portion 204. The payload portion 204 may comprise a CBWCB, which further comprises the opcode 212, the control field 214, and other bytes 216. The other bytes may include an ATA command payload, for example the ATA command payload 412. The opcode may define a custom SCSI command. The opcode could be, for example, 0×F0, and the custom SCSI command may cause an ATA command to be “passed through” a USB interface—with substantially no change to the ATA command itself.
The method 500 further includes processing, in an action 504, the information payload. For example, the bridge 110 may extract the CBWCB 204 from the CBW 200. The bridge 110 may subsequently extract the ATA command payload 412 from the CBWCB 204.
The method 500 further includes sending, in an action 506, the information payload over a second bus. For example, the bridge 110 may send the extracted ATA command payload 412 to the ATA device 108, via the ATA interface 114.
Although the exemplary embodiments illustrated in
A universal serial bus (USB) is one type of communication interface that may be used to connect two or more processor-based devices. For example, a USB interface may be used to connect a computer device to a printer or to a digital camera.
Devices with USB interfaces (“USB devices”) are generally easy for users to configure and operate. For example, USB memory devices may provide users with a small form-factor storage medium that may operate without requiring hardware or software configuration. Users may utilize such USB memory devices to store, retrieve, and transport data between different computer devices.
A small computer system interface (SCSI) is another type of communication interface. A SCSI interface may be used to connect a computer device to certain types of mass storage devices such as, for example, hard disc drives (HDDs), compact disc read-only memory (CD-ROM) devices, tape drives, or to certain peripherals, such as, for example, scanners. Certain USB memory devices may use SCSI protocols and commands.
An advanced technology attachment (ATA) interface is another type of communication interface. In some implementations, an ATA interface may be used to connect a computer device to a mass storage device, such as, for example, an HDD or a CD-ROM device. Many documents that characterize various aspects of ATA interfaces have been published by the American National Standards Institute (ANSI). These documents may be publicly available for purchase at http://www.techstreet.com. “ATA” may refer to many similar interfaces. “ATA” or “ATA-1” may be commonly referred to as an “Integrated Drive Electronics” (IDE) interface. IDE may technically refer to any hard disc drive with an integrated controller, but many may use “IDE” to refer generally to devices that include an ATA interface. Other variations of ATA may be characterized. For example, ATA-2 may refer to an interface with higher data speed transfer modes than ATA-1. Some may refer to ATA-2 as “Extended IDE” (EIDE). ATA-3 may refer to an interface with additional features. For example, an ATA-3 interface may characterize integrated diagnostic features that may provide early warnings of possible drive failure. These diagnostic features may monitor changes in HDD parameters, such as drive temperature, time required for a HDD platter to reach a certain speed, distance above a platter at which a head operates, frequency with which particular sectors are internally identified as defective, or other parameters. Changes in these parameters may enable prediction of certain kinds of HDD failures. This technology may be referred to as Self-Monitoring Analysis and Reporting Technology (SMART) and it is described in documents covering ATA-3 and subsequent versions of ATA. ATA/ATAPI-4 (ATA Packet Interface) may refer to another ATA interface that supports new features and new devices, such as, for example, CD-ROMs or tape interfaces. ATA/ATAPI-5 may refer to another ATA interface. ATA/ATAPI-6 may characterize an interface that supports larger “addresses” with which data may be indexed on a HDD. For example, an ATA/ATAPI-6 interface may include 48-bits to comprise a logical block address (LBA). Serial ATA (SATA) may characterize a serial interface that shares many protocols and commands with other ATA interfaces. Other documents that characterize interfaces built on “ATA” may also exist, and others may be developed in the future.
ATA interfaces may be widely used to connect a computer device to a mass storage device such as a HDD, CD-ROM or other storage media. USB interfaces may be widely used to connect a computer device to a peripheral device, including to a peripheral storage device.
In other implementations, embodiments may be used to process a packet of information in a bridge between a bus and one of the following types of busses: Institute of Electrical and Electronics Engineers (IEEE) 1394 serial bus, a Serial Attached SCSI (SAS) bus, and an Internet SCSI (iSCSI) bus.
Embodiments may be implemented, at least in part, in hardware or software or in any combination thereof. Hardware may include, for example, analog, digital, or mixed-signal circuitry, including discrete components, integrated circuits (ICs), or application-specific ICs (ASICs). Embodiments may also be implemented, in whole or in part, in software or firmware, which may cooperate with hardware. Processors for executing instructions may retrieve instructions from a data storage medium, such as EPROM, EEPROM, NVRAM, ROM, RAM, a CD-ROM, a HDD, and the like. Computer program products may include storage media that contain program instructions for implementing embodiments described herein.
A number of embodiments have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of this disclosure. For example, embodiments may be applied to communication interfaces that will be developed in the future. Accordingly, other embodiments are within the scope of the following claims.