diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-29 17:15:22 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-11-03 22:23:02 -0400 |
commit | a341cd0f6a0fde1f85fec9aa8f81f824ea4a3f92 (patch) | |
tree | e96b2ab04c94cb1a29d972b135dd6b2bdfac0f78 /drivers/scsi/scsi_scan.c | |
parent | b4f555081fdd27d13e6ff39d455d5aefae9d2c0c (diff) |
SCSI: add asynchronous event notification API
Originally based on a patch by Kristen Carlson Accardi @ Intel.
Copious input from James Bottomley.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index b53c5f67e372..40ea71cd2ca6 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -236,6 +236,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, | |||
236 | struct scsi_device *sdev; | 236 | struct scsi_device *sdev; |
237 | int display_failure_msg = 1, ret; | 237 | int display_failure_msg = 1, ret; |
238 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 238 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); |
239 | extern void scsi_evt_thread(struct work_struct *work); | ||
239 | 240 | ||
240 | sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size, | 241 | sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size, |
241 | GFP_ATOMIC); | 242 | GFP_ATOMIC); |
@@ -254,7 +255,9 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, | |||
254 | INIT_LIST_HEAD(&sdev->same_target_siblings); | 255 | INIT_LIST_HEAD(&sdev->same_target_siblings); |
255 | INIT_LIST_HEAD(&sdev->cmd_list); | 256 | INIT_LIST_HEAD(&sdev->cmd_list); |
256 | INIT_LIST_HEAD(&sdev->starved_entry); | 257 | INIT_LIST_HEAD(&sdev->starved_entry); |
258 | INIT_LIST_HEAD(&sdev->event_list); | ||
257 | spin_lock_init(&sdev->list_lock); | 259 | spin_lock_init(&sdev->list_lock); |
260 | INIT_WORK(&sdev->event_work, scsi_evt_thread); | ||
258 | 261 | ||
259 | sdev->sdev_gendev.parent = get_device(&starget->dev); | 262 | sdev->sdev_gendev.parent = get_device(&starget->dev); |
260 | sdev->sdev_target = starget; | 263 | sdev->sdev_target = starget; |