The detailed description is provided with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The use of the same reference numbers in different figures indicates similar or identical items.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of various embodiments. However, some embodiments of the invention may be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the particular embodiments of the invention.
Some of the embodiments discussed herein may provide an efficient mechanism for reducing power consumption in computing systems that utilize bulk data transfers, e.g., in accordance with the Universal Serial Bus Specification, Revision 1.1, Sep. 23, 1998, and/or Universal Serial Bus Specification, Revision 2.0, Apr. 27, 2000 (including subsequent amendments to either revision). For example, some data (e.g., query and/or byte count information) may be exchanged between a host computing system and a communication device (such as a USB device, including a wired USB device or USB devices that are attached to a computing device (e.g., a portable or stationary computing system) via external USB ports or internal mini-PCIe slot (mini peripheral component interconnect express slot, which may at least partially comply with the PCI Express Specification Rev. 1.0a, June 2005)) through an interrupt endpoint (EP) instead of a bulk endpoint in some embodiments. This approach may allow various components (e.g., processor) of the host computing system to enter lower power states which, in turn, may result in reduced power consumption.
Moreover, the techniques discussed herein may be applied in various environments, such as the networking environment discussed with reference to
The devices 104-114 may communicate with the network 102 through wired and/or wireless connections. Hence, the network 102 may be a wired and/or wireless network. For example, as illustrated in
The network 102 may utilize any communication protocol such as Ethernet, Fast Ethernet, Gigabit Ethernet, wide-area network (WAN), fiber distributed data interface (FDDI), Token Ring, leased line, analog modem, digital subscriber line (DSL and its varieties such as high bit-rate DSL (HDSL), integrated services digital network DSL (IDSL), etc.), asynchronous transfer mode (ATM), cable modem, and/or FireWire.
Wireless communication through the network 102 may be in accordance with one or more of the following: wireless local area network (WLAN), wireless wide area network (WWAN), code division multiple access (CDMA) cellular radiotelephone communication systems, global system for mobile communications (GSM) cellular radiotelephone systems, North American Digital Cellular (NADC) cellular radiotelephone systems, time division multiple access (TDMA) systems, extended TDMA (E-TDMA) cellular radiotelephone systems, third generation partnership project (3G) systems such as wide-band CDMA (WCDMA), etc. Moreover, network communication may be established by internal network interface devices (e.g., present within the same physical enclosure as a computing system) such as a network interface card (NIC) or external network interface devices (e.g., having a separate physical enclosure and/or power supply than the computing system to which it is coupled).
The processor 202 may include one or more caches (203), which may be private and/or shared in some embodiments. Generally, a cache stores data corresponding to original data stored elsewhere or computed earlier. To reduce memory access latency, once data is stored in a cache, future use may be made by accessing a cached copy rather than refetching or recomputing the original data. The cache 203 may be any type of cache, such a level 1 (L1) cache, a level 2 (L2) cache, a level 3 (L-3), a mid-level cache, a last level cache (LLC), etc. to store electronic data (e.g., including instructions) that is utilized by one or more components of the system 200.
A chipset 206 may additionally be coupled to the interconnection network 204. The chipset 206 may include a memory control hub (MCH) 208. The MCH 208 may include a memory controller 210 that is coupled to a memory 212. The memory 212 may store data, e.g., including sequences of instructions that are executed by the processor 202, or any other device in communication with components of the computing system 200. In some embodiments of the invention, the memory 212 may include one or more volatile storage (or memory) devices such as random access memory (RAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), static RAM (SRAM), etc. Nonvolatile memory may also be utilized such as a hard disk. Additional devices may be coupled to the interconnection network 204, such as multiple processors and/or multiple system memories.
The MCH 208 may further include a graphics interface 214 coupled to a display device 216, e.g., via a graphics accelerator. In some embodiments, the graphics interface 214 may be coupled to the display device 216 via an accelerated graphics port (AGP). In some embodiments of the invention, the display device 216 (which may include a flat panel display or a cathode ray tube) may be coupled to the graphics interface 214 through, for example, a signal converter that translates a digital representation of an image stored in a storage device such as video memory or system memory into display signals that are interpreted and displayed by the display. The display signals produced by the display device 216 may pass through various control devices before being interpreted by and subsequently displayed on the display device 216.
As shown in
The bus 222 may be coupled to an audio device 226, one or more disk drive(s) 228, and a communication device 230 (which may be a NIC in some embodiments). Other devices may be coupled to the bus 222. Also, various components (such as the communication device 230) may be coupled to the MCH 208 in some embodiments of the invention. In addition, the processor 202 and the MCH 208 may be combined to form a single chip.
Additionally, the computing system 200 may include volatile and/or nonvolatile memory (or storage). For example, nonvolatile memory may include one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), a disk drive (e.g., 228), a floppy disk, a compact disk ROM (CD-ROM), a digital versatile disk (DVD), flash memory, a magneto-optical disk, or other types of nonvolatile machine-readable media capable of storing electronic data (e.g., including instructions).
The memory 212 may include one or more of the following in some embodiments: an operating system (O/S) 232, application 234, device driver 236, buffers 238, function driver 240, and/or protocol driver 242. Programs and/or data stored in the memory 212 may be swapped into the disk drive 228 as part of memory management operations. The application(s) 234 may execute (e.g., on the processor(s) 202) to communicate one or more packets 246 with one or more computing devices coupled to the network 102 (such as the devices 104-114 of
In some embodiments, the application 234 may utilize the O/S 232 to communicate with various components of the system 200, e.g., through the device driver 236 and/or function driver 240. For example, the device driver 236 and function driver 240 may be used for different categories, e.g., device driver 236 may manage generic device class attributes, whereas the function driver 240 may manage device specific attributes (such as USB specific commands). In some embodiments, the device driver 236 may allocate one or more buffers (238A through 238M) to store packet data, such as the packet payload 246B. One or more descriptors (not shown) may respectively point to the buffers 238. In some embodiments, one or more of the buffers 238 may be implemented as circular ring buffers. Also, one or more of the buffers 238 may correspond to contiguous memory pages in some embodiments. Furthermore, a protocol driver 242 may implement a protocol driver to process packets communicated over the network 102, according to one or more protocols. In accordance with some embodiments, as discussed herein forth, reference to “function driver 240” may or may not refer to other types of drivers, e.g., including device driver 236, function driver 240, and/or protocol driver 242.
As illustrated in
In some embodiments, the communication device 230 may include a firmware storage device 260 to store firmware (or software) that may be utilized in management of various functions performed by components of the communication device 230. For example, the firmware may be used to configure various operations such as those discussed with reference to
Referring to
If the controller 224 receives a response on an interrupt EP at operation 306, at an operation 308, the processor 202 may determine the data size count (e.g., byte count) of the data to be read over the bulk EP of the communication device 230. At an operation 310, the processor 202 may post a sufficient number of buffers 238 to read the amount of data indicated at operation 308 on the bulk endpoint of the communication device 230. At an operation 312, a timer may be started or restarted (e.g., by the processor 202 or other logic). The timer of operation 312 may be any type of a timer, including a hardware timer, a software-based timer, or combinations thereof. After operation 312, the method 300 may resume at operation 306.
At operation 306, once all the buffer(s) 238 posted at operation 310 are returned, at an operation 320, the processor 202 may process any data in the buffers 238. At operation 320, the processor 202 may further unravel packet boundaries. For example, the unraveling may be used to determine whether a debit has occurred due to roundup while posting buffers at operation 310. Additionally, the received data size count (e.g., byte count) may be used to determine the amount of debit. Generally, a debit may occur if a device sends more data than the byte count specified in the previous query response on the interrupt EP. This may happen if the device supplies a byte count that is not a multiple of the endpoint's maximum packet size and then receives more data which may be appended to the bulk endpoint queue before a host reads the data. For example, partial Internet Protocol (IP) packets may be buffered, resulting in a debit which is subsequently utilized to adjust the next IRP(s) (I/O Request Packet(s)). At an operation 322, the processor 202 may determine whether a withdrawing event has occurred (e.g., at an operation 330). If no withdrawing event has occurred, the processor 202 may cancel the timer at an operation 324. Otherwise, at an operation 326, the processor 202 may perform various error recovery operations, e.g., clearing the debit, discard partial IP packets, etc. After operation 326, the method 300 may resume at operation 302.
Alternatively, if at operation 306 the timer expires (e.g., the timer of operation 312), at an operation 330, the processor 202 may indicate (e.g., by updating the value stored in a hardware register or a value stored in a shared memory such as the memory 212) that a withdrawing event has occurred. In some embodiments, the timer may be started (312) immediately after or substantially simultaneous with the operation 310. Also, the timer may be restarted at operation 312 or canceled at operation 324 such as discussed above. The specific value of the timer may be configurable, for example, in accordance with a given application. For instance, shorter polling periods may result in less latency and reduced buffer requirements on the communication device 230 but also less power savings. At an operation 332, the buffer(s) posted at operation 310 may be withdrawn by the processor 202. At an operation 334, the processor 202 may report an error (e.g., to a user, including a system developer) which may be indicative of physical (e.g., thermal) issues with the hardware, a bug in the function driver 240, etc. After operation 334, the method 300 may resume at operation 306.
Referring to
If at operation 404 a transaction is received on the interrupt EP of the communication device 230, at an operation 408, the controller 254 may determine whether new data is present in bulk EP transmit queue (that may be stored in the memory 256), e.g., since a last poll or query (e.g., such as the query of operation 302 and 304). If there is new data in the transmit queue, at an operation 410, the controller 254 may set the data size count to a new value that corresponds to the size of the new data of operation 408. At an operation 412, the controller 254 may cause transmission of the data size count of operation 410 to the host controller 224 and thereafter the method 400 may resume at operation 404. In some embodiments, the processor 202 may address cases of overdrawn number of buffers at operation 310 since at operation 412 the new data size count is transmitted. Alternatively, the controller 254 may ensure that the number of bytes transferred is no more than the number of bytes available reported during the last interrupt EP poll. Additionally, since the communication device 230 may be transferring data as a stream of bytes in some situations, the function driver 240 may be configured to deal with situations where a partial IP packet is received or the first received packet has no or a partial IP header 246A information. If no new data is present at operation 408, the controller 254 may transmit a NAK on the interrupt EP at operation 414. After operation 414, the method 400 may resume at operation 404.
Alternatively, if at operation 404 a transaction is received on the bulk EP of the communication device 230, at an operation 420, the controller 254 may determine whether any data is available for transfer. If data is available for transfer, at an operation 422, the controller 254 may transfer the data over the bulk EP via the bus 222. Then, the controller 224 may transfer data from the bulk EP to the buffers 238. Otherwise, if data is unavailable for transfer at operation 420, the controller 254 may transmit a NAK on the bulk EP to the host controller 224 at an operation 424. After operations 422 and 424, the method 400 may resume at operation 404.
Even though various embodiments have been discussed herein with reference to two types of USB data transfers (e.g., bulk transfer and interrupt transfer), the techniques discussed herein may also be applied in other implementations, e.g., where an unpredictable amount of data is to be transferred (e.g., in a bulk data transfer mode) between a host computing system and a communication device. Furthermore, some of the embodiments may be applied to reduce power consumption at idle time during which a host may be requesting data but there is no data available to be read from a communication device. Additionally, some of the embodiments discussed herein may be provided with no changes to existing system software (such as the device driver 236) or host controller (e.g., controller 224).
As illustrated in
The processors 502 and 504 may be any type of processor such as those discussed with reference to the processors 202 of
Each of the processors 502 and 504 may include one or more processor cores 538 and 539, respectively. Some embodiments of the invention may exist in circuits, logic units, or devices within the system 500 of
The chipset 520 may be coupled to a bus 540 using a PtP interface circuit 541. The bus 540 may have one or more devices coupled to it, such as a bus bridge 542 and I/O devices 543:. Via a bus 544, the bus bridge 542 may be coupled to other devices such as a keyboard/mouse 545, communication devices 546 (such as modems, network interface devices, etc.), an audio device 547, and/or a data storage device 548. The data storage device 548 may store code 549 that may be executed by the processors 502 and/or 504. For example, the packet 246 discussed with reference to
In some embodiments of the invention, the operations discussed herein, e.g., with reference to
Reference in the specification to “an embodiment,” “one embodiment,” or “some embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least an implementation. The appearances of the phrase “in some embodiments” in various places in the specification may or may not be all referring to the same embodiment.
Also, in the description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. In some embodiments of the invention, “connected” may be used to indicate that two or more elements are in direct physical or electrical contact with each other. “Coupled” may mean that two or more elements are in direct physical or electrical contact. However, “coupled” may also mean that two or more elements may not be in direct contact with each other, but may still cooperate or interact with each other.
Thus, although embodiments of the invention have been described in language specific to structural features and/or methodological acts, it is to be understood that claimed subject matter may not be limited to the specific features or acts described. Rather, the specific features and acts are disclosed as sample forms of implementing the claimed subject matter.