770-net-dsa-b53-mmap-fix-device-tree-support.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. From patchwork Thu Mar 16 17:28:07 2023
  2. Content-Type: text/plain; charset="utf-8"
  3. MIME-Version: 1.0
  4. Content-Transfer-Encoding: 8bit
  5. X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?=
  6. <[email protected]>
  7. X-Patchwork-Id: 13178135
  8. X-Patchwork-Delegate: [email protected]
  9. Return-Path: <[email protected]>
  10. X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
  11. aws-us-west-2-korg-lkml-1.web.codeaurora.org
  12. Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
  13. by smtp.lore.kernel.org (Postfix) with ESMTP id 9F385C6FD19
  14. for <[email protected]>; Thu, 16 Mar 2023 17:29:18 +0000 (UTC)
  15. Received: ([email protected]) by vger.kernel.org via listexpand
  16. id S229918AbjCPR3Q (ORCPT <rfc822;[email protected]>);
  17. Thu, 16 Mar 2023 13:29:16 -0400
  18. Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44474 "EHLO
  19. lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
  20. with ESMTP id S229902AbjCPR3G (ORCPT
  21. <rfc822;[email protected]>); Thu, 16 Mar 2023 13:29:06 -0400
  22. Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com
  23. [IPv6:2a00:1450:4864:20::433])
  24. by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB3CC1D929;
  25. Thu, 16 Mar 2023 10:29:03 -0700 (PDT)
  26. Received: by mail-wr1-x433.google.com with SMTP id y14so2246984wrq.4;
  27. Thu, 16 Mar 2023 10:29:03 -0700 (PDT)
  28. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  29. d=gmail.com; s=20210112; t=1678987742;
  30. h=content-transfer-encoding:mime-version:references:in-reply-to
  31. :message-id:date:subject:cc:to:from:from:to:cc:subject:date
  32. :message-id:reply-to;
  33. bh=n/Cr1XNCJNfBa+dPDtalOZXIIV6S3ucGcQ6qFqXXuSc=;
  34. b=Ka0GgVg9azCPEBkuB0FcSt9tMYqZVblZJl1uT4KWVRAEgVcgqi44vSYpvlzc3TfFMI
  35. Ulqrk15TYN022WhQxI63v/NQum/s+yKg2G7wZYj2wHxsGAaoaLtFw8lsjoqTx8NZjsXO
  36. OIlTQqkyvDBE4t4FkO9w47A9Q2ruNzohH7Mng3Kraup/9Wyb3PGdybj/sC9/Pvnw6aPz
  37. 4Ep0ufMhgNjCk8X2buy346Tcow1zyQVQeGAZrxQzPbWcwa5rFbWGv6iD4wYbHKYm/DZV
  38. ah4lc+p0anRvAsNDlqj9fa+VY96nD4X/R7q5M3u7jTEL5YPvrOH5a8y5P5c92mWXiI7i
  39. RABA==
  40. X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  41. d=1e100.net; s=20210112; t=1678987742;
  42. h=content-transfer-encoding:mime-version:references:in-reply-to
  43. :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
  44. :subject:date:message-id:reply-to;
  45. bh=n/Cr1XNCJNfBa+dPDtalOZXIIV6S3ucGcQ6qFqXXuSc=;
  46. b=RnTP/w7AloNUBWmU5C26i+lQQMLIbND8o8gY/M87Dw22DuDdCIQQxRQypN9pzW4fmS
  47. VfNg/kh5Hydzm2bSw7AXMtT0hrbTfBZr2sB6BEKlojw3txmRVCoDGvlZLhTCRtPYGECX
  48. WqK1d37sgZ+bBEtjsPfCoVxdLpMCAjxlzLTCnwIclXsHLJg6Tsup33wu6kCFaQz1GYi1
  49. hDlc0KC9TZBXr0+3kzzXVyp0X3P30TlAamlojgoi44oa8246DcMBMtsbhiRPLUsdcIfs
  50. k+UDK2IemrCvgh5hfN3tX/DtwzoOxPjmB2FZjdxi7+6+c/abS5IYjQ8I1b30JOzDZeMs
  51. E6nA==
  52. X-Gm-Message-State: AO0yUKXFx+XUMUlLCdoCi82z77K5Ax1VNa78esJmOz5Jv6sQIYmKTgvD
  53. VrU+Kl3YdJgxxLbxpm1e8RI=
  54. X-Google-Smtp-Source:
  55. AK7set8fFjLrpZ1Ll4TW9iTex7qD+OJccAtDrfibvtBWYkVr0jRxWbwBsrVExeDl051bEIdDmJrszQ==
  56. X-Received: by 2002:a5d:61c7:0:b0:2ce:a697:75c7 with SMTP id
  57. q7-20020a5d61c7000000b002cea69775c7mr4660631wrv.33.1678987742168;
  58. Thu, 16 Mar 2023 10:29:02 -0700 (PDT)
  59. Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net.
  60. [79.146.124.255])
  61. by smtp.gmail.com with ESMTPSA id
  62. n7-20020a5d4847000000b002c5d3f0f737sm7719124wrs.30.2023.03.16.10.29.01
  63. (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
  64. Thu, 16 Mar 2023 10:29:01 -0700 (PDT)
  65. From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <[email protected]>
  66. To: [email protected], [email protected], [email protected],
  67. [email protected], [email protected], [email protected],
  68. [email protected], [email protected], [email protected],
  69. [email protected]
  70. Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <[email protected]>
  71. Subject: [PATCH v2] net: dsa: b53: mmap: fix device tree support
  72. Date: Thu, 16 Mar 2023 18:28:07 +0100
  73. Message-Id: <[email protected]>
  74. X-Mailer: git-send-email 2.30.2
  75. In-Reply-To: <[email protected]>
  76. References: <[email protected]>
  77. MIME-Version: 1.0
  78. Precedence: bulk
  79. List-ID: <netdev.vger.kernel.org>
  80. X-Mailing-List: [email protected]
  81. X-Patchwork-Delegate: [email protected]
  82. CPU port should also be enabled in order to get a working switch.
  83. Fixes: a5538a777b73 ("net: dsa: b53: mmap: Add device tree support")
  84. Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  85. Acked-by: Florian Fainelli <[email protected]>
  86. ---
  87. v2: switch to B53_N_PORTS
  88. drivers/net/dsa/b53/b53_mmap.c | 2 +-
  89. 1 file changed, 1 insertion(+), 1 deletion(-)
  90. --- a/drivers/net/dsa/b53/b53_mmap.c
  91. +++ b/drivers/net/dsa/b53/b53_mmap.c
  92. @@ -263,7 +263,7 @@ static int b53_mmap_probe_of(struct plat
  93. if (of_property_read_u32(of_port, "reg", &reg))
  94. continue;
  95. - if (reg < B53_CPU_PORT)
  96. + if (reg < B53_N_PORTS)
  97. pdata->enabled_ports |= BIT(reg);
  98. }