mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
mei: bus-fixup:upon error print return values of send and receive
For easier debugging, upon error, print also return values from __mei_cl_recv() and __mei_cl_send() functions. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20221212214933.275434-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e50b63962
commit
4b8659e2c2
1 changed files with 4 additions and 4 deletions
|
@ -151,7 +151,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
|
|||
ret = __mei_cl_send(cldev->cl, (u8 *)&req, sizeof(req), 0,
|
||||
MEI_CL_IO_TX_BLOCKING);
|
||||
if (ret < 0) {
|
||||
dev_err(&cldev->dev, "Could not send ReqFWVersion cmd\n");
|
||||
dev_err(&cldev->dev, "Could not send ReqFWVersion cmd ret = %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
|
|||
* Should be at least one version block,
|
||||
* error out if nothing found
|
||||
*/
|
||||
dev_err(&cldev->dev, "Could not read FW version\n");
|
||||
dev_err(&cldev->dev, "Could not read FW version ret = %d\n", bytes_recv);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
|
|||
ret = __mei_cl_send(cl, (u8 *)&cmd, sizeof(cmd), 0,
|
||||
MEI_CL_IO_TX_BLOCKING);
|
||||
if (ret < 0) {
|
||||
dev_err(bus->dev, "Could not send IF version cmd\n");
|
||||
dev_err(bus->dev, "Could not send IF version cmd ret = %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
|
|||
bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length, &vtag,
|
||||
0, 0);
|
||||
if (bytes_recv < 0 || (size_t)bytes_recv < if_version_length) {
|
||||
dev_err(bus->dev, "Could not read IF version\n");
|
||||
dev_err(bus->dev, "Could not read IF version ret = %d\n", bytes_recv);
|
||||
ret = -EIO;
|
||||
goto err;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue