02 Jun, 2010

3 commits

  • This way, RX DMA overruns (actually being caused by overrun of the
    512byte input FIFO) show up in ifconfig output. The rx_fifo_errors
    counter is unused otherwise.

    Signed-off-by: Phil Sutter
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • This patch completes commit 89d71a66c40d629e3b1285def543ab1425558cd5
    which missed this spot, as it seems.

    Signed-off-by: Phil Sutter
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • By calling korina_restart(), the IRQ handler tries to disable the
    interrupt it's currently serving. This leads to a deadlock since
    disable_irq() waits for any running IRQ handlers to finish before
    returning. This patch addresses the issue by turning korina_restart()
    into a workqueue task, which is then scheduled when needed.

    Reproducing the deadlock is easily done using e.g. GNU netcat to send
    large amounts of UDP data to the host running this driver.

    Note that the same problem (and fix) applies to TX FIFO underruns, but
    apparently these are less easy to trigger.

    Signed-off-by: Phil Sutter
    Signed-off-by: David S. Miller

    Phil Sutter
     

04 Apr, 2010

1 commit

  • Converts the list and the core manipulating with it to be the same as uc_list.

    +uses two functions for adding/removing mc address (normal and "global"
    variant) instead of a function parameter.
    +removes dev_mcast.c completely.
    +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
    manipulation with lists on a sandbox (used in bonding and 80211 drivers)

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

23 Mar, 2010

1 commit


26 Feb, 2010

1 commit


13 Feb, 2010

1 commit


19 Nov, 2009

1 commit

  • Not as fancy as coccinelle. Checkpatch errors ignored.
    Compile tested allyesconfig x86, not all files compiled.

    grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \
    perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\
    done

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

14 Oct, 2009

1 commit


02 Sep, 2009

1 commit


14 Aug, 2009

2 commits


29 May, 2009

1 commit

  • This patch makes the korina driver poll the media
    for link change. This is actually required on
    Mikrotik RB532 (not RB532A) for korina to
    operate properly.

    Signed-off-by: Felix Fietkau
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

16 Apr, 2009

1 commit


22 Jan, 2009

1 commit

  • Following the removal of the unused struct net_device * parameter from
    the NAPI functions named *netif_rx_* in commit 908a7a1, they are
    exactly equivalent to the corresponding *napi_* functions and are
    therefore redundant.

    Signed-off-by: Ben Hutchings
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Ben Hutchings
     

20 Jan, 2009

3 commits

  • As the assigned value is being overwritten shortly after, it can be
    dropped and so the whole variable definition moved to the start of the
    function.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • This is copy and paste from the original driver. As skb_reserve() is
    also called within korina_alloc_ring() when initially allocating the
    receive descriptors, the same should be done when allocating new space
    after passing an skb to upper layers.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • After the last loop iteration, i has the value RC32434_NUM_RDS and
    therefore leads to an index overflow when used afterwards to address the
    last element. This is yet another another bug introduced when rewriting
    parts of the driver for upstream preparation, as the original driver
    used 'RC32434_NUM_RDS - 1' instead.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     

16 Jan, 2009

9 commits

  • As the kernel warning states: "IRQF_DISABLED is not guaranteed on shared
    IRQs". Since these IRQs' values are hardcoded and my test system doesn't
    show any shared use of IRQs at all, rather make them non-shared than
    non-disabled.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • Apparently this doesn't make sense. Otherwise the queue gets disabled as
    soon as it's getting empty and can only be resurrected by a driver
    restart.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • Originally this must have been a rewrite error when introducing
    'chain_index'. But the original driver did not use the previous chain
    item everywhere: when altering the address tx_chain_tail points to, it
    should move forward, not backwards.
    Also this is not an "index" but rather the penultimate element in the
    chain, so rename it accordingly.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • Triggering TX before the write to the DMA status mask register leads to
    transferring packets with maximum payload no matter what the actual
    packet size is.
    While here, also trigger RX scheduling after writing the DMA status mask
    register, like it was in the original driver before it was sent
    upstream.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • The called netif_rx_schedule() does all the work for us:
    - it checks the return value of netif_rx_schedule_prep() and
    - if everything is ok calls __netif_rx_schedule().
    Before this change, the driver received absolutely nothing.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • This function needs an early exit condition to function properly, or
    else caller assumes napi workload wasn't enough to handle all received
    packets and korina_rx is called again (and again and again and ...).

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • Without this the driver will crash when the NIC is being restarted.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Phil Sutter
     
  • The new value is the one used in the external patch before and allows at
    least a standard MTU of 1500 to be handled correctly. Impact of this
    change gets visible when bigger packets are to be received, issuing:
    | ping -s 492
    and bigger payload sized led to 100% packet loss.

    Signed-off-by: Phil Sutter
    Acked-by: Florian Fainelli

    Phil Sutter
     
  • Using platform_set_drvdata() here makes no sense, since the driver_data
    field has already been filled with valuable data (i.e. the MAC address).
    Also having driver_data point to the net_device is rather pointless
    since struct korina_device contains an apropriate field for it.

    Signed-off-by: Phil Sutter
    Signed-off-by: David S. Miller

    Phil Sutter
     

23 Dec, 2008

1 commit

  • When the napi api was changed to separate its 1:1 binding to the net_device
    struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
    vestigual net_device structure parameter. This patch cleans up that api by
    properly removing it..

    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     

04 Nov, 2008

1 commit


25 Apr, 2008

2 commits

  • - useless initialization (korina_ope / korina_restart)
    - use a single variable for the status code in korina_probe
    and propagate the error status code from below
    - useless checks in korina_remove : the variables are
    necessarily set when korina_probe succeeds

    Signed-off-by: Francois Romieu
    Signed-off-by: Jeff Garzik

    Francois Romieu
     
  • The driver takes the error unwind path without condition.

    Signed-off-by: Francois Romieu
    Signed-off-by: Jeff Garzik

    Francois Romieu
     

26 Mar, 2008

1 commit