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: <CAOMZO5CWX9dhcg_v3LgPvK97yESAi_kS72e0=vjiB+-15C5J1g@mail.gmail.com>
Date:   Tue, 18 Feb 2020 10:24:42 -0300
From:   Fabio Estevam <festevam@...il.com>
To:     Andy Duan <fugang.duan@....com>
Cc:     David Miller <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "andrew@...n.ch" <andrew@...n.ch>
Subject: Re: [EXT] Re: [PATCH net-next] net: fec: Use a proper ID allocation scheme

Hi Andy,

On Tue, Feb 18, 2020 at 3:51 AM Andy Duan <fugang.duan@....com> wrote:

> > What about:
> >
> > 1) unbind fec0
> > 2) unbind fec1
> > 3) bind fec0
> >
> > It doesn't work even with the IDR scheme.
>
> Not only such case, instance#A (maybe fec0 or fec1) depends on instance#B (maybe fec1 or fec0),
> Unbind instance#B firstly has problem.
> Bind instance#A firstly also has problem.

Yes, I do see the error now with the sequence suggested by David.

I have also noticed in the fec_main.c comments:

/*
* The i.MX28 dual fec interfaces are not equal.
* Here are the differences:
*
*  - fec0 supports MII & RMII modes while fec1 only supports RMII
*  - fec0 acts as the 1588 time master while fec1 is slave
*  - external phys can only be configured by fec0
*
* That is to say fec1 can not work independently. It only works
* when fec0 is working. The reason behind this design is that the
* second interface is added primarily for Switch mode.
*
* Because of the last point above, both phys are attached on fec0
* mdio interface in board design, and need to be configured by
* fec0 mii_bus.
*/

Should we prevent unbind operation from this driver like this?

diff --git a/drivers/net/ethernet/freescale/fec_main.c
b/drivers/net/ethernet/freescale/fec_main.c
index 4432a59904c7..1d348c5d0794 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3793,6 +3793,7 @@ static struct platform_driver fec_driver = {
                .name   = DRIVER_NAME,
                .pm     = &fec_pm_ops,
                .of_match_table = fec_dt_ids,
+               .suppress_bind_attrs = true
        },
        .id_table = fec_devtype,
        .probe  = fec_probe,

Please advise.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ