Message ID | 1450697709-120516-4-git-send-email-john.garry@huawei.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
> By reading in itct.qw0 into a 32b variable the top > 32 bits were being lost. > In practice this was OK as they were zeroes. > > Fixes: 27a3f229 ("hisi_sas: Add cq interrupt") > > Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Shane Seymour <shane.seymour@hpe.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> On Dec 21, 2015, at 5:35 AM, John Garry <john.garry@huawei.com> wrote: > > By reading in itct.qw0 into a 32b variable the top > 32 bits were being lost. > In practice this was OK as they were zeroes. > > Fixes: 27a3f229 ("hisi_sas: Add cq interrupt") > > Signed-off-by: John Garry <john.garry@huawei.com> > --- > drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c > index 38ff575..057fdeb 100644 > --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c > +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c > @@ -539,7 +539,8 @@ static void free_device_v1_hw(struct hisi_hba *hisi_hba, > { > u64 dev_id = sas_dev->device_id; > struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id]; > - u32 qw0, reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME); > + u64 qw0; This should probably be a __le64, but not a big deal. Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 38ff575..057fdeb 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -539,7 +539,8 @@ static void free_device_v1_hw(struct hisi_hba *hisi_hba, { u64 dev_id = sas_dev->device_id; struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id]; - u32 qw0, reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME); + u64 qw0; + u32 reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME); reg_val |= CFG_AGING_TIME_ITCT_REL_MSK; hisi_sas_write32(hisi_hba, CFG_AGING_TIME, reg_val);
By reading in itct.qw0 into a 32b variable the top 32 bits were being lost. In practice this was OK as they were zeroes. Fixes: 27a3f229 ("hisi_sas: Add cq interrupt") Signed-off-by: John Garry <john.garry@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)