scsi: qla2xxx: Use register names instead of register offsets

Make qla27xx_write_remote_reg() easier to read by using register names
instead of register offsets. The 'pahole' tool has been used to convert
register offsets into register names. See also commit cbb01c2f2f ("scsi:
qla2xxx: Fix MPI failure AEN (8200) handling").

Link: https://lore.kernel.org/r/20200518211712.11395-10-bvanassche@acm.org
Cc: Arun Easi <aeasi@marvell.com>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche 2020-05-18 14:17:06 -07:00 committed by Martin K. Petersen
parent e544b720ef
commit c388841622

View File

@ -17,14 +17,14 @@ static void
qla27xx_write_remote_reg(struct scsi_qla_host *vha,
u32 addr, u32 data)
{
char *reg = (char *)ISPREG(vha);
struct device_reg_24xx __iomem *reg = &vha->hw->iobase->isp24;
ql_dbg(ql_dbg_misc, vha, 0xd300,
"%s: addr/data = %xh/%xh\n", __func__, addr, data);
WRT_REG_DWORD(reg + IOBASE(vha), 0x40);
WRT_REG_DWORD(reg + 0xc4, data);
WRT_REG_DWORD(reg + 0xc0, addr);
WRT_REG_DWORD(&reg->iobase_addr, 0x40);
WRT_REG_DWORD(&reg->iobase_c4, data);
WRT_REG_DWORD(&reg->iobase_window, addr);
}
void