Patch "[PATCH stable 5.9 27/30] ixgbe: fix probing of multi-port devices with one MDIO" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    [PATCH stable 5.9 27/30] ixgbe: fix probing of multi-port devices with one MDIO

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ixgbe-fix-probing-of-multi-port-devices-with-one-mdio.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Sat Oct 24 10:56:06 AM CEST 2020
From: Jakub Kicinski <kuba@xxxxxxxxxx>
Date: Fri, 16 Oct 2020 16:20:06 -0700
Subject: [PATCH stable 5.9 27/30] ixgbe: fix probing of multi-port devices with one MDIO

From: Jakub Kicinski <kuba@xxxxxxxxxx>

[ Upstream commit bd7f14df9492e7d3772812a215fca66e6737e598 ]

Ian reports that after upgrade from v5.8.14 to v5.9 only one
of his 4 ixgbe netdevs appear in the system.

Quoting the comment on ixgbe_x550em_a_has_mii():
 * Returns true if hw points to lowest numbered PCI B:D.F x550_em_a device in
 * the SoC.  There are up to 4 MACs sharing a single MDIO bus on the x550em_a,
 * but we only want to register one MDIO bus.

This matches the symptoms, since the return value from
ixgbe_mii_bus_init() is no longer ignored we need to handle
the higher ports of x550em without an error.

Fixes: 09ef193fef7e ("net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()")
Reported-by: Ian Kumlien <ian.kumlien@xxxxxxxxx>
Tested-by: Ian Kumlien <ian.kumlien@xxxxxxxxx>
Acked-by: Jesse Brandeburg <jesse.brandeburg@xxxxxxxxx>
Link: https://lore.kernel.org/r/20201016232006.3352947-1-kuba@xxxxxxxxxx
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -901,15 +901,13 @@ static bool ixgbe_x550em_a_has_mii(struc
  **/
 s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw)
 {
+	s32 (*write)(struct mii_bus *bus, int addr, int regnum, u16 val);
+	s32 (*read)(struct mii_bus *bus, int addr, int regnum);
 	struct ixgbe_adapter *adapter = hw->back;
 	struct pci_dev *pdev = adapter->pdev;
 	struct device *dev = &adapter->netdev->dev;
 	struct mii_bus *bus;
 
-	bus = devm_mdiobus_alloc(dev);
-	if (!bus)
-		return -ENOMEM;
-
 	switch (hw->device_id) {
 	/* C3000 SoCs */
 	case IXGBE_DEV_ID_X550EM_A_KR:
@@ -922,16 +920,23 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *
 	case IXGBE_DEV_ID_X550EM_A_1G_T:
 	case IXGBE_DEV_ID_X550EM_A_1G_T_L:
 		if (!ixgbe_x550em_a_has_mii(hw))
-			return -ENODEV;
-		bus->read = &ixgbe_x550em_a_mii_bus_read;
-		bus->write = &ixgbe_x550em_a_mii_bus_write;
+			return 0;
+		read = &ixgbe_x550em_a_mii_bus_read;
+		write = &ixgbe_x550em_a_mii_bus_write;
 		break;
 	default:
-		bus->read = &ixgbe_mii_bus_read;
-		bus->write = &ixgbe_mii_bus_write;
+		read = &ixgbe_mii_bus_read;
+		write = &ixgbe_mii_bus_write;
 		break;
 	}
 
+	bus = devm_mdiobus_alloc(dev);
+	if (!bus)
+		return -ENOMEM;
+
+	bus->read = read;
+	bus->write = write;
+
 	/* Use the position of the device in the PCI hierarchy as the id */
 	snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mdio-%s", ixgbe_driver_name,
 		 pci_name(pdev));


Patches currently in stable-queue which might be from kuba@xxxxxxxxxx are

queue-5.9/ixgbe-fix-probing-of-multi-port-devices-with-one-mdio.patch
queue-5.9/chelsio-chtls-fix-panic-when-server-is-on-ipv6.patch
queue-5.9/socket-fix-option-so_timestamping_new.patch
queue-5.9/mptcp-fix-fallback-for-mp_join-subflows.patch
queue-5.9/tipc-fix-the-skb_unshare-in-tipc_buf_append.patch
queue-5.9/net-mptcp-make-dack4-dack8-usage-consistent-among-all-subflows.patch
queue-5.9/net-sched-act_ct-fix-adding-udp-port-mangle-operation.patch
queue-5.9/sfc-move-initialisation-of-efx-filter_sem-to-efx_init_struct.patch
queue-5.9/cxgb4-handle-4-tuple-pedit-to-nat-mode-translation.patch
queue-5.9/icmp-randomize-the-global-rate-limiter.patch
queue-5.9/net-sched-fix-suspicious-rcu-usage-while-accessing-tcf_tunnel_info.patch
queue-5.9/ibmveth-identify-ingress-large-send-packets.patch
queue-5.9/chelsio-chtls-fix-writing-freed-memory.patch
queue-5.9/net-properly-typecast-int-values-to-set-sk_max_pacing_rate.patch
queue-5.9/net-fix-pos-incrementment-in-ipv6_route_seq_next.patch
queue-5.9/chelsio-chtls-fix-socket-lock.patch
queue-5.9/ibmvnic-save-changed-mac-address-to-adapter-mac_addr.patch
queue-5.9/nfc-ensure-presence-of-nfc_attr_firmware_name-attribute-in-nfc_genl_fw_download.patch
queue-5.9/netsec-ignore-phy-mode-device-property-on-acpi-systems.patch
queue-5.9/mptcp-subflows-garbage-collection.patch
queue-5.9/net-sched-act_tunnel_key-fix-oob-write-in-case-of-ipv6-erspan-tunnels.patch
queue-5.9/mlx4-handle-non-napi-callers-to-napi_poll.patch
queue-5.9/tipc-fix-null-pointer-dereference-in-tipc_named_rcv.patch
queue-5.9/net-hdlc-in-hdlc_rcv-check-to-make-sure-dev-is-an-hdlc-device.patch
queue-5.9/nexthop-fix-performance-regression-in-nexthop-deletion.patch
queue-5.9/net-ipa-skip-suspend-resume-activities-if-not-set-up.patch
queue-5.9/net-tls-sendfile-fails-with-ktls-offload.patch
queue-5.9/chelsio-chtls-correct-netdevice-for-vlan-interface.patch
queue-5.9/ibmveth-switch-order-of-ibmveth_helper-calls.patch
queue-5.9/ipv4-restore-flowi4_oif-update-before-call-to-xfrm_lookup_route.patch
queue-5.9/net-sched-act_gate-unlock-tcfa_lock-in-tc_setup_flow_action.patch
queue-5.9/net-smc-fix-valid-dmbe-buffer-sizes.patch
queue-5.9/net-dsa-microchip-fix-race-condition.patch
queue-5.9/net-openvswitch-fix-to-make-sure-flow_lookup-is-not-preempted.patch
queue-5.9/tipc-fix-incorrect-setting-window-for-bcast-link.patch
queue-5.9/net-smc-fix-use-after-free-of-delayed-events.patch
queue-5.9/net-hdlc_raw_eth-clear-the-iff_tx_skb_sharing-flag-after-calling-ether_setup.patch
queue-5.9/selftests-forwarding-add-missing-rp_filter-configuration.patch
queue-5.9/chelsio-chtls-correct-function-return-and-return-type.patch
queue-5.9/tcp-fix-to-update-snd_wl1-in-bulk-receiver-fast-path.patch
queue-5.9/selftests-rtnetlink-load-fou-module-for-kci_test_encap_fou-test.patch
queue-5.9/mptcp-initialize-mptcp_options_received-s-ahmac.patch
queue-5.9/net-ftgmac100-fix-aspeed-ast2600-tx-hang-issue.patch
queue-5.9/r8169-fix-operation-under-forced-interrupt-threading.patch
queue-5.9/net-ethernet-mtk-star-emac-select-regmap_mmio.patch
queue-5.9/chelsio-chtls-fix-panic-when-listen-on-multiadapter.patch
queue-5.9/net-fec-fix-phy_device-lookup-for-phy_reset_after_clk_enable.patch
queue-5.9/mptcp-mptcp_kunit_tests-should-depend-on-mptcp-instead-of-selecting-it.patch
queue-5.9/net-j1939-j1939_session_fresh_new-fix-missing-initialization-of-skbcnt.patch
queue-5.9/tipc-re-configure-queue-limit-for-broadcast-link.patch
queue-5.9/socket-don-t-clear-sock_tstamp_new-when-so_timestampns-is-disabled.patch
queue-5.9/net-fec-fix-phy-init-after-phy_reset_after_clk_enable.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux