1308{
1314
1316
1317 IsaPnpAcquireBusDataLock();
1318
1319
1320 if (!ReadPortCreated)
1321 {
1325
1326 ReadPortCreated =
TRUE;
1327 }
1328
1329 IsaPnpReleaseBusDataLock();
1330
1331
1332 if (!FdoExt->ReadPortPdo)
1333 IncludeDataPort =
FALSE;
1334
1335 IsaPnpAcquireDeviceDataLock(FdoExt);
1336
1337
1338 if (IncludeDataPort && FdoExt->ReadPortPdo)
1339 {
1341
1344 {
1345 DPRINT(
"Rescan ISA PnP bus\n");
1346
1347
1349
1350
1351 if (FdoExt->Cards > 0)
1352 (
VOID)IsaHwFillDeviceList(FdoExt);
1353
1354 IsaHwWaitForKey();
1355 }
1356
1357 ReadPortExt->
Flags &= ~ISAPNP_SCANNED_BY_READ_PORT;
1358 }
1359
1360 PdoCount = FdoExt->DeviceCount;
1361 if (IncludeDataPort)
1362 ++PdoCount;
1363
1364 CurrentEntry = FdoExt->DeviceListHead.
Flink;
1365 while (CurrentEntry != &FdoExt->DeviceListHead)
1366 {
1368
1370 --PdoCount;
1371
1372 CurrentEntry = CurrentEntry->
Flink;
1373 }
1374
1378 if (!DeviceRelations)
1379 {
1380 IsaPnpReleaseDeviceDataLock(FdoExt);
1382 }
1383
1384 if (IncludeDataPort)
1385 {
1387
1388 DeviceRelations->
Objects[
i++] = FdoExt->ReadPortPdo;
1390
1391
1393 }
1394
1395 CurrentEntry = FdoExt->DeviceListHead.
Flink;
1396 while (CurrentEntry != &FdoExt->DeviceListHead)
1397 {
1399
1401
1403 goto SkipPdo;
1404
1405 if (!IsaDevice->
Pdo)
1406 {
1415 goto SkipPdo;
1416
1417 IsaDevice->
Pdo->
Flags &= ~DO_DEVICE_INITIALIZING;
1418
1419
1421
1426 PdoExt->IsaPnpDevice = IsaDevice;
1428
1431 {
1432 if (
PdoExt->RequirementsList)
1433 {
1436 }
1437
1438 if (
PdoExt->ResourceList)
1439 {
1442 }
1443
1446 goto SkipPdo;
1447 }
1448 }
1449 else
1450 {
1452 }
1455
1457
1458 CurrentEntry = CurrentEntry->
Flink;
1459 continue;
1460
1461SkipPdo:
1463 {
1465
1467 PdoExt->Flags &= ~ISAPNP_ENUMERATED;
1468 }
1469
1470 CurrentEntry = CurrentEntry->
Flink;
1471 }
1472
1473 IsaPnpReleaseDeviceDataLock(FdoExt);
1474
1475 DeviceRelations->
Count =
i;
1476
1477 Irp->IoStatus.Information = (
ULONG_PTR)DeviceRelations;
1478
1480}
UCHAR IsaHwTryReadDataPort(_In_ PUCHAR ReadDataPort)
#define ExAllocatePoolWithTag(hernya, size, tag)
static NTSTATUS IsaPnpCreateLogicalDeviceRequirements(_In_ PISAPNP_PDO_EXTENSION PdoExt)
static NTSTATUS IsaPnpCreateLogicalDeviceResources(_In_ PISAPNP_PDO_EXTENSION PdoExt)
static NTSTATUS IsaPnpCreateReadPortDO(_In_ PISAPNP_FDO_EXTENSION FdoExt)
#define ISAPNP_READ_PORT_ALLOW_FDO_SCAN
Allows the active FDO to scan the bus.
#define ISAPNP_PRESENT
Cleared when the device is physically removed.
#define ISAPNP_SCANNED_BY_READ_PORT
The bus has been scanned by Read Port PDO.
#define ISAPNP_ENUMERATED
Whether the device has been reported to the PnP manager.
PDEVICE_OBJECT Objects[1]
struct _LIST_ENTRY * Flink
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
#define ObReferenceObject