summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2011-01-29 01:05:27 +0100
committerJames Bottomley <James.Bottomley@suse.de>2011-02-12 18:09:04 +0100
commit75a2792df296c77004a72056c76628a1f835bc93 (patch)
tree767bafd5718fc112d440bf3d8d1369eeb1d557e9 /include/scsi
parent[SCSI] libfc: Extending lport's roles for target if there is a registered tar... (diff)
downloadlinux-75a2792df296c77004a72056c76628a1f835bc93.tar.xz
linux-75a2792df296c77004a72056c76628a1f835bc93.zip
[SCSI] libfc: introduce LLD event callback
This patch enables LLD to listen to rport events and perform LLD specific operations based on the rport event. This patch also stores sp_features and spp_type in rdata for further reference by LLD. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libfc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 6d64e44bc3bf..24193c1b0da0 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -158,6 +158,7 @@ struct fc_rport_libfc_priv {
#define FC_RP_FLAGS_REC_SUPPORTED (1 << 0)
#define FC_RP_FLAGS_RETRY (1 << 1)
#define FC_RP_STARTED (1 << 2)
+ #define FC_RP_FLAGS_CONF_REQ (1 << 3)
unsigned int e_d_tov;
unsigned int r_a_tov;
};
@@ -207,6 +208,11 @@ struct fc_rport_priv {
u32 supported_classes;
u16 prli_count;
struct rcu_head rcu;
+ u16 sp_features;
+ u8 spp_type;
+ void (*lld_event_callback)(struct fc_lport *,
+ struct fc_rport_priv *,
+ enum fc_rport_event);
};
/**
@@ -677,6 +683,15 @@ struct libfc_function_template {
void (*rport_destroy)(struct kref *);
/*
+ * Callback routine after the remote port is logged in
+ *
+ * STATUS: OPTIONAL
+ */
+ void (*rport_event_callback)(struct fc_lport *,
+ struct fc_rport_priv *,
+ enum fc_rport_event);
+
+ /*
* Send a fcp cmd from fsp pkt.
* Called with the SCSI host lock unlocked and irqs disabled.
*