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: <87r33r3tkw.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
Date:   Wed, 25 Jan 2017 13:03:43 -0500
From:   Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:     Gregory CLEMENT <gregory.clement@...e-electrons.com>,
        Andrew Lunn <andrew@...n.ch>
Cc:     David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390

Andrew,

Vivien Didelot <vivien.didelot@...oirfairelinux.com> writes:

> Since several chips have this issue, we can introduce a u16 physid2_mask
> member in the mv88e6xxx_info structure and move the check in
> mv88e6xxx_phy_read() so that the logic of device (as in Global2) helpers
> are not affected by such (necessary) hack. Something like:
>
>     static int mv88e6xxx_phy_read(struct mv88e6xxx_chip *chip, int phy,
>                                   int reg, u16 *val)
>     {
>         ...
>
>         err = chip->info->ops->phy_read(chip, bus, addr, reg, val);
>         if (err)
>             return err;
>
>         if (reg == MII_PHYSID2 && chip->info->physid2_mask) {
>             /* Some internal PHYs don't have a model number,
>              * so return the switch family model number directly.
>              */
>             if (!(*val & chip->info->physid2_mask))
>                 *val |= chip->info->prod_num;

          if (reg == MII_PHYSID2 && (*val & 0xfff0) == 0)
              *val |= chip->info->prod_num << 4;

then. Do you agree?

>         }
>
>         return 0;
>     }

Thanks,

        Vivien

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ