31 Oct, 2008

40 commits

  • Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
    can be replaced with %pI4

    Signed-off-by: Harvey Harrison
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
    can be replaced with %pI4

    Signed-off-by: Harvey Harrison
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
    can be replaced with %pI4

    Signed-off-by: Harvey Harrison
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • This patch adds qdisc_peek_dequeued() wrapper to emulate peek method
    with qdisc->dequeue() and storing "peeked" skb in qdisc->gso_skb until
    dequeuing. This is mainly for compatibility reasons not to break some
    strange configs because peeking is expected for non-work-conserving
    parent qdiscs to query work-conserving child qdiscs.

    This implementation requires using qdisc_dequeue_peeked() wrapper
    instead of directly calling qdisc->dequeue() for all qdiscs ever
    querried with qdisc->ops->peek() or qdisc_peek_dequeued().

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Use qdisc->ops->peek() instead of ->dequeue() & ->requeue() pair.
    After this patch the only remaining user of qdisc->ops->requeue() is
    netem_enqueue(). Based on ideas of Herbert Xu, Patrick McHardy and
    David S. Miller.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Add qdisc->ops->peek() implementation for work-conserving qdiscs.
    With feedback from Patrick McHardy.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • With feedback from Patrick McHardy.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • From: Patrick McHardy

    Just as a demonstration how easy adding a peek operation to the
    work-conserving qdiscs actually is. It doesn't need to keep or change
    any internal state in many cases thanks to the guarantee that the
    packet will either be dequeued or, if another packet arrives, the
    upper qdisc will immediately ->peek again to reevaluate the state.

    (This is only slightly modified Patrick's patch.)

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add Qdisc_ops peek() method in order to replace requeuing.

    Based on ideas and patches of Herbert Xu, Patrick McHardy and
    David S. Miller.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • Conflicts:

    drivers/net/wireless/p54/p54common.c

    David S. Miller
     
  • I noticed that, under certain conditions, ESRCH can be leaked from the
    xfrm layer to user space through sys_connect. In particular, this seems
    to happen reliably when the kernel fails to resolve a template either
    because the AF_KEY receive buffer being used by racoon is full or
    because the SA entry we are trying to use is in XFRM_STATE_EXPIRED
    state.

    However, since this could be a transient issue it could be argued that
    EAGAIN would be more appropriate. Besides this error code is not even
    documented in the man page for sys_connect (as of man-pages 3.07).

    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: David S. Miller

    fernando@oss.ntt.co
     
  • As noticed by Saikiran Madugula, commit 7447ef63cf2dfdc444f4c72ae13f604350b2e25f
    ("loopback: Remove rest of LOOPBACK_TSO code.") got rid of
    emulate_large_send_offload() but didn't get rid of the call
    site as well.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • David S. Miller
     
  • register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
    also used (compiled in or loaded).

    Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
    The former shutdowns and frees GRE piece of netns, however the latter
    absolutely needs it to flush keymap. Oops is inevitable.

    Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
    netns ops list.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • netns ops which are registered with register_pernet_gen_device() are
    shutdown strictly before those which are registered with
    register_pernet_subsys(). Sometimes this leads to opposite (read: buggy)
    shutdown ordering between two modules.

    Add register_pernet_gen_subsys()/unregister_pernet_gen_subsys() for modules
    which aren't elite enough for entry in struct net, and which can't use
    register_pernet_gen_device(). PPTP conntracking module is such one.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • Remove excess kernel-doc function parameters from networking header
    & driver files:

    Warning(include/net/sock.h:946): Excess function parameter or struct member 'sk' description in 'sk_filter_release'
    Warning(include/linux/netdevice.h:1545): Excess function parameter or struct member 'cpu' description in 'netif_tx_lock'
    Warning(drivers/net/wan/z85230.c:712): Excess function parameter or struct member 'regs' description in 'z8530_interrupt'

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • David S. Miller
     
  • David S. Miller
     
  • Move SKB trim before we lookup the socket so we don't have to
    put it on failure.

    Based upon an initial patch by Jarek Poplawski and suggestions
    from Herbert Xu.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The link may be up already via the chip's reset strapping, or though action
    of U-Boot, or from the last time the interface was brought up. Resetting
    the link causes it to go down for several seconds. This can significantly
    increase the time from power-on to DHCP completion and a device being
    accessible to the network.

    Signed-off-by: Trent Piepho
    Acked-by: Andy Fleming
    Signed-off-by: Jeff Garzik

    Trent Piepho
     
  • The init_phy() function attaches to the PHY, then configures the
    SerDesTBI link (in SGMII mode). The TBI is on the MDIO bus with the PHY
    (sort of) and is accessed via the gianfar's MDIO registers, using the
    functions gfar_local_mdio_read/write(), which don't do any locking.

    The previously attached PHY will start a work-queue on a timer, and
    probably an irq handler as well, which will talk to the PHY and thus use
    the MDIO bus. This uses phy_read/write(), which have locking, but not
    against the gfar_local_mdio versions.

    The result is that PHY code will try to use the MDIO bus at the same time
    as the SerDes setup code, corrupting the transfers.

    Setting up the SerDes before attaching to the PHY will insure that there is
    no race between the SerDes code and *our* PHY, but doesn't fix everything.
    Typically the PHYs for all gianfar devices are on the same MDIO bus, which
    is associated with the first gianfar device. This means that the first
    gianfar's SerDes code could corrupt the MDIO transfers for a different
    gianfar's PHY.

    The lock used by phy_read/write() is contained in the mii_bus structure,
    which is pointed to by the PHY. This is difficult to access from the
    gianfar drivers, as there is no link between a gianfar device and the
    mii_bus which shares the same MDIO registers. As far as the device layer
    and drivers are concerned they are two unrelated devices (which happen to
    share registers).

    Generally all gianfar devices' PHYs will be on the bus associated with the
    first gianfar. But this might not be the case, so simply locking the
    gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
    code is going to use.

    We solve this by having the code that creates the gianfar platform device
    look in the device tree for an mdio device that shares the gianfar's
    registers. If one is found the ID of its platform device is saved in the
    gianfar's platform data.

    A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
    ID to search through the platform devices for a gianfar_mdio device with
    the right ID. The platform device's driver data is the mii_bus structure,
    which the SerDes setup code can use to lock the current bus.

    Signed-off-by: Trent Piepho
    CC: Andy Fleming
    Signed-off-by: Jeff Garzik

    Trent Piepho
     
  • Use the newly introduced pci_ioremap_bar() function in drivers/net.
    pci_ioremap_bar() just takes a pci device and a bar number, with the goal
    of making it really hard to get wrong, while also having a central place
    to stick sanity checks.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Jeff Garzik

    Arjan van de Ven
     
  • Signed-off-by: Atsushi Nemoto
    Signed-off-by: Jeff Garzik

    Atsushi Nemoto
     
  • Implement ethtool's get_flags and set_flags methods.
    It enables ethtool to control the LRO settings.

    Signed-off-by: Divy Le Ray
    Signed-off-by: Jeff Garzik

    Divy Le Ray
     
  • Adapt the e100 driver to the reworked PCI PM

    * Use the observation that it is sufficient to call pci_enable_wake()
    once, unless it fails

    Signed-off-by: Rafael J. Wysocki
    Tested-by: Jeff Kirsher
    Acked-by: Jeff Kirsher
    Cc: Jesse Barnes
    Cc: Jeff Garzik
    Cc: Frans Pop
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Rafael J. Wysocki
     
  • Signed-off-by: Adrian Bunk
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Adrian Bunk
     
  • Adapt the skge driver to the reworked PCI PM

    * Use device_set_wakeup_enable() and friends as needed
    * Remove an open-coded reference to the standard PCI PM registers
    * Use pci_prepare_to_sleep() and pci_back_from_sleep() in the
    ->suspend() and ->resume() callbacks
    * Use the observation that it is sufficient to call pci_enable_wake()
    once, unless it fails

    Tested on Asus L5D (Yukon-Lite rev 7).

    Signed-off-by: Rafael J. Wysocki
    Cc: Stephen Hemminger
    Cc: Jeff Garzik
    Cc: Jesse Barnes
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Rafael J. Wysocki
     
  • When the at91_ether driver is using a GPIO for its PHY interrupt,
    be sure to request (and later, if needed, free) that GPIO.

    Signed-off-by: David Brownell
    Signed-off-by: Jeff Garzik

    David Brownell
     
  • Acoording commit aa24886e379d2b641c5117e178b15ce1d5d366ba,
    dma_free_coherent() need irqs enabled.

    This patch fix following warning messages:

    WARNING: at linux/arch/x86/kernel/pci-dma.c:376 dma_free_coherent+0xaa/0xb0()

    Call Trace:
    [] warn_on_slowpath+0x5f/0x90
    [] ? __kfree_skb+0x3a/0xa0
    [] ? discard_slab+0x23/0x40
    [] dma_free_coherent+0xaa/0xb0
    [] amd8111e_close+0x10f/0x1b0
    [] dev_close+0x5e/0xb0
    [] dev_change_flags+0xa1/0x1e0
    [] ic_close_devs+0x36/0x4e
    [] ip_auto_config+0x581/0x10f3
    [] ? kobject_add+0x69/0x90
    [] ? kobject_get+0x1a/0x30
    [] ? kobject_uevent+0xb/0x10
    [] ? kset_register+0x52/0x60
    [] ? kset_create_and_add+0x6b/0xa0
    [] ? tcp_ca_find+0x24/0x50
    [] ? ip_auto_config+0x0/0x10f3
    [] _stext+0x3c/0x150
    [] ? register_irq_proc+0xd3/0xf0
    [] ? mb_cache_create+0x80/0x1f0
    [] kernel_init+0x141/0x1b8
    [] ? kernel_init+0x0/0x1b8
    [] child_rip+0xa/0x11
    [] ? kernel_init+0x0/0x1b8
    [] ? kernel_init+0x0/0x1b8
    [] ? child_rip+0x0/0x11

    Signed-off-by: Chunbo Luo
    Signed-off-by: Jeff Garzik

    Chunbo Luo
     
  • Commit 401c0aabec4b97320f962a0161a846d230a6f7aa introduced a regression
    in the atl1 driver by storing the VLAN tag in the wrong TX descriptor
    field.

    This patch causes the VLAN tag to be stored in its proper location.

    Tested-by: Ramon Casellas
    Signed-off-by: Jay Cliburn
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Jay Cliburn
     
  • Signed-off-by: Mike Frysinger
    Signed-off-by: Jeff Garzik

    Mike Frysinger
     
  • Use mmiowb() to ensure "stop" and "go" commands are sent in order on ia64.

    Signed-off-by: Brice Goglin
    Signed-off-by: Jeff Garzik

    Brice Goglin
     
  • A panic was discovered with bonding when using mode 5 or 6 and trying to
    remove the slaves from the bond after the interface was taken down.
    When calling 'ifconfig bond0 down' the following happens:

    bond_close()
    bond_alb_deinitialize()
    tlb_deinitialize()
    kfree(bond_info->tx_hashtbl)
    bond_info->tx_hashtbl = NULL

    Unfortunately if there are still slaves in the bond, when removing the
    module the following happens:

    bonding_exit()
    bond_free_all()
    bond_release_all()
    bond_alb_deinit_slave()
    tlb_clear_slave()
    tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl
    u32 next_index = tx_hash_table[index].next

    As you might guess we panic when trying to access a few entries into the
    table that no longer exists.

    I experimented with several options (like moving the calls to
    tlb_deinitialize somewhere else), but it really makes the most sense to
    be part of the bond_close routine. It also didn't seem logical move
    tlb_clear_slave around too much, so the simplest option seems to add a
    check in tlb_clear_slave to make sure we haven't already wiped the
    tx_hashtbl away before searching for all the non-existent hash-table
    entries that used to point to the slave as the output interface.

    Signed-off-by: Andy Gospodarek
    Signed-off-by: Jay Vosburgh
    Signed-off-by: Jeff Garzik

    Andy Gospodarek
     
  • This patch reworks the resource free logic performed at the time
    a bonding device is released. This (a) closes two resource leaks, one
    for workqueues and one for multicast lists, and (b) improves commonality
    of code between the "destroy one" and "destroy all" paths by performing
    final free activity via destructor instead of explicitly (and differently)
    in each path.

    "Sean E. Millichamp" reported the workqueue
    leak, and included a different patch.

    Signed-off-by: Jay Vosburgh
    Signed-off-by: Jeff Garzik

    Jay Vosburgh
     
  • During the rework of the mii monitor for:

    commit f0c76d61779b153dbfb955db3f144c62d02173c2
    Author: Jay Vosburgh
    Date: Wed Jul 2 18:21:58 2008 -0700

    bonding: refactor mii monitor

    I left out the increment of the link failure counter. This
    patch corrects that omission.

    Signed-off-by: Jay Vosburgh
    Signed-off-by: Jeff Garzik

    Jay Vosburgh
     
  • * 'for-linus' of git://neil.brown.name/md:
    md: destroy partitions and notify udev when md array is stopped.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    lguest: fix irq vectors.
    lguest: fix early_ioremap.
    lguest: fix example launcher compile after moved asm-x86 dir.

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: cpu_index build fix
    x86/voyager: fix missing cpu_index initialisation
    x86/voyager: fix compile breakage caused by dc1e35c6e95e8923cf1d3510438b63c600fee1e2
    x86: fix /dev/mem mmap breakage when PAT is disabled
    x86/voyager: fix compile breakage casued by x86: move prefill_possible_map calling early
    x86: use CONFIG_X86_SMP instead of CONFIG_SMP
    x86/voyager: fix boot breakage caused by x86: boot secondary cpus through initial_code
    x86, uv: fix compile error in uv_hub.h
    i386/PAE: fix pud_page()
    x86: remove debug code from arch_add_memory()
    x86: start annotating early ioremap pointers with __iomem
    x86: two trivial sparse annotations
    x86: fix init_memory_mapping for [dc000000 - e0000000) - v2

    Linus Torvalds