summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_spc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_spc.c')
-rw-r--r--drivers/target/target_core_spc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index b2d19493a994..fe5d5ce4099c 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -136,20 +136,20 @@ void spc_gen_naa_6h_vendor_specific(struct se_device *dev,
unsigned char *buf)
{
unsigned char *p = &dev->t10_wwn.unit_serial[0];
+ u32 company_id = dev->t10_wwn.company_id;
int cnt, off = 0;
bool next = true;
/*
* Start NAA IEEE Registered Extended Identifier/Designator
*/
- buf[off++] = 0x6 << 4;
+ buf[off] = 0x6 << 4;
- /*
- * Use OpenFabrics IEEE Company ID: 00 14 05
- */
- buf[off++] = 0x01;
- buf[off++] = 0x40;
- buf[off] = (0x5 << 4);
+ /* IEEE COMPANY_ID */
+ buf[off++] |= (company_id >> 20) & 0xf;
+ buf[off++] = (company_id >> 12) & 0xff;
+ buf[off++] = (company_id >> 4) & 0xff;
+ buf[off] = (company_id & 0xf) << 4;
/*
* Generate up to 36 bits of VENDOR SPECIFIC IDENTIFIER starting on