On 11/18/2010 07:30 PM, Eddie Wai wrote:
In the case the chip is undergoing different invasive operation
which requires a chip reset, all NOPOUT request during this period
must be silently dropped from queuing to the hardware.  This patch
will respond to libiscsi immediately with sent success.  Since the
request was not actually sent, the NOPIN wait timeout will get
triggered and another NOPOUT request will commence through the
proper channel.

Signed-off-by: Eddie Wai<eddie....@broadcom.com>
Acked-by: Anil Veerabhadrappa<ani...@broadcom.com>
---
  drivers/scsi/bnx2i/bnx2i_iscsi.c |   16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index f622e89..5e8dff9 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1068,6 +1068,22 @@ static int bnx2i_iscsi_send_generic_request(struct 
iscsi_task *task)
        char *buf;
        int data_len;

+       /*
+        * Forcefully terminate all in progress connection recovery at the
+        * earliest, either in bind(), send_pdu(LOGIN), or conn_start()
+        */
+       if (bnx2i_adapter_ready(bnx2i_conn->ep->hba)) {
+               if ((task->hdr->opcode&  ISCSI_OPCODE_MASK) ==
+                   ISCSI_OP_NOOP_OUT)
+                       /* This is a WA to indicate to libiscsi that the nopout
+                        * request was sent successfully without actually
+                        * submitting to the hardware.
+                        * Just silently drop the nopout request
+                        */
+                       return 0;

I'd like to just have libiscsi handle a error code here instead of hacking around its lack of eh handling.


+               else
+                       return -EIO;
+       }
        bnx2i_iscsi_prep_generic_pdu_bd(bnx2i_conn);
        switch (task->hdr->opcode&  ISCSI_OPCODE_MASK) {
        case ISCSI_OP_LOGIN:

--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to