]> err.no Git - linux-2.6/commitdiff
[SCSI] SCSI & FC transport: extend event vendor id's to 64bits
authorJames Smart <James.Smart@Emulex.Com>
Tue, 22 Aug 2006 13:55:23 +0000 (09:55 -0400)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 2 Sep 2006 20:35:15 +0000 (15:35 -0500)
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>
drivers/scsi/scsi_transport_fc.c
include/scsi/scsi_netlink.h
include/scsi/scsi_netlink_fc.h
include/scsi/scsi_transport_fc.h

index 05989f13055437fa6cc5a481869cf2abad264360..293188cbff8c0526da05b7e75d03b2843aed91be 100644 (file)
@@ -513,7 +513,7 @@ EXPORT_SYMBOL(fc_host_post_event);
  **/
 void
 fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number,
-               u32 data_len, char * data_buf, u32 vendor_id)
+               u32 data_len, char * data_buf, u64 vendor_id)
 {
        struct sk_buff *skb;
        struct nlmsghdr *nlh;
index 7a3a20e640c0bc906c4aba0961d74a08d2108272..8c1470cc82096631cb370f1069c619ebf1a2ca54 100644 (file)
@@ -67,9 +67,10 @@ struct scsi_nl_hdr {
  *   Identifiers for each type:
  *    PCI :  ID data is the 16 bit PCI Registered Vendor ID
  */
-#define SCSI_NL_VID_ID_MASK                    0x00FFFFFF
-#define SCSI_NL_VID_TYPE_MASK                  0xFF000000
-#define SCSI_NL_VID_TYPE_PCI                   0x01000000
+#define SCSI_NL_VID_TYPE_SHIFT         56
+#define SCSI_NL_VID_TYPE_MASK          ((u64)0xFF << SCSI_NL_VID_TYPE_SHIFT)
+#define SCSI_NL_VID_TYPE_PCI           ((u64)0x01 << SCSI_NL_VID_TYPE_SHIFT)
+#define SCSI_NL_VID_ID_MASK            (~ SCSI_NL_VID_TYPE_MASK)
 
 
 #define INIT_SCSI_NL_HDR(hdr, t, mtype, mlen)                  \
index b213d2909fed4d35511cfadc5139e0009c6af962..cbf76e479761c4378b7b2fa71235064af76a3f8b 100644 (file)
@@ -58,7 +58,7 @@
 struct fc_nl_event {
        struct scsi_nl_hdr snlh;                /* must be 1st element ! */
        uint64_t seconds;
-       uint32_t vendor_id;
+       uint64_t vendor_id;
        uint16_t host_no;
        uint16_t event_datalen;
        uint32_t event_num;
index f91c5358af3a930ffe321fb409e0bfe691d8530d..0b11eff989e04d54dc29f98ac2f40cde5edc6fe1 100644 (file)
@@ -555,7 +555,7 @@ 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, u32 vendor_id);
+               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