diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2014-07-05 00:59:16 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2014-07-05 00:59:16 +0200 |
commit | 87fdd4b6c8a8a0cc22e53cdb239b56dc95ee6f74 (patch) | |
tree | dd5fbc3a75da99ef6a7169bdd32d87f96d9886e1 | |
parent | ca19c4c610f7aaf45a5539b3597092d859733ec0 (diff) | |
download | external_libsamsung-ipc-87fdd4b6c8a8a0cc22e53cdb239b56dc95ee6f74.zip external_libsamsung-ipc-87fdd4b6c8a8a0cc22e53cdb239b56dc95ee6f74.tar.gz external_libsamsung-ipc-87fdd4b6c8a8a0cc22e53cdb239b56dc95ee6f74.tar.bz2 |
xmm626: HSIC ACKs are not reliable
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | samsung-ipc/devices/xmm626/xmm626_hsic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/samsung-ipc/devices/xmm626/xmm626_hsic.c b/samsung-ipc/devices/xmm626/xmm626_hsic.c index d7a5d4f..07154bd 100644 --- a/samsung-ipc/devices/xmm626/xmm626_hsic.c +++ b/samsung-ipc/devices/xmm626/xmm626_hsic.c @@ -120,13 +120,13 @@ int xmm626_hsic_psi_send(struct ipc_client *client, int device_fd, rc = select(device_fd + 1, &fds, NULL, NULL, &timeout); if (rc <= 0) { - ipc_client_log(client, "Reading chip id failed"); + ipc_client_log(client, "Reading boot ACK failed"); goto error; } psi_ack = 0; rc = read(device_fd, &psi_ack, sizeof(psi_ack)); - if (rc <= 0 || psi_ack != XMM626_HSIC_BOOT0_ACK) { + if (rc < (int) sizeof(psi_ack)) { ipc_client_log(client, "Reading boot ACK failed"); goto error; } @@ -139,7 +139,7 @@ int xmm626_hsic_psi_send(struct ipc_client *client, int device_fd, chip_id = 0; rc = read(device_fd, &chip_id, sizeof(chip_id)); - if (rc <= 0) { + if (rc < (int) sizeof(chip_id)) { ipc_client_log(client, "Reading chip id failed"); goto error; } @@ -206,7 +206,7 @@ int xmm626_hsic_psi_send(struct ipc_client *client, int device_fd, } rc = read(device_fd, &psi_ack, sizeof(psi_ack)); - if (rc < (int) sizeof(psi_ack) || psi_ack != XMM626_HSIC_PSI_CRC_ACK) { + if (rc < (int) sizeof(psi_ack)) { ipc_client_log(client, "Reading PSI CRC ACK failed"); goto error; } |