Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121390
b: refs/heads/master
c: 5fb6b85
h: refs/heads/master
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Dec 25, 2008
1 parent a1c4cb3 commit 2fa6a4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6eff208f479d6fe99fd92c0e6bf7e930bb45cd30
refs/heads/master: 5fb6b8544d9ccd2ed478af777f9e99e342eb8886
18 changes: 12 additions & 6 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,14 @@ io_subchannel_register(struct work_struct *work)
priv = container_of(work, struct ccw_device_private, kick_work);
cdev = priv->cdev;
sch = to_subchannel(cdev->dev.parent);
/*
* Check if subchannel is still registered. It may have become
* unregistered if a machine check hit us after finishing
* device recognition but before the register work could be
* queued.
*/
if (!device_is_registered(&sch->dev))
goto out_err;
css_update_ssd_info(sch);
/*
* io_subchannel_register() will also be called after device
Expand Down Expand Up @@ -984,18 +992,16 @@ io_subchannel_register(struct work_struct *work)
spin_lock_irqsave(sch->lock, flags);
sch_set_cdev(sch, NULL);
spin_unlock_irqrestore(sch->lock, flags);
/* Release reference for workqueue processing. */
put_device(&cdev->dev);
/* Release initial device reference. */
put_device(&cdev->dev);
if (atomic_dec_and_test(&ccw_device_init_count))
wake_up(&ccw_device_init_wq);
return;
goto out_err;
}
put_device(&cdev->dev);
out:
cdev->private->flags.recog_done = 1;
wake_up(&cdev->private->wait_q);
out_err:
/* Release reference for workqueue processing. */
put_device(&cdev->dev);
if (atomic_dec_and_test(&ccw_device_init_count))
wake_up(&ccw_device_init_wq);
}
Expand Down

0 comments on commit 2fa6a4f

Please sign in to comment.