aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-01-14ata_piix: ignore ATA_DMA_ERR on vmware ich4Tejun Heo1-0/+51
VMware ich4 emulation incorrectly sets DMA_ERR on TF error. Ignore it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-15[MIPS] Cacheops.h: Fix typo.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-15[MIPS] Cobalt: Qube1 has no serial port so don't use itThomas Bogendoerfer1-0/+5
Because Qube1 doesn't have a serial chip waiting for transmit fifo empty takes forever, which isn't a good idea. No prom_putchar/early console for Qube1 fixes this. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-15[MIPS] Cobalt: Fix ethernet interrupts for RaQ1Thomas Bogendoerfer1-1/+1
RAQ1 uses the same interrupt routing as Qube2. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-15[MIPS] Kconfig fixes for BCM47XX platformAurelien Jarno1-0/+2
The patch below fixes two problems for Kconfig on the BCM47xx platform: - arch/mips/bcm47xx/gpio.c uses ssb_extif_* functions. Selecting SSB_DRIVER_EXTIF makes sure those functions are available. - arch/mips/pci/pci.c needs, when enabled, platform specific functions, which are defined when SSB_PCICORE_HOSTMODE is enabled. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-14Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds6-6/+13
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-sibyte: Fix an error path i2c: Driver IDs are optional i2c: Spelling fixes i2c-omap: Fix NULL pointer dereferencing
2008-01-14fix the "remove task_ppid_nr_ns" commitOleg Nesterov1-1/+1
Commit 84427eaef1fb91704c7112bdb598c810003b99f3 (remove task_ppid_nr_ns) moved the task_tgid_nr_ns(task->real_parent) outside of lock_task_sighand(). This is wrong, ->real_parent could be freed/reused. Both ->parent/real_parent point to nothing after __exit_signal() because we remove the child from ->children list, and thus the child can't be reparented when its parent exits. rcu_read_lock() protects ->parent/real_parent, but _only_ if we know it was valid before we take rcu lock. Revert this part of the patch. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14i2c-sibyte: Fix an error pathJean Delvare1-2/+5
If the registration of the second I2C channel fails, we really want to unregister the first one before we return with an error. While we're here, fix the printk right above so that it displays the real driver name. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ralf Baechle <ralf@linux-mips.org>
2008-01-14i2c: Driver IDs are optionalJean Delvare1-0/+4
Document the fact that I2C driver IDs are optional. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-14i2c: Spelling fixesJoe Perches3-3/+3
[JD: One more fix in i2c-dev.] Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-14i2c-omap: Fix NULL pointer dereferencingTony Lindgren1-1/+1
This patch fixes bug #9581 reported by Marcio Buss. If kzalloc fails, omap_i2c_write_reg() tries to reset an unallocated I2C controller. Cc: Marcio Buss <marciobuss@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-14Merge branch 'for-linus' of ↵Linus Torvalds6-33/+38
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: improve Kconfig help entries for HP Jornada devices Input: pass EV_PWR events to event handlers Input: spitzkbd - fix suspend key handling gameport: don't export functions that are static inline Input: jornada680_kbd - fix default keymap Input: Handle EV_PWR type of input caps in input_set_capability.
2008-01-14OSS msnd: fix array overflowsAdrian Bunk1-2/+2
Fix array overflows in the OSS msnd driver spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14CRIS v10: driver for ds1302 needs to include cris-specific i2c.hJesper Nilsson1-128/+3
This fixes compilation error where i2c_init wasn't defined. Also, remove the CVS log and version tags, they are no longer useful. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14uvesafb: fix section mismatch warningsRandy Dunlap1-2/+2
Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit and since it accesses __devinitdata. WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver') Variable 'blank' cannot be __devinitdata since it is referenced in an fb_ops method that could be called at any time. WARNING: vmlinux.o(.text+0x4dfc1e): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette') WARNING: vmlinux.o(.text+0x4dfc24): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14CRIS v10: kernel/time.c needs to include linux/vmstat.h to compileJesper Nilsson1-0/+1
This fixes compile error when nr_free_pages() from linux/swap.h expands to global_page_state(NR_FREE_PAGES), but linux/vmstat.h isn't included to declare global_page_state(). Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14CRIS v10: correct do_signal to fix oops and clean up signal handling in generalJesper Nilsson1-139/+112
This fixes a kernel panic on boot due to do_signal not being compatible with it's callers. - do_signal now returns void, and does not have the previous signal set as a parameter. - Remove sys_rt_sigsuspend, we can use the common one instead. - Change sys_sigsuspend to be more like x86, don't call do_signal here. - handle_signal, setup_frame and setup_rt_frame now return -EFAULT if we've delivered a segfault, which is used by callers to perform necessary cleanup. - Break long lines, correct whitespace and formatting errors. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14CRIS: define __ARCH_WANT_SYS_RT_SIGSUSPEND in unistd.h for CRISJesper Nilsson1-0/+1
This allows us to use the commong sys_rt_sigsuspend instead of having our own. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14s3c2410fb: fix incorrect argument type in resume functionKrzysztof Helt1-1/+1
Fix wrong pointer type passed into the s3c2410fb_init_registers() function. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14hugetlbfs: fix quota leakKen Chen1-3/+10
In the error path of both shared and private hugetlb page allocation, the file system quota is never undone, leading to fs quota leak. Fix them up. [akpm@linux-foundation.org: cleanup, micro-optimise] Signed-off-by: Ken Chen <kenchen@google.com> Acked-by: Adam Litke <agl@us.ibm.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14advansys: fix section mismatch warningRandy Dunlap1-1/+1
Fix section mismatch warning: WARNING: vmlinux.o(.exit.text+0x152a): Section mismatch: reference to .init.data:_asc_def_iop_base (between 'advansys_isa_remove' and 'advansys_exit') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Matthew Wilcox <willy@debian.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14cciss: section mismatchRandy Dunlap1-1/+1
Mark cciss_pci_init() as __devinit, to fix section mismatch warning. WARNING: vmlinux.o(.text+0x601fc9): Section mismatch: reference to .init.text: (between 'cciss_pci_init' and 'cciss_getgeometry') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <mike.miller@hp.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14scsi/qla2xxx/qla_os.c section fixAdrian Bunk1-2/+2
WARNING: vmlinux.o(.text+0x2a4462): Section mismatch: reference to .exit.text:qla2x00_remove_one (between 'qla2xxx_pci_error_detected' and 'qla2x00_stop_timer') qla2x00_remove_one() mustn't be __devexit since it's called from qla2xxx_pci_error_detected(). Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Seokmann Ju <seokmann.ju@qlogic.com> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14macintosh: fix fabrication of caplock key eventsAndy Wingo1-1/+2
If the user has turned on the "restore_caplock_events" parameter, the code mangles the capslock events correctly, then erroneously ignores those events. Fix logic to allow correct fallthrough. Signed-off-by: Andy Wingo <wingo@pobox.com> Acked-by: Andrew McNabb <amcnabb@mcnabbs.org> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14quicklists: Only consider memory that can be used with GFP_KERNELChristoph Lameter1-2/+10
Quicklists calculates the size of the quicklists based on the number of free pages. This must be the number of free pages that can be allocated with GFP_KERNEL. node_page_state() includes the pages in ZONE_HIGHMEM and ZONE_MOVABLE which may lead the quicklists to become too large causing OOM. Signed-off-by: Christoph Lameter <clameter@sgi.com> Tested-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14MAINTAINERS: email update and add missing entryNicolas Ferre2-2/+8
- MAINTAINERS email update - add atmel_lcdfb entry Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14TPM: fix suspend and resume failureDavid Smith1-6/+6
The savestate command structure was being overwritten by the result of running the TPM_SaveState command after one run, so make it a local variable to the function instead of a global variable that gets overwritten. Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Kent Yoder <shpedoikal@gmail.com> Cc: Marcel Selhorst <tpm@selhorst.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14Kick CPUS that might be sleeping in cpus_idle_waitSteven Rostedt2-0/+22
Sometimes cpu_idle_wait gets stuck because it might miss CPUS that are already in idle, have no tasks waiting to run and have no interrupts going to them. This is common on bootup when switching cpu idle governors. This patch gives those CPUS that don't check in an IPI kick. Background: ----------- I notice this while developing the mcount patches, that every once in a while the system would hang. Looking deeper, the hang was always at boot up when registering init_menu of the cpu_idle menu governor. Talking with Thomas Gliexner, we discovered that one of the CPUS had no timer events scheduled for it and it was in idle (running with NO_HZ). So the CPU would not set the cpu_idle_state bit. Hitting sysrq-t a few times would eventually route the interrupt to the stuck CPU and the system would continue. Note, I would have used the PDA isidle but that is set after the cpu_idle_state bit is cleared, and would leave a window open where we may miss being kicked. hmm, looking closer at this, we still have a small race window between clearing the cpu_idle_state and disabling interrupts (hence the RFC). CPU0: CPU 1: --------- --------- cpu_idle_wait(): cpu_idle(): | __cpu_cpu_var(is_idle) = 1; | if (__get_cpu_var(cpu_idle_state)) /* == 0 */ per_cpu(cpu_idle_state, 1) = 1; | if (per_cpu(is_idle, 1)) /* == 1 */ | smp_call_function(1) | | receives ipi and runs do_nothing. wait on map == empty idle(); /* waits forever */ So really we need interrupts off for most of this then. One might think that we could simply clear the cpu_idle_state from do_nothing, but I'm assuming that cpu_idle governors can be removed, and this might cause a race that a governor might be used after the module was removed. Venki said: I think your RFC patch is the right solution here. As I see it, there is no race with your RFC patch. As long as you call a dummy smp_call_function on all CPUs, we should be OK. We can get rid of cpu_idle_state and the current wait forever logic altogether with dummy smp_call_function. And so there wont be any wait forever scenario. The whole point of cpu_idle_wait() is to make all CPUs come out of idle loop atleast once. The caller will use cpu_idle_wait something like this. // Want to change idle handler - Switch global idle handler to always present default_idle - call cpu_idle_wait so that all cpus come out of idle for an instant and stop using old idle pointer and start using default idle - Change the idle handler to a new handler - optional cpu_idle_wait if you want all cpus to start using the new handler immediately. Maybe the below 1s patch is safe bet for .24. But for .25, I would say we just replace all complicated logic by simple dummy smp_call_function and remove cpu_idle_state altogether. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@suse.de> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14w1: decrement slave counter only in ->release() callbackEvgeniy Polyakov1-4/+2
Decrement the slave counter only in ->release() callback instead of both in ->release() and w1 control. Patch is based on debug work and preliminary patch made by Henri Laakso. Henri noticed in debug that this counter becomes negative after w1 slave device is physically removed. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Henri Laakso <henri.laakso@wapice.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-14modules: de-mutex more symbol lookup paths in the module codeRusty Russell1-11/+18
Kyle McMartin reports sysrq_timer_list_show() can hit the module mutex from hard interrupt context. These paths don't need to though, since we long ago changed all the module list manipulation to occur via stop_machine(). Disabling preemption is enough. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-13[TOKENRING]: rif_timer not initialized properlyEric Dumazet1-1/+1
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-14Input: improve Kconfig help entries for HP Jornada devicesKristoffer Ericson2-11/+9
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-13Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds4-19/+34
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] vfp: fix fuitod/fsitod instructions [ARM] pxa: silence warnings from cpu_is_xxx() macros
2008-01-13Merge branch 'upstream-linus' of ↵Linus Torvalds20-271/+238
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: spidernet MAINTAINERship update sky2: remove check for PCI wakeup setting from BIOS sky2: large memory workaround. fs_enet: check for phydev existence in the ethtool handlers [usb netdev] asix: fix regression r8169: fix missing loop variable increment ip1000: menu location change Fixed a small typo in the loopback driver 3c509: PnP resource management fix netxen: fix byte-swapping in tx and rx netxen: optimize tx handling netxen: stop second phy correctly netxen: update driver version netxen: update MAINTAINERS endianness noise in tulip_core de4x5 fixes xircom_cb endianness fixes rt2x00: Put 802.11 data on 4 byte boundary rt2x00: Corectly initialize rt2500usb MAC rt2x00: Allow rt61 to catch up after a missing tx report
2008-01-13Merge branch 'merge' of ↵Linus Torvalds5-0/+51
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix CPU hotplug when using the SLB shadow buffer [POWERPC] efika: add phy-handle property for fec_mpc52xx
2008-01-13Merge branch 'release' of ↵Linus Torvalds19-44/+139
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: pnpacpi: print resource shortage message only once PM: ACPI and APM must not be enabled at the same time ACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9 ACPICA: fix acpi_serialize hang regression ACPI : Not register gsi for PCI IDE controller in legacy mode ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE case ACPI: Make sysfs interface in ACPI power optional. ACPI: EC: Enable boot EC before bus_scan increase PNP_MAX_PORT to 40 from 24
2008-01-13knfsd: Allow NFSv2/3 WRITE calls to succeed when krb5i etc is used.NeilBrown2-2/+8
When RPCSEC/GSS and krb5i is used, requests are padded, typically to a multiple of 8 bytes. This can make the request look slightly longer than it really is. As of f34b95689d2ce001c "The NFSv2/NFSv3 server does not handle zero length WRITE request correctly", the xdr decode routines for NFSv2 and NFSv3 reject requests that aren't the right length, so krb5i (for example) WRITE requests can get lost. This patch relaxes the appropriate test and enhances the related comment. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Peter Staubach <staubach@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-13remove task_ppid_nr_nsRoland McGrath3-16/+3
task_ppid_nr_ns is called in three places. One of these should never have called it. In the other two, using it broke the existing semantics. This was presumably accidental. If the function had not been there, it would have been much more obvious to the eye that those patches were changing the behavior. We don't need this function. In task_state, the pid of the ptracer is not the ppid of the ptracer. In do_task_stat, ppid is the tgid of the real_parent, not its pid. I also moved the call outside of lock_task_sighand, since it doesn't need it. In sys_getppid, ppid is the tgid of the real_parent, not its pid. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-12[SPARC64]: Fix build with SPARSEMEM_VMEMMAP disabled.David S. Miller1-1/+5
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-12[SPARC]: Make gettimeofday() monotonic again.David S. Miller1-1/+8
When we switched away from the optimized C version things stopped being monotonic. The problem is that if we run this with interrupts disabled, we can see the interrupt pending because the counter reached the limit value. When this happens the counter has bit 31 set, and the low bits start counting again from zero. Reported by Martin Habets. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-12Pull bugzilla-9535 into release branchLen Brown1-4/+10
2008-01-12pnpacpi: print resource shortage message only onceLen Brown1-4/+10
pnpacpi: exceeded the max number of IO resources: 40 While this message is a real error and should thus remain KERN_ERR (even a new dmesg line is seen as a regression by some, since it was not printed in 2.6.23...) it is certainly impolite to print this warning 50 times should you happen to have the oddball system with 90 io resources under a device... So print the warning just once. In 2.6.25 we'll get rid of the limits altogether and these warnings will vanish with them. http://bugzilla.kernel.org/show_bug.cgi?id=9535 Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-12spidernet MAINTAINERship updateJens Osterkamp1-2/+4
Acked-by: Linas Vepstas <linasvepstas@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12sky2: remove check for PCI wakeup setting from BIOSStephen Hemminger1-19/+5
The driver checks status of PCI power management to mark default setting of Wake On Lan. On some systems this works, but often it reports a that WOL is disabled when it isn't. This patch gets rid of that check and just reports the wake on lan status based on the hardware capablity. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12sky2: large memory workaround.Stephen Hemminger2-18/+10
This patch might fix problems with 4G or more of memory. It stops the driver from doing a small optimization for Tx and Rx, and instead always sets the high-page on tx/rx descriptors. Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9725 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12Use access mode instead of open flags to determine needed permissionsLinus Torvalds1-2/+2
Way back when (in commit 834f2a4a1554dc5b2598038b3fe8703defcbe467, aka "VFS: Allow the filesystem to return a full file pointer on open intent" to be exact), Trond changed the open logic to keep track of the original flags to a file open, in order to pass down the the intent of a dentry lookup to the low-level filesystem. However, when doing that reorganization, it changed the meaning of namei_flags, and thus inadvertently changed the test of access mode for directories (and RO filesystem) to use the wrong flag. So fix those test back to use access mode ("acc_mode") rather than the open flag ("flag"). Issue noticed by Bill Roman at Datalight. Reported-and-tested-by: Bill Roman <bill.roman@datalight.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-12fs_enet: check for phydev existence in the ethtool handlersAnton Vorontsov1-2/+9
Otherwise oops will happen if ethernet device has not been opened: Unable to handle kernel paging request for data at address 0x0000014c Faulting instruction address: 0xc016f7f0 Oops: Kernel access of bad area, sig: 11 [#1] MPC85xx NIP: c016f7f0 LR: c01722a0 CTR: 00000000 REGS: c79ddc70 TRAP: 0300 Not tainted (2.6.24-rc3-g820a386b) MSR: 00029000 <EE,ME> CR: 20004428 XER: 20000000 DEAR: 0000014c, ESR: 00000000 TASK = c789f5e0[999] 'snmpd' THREAD: c79dc000 GPR00: c01aceb8 c79ddd20 c789f5e0 00000000 c79ddd3c 00000000 c79ddd64 00000000 GPR08: 00000000 c7845b60 c79dde3c c01ace80 20004422 200249fc 000002a0 100da728 GPR16: 100c0000 00000000 00000000 00000000 20022078 00000009 200220e0 bfc85558 GPR24: c79ddd3c 00000000 00000000 c02e0e70 c022fc64 ffffffff c7845800 bfc85498 NIP [c016f7f0] phy_ethtool_gset+0x0/0x4c LR [c01722a0] fs_get_settings+0x18/0x28 Call Trace: [c79ddd20] [c79dde38] 0xc79dde38 (unreliable) [c79ddd30] [c01aceb8] dev_ethtool+0x294/0x11ec [c79dde30] [c01aaa44] dev_ioctl+0x454/0x6a8 [c79ddeb0] [c019b9d4] sock_ioctl+0x84/0x230 [c79dded0] [c007ded8] do_ioctl+0x34/0x8c [c79ddee0] [c007dfbc] vfs_ioctl+0x8c/0x41c [c79ddf10] [c007e38c] sys_ioctl+0x40/0x74 [c79ddf40] [c000d4c0] ret_from_syscall+0x0/0x3c Instruction dump: 81630000 800b0030 2f800000 419e0010 7c0803a6 4e800021 7c691b78 80010014 7d234b78 38210010 7c0803a6 4e800020 <8003014c> 7c6b1b78 38600000 90040004 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12Merge branch 'fixes-jgarzik' of ↵Jeff Garzik4-7/+44
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
2008-01-12[usb netdev] asix: fix regressionRuss Dill1-3/+3
51bf2976b55d07f9daae9697a0a3ac9f58abcedc caused a regression in the asix usbnet driver. usb_control_msg returns the number of bytes read on success, not 0. Tested with NETGEAR FA120. Signed-off-by: Russ Dill <Russ.Dill@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12r8169: fix missing loop variable incrementFrancois Romieu1-1/+1
Spotted-by: Citizen Lee <citizen_lee@thecus.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12ip1000: menu location changeStephen Hemminger1-10/+10
Move the ip1000 driver into the expected place for gigabit cards in the configuration menu structure. It should be under the gigabit cards, not at the top level. Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12Fixed a small typo in the loopback driverEmil Medve1-1/+1
This is probably a result of the changes from commit 854d836 - [NET]: Dynamically allocate the loopback device, part 2 Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-123c509: PnP resource management fixKrzysztof Helt1-0/+4
In order to release PnP resources a card type must be set to EL3_PNP. Previously, it was never set hence the PnP resources were not released and device was left in incorrect state. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: fix byte-swapping in tx and rxDhananjay Phadke3-45/+40
Here's the reworked patch. This cleans up some unnecessary byte-swapping while setting up tx and interpreting rx desc. The 64 bit rx status data should be converted to host endian format only once and the macros just need to extract bitfields. This saves a spate of interrupts on pseries blades caused by buggy (non) processing rx status ring. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: optimize tx handlingdhananjay@netxen.com2-37/+25
netxen driver allows limited number of threads simultaneously posting skb's in tx ring. If transmit slot is unavailable, driver calls schedule() or loops in xmit_frame(). This patch returns TX_BUSY and lets the stack reschedule the packet if transmit slot is unavailable. Also removes unnecessary check for tx timeout in the driver itself, the network stack does that anyway. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: stop second phy correctlydhananjay@netxen.com2-9/+7
This patch fixes bug that doesn't quiesce second port when interface is brought down, which could lead to unwarranted interrupt during rmmod / ifdown. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: update driver versiondhananjay@netxen.com1-2/+2
Bumping up driver version to 3.4.18, several fixes have gone in since version 3.4.2. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12netxen: update MAINTAINERSdhananjay@netxen.com1-2/+2
Changing MAINTAINERS for netxen nic driver. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12endianness noise in tulip_coreAl Viro1-1/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12de4x5 fixesAl Viro1-84/+43
* (trivial) endianness annotations * don't bother with del_timer() from the inside of timer handler itself * disable_ast() really ought to do del_timer_sync(), not del_timer() * clean the timer handling in general. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12xircom_cb endianness fixesAl Viro1-28/+26
* descriptors inside the rx and tx rings are l-e * don't cpu_to_le32() the argument of outl() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-11[NETFILTER]: bridge: fix double POST_ROUTING invocationPatrick McHardy1-6/+12
The bridge code incorrectly causes two POST_ROUTING hook invocations for DNATed packets that end up on the same bridge device. This happens because packets with a changed destination address are passed to dst_output() to make them go through the neighbour output function again to build a new destination MAC address, before they will continue through the IP hooks simulated by bridge netfilter. The resulting hook order is: PREROUTING (bridge netfilter) POSTROUTING (dst_output -> ip_output) FORWARD (bridge netfilter) POSTROUTING (bridge netfilter) The deferred hooks used to abort the first POST_ROUTING invocation, but since the only thing bridge netfilter actually really wants is a new MAC address, we can avoid going through the IP stack completely by simply calling the neighbour output function directly. Tested, reported and lots of data provided by: Damien Thebault <damien.thebault@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvbLinus Torvalds2-9/+5
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: V4L/DVB (7001): av7110: fix section mismatch V4L/DVB (6999): ivtv: stick to udelay=10 after all
2008-01-11Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6Linus Torvalds1-6/+10
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: [XFS] fix unaligned access in readdir
2008-01-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.24Linus Torvalds2-27/+21
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.24: sh: Force __access_ok() to obey address space limit. sh: Fix argument page dcache flushing regression.
2008-01-11Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds6-51/+85
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Replace 40c7869b693b18412491fdcff64682215b739f9e kludge [MIPS] Lasat: Fix built in separate object directory. [MIPS] Malta: Fix software reset on big endian [MIPS] pnx8xxx: move to clocksource [MIPS] Wrong CONFIG option prevents setup of DMA zone.
2008-01-11ps3fb: fix deadlock on kexec()Jeremy Kerr1-4/+8
Since the introduction of the acquire_console_sem calls in 0333d83509c7d8496c8965b5ba9bc0c98e83c259, kexecing can cause the kernel to deadlock: ps3fb_shutdown() -> unregister_framebuffer() -> fb_notifier_call_chain(FB_EVENT_FB_UNBIND) -> fbcon_fb_unbind() -> unbind_con_driver() -> bind_con_driver() [ acquires console_sem ] -> fbcon_deinit() -> fbops->fb_release(newinfo, 0) -> ps3fb_release() -> ps3fb_sync() [ acquires console_sem ] This change avoids the deadlock by moving the acquire_console_sem() out of ps3fb_sync(), and puts it into the two other callsites, leaving ps3fb_release() to call ps3fb_sync() without the console semaphore. [Geert] - Corrected call sequence above - ps3fb_release() may be called with and without console_sem held. This is an inconsistency that should be fixed at the fb level, but for now, try to acquire console_sem in ps3fb_release(). I think it's safer to let ps3fb_release() try to acquire console_sem and not refresh the screen if it fails, than to call ps3fb_sync() without holding console_sem, as ps3fb_par may be modified at the same time, causing crashes or lockups. Besides, ps3fb_release() only calls ps3fb_sync() to refresh the screen when display flipping is disabled, which is an uncommon case (except during shutdown/kexec). Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-11ps3fb: prevent use after free of fb_infoJeremy Kerr1-6/+6
In ps3fb_shutdown, freeing the framebuffer will cause fb_info (in dev->core.driver_data) to be free()ed, which we potentially access from the ps3fbd kthread. This change frees the framebuffer after stopping the ps3fbd kthread. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-11Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds3-81/+6
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: blktrace: kill the unneeded initcall block: fix blktrace timestamps loop: fix bad bio_alloc() nr_iovec request Don't blatt first element of prv in sg_chain()
2008-01-11cache invalidation error for buffered writeMassimo Cirillo1-2/+5
The bug causes corruptions of data read from flash. The original code performs cache invalidation from "adr" to "adr + len" in do_write_buffer(). Since len and adr could be updated in the code before invalidation - it causes improper setting of cache invalidation regions. Signed-off-by: Massimo Cirillo <maxcir@gmail.com> Signed-off-by: Giuseppe D'Eliseo <giuseppedeliseo@gmail.com> Acked-by: Nicolas Pitre <nico@cam.org> Acked-by: Jörn Engel <joern@logfs.org> Signed-off-by: David Woohouse <dwmw2@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-11IDE: terminate ACPI DMI listJeff Garzik1-0/+2
Fix oops reported by Trond. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-11Pull bugzilla-9683 into release branchLen Brown1-0/+4
2008-01-11Pull bugzilla-9627 into release branchLen Brown2-1/+19
2008-01-11Pull bugzilla-9535 into release branchLen Brown1-1/+1
2008-01-11Pull bugzilla-9494 into release branchLen Brown4-12/+67
2008-01-11Pull bugzilla-9194 into release branchLen Brown6-22/+17
2008-01-11PM: ACPI and APM must not be enabled at the same timeLen Brown6-22/+17
ACPI and APM used "pm_active" to guarantee that they would not be simultaneously active. But pm_active was recently moved under CONFIG_PM_LEGACY, so that without CONFIG_PM_LEGACY, pm_active became a NOP -- allowing ACPI and APM to both be simultaneously enabled. This caused unpredictable results, including boot hangs. Further, the code under CONFIG_PM_LEGACY is scheduled for removal. So replace pm_active with pm_flags. pm_flags depends only on CONFIG_PM, which is present for both CONFIG_APM and CONFIG_ACPI. http://bugzilla.kernel.org/show_bug.cgi?id=9194 Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2008-01-11Pull bugzilla-8973 into release branchLen Brown2-0/+8
2008-01-11Pull bugzilla-8171 into release branchLen Brown1-4/+4
2008-01-11Pull bugzilla-5637 into release branchLen Brown1-0/+9
2008-01-11[MIPS] Replace 40c7869b693b18412491fdcff64682215b739f9e kludgeAtsushi Nemoto2-6/+3
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-11[MIPS] Lasat: Fix built in separate object directory.WANG Cong1-3/+3
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> [Ralf: The LDSCRIPT script needed fixing, too] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-11[MIPS] Malta: Fix software reset on big endianDmitri Vorobiev1-4/+6
I noticed that the commit f197465384bf7ef1af184c2ed1a4e268911a91e3 (MIPS Tech: Get rid of volatile in core code) broke the software reset functionality for MIPS Malta boards in big-endian mode. According to the MIPS Malta board user's manual, writing the magic 32-bit GORESET value into the SOFTRES register initiates board soft reset. My experimentation has shown that the endianness of the GORESET integer should thereby be the same as the endianness, which has been set for the CPU itself. The writew() function used to write the magic value in the code introduced by the commit mentioned above, however, swaps bytes for big-endian kernels and transfers 16 bits instead of 32. The patch below replaces the writew() function by the __raw_writel() routine, which leaves the byte order intact and transfers the whole MIPS machine word. Trivial code cleanup (replacing spaces by a tab and cutting oversized lines to make checkpatch.pl happy) is also included. The patch was tested using a Malta evaluation board running in both BE and LE modes. For both modes, software reset was fully functional after the change. P.S. I suspect that the same commit broke the "standby" functionality for MIPS Atlas boards. However, I did not touch the Atlas code as I don't have such board at my disposal and also because the linux-mips.org Web site claims that Atlas support is scheduled for removal. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-11[MIPS] pnx8xxx: move to clocksourceVitaly Wool1-37/+72
This patch converts PNX8XXX system timer to clocksource restoring PNX8550 support back to live. Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-11[MIPS] Wrong CONFIG option prevents setup of DMA zone.Thomas Bogendoerfer1-1/+1
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-11V4L/DVB (7001): av7110: fix section mismatchRandy Dunlap1-5/+5
Fix driver data name to match whitelist of acceptable names that contain pointers init data so that section mismatch warning is placated. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-11V4L/DVB (6999): ivtv: stick to udelay=10 after allHans Verkuil1-4/+0
Using an udelay of 5 seems to result in problems for several people. For now abandon the udelay value of 5 and stick to 10, even though this will mean a longer load time of the cx2584x firmware. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-11blktrace: kill the unneeded initcallJens Axboe1-11/+1
It just inits the mutex, we can do that with DEFINE_MUTEX() instead. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-11block: fix blktrace timestampsIngo Molnar1-67/+2
David Dillow reported broken blktrace timestamps. The reason is cpu_clock() which is not a global time source. Fix bkltrace timestamps by using ktime_get() like the networking code does for packet timestamps. This also removes a whole lot of complexity from bkltrace.c and shrinks the code by 500 bytes: text data bss dec hex filename 2888 124 44 3056 bf0 blktrace.o.before 2390 116 44 2550 9f6 blktrace.o.after Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-11loop: fix bad bio_alloc() nr_iovec requestJens Axboe1-1/+1
Don't allocate room for an iovec when it is not needed. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-11Don't blatt first element of prv in sg_chain()Rusty Russell1-2/+2
I realize that sg chaining is a ploy to make the rest of the kernel devs feel the pain of the SCSI subsystem. But this was a little unsubtle. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-11[XFS] fix unaligned access in readdirChristoph Hellwig1-6/+10
This patch should fix the issue seen on Alpha with unaligned accesses in the new readdir code. By aligning each dirent to sizeof(u64) we'll avoid unaligned accesses. To make doubly sure we're not hitting problems also rearrange struct hack_dirent to avoid holes. SGI-PV: 975411 SGI-Modid: xfs-linux-melb:xfs-kern:30302a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
2008-01-10[NETFILTER]: xt_helper: Do not bypass RCUJan Engelhardt1-2/+2
Use the @helper variable that was just obtained. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bitYasuyuki Kozakai1-1/+1
RFC2464 says that the next to lowerst order bit of the first octet of the Interface Identifier is formed by complementing the Universal/Local bit of the EUI-64. But ip6t_eui64 uses OR not XOR. Thanks Peter Ivancik for reporing this bug and posting a patch for it. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[MACVLAN]: Prevent nesting macvlan devicesPatrick McHardy1-0/+7
Don't allow to nest macvlan devices since it will cause lockdep warnings and isn't really useful for anything. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[VLAN]: nested VLAN: fix lockdep's recursive locking warningJarek Poplawski1-1/+6
Allow vlans nesting other vlans without lockdep's warnings (max. 2 levels i.e. parent + child). Thanks to Patrick McHardy for pointing a bug in the first version of this patch. Reported-by: Benny Amorsen Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[DECNET] ROUTE: fix rcu_dereference() uses in /proc/net/decnet_cacheEric Dumazet1-3/+3
In dn_rt_cache_get_next(), no need to guard seq->private by a rcu_dereference() since seq is private to the thread running this function. Reading seq.private once (as guaranted bu rcu_dereference()) or several time if compiler really is dumb enough wont change the result. But we miss real spots where rcu_dereference() are needed, both in dn_rt_cache_get_first() and dn_rt_cache_get_next() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[BLUETOOTH]: Always send explicit hci_ll wake-up acks.Ohad Ben-Cohen1-9/+14
In the (rare) event of simultaneous mutual wake up requests, do send the chip an explicit wake-up ack. This is required for Texas Instruments's BRF6350 chip. Signed-off-by: Ohad Ben-Cohen <ohad@bencohen.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[BLUETOOTH]: rfcomm tty BUG_ON() code fixDave Young1-9/+13
1) In tty.c the BUG_ON at line 115 will never be called, because the the before list_del_init in this same function. 115 BUG_ON(!list_empty(&dev->list)); So move the list_del_init to rfcomm_dev_del 2) The rfcomm_dev_del could be called from diffrent path (rfcomm_tty_hangup/rfcomm_dev_state_change/rfcomm_release_dev), So add another BUG_ON when the rfcomm_dev_del is called more than one time. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-11[POWERPC] Fix CPU hotplug when using the SLB shadow bufferMichael Neuling4-0/+12
Before we register the SLB shadow buffer, we need to invalidate the entries in the buffer, otherwise we can end up stale entries from when we previously offlined the CPU. This does this invalidate as well as unregistering the buffer with PHYP before we offline the cpu. Tested and fixes crashes seen on 970MP (thanks to tonyb) and POWER5. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-01-11ACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9Zhao Yakui2-0/+8
It is important that these resources be reserved to avoid conflicts with well known ACPI registers. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10[AX25] af_ax25: Possible circular locking.Jarek Poplawski1-0/+12
Bernard Pidoux F6BVP reported: > When I killall kissattach I can see the following message. > > This happens on kernel 2.6.24-rc5 already patched with the 6 previously > patches I sent recently. > > > ======================================================= > [ INFO: possible circular locking dependency detected ] > 2.6.23.9 #1 > ------------------------------------------------------- > kissattach/2906 is trying to acquire lock: > (linkfail_lock){-+..}, at: [<d8bd4603>] ax25_link_failed+0x11/0x39 [ax25] > > but task is already holding lock: > (ax25_list_lock){-+..}, at: [<d8bd7c7c>] ax25_device_event+0x38/0x84 > [ax25] > > which lock already depends on the new lock. > > > the existing dependency chain (in reverse order) is: ... lockdep is worried about the different order here: #1 (rose_neigh_list_lock){-+..}: #3 (ax25_list_lock){-+..}: #0 (linkfail_lock){-+..}: #1 (rose_neigh_list_lock){-+..}: #3 (ax25_list_lock){-+..}: #0 (linkfail_lock){-+..}: So, ax25_list_lock could be taken before and after linkfail_lock. I don't know if this three-thread clutch is very probable (or possible at all), but it seems another bug reported by Bernard ("[...] system impossible to reboot with linux-2.6.24-rc5") could have similar source - namely ax25_list_lock held by ax25_kill_by_device() during ax25_disconnect(). It looks like the only place which calls ax25_disconnect() this way, so I guess, it isn't necessary. This patch is breaking the lock for ax25_disconnect(). Reported-and-tested-by: Bernard Pidoux <f6bvp@free.fr> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-11sh: Force __access_ok() to obey address space limit.Paul Mundt1-27/+15
When the thread_info->addr_limit changes were introduced, __access_ok() was missed in the conversion, allowing user processes to perform P1/P2 accesses under certain conditions. This has already been corrected with the nommu refactoring in later kernels. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-10ACPICA: fix acpi_serialize hang regressionBob Moore1-4/+4
http://bugzilla.kernel.org/show_bug.cgi?id=8171 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10ACPI : Not register gsi for PCI IDE controller in legacy modeAlan Cox1-0/+9
When PCI IDE controller works in legacy mode and no PRT entry is found in ACPI PRT table, OSPM will neither read the irq number from the IDE PCI configuration space nor call the function of acpi_register_gsi to register gsi. http://bugzilla.kernel.org/show_bug.cgi?id=5637 Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds1-2/+2
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] padlock: Fix alignment fault in aes_crypt_copy
2008-01-10Merge branch 'upstream-linus' of ↵Linus Torvalds9-33/+78
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata and starting/stopping ATAPI floppy devices sata_sil24: prevent hba lockup when pass-through ATA commands are used Update kernel parameter document for libata DMA mode setting knobs. libata: don't normalize UNKNOWN to NONE after reset libata-pmp: propagate timeout to host link libata-pmp: 4726 hates SRST pata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversion pata_pdc202xx_old: Further fixups libata-sff: PCI IRQ handling fix sata_qstor: use hardreset instead of softreset
2008-01-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds3-13/+58
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: trm290: do hook dma_host_{on,off} methods (take 2) ide: fix cable detection for SATA bridges ide: workaround suspend bug for ACPI IDE
2008-01-10libata and starting/stopping ATAPI floppy devicesOndrej Zary1-1/+2
Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy drives) as they don't seem to like it: sd 1:0:1:0: [sdb] Starting disk ata2.01: configured for PIO2 sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08 sd 1:0:1:0: [sdb] Sense Key : 0x2 [current] sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0 Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-10trm290: do hook dma_host_{on,off} methods (take 2)Sergei Shtylyov1-9/+20
Using default methods caused the chip's DMA PRD count registers, inadvertently starting DMA! While fixing it, also do: - get rid of the 'ide_' prefixes in several functions for which the prefix in the method's name has been 'ide_' ectomized already; - align the code hooking the IDE DMA methods in init_hwif_trm290()... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-10ide: fix cable detection for SATA bridgesGeorge Kibardin1-3/+3
Signed-off-by: George Kibardin <george-kibardin@yandex.ru> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-10ide: workaround suspend bug for ACPI IDEShaohua Li1-1/+35
http://bugzilla.kernel.org/show_bug.cgi?id=9673 ACPI _PS3 cause S4 breaks in the second attempt. The system has a _PS3 method for IDE, which will call into SMM mode. Currently we haven't clue why just the second attempt fails, as it's totally in BIOS code, so blacklist the system so far for 2.6.24. A possible suspect is ACPI NVS isn't save/restore, we will revisit the bug after linux does ACPI NVS save/restore. Bart: - fix scripts/checkpatch.pl complaints - const-ify ide_acpi_dmi_table[] Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Reported-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-10sata_sil24: prevent hba lockup when pass-through ATA commands are usedGwendal Grignou1-11/+26
Fix commands timeout with Sil3124/3132 based HBA when pass-through ATA commands [where ATA_QCFLAG_RESULT_TF is set] are used while other commands are active on other devices connected to the same port with a Port Multiplier. Due to a hardware bug, these commands must be sent alone, like ATAPI commands. Signed-off-by: Gwendal Grignou <gwendal@google.com> Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10Update kernel parameter document for libata DMA mode setting knobs.FD Cami1-0/+8
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10libata: don't normalize UNKNOWN to NONE after resetTejun Heo1-3/+1
After non-classifying reset, ehc->classes[] could contain ATA_DEV_UNKNOWN which used to be normalized to ATA_DEV_NONE for consistency. However, this causes unfortunate side effect for drivers which have non-classifying hardresets (e.g. sata_nv) by making hardreset report ATA_DEV_NONE for non-classifying resets and thus makes EH believe that the port is unoccupied and recovery can be skipped. The end result is that after a device is swapped with another one, the new device isn't attached after the old one is detached. This patch makes ata_eh_reset() not normalize UNKNOWN to NONE after non-classifying resets. This fixes the above problem. As UNKNOWN and NONE are handled differently by only EH hotplug logic, this doesn't cause other behavior changes. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10libata-pmp: propagate timeout to host linkTejun Heo1-5/+15
Timeout on downstream command may indicate transmission problem on host link. Propagate timeouts to host link. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10libata-pmp: 4726 hates SRSTTejun Heo1-7/+5
4726 hates SRST even on non-config ports. Don't use it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10pata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversionRod Whitby1-1/+2
Fixes a compilation error caused by ata_port_desc() conversion (cbcdd87593a1d85c5c4b259945a3a09eee12814d). Signed-off-by: Rod Whitby <rod@whitby.id.au> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10pata_pdc202xx_old: Further fixupsAlan Cox1-2/+13
Turns out distros always enabled burst mode and it is pretty essential so do the same. Also sort out the post DMA mode restore properly. My 20263 card now seems happy but needs some four drive tests done yet (when I've persuaded the kernel not to hang in the edd boot code if I plug them in ..) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10libata-sff: PCI IRQ handling fixAlan Cox1-2/+5
It is legitimate (although annoying and silly) for a PCI IDE controller not to be assigned an interrupt and to be polled. The libata-sff code should therefore not try and request IRQ 0 in this case. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10sata_qstor: use hardreset instead of softresetTejun Heo1-1/+1
During conversion to new EH, sata_qstor was accidentaly changed to use softreset, which is buggy on this chip, instead of hardreset. This patch updates sata_qstor such that it uses hardreset again. This fixes bugzilla bug 9631. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-10NFSv4: Give the lock stateid its own sequence queueTrond Myklebust2-1/+5
Sharing the open sequence queue causes a deadlock when we try to take both a lock sequence id and and open sequence id. This fixes the regression reported by Dimitri Puzin and Jeff Garzik: See http://bugzilla.kernel.org/show_bug.cgi?id=9712 for details. Reported-and-tested-by: Dimitri Puzin <bugs@psycast.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Tested-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-10rt2x00: Put 802.11 data on 4 byte boundaryIvo van Doorn2-6/+31
Check the size of the ieee80211 header during rxdone and make sure the data behind the ieee80211 header is placed on a 4 byte boundary. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-10rt2x00: Corectly initialize rt2500usb MACIvo van Doorn1-1/+1
mac is a pointer, obviously we shouldn't use the address of a pointer as MAC address. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-10rt2x00: Allow rt61 to catch up after a missing tx reportMattias Nissler1-0/+12
Sometimes it happens in the tx path that an entry given to the hardware isn't reported in the txdone handler. This ultimately led to the dreaded "non-free entry in the non-full queue" message and the stopping of the tx queue. Work around this issue by allowing the driver to also clear out previos entries in the txdone handler. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-11[CRYPTO] padlock: Fix alignment fault in aes_crypt_copyHerbert Xu1-2/+2
The previous patch fixed spurious read faults from occuring by copying the data if we happen to have a single block at the end of a page. It appears that gcc cannot guarantee 16-byte alignment in the kernel with __attribute__. The following report from Torben Viets shows a buffer that's only 8-byte aligned: > eneral protection fault: 0000 [#1] > Modules linked in: xt_TCPMSS xt_tcpmss iptable_mangle ipt_MASQUERADE > xt_tcpudp xt_mark xt_state iptable_nat nf_nat nf_conntrack_ipv4 > iptable_filter ip_tables x_tables pppoe pppox af_packet ppp_generic slhc > aes_i586 > CPU: 0 > EIP: 0060:[<c035b828>] Not tainted VLI > EFLAGS: 00010292 (2.6.23.12 #7) > EIP is at aes_crypt_copy+0x28/0x40 > eax: f7639ff0 ebx: f6c24050 ecx: 00000001 edx: f6c24030 > esi: f7e89dc8 edi: f7639ff0 ebp: 00010000 esp: f7e89dc8 Since the hardware must have 16-byte alignment, the following patch fixes this by open coding the alignment adjustment. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-10[ARM] vfp: fix fuitod/fsitod instructionsRussell King2-3/+13
These two instructions exceptionally take a single precision register as their operand. This means we can't use vfp_get_dm() to read the register number - we need to use vfp_get_sm() instead. Add a flag to indicate this exception to the general rule. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-10[POWERPC] efika: add phy-handle property for fec_mpc52xxOlaf Hering1-0/+39
The new network driver fec_mpc52xx will not work on efika because the firmware does not provide all required properties. http://www.powerdeveloper.org/asset/by-id/46 has a Forth script to create more properties. But only the phy stuff is required to get a working network. This should go into the kernel because its appearently impossible to boot the script via tftp and then load the real boot binary (yaboot or zimage). Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-01-10[ARM] pxa: silence warnings from cpu_is_xxx() macrosRussell King2-16/+21
If only a single CPU type is selected, __cpu_is_xxx() doesn't use its argument. This causes the compiler to issue a warning about an unused variable in the parent function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-10[AX25]: Kill user triggable printks.maximilian attems1-21/+18
sfuzz can easily trigger any of those. move the printk message to the corresponding comment: makes the intention of the code clear and easy to pick up on an scheduled removal. as bonus simplify the braces placement. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cacheEric Dumazet1-3/+3
In rt_cache_get_next(), no need to guard seq->private by a rcu_dereference() since seq is private to the thread running this function. Reading seq.private once (as guaranted bu rcu_dereference()) or several time if compiler really is dumb enough wont change the result. But we miss real spots where rcu_dereference() are needed, both in rt_cache_get_first() and rt_cache_get_next() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[NEIGH]: Fix race between neigh_parms_release and neightbl_fill_parmsPavel Emelyanov1-2/+2
The neightbl_fill_parms() is called under the write-locked tbl->lock and accesses the parms->dev. The negh_parm_release() calls the dev_put(parms->dev) without this lock. This creates a tiny race window on which the parms contains potentially stale dev pointer. To fix this race it's enough to move the dev_put() upper under the tbl->lock, but note, that the parms are held by neighbors and thus can live after the neigh_parms_release() is called, so we still can have a parm with bad dev pointer. I didn't find where the neigh->parms->dev is accessed, but still think that putting the dev is to be done in a place, where the parms are really freed. Am I right with that? Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-10[NIU]: Support for Marvell PHYMirko Lindner2-20/+231
From: Mirko Lindner <mlindner@marvell.com> This patch makes necessary changes in the Neptune driver to support the new Marvell PHY. It also adds support for the LED blinking on Neptune cards with Marvell PHY. All registers are using defines in the niu.h header file as is already done for the BCM8704 registers. [ Coding style, etc. cleanups -DaveM ] Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-09[SCSI] qla1280: fix 32 bit segment codeFUJITA Tomonori1-1/+1
There's an error remaining in the 32 bit descriptor code after the conversion to dma accessors: req_cnt is left uninitialised. qla1280_32bit_start_scsi gives the following warnings: drivers/scsi/qla1280.c: In function 'qla1280_32bit_start_scsi': drivers/scsi/qla1280.c:3044: warning: unused variable 'dma_handle' drivers/scsi/qla1280.c: In function 'qla1280_queuecommand': drivers/scsi/qla1280.c:3060: warning: 'req_cnt' is used uninitialized in this function drivers/scsi/qla1280.c:3042: note: 'req_cnt' was declared here Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds53-248/+262
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (36 commits) [ATM]: Check IP header validity in mpc_send_packet [IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect() [CONNECTOR]: Don't touch queue dev after decrement of ref count. [SOCK]: Adds a rcu_dereference() in sk_filter [XFRM]: xfrm_algo_clone() allocates too much memory [FORCEDETH]: Fix reversing the MAC address on suspend. [NET]: mcs7830 passes msecs instead of jiffies to usb_control_msg [LRO] Fix lro_mgr->features checks [NET]: Clone the sk_buff 'iif' field in __skb_clone() [IPV4] ROUTE: ip_rt_dump() is unecessary slow [NET]: kaweth was forgotten in msec switchover of usb_start_wait_urb [NET] Intel ethernet drivers: update MAINTAINERS [NET]: Make ->poll() breakout consistent in Intel ethernet drivers. [NET]: Stop polling when napi_disable() is pending. [NET]: Fix drivers to handle napi_disable() disabling interrupts. [NETXEN]: Fix ->poll() done logic. mac80211: return an error when SIWRATE doesn't match any rate ssb: Fix probing of PCI cores if PCI and PCIE core is available [NET]: Do not check netif_running() and carrier state in ->poll() [NET]: Add NAPI_STATE_DISABLE. ...
2008-01-09show_task: real_parentRoland McGrath1-1/+1
The show_task function invoked by sysrq-t et al displays the pid and parent's pid of each task. It seems more useful to show the actual process hierarchy here than who is using ptrace on each process. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-09[ATM]: Check IP header validity in mpc_send_packetHerbert Xu1-0/+7
Al went through the ip_fast_csum callers and found this piece of code that did not validate the IP header. While root crashing the machine by sending bogus packets through raw or AF_PACKET sockets isn't that serious, it is still nice to react gracefully. This patch ensures that the skb has enough data for an IP header and that the header length field is valid. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()Brian Haley1-3/+3
Signed-off-by: Brian Haley <brian.haley@hp.com> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[CONNECTOR]: Don't touch queue dev after decrement of ref count.Li Zefan1-1/+1
cn_queue_free_callback() will touch 'dev'(i.e. cbq->pdev), so it should be called before atomic_dec(&dev->refcnt). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[SOCK]: Adds a rcu_dereference() in sk_filterEric Dumazet1-1/+1
It seems commit fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9 introduced a RCU protection for sk_filter(), without a rcu_dereference() Either we need a rcu_dereference(), either a comment should explain why we dont need it. I vote for the former. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[XFRM]: xfrm_algo_clone() allocates too much memoryEric Dumazet2-12/+12
alg_key_len is the length in bits of the key, not in bytes. Best way to fix this is to move alg_len() function from net/xfrm/xfrm_user.c to include/net/xfrm.h, and to use it in xfrm_algo_clone() alg_len() is renamed to xfrm_alg_len() because of its global exposition. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[FORCEDETH]: Fix reversing the MAC address on suspend.Björn Steinbrink1-4/+2
For cards that initially have the MAC address stored in reverse order, the forcedeth driver uses a flag to signal whether the address was already corrected, so that it is not reversed again on a subsequent probe. Unfortunately this flag, which is stored in a register of the card, seems to get lost during suspend, resulting in the MAC address being reversed again. To fix that, the MAC address needs to be written back in reversed order before we suspend and the flag needs to be reset. The flag is still required because at least kexec will never write back the reversed address and thus needs to know what state the card is in. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: mcs7830 passes msecs instead of jiffies to usb_control_msgRuss Dill1-2/+2
usb_control_msg was changed long ago (2.6.12-pre) to take milliseconds instead of jiffies. Oddly, mcs7830 wasn't added until 2.6.19-rc3. Signed-off-by: Russ Dill <Russ.Dill@asu.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[LRO] Fix lro_mgr->features checksBrice Goglin1-8/+8
lro_mgr->features contains a bitmask of LRO_F_* values which are defined as power of two, not as bit indexes. They must be checked with x&LRO_F_FOO, not with test_bit(LRO_F_FOO,&x). Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr> Acked-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: Clone the sk_buff 'iif' field in __skb_clone()Paul Moore2-6/+6
Both NetLabel and SELinux (other LSMs may grow to use it as well) rely on the 'iif' field to determine the receiving network interface of inbound packets. Unfortunately, at present this field is not preserved across a skb clone operation which can lead to garbage values if the cloned skb is sent back through the network stack. This patch corrects this problem by properly copying the 'iif' field in __skb_clone() and removing the 'iif' field assignment from skb_act_clone() since it is no longer needed. Also, while we are here, put the assignments in the same order as the offsets to reduce cacheline bounces. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[IPV4] ROUTE: ip_rt_dump() is unecessary slowEric Dumazet1-4/+4
I noticed "ip route list cache x.y.z.t" can be *very* slow. While strace-ing -T it I also noticed that first part of route cache is fetched quite fast : recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202 GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3772 <0.000047> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\ 202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3736 <0.000042> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\ 202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3740 <0.000055> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\ 202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3712 <0.000043> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\ 202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3732 <0.000053> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202 GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3708 <0.000052> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202 GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3680 <0.000041> while the part at the end of the table is more expensive: recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3656 <0.003857> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3772 <0.003891> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3712 <0.003765> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3700 <0.003879> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3676 <0.003797> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3724 <0.003856> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\202GXm\0\0\2 \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 3736 <0.003848> The following patch corrects this performance/latency problem, removing quadratic behavior. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: kaweth was forgotten in msec switchover of usb_start_wait_urbRuss Dill1-1/+1
Back in 2.6.12-pre, usb_start_wait_urb was switched over to take milliseconds instead of jiffies. kaweth.c was never updated to match. Signed-off-by: Russ Dill <Russ.Dill@asu.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET] Intel ethernet drivers: update MAINTAINERSAuke Kok1-10/+8
Unfortunately Jeb decided to move away from our group. We wish Jeb good luck with his new group! Reordered people a bit so most active team members are on top. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.David S. Miller5-21/+19
This makes the ->poll() routines of the E100, E1000, E1000E, IXGB, and IXGBE drivers complete ->poll() consistently. Now they will all break out when the amount of RX work done is less than 'budget'. At a later time, we may want put back code to include the TX work as well (as at least one other NAPI driver does, but by in large NAPI drivers do not do this). But if so, it should be done consistently across the board to all of these drivers. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
2008-01-08[NET]: Stop polling when napi_disable() is pending.David S. Miller1-2/+6
This finally adds the code in net_rx_action() to break out of the ->poll()'ing loop when a napi_disable() is found to be pending. Now, even if a device is being flooded with packets it can be cleanly brought down. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: Fix drivers to handle napi_disable() disabling interrupts.David S. Miller3-0/+10
When we add the generic napi_disable_pending() breakout logic to net_rx_action() it means that napi_disable() can cause NAPI poll interrupt events to be disabled. And this is exactly what we want. If a napi_disable() is pending, and we are looping in the ->poll(), we want ->poll() event interrupts to stay disabled and we want to complete the NAPI poll ASAP. When ->poll() break out during device down was being handled on a per-driver basis, often these drivers would turn interrupts back on when '!netif_running()' was detected. And this would just cause a reschedule of the NAPI ->poll() in the interrupt handler before the napi_disable() could get in there and grab the NAPI_STATE_SCHED bit. The vast majority of drivers don't care if napi_disable() might have the side effect of disabling NAPI ->poll() event interrupts. In all such cases, when a napi_disable() is performed, the driver just disabled interrupts or is about to. However there were three exceptions to this in PCNET32, R8169, and SKY2. To fix those cases, at the subsequent napi_enable() points, I added code to ensure that the ->poll() interrupt events are enabled in the hardware. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Don Fry <pcnet32@verizon.net>
2008-01-08[NETXEN]: Fix ->poll() done logic.David S. Miller1-1/+1
If work_done >= budget we should always elide the NAPI completion. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08mac80211: return an error when SIWRATE doesn't match any rateAndrew Lutomirski1-3/+3
Currently mac80211 fails silently when trying to set a nonexistent rate. Return an error instead. Signed-Off-By: Andy Lutomirski <luto@myrealbox.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-08ssb: Fix probing of PCI cores if PCI and PCIE core is availableMichael Buesch1-0/+11
This will make sure that always the correct core is selected, even if there are both a PCI and PCI-E core on a PCI or PCI-E card. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-08[NET]: Do not check netif_running() and carrier state in ->poll()David S. Miller15-55/+9
Drivers do this to try to break out of the ->poll()'ing loop when the device is being brought administratively down. Now that we have a napi_disable() "pending" state we are going to solve that problem generically. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: Add NAPI_STATE_DISABLE.David S. Miller1-3/+13
Create a bit to signal that a napi_disable() is in progress. This sets up infrastructure such that net_rx_action() can generically break out of the ->poll() loop on a NAPI context that has a pending napi_disable() yet is being bombed with packets (and thus would otherwise poll endlessly and not allow the napi_disable() to finish). Now, what napi_disable() does is first set the NAPI_STATE_DISABLE bit (to indicate that a disable is pending), then it polls for the NAPI_STATE_SCHED bit, and once the NAPI_STATE_SCHED bit is acquired the NAPI_STATE_DISABLE bit is cleared. Here, the test_and_set_bit() provides the necessary memory barrier between the various bitops. napi_schedule_prep() now tests for a pending disable as it's first action and won't try to obtain the NAPI_STATE_SCHED bit if a disable is pending. As a result, we can remove the netif_running() check in netif_rx_schedule_prep() because the NAPI disable pending state serves this purpose. And, it does so in a NAPI centric manner which is what we really want. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: Do not grab device reference when scheduling a NAPI poll.David S. Miller1-2/+0
It is pointless, because everything that can make a device go away will do a napi_disable() first. The main impetus behind this is that now we can legally do a NAPI completion in generic code like net_rx_action() which a following changeset needs to do. net_rx_action() can only perform actions in NAPI centric ways, because there may be a one to many mapping between NAPI contexts and network devices (SKY2 is one example). We also want to get rid of this because it's an extra atomic in the NAPI paths, and also because it is one of the last instances where the NAPI interfaces care about net devices. The one remaining netdev detail the NAPI stuff cares about is the netif_running() check which will be killed off in a subsequent changeset. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08b43: Fix rxheader channel parsingMichael Buesch4-53/+61
This patch fixes the parsing of the RX data header channel field. The current code parses the header incorrectly and passes a wrong channel number and frequency for each frame to mac80211. The FIXMEs added by this patch don't matter for now as the code where they live won't get executed anyway. They will be fixed later. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-08[IRDA]: irda_create() nuke user triggable printkmaximilian attems1-2/+0
easy to trigger as user with sfuzz. irda_create() is quiet on unknown sock->type, match this behaviour for SOCK_DGRAM unknown protocol Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[SCTP]: Add back the code that accounted for FORWARD_TSN parameter in INIT.Vlad Yasevich1-0/+6
Some recent changes completely removed accounting for the FORWARD_TSN parameter length in the INIT and INIT-ACK chunk. This is wrong and should be restored. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[SCTP]: Correctly handle AUTH parameters in unexpected INITVlad Yasevich1-22/+0
When processing an unexpected INIT chunk, we do not need to do any preservation of the old AUTH parameters. In fact, doing such preservations will nullify AUTH and allow connection stealing. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[SCTP]: Fix the name of the authentication event.Vlad Yasevich2-2/+2
The even should be called SCTP_AUTHENTICATION_INDICATION. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[ATM]: [nicstar] delay irq setup until card is configuredChas Williams1-10/+9
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[TULIP]: NAPI full quantum bug.Stephen Hemminger1-1/+2
This should fix the kernel warn/oops reported while routing. The tulip driver has a fencepost bug with new NAPI in 2.6.24 It has an off by one bug if a full quantum is reached. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[METH]: Fix MAC address handling.Thomas Bogendoerfer1-3/+7
meth didn't set a valid mac address during probing, but later during open. Newer kernel refuse to open device with 00:00:00:00:00:00 as mac address -> dead ethernet. This patch sets the mac address in the probe function and uses only the mac address from the netdevice struct when setting up the hardware. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NET]: Fix netx-eth.c compilation.Adrian Bunk1-2/+2
This was missed when commit e2ac455a18806b31c2d0da0a51d8740af5010b7a fixed the compile errors in drivers/net/netx-eth.c caused by commit 09f75cd7bf13720738e6a196cc0107ce9a5bd5a0. Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[IPV4] ipconfig: Fix regression in ip command line processingAmos Waterland2-4/+19
The recent changes for ip command line processing fixed some problems but unfortunately broke some common usage scenarios. In current 2.6.24-rc6 the following command line results in no IP address assignment, which is surely a regression: ip=10.0.2.15::10.0.2.2:255.255.255.0::eth0:off Please find below a patch that works for all cases I can find. Signed-off-by: Amos Waterland <apw@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[IPV4] raw: Strengthen check on validity of iph->ihlHerbert Xu1-1/+3
We currently check that iph->ihl is bounded by the real length and that the real length is greater than the minimum IP header length. However, we did not check the caes where iph->ihl is less than the minimum IP header length. This breaks because some ip_fast_csum implementations assume that which is quite reasonable. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NIU]: Update driver version and release date.David S. Miller1-2/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NIU]: Fix potentially stuck TCP socket send queues.David S. Miller1-1/+2
It is possible for the TX ring to have packets sit in it for unbounded amounts of time. The only way to defer TX interrupts in the chip is to periodically set "mark" bits, when processing of a TX descriptor with the mark bit set is complete it triggers the interrupt for the TX queue's LDG. A consequence of this kind of scheme is that if packet flow suddenly stops, the remaining TX packets will just sit there. If this happens, since those packets could be charged to TCP socket send queues, such sockets could get stuck. The simplest solution is to divorce the socket ownership of the packet once the device takes the SKB, by using skb_orphan() in niu_start_xmit(). In hindsight, it would have been much nicer if the chip provided two interrupt sources for TX (like basically every other ethernet chip does). Namely, keep the "mark" bit, but also signal the LDG when the TX queue becomes completely empty. That way there is no need to have a deadlock breaker like this. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NIU]: Missing ->last_rx update.David S. Miller1-0/+2
Noticed by Paul Lodridge. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08[NIU]: Fix slowpath interrupt handling.Matheos Worku1-11/+23
niu_slowpath_interrupt() expects values to be setup in lp->{v0,v1,v2} but they aren't. That's only done by niu_schedule_napi() which is done later in the interrupt path. If niu_rx_error() returns zero, and v0 is clear, hit the RX_DMA_CTL_STATE register with a RX_DMA_CTL_STAT_MEX. Only emit verbose RX error logs if a fatal channel or port error is signalled. Other cases will be recorded into statistics by niu_log_rxchan_errors(). Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-08futex: Prevent stale futex owner when interrupted/timeoutThomas Gleixner1-10/+41
Roland Westrelin did a great analysis of a long standing thinko in the return path of futex_lock_pi. While we fixed the lock steal case long ago, which was easy to trigger, we never had a test case which exposed this problem and stupidly never thought about the reverse lock stealing scenario and the return to user space with a stale state. When a blocked tasks returns from rt_mutex_timed_locked without holding the rt_mutex (due to a signal or timeout) and at the same time the task holding the futex is releasing the futex and assigning the ownership of the futex to the returning task, then it might happen that a third task acquires the rt_mutex before the final rt_mutex_trylock() of the returning task happens under the futex hash bucket lock. The returning task returns to user space with ETIMEOUT or EINTR, but the user space futex value is assigned to this task. The task which acquired the rt_mutex fixes the user space futex value right after the hash bucket lock has been released by the returning task, but for a short period of time the user space value is wrong. Detailed description is available at: https://bugzilla.redhat.com/show_bug.cgi?id=400541 The fix for this is the same as we do when the rt_mutex was acquired by a higher priority task via lock stealing from the designated new owner. In that case we already fix the user space value and the internal pi_state up before we return. This mechanism can be used to fixup the above corner case as well. When the returning task, which failed to acquire the rt_mutex, notices that it is the designated owner of the futex, then it fixes up the stale user space value and the pi_state, before returning to user space. This happens with the futex hash bucket lock held, so the task which acquired the rt_mutex is guaranteed to be blocked on the hash bucket lock. We can access the rt_mutex owner, which gives us the pid of the new owner, safely here as the owner is not able to modify (release) it while waiting on the hash bucket lock. Rename the "curr" argument of fixup_pi_state_owner() to "newowner" to avoid confusion with current and add the check for the stale state into the failure path of rt_mutex_trylock() in the return path of unlock_futex_pi(). If the situation is detected use fixup_pi_state_owner() to assign everything to the owner of the rt_mutex. Pointed-out-and-tested-by: Roland Westrelin <roland.westrelin@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08pl2303: Fix mode switching regressionAlan Cox3-0/+27
Cleaning out all the incorrect 'no change made' checks for termios settings showed up a problem with the PL2303. The hardware here seems to lose sync and bits if you tell it to make no changes. This shows up with a real world application. To fix this the driver check for meaningful hardware changes is restored but doing the tests correctly and as a tty layer function so it doesn't get duplicated wrongly everywhere if other drivers turn out to need it. Signed-off-by: Alan Cox <alan@redhat.com> Tested-by: Mirko Parthey <mirko.parthey@informatik.tu-chemnitz.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08hfs: handle more on-disk corruptions without oopsingEric Sandeen4-3/+42
hfs seems prone to bad things when it encounters on disk corruption. Many values are read from disk, and used as lengths to memcpy, as an example. This patch fixes up several of these problematic cases. o sanity check the on-disk maximum key lengths on mount (these are set to a defined value at mkfs time and shouldn't differ) o check on-disk node keylens against the maximum key length for each tree o fix hfs_btree_open so that going out via free_tree: doesn't wind up in hfs_releasepage, which wants to follow the very pointer we were trying to set up: HFS_SB(sb)->cat_tree = hfs_btree_open() ... failure gets to hfs_releasepage and tries to follow HFS_SB(sb)->cat_tree Tested with the fsfuzzer; it survives more than it used to. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0Thomas Bogendoerfer1-1/+1
When using FLAT_MEMORY and ARCH_PFN_OFFSET is not 0, the kernel crashes in memmap_init_zone(). This bug got introduced by commit c713216deebd95d2b0ab38fef8bb2361c0180c2d Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Mel Gorman <mel@csn.ul.ie> Cc: Bob Picco <bob.picco@hp.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Andi Kleen <ak@muc.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: "Keith Mannthey" <kmannth@gmail.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08snd_mixer_oss_build_input(): fix for __you_cannot_kmalloc_that_much failure ↵Jean Delvare1-38/+63
with gcc-3.2 Rework this functions so that gcc-3.2 can successfully perform constant-folding. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08dmi-id: fix for __you_cannot_kmalloc_that_much failureJean Delvare1-5/+14
gcc 3.2 has a hard time coping with the code in dmi_id_init(): drivers/built-in.o(.init.text+0x789e): In function `dmi_id_init': : undefined reference to `__you_cannot_kmalloc_that_much' make: *** [.tmp_vmlinux1] Error 1 Moving half of the code to a separate function seems to help. This is a no-op for gcc 4.1 which will successfully inline the code anyway. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Dave Airlie <airlied@linux.ie> Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08vmcoreinfo: add the array length of "free_list" for filtering free pagesKen'ichi Ohmichi1-0/+1
This patch adds the array length of "free_area.free_list" to the vmcoreinfo data so that makedumpfile (dump filtering command) can exclude all free pages in linux-2.6.24. makedumpfile creates a small dumpfile by excluding unnecessary pages for the analysis. To distinguish unnecessary pages, makedumpfile gets the vmcoreinfo data which has the minimum debugging information only for dump filtering. In 2.6.24-rc1 or later, the free_area.free_list is an array which has one list for each migrate types instead of a single list. makedumpfile needs the array length of "free_area.free_list" and the vmcoreinfo data should contain it. Signed-off-by: Huang Ying <ying.huang@intel.com> Tested-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Acked-by: Simon Horman <horms@verge.net.au> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08eCryptfs: fix dentry handling on create error, unlink, and inode destroyMichael Halcrow2-17/+4
This patch corrects some erroneous dentry handling in eCryptfs. If there is a problem creating the lower file, then there is nothing that the persistent lower file can do to really help us. This patch makes a vfs_create() failure in the lower filesystem always lead to an unconditional do_create failure in eCryptfs. Under certain sequences of operations, the eCryptfs dentry can remain in the dcache after an unlink. This patch calls d_drop() on the eCryptfs dentry to correct this. eCryptfs has no business calling d_delete() directly on a lower filesystem's dentry. This patch removes the call to d_delete() on the lower persistent file's dentry in ecryptfs_destroy_inode(). (Thanks to David Kleikamp, Eric Sandeen, and Jeff Moyer for helping identify and resolve this issue) Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Eric Sandeen <sandeen@redhat.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08xip: fix get_zeroed_page with __GFP_HIGHMEMAkinobu Mita1-4/+5
The use of get_zeroed_page() with __GFP_HIGHMEM is invalid. Use alloc_page() with __GFP_ZERO instead of invalid get_zeroed_page(). (This patch is only compile tested) Cc: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Hugh Dickins <hugh@veritas.com> Acked-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08md: fix data corruption when a degraded raid5 array is reshapedDan Williams1-2/+4
We currently do not wait for the block from the missing device to be computed from parity before copying data to the new stripe layout. The change in the raid6 code is not techincally needed as we don't delay data block recovery in the same way for raid6 yet. But making the change now is safer long-term. This bug exists in 2.6.23 and 2.6.24-rc Cc: <stable@kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08KEYS: fix macroSebastian Siewior1-1/+1
Commit 664cceb0093b755739e56572b836a99104ee8a75 changed the parameters of the function make_key_ref(). The macros that are used in case CONFIG_KEY is not defined did not change. Cc: David Howells <dhowells@redhat.com> Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08fat: optimize fat_count_free_clusters()OGAWA Hirofumi1-0/+28
On large partition, scanning the free clusters is very slow if users doesn't use "usefree" option. For optimizing it, this patch uses sb_breadahead() to read of FAT sectors. On some user's 15GB partition, this patch improved it very much (1min => 600ms). The following is the result of 2GB partition on my machine. without patch: root@devron (/)# time df -h > /dev/null real 0m1.202s user 0m0.000s sys 0m0.440s with patch: root@devron (/)# time df -h > /dev/null real 0m0.378s user 0m0.012s sys 0m0.168s Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08spi_bitbang: always grab lock with irqs blockedDavid Brownell1-2/+3
Fix a glitch reported by lockdep in the spi_bitbang code: it needs to consistently block IRQs when holding that spinlock. 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>
2008-01-08x86: fix do_fork_idle section mismatchThomas Gleixner1-1/+1
With CPU_HOTPLUG=n: WARNING: vmlinux.o(.text+0x104f8): Section mismatch: reference to .init.text:fork_idle (between 'do_fork_idle' and 'lapic_timer_broadcast') do_fork_idle() needs to be __cpuinit. It can be static as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08Merge branch 'for-linus' of ↵Linus Torvalds3-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/srp: Release transport before removing host IB/mlx4: Fix value of pkey_index in QP1 completions MAINTAINERS: Update Sean Hefty's email address
2008-01-08IB/srp: Release transport before removing hostDave Dillow1-1/+1
The documented call sequence for removing a host is to call the transport xxx_remove_host() prior to scsi_remove_host(). The SRP transport used to crash when that order was followed, but as it is now fixed, use the documented order. Signed-off-by: David Dillow <dillowda@ornl.gov> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-08IB/mlx4: Fix value of pkey_index in QP1 completionsDotan Barak1-1/+1
Fix the value of pkey_index in completions to get a valid value for GSI QPs. Without this fix, incoming GSI packets on port 2 get an invalid P_Key index in the completion, which prevents the MAD layer from sending back a response, which can make the second port of ConnectX HCAs completely useless. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-08Revert "hda_intel suspend latency: shorten codec read"Linus Torvalds1-2/+1
This reverts commit 57a04513cb35086d54bcb2cb92e6627fc8fa0fae. Harald Dunkel reports that it broke sound for him: "Alsa stopped working for me. I still can access /dev/dsp, change the volume and so on, but the speakers are quiet." Reverting it fixed things for him. Reported-and-tested-by: Harald Dunkel <harald.dunkel@t-online.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08MAINTAINERS: Update Sean Hefty's email addressSean Hefty1-1/+1
My Unix email account is being discontinued at end of Q1 '08. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-07acct: real_parent ppidRoland McGrath1-1/+1
The ac_ppid field reported in process accounting records should match what getppid() would have returned to that process, regardless of whether a debugger is attached. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-07core dump: real_parent ppidRoland McGrath1-2/+2
The pr_ppid field reported in core dumps should match what getppid() would have returned to that process, regardless of whether a debugger is attached. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-07ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE caseVenki Pallipadi1-0/+4
This was writeable in 2.6.23 but the cpuidle merge made it read-only. But some people's scripts (ie: Mark's) were writing to it. As an unhappy compromise, make max_cstate writeable again if the kernel was configured without CONFIG_CPU_IDLE. http://bugzilla.kernel.org/show_bug.cgi?id=9683 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Mark Lord <lkml@rtr.ca> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-07Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds9-47/+57
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix CONFIG_BOOT_RAW. [MIPS] Assume R4000/R4400 newer than 3.0 don't have the mfc0 count bug [MIPS] Fix IP32 breakage [MIPS] Alchemy: Fix use of __init code bug exposed by modpost warning [MIPS] Move inclusing of kernel/time/Kconfig menu to appropriate place
2008-01-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvbLinus Torvalds3-7/+6
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: V4L/DVB (6916): ivtv: udelay has to be changed *after* the eeprom was read, not before V4L/DVB (6944a): Fix Regression VIDIOCGMBUF ioctl hangs on bttv driver
2008-01-07[MIPS] Fix CONFIG_BOOT_RAW.Ralf Baechle1-1/+2
This was broken by 017e3a492683b32d17dcd1b13b279745cc656073 (lmo) / 396a2ae08e5080b140330645743ab2567f6bc426 (kernel.org). Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-07[MIPS] Assume R4000/R4400 newer than 3.0 don't have the mfc0 count bugThomas Bogendoerfer1-2/+2
This seems as reasonable assumption and gets some SNI machines to work which currently must rely on the cp0 counter as clocksource. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-07[MIPS] Fix IP32 breakageThomas Bogendoerfer4-13/+19
- suppress master aborts during config read - set io_map_base - only fixup end of iomem resource to avoid failing request_resource in serial driver - killed useless setting of crime_int bit, which caused wrong interrupts - use physcial address for serial port platform device and let 8250 driver do the ioremap Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-07[MIPS] Alchemy: Fix use of __init code bug exposed by modpost warningSergei Shtylyov2-29/+32
WARNING: vmlinux.o(.text+0x1ca608): Section mismatch: reference to .init.text: add_wired_entry (between 'config_access' and 'config_read') by refactoring the code calling add_wired_entry() from config_access() to a separate function which is called from aau1x_pci_setup(). While at it: - make some unnecassarily global variables 'static'; - fix the letter case, whitespace, etc. in the comments... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>