30 Oct, 2009

2 commits


02 Oct, 2009

1 commit

  • This is based on Michal Schmidt fix for skge.

    Most network drivers request their IRQ when the interface is activated.
    sky2 does it in ->probe() instead, because it can work with two-port
    cards where the two net_devices use the same IRQ. This works fine most
    of the time, except in some situations when the interface gets renamed.
    Consider this example:

    1. modprobe sky2
    The card is detected as eth0 and requests IRQ 17. Directory
    /proc/irq/17/eth0 is created.
    2. There is an udev rule which says this interface should be called
    eth1, so udev renames eth0 -> eth1.
    3. modprobe 8139too
    The Realtek card is detected as eth0. It will be using IRQ 17 too.
    4. ip link set eth0 up
    Now 8139too requests IRQ 17.

    The result is:
    WARNING: at fs/proc/generic.c:590 proc_register ...
    proc_dir_entry '17/eth0' already registered

    The fix is for sky2 to name the irq based on the pci device, as is done
    by some other devices DRM, infiniband, ... ie. sky2@pci:0000:00:00

    Signed-off-by: Stephen Hemminger
    Reviewed-by: Michal Schmidt
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

02 Sep, 2009

2 commits

  • B0_CTST is a 24bit register according to the vendor driver (sk98lin).
    A 16bit read on B0_CTST will always return 0 for Y2_VAUX_AVAIL (1<
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Mike McCormack
     
  • Observed by Mike McCormack.

    The LED bit here is just a software controlled value used to
    turn on one of the LED's on some boards. The register value was wrong,
    which could have been causing some power control issues.
    Get rid of problematic define use the correct mask.

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

    Stephen Hemminger
     

19 Aug, 2009

4 commits

  • Recycling turns out to be a bad idea! For most use cases, the
    packet can not be reused: TCP packets are cloned. Even for the ideal
    case of forwarding, it hurts performance because of CPU ping/pong.
    On a multi-core system forwarding of 64 byte packets is worse
    much worse: recycling = 24% forwarded vs no recycling = 42% forwarded

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

    Stephen Hemminger
     
  • Don't reference the list element in hardware transmit ring on transmit
    completion. The list element is updated by hardware, therefore
    it causes a cache miss. Do book keeping in software structure.

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

    Stephen Hemminger
     
  • Allocate and size transmit ring based on parameters. Saves excess
    space and allows configuring larger rings for testing.

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

    Stephen Hemminger
     
  • This patch saves elements on transmit ring by only updating the upper
    64 bit address when it changes. With many workloads skb's are located
    in same region, so it saves space.

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

    Stephen Hemminger
     

15 Aug, 2009

2 commits

  • The whole restarting flag was introduced by Mike McCormack
    and was a temporary duct tape patch around issues with transmits
    inflight during restart. The problems it was covering are now
    fixed and the code should have been reverted.

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

    Stephen Hemminger
     
  • The sky2 driver combines auto speed negotiation with automatic negotiation
    of pause parameters; but the ethtool interface expects them to be
    split. This patch allows autonegotiation to be used for speed, but
    manually disable flow control.

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

    Stephen Hemminger
     

04 Aug, 2009

1 commit

  • This patch supersedes my previous patch "sky2: Avoid transmitting
    during sky2_restart".

    I have reworked the patch to avoid crashes during both sky2_restart()
    and sky2_set_ringparam().

    Without this patch, the sky2 driver can be crashed by doing:

    # pktgen eth1 & (transmit many packets on eth1)
    # ethtool -G eth1 tx 510

    I am aware you object to storing extra state, but I can't see a way
    around this. Without remembering that we're restarting,
    netif_wake_queue() is called in the ISR from sky2_tx_complete(), and
    netif_tx_lock() is used in sky2_tx_done(). If anybody can see a way
    around this, please let me know.

    Signed-off-by: Mike McCormack
    Signed-off-by: David S. Miller

    Mike McCormack
     

18 Jun, 2009

1 commit


07 Aug, 2008

1 commit

  • Fix the problems reported for 2.6.27-rc1 caused by over aggressive
    power management. Turning clock off on PCI Express is problematic for WOL,
    and when doing multi-booting.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

18 Jun, 2008

1 commit

  • Add support for Yukon 2 Ultra 2 chip set (88E8057) based on code in latest
    version of vendor driver (sk98lin 10.60.2.3). Untested on real hardware.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

31 May, 2008

2 commits

  • Turn on special bits to save more power when device is shutdown.
    Tested on a limited range of hardware, some of the bits are for hardware
    that probably isn't even in production (like Yukon Supreme) and was ported
    from the vendor driver.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • Put PHY int sleep mode (from vendor sk98lin 10.50 driver) when the
    network device is brought down.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

13 May, 2008

1 commit


24 Feb, 2008

1 commit

  • Fix problems in LED management, so ethtool -p works correctly on Yukon-EC
    and other chips. The driver was incorrectly setting the PHY LED overide bits.
    Moral: read the spec sheet, not the vendor driver.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

06 Feb, 2008

1 commit

  • The Yukon FE chip has a ram buffer therefore it needs the alignment
    restriction and hang check workarounds.

    Therefore:
    * Autodetect the prescence/absence of ram buffer
    * Rename the flag value to reflect this
    * Use it consistently (ie don't reread register)

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

29 Jan, 2008

1 commit


13 Jan, 2008

1 commit

  • This patch might fix problems with 4G or more of memory.
    It stops the driver from doing a small optimization for Tx and Rx,
    and instead always sets the high-page on tx/rx descriptors.

    Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9725

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

02 Dec, 2007

1 commit


10 Nov, 2007

1 commit

  • The PCI AER support may not work for a couple of reasons.
    It may not be configured into the kernel or there may be a BIOS
    bug that prevents MMCONFIG from working. If MMCONFIG doesn't work
    then the PCI registers that control AER will not be accessible via
    pci_read_config functions; luckly there is another window to access
    PCI space in the device, so use that.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

12 Oct, 2007

1 commit


11 Oct, 2007

4 commits

  • Use the PCI layer config access functions. The driver was using the
    memory mapped window in device, to workaround issues accessing the
    advanced error reporting registers.

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

    Stephen Hemminger
     
  • Use the kernel interfaces for advanced error reporting.
    This should be cleaner and clear up errors on boot.

    For those systems with busted BIOS's that don't correctly
    support mmconfig, advanced error reporting will be disabled.
    The PCI registers for advanced error reporting start at 0x100 which
    is too large to be accessed by legacy functions.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • Add documentation of GPHY_CTRL register bits even if driver
    is not using them (yet).

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • Several devices have multiple independant RX queues per net
    device, and some have a single interrupt doorbell for several
    queues.

    In either case, it's easier to support layouts like that if the
    structure representing the poll is independant from the net
    device itself.

    The signature of the ->poll() call back goes from:

    int foo_poll(struct net_device *dev, int *budget)

    to

    int foo_poll(struct napi_struct *napi, int budget)

    The caller is returned the number of RX packets processed (or
    the number of "NAPI credits" consumed if you want to get
    abstract). The callee no longer messes around bumping
    dev->quota, *budget, etc. because that is all handled in the
    caller upon return.

    The napi_struct is to be embedded in the device driver private data
    structures.

    Furthermore, it is the driver's responsibility to disable all NAPI
    instances in it's ->stop() device close handler. Since the
    napi_struct is privatized into the driver's private data structures,
    only the driver knows how to get at all of the napi_struct instances
    it may have per-device.

    With lots of help and suggestions from Rusty Russell, Roland Dreier,
    Michael Chan, Jeff Garzik, and Jamal Hadi Salim.

    Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
    Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.

    [ Ported to current tree and all drivers converted. Integrated
    Stephen's follow-on kerneldoc additions, and restored poll_list
    handling to the old style to fix mutual exclusion issues. -DaveM ]

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

    Stephen Hemminger
     

25 Sep, 2007

1 commit


21 Sep, 2007

4 commits

  • A driver writer from another operating system hinted that
    the versions of Yukon 2 chip with rambuffer (EC and XL) have
    a hardware bug that if the FIFO ever gets completely full it
    will hang. Sounds like a classic ring full vs ring empty wrap around
    bug.

    As a workaround, use the existing watchdog timer to check for
    ring full lockup.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • Add support for newest Marvell chips.
    The Yukon FE plus chip is found in some not yet released laptops.
    Tested on hardware evaluation boards.

    This version of the patch is for 2.6.23. It supersedes
    the two previous patches that are sitting in netdev-2.6 (upstream branch).

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • This patch should cause no functional changes in driver behaviour.
    There are (too) many revisions of the Yukon 2 chip now. Instead of
    adding more conditionals based on chip revision; rerganize into a
    set of feature flags so adding new versions is less problematic.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • The length check for truncated frames was not correctly handling
    the case where VLAN acceleration had already read the tag.
    Also, the Yukon EX has some features that use high bit of status
    as security tag.

    Signed-off-by: Pierre-Yves Ritschard
    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

25 Aug, 2007

1 commit


11 Jul, 2007

1 commit

  • Add an optional debug interface for displaying state of transmit/receive
    rings. Creates a file debugfs/sky2/ethX for each device that is up.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

09 Jul, 2007

4 commits