for (i = 0; i < receive; i++)
ps2dev->cmdbuf[(receive - 1) - i] = param[i];
- /* Signal that we are sending the command byte */
- ps2dev->flags |= PS2_FLAG_ACK_CMD;
-
/*
* Some devices (Synaptics) peform the reset before
* ACKing the reset command, and so it can take a long
if (rc)
goto out_reset_flags;
- /* Now we are sending command parameters, if any */
- ps2dev->flags &= ~PS2_FLAG_ACK_CMD;
-
+ /* Send command parameters, if any. */
for (i = 0; i < send; i++) {
rc = ps2_do_sendbyte(ps2dev, param[i], 200, 2);
if (rc)
*/
dev_dbg(&ps2dev->serio->dev, "unexpected %#02x\n", data);
ps2dev->flags &= ~PS2_FLAG_WAITID;
- return ps2dev->flags & PS2_FLAG_ACK_CMD;
+ return true;
}
if (!ps2dev->nak) {
#define PS2_FLAG_CMD1 BIT(2) /* Waiting for the first byte of command response */
#define PS2_FLAG_WAITID BIT(3) /* Command executing is GET ID */
#define PS2_FLAG_NAK BIT(4) /* Last transmission was NAKed */
-#define PS2_FLAG_ACK_CMD BIT(5) /* Waiting to ACK the command (first) byte */
struct ps2dev {
struct serio *serio;