diff options
author | Christoph Hellwig <hch@lst.de> | 2006-01-13 19:04:00 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-14 10:55:05 -0600 |
commit | e02f3f59225d8c3b2a0ad0dc941a09865e27da61 (patch) | |
tree | 37d2931f5d24dc063d9606ec6b5e8db359b439c7 /drivers/scsi/scsi_proc.c | |
parent | 6d5b0c315e0c14f8a0fe274eda7676d62cbd8584 (diff) | |
download | op-kernel-dev-e02f3f59225d8c3b2a0ad0dc941a09865e27da61.zip op-kernel-dev-e02f3f59225d8c3b2a0ad0dc941a09865e27da61.tar.gz |
[SCSI] remove target parent limitiation
When James Smart fixed the issue of the userspace scan atributes
crashing the system with the FC transport class he added a patch to
let the transport class check if the parent is valid for a given
transport class.
When adding support for the integrated raid of fusion sas devices
we ran into a problem with that, as it didn't allow adding virtual
raid volumes without the transport class knowing about it.
So this patch adds a user_scan attribute instead, that takes over from
scsi_scan_host_selected if the transport class sets it and thus lets
the transport class control the user-initiated scanning. As this
plugs the hole about user-initiated scanning the target_parent hook
goes away and we rely on callers of the scanning routines to do
something sensible.
For SAS this meant I had to switch from a spinlock to a mutex to
synchronize the topology linked lists, in FC they were completely
unsynchronized which seems wrong.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_proc.c')
-rw-r--r-- | drivers/scsi/scsi_proc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 1b5711e..07be62b 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -31,6 +31,7 @@ #include <scsi/scsi.h> #include <scsi/scsi_device.h> #include <scsi/scsi_host.h> +#include <scsi/scsi_transport.h> #include "scsi_priv.h" #include "scsi_logging.h" @@ -200,7 +201,10 @@ static int scsi_add_single_device(uint host, uint channel, uint id, uint lun) if (IS_ERR(shost)) return PTR_ERR(shost); - error = scsi_scan_host_selected(shost, channel, id, lun, 1); + if (shost->transportt->user_scan) + error = shost->transportt->user_scan(shost, channel, id, lun); + else + error = scsi_scan_host_selected(shost, channel, id, lun, 1); scsi_host_put(shost); return error; } |