summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds2007-05-0416-111/+116
|\ | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: remove "struct subsystem" as it is no longer needed sysfs: printk format warning DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt platform: reorder platform_device_del Driver core: fix show_uevent from taking up way too much stack
| * remove "struct subsystem" as it is no longer neededGreg Kroah-Hartman2007-05-0215-107/+105
| | | | | | | | | | | | | | | | | | | | | | We need to work on cleaning up the relationship between kobjects, ksets and ktypes. The removal of 'struct subsystem' is the first step of this, especially as it is not really needed at all. Thanks to Kay for fixing the bugs in this patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * platform: reorder platform_device_delJean Delvare2007-05-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In platform_device_del(), we currently delete the device resources first, then we delete the device itself. This causes a (minor) bug to occur when one unregisters a platform device before unregistering its platform driver, and the driver is requesting (in .probe()) and releasing (in .remove()) a resource of the device. The device resources are already gone by the time the driver gets the chance to release the resources it had been requesting, causing an error like: Trying to free nonexistent resource <0000000000000295-0000000000000296> If the platform driver is unregistered first, the problem doesn't occur, as the driver will have the opportunity to release the resources it had requested before the device resources themselves are released. It's a bit odd that unregistering the driver first or the device first doesn't lead to the same result. So I believe that we should delete the device first in platform_device_del(). I've searched the git history and found that it used to be the case before 2.6.8, but was changed here: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commitdiff;h=96ef7b3689936ee1e64b711511342026a8ce459c > 2004/07/14 16:09:44-07:00 dtor_core > [PATCH] Driver core: Fix OOPS in device_platform_unregister > > Driver core: platform_device_unregister should release resources first > and only then call device_unregister, otherwise if there > are no more references to the device it will be freed and > the fucntion will try to access freed memory. However we now have an explicit call to put_device() at the end of platform_device_unregister() so I guess the original problem no longer exists and it is safe to revert that change. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Driver core: fix show_uevent from taking up way too much stackGreg Kroah-Hartman2007-05-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Declaring an array of PAGE_SIZE does bad things for people running with 4k stacks... Thanks to Tilman Schmidt for tracking this down. Cc: Tilman Schmidt <tilman@imap.cc> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds2007-05-04116-1152/+796
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (59 commits) PCI: Free resource files in error path of pci_create_sysfs_dev_files() pci-quirks: disable MSI on RS400-200 and RS480 PCI hotplug: Use menuconfig objects PCI: ZT5550 CPCI Hotplug driver fix PCI: rpaphp: Remove semaphores PCI: rpaphp: Ensure more pcibios_add/pcibios_remove symmetry PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically PCI: rpaphp: Document is_php_dn() PCI: rpaphp: Document find_php_slot() PCI: rpaphp: Rename rpaphp_register_pci_slot() to rpaphp_enable_slot() PCI: rpaphp: refactor tail call to rpaphp_register_slot() PCI: rpaphp: remove rpaphp_set_attention_status() PCI: rpaphp: remove print_slot_pci_funcs() PCI: rpaphp: Remove setup_pci_slot() PCI: rpaphp: remove a call that does nothing but a pointer lookup PCI: rpaphp: Remove another wrappered function PCI: rpaphp: Remve another call that is a wrapper PCI: rpaphp: remove a function that does nothing but wrap debug printks PCI: rpaphp: Remove un-needed goto PCI: rpaphp: Fix a memleak; slot->location string was never freed ...
| * | PCI: Free resource files in error path of pci_create_sysfs_dev_files()Michael Ellerman2007-05-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | pci_create_sysfs_dev_files() should call pci_remove_resource_files() in its error path, to match the call it makes to pci_create_resource_files(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | pci-quirks: disable MSI on RS400-200 and RS480Tejun Heo2007-05-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSI doesn't work on RS400-200 and RS480 requiring pci=nomsi kernel boot parameter for ahci to work. This patch disables MSI on those chips. http://thread.gmane.org/gmane.linux.ide/17820 http://thread.gmane.org/gmane.linux.ide/17516 https://bugzilla.novell.com/show_bug.cgi?id=263893 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI hotplug: Use menuconfig objectsJan Engelhardt2007-05-021-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Cc: Scott Murray <scottm@somanetworks.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: ZT5550 CPCI Hotplug driver fixScott Murray2007-05-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cc: Philip Guo <pg@cs.stanford.edu> Here's a small patch against the current git tree for the ZT5550 CPCI hotplug driver to fix an issue with port freeing that Philip Guo found. Signed-off-by: Scott Murray <scottm@somanetworks.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Remove semaphoresLinas Vepstas2007-05-021-35/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the semaphores from the get routine. These do not appear to be protecting anything that I can make out, and they also do not seem to be required by the hotplug driver. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Ensure more pcibios_add/pcibios_remove symmetryLinas Vepstas2007-05-021-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to pcibios_add should be symmetric with calls to pcibios_remove. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Use pcibios_remove_pci_devices() symmetricallyLinas Vepstas2007-05-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At first blush, the disable_slot() routine does not look at all like its symmetric with the enable_slot() routine; as it seems to call a very different set of routines. However, this is easily fixed: pcibios_remove_pci_devices() does the right thing. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Document is_php_dn()Linas Vepstas2007-05-021-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix up the documentation: the rpaphp_add_slot() does not actually handle embedded slots: in fact, it ignores them. Fix the flow of control in the routine that checks for embedded slots. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Document find_php_slot()Linas Vepstas2007-05-021-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document some of the interaction between dlpar and hotplug. viz, the a dlpar remove of a htoplug slot uses hotplug to remove it. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Rename rpaphp_register_pci_slot() to rpaphp_enable_slot()Linas Vepstas2007-05-023-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename rpaphp_register_pci_slot() because its easy to confuse with rpaphp_register_slot() even though it does something completely different. Rename it to rpaphp_enable_slot() because its almost identical to enbale_slot(). Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: refactor tail call to rpaphp_register_slot()Linas Vepstas2007-05-022-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate the tail call to rpaphp_register_slot() by placing it in the caller. This will help later dis-entanglement. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: remove rpaphp_set_attention_status()Linas Vepstas2007-05-023-24/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rpaphp_set_attention_status() routine seems to be a wrapper around a single rtas call. Abolish it. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: remove print_slot_pci_funcs()Linas Vepstas2007-05-021-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debug function print_slot_pci_funcs() is a large wrapper around two debug print statements. Just invoke these directly. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Remove setup_pci_slot()Linas Vepstas2007-05-021-63/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setup_pci_slot() routine appears to be nothing else than a big, complicated wrapper around pcibios_add_pci_devices(). Remove the wrapping, and call pcibios_add_pci_devices() directly. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: remove a call that does nothing but a pointer lookupLinas Vepstas2007-05-021-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete another stovepipe: a call to a routine which does nothing. Remove un-needed semaphore as well. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Remove another wrappered functionLinas Vepstas2007-05-023-47/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove another stove-pipe; this funcion was called from two different places, with a compile-time const that is then run-time checked to perform two different things. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Remve another call that is a wrapperLinas Vepstas2007-05-024-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove another stovepipe: a call which wraps another call, and just adds printks. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: remove a function that does nothing but wrap debug printksLinas Vepstas2007-05-021-24/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a stove-pipe-- a function that is called from only one place, does nothing but wraps another function with debug printk's. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Remove un-needed gotoLinas Vepstas2007-05-021-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove un-needed goto. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Fix a memleak; slot->location string was never freedLinas Vepstas2007-05-021-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a memleak; the slot->location string was never freed. Fix some whitespace and overlong-line probelms while we're here. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: match up alloc and free in same routineLinas Vepstas2007-05-023-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The routine that called an alloc should be the same routine that calles the mathcing free, if anything in the middle failed. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Remove global num_slots variableLinas Vepstas2007-05-023-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup cruft: remove the global "num_slots" variable; although scattered across multiple files, it is used only once, in a debug statement. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: rpaphp: Cleanup flow of control for rpaphp_add_slotLinas Vepstas2007-05-021-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the flow of control for rpaphp_add_slot(), so as to make it easier to read. The ext patch will fix a bug in this same code. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: remove the broken PCI_MULTITHREAD_PROBE optionAdrian Bunk2007-05-023-78/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the PCI_MULTITHREAD_PROBE option that had already been marked as broken. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Give archs the option to free all MSI/Xs at once.Michael Ellerman2007-05-021-36/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces an optional function, arch_teardown_msi_irqs(), which gives an arch the opportunity to do per-device teardown for MSI/X. If that's not required, the default version simply calls arch_teardown_msi_irq() for each msi irq required. arch_teardown_msi_irqs() is simply passed a pdev, attached to the pdev is a list of msi_descs, it is up to the arch to free the irq associated with each of these as appropriate. For archs that _don't_ implement arch_teardown_msi_irqs(), all msi_descs with irq == 0 are considered unallocated, and the arch teardown routine is not called on them. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Give archs the option to allocate all MSI/Xs at once.Michael Ellerman2007-05-021-19/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces an optional function, arch_setup_msi_irqs(), (note the plural) which gives an arch the opportunity to do per-device setup for MSI/X and then allocate all the requested MSI/Xs at once. If that's not required by the arch, the default version simply calls arch_setup_msi_irq() for each MSI irq required. arch_setup_msi_irqs() is passed a pdev, attached to the pdev is a list of msi_descs with irq == 0, it is up to the arch to connect these up to an irq (via set_irq_msi()) or return an error. For convenience the number of vectors and the type are passed also. All msi_descs with irq != 0 are considered allocated, and the arch teardown routine will be called on them when necessary. The existing semantics of pci_enable_msix() are that if the requested number of irqs can not be allocated, the maximum number that _could_ be allocated is returned. To support that, we define that in case of an error from arch_setup_msi_irqs(), the number of msi_descs with irq != 0 are considered allocated, and are counted toward the "max that could be allocated". Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: arch must connect the irq and the msi_descMichael Ellerman2007-05-021-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set_irq_msi() currently connects an irq_desc to an msi_desc. The archs call it at some point in their setup routine, and then the generic code sets up the reverse mapping from the msi_desc back to the irq. set_irq_msi() should do both connections, making it the one and only call required to connect an irq with it's MSI desc and vice versa. The arch code MUST call set_irq_msi(), and it must do so only once it's sure it's not going to fail the irq allocation. Given that there's no need for the arch to return the irq anymore, the return value from the arch setup routine just becomes 0 for success and anything else for failure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | msi: introduce ARCH_SUPPORTS_MSI Kconfig option (rev2)Dan Williams2007-05-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows architectures to advertise that they support MSI rather than listing each architecture as a PCI_MSI dependency. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Remove dev->first_msi_irqMichael Ellerman2007-05-021-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we keep a list of msi descriptors, we don't need first_msi_irq in the pci dev. If we somehow have zero MSIs configured list_entry() will give us weird oopes or nice memory corruption bugs. So be paranoid. Add BUG_ONs and also a check in pci_msi_check_device() to make sure nvec > 0. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Use a list instead of the custom link structureMichael Ellerman2007-05-023-42/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The msi descriptors are linked together with what looks a lot like a linked list, but isn't a struct list_head list. Make it one. The only complication is that previously we walked a list of irqs, and got the descriptor for each with get_irq_msi(). Now we have a list of descriptors and need to get the irq out of it, so it needs to be in the actual struct msi_desc. We use 0 to indicate no irq is setup. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: Convert to alloc_pci_dev()Michael Ellerman2007-05-025-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Convert code that allocs a struct pci_dev to use alloc_pci_dev(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PCI: Create alloc_pci_dev(), the one true way to create a struct pci_devMichael Ellerman2007-05-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are currently several places in the kernel where we kmalloc() a struct pci_dev and start initialising it. It'd be preferable to have an allocator so we can ensure the pci_dev is correctly initialised in one place. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Add an arch_msi_check_device()Michael Ellerman2007-05-021-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an arch_check_device(), which gives archs a chance to check the input to pci_enable_msi/x. The arch might be interested in the value of nvec so pass it in. Propagate the error value returned from the arch routine out to the caller. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Rename pci_msi_supported() to pci_msi_check_device()Michael Ellerman2007-05-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Eric, the name pci_msi_supported() suggests it should return a boolean value, however it doesn't. So update the name to be a bit less confusing and update the doco too. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Consolidate precondition checksMichael Ellerman2007-05-021-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate precondition checks into a single if statement. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Expand pci_msi_supported()Michael Ellerman2007-05-021-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pci_enable_msi() and pci_enable_msix() both search for the MSI/MSI-X capability, we can fold this into pci_msi_supported() by passing the type in. Update the code to match the comment for pci_msi_supported(). That is it returns 0 on success, and anything else indicates an error. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Remove msi_cacheMichael Ellerman2007-05-021-40/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need a special cache just for msi descriptors. They're not particularly large, under 100 bytes for sure, and don't seem to require any special alignment etc. On most systems there will be relatively few MSIs, and hence we waste most of a page on the cache. Better to just kzalloc the space for the few we do need. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Move EXPORT_SYMBOL()s near their definitionMichael Ellerman2007-05-021-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move EXPORT_SYMBOL()s near their definition. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Consolidate BUG_ON()s.Michael Ellerman2007-05-021-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When freeing MSIs and MSI-Xs, we BUG_ON() if the irq has not been freed, ie. if it still has an action. We can consolidate all of these BUG_ON()s into msi_free_irqs() as all the code paths lead there almost immediately anyway. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Consolidate MSI-X irq freeing codeMichael Ellerman2007-05-021-29/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the MSI-X case we do exactly the same logic in pci_disable_msix() and msi_remove_pci_irq_vectors(), so consolidate them. msi_remove_pci_irq_vectors() wasn't setting dev->first_msi_irq to 0, but I think it should have been, so the consolidated version does. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Simplify BUG() handling in msi_remove_pci_irq_vectors() part 2Michael Ellerman2007-05-021-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. The behaviour has changed slightly, in that before we set a flag if the irq had an action, and continued freeing the other irqs. But as I see it that's all irrelevant because we end up BUG'ing anyway. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Simplify BUG() handling in msi_remove_pci_irq_vectors() part 1Michael Ellerman2007-05-021-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Simplify BUG() handling in pci_disable_msix()Michael Ellerman2007-05-021-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. The behaviour has changed slightly, in that before we set a flag if the irq had an action, and continued freeing the other irqs. But as I see it that's all irrelevant because we end up BUG'ing anyway. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | MSI: Simplify BUG() handling in pci_disable_msi()Michael Ellerman2007-05-021-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | pci: do not mark exported functions as __devinitSam Ravnborg2007-05-026-36/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions marked __devinit will be removed after kernel init. But being exported they are potentially called by a module much later. So the safer choice seems to be to keep the function even in the non CONFIG_HOTPLUG case. This silence the follwoing section mismatch warnings: WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus' Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud