aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-03-16[PATCH] gpio_direction_output() needs an initial valueDavid Brownell
It's been pointed out that output GPIOs should have an initial value, to avoid signal glitching ... among other things, it can be some time before a driver is ready. This patch corrects that oversight, fixing - documentation - platforms supporting the GPIO interface - users of that call (just one for now, others are pending) There's only one user of this call for now since most platforms are still using non-generic GPIO setup code, which in most cases already couples the initial value with its "set output mode" request. Note that most platforms are clear about the hardware letting the output value be set before the pin direction is changed, but the s3c241x docs are vague on that topic ... so those chips might not avoid the glitches. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Andrew Victor <andrew@sanpeople.com> Acked-by: Milan Svoboda <msvoboda@ra.rockwell.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16[PATCH] spi: destroy workqueue after spi_unregister_masterChris Lesiak
Fix a bug in the cleanup of an spi_bitbang bus. The workqueue associated with the bus was destroyed before the call to spi_unregister_master. That meant that spi devices on that bus would be unable to do IO in their remove method. The shutdown flag should have been able to prevent a segfault, but was never getting set. By waiting to destroy the workqueue until after the master is unregistered, devices are able to do IO in their remove methods. An added benefit is that neither the shutdown flag nor a wait for the queue of messages to empty is needed. Signed-off-by: Chris Lesiak <chris.lesiak@licor.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16[PATCH] rm pointless dmaengine exportsDavid Brownell
This removes several pointless exports from drivers/dma/dmaengine.c; the dma_async_memcpy_*() functions are inlined by <linux/dmaengine.h> so those exports are inappropriate. It also moves the existing EXPORT_SYMBOL declarations next to their functions, so it's now trivial to confirm one-to-one correspondence between exports and nonstatic symbols. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16[PATCH] fix read past end of array in md/linear.cAndy Isaacson
When iterating through an array, one must be careful to test one's index variable rather than another similarly-named variable. The loop will read off the end of conf->disks[] in the following (pathological) case: % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 % for i in 2 3 4; do dd if=/dev/zero of=d$i bs=1k count=$(($i+150)); done % ./vmlinux ubd0=root ubd1=d1 ubd2=d2 ubd3=d3 ubd4=d4 # mdadm -C /dev/md0 --level=linear --raid-devices=4 /dev/ubd[1234] adding some printks, I saw this: [42949374.960000] hash_spacing = 821120 [42949374.960000] cnt = 4 [42949374.960000] min_spacing = 801 [42949374.960000] j=0 size=820928 sz=820928 [42949374.960000] i=0 sz=820928 hash_spacing=820928 [42949374.960000] j=1 size=64 sz=64 [42949374.960000] j=2 size=64 sz=128 [42949374.960000] j=3 size=64 sz=192 [42949374.960000] j=4 size=1515870810 sz=1515871002 Cc: Gautham R Shenoy <ego@in.ibm.com> Acked-by: Neil Brown <neilb@cse.unsw.edu.au> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16[PATCH] reduce pnp syslog spamDavid Brownell
Make some normal code paths in PNP stop issuing syslog spam. Since PNP issues calls regardless of device capablities, it's no surprise when some of those devices don't support those calls! Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-15Merge branch 'upstream-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: natsemi: Avoid IntrStatus lossage if RX state machine resets. natsemi: Fix NAPI for interrupt sharing natsemi: Consistently use interrupt enable/disable functions NetXen: Fix softlockup seen during hardware access NetXen: Bug fix for Jumbo frames on XG card skge: set mac address bonding fix
2007-03-15[PATCH] sysfs and driver core: add callback helper, used by SCSI and S390Alan Stern
This patch (as868) adds a helper routine for device drivers that need to set up a callback to perform some action in a different process's context. This is intended for use by attribute methods that want to unregister themselves or their parent device. Attribute method calls are mutually exclusive with unregistration, so such actions cannot be taken directly. Two attribute methods are converted to use the new helper routine: one for SCSI device deletion and one for System/390 ccwgroup devices. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Hugh Dickins <hugh@veritas.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-15Merge branch 'for-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid: HID: zeroing of bytes in output fields is bogus HID: allocate hid_parser in a proper way
2007-03-15natsemi: Avoid IntrStatus lossage if RX state machine resets.broonie@sirena.org.uk
This patch fixes the poll routine for the natsemi driver so that if the driver detects an RX state machine lockup then no interrupts will be lost while the driver recovers from that. Signed-Off-By: Mark Brown <broonie@sirena.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-15natsemi: Fix NAPI for interrupt sharingbroonie@sirena.org.uk
The interrupt status register for the natsemi chips is clear on read and was read unconditionally from both the interrupt and from the NAPI poll routine, meaning that if the interrupt service routine was called (for example, due to a shared interrupt) while a NAPI poll was scheduled interrupts could be missed. This patch fixes that by ensuring that the interrupt status register is only read by the interrupt handler when interrupts are enabled from the chip. It also reverts a workaround for this problem from the netpoll hook and improves the trace for interrupt events. Thanks to Sergei Shtylyov <sshtylyov@ru.mvista.com> for spotting the issue, Mark Huth <mhuth@mvista.com> for a simpler method and Simon Blake <simon@citylink.co.nz> for testing resources. Signed-Off-By: Mark Brown <broonie@sirena.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-15natsemi: Consistently use interrupt enable/disable functionsbroonie@sirena.org.uk
The natsemi drivers include functions for enabling and disabling interrupts from the chip but these are not used in all code paths. This patch changes the code paths that touch the interrupt enable register to use the functions. In all cases this adds an extra PCI read to post the operation but since none of these are in fast paths this shouldn't be too much of a problem. Signed-Off-By: Mark Brown <broonie@sirena.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-15NetXen: Fix softlockup seen during hardware accessLinsys Contractor Mithlesh Thukral
NetXen: This will fix a softlock seen on some machines. The reason was too much time was spent waiting for hardware access to go through. Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-15NetXen: Bug fix for Jumbo frames on XG cardLinsys Contractor Mithlesh Thukral
NetXen: Set the MTU for the right port depending upon the port number for XG cards. Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-15skge: set mac address bonding fixStephen Hemminger
When bonding does fail over it calls set_mac_address. When this happens as the result of another port going down, the phy_mutex that is common to both ports is held, so it deadlocks. Setting the address doesn't need to do anything that needs the phy_mutex, it already has the RTNL to protect against other admin actions. This change just disables the receiver to avoid any hardware confusion while address is changing. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-14Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] i8xx TCO driver - mark for removal
2007-03-14[PATCH] paride endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] atl1 trivial endianness misannotationsAl Viro
NB: driver is choke-full of code that will break on big-endian; as long as the hardware is onboard-only we can live with that, but sooner or later that'll need fixing. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] hid-core endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] C99 initializers, proper use of const in drivers/ps3Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] qeth gfp_t annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] cciss endian annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] trivial ATA iomem annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] dmfe trivial endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] misc NULL noiseAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] BLK_DEV_IDE_CELLEB dependency fixAl Viro
It's bool and it depends on IDE => should depend on IDE=y Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] fix ipath_dma_free_coherent() prototypeAl Viro
method gets u64, not dma_addr_t Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] zatm __init abuseAl Viro
zatm_init() and zatm_start() should be __devinit (the former is not module init, despite the name - it's a helper for PCI ->probe()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14[PATCH] ibmtr probe is __devinit, not __initAl Viro
used by ->attach() in pcmcia analog Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12Merge branch 'merge' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] sys_move_pages should be callable from an SPU [POWERPC] Wire up sys_epoll_pwait [POWERPC] Allocate syscall number for sys_getcpu [POWERPC] update cell_defconfig [POWERPC] ps3: always make sure were running on a PS3 [POWERPC] Fix spu SLB invalidations [POWERPC] avoid SPU_ACTIVATE_NOWAKE optimization [POWERPC] spufs: fix possible memory corruption is spufs_mem_write
2007-03-12Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC]: Fix TIF_USEDFPU flag atomicity [SPARC64]: Fix atomicity of TIF update in flush_thread() [BW2]: Fix section mismatch warnings. [CG14]: Fix section mismatch warnings. [SPARC]: We do not need OLD_GETRLIMIT.
2007-03-12[PATCH] pci: Repair pci_save/restore_state so we can restore one save many ↵Eric W. Biederman
times. Because we do not reserve space for the pci-x and pci-e state in struct pci dev we need to dynamically allocate it. However because we need to support restore being called multiple times after a single save it is never safe to free the buffers we have allocated to hold the state. So this patch modifies the save routines to first check to see if we have already allocated a state buffer before allocating a new one. Then the restore routines are modified to not free the state after restoring it. Simple and it fixes some subtle error path handling bugs, that are hard to test for. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12[PATCH] msi: Safer state caching.Eric W. Biederman
There are two ways pci_save_state and pci_restore_state are used. As helper functions during suspend/resume, and as helper functions around a hardware reset event. When used as helper functions around a hardware reset event there is no reason to believe the calls will be paired, nor is there a good reason to believe that if we restore the msi state from before the reset that it will match the current msi state. Since arch code may change the msi message without going through the driver, drivers currently do not have enough information to even know when to call pci_save_state to ensure they will have msi state in sync with the other kernel irq reception data structures. It turns out the solution is straight forward, cache the state in the existing msi data structures (not the magic pci saved things) and have the msi code update the cached state each time we write to the hardware. This means we never need to read the hardware to figure out what the hardware state should be. By modifying the caching in this manner we get to remove our save_state routines and only need to provide restore_state routines. The only fields that were at all tricky to regenerate were the msi and msi-x control registers and the way we regenerate them currently is a bit dependent upon assumptions on how we use the allow msi registers to be configured and used making the code a little bit brittle. If we ever change what cases we allow or how we configure the msi bits we can address the fragility then. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 4263/1: fix IXP4XX_NPE[ABC]_BASE_VIRT address [ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems [ARM] 4255/1: i.MX/MX1 Correct MPU PLL reference clock value. [ARM] 4254/1: i.MX/MX1 CPU Frequency scaling honor boot loader set BCLK_DIV. [ARM] 4251/1: Fix sharpsl_pm dependency [ARM] 4250/1: Fix locomo backlight conversion error/compile failure [ARM] 4249/1: Fix tosa compile failure [ARM] 4248/1: lh7a40x: fix missing definitions for get_irqnr_preamble [ARM] 4247/1: Fix long name for cc9p9360dev ARM: OMAP: Fix OMAP2 dss2 so clk_set_parent works ARM: OMAP: Fix missing workqueue include in board-h2.c ARM: OMAP: Include missing header
2007-03-12[ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problemsPavel Pisa
The SDHC controllers cannot process shorter transfers. They has to be handled as longer ones, but it such case CRC error is evaluated. There was a case in the code still, where this error is not ignored as it should to be process these transfers. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-12HID: zeroing of bytes in output fields is bogusJiri Kosina
This patch removes bogus zeroing of unused bits in output reports, introduced in Simon's patch in commit d4ae650a. According to the specification, any sane device should not care about values of unused bits. What is worse, the zeroing is done in a way which is broken and might clear certain bits in output reports which are actually _used_ - a device that has multiple fields with one value of the size 1 bit each might serve as an example of why this is bogus - the second call of hid_output_report() would clear the first bit of report, which has already been set up previously. This patch will break LEDs on SpaceNavigator, because this device is broken and takes into account the bits which it shouldn't touch. The quirk for this particular device will be provided in a separate patch. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-03-12HID: allocate hid_parser in a proper wayJiri Kosina
hid_parser is non-trivially large structure, so it should be allocated using vmalloc() to avoid unsuccessful allocations when memory fragmentation is too high. This structue has a very short life, it's destroyed as soon as the report descriptor has been completely parsed. This should be considered a temporary solution, until the hid_parser is rewritten to consume less memory during report descriptor parsing. Acked-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-03-12Merge branch 'cell-merge' of ↵Paul Mackerras
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6 into merge
2007-03-11[WATCHDOG] i8xx TCO driver - mark for removalWim Van Sebroeck
Mark the i8xx TCO driver for removal. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-03-10Revert "USB: pxa2xx_udc: fix hardcoded irq number"Linus Torvalds
This reverts commit d2487cb4257dafb686f682285854fe7f02ca29d8. Russell King points out that it's obviously bogus, and I have to agree. Not only does "irq" not even exist in that scope, but we obviously need to free the irq that we actually requested, and that's IRQ_USB. Reported-by: Russell King <rmk@arm.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: David Brownell <david-b@pacbell.net>, Cc: Milan Svoboda <msvoboda@ra.rockwell.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-09[BW2]: Fix section mismatch warnings.Robert Reif
Fix section mismatch warnings by moving data into __devinitdata section. Add __devinit to two initialization functions. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-09[CG14]: Fix section mismatch warnings.Robert Reif
Fix section mismatch warning by moving data into __devinitdata section. Add __devinit to an initialization function. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: kobject: new_device->kref wasn't putted after error in kobject_move() driver core: export device_rename Remove devfs from MAINTAINERS Driver core: add device symlink back to sysfs Revert "driver core: refcounting fix"
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: pci: fix section mismatch warning PCI: aer: fix section mismatch warning pcie: fix section mismatch warning PCI: allow multiple calls to pcim_pin_device()
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (23 commits) USB Elan FTDI: check for workqueue creation USB: fix spinlock recursion in cdc-acm.c USB: fix Unaligned access in EHCI driver USB: Product ID for FT232RL in ftdi_sio USBNET: DM9501: Add Corega FEther USB-TXC support. USB: ipaq.c: Additional devices USB: further fix for usb-serial USB: fix usb-serial device naming bug USB: RTS/DTR signal patch for airprime driver USB: ftdi_sio: use port_probe / port_remove thereby fixing access to the latency_timer usb-serial: fix shutdown / device_unregister order USB: add Additional PIDs in ftdi_sio USB: add QL355P power supply ids to fdti_sio USB: New device IDs for cp2101 driver USB: kill dead code from hub.c USB: ratelimit debounce error messages USB: pxa2xx_udc: fix hardcoded irq number UHCI: fix port resume problem USB: set the correct interval for interrupt URBs USB: goku_udc: Remove crude cache coherency code ...
2007-03-09Pull misc-for-upstream into release branchLen Brown
2007-03-09Pull bugzilla-8110 into release branchLen Brown
2007-03-09Pull bugzilla-8066 into release branchLen Brown
2007-03-09Pull bugzilla-7907 into release branchLen Brown
2007-03-09Pull bugzilla-7570 into release branchLen Brown
2007-03-09Pull bugzilla-6859 into release branchLen Brown