diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-06-10 22:24:30 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-08 17:14:55 -0500 |
commit | 5c44cd2afad3f7b015542187e147a820600172f1 (patch) | |
tree | ef4b63ee55d0481569b1bd680e376b0d94b2b6f0 /include/scsi | |
parent | 9c472dd9197429a37691e91c938660a062bf20b0 (diff) | |
download | kernel_samsung_espresso10-5c44cd2afad3f7b015542187e147a820600172f1.zip kernel_samsung_espresso10-5c44cd2afad3f7b015542187e147a820600172f1.tar.gz kernel_samsung_espresso10-5c44cd2afad3f7b015542187e147a820600172f1.tar.bz2 |
[SCSI] fix target scanning oops with fc transport class
We have some nasty issues with 2.6.12-rc6. Any request to scan on
the lpfc or qla2xxx FC adapters will oops. What is happening is the
system is defaulting to non-transport registered targets, which
inherit the parent of the scan. On this second scan, performed by
the attribute, the parent becomes the shost instead of the rport.
The slave functions in the 2 FC adapters use starget_to_rport()
routines, which incorrectly map the shost as an rport pointer.
Additionally, this pointed out other weaknesses:
- If the target structure is torn down outside of the transport,
we have no method for it to be regenerated at the proper parent.
- We have race conditions on the target being allocated by both
the midlayer scan (parent=shost) and by the fc transport
(parent=rport).
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_transport.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index a4f1837..f6e0bb4 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -29,6 +29,14 @@ struct scsi_transport_template { struct transport_container target_attrs; struct transport_container device_attrs; + /* + * If set, call target_parent prior to allocating a scsi_target, + * so we get the appropriate parent for the target. This function + * is required for transports like FC and iSCSI that do not put the + * scsi_target under scsi_host. + */ + struct device *(*target_parent)(struct Scsi_Host *, int, uint); + /* The size of the specific transport attribute structure (a * space of this size will be left at the end of the * scsi_* structure */ |