Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] SCSI & FC transport: extend event vendor id's to 64bits

During discussions with Mike Christie, I became convinced that we needed
a larger vendor id. This patch extends the id from 32 to 64 bits.

This applies on top of the prior patches that add SCSI transport events
via netlink.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by

James Smart and committed by
James Bottomley
f14e2e29 84314fd4

+7 -6
+1 -1
drivers/scsi/scsi_transport_fc.c
··· 513 513 **/ 514 514 void 515 515 fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number, 516 - u32 data_len, char * data_buf, u32 vendor_id) 516 + u32 data_len, char * data_buf, u64 vendor_id) 517 517 { 518 518 struct sk_buff *skb; 519 519 struct nlmsghdr *nlh;
+4 -3
include/scsi/scsi_netlink.h
··· 67 67 * Identifiers for each type: 68 68 * PCI : ID data is the 16 bit PCI Registered Vendor ID 69 69 */ 70 - #define SCSI_NL_VID_ID_MASK 0x00FFFFFF 71 - #define SCSI_NL_VID_TYPE_MASK 0xFF000000 72 - #define SCSI_NL_VID_TYPE_PCI 0x01000000 70 + #define SCSI_NL_VID_TYPE_SHIFT 56 71 + #define SCSI_NL_VID_TYPE_MASK ((u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) 72 + #define SCSI_NL_VID_TYPE_PCI ((u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) 73 + #define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK) 73 74 74 75 75 76 #define INIT_SCSI_NL_HDR(hdr, t, mtype, mlen) \
+1 -1
include/scsi/scsi_transport_fc.h
··· 555 555 void fc_host_post_event(struct Scsi_Host *shost, u32 event_number, 556 556 enum fc_host_event_code event_code, u32 event_data); 557 557 void fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number, 558 - u32 data_len, char * data_buf, u32 vendor_id); 558 + u32 data_len, char * data_buf, u64 vendor_id); 559 559 /* Note: when specifying vendor_id to fc_host_post_vendor_event() 560 560 * be sure to read the Vendor Type and ID formatting requirements 561 561 * specified in scsi_netlink.h