]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agocache invalidation error for buffered write
Massimo Cirillo [Fri, 11 Jan 2008 10:24:11 +0000 (10:24 +0000)]
cache invalidation error for buffered write

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>
16 years agoIDE: terminate ACPI DMI list
Jeff Garzik [Fri, 11 Jan 2008 04:59:18 +0000 (23:59 -0500)]
IDE: terminate ACPI DMI list

Fix oops reported by Trond.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPull bugzilla-9683 into release branch
Len Brown [Fri, 11 Jan 2008 17:28:38 +0000 (12:28 -0500)]
Pull bugzilla-9683 into release branch

16 years agoPull bugzilla-9627 into release branch
Len Brown [Fri, 11 Jan 2008 17:28:22 +0000 (12:28 -0500)]
Pull bugzilla-9627 into release branch

16 years agoPull bugzilla-9535 into release branch
Len Brown [Fri, 11 Jan 2008 17:27:50 +0000 (12:27 -0500)]
Pull bugzilla-9535 into release branch

16 years agoPull bugzilla-9494 into release branch
Len Brown [Fri, 11 Jan 2008 17:27:32 +0000 (12:27 -0500)]
Pull bugzilla-9494 into release branch

16 years agoPull bugzilla-9194 into release branch
Len Brown [Fri, 11 Jan 2008 17:27:13 +0000 (12:27 -0500)]
Pull bugzilla-9194 into release branch

16 years agoPM: ACPI and APM must not be enabled at the same time
Len Brown [Thu, 13 Dec 2007 22:38:03 +0000 (17:38 -0500)]
PM: ACPI and APM must not be enabled at the same time

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>
16 years agoPull bugzilla-8973 into release branch
Len Brown [Fri, 11 Jan 2008 17:23:14 +0000 (12:23 -0500)]
Pull bugzilla-8973 into release branch

16 years agoPull bugzilla-8171 into release branch
Len Brown [Fri, 11 Jan 2008 17:22:57 +0000 (12:22 -0500)]
Pull bugzilla-8171 into release branch

16 years agoPull bugzilla-5637 into release branch
Len Brown [Fri, 11 Jan 2008 17:20:18 +0000 (12:20 -0500)]
Pull bugzilla-5637 into release branch

16 years ago[MIPS] Replace 40c7869b693b18412491fdcff64682215b739f9e kludge
Atsushi Nemoto [Mon, 7 Jan 2008 15:41:13 +0000 (00:41 +0900)]
[MIPS] Replace 40c7869b693b18412491fdcff64682215b739f9e kludge

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Lasat: Fix built in separate object directory.
WANG Cong [Wed, 2 Jan 2008 06:21:36 +0000 (14:21 +0800)]
[MIPS] Lasat: Fix built in separate object directory.

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>
16 years ago[MIPS] Malta: Fix software reset on big endian
Dmitri Vorobiev [Tue, 8 Jan 2008 03:44:00 +0000 (06:44 +0300)]
[MIPS] Malta: Fix software reset on big endian

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>
16 years ago[MIPS] pnx8xxx: move to clocksource
Vitaly Wool [Thu, 10 Jan 2008 14:10:05 +0000 (17:10 +0300)]
[MIPS] pnx8xxx: move to clocksource

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>
16 years ago[MIPS] Wrong CONFIG option prevents setup of DMA zone.
Thomas Bogendoerfer [Sun, 30 Dec 2007 11:45:40 +0000 (12:45 +0100)]
[MIPS] Wrong CONFIG option prevents setup of DMA zone.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoV4L/DVB (7001): av7110: fix section mismatch
Randy Dunlap [Thu, 10 Jan 2008 22:31:47 +0000 (19:31 -0300)]
V4L/DVB (7001): av7110: fix section mismatch

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>
16 years agoV4L/DVB (6999): ivtv: stick to udelay=10 after all
Hans Verkuil [Thu, 10 Jan 2008 21:33:16 +0000 (18:33 -0300)]
V4L/DVB (6999): ivtv: stick to udelay=10 after all

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>
16 years agoblktrace: kill the unneeded initcall
Jens Axboe [Fri, 11 Jan 2008 12:37:01 +0000 (13:37 +0100)]
blktrace: kill the unneeded initcall

It just inits the mutex, we can do that with DEFINE_MUTEX() instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: fix blktrace timestamps
Ingo Molnar [Fri, 11 Jan 2008 12:35:54 +0000 (13:35 +0100)]
block: fix blktrace timestamps

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>
16 years agoloop: fix bad bio_alloc() nr_iovec request
Jens Axboe [Fri, 11 Jan 2008 09:14:40 +0000 (10:14 +0100)]
loop: fix bad bio_alloc() nr_iovec request

Don't allocate room for an iovec when it is not needed.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoDon't blatt first element of prv in sg_chain()
Rusty Russell [Fri, 11 Jan 2008 09:12:55 +0000 (10:12 +0100)]
Don't blatt first element of prv in sg_chain()

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>
16 years ago[XFS] fix unaligned access in readdir
Christoph Hellwig [Thu, 10 Jan 2008 05:43:26 +0000 (16:43 +1100)]
[XFS] fix unaligned access in readdir

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>
16 years ago[NETFILTER]: xt_helper: Do not bypass RCU
Jan Engelhardt [Fri, 11 Jan 2008 06:41:28 +0000 (22:41 -0800)]
[NETFILTER]: xt_helper: Do not bypass RCU

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>
16 years ago[NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit
Yasuyuki Kozakai [Fri, 11 Jan 2008 06:40:39 +0000 (22:40 -0800)]
[NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit

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>
16 years ago[MACVLAN]: Prevent nesting macvlan devices
Patrick McHardy [Fri, 11 Jan 2008 06:39:28 +0000 (22:39 -0800)]
[MACVLAN]: Prevent nesting macvlan devices

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>
16 years ago[VLAN]: nested VLAN: fix lockdep's recursive locking warning
Jarek Poplawski [Fri, 11 Jan 2008 06:38:31 +0000 (22:38 -0800)]
[VLAN]: nested VLAN: fix lockdep's recursive locking warning

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>
16 years ago[DECNET] ROUTE: fix rcu_dereference() uses in /proc/net/decnet_cache
Eric Dumazet [Fri, 11 Jan 2008 06:35:21 +0000 (22:35 -0800)]
[DECNET] ROUTE: fix rcu_dereference() uses in /proc/net/decnet_cache

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>
16 years ago[BLUETOOTH]: Always send explicit hci_ll wake-up acks.
Ohad Ben-Cohen [Fri, 11 Jan 2008 06:24:43 +0000 (22:24 -0800)]
[BLUETOOTH]: Always send explicit hci_ll wake-up acks.

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>
16 years ago[BLUETOOTH]: rfcomm tty BUG_ON() code fix
Dave Young [Fri, 11 Jan 2008 06:22:52 +0000 (22:22 -0800)]
[BLUETOOTH]: rfcomm tty BUG_ON() code fix

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>
16 years ago[POWERPC] Fix CPU hotplug when using the SLB shadow buffer
Michael Neuling [Fri, 11 Jan 2008 03:02:47 +0000 (14:02 +1100)]
[POWERPC] Fix CPU hotplug when using the SLB shadow buffer

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>
16 years agoACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9
Zhao Yakui [Fri, 11 Jan 2008 05:24:55 +0000 (00:24 -0500)]
ACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9

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>
16 years ago[AX25] af_ax25: Possible circular locking.
Jarek Poplawski [Fri, 11 Jan 2008 05:21:20 +0000 (21:21 -0800)]
[AX25] af_ax25: Possible circular locking.

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>
16 years agosh: Force __access_ok() to obey address space limit.
Paul Mundt [Fri, 11 Jan 2008 04:18:16 +0000 (13:18 +0900)]
sh: Force __access_ok() to obey address space limit.

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>
16 years agoACPICA: fix acpi_serialize hang regression
Bob Moore [Fri, 11 Jan 2008 04:04:10 +0000 (23:04 -0500)]
ACPICA: fix acpi_serialize hang regression

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>
16 years agoACPI : Not register gsi for PCI IDE controller in legacy mode
Alan Cox [Fri, 11 Jan 2008 03:49:58 +0000 (22:49 -0500)]
ACPI : Not register gsi for PCI IDE controller in legacy mode

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>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 11 Jan 2008 00:09:34 +0000 (16:09 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] padlock: Fix alignment fault in aes_crypt_copy

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Thu, 10 Jan 2008 22:53:37 +0000 (14:53 -0800)]
Merge branch 'upstream-linus' of 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

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 10 Jan 2008 22:31:16 +0000 (14:31 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* 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

16 years agolibata and starting/stopping ATAPI floppy devices
Ondrej Zary [Thu, 10 Jan 2008 22:13:19 +0000 (17:13 -0500)]
libata and starting/stopping ATAPI floppy devices

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>
16 years agotrm290: do hook dma_host_{on,off} methods (take 2)
Sergei Shtylyov [Thu, 10 Jan 2008 22:03:42 +0000 (23:03 +0100)]
trm290: do hook dma_host_{on,off} methods (take 2)

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>
16 years agoide: fix cable detection for SATA bridges
George Kibardin [Thu, 10 Jan 2008 22:03:42 +0000 (23:03 +0100)]
ide: fix cable detection for SATA bridges

Signed-off-by: George Kibardin <george-kibardin@yandex.ru>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: workaround suspend bug for ACPI IDE
Shaohua Li [Thu, 10 Jan 2008 22:03:42 +0000 (23:03 +0100)]
ide: workaround suspend bug for ACPI IDE

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>
16 years agosata_sil24: prevent hba lockup when pass-through ATA commands are used
Gwendal Grignou [Thu, 10 Jan 2008 06:47:56 +0000 (15:47 +0900)]
sata_sil24: prevent hba lockup when pass-through ATA commands are used

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>
16 years agoUpdate kernel parameter document for libata DMA mode setting knobs.
FD Cami [Sun, 6 Jan 2008 18:08:56 +0000 (19:08 +0100)]
Update kernel parameter document for libata DMA mode setting knobs.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: don't normalize UNKNOWN to NONE after reset
Tejun Heo [Tue, 8 Jan 2008 11:26:12 +0000 (20:26 +0900)]
libata: don't normalize UNKNOWN to NONE after reset

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>
16 years agolibata-pmp: propagate timeout to host link
Tejun Heo [Thu, 10 Jan 2008 04:41:23 +0000 (13:41 +0900)]
libata-pmp: propagate timeout to host link

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>
16 years agolibata-pmp: 4726 hates SRST
Tejun Heo [Thu, 10 Jan 2008 04:38:46 +0000 (13:38 +0900)]
libata-pmp: 4726 hates SRST

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>
16 years agopata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversion
Rod Whitby [Sun, 6 Jan 2008 01:05:28 +0000 (10:05 +0900)]
pata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversion

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>
16 years agopata_pdc202xx_old: Further fixups
Alan Cox [Fri, 4 Jan 2008 00:08:49 +0000 (00:08 +0000)]
pata_pdc202xx_old: Further fixups

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>
16 years agolibata-sff: PCI IRQ handling fix
Alan Cox [Thu, 3 Jan 2008 17:22:28 +0000 (17:22 +0000)]
libata-sff: PCI IRQ handling fix

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>
16 years agosata_qstor: use hardreset instead of softreset
Tejun Heo [Thu, 3 Jan 2008 15:22:19 +0000 (00:22 +0900)]
sata_qstor: use hardreset instead of softreset

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>
16 years agoNFSv4: Give the lock stateid its own sequence queue
Trond Myklebust [Thu, 10 Jan 2008 21:07:54 +0000 (16:07 -0500)]
NFSv4: Give the lock stateid its own sequence queue

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>
16 years agort2x00: Put 802.11 data on 4 byte boundary
Ivo van Doorn [Sun, 6 Jan 2008 22:40:27 +0000 (23:40 +0100)]
rt2x00: Put 802.11 data on 4 byte boundary

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>
16 years agort2x00: Corectly initialize rt2500usb MAC
Ivo van Doorn [Wed, 9 Jan 2008 18:18:25 +0000 (19:18 +0100)]
rt2x00: Corectly initialize rt2500usb MAC

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>
16 years agort2x00: Allow rt61 to catch up after a missing tx report
Mattias Nissler [Mon, 12 Nov 2007 14:03:12 +0000 (15:03 +0100)]
rt2x00: Allow rt61 to catch up after a missing tx report

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>
16 years ago[CRYPTO] padlock: Fix alignment fault in aes_crypt_copy
Herbert Xu [Thu, 10 Jan 2008 21:09:35 +0000 (08:09 +1100)]
[CRYPTO] padlock: Fix alignment fault in aes_crypt_copy

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>
16 years ago[ARM] vfp: fix fuitod/fsitod instructions
Russell King [Thu, 10 Jan 2008 17:07:08 +0000 (17:07 +0000)]
[ARM] vfp: fix fuitod/fsitod instructions

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>
16 years ago[POWERPC] efika: add phy-handle property for fec_mpc52xx
Olaf Hering [Wed, 9 Jan 2008 14:06:08 +0000 (01:06 +1100)]
[POWERPC] efika: add phy-handle property for fec_mpc52xx

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>
16 years ago[ARM] pxa: silence warnings from cpu_is_xxx() macros
Russell King [Thu, 10 Jan 2008 12:33:54 +0000 (12:33 +0000)]
[ARM] pxa: silence warnings from cpu_is_xxx() macros

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>
16 years ago[AX25]: Kill user triggable printks.
maximilian attems [Thu, 10 Jan 2008 11:57:29 +0000 (03:57 -0800)]
[AX25]: Kill user triggable printks.

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>
16 years ago[IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cache
Eric Dumazet [Thu, 10 Jan 2008 11:55:57 +0000 (03:55 -0800)]
[IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cache

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>
16 years ago[NEIGH]: Fix race between neigh_parms_release and neightbl_fill_parms
Pavel Emelyanov [Thu, 10 Jan 2008 11:48:38 +0000 (03:48 -0800)]
[NEIGH]: Fix race between neigh_parms_release and neightbl_fill_parms

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>
16 years ago[NIU]: Support for Marvell PHY
Mirko Lindner [Thu, 10 Jan 2008 10:12:44 +0000 (02:12 -0800)]
[NIU]: Support for Marvell PHY

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>
16 years ago[SCSI] qla1280: fix 32 bit segment code
FUJITA Tomonori [Tue, 8 Jan 2008 14:07:01 +0000 (23:07 +0900)]
[SCSI] qla1280: fix 32 bit segment code

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>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 9 Jan 2008 16:05:12 +0000 (08:05 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* 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.
  ...

16 years agoshow_task: real_parent
Roland McGrath [Wed, 9 Jan 2008 08:03:23 +0000 (00:03 -0800)]
show_task: real_parent

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>
16 years ago[ATM]: Check IP header validity in mpc_send_packet
Herbert Xu [Wed, 9 Jan 2008 11:51:59 +0000 (03:51 -0800)]
[ATM]: Check IP header validity in mpc_send_packet

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>
16 years ago[IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()
Brian Haley [Wed, 9 Jan 2008 07:52:21 +0000 (23:52 -0800)]
[IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()

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>
16 years ago[CONNECTOR]: Don't touch queue dev after decrement of ref count.
Li Zefan [Wed, 9 Jan 2008 07:44:44 +0000 (23:44 -0800)]
[CONNECTOR]: Don't touch queue dev after decrement of ref count.

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>
16 years ago[SOCK]: Adds a rcu_dereference() in sk_filter
Eric Dumazet [Wed, 9 Jan 2008 07:41:28 +0000 (23:41 -0800)]
[SOCK]: Adds a rcu_dereference() in sk_filter

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>
16 years ago[XFRM]: xfrm_algo_clone() allocates too much memory
Eric Dumazet [Wed, 9 Jan 2008 07:39:06 +0000 (23:39 -0800)]
[XFRM]: xfrm_algo_clone() allocates too much memory

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>
16 years ago[FORCEDETH]: Fix reversing the MAC address on suspend.
Björn Steinbrink [Tue, 8 Jan 2008 07:22:53 +0000 (23:22 -0800)]
[FORCEDETH]: Fix reversing the MAC address on suspend.

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>
16 years ago[NET]: mcs7830 passes msecs instead of jiffies to usb_control_msg
Russ Dill [Tue, 8 Jan 2008 07:15:41 +0000 (23:15 -0800)]
[NET]: mcs7830 passes msecs instead of jiffies to usb_control_msg

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>
16 years ago[LRO] Fix lro_mgr->features checks
Brice Goglin [Tue, 8 Jan 2008 06:09:08 +0000 (22:09 -0800)]
[LRO] Fix lro_mgr->features checks

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>
16 years ago[NET]: Clone the sk_buff 'iif' field in __skb_clone()
Paul Moore [Tue, 8 Jan 2008 05:56:41 +0000 (21:56 -0800)]
[NET]: Clone the sk_buff 'iif' field in __skb_clone()

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>
16 years ago[IPV4] ROUTE: ip_rt_dump() is unecessary slow
Eric Dumazet [Tue, 8 Jan 2008 05:52:14 +0000 (21:52 -0800)]
[IPV4] ROUTE: ip_rt_dump() is unecessary slow

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>
16 years ago[NET]: kaweth was forgotten in msec switchover of usb_start_wait_urb
Russ Dill [Tue, 8 Jan 2008 05:48:12 +0000 (21:48 -0800)]
[NET]: kaweth was forgotten in msec switchover of usb_start_wait_urb

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>
16 years ago[NET] Intel ethernet drivers: update MAINTAINERS
Auke Kok [Tue, 8 Jan 2008 05:47:25 +0000 (21:47 -0800)]
[NET] Intel ethernet drivers: update MAINTAINERS

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>
16 years ago[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.
David S. Miller [Tue, 8 Jan 2008 05:06:12 +0000 (21:06 -0800)]
[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.

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>
16 years ago[NET]: Stop polling when napi_disable() is pending.
David S. Miller [Tue, 8 Jan 2008 05:00:40 +0000 (21:00 -0800)]
[NET]: Stop polling when napi_disable() is pending.

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>
16 years ago[NET]: Fix drivers to handle napi_disable() disabling interrupts.
David S. Miller [Tue, 8 Jan 2008 04:53:33 +0000 (20:53 -0800)]
[NET]: Fix drivers to handle napi_disable() disabling interrupts.

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>
16 years ago[NETXEN]: Fix ->poll() done logic.
David S. Miller [Tue, 8 Jan 2008 04:51:29 +0000 (20:51 -0800)]
[NETXEN]: Fix ->poll() done logic.

If work_done >= budget we should always elide the NAPI
completion.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: return an error when SIWRATE doesn't match any rate
Andrew Lutomirski [Fri, 4 Jan 2008 05:03:19 +0000 (21:03 -0800)]
mac80211: return an error when SIWRATE doesn't match any rate

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>
16 years agossb: Fix probing of PCI cores if PCI and PCIE core is available
Michael Buesch [Thu, 3 Jan 2008 17:59:25 +0000 (18:59 +0100)]
ssb: Fix probing of PCI cores if PCI and PCIE core is available

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>
16 years ago[NET]: Do not check netif_running() and carrier state in ->poll()
David S. Miller [Tue, 8 Jan 2008 04:48:21 +0000 (20:48 -0800)]
[NET]: Do not check netif_running() and carrier state in ->poll()

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>
16 years ago[NET]: Add NAPI_STATE_DISABLE.
David S. Miller [Tue, 8 Jan 2008 04:35:07 +0000 (20:35 -0800)]
[NET]: Add NAPI_STATE_DISABLE.

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>
16 years ago[NET]: Do not grab device reference when scheduling a NAPI poll.
David S. Miller [Tue, 8 Jan 2008 04:26:59 +0000 (20:26 -0800)]
[NET]: Do not grab device reference when scheduling a NAPI poll.

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>
16 years agob43: Fix rxheader channel parsing
Michael Buesch [Wed, 2 Jan 2008 17:55:53 +0000 (18:55 +0100)]
b43: Fix rxheader channel parsing

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>
16 years ago[IRDA]: irda_create() nuke user triggable printk
maximilian attems [Mon, 7 Jan 2008 08:30:57 +0000 (00:30 -0800)]
[IRDA]: irda_create() nuke user triggable printk

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>
16 years ago[SCTP]: Add back the code that accounted for FORWARD_TSN parameter in INIT.
Vlad Yasevich [Mon, 7 Jan 2008 08:28:16 +0000 (00:28 -0800)]
[SCTP]: Add back the code that accounted for FORWARD_TSN parameter in INIT.

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>
16 years ago[SCTP]: Correctly handle AUTH parameters in unexpected INIT
Vlad Yasevich [Mon, 7 Jan 2008 08:27:45 +0000 (00:27 -0800)]
[SCTP]: Correctly handle AUTH parameters in unexpected INIT

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>
16 years ago[SCTP]: Fix the name of the authentication event.
Vlad Yasevich [Mon, 7 Jan 2008 08:27:16 +0000 (00:27 -0800)]
[SCTP]: Fix the name of the authentication event.

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>
16 years ago[ATM]: [nicstar] delay irq setup until card is configured
Chas Williams [Mon, 7 Jan 2008 08:26:22 +0000 (00:26 -0800)]
[ATM]: [nicstar] delay irq setup until card is configured

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TULIP]: NAPI full quantum bug.
Stephen Hemminger [Mon, 7 Jan 2008 08:23:04 +0000 (00:23 -0800)]
[TULIP]: NAPI full quantum bug.

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>
16 years ago[METH]: Fix MAC address handling.
Thomas Bogendoerfer [Sun, 6 Jan 2008 08:21:47 +0000 (00:21 -0800)]
[METH]: Fix MAC address handling.

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>
16 years ago[NET]: Fix netx-eth.c compilation.
Adrian Bunk [Sun, 6 Jan 2008 07:55:13 +0000 (23:55 -0800)]
[NET]: Fix netx-eth.c compilation.

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>
16 years ago[IPV4] ipconfig: Fix regression in ip command line processing
Amos Waterland [Sun, 6 Jan 2008 07:23:06 +0000 (23:23 -0800)]
[IPV4] ipconfig: Fix regression in ip command line processing

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>
16 years ago[IPV4] raw: Strengthen check on validity of iph->ihl
Herbert Xu [Sun, 6 Jan 2008 07:14:44 +0000 (23:14 -0800)]
[IPV4] raw: Strengthen check on validity of iph->ihl

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>
16 years ago[NIU]: Update driver version and release date.
David S. Miller [Sat, 5 Jan 2008 08:02:59 +0000 (00:02 -0800)]
[NIU]: Update driver version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>