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

[SCSI] bfa: Add support to have mfg date as part of adapter attributes

Made changes to expose mfg day/month/year as part of the
adapter attributes for user space applications.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by

Krishna Gudipati and committed by
James Bottomley
ea5d7c9e 227fab90

+11
+4
drivers/scsi/bfa/bfa_defs.h
··· 254 254 255 255 u8 is_mezz; 256 256 u8 trunk_capable; 257 + u8 mfg_day; /* manufacturing day */ 258 + u8 mfg_month; /* manufacturing month */ 259 + u16 mfg_year; /* manufacturing year */ 260 + u16 rsvd; 257 261 }; 258 262 259 263 /*
+4
drivers/scsi/bfa/bfa_ioc.c
··· 1750 1750 attr->card_type = be32_to_cpu(attr->card_type); 1751 1751 attr->maxfrsize = be16_to_cpu(attr->maxfrsize); 1752 1752 ioc->fcmode = (attr->port_mode == BFI_PORT_MODE_FC); 1753 + attr->mfg_year = be16_to_cpu(attr->mfg_year); 1753 1754 1754 1755 bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR); 1755 1756 } ··· 2497 2496 ad_attr->cna_capable = bfa_ioc_is_cna(ioc); 2498 2497 ad_attr->trunk_capable = (ad_attr->nports > 1) && 2499 2498 !bfa_ioc_is_cna(ioc) && !ad_attr->is_mezz; 2499 + ad_attr->mfg_day = ioc_attr->mfg_day; 2500 + ad_attr->mfg_month = ioc_attr->mfg_month; 2501 + ad_attr->mfg_year = ioc_attr->mfg_year; 2500 2502 } 2501 2503 2502 2504 enum bfa_ioc_type_e
+3
drivers/scsi/bfa/bfi.h
··· 288 288 char optrom_version[BFA_VERSION_LEN]; 289 289 struct bfa_mfg_vpd_s vpd; 290 290 u32 card_type; /* card type */ 291 + u8 mfg_day; /* manufacturing day */ 292 + u8 mfg_month; /* manufacturing month */ 293 + u16 mfg_year; /* manufacturing year */ 291 294 }; 292 295 293 296 /*