[SRP] add SCSI errors to the logs
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 19 Nov 2006 06:31:50 +0000 (06:31 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 19 Nov 2006 06:31:50 +0000 (06:31 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@543 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/srp/kernel/srp_data_path.c
ulp/srp/kernel/srp_debug.h
ulp/srp/kernel/srp_descriptors.c
ulp/srp/kernel/srp_driver.c

index 9e2d118..7d9bafd 100644 (file)
 // Final address is of the form 0b00ttttttllllllll\r
 #define BUILD_SCSI_ADDRESS(lun) ((uint64_t)lun << 48)\r
 \r
+\r
+static inline\r
+void\r
+__srp_dump_srb_info(srp_send_descriptor_t*             p_send_descriptor)\r
+{\r
+       \r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
+               ("Srb Address              = %p\n",\r
+               p_send_descriptor->p_srb) );\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
+               ("Srb DataBuffer Address   = %p\n",\r
+               p_send_descriptor->p_srb->DataBuffer) );\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
+               ("Srb DataTransferLength   = %d\n",\r
+                p_send_descriptor->p_srb->DataTransferLength) );\r
+\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
+                          ("Returning SrbStatus %s(0x%x) for "\r
+                          "Function = %s(0x%x), Path = 0x%x, Target = 0x%x, "\r
+                          "Lun = 0x%x, tag 0x%I64xn",\r
+                          g_srb_status_name[p_send_descriptor->p_srb->SrbStatus],\r
+                          p_send_descriptor->p_srb->SrbStatus,\r
+                          g_srb_function_name[p_send_descriptor->p_srb->Function],\r
+                          p_send_descriptor->p_srb->Function,\r
+                          p_send_descriptor->p_srb->PathId,\r
+                          p_send_descriptor->p_srb->TargetId,\r
+                          p_send_descriptor->p_srb->Lun,\r
+                          get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+}\r
+\r
+\r
 static inline\r
 void\r
 __srp_process_session_send_completions(\r
@@ -68,14 +99,14 @@ __srp_process_session_send_completions(
        ib_wc_t         *p_wc_done_list = NULL;\r
        ib_wc_t         *p_wc;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_obj_lock( &p_session->obj );\r
 \r
        if ( p_session->connection.state != SRP_CONNECTED )\r
        {\r
                cl_obj_unlock( &p_session->obj );\r
-               SRP_EXIT( SRP_DBG_DEBUG );\r
+               SRP_EXIT( SRP_DBG_DATA );\r
                return;\r
        }\r
 \r
@@ -98,31 +129,52 @@ __srp_process_session_send_completions(
 \r
        while ( (p_wc = p_wc_done_list) != NULL )\r
        {\r
+               srp_send_descriptor_t   *p_send_descriptor;\r
+\r
+               p_send_descriptor = (srp_send_descriptor_t *)((uintn_t)p_wc->wr_id);\r
+\r
                /* Remove head from list */\r
                p_wc_done_list = p_wc->p_next;\r
                p_wc->p_next = NULL;\r
 \r
-               if ( p_wc->status != IB_WCS_SUCCESS )\r
+               switch ( p_wc->status)\r
                {\r
-                       srp_send_descriptor_t   *p_send_descriptor;\r
-\r
-                       p_send_descriptor = (srp_send_descriptor_t *)((uintn_t)p_wc->wr_id);\r
-\r
-                       // TODO: Kill session and inform port driver link down scsiportnotification\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_ERROR,\r
-                               ("Send Completion Status %s Vendore Status = 0x%x, \n",\r
-                               p_session->p_hba->ifc.get_wc_status_str( p_wc->status ),\r
-                               (int)p_wc->vendor_specific));\r
+                       case IB_WCS_SUCCESS:\r
+                               break;\r
+                       case IB_WCS_WR_FLUSHED_ERR:\r
+                               // TODO: Kill session and inform port driver link down scsiportnotification\r
+                               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DATA,\r
+                                       ("Send Completion Status %s Vendore Status = 0x%x, \n",\r
+                                       p_session->p_hba->ifc.get_wc_status_str( p_wc->status ),\r
+                                       (int)p_wc->vendor_specific));\r
+\r
+                               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DATA,\r
+                                                  ("Send Completion Received for Function = %s(0x%x), "\r
+                                                  "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
+                                                  g_srb_function_name[p_send_descriptor->p_srb->Function],\r
+                                                  p_send_descriptor->p_srb->Function,\r
+                                                  p_send_descriptor->p_srb->PathId,\r
+                                                  p_send_descriptor->p_srb->TargetId,\r
+                                                  p_send_descriptor->p_srb->Lun,\r
+                                                  get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                               break;\r
+                       default:\r
+                               // TODO: Kill session and inform port driver link down scsiportnotification\r
+                               SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
+                                       ("Send Completion Status %s Vendore Status = 0x%x, \n",\r
+                                       p_session->p_hba->ifc.get_wc_status_str( p_wc->status ),\r
+                                       (int)p_wc->vendor_specific));\r
 \r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_ERROR,\r
-                                          ("Send Completion Received for Function = %s(0x%x), "\r
-                                          "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
-                                          g_srb_function_name[p_send_descriptor->p_srb->Function],\r
-                                          p_send_descriptor->p_srb->Function,\r
-                                          p_send_descriptor->p_srb->PathId,\r
-                                          p_send_descriptor->p_srb->TargetId,\r
-                                          p_send_descriptor->p_srb->Lun,\r
-                                          get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                               SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
+                                                  ("Send Completion Received for Function = %s(0x%x), "\r
+                                                  "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
+                                                  g_srb_function_name[p_send_descriptor->p_srb->Function],\r
+                                                  p_send_descriptor->p_srb->Function,\r
+                                                  p_send_descriptor->p_srb->PathId,\r
+                                                  p_send_descriptor->p_srb->TargetId,\r
+                                                  p_send_descriptor->p_srb->Lun,\r
+                                                  get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                               break;\r
                }\r
 \r
                /* Put onto head of free list */\r
@@ -148,7 +200,7 @@ __srp_process_session_send_completions(
 \r
        cl_obj_deref( &p_session->obj );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 /* srp_send_completion_cb */\r
@@ -166,13 +218,13 @@ srp_send_completion_cb(
 {\r
        srp_session_t   *p_session = (srp_session_t *)p_context;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        UNUSED_PARAM( h_cq );\r
 \r
        __srp_process_session_send_completions( p_session );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 static inline\r
@@ -186,7 +238,7 @@ __srp_process_recv_completion(
        uint8_t                 response_status;\r
        srp_send_descriptor_t   *p_send_descriptor;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        p_srp_rsp = (srp_rsp_t *)p_recv_descriptor->p_data_segment;\r
 \r
@@ -211,13 +263,13 @@ __srp_process_recv_completion(
 \r
                cl_atomic_add( &p_session->connection.request_limit, get_srp_response_request_limit_delta( p_srp_rsp ) );\r
 \r
-               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
                        ("Matching Send Descriptor Not Found.\n") );\r
 \r
                goto exit;\r
        }\r
 \r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                           ("Recv Completion Received for Function = %s(0x%x), "\r
                           "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
                           g_srb_function_name[p_send_descriptor->p_srb->Function],\r
@@ -235,8 +287,26 @@ __srp_process_recv_completion(
 \r
                        set_srp_tsk_mgmt_from_network_to_host( p_srp_tsk_mgmt );\r
 \r
-                       p_send_descriptor->p_srb->SrbStatus =\r
-                               (response_status == SCSISTAT_GOOD) ? SRB_STATUS_SUCCESS : SRB_STATUS_ABORT_FAILED;\r
+\r
+                       if(response_status == SCSISTAT_GOOD)\r
+                       {\r
+                               p_send_descriptor->p_srb->SrbStatus = SRB_STATUS_SUCCESS;\r
+                       }\r
+                       else\r
+                       {\r
+                               p_send_descriptor->p_srb->SrbStatus = SRB_STATUS_ABORT_FAILED;\r
+                               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
+                                          ("Scsi Error  %s (%#x)  Received for Function = %s(0x%x), "\r
+                                          "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
+                                          g_srb_scsi_status_name[response_status],\r
+                                          response_status,\r
+                                          g_srb_function_name[p_send_descriptor->p_srb->Function],\r
+                                          p_send_descriptor->p_srb->Function,\r
+                                          p_send_descriptor->p_srb->PathId,\r
+                                          p_send_descriptor->p_srb->TargetId,\r
+                                          p_send_descriptor->p_srb->Lun,\r
+                                          get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                       }\r
 \r
                        if ( get_srp_tsk_mgmt_task_management_flags( p_srp_tsk_mgmt ) == TMF_ABORT_TASK )\r
                        {\r
@@ -251,35 +321,7 @@ __srp_process_recv_completion(
                                }\r
 \r
                                cl_atomic_add( &p_session->connection.request_limit, get_srp_response_request_limit_delta( p_srp_rsp ) );\r
-\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                                  ("Srb Status = %s(0x%x)\n",\r
-                                                  g_srb_status_name[p_send_descriptor->p_srb->SrbStatus],\r
-                                                  p_send_descriptor->p_srb->SrbStatus) );\r
-\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG, ("Device Extension Address = %p\n", p_session->p_hba->p_ext) );\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                       ("Srb Address              = %p\n",\r
-                                       p_send_descriptor->p_srb) );\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                       ("Srb DataBuffer Address   = %p\n",\r
-                                       p_send_descriptor->p_srb->DataBuffer) );\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                       ("Srb DataTransferLength   = %d\n",\r
-                                        p_send_descriptor->p_srb->DataTransferLength) );\r
-\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                                  ("Returning SrbStatus %s(0x%x) for "\r
-                                                  "Function = %s(0x%x), Path = 0x%x, Target = 0x%x, "\r
-                                                  "Lun = 0x%x, tag 0x%I64xn",\r
-                                                  g_srb_status_name[p_send_descriptor->p_srb->SrbStatus],\r
-                                                  p_send_descriptor->p_srb->SrbStatus,\r
-                                                  g_srb_function_name[p_send_descriptor->p_srb->Function],\r
-                                                  p_send_descriptor->p_srb->Function,\r
-                                                  p_send_descriptor->p_srb->PathId,\r
-                                                  p_send_descriptor->p_srb->TargetId,\r
-                                                  p_send_descriptor->p_srb->Lun,\r
-                                                  get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                               __srp_dump_srb_info( p_send_descriptor);\r
 \r
                                StorPortNotification( RequestComplete, p_session->p_hba->p_ext, p_send_descriptor->p_srb );\r
                        }\r
@@ -288,8 +330,25 @@ __srp_process_recv_completion(
 \r
                case SRP_CMD:\r
                        p_send_descriptor->p_srb->ScsiStatus = response_status;\r
-                       p_send_descriptor->p_srb->SrbStatus =\r
-                               (response_status == SCSISTAT_GOOD) ? SRB_STATUS_SUCCESS : SRB_STATUS_ERROR;\r
+                       if(response_status == SCSISTAT_GOOD)\r
+                       {\r
+                               p_send_descriptor->p_srb->SrbStatus = SRB_STATUS_SUCCESS;\r
+                       }\r
+                       else\r
+                       {\r
+                               p_send_descriptor->p_srb->SrbStatus = SRB_STATUS_ABORT_FAILED;\r
+                               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
+                                          ("Scsi Error  %s (%#x)  Received for Function = %s(0x%x), "\r
+                                          "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
+                                          g_srb_scsi_status_name[response_status],\r
+                                          response_status,\r
+                                          g_srb_function_name[p_send_descriptor->p_srb->Function],\r
+                                          p_send_descriptor->p_srb->Function,\r
+                                          p_send_descriptor->p_srb->PathId,\r
+                                          p_send_descriptor->p_srb->TargetId,\r
+                                          p_send_descriptor->p_srb->Lun,\r
+                                          get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                       }\r
 \r
                        if ( get_srp_response_flags( p_srp_rsp ) != 0 )\r
                        {\r
@@ -299,7 +358,7 @@ __srp_process_recv_completion(
                                {\r
                                        resid = get_srp_response_data_in_residual_count( p_srp_rsp );\r
 \r
-                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DEBUG,\r
+                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
                                                ("DI Underflow in response: expected %d got %d.\n",\r
                                                p_send_descriptor->p_srb->DataTransferLength,\r
                                                p_send_descriptor->p_srb->DataTransferLength - resid) );\r
@@ -316,7 +375,7 @@ __srp_process_recv_completion(
                                {\r
                                        resid = get_srp_response_data_out_residual_count( p_srp_rsp );\r
 \r
-                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DEBUG,\r
+                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
                                                ("DI Underflow in response: expected %d got %d.\n",\r
                                                p_send_descriptor->p_srb->DataTransferLength,\r
                                                p_send_descriptor->p_srb->DataTransferLength - resid) );\r
@@ -338,7 +397,11 @@ __srp_process_recv_completion(
                                                           p_sense_data,\r
                                                           MIN( get_srp_response_sense_data_list_length( p_srp_rsp ),\r
                                                                        p_send_descriptor->p_srb->SenseInfoBufferLength ) );\r
-\r
+                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
+                                                       ("Sense Data  SENSE_KEY 0x%02x ADDITIONAL_SENSE_CODE"\r
+                                                       "0x%02x ADDITIONAL_SENSE_QUILIFIER 0x%02x.\n",\r
+                                                       p_sense_data[2],p_sense_data[12],p_sense_data[13]) );\r
+                                       \r
                                        if ( ((p_sense_data[2]&0xf) == 0x0b /*ABORTED_COMMAND*/) &&\r
                                                (p_sense_data[12] == 0x08) &&\r
                                                (p_sense_data[13] == 0x00) )\r
@@ -346,7 +409,7 @@ __srp_process_recv_completion(
                                        {\r
                                                /* probably a problem with the Vfx FC san like wire pull*/\r
                                                /* initiate session recovery */\r
-                                               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DEBUG,\r
+                                               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
                                                        ("Sense Data indicates FC link connectivity has been lost.\n") );\r
                                                StorPortPauseDevice( p_session->p_hba->p_ext,\r
                                                                                         p_send_descriptor->p_srb->PathId,\r
@@ -354,11 +417,12 @@ __srp_process_recv_completion(
                                                                                         p_send_descriptor->p_srb->Lun,\r
                                                                                         5 );\r
                                        }\r
+                                       \r
                                }\r
 \r
                                if ( get_srp_response_di_over( p_srp_rsp ) || get_srp_response_do_over( p_srp_rsp ) )\r
                                {\r
-                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DEBUG,\r
+                                       SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
                                                ("Overflow error in response.\n") );\r
                                        if ( p_send_descriptor->p_srb->SrbStatus == SRB_STATUS_SUCCESS )\r
                                        {\r
@@ -367,7 +431,7 @@ __srp_process_recv_completion(
                                }\r
                        }\r
 \r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                                ("DataBuffer = 0x%I64x.\n", MmGetPhysicalAddress(\r
                                p_send_descriptor->p_srb->DataBuffer ).QuadPart) );\r
 \r
@@ -382,37 +446,7 @@ __srp_process_recv_completion(
                        }\r
 \r
                        cl_atomic_add( &p_session->connection.request_limit, get_srp_response_request_limit_delta( p_srp_rsp ) );\r
-\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                          ("Srb Status = %s(0x%x)\n",\r
-                                          g_srb_status_name[p_send_descriptor->p_srb->SrbStatus],\r
-                                          p_send_descriptor->p_srb->SrbStatus) );\r
-\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                               ("Device Extension Address = %p\n",\r
-                               p_session->p_hba->p_ext) );\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                               ("Srb Address              = %p\n",\r
-                               p_send_descriptor->p_srb) );\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                               ("Srb DataBuffer Address   = %p\n",\r
-                               p_send_descriptor->p_srb->DataBuffer) );\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                               ("Srb DataTransferLength   = %d\n",\r
-                               p_send_descriptor->p_srb->DataTransferLength) );\r
-\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                                          ("Returning SrbStatus %s(0x%x) for "\r
-                                          "Function = %s(0x%x), Path = 0x%x, "\r
-                                          "Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
-                                          g_srb_status_name[p_send_descriptor->p_srb->SrbStatus],\r
-                                          p_send_descriptor->p_srb->SrbStatus,\r
-                                          g_srb_function_name[p_send_descriptor->p_srb->Function],\r
-                                          p_send_descriptor->p_srb->Function,\r
-                                          p_send_descriptor->p_srb->PathId,\r
-                                          p_send_descriptor->p_srb->TargetId,\r
-                                          p_send_descriptor->p_srb->Lun,\r
-                                          get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
+                       __srp_dump_srb_info( p_send_descriptor);\r
 \r
                        StorPortNotification( RequestComplete, p_session->p_hba->p_ext, p_send_descriptor->p_srb );\r
                        break;\r
@@ -427,7 +461,7 @@ __srp_process_recv_completion(
        }\r
 \r
 exit:\r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 \r
        return ( status );\r
 }\r
@@ -441,14 +475,14 @@ __srp_process_session_recv_completions(
        ib_wc_t         *p_wc_done_list;\r
        ib_wc_t         *p_wc;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_obj_lock( &p_session->obj );\r
 \r
        if ( p_session->connection.state != SRP_CONNECTED )\r
        {\r
                cl_obj_unlock( &p_session->obj );\r
-               SRP_EXIT( SRP_DBG_DEBUG );\r
+               SRP_EXIT( SRP_DBG_DATA );\r
                return;\r
        }\r
 \r
@@ -462,7 +496,7 @@ __srp_process_session_recv_completions(
                        ("ib_poll_cq() failed!, status 0x%x\n", status) );\r
 \r
                // TODO: Kill session and inform port driver link down scsiportnotification\r
-               SRP_EXIT( SRP_DBG_DEBUG );\r
+               SRP_EXIT( SRP_DBG_DATA );\r
                cl_obj_unlock( &p_session->obj );\r
                return;\r
        }\r
@@ -490,10 +524,20 @@ __srp_process_session_recv_completions(
                }\r
                else\r
                {\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_ERROR,\r
-                               ("Recv Completion Status %s Vendore Status = 0x%x, \n",\r
-                               p_session->p_hba->ifc.get_wc_status_str( p_wc->status ),\r
-                               (int)p_wc->vendor_specific) );\r
+                       if( p_wc->status != IB_WCS_WR_FLUSHED_ERR )\r
+                       {\r
+                               SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
+                                       ("Recv Completion with Error Status %s (vendore specific %#x)\n",\r
+                                       p_session->p_hba->ifc.get_wc_status_str( p_wc->status ),\r
+                                       (int)p_wc->vendor_specific) );\r
+                       }\r
+                       else\r
+                       {\r
+                               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DATA,\r
+                                       ("Recv Completion Flushed in Error Status: %s\n",\r
+                                       p_session->p_hba->ifc.get_wc_status_str( p_wc->status )));\r
+\r
+                       }\r
                }\r
 \r
                /* Put onto head of free list */\r
@@ -519,7 +563,7 @@ __srp_process_session_recv_completions(
 \r
        cl_obj_deref( &p_session->obj );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 /* srp_recv_completion_cb */\r
@@ -537,13 +581,13 @@ srp_recv_completion_cb(
 {\r
        srp_session_t   *p_session = (srp_session_t *)p_context;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        UNUSED_PARAM( h_cq );\r
 \r
        __srp_process_session_recv_completions( p_session );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 /* __srp_build_cmd */\r
@@ -573,9 +617,9 @@ __srp_build_cmd(
        ULONG                           scsi_direction = p_srb->SrbFlags & ( SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT );\r
        DATA_BUFFER_DESCRIPTOR_FORMAT   format = p_srp_conn_info->descriptor_format & DBDF_INDIRECT_DATA_BUFFER_DESCRIPTORS;\r
        ULONG                                                   length;\r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                           ("Sending I/O to Path = 0x%x, Target = 0x%x, Lun = 0x%x\n",\r
                           p_srb->PathId,\r
                           p_srb->TargetId,\r
@@ -594,15 +638,20 @@ __srp_build_cmd(
        p_cdb = get_srp_command_cdb( p_srp_cmd );\r
        cl_memcpy( p_cdb, p_srb->Cdb, p_srb->CdbLength );\r
 \r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("CDB Length = %d.\n", p_srb->CdbLength) );\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG, ("CDB = 0x") );\r
-       for ( i = 0; i < p_srb->CdbLength; i++ )\r
+#ifdef DBG\r
        {\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
-                       ("%0.2x", p_srb->Cdb[i]) );\r
+               char*   cmd;\r
+               cmd = cl_zalloc(p_srb->CdbLength +1);\r
+               for ( i = 0; i < p_srb->CdbLength; i++ )\r
+               {\r
+                       cmd[i] = p_srb->Cdb[i];\r
+               }\r
+               cmd[i] = '\0';\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA, ("CDB = 0x%s\n",cmd) );\r
        }\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG, ("\n.") );\r
+#endif\r
        \r
        if ( !format )\r
        {\r
@@ -682,18 +731,18 @@ __srp_build_cmd(
                                p_memory_descriptor->memory_handle   = p_srp_conn_info->rkey;\r
                                p_memory_descriptor->data_length     = cl_hton32( p_sg_element->Length );\r
 \r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                                        ("virtual_address[%d] = 0x%I64x.\n",\r
                                        i, cl_ntoh64(p_memory_descriptor->virtual_address) ) );\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                                        ("memory_handle[%d]   = 0x%x.\n",\r
                                        i, cl_ntoh32( p_memory_descriptor->memory_handle) ) );\r
-                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+                               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                                        ("data_length[%d]     = %d.\n",\r
                                        i, cl_ntoh32( p_memory_descriptor->data_length) ) );\r
                        }\r
                }\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                        ("scatter/gather count = %d.\n", scatter_gather_count));\r
        }\r
 \r
@@ -701,7 +750,7 @@ __srp_build_cmd(
 \r
        //set_srp_command_from_host_to_network( p_srp_cmd );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 /* srp_format_io_request */\r
@@ -722,15 +771,15 @@ srp_format_io_request(
        BOOLEAN         result = TRUE;\r
        srp_session_t   *p_srp_session;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("Device Extension Address = %p\n", p_dev_ext) );\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("Srb Address              = %p\n", p_srb) );\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("Srb DataBuffer Address   = %p\n", p_srb->DataBuffer) );\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("Srb DataTransferLength   = %d\n", p_srb->DataTransferLength) );\r
 \r
        cl_obj_lock( &p_hba->obj );\r
@@ -771,7 +820,7 @@ srp_format_io_request(
        }\r
 \r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
        return ( result );\r
 }\r
 \r
@@ -785,7 +834,7 @@ srp_post_io_request(
        srp_send_descriptor_t   *p_send_descriptor = (srp_send_descriptor_t *)p_srb->SrbExtension;\r
        srp_session_t           *p_srp_session;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_obj_lock( &p_hba->obj );\r
 \r
@@ -806,7 +855,7 @@ srp_post_io_request(
 \r
                        if ( p_srp_session->connection.request_limit < 3 )\r
                        {\r
-                               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DEBUG,\r
+                               SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_DATA,\r
                                        ("Calling StorPortBusy.\n") );\r
                                StorPortBusy( p_dev_ext, 1 );\r
                        }\r
@@ -837,7 +886,7 @@ srp_post_io_request(
        StorPortNotification( RequestComplete, p_dev_ext, p_srb );\r
 \r
 exit:\r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 void\r
@@ -853,7 +902,7 @@ srp_abort_command(
        srp_conn_info_t         srp_conn_info;\r
        srp_tsk_mgmt_t          *p_srp_tsk_mgmt;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_obj_lock( &p_hba->obj );\r
 \r
@@ -911,7 +960,7 @@ exit:
        cl_obj_unlock( &p_hba->obj );\r
        if ( p_srb->SrbStatus == SRB_STATUS_ABORT_FAILED )\r
        {\r
-               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DATA,\r
                                   ("Returning SrbStatus %s(0x%x) for Function = %s(0x%x), "\r
                                   "Path = 0x%x, Target = 0x%x, Lun = 0x%x\n",\r
                                   g_srb_status_name[p_srb->SrbStatus],\r
@@ -924,7 +973,7 @@ exit:
                StorPortNotification( RequestComplete, p_dev_ext, p_srb );\r
        }\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 void\r
@@ -936,7 +985,7 @@ srp_lun_reset(
        srp_hba_t               *p_hba = ((srp_ext_t *)p_dev_ext)->p_hba;\r
        srp_session_t           *p_srp_session;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_obj_lock( &p_hba->obj );\r
 \r
@@ -952,7 +1001,7 @@ srp_lun_reset(
 \r
                while ( (p_send_descriptor = srp_remove_lun_head_send_descriptor( &p_srp_session->descriptors, p_srb->Lun )) != NULL )\r
                {\r
-                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+                       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                                           ("Returning SrbStatus %s(0x%x) for Function = %s(0x%x), "\r
                                           "Path = 0x%x, Target = 0x%x, Lun = 0x%x, tag 0x%I64xn",\r
                                           g_srb_status_name[SRB_STATUS_BUS_RESET],\r
@@ -967,7 +1016,7 @@ srp_lun_reset(
 \r
                p_srb->SrbStatus = SRB_STATUS_SUCCESS;\r
 \r
-               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DATA,\r
                                   ("Returning SrbStatus %s(0x%x) for Function = %s(0x%x), "\r
                                   "Path = 0x%x, Target = 0x%x, Lun = 0x%x\n",\r
                                   g_srb_status_name[p_srb->SrbStatus],\r
@@ -988,7 +1037,7 @@ srp_lun_reset(
        {\r
                // Handle the error case here\r
                p_srb->SrbStatus = SRB_STATUS_INVALID_TARGET_ID;\r
-               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DATA,\r
                                   ("Returning SrbStatus %s(0x%x) for Function = %s(0x%x), "\r
                                   "Path = 0x%x, Target = 0x%x, Lun = 0x%x\n",\r
                                   g_srb_status_name[p_srb->SrbStatus],\r
@@ -1004,5 +1053,5 @@ srp_lun_reset(
 \r
        cl_obj_unlock( &p_hba->obj );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
index 5151a90..c4ba72c 100644 (file)
@@ -51,6 +51,7 @@ extern uint32_t               g_srp_dbg_flags;
        WPP_DEFINE_CONTROL_GUID(SRPCtlGuid,(5AF07B3C,D119,4233,9C81,C07EF481CBE6),  \\r
        WPP_DEFINE_BIT( SRP_DBG_ERROR) \\r
        WPP_DEFINE_BIT( SRP_DBG_PNP) \\r
+       WPP_DEFINE_BIT( SRP_DBG_DATA) \\r
        WPP_DEFINE_BIT( SRP_DBG_DEBUG))\r
 \r
 \r
@@ -82,6 +83,7 @@ extern uint32_t               g_srp_dbg_flags;
 \r
 #define SRP_DBG_ERR            (1 << 0)\r
 #define SRP_DBG_PNP            (1 << 1)\r
+#define SRP_DBG_DATA   (1 << 2)\r
 #define SRP_DBG_DEBUG  (1 << 3)\r
 \r
 #define SRP_DBG_ERROR  (CL_DBG_ERROR | SRP_DBG_ERR)\r
@@ -134,5 +136,6 @@ extern uint32_t             g_srp_dbg_flags;
 \r
 extern char         g_srb_function_name[][32];\r
 extern char         g_srb_status_name[][32];\r
+extern char         g_srb_scsi_status_name[][32];\r
 \r
 #endif  /* _SRP_DEBUG_H_ */\r
index 6d4432b..e10802a 100644 (file)
@@ -253,7 +253,7 @@ srp_add_send_descriptor(
        IN  srp_descriptors_t       *p_descriptors,\r
        IN  srp_send_descriptor_t   *p_descriptor )\r
 {\r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_spinlock_acquire ( &p_descriptors->sent_list_lock );\r
 \r
@@ -262,7 +262,7 @@ srp_add_send_descriptor(
 \r
        cl_spinlock_release ( &p_descriptors->sent_list_lock );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 /* srp_remove_send_descriptor */\r
@@ -280,7 +280,7 @@ srp_remove_send_descriptor(
        IN  srp_descriptors_t       *p_descriptors,\r
        IN  srp_send_descriptor_t   *p_descriptor )\r
 {\r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_spinlock_acquire ( &p_descriptors->sent_list_lock );\r
 \r
@@ -289,7 +289,7 @@ srp_remove_send_descriptor(
 \r
        cl_spinlock_release ( &p_descriptors->sent_list_lock );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
 \r
 /* srp_remove_lun_head_send_descriptor */\r
@@ -308,7 +308,7 @@ srp_remove_lun_head_send_descriptor(
 {\r
        srp_send_descriptor_t   *p_descriptor;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_spinlock_acquire ( &p_descriptors->sent_list_lock );\r
 \r
@@ -335,7 +335,7 @@ srp_remove_lun_head_send_descriptor(
 \r
        cl_spinlock_release ( &p_descriptors->sent_list_lock );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 \r
        return ( p_descriptor );\r
 }\r
@@ -361,23 +361,23 @@ srp_post_send_descriptor(
        srp_connection_t        *p_connection;\r
        ib_al_ifc_t                     *p_ifc;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        p_connection = &p_session->connection;\r
        p_ifc = &p_session->hca.p_hba->ifc;\r
 \r
        if ( p_connection->state == SRP_CONNECTED )\r
        {\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                        ("wr_id    = 0x%I64x.\n", p_descriptor->wr.wr_id) );\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                        ("wr_type  = 0x%x.\n", p_descriptor->wr.wr_type) );\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                        ("send_opt = 0x%x.\n", p_descriptor->wr.send_opt) );\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                        ("num_ds   = 0x%x.\n", p_descriptor->wr.num_ds) );\r
 \r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                                   ("Posting  I/O for Function = %s(0x%x), Path = 0x%x, "\r
                                   "Target = 0x%x, Lun = 0x%x, tag 0x%I64x\n",\r
                                   g_srb_function_name[p_descriptor->p_srb->Function],\r
@@ -419,7 +419,7 @@ srp_post_send_descriptor(
                        ("Attempting to post to an unconnected session.\n") );\r
        }\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 \r
        return ( status );\r
 }\r
@@ -442,19 +442,19 @@ srp_find_matching_send_descriptor(
 {\r
        srp_send_descriptor_t   *p_send_descriptor;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_spinlock_acquire( &p_descriptors->sent_list_lock );\r
 \r
        p_send_descriptor = (srp_send_descriptor_t *)cl_qlist_head( &p_descriptors->sent_descriptors );\r
        CL_ASSERT( &p_descriptors->sent_descriptors == p_send_descriptor->list_item.p_list );\r
 \r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("rsp tag = 0x%I64x.\n", tag) );\r
 \r
        while ( p_send_descriptor != (srp_send_descriptor_t *)cl_qlist_end( &p_descriptors->sent_descriptors ) )\r
        {\r
-               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG, ("cmd tag = 0x%I64x.\n",\r
+               SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA, ("cmd tag = 0x%I64x.\n",\r
                        get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
 \r
                if ( get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment ) == tag )\r
@@ -473,7 +473,7 @@ srp_find_matching_send_descriptor(
 exit:\r
        cl_spinlock_release( &p_descriptors->sent_list_lock );\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 \r
        return ( p_send_descriptor );\r
 }\r
@@ -498,7 +498,7 @@ srp_build_send_descriptor(
        STOR_PHYSICAL_ADDRESS   physical_address;\r
        ULONG                   length;\r
 \r
-       SRP_ENTER( SRP_DBG_DEBUG );\r
+       SRP_ENTER( SRP_DBG_DATA );\r
 \r
        cl_memclr( p_send_descriptor, (sizeof ( srp_send_descriptor_t ) - SRP_MAX_IU_SIZE) );\r
 \r
@@ -515,16 +515,16 @@ srp_build_send_descriptor(
        p_send_descriptor->ds[0].length =  p_srp_conn_info->init_to_targ_iu_sz;\r
        p_send_descriptor->ds[0].lkey =   p_srp_conn_info->lkey;\r
 \r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("hca vaddr        = 0x%I64x.\n", p_srp_conn_info->vaddr));\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("physical_address = 0x%I64x.\n", physical_address.QuadPart));\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("IU  vaddr        = 0x%I64x.\n", p_send_descriptor->ds[0].vaddr));\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("length           = %d.\n",          p_send_descriptor->ds[0].length));\r
-       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
+       SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DATA,\r
                ("lkey             = 0x%x.\n",        p_send_descriptor->ds[0].lkey));\r
 \r
-       SRP_EXIT( SRP_DBG_DEBUG );\r
+       SRP_EXIT( SRP_DBG_DATA );\r
 }\r
index 8103867..976ff1d 100644 (file)
@@ -138,6 +138,50 @@ char g_srb_status_name[][32] =
        "LINK_DOWN"               // 0x25\r
 };\r
 \r
+char g_srb_scsi_status_name[][32] =\r
+{\r
+       "SCSISTAT_GOOD",                                //0x00\r
+       "",                                                             //0x01\r
+       " SCSISTAT_CHECK_CONDITION",    //0x02\r
+       "",                                                             //0x03\r
+       " SCSISTAT_CONDITION_MET",              //0x04\r
+       "",                                                             //0x05\r
+       "",                                                             //0x06\r
+       "",                                                             //0x07\r
+       " SCSISTAT_BUSY",                               //0x08\r
+       "",                                                             //0x09\r
+       "",                                                             //0x0A\r
+       "",                                                             //0x0B\r
+       "",                                                             //0x0C\r
+       "",                                                             //0x0D\r
+       "",                                                             //0x0E\r
+       "",                                                             //0x0F\r
+       " SCSISTAT_INTERMEDIATE",               //0x10\r
+       "",                                                             //0x11\r
+       "",                                                             //0x12\r
+       "",                                                             //0x13\r
+       " SCSISTAT_INTERMEDIATE_COND_MET", //0x14\r
+       "",                                                             //0x15\r
+       "",                                                             //0x16\r
+       "",                                                             //0x17\r
+       " SCSISTAT_RESERVATION_CONFLICT",  //0x18\r
+       "",                                                             //0x19\r
+       "",                                                             // 0x1A\r
+       "",                                                             // 0x1B\r
+       "",                                                             // 0x1C\r
+       "",                                                             // 0x1D\r
+       "",                                                             // 0x1E\r
+       "",                                                             // 0x1F\r
+       "",                                                             //0x20\r
+       "",                                                             //0x21\r
+       " SCSISTAT_COMMAND_TERMINATED",    //0x22\r
+       "",                                                             //0x23\r
+       "",                                                             //0x24\r
+       "",                                                             //0x25\r
+       "",                                                             //0x26\r
+       "",                                                             //0x27\r
+       " SCSISTAT_QUEUE_FULL",                 //0x28\r
+};\r
 \r
 DRIVER_OBJECT       *gp_drv_obj;\r
 cl_obj_t            g_drv_obj;\r