[SCSI] libfc: Do not retry if the new state is not the same as old state
authorAbhijeet Joglekar <abjoglek@cisco.com>
Tue, 21 Apr 2009 23:26:58 +0000 (16:26 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 27 Apr 2009 15:18:51 +0000 (10:18 -0500)
commit76f6804e7e7bb836cbdf4a73fe6c5485e4cc04c2
tree84a01586a05b430ca327709173a65e53b793ca88
parent0d228c0f7f9e3ade147e57682915c55b92448230
[SCSI] libfc: Do not retry if the new state is not the same as old state

For instance, if there is a Plogi pending (remote port is in Plogi state),
and the state changes to say NONE (because the port is being logged off),
then when the Plogi resp times out, do not start a retry.

This patch partially reverts an earlier patch (libfc: check for err when
recv and state is incorrect), by moving the state check back to before
checking for error. However, if the state does not match, then there is
an additional check to see if its an error ptr or a real frame before
jumping to err or out respectively.

Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libfc/fc_rport.c