Re: [PATCH 04/20] scsi: pm8001: fix __iomem pointer use in pm8001_phy_control()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/11/22 15:11, Christoph Hellwig wrote:
> On Thu, Feb 10, 2022 at 08:42:02PM +0900, Damien Le Moal wrote:
>>  			struct sas_phy *phy = sas_phy->phy;
>> -			uint32_t *qp = (uint32_t *)(((char *)
>> -				pm8001_ha->io_mem[2].memvirtaddr)
>> -				+ 0x1034 + (0x4000 * (phy_id & 3)));
>> +			unsigned long vaddr = (unsigned long)
>> +				pm8001_ha->io_mem[2].memvirtaddr;
>> +			uint32_t *qp = (uint32_t *)
>> +				(vaddr + 0x1034 + (0x4000 * (phy_id & 3)));
> 
> This just removes the warning, but does not actually fix the issue.
> Both long_vaddr and qp need to be __iomem pointers...
> 
>>  
>>  			phy->invalid_dword_count = qp[0];
>>  			phy->running_disparity_error_count = qp[1];
> 
> ... and reads from qp need to use readl.

OK. About to send a v2 with more fixes. Will rework this one and patch 8
too.

-- 
Damien Le Moal
Western Digital Research



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux