Skip to content

Commit 4b8659e

Browse files
ausyskingregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3e50b63 commit 4b8659e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/misc/mei/bus-fixup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
151151
ret = __mei_cl_send(cldev->cl, (u8 *)&req, sizeof(req), 0,
152152
MEI_CL_IO_TX_BLOCKING);
153153
if (ret < 0) {
154-
dev_err(&cldev->dev, "Could not send ReqFWVersion cmd\n");
154+
dev_err(&cldev->dev, "Could not send ReqFWVersion cmd ret = %d\n", ret);
155155
return ret;
156156
}
157157

@@ -163,7 +163,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
163163
* Should be at least one version block,
164164
* error out if nothing found
165165
*/
166-
dev_err(&cldev->dev, "Could not read FW version\n");
166+
dev_err(&cldev->dev, "Could not read FW version ret = %d\n", bytes_recv);
167167
return -EIO;
168168
}
169169

@@ -380,7 +380,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
380380
ret = __mei_cl_send(cl, (u8 *)&cmd, sizeof(cmd), 0,
381381
MEI_CL_IO_TX_BLOCKING);
382382
if (ret < 0) {
383-
dev_err(bus->dev, "Could not send IF version cmd\n");
383+
dev_err(bus->dev, "Could not send IF version cmd ret = %d\n", ret);
384384
return ret;
385385
}
386386

@@ -395,7 +395,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
395395
bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length, &vtag,
396396
0, 0);
397397
if (bytes_recv < 0 || (size_t)bytes_recv < if_version_length) {
398-
dev_err(bus->dev, "Could not read IF version\n");
398+
dev_err(bus->dev, "Could not read IF version ret = %d\n", bytes_recv);
399399
ret = -EIO;
400400
goto err;
401401
}

0 commit comments

Comments
 (0)