Re: [PATCH V1 1/2] usb: serial: f81534: fix hang-up on overrun

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 13, 2017 at 10:21:34AM +0800, Ji-Ze Hong (Peter Hong) wrote:
> The F81532/534 without this patch will hang-up on data overrun.
> 
> It's caused by enable LSR interrupt in IER by default and occur data
> overrun, the chip will busy for process LSR interrupt but not read LSR
> internally. It will not responed for USB control endpoint0 and we can't
> read LSR from driver in this situration.
> 
> So we'll disable the LSR interrupt in probe() and submit the LSR worker to
> clear LSR state when reported LSR error bit with bulk-in data in
> f81534_process_per_serial_block().
> 
> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@xxxxxxxxx>
 
> +static void f81534_lsr_worker(struct work_struct *work)
> +{
> +	struct f81534_port_private *port_priv =
> +			container_of(work, struct f81534_port_private,
> +					lsr_work);
> +	struct usb_serial_port *port = port_priv->port;

I separated declaration from initialisation here to avoid the line
breaks.

> +	int status;
> +	u8 tmp;
> +
> +	status = f81534_get_port_register(port, F81534_LINE_STATUS_REG, &tmp);
> +	if (status)
> +		dev_warn(&port->dev, "read LSR failed: %x\n", status);

And I changed this to %d before applying as you're printing a negative
errno here.

> +}
> +

Now applied for -next.

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux