aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* PCI: Cleanup the includes of <linux/pci.h>Jean Delvare2007-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that many source files include <linux/pci.h> while they do not appear to need it. Here is an attempt to clean it all up. In order to find all possibly affected files, I searched for all files including <linux/pci.h> but without any other occurence of "pci" or "PCI". I removed the include statement from all of these, then I compiled an allmodconfig kernel on both i386 and x86_64 and fixed the false positives manually. My tests covered 66% of the affected files, so there could be false positives remaining. Untested files are: arch/alpha/kernel/err_common.c arch/alpha/kernel/err_ev6.c arch/alpha/kernel/err_ev7.c arch/ia64/sn/kernel/huberror.c arch/ia64/sn/kernel/xpnet.c arch/m68knommu/kernel/dma.c arch/mips/lib/iomap.c arch/powerpc/platforms/pseries/ras.c arch/ppc/8260_io/enet.c arch/ppc/8260_io/fcc_enet.c arch/ppc/8xx_io/enet.c arch/ppc/syslib/ppc4xx_sgdma.c arch/sh64/mach-cayman/iomap.c arch/xtensa/kernel/xtensa_ksyms.c arch/xtensa/platform-iss/setup.c drivers/i2c/busses/i2c-at91.c drivers/i2c/busses/i2c-mpc.c drivers/media/video/saa711x.c drivers/misc/hdpuftrs/hdpu_cpustate.c drivers/misc/hdpuftrs/hdpu_nexus.c drivers/net/au1000_eth.c drivers/net/fec_8xx/fec_main.c drivers/net/fec_8xx/fec_mii.c drivers/net/fs_enet/fs_enet-main.c drivers/net/fs_enet/mac-fcc.c drivers/net/fs_enet/mac-fec.c drivers/net/fs_enet/mac-scc.c drivers/net/fs_enet/mii-bitbang.c drivers/net/fs_enet/mii-fec.c drivers/net/ibm_emac/ibm_emac_core.c drivers/net/lasi_82596.c drivers/parisc/hppb.c drivers/sbus/sbus.c drivers/video/g364fb.c drivers/video/platinumfb.c drivers/video/stifb.c drivers/video/valkyriefb.c include/asm-arm/arch-ixp4xx/dma.h sound/oss/au1550_ac97.c I would welcome test reports for these files. I am fine with removing the untested files from the patch if the general opinion is that these changes aren't safe. The tested part would still be nice to have. Note that this patch depends on another header fixup patch I submitted to LKML yesterday: [PATCH] scatterlist.h needs types.h http://lkml.org/lkml/2007/3/01/141 Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCI: fix multiple definition of `queue_pushbutton_work'Kristen Carlson Accardi2007-05-02
| | | | | | | | | Fix duplicate names in shpchp and pciehp. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pciehp: Adapt to device driver modelKenji Kaneshige2007-05-02
| | | | | | | | | This patch adapts PCIEHP driver to PCI device driver model. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pciehp: Event handling reworkKenji Kaneshige2007-05-02
| | | | | | | | | | | | | | | The event handler of PCIEHP driver is unnecessarily very complex. In addition, current event handler can only a fixed number of events at the same time, and some of events would be lost if several number of events happened at the same time. This patch simplify the event handler using 'work queue', and it also fix the above-mentioned issue. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pci: New PCI-E reset APIBrian King2007-05-02
| | | | | | | | | | | | | | | | Adds a new API which can be used to issue various types of PCI-E reset, including PCI-E warm reset and PCI-E hot reset. This is needed for an ipr PCI-E adapter which does not properly implement BIST. Running BIST on this adapter results in PCI-E errors. The only reliable reset mechanism that exists on this hardware is PCI Fundamental reset (warm reset). Since driving this type of reset is architecture unique, this provides the necessary hooks for architectures to add this support. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCI: Flush MSI-X table writesMitch Williams2007-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a kernel bug which is triggered when using the irqbalance daemon with MSI-X hardware. Because both MSI-X interrupt messages and MSI-X table writes are posted, it's possible for them to cross while in-flight. This results in interrupts being received long after the kernel thinks they're disabled, and in interrupts being sent to stale vectors after rebalancing. This patch performs a read flush after writes to the MSI-X table for mask and unmask operations. Since the SMP affinity is set while the interrupt is masked, and since it's unmasked immediately after, no additional flushes are required in the various affinity setting routines. This patch has been validated with (unreleased) network hardware which uses MSI-X. Revised with input from Eric Biederman. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* libata: honour host controllers that want just one hostLinus Torvalds2007-04-30
| | | | | | | | | | | | | | | | | | | | The Marvell IDE interface on my machine would hit a BUG_ON() in lib/iomem.c because it was calling ata_pci_init_one() specifying just a single port on the host, but that would actually end up trying to initialize two ports, the second one with bogus information. This fixes "ata_pci_init_one()" so that it actually passes down the n_ports variable that it got from the low-level driver to the host allocation routine ("ata_host_alloc_pinfo()"), which results in the ATA layer actually having the correct port number information. And in order to make it all work, I also needed to fix a few places that had incorrectly hard-coded the fact that a host always had exactly two ports (both ata_pci_init_bmdma() and ata_request_legacy_irqs() would just always iterate over both ports). Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* power management: implement pm_ops.valid for everybodyJohannes Berg2007-04-30
| | | | | | | | | | | | | | | | | | | | | | Almost all users of pm_ops only support mem sleep, don't check in .valid and don't reject any others in .prepare so users can be confused if they check /sys/power/state, especially when new states are added (these would then result in s-t-r although they're supposed to be something different). This patch implements a generic pm_valid_only_mem function that is then exported for users and puts it to use in almost all existing pm_ops. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: David Brownell <david-b@pacbell.net> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: linux-pm@lists.linux-foundation.org Cc: Len Brown <lenb@kernel.org> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Greg KH <greg@kroah.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2007-04-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (56 commits) ieee1394: remove garbage from Kconfig ieee1394: more help in Kconfig ieee1394: ohci1394: Fix mistake in printk message. ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register ieee1394: ohci1394: fix cosmetic problem in error logging ieee1394: eth1394: send async streams at S100 on 1394b buses ieee1394: eth1394: fix error path in module_init ieee1394: eth1394: correct return codes in hard_start_xmit ieee1394: eth1394: hard_start_xmit is called in atomic context ieee1394: eth1394: some conditions are unlikely ieee1394: eth1394: clean up fragment_overlap ieee1394: eth1394: don't use alloc_etherdev ieee1394: eth1394: omit useless set_mac_address callback ieee1394: eth1394: CONFIG_INET is always defined ieee1394: eth1394: allow MTU bigger than 1500 ieee1394: unexport highlevel_host_reset ieee1394: eth1394: contain host reset ieee1394: eth1394: shorter error messages ieee1394: eth1394: correct a memset argument ieee1394: eth1394: refactor .probe and .update ...
| * ieee1394: remove garbage from KconfigStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: more help in KconfigStefan Richter2007-04-29
| | | | | | | | | | | | | | | | - s/Device Drivers/Controllers/ - clarify who needs pcilynx - don't recommend Y for raw1394; M is typically used Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: ohci1394: Fix mistake in printk message.Simon Arlott2007-04-29
| | | | | | | | | | | | | | | | Fix the "attempting to setting" message in ohci1394. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl ↵Bernhard Kauer2007-04-29
| | | | | | | | | | | | | | | | | | | | register Remove the unneeded code that clears, sets and again clears the rcvPhyPkt bit in the ohci1394 LinkControl register in ohci_initialize(). Signed-off-by: Bernhard Kauer <kauer@os.inf.tu-dresden.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: ohci1394: fix cosmetic problem in error loggingStefan Richter2007-04-29
| | | | | | | | | | | | | | If posted write failed, an "Unhandled interrupt(s) 0x00000100" message was logged by mistake. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: send async streams at S100 on 1394b busesStefan Richter2007-04-29
| | | | | | | | | | | | | | eth1394 did not work on buses consisting of S100B...S400B hardware because it attempted to send GASP packets at S800. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: fix error path in module_initAkinobu Mita2007-04-29
| | | | | | | | | | | | | | | | | | | | This patch fixes some error handlings in eth1394: - check return value of kmem_cache_create() - cleanup resources if hpsb_register_protocol() fails Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace)
| * ieee1394: eth1394: correct return codes in hard_start_xmitStefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | | | This patch actually doesn't change anything because there was always 0 == NETDEV_TX_OK returned before. TODO: Return NETDEV_TX_BUSY in error case and test in different error conditions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: hard_start_xmit is called in atomic contextStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: some conditions are unlikelyStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: clean up fragment_overlapStefan Richter2007-04-29
| | | | | | | | | | | | | | | | offset > fi->offset + fi->len - 1 == !(offset < fi->offset + fi->len) offset + len - 1 < fi->offset == !(offset + len > fi->offset) !(A || B) == (!A && !B) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: don't use alloc_etherdevStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: omit useless set_mac_address callbackStefan Richter2007-04-29
| | | | | | | | | | | | We can't reconfigure the MAC address, hence we don't need the callback. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: CONFIG_INET is always definedStefan Richter2007-04-29
| | | | | | | | | | | | because CONFIG_IEEE1394_ETH1394 depends on it. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: allow MTU bigger than 1500Stefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | | | RFC 2734 says: "IP-capable nodes may operate with an MTU size larger than the default [1500 octets], but the means by which a larger MTU is configured are beyond the scope of this document." Allow users to set an MTU bigger than 1500. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: unexport highlevel_host_resetAdrian Bunk2007-04-29
| | | | | | | | | | | | | | highlevel_host_reset no longer has any modular users. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: contain host resetStefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | | | Call only eth1394's own host reset handler from .tx_timeout, not the reset hooks of all other IEEE 1394 drivers. A minor drawback of this patch is that ether1394_host_reset by timeout is not serialized against ether1394_host_reset by bus reset. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: shorter error messagesStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: correct a memset argumentStefan Richter2007-04-29
| | | | | | | | | | | | The old argument calculated the correct value in a wrong way. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: refactor .probe and .updateStefan Richter2007-04-29
| | | | | | | | | | | | | | Move common code into an extra function. This implicitly adds a missing node_info->fifo = CSR1212_INVALID_ADDR_SPACE; to .update. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: .probe and .update may sleepStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: coding styleStefan Richter2007-04-29
| | | | | | | | | | | | | | Adjust white space and line wraps. Remove unnecessary parentheses and braces, unused macros, and some of the more redundant comments. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: Move common recv_init code to helper functionJean Delvare2007-04-29
| | | | | | | | | | | | | | | | | | There is some common code between ether1394_open and ether1394_add_host which can be moved to a separate helper function for a slightly smaller eth1394 driver (-160 bytes on i386.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: don't autoload by hotplug when ohci1394 startsStefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, ieee1394 put an IP-over-1394 capability entry into each new host's config ROM. As soon as the controller was initialized --- i.e. right after modprobe ohci1394 --- this entry triggered a hotplug event which typically caused auto-loading of eth1394. This irritated or annoyed many users and distributors. Of course they could blacklist eth1394, but then ieee1394 wrongly advertized IP-over- 1394 capability to the FireWire bus. Therefore - remove the offending kernel config option IEEE1394_CONFIG_ROM_IP1394, - let eth1394 add the ROM entry by itself, i.e. only after eth1394 was loaded. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7793 . To emulate the behaviour of older kernels, simply add the following to to /etc/modprobe.conf: install ohci1394 /sbin/modprobe eth1394; \ /sbin/modprobe --ignore-install ohci1394 Note, autoloading of eth1394 when an _external_ IP-over-1394 capable device is discovered is _not_ affected by this patch. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: reduce excessive function inliningStefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | Shrinks eth1394.ko by about 5%. Many of these functions have only one caller and are therefore auto- inlined anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: clean up host removalStefan Richter2007-04-29
| | | | | | | | | | | | ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: eth1394: unregister address space in failure caseStefan Richter2007-04-29
| | | | | | | | | | | | | | Warn if hpsb_allocate_and_register_addrspace() failed. Unregister the address space if something else failed. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: send async streams at S100Stefan Richter2007-04-29
| | | | | | | | | | | | | | The comment says it all. This affects only asynchronous streams sent via raw1394; the eth1394 driver has own code and needs an own fix. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: SPIN_LOCK_UNLOCKED cleanupMilind Arun Choudhary2007-04-29
| | | | | | | | | | | | | | SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK instead Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: nodemgr: unify some error messagesStefan Richter2007-04-29
| | | | | | | | | | | | Shrinks object file size a little bit. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: nodemgr: less noise in dmesgStefan Richter2007-04-29
| | | | | | | | | | | | | | Everytime when eth1394 or a libraw1394 client updates the configuration ROM, a certain sysfs attribute cannot be added since it already exists. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: unroll a weird macroStefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | | | | | | | This is a coding style touch-up for ieee1394's handle_incoming_packet(). A preprocessor macro contained hardwired variable names and, even worse, the 'break' keyword. This macro is now unrolled and removed. Also, all 'break's which had the effect of a return are replaced by return. And a FIXME comment is brought up to date. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: iso.c needs sched.hAndrew Morton2007-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alpha: drivers/ieee1394/iso.c: In function 'hpsb_iso_xmit_sync': drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct' drivers/ieee1394/iso.c:440: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/iso.c:440: error: (Each undeclared identifier is reported only once drivers/ieee1394/iso.c:440: error: for each function it appears in.) drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'signal_pending' drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct' drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'schedule' drivers/ieee1394/iso.c: In function 'hpsb_iso_wake': drivers/ieee1394/iso.c:562: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
| * ieee1394: some more includesStefan Richter2007-04-29
| | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: ieee1394_transactions needs sched.hTorsten Kaiser2007-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/ieee1394/ieee1394_transactions.c fails for me if CONFIG_SMP=n gcc complains: CC drivers/ieee1394/ieee1394_transactions.o drivers/ieee1394/ieee1394_transactions.c: In function 'hpsb_get_tlabel': drivers/ieee1394/ieee1394_transactions.c:183: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/ieee1394_transactions.c:183: error: (Each undeclared identifier is reported only once Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added comment)
| * ieee1394: ieee1394_core printk formatRandy Dunlap2007-04-29
| | | | | | | | | | | | | | | | Fix printk format string: drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: remove usage of skb_queue as packet queueStefan Richter2007-04-29
| | | | | | | | | | | | | | This considerably reduces the memory requirements for a packet and eliminates ieee1394's dependency on CONFIG_NET. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: csr1212: log if devices have CRC errors in their ROMStefan Richter2007-04-29
| | | | | | | | | | | | | | | | | | This will point out firmware bugs. I tested with 11 SBP-2 devices and one OS X PC and got these errors from two old CD-RWs only. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: csr1212: more sensible names for jump targetsStefan Richter2007-04-29
| | | | | | | | | | | | | | Code beneath two labels called "fail" is actually also reached in case of success. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: csr1212: warn on unreachable codeStefan Richter2007-04-29
| | | | | | | | | | | | We want bugs to show themselves. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: shrink csr1212_new_string_descriptor_leafStefan Richter2007-04-29
| | | | | | | | | | | | | | Make unnecessarily generic code specific and thus simpler. Shrink a lookup table from 128 to 16 bytes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>