aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_transport.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-13 13:04:00 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 11:55:05 -0500
commite02f3f59225d8c3b2a0ad0dc941a09865e27da61 (patch)
tree37d2931f5d24dc063d9606ec6b5e8db359b439c7 /include/scsi/scsi_transport.h
parent6d5b0c315e0c14f8a0fe274eda7676d62cbd8584 (diff)
[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 'include/scsi/scsi_transport.h')
-rw-r--r--include/scsi/scsi_transport.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index f6e0bb484c63..e7b1054adf86 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -30,12 +30,9 @@ struct scsi_transport_template {
30 struct transport_container device_attrs; 30 struct transport_container device_attrs;
31 31
32 /* 32 /*
33 * If set, call target_parent prior to allocating a scsi_target, 33 * If set, called from sysfs and legacy procfs rescanning code.
34 * so we get the appropriate parent for the target. This function
35 * is required for transports like FC and iSCSI that do not put the
36 * scsi_target under scsi_host.
37 */ 34 */
38 struct device *(*target_parent)(struct Scsi_Host *, int, uint); 35 int (*user_scan)(struct Scsi_Host *, uint, uint, uint);
39 36
40 /* The size of the specific transport attribute structure (a 37 /* The size of the specific transport attribute structure (a
41 * space of this size will be left at the end of the 38 * space of this size will be left at the end of the