1. 30 5月, 2014 1 次提交
  2. 28 5月, 2014 3 次提交
    • G
      PCI: Fix return value from pci_user_{read,write}_config_*() · d97ffe23
      Gavin Shan 提交于
      The PCI user-space config accessors pci_user_{read,write}_config_*() return
      negative error numbers, which were introduced by commit 34e32072
      ("PCI: handle positive error codes").  That patch converted all positive
      error numbers from platform-specific PCI config accessors to -EINVAL, which
      means the callers don't know anything about the specific cause of the
      failure.
      
      The patch fixes the issue by converting the positive PCIBIOS_* error values
      to generic negative error numbers with pcibios_err_to_errno().
      
      [bhelgaas: changelog]
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NGreg Thelen <gthelen@google.com>
      d97ffe23
    • H
      PCI: Turn pcibios_penalize_isa_irq() into a weak function · a43ae58c
      Hanjun Guo 提交于
      pcibios_penalize_isa_irq() is only implemented by x86 now, and legacy ISA
      is not used by some architectures.  Make pcibios_penalize_isa_irq() a
      __weak function to simplify the code.  This removes the need for new
      platforms to add stub implementations of pcibios_penalize_isa_irq().
      
      [bhelgaas: changelog, comments]
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      a43ae58c
    • A
      PCI: Test for std config alias when testing extended config space · 78916b00
      Alex Williamson 提交于
      When a PCI-to-PCIe bridge is stacked on a PCIe-to-PCI bridge, we can have
      PCIe endpoints masked by a conventional PCI bus.  This makes the extended
      config space of the PCIe endpoint inaccessible.  The PCIe-to-PCI bridge is
      supposed to handle any type 1 configuration transactions where the extended
      config offset bits are non-zero as an Unsupported Request rather than
      forward it to the secondary interface.  As noted here, there are a couple
      known offenders to this rule.  These bridges drop the extended offset bits,
      resulting in the conventional config space being aliased many times across
      the extended config space.  For Intel NICs, this alias often seems to
      expose a bogus SR-IOV cap.
      
      Stacking bridges may seem like an uncommon scenario, but note that any
      conventional PCI slot in a modern PC is already the secondary interface of
      an onboard PCIe-to-PCI bridge.  The user need only add a PCI-to-PCIe
      adapter and PCIe device to encounter this problem.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      78916b00
  3. 23 5月, 2014 1 次提交
  4. 01 5月, 2014 1 次提交
  5. 30 4月, 2014 4 次提交
    • B
      PCI: Fix use of uninitialized MPS value · 1e358f94
      Bjorn Helgaas 提交于
      If "pcie_bus_config == PCIE_BUS_PERFORMANCE", we don't initialize "smpss",
      so we pass a pointer to garbage into pcie_bus_configure_set(), where we
      compute "mps" based on the garbage.  We then pass the garbage "mps" to
      pcie_write_mps(), which ignores it in the PCIE_BUS_PERFORMANCE case.
      
      Coverity isn't smart enough to deduce that we ignore the garbage (it's a
      lot to expect from a human, too), so initialize "smpss" to a safe value in
      all cases.
      
      Found by Coverity (CID 146454).
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1e358f94
    • B
      PCI: Remove dead code · efdd4070
      Bjorn Helgaas 提交于
      "pdev" can never be NULL here, so remove the test.
      
      Found by Coverity (CID 744313).
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      efdd4070
    • B
      PCI: Remove unnecessary __ref annotations · 10874f5a
      Bjorn Helgaas 提交于
      Some PCI functions used to be marked __devinit.  When CONFIG_HOTPLUG was
      not set, these functions were discarded after boot.  A few callers of these
      __devinit functions were marked __ref to indicate that they could safely
      call the __devinit functions even though the callers were not __devinit.
      
      But CONFIG_HOTPLUG and __devinit are now gone, and the need for the __ref
      annotations is also gone, so remove them.  Relevant historical commits:
      
        54b956b9 Remove __dev* markings from init.h
        a8e4b9c1 PCI: add generic pci_hp_add_bridge()
        0ab2b57f PCI: fix section mismatch warning in pci_scan_child_bus
        451124a7 PCI: fix 4x section mismatch warnings
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      10874f5a
    • B
      PCI: Fail new_id for vendor/device values already built into driver · 8895d3bc
      Bandan Das 提交于
      While using the sysfs new_id interface, the user can unintentionally feed
      incorrect values if the driver static table has a matching entry.  This is
      possible since only the device and vendor fields are mandatory and the rest
      are optional.  As a result, store_new_id() will fill in default values that
      are then passed on to the driver and can have unintended consequences.
      
      As an example, consider the ixgbe driver and the 82599EB network card:
      
        echo "8086 10fb" > /sys/bus/pci/drivers/ixgbe/new_id
      
      This will pass a pci_device_id with driver_data = 0 to ixgbe_probe(), which
      uses that zero to index a table of card operations.  The zeroth entry of
      the table does *not* correspond to the 82599 operations.
      
      This change returns an error if the user attempts to add a dynid for a
      vendor/device combination for which a static entry already exists.
      However, if the user intentionally wants a different set of values, she
      must provide all the 7 fields and that will be accepted.
      
      [bhelgaas: drop KVM text since the problem isn't KVM-specific]
      Signed-off-by: NBandan Das <bsd@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAlex Williamson <alex.williamson@redhat.com>
      8895d3bc
  6. 29 4月, 2014 1 次提交
  7. 26 4月, 2014 1 次提交
  8. 15 4月, 2014 1 次提交
  9. 13 4月, 2014 2 次提交
    • M
      sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue · fd1232b2
      Mikulas Patocka 提交于
      This patch fixes I/O errors with the sym53c8xx_2 driver when the disk
      returns QUEUE FULL status.
      
      When the controller encounters an error (including QUEUE FULL or BUSY
      status), it aborts all not yet submitted requests in the function
      sym_dequeue_from_squeue.
      
      This function aborts them with DID_SOFT_ERROR.
      
      If the disk has full tag queue, the request that caused the overflow is
      aborted with QUEUE FULL status (and the scsi midlayer properly retries
      it until it is accepted by the disk), but the sym53c8xx_2 driver aborts
      the following requests with DID_SOFT_ERROR --- for them, the midlayer
      does just a few retries and then signals the error up to sd.
      
      The result is that disk returning QUEUE FULL causes request failures.
      
      The error was reproduced on 53c895 with COMPAQ BD03685A24 disk
      (rebranded ST336607LC) with command queue 48 or 64 tags.  The disk has
      64 tags, but under some access patterns it return QUEUE FULL when there
      are less than 64 pending tags.  The SCSI specification allows returning
      QUEUE FULL anytime and it is up to the host to retry.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd1232b2
    • V
      drivers: net: xen-netfront: fix array initialization bug · 810d8ced
      Vincenzo Maffione 提交于
      This patch fixes the initialization of an array used in the TX
      datapath that was mistakenly initialized together with the
      RX datapath arrays. An out of range array access could happen
      when RX and TX rings had different sizes.
      Signed-off-by: NVincenzo Maffione <v.maffione@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      810d8ced
  10. 12 4月, 2014 18 次提交
  11. 11 4月, 2014 7 次提交