A method and system for credit recovery of lost frames and R_RDYs in an
in-line credit extender is provided. The method includes, comparing
received frame count and a programmable counter value when BB_SCs are
received; loading the difference between the frame count and the
programmed counter value into a buffer and to a first counter that counts
each frame that is transmitted; and sending BB-SCs to the local device if
there is a match between the first counter value and a second
programmable counter value. The method also includes, counting received
R_RDYs, wherein a first counter counts the received R_RDYs; setting a
flag when a BB_SCr is received; and transmitting BB-SCr when the first
counter value is zero and the flag is set. Also, R_RDYs received after
BB_SCrs are counted by a second counter and transmitted when the second
counter value is non-zero.