From 8031f3f2e76bac299aaeb2bf3ebb1df10bfad09e Mon Sep 17 00:00:00 2001 From: Yi Zou Date: Thu, 25 Aug 2011 12:41:03 -0700 Subject: [PATCH] --- yaml --- r: 263807 b: refs/heads/master c: 3ee17f59c5378af8d245f82498e3919b7de2ab40 h: refs/heads/master i: 263805: 9f22bfe1c4f761547204db33271d5b6bb42d9a1a 263803: 68f9975bc1067cf990c7286fa06bc0ceb29d1646 263799: 1d66222cdba0a25d9e353c7f3b05388c44577f7e 263791: 4adf075712e66684b3afb83a6470ecaa90a810c3 263775: 07b2892cbe793b41c0b87013175f034acfa5b977 263743: 583067f684ad1ec732e6f80c3ec268bad0fd1720 263679: 9b318b91cac13ec4f1a72906664d6aaf2ee7aab4 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/libfc/fc_exch.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index aea7b4533a22..69c1aa7ea444 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 21cc0bd3a9e524b44a4f0ff05ac612aa0ff1a26e +refs/heads/master: 3ee17f59c5378af8d245f82498e3919b7de2ab40 diff --git a/trunk/drivers/scsi/libfc/fc_exch.c b/trunk/drivers/scsi/libfc/fc_exch.c index 744fefe81341..d261e982a2fa 100644 --- a/trunk/drivers/scsi/libfc/fc_exch.c +++ b/trunk/drivers/scsi/libfc/fc_exch.c @@ -1981,6 +1981,7 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, struct fc_exch *ep; struct fc_seq *sp = NULL; struct fc_frame_header *fh; + struct fc_fcp_pkt *fsp = NULL; int rc = 1; ep = fc_exch_alloc(lport, fp); @@ -2003,8 +2004,10 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, fc_exch_setup_hdr(ep, fp, ep->f_ctl); sp->cnt++; - if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) + if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { + fsp = fr_fsp(fp); fc_fcp_ddp_setup(fr_fsp(fp), ep->xid); + } if (unlikely(lport->tt.frame_send(lport, fp))) goto err; @@ -2018,7 +2021,8 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, spin_unlock_bh(&ep->ex_lock); return sp; err: - fc_fcp_ddp_done(fr_fsp(fp)); + if (fsp) + fc_fcp_ddp_done(fsp); rc = fc_exch_done_locked(ep); spin_unlock_bh(&ep->ex_lock); if (!rc)