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] [day] [month] [year] [list]
Message-ID: <20201118155551.GD1800835@lunn.ch>
Date:   Wed, 18 Nov 2020 16:55:51 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Asmaa Mnebhi <asmaa@...dia.com>
Cc:     David Thompson <davthompson@...dia.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>
Subject: Re: [PATCH net-next v3] Add Mellanox BlueField Gigabit Ethernet
 driver

> Yes mlxbf_gige_mdio_handle_phy_interrupt is used to check whether
> the interrupt is coming from GPIO12 (which is set in HW as the PHY
> INT_N pin). There is one HW interrupt line (here defined as
> MLXBF_GIGE_PHY_INT_N) shared among all the GPIOs and other
> components (like I2C).

So this is the key thing here. You have an interrupt controller, where
as the PHY subsystem wants a plain interrupt. Give the PHY subsystem a
plain interrupt, and it will do all the calls to configure the PHY,
enable interrupts in the PHY etc.

There is nothing stopping you have an interrupt controller inside an
Ethernet driver, or any other sort of driver. Take for example:

https://elixir.bootlin.com/linux/v5.10-rc4/source/drivers/net/dsa/mv88e6xxx/chip.c#L127

The Marvell Ethernet switches also have an interrupt
controller. Actually they have two nested controllers. This code
registers an irq domain with the linux core, so that the individual
interrupt sources can be used as just plain old Linux interrupts. The
irqdomain is responsible to masking and unmasking interrupts, in the
interrupt controller.

The end user of these interrupts, then just request them in the usual
way:

https://elixir.bootlin.com/linux/v5.10-rc4/source/drivers/net/dsa/mv88e6xxx/global1_atu.c#L419

So in your case, map the PHY interrupt in this domain, and pass it to
the PHY subsystem.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ