Wei Yang | 30 Jun 09:37 2015

[PATCH] PCI: Don't update VF's BAR

VF BARs are RO zero, so updating VF BARs will not take any effect.
See the SR-IOV spec r1.1, sec

Signed-off-by: Wei Yang <weiyang <at> linux.vnet.ibm.com>
 drivers/pci/setup-res.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 232f925..334b394 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
 <at>  <at>  -37,6 +37,13  <at>  <at>  void pci_update_resource(struct pci_dev *dev, int resno)
 	struct resource *res = dev->resource + resno;

+	 * Per SRIOV SPEC, VF BARs are RO zero.
+	 * If this is a VF, just return.
+	 */
+	if (dev->is_virtfn)
+		return;
+	/*
 	 * Ignore resources for unimplemented BARs and unused resource slots
 	 * for 64 bit BARs.


(Continue reading)

Wei Yang | 30 Jun 03:16 2015

[PATCH V2 0/4] PCI: code clean up on pci configuration space

This series is a clean up in the pci subsystem when accessing the pci
configuration space.

The first one is to re-use the PCI_FIND_CAP_TTL to limit the times iterating
in pci configuration space.

The next three are to use the exact type to access the pci cap and pcie ext

Tested on x86 and powerpc on top of v4.1.

The original thread could be referenced in below link:

   * define PCI_FIND_CAP_TTL in drivers/pci/pci.h instead of
   * split the change for return position check from second one, and make the
     forth patch

Wei Yang (4):
  PCI: move PCI_FIND_CAP_TTL to pci.h and use it in quirks
  PCI: use u8 to represent pci configuration space pos and cap
  PCI: use u16 to represent pci express extended capabilities pos and
  PCI: consolidate return value check for pci_find_(ext_)capability

 drivers/pci/iov.c    |    2 +-
 drivers/pci/pci.c    |   68 +++++++++++++++++++++++++-------------------------
(Continue reading)

Kevin Wilson | 29 Jun 23:03 2015

Patches to linux-pci - against which git tree?

Against which git tree are patches which are sent to this mailing list
(linux-pci) being prepared?


Loan Offer at 0.2%

Guarantee and trusted loan at 0.2% to process a loan with us please send 

Name:Country:Amount:Duration:Purpose For Loan:Phone Number:Loan Firm Loan Offer at 0.2%. Contact us
for more 

This email has been checked for viruses by Avast antivirus software.

SF Markus Elfring | 28 Jun 16:52 2015

[PATCH] PCI-iproc: Delete unnecessary checks before two function calls

From: Markus Elfring <elfring <at> users.sourceforge.net>
Date: Sun, 28 Jun 2015 16:42:04 +0200

The functions phy_exit() and phy_power_off() test whether their argument
is NULL and then return immediately.
Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring <at> users.sourceforge.net>
 drivers/pci/host/pcie-iproc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index d77481e..f875821 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
 <at>  <at>  -239,12 +239,9  <at>  <at>  err_rm_root_bus:

-	if (pcie->phy)
-		phy_power_off(pcie->phy);
+	phy_power_off(pcie->phy);
-	if (pcie->phy)
-		phy_exit(pcie->phy);
+	phy_exit(pcie->phy);
(Continue reading)

Luis R. Rodriguez | 25 Jun 03:34 2015

[PATCH v5 0/3] atyfb: address MTRR corner case

From: "Luis R. Rodriguez" <mcgrof <at> suse.com>


Forgive me for the TL;DR, I'm afraid I need to be crystal clear on this
patchset as its the most complex in the entire series. The skinny is that this
patchset addresses a complex work around with APIs now merged upstream going in
for v4.2, the driver maintainer hasn't followed up with the driver changes for
over a month and no one else has provided Acks for these device driver
changes [0]. We have a few options:

0) Sit and wait for a driver maintainer to review this
1) Merge this as-is and hope for reports
2) go with the nopat requirement as with the ivtv and ipath driver

I'd prefer to merge this as is, and only if reports come back with
issues should we then consider 2) as we'd then have at least a well
documented work effort required for this transformation. This device
driver is also old, so I don't expect much reports anyway.


The TL;DR:

As part of the long haul effort to rid the world of direct MTRR use [1] we've
have had to also work on alternative solutions which can co-exist with PAT
interfaces. Most of the transformation of device drivers to use PAT was fairly
easy (TM): so long as ioremap_wc() was used we could then convert over the
drivers using mtrr_add() over to the arch-agnostic and PAT-aware (ignored when
PAT is enabled) arch_phys_wc_add(). This was typically easy to do, for instance
(Continue reading)

Luis R. Rodriguez | 25 Jun 03:22 2015

[PATCH v8 0/9] pci: add pci_iomap_wc() and pci_ioremap_wc_bar()

From: "Luis R. Rodriguez" <mcgrof <at> suse.com>


This patchset is part of the long haul of series that addresses removal of
direct use of MTRR and transforms drivers over to use PAT interfaces when
available [0]. Other than this series there is only one more pending series for
that effort, the other one being the atyfb device driver specific changes which
no one has replied to for over one month and I'll soon repost and hope that
Andrew might pick up. The patches in this series were originally split in two
series but I've combined them now given all Acks have been collected and they
are all related. Tomi has provided his Acked-by for all device driver changes.
Bjorn had originally reviewed this series and was comfortable with all the code
except for the use of EXPORT_SYMBOL_GPL() despite new clarifications of how we
can use this for new symbols and our preference for it on new PAT interfaces
[1], despite this Bjorn has clarified he's comfortable with this going in
through another maintainer and in particular Arnd [2]. The v7 series was posted
addressing Arnd, Arnd provided his Acked-by for all PCI and devres changes but
noted he's on parental leave and not taking any patches for arm-soc or
asm-generic until he's back at work in around 3 months from now [2] so he
suggested to see if I could find another maintainer to have these go through.

This v8 goes unmodified, except for the devres commit, since those routines
are not yet used by any device driver for now I've just skipped exporting
the symbols but did note that if they will be it must be exported with
EXPORT_SYMBOL_GPL(). Once we have a driver need them upstream we can export

Although I had test compiled this before just to be safe I went ahead and
successfully test-compiled this set with allmodconfig, specially since I've now
(Continue reading)

Benjamin Herrenschmidt | 25 Jun 03:12 2015

Re: [Xen-devel] [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants

On Wed, 2015-06-24 at 17:58 -0700, Luis R. Rodriguez wrote:
> On Wed, Jun 24, 2015 at 5:52 PM, Benjamin Herrenschmidt
> <benh <at> kernel.crashing.org> wrote:
> > On Thu, 2015-06-25 at 02:08 +0200, Luis R. Rodriguez wrote:
> >>
> >> OK thanks I'll proceed with these patches then.
> >>
> >> > As for user mappings,
> >>
> >> Which APIs were you considering in this regard BTW?
> >
> > mmap of the generic /sys/bus/pci/.../resource*
> Like? Got a demo patch in mind ? :)

Nope. I was just thinking out loud. Today I have yet to see a problem
with what we do so ...


Bjorn Helgaas | 22 Jun 17:15 2015

Re: [GIT PULL] PCI changes for v4.2

[+cc linux-pci, linux-kernel]

On Mon, Jun 22, 2015 at 10:14 AM, Bjorn Helgaas <bhelgaas <at> google.com> wrote:
> Hi Linus,
> Here are the PCI changes for v4.2.
> Bjorn
> The following changes since commit 5ebe6afaf0057ac3eaeb98defd5456894b446d22:
>   Linux 4.1-rc2 (2015-05-03 19:22:23 -0700)
> are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v4.2-changes
> for you to fetch changes up to 207b074f82c6790f008bfe055c37b47047eb2122:
>   Merge branches 'pci/host-xgene' and 'pci/hotplug' into next (2015-06-18 17:56:45 -0500)
> ----------------------------------------------------------------
> PCI changes for the v4.2 merge window:
>   Enumeration
>     - Move pci_ari_enabled() to global header (Alex Williamson)
>     - Account for ARI in _PRT lookups (Alex Williamson)
>     - Remove unused pci_scan_bus_parented() (Yijing Wang)
(Continue reading)

'LEUNG CHEUNG' | 21 Jun 19:05 2015


I need your assistance to transfer $22,500,000.00 Dollars from Hong Kong 
Bjorn Helgaas | 20 Jun 00:42 2015

[PATCH 0/6] PCI: Fix class code usage

PCI class code management is confusing.  The pci_dev.class element contains
a three-byte value: base class/sub-class/interface.

The PCI_BASE_CLASS_* definitions are a single byte, i.e., dev->class >> 16.
The PCI_CLASS_* definitions are either two or three bytes, i.e., either
dev->class >> 8 or just dev->class.

We had several places where we used a two-byte PCI_CLASS_* definition but
forgot to shift it to the right place.  These patches fix that for NCR
53c810, TI816X, and Intel USB devices.


Bjorn Helgaas (6):
      PCI: Use PCI_CLASS_SERIAL_USB instead of bare number
      PCI: Fix generic NCR 53c810 class code quirk
      PCI: Fix TI816X class code quirk
      PCI: Fix Intel generic reset quirk class code check
      PCI: Simplify reset_intel_generic_dev()
      PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes

 arch/x86/pci/fixup.c |   13 ----------
 drivers/pci/probe.c  |    2 +-
 drivers/pci/quirks.c |   64 ++++++++++++++++++++++++++++----------------------
 3 files changed, 37 insertions(+), 42 deletions(-)