]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[ibbus]This patch prevents BSOD caused by WHQL reliability tests
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 12 Oct 2008 07:52:32 +0000 (07:52 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 12 Oct 2008 07:52:32 +0000 (07:52 +0000)
signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
                    Tzachi Dar (tzachid at mellanox.co.il)

git-svn-id: svn://openib.tc.cornell.edu/gen1@1646 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WOF2-0/trunk/core/bus/kernel/bus_iou_mgr.c
branches/WOF2-0/trunk/core/bus/kernel/bus_port_mgr.c
branches/WOF2-0/trunk/hw/mlx4/kernel/hca/drv.c

index 5811dec83fec1f74ced981fb08d0bc3b42d45235..de51e1d149a68a3830f6b0e155acb0d9aa9e3a29 100644 (file)
@@ -1583,6 +1583,7 @@ iou_query_interface(
                p_ext = p_dev_obj->DeviceExtension;\r
                if( !p_ext->h_ca ||\r
                        !p_ext->b_present ||\r
+                       !p_ext->h_ca->obj.p_ci_ca->verbs.p_hca_dev ||\r
                        p_ext->b_reported_missing )\r
                {\r
                        return STATUS_NO_SUCH_DEVICE;\r
index 11cf6aee355e521eb8203cfb98879bf8bfbdbd0a..337a782135d853a6040c9a3b20777171bdab0742 100644 (file)
@@ -1197,7 +1197,6 @@ port_mgr_port_remove(
         */\r
        p_ext = p_ctx->p_pdo_ext;\r
        CL_ASSERT( p_ext );\r
-       CL_ASSERT(p_bfi == p_ext->p_parent_ext->bus_filter);\r
 \r
        /*\r
         * Flag the port PDO as no longer being present.  We have to wait until\r
@@ -1211,7 +1210,8 @@ port_mgr_port_remove(
                                                ("%s NULL h_ca? p_ext %p\n", p_bfi->whoami, p_ext ) );\r
                return;\r
        }\r
-\r
+       CL_ASSERT(p_bfi == p_ext->p_parent_ext->bus_filter);\r
+       \r
        cl_mutex_acquire( &gp_port_mgr->pdo_mutex );\r
        CL_ASSERT( p_ext->h_ca );\r
 \r
@@ -1837,7 +1837,10 @@ port_query_ipoib_ifc(
        CL_ASSERT( KeGetCurrentIrql() < DISPATCH_LEVEL );\r
 \r
        p_ext = p_dev_obj->DeviceExtension;\r
-\r
+       if      (p_ext->pdo.b_hibernating) {\r
+               // Can't continue within hibernation stage\r
+               return STATUS_UNSUCCESSFUL;\r
+       }\r
        BUS_TRACE( BUS_DBG_PNP, ("Query i/f for %s: PDO %p (=%p),ext %p, present %d, missing %d .\n",\r
                p_ext->pdo.cl_ext.vfptr_pnp_po->identity, p_ext->pdo.cl_ext.p_self_do, \r
                p_dev_obj, p_ext, p_ext->pdo.b_present, p_ext->pdo.b_reported_missing ) );\r
@@ -1939,6 +1942,7 @@ port_query_interface(
                p_ext = p_dev_obj->DeviceExtension;\r
                if( !p_ext->h_ca ||\r
                        !p_ext->b_present ||\r
+                       !p_ext->h_ca->obj.p_ci_ca->verbs.p_hca_dev ||\r
                        p_ext->b_reported_missing )\r
                {\r
                        return STATUS_NO_SUCH_DEVICE;\r
index 485576bada2499b6b30238455d30042d93653a71..7e6cba435cffbc39ac5e961f7dcc4aaa7112fe84 100644 (file)
@@ -295,6 +295,7 @@ __alloc_hca_ifc(
        setup_ci_interface( p_fdo->hca.guid, !!hca_is_livefish(p_fdo), pIfc );\r
 \r
        pIfc->p_hca_dev = WdfDeviceWdmGetPhysicalDevice(p_fdo->FdoDevice);\r
+       ASSERT(pIfc->p_hca_dev);\r
        pIfc->vend_id = (uint32_t)p_fdo->bus_ib_ifc.pdev->ven_id;\r
        pIfc->dev_id = (uint16_t)p_fdo->bus_ib_ifc.pdev->dev_id;\r
        pIfc->dev_revision = (uint16_t)p_fdo->hca.hw_ver;\r
@@ -1443,6 +1444,7 @@ __alloc_hca_ifc(
        setup_ci_interface( p_fdo->hca.guid, !!hca_is_livefish(p_fdo), pIfc );\r
 \r
        pIfc->p_hca_dev = p_fdo->cl_ext.p_pdo;\r
+       ASSERT(pIfc->p_hca_dev);    \r
        pIfc->vend_id = (uint32_t)p_fdo->bus_ib_ifc.pdev->ven_id;\r
        pIfc->dev_id = (uint16_t)p_fdo->bus_ib_ifc.pdev->dev_id;\r
        pIfc->dev_revision = (uint16_t)p_fdo->hca.hw_ver;\r
@@ -2111,6 +2113,7 @@ __query_ci_ifc(
        p_ifc->InterfaceHeader.InterfaceDereference = __hca_noop;\r
        p_ifc->Verbs = *p_hca_ifc;\r
        p_ifc->Verbs.p_hca_dev = &p_fdo->hca;\r
+       ASSERT(p_ifc->Verbs.p_hca_dev);    \r
 \r
        ExFreePool( p_hca_ifc );\r
        status = STATUS_SUCCESS;\r