Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp225379pxv; Wed, 14 Jul 2021 02:32:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsHhWyMfN445NCSRcxxZnKKM7Yl+AdRxVUgvvwwc07b6anJD5L00XzyIHhaqaKXChQufJS X-Received: by 2002:a17:907:968a:: with SMTP id hd10mr10738771ejc.393.1626255172602; Wed, 14 Jul 2021 02:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626255172; cv=none; d=google.com; s=arc-20160816; b=HJhg3DOVajtt323wSrlHINXjqLIuR/HszcSWZqqQHuVxL1/7GnGzyBCcUhmi6JWKQx XRM2l81jyWJ4mC0PWEnZdgY8amCDF2LzTkUHIddS2eFg7JlWGcDKYZxkGcFHW4c6kxdm 8bbSWZFWa6Wvz8FFD/FamqIu/Xow/rMfVqnqPJTy/E9AEyzynQfYEAprvFmnhS5VPY/S PaJyDmR7P2foiJ2txnwZtR/yUzOazpIQPBfrhnG7unPHgiyp7z/JdzXGTo31nBIz1Dhu FVQmr22owqUqn6Hp71vJnDVq9gJTGM9YSdutIBu0vdlMWfvQgK+Ca7p71OT4nw9y0PuJ trrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qE4Oc4pDf54MqYPipJGrWcBwi2v4HJ5gD2g5obqe83M=; b=tAgVyNzqU4C8EZ3ZU14ag6wys2KOSQUhvssTmc4XixImNOaBWNUxikAb8XP2h+Qc5s hVp0ay+ki1RURMpU91nqXnpTblPm+MWyzLlq64U7o1L3MG2URErMDrJCwJzBruw3HIa2 5hTTgGwxgEbqWSlzx5yQi4L8i1P++c5dXfpDMAUo6+mcvTK5GrFJRP6LAyOgptpqPI/1 qW/qbCoDFKtmnzfm3AZgsPzTaAgdzwybkOtFds3iFEnu9S+u4D1CxL7Ld+IL79C34BjG huUbvLRumDT4CJM90pqQcGZwbH0YSF1s8WK3YTFohF/F3TuXOMsWNgnslHpbinqEeYWN 2vOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si2019205ejk.653.2021.07.14.02.32.29; Wed, 14 Jul 2021 02:32:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238701AbhGNJeZ (ORCPT + 99 others); Wed, 14 Jul 2021 05:34:25 -0400 Received: from mga06.intel.com ([134.134.136.31]:56074 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238189AbhGNJeY (ORCPT ); Wed, 14 Jul 2021 05:34:24 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10044"; a="271427886" X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="271427886" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 02:31:32 -0700 X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="571116917" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 02:31:31 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m3bEj-00DFzz-E3; Wed, 14 Jul 2021 12:31:25 +0300 Date: Wed, 14 Jul 2021 12:31:25 +0300 From: Andy Shevchenko To: Jiri Slaby Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Ralf Ramsauer Subject: Re: [PATCH v1 3/4] serial: 8250_pci: Always try MSI/MSI-X Message-ID: References: <20210713104026.58560-1-andriy.shevchenko@linux.intel.com> <20210713104026.58560-3-andriy.shevchenko@linux.intel.com> <9af24b96-8119-7ccf-f0d0-d725af80aa0b@kernel.org> <33767cf0-2104-d7aa-2da8-5a3f5f20a654@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <33767cf0-2104-d7aa-2da8-5a3f5f20a654@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 14, 2021 at 09:58:52AM +0200, Jiri Slaby wrote: > On 14. 07. 21, 8:54, Jiri Slaby wrote: > > > @@ -3994,14 +3982,9 @@ pciserial_init_ports(struct pci_dev *dev, > > > const struct pciserial_board *board) > > > ????? if (board->flags & FL_NOIRQ) { > > > ????????? uart.port.irq = 0; > > > ????? } else { > > > -??????? if (pci_match_id(pci_use_msi, dev)) { > > > -??????????? dev_dbg(&dev->dev, "Using MSI(-X) interrupts\n"); > > > -??????????? pci_set_master(dev); > > > -??????????? rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES); > > > -??????? } else { > > > -??????????? dev_dbg(&dev->dev, "Using legacy interrupts\n"); > > > -??????????? rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY); > > > -??????? } > > > +??????? pci_set_master(dev); > > > > But bus mastering is not about MSIs. I *think* it's still OK, but you > > need to document that in the commit log too. > > > > Actually, why the commit which added this code turns on bus mastering? > > Forget about this line, I wasn't woken enough. Of course, MSI (writes) to > bus need bus mastering. Yes. > In any case, I'm still not sure what happens to devices which do not support > MSI if we enable mastering on them? If they support bus mastering, it means that device may be an arbiter on the bus and initiate messages over it by its own. I'm not sure any of the existing UARTs take advantage of bus mastering for anything than MSI delivery. -- With Best Regards, Andy Shevchenko