linux/drivers/pci
Trent Piepho 92425a405e PCI: Make settable sysfs attributes more consistent
PCI devices have three settable boolean attributes, enable,
broken_parity_status, and msi_bus.

The store functions for these would silently interpret "0x01" as false,
"1llogical" as true, and "true" would be (silently!) ignored and do
nothing.

This is inconsistent with typical sysfs handling of settable attributes,
and just plain doesn't make much sense.

So, use strict_strtoul(), which was created for this purpose.  The store
functions will treat a value of 0 as false, non-zero as true, and return
-EINVAL for a parse failure.

Additionally, is_enabled_store() and msi_bus_store() return -EPERM if
CAP_SYS_ADMIN is lacking, rather than silently doing nothing.  This is more
typical behavior for sysfs attributes that need a capability.

And msi_bus_store() will only print the "forced subordinate bus ..."
warning if the MSI flag was actually forced to a different value.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-07 11:12:58 -08:00
..
hotplug PCI hotplug: cpqphp: use config space PCI interrupt pin encoding 2009-01-07 11:12:47 -08:00
pcie PCI: pcie port driver: remove extra printks 2009-01-07 11:12:46 -08:00
.gitignore
access.c
bus.c PCI: Add legacy_io/mem to all busses 2009-01-07 11:12:25 -08:00
dmar.c
hotplug-pci.c
hotplug.c
htirq.c
intel-iommu.c intel-iommu: fix bit shift at DOMAIN_FLAG_P2P_MULTIPLE_DEVICES 2009-01-03 14:11:08 +01:00
intr_remapping.c
intr_remapping.h
iova.c
irq.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
Makefile PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
msi.c ACPI/PCI: PCI MSI _OSC support capabilities called when root bridge added 2009-01-07 11:12:31 -08:00
msi.h
pci-acpi.c pci-acpi: Cleanup _OSC evaluation code 2009-01-07 11:12:35 -08:00
pci-driver.c PCI: allow pci driver to support only dynids 2009-01-07 11:12:37 -08:00
pci-stub.c PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
pci-sysfs.c PCI: Make settable sysfs attributes more consistent 2009-01-07 11:12:58 -08:00
pci.c PCI: uninline pci_ioremap_bar() 2009-01-07 11:12:57 -08:00
pci.h PCI: handle PCI state saving with interrupts disabled 2009-01-07 11:12:40 -08:00
probe.c PCI: handle PCI state saving with interrupts disabled 2009-01-07 11:12:40 -08:00
proc.c PCI: check mmap range of /proc/bus/pci files too 2009-01-07 11:12:20 -08:00
quirks.c PCI: extend on the ICH motherboard IO decode quirk list 2009-01-07 11:12:39 -08:00
remove.c
rom.c
search.c
setup-bus.c PCI: make PCI bus resource messages more meaningful 2009-01-07 11:12:44 -08:00
setup-irq.c
setup-res.c PCI: Don't carp about BAR allocation failures in quiet boot 2009-01-07 11:12:42 -08:00
slot.c
syscall.c