Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143827
b: refs/heads/master
c: d4d5291
h: refs/heads/master
i:
  143825: 5c1f12a
  143823: cf5f7df
v: v3
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Apr 22, 2009
1 parent 88a4a6c commit 61d4dcf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 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: 5dd559f020c98a2a4b3e063f09c0e4bc771ed838
refs/heads/master: d4d5291c8cd499b1b590336059d5cc3e24c1ced6
1 change: 1 addition & 0 deletions trunk/drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ void wait_for_device_probe(void)
wait_event(probe_waitqueue, atomic_read(&probe_count) == 0);
async_synchronize_full();
}
EXPORT_SYMBOL_GPL(wait_for_device_probe);

/**
* driver_probe_device - attempt to bind device & driver together
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ int scsi_complete_async_scans(void)
spin_unlock(&async_scan_lock);

kfree(data);
/* Synchronize async operations globally */
async_synchronize_full();
return 0;
}

Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/scsi/scsi_wait_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@
*/

#include <linux/module.h>
#include <linux/device.h>
#include <scsi/scsi_scan.h>

static int __init wait_scan_init(void)
{
/*
* First we need to wait for device probing to finish;
* the drivers we just loaded might just still be probing
* and might not yet have reached the scsi async scanning
*/
wait_for_device_probe();
/*
* and then we wait for the actual asynchronous scsi scan
* to finish.
*/
scsi_complete_async_scans();
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ extern int (*platform_notify_remove)(struct device *dev);
extern struct device *get_device(struct device *dev);
extern void put_device(struct device *dev);

extern void wait_for_device_probe(void);

/* drivers/base/power/shutdown.c */
extern void device_shutdown(void);
Expand Down

0 comments on commit 61d4dcf

Please sign in to comment.