Skip to content

Commit 7e06e0d

Browse files
hongliu68Jiri Kosina
authored andcommitted
HID: intel-ish-hid: move doorbell writing before flush
Reading of IPC_REG_ISH_HOST_FWSTS will flush both message register and doorbell. So move the doorbell write before reading of IPC_REG_ISH_HOST_FWSTS. Signed-off-by: Hong Liu <[email protected]> Tested-by: Hongyan Song <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent b22f805 commit 7e06e0d

File tree

1 file changed

+2
-2
lines changed
  • drivers/hid/intel-ish-hid/ipc

1 file changed

+2
-2
lines changed

drivers/hid/intel-ish-hid/ipc/ipc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,15 @@ static int write_ipc_from_queue(struct ishtp_device *dev)
314314
memcpy(&reg, &r_buf[length >> 2], rem);
315315
ish_reg_write(dev, reg_addr, reg);
316316
}
317+
ish_reg_write(dev, IPC_REG_HOST2ISH_DRBL, doorbell_val);
318+
317319
/* Flush writes to msg registers and doorbell */
318320
ish_reg_read(dev, IPC_REG_ISH_HOST_FWSTS);
319321

320322
/* Update IPC counters */
321323
++dev->ipc_tx_cnt;
322324
dev->ipc_tx_bytes_cnt += IPC_HEADER_GET_LENGTH(doorbell_val);
323325

324-
ish_reg_write(dev, IPC_REG_HOST2ISH_DRBL, doorbell_val);
325-
326326
ipc_send_compl = ipc_link->ipc_send_compl;
327327
ipc_send_compl_prm = ipc_link->ipc_send_compl_prm;
328328
list_del_init(&ipc_link->link);

0 commit comments

Comments
 (0)