diff options
author | Robert Love <robert.w.love@intel.com> | 2009-08-25 17:03:04 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 13:07:58 -0400 |
commit | 6bd054cbf3f7da3442f30a7d4eb7da4dd1c44f21 (patch) | |
tree | d7371dffcb9d3d37583d1354b9f20c377c195337 /drivers/scsi/libfc | |
parent | 9737e6a7b5b8af48f983cd565df93493597c565b (diff) |
[SCSI] libfc: Always reset remote port roles when receiving PRLI
Don't trust previous roles, reset them when we receive a PRLI.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index c667be879be6..cb54115c26cb 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -666,6 +666,9 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
666 | goto err; | 666 | goto err; |
667 | } | 667 | } |
668 | 668 | ||
669 | /* reinitialize remote port roles */ | ||
670 | rdata->ids.roles = FC_RPORT_ROLE_UNKNOWN; | ||
671 | |||
669 | op = fc_frame_payload_op(fp); | 672 | op = fc_frame_payload_op(fp); |
670 | if (op == ELS_LS_ACC) { | 673 | if (op == ELS_LS_ACC) { |
671 | pp = fc_frame_payload_get(fp, sizeof(*pp)); | 674 | pp = fc_frame_payload_get(fp, sizeof(*pp)); |
@@ -1173,6 +1176,9 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata, | |||
1173 | pp->prli.prli_len = htons(len); | 1176 | pp->prli.prli_len = htons(len); |
1174 | len -= sizeof(struct fc_els_prli); | 1177 | len -= sizeof(struct fc_els_prli); |
1175 | 1178 | ||
1179 | /* reinitialize remote port roles */ | ||
1180 | rdata->ids.roles = FC_RPORT_ROLE_UNKNOWN; | ||
1181 | |||
1176 | /* | 1182 | /* |
1177 | * Go through all the service parameter pages and build | 1183 | * Go through all the service parameter pages and build |
1178 | * response. If plen indicates longer SPP than standard, | 1184 | * response. If plen indicates longer SPP than standard, |