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  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]
Date:   Sun, 26 Apr 2020 16:31:16 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Roelof Berg <rberg@...g-solutions.de>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Bryan Whitehead <bryan.whitehead@...rochip.com>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Russell King <linux@...linux.org.uk>,
        Thomas Gleixner <tglx@...utronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lan743x: Added fixed_phy support

On Sun, Apr 26, 2020 at 01:43:18AM +0200, Roelof Berg wrote:
> +# All the following symbols are dependent on LAN743X - do not repeat
> +# that for each of the symbols.
> +if LAN743X
> +
> +choice LAN743x_MII_MODE
> +	prompt "MII operation mode"
> +	default LAN743x_MII_MODE_DEFAULT
> +	depends on LAN743X
> +	help
> +	 Defines the R/G/MII operation mode of the MAC of lan743.
> +
> +config LAN743x_MII_MODE_DEFAULT
> +	bool "Device default"
> +	help
> +	 The existing internal device configuration, which may have come from
> +	 EEPROM or OTP, will remain unchanged.
> +
> +config LAN743x_MII_MODE_RGMII
> +	bool "RGMII"
> +	help
> +	 RGMII (Reduced GMII) will be enabled when the driver is loaded.
> +
> +config LAN743x_MII_MODE_GMII
> +	bool "G/MII"
> +	help
> +	 GMII (in case of 100 mbit) or MII (in case of 10 mbit) will be enabled when
> +	 the driver is loaded.
> +
> +endchoice

Hi Roelof

You should not be putting this sort of configuration into Kconfig. You
want one kernel to be able to drive all LAN743x instances. Think of a
Debian kernel, etc.

So what are you trying to achieve here? What is the big picture?

You have a PCI device with a LAN743x connected to an Ethernet switch?
You need the MII interface between the LAN743x and the switch to be
configured to some specific speed? But you only want to do this for
your device. How can you identify your device? Do you set the PCI
vendor/device IDs to something unique?

You can add to the end of lan743x_pcidev_tbl[] your vendor/device
ID. In the probe function you can detect your own vendor/product ID
and then configure things as you need. 

    Andrew

Powered by blists - more mailing lists