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: <20220927185654.vcgilhapjhprmu67@skbuf>
Date:   Tue, 27 Sep 2022 21:56:54 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Colin Foster <colin.foster@...advantage.com>
Cc:     linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, netdev@...r.kernel.org,
        Russell King <linux@...linux.org.uk>,
        Linus Walleij <linus.walleij@...aro.org>,
        UNGLinuxDriver@...rochip.com,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Lee Jones <lee@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH v3 net-next 08/14] net: dsa: felix: update init_regmap to
 be string-based

On Tue, Sep 27, 2022 at 11:43:46AM -0700, Colin Foster wrote:
> I see your point. The init_regmap(name) interface collides with the
> *_io_res arrays. Changing the init_regmap() interface doesn't really
> change the underlying issue - *_io_res[] is the thing that you're
> suggesting to go.
> 
> I'm interested to see where this is going. I feel like it might be a
> constant names[] array, then felix_vsc9959_init_regmap() where the
> specific name <> resource mapping happens. Maybe a common
> felix_match_resource_to_name(name, res, len)?
> 
> That would definitely remove the need for exporting the
> vsc7512_*_io_res[] arrays, which I didn't understand from your v1
> review.

Yes, having an array of strings, meaning which targets are required by
each driver, is what I wanted to see. Isn't that what I said in v1?

> vsc9959_init_regmap(name)
> {
>     /* more logic for port_io_res, but you get the point */
>     return felix_init_regmap(name, &vsc9959_target_io_res, TARGET_MAX);
> }

Yeah, wait a minute, you'll see.

> > I am also sorry for the mess that the felix driver currently is in, and
> > the fact that some things may have confused you.
> 
> Vladimir, you might be the last person on earth who owes me an apology.

I have some more comments on the other patches. This driver looks weird
not only because the hardware is complicated and all over the place, but
also because you're working on a driver (felix) which was designed
around NXP variations of Microchip hardware, and this really transpires
especially around the probing and dt-bindings. The goal, otherwise,
would be for you to have dt-bindings for vsc7512 that are identical to
what Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
provides. It doesn't matter how the driver probes, that is to some
extent independent from how the drivers look like. Anyway, I'm getting
ahead of myself.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ