Re: [PATCH v2] tty: serial: qcom_geni_serial: Remove interrupt storm

From: Doug Anderson
Date: Thu Dec 13 2018 - 19:59:28 EST


Hi,

On Thu, Dec 13, 2018 at 11:43 AM Ryan Case <ryandcase@xxxxxxxxxxxx> wrote:
>
> Disable M_TX_FIFO_WATERMARK_EN after we've sent all data for a given
> transaction so we don't continue to receive a flurry of free space
> interrupts while waiting for the M_CMD_DONE notification. Re-enable the
> watermark when establishing the next transaction.
>
> Also clear the watermark interrupt after filling the FIFO so we do not
> receive notification again prior to actually having free space.
>
> Signed-off-by: Ryan Case <ryandcase@xxxxxxxxxxxx>
> ---
>
> Changes in v2:
> Addressed Doug's comments
> - Avoid M_TX_WATERMARK_EN writes when values already match
> - Added note about M_TX_WATERMARK_EN triggering and latching
>
> drivers/tty/serial/qcom_geni_serial.c | 25 +++++++++++++++++++++++--
> 1 file changed, 23 insertions(+), 2 deletions(-)

Thanks!

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>

If I echo something out the serial port I now see 2 interrupts fire.
That seems about right compared to before where we'd get boatloads.
Thus:

Tested-by: Douglas Anderson <dianders@xxxxxxxxxxxx>


-Doug