Commit b4efbec4 authored by Damien Le Moal's avatar Damien Le Moal Committed by Martin K. Petersen

scsi: mpt3sas: Fix writel() use

writel() internally executes cpu_to_le32() to convert the value being
written to little endian. The caller should thus not use this conversion
function for the value passed to writel(). Remove the cpu_to_le32() calls
in _base_put_smid_scsi_io_atomic(), _base_put_smid_fast_path_atomic(),
_base_put_smid_hi_priority_atomic() _base_put_smid_default_atomic() and
_base_handshake_req_reply_wait().

Link: https://lore.kernel.org/r/20220307234854.148145-3-damien.lemoal@opensource.wdc.comSigned-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dceaef94
......@@ -4312,7 +4312,7 @@ _base_put_smid_scsi_io_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid,
descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid);
descriptor.SMID = cpu_to_le16(smid);
writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost);
writel(*request, &ioc->chip->AtomicRequestDescriptorPost);
}
/**
......@@ -4334,7 +4334,7 @@ _base_put_smid_fast_path_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid,
descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid);
descriptor.SMID = cpu_to_le16(smid);
writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost);
writel(*request, &ioc->chip->AtomicRequestDescriptorPost);
}
/**
......@@ -4357,7 +4357,7 @@ _base_put_smid_hi_priority_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid,
descriptor.MSIxIndex = msix_task;
descriptor.SMID = cpu_to_le16(smid);
writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost);
writel(*request, &ioc->chip->AtomicRequestDescriptorPost);
}
/**
......@@ -4378,7 +4378,7 @@ _base_put_smid_default_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid)
descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid);
descriptor.SMID = cpu_to_le16(smid);
writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost);
writel(*request, &ioc->chip->AtomicRequestDescriptorPost);
}
/**
......@@ -6893,7 +6893,7 @@ _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes,
/* send message 32-bits at a time */
for (i = 0, failed = 0; i < request_bytes/4 && !failed; i++) {
writel(cpu_to_le32(request[i]), &ioc->chip->Doorbell);
writel(request[i], &ioc->chip->Doorbell);
if ((_base_wait_for_doorbell_ack(ioc, 5)))
failed = 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment