Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4231227ybb; Tue, 7 Apr 2020 03:27:50 -0700 (PDT) X-Google-Smtp-Source: APiQypKD4OONyizvIjlmLUO/NZWXKxrOqylEzX7T9nYRbJ8gD1UG5lny4WLCRkBPxqdsyCeiVOIQ X-Received: by 2002:a05:6830:1c65:: with SMTP id s5mr985498otg.25.1586255269943; Tue, 07 Apr 2020 03:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586255269; cv=none; d=google.com; s=arc-20160816; b=V9WI4PGof5eYu6ClgExe5YigIK5PzHp2ubnXc3GTxAA/DcRbkpT6npoo9CxStIsKhn LDrUkm49coEHaAmyd99+lArMzo09yOSU4cgYGtA0gqVk/JzdvAK7zDTr7VI+8QVu69cK 23BwnwhQ+dfdn6ldM1HuH2HPAAEk69XFgOSAnWF2Y/BDw37rafOJaq0/CCqIjqDZX5pN ZEmoILhlGve7bGycXdt9OdKxH5NIVzRsjzTZZqcJ6qUvG+d5ylsJheaw+B6MXv+NmBWV WCuIL91Vd9P6UXfvBDwEjmTcwBrQSPtozc8Ag7TtnteSKyj/1rlA+C5tZnPvqhpi1NiK j69Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tG4y0BswY2nRZ32wQU8+8zifUG0W5N2tZkMq0Ft5Its=; b=KPUEnqq6bUEXWofUwB23ymFMiulJMx7TXsl7DuppsMTryZWyPGw0h2OHA+eTM8qVNF 5i6VfLeupoR+qj5MlDH/EDxhobHrQIo6/ampop8w3JANnZh7O9Vme6sU6RFZ2rHrxQSd zxF8cTSpSkBtosIYjKnCz2cw6/8WDuTi8BIr+oaK01G8BCDC4k7rwiGJ9ZSfXDyhQU9a q4vBZMbHIaArbZqBXmkxrQfzrQ1GkJzEljHefKbSAM08/iHSfgoMnZfpus4XQYsLg6S4 lMapYwZHfF5afiKbHEpD5q1jmDsdbt1ijPSCvc96aRnGmtQ5wd+fqBpvCpo7sQkNFwyi ii1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gD1Ka6J3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si489421oip.112.2020.04.07.03.27.38; Tue, 07 Apr 2020 03:27:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gD1Ka6J3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728718AbgDGK0A (ORCPT + 99 others); Tue, 7 Apr 2020 06:26:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:36788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbgDGKZ7 (ORCPT ); Tue, 7 Apr 2020 06:25:59 -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 CC57C2074F; Tue, 7 Apr 2020 10:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586255159; bh=T/gxYwkr6ionYU18uJNrAb27pxUoEUdBjhg+6cFkrBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gD1Ka6J3FZEsXxCoy3ry5ZyQNWuTikxihuhpEZXfR9bujCDPGGYLUr4GpZAiRZuXz 1IN3Te/Hib8UbVsjF+WAyORCffy0ibvuhq8DZE2UhGiz5bur7suT9Cm/s6VchoZuhf wozjvkHYLzmQhsAUyhinCQXd/lkIi+2+ZCubrrcs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mordechay Goodstein , Luca Coelho Subject: [PATCH 5.5 36/46] iwlwifi: yoyo: dont add TLV offset when reading FIFOs Date: Tue, 7 Apr 2020 12:22:07 +0200 Message-Id: <20200407101503.317654678@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200407101459.502593074@linuxfoundation.org> References: <20200407101459.502593074@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mordechay Goodstein commit a5688e600e78f9fc68102bf0fe5c797fc2826abe upstream. The TLV offset is only used to read registers, while the offset used for the FIFO addresses are hard coded in the driver and not given by the TLV. If we try to apply the TLV offset when reading the FIFOs, we'll read from invalid addresses, causing the driver to hang. Signed-off-by: Mordechay Goodstein Fixes: 8d7dea25ada7 ("iwlwifi: dbg_ini: implement Rx fifos dump") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151129.fbab869c26fa.I4ddac20d02f9bce41855a816aa6855c89bc3874e@changeid Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -8,7 +8,7 @@ * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2015 - 2017 Intel Deutschland GmbH - * Copyright(c) 2018 - 2019 Intel Corporation + * Copyright(c) 2018 - 2020 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -31,7 +31,7 @@ * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2015 - 2017 Intel Deutschland GmbH - * Copyright(c) 2018 - 2019 Intel Corporation + * Copyright(c) 2018 - 2020 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1407,11 +1407,7 @@ static int iwl_dump_ini_rxf_iter(struct goto out; } - /* - * region register have absolute value so apply rxf offset after - * reading the registers - */ - offs += rxf_data.offset; + offs = rxf_data.offset; /* Lock fence */ iwl_write_prph_no_grab(fwrt->trans, RXF_SET_FENCE_MODE + offs, 0x1);