From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29F9622F74D; Sun, 7 Sep 2025 20:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757275940; cv=none; b=pMHHE4CO0nsbk6fvkgplOS9HfJf2XDZEIHHM5NItSbJbcJf+xnLs7zLY7qKmQTtkVuXmxcnbHGf1FbM+FHeWI1TNx9YMz/fs+6NZM/vldgxtgoWq/ifYnpHLgJbERaR5HV3IWElECefoyA6QAbATj45FvrfhQ9ezrlUU05kRmt0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757275940; c=relaxed/simple; bh=V08e2t77JNH3v3Uo84deDsZzTfGOWIZycvf34JbVWkE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S+dyzFRqS9dSx66R0vyXiOxIqrvSsXKksjlgWktjXe0c856AxDej5o3URnIv67X8EdBTPHZ/QEMeB9NtDgow2oSEsttGlXRtzsNJbUY6RY8gCKneoJAC4YjBnyPqIlUv+DAqTiJf3KVm3wLw77RnseSNKZCUbmc74l2b25RWkng= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AT9ecns/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AT9ecns/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BC5CC4CEF0; Sun, 7 Sep 2025 20:12:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757275940; bh=V08e2t77JNH3v3Uo84deDsZzTfGOWIZycvf34JbVWkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AT9ecns/vpO9Tx4o11XNxwUNIwxpcHOG+9gMw07o0jHnRwS9ea1cevBSodplqLx4J 4+IWM3Pjrm3BlZllwZ7BNpB8c6xsrcpQ268DGN5yrqy6ZmqXHyXZI0jsZ9D/D2Xfpb Dkikx9K/uxmmTtPXTe5bu2V6H5k/9vCjv0YSAUIc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alok Tiwari , Simon Horman , Jacob Keller , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 13/64] xirc2ps_cs: fix register access when enabling FullDuplex Date: Sun, 7 Sep 2025 21:57:55 +0200 Message-ID: <20250907195603.771300477@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250907195603.394640159@linuxfoundation.org> References: <20250907195603.394640159@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alok Tiwari [ Upstream commit b79e498080b170fd94fc83bca2471f450811549b ] The current code incorrectly passes (XIRCREG1_ECR | FullDuplex) as the register address to GetByte(), instead of fetching the register value and OR-ing it with FullDuplex. This results in an invalid register access. Fix it by reading XIRCREG1_ECR first, then or-ing with FullDuplex before writing it back. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alok Tiwari Reviewed-by: Simon Horman Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250827192645.658496-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/xircom/xirc2ps_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xircom/xirc2ps_cs.c b/drivers/net/ethernet/xircom/xirc2ps_cs.c index 10f42b7df8b35..efbd337b8bb8e 100644 --- a/drivers/net/ethernet/xircom/xirc2ps_cs.c +++ b/drivers/net/ethernet/xircom/xirc2ps_cs.c @@ -1582,7 +1582,7 @@ do_reset(struct net_device *dev, int full) msleep(40); /* wait 40 msec to let it complete */ } if (full_duplex) - PutByte(XIRCREG1_ECR, GetByte(XIRCREG1_ECR | FullDuplex)); + PutByte(XIRCREG1_ECR, GetByte(XIRCREG1_ECR) | FullDuplex); } else { /* No MII */ SelectPage(0); value = GetByte(XIRCREG_ESR); /* read the ESR */ -- 2.50.1