From f4a8e6fc4afc44c2a7a477206a5061406c08bd4a Mon Sep 17 00:00:00 2001 From: Sugandha Gupta Date: Thu, 29 Nov 2018 21:26:33 -0800 Subject: e320: Fix return value of get_fpga_type Return value should be fpga image type and not sfp type, fixes a bug with uhd_image_loader while trying to update XG and AA images --- mpm/python/usrp_mpm/periph_manager/e320_periphs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mpm/python/usrp_mpm') diff --git a/mpm/python/usrp_mpm/periph_manager/e320_periphs.py b/mpm/python/usrp_mpm/periph_manager/e320_periphs.py index cf9a6335f..fa8ad30b2 100644 --- a/mpm/python/usrp_mpm/periph_manager/e320_periphs.py +++ b/mpm/python/usrp_mpm/periph_manager/e320_periphs.py @@ -297,10 +297,10 @@ class MboardRegsControl(object): sfp_info_rb = self.peek32(self.MB_SFP_PORT_INFO) # Print the registers values as 32-bit hex values self.log.trace("SFP Info: 0x{0:0{1}X}".format(sfp_info_rb, 8)) + sfp_type = E320_SFP_TYPES.get((sfp_info_rb & 0x0000FF00) >> 8, "") + self.log.trace("SFP type: {}".format(sfp_type)) try: - sfp_type = E320_SFP_TYPES.get((sfp_info_rb & 0x0000FF00) >> 8, "") - self.log.trace("SFP type: {}".format(sfp_type)) - return sfp_type + return E320_FPGA_TYPES_BY_SFP[(sfp_type)] except KeyError: self.log.warning("Unrecognized SFP type: {}" .format(sfp_type)) -- cgit v1.2.3