08 Jul, 2008

3 commits


07 Jul, 2008

1 commit


06 Jul, 2008

3 commits


04 Jul, 2008

27 commits

  • Only a few ISA controllers need the pausing version of the 8390 core
    while PCMCIA, later ISA and PCI do not. More importantly the ISA delays
    can break non ISA boxes so we must use a different build of 8390.c for
    the two sets of controllers.

    No changes since last time as all the points of concerns raised proved to
    be invalid

    Signed-off-by: Alan Cox
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Remove no longer needed struct pvc_desc in FR code.
    Requires "WAN: convert drivers to use built-in netdev_stats" patch.

    Signed-off-by: Krzysztof Hałasa
    Signed-off-by: Jeff Garzik

    Krzysztof Halasa
     
  • There is no point in using separate net_device_stats structs when
    the one in struct net_device is present. Compiles.

    Signed-off-by: Krzysztof Hałasa
    Signed-off-by: Jeff Garzik

    Krzysztof Halasa
     
  • Update the NAPI implementation to use the new napi_struct infrstructure.
    This removes the need of multiple net_device structs to implement a
    multiqueue NAPI.

    Signed-off-by: PJ Waskiewicz
    Signed-off-by: Jeff Kirsher
    Signed-off-by: Jeff Garzik

    PJ Waskiewicz
     
  • This patch resolves an issue seen on 82575 adapters with managability
    pass-thru enabled, which could cause the system to panic.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: Jeff Garzik

    Alexander Duyck
     
  • Various cosmetic cleanups. Comment fixes. Eliminate the hw part out
    of the hw_dbg macro since it's always used.

    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Kirsher
    Signed-off-by: Jeff Garzik

    Auke Kok
     
  • Currently there are items in the driver to support parameters, but there
    are no parameters being added to the driver.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: Jeff Garzik

    Alexander Duyck
     
  • Function header comments do not match function name.

    Signed-off-by: Jeff Kirsher
    Signed-off-by: Jeff Garzik

    Jeff Kirsher
     
  • Simplify a bunch of calls to these functions by moving the adapter
    struct out of the function arguments since that is not needed.

    Signed-off-by: Mitch Williams
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Mitch Williams
     
  • EEPROM access beyond the base eeprom page is unsupported.

    Signed-off-by: Jeff Kirsher
    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Jeff Kirsher
     
  • Make jumbo frame support configurable via ifconfig mtu option as suggested by
    Stephen Hemminger.

    Cc: Stephen Hemminger
    Tested-by: Andrew Savchenko
    Signed-off-by: Pekka Enberg
    Signed-off-by: Jeff Garzik

    Pekka Enberg
     
  • Add a ->max_rxframe member to struct ipg_nic_private and convert the users of
    IPG_MAX_RXFRAME_SIZE to use it instead to enable per-device jumbo frame
    configuration.

    Tested-by: Andrew Savchenko
    Signed-off-by: Pekka Enberg
    Signed-off-by: Jeff Garzik

    Pekka Enberg
     
  • Add a ->max_rxframe member to struct ipg_nic_private and convert the users of
    IPG_RXSUPPORT_SIZE to use it instead to enable per-device jumbo frame
    configuration.

    Tested-by: Andrew Savchenko
    Signed-off-by: Pekka Enberg
    Signed-off-by: Jeff Garzik

    Pekka Enberg
     
  • Add a ->max_rxframe member to struct ipg_nic_private and convert the users of
    IPG_RXFRAG_SIZE to use it instead to enable per-device jumbo frame
    configuration.

    Tested-by: Andrew Savchenko
    Signed-off-by: Pekka Enberg
    Signed-off-by: Jeff Garzik

    Pekka Enberg
     
  • Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we
    can make IPG_TXFRAG_SIZE configurable.

    Tested-by: Andrew Savchenko
    Signed-off-by: Pekka Enberg
    Signed-off-by: Jeff Garzik

    Pekka Enberg
     
  • Add a ->is_jumbo boolean to struct ipg_nic_private and fix up
    ipg_interrupt_handler() to call the jumbo frame version of ipg_nic_rx() if the
    boolean is set to true. Also remove the JUMBO_FRAME #ifdefs so we can always
    compile in support for jumbo frames.

    Tested-by: Andrew Savchenko
    Signed-off-by: Pekka Enberg
    Signed-off-by: Jeff Garzik

    Pekka Enberg
     
  • …u/netdev-2.6 into upstream-next

    Jeff Garzik
     
  • The restart() function is called when the link state changes and resets
    multicast and promiscuous settings. This patch restores those settings at the
    end of restart().

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Jeff Garzik

    Laurent Pinchart
     
  • Short packets has to be discarded by the driver. So this patch addresses the
    issue of discarding the short packets of size lesser then ethernet header
    size.

    Signed-off-by: Sathya Narayanan
    Signed-off-by: Stefan Roese
    Signed-off-by: Jeff Garzik

    Sathya Narayanan
     
  • The descriptor pointers were not initialized to NIL values, so it was
    poiniting to some random addresses which was completely invalid. This
    fix takes care of initializing the descriptor to NIL values and clearing
    the valid descriptors on clean ring operation.

    Signed-off-by: Sathya Narayanan
    Signed-off-by: Stefan Roese
    Signed-off-by: Jeff Garzik

    Sathya Narayanan
     
  • iph->tot_len is stored in network byte order, so access it using
    ntohs(). This doesn't have any real world impact on pasemi_mac, since
    the device only exists as part of a big-endian system-on-chip, but
    fixing this gets rid of a sparse warning and avoids having a bad example
    in the tree.

    Signed-off-by: Roland Dreier
    Signed-off-by: Jeff Garzik

    Roland Dreier
     
  • iph->tot_len is stored in network byte order, so access it using
    ntohs(). This doesn't have any real world impact on ehea, since ehea
    only exists for big-endian platfroms (at the moment at least) but fixing
    this gets rid of a sparse warning and avoids having a bad example in the
    tree.

    Signed-off-by: Roland Dreier
    Signed-off-by: Jeff Garzik

    Roland Dreier
     
  • When ehea_stop is called the function
    cancel_work_sync(&port->reset_task) is used to ensure
    that the reset task is not running anymore. We need an
    additional flag to ensure that it can not be scheduled
    after this call again for a certain time.

    Signed-off-by: Jan-Bernd Themann
    Signed-off-by: Jeff Garzik

    Jan-Bernd Themann
     
  • Required to allow distros to easily detect when ehea
    module needs to be loaded

    Signed-off-by: Jan-Bernd Themann
    Signed-off-by: Jeff Garzik

    Jan-Bernd Themann
     
  • A mutex has to be replaced by spinlocks as it can be called from
    a context which does not allow sleeping.
    The kzalloc flag GFP_KERNEL has to be replaced by GFP_ATOMIC
    for the same reason.

    Signed-off-by: Jan-Bernd Themann
    Signed-off-by: Jeff Garzik

    Jan-Bernd Themann
     
  • After enabling CONFIG_LOCKDEP and CONFIG_PROVE_LOCKING I get the
    following warning when ethtool -s is first called on one of the
    forcedeth ports:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.26-rc4 #28
    ---------------------------------
    inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
    ethtool/1985 [HC0[0]:SC0[1]:HE1:SE0] takes:
    (&np->lock){++..}, at: [] nv_set_settings+0xc8/0x3de [forcedeth]
    {in-hardirq-W} state was registered at:
    [] 0xffffffffffffffff
    irq event stamp: 3606
    hardirqs last enabled at (3605): [] _spin_unlock_irqrestore+0x3f/0x68
    hardirqs last disabled at (3604): [] _spin_lock_irqsave+0x13/0x46
    softirqs last enabled at (3534): [] __do_softirq+0xbc/0xc5
    softirqs last disabled at (3606): [] _spin_lock_bh+0x11/0x41

    other info that might help us debug this:
    2 locks held by ethtool/1985:
    #0: (rtnl_mutex){--..}, at: [] rtnl_lock+0x12/0x14
    #1: (_xmit_ETHER){-+..}, at: [] nv_set_settings+0xb3/0x3de [forcedeth]
    stack backtrace:
    Pid: 1985, comm: ethtool Not tainted 2.6.26-rc4 #28
    Call Trace:
    [] print_usage_bug+0x162/0x173
    [] mark_lock+0x231/0x41f
    [] __lock_acquire+0x4e7/0xcac
    [] ? trace_hardirqs_on+0xf1/0x115
    [] ? disable_irq_nosync+0x6f/0x7b
    [] lock_acquire+0x55/0x6e
    [] ? :forcedeth:nv_set_settings+0xc8/0x3de
    [] _spin_lock+0x2f/0x3c
    [] :forcedeth:nv_set_settings+0xc8/0x3de
    [] dev_ethtool+0x186/0xea3
    [] ? mutex_lock_nested+0x243/0x275
    [] ? debug_mutex_free_waiter+0x46/0x4a
    [] ? mutex_lock_nested+0x266/0x275
    [] dev_ioctl+0x4eb/0x600
    [] ? _spin_unlock_irqrestore+0x3f/0x68
    [] sock_ioctl+0x1f5/0x202
    [] vfs_ioctl+0x2a/0x77
    [] do_vfs_ioctl+0x25b/0x270
    [] ? trace_hardirqs_on_thunk+0x35/0x3a
    [] sys_ioctl+0x42/0x65
    [] system_call_after_swapgs+0x7b/0x80

    This is caused by the following snippet in nv_set_settings:

    netif_carrier_off(dev);
    if (netif_running(dev)) {
    nv_disable_irq(dev);
    netif_tx_lock_bh(dev);
    spin_lock(&np->lock);
    /* stop engines */
    nv_stop_rxtx(dev);
    spin_unlock(&np->lock);
    netif_tx_unlock_bh(dev);
    }

    Because of nv_disable_irq this is probably not really a problem
    though (I guess) and replacing the spin_lock with spin_lock_irqsave
    could keep interrupts disabled for a longer period of time because
    of delays in nv_stop_rx and nv_stop_tx.

    Signed-off-by: Tobias Diedrich
    Cc: Ayaz Abdulla
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Tobias Diedrich
     
  • Commit 4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0 ([ETH]: Make
    eth_type_trans set skb->dev like the other *_type_trans) removed
    skb->dev assignment from hdlc_fr.c:fr_rx(). Unfortunately it was also
    needed for cases other than eth_type_trans().

    Adding it back.

    It's quite serious and may be a security risk as it causes a wrong
    input interface indication (the physical hdlcX instead of logical
    pvcX). Probably -stable class fix.

    Signed-off-by: Krzysztof Halasa
    Signed-off-by: Jeff Garzik

    Krzysztof Halasa
     

03 Jul, 2008

6 commits

  • Add a IFF_VNET_HDR flag. This uses the same ABI as virtio_net
    (ie. prepending struct virtio_net_hdr to packets) to indicate GSO and
    checksum information.

    Signed-off-by: Rusty Russell
    Acked-by: Max Krasnyansky
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • ethtool is useful for setting (some) device fields, but it's
    root-only. Finer feature control is available through a tun-specific
    ioctl.

    (Includes Mark McLoughlin 's fix to hold rtnl sem).

    Signed-off-by: Rusty Russell
    Acked-by: Max Krasnyansky
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • The problem with introducing checksum offload and gso to tun is they
    need to set dev->features to enable GSO and/or checksumming, which is
    supposed to be done before register_netdevice(), ie. as part of
    TUNSETIFF.

    Unfortunately, TUNSETIFF has always just ignored flags it doesn't
    understand, so there's no good way of detecting whether the kernel
    supports new IFF_ flags.

    This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF
    flags. It could be extended later to include other features.

    Here's an example program which uses it:

    #include
    #include
    #include
    #include
    #include
    #include
    #include

    static struct {
    unsigned int flag;
    const char *name;
    } known_flags[] = {
    { IFF_TUN, "TUN" },
    { IFF_TAP, "TAP" },
    { IFF_NO_PI, "NO_PI" },
    { IFF_ONE_QUEUE, "ONE_QUEUE" },
    };

    int main()
    {
    unsigned int features, i;

    int netfd = open("/dev/net/tun", O_RDWR);
    if (netfd < 0)
    err(1, "Opening /dev/net/tun");

    if (ioctl(netfd, TUNGETFEATURES, &features) != 0) {
    printf("Kernel does not support TUNGETFEATURES, guessing\n");
    features = (IFF_TUN|IFF_TAP|IFF_NO_PI|IFF_ONE_QUEUE);
    }
    printf("Available features are: ");
    for (i = 0; i < sizeof(known_flags)/sizeof(known_flags[0]); i++) {
    if (features & known_flags[i].flag) {
    features &= ~known_flags[i].flag;
    printf("%s ", known_flags[i].name);
    }
    }
    if (features)
    printf("(UNKNOWN %#x)", features);
    printf("\n");
    return 0;
    }

    Signed-off-by: Rusty Russell
    Acked-by: Max Krasnyansky
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • David S. Miller
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: acpiphp: cleanup notify handler on all root bridges
    PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev.
    PCI: Restrict VPD read permission to root

    Linus Torvalds
     
  • * 'i2c-fix' of git://aeryn.fluff.org.uk/bjdooks/linux:
    I2C: S3C2410: Add MODULE_ALIAS() for s3c2440 device.
    I2C: S3C2410: Fixup error codes returned rom a transfer.
    I2C: S3C2410: Check ACK on byte transmission

    Linus Torvalds