Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: pm80xx: Reset PI and CI memory during re-initialization

Producer index(PI) outbound queue and consumer index(CI) for Outbound queue
are in DMA memory. During resume(), the stale PI and CI Values will lead to
unexpected behavior. These values should be reset to 0 during driver
reinitialization.

Link: https://lore.kernel.org/r/20210415103352.3580-8-Viswas.G@microchip.com
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Viswas G and committed by
Martin K. Petersen
b431472b 4f5deeb4

+4
+2
drivers/scsi/pm8001/pm8001_hwi.c
··· 240 240 pm8001_ha->memoryMap.region[ci_offset + i].phys_addr_lo; 241 241 pm8001_ha->inbnd_q_tbl[i].ci_virt = 242 242 pm8001_ha->memoryMap.region[ci_offset + i].virt_ptr; 243 + pm8001_write_32(pm8001_ha->inbnd_q_tbl[i].ci_virt, 0, 0); 243 244 offsetib = i * 0x20; 244 245 pm8001_ha->inbnd_q_tbl[i].pi_pci_bar = 245 246 get_pci_bar_index(pm8001_mr32(addressib, ··· 269 268 0 | (10 << 16) | (i << 24); 270 269 pm8001_ha->outbnd_q_tbl[i].pi_virt = 271 270 pm8001_ha->memoryMap.region[pi_offset + i].virt_ptr; 271 + pm8001_write_32(pm8001_ha->outbnd_q_tbl[i].pi_virt, 0, 0); 272 272 offsetob = i * 0x24; 273 273 pm8001_ha->outbnd_q_tbl[i].ci_pci_bar = 274 274 get_pci_bar_index(pm8001_mr32(addressob,
+2
drivers/scsi/pm8001/pm80xx_hwi.c
··· 787 787 pm8001_ha->memoryMap.region[ci_offset + i].phys_addr_lo; 788 788 pm8001_ha->inbnd_q_tbl[i].ci_virt = 789 789 pm8001_ha->memoryMap.region[ci_offset + i].virt_ptr; 790 + pm8001_write_32(pm8001_ha->inbnd_q_tbl[i].ci_virt, 0, 0); 790 791 offsetib = i * 0x20; 791 792 pm8001_ha->inbnd_q_tbl[i].pi_pci_bar = 792 793 get_pci_bar_index(pm8001_mr32(addressib, ··· 821 820 pm8001_ha->outbnd_q_tbl[i].interrup_vec_cnt_delay = (i << 24); 822 821 pm8001_ha->outbnd_q_tbl[i].pi_virt = 823 822 pm8001_ha->memoryMap.region[pi_offset + i].virt_ptr; 823 + pm8001_write_32(pm8001_ha->outbnd_q_tbl[i].pi_virt, 0, 0); 824 824 offsetob = i * 0x24; 825 825 pm8001_ha->outbnd_q_tbl[i].ci_pci_bar = 826 826 get_pci_bar_index(pm8001_mr32(addressob,