sfrench/cifs-2.6.git
16 years ago[POWERPC] Fix build failure for tqm8540 and sbc85xx defconfigs
Paul Gortmaker [Tue, 18 Mar 2008 05:13:10 +0000 (16:13 +1100)]
[POWERPC] Fix build failure for tqm8540 and sbc85xx defconfigs

The wrapper script didn't have entries for the TQM8540 board and the
SBC8548 or SBC8560 boards.  I've assumed that the TQM8540 console is
8250 based and not CPM based by looking at its defconfig.  There was
also a trailing * on the TQM8555 entry that I removed too.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix PMU + soft interrupt disable bug
Anton Blanchard [Mon, 17 Mar 2008 04:27:09 +0000 (15:27 +1100)]
[POWERPC] Fix PMU + soft interrupt disable bug

Since the PMU is an NMI now, it can come at any time we are only soft
disabled.  We must hard disable around the two places we allow the kernel
stack SLB and r1 to go out of sync.  Otherwise the PMU exception can
force a kernel stack SLB into another slot, which can lead to it
getting evicted, which can lead to a nasty unrecoverable SLB miss
in the exception entry code.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] user_regset PTRACE_SETREGS regression fix
Roland McGrath [Thu, 13 Mar 2008 08:25:35 +0000 (19:25 +1100)]
[POWERPC] user_regset PTRACE_SETREGS regression fix

The PTRACE_SETREGS request was only recently added on powerpc,
and gdb does not use it.  So it slipped through without getting
all the testing it should have had.

The user_regset changes had a simple bug in storing to all of
the 32-bit general registers block on 64-bit kernels.  This bug
only comes up with PTRACE_SETREGS, not PPC_PTRACE_SETREGS.
It causes a BUG_ON to hit, so this fix needs to go in ASAP.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agonfs: don't ignore return value from nfs_pageio_add_request
Fred Isaman [Wed, 19 Mar 2008 15:24:39 +0000 (11:24 -0400)]
nfs: don't ignore return value from nfs_pageio_add_request

Ignoring the return value from nfs_pageio_add_request can cause deadlocks.

In read path:
  call nfs_pageio_add_request from readpage_async_filler
  assume at this point that there are requests already in desc, that
    can't be merged with the current request.
  so nfs_pageio_doio is fired up to clear out desc.
  assume something goes wrong in setting up the io, so desc->pg_error is set.
  This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original
    request.
  BUT, since return code is ignored, readpage_async_filler assumes it has
    been added, and does nothing further, leaving page locked.
  do_generic_mapping_read will eventually call lock_page, resulting in deadlock

In write path:
  page is marked dirty by generic_perform_write
  nfs_writepages is called
  call nfs_pageio_add_request from nfs_page_async_flush
  assume at this point that there are requests already in desc, that
    can't be merged with the current request.
  so nfs_pageio_doio is fired up to clear out desc.
  assume something goes wrong in setting up the io, so desc->pg_error is set.
  This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original
    request, yet marking the request as locked (PG_BUSY) and in writeback,
    clearing dirty marks.
  The next time a write is done to the page, deadlock will result as
    nfs_write_end calls nfs_update_request

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years ago[SCSI] fix media change events for polled devices
Kay Sievers [Wed, 19 Mar 2008 12:04:47 +0000 (13:04 +0100)]
[SCSI] fix media change events for polled devices

Commit:
  a341cd0f (SCSI: add asynchronous event notification API)
breaks:
  285e9670 (sr,sd: send media state change modification events)
by introducing an event filter, which is removed here, to make
events, we are depending on, happen again.

Fix this by removing the event filter.  It's pretty much broken at the
moment, since a user can't set it (the attribute being read only).  A
proper fix will be to make the event discriminator distinguish between
AN and Polled media change events.

Cc: David Zeuthen <david@fubar.dk>
Cc: kristen accardi <kaccardi@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] sd, sr: do not emit change event at device add
Kay Sievers [Wed, 19 Mar 2008 12:09:56 +0000 (13:09 +0100)]
[SCSI] sd, sr: do not emit change event at device add

Initialize the "state changed" flag, so we do not send a change event
immediately after registering a new device.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SPARC64]: Fix atomic backoff limit.
David S. Miller [Wed, 19 Mar 2008 08:04:48 +0000 (01:04 -0700)]
[SPARC64]: Fix atomic backoff limit.

4096 will not fit into the immediate field of a compare instruction,
in fact it will end up being -4096 causing the check to fail every
time and thus disabling backoff.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Wed, 19 Mar 2008 04:34:48 +0000 (21:34 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  async_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor
  fsldma: Fix the DMA halt when using DMA_INTERRUPT async_tx transfer.

16 years agoRevert "ACPI: EC: Handle IRQ storm on Acer laptops"
Alexey Starikovskiy [Tue, 18 Mar 2008 23:45:12 +0000 (02:45 +0300)]
Revert "ACPI: EC: Handle IRQ storm on Acer laptops"

This reverts commit 2c81ce4c9c37b910210f2640c28e98a0c398dc26.

It caused several new troubles (eg suspend slowdown bisected down to
this patch by Pavel Machek), so just revert it for now.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux...
Linus Torvalds [Wed, 19 Mar 2008 04:27:13 +0000 (21:27 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mingo/linux-2.6-sched-devel

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel:
  sched: tune multi-core idle balancing
  sched: retune wake granularity
  sched: wakeup-buddy tasks are cache-hot
  sched: improve affine wakeups
  sched, net: socket wakeups are sync
  sched: clean up wakeup balancing, code flow
  sched: clean up wakeup balancing, rename variables
  sched: clean up wakeup balancing, move wake_affine()

16 years agoIDE: Make taskfile interface more robust wrt unexpected end-of-command
Linus Torvalds [Wed, 19 Mar 2008 04:26:24 +0000 (21:26 -0700)]
IDE: Make taskfile interface more robust wrt unexpected end-of-command

Now that we handle all the special commands using REQ_TYPE_ATA_TASKFILE
rather than using the old REQ_TYPE_ATA_CMD model, we need to also
emulate the lack of full taskfile data that comes with the old command
model (ie when commands are generated with the HDIO_DRIVE_CMD ioctl
rather than using the HDIO_DRIVE_TASK[FILE] ioctls).

In particular, this means that we should handle command completion the
more relaxed way that the old drive_cmd_intr() code did.  It allows
commands to finish early even if they don't use up all the data that we
thought we had for them.

This fixes a regression seen by Anders Eriksson where some SMART
commands sent by smartd would cause a boot-time system hang on his
machine because the IDE command handling code didn't realize that the
command had completed.

Tested-by: Anders Eriksson <aeriksson@fastmail.fm>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm
Linus Torvalds [Wed, 19 Mar 2008 04:13:19 +0000 (21:13 -0700)]
Merge branch 'slab-linus' of git://git./linux/kernel/git/christoph/vm

* 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm:
  slub page alloc fallback: Enable interrupts for GFP_WAIT.

16 years agosched: tune multi-core idle balancing
Ingo Molnar [Sun, 16 Mar 2008 10:14:30 +0000 (11:14 +0100)]
sched: tune multi-core idle balancing

WAKE_IDLE is too agressive on multi-core CPUs with the new
wake-affine code, keep it on for SMT/HT balancing alone
(where there's no cache affinity at all between logical CPUs).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: retune wake granularity
Ingo Molnar [Tue, 18 Mar 2008 17:47:57 +0000 (18:47 +0100)]
sched: retune wake granularity

reduce wake-up granularity for better interactivity.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: wakeup-buddy tasks are cache-hot
Ingo Molnar [Sat, 15 Mar 2008 16:10:34 +0000 (17:10 +0100)]
sched: wakeup-buddy tasks are cache-hot

Wakeup-buddy tasks are cache-hot - this makes it a bit harder
for the load-balancer to tear them apart. (but it's still possible,
if the load is sufficiently assymetric)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: improve affine wakeups
Ingo Molnar [Wed, 19 Mar 2008 00:42:00 +0000 (01:42 +0100)]
sched: improve affine wakeups

improve affine wakeups. Maintain the 'overlap' metric based on CFS's
sum_exec_runtime - which means the amount of time a task executes
after it wakes up some other task.

Use the 'overlap' for the wakeup decisions: if the 'overlap' is short,
it means there's strong workload coupling between this task and the
woken up task. If the 'overlap' is large then the workload is decoupled
and the scheduler will move them to separate CPUs more easily.

( Also slightly move the preempt_check within try_to_wake_up() - this has
  no effect on functionality but allows 'early wakeups' (for still-on-rq
  tasks) to be correctly accounted as well.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched, net: socket wakeups are sync
Ingo Molnar [Wed, 19 Mar 2008 00:44:24 +0000 (01:44 +0100)]
sched, net: socket wakeups are sync

'sync' wakeups are a hint towards the scheduler that (certain)
networking related wakeups likely create coupling between tasks.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up wakeup balancing, code flow
Ingo Molnar [Sun, 16 Mar 2008 20:21:47 +0000 (21:21 +0100)]
sched: clean up wakeup balancing, code flow

Clean up the code flow. No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  42521    2858     232   45611    b22b sched.o.before
  42521    2858     232   45611    b22b sched.o.after

md5:
   09b31c44e9aff8666f72773dc433e2df  sched.o.before.asm
   09b31c44e9aff8666f72773dc433e2df  sched.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up wakeup balancing, rename variables
Ingo Molnar [Sun, 16 Mar 2008 19:56:26 +0000 (20:56 +0100)]
sched: clean up wakeup balancing, rename variables

rename 'cpu' to 'prev_cpu'. No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  42521    2858     232   45611    b22b sched.o.before
  42521    2858     232   45611    b22b sched.o.after

md5:
   09b31c44e9aff8666f72773dc433e2df  sched.o.before.asm
   09b31c44e9aff8666f72773dc433e2df  sched.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up wakeup balancing, move wake_affine()
Ingo Molnar [Sun, 16 Mar 2008 19:36:10 +0000 (20:36 +0100)]
sched: clean up wakeup balancing, move wake_affine()

split out the affine-wakeup bits.

No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  42521    2858     232   45611    b22b sched.o.before
  42521    2858     232   45611    b22b sched.o.after

md5:
   9d76738f1272aa82f0b7affd2f51df6b  sched.o.before.asm
   09b31c44e9aff8666f72773dc433e2df  sched.o.after.asm

(the md5's changed because stack slots changed and some registers
get scheduled by gcc in a different order - but otherwise the before
and after assembly is instruction for instruction equivalent.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[RT2X00] drivers/net/wireless/rt2x00/rt2x00dev.c: remove dead code, fix warning
Andrew Morton [Wed, 19 Mar 2008 00:15:58 +0000 (17:15 -0700)]
[RT2X00] drivers/net/wireless/rt2x00/rt2x00dev.c: remove dead code, fix warning

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoasync_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor
Dan Williams [Wed, 19 Mar 2008 04:23:59 +0000 (21:23 -0700)]
async_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor

If the channel cannot perform the operation in one call to
->device_prep_dma_zero_sum, then fallback to the xor+page_is_zero path.
This only affects users with arrays larger than 16 devices on iop13xx or
32 devices on iop3xx.

Cc: <stable@kernel.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agofsldma: Fix the DMA halt when using DMA_INTERRUPT async_tx transfer.
Zhang Wei [Wed, 19 Mar 2008 01:45:00 +0000 (18:45 -0700)]
fsldma: Fix the DMA halt when using DMA_INTERRUPT async_tx transfer.

The DMA_INTERRUPT async_tx is a NULL transfer, thus the BCR(count register)
is 0. When the transfer started with a byte count of zero, the DMA
controller will triger a PE(programming error) event and halt, not a normal
interrupt. I add special codes for PE event and DMA_INTERRUPT
async_tx testing.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years ago[SCSI] mpt fusion: Power Management fixes for MPT SAS PCI-E controllers
Prakash, Sathya [Fri, 7 Mar 2008 10:49:50 +0000 (16:19 +0530)]
[SCSI] mpt fusion: Power Management fixes for MPT SAS PCI-E controllers

The system power state changes like hibernation and standby are not happening
properly with 106XE controllers, this patch modifies the driver to free
resources and allocate resources in power management entry points

[jejb: compile fixes for upstream]

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge branch 'audit.b49' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Tue, 18 Mar 2008 15:43:59 +0000 (08:43 -0700)]
Merge branch 'audit.b49' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b49' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] export sessionid alongside the loginuid in procfs

16 years ago[PATCH] export sessionid alongside the loginuid in procfs
Eric Paris [Thu, 13 Mar 2008 12:15:31 +0000 (08:15 -0400)]
[PATCH] export sessionid alongside the loginuid in procfs

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Tue, 18 Mar 2008 14:49:59 +0000 (07:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: update key codes for Apple aluminium
  HID: fix comment in hid_input_report()
  HID: BADPAD entry for NATSU Playstation USB adapter
  HID: Use DIV_ROUND_UP
  HID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbook

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Tue, 18 Mar 2008 14:48:23 +0000 (07:48 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
  Revert "ACPI: video: Ignore devices that aren't present in hardware"
  asus_acpi: remove misleading mask
  Revert "ACPI: video: Ignore ACPI video devices that aren't present in hardware"
  thermal: delete "default y"
  thermal: re-document thermal units
  Revert "thermal: fix generic thermal I/F for hwmon"
  ACPI: fix ATA_ACPI build
  ACPI: battery: Don't return -EFAIL on broken packages.
  ACPI: lockdep warning on boot, 2.6.25-rc5

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Tue, 18 Mar 2008 14:46:19 +0000 (07:46 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ALPS - fix forward/back buttons reversed on Acer 5520-5290
  Input: ALPS - put secondary device in proper place in sysfs
  Input: wacom - add support for Bamboo1, BambooFun, and Cintiq 12WX
  Input: document i8042.noloop
  Input: add keyboard notifier documentation
  Input: ads7846 - fix uninitialized var warning
  Input: i8042 - add SNI RM support
  Input: i8042 - add Lenovo 3000 N100 to nomux blacklist
  Input: i8042 - fix warning on non-x86 builds
  Input: cobalt_btns - assorted fixes

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 18 Mar 2008 14:44:21 +0000 (07:44 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  make selinux_parse_opts_str() static

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Tue, 18 Mar 2008 14:43:14 +0000 (07:43 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  Revert "unexport bio_{,un}map_user"
  relay: fix subbuf_splice_actor() adding too many pages
  The ps2esdi driver was marked as BROKEN more than two years ago due to being

16 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 18 Mar 2008 14:32:23 +0000 (07:32 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/ati_pcigart: fix the PCIGART to use drm_pci to allocate GART table.
  drm/radeon: fixup RV550 chip family
  drm/via: attempt again to stabilise the AGP DMA command submission.
  drm: Fix race that can lockup the kernel

16 years agoHID: update key codes for Apple aluminium
Michael Hanselmann [Mon, 17 Mar 2008 21:23:52 +0000 (22:23 +0100)]
HID: update key codes for Apple aluminium

F5 and F6 have no second function printed on them. Thus their definitions have
been removed from the table.

KEY_CYCLEWINDOWS doesn't name the function of Mac OS X' Expose properly and
because we couldn't find a better key code, we decided to use KEY_FN_F4
instead.

We also changed KEY_BACK and KEY_FORWARD, which apply to browser functions, to
KEY_PREVIOUSSONG and KEY_NEXTSONG, since the keys are intended to control a
music player.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fix comment in hid_input_report()
Jiri Kosina [Tue, 4 Mar 2008 12:53:33 +0000 (13:53 +0100)]
HID: fix comment in hid_input_report()

The hid_input_report() in debug mode of course outputs the report itself, not
the device report descriptor.

Fix this error in comment.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: BADPAD entry for NATSU Playstation USB adapter
Andrew Burton [Mon, 3 Mar 2008 09:49:59 +0000 (10:49 +0100)]
HID: BADPAD entry for NATSU Playstation USB adapter

Add quirk entry for BADPAD for the NATSU Playstation USB adapter. The
adapter is supported under Linux, but with bad direction detection.

Signed-off-by: Andrew Burton <adb@iinet.net.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: Use DIV_ROUND_UP
Julia Lawall [Fri, 15 Feb 2008 12:53:11 +0000 (13:53 +0100)]
HID: Use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbook
Tobias Mueller [Fri, 14 Mar 2008 22:44:48 +0000 (23:44 +0100)]
HID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbook

4th generation MacBook (product id 0x022a) from Apple doesn't need
HID_QUIRK_APPLE_ISO_KEYBOARD fix anymore.

Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoMerge branches 'release' and 'dock' into release
Len Brown [Tue, 18 Mar 2008 09:17:15 +0000 (05:17 -0400)]
Merge branches 'release' and 'dock' into release

16 years agoACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
Holger Macht [Wed, 12 Mar 2008 00:07:27 +0000 (01:07 +0100)]
ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs

begin_undock() is only called when triggered via a acpi notify handler
(pressing the undock button on the dock station), but complete_undock() is
always called after the eject. So if a undock is triggered through a sysfs
write, the flag DOCK_UNDOCKING has to be set for the dock station,
too. Otherwise this will freeze the system hard.

Signed-off-by: Holger Macht <hmacht@suse.de>
Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoMerge branches 'release', 'asus', 'bugzilla-8573', 'bugzilla-9995', 'bugzilla-10272...
Len Brown [Tue, 18 Mar 2008 08:52:57 +0000 (04:52 -0400)]
Merge branches 'release', 'asus', 'bugzilla-8573', 'bugzilla-9995', 'bugzilla-10272', 'lockdep' and 'thermal' into release

16 years agoRevert "ACPI: video: Ignore devices that aren't present in hardware"
Len Brown [Tue, 18 Mar 2008 08:04:35 +0000 (04:04 -0400)]
Revert "ACPI: video: Ignore devices that aren't present in hardware"

This reverts commit 0119509c4fbc9adcef1472817fda295334612976.

http://bugzilla.kernel.org/show_bug.cgi?id=9995

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
David S. Miller [Tue, 18 Mar 2008 06:44:31 +0000 (23:44 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6

16 years agoasus_acpi: remove misleading mask
Julia Lawall [Tue, 4 Mar 2008 23:00:13 +0000 (15:00 -0800)]
asus_acpi: remove misleading mask

led_out is boolean, so there is no functional change here,
but apparently an extra mask with 1 caused some style checkers
to flag this as logic bug.

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years ago[IPV4]: esp_output() misannotations
Al Viro [Tue, 18 Mar 2008 05:50:23 +0000 (22:50 -0700)]
[IPV4]: esp_output() misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[8021Q]: vlan_dev misannotations
Al Viro [Tue, 18 Mar 2008 05:49:48 +0000 (22:49 -0700)]
[8021Q]: vlan_dev misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoxfrm: ->eth_proto is __be16
Al Viro [Tue, 18 Mar 2008 05:49:16 +0000 (22:49 -0700)]
xfrm: ->eth_proto is __be16

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: ipv4_is_lbcast() misannotations
Al Viro [Tue, 18 Mar 2008 05:48:46 +0000 (22:48 -0700)]
[IPV4]: ipv4_is_lbcast() misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SUNRPC]: net/* NULL noise
Al Viro [Tue, 18 Mar 2008 05:48:03 +0000 (22:48 -0700)]
[SUNRPC]: net/* NULL noise

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: fix misannotated __sctp_rcv_asconf_lookup()
Al Viro [Tue, 18 Mar 2008 05:47:32 +0000 (22:47 -0700)]
[SCTP]: fix misannotated __sctp_rcv_asconf_lookup()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED]: annotate cls_u32
Al Viro [Tue, 18 Mar 2008 05:46:46 +0000 (22:46 -0700)]
[PKT_SCHED]: annotate cls_u32

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET] endianness noise: INADDR_ANY
Al Viro [Tue, 18 Mar 2008 05:44:53 +0000 (22:44 -0700)]
[NET] endianness noise: INADDR_ANY

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRevert "ACPI: video: Ignore ACPI video devices that aren't present in hardware"
Len Brown [Tue, 18 Mar 2008 05:43:53 +0000 (01:43 -0400)]
Revert "ACPI: video: Ignore ACPI video devices that aren't present in hardware"

This reverts commit 3fa2cdcc45a0176de15cac9dbf4ed2834ebf8932.

http://bugzilla.kernel.org/show_bug.cgi?id=9995

Signed-off-by: Len Brown <len.brown>
16 years agothermal: delete "default y"
Len Brown [Tue, 18 Mar 2008 05:22:10 +0000 (01:22 -0400)]
thermal: delete "default y"

The generic thermal I/F gets selected by ACPI_THERMAL --
its only current customer.
it doesn't need to clutter other configs by default.

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agothermal: re-document thermal units
Zhang, Rui [Tue, 18 Mar 2008 02:40:29 +0000 (10:40 +0800)]
thermal: re-document thermal units
From: Zhang Rui <rui.zhang@intel.com>

(reverting the previous sysfs patch also reverted a fix
 to the thermal units documentation, which is restored by this commit)

The generic thermal driver shows temperature in millidegree Celsius.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoRevert "thermal: fix generic thermal I/F for hwmon"
Len Brown [Tue, 18 Mar 2008 05:14:37 +0000 (01:14 -0400)]
Revert "thermal: fix generic thermal I/F for hwmon"

This reverts commit 3152fb9f11cdd2fd8688c2c5cb805e5c09b53dd9.

This broke libsensors.

Acked-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoInput: ALPS - fix forward/back buttons reversed on Acer 5520-5290
Laszlo Kajan [Tue, 18 Mar 2008 04:39:55 +0000 (00:39 -0400)]
Input: ALPS - fix forward/back buttons reversed on Acer 5520-5290

ALPS_FW_BK_1 protocol flavor seems to have forward and backward
keys reversed.

Signed-off-by: Laszlo Kajan <kajla@bioinfo.pl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: ALPS - put secondary device in proper place in sysfs
Dmitry Torokhov [Tue, 18 Mar 2008 04:29:18 +0000 (00:29 -0400)]
Input: ALPS - put secondary device in proper place in sysfs

Secondary input device did not have parent set up causing it
to appear in the root of sysfs device hierarchy.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoACPI: fix ATA_ACPI build
Len Brown [Tue, 18 Mar 2008 04:26:07 +0000 (00:26 -0400)]
ACPI: fix ATA_ACPI build

drivers/ata/libata-acpi.c fails to build

drivers/built-in.o: In function `ata_acpi_associate':
(.text+0x7106a): undefined reference to `register_hotplug_dock_device'

When CONFIG_ATA_ACPI=y and CONFIG_ACPI_DOCK=m
But if dock is selected from ata_acpi, dock will =y
when ata_acpi=y, avoiding this problem.

http://bugzilla.kernel.org/show_bug.cgi?id=10272

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: battery: Don't return -EFAIL on broken packages.
Alexey Starikovskiy [Tue, 18 Mar 2008 02:37:42 +0000 (22:37 -0400)]
ACPI: battery: Don't return -EFAIL on broken packages.

Acer BIOS has a bug which is exposed when a dead battery is present.

The package template that is used to describe battery status is
over-written with sane values when the battery is live.
But when the batter is dead, a bogus reference in the template
is used.  In this case, Linux returns a fault, when instead
it should simply return that it doesn't know the missing value.

http://bugzilla.kernel.org/show_bug.cgi?id=8573
http://bugzilla.kernel.org/show_bug.cgi?id=10202

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agopciehp: don't enable slot unless forced
Mark Lord [Mon, 17 Mar 2008 20:04:23 +0000 (16:04 -0400)]
pciehp: don't enable slot unless forced

This fixes a 2.6.25 regression reported by Alex Chiang.

Invoke pciehp_enable_slot() at startup only when pciehp_force=1.
Some HP equipment apparently cannot cope with it otherwise.

This restores the (previously working) 2.6.24 behaviour here,
while allowing machines that need a kick to use pciehp_force=1.

This was the original design back in October 2007,
but Kristen suggested we try without it first:

   Kristen Carlson Accardi wrote:
   >I think it would be ok to try allowing the slot to be enabled when not
   >using pciehp_force mode.  We can wrap it later if it proves to break things

This ended up breaking one of Alex's setups,
so it's time to put the wrapper back in now.

Signed-off-by: Mark Lord <mlord@pobox.com>
Acked-by: Alex Chiang <achiang@hp.com>
Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake selinux_parse_opts_str() static
Adrian Bunk [Mon, 17 Mar 2008 20:29:23 +0000 (22:29 +0200)]
make selinux_parse_opts_str() static

This patch makes the needlessly global selinux_parse_opts_str() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
16 years agoRevert "unexport bio_{,un}map_user"
Jens Axboe [Mon, 17 Mar 2008 20:14:40 +0000 (21:14 +0100)]
Revert "unexport bio_{,un}map_user"

Outside users like asmlib uses the mapping functions. API wise, the
export is definitely sane. It's a better idea to keep this export
than to require external users to open-code this piece of code instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 17 Mar 2008 19:06:33 +0000 (12:06 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

16 years agoslub page alloc fallback: Enable interrupts for GFP_WAIT.
Christoph Lameter [Thu, 13 Mar 2008 06:57:49 +0000 (23:57 -0700)]
slub page alloc fallback: Enable interrupts for GFP_WAIT.

The fallback path needs to enable interrupts like done for
the other page allocator calls. This was not necessary with
the alternate fast path since we handled irq enable/disable in
the slow path. The regular fastpath handles irq enable/disable
around calls to the slow path so we need to restore the proper
status before calling the page allocator from the slowpath.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 17 Mar 2008 16:52:24 +0000 (09:52 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: Add Marvell 6121 SATA support
  pata_ali: use atapi_cmd_type() to determine cmd type instead of transfer size
  ahci: implement skip_host_reset parameter
  ahci: request all PCI BARs
  devres: implement pcim_iomap_regions_request_all()
  libata-acpi: improve dock event handling

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Mon, 17 Mar 2008 16:52:19 +0000 (09:52 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio: fix race in enable_cb
  virtio: Enable netpoll interface for netconsole logging
  virtio: handle > 2 billion page balloon targets
  virtio: Fix sysfs bits to have proper block symlink
  virtio: Use spin_lock_irqsave/restore for virtio-pci

16 years agohfs_bnode_find() can fail, resulting in hfs_bnode_split() breakage
Al Viro [Sun, 16 Mar 2008 22:48:08 +0000 (22:48 +0000)]
hfs_bnode_find() can fail, resulting in hfs_bnode_split() breakage

oops and fs corruption; the latter can happen even on valid fs in case of oom.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoahci: Add Marvell 6121 SATA support
Jose Alberto Reguero [Thu, 13 Mar 2008 22:22:24 +0000 (23:22 +0100)]
ahci: Add Marvell 6121 SATA support

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_ali: use atapi_cmd_type() to determine cmd type instead of transfer size
Tejun Heo [Tue, 11 Mar 2008 02:35:00 +0000 (11:35 +0900)]
pata_ali: use atapi_cmd_type() to determine cmd type instead of transfer size

pata_ali was using qc->nbytes to determine whether a command is
data transfer type or not.  As now qc->nbytes can be extended by
padding and draining buffers, these tests are not useful anymore.

Use atapi_cmd_type() instead.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: implement skip_host_reset parameter
Tejun Heo [Mon, 10 Mar 2008 01:25:25 +0000 (10:25 +0900)]
ahci: implement skip_host_reset parameter

Under certain circumstances (SSP turned off by the BIOS) and for
debugging purposes, skipping global controller reset is helpful.  Add
a kernel parameter for it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: request all PCI BARs
Tejun Heo [Tue, 11 Mar 2008 10:52:31 +0000 (19:52 +0900)]
ahci: request all PCI BARs

ahci is often implemented with accompanying SFF compatible interface
and legacy IDE driver may attach to the legacy IO ports when the
controller is already claimed by ahci and vice-versa.  This patch
makes ahci use pcim_iomap_regions_request_all() so that all IO regions
are claimed on attach.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodevres: implement pcim_iomap_regions_request_all()
Tejun Heo [Wed, 12 Mar 2008 06:26:34 +0000 (15:26 +0900)]
devres: implement pcim_iomap_regions_request_all()

Some drivers need to reserve all PCI BARs to prevent other drivers
misusing unoccupied BARs.  pcim_iomap_regions_request_all() requests
all BARs and iomap specified BARs.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: improve dock event handling
Tejun Heo [Wed, 12 Mar 2008 05:24:43 +0000 (14:24 +0900)]
libata-acpi: improve dock event handling

Improve ACPI hotplug handling such that dock event is handled properly.

* Register handlers for dock events.

* Directly detach device on EJECT_REQUEST instead of signaling hotplug
  event.  This prevents libata from accessing severed controller
  and/or device.

* While at it, use named constants for ACPI events and move uevent
  signaling inside host lock.

Original patch and testing by Holger Macht.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Holger Macht <hmacht@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoioc3.c: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Thu, 6 Mar 2008 15:55:09 +0000 (15:55 +0000)]
ioc3.c: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 drivers/sn/ioc3.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoucc_geth: use correct thread number for 10/100Mbps link
Joakim Tjernlund [Thu, 6 Mar 2008 10:48:46 +0000 (18:48 +0800)]
ucc_geth: use correct thread number for 10/100Mbps link

Use thread number of 1 for 10/100Mbps link instead of 4.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoigb: Correctly get protocol information
Mitch Williams [Fri, 7 Mar 2008 18:32:13 +0000 (10:32 -0800)]
igb: Correctly get protocol information

We can't look at the socket to get protocol information. We should
instead look directly at the packet, and hope there are no IPv6
option headers.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[IOC3] Fix section missmatch
Ralf Baechle [Sat, 8 Mar 2008 16:58:33 +0000 (16:58 +0000)]
[IOC3] Fix section missmatch

  LD      drivers/net/built-in.o
WARNING: drivers/net/built-in.o(.text+0x3468): Section mismatch in reference fro
m the function ioc3_probe() to the function .devinit.text:ioc3_serial_probe()
The function ioc3_probe() references
the function __devinit ioc3_serial_probe().
This is often because ioc3_probe lacks a __devinit
annotation or the annotation of ioc3_serial_probe is wrong.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago2.6.25-rc4 de_stop_rxtx polling wrong
Grant Grundler [Sun, 9 Mar 2008 01:33:16 +0000 (18:33 -0700)]
2.6.25-rc4 de_stop_rxtx polling wrong

This untested patch _should_ fix:
"(net de2104x) Kernel panic with de2104x tulip driver on boot"
http://bugzilla.kernel.org/show_bug.cgi?id=3156

But the bug submitter isn't responding.  Same fix has been applied
to tulip.c (several years ago) and uli526x.c (Feb 2008) drivers.

[ The panic reported in the bug report was removed in a recently
  (march 2008) accepted patch from Ondrej Zary. ]

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoforcedeth: limit tx to 16
Ayaz Abdulla [Mon, 10 Mar 2008 19:58:21 +0000 (14:58 -0500)]
forcedeth: limit tx to 16

This is a critical patch which adds a workaround for a HW bug. The patch
will limit the number of outstanding tx packets to 16. Otherwise, the HW
could send out packets with bad checksums.

The driver will still setup the tx packets into the ring, however, will
only set the Valid bit on 16 packets at a time.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago3c501: Further coding style fixes
Alan Cox [Mon, 10 Mar 2008 21:57:20 +0000 (21:57 +0000)]
3c501: Further coding style fixes

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb3: Fix transmit queue stop mechanism
Divy Le Ray [Thu, 13 Mar 2008 07:13:30 +0000 (00:13 -0700)]
cxgb3: Fix transmit queue stop mechanism

The last change in the Tx queue stop mechanism opens a window
where the Tx queue might be stopped after pending credits
returned.

Tx credits are returned via a control message generated by the HW.
It returns tx credits on demand, triggered by a completion bit
set in selective transmit packet headers.

The current code can lead to the Tx queue stopped
with all pending credits returned, and the current frame
not triggering a credit return. The Tx queue will then never be
awaken.

The driver could alternatively request a completion for packets
that stop the queue. It's however safer at this point to go back
to the pre-existing behaviour.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoNEWEMAC: Add compatible "ibm,tah" to tah matching table
Stefan Roese [Thu, 13 Mar 2008 15:59:43 +0000 (16:59 +0100)]
NEWEMAC: Add compatible "ibm,tah" to tah matching table

Add "ibm,tah" to the compatible matching table of the ibm_newemac
tah driver. The type "tah" is still preserved for compatibility reasons.
New dts files should use the compatible property though.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agorndis_host: fix transfer size negotiation
Jean-Christophe Dubois [Thu, 13 Mar 2008 22:56:36 +0000 (14:56 -0800)]
rndis_host: fix transfer size negotiation

This patch should resolve a problem that's troubled support for
some RNDIS peripherals.  It seems to have boiled down to using a
variable to establish transfer size limits before it was assigned,
which caused those devices to fallback to a default "jumbogram"
mode we don't support.  Fix by assigning it earlier for RNDIS.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
[ cleanups ]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoNEWEMAC: fix support for pause packets
Pravin M. Bathija [Fri, 14 Mar 2008 09:52:28 +0000 (10:52 +0100)]
NEWEMAC: fix support for pause packets

Problem Description and Fix
---------------------------
When a pause packet(with destination as reserved Multicast address) is
received by the EMAC hardware to control the flow of frames being
transmitted by it, it is dropped by the hardware unless the reserved
Multicast address is hashed in to the GAHT[1-4] registers. This code fix
adds the default reserved multicast address to the GAHT[1-4] registers
in the EMAC(s) present on the chip. The flow control with Pause packets
will only work if the following register bits are programmed in EMAC:
EMACx_MR1[APP] = 1
EMACx_RMR[BAE] = 1
EMACx_RMR[MAE] = 1

Behavior that may be observed in a running system
-------------------------------------------------
A host transferring data from a PPC based system may send a Pause packet
to the PPC EMAC requesting it to slow down the flow of packets. If the
default reserved multicast MAC address is not programmed into the
GAHT[1-4] registers this Pause packet will be dropped by PPC EMAC and no
Flow Control will be done.

Signed-off-by: Pravin M. Bathija <pbathija@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agovirtio: fix race in enable_cb
Christian Borntraeger [Fri, 14 Mar 2008 13:17:05 +0000 (14:17 +0100)]
virtio: fix race in enable_cb

There is a race in virtio_net, dealing with disabling/enabling the callback.
I saw the following oops:

kernel BUG at /space/kvm/drivers/virtio/virtio_ring.c:218!
illegal operation: 0001 [#1] SMP
Modules linked in: sunrpc dm_mod
CPU: 2 Not tainted 2.6.25-rc1zlive-host-10623-gd358142-dirty #99
Process swapper (pid: 0, task: 000000000f85a610, ksp: 000000000f873c60)
Krnl PSW : 0404300180000000 00000000002b81a6 (vring_disable_cb+0x16/0x20)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:3 PM:0 EA:3
Krnl GPRS: 0000000000000001 0000000000000001 0000000010005800 0000000000000001
           000000000f3a0900 000000000f85a610 0000000000000000 0000000000000000
           0000000000000000 000000000f870000 0000000000000000 0000000000001237
           000000000f3a0920 000000000010ff74 00000000002846f6 000000000fa0bcd8
Krnl Code: 00000000002b819aa7110001           tmll    %r1,1
           00000000002b819ea7840004           brc     8,2b81a6
           00000000002b81a2a7f40001           brc     15,2b81a4
          >00000000002b81a6a51b0001           oill    %r1,1
           00000000002b81aa40102000           sth     %r1,0(%r2)
           00000000002b81ae: 07fe               bcr     15,%r14
           00000000002b81b0eb7ff0380024       stmg    %r7,%r15,56(%r15)
           00000000002b81b6a7f13e00           tmll    %r15,15872
Call Trace:
([<000000000fa0bcd0>] 0xfa0bcd0)
 [<00000000002b8350>] vring_interrupt+0x5c/0x6c
 [<000000000010ab08>] do_extint+0xb8/0xf0
 [<0000000000110716>] ext_no_vtime+0x16/0x1a
 [<0000000000107e72>] cpu_idle+0x1c2/0x1e0

The problem can be triggered with a high amount of host->guest traffic.
I think its the following race:

poll says netif_rx_complete
poll calls enable_cb
enable_cb opens the interrupt mask
a new packet comes, an interrupt is triggered----\
enable_cb sees that there is more work           |
enable_cb disables the interrupt                 |
       .                                         V
       .                            interrupt is delivered
       .                            skb_recv_done does atomic napi test, ok
 some waiting                       disable_cb is called->check fails->bang!
       .
poll would do napi check
poll would do disable_cb

The fix is to let enable_cb not disable the interrupt again, but expect the
caller to do the cleanup if it returns false. In that case, the interrupt is
only disabled, if the napi test_set_bit was successful.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cleaned up doco)
16 years agovirtio: Enable netpoll interface for netconsole logging
Amit Shah [Fri, 29 Feb 2008 10:54:50 +0000 (16:24 +0530)]
virtio: Enable netpoll interface for netconsole logging

Add a new poll_controller handler that the netpoll interface needs.

This enables netconsole logging from a kvm guest over the virtio
net interface.

Signed-off-by: Amit Shah <amitshah@gmx.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: handle > 2 billion page balloon targets
Rusty Russell [Tue, 18 Mar 2008 03:58:15 +0000 (22:58 -0500)]
virtio: handle > 2 billion page balloon targets

If the host asks for a huge target towards_target() can overflow, and
we up oops as we try to release more pages than we have.  The simple
fix is to use a 64-bit value.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: Fix sysfs bits to have proper block symlink
Jeremy Katz [Sun, 2 Mar 2008 22:00:15 +0000 (17:00 -0500)]
virtio: Fix sysfs bits to have proper block symlink

Fix up so that the virtio_blk devices in sysfs link correctly to their
block device.  This then allows them to be detected by hal, etc

Signed-off-by: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: Use spin_lock_irqsave/restore for virtio-pci
Anthony Liguori [Sun, 2 Mar 2008 22:37:48 +0000 (16:37 -0600)]
virtio: Use spin_lock_irqsave/restore for virtio-pci

virtio-pci acquires its spin lock in an interrupt context so it's necessary
to use spin_lock_irqsave/restore variants.  This patch fixes guest SMP when
using virtio devices in KVM.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agodrivers/net/atl1/atl1_main.c: remove unused variable
Julia Lawall [Sat, 15 Mar 2008 16:05:02 +0000 (17:05 +0100)]
drivers/net/atl1/atl1_main.c: remove unused variable

The variable update_rx is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/net/ipg.c: remove unused variable
Julia Lawall [Sat, 15 Mar 2008 16:04:39 +0000 (17:04 +0100)]
drivers/net/ipg.c: remove unused variable

The variable gig is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoepic100 endianness annotations and fixes
Al Viro [Sun, 16 Mar 2008 22:22:04 +0000 (22:22 +0000)]
epic100 endianness annotations and fixes

* "powerpc or sparc" is not the same as "big-endian", fix the ifdef
* since we tell the card to byteswap the descriptors on big-endian,
  we ought to leave them host-endian...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoipg fix
Al Viro [Sun, 16 Mar 2008 22:22:14 +0000 (22:22 +0000)]
ipg fix

spurious cpu_to_le64()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agomore misannotations: ne2k-pci
Al Viro [Sun, 16 Mar 2008 22:22:34 +0000 (22:22 +0000)]
more misannotations: ne2k-pci

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agofore2000 - fix misannotations
Al Viro [Sun, 16 Mar 2008 22:23:04 +0000 (22:23 +0000)]
fore2000 - fix misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agowan/farsync: copy_from_user() to iomem is wrong
Al Viro [Sun, 16 Mar 2008 22:22:44 +0000 (22:22 +0000)]
wan/farsync: copy_from_user() to iomem is wrong

kmalloc intermediate buffer(), do copy_from_user() + memcpy_toio()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agor6040 endianness fixes
Al Viro [Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)]
r6040 endianness fixes

pci_unmap_single() on little-endian address

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agorelay: fix subbuf_splice_actor() adding too many pages
Jens Axboe [Mon, 17 Mar 2008 08:04:59 +0000 (09:04 +0100)]
relay: fix subbuf_splice_actor() adding too many pages

If subbuf_pages was larger than the max number of pages the pipe
buffer will hold, subbuf_splice_actor() would happily go beyond
the array size.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoThe ps2esdi driver was marked as BROKEN more than two years ago due to being
Adrian Bunk [Thu, 6 Mar 2008 15:02:42 +0000 (16:02 +0100)]
The ps2esdi driver was marked as BROKEN more than two years ago due to being
no longer working for some time.

A driver that had been marked as BROKEN for such a long time seems to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still present in
the older kernel releases.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agodrm/ati_pcigart: fix the PCIGART to use drm_pci to allocate GART table.
Dave Airlie [Mon, 17 Mar 2008 00:24:24 +0000 (10:24 +1000)]
drm/ati_pcigart: fix the PCIGART to use drm_pci to allocate GART table.

This fixes a problem on 64-bit with 4GB with ATI RS690 chipsets. It
makes sure the pcigart table is allocated in coherent memory for DMA operations.

Signed-off-by: Dave Airlie <airlied@redhat.com>