|
@@ -43,6 +43,7 @@
|
|
|
#include <scsi/scsi_devinfo.h>
|
|
#include <scsi/scsi_devinfo.h>
|
|
|
#include <scsi/scsi_host.h>
|
|
#include <scsi/scsi_host.h>
|
|
|
#include <scsi/scsi_transport.h>
|
|
#include <scsi/scsi_transport.h>
|
|
|
|
|
+#include <scsi/scsi_dh.h>
|
|
|
#include <scsi/scsi_eh.h>
|
|
#include <scsi/scsi_eh.h>
|
|
|
|
|
|
|
|
#include "scsi_priv.h"
|
|
#include "scsi_priv.h"
|
|
@@ -1524,9 +1525,14 @@ EXPORT_SYMBOL(scsi_add_device);
|
|
|
|
|
|
|
|
void scsi_rescan_device(struct device *dev)
|
|
void scsi_rescan_device(struct device *dev)
|
|
|
{
|
|
{
|
|
|
|
|
+ struct scsi_device *sdev = to_scsi_device(dev);
|
|
|
|
|
+
|
|
|
device_lock(dev);
|
|
device_lock(dev);
|
|
|
|
|
|
|
|
- scsi_attach_vpd(to_scsi_device(dev));
|
|
|
|
|
|
|
+ scsi_attach_vpd(sdev);
|
|
|
|
|
+
|
|
|
|
|
+ if (sdev->handler && sdev->handler->rescan)
|
|
|
|
|
+ sdev->handler->rescan(sdev);
|
|
|
|
|
|
|
|
if (dev->driver && try_module_get(dev->driver->owner)) {
|
|
if (dev->driver && try_module_get(dev->driver->owner)) {
|
|
|
struct scsi_driver *drv = to_scsi_driver(dev->driver);
|
|
struct scsi_driver *drv = to_scsi_driver(dev->driver);
|