diff options
author | Eddie James <eajames@linux.ibm.com> | 2021-07-21 21:02:30 +0200 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2021-10-15 06:39:26 +0200 |
commit | 908dbf0242e21dd95c69a1b0935814cd1abfc134 (patch) | |
tree | ecb3df0f59c763b15a5ab357b532237ec5303533 /drivers/hwmon/occ/p9_sbe.c | |
parent | fsi: occ: Force sequence numbering per OCC (diff) | |
download | linux-908dbf0242e21dd95c69a1b0935814cd1abfc134.tar.xz linux-908dbf0242e21dd95c69a1b0935814cd1abfc134.zip |
hwmon: (occ) Remove sequence numbering and checksum calculation
Checksumming of the request and sequence numbering is now done in the
OCC interface driver in order to keep unique sequence numbers. So
remove those in the hwmon driver. Also, add the command length to the
send_cmd function pointer, since the checksum must be placed in the
last two bytes of the command. The submit interface must receive the
exact size of the command - previously it could be rounded to the
nearest 8 bytes with no consequence.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210721190231.117185-3-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/hwmon/occ/p9_sbe.c')
-rw-r--r-- | drivers/hwmon/occ/p9_sbe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/occ/p9_sbe.c b/drivers/hwmon/occ/p9_sbe.c index f6387cc0b754..9709f2b9c052 100644 --- a/drivers/hwmon/occ/p9_sbe.c +++ b/drivers/hwmon/occ/p9_sbe.c @@ -16,14 +16,14 @@ struct p9_sbe_occ { #define to_p9_sbe_occ(x) container_of((x), struct p9_sbe_occ, occ) -static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd) +static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len) { struct occ_response *resp = &occ->resp; struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); size_t resp_len = sizeof(*resp); int rc; - rc = fsi_occ_submit(ctx->sbe, cmd, 8, resp, &resp_len); + rc = fsi_occ_submit(ctx->sbe, cmd, len, resp, &resp_len); if (rc < 0) return rc; |