Re: [PATCH 4/6] tegra, serial8250: add ->handle_break() uart_port op

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

 



On 04/06/2012 03:28 PM, Williams, Dan J wrote:
> On Fri, Apr 6, 2012 at 2:01 PM, Stephen Warren <swarren@xxxxxxxxxxxxx> wrote:
>> On 04/06/2012 12:49 PM, Dan Williams wrote:
>>> The "KT" serial port has another use case for a "received break" quirk,
>>> so before adding another special case to the 8250 core take this
>>> opportunity to push such quirks out of the core and into a uart_port op.
>>
>> This doesn't seem quite right. Why do the board files have to set up
>> this .handle_break function; they're already setting .type=PORT_TEGRA,
>> which should be enough to drive the setup of any required quirks.
> 
> Because struct serial8250_config does not convey any uart_port ops.

But couldn't it be enhanced to do so, just like this patch added a field
to struct uart_port for this? If you went this route, then the change
would be entirely isolated within 8250.c, so you could drop all the
arch/arm/mach-tegra changes, and also not need to update of_serial.c.

>> I'm not sure what the implication is of moving the call to clr_fifo()
>> into uart_handle_break(). What's the benefit of one location over the other?
> 
> This was the location where the core was already doing it's break
> handling, so it made sense to check here if the device had any quirks
> to run.  There shouldn't be any implications because the core was
> already doing clear_rx_fifo() immediately before calling
> uart_handle_break.  Here is the relevant hunk with a bit more context:

Ah OK, that part seems fine then.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux