From b04e8988d70d214eabf9d1a8c51df462ba1a6b02 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 7 Oct 2014 23:14:39 -0500 Subject: Fix for VPD presence detect when reading from HW Temporary fix to get Palmetto working again. Change-Id: I601a83703d1729cbc7e67008e6853ca7ecc13856 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13864 Tested-by: Jenkins Server Reviewed-by: ANDRES A. LUGO-REYES Reviewed-by: Corey V. Swenson Reviewed-by: A. Patrick Williams III --- src/usr/vpd/cvpd.C | 24 ++++++++++++++++++++++++ src/usr/vpd/mvpd.C | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) (limited to 'src/usr/vpd') diff --git a/src/usr/vpd/cvpd.C b/src/usr/vpd/cvpd.C index 4abc9bdf8..406511fb7 100644 --- a/src/usr/vpd/cvpd.C +++ b/src/usr/vpd/cvpd.C @@ -189,9 +189,33 @@ namespace CVPD //--------------------------------------------------------- bool VPD::cvpdPresent( TARGETING::Target * i_target ) { +#ifdef CONFIG_CVPD_READ_FROM_HW + //@todo - Fix this the right way with RTC:117048 + IpVpdFacade::input_args_t args; + args.record = CVPD::VEIR; + args.keyword = CVPD::PF ; + size_t kwlen = 0; + errlHndl_t l_errl = Singleton::instance().read( + i_target, + NULL, + kwlen, + args ); + if( l_errl ) + { + delete l_errl; + return false; + } + if( kwlen == 0 ) + { + return false; + } + return true; + +#else return Singleton::instance().hasVpdPresent( i_target, CVPD::VEIR, CVPD::PF ); +#endif } diff --git a/src/usr/vpd/mvpd.C b/src/usr/vpd/mvpd.C index 0e9801984..6498e2561 100644 --- a/src/usr/vpd/mvpd.C +++ b/src/usr/vpd/mvpd.C @@ -185,9 +185,33 @@ namespace MVPD // --------------------------------------------------------- bool VPD::mvpdPresent( TARGETING::Target * i_target ) { +#ifdef CONFIG_MVPD_READ_FROM_HW + //@todo - Fix this the right way with RTC:117048 + IpVpdFacade::input_args_t args; + args.record = MVPD::CP00; + args.keyword = MVPD::VD; + size_t kwlen = 0; + errlHndl_t l_errl = Singleton::instance().read( + i_target, + NULL, + kwlen, + args ); + if( l_errl ) + { + delete l_errl; + return false; + } + if( kwlen == 0 ) + { + return false; + } + return true; + +#else return Singleton::instance().hasVpdPresent( i_target, MVPD::CP00, MVPD::VD ); +#endif } -- cgit v1.2.1