-/*
- * Handles the state change pending interrupt.
- */
-static void
-do_state_change_pending(void *data)
-{
- struct {
- struct work_struct work;
- struct dasd_device *device;
- } *p;
- struct dasd_device *device;
- struct dasd_ccw_req *cqr;
- struct list_head *l, *n;
- unsigned long flags;
-
- p = data;
- device = p->device;
- DBF_EVENT(DBF_NOTICE, "State change Interrupt for bus_id %s",
- device->cdev->dev.bus_id);
- device->stopped &= ~DASD_STOPPED_PENDING;
-
- /* restart all 'running' IO on queue */
- spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
- list_for_each_safe(l, n, &device->ccw_queue) {
- cqr = list_entry(l, struct dasd_ccw_req, list);
- if (cqr->status == DASD_CQR_IN_IO)
- cqr->status = DASD_CQR_QUEUED;
- }
- spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags);
- dasd_set_timer (device, 0);
- dasd_schedule_bh(device);
- dasd_put_device(device);
- kfree(p);
-}
-