lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e312b861-a5cc-43b0-b2b0-7d66f47a3d0b@app.fastmail.com>
Date:   Wed, 24 May 2023 11:00:02 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Jacky Huang" <ychuang570808@...il.com>,
        "Jiri Slaby" <jirislaby@...nel.org>,
        "Rob Herring" <robh+dt@...nel.org>,
        krzysztof.kozlowski+dt@...aro.org, "Lee Jones" <lee@...nel.org>,
        "Michael Turquette" <mturquette@...libre.com>,
        "Stephen Boyd" <sboyd@...nel.org>,
        "Philipp Zabel" <p.zabel@...gutronix.de>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Tomer Maimon" <tmaimon77@...il.com>,
        "Catalin Marinas" <catalin.marinas@....com>,
        "Will Deacon" <will@...nel.org>
Cc:     devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-serial@...r.kernel.org, soc@...nel.org, schung@...oton.com,
        mjchen@...oton.com, "Jacky Huang" <ychuang3@...oton.com>
Subject: Re: [PATCH v11 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support

On Wed, May 24, 2023, at 10:34, Jacky Huang wrote:
> On 2023/5/24 下午 03:42, Jiri Slaby wrote:
>> On 16. 05. 23, 9:52, Jacky Huang wrote:
>>> +static void ma35d1serial_config_port(struct uart_port *port, int flags)
>>> +{
>>> +    /*
>>> +     * Driver core for serial ports forces a non-zero value for port 
>>> type.
>>> +     * Write an arbitrary value here to accommodate the serial core 
>>> driver,
>>> +     * as ID part of UAPI is redundant.
>>> +     */
>>> +    port->type = 1;
>>
>> So this 1 translates to PORT_8250. Why not to use it directly? Or 
>> something more saner like PORT_16550A?
>>
> It's not actually 8250 or 16550A.
> Can we add the following definition to 
> 'include/uapi/linux/serial_core.h' and use PORT_MA35 instead?
>
> #define PORT_MA35    124

This was already in a previous version, until Greg commented
that it was probably not needed:

https://lore.kernel.org/lkml/20fc81c9-5517-ce1e-639a-3b425cf27759@gmail.com/

Since leaving port->type at PORT_UNKNOWN doesn't work, and almost
all other drivers have something in serial_core.h, it's probably
best to do the same here. Checking the other drivers showed that
drivers/tty/serial/lantiq.c is currently the only exception, it
defines PORT_LTQ_ASC locally, which causes a conflict with
PORT_SPRD.

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ