On 7/16/22 06:35, Sreekanth Reddy wrote:
Please check the changes below. I hope this change will work with 32-bit pointers as well. If it looks good then I will post this change as a patch. diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 0901bc932d5c..0bba19c0f984 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -386,7 +386,7 @@ static void mpi3mr_queue_qd_reduction_event(struct mpi3mr_ioc *mrioc, ioc_warn(mrioc, "failed to queue TG QD reduction event\n"); return; } - *(__le64 *)fwevt->event_data = (__le64)tg; + memcpy(fwevt->event_data, (char *)&tg, sizeof(void *)); fwevt->mrioc = mrioc; fwevt->event_id = MPI3MR_DRIVER_EVENT_TG_QD_REDUCTION; fwevt->send_ack = 0; @@ -1660,8 +1660,7 @@ static void mpi3mr_fwevt_bh(struct mpi3mr_ioc *mrioc, { struct mpi3mr_throttle_group_info *tg; - tg = (struct mpi3mr_throttle_group_info *) - (*(__le64 *)fwevt->event_data); + memcpy((char *)&tg, fwevt->event_data, sizeof(void *)); dprint_event_bh(mrioc, "qd reduction event processed for tg_id(%d) reduction_needed(%d)\n", tg->id, tg->need_qd_reduction);
How about reverting c196bc4dce ("scsi: mpi3mr: Reduce VD queue depth on detecting throttling") to remove the time pressure for coming up with a fix for that commit?
Thanks, Bart.