When no driver attaches to a card, don't power down the card. We can

now read config registers of cardbus cards that are inserted, but
aren't attached to a driver.
Also, add a power related comment...
This commit is contained in:
imp 2008-12-31 07:41:42 +00:00
parent 9e74a27aaf
commit c625343c9a

View File

@ -207,7 +207,7 @@ cardbus_attach_card(device_t cbdev)
}
if (cardattached > 0)
return (0);
POWER_DISABLE_SOCKET(brdev, cbdev);
/* POWER_DISABLE_SOCKET(brdev, cbdev); */
return (ENOENT);
}
@ -269,6 +269,7 @@ cardbus_driver_added(device_t cbdev, driver_t *driver)
}
if (i > 0 && i == numdevs)
POWER_ENABLE_SOCKET(device_get_parent(cbdev), cbdev);
/* XXX Should I wait for power to become good? */
for (i = 0; i < numdevs; i++) {
dev = devlist[i];
if (device_get_state(dev) != DS_NOTPRESENT)