aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKashyap D Desai <kadesai@FreeBSD.org>2018-12-14 10:49:48 +0000
committerKashyap D Desai <kadesai@FreeBSD.org>2018-12-14 10:49:48 +0000
commit92a1d56ccca8d164c0e0fdc07a7fef04008d2da1 (patch)
treebe131c513677e92bdd848c40bfd8c81c110c86db /sys
parent6c8fcde80c817802681499e14181bc039bdf9876 (diff)
downloadsrc-92a1d56ccca8d164c0e0fdc07a7fef04008d2da1.tar.gz
src-92a1d56ccca8d164c0e0fdc07a7fef04008d2da1.zip
Compilation failure on ppc and mips due to Revision 342066.
Adding extra memset on chain frame. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc
Notes
Notes: svn path=/head/; revision=342079
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mrsas/mrsas_cam.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/mrsas/mrsas_cam.c b/sys/dev/mrsas/mrsas_cam.c
index f836a1b2d09d..ab7f2bb71849 100644
--- a/sys/dev/mrsas/mrsas_cam.c
+++ b/sys/dev/mrsas/mrsas_cam.c
@@ -1577,7 +1577,8 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *s
struct mrsas_softc *sc = cmd->sc;
int sge_len, offset, num_prp_in_chain = 0;
pMpi25IeeeSgeChain64_t main_chain_element, ptr_first_sgl, sgl_ptr;
- u_int64_t *ptr_sgl, *ptr_sgl_phys;
+ u_int64_t *ptr_sgl;
+ bus_addr_t ptr_sgl_phys;
u_int64_t sge_addr;
u_int32_t page_mask, page_mask_result, i = 0;
u_int32_t first_prp_len;
@@ -1600,14 +1601,15 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *s
*/
page_mask = mr_nvme_pg_size - 1;
ptr_sgl = (u_int64_t *) cmd->chain_frame;
- ptr_sgl_phys = (u_int64_t *) cmd->chain_frame_phys_addr;;
+ ptr_sgl_phys = cmd->chain_frame_phys_addr;
+ memset(ptr_sgl, 0, sc->max_chain_frame_sz);
/* Build chain frame element which holds all PRPs except first*/
main_chain_element = (pMpi25IeeeSgeChain64_t)
((u_int8_t *)sgl_ptr + sizeof(MPI25_IEEE_SGE_CHAIN64));
- main_chain_element->Address = (u_int64_t) ptr_sgl_phys;
+ main_chain_element->Address = cmd->chain_frame_phys_addr;
main_chain_element->NextChainOffset = 0;
main_chain_element->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT |
IEEE_SGE_FLAGS_SYSTEM_ADDR |