From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754394AbYI3Wbh (ORCPT ); Tue, 30 Sep 2008 18:31:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753036AbYI3Wb2 (ORCPT ); Tue, 30 Sep 2008 18:31:28 -0400 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:39842 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752599AbYI3Wb0 (ORCPT ); Tue, 30 Sep 2008 18:31:26 -0400 Date: Tue, 30 Sep 2008 16:31:24 -0600 From: Alex Chiang To: "Zhao, Yu" Cc: "linux-pci@vger.kernel.org" , Jesse Barnes , Randy Dunlap , Grant Grundler , Matthew Wilcox , Roland Dreier , Greg KH , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" Subject: Re: [PATCH 3/6 v3] PCI: support ARI capability Message-ID: <20080930223124.GB13611@ldl.fc.hp.com> Mail-Followup-To: Alex Chiang , "Zhao, Yu" , "linux-pci@vger.kernel.org" , Jesse Barnes , Randy Dunlap , Grant Grundler , Matthew Wilcox , Roland Dreier , Greg KH , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Zhao, Yu : > Add Alternative Routing-ID Interpretation (ARI) support. > > Cc: Jesse Barnes > Cc: Randy Dunlap > Cc: Grant Grundler > Cc: Alex Chiang > Cc: Matthew Wilcox > Cc: Roland Dreier > Cc: Greg KH > Signed-off-by: Yu Zhao > > --- > drivers/pci/pci.c | 31 +++++++++++++++++++++++++++++++ > drivers/pci/pci.h | 12 ++++++++++++ > drivers/pci/probe.c | 3 +++ > include/linux/pci.h | 1 + > include/linux/pci_regs.h | 14 ++++++++++++++ > 5 files changed, 61 insertions(+), 0 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index 400d3b3..fe9efc4 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -1260,6 +1260,37 @@ void pci_pm_init(struct pci_dev *dev) > } > } > > +/** > + * pci_ari_init - turn on ARI forwarding if it's supported > + * @dev: the PCI device > + */ > +void pci_ari_init(struct pci_dev *dev) > +{ > + int pos; > + u32 cap; > + u16 ctrl; > + > + if (!dev->is_pcie || (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && > + dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) > + return; > + > + pos = pci_find_capability(dev, PCI_CAP_ID_EXP); > + if (!pos) > + return; > + > + pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap); > + > + if (!(cap & PCI_EXP_DEVCAP2_ARI)) > + return; > + > + pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &ctrl); > + ctrl |= PCI_EXP_DEVCTL2_ARI; > + pci_write_config_word(dev, pos + PCI_EXP_DEVCTL2, ctrl); > + > + dev->ari_enabled = 1; > + dev_info(&dev->dev, "ARI forwarding enabled.\n"); This is user-visible, so my questions are: 1) Does this really add value for the user? Or is this just more noise? 2) Is this output string informative enough for the user? Thanks. /ac