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:
Warner Losh 2008-12-31 07:41:42 +00:00
parent 599e167f48
commit a84736bdf6

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)