From: Krishna Gudipati <[email protected]>

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

Signed-off-by: Vijaya Mohan Guvva <[email protected]>
Signed-off-by: Krishna Gudipati <[email protected]>
---
 drivers/scsi/bfa/bfa_defs.h |    4 ++++
 drivers/scsi/bfa/bfa_ioc.c  |    4 ++++
 drivers/scsi/bfa/bfi.h      |    3 +++
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_defs.h b/drivers/scsi/bfa/bfa_defs.h
index f1c9314..4e77776 100644
--- a/drivers/scsi/bfa/bfa_defs.h
+++ b/drivers/scsi/bfa/bfa_defs.h
@@ -254,6 +254,10 @@ struct bfa_adapter_attr_s {
 
        u8              is_mezz;
        u8              trunk_capable;
+       u8              mfg_day;        /* manufacturing day */
+       u8              mfg_month;      /* manufacturing month */
+       u16             mfg_year;       /* manufacturing year */
+       u16             rsvd;
 };
 
 /*
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 28ace31..be33725 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -1750,6 +1750,7 @@ bfa_ioc_getattr_reply(struct bfa_ioc_s *ioc)
        attr->card_type     = be32_to_cpu(attr->card_type);
        attr->maxfrsize     = be16_to_cpu(attr->maxfrsize);
        ioc->fcmode     = (attr->port_mode == BFI_PORT_MODE_FC);
+       attr->mfg_year  = be16_to_cpu(attr->mfg_year);
 
        bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR);
 }
@@ -2496,6 +2497,9 @@ bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc,
        ad_attr->cna_capable = bfa_ioc_is_cna(ioc);
        ad_attr->trunk_capable = (ad_attr->nports > 1) &&
                                  !bfa_ioc_is_cna(ioc) && !ad_attr->is_mezz;
+       ad_attr->mfg_day = ioc_attr->mfg_day;
+       ad_attr->mfg_month = ioc_attr->mfg_month;
+       ad_attr->mfg_year = ioc_attr->mfg_year;
 }
 
 enum bfa_ioc_type_e
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h
index b2ba0b2..e6269c2 100644
--- a/drivers/scsi/bfa/bfi.h
+++ b/drivers/scsi/bfa/bfi.h
@@ -288,6 +288,9 @@ struct bfi_ioc_attr_s {
        char            optrom_version[BFA_VERSION_LEN];
        struct          bfa_mfg_vpd_s   vpd;
        u32     card_type;      /*  card type                   */
+       u8      mfg_day;        /* manufacturing day */
+       u8      mfg_month;      /* manufacturing month */
+       u16     mfg_year;       /* manufacturing year */
 };
 
 /*
-- 
1.7.3.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to