|
@@ -775,6 +775,8 @@ static int ap_device_probe(struct device *dev)
|
|
|
drvres = ap_drv->flags & AP_DRIVER_FLAG_DEFAULT;
|
|
|
if (!!devres != !!drvres)
|
|
|
return -ENODEV;
|
|
|
+ /* (re-)init queue's state machine */
|
|
|
+ ap_queue_reinit_state(to_ap_queue(dev));
|
|
|
}
|
|
|
|
|
|
/* Add queue/card to list of active queues/cards */
|
|
@@ -807,6 +809,8 @@ static int ap_device_remove(struct device *dev)
|
|
|
struct ap_device *ap_dev = to_ap_dev(dev);
|
|
|
struct ap_driver *ap_drv = ap_dev->drv;
|
|
|
|
|
|
+ if (is_queue_dev(dev))
|
|
|
+ ap_queue_remove(to_ap_queue(dev));
|
|
|
if (ap_drv->remove)
|
|
|
ap_drv->remove(ap_dev);
|
|
|
|
|
@@ -1444,10 +1448,6 @@ static void ap_scan_bus(struct work_struct *unused)
|
|
|
aq->ap_dev.device.parent = &ac->ap_dev.device;
|
|
|
dev_set_name(&aq->ap_dev.device,
|
|
|
"%02x.%04x", id, dom);
|
|
|
- /* Start with a device reset */
|
|
|
- spin_lock_bh(&aq->lock);
|
|
|
- ap_wait(ap_sm_event(aq, AP_EVENT_POLL));
|
|
|
- spin_unlock_bh(&aq->lock);
|
|
|
/* Register device */
|
|
|
rc = device_register(&aq->ap_dev.device);
|
|
|
if (rc) {
|