diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index d9b6e11b0e88..9be63edbf8fb 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -1447,13 +1447,7 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | did = fc_frame_did(fp); | 1449 | did = fc_frame_did(fp); |
1450 | 1450 | if (fc_frame_payload_op(fp) == ELS_LS_ACC && did) { | |
1451 | if (!did) { | ||
1452 | FC_LPORT_DBG(lport, "Bad FLOGI response\n"); | ||
1453 | goto out; | ||
1454 | } | ||
1455 | |||
1456 | if (fc_frame_payload_op(fp) == ELS_LS_ACC) { | ||
1457 | flp = fc_frame_payload_get(fp, sizeof(*flp)); | 1451 | flp = fc_frame_payload_get(fp, sizeof(*flp)); |
1458 | if (flp) { | 1452 | if (flp) { |
1459 | mfs = ntohs(flp->fl_csp.sp_bb_data) & | 1453 | mfs = ntohs(flp->fl_csp.sp_bb_data) & |
@@ -1492,8 +1486,10 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
1492 | fc_lport_enter_dns(lport); | 1486 | fc_lport_enter_dns(lport); |
1493 | } | 1487 | } |
1494 | } | 1488 | } |
1495 | } else | 1489 | } else { |
1490 | FC_LPORT_DBG(lport, "FLOGI RJT or bad response\n"); | ||
1496 | fc_lport_error(lport, fp); | 1491 | fc_lport_error(lport, fp); |
1492 | } | ||
1497 | 1493 | ||
1498 | out: | 1494 | out: |
1499 | fc_frame_free(fp); | 1495 | fc_frame_free(fp); |