From patchwork Sun May 7 19:03:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 9715525 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 887DB60380 for ; Sun, 7 May 2017 22:05:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AB6B200F5 for ; Sun, 7 May 2017 22:05:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F2B126C9B; Sun, 7 May 2017 22:05:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 054AB200F5 for ; Sun, 7 May 2017 22:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756674AbdEGWFL (ORCPT ); Sun, 7 May 2017 18:05:11 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36814 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756623AbdEGWFF (ORCPT ); Sun, 7 May 2017 18:05:05 -0400 Received: by mail-wm0-f65.google.com with SMTP id u65so11687147wmu.3; Sun, 07 May 2017 15:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eQIg2LQCMX8CcWDEjfJYTzlKf3GQz0qSu1AFbdQm73M=; b=mZ3/hYLbt6oBWsvwaZkQCnjtjAPGJUd8oM4hMFjqJ9B1bRByCIbGZ5mXtcxaWM3fnH Kn0YEfdjLU2ZOpwnOCvjPzpXJVpfJSJJX1091Rr1RfkfH4GoEJytFvm4yoe+NpcHnEHD mAxWPlGhC9N/V+XHUzBFAh8eV1Dy7ve2WHJZOI4+AvSkwr6I5ZP9BcuJEBDKsJBTwx9h Ap2dmFQUvf/0fUBORFlZwvFsopPGGqOe2mC1MHPSH88y1DJhpJj/NPtrnsS9q7kUnE8K uwtg1ZXanlUqVtoSSaj6Fofh7piMq57VXXwZaIHcgBH2aCxKj6OYLRqoZ7a1j98VXyQ6 i5tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eQIg2LQCMX8CcWDEjfJYTzlKf3GQz0qSu1AFbdQm73M=; b=Ml1FFSb+Z8VRjkLbI3YxmLuiCY1h1C6YSntJpdVt4Kr/mbRSOKTr/TyCyjkse+UR1t eh6TaC57Rd/VpGm6lYWSQuHEwDJ2CyCYX1yOVv0rrsXxKrGsJhUKbOc3wSm+V0ObiGCg NhVdOaMYLDMK6eo/IMRvAq5EtK1xR7fjpP1w8vOK++AuUL1eR+MTGNF06uBFhmiOXuMO a4u+LkPiPam4MOEKDTD8p1GSVIt3EqxaxRy4PkdPJT3H6YCc/qh9i54n/7peqTL2PaJK YgU5bLAwRBHH3LhC9gnO+SKY49CB2jJcTkMm8ARBlJ9QP6Z/8JJlcUo5XcfUP7PlN5zF O5aA== X-Gm-Message-State: AODbwcDxS/Hl77DGJhkLBWRcCfOBOjhgL69mt2eqp0MCkTlQvzRoXwDw g5Sustigq1OrJSZSL80PMA== X-Received: by 10.28.153.11 with SMTP id b11mr10870704wme.141.1494183864149; Sun, 07 May 2017 12:04:24 -0700 (PDT) Received: from localhost.localdomain (92.40.248.139.threembb.co.uk. [92.40.248.139]) by smtp.gmail.com with ESMTPSA id t85sm10711291wmt.23.2017.05.07.12.04.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 May 2017 12:04:23 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Malcolm Priestley , stable@vger.kernel.org Subject: [PATCH 3/3] staging: rtl8192e rtl92e_get_eeprom_size Fix read size of EPROM_CMD. Date: Sun, 7 May 2017 20:03:53 +0100 Message-Id: <20170507190353.3195-3-tvboxspy@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170507190353.3195-1-tvboxspy@gmail.com> References: <20170507190353.3195-1-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP EPROM_CMD is 2 byte aligned on PCI map so calling with rtl92e_readl will return invalid data so use rtl92e_readw. The device is unable to select the right eeprom type. Signed-off-by: Malcolm Priestley Cc: --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index e03d0a3a6dcc..1c6ed5b2a6f9 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -625,7 +625,7 @@ void rtl92e_get_eeprom_size(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); RT_TRACE(COMP_INIT, "===========>%s()\n", __func__); - curCR = rtl92e_readl(dev, EPROM_CMD); + curCR = rtl92e_readw(dev, EPROM_CMD); RT_TRACE(COMP_INIT, "read from Reg Cmd9346CR(%x):%x\n", EPROM_CMD, curCR); priv->epromtype = (curCR & EPROM_CMD_9356SEL) ? EEPROM_93C56 :