Re: [PATCH 1/3] Input: applespi: Don't wait for responses to commands indefinitely.

2021-02-19 Thread Dmitry Torokhov
On Wed, Feb 17, 2021 at 12:45:51PM -0800, Life is hard, and then you die wrote: > > Hi Dmitry, > > On Wed, Feb 17, 2021 at 12:23:23PM -0800, Dmitry Torokhov wrote: > > > > On Wed, Feb 17, 2021 at 11:07:16AM -0800, Ronald Tschalär wrote: > > > @@ -869,7 +878,7 @@ static int applespi_send_cmd_ms

Re: [PATCH 1/3] Input: applespi: Don't wait for responses to commands indefinitely.

2021-02-17 Thread Life is hard, and then you die
Hi Dmitry, On Wed, Feb 17, 2021 at 12:23:23PM -0800, Dmitry Torokhov wrote: > > On Wed, Feb 17, 2021 at 11:07:16AM -0800, Ronald Tschalär wrote: > > @@ -869,7 +878,7 @@ static int applespi_send_cmd_msg(struct applespi_data > > *applespi) > > return sts; > > } > > > > - ap

Re: [PATCH 1/3] Input: applespi: Don't wait for responses to commands indefinitely.

2021-02-17 Thread Dmitry Torokhov
Hi Ronald, On Wed, Feb 17, 2021 at 11:07:16AM -0800, Ronald Tschalär wrote: > @@ -869,7 +878,7 @@ static int applespi_send_cmd_msg(struct applespi_data > *applespi) > return sts; > } > > - applespi->cmd_msg_queued = true; > + applespi->cmd_msg_queued = ktime_get();

[PATCH 1/3] Input: applespi: Don't wait for responses to commands indefinitely.

2021-02-17 Thread Ronald Tschalär
The response to a command may never arrive or it may be corrupted (and hence dropped) for some reason. While exceedingly rare, when it did happen it blocked all further commands. One way to fix this was to do a suspend/resume. However, recovering automatically seems like a nicer option. Hence this