Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5584210imm; Tue, 12 Jun 2018 10:00:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKLb+xYAqQ6f95+W32Qa5SPw0w79+EURaaRrYdGI47bKwf9wiPyondZndhS+b1CmyLYVH68 X-Received: by 2002:a62:5d83:: with SMTP id n3-v6mr1259079pfj.68.1528822820255; Tue, 12 Jun 2018 10:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528822820; cv=none; d=google.com; s=arc-20160816; b=LI5w0mYHt4eTs8oBtBBuISbDTHkfHvw8me23ui4HxSP0IHhVG/x5A90D2Ix/7osxjg lqr5vOdhFFXAA2VYESBJ4y7X9bpZB+07y3QG+WdtEwRhB4y5YoqTU851DNik4nqoWG8m DIff2QCUv8iZiv0cy9osp/+PCrWv+pSLWujYvyQU5zXijG/x9cDB/1MZk0hBd0S0FR48 s2Lv5KLOsC3lco4JUIg/tE04CkoUBCZIFYcP4SxV8jhqVw4T/AYCtSxS/doxx7SPK+vz E334JeLFI+SY5FXMaFaPaQL15aYBmG9A8heUGXjhwteI2n3H7i3JV93b6qUqo+jrzWXB digQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=DRy9pplTN8nTNEvnCsKAF87Dwe6SuTgxGlK8B9jr/es=; b=ZDaz/TrX+7oVtZjXs3ZXXkOFnz3qcvy5v4rmrQcwlqBuhkS1AntaWLHudCCMshAs9v 6rnLiSafzx3hrqepeZdlETlDzM4NQvpcpefv0qBrQpeKKkeJ9/+Vsv1wrJF/U0rWxJ8I /ax75TvGT4H83sHkSD9+31G0gwdwOO+B8nJuknTukIzd9mZd+k9qKVzbDwsX/DN7yywQ wOlnUO6QI2Vkwa6sCGL1kv8j7k+EkYf8cEt19ptvXk4L2xI3eZYF65ZOkgFkrESpNumI dX4g1pF7TlU936pM0Rk+KGJlqFHVUEjA75gbFIFBly2CKdwkf5QwuSHp5OX9+7JrWSX5 PNmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=NSDlJSaf; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a34-v6si522368pld.281.2018.06.12.10.00.05; Tue, 12 Jun 2018 10:00:20 -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=@broadcom.com header.s=google header.b=NSDlJSaf; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935197AbeFLQ65 (ORCPT + 99 others); Tue, 12 Jun 2018 12:58:57 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:47032 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933693AbeFLQ6y (ORCPT ); Tue, 12 Jun 2018 12:58:54 -0400 Received: by mail-qt0-f193.google.com with SMTP id h5-v6so24329089qtm.13 for ; Tue, 12 Jun 2018 09:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DRy9pplTN8nTNEvnCsKAF87Dwe6SuTgxGlK8B9jr/es=; b=NSDlJSaft2hOnuRqlC1IEJdrm62XImm4kx5DqMxUThV9/NVgpB/qbi4X4HoGN9/er4 zyHHBHZeiz5EuU86nzJz3Rvdh+5G+CWMkHRn24bvSQ90/28FcgzSbeWWRM0IsprYxt48 oa9wb0KbCqmSZU1gl5VTlUvIQZ14sjigK5gMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DRy9pplTN8nTNEvnCsKAF87Dwe6SuTgxGlK8B9jr/es=; b=mxKCKmwZ1a/GEDd3HVaxaolaNzpIYBTiojYDza58ed6eTDOaCH67gdSbzO3vCEAe/l YKThN9DOLL4EYMI8V+BqeRYT1BvqTkXODZtbp+hfnKxfrsYMEVV09o3lHPYa3x1Er+fk DLaqyPPJwgmGgZJPjMyZWLVFO4zZmlOg8Fkn7Piv5xiRs3Y9xnChmC74QThLTYtBKGng fghyIr7sQS9Y/1AXpdNKIp+wCeXXcWD43StbJLjgON8ZZpUrJ4p6CQnBfQp4dvSr5Ghm CWhMLpdqvFTi5s2gjOk7opnsntWPxzTFc9RiquUvA+LpGfFAZteORz6ZZmgFMOzvW34m mzqQ== X-Gm-Message-State: APt69E1f9+59rVnCFOUYc+I26KCca1FHyAi7Mk5LBGJhDeOsFbKGSdGu bObW9bfCSdfNUbZGTr/QhTvwpw== X-Received: by 2002:a0c:d175:: with SMTP id c50-v6mr1286476qvh.1.1528822733458; Tue, 12 Jun 2018 09:58:53 -0700 (PDT) Received: from [10.136.8.248] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id z64-v6sm472061qke.66.2018.06.12.09.58.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 09:58:52 -0700 (PDT) Subject: Re: [PATCH v2 3/5] PCI: iproc: Disable MSI parsing in certain PAXC blocks To: poza@codeaurora.org Cc: Lorenzo Pieralisi , Bjorn Helgaas , Bjorn Helgaas , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, linux-pci-owner@vger.kernel.org References: <1528762867-16823-1-git-send-email-ray.jui@broadcom.com> <1528762867-16823-4-git-send-email-ray.jui@broadcom.com> <8f6d7771baec3f56e0ccf5efd0efe2a2@codeaurora.org> From: Ray Jui Message-ID: Date: Tue, 12 Jun 2018 09:58:49 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <8f6d7771baec3f56e0ccf5efd0efe2a2@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/12/2018 1:29 AM, poza@codeaurora.org wrote: > On 2018-06-12 05:51, Ray Jui wrote: >> The internal MSI parsing logic in certain revisions of PAXC root >> complexes does not work properly and can casue corruptions on the >> writes. They need to be disabled >> >> Signed-off-by: Ray Jui >> Reviewed-by: Scott Branden >> --- >>  drivers/pci/host/pcie-iproc.c | 34 ++++++++++++++++++++++++++++++++-- >>  1 file changed, 32 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/pci/host/pcie-iproc.c >> b/drivers/pci/host/pcie-iproc.c >> index 680f6b1..0804aa2 100644 >> --- a/drivers/pci/host/pcie-iproc.c >> +++ b/drivers/pci/host/pcie-iproc.c >> @@ -1197,10 +1197,22 @@ static int iproc_pcie_paxb_v2_msi_steer(struct >> iproc_pcie *pcie, u64 msi_addr) >>      return ret; >>  } >> >> -static void iproc_pcie_paxc_v2_msi_steer(struct iproc_pcie *pcie, u64 >> msi_addr) >> +static void iproc_pcie_paxc_v2_msi_steer(struct iproc_pcie *pcie, u64 >> msi_addr, >> +                     bool enable) >>  { >>      u32 val; >> >> +    if (!enable) { >> +        /* >> +         * Disable PAXC MSI steering. All write transfers will be >> +         * treated as non-MSI transfers >> +         */ >> +        val = iproc_pcie_read_reg(pcie, IPROC_PCIE_MSI_EN_CFG); >> +        val &= ~MSI_ENABLE_CFG; >> +        iproc_pcie_write_reg(pcie, IPROC_PCIE_MSI_EN_CFG, val); >> +        return; > can be dropped. No it cannot be dropped. Please review the code carefully.