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 PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. 2008-07-02 11:25:54 -07:00
bus.c PCI: Add legacy_io/mem to all busses 2009-01-07 11:12:25 -08:00
dmar.c calculate agaw for each iommu 2009-01-03 14:02:18 +01:00
hotplug-pci.c
hotplug.c
htirq.c genirq: remove sparse irq code 2008-10-16 16:53:15 +02:00
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 sparseirq: fix !SMP building, #2 2008-12-17 00:15:55 +01:00
intr_remapping.h VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
iova.c VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
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 PCI: fix sparse warning in pci_remove_behind_bridge 2008-10-20 10:54:25 -07:00
rom.c PCI: remove excess kernel-doc notation 2008-11-03 14:32:46 -08:00
search.c PCI: Fix reference counting bug 2008-10-22 16:42:35 -07:00
setup-bus.c PCI: make PCI bus resource messages more meaningful 2009-01-07 11:12:44 -08:00
setup-irq.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
setup-res.c PCI: Don't carp about BAR allocation failures in quiet boot 2009-01-07 11:12:42 -08:00
slot.c PCI: stop leaking 'slot_name' in pci_create_slot 2008-12-09 14:36:03 -08:00
syscall.c