diff options
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_elsct.c | 4 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 7 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 8 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 10 |
5 files changed, 15 insertions, 16 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index c48799e9dd8e..d4cb3f9b1a0d 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -371,7 +371,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc) | |||
371 | disc, lport->e_d_tov)) | 371 | disc, lport->e_d_tov)) |
372 | return; | 372 | return; |
373 | err: | 373 | err: |
374 | fc_disc_error(disc, fp); | 374 | fc_disc_error(disc, NULL); |
375 | } | 375 | } |
376 | 376 | ||
377 | /** | 377 | /** |
diff --git a/drivers/scsi/libfc/fc_elsct.c b/drivers/scsi/libfc/fc_elsct.c index 5cfa68732e9d..92984587ff4d 100644 --- a/drivers/scsi/libfc/fc_elsct.c +++ b/drivers/scsi/libfc/fc_elsct.c | |||
@@ -53,8 +53,10 @@ static struct fc_seq *fc_elsct_send(struct fc_lport *lport, | |||
53 | did = FC_FID_DIR_SERV; | 53 | did = FC_FID_DIR_SERV; |
54 | } | 54 | } |
55 | 55 | ||
56 | if (rc) | 56 | if (rc) { |
57 | fc_frame_free(fp); | ||
57 | return NULL; | 58 | return NULL; |
59 | } | ||
58 | 60 | ||
59 | fc_fill_fc_hdr(fp, r_ctl, did, fc_host_port_id(lport->host), fh_type, | 61 | fc_fill_fc_hdr(fp, r_ctl, did, fc_host_port_id(lport->host), fh_type, |
60 | FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0); | 62 | FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0); |
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 28bfe1c2c50a..a67f53a5026c 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -1051,7 +1051,6 @@ static int fc_fcp_cmd_send(struct fc_lport *lp, struct fc_fcp_pkt *fsp, | |||
1051 | 1051 | ||
1052 | seq = lp->tt.exch_seq_send(lp, fp, resp, fc_fcp_pkt_destroy, fsp, 0); | 1052 | seq = lp->tt.exch_seq_send(lp, fp, resp, fc_fcp_pkt_destroy, fsp, 0); |
1053 | if (!seq) { | 1053 | if (!seq) { |
1054 | fc_frame_free(fp); | ||
1055 | rc = -1; | 1054 | rc = -1; |
1056 | goto unlock; | 1055 | goto unlock; |
1057 | } | 1056 | } |
@@ -1316,7 +1315,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp) | |||
1316 | fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */ | 1315 | fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */ |
1317 | return; | 1316 | return; |
1318 | } | 1317 | } |
1319 | fc_frame_free(fp); | ||
1320 | retry: | 1318 | retry: |
1321 | if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY) | 1319 | if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY) |
1322 | fc_fcp_timer_set(fsp, FC_SCSI_REC_TOV); | 1320 | fc_fcp_timer_set(fsp, FC_SCSI_REC_TOV); |
@@ -1564,10 +1562,9 @@ static void fc_fcp_srr(struct fc_fcp_pkt *fsp, enum fc_rctl r_ctl, u32 offset) | |||
1564 | 1562 | ||
1565 | seq = lp->tt.exch_seq_send(lp, fp, fc_fcp_srr_resp, NULL, | 1563 | seq = lp->tt.exch_seq_send(lp, fp, fc_fcp_srr_resp, NULL, |
1566 | fsp, jiffies_to_msecs(FC_SCSI_REC_TOV)); | 1564 | fsp, jiffies_to_msecs(FC_SCSI_REC_TOV)); |
1567 | if (!seq) { | 1565 | if (!seq) |
1568 | fc_frame_free(fp); | ||
1569 | goto retry; | 1566 | goto retry; |
1570 | } | 1567 | |
1571 | fsp->recov_seq = seq; | 1568 | fsp->recov_seq = seq; |
1572 | fsp->xfer_len = offset; | 1569 | fsp->xfer_len = offset; |
1573 | fsp->xfer_contig_end = offset; | 1570 | fsp->xfer_contig_end = offset; |
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 0d19ffa88716..536492ae6a88 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -1115,7 +1115,7 @@ static void fc_lport_enter_scr(struct fc_lport *lport) | |||
1115 | 1115 | ||
1116 | if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR, | 1116 | if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR, |
1117 | fc_lport_scr_resp, lport, lport->e_d_tov)) | 1117 | fc_lport_scr_resp, lport, lport->e_d_tov)) |
1118 | fc_lport_error(lport, fp); | 1118 | fc_lport_error(lport, NULL); |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | /** | 1121 | /** |
@@ -1186,7 +1186,7 @@ static void fc_lport_enter_rpn_id(struct fc_lport *lport) | |||
1186 | if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, FC_NS_RPN_ID, | 1186 | if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, FC_NS_RPN_ID, |
1187 | fc_lport_rpn_id_resp, | 1187 | fc_lport_rpn_id_resp, |
1188 | lport, lport->e_d_tov)) | 1188 | lport, lport->e_d_tov)) |
1189 | fc_lport_error(lport, fp); | 1189 | fc_lport_error(lport, NULL); |
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | static struct fc_rport_operations fc_lport_rport_ops = { | 1192 | static struct fc_rport_operations fc_lport_rport_ops = { |
@@ -1340,7 +1340,7 @@ static void fc_lport_enter_logo(struct fc_lport *lport) | |||
1340 | 1340 | ||
1341 | if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO, | 1341 | if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO, |
1342 | fc_lport_logo_resp, lport, lport->e_d_tov)) | 1342 | fc_lport_logo_resp, lport, lport->e_d_tov)) |
1343 | fc_lport_error(lport, fp); | 1343 | fc_lport_error(lport, NULL); |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | /** | 1346 | /** |
@@ -1456,7 +1456,7 @@ void fc_lport_enter_flogi(struct fc_lport *lport) | |||
1456 | 1456 | ||
1457 | if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_FLOGI, | 1457 | if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_FLOGI, |
1458 | fc_lport_flogi_resp, lport, lport->e_d_tov)) | 1458 | fc_lport_flogi_resp, lport, lport->e_d_tov)) |
1459 | fc_lport_error(lport, fp); | 1459 | fc_lport_error(lport, NULL); |
1460 | } | 1460 | } |
1461 | 1461 | ||
1462 | /* Configure a fc_lport */ | 1462 | /* Configure a fc_lport */ |
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 1f795e4e4742..49abb839a223 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -632,7 +632,7 @@ static void fc_rport_enter_plogi(struct fc_rport_priv *rdata) | |||
632 | 632 | ||
633 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, | 633 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, |
634 | fc_rport_plogi_resp, rdata, lport->e_d_tov)) | 634 | fc_rport_plogi_resp, rdata, lport->e_d_tov)) |
635 | fc_rport_error_retry(rdata, fp); | 635 | fc_rport_error_retry(rdata, NULL); |
636 | else | 636 | else |
637 | kref_get(&rdata->kref); | 637 | kref_get(&rdata->kref); |
638 | } | 638 | } |
@@ -793,7 +793,7 @@ static void fc_rport_enter_prli(struct fc_rport_priv *rdata) | |||
793 | 793 | ||
794 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI, | 794 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI, |
795 | fc_rport_prli_resp, rdata, lport->e_d_tov)) | 795 | fc_rport_prli_resp, rdata, lport->e_d_tov)) |
796 | fc_rport_error_retry(rdata, fp); | 796 | fc_rport_error_retry(rdata, NULL); |
797 | else | 797 | else |
798 | kref_get(&rdata->kref); | 798 | kref_get(&rdata->kref); |
799 | } | 799 | } |
@@ -889,7 +889,7 @@ static void fc_rport_enter_rtv(struct fc_rport_priv *rdata) | |||
889 | 889 | ||
890 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, | 890 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, |
891 | fc_rport_rtv_resp, rdata, lport->e_d_tov)) | 891 | fc_rport_rtv_resp, rdata, lport->e_d_tov)) |
892 | fc_rport_error_retry(rdata, fp); | 892 | fc_rport_error_retry(rdata, NULL); |
893 | else | 893 | else |
894 | kref_get(&rdata->kref); | 894 | kref_get(&rdata->kref); |
895 | } | 895 | } |
@@ -919,7 +919,7 @@ static void fc_rport_enter_logo(struct fc_rport_priv *rdata) | |||
919 | 919 | ||
920 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, | 920 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, |
921 | fc_rport_logo_resp, rdata, lport->e_d_tov)) | 921 | fc_rport_logo_resp, rdata, lport->e_d_tov)) |
922 | fc_rport_error_retry(rdata, fp); | 922 | fc_rport_error_retry(rdata, NULL); |
923 | else | 923 | else |
924 | kref_get(&rdata->kref); | 924 | kref_get(&rdata->kref); |
925 | } | 925 | } |
@@ -1006,7 +1006,7 @@ static void fc_rport_enter_adisc(struct fc_rport_priv *rdata) | |||
1006 | } | 1006 | } |
1007 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, | 1007 | if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, |
1008 | fc_rport_adisc_resp, rdata, lport->e_d_tov)) | 1008 | fc_rport_adisc_resp, rdata, lport->e_d_tov)) |
1009 | fc_rport_error_retry(rdata, fp); | 1009 | fc_rport_error_retry(rdata, NULL); |
1010 | else | 1010 | else |
1011 | kref_get(&rdata->kref); | 1011 | kref_get(&rdata->kref); |
1012 | } | 1012 | } |