1. Field of the Invention
The present invention relates to data communications. More particularly, the present invention relates to a method and apparatus for loop breaking on a serial bus.
2. Background
Computer systems and other digital electronic systems often use a common interconnect to share information between components of the systems. The interconnect used in such systems is typically a serial bus. The correct operation of any bus requires that there be exactly one path between any two components on the bus.
The IEEE1394-1995 standard defines one type of serial bus. IEEE Standards document 1394-1995, entitled IEEE Standard for a High Performance serial bus (hereinafter “IEEE1394-1995 standard”). A typical serial bus having the IEEE1394-1995 standard architecture includes many nodes that are interconnected by links such as cables that connect a single node of the serial bus to another node of the serial bus. Nodes interface to links via one or more parts. Data packets are propagated throughout the serial bus using a number of transactions. These transactions involve one node receiving a packet from another node via one link and retransmitting the received packet to other nodes via other links. A tree network configuration and the associated packet handling protocol ensures that each node receives every packet once.
The IEEE1394-1995 standard provides for an arbitrary acyclic bus topology. Correct operation of the bus relies on the superimposition of a hierarchical relationship which is contained by the manner in which the nodes are connected to one another. In IEEE1394-1995, this relationship is determined during the bus configuration process.
An IEEE1394-1995 serial bus is configured in three phases: bus initialization, tree identification (tree-ID) and self identification (self-ID). During bus initialization, the general topology information of the serial bus is identified according to a tree metaphor. For example, each node is identified as being either a “branch” having more than one connected ports of a “leaf” having only one connected port. A node recognizes its status as a leaf node or a branch node immediately upon entering tree-ID. During tree identification, hierarchical relationships are established between the nodes. For example, one node is designated a “root” node, and the hierarchy of the remaining nodes is established with respect to the relative nearness of a node to the root node. Given two nodes that are connected to one another, the node connected closer to the root is the “parent” node, and the node connected farther from the root is the “child”. Nodes connected to the root are children of the root. This process of identifying hierarchical relationships continues until the number of children of a node is greater than or equal to one less than the number of connected ports on the node. During self-ID, each node is assigned a bus address and a topology map may be build for the serial bus.
Typically, serial buses such as the IEEE1394-1995 serial bus require knowing what is being plugged in where. For example, the back of many electronic devices has ports for connecting the electronic devices to other electronic devices. Under the IEEE1394-1995 standard, correct bus operation is not possible if electronic devices are connected in a loop configuration. A specific function of the configuration proves is therefore to determine whether a loop is present, and if a loop is found to prevent completion of the configuration process, thereby rendering the bus inoperable. The bus is rendered inoperable when a timeout occurs in the configuration process. The devices must be physically reconnected in some other way to remove the loop. The configuration process provides no indication of how to reconnect the bus in order to remove the loop. Consequently, correctly reconnecting the devices requires a detailed understanding of how the devices may properly be connected. Typical users of theses devices do not have such an understanding. Thus, devices on a bus may be reconnected may times using a sort of “hit-or-miss” approach before the loop is removed.
Buses such as the IEEE1394-1995 serial bus are being used increasingly to connect products for home use. These products include televisions, stereos and other home entertainment devices. Requiring typical users of such products to know what should be plugged in where is unnecessarily burdensome. Accordingly, a need exists in the prior art for a method and apparatus for loop detection and loop breaking such that devices on a bus remain connected to their neighbors, even in the presence of one or more loops.
A method for loop breaking includes selecting a first port of a node, transmitting a first packet containing a first identifier from the first port of the node, listening for a second packet containing a second identifier for a period of time on a second port of the node, joining the first port and the node if the second identifier meets a first criteria with respect to the first identifier and quarantining the first port when the second identifier meets a second criteria within respect to the first identifier. In another aspect, a serial bus includes a plurality of nodes and a and a plurality of communications links interconnecting the nodes, each communications link being coupled between two nodes in a manner such that each node is coupled to every other node via one or more communications links, wherein at least one of the plurality of nodes includes at least one port coupled to a communications link and operative to transmit and receive data via the communications link, wherein a loop passing through a node is broken by internally isolating at least one port from the node, such that all ports of the node remain connected to their neighbors.
Those of ordinary skill in the art will realize that the following description of the present invention is illustrative only. Other embodiments of the invention will readily suggest themselves to such skilled persons having the benefit of this disclosure.
This invention relates to data communications. More particularly, the present invention relates to a method and apparatus for loop breaking on a serial bus. The invention further relates to machine readable media on which are stored (1) the layout parameters of the present invention and/or (2) program instructions for using the present invention in performing operations on a computer. Such media includes by way of example magnetic tape, magnetic disk, or optically readable media such as CD ROMs and semiconductor memory such as PCMCIA cards. The medium may also take the form of a portable item such as a small disk, diskette or cassette. The medium may also take the form of a larger or immobile item such as a hard disk drive or a computer RAM.
Although the bus architecture described herein is described with reference to components for a single computer, the bus architecture has a broader scope. The bus architecture could include audio and video components, home appliances, positioning and robotic systems, and test and measurement systems, for example. The present invention may be applied to any arbitrarily assembled collection of nodes linked together as a network of devices. In addition, it is necessary to distinguish a node from a physical computer component. Each component to reside on a bus will have with it at least one node physical layer controller. A given component may be associated with multiple nodes. However, there will usually be a one-to-one correspondence between devices or components and nodes on a bus.
According to the IEEE1394-1995 standard, reconfiguration of a serial bus is required when either (1) a new node is joined to the serial bus, or (2) an identified node of the serial bus is removed from the serial bus. Reconfiguration is required to better ensure that all nodes of the serial bus are notified of the newly connected of disconnected node and that each node has a unique bus address. Typically, the node of the serial bus that detects a new connection or disconnection forces the three phase configuration to be performed by asserting a bus reset signal.
Referring now to
The node 10 communicates with other nodes through communications links. A link is a connection between two ports. Typically, a cable segment is used for a link. However, a link may be implemented as any physical communication channel, including wireless RF or infrared. A port is the interface between a node and a link. A port has the ability to transmit and receive data. A port can also determine whether it is connected to another port through a link. In
An individual node may have more than one port, and each node is able to transmit and receive data on any one of its ports. A node is also able to receive and transmit signaling messages through all of its ports. In the discussion that follows, devices and local hosts will, for the most part, be omitted and all references to bus topology will refer to nodes and node connection s through various ports.
Turning now for
Those of ordinary skill in the art will recognize that node C 36 could have been designated the root node in the above example. Whether node A 32 or node C 36 is established as the root node depends upon the timing of the YAMP and YAMC signals. Node A 32 was designated the root node for illustrative purposes.
Turning now to
According to the present invention, all ports of a node are allowed to remain connected to their neighbors, even in the presence of one or more loops. The present invention minimizes the number of isolated links, thus avoiding breaking a bus into two or more isolated buses. A loop is broken by internally isolating selected ports from the whole of the node. In effect, each port of a loop functions as a naked leaf node. Thus, each port participates fully in bus reset, tree-ID, and self-ID.
Turning now to
Turning now to
Turning now to
Turning now to
Turning now to
Turning now to
“Select Next Untested Port” State
At reference numeral 170, the next untested port is selected. According to a preferred embodiment, ports associated with higher speed connections are chosen before lower speed connections. Those of ordinary skill in the art will recognize that selecting ports in this way increases the likelihood of “removing” the lowest speed cable in the event a loop is detected. While the cable or other physical connection itself is not removed, the loop created by a cable is broken by isolating the particular port involved in the loop.
“Arbitrate for Loop Test” State
At reference numeral 172, the PHY initiates arbitration for one or both of the buses required to perform loop testing. According to one embodiment of the present invention, if both the main and peer buses are multi-node buses, arbitration is initiated simultaneously on both buses and the loop testing is initiated on the first bus to be grated. If one bus is a single node bus and the other is a multi-node bus, arbitration is performed on the multi-node bus first. If both buses are single node buses, arbitration begins on both and loop testing is initiated on the first bus granted. This process of performing arbitration on multiple buses simultaneously reduces the probability of requiring a relatively long bus reset when joining ports to a PHY.
Send Loop Test Packet State
At reference numeral 174, the PHY transmits a loop test packet including a unique identifier. The transmitted identifier is denoted “TxLTP”. While transmitting the LTP, the PHY listens for any packet received on the main bus or the peer bus within a period of time. The received identifier is denoted “RxLTP”.
According to one embodiment of the present invention, the identifier includes the PHY ID and port ID of the transmitting port, the PHY ID and port ID of the receiving port, the speed of the untested port and a Globally Unique Identifier (GUID). According to another embodiment of the present invention, the identifier includes the PHY ID and port ID of the transmitting port, the PHY ID and port ID of the receiving port, the speed of the untested port and a random number.
The discussion of particular unique identifiers is not intended to be limiting in any way. Those of ordinary skill in the art will recognize there are many other ways of forming unique identifiers. These other ways of forming unique identifiers may include, for example, other combinations of the PHY ID and port ID of the transmitting port, the PHY ID and port ID of the receiving port, the speed of the untested port, a Globally Unique Identifier (GUID), and a random number.
The identifier is used to determine if a particular LTP was sent by the local PHY or by another PHY in the network. Additionally, the identifier prevents two or more PHYs from simultaneously joining ports, thus creating a loop. A loop is avoided by using a predetermined criteria and the unique identifiers from multiple PHYs to establish a “winning” PHY and “losing” PHY(s). Since more than two PHYs could be performing loop testing simultaneously, there could be more than one “losing” PHY. The winning PHY joins the port to the main bus, while the losing PHY(s) surrender the buses. The PHY waits at least a subaction gap (as defined by the IEEE1394-1995 standard) after sending a LTP. If the PHY has either not seen an RxLTP or has received one with a lower ID, a loop does not exist and the port can be safely joined to the main bus.
Join State
At reference numeral 176, the port under test is joined to the main bus. According to a preferred embodiment of the present invention, the port is joined by first waiting a period of time for the PHY to win arbitration of both the main bus and the peer bus. If arbitration of both buses is won within the period of time, a relatively short bus reset is issued. If arbitration of both buses is not won within the period of time, a relatively long bus reset is issued. After the port as been joined, the next untested port is selected and tested for loops.
Surrender State
The surrender state is indicated by reference numeral 178. To prevent both PHYs from joining simultaneously, the PHY with the lower ID surrenders and waits until the receiving bus returns to idle, which may occur after a bus reset used by the winning PHY to join a port. Once the port surrenders the buses, the next untested port is selected and tested for loops.
Issue Random Challenge State
At reference numeral 180, the PHY has received the same identifier as the one transmitted. Consequently, a loop may exist. Alternatively, another PHY may have chosen the same ID. At reference numeral 180, the LTP is modified to include a ransom number to reduce the risk of a false loop detection in the case where two PHYs use the same initial identifier. The modified packet is sent and the same criteria used in the “Send Loop Test Packet” state 174 is used to determine whether to surrender bus control, or to join the port to the main bus.
According to another embodiment of the present invention, the original LTP is modified to include a random challenge, thus requiring only one loop test per port. This embodiment is illustrated in
Quarantined State
At reference numeral 182, if the PHY received the same identifier as the one it transmitted, a loop exists and the port is quarantined. Once the port is quarantined, the next untested port is selected and tested for loops. This process continues until all ports of the PHY have been tested.
The criteria used to determine what action to take based upon a comparison of a TxLTP and an RxLTP is not intended to be limiting in any way. Those of ordinary skill in the art will recognize that other criteria may be used. For example, a port might be joined if a first criteria is met with respect to the TxLTP and the RxLTP. Also, the decision to issue a random challenge or to quarantine the bus may be based on a third criteria with respect to the TxLTP and the RxLTP. This third criteria may include determining whether the packets are equivalent, meaning the same or similar.
To aid in an understanding of the present invention, flow diagram representations of the state diagram in
Turning now to
Referring now to
Referring now to
Referring now to
At reference numeral 240, a loop test packet is sent on the peer bus. At reference numeral 242, the PHY listens for packets received by any port connected to the main bus. The packets are compared as discussed with respect to
Referring now to
Referring now to
As discussed above with reference to
According to a presently preferred embodiment, the present invention may be implemented in software or firmware, as well as in programmable gate array devices, Application Specific Integrated Circuits (ASICs), and other hardware.
Thus, a novel method and apparatus for loop detection on a serial bus has been described. While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art having the benefit of this disclosure that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims.
This application is a continuation of co-pending U.S. patent application Ser. No. 10/464,246, filed Jun. 17, 2003, now issued as U.S. Pat. No. 6,977,887, which is a continuation of U.S. patent application Ser. No. 09/350,583, filed Jul. 9, 1999, now issued as U.S. Pat. No. 6,628,607, which are hereby incorporated by reference as if set forth herein.
Number | Name | Date | Kind |
---|---|---|---|
4156798 | Doelz | May 1979 | A |
4194113 | Fulks et al. | Mar 1980 | A |
4486852 | Champlin et al. | Dec 1984 | A |
4803485 | Rypinski | Feb 1989 | A |
5014262 | Harshavardhana | May 1991 | A |
5193149 | Awiszio et al. | Mar 1993 | A |
5274631 | Bhardwaj | Dec 1993 | A |
5276893 | Savaria | Jan 1994 | A |
5343461 | Barton et al. | Aug 1994 | A |
5394556 | Oprescu | Feb 1995 | A |
5406643 | Burke et al. | Apr 1995 | A |
5452330 | Goldstein | Sep 1995 | A |
5490253 | Laha et al. | Feb 1996 | A |
5495481 | Duckwall | Feb 1996 | A |
5524254 | Morgan et al. | Jun 1996 | A |
5539390 | Nagano et al. | Jul 1996 | A |
5541670 | Hanai | Jul 1996 | A |
5568641 | Nelson | Oct 1996 | A |
5583922 | Davis et al. | Dec 1996 | A |
5621659 | Matsumoto et al. | Apr 1997 | A |
5630173 | Oprescu | May 1997 | A |
5640595 | Baugher et al. | Jun 1997 | A |
5642515 | Jones et al. | Jun 1997 | A |
5654657 | Pearce | Aug 1997 | A |
5684715 | Palmer | Nov 1997 | A |
5701476 | Fenger | Dec 1997 | A |
5701492 | Wadsworth et al. | Dec 1997 | A |
5706278 | Robillard et al. | Jan 1998 | A |
5712834 | Nagano et al. | Jan 1998 | A |
5719862 | Lee et al. | Feb 1998 | A |
5754765 | Danneels et al. | May 1998 | A |
5764930 | Staats | Jun 1998 | A |
5784557 | Oprescu | Jul 1998 | A |
5784648 | Duckwall | Jul 1998 | A |
5802048 | Duckwall | Sep 1998 | A |
5802057 | Duckwall et al. | Sep 1998 | A |
5802365 | Kathail et al. | Sep 1998 | A |
5805073 | Nagano et al. | Sep 1998 | A |
5809331 | Staats et al. | Sep 1998 | A |
5826027 | Pedersen et al. | Oct 1998 | A |
5832298 | Sanchez et al. | Nov 1998 | A |
5835761 | Ishii et al. | Nov 1998 | A |
5845152 | Anderson et al. | Dec 1998 | A |
5867730 | Leyda | Feb 1999 | A |
5875301 | Duckwall et al. | Feb 1999 | A |
5923663 | Bontemps et al. | Jul 1999 | A |
5930480 | Staats | Jul 1999 | A |
5935208 | Duckwall et al. | Aug 1999 | A |
5938764 | Klein | Aug 1999 | A |
5940600 | Staats et al. | Aug 1999 | A |
5954796 | McCarty et al. | Sep 1999 | A |
5968152 | Staats | Oct 1999 | A |
5970052 | Lo et al. | Oct 1999 | A |
5987605 | Hill et al. | Nov 1999 | A |
5991842 | Takayama | Nov 1999 | A |
6032202 | Lea et al. | Feb 2000 | A |
6032261 | Hulyalkar | Feb 2000 | A |
6038234 | LaFollette et al. | Mar 2000 | A |
6038625 | Ogino et al. | Mar 2000 | A |
6070187 | Subramaniam et al. | May 2000 | A |
6073206 | Piwonka et al. | Jun 2000 | A |
6091726 | Crivellari et al. | Jul 2000 | A |
6115764 | Chisholm et al. | Sep 2000 | A |
6122248 | Murakoshi et al. | Sep 2000 | A |
6131129 | Ludtke | Oct 2000 | A |
6131134 | Huang et al. | Oct 2000 | A |
6133938 | James | Oct 2000 | A |
6138196 | Takayama et al. | Oct 2000 | A |
6141702 | Ludtke et al. | Oct 2000 | A |
6141767 | Hu et al. | Oct 2000 | A |
6145018 | LaFollette et al. | Nov 2000 | A |
6157972 | Newman et al. | Dec 2000 | A |
6160796 | Zou | Dec 2000 | A |
6167532 | Wisecup | Dec 2000 | A |
6173327 | De Borst et al. | Jan 2001 | B1 |
6192189 | Fujinami et al. | Feb 2001 | B1 |
6199119 | Duckwall et al. | Mar 2001 | B1 |
6202210 | Ludtke | Mar 2001 | B1 |
6212171 | LaFollette et al. | Apr 2001 | B1 |
6212633 | Levy et al. | Apr 2001 | B1 |
6219697 | Lawande et al. | Apr 2001 | B1 |
6233615 | Van Loo | May 2001 | B1 |
6233624 | Hyder et al. | May 2001 | B1 |
6243778 | Fung et al. | Jun 2001 | B1 |
6247063 | Ichimi et al. | Jun 2001 | B1 |
6247083 | Hake et al. | Jun 2001 | B1 |
6253114 | Takihara | Jun 2001 | B1 |
6253255 | Hyder et al. | Jun 2001 | B1 |
6260063 | Ludtke et al. | Jul 2001 | B1 |
6266334 | Duckwall | Jul 2001 | B1 |
6266344 | Fujimori et al. | Jul 2001 | B1 |
6266701 | Sridhar et al. | Jul 2001 | B1 |
6275889 | Saito | Aug 2001 | B1 |
6282597 | Kawamura | Aug 2001 | B1 |
6292840 | Blomfield-Brown et al. | Sep 2001 | B1 |
6295479 | Shima et al. | Sep 2001 | B1 |
6308222 | Krueger et al. | Oct 2001 | B1 |
6311228 | Ray | Oct 2001 | B1 |
6314461 | Duckwall et al. | Nov 2001 | B2 |
6343321 | Patki et al. | Jan 2002 | B2 |
6345315 | Mishra | Feb 2002 | B1 |
6347362 | Schoinas et al. | Feb 2002 | B1 |
6353868 | Takayama et al. | Mar 2002 | B1 |
6356558 | Hauck et al. | Mar 2002 | B1 |
6363085 | Samuels | Mar 2002 | B1 |
6373821 | Staats | Apr 2002 | B2 |
6385679 | Duckwall et al. | May 2002 | B1 |
6389496 | Matsuda | May 2002 | B1 |
6405247 | Lawande et al. | Jun 2002 | B1 |
6411628 | Hauck et al. | Jun 2002 | B1 |
6418150 | Staats | Jul 2002 | B1 |
6425019 | Tateyama et al. | Jul 2002 | B1 |
6426062 | Chopra et al. | Jul 2002 | B1 |
6442630 | Takayama et al. | Aug 2002 | B1 |
6446142 | Shima et al. | Sep 2002 | B1 |
6452975 | Hannah | Sep 2002 | B1 |
6457086 | Duckwall | Sep 2002 | B1 |
6466982 | Ruberg | Oct 2002 | B1 |
6496862 | Akatsu et al. | Dec 2002 | B1 |
6519657 | Stone et al. | Feb 2003 | B1 |
6529522 | Ito et al. | Mar 2003 | B1 |
6587904 | Hauck et al. | Jul 2003 | B1 |
6628607 | Hauck et al. | Sep 2003 | B1 |
6810452 | James et al. | Oct 2004 | B1 |
6857027 | Lindeborg et al. | Feb 2005 | B1 |
6977887 | Hauck et al. | Dec 2005 | B1 |
6985981 | Hauck et al. | Jan 2006 | B1 |
7210068 | Aiello et al. | Apr 2007 | B1 |
7460534 | Bellenger | Dec 2008 | B1 |
20010001151 | Duckwall et al. | May 2001 | A1 |
20010019561 | Staats | Sep 2001 | A1 |
20010024423 | Duckwall et al. | Sep 2001 | A1 |
20020057655 | Staats | May 2002 | A1 |
20020085581 | Hauck et al. | Jul 2002 | A1 |
20020101231 | Staats | Aug 2002 | A1 |
20020103947 | Duckwall et al. | Aug 2002 | A1 |
20020188780 | Duckwall | Dec 2002 | A1 |
20020188783 | Duckwall et al. | Dec 2002 | A1 |
20030021235 | Arima | Jan 2003 | A1 |
20030037161 | Duckwall et al. | Feb 2003 | A1 |
20030055999 | Duckwall et al. | Mar 2003 | A1 |
Number | Date | Country |
---|---|---|
1 085 706 | Mar 2001 | EP |
1 085 706 | Oct 2002 | EP |
Number | Date | Country | |
---|---|---|---|
Parent | 10464246 | Jun 2003 | US |
Child | 11141944 | US | |
Parent | 09350583 | Jul 1999 | US |
Child | 10464246 | US |