diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-14 17:22:50 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-14 17:22:50 +0900 |
commit | 32f98f6fc194255e3a639444fe06862e628124c0 (patch) | |
tree | 938fffe42cdfcad3125631cb4d693afeae9f3669 | |
parent | 7fa8fb124d5339a4e0d20d0a97a6b63731ce97d3 (diff) | |
download | patches-32f98f6fc194255e3a639444fe06862e628124c0.tar.gz |
another pci patch is now upstream
-rw-r--r-- | d01.patch | 46 | ||||
-rw-r--r-- | p29.patch | 4 | ||||
-rw-r--r-- | pci-convert-bus-code-to-use-dev_groups.patch | 218 | ||||
-rw-r--r-- | series | 1 |
4 files changed, 25 insertions, 244 deletions
diff --git a/d01.patch b/d01.patch index 08b009b0f5e722..36c039d3685019 100644 --- a/d01.patch +++ b/d01.patch @@ -355,7 +355,7 @@ { --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c -@@ -5374,50 +5374,43 @@ static struct pci_driver megasas_pci_dri +@@ -5376,50 +5376,43 @@ static struct pci_driver megasas_pci_dri /* * Sysfs driver attributes */ @@ -417,7 +417,7 @@ { int retval = count; if(sscanf(buf,"%u",&megasas_dbg_lvl)<1){ -@@ -5427,8 +5420,7 @@ megasas_sysfs_set_dbg_lvl(struct device_ +@@ -5429,8 +5422,7 @@ megasas_sysfs_set_dbg_lvl(struct device_ return retval; } @@ -459,7 +459,7 @@ }; static const int check_condition_result = -@@ -2864,13 +2866,13 @@ static int scsi_debug_show_info(struct s +@@ -2873,13 +2875,13 @@ static int scsi_debug_show_info(struct s return 0; } @@ -476,7 +476,7 @@ { int delay; char work[20]; -@@ -2883,16 +2885,15 @@ static ssize_t sdebug_delay_store(struct +@@ -2892,16 +2894,15 @@ static ssize_t sdebug_delay_store(struct } return -EINVAL; } @@ -497,7 +497,7 @@ { int opts; char work[20]; -@@ -2912,15 +2913,14 @@ opts_done: +@@ -2921,15 +2922,14 @@ opts_done: scsi_debug_cmnd_count = 0; return count; } @@ -517,7 +517,7 @@ { int n; -@@ -2930,14 +2930,14 @@ static ssize_t sdebug_ptype_store(struct +@@ -2939,14 +2939,14 @@ static ssize_t sdebug_ptype_store(struct } return -EINVAL; } @@ -536,7 +536,7 @@ { int n; -@@ -2947,15 +2947,14 @@ static ssize_t sdebug_dsense_store(struc +@@ -2956,15 +2956,14 @@ static ssize_t sdebug_dsense_store(struc } return -EINVAL; } @@ -556,7 +556,7 @@ { int n; -@@ -2965,15 +2964,14 @@ static ssize_t sdebug_fake_rw_store(stru +@@ -2974,15 +2973,14 @@ static ssize_t sdebug_fake_rw_store(stru } return -EINVAL; } @@ -576,7 +576,7 @@ { int n; -@@ -2983,15 +2981,14 @@ static ssize_t sdebug_no_lun_0_store(str +@@ -2992,15 +2990,14 @@ static ssize_t sdebug_no_lun_0_store(str } return -EINVAL; } @@ -596,7 +596,7 @@ { int n; -@@ -3002,27 +2999,26 @@ static ssize_t sdebug_num_tgts_store(str +@@ -3011,27 +3008,26 @@ static ssize_t sdebug_num_tgts_store(str } return -EINVAL; } @@ -632,7 +632,7 @@ { int nth; -@@ -3033,15 +3029,14 @@ static ssize_t sdebug_every_nth_store(st +@@ -3042,15 +3038,14 @@ static ssize_t sdebug_every_nth_store(st } return -EINVAL; } @@ -652,7 +652,7 @@ { int n; -@@ -3052,15 +3047,14 @@ static ssize_t sdebug_max_luns_store(str +@@ -3061,15 +3056,14 @@ static ssize_t sdebug_max_luns_store(str } return -EINVAL; } @@ -672,7 +672,7 @@ { int n; -@@ -3071,27 +3065,26 @@ static ssize_t sdebug_max_queue_store(st +@@ -3080,27 +3074,26 @@ static ssize_t sdebug_max_queue_store(st } return -EINVAL; } @@ -708,7 +708,7 @@ { int n; -@@ -3104,16 +3097,15 @@ static ssize_t sdebug_virtual_gb_store(s +@@ -3113,16 +3106,15 @@ static ssize_t sdebug_virtual_gb_store(s } return -EINVAL; } @@ -729,7 +729,7 @@ { int delta_hosts; -@@ -3130,16 +3122,14 @@ static ssize_t sdebug_add_host_store(str +@@ -3139,16 +3131,14 @@ static ssize_t sdebug_add_host_store(str } return count; } @@ -750,7 +750,7 @@ { int n; -@@ -3149,40 +3139,39 @@ static ssize_t sdebug_vpd_use_hostno_sto +@@ -3158,40 +3148,39 @@ static ssize_t sdebug_vpd_use_hostno_sto } return -EINVAL; } @@ -772,7 +772,7 @@ return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dix); } -DRIVER_ATTR(dix, S_IRUGO, sdebug_dix_show, NULL); -+static DRIVER_ATTR_RO(dix); ++static DRIVER_ATTR_RO(dix) -static ssize_t sdebug_dif_show(struct device_driver *ddp, char *buf) +static ssize_t dif_show(struct device_driver *ddp, char *buf) @@ -785,7 +785,7 @@ -static ssize_t sdebug_guard_show(struct device_driver *ddp, char *buf) +static ssize_t guard_show(struct device_driver *ddp, char *buf) { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_guard); + return scnprintf(buf, PAGE_SIZE, "%u\n", scsi_debug_guard); } -DRIVER_ATTR(guard, S_IRUGO, sdebug_guard_show, NULL); +static DRIVER_ATTR_RO(guard); @@ -803,7 +803,7 @@ { ssize_t count; -@@ -3197,15 +3186,14 @@ static ssize_t sdebug_map_show(struct de +@@ -3206,15 +3195,14 @@ static ssize_t sdebug_map_show(struct de return count; } @@ -823,7 +823,7 @@ { int n; -@@ -3215,74 +3203,42 @@ static ssize_t sdebug_removable_store(st +@@ -3224,74 +3212,42 @@ static ssize_t sdebug_removable_store(st } return -EINVAL; } @@ -929,7 +929,7 @@ struct device *pseudo_primary; -@@ -3447,12 +3403,6 @@ static int __init scsi_debug_init(void) +@@ -3456,12 +3412,6 @@ static int __init scsi_debug_init(void) ret); goto bus_unreg; } @@ -942,7 +942,7 @@ init_all_queued(); -@@ -3473,9 +3423,6 @@ static int __init scsi_debug_init(void) +@@ -3482,9 +3432,6 @@ static int __init scsi_debug_init(void) } return 0; @@ -952,7 +952,7 @@ bus_unreg: bus_unregister(&pseudo_lld_bus); dev_unreg: -@@ -3497,7 +3444,6 @@ static void __exit scsi_debug_exit(void) +@@ -3506,7 +3453,6 @@ static void __exit scsi_debug_exit(void) stop_all_queued(); for (; k; k--) sdebug_remove_adapter(); diff --git a/p29.patch b/p29.patch index 8081712d15e478..bb1f2d68090129 100644 --- a/p29.patch +++ b/p29.patch @@ -77,7 +77,7 @@ vio_bus_type.bus_groups = vio_bus_groups; } #else /* CONFIG_PPC_SMLPAR */ -@@ -1549,12 +1556,13 @@ static ssize_t modalias_show(struct devi +@@ -1548,12 +1555,13 @@ static ssize_t modalias_show(struct devi return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); } @@ -96,7 +96,7 @@ void vio_unregister_device(struct vio_dev *viodev) { -@@ -1590,7 +1598,7 @@ static int vio_hotplug(struct device *de +@@ -1589,7 +1597,7 @@ static int vio_hotplug(struct device *de struct bus_type vio_bus_type = { .name = "vio", diff --git a/pci-convert-bus-code-to-use-dev_groups.patch b/pci-convert-bus-code-to-use-dev_groups.patch deleted file mode 100644 index bf93035213f601..00000000000000 --- a/pci-convert-bus-code-to-use-dev_groups.patch +++ /dev/null @@ -1,218 +0,0 @@ -From foo@baz Sun Oct 6 13:31:35 PDT 2013 -Date: Sun, 06 Oct 2013 13:31:35 -0700 -To: Greg KH <gregkh@linuxfoundation.org> -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Subject: pci: convert bus code to use dev_groups - -The dev_attrs field of struct bus_type is going away soon, dev_groups -should be used instead. This converts the PCI bus code to use the -correct field. - -Cc: Bjorn Helgaas <bhelgaas@google.com> -Cc: <linux-pci@vger.kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - drivers/pci/pci-driver.c | 2 - - drivers/pci/pci-sysfs.c | 73 +++++++++++++++++++++++++++++------------------ - drivers/pci/pci.h | 2 - - 3 files changed, 48 insertions(+), 29 deletions(-) - ---- a/drivers/pci/pci-driver.c -+++ b/drivers/pci/pci-driver.c -@@ -1319,7 +1319,7 @@ struct bus_type pci_bus_type = { - .probe = pci_device_probe, - .remove = pci_device_remove, - .shutdown = pci_device_shutdown, -- .dev_attrs = pci_dev_attrs, -+ .dev_groups = pci_dev_groups, - .bus_groups = pci_bus_groups, - .drv_groups = pci_drv_groups, - .pm = PCI_PM_OPS_PTR, ---- a/drivers/pci/pci-sysfs.c -+++ b/drivers/pci/pci-sysfs.c -@@ -42,7 +42,8 @@ field##_show(struct device *dev, struct - \ - pdev = to_pci_dev (dev); \ - return sprintf (buf, format_string, pdev->field); \ --} -+} \ -+static DEVICE_ATTR_RO(field) - - pci_config_attr(vendor, "0x%04x\n"); - pci_config_attr(device, "0x%04x\n"); -@@ -73,6 +74,7 @@ static ssize_t broken_parity_status_stor - - return count; - } -+static DEVICE_ATTR_RW(broken_parity_status); - - static ssize_t local_cpus_show(struct device *dev, - struct device_attribute *attr, char *buf) -@@ -91,7 +93,7 @@ static ssize_t local_cpus_show(struct de - buf[len] = '\0'; - return len; - } -- -+static DEVICE_ATTR_RO(local_cpus); - - static ssize_t local_cpulist_show(struct device *dev, - struct device_attribute *attr, char *buf) -@@ -110,6 +112,7 @@ static ssize_t local_cpulist_show(struct - buf[len] = '\0'; - return len; - } -+static DEVICE_ATTR_RO(local_cpulist); - - /* - * PCI Bus Class Devices -@@ -170,6 +173,7 @@ resource_show(struct device * dev, struc - } - return (str - buf); - } -+static DEVICE_ATTR_RO(resource); - - static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) - { -@@ -181,10 +185,11 @@ static ssize_t modalias_show(struct devi - (u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8), - (u8)(pci_dev->class)); - } -+static DEVICE_ATTR_RO(modalias); - --static ssize_t is_enabled_store(struct device *dev, -- struct device_attribute *attr, const char *buf, -- size_t count) -+static ssize_t enabled_store(struct device *dev, -+ struct device_attribute *attr, const char *buf, -+ size_t count) - { - struct pci_dev *pdev = to_pci_dev(dev); - unsigned long val; -@@ -208,14 +213,15 @@ static ssize_t is_enabled_store(struct d - return result < 0 ? result : count; - } - --static ssize_t is_enabled_show(struct device *dev, -- struct device_attribute *attr, char *buf) -+static ssize_t enabled_show(struct device *dev, -+ struct device_attribute *attr, char *buf) - { - struct pci_dev *pdev; - - pdev = to_pci_dev (dev); - return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); - } -+static DEVICE_ATTR_RW(enabled); - - #ifdef CONFIG_NUMA - static ssize_t -@@ -223,6 +229,7 @@ numa_node_show(struct device *dev, struc - { - return sprintf (buf, "%d\n", dev->numa_node); - } -+static DEVICE_ATTR_RO(numa_node); - #endif - - static ssize_t -@@ -232,6 +239,7 @@ dma_mask_bits_show(struct device *dev, s - - return sprintf (buf, "%d\n", fls64(pdev->dma_mask)); - } -+static DEVICE_ATTR_RO(dma_mask_bits); - - static ssize_t - consistent_dma_mask_bits_show(struct device *dev, struct device_attribute *attr, -@@ -239,6 +247,7 @@ consistent_dma_mask_bits_show(struct dev - { - return sprintf (buf, "%d\n", fls64(dev->coherent_dma_mask)); - } -+static DEVICE_ATTR_RO(consistent_dma_mask_bits); - - static ssize_t - msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) -@@ -283,6 +292,7 @@ msi_bus_store(struct device *dev, struct - - return count; - } -+static DEVICE_ATTR_RW(msi_bus); - - static DEFINE_MUTEX(pci_remove_rescan_mutex); - static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, -@@ -414,6 +424,7 @@ static ssize_t d3cold_allowed_show(struc - struct pci_dev *pdev = to_pci_dev(dev); - return sprintf (buf, "%u\n", pdev->d3cold_allowed); - } -+static DEVICE_ATTR_RW(d3cold_allowed); - #endif - - #ifdef CONFIG_PCI_IOV -@@ -499,30 +510,38 @@ static struct device_attribute sriov_num - sriov_numvfs_show, sriov_numvfs_store); - #endif /* CONFIG_PCI_IOV */ - --struct device_attribute pci_dev_attrs[] = { -- __ATTR_RO(resource), -- __ATTR_RO(vendor), -- __ATTR_RO(device), -- __ATTR_RO(subsystem_vendor), -- __ATTR_RO(subsystem_device), -- __ATTR_RO(class), -- __ATTR_RO(irq), -- __ATTR_RO(local_cpus), -- __ATTR_RO(local_cpulist), -- __ATTR_RO(modalias), -+struct attribute *pci_dev_attrs[] = { -+ &dev_attr_resource.attr, -+ &dev_attr_vendor.attr, -+ &dev_attr_device.attr, -+ &dev_attr_subsystem_vendor.attr, -+ &dev_attr_subsystem_device.attr, -+ &dev_attr_class.attr, -+ &dev_attr_irq.attr, -+ &dev_attr_local_cpus.attr, -+ &dev_attr_local_cpulist.attr, -+ &dev_attr_modalias.attr, - #ifdef CONFIG_NUMA -- __ATTR_RO(numa_node), -+ &dev_attr_numa_node.attr, - #endif -- __ATTR_RO(dma_mask_bits), -- __ATTR_RO(consistent_dma_mask_bits), -- __ATTR(enable, 0600, is_enabled_show, is_enabled_store), -- __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), -- broken_parity_status_show,broken_parity_status_store), -- __ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store), -+ &dev_attr_dma_mask_bits.attr, -+ &dev_attr_consistent_dma_mask_bits.attr, -+ &dev_attr_enabled.attr, -+ &dev_attr_broken_parity_status.attr, -+ &dev_attr_msi_bus.attr, - #if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) -- __ATTR(d3cold_allowed, 0644, d3cold_allowed_show, d3cold_allowed_store), -+ &dev_attr_d3cold_allowed.attr, - #endif -- __ATTR_NULL, -+ NULL, -+}; -+ -+static const struct attribute_group pci_dev_group = { -+ .attrs = pci_dev_attrs, -+}; -+ -+const struct attribute_group *pci_dev_groups[] = { -+ &pci_dev_group, -+ NULL, - }; - - static struct attribute *pcibus_attrs[] = { ---- a/drivers/pci/pci.h -+++ b/drivers/pci/pci.h -@@ -153,7 +153,7 @@ static inline int pci_no_d1d2(struct pci - return (dev->no_d1d2 || parent_dstates); - - } --extern struct device_attribute pci_dev_attrs[]; -+extern const struct attribute_group *pci_dev_groups[]; - extern const struct attribute_group *pcibus_groups[]; - extern struct device_type pci_dev_type; - extern const struct attribute_group *pci_bus_groups[]; @@ -24,7 +24,6 @@ xen-disable-clock-timer-when-shutting-down.patch -pci-convert-bus-code-to-use-dev_groups.patch driver-core-remove-struct-bus_type.dev_attrs.patch |