02 Apr, 2009

40 commits

  • commit 1577ecef766650a57fceb171acee2b13cbfaf1d3 ("netdev: Merge UCC
    and gianfar MDIO bus drivers") introduced a regression so that UCC
    MDIO buses no longer work.

    This is because fsl_pq_mdio driver wrongly masks all non-TBI PHYs
    for !fsl,gianfar-mdio buses, while it should do that only for
    fsl,gianfar-tbi buses.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • The driver should pass a device that actually specifies internal DMA
    ops, but currently it passes netdev's device, which is wrong and that
    causes following oops:

    Kernel BUG at c01c4df8 [verbose debug info unavailable]
    Oops: Exception in kernel mode, sig: 5 [#1]
    [...]
    NIP [c01c4df8] get_new_skb+0x7c/0xf8
    LR [c01c4da4] get_new_skb+0x28/0xf8
    Call Trace:
    [ef82be00] [c01c4da4] get_new_skb+0x28/0xf8 (unreliable)
    [ef82be20] [c01c4eb8] rx_bd_buffer_set+0x44/0x98
    [ef82be40] [c01c62bc] ucc_geth_startup+0x11b0/0x147c
    [ef82be80] [c01c6674] ucc_geth_open+0xec/0x2a4
    [ef82bea0] [c02288a4] dev_open+0xc0/0x11c
    [...]

    Fix this by passing of_device's device that specifies DMA ops in its
    archdata.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • This is a fix to get cs89x0 network driver working on i.MX31ADS

    Signed-off-by: Alan Carvalho de Assis
    Signed-off-by: David S. Miller

    Alan Carvalho de Assis
     
  • This driver contains experimental NAPI code disabled by default.
    The commit bea3348ee ("[NET]: Make NAPI polling independent of struct
    net_device objects.") converted the NAPI path of this driver but that
    conversion was not complete. This patch fixes a build error
    introduced by the commit.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: David S. Miller

    Atsushi Nemoto
     
  • Add Vendor/Product ID's for new devices.
    Removed duplicate product ID 0x7361.

    Signed-off-by: Jan Dumon
    Signed-off-by: David S. Miller

    Jan Dumon
     
  • Now that the driver is exclusively an of_platform driver we no longer
    use the structs and #defines in fsl_devices.h

    Signed-off-by: Kumar Gala
    Signed-off-by: David S. Miller

    Kumar Gala
     
  • Now that the driver is exclusively an of_platform driver we no longer
    use the structs and #defines in fsl_devices.h

    Signed-off-by: Kumar Gala
    Signed-off-by: David S. Miller

    Kumar Gala
     
  • On an SMP system, the following message is printed. The patch below gets
    fixes the problem.

    =================================
    [ INFO: inconsistent lock state ]
    2.6.29-Linus-05093-gc31f403 #57
    ---------------------------------
    inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
    bash/4105 [HC1[1]:SC0[0]:HE0:SE1] takes:
    (&kaweth->device_lock){+...}, at: []
    kaweth_usb_receive+0x77/0x1af [kaw eth]
    {hardirq-on-W} state was registered at:
    [] __lock_acquire+0x753/0x1685
    [] lock_acquire+0x55/0x71
    [] _spin_lock+0x31/0x3d
    [] kaweth_start_xmit+0x2b/0x1e1 [kaweth]
    [] dev_hard_start_xmit+0x22e/0x2ad
    [] __qdisc_run+0xf2/0x203
    [] dev_queue_xmit+0x263/0x39b
    [] packet_sendmsg_spkt+0x1c4/0x20a [af_packet]
    [] sock_sendmsg+0xe4/0xfd
    [] sys_sendto+0xe4/0x10c
    [] system_call_fastpath+0x16/0x1b
    [] 0xffffffffffffffff
    irq event stamp: 1280
    hardirqs last enabled at (1279): []
    _spin_unlock_irqrestore+0x44/0x4c
    hardirqs last disabled at (1280): []
    save_args+0x67/0x70
    softirqs last enabled at (660): []
    __do_softirq+0x14d/0x15d
    softirqs last disabled at (651): []
    call_softirq+0x1c/0x28

    Signed-off-by: Larry Finger
    Signed-off-by: David S. Miller

    Larry Finger
     
  • GRO assumes that there is a one-to-one relationship between NAPI
    structure and network device. Some devices like sky2 share multiple
    devices on a single interrupt so only have one NAPI handler. Rather than
    split GRO from NAPI, just have GRO assume if device changes that
    it is a different flow.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Original comment (Karsten):
    On a MSI MS-6702E mainboard, when in rtl8169_init_one() for the first time
    after BIOS has run, IntrStatus reads 5 after chip has been reset.
    IntrStatus should equal 0 there, so patch changes IntrStatus reset to happen
    after chip reset instead of before.

    Remark (Francois):
    Assuming that the loglevel of the driver is increased above NETIF_MSG_INTR,
    the bug reveals itself with a typical "interrupt 0025 in poll" message
    at startup. In retrospect, the message should had been read as an hint of
    an unexpected hardware state several months ago :o(

    Fixes (at least part of) https://bugzilla.redhat.com/show_bug.cgi?id=460747

    Signed-off-by: Karsten Wiese
    Signed-off-by: Francois Romieu
    Tested-by: Josep
    Signed-off-by: David S. Miller

    Karsten Wiese
     
  • While setting up the ring parameters using ethtool the driver can
    panic or leak memory as ixgbe_open tries to setup tx & rx resources.
    The updated logic will use ixgbe_down/up after successful allocation of
    tx & rx resources

    Signed-off-by: Mallikarjuna R Chilakala
    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    CC: stable@kernel.org
    Signed-off-by: David S. Miller

    Mallikarjuna R Chilakala
     
  • We were basicly ignoring ethtool users request for FC autoneg
    and replying to queries with a "best guess". This patch
    enables the driver to store if we want to enable/disable
    autoneg FC and do the correct behavior.

    Signed-off-by: Don Skidmore
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Don Skidmore
     
  • When network interface is made active we were not handling the error
    scenarios properly to clean up rx & tx resources which might result in
    a driver panic.

    Signed-off-by: Mallikarjuna R Chilakala
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Mallikarjuna R Chilakala
     
  • This patch resolves an issue with map single being used to map a buffer and
    then unmap page being used to unmap it. In addition it handles any error
    conditions that may be detected using skb_dma_map.

    Signed-off-by: Alexander Duyck
    Acked-by: Mallikarjuna R Chilakala
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • MSI-X allocation broke after the 82599 merge on systems with more than 8
    CPU cores. 82598 drops back into MSI mode, which isn't sufficient to run
    full, efficient 10G line rate.

    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    PJ Waskiewicz
     
  • In the past flow control wasn't enabled by default under the
    incorrect assumption that this opened up us to a denial of
    service attack. However since any switch that forwarded flow
    control would be extremely msiconfigured and/or buggy, this
    concern no longer out weighs the preformance gains from
    having FC enabled.

    Signed-off-by: Don Skidmore
    Acked-by: Mallikarjuna R Chilakala
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Don Skidmore
     
  • The priority flow control settings from the netlink layer aren't taking
    effect in the base driver. The boolean pfc_mode_enable in the dcb_config
    struct isn't being set, so the hardware configuration code is never
    reached.

    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    PJ Waskiewicz
     
  • Ethtool tries to get advertised speed from phy.autoneg_advertised.
    However for copper media this wasn't happening until later do to
    an other fix which moved mac.ops.setup_link_speed placement in
    ixgbe_link_config(). This patch will display the default advertised
    speeds if it can't yet get this information from phy.autoneg_advertised.

    Signed-off-by: Don Skidmore
    Acked-by: Mallikarjuna R Chilakala
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Don Skidmore
     
  • The ixgbe driver had issues when DEBUG was defined because the hw_dbg macro
    was incomplete. This patch completes the code based off of the code that
    already existed in the igb module.

    Signed-off-by: Alexander Duyck
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Impact: Fix

    Yinghai Lu found one system with 82575EB where, in the kernel that is
    kexeced, probe igb failed with -2, the reason being that the adapter
    could not be brought back from D3 by the kexec kernel, most probably
    due to quirky hardware (it looks like the same behavior happened on
    forcedeth).

    Prevent igb from putting the adapter into D3 during shutdown except
    when we going to power off the system. For this purpose, seperate
    igb_shutdown() from igb_suspend() and use the appropriate PCI PM
    callbacks in both of them.

    Signed-off-by: "Rafael J. Wysocki"
    Reported-by: Yinghai Lu
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Rafael J. Wysocki
     
  • The code path for setting up phy loopback testing was out of date and was
    setting bits it didn't need to. This change cleans up the code path and
    removes some code that has no effect on teh driver.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Increase the delay for copper phy init from 15ms to 100ms. This is to
    address issues seen in which ethtool -t was failing in some cases on 82576
    based adapters.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • An issue was seen on suspend in which the system reported a page fault. This
    was due to the new reg_idx code being called after the queues were freed.

    This update prevents any for loops from going through the queues by setting
    the number of queues to 0 when they are freed.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • When device is on PCIe link trained as x2 the driver is currently reporting
    link width as "unknown". The original patch provided by Myron adds the x2
    link support and my changes are cosmetic to clean up the readability of the
    conditional operators.

    Based on work by: Myron Stowe
    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • The FEC Ethernet device isn't always attached to a phy. Be careful
    not to dereference phy_device if it is NULL. Also eliminates an
    unnecessary extra function from the ioctl path.

    Reported-by: Henk Stegeman
    Signed-off-by: Grant Likely
    Signed-off-by: David S. Miller

    Grant Likely
     
  • Since not using net_device_ops gets you shunned out the cool crowd,
    this patch modifies the fec_mpc52xx Ethernet driver to provide the
    management hooks via a struct net_device_ops.

    Reported-by: Henk Stegeman
    Signed-off-by: Grant Likely
    Signed-off-by: David S. Miller

    Henk Stegeman
     
  • The driver triggers a BUG_ON() when allocating DMA buffers because the
    arch/powerpc dma_ops aren't in the net_device's struct device. This
    patch fixes the problem by using the parent of_device which does have
    the correct dma_ops set.

    Signed-off-by: Grant Likely
    Reviewed-by: Becky Bruce
    Signed-off-by: David S. Miller

    Grant Likely
     
  • Commit 784544739a25c30637397ace5489eeb6e15d7d49
    (netfilter: iptables: lock free counters) forgot to disable BH
    in arpt_do_table(), ipt_do_table() and ip6t_do_table()

    Use rcu_read_lock_bh() instead of rcu_read_lock() cures the problem.

    Reported-and-bisected-by: Roman Mindalev
    Signed-off-by: Eric Dumazet
    Acked-by: Patrick McHardy
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • We have a 64bit value that needs to be set atomically.
    This is easy and quick on all 64bit archs, and can also be done
    on x86/32 with set_64bit() (uses cmpxchg8b). However other
    32b archs don't have this.

    I actually changed this to the current state in preparation for
    mainline because the old way (using a spinlock on 32b) resulted in
    unsightly #ifdefs in the code. But obviously, being correct takes
    precedence.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • This fixes a bug where a connection was unexpectedly
    not on *any* list while being destroyed. It also
    cleans up some code duplication and regularizes some
    function names.

    * Grab appropriate lock in conn_free() and explain in comment
    * Ensure via locking that a conn is never not on either
    a dev's list or the nodev list
    * Add rds_xx_remove_conn() to match rds_xx_add_conn()
    * Make rds_xx_add_conn() return void
    * Rename remove_{,nodev_}conns() to
    destroy_{,nodev_}conns() and unify their implementation
    in a helper function
    * Document lock ordering as nodev conn_lock before
    dev_conn_lock

    Reported-by: Yosef Etigin
    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • rs_send_drop_to() is called during socket close. If it takes
    m_rs_lock without disabling interrupts, then
    rds_send_remove_from_sock() can run from the rx completion
    handler and thus deadlock.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • - Kconfig and Makefile related changes for vxge driver.

    - No changes in current submission.

    - Changes from previous submission -
    - Incorporated the following review comments as per Bill Flink:
    - Add dependancy on INET along with PCI
    - Remove dependancy on INET_LRO and add GRO support.
    - Made this patch as last patch as per Ben Hutchings comments.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • - Driver version

    - Changes from previous submission -
    - Updated driver version.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • This patch implements all ethtool related entry point functions for the driver.

    - Changes in this submission -
    - Removed redundant #include statements

    - Changes in previous submissions -
    - Removed unused statistics.
    - General clean up - removed unused variables and macros.
    - Incorporated following comments from Ben Hutchings
    - No need to restart the interface in vxge_ethtool_sset
    - Do not use #ifdef ADVERTISED_XX
    - Remove unnecessart intermediate copy in vxge_ethtool_gdrvinfo
    - Use strlcpy() to ensure null-termination.
    - Use ethtool_op_get_tso, ethtool_op_set_tx_hw_csum instead
    of redefining the same code.
    - Implement get_strings_count instead of deprecated get_stats_count.
    - Don't report reporting the EEPROM length as we don't supprt
    get/set eeprom.
    - Don't set self_test_count as we don't support any self tests.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • This patch implements all the driver entry point functions.
    - Definition of all module loadable paramters.
    - Implementation of all driver entry point functions.

    - Changes in this submission -
    - Fixed compilation error when enabling debug statements
    - Fixed few warnings when CONFIG_PCI_MSI is not defined
    - Removed unnecessary volatile variables
    - Removed compare_ether_addr as it causes unaligned memory access on
    the sparc64 platform.

    - Changes in previous submissions -
    - As per Stephen Hemminger's comments removed the following loadable
    parameters - gro, rx_& tx max_indicate_pkts, exec_mode, rx & tx
    pause_enable, tx_steering_type and intr_type.
    - Added Device ID definition in vxge-main.h instead of
    include/linux/pci_ids.h file - Reported by David Miller
    - Incorporated following review comments from Ben Hutchings
    - NAPI is always enabled (no option to turn it OFF).
    - Loadable parameters
    rx_steering_type: This loadable option is removed.
    ring_blocks: This loadable option is removed.
    The driver default settings work well in most if not all cases.
    Another patch to configure these parameters with ethtool will be
    released in the future.
    - LRO has been deprecated in favour of GRO - Bill Fink & Dave Miller's comment
    - Fixed sparse warnings - Reported by Andi Kleen
    - Removed unused variables

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • This patch takes care of trafic handling related APIS.
    - Interrupt Enable and disable
    - Mask / Unmask Interrupt
    - Traffic Interrupt handling.
    - Alarm Interrupt handling.

    - Changes in this submission -
    - General clean up - removed redundant includes, defines and macros.

    - Changes in previous submissions -
    - General cleanup - removed unused functions and variables.
    - Use asserts where necessary - Reported by Andi Kleen
    - Fixed sparse warnings - Reported by Andi Kleen
    - Use a prefix, "__vxge" in front of hw functions to make them globally
    unique - Ben Hutchings

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • This patch takes care of Initialization and configuration steps of
    Neterion Inc's X3100 Series 10GbE PCIe I/O Virtualized Server Adapter.
    - Device Initialization.
    - Verification and setting of device config parameters.
    - Allocation of Tx FIFO and Rx Ring descriptors (DTR).
    - APIs to get various type of hw stats
    - APIs to configure RTS (Receive Traffic Steering)

    - Changes in this submission -
    - Include vmalloc header without which a compilation error occured
    on sparc64, ppc64 and IA64 plaforms.
    - Fixed compilation warning in register_poll, write32_upper,
    write32_lower and the special write64 functions on ppc64.
    - General cleanup - removed redundant includes and defines.

    - Changes in previous submissions -
    - Add readq/writeq implementation for the driver for 32 bit systems -
    reported by Dave Miller.
    - Incorporated following comments from Ben Hutchings
    - Start a comment with "/**" to make it a kernel-doc comment.
    - Use prefix, "__vxge" in front of hw functions to make them globally
    unique.
    - Fixed unnecessary clearing members of *channel just before freeing
    - Use backslashes only for macro definitions and not in multi-line
    statements.
    - Used pci_find_capability instead of redefining it.
    - Used device and revision ids that are already in pdev - no need to
    read them again.
    - Used pci_save_state() and pci_restore_state() around resets.
    - Used udelay and mdelay directly instead of wrapper.
    - In __vxge_hw_device_register_poll() reset i to 0 after the
    microsecond delay loop to commence the millisecond delay loop.
    - Corrected spelling "sapper" - should be "swapper"
    - Remove too much vertical whitespace.
    - Replaced magic numbers with appropriate macros
    - Incorporated following comments from Andi Kleen [andi@firstfloor.org]
    - Reduced the arguments in functions or refactored them into smaller
    functions.
    - Allocate page sized memories used in slow path with vmalloc.
    - Use asserts where necessary.
    - Use macros instead of magic numbers.
    - Use the pci layer code instead of defining own functions
    - Remove driver wrappers such as xge_hw_device_private_set().
    - Fixed sparse warnings.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • - Complete Register map details of Neterion Inc's X3100 Series 10GbE PCIe I/O
    Virtualized Server Adapter.

    - No change from previous submission.

    - Changes in previous submissions -
    - Incorporated following comments from Ben Hutchings
    - Use original macros for endian checks
    - Remove VXGE_OS_PLATFORM_* macros as they are unused.
    - Converted multiple bVALX macros into single with additional
    width parameter and renamed it to vxge_bVALn.
    - Using __packed instead of pragma pack(1)
    - Added a comment of the use of a hw swapper so driver code is
    portable (does not have to change the byte order for register
    access as well as dma operations) on different ENDIAN platforms.
    - Using the definitions instead of redefing them.
    - Using the PCI capabilities registers in
    instead of redefing them.
    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • - update to Maintainer list of S2IO 10GbE drivers (xframe/vxge).

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa
     
  • - vxge driver help text file.

    - No change from previous submission.

    - Changes in previous submissions -
    Removed the performance tuning section with instructions to disable
    time stamps and change sysctl settings - Reported by Dave Miller
    General clean up.
    - Removed tx/rx_pause, exec_mode, tx_steering_type, rx_steering_type, gro,
    intr_type, rx & tx max_indicate_pkts and exec_mode loadable parameters. The
    driver default settings work well in most if not all cases. Another patch
    to configure these parameters with ethtool will be released in the future -
    Reported by Stephen Hemminger.
    - Incorporated following fixes based on comments from Ben Hutchings
    Removed references to earlier kernel versions.
    Removed sections that are similar for all drivers -
    Load/Unload
    Identifying the adapter/interface
    Boot time configuration
    Removed loadable parameter -
    NAPI - Napi is always enabled.
    rx_steering_type & ring_blocks - The driver default settings
    work well in most if not all cases. Another patch to configure
    these parameters with ethtool will be released in the future.
    Removed ethtool support section - No need to duplicate ethtool
    docs here.
    Removed Known Issue on SUSE 9 - Doesn't apply when using a
    current kernel.
    Removed Common Problems section - These don't apply to in-tree modules.
    Removed Available Downloads section - Not sure this belongs in-tree.
    Removed Copyright information - This notice doesn't belong in
    the kernel.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Rastapur Santosh
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: David S. Miller

    Ramkrishna Vepa