Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316763
b: refs/heads/master
c: 5c17ae2
h: refs/heads/master
i:
  316761: 4b8742b
  316759: d7ecd7f
v: v3
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Jul 20, 2012
1 parent 6acaa6a commit 7635d28
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d075498c987623107f7bface4dad72fe9260a0d3
refs/heads/master: 5c17ae217ad13463f821c3bab774335777da9c33
1 change: 1 addition & 0 deletions trunk/drivers/scsi/bnx2fc/bnx2fc.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ struct bnx2fc_rport {
#define BNX2FC_FLAG_CTX_ALLOC_FAILURE 0x6
#define BNX2FC_FLAG_UPLD_REQ_COMPL 0x7
#define BNX2FC_FLAG_EXPL_LOGO 0x8
#define BNX2FC_FLAG_DISABLE_FAILED 0x9

u8 src_addr[ETH_ALEN];
u32 max_sqes;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/scsi/bnx2fc/bnx2fc_hwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,9 @@ static void bnx2fc_process_conn_disable_cmpl(struct bnx2fc_hba *hba,
if (disable_kcqe->completion_status) {
printk(KERN_ERR PFX "Disable failed with cmpl status %d\n",
disable_kcqe->completion_status);
return;
set_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags);
set_bit(BNX2FC_FLAG_UPLD_REQ_COMPL, &tgt->flags);
wake_up_interruptible(&tgt->upld_wait);
} else {
/* disable successful */
BNX2FC_TGT_DBG(tgt, "disable successful\n");
Expand Down
25 changes: 20 additions & 5 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_tgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,14 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt)

set_bit(BNX2FC_FLAG_IO_COMPL, &io_req->req_flags);
set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags);
rc = bnx2fc_initiate_cleanup(io_req);
BUG_ON(rc);

/* Do not issue cleanup when disable request failed */
if (test_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags))
bnx2fc_process_cleanup_compl(io_req, io_req->task, 0);
else {
rc = bnx2fc_initiate_cleanup(io_req);
BUG_ON(rc);
}
}

list_for_each_safe(list, tmp, &tgt->active_tm_queue) {
Expand Down Expand Up @@ -212,8 +218,13 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt)
io_req->cb_arg = NULL;
}

rc = bnx2fc_initiate_cleanup(io_req);
BUG_ON(rc);
/* Do not issue cleanup when disable request failed */
if (test_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags))
bnx2fc_process_cleanup_compl(io_req, io_req->task, 0);
else {
rc = bnx2fc_initiate_cleanup(io_req);
BUG_ON(rc);
}
}

list_for_each_safe(list, tmp, &tgt->io_retire_queue) {
Expand Down Expand Up @@ -321,9 +332,13 @@ static void bnx2fc_upload_session(struct fcoe_port *port,

del_timer_sync(&tgt->upld_timer);

} else
} else if (test_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags)) {
printk(KERN_ERR PFX "ERROR!! DISABLE req failed, destroy"
" not sent to FW\n");
} else {
printk(KERN_ERR PFX "ERROR!! DISABLE req timed out, destroy"
" not sent to FW\n");
}

/* Free session resources */
bnx2fc_free_session_resc(hba, tgt);
Expand Down

0 comments on commit 7635d28

Please sign in to comment.