Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jan 2024 16:53:36 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: bdc2003fc517 - stable/13 - isp: Fix endianness conversion in isp_read_flash_data()
Message-ID:  <202401191653.40JGraVJ060248@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=bdc2003fc51734ed3bb36f82d8e7dcd5c30f41ef

commit bdc2003fc51734ed3bb36f82d8e7dcd5c30f41ef
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-31 23:52:52 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2024-01-19 16:52:44 +0000

    isp: Fix endianness conversion in isp_read_flash_data()
    
    Reported by:    Jenkins
    Fixes:  10ed63fc06cb ("isp(4): Rework firmware handling/loading")
    
    (cherry picked from commit 91d2a093dfaccdf288db663b6e9d47539ea1c1bf)
---
 sys/dev/isp/isp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index aa2f1fb74c59..b53171add5f5 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -4575,7 +4575,7 @@ isp_read_flash_data(ispsoftc_t *isp, uint32_t *dwptr, uint32_t faddr, uint32_t d
 		rval = isp_read_flash_dword(isp, faddr, dwptr);
 		if (rval != ISP_SUCCESS)
 			break;
-		htole32(*((uint32_t *)(dwptr)));
+		*dwptr = htole32(*dwptr);
 	}
 
 	return (rval);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401191653.40JGraVJ060248>