hisi_sas: Use u64 for qw0 in free_device_v1_hw()
authorJohn Garry <john.garry@huawei.com>
Mon, 21 Dec 2015 11:35:09 +0000 (19:35 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 Jan 2016 17:50:54 +0000 (12:50 -0500)
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: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Shane Seymour <shane.seymour@hpe.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c

index 38ff575775f1baad3da18c2da3d9c4c6b01b1eee..057fdeb720acec997f4a4a5952318c58ab2f0b3e 100644 (file)
@@ -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);