Message ID | 20200310124531.980660280@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=QSPG=43=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBFCCC10F27 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 13:14:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B4E0724649 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 13:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583846065; bh=fERsDUe64ag3rRBlFOK8qlkJoh2Bnqtp8Cox5nzveJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Ao3NWXLMIP2k3AYlCtF4TzmVr6N8IRUMKsyZhf/cH0o4yKoDdNFD7y+2yq4CK0Btg uR44/V1om6n6F5I7Sa4F+sme2qy5PBU4HNoU6ri59+/fl4jWrKfNu5dE2P47HqvDq9 9u7S5ve+3bc+z5jKVFxXJmgKl9O8R4Pe5pipef2E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731868AbgCJNOY (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 10 Mar 2020 09:14:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:38088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731867AbgCJNOY (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 10 Mar 2020 09:14:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0851220409; Tue, 10 Mar 2020 13:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583846063; bh=fERsDUe64ag3rRBlFOK8qlkJoh2Bnqtp8Cox5nzveJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ujsVJtnfLqFiDKJzd8b/D/lP6PeiNx29dNs4zJWVFVZbAKWbE734YLsmtnqjU9q88 HEWWf5QC+WNMvpI6vlk9q/3mwSor2MYw2NQ/++B5rmB+chGsrSUr8gu3yqtDI3ZeMM x0qRyK9RQHlclG5Gt+9hsdJ0EJtcpZB/HMUxbo4A= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Marek Vasut <marex@denx.de>, "David S. Miller" <davem@davemloft.net>, Lukas Wunner <lukas@wunner.de>, Petr Stetiar <ynezz@true.cz>, YueHaibing <yuehaibing@huawei.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.19 22/86] net: ks8851-ml: Fix 16-bit IO operation Date: Tue, 10 Mar 2020 13:44:46 +0100 Message-Id: <20200310124531.980660280@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310124530.808338541@linuxfoundation.org> References: <20200310124530.808338541@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index aff1619fb0e0e..9de59facec218 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c @@ -485,7 +485,7 @@ static int msg_enable; static u16 ks_rdreg16(struct ks_net *ks, int offset) { - ks->cmd_reg_cache = (u16)offset | ((BE1 | BE0) << (offset & 0x02)); + ks->cmd_reg_cache = (u16)offset | ((BE3 | BE2) >> (offset & 0x02)); iowrite16(ks->cmd_reg_cache, ks->hw_addr_cmd); return ioread16(ks->hw_addr); } @@ -500,7 +500,7 @@ static u16 ks_rdreg16(struct ks_net *ks, int offset) static void ks_wrreg16(struct ks_net *ks, int offset, u16 value) { - ks->cmd_reg_cache = (u16)offset | ((BE1 | BE0) << (offset & 0x02)); + ks->cmd_reg_cache = (u16)offset | ((BE3 | BE2) >> (offset & 0x02)); iowrite16(ks->cmd_reg_cache, ks->hw_addr_cmd); iowrite16(value, ks->hw_addr); }