mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 09:31:26 +00:00
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 <hong.liu@intel.com> Tested-by: Hongyan Song <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
b22f805bbe
commit
7e06e0d549
@ -314,6 +314,8 @@ static int write_ipc_from_queue(struct ishtp_device *dev)
|
||||
memcpy(®, &r_buf[length >> 2], rem);
|
||||
ish_reg_write(dev, reg_addr, reg);
|
||||
}
|
||||
ish_reg_write(dev, IPC_REG_HOST2ISH_DRBL, doorbell_val);
|
||||
|
||||
/* Flush writes to msg registers and doorbell */
|
||||
ish_reg_read(dev, IPC_REG_ISH_HOST_FWSTS);
|
||||
|
||||
@ -321,8 +323,6 @@ static int write_ipc_from_queue(struct ishtp_device *dev)
|
||||
++dev->ipc_tx_cnt;
|
||||
dev->ipc_tx_bytes_cnt += IPC_HEADER_GET_LENGTH(doorbell_val);
|
||||
|
||||
ish_reg_write(dev, IPC_REG_HOST2ISH_DRBL, doorbell_val);
|
||||
|
||||
ipc_send_compl = ipc_link->ipc_send_compl;
|
||||
ipc_send_compl_prm = ipc_link->ipc_send_compl_prm;
|
||||
list_del_init(&ipc_link->link);
|
||||
|
Loading…
Reference in New Issue
Block a user