]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
14 years agotg3: Use pci_read_vpd() instead of private method
Matt Carlson [Thu, 3 Dec 2009 08:36:23 +0000 (08:36 +0000)]
tg3: Use pci_read_vpd() instead of private method

If the driver needs to use PCI configuration space to read the VPD data,
the accesses could collide with the pci_read_vpd() function.  This patch
converts the driver to use pci_read_vpd() to avoid any potential
collisions.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add some VPD preprocessor constants
Matt Carlson [Thu, 3 Dec 2009 08:36:22 +0000 (08:36 +0000)]
tg3: Add some VPD preprocessor constants

This patch cleans up the VPD code by creating preprocessor definitions
and using them in the place of hardcoded constants.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add 57765 asic rev
Matt Carlson [Thu, 3 Dec 2009 08:36:21 +0000 (08:36 +0000)]
tg3: Add 57765 asic rev

This patch adds the 57765 asic revision.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Make TSS enable independent of MSI-X enable
Matt Carlson [Thu, 3 Dec 2009 08:36:20 +0000 (08:36 +0000)]
tg3: Make TSS enable independent of MSI-X enable

The 57765 asic rev has MSI-X capability, but does not support TSS.  This
patch changes the tx paths so that TSS is explicitly mentioned, rather
than implied through the ENABLE_MSIX flag.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: Move && and || to end of previous line
Joe Perches [Thu, 3 Dec 2009 07:58:21 +0000 (07:58 +0000)]
drivers/net: Move && and || to end of previous line

Only files where David Miller is the primary git-signer.
wireless, wimax, ixgbe, etc are not modified.

Compile tested x86 allyesconfig only
Not all files compiled (not x86 compatible)

Added a few > 80 column lines, which I ignored.
Existing checkpatch complaints ignored.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Bump up the driver version number
Ajit Khaparde [Thu, 3 Dec 2009 06:19:08 +0000 (06:19 +0000)]
be2net: Bump up the driver version number

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopata_via: clear UDMA transfer mode bit for PIO and MWDMA
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:13 +0000 (20:32 +0100)]
pata_via: clear UDMA transfer mode bit for PIO and MWDMA

Fix register naming while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_sis: Power Management fix
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:13 +0000 (20:32 +0100)]
pata_sis: Power Management fix

Call sis_fixup() on resume.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_rz1000: Power Management fix
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:13 +0000 (20:32 +0100)]
pata_rz1000: Power Management fix

Fix ->resume method to re-enable & re-init PCI device properly
before doing chipset specific setup.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_radisys: fix UDMA handling
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:13 +0000 (20:32 +0100)]
pata_radisys: fix UDMA handling

Set correct bits to switch between UDMA2 and UDMA4.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_ns87415: Power Management fix
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:12 +0000 (20:32 +0100)]
pata_ns87415: Power Management fix

Fix ->resume method to do chipset specific setup.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_marvell: fix marvell_pre_reset() documentation
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:12 +0000 (20:32 +0100)]
pata_marvell: fix marvell_pre_reset() documentation

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_legacy: add pointers to QDI65x0 documentation
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:11 +0000 (20:32 +0100)]
pata_legacy: add pointers to QDI65x0 documentation

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_legacy: fix access to control register for QDI6580
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:11 +0000 (20:32 +0100)]
pata_legacy: fix access to control register for QDI6580

We need to mask out the port offset from the port number
cached in ld_qdi->timing.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_legacy: fix QDI6580DP support
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:11 +0000 (20:32 +0100)]
pata_legacy: fix QDI6580DP support

Dual port QDI6580 has shared PIO timings for master/slave
devices so it needs to use custom ->qc_issue method.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_it8213: fix it8213_pre_reset() documentation
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:11 +0000 (20:32 +0100)]
pata_it8213: fix it8213_pre_reset() documentation

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_it8213: fix wrong MWDMA timings being programmed
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:10 +0000 (20:32 +0100)]
pata_it8213: fix wrong MWDMA timings being programmed

Clear old MWDMA timings before programming new ones (IT8213
is a single port host so there is no need to check ap->port_no).

This change should be safe as this is how we have been doing
things in IDE it8213 host driver for years.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_it8213: fix PIO2 underclocking
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:10 +0000 (20:32 +0100)]
pata_it8213: fix PIO2 underclocking

[ port of Sergei's fixes for pata_efar from commit 5f33b3b ]

Fix the PIO mode 2 using mode 0 timings -- this driver should enable the
fast timing bank starting with PIO2, just like the PIIX/ICH drivers do.
Also, fix/rephrase some comments while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_it8213: fix wrong PIO timings being programmed
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:10 +0000 (20:32 +0100)]
pata_it8213: fix wrong PIO timings being programmed

* do not clear PIO timings for master when programming slave
* program new PIO timings in the correct register nibble

Both changes should be safe as this is how we have been doing
things in IDE it8213 host driver for years.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_it8213: fix UDMA handling
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:10 +0000 (20:32 +0100)]
pata_it8213: fix UDMA handling

Driver should program the cycle timing not the mode number
(doing the latter results in wrong timings being used).

There shouldn't be any problems with it as IDE it8213 host driver
has been doing it this way for years.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_hpt3x3: Power Management fix
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:10 +0000 (20:32 +0100)]
pata_hpt3x3: Power Management fix

Fix ->resume method to re-enable & re-init PCI device properly
before doing chipset specific setup.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_cs5520: remove dead VDMA support
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:09 +0000 (20:32 +0100)]
pata_cs5520: remove dead VDMA support

It has been dead for the last three years (== since the initial driver
merge) and probability that it will ever get fixed is quite low.

Since there is no reason to keep this dead code around any longer just
remove it (it can still be retrieved from the git history if necessary).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_efar: fix wrong MWDMA timings being programmed
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:08 +0000 (20:32 +0100)]
pata_efar: fix wrong MWDMA timings being programmed

Do not clear MWDMA timings for device on the other port when
programming slave device.

This change should be safe as this is how we have been doing
things in IDE slc90e66 host driver for years.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_efar: fix wrong PIO timings being programmed
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:08 +0000 (20:32 +0100)]
pata_efar: fix wrong PIO timings being programmed

* do not clear PIO timings for master when programming slave
* do not clear PIO timings for device on the other port when
  programming slave device

Both changes should be safe as this is how we have been doing
things in IDE slc90e66 host driver for years.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoata_piix: fix MWDMA handling on PIIX3
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:08 +0000 (20:32 +0100)]
ata_piix: fix MWDMA handling on PIIX3

Fix erroneous check for ap->udma_mask in do_pata_set_dmamode()
resulting in controller not being programmed properly for MWDMA.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agobe2net: Support for WoL using magic packet after suspend.
Ajit Khaparde [Thu, 3 Dec 2009 06:16:59 +0000 (06:16 +0000)]
be2net: Support for WoL using magic packet after suspend.

Add support for WOL using Magic Packet after suspend is done.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Changes to print fw command opcode when command is failed by controller.
Ajit Khaparde [Thu, 3 Dec 2009 06:12:06 +0000 (06:12 +0000)]
be2net: Changes to print fw command opcode when command is failed by controller.

When a firmware command fails, only the failure codes are printed.
It is difficult to co-relate this to the actual command that has failed.
These changes will now print the command code that has failed.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Batch inet_twsk_purge
Eric W. Biederman [Thu, 3 Dec 2009 02:29:09 +0000 (02:29 +0000)]
net: Batch inet_twsk_purge

This function walks the whole hashtable so there is no point in
passing it a network namespace.  Instead I purge all timewait
sockets from dead network namespaces that I find.  If the namespace
is one of the once I am trying to purge I am guaranteed no new timewait
sockets can be formed so this will get them all.  If the namespace
is one I am not acting for it might form a few more but I will
call inet_twsk_purge again and  shortly to get rid of them.  In
any even if the network namespace is dead timewait sockets are
useless.

Move the calls of inet_twsk_purge into batch_exit routines so
that if I am killing a bunch of namespaces at once I will just
call inet_twsk_purge once and save a lot of redundant unnecessary
work.

My simple 4k network namespace exit test the cleanup time dropped from
roughly 8.2s to 1.6s.  While the time spent running inet_twsk_purge fell
to about 2ms.  1ms for ipv4 and 1ms for ipv6.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Use rcu lookups in inet_twsk_purge.
Eric W. Biederman [Thu, 3 Dec 2009 02:29:08 +0000 (02:29 +0000)]
net: Use rcu lookups in inet_twsk_purge.

While we are looking up entries to free there is no reason to take
the lock in inet_twsk_purge.  We have to drop locks and restart
occassionally anyway so adding a few more in case we get on the
wrong list because of a timewait move is no big deal.  At the
same time not taking the lock for long periods of time is much
more polite to the rest of the users of the hash table.

In my test configuration of killing 4k network namespaces
this change causes 4k back to back runs of inet_twsk_purge on an
empty hash table to go from roughly 20.7s to 3.3s, and the total
time to destroy 4k network namespaces goes from roughly 44s to
3.3s.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Allow fib_rule_unregister to batch
Eric W. Biederman [Thu, 3 Dec 2009 20:22:55 +0000 (12:22 -0800)]
net: Allow fib_rule_unregister to batch

Refactor the code so fib_rules_register always takes a template instead
of the actual fib_rules_ops structure that will be used.  This is
required for network namespace support so 2 out of the 3 callers already
do this, it allows the error handling to be made common, and it allows
fib_rules_unregister to free the template for hte caller.

Modify fib_rules_unregister to use call_rcu instead of syncrhonize_rcu
to allw multiple namespaces to be cleaned up in the same rcu grace
period.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetns: Add an explicit rcu_barrier to unregister_pernet_{device|subsys}
Eric W. Biederman [Thu, 3 Dec 2009 02:29:06 +0000 (02:29 +0000)]
netns: Add an explicit rcu_barrier to unregister_pernet_{device|subsys}

This allows namespace exit methods to batch work that comes requires an
rcu barrier using call_rcu without having to treat the
unregister_pernet_operations cases specially.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Allow xfrm_user_net_exit to batch efficiently.
Eric W. Biederman [Thu, 3 Dec 2009 02:29:05 +0000 (02:29 +0000)]
net: Allow xfrm_user_net_exit to batch efficiently.

xfrm.nlsk is provided by the xfrm_user module and is access via rcu from
other parts of the xfrm code.  Add xfrm.nlsk_stash a copy of xfrm.nlsk that
will never be set to NULL.  This allows the synchronize_net and
netlink_kernel_release to be deferred until a whole batch of xfrm.nlsk sockets
have been set to NULL.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Move network device exit batching
Eric W. Biederman [Thu, 3 Dec 2009 02:29:04 +0000 (02:29 +0000)]
net: Move network device exit batching

Move network device exit batching from a special case in
net_namespace.c to using common mechanisms in dev.c

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Add support for batching network namespace cleanups
Eric W. Biederman [Thu, 3 Dec 2009 02:29:03 +0000 (02:29 +0000)]
net: Add support for batching network namespace cleanups

- Add exit_list to struct net to support building lists of network
  namespaces to cleanup.

- Add exit_batch to pernet_operations to allow running operations only
  once during a network namespace exit.  Instead of once per network
  namespace.

- Factor opt ops_exit_list and ops_exit_free so the logic with cleanup
  up a network namespace does not need to be duplicated.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4 05/05: add sysctl to accept packets with local source addresses
Patrick McHardy [Thu, 3 Dec 2009 01:25:58 +0000 (01:25 +0000)]
ipv4 05/05: add sysctl to accept packets with local source addresses

commit 8ec1e0ebe26087bfc5c0394ada5feb5758014fc8
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Dec 3 12:16:35 2009 +0100

    ipv4: add sysctl to accept packets with local source addresses

    Change fib_validate_source() to accept packets with a local source address when
    the "accept_local" sysctl is set for the incoming inet device. Combined with the
    previous patches, this allows to communicate between multiple local interfaces
    over the wire.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet 04/05: fib_rules: allow to delete local rule
Patrick McHardy [Thu, 3 Dec 2009 01:25:57 +0000 (01:25 +0000)]
net 04/05: fib_rules: allow to delete local rule

commit d124356ce314fff22a047ea334379d5105b2d834
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Dec 3 12:16:35 2009 +0100

    net: fib_rules: allow to delete local rule

    Allow to delete the local rule and recreate it with a higher priority. This
    can be used to force packets with a local destination out on the wire instead
    of routing them to loopback. Additionally this patch allows to recreate rules
    with a priority of 0.

    Combined with the previous patch to allow oif classification, a socket can
    be bound to the desired interface and packets routed to the wire like this:

    # move local rule to lower priority
    ip rule add pref 1000 lookup local
    ip rule del pref 0

    # route packets of sockets bound to eth0 to the wire independant
    # of the destination address
    ip rule add pref 100 oif eth0 lookup 100
    ip route add default dev eth0 table 100

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet 03/05: fib_rules: add oif classification
Patrick McHardy [Thu, 3 Dec 2009 01:25:56 +0000 (01:25 +0000)]
net 03/05: fib_rules: add oif classification

commit 68144d350f4f6c348659c825cde6a82b34c27a91
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Dec 3 12:05:25 2009 +0100

    net: fib_rules: add oif classification

    Support routing table lookup based on the flow's oif. This is useful to
    classify packets originating from sockets bound to interfaces differently.

    The route cache already includes the oif and needs no changes.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet 02/05: fib_rules: rename ifindex/ifname/FRA_IFNAME to iifindex/iifname/FRA_IIFNAME
Patrick McHardy [Thu, 3 Dec 2009 01:25:54 +0000 (01:25 +0000)]
net 02/05: fib_rules: rename ifindex/ifname/FRA_IFNAME to iifindex/iifname/FRA_IIFNAME

commit 229e77eec406ad68662f18e49fda8b5d366768c5
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Dec 3 12:05:23 2009 +0100

    net: fib_rules: rename ifindex/ifname/FRA_IFNAME to iifindex/iifname/FRA_IIFNAME

    The next patch will add oif classification, rename interface related members
    and attributes to reflect that they're used for iif classification.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet 01/05: fib_rules: rearrange struct fib_rule
Patrick McHardy [Thu, 3 Dec 2009 01:25:53 +0000 (01:25 +0000)]
net 01/05: fib_rules: rearrange struct fib_rule

commit b8952893d5d86f69c4e499d191b98c6658f64b0f
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Dec 3 12:05:22 2009 +0100

    net: fib_rules: rearrange struct fib_rule

    The ifname member is only used to resolve interface names and is not needed
    during rule lookups. The target and ctarget members however are used during
    rule lookups and are currently located in a second cacheline.

    Move ifname further to the end to make sure both target and ctarget are
    located in the same cacheline as other members used during rule lookups.

    The layout on 64 bit changes from:

    struct fib_rule {
     ...
            u32                        table;                /*    56     4 */
            u8                         action;               /*    60     1 */

            /* XXX 3 bytes hole, try to pack */

            /* --- cacheline 1 boundary (64 bytes) --- */
            u32                        target;               /*    64     4 */

            /* XXX 4 bytes hole, try to pack */

            struct fib_rule *          ctarget;              /*    72     8 */
            struct rcu_head            rcu;                  /*    80    16 */
            struct net *               fr_net;               /*    96     8 */
    };

    to:

    struct fib_rule {
     ...
            u32                        table;                /*    40     4 */
            u8                         action;               /*    44     1 */

            /* XXX 3 bytes hole, try to pack */

            u32                        target;               /*    48     4 */

            /* XXX 4 bytes hole, try to pack */

            struct fib_rule *          ctarget;              /*    56     8 */
            /* --- cacheline 1 boundary (64 bytes) --- */
            char                       ifname[16];           /*    64    16 */
            struct rcu_head            rcu;                  /*    80    16 */
            struct net *               fr_net;               /*    96     8 */

    };

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocfq-iosched: fix compile problem with !CONFIG_CGROUP
Jens Axboe [Thu, 3 Dec 2009 20:06:43 +0000 (21:06 +0100)]
cfq-iosched: fix compile problem with !CONFIG_CGROUP

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoARM: 5846/1: MAINTAINERS: Add arm Nomadik support
Alessandro Rubini [Wed, 2 Dec 2009 13:01:03 +0000 (14:01 +0100)]
ARM: 5846/1: MAINTAINERS: Add arm Nomadik support

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5845/1: l2x0: check whether l2x0 already enabled
Srinidhi Kasagar [Wed, 2 Dec 2009 05:18:03 +0000 (06:18 +0100)]
ARM: 5845/1: l2x0: check whether l2x0 already enabled

If running in non-secure mode accessing
some registers of l2x0 will fault. So
check if l2x0 is already enabled, if so
do not access those secure registers.

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5792/1: bcmring: clean up mach/io.h
Leo Chen [Thu, 19 Nov 2009 23:50:07 +0000 (00:50 +0100)]
ARM: 5792/1: bcmring: clean up mach/io.h

removed old macro definition for io access, using
the generic macros defined in asm/io.h

Signed-off-by: Leo Hao Chen <leochen@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agolibata: add private driver field to struct ata_device
Bartlomiej Zolnierkiewicz [Wed, 25 Nov 2009 17:12:48 +0000 (18:12 +0100)]
libata: add private driver field to struct ata_device

This brings struct ata_device in-line with struct ata_{port,host}.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: let users know that Promise PDC42819 support is limited to SATA devices
Mark Nelson [Sun, 22 Nov 2009 01:07:41 +0000 (12:07 +1100)]
ahci: let users know that Promise PDC42819 support is limited to SATA devices

ahci can drive the Promise PDC42819, but obviously it can only use SATA
disks connected to this controller. The controller can actually support
SAS disks as well, but we only know how to use it in it's AHCI mode.

Add a message to let users know that because ahci is driving their chip
they can only use the SATA disks connected to this controller.

Signed-off-by: Mark Nelson <mdnelson8@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoata: use pci_dev->revision
Sergei Shtylyov [Tue, 24 Nov 2009 18:54:49 +0000 (22:54 +0400)]
ata: use pci_dev->revision

Some places were using PCI_CLASS_REVISION instead of PCI_REVISION_ID, so
they weren't converted by commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65
(PCI: Change all drivers to use pci_device->revision).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_hpt366: fix timing register documentation
Sergei Shtylyov [Tue, 24 Nov 2009 20:17:31 +0000 (00:17 +0400)]
pata_hpt366: fix timing register documentation

The comment in the driver actually describes HPT37x's timing register layout,
which is different from HPT36x.  Fix it and reformat the comment, while at it.

Bump the driver version, accounting for several patches that forgot to do it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: add comment documenting PIO latency issues on UP
Bartlomiej Zolnierkiewicz [Thu, 26 Nov 2009 16:11:16 +0000 (17:11 +0100)]
libata: add comment documenting PIO latency issues on UP

Based on:
http://lkml.indiana.edu/hypermail/linux/kernel/0908.2/01420.html

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_hpt{37x|3x2n}: fix timing register masks (take 2)
Sergei Shtylyov [Fri, 27 Nov 2009 18:29:02 +0000 (22:29 +0400)]
pata_hpt{37x|3x2n}: fix timing register masks (take 2)

These drivers inherited from the older 'hpt366' IDE driver the buggy timing
register masks in their set_piomode() metods. As a result, too low command
cycle active time is programmed for slow PIO modes.  Quite fortunately, it's
later "fixed up" by the set_dmamode() methods which also "helpfully" reprogram
the command timings, usually to PIO mode 4; unfortunately, setting an UltraDMA
mode #N also reprograms already set PIO data timings, usually to MWDMA mode #
max(N, 2) timings...

However, the drivers added some breakage of their own too:  the bit that they
set/clear to control the FIFO is sometimes wrong -- it's actually the MSB of
the command cycle setup time; also, setting it in DMA mode is wrong as this
bit is only for PIO actually and clearing it for PIO modes is not needed as
no mode in any timing table has it set...

Fix all this, inverting the masks while at it, like in the 'hpt366' and
'pata_hpt366' drivers; bump the drivers' versions, accounting for recent
patches that forgot to do it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_piccolo: Driver for old Toshiba chipsets
Alan Cox [Mon, 30 Nov 2009 13:23:11 +0000 (13:23 +0000)]
pata_piccolo: Driver for old Toshiba chipsets

We were never able to get docs for this out of Toshiba for years. Dave
Barnes produced a NetBSD driver however and from that we can fill in the
needed tables.

As we correct the PCI identifiers a bit also update the old ide generic driver
at the same time so it stays compiling.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'perf/probes' into perf/core
Ingo Molnar [Thu, 3 Dec 2009 19:11:37 +0000 (20:11 +0100)]
Merge branch 'perf/probes' into perf/core

Merge reason: add these fixes to 'perf probe'.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'perf/mce' into perf/core
Ingo Molnar [Thu, 3 Dec 2009 19:10:59 +0000 (20:10 +0100)]
Merge branch 'perf/mce' into perf/core

Merge reason: It's ready for v2.6.33.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'perf/scripting' into perf/core
Ingo Molnar [Thu, 3 Dec 2009 19:10:35 +0000 (20:10 +0100)]
Merge branch 'perf/scripting' into perf/core

Merge reason: it's ready for v2.6.33.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoBluetooth: Declare MODULE_FIRMWARE for Marvell SDIO driver
Ben Hutchings [Sat, 7 Nov 2009 21:41:18 +0000 (21:41 +0000)]
Bluetooth: Declare MODULE_FIRMWARE for Marvell SDIO driver

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Add RFCOMM option to use L2CAP ERTM mode
Marcel Holtmann [Mon, 5 Oct 2009 10:23:48 +0000 (12:23 +0200)]
Bluetooth: Add RFCOMM option to use L2CAP ERTM mode

By default the RFCOMM layer would still use L2CAP basic mode. For testing
purposes this option enables RFCOMM to select enhanced retransmission
mode.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Add L2CAP option for max transmit value
Marcel Holtmann [Mon, 5 Oct 2009 09:35:43 +0000 (11:35 +0200)]
Bluetooth: Add L2CAP option for max transmit value

For testing purposes it is important to modify the max transmit value.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Enable auto sleep mode for btmrvl driver
Amitkumar Karwar [Wed, 30 Sep 2009 18:18:30 +0000 (11:18 -0700)]
Bluetooth: Enable auto sleep mode for btmrvl driver

The auto sleep mode for btmrvl driver is not enabled by default.
This patch enables auto sleep mode when card is probed.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix 'SendRRorRNR' to send the ReqSeq value
Gustavo F. Padovan [Sat, 3 Oct 2009 05:34:40 +0000 (02:34 -0300)]
Bluetooth: Fix 'SendRRorRNR' to send the ReqSeq value

SendRRorRNR needs to acknowledge received I-frames (actually every packet
needs to acknowledge received I-frames by sending the proper packet
sequence number), so ReqSeq is set to the next I-frame number sequence to
be pulled by the reassembly function.
SendRRorRNR tells the remote side about local busy conditions, it sends
a Receiver Ready frame if local busy is false or a Receiver Not Ready
if local busy is true.
ReqSeq is the packet's field to send the number of the acknowledged
packets.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Implement RejActioned flag
Gustavo F. Padovan [Sat, 3 Oct 2009 05:34:39 +0000 (02:34 -0300)]
Bluetooth: Implement RejActioned flag

RejActioned is used to prevent retransmission when a entity is on the
WAIT_F state, i.e., waiting for a frame with F-bit set due local busy
condition or a expired retransmission timer. (When these two events raise
they send a frame with the Poll bit set and enters in the WAIT_F state to
wait for a frame with the Final bit set.)
The local entity doesn't send I-frames(the data frames) until the receipt
of a frame with F-bit set. When that happens it also set RejActioned to false.
RejActioned is a mandatory feature of ERTM spec.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix sending ReqSeq on I-frames
Gustavo F. Padovan [Sat, 3 Oct 2009 05:34:38 +0000 (02:34 -0300)]
Bluetooth: Fix sending ReqSeq on I-frames

As specified by ERTM spec an ERTM channel can acknowledge received
I-frames(the data frames) by sending an I-frame with the proper ReqSeq
value (i.e. ReqSeq is set to BufferSeq).  Until now we aren't setting the
ReqSeq value on I-frame control bits. That way we can save sending
S-frames(Supervise frames) only to acknowledge receipt of I-frames. It
is very helpful to the full-duplex channel.
ReqSeq is the packet sequence number sent in an acknowledgement frame to
acknowledge receipt of frames up to (ReqSeq - 1).
BufferSeq controls the receiver buffer, it is used to delay
acknowledgement of new frames to not cause buffer overflow. BufferSeq
value is not increased until frames are pulled by reassembly function.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix unset of SrejActioned flag
Gustavo F. Padovan [Sat, 3 Oct 2009 05:34:37 +0000 (02:34 -0300)]
Bluetooth: Fix unset of SrejActioned flag

SrejActioned  is a flag that when set prevents local side to retransmit a
I-frame(the data frame) already retransmitted. The local entity can
retransmit again only when it receives a SREJ frame with the F-bit set.
SREJ frame - Selective Reject frame  - is sent when an entity wants the
retransmission of a specific I-frame that was lost or corrupted.
This bug can put ERTM in an unknown state once the entity can't
retransmit.
A frame with the Final bit set is expected when the local side sends a
frame with the Poll bit set due to a local busy condition or a
retransmission timer expired. (Receipt of P-bit shall always be replied by
a frame with the F-bit set).
pi->conn_state keeps informations about many ERTM flags including
SrejActioned.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Initialize variables and timers for both channel's sides
Gustavo F. Padovan [Sat, 3 Oct 2009 05:34:36 +0000 (02:34 -0300)]
Bluetooth: Initialize variables and timers for both channel's sides

Fix ERTM's full-duplex channel to work as specified by ERTM spec. ERTM
needs to handle state vars, timers and counters to send and receive
I-frames(the data frames), i.e., for both sides of data communication.
We initialize all of them to the default values here.
Full-duplex channel is a mandatory feature of ERTM spec.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix handling of BNEP setup connection requests
Vikram Kandukuri [Thu, 3 Dec 2009 09:42:51 +0000 (15:12 +0530)]
Bluetooth: Fix handling of BNEP setup connection requests

According to BNEP test specification the proper response should be sent
for a setup connection request message after the BNEP connection setup
has been completed.

Signed-off-by: Vikram Kandukuri <vikram.kandukuri@atheros.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Unobfuscate tasklet_schedule usage
Marcel Holtmann [Wed, 18 Nov 2009 00:02:54 +0000 (01:02 +0100)]
Bluetooth: Unobfuscate tasklet_schedule usage

The tasklet schedule function helpers are just an obfuscation. So remove
them and call the schedule functions directly.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Turn hci_recv_frame into an exported function
Marcel Holtmann [Tue, 17 Nov 2009 23:40:39 +0000 (00:40 +0100)]
Bluetooth: Turn hci_recv_frame into an exported function

For future simplification it is important that the hci_recv_frame
function is no longer an inline function. So move it into the module
itself and export it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Return ENETDOWN when interface is down
Marcel Holtmann [Wed, 18 Nov 2009 00:05:00 +0000 (01:05 +0100)]
Bluetooth: Return ENETDOWN when interface is down

Sending commands to a down interface results in a timeout while clearly
it should just return ENETDOWN. When using the ioctls this works fine,
but not when using the HCI sockets sendmsg interface.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Implement raw output support for HIDP layer
Jiri Kosina [Thu, 26 Nov 2009 15:20:56 +0000 (16:20 +0100)]
Bluetooth: Implement raw output support for HIDP layer

Implement raw output callback which is used by hidraw to send raw data to
the underlying device.

Without this patch, the userspace hidraw-based applications can't send
output reports to HID Bluetooth devices.

Reported-and-tested-by: Brian Gunn <bgunn@solekai.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix miscdev ops owner for virtual driver
Marcel Holtmann [Thu, 3 Dec 2009 17:07:28 +0000 (18:07 +0100)]
Bluetooth: Fix miscdev ops owner for virtual driver

The /dev/vhci ops don't refer to the module and so it is possible to
unload the module while the file descriptor is in use. This was an
accidental removal after the cleanup.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Remove unused global minor variable
Marcel Holtmann [Thu, 3 Dec 2009 17:05:16 +0000 (18:05 +0100)]
Bluetooth: Remove unused global minor variable

After the removal of the module parameter for setting the minor number,
this variable became unused. So just remove it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Remove stub ioctl in hci_vhci
Thomas Gleixner [Thu, 15 Oct 2009 20:28:53 +0000 (20:28 +0000)]
Bluetooth: Remove stub ioctl in hci_vhci

Remove the empty ioctl which just returns -EINVAL. vfs_ioctl() will
return -ENOTTY instead, but I doubt that any application will notice
the difference :)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Removal of unused variable in btmrvl driver
Rahul Tank [Tue, 29 Sep 2009 02:43:35 +0000 (19:43 -0700)]
Bluetooth: Removal of unused variable in btmrvl driver

This patch removes unused variable "drvdbg" from btmrvl_debugfs_data
structure.

Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoblkio: Documentation
Vivek Goyal [Thu, 3 Dec 2009 17:59:57 +0000 (12:59 -0500)]
blkio: Documentation

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Wait on sync-noidle queue even if rq_noidle = 1
Vivek Goyal [Thu, 3 Dec 2009 17:59:56 +0000 (12:59 -0500)]
blkio: Wait on sync-noidle queue even if rq_noidle = 1

o rq_noidle() is supposed to tell cfq that do not expect a request after this
  one, hence don't idle. But this does not seem to work very well. For example
  for direct random readers, rq_noidle = 1 but there is next request coming
  after this. Not idling, leads to a group not getting its share even if
  group_isolation=1.

o The right solution for this issue is to scan the higher layers and set
  right flag (WRITE_SYNC or WRITE_ODIRECT). For the time being, this single
  line fix helps. This should not have any significant impact when we are
  not using cgroups. I will later figure out IO paths in higher layer and
  fix it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Implement group_isolation tunable
Vivek Goyal [Thu, 3 Dec 2009 17:59:55 +0000 (12:59 -0500)]
blkio: Implement group_isolation tunable

o If a group is running only a random reader, then it will not have enough
  traffic to keep disk busy and we will reduce overall throughput. This
  should result in better latencies for random reader though. If we don't
  idle on random reader service tree, then this random reader will experience
  large latencies if there are other groups present in system with sequential
  readers running in these.

o One solution suggested by corrado is that by default keep the random readers
  or sync-noidle workload in root group so that during one dispatch round
  we idle only once on sync-noidle tree. This means that all the sync-idle
  workload queues will be in their respective group and we will see service
  differentiation in those but not on sync-noidle workload.

o Provide a tunable group_isolation. If set, this will make sure that even
  sync-noidle queues go in their respective group and we wait on these. This
  provides stronger isolation between groups but at the expense of throughput
  if group does not have enough traffic to keep the disk busy.

o By default group_isolation = 0

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Determine async workload length based on total number of queues
Vivek Goyal [Thu, 3 Dec 2009 17:59:54 +0000 (12:59 -0500)]
blkio: Determine async workload length based on total number of queues

o Async queues are not per group. Instead these are system wide and maintained
  in root group. Hence their workload slice length should be calculated
  based on total number of queues in the system and not just queues in the
  root group.

o As root group's default weight is 1000, make sure to charge async queue
  more in terms of vtime so that it does not get more time on disk because
  root group has higher weight.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Wait for cfq queue to get backlogged if group is empty
Vivek Goyal [Thu, 3 Dec 2009 17:59:53 +0000 (12:59 -0500)]
blkio: Wait for cfq queue to get backlogged if group is empty

o If a queue consumes its slice and then gets deleted from service tree, its
  associated group will also get deleted from service tree if this was the
  only queue in the group. That will make group loose its share.

o For the queues on which we have idling on and if these have used their
  slice, wait a bit for these queues to get backlogged again and then
  expire these queues so that group does not loose its share.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Propagate cgroup weight updation to cfq groups
Vivek Goyal [Thu, 3 Dec 2009 17:59:52 +0000 (12:59 -0500)]
blkio: Propagate cgroup weight updation to cfq groups

o Propagate blkio cgroup weight updation to associated cfq groups.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Drop the reference to queue once the task changes cgroup
Vivek Goyal [Thu, 3 Dec 2009 17:59:51 +0000 (12:59 -0500)]
blkio: Drop the reference to queue once the task changes cgroup

o If a task changes cgroup, drop reference to the cfqq associated with io
  context and set cfqq pointer stored in ioc to NULL so that upon next request
  arrival we will allocate a  new queue in new group.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Provide some isolation between groups
Vivek Goyal [Thu, 3 Dec 2009 17:59:50 +0000 (12:59 -0500)]
blkio: Provide some isolation between groups

o Do not allow following three operations across groups for isolation.
- selection of co-operating queues
- preemtpions across groups
- request merging across groups.

o Async queues are currently global and not per group. Allow preemption of
  an async queue if a sync queue in other group gets backlogged.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Export disk time and sectors used by a group to user space
Vivek Goyal [Thu, 3 Dec 2009 17:59:49 +0000 (12:59 -0500)]
blkio: Export disk time and sectors used by a group to user space

o Export disk time and sector used by a group to user space through cgroup
  interface.

o Also export a "dequeue" interface to cgroup which keeps track of how many
  a times a group was deleted from service tree. Helps in debugging.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Some debugging aids for CFQ
Vivek Goyal [Thu, 3 Dec 2009 17:59:48 +0000 (12:59 -0500)]
blkio: Some debugging aids for CFQ

o Some debugging aids for CFQ.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Take care of cgroup deletion and cfq group reference counting
Vivek Goyal [Thu, 3 Dec 2009 17:59:47 +0000 (12:59 -0500)]
blkio: Take care of cgroup deletion and cfq group reference counting

o One can choose to change elevator or delete a cgroup. Implement group
  reference counting so that both elevator exit and cgroup deletion can
  take place gracefully.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Nauman Rafique <nauman@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Dynamic cfq group creation based on cgroup tasks belongs to
Vivek Goyal [Thu, 3 Dec 2009 17:59:46 +0000 (12:59 -0500)]
blkio: Dynamic cfq group creation based on cgroup tasks belongs to

o Determine the cgroup IO submitting task belongs to and create the cfq
  group if it does not exist already.

o Also link cfqq and associated cfq group.

o Currently all async IO is mapped to root group.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Group time used accounting and workload context save restore
Vivek Goyal [Thu, 3 Dec 2009 17:59:45 +0000 (12:59 -0500)]
blkio: Group time used accounting and workload context save restore

o This patch introduces the functionality to do the accounting of group time
  when a queue expires. This time used decides which is the group to go
  next.

o Also introduce the functionlity to save and restore the workload type
  context with-in group. It might happen that once we expire the cfq queue
  and group, a different group will schedule in and we will lose the context
  of the workload type. Hence save and restore it upon queue expiry.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Implement per cfq group latency target and busy queue avg
Vivek Goyal [Thu, 3 Dec 2009 17:59:44 +0000 (12:59 -0500)]
blkio: Implement per cfq group latency target and busy queue avg

o So far we had 300ms soft target latency system wide. Now with the
  introduction of cfq groups, divide that latency by number of groups so
  that one can come up with group target latency which will be helpful
  in determining the workload slice with-in group and also the dynamic
  slice length of the cfq queue.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Introduce per cfq group weights and vdisktime calculations
Vivek Goyal [Thu, 3 Dec 2009 17:59:43 +0000 (12:59 -0500)]
blkio: Introduce per cfq group weights and vdisktime calculations

o Bring in the per cfq group weight and how vdisktime is calculated for the
  group. Also bring in the functionality of updating the min_vdisktime of
  the group service tree.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Introduce blkio controller cgroup interface
Vivek Goyal [Thu, 3 Dec 2009 17:59:42 +0000 (12:59 -0500)]
blkio: Introduce blkio controller cgroup interface

o This is basic implementation of blkio controller cgroup interface. This is
  the common interface visible to user space and should be used by different
  IO control policies as we implement those.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Introduce the root service tree for cfq groups
Vivek Goyal [Thu, 3 Dec 2009 17:59:41 +0000 (12:59 -0500)]
blkio: Introduce the root service tree for cfq groups

o So far we just had one cfq_group in cfq_data. To create space for more than
  one cfq_group, we need to have a service tree of groups where all the groups
  can be queued if they have active cfq queues backlogged in these.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Keep queue on service tree until we expire it
Vivek Goyal [Thu, 3 Dec 2009 17:59:40 +0000 (12:59 -0500)]
blkio: Keep queue on service tree until we expire it

o Currently cfqq deletes a queue from service tree if it is empty (even if
  we might idle on the queue). This patch keeps the queue on service tree
  hence associated group remains on the service tree until we decide that
  we are not going to idle on the queue and expire it.

o This just helps in time accounting for queue/group and in implementation
  of rest of the patches.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Implement macro to traverse each service tree in group
Vivek Goyal [Thu, 3 Dec 2009 17:59:39 +0000 (12:59 -0500)]
blkio: Implement macro to traverse each service tree in group

o Implement a macro to traverse each service tree in the group. This avoids
  usage of double for loop and special condition for idle tree 4 times.

o Macro is little twisted because of special handling of idle class service
  tree.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Introduce the notion of cfq groups
Vivek Goyal [Thu, 3 Dec 2009 17:59:38 +0000 (12:59 -0500)]
blkio: Introduce the notion of cfq groups

o This patch introduce the notion of cfq groups. Soon we will can have multiple
  groups of different weights in the system.

o Various service trees (prioclass and workload type trees), will become per
  cfq group. So hierarchy looks as follows.

cfq_groups
   |
workload type
   |
        cfq queue

o When an scheduling decision has to be taken, first we select the cfq group
  then workload with-in the group and then cfq queue with-in the workload
  type.

o This patch just makes various workload service tree per cfq group and
  introduce the function to be able to choose a group for scheduling.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkio: Set must_dispatch only if we decided to not dispatch the request
Vivek Goyal [Thu, 3 Dec 2009 17:59:37 +0000 (12:59 -0500)]
blkio: Set must_dispatch only if we decided to not dispatch the request

o must_dispatch flag should be set only if we decided not to run the queue
  and dispatch the request.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agosnd-fm801: autodetect SF64-PCR (tuner-only) card
Ondrej Zary [Fri, 27 Nov 2009 17:18:33 +0000 (18:18 +0100)]
snd-fm801: autodetect SF64-PCR (tuner-only) card

When primary AC97 is not found, don't fail with tons of AC97 errors.
Assume that the card is SF64-PCR (tuner-only).
This makes the SF64-PCR radio card work "out of the box".

Also fixes a bug that can cause an oops here:
        if (tea575x_tuner > 0 && (tea575x_tuner & 0x000f) < 4) {
when tea575x_tuner == 16, it passes this check and causes problems
a couple lines below:
        chip->tea.ops = &snd_fm801_tea_ops[(tea575x_tuner & 0x000f) - 1];

Tested with SF64-PCR, but I don't have any of those sound or sound+radio cards
to test if I didn't break anything.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: tea575x-tuner: fix mute
Ondrej Zary [Fri, 27 Nov 2009 17:19:28 +0000 (18:19 +0100)]
ALSA: tea575x-tuner: fix mute

Fix mute state reporting in tea575x-tuner.
This fixes mute function in kradio on SF64-PCR radio card.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agodrbd_req.c: use part_[inc|dec]_in_flight()
Philipp Reisner [Wed, 18 Nov 2009 14:52:51 +0000 (15:52 +0100)]
drbd_req.c: use part_[inc|dec]_in_flight()

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
14 years agox86, apic: Enable lapic nmi watchdog on AMD Family 11h
Mikael Pettersson [Thu, 3 Dec 2009 14:52:44 +0000 (15:52 +0100)]
x86, apic: Enable lapic nmi watchdog on AMD Family 11h

The x86 lapic nmi watchdog does not recognize AMD Family 11h,
resulting in:

  NMI watchdog: CPU not supported

As far as I can see from available documentation (the BKDM),
family 11h looks identical to family 10h as far as the PMU
is concerned.

Extending the check to accept family 11h results in:

  Testing NMI watchdog ... OK.

I've been running with this change on a Turion X2 Ultra ZM-82
laptop for a couple of weeks now without problems.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: <stable@kernel.org>
LKML-Reference: <19223.53436.931768.278021@pilspetsen.it.uu.se>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agowriteback: remove unused nonblocking and congestion checks
Wu Fengguang [Thu, 3 Dec 2009 12:54:25 +0000 (13:54 +0100)]
writeback: remove unused nonblocking and congestion checks

- no one is calling wb_writeback and write_cache_pages with
  wbc.nonblocking=1 any more
- lumpy pageout will want to do nonblocking writeback without the
  congestion wait

So remove the congestion checks as suggested by Chris.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alex Elder <aelder@sgi.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: introduce wbc.for_background
Wu Fengguang [Thu, 3 Dec 2009 12:54:25 +0000 (13:54 +0100)]
writeback: introduce wbc.for_background

It will lower the flush priority for NFS, and maybe more in future.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: remove the always false bdi_cap_writeback_dirty() test
Wu Fengguang [Thu, 3 Dec 2009 12:54:25 +0000 (13:54 +0100)]
writeback: remove the always false bdi_cap_writeback_dirty() test

This is dead code because no bdi flush thread will be started for
!bdi_cap_writeback_dirty bdi.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoflusher: Fix PF_FROZEN race
OGAWA Hirofumi [Thu, 3 Dec 2009 12:49:43 +0000 (13:49 +0100)]
flusher: Fix PF_FROZEN race

To touch task->flags directly is racy. thaw_process() still has race
(changing non_current->flags, but this is another issue) though, I think
it's much better off.

So, use thaw_process() instead.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>