[IBBUS] workaround for some problems with WHQL PnP test over IPoIB. [mlnx: 3535]
[mirror/winof/.git] / core / bus / kernel / bus_pnp.c
index c5cb437..e6b3875 100644 (file)
@@ -1174,7 +1174,20 @@ bus_get_relations(
                p_pdo_ext = PARENT_STRUCT( p_list_item, bus_pdo_ext_t, list_item );\r
 \r
                if( !p_pdo_ext->b_present )\r
+               {\r
+                       // mark it missing to be removed in port_remove\r
+                       p_pdo_ext->b_reported_missing = TRUE;\r
+                       /*\r
+                        * We don't report a PDO that is no longer present.  This is how\r
+                        * the PDO will get cleaned up.\r
+                        */\r
+                       BUS_TRACE( BUS_DBG_PNP, ("Don't report PDO! %s: PDO %p, ext %p, "\r
+                               "present %d, missing %d .\n",\r
+                               p_pdo_ext->cl_ext.vfptr_pnp_po->identity,\r
+                               p_pdo_ext->cl_ext.p_self_do, p_pdo_ext, p_pdo_ext->b_present,\r
+                               p_pdo_ext->b_reported_missing ) );\r
                        continue;\r
+               }\r
                \r
                if( ca_guid && p_pdo_ext->ca_guid != ca_guid )\r
                        continue;\r
@@ -1208,19 +1221,7 @@ bus_get_relations(
                p_pdo_ext = PARENT_STRUCT( p_list_item, bus_pdo_ext_t, list_item );\r
 \r
                if( !p_pdo_ext->b_present )\r
-               {\r
-                       /*\r
-                        * We don't report a PDO that is no longer present.  This is how\r
-                        * the PDO will get cleaned up.\r
-                        */\r
-                       p_pdo_ext->b_reported_missing = TRUE;\r
-                       BUS_TRACE( BUS_DBG_PNP, ("Don't report PDO! %s: PDO %p, ext %p, "\r
-                               "present %d, missing %d .\n",\r
-                               p_pdo_ext->cl_ext.vfptr_pnp_po->identity,\r
-                               p_pdo_ext->cl_ext.p_self_do, p_pdo_ext, p_pdo_ext->b_present,\r
-                               p_pdo_ext->b_reported_missing ) );\r
                        continue;\r
-               }\r
 \r
                if( ca_guid && p_pdo_ext->ca_guid != ca_guid )\r
                        continue;\r