16 Apr, 2011

1 commit


17 Apr, 2008

2 commits


17 Oct, 2007

1 commit

  • Other/Some pr_*() macros are already defined in kernel.h, but pr_err() was
    defined multiple times in several other places

    Signed-off-by: Emil Medve
    Cc: Jean Delvare
    Cc: Jeff Garzik
    Cc: "Antonino A. Daplas"
    Cc: Tony Lindgren
    Reviewed-by: Satyam Sharma
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Emil Medve
     

11 Oct, 2007

2 commits

  • We now have struct net_device_stats embedded in struct net_device,
    and the default ->get_stats() hook does the obvious thing for us.

    Run through drivers/net/* and remove the driver-local storage of
    statistics, and driver-local ->get_stats() hook where applicable.

    This was just the low-hanging fruit in drivers/net; plenty more drivers
    remain to be updated.

    [ Resolved conflicts with napi_struct changes and fix sunqe build
    regression... -DaveM ]

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

    Jeff Garzik
     
  • 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
     

09 Jul, 2007

2 commits


21 Jun, 2007

3 commits

  • At some point, the transmit descriptor chain end interrupt (TXDCEINT)
    was turned on. This is a mistake; and it damages small packet
    transmit performance, as it results in a huge storm of interrupts.
    Turn it off.

    Signed-off-by: Linas Vepstas
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • Although the previous patch resolved issues with hangs when the
    RX ram full interrupt is encountered, there are still situations
    where lots of RX ramfull interrupts arrive, resulting in a noisy
    log in syslog. There is no need for this.

    Signed-off-by: Linas Vepstas
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • This patch fixes a rare deadlock that can occur when the kernel
    is not able to empty out the RX ring quickly enough. Below follows
    a detailed description of the bug and the fix.

    As long as the OS can empty out the RX buffers at a rate faster than
    the hardware can fill them, there is no problem. If, for some reason,
    the OS fails to empty the RX ring fast enough, the hardware GDACTDPA
    pointer will catch up to the head, notice the not-empty condition,
    ad stop. However, RX packets may still continue arriving on the wire.
    The spidernet chip can save some limited number of these in local RAM.
    When this local ram fills up, the spider chip will issue an interrupt
    indicating this (GHIINT0STS will show ERRINT, and the GRMFLLINT bit
    will be set in GHIINT1STS). When te RX ram full condition occurs,
    a certain bug/feature is triggered that has to be specially handled.
    This section describes the special handling for this condition.

    When the OS finally has a chance to run, it will empty out the RX ring.
    In particular, it will clear the descriptor on which the hardware had
    stopped. However, once the hardware has decided that a certain
    descriptor is invalid, it will not restart at that descriptor; instead
    it will restart at the next descr. This potentially will lead to a
    deadlock condition, as the tail pointer will be pointing at this descr,
    which, from the OS point of view, is empty; the OS will be waiting for
    this descr to be filled. However, the hardware has skipped this descr,
    and is filling the next descrs. Since the OS doesn't see this, there
    is a potential deadlock, with the OS waiting for one descr to fill,
    while the hardware is waiting for a differen set of descrs to become
    empty.

    A call to show_rx_chain() at this point indicates the nature of the
    problem. A typical print when the network is hung shows the following:

    net eth1: Spider RX RAM full, incoming packets might be discarded!
    net eth1: Total number of descrs=256
    net eth1: Chain tail located at descr=255
    net eth1: Chain head is at 255
    net eth1: HW curr desc (GDACTDPA) is at 0
    net eth1: Have 1 descrs with stat=xa0800000
    net eth1: HW next desc (GDACNEXTDA) is at 1
    net eth1: Have 127 descrs with stat=x40800101
    net eth1: Have 1 descrs with stat=x40800001
    net eth1: Have 126 descrs with stat=x40800101
    net eth1: Last 1 descrs with stat=xa0800000

    Both the tail and head pointers are pointing at descr 255, which is
    marked xa... which is "empty". Thus, from the OS point of view, there
    is nothing to be done. In particular, there is the implicit assumption
    that everything in front of the "empty" descr must surely also be empty,
    as explained in the last section. The OS is waiting for descr 255 to
    become non-empty, which, in this case, will never happen.

    The HW pointer is at descr 0. This descr is marked 0x4.. or "full".
    Since its already full, the hardware can do nothing more, and thus has
    halted processing. Notice that descrs 0 through 254 are all marked
    "full", while descr 254 and 255 are empty. (The "Last 1 descrs" is
    descr 254, since tail was at 255.) Thus, the system is deadlocked,
    and there can be no forward progress; the OS thinks there's nothing
    to do, and the hardware has nowhere to put incoming data.

    This bug/feature is worked around with the spider_net_resync_head_ptr()
    routine. When the driver receives RX interrupts, but an examination
    of the RX chain seems to show it is empty, then it is probable that
    the hardware has skipped a descr or two (sometimes dozens under heavy
    network conditions). The spider_net_resync_head_ptr() subroutine will
    search the ring for the next full descr, and the driver will resume
    operations there. Since this will leave "holes" in the ring, there
    is also a spider_net_resync_tail_ptr() that will skip over such holes.

    Signed-off-by: Linas Vepstas
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     

27 Feb, 2007

5 commits


06 Feb, 2007

3 commits

  • Get rid of the rxramfull tasklet, and let the NAPI poll routine
    deal with this situation. (The rxramfull interrupt is simply
    stating that the h/w has run out of room for incoming packets).

    Signed-off-by: Linas Vepstas
    Cc: James K Lewis
    Cc: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • This patch adds net_ratelimit to many of the printks in order to
    limit extraneous warning messages (created in response to Bug 28554).
    This patch supercedes all previous ratelimit patches.
    This has been tested, please apply.

    From: James K Lewis
    Signed-off-by: James K Lewis
    Signed-off-by: Linas Vepstas
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • The current driver code performs 512 DMA mappings of a bunch of
    32-byte ring descriptor structures. This is silly, as they are
    all in contiguous memory. This patch changes the code to
    dma_map_coherent() each rx/tx ring as a whole.

    Signed-off-by: Linas Vepstas
    Cc: James K Lewis
    Cc: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     

30 Nov, 2006

2 commits

  • Correct a problem seen on later kernels running the NetPIPE application.
    Specifically, NetPIPE would begin running very slowly at the 1533 packet
    size. It was determined that Spidernet slowed with an idle DMA engine.

    Signed-off-by: James K Lewis
    Signed-off-by: Linas Vepstas
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • In an earlier patch, code was added to pad packets that were less that
    ETH_ZLEN (60) bytes using the skb_pad function. This has caused hangs when
    accessing certain NFS mounted file systems. This patch removes the check
    and solves the NFS problem. The driver, with this patch, has been tested
    extensively. Please apply.

    Signed-off-by: James K Lewis
    Cc: Stephen Hemminger
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    James K Lewis
     

11 Oct, 2006

6 commits

  • Cosmetic patch: give the variable holding the numer of descriptors
    a more descriptive name, so to avoid confusion.

    Signed-off-by: Linas Vepstas
    Cc: James K Lewis
    Cc: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • Implement basic low-watermark support for the transmit queue.
    Hardware low-watermarks allow a properly configured kernel
    to continously stream data to a device and not have to handle
    any interrupts at all in doing so. Correct zero-interrupt
    operation can be actually observed for this driver, when the
    socket buffer is made large enough.

    The basic idea of a low-watermark interrupt is as follows.
    The device driver queues up a bunch of packets for the hardware
    to transmit, and then kicks the hardware to get it started.
    As the hardware drains the queue of pending, untransmitted
    packets, the device driver will want to know when the queue
    is almost empty, so that it can queue some more packets.

    If the queue drains down to the low waterark, then an interrupt
    will be generated. However, if the kernel/driver continues
    to add enough packets to keep the queue partially filled,
    no interrupt will actually be generated, and the hardware
    can continue streaming packets indefinitely in this mode.

    The impelmentation is done by setting the DESCR_TXDESFLG flag
    in one of the packets. When the hardware sees this flag, it will
    interrupt the device driver. Because this flag is on a fixed
    packet, rather than at fixed location in the queue, the
    code below needs to move the flag as more packets are
    queued up. This implementation attempts to keep the flag
    at about 1/4 from "empty".

    Signed-off-by: Linas Vepstas
    Signed-off-by: James K Lewis
    Acked-by: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • The current receive interrupt mask sets a bogus bit that doesn't even
    belong to the definition of this register. Remove it.

    Signed-off-by: Linas Vepstas
    Cc: James K Lewis
    Cc: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • This patch fixes the names of a few fields in the DMA control
    register. There is no functional change.

    Signed-off-by: Linas Vepstas
    Cc: James K Lewis
    Cc: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • This patch increases the Burst Address alignment from 64 to 1024 in the
    Spidernet driver. This improves transmit performance for large packets.

    From: James K Lewis
    Signed-off-by: James K Lewis
    Signed-off-by: Linas Vepstas
    Acked-by: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     
  • This patch adds version information as reported by
    ethtool -i to the Spidernet driver.

    From: James K Lewis
    Signed-off-by: James K Lewis
    Signed-off-by: Linas Vepstas
    Acked-by: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Linas Vepstas
     

23 Sep, 2006

1 commit


14 Sep, 2006

1 commit


20 Aug, 2006

1 commit


18 Jul, 2006

1 commit

  • With this patch TX queue descriptors are not chained per default any more.
    The pointer to next descriptor is set only when next descriptor is prepaired
    for transfer. Also the mechanism of checking wether Spider is ready has been
    changed: it checks not for CARDOWNED flag in status of previous descriptor
    but for a TXDMAENABLED flag in Spider's register.

    Signed-off-by: Maxim Shchetynin
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jens Osterkamp
    Signed-off-by: Jeff Garzik

    Jens Osterkamp
     

09 May, 2006

1 commit


17 Jan, 2006

2 commits

  • Performance optimizations, changes in these areas:
    - RX and TX checksum offload
    - correct maximum MTU
    - don't use TX interrupts anymore, use a timer instead
    - remove some superfluous barriers
    - improve RX RAM full handling

    From: Utz Bacher
    Signed-off-by: Jens Osterkamp
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Arnd Bergmann
     
  • The driver incorrectly used dma_addr_t to describe
    HW structures and consequently broke when that type
    was changed in 2.6.15-rc.

    This changed spidernet to use u32 for 32 bit HW defined
    structure elements.

    From: Jens Osterkamp
    Signed-off-by: Jens Osterkamp
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jeff Garzik

    Arnd Bergmann
     

07 Sep, 2005

1 commit

  • This patch adds a driver for a new 1000 Mbit ethernet NIC. It is
    integrated on the south bridge that is used for our Cell Blades.

    The code gets the MAC address from the Open Firmware device tree, so it
    won't compile on platforms other than ppc64.

    This is the first public release, so I don't expect the first version to
    get merged, but I'd aim for integration within the 2.6.13 time frame.

    Cc: Utz Bacher
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Jens Osterkamp