From nobody Fri Sep 27 03:36:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XFGN10pPzz5XQ63; Fri, 27 Sep 2024 03:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XFGN041MQz4n9x; Fri, 27 Sep 2024 03:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HfprpT0MyESskz+NAflFNVHGHViSuKQjrXLXb3XJH5w=; b=f9XVtw0X6z0vsWnHiVxGlNkwfRi5ZzFnx2TPnLMdowkaLElNhqEHRGM4jZJwBgaXIF2lQ0 Z1ihqRzYPtLX4MuJ83VGC8XT0BnnQLGyzimyIPLB3ZwdN4Gtbo4d027oTx4KwHRsxHVztQ emkLiH4VDmB7aYOSBGDpB5iKmppQaSKFoTN7648qYXPzpApT9iB+Gnd6nVS+9znC4Csk/H lNDpGRuBPbwy+nQZwV+HtDev8l4y4S/x0U1N3CPEdV5sCSrAkStR+eQso4B+0Q7wWjdPNX /IeO7m7O5xGHV09bLY38kYgQM8pAKjcoVsVGcpSHpbfpl6tk7hlwOJtjNsTSIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HfprpT0MyESskz+NAflFNVHGHViSuKQjrXLXb3XJH5w=; b=U/ATmymk5z8HjpioqL4avYgjsueMpoydKDiOn/n9Mn3ZizhPEJYJ/JTP/UzZeSCuoNDO2J /XWKyOaBMTBqZ1n1gy6xgmYJbtAlcB02YRivrXygqQlIXnk+xp6nkNj+E5uycrhmuh0FM+ 5rbFuQK82grGKlsgKiu4OHH6ryBULcAOjBy+Noi7qTB8c2vnYpH6aYKhxXiZHZW/7yoB5t mylaH8iCpyu0ALzSwSppmIa8Hk0kTlniiQhlCbdJkTBfrcpTWzxmZR0ijUeV/F9rlaN1Pk SrE5YpzYLEm6l+3ChTKWhVVty0atq8/UeM+ouF8Jh0zOjjUnsPmup/Ug7u8juA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408176; a=rsa-sha256; cv=none; b=lIX+txgHrw0Ml0Ub1Z804YKWKuC6kYut7V2aip+iX+gzyEcytE3FmJLn5bBo90sIApS+jM MAsmyIsVq0yLZNfaAAKNX5H67u8t0a80BXZoot2/YK9cF3HfKWTrfkBfaXCGh1wEdE/x+r vxVRoAoUry92Rwr7YmsZT2YnNnyJqDnwv9bFTNygrOJHUEjAbdZxcZqs5hyzWg5pvlKKWz W4b9hzNI2BrBZZCELzVEV7b5ollET0gup0aHllVsJcb6EiAEISElHlEqYLtnGluN8c0Ui+ pYBpkuidK+RF9sN1PEWDAhfST36OCTh0Nig4gQVr87bfj7XqTSRV8/oG8gRqbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XFGN03bMDzP57; Fri, 27 Sep 2024 03:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48R3aGRN038978; Fri, 27 Sep 2024 03:36:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aGhD038975; Fri, 27 Sep 2024 03:36:16 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:16 GMT Message-Id: <202409270336.48R3aGhD038975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: c7bdf0c5e19b - stable/14 - ixgbe: Remove Atom C3000 HIC FW access List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c7bdf0c5e19bcf5ec0a6c591646f35ca5dd7b4dc Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c7bdf0c5e19bcf5ec0a6c591646f35ca5dd7b4dc commit c7bdf0c5e19bcf5ec0a6c591646f35ca5dd7b4dc Author: Marek Mical AuthorDate: 2024-09-20 02:59:05 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:33:17 +0000 ixgbe: Remove Atom C3000 HIC FW access DPDK commit message net/ixgbe/base: replace HIC with direct register access Unify FW access method to direct register read/writes across all Atom(R) C3000 products. Atom(R) C3000 fiber exhibited an issue with the Host Interface Command execution being locked when another LAN function attempted to acquire the SWFW sync on Manageability Host. This resulted in HIC atomicity break and bogus data being read since the other LAN function cleared all semaphores on timeout whereas HIC execution continued after unlock. Direct register IOSF access showed higher stability and reliability. Signed-off-by: Marek Mical Reviewed-by: Krzysztof Galazka Reviewed-by: Eryk Rybak Reviewed-by: Francis Racicot Reviewed-by: Alice Michael Obtained from: DPDK (e947f1e) (cherry picked from commit f56311e37d4c39b1deab6aa8523f3332c29e1ad3) --- sys/dev/ixgbe/ixgbe_x550.c | 76 ++-------------------------------------------- sys/dev/ixgbe/ixgbe_x550.h | 4 --- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 65a87883025e..8fe8d037cf31 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -799,14 +799,8 @@ s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw) /* Start with generic X550EM init */ ret_val = ixgbe_init_ops_X550EM(hw); - if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || - hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) { - mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; - mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; - } else { - mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550a; - mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550a; - } + mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; + mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a; mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a; @@ -1287,72 +1281,6 @@ s32 ixgbe_put_phy_token(struct ixgbe_hw *hw) return IXGBE_ERR_FW_RESP_INVALID; } -/** - * ixgbe_write_iosf_sb_reg_x550a - Writes a value to specified register - * of the IOSF device - * @hw: pointer to hardware structure - * @reg_addr: 32 bit PHY register to write - * @device_type: 3 bit device type - * @data: Data to write to the register - **/ -s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 data) -{ - struct ixgbe_hic_internal_phy_req write_cmd; - s32 status; - UNREFERENCED_1PARAMETER(device_type); - - memset(&write_cmd, 0, sizeof(write_cmd)); - write_cmd.hdr.cmd = FW_INT_PHY_REQ_CMD; - write_cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN; - write_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; - write_cmd.port_number = hw->bus.lan_id; - write_cmd.command_type = FW_INT_PHY_REQ_WRITE; - write_cmd.address = IXGBE_CPU_TO_BE16(reg_addr); - write_cmd.write_data = IXGBE_CPU_TO_BE32(data); - - status = ixgbe_host_interface_command(hw, (u32 *)&write_cmd, - sizeof(write_cmd), - IXGBE_HI_COMMAND_TIMEOUT, false); - - return status; -} - -/** - * ixgbe_read_iosf_sb_reg_x550a - Reads specified register of the IOSF device - * @hw: pointer to hardware structure - * @reg_addr: 32 bit PHY register to write - * @device_type: 3 bit device type - * @data: Pointer to read data from the register - **/ -s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 *data) -{ - union { - struct ixgbe_hic_internal_phy_req cmd; - struct ixgbe_hic_internal_phy_resp rsp; - } hic; - s32 status; - UNREFERENCED_1PARAMETER(device_type); - - memset(&hic, 0, sizeof(hic)); - hic.cmd.hdr.cmd = FW_INT_PHY_REQ_CMD; - hic.cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN; - hic.cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; - hic.cmd.port_number = hw->bus.lan_id; - hic.cmd.command_type = FW_INT_PHY_REQ_READ; - hic.cmd.address = IXGBE_CPU_TO_BE16(reg_addr); - - status = ixgbe_host_interface_command(hw, (u32 *)&hic.cmd, - sizeof(hic.cmd), - IXGBE_HI_COMMAND_TIMEOUT, true); - - /* Extract the register value from the response. */ - *data = IXGBE_BE32_TO_CPU(hic.rsp.read_data); - - return status; -} - /** * ixgbe_disable_mdd_X550 * @hw: pointer to hardware structure diff --git a/sys/dev/ixgbe/ixgbe_x550.h b/sys/dev/ixgbe/ixgbe_x550.h index 245e128266aa..45e4cad9f1f7 100644 --- a/sys/dev/ixgbe/ixgbe_x550.h +++ b/sys/dev/ixgbe/ixgbe_x550.h @@ -69,10 +69,6 @@ s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, u8 ver, u16 len, const char *str); s32 ixgbe_get_phy_token(struct ixgbe_hw *); s32 ixgbe_put_phy_token(struct ixgbe_hw *); -s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 data); -s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 *data); void ixgbe_disable_mdd_X550(struct ixgbe_hw *hw); void ixgbe_enable_mdd_X550(struct ixgbe_hw *hw); void ixgbe_mdd_event_X550(struct ixgbe_hw *hw, u32 *vf_bitmap);