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]
Date:	Sat, 4 Jan 2014 23:24:29 +0100
From:	Rafał Miłecki <zajec5@...il.com>
To:	Hauke Mehrtens <hauke@...ke-m.de>
Cc:	David Miller <davem@...emloft.net>,
	Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 5/5] bgmac: add support for Northstar SoC (BCM4707, BCM53018)

2014/1/4 Hauke Mehrtens <hauke@...ke-m.de>:
> @@ -909,9 +926,14 @@ static void bgmac_chip_reset(struct bgmac *bgmac)
>                         flags |= BGMAC_BCMA_IOCTL_SW_RESET;
>         }
>
> -       bcma_core_enable(core, flags);
> +       /* 3GMAC: for BCM4707, only do core reset at bgmac_probe() */
> +       if (ci->id != BCMA_CHIP_ID_BCM4707)
> +               bcma_core_enable(core, flags);

You can do better :) Why calculate flags if you're not going to use
them? Put that calculation code inside non-4707 block. You can also
move "u32 flags = 0;" to that block.


> @@ -1427,8 +1454,16 @@ static int bgmac_probe(struct bcma_device *core)
>         }
>         bgmac->cmn = core->bus->drv_gmac_cmn.core;
>
> -       bgmac->phyaddr = core->core_unit ? sprom->et1phyaddr :
> -                        sprom->et0phyaddr;
> +       /*
> +        * Too much can go wrong in scanning MDC/MDIO playing "whos my phy?" .
> +        * Instead, explicitly use the phy address 30.
> +        */
> +       if (ci->id == BCMA_CHIP_ID_BCM4707 || ci->id == BCMA_CHIP_ID_BCM53018)
> +               bgmac->phyaddr = BGMAC_PHY_NOREGS;
> +       else
> +               bgmac->phyaddr = core->core_unit ? sprom->et1phyaddr :
> +                                sprom->et0phyaddr;

I'm not sure if we really want that. AFAIU it's just a workaround of
the lack of NVRAM (and SPROM in the result) on BCM4707 (& family).
After adding NVRAM support you're have to revert that change, am I
right? Also this hack is not magically making 4707 work, as there are
many other issues (also related to the lack of NVRAM), correct?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ