aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-sysfs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 0fa707e2a0f8..c5df94e86678 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -184,6 +184,21 @@ numa_node_show(struct device *dev, struct device_attribute *attr, char *buf)
184#endif 184#endif
185 185
186static ssize_t 186static ssize_t
187dma_mask_bits_show(struct device *dev, struct device_attribute *attr, char *buf)
188{
189 struct pci_dev *pdev = to_pci_dev(dev);
190
191 return sprintf (buf, "%d\n", fls64(pdev->dma_mask));
192}
193
194static ssize_t
195consistent_dma_mask_bits_show(struct device *dev, struct device_attribute *attr,
196 char *buf)
197{
198 return sprintf (buf, "%d\n", fls64(dev->coherent_dma_mask));
199}
200
201static ssize_t
187msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) 202msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf)
188{ 203{
189 struct pci_dev *pdev = to_pci_dev(dev); 204 struct pci_dev *pdev = to_pci_dev(dev);
@@ -314,6 +329,8 @@ struct device_attribute pci_dev_attrs[] = {
314#ifdef CONFIG_NUMA 329#ifdef CONFIG_NUMA
315 __ATTR_RO(numa_node), 330 __ATTR_RO(numa_node),
316#endif 331#endif
332 __ATTR_RO(dma_mask_bits),
333 __ATTR_RO(consistent_dma_mask_bits),
317 __ATTR(enable, 0600, is_enabled_show, is_enabled_store), 334 __ATTR(enable, 0600, is_enabled_show, is_enabled_store),
318 __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), 335 __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR),
319 broken_parity_status_show,broken_parity_status_store), 336 broken_parity_status_show,broken_parity_status_store),