aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/scsi/scsi_transport_fc.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2019-04-05 16:04:21 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-04-08 21:29:16 -0400
commit2b1be55819dc7ae35576b3ba621c7fed0c323e04 (patch)
tree3966684d1738f49d5bde15f1fe1d9c401476a08a /include/scsi/scsi_transport_fc.h
parentscsi: fc: add FPIN ELS definition (diff)
downloadwireguard-linux-2b1be55819dc7ae35576b3ba621c7fed0c323e04.tar.xz
wireguard-linux-2b1be55819dc7ae35576b3ba621c7fed0c323e04.zip
scsi: scsi_transport_fc: refactor event posting routines
There are two routines generating transport events that do the same thing with only a couple of values set differently. Refactor so there's a single routine doing the netlink operations to send the event. All the differences are passed as arguments. Export the symbol so the generic routine can be called by llds. Modify the existing two event routines to use the helper. Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/scsi_transport_fc.h')
-rw-r--r--include/scsi/scsi_transport_fc.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index 15da45dc2a5d..7998b322ed13 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -798,10 +798,15 @@ u32 fc_get_event_number(void);
void fc_host_post_event(struct Scsi_Host *shost, u32 event_number,
enum fc_host_event_code event_code, u32 event_data);
void fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number,
- u32 data_len, char * data_buf, u64 vendor_id);
+ u32 data_len, char *data_buf, u64 vendor_id);
+void fc_host_post_fc_event(struct Scsi_Host *shost, u32 event_number,
+ enum fc_host_event_code event_code,
+ u32 data_len, char *data_buf, u64 vendor_id);
/* Note: when specifying vendor_id to fc_host_post_vendor_event()
- * be sure to read the Vendor Type and ID formatting requirements
- * specified in scsi_netlink.h
+ * or fc_host_post_fc_event(), be sure to read the Vendor Type
+ * and ID formatting requirements specified in scsi_netlink.h
+ * Note: when calling fc_host_post_fc_event(), vendor_id may be
+ * specified as 0.
*/
struct fc_vport *fc_vport_create(struct Scsi_Host *shost, int channel,
struct fc_vport_identifiers *);