]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/scsi/libfc/fc_lport.c
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
[net-next-2.6.git] / drivers / scsi / libfc / fc_lport.c
index d9b6e11b0e884b122cfe4d7b6fc2888e5e6c507d..9be63edbf8fb9095624222f7dc6398957e0abd28 100644 (file)
@@ -1447,13 +1447,7 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
        }
 
        did = fc_frame_did(fp);
-
-       if (!did) {
-               FC_LPORT_DBG(lport, "Bad FLOGI response\n");
-               goto out;
-       }
-
-       if (fc_frame_payload_op(fp) == ELS_LS_ACC) {
+       if (fc_frame_payload_op(fp) == ELS_LS_ACC && did) {
                flp = fc_frame_payload_get(fp, sizeof(*flp));
                if (flp) {
                        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,
                                fc_lport_enter_dns(lport);
                        }
                }
-       } else
+       } else {
+               FC_LPORT_DBG(lport, "FLOGI RJT or bad response\n");
                fc_lport_error(lport, fp);
+       }
 
 out:
        fc_frame_free(fp);