US 7,499,452 B2
Self-healing link sequence counts within a circular buffer
Robert A. Shearer, Rochester, Minn. (US); Martha E. Voytovich, Rochester, Minn. (US); and Craig A. Wigglesworth, Cary, N.C. (US)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Dec. 28, 2004, as Appl. No. 11/23,708.
Prior Publication US 2006/0140188 A1, Jun. 29, 2006
Int. Cl. H04L 12/56 (2006.01); G06F 13/00 (2006.01)
U.S. Cl. 370—394  [370/352; 370/397; 370/395.53; 370/395.71; 370/474; 710/20; 710/36; 710/40; 710/53; 710/56] 4 Claims
OG exemplary drawing
 
1. A method of communicating with an external device over a bus utilizing one or more virtual channels, at least one of the virtual channels utilizing a transmit buffer to hold commands and data to be sent in packets to the external device, comprising:
maintaining a current sequence count for packets to be transmitted to the external device;
receiving a packet from the external device indicating an expected sequence count that does not match the current sequence count; and
adjusting the current sequence count to match the expected sequence count by modifying one or more pointers into the transmit buffer, wherein the adjusting comprises:
setting a first pointer indicating an earliest packet in the transmit buffer that has been sent, but not acknowledged, to the same value as the expected sequence count;
adjusting a second pointer indicative of a location in the transmit buffer containing an earliest packet that has been transmitted but not yet cleared from the transmit buffer;
once the second pointer has reached a third pointer indicative of a next packet to be sent, adjusting the second and third pointers together;
once the second and third pointers have reached a fourth pointer indicative of the next entry in the transmit buffer to be written to, adjusting the second, third and fourth pointers to match the first pointer; and
subsequently, transmitting a packet having the expected sequence count to the external device.