072-bgmac-fix-device-initialization-on-Northstar-SoCs-co.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 21697336d46b71dd031f29e426dda0b1e7f06cc0 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  3. Date: Wed, 11 Feb 2015 18:06:34 +0100
  4. Subject: [PATCH] bgmac: fix device initialization on Northstar SoCs (condition
  5. typo)
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. On Northstar (Broadcom's ARM architecture) we need to manually enable
  10. all cores. Code for that is already in place, but the condition for it
  11. was wrong.
  12. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  13. Signed-off-by: David S. Miller <davem@davemloft.net>
  14. ---
  15. drivers/net/ethernet/broadcom/bgmac.c | 5 +++--
  16. 1 file changed, 3 insertions(+), 2 deletions(-)
  17. --- a/drivers/net/ethernet/broadcom/bgmac.c
  18. +++ b/drivers/net/ethernet/broadcom/bgmac.c
  19. @@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct
  20. /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
  21. static int bgmac_probe(struct bcma_device *core)
  22. {
  23. + struct bcma_chipinfo *ci = &core->bus->chipinfo;
  24. struct net_device *net_dev;
  25. struct bgmac *bgmac;
  26. struct ssb_sprom *sprom = &core->bus->sprom;
  27. @@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_devic
  28. bgmac_chip_reset(bgmac);
  29. /* For Northstar, we have to take all GMAC core out of reset */
  30. - if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
  31. - core->id.id == BCMA_CHIP_ID_BCM53018) {
  32. + if (ci->id == BCMA_CHIP_ID_BCM4707 ||
  33. + ci->id == BCMA_CHIP_ID_BCM53018) {
  34. struct bcma_device *ns_core;
  35. int ns_gmac;