[ofw] RE: Patch for PR 1029 (BSOD when ib_srpt unloaded)

Eleanor Witiak eleanor.witiak at qlogic.com
Wed May 28 12:03:30 PDT 2008


No we don't need to call DREP here.  The cep will be destroyed when the
qp is destroyed.

 

Eleanor

 

________________________________

From: Fab Tillier [mailto:ftillier at windows.microsoft.com] 
Sent: Wednesday, May 28, 2008 11:31 AM
To: Eleanor Witiak; ofw at lists.openfabrics.org; Leonid Keller
Subject: RE: Patch for PR 1029 (BSOD when ib_srpt unloaded)

 

So you don't need to call DREP?  Or is there a call somewhere that isn't
reflected in the patch?

 

-Fab

 

From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Eleanor Witiak
Sent: Wednesday, May 28, 2008 7:01 AM
To: ofw at lists.openfabrics.org; Leonid Keller
Subject: [ofw] Patch for PR 1029 (BSOD when ib_srpt unloaded)

 

Details of the PR is found in:
https://bugs.openfabrics.org/show_bug.cgi?id=1029

 

Leonid:  Please review and if everyone is okay with it, please commit to
svn.  Thanks!

 

The patch is as follows:

 

Index: srp_connection.c

===================================================================

--- srp_connection.c       (revision 1198)

+++ srp_connection.c    (working copy)

@@ -288,24 +288,25 @@

 {

            srp_session_t   *p_srp_session = (srp_session_t*
__ptr64)p_cm_dreq_rec->qp_context;

            srp_hba_t       *p_hba = p_srp_session->p_hba;

-           ib_cm_drep_t    cm_drep;

-           ib_api_status_t status;

 

            SRP_ENTER( SRP_DBG_PNP );

-

+                                  

            cl_obj_lock( &p_srp_session->obj );

-           p_srp_session->connection.state = SRP_CONNECT_FAILURE;

-           cl_obj_unlock( &p_srp_session->obj );

-

-           cm_drep.p_drep_pdata = NULL;

-           cm_drep.drep_length = 0;

-

-           status = p_hba->ifc.cm_drep( p_cm_dreq_rec->h_cm_dreq,
&cm_drep );

-           if ( status != IB_SUCCESS )

+          if (p_srp_session->connection.state == SRP_CONNECTED)

            {

-                       SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,

-                                   ("Cannot respond to target
disconnect request. Status = %d\n", status) );

+                      SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_PNP,

+                                  ("**** SRP_CONNECTED =>
SRP_CONNECT_FAILURE. \n") );

+                      p_srp_session->connection.state =
SRP_CONNECT_FAILURE;

+                      cl_obj_unlock( &p_srp_session->obj );

            }

+          else  // since the connection is no longer there, just exit

+          {

+                      cl_obj_unlock( &p_srp_session->obj );

+                      SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_PNP,

+                                  ("**** NOT SRP_CONNECTED *****.
connection state = %d\n", p_srp_session->connection.state) );

+                      SRP_EXIT( SRP_DBG_PNP );

+                      return;  

+          }

 

            SRP_PRINT( TRACE_LEVEL_WARNING, SRP_DBG_PNP,

                        ("Target has issued a disconnect request for
Session %d ref_cnt = %d.\n",

Index: srp_session.c

===================================================================

--- srp_session.c            (revision 1198)

+++ srp_session.c         (working copy)

@@ -57,8 +57,15 @@

            SRP_ENTER( SRP_DBG_SESSION );

 

            p_srp_session = PARENT_STRUCT( p_obj, srp_session_t, obj );

-

+          

+          cl_obj_lock( &p_srp_session->obj );

+          if( p_srp_session->connection.state != SRP_CONNECT_FAILURE )

+          {

+                      cl_obj_unlock( &p_srp_session->obj );

+                      return;

+          }

            p_srp_session->connection.state = SRP_CONNECTION_CLOSING;

+          cl_obj_unlock( &p_srp_session->obj );

 

            SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,

                        ("Session Object ref_cnt = %d\n",
p_srp_session->obj.ref_cnt) );

 

________________________

Eleanor Witiak

QLogic Corporation

Host Software Group

780 Fifth Avenue, Suite 140

King of Prussia, PA 19406

Direct:      610-233-4831

Fax:         610-233-4777

eleanor.witiak at qlogic.com

       

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080528/c4952412/attachment.html>


More information about the ofw mailing list