From f76f7fefa1bb5dc2ec0c9e44740faac0b46dac25 Mon Sep 17 00:00:00 2001 From: Joerg Pulz Date: Fri, 7 Jul 2023 15:43:34 -0600 Subject: [PATCH] isp(4): Fix reading NVRAM contents for 28xx based devices Use correct NVRAM address for ISP28xx based HBAs to read NVRAM contents. WWPN/WWNN and framesize are correctly read from NVRAM now. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 17163c3c4cb..46bb40c0fe0 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -4380,7 +4380,9 @@ isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) uint32_t base = 0x7ffe0000; uint32_t tmp = 0; - if (IS_26XX(isp)) { + if (IS_28XX(isp)) { + base = 0x7fad0000; /* 0x7f7d0000 + 0x300000 */ + } else if (IS_26XX(isp)) { base = 0x7fe7c000; /* XXX: Observation, may be wrong. */ } else if (IS_25XX(isp)) { base = 0x7ff00000 | 0x48000;