linux-2.6
15 years ago[S390] hvc_iucv: Provide IUCV z/VM user ID filtering
Hendrik Brueckner [Thu, 26 Mar 2009 14:23:55 +0000 (15:23 +0100)] 
[S390] hvc_iucv: Provide IUCV z/VM user ID filtering

This patch introduces the kernel parameter hvc_iucv_allow= that specifies
a comma-separated list of z/VM user IDs.
If specified, the z/VM IUCV hypervisor console device driver accepts IUCV
connections from listed z/VM user IDs only.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] hvc_iucv: Update and add missing kernel messages
Hendrik Brueckner [Thu, 26 Mar 2009 14:23:54 +0000 (15:23 +0100)] 
[S390] hvc_iucv: Update and add missing kernel messages

If the hvc_iucv= kernel parameter specifies a value that is not
valid, display an error message.
Minor changes to existing kernel messages.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cputime: initialize per thread timer values on fork
Heiko Carstens [Thu, 26 Mar 2009 14:23:53 +0000 (15:23 +0100)] 
[S390] cputime: initialize per thread timer values on fork

Initialize per thread timer values instead of just copying them from
the parent. That way it is easily possible to tell how much time a
thread spent in user/system context.
Doesn't fix a bug, this is just for debugging purposes.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] arch/s390/kernel/process.c: fix whitespace damage
Heiko Carstens [Thu, 26 Mar 2009 14:23:52 +0000 (15:23 +0100)] 
[S390] arch/s390/kernel/process.c: fix whitespace damage

Fix all the whitespace damage in process.c, especially copy_thread().
Next patch will add code to copy_thread() which needs to 'fixed' first.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] delete drivers/s390/ebcdic.c
Heiko Carstens [Thu, 26 Mar 2009 14:23:51 +0000 (15:23 +0100)] 
[S390] delete drivers/s390/ebcdic.c

Dead file. Seems to be a leftover from the 2.4->2.5 conversion.
The used and uptodate version of this file is in arch/s390/kernel.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] move sysinfo.c from drivers/s390 to arch/s390/kernel
Heiko Carstens [Thu, 26 Mar 2009 14:23:50 +0000 (15:23 +0100)] 
[S390] move sysinfo.c from drivers/s390 to arch/s390/kernel

All in sysinfo.c is core kernel code and not driver code. So move it
to arch/s390/kernel. Also includes some small cleanups.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: message cleanup
Stefan Haberland [Thu, 26 Mar 2009 14:23:49 +0000 (15:23 +0100)] 
[S390] dasd: message cleanup

Moved some Messages into s390 debug feature and changed remaining
messages to use the dev_xxx and pr_xxx macros.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: add High Performance FICON support
Stefan Weinhuber [Thu, 26 Mar 2009 14:23:48 +0000 (15:23 +0100)] 
[S390] dasd: add High Performance FICON support

To support High Performance FICON, the DASD device driver has to
translate I/O requests into the new transport mode control words (TCW)
instead of the traditional (command mode) CCW requests.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: add large volume support
Stefan Weinhuber [Thu, 26 Mar 2009 14:23:47 +0000 (15:23 +0100)] 
[S390] dasd: add large volume support

The dasd device driver will now support ECKD devices with more then
65520 cylinders.
In the traditional ECKD adressing scheme each track is addressed
by a 16-bit cylinder and 16-bit head number. The new addressing
scheme makes use of the fact that the actual number of heads is
never larger then 15, so 12 bits of the head number can be redefined
to be part of the cylinder address.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd_eckd / Write format R0 is now allowed BB
Jean-Baptiste Joret [Thu, 26 Mar 2009 14:23:46 +0000 (15:23 +0100)] 
[S390] dasd_eckd / Write format R0 is now allowed BB

Permission is now granted to the subsystem to format write R0 with:
* an ID = CCHHR, where CC = physical cylinder number,
  HH = physical head number, and R = 0
* a key length of zero
* a data length of eight
* a data field containing all zeros

Signed-off-by: Jean-Baptiste Joret <joret@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: enable compat ioctls
Heiko Carstens [Thu, 26 Mar 2009 14:23:45 +0000 (15:23 +0100)] 
[S390] dasd: enable compat ioctls

All of the ioctls are compatible. Just enable them.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] page fault: invoke oom-killer
Heiko Carstens [Thu, 26 Mar 2009 14:23:44 +0000 (15:23 +0100)] 
[S390] page fault: invoke oom-killer

s390 arch backend for 1c0fe6e3bda0464728c23c8d84aa47567e8b716c
"mm: invoke oom-killer from page fault".

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Automatic IPL after dump
Frank Munzert [Thu, 26 Mar 2009 14:23:43 +0000 (15:23 +0100)] 
[S390] Automatic IPL after dump

Provide new shutdown action "dump_reipl" for automatic ipl after dump.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] fix dump_stack vs. %p and (null)
Christian Borntraeger [Thu, 26 Mar 2009 14:23:42 +0000 (15:23 +0100)] 
[S390] fix dump_stack vs. %p and (null)

The s390 implemenation of dump_stack uses %p to display stack content.
Since d97106ab53f812910a62d18afb9dbe882819c1ba (Make %p print '(null)'
for NULL pointers) this causes a strange output for dump_stack:

[...]
Process basename (pid: 8822, task: 00000000b2ece038, ksp: 00000000b24d7b38)
04000000b5685c00 00000000b24d7760 0000000000000002 (null)
00000000b24d7800 00000000b24d7778 00000000b24d7778 00000000001052fe
(null) 00000000b24d7b38 (null) 000000000000000a
000000000000000d (null) 00000000b24d7760 00000000b24d77d8
000000000051a7e8 00000000001052fe 00000000b24d7760 00000000b24d77b0
Call Trace:
[...]

This patch changes our dump_stack to use the appropriate %x format.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years agoGet rid of pdflush_operation() in emergency sync and remount
Jens Axboe [Tue, 17 Mar 2009 08:38:40 +0000 (09:38 +0100)] 
Get rid of pdflush_operation() in emergency sync and remount

Opencode a cheasy approach with kevent. The idea here is that we'll
add some generic delayed work infrastructure, which probably wont be
based on pdflush (or maybe it will, in which case we can just add it
back).

This is in preparation for getting rid of pdflush completely.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agobtrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty
Jens Axboe [Tue, 17 Mar 2009 08:36:37 +0000 (09:36 +0100)] 
btrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty

Chris says it's safe to kill.

Acked-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoMove the default_backing_dev_info out of readahead.c and into backing-dev.c
Jens Axboe [Tue, 17 Mar 2009 08:35:06 +0000 (09:35 +0100)] 
Move the default_backing_dev_info out of readahead.c and into backing-dev.c

It really makes no sense to have it in readahead.c, so move it where
it belongs.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Repeated lines in switching-sched.txt
Avishay Traeger [Tue, 24 Mar 2009 11:40:18 +0000 (12:40 +0100)] 
block: Repeated lines in switching-sched.txt

These lines appear in this file twice - removed one occurrence.

Signed-off-by: Avishay Traeger <avishay@il.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agobsg: Remove bogus check against request_queue->max_sectors
Boaz Harrosh [Tue, 24 Mar 2009 11:37:50 +0000 (12:37 +0100)] 
bsg: Remove bogus check against request_queue->max_sectors

bsg submits REQ_TYPE_BLOCK_PC so the right check is max_hw_sectors.
But I've removed this check because right after, bsg proceeds with
calling blk_rq_map_user() which does all the right checks.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: WARN in __blk_put_request() for potential bio leak
Boaz Harrosh [Tue, 24 Mar 2009 11:35:07 +0000 (12:35 +0100)] 
block: WARN in __blk_put_request() for potential bio leak

Put a WARN_ON in __blk_put_request if it is about to
leak bio(s). This is a serious bug that can happen in error
handling code paths.

For this to work I have fixed a couple of places in block/ where
request->bio != NULL ownership was not honored. And a small cleanup
at sg_io() while at it.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoloop: fix circular locking in loop_clr_fd()
Nikanth Karthikesan [Tue, 24 Mar 2009 11:33:41 +0000 (12:33 +0100)] 
loop: fix circular locking in loop_clr_fd()

With CONFIG_PROVE_LOCKING enabled

$ losetup /dev/loop0 file
$ losetup -o 32256 /dev/loop1 /dev/loop0

$ losetup -d /dev/loop1
$ losetup -d /dev/loop0

triggers a [ INFO: possible circular locking dependency detected ]

I think this warning is a false positive.

Open/close on a loop device acquires bd_mutex of the device before
acquiring lo_ctl_mutex of the same device. For ioctl(LOOP_CLR_FD) after
acquiring lo_ctl_mutex, fput on the backing_file might acquire the bd_mutex of
a device, if backing file is a device and this is the last reference to the
file being dropped . But it is guaranteed that it is impossible to have a
circular list of backing devices.(say loop2->loop1->loop0->loop2 is not
possible), which guarantees that this can never deadlock.

So this warning should be suppressed. It is very difficult to annotate lockdep
not to warn here in the correct way. A simple way to silence lockdep could be
to mark the lo_ctl_mutex in ioctl to be a sub class, but this might mask some
other real bugs.

@@ -1164,7 +1164,7 @@ static int lo_ioctl(struct block_device *bdev, fmode_t mode,
  struct loop_device *lo = bdev->bd_disk->private_data;
  int err;

- mutex_lock(&lo->lo_ctl_mutex);
+ mutex_lock_nested(&lo->lo_ctl_mutex, 1);
  switch (cmd) {
  case LOOP_SET_FD:
  err = loop_set_fd(lo, mode, bdev, arg);

Or actually marking the bd_mutex after lo_ctl_mutex as a sub class could be
a better solution.

Luckily it is easy to avoid calling fput on backing file with lo_ctl_mutex
held, so no lockdep annotation is required.

If you do not like the special handling of the lo_ctl_mutex just for the
LOOP_CLR_FD ioctl in lo_ioctl(), the mutex handling could be moved inside
each of the individual ioctl handlers and I could send you another patch.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosparc64: Flush TLB before releasing pages.
David S. Miller [Thu, 26 Mar 2009 08:54:46 +0000 (01:54 -0700)] 
sparc64: Flush TLB before releasing pages.

tlb_flush_mmu() needs to flush pending TLB entries before
processing the mmu_gather ->pages list.

Noticed by Benjamin Herrenschmidt.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 26 Mar 2009 08:22:01 +0000 (01:22 -0700)] 
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

15 years agoixgbe: Allow Priority Flow Control settings to survive a device reset
PJ Waskiewicz [Wed, 25 Mar 2009 22:10:42 +0000 (22:10 +0000)] 
ixgbe: Allow Priority Flow Control settings to survive a device reset

When changing DCB parameters, ixgbe needs to have the MAC reset.  The way
the flow control code is setup today, PFC will be disabled on a reset.
This patch adds a new flow control type for PFC, and then has the netlink
layer take care of toggling which type of flow control to enable.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: core: remove unneeded include in net/core/utils.c.
Rami Rosen [Thu, 26 Mar 2009 08:11:48 +0000 (01:11 -0700)] 
net: core: remove unneeded include in net/core/utils.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: update version number
Jesse Brandeburg [Wed, 25 Mar 2009 22:06:01 +0000 (22:06 +0000)] 
e1000e: update version number

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: fix close interrupt race
Jesse Brandeburg [Wed, 25 Mar 2009 22:05:41 +0000 (22:05 +0000)] 
e1000e: fix close interrupt race

As noticed by Alan Cox, it is possible for e1000e to exit its interrupt
handler or NAPI with interrupts enabled even when the driver is unloading or
being configured administratively down.

fix related to fix for: http://bugzilla.kernel.org/show_bug.cgi?id=12876

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: fix loss of multicast packets
Jesse Brandeburg [Wed, 25 Mar 2009 22:05:21 +0000 (22:05 +0000)] 
e1000e: fix loss of multicast packets

e1000e (and e1000, igb, ixgbe, ixgb) all do a series of operations each
time a multicast address is added.  The flow goes something like

1) stack adds one multicast address
2) stack passes whole current list of unicast and multicast addresses to
   driver
3) driver clears entire list in hardware
4) driver programs each multicast address using iomem in a loop

This was causing multicast packets to be lost during the reprogramming
process.

reference with test program:
http://kerneltrap.org/mailarchive/linux-netdev/2009/3/14/5160514/thread

Thanks to Dave Boutcher for his report and test program.

This driver fix prepares an array all at once in memory and programs it in
one shot to the hardware, not requiring an "erase" cycle.  It would still
be possible for packets to be dropped while the receiver is off during
reprogramming.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Dave Boutcher <daveboutcher@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: commonize tx cleanup routine to match e1000 & igb
Alexander Duyck [Wed, 25 Mar 2009 22:05:03 +0000 (22:05 +0000)] 
e1000e: commonize tx cleanup routine to match e1000 & igb

This change updates the e1000e tx cleanup routine to more closely match
what already exists in igb and e1000.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix nf_logger name in ebt_ulog.
Eric Leblond [Thu, 26 Mar 2009 08:04:28 +0000 (01:04 -0700)] 
netfilter: fix nf_logger name in ebt_ulog.

This patch renames the ebt_ulog nf_logger from "ulog" to "ebt_ulog" to
be in sync with other modules naming. As this name was currently only
used for informational purpose, the renaming should be harmless.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix warning in ebt_ulog init function.
Eric Leblond [Thu, 26 Mar 2009 08:04:02 +0000 (01:04 -0700)] 
netfilter: fix warning in ebt_ulog init function.

The ebt_ulog module does not follow the fixed convention about function
return. Loading the module is triggering the following message:

sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention
sys_init_module: loading module anyway...
Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146
Call Trace:
 [<c0441b81>] ? printk+0xf/0x16
 [<c02311af>] sys_init_module+0x107/0x186
 [<c0202cfa>] syscall_call+0x7/0xb

The following patch fixes the return treatment in ebt_ulog_init()
function.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix warning about invalid const usage
Eric Leblond [Thu, 26 Mar 2009 08:03:23 +0000 (01:03 -0700)] 
netfilter: fix warning about invalid const usage

This patch fixes the declaration of the logger structure in ebt_log
and ebt_ulog: I forgot to remove the const option from their declaration
in the commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter:
use a linked list of loggers").

Pointed-out-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: fix close race with interrupt
Jesse Brandeburg [Wed, 25 Mar 2009 21:59:22 +0000 (21:59 +0000)] 
e1000: fix close race with interrupt

this is in regards to
http://bugzilla.kernel.org/show_bug.cgi?id=12876

where it appears that e1000 can leave its interrupt enabled after
exiting the driver.  Fix the bug by making the interrupt enable
paths more aware of the driver exiting.

Thanks to Alan Cox for the poke and initial investigation.

CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: cleanup clean_tx_irq routine so that it completely cleans ring
Alexander Duyck [Wed, 25 Mar 2009 21:59:04 +0000 (21:59 +0000)] 
e1000: cleanup clean_tx_irq routine so that it completely cleans ring

The tx cleanup routine was stopping after 64 packets and this was causing
issues resulting in the ring not being completely cleaned.

This change updates the driver to clean the entire ring and if it doesn't
it then will retry on the next pass.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: fix tx hang detect logic and address dma mapping issues
Alexander Duyck [Wed, 25 Mar 2009 21:58:45 +0000 (21:58 +0000)] 
e1000: fix tx hang detect logic and address dma mapping issues

This patch changes the dma mapping to better support
skb_dma_map/skb_dma_unmap and addresses and redefines the tx hang logic to
be based off of time stamp instead of if the dma field is populated

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobridge: bad error handling when adding invalid ether address
Stephen Hemminger [Thu, 26 Mar 2009 04:01:47 +0000 (21:01 -0700)] 
bridge: bad error handling when adding invalid ether address

This fixes an crash when empty bond device is added to a bridge.
If an interface with invalid ethernet address (all zero) is added
to a bridge, then bridge code detects it when setting up the forward
databas entry. But the error unwind is broken, the bridge port object
can get freed twice: once when ref count went to zeo, and once by kfree.
Since object is never really accessible, just free it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: select current active slave when enslaving device for mode tlb and alb
Jiri Pirko [Thu, 26 Mar 2009 00:23:38 +0000 (17:23 -0700)] 
bonding: select current active slave when enslaving device for mode tlb and alb

I've hit an issue on my system when I've been using RealTek RTL8139D cards in
bonding interface in mode balancing-alb. When I enslave a card, the current
active slave (bond->curr_active_slave) is not set and the link is therefore
not functional.

----
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: None
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1f:1f:01:2f:22
----

The thing that gets it right is when I unplug the cable and then I put it back
into the NIC. Then the current active slave is set to eth1 and link is working
just fine. Here is dmesg log with bonding DEBUG messages turned on:
----
ADDRCONF(NETDEV_UP): bond0: link is not ready
event_dev: bond0, event: 1
IFF_MASTER
event_dev: bond0, event: 8
IFF_MASTER
bond_ioctl: master=bond0, cmd=35216
slave_dev=cac5d800:
slave_dev->name=eth1:
eth1: ! NETIF_F_VLAN_CHALLENGED
event_dev: eth1, event: 8
eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
event_dev: eth1, event: 1
event_dev: eth1, event: 8
IFF_SLAVE
Initial state of slave_dev is BOND_LINK_UP
bonding: bond0: enslaving eth1 as an active interface with an up link.
ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
event_dev: bond0, event: 4
IFF_MASTER
bond0: no IPv6 routers present

<<<<cable unplug>>>>

eth1: link down
event_dev: eth1, event: 4
IFF_SLAVE
bonding: bond0: link status definitely down for interface eth1, disabling it
event_dev: bond0, event: 4
IFF_MASTER

<<<<cable plug>>>>

eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
event_dev: eth1, event: 4
IFF_SLAVE
bonding: bond0: link status definitely up for interface eth1.
bonding: bond0: making interface eth1 the new active one.
event_dev: eth1, event: 8
IFF_SLAVE
event_dev: eth1, event: 8
IFF_SLAVE
bonding: bond0: first active interface up!
event_dev: bond0, event: 4
IFF_MASTER
----

The current active slave is set by calling bond_select_active_slave() function
from bond_miimon_commit() function when the slave (eth1) link goes to state up.

I also tested this on other machine with Broadcom NetXtreme II BCM5708
1000Base-T NIC and there all works fine. The thing is that this adapter is down
and goes up after few seconds after it is enslaved.

This patch calls bond_select_active_slave() in bond_enslave() function for modes
alb and tlb and makes sure that the current active slave is set up properly even
when the slave state is already up. Tested on both systems, works fine.

Notice: The same problem can maybe also occrur in mode 8023AD but I'm unable to
test that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: reallocate skb when headroom is not enough for fcb
Li Yang [Tue, 24 Mar 2009 23:15:33 +0000 (23:15 +0000)] 
gianfar: reallocate skb when headroom is not enough for fcb

Gianfar uses a hardware header FCB for offloading.  However when used
with bridging or IP forwarding, TX skb might not have enough headroom
for the FCB.  Reallocate skb for such cases.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoBump release date to 25Mar2009 and version to 0.22
Florian Fainelli [Tue, 24 Mar 2009 23:34:38 +0000 (23:34 +0000)] 
Bump release date to 25Mar2009 and version to 0.22

This patch bumps the driver release date to March 25th 2009
and release version to 0.22.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: Fix second PHY address
Florian Fainelli [Tue, 24 Mar 2009 23:34:35 +0000 (23:34 +0000)] 
r6040: Fix second PHY address

This patch fixes the second PHY address which is strapped
to be at PHY address 3 instead of 2.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosched: Add comments to find_busiest_group() function
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:27 +0000 (14:44 +0530)] 
sched: Add comments to find_busiest_group() function

Impact: cleanup

Add /** style comments around find_busiest_group(). Also add a few
explanatory comments.

This concludes the find_busiest_group() cleanup. The function is
now down to 72 lines from the original 313 lines.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091427.13992.18933.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Refactor the power savings balance code
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:22 +0000 (14:44 +0530)] 
sched: Refactor the power savings balance code

Impact: cleanup

Create seperate helper functions to initialize the
power-savings-balance related variables, to update them and
to check if we have a scope for performing power-savings balance.

Add no-op inline functions for the !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT)
case.

This will eliminate all the #ifdef jungle in find_busiest_group() and the
other helper functions.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091422.13992.73616.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Optimize the !power_savings_balance during fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:17 +0000 (14:44 +0530)] 
sched: Optimize the !power_savings_balance during fbg()

Impact: cleanup, micro-optimization

We don't need to perform power_savings balance if either the
cpu is NOT_IDLE or if the sched_domain doesn't contain the
SD_POWERSAVINGS_BALANCE flag set.

Currently, we check for these conditions multiple number of
times, even though these variables don't change over the scope
of find_busiest_group().

Check once, and store the value in the already exiting
"power_savings_balance" variable.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091417.13992.2657.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create a helper function to calculate imbalance
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:12 +0000 (14:44 +0530)] 
sched: Create a helper function to calculate imbalance

Move all the imbalance calculation out of find_busiest_group()
through this helper function.

With this change, the structure of find_busiest_group() will be
as follows:

- update_sched_domain_statistics.

- check if imbalance exits.

- update imbalance and return busiest.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091411.13992.43293.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create helper to calculate small_imbalance in fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:06 +0000 (14:44 +0530)] 
sched: Create helper to calculate small_imbalance in fbg()

Impact: cleanup

We have two places in find_busiest_group() where we need to calculate
the minor imbalance before returning the busiest group. Encapsulate
this functionality into a seperate helper function.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091406.13992.54316.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create a helper function to calculate sched_domain stats for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:01 +0000 (14:44 +0530)] 
sched: Create a helper function to calculate sched_domain stats for fbg()

Impact: cleanup

Create a helper function named update_sd_lb_stats() to update the
various sched_domain related statistics in find_busiest_group().

With this we would have moved all the statistics computation out of
find_busiest_group().

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091401.13992.88737.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Define structure to store the sched_domain statistics for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:56 +0000 (14:43 +0530)] 
sched: Define structure to store the sched_domain statistics for fbg()

Impact: cleanup

Currently we use a lot of local variables in find_busiest_group()
to capture the various statistics related to the sched_domain.
Group them together into a single data structure.

This will help us to offload the job of updating the sched_domain
statistics to a helper function.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091356.13992.25970.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create a helper function to calculate sched_group stats for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:51 +0000 (14:43 +0530)] 
sched: Create a helper function to calculate sched_group stats for fbg()

Impact: cleanup

Create a helper function named update_sg_lb_stats() which
can be invoked to calculate the individual group's statistics
in find_busiest_group().

This reduces the lenght of find_busiest_group() considerably.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Aked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091351.13992.43461.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Define structure to store the sched_group statistics for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:46 +0000 (14:43 +0530)] 
sched: Define structure to store the sched_group statistics for fbg()

Impact: cleanup

Currently a whole bunch of variables are used to store the
various statistics pertaining to the groups we iterate over
in find_busiest_group().

Group them together in a single data structure and add
appropriate comments.

This will be useful later on when we create helper functions
to calculate the sched_group statistics.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091345.13992.20099.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Fix indentations in find_busiest_group() using gotos
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:40 +0000 (14:43 +0530)] 
sched: Fix indentations in find_busiest_group() using gotos

Impact: cleanup

Some indentations in find_busiest_group() can minimized by using
early exits with the help of gotos. This improves readability in
a couple of cases.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091340.13992.45062.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Simple helper functions for find_busiest_group()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:35 +0000 (14:43 +0530)] 
sched: Simple helper functions for find_busiest_group()

Impact: cleanup

Currently the load idx calculation code is in find_busiest_group().
Move that to a static inline helper function.

Similary, to find the first cpu of a sched_group we use
cpumask_first(sched_group_cpus(group))

Use a helper to that. It improves readability in some cases.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091335.13992.55424.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core
Ingo Molnar [Wed, 25 Mar 2009 09:26:51 +0000 (10:26 +0100)] 
Merge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core

15 years ago[WATCHDOG] i6300esb.c: start locking
Wim Van Sebroeck [Mon, 23 Mar 2009 13:50:38 +0000 (13:50 +0000)] 
[WATCHDOG] i6300esb.c: start locking

Change the start function in preparation of the generic watchdog code.
Also make sure that locking of the start function is OK.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] i6300esb.c: convert to platform device driver
Wim Van Sebroeck [Thu, 19 Mar 2009 19:02:44 +0000 (19:02 +0000)] 
[WATCHDOG] i6300esb.c: convert to platform device driver

Convert the Intel 6300ESB watchdog timer to a platform device driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501
Alan Cox [Sun, 22 Mar 2009 10:46:42 +0000 (10:46 +0000)] 
[WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501

Change the wdt.c watchdog driver so that the code is the same for
both the WDT500 as the WDT501-P card. The selection of the card
is now being done via the module parameter: 'type' instead of the
config option CONFIG_WDT_501.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] Fix io.h & uaccess.h includes.
Wim Van Sebroeck [Wed, 18 Mar 2009 09:09:26 +0000 (09:09 +0000)] 
[WATCHDOG] Fix io.h & uaccess.h includes.

Fix following includes:
* #include <asm/io.h> should be #include <linux/io.h>
* #include <asm/uaccess.h> should be #include <linux/uaccess.h>

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] More coding-style and trivial clean-up
Wim Van Sebroeck [Wed, 18 Mar 2009 08:35:09 +0000 (08:35 +0000)] 
[WATCHDOG] More coding-style and trivial clean-up

Some more cleaning-up of the watchdog drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] struct file_operations should be const
Wim Van Sebroeck [Wed, 18 Mar 2009 08:18:43 +0000 (08:18 +0000)] 
[WATCHDOG] struct file_operations should be const

Fix following warnings:
WARNING: struct file_operations should normally be const

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] cpwd.c: Coding style - Clean-up
Wim Van Sebroeck [Wed, 18 Mar 2009 08:05:24 +0000 (08:05 +0000)] 
[WATCHDOG] cpwd.c: Coding style - Clean-up

This brings the cpwd.c watchdog driver in line with the kernel's coding style.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] hpwdt.c: Add new HP BMC controller.
Thomas Mingarelli [Tue, 3 Mar 2009 00:17:16 +0000 (00:17 +0000)] 
[WATCHDOG] hpwdt.c: Add new HP BMC controller.

Add the PCI-ID for the upcoming new BMC controller for HP hardware.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[PATCH 13/13] drivers/watchdog: use USB API functions rather than constants
Julia Lawall [Mon, 29 Dec 2008 10:23:47 +0000 (11:23 +0100)] 
[PATCH 13/13] drivers/watchdog: use USB API functions rather than constants

This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data
Thomas Reitmayr [Tue, 24 Feb 2009 22:59:22 +0000 (14:59 -0800)] 
[WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data

The orion5x-wdt driver is now registered as a platform device and
receives the tclk value as platform data. This fixes a compile issue
cause by a previously removed define "ORION5X_TCLK".

Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Kristof Provost <kristof@sigsegv.be>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Martin Michlmayr <tbm@cyrius.com>
Cc: Sylver Bruneau <sylver.bruneau@googlemail.com>
Cc: Kunihiko IMAI <bak@d2.dion.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years ago[WATCHDOG] rc32434_wdt: make sure watchdog is not running at startup
Wim Van Sebroeck [Mon, 23 Feb 2009 13:08:37 +0000 (13:08 +0000)] 
[WATCHDOG] rc32434_wdt: make sure watchdog is not running at startup

Make sure that the watchdog is not running after loading
and before it is started by opening /dev/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: add spin_locking
Wim Van Sebroeck [Mon, 23 Feb 2009 13:08:36 +0000 (13:08 +0000)] 
[WATCHDOG] rc32434_wdt: add spin_locking

Add spin_locks to prevent races.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: add shutdown method
Wim Van Sebroeck [Mon, 23 Feb 2009 13:08:35 +0000 (13:08 +0000)] 
[WATCHDOG] rc32434_wdt: add shutdown method

Add shutdown method to the platform driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: add timeout module parameter
Phil Sutter [Sun, 8 Feb 2009 15:44:42 +0000 (16:44 +0100)] 
[WATCHDOG] rc32434_wdt: add timeout module parameter

The WDT timer ticks quite fast (half of the CPU clock speed, which may
be between 198MHz and 330MHz (or 400MHz on newer boards)). Given it's
size of 32Bit, the maximum timeout value ranges from about 21s to 43s,
depending on the configured CPU clock speed.

This patch add's the timeout module parameter and checks that it's not
bigger then the maximum timeout for the given clock speed.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: clean-up driver
Phil Sutter [Sun, 8 Feb 2009 15:44:42 +0000 (16:44 +0100)] 
[WATCHDOG] rc32434_wdt: clean-up driver

Clean-up the rc32434 driver code:
- name the platform driver rc32434_wdt_driver
- Replace KBUILD_MODNAME ": " with PFX define.
- Cleanup include files
- Order the ioctl's

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] davinci: convert to ioremap() + io[read|write]
Kevin Hilman [Thu, 29 Jan 2009 22:14:30 +0000 (14:14 -0800)] 
[WATCHDOG] davinci: convert to ioremap() + io[read|write]

Remove davinci platform-specific IO accessor macros in favor
of standard ioremap + io[read|write]* functions.

Also, convert printk(KERN_ERR ....) into dev_err(...)

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] w83697ug: add error checking
Eric Lammerts [Tue, 3 Feb 2009 22:45:56 +0000 (17:45 -0500)] 
[WATCHDOG] w83697ug: add error checking

I noticed the W83697UG driver tries to register a watchdog even though
it already noticed the chip isn't there.

WDT driver for the Winbond(TM) W83697UG/UF Super I/O chip initialising.
w83697ug/uf WDT: No W83697UG/UF could be found
w83697ug/uf WDT: Watchdog already running. Resetting timeout to 60 sec
w83697ug/uf WDT: cannot register miscdev on minor=130 (err=-16)

Patch propagates the error back to wdt_init().

Signed-off-by: Eric Lammerts <eric@lammerts.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl
Wim Van Sebroeck [Wed, 21 Jan 2009 11:13:11 +0000 (11:13 +0000)] 
[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl

Switch to unlocked_ioctl

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years agoqeth: fix wait_event_timeout handling
Heiko Carstens [Tue, 24 Mar 2009 20:57:19 +0000 (20:57 +0000)] 
qeth: fix wait_event_timeout handling

wait_event_timeout just takes the numnber of jiffies to wait as
an argument. That value does not include jiffies itself.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: check for completion of a running recovery
Ursula Braun [Tue, 24 Mar 2009 20:57:18 +0000 (20:57 +0000)] 
qeth: check for completion of a running recovery

When a recovery is started for a qeth device, additional invocations
to change a mac address, to configure a VLAN interface on top, or to
add multicast addresses should wait till recovery is finished,
otherwise recovery might fail.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: unregister MAC addresses during recovery.
Klaus-Dieter Wacker [Tue, 24 Mar 2009 20:57:17 +0000 (20:57 +0000)] 
qeth: unregister MAC addresses during recovery.

qeth: Unregister MAC addresses from device (layer 2) during
recovery cycle. When the device is set online the MAC
addresses are registered again on the device.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: remove EDDP
Frank Blaschka [Tue, 24 Mar 2009 20:57:16 +0000 (20:57 +0000)] 
qeth: remove EDDP

Performance measurements showed EDDP does not lower CPU costs but increase
them. So we dump out EDDP code from qeth driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: add statistics for tx csum
Frank Blaschka [Tue, 24 Mar 2009 20:57:15 +0000 (20:57 +0000)] 
qeth: add statistics for tx csum

Add statistics counter for software tx checksumming.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 24 Mar 2009 20:57:14 +0000 (20:57 +0000)] 
qeth: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agorndis_wlan: Fix build with netdev_ops compat disabled.
David S. Miller [Wed, 25 Mar 2009 07:03:16 +0000 (00:03 -0700)] 
rndis_wlan: Fix build with netdev_ops compat disabled.

Instead of storing a private ->set_multicast_list, just
have a private netdev ops.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoax88796: Add method to take MAC from platform data
Daniel Mack [Wed, 25 Mar 2009 06:32:03 +0000 (23:32 -0700)] 
ax88796: Add method to take MAC from platform data

Implement a way to provide the MAC address for ax88796 devices from
their platform data. Boards might decide to set the address
programmatically, taken from boot tags or other sources.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/ax88796.c: take IRQ flags from platform_device
Daniel Mack [Wed, 25 Mar 2009 06:31:22 +0000 (23:31 -0700)] 
drivers/net/ax88796.c: take IRQ flags from platform_device

This patch adds support to the ax88796 ethernet driver to take IRQ flags
given by the platform_device definition.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: add support for 82574 device ID 0x10F6
Bruce Allan [Wed, 25 Mar 2009 06:28:02 +0000 (23:28 -0700)] 
e1000e: add support for 82574 device ID 0x10F6

Add device ID for a new variant of the 82574 adapter.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Acked-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branches 'cxgb3', 'endian', 'ipath', 'ipoib', 'iser', 'mad', 'misc', 'mlx4...
Roland Dreier [Wed, 25 Mar 2009 03:44:41 +0000 (20:44 -0700)] 
Merge branches 'cxgb3', 'endian', 'ipath', 'ipoib', 'iser', 'mad', 'misc', 'mlx4', 'mthca', 'nes' and 'sysfs' into for-next

15 years agoRDMA/cxgb3: Enforce required firmware
Steve Wise [Wed, 25 Mar 2009 03:44:18 +0000 (20:44 -0700)] 
RDMA/cxgb3: Enforce required firmware

The cxgb3 NIC driver can handle more firmware versions than iw_cxgb3,
and since commit 8207befa ("cxgb3: untie strict FW matching") cxgb3
will load with firmware versions that iw_cxgb3 can't handle.  The FW
major number indicates a specific interface between the FW and
iw_cxgb3.  Thus if the major number of the running firmware does not
match the required version compiled into iw_cxgb3, then iw_cxgb3 must
not register that device.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years ago[libata] Improve timeout handling
Alan Cox [Tue, 24 Mar 2009 10:23:46 +0000 (10:23 +0000)] 
[libata] Improve timeout handling

On a timeout call a device specific handler early in the recovery so that
we can complete and process successful commands which timed out due to IRQ
loss or the like rather more elegantly.

[Revised to exclude the timeout handling on a few devices that inherit from
 SFF but are not SFF enough to use the default timeout handler]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoipv6: Fix conflict resolutions during ipv6 binding
Vlad Yasevich [Tue, 24 Mar 2009 16:24:51 +0000 (16:24 +0000)] 
ipv6: Fix conflict resolutions during ipv6 binding

The ipv6 version of bind_conflict code calls ipv6_rcv_saddr_equal()
which at times wrongly identified intersections between addresses.
It particularly broke down under a few instances and caused erroneous
bind conflicts.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Make v4-mapped bindings consistent with IPv4
Vlad Yasevich [Tue, 24 Mar 2009 16:24:50 +0000 (16:24 +0000)] 
ipv6: Make v4-mapped bindings consistent with IPv4

Binding to a v4-mapped address on an AF_INET6 socket should
produce the same result as binding to an IPv4 address on
AF_INET socket.  The two are interchangable as v4-mapped
address is really a portability aid.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Allow ipv4 wildcard binds after ipv6 address binds
Vlad Yasevich [Tue, 24 Mar 2009 16:24:49 +0000 (16:24 +0000)] 
ipv6: Allow ipv4 wildcard binds after ipv6 address binds

The IPv4 wildcard (0.0.0.0) address does not intersect
in any way with explicit IPv6 addresses.  These two should
be permitted, but the IPv4 conflict code checks the ipv6only
bit as part of the test.  Since binding to an explicit IPv6
address restricts the socket to only that IPv6 address, the
side-effect is that the socket behaves as v6-only.  By
explicitely setting ipv6only in this case, allows the 2 binds
to succeed.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Disallow binding to v4-mapped address on v6-only socket.
Vlad Yasevich [Tue, 24 Mar 2009 16:24:48 +0000 (16:24 +0000)] 
ipv6: Disallow binding to v4-mapped address on v6-only socket.

A socket marked v6-only, can not receive or send traffic to v4-mapped
addresses.  Thus allowing binding to v4-mapped address on such a
socket makes no sense.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[libata] Drain data on errors
Alan Cox [Tue, 24 Mar 2009 10:23:19 +0000 (10:23 +0000)] 
[libata] Drain data on errors

If the device is signalling that there is data to drain after an error we
should read the bytes out and throw them away. Without this some devices
and controllers get wedged and don't recover.

Based on earlier work by Mark Lord

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_sc1200: Activate secondary channel
Alan Cox [Tue, 24 Mar 2009 10:22:25 +0000 (10:22 +0000)] 
pata_sc1200: Activate secondary channel

Implement serialize and turn on slave channel

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_artop: Serializing support
Alan Cox [Tue, 24 Mar 2009 10:21:49 +0000 (10:21 +0000)] 
pata_artop: Serializing support

Enable both ports on the 6210 and serialize them

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] ahci: correct enclosure LED state save
David Milburn [Fri, 20 Mar 2009 19:14:23 +0000 (14:14 -0500)] 
[libata] ahci: correct enclosure LED state save

ahci_transmit_led_message saves off the led_state
with a value that includes the port number OR'd
in, this incorrect value maybe reported back
in ahci_led_store.

For instance, if you turn off all the leds for
port 1 and cat the value back it will report 1
instead of 0.

# echo 0 > /sys/class/scsi_host/host1/em_message
# cat /sys/class/scsi_host/host1/em_message
1

Signed-off-by: David Milburn <dmilburn@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] More robust parsing for IDENTIFY DEVICE multi_count field
Mark Lord [Thu, 19 Mar 2009 17:32:21 +0000 (13:32 -0400)] 
[libata] More robust parsing for IDENTIFY DEVICE multi_count field

Make libata more robust when parsing the multi_count
field from a drive's identify data.  This prevents us from
attempting to use dubious multi_count values ad infinitum.

Reset dev->multi_count to zero and reprobe it each time
through this routine, as it can change on device reset.

Also ensure that the reported "maximum" value is valid
and is a power of two, and that the reported "count" value
is valid and also a power of two.  And that the "count"
value is not greater than the "maximum" value.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: fix LED blinking for SoC+NCQ
Mark Lord [Sun, 15 Mar 2009 15:33:19 +0000 (11:33 -0400)] 
sata_mv: fix LED blinking for SoC+NCQ

For Marvell SoC chips, the HDD LED does not blink when there is
disk I/O if NCQ is enabled. Add a quirk that enables blink mode for
the LED while NCQ is enabled on any port of a SoC host controller.
Normal LED function is restored when NCQ is not enabled on any port.

The code to enable the blink mode is based on earlier code
and suggestions from Frans Pop, Saeed Bishara, and possibly others.

Signed-off-by: Mark Lord <mlord@pobox.com>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: optimize IRQ coalescing for 8-port chips
Mark Lord [Wed, 11 Mar 2009 04:56:00 +0000 (00:56 -0400)] 
sata_mv: optimize IRQ coalescing for 8-port chips

Enable use of the "all ports" IRQ coalescing optimization
for GEN_II / GEN_IIE chips that have dual host-controllers (8-ports).
Currently only the 6081 chip qualifies, but other chips may come along someday.

Rather than each half of the chip having to satisfy a local set of coalescing thresholds,
use of this feature groups all ports together under a single set of thresholds.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: implement IRQ coalescing (v2)
Mark Lord [Wed, 11 Mar 2009 02:01:17 +0000 (22:01 -0400)] 
sata_mv: implement IRQ coalescing (v2)

Add IRQ coalescing to sata_mv (off by default).

This feature can reduce total interrupt overhead for RAID setups
in some situations, by deferring the interrupt signal until one or both of:

 a) a specified io_count (completed SATA commands) is achieved, or
 b) a specified time interval elapses after an IO completion.

For now, module parameters are used to set the irq_coalescing_io_count
and irq_coalescing_usecs (timeout) globally.  These may eventually
be supplemented with sysfs attributes, so that thresholds can be set
on-the-fly and on a per-chip (or even per-host_controller) basis.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: cosmetic preparations for IRQ coalescing
Mark Lord [Tue, 10 Mar 2009 22:51:04 +0000 (18:51 -0400)] 
sata_mv: cosmetic preparations for IRQ coalescing

Various cosmetic changes in preparation for the IRQ coalescing feature.

Note that the various MV_IRQ_COAL_* definitions are restored/renamed
in the folloup patch which adds IRQ coalescing to the driver.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata-rb532-cf: platform_get_irq() fix ignored failure
Florian Fainelli [Fri, 13 Mar 2009 14:41:43 +0000 (15:41 +0100)] 
pata-rb532-cf: platform_get_irq() fix ignored failure

platform_get_irq() can return -ENXIO, but since 'irq' is an
unsigned int, it does not show when the IRQ resource wasn't found.
Make irq an int so that we can use a single variable to test the
platform_get_irq() return value.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_efar: fix *dma_mask
Erik Inge Bolsø [Sat, 14 Mar 2009 22:08:20 +0000 (23:08 +0100)] 
pata_efar: fix *dma_mask

According to Alan:
>and yes the EFAR does UDMA66.

mwdma:
>Yep - wrong comment. The EFAR is a sort of clone of the PIIX and I
>copied the comment while EFAR don't appear to have copied the
>limitation

Signed-off-by: Erik Inge Bolsø <knan-lkml@anduin.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_radisys: fix mwdma_mask to exclude mwdma0
Erik Inge Bolsø [Sat, 14 Mar 2009 22:07:33 +0000 (23:07 +0100)] 
pata_radisys: fix mwdma_mask to exclude mwdma0

As noted by Alan:
>Your suspicions are correct here btw - the device can only do MWDMA1 and
>MWDMA2 (much like some PIIX devices)

Signed-off-by: Erik Inge Bolsø <knan-lkml@anduin.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] convert drivers to use ata.h mode mask defines
Erik Inge Bolsø [Sat, 14 Mar 2009 20:38:24 +0000 (21:38 +0100)] 
[libata] convert drivers to use ata.h mode mask defines

No functional changes in this patch.

Signed-off-by: Erik Inge Bolsø <knan-lkml@anduin.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>