pci-v4.12-fixes-2

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZRArnAAoJEFmIoMA60/r8BWgQAIMHVd2PSWmr8IxOiD2F62Dn
 F7TV/55+sPFtvMUKOuaUSBz5dzWpKdAA53gni3CF9Z3BhCHxUBK5Kz0KUhD2hgAZ
 JaN9vmHaL447gdveo0shVSCR0Ewt4wOErbEIJLk/FIDpY9HolTcaDcD41TrCvdyo
 s2h8PfR5vgy64DRpU8E/fepLl0EIzT0qCCyBLrgLVAYRhh4ERR4kBw6jWKgfLpjr
 LZX+Bp0HFCmkCbXBwCd7OX898MNK6PEeiZ+uxjdPsM2WZUTsQgfl3v7aTGmSQA3a
 m8KmI+iMZKztWrODR/oh/ff+Qcu1mUzJpIrGs/Mvnny8ndeKmEuI1Mawg3ZYhNBb
 GdgvaLN2ZA6kRnXRD6a8BQqC8daDBZApsdEoSncNTzIT5LXJsqYd2drKAzFg34a/
 p3z1nlkY5LCaSJV7UmIEFdRwuXse1zCmWr+OqRPeperkTRQwIxR+7mB7m/Zj4jVA
 rINC3d9lejsR0f4WGOYVnG5tIbKke/U5e8jFBRZZLrvj7MssNqb00s98lgFo7sG3
 9PwX9P+tSUUIMg9IVqnV7VZU2bmFRqRt0jQrADZl6s+nG9TMgNZBzzZrBPyafhpf
 rywHgD9wUIUfT+qORa6rgeOKZgmtJHLRrkbZr4eIzaPdSf3EF6oTgDxqN2yPUX1g
 C2XyqWqkZ/qHp1JhY2mz
 =EvfY
 -----END PGP SIGNATURE-----

Merge tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:

 - fix another PCI_ENDPOINT build error (merged for v4.12)

 - fix error codes added to config accessors for v4.12

* tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: endpoint: Select CRC32 to fix test build error
  PCI: Make error code types consistent in pci_{read,write}_config_*
This commit is contained in:
Linus Torvalds 2017-06-17 06:53:20 +09:00
commit 1439ccf73d
2 changed files with 7 additions and 6 deletions

View File

@ -896,7 +896,7 @@ int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val)
{
if (pci_dev_is_disconnected(dev)) {
*val = ~0;
return -ENODEV;
return PCIBIOS_DEVICE_NOT_FOUND;
}
return pci_bus_read_config_byte(dev->bus, dev->devfn, where, val);
}
@ -906,7 +906,7 @@ int pci_read_config_word(const struct pci_dev *dev, int where, u16 *val)
{
if (pci_dev_is_disconnected(dev)) {
*val = ~0;
return -ENODEV;
return PCIBIOS_DEVICE_NOT_FOUND;
}
return pci_bus_read_config_word(dev->bus, dev->devfn, where, val);
}
@ -917,7 +917,7 @@ int pci_read_config_dword(const struct pci_dev *dev, int where,
{
if (pci_dev_is_disconnected(dev)) {
*val = ~0;
return -ENODEV;
return PCIBIOS_DEVICE_NOT_FOUND;
}
return pci_bus_read_config_dword(dev->bus, dev->devfn, where, val);
}
@ -926,7 +926,7 @@ EXPORT_SYMBOL(pci_read_config_dword);
int pci_write_config_byte(const struct pci_dev *dev, int where, u8 val)
{
if (pci_dev_is_disconnected(dev))
return -ENODEV;
return PCIBIOS_DEVICE_NOT_FOUND;
return pci_bus_write_config_byte(dev->bus, dev->devfn, where, val);
}
EXPORT_SYMBOL(pci_write_config_byte);
@ -934,7 +934,7 @@ EXPORT_SYMBOL(pci_write_config_byte);
int pci_write_config_word(const struct pci_dev *dev, int where, u16 val)
{
if (pci_dev_is_disconnected(dev))
return -ENODEV;
return PCIBIOS_DEVICE_NOT_FOUND;
return pci_bus_write_config_word(dev->bus, dev->devfn, where, val);
}
EXPORT_SYMBOL(pci_write_config_word);
@ -943,7 +943,7 @@ int pci_write_config_dword(const struct pci_dev *dev, int where,
u32 val)
{
if (pci_dev_is_disconnected(dev))
return -ENODEV;
return PCIBIOS_DEVICE_NOT_FOUND;
return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val);
}
EXPORT_SYMBOL(pci_write_config_dword);

View File

@ -5,6 +5,7 @@
config PCI_EPF_TEST
tristate "PCI Endpoint Test driver"
depends on PCI_ENDPOINT
select CRC32
help
Enable this configuration option to enable the test driver
for PCI Endpoint.