16 Aug, 2008

1 commit


15 Aug, 2008

4 commits


19 Jul, 2008

3 commits


15 Jul, 2008

6 commits


20 Jun, 2008

7 commits

  • And update module description.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • All error handling in bnx2_open() can be consolidated.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Enable multiple rx rings if MSI-X vectors are available. We enable
    up to 7 rx rings.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Use the same MSI-X handler to schedule NAPI. Change the dev_instance
    void pointer to the bnx2_napi struct instead so we can have the proper
    context for each MSI-X vector.

    Add a new bnx2_poll_msix() that is optimized for handling MSI-X
    NAPI polling of rx/tx work only. Remove the old bnx2_tx_poll() that
    is no longer needed. Each MSI-X vector handles 1 tx and 1 rx ring.
    The first vector handles link events as well.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Add hw_tx_cons_ptr and hw_rx_cons_ptr to speed up the retreival of
    the tx and rx consumer index, since the MSI-X and default status
    blocks have different structures.

    Combine status_blk and status_blk_msix into a union. We'll only use
    one type of status block for each vector.

    Separate the code to detect more rx and tx work from the code to
    detect link related work.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • In preparation for multi-ring support, rx ring variables are now put
    in a separate bnx2_rx_ring_info struct. With MSI-X, we can support
    multiple rx rings.

    The functions to allocate/free rx memory and to initialize rx rings
    are now modified to handle multiple rings.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • In preparation for multi-ring support, tx ring variables are now put
    in a separate bnx2_tx_ring_info struct. Multi tx ring will not be
    enabled until it is fully supported by the stack. Only 1 tx ring
    will be used at the moment.

    The functions to allocate/free tx memory and to initialize tx rings
    are now modified to handle multiple rings.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     

14 Jun, 2008

1 commit


12 Jun, 2008

1 commit

  • If the RTNL is held when we invoke flush_scheduled_work() we could
    deadlock. One such case is linkwatch, it is a work struct which tries
    to grab the RTNL semaphore.

    The most common case are net driver ->stop() methods. The
    simplest conversion is to instead use cancel_{delayed_}work_sync()
    explicitly on the various work struct the driver uses.

    This is an OK transformation because these work structs are doing
    things like resetting the chip, restarting link negotiation, and so
    forth. And if we're bringing down the device, we're about to turn the
    chip off and reset it anways. So if we cancel a pending work event,
    that's fine here.

    Some drivers were working around this deadlock by using a msleep()
    polling loop of some sort, and those cases are converted to instead
    use cancel_{delayed_}work_sync() as well.

    Signed-off-by: David S. Miller

    David S. Miller
     

17 May, 2008

6 commits

  • Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Instead of assigning values for the struct cpu_reg's at runtime,
    we already know these values at compile time. Therefore, we can use
    designated initializers, to initialize these structures and not have
    to incur this assignment cost at run-time.

    Signed-off-by: Benjamin Li
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Benjamin Li
     
  • To make the bnx2 code more consistent, all instances of
    RX_COPY_THRESH have been changed to BNX2_RX_COPY_THRESH.

    Signed-off-by: Benjamin Li
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Benjamin Li
     
  • The rx_offset field is set to a constant value and initialized
    only once. By replacing all references to the rx_offset field,
    we can eliminate rx_offset from the bnx2 structure. This will
    save 4 bytes for every bnx2 instance.

    [Added parentheses to the definition of BNX2_RX_OFFSET, as noted
    by Ben Hutchings.]

    Signed-off-by: Benjamin Li
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Benjamin Li
     
  • Add PCI recovery functions to the driver. The initial pci state is
    also saved so the the MSI state can be restored during PCI recovery.

    Signed-off-by: Wendy Xiong
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Wendy Xiong
     
  • Andy Gospodarek found that netconsole would
    panic when resetting bnx2 devices.

    >From Andy:
    "The issue is the bnx2_set_link in bnx2_init_nic will print a link-status
    message before we are fully initialized and ready to start polling.
    Polling is currently disabled in this state, but since the
    __LINK_STATE_RX_SCHED is overloaded to not only try and disable polling
    but also to make the system aware there is something waiting to be
    polled, we really have to fix this in drivers.

    The problematic call is the one to netif_rx_complete as it tries to
    remove an entry from the poll_list when there isn't one."

    While this netconsole problem should be fixed separately, we really
    should not reset the PHY when changing ring sizes, MTU, or other
    similar settings. The PHY reset causes several seconds of unnecessary
    link disruptions.

    Signed-off-by: Michael Chan
    Acked-by: Andy Gospodarek
    Signed-off-by: David S. Miller

    Michael Chan
     

03 May, 2008

6 commits

  • Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The new RV2P firmware fixes 2 issues:

    1. The jumbo rx buffer page size is now configurable and set to the
    proper PAGE_SIZE. Before, it was assumed to be always 4K.

    2. Driver sometimes would crash when receiving jumbo packets mixed
    with firmware management packets. This was caused by the old
    firmware DMA'ing to the wrong address.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • We should zero out the context memory for 5709 before each reset. When
    we resume after suspend for example, the memory may not be zero and the
    chip may not function correctly.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The register BNX2_CTX_STATUS (0x1004) should be skipped on 5709 as it
    contains reserved bits.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • On some remote PHY blade systems, the driver receives no initial link
    interrupt. As a result, the GMII/MII MAC mode does not get setup properly.
    To fix this problem, we add an initial poll of the link state after chip
    reset.

    With this change, the setting of the initial carrier state in the init
    code can be eliminated.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • bnx2_set_remote_link() should be called under bp->phy_lock to protect
    against concurrent polling and interrupt calls. This change is needed
    by the next patch which will add one initial poll of the remote PHY
    link status.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     

01 May, 2008

1 commit

  • drivers/net/8390.c:37:2: warning: returning void-valued expression
    drivers/net/bnx2.c:1635:3: warning: returning void-valued expression
    drivers/net/xen-netfront.c:1806:2: warning: returning void-valued expression
    net/ipv4/tcp_hybla.c:105:3: warning: returning void-valued expression
    net/ipv4/tcp_vegas.c:171:3: warning: returning void-valued expression
    net/ipv4/tcp_veno.c:123:3: warning: returning void-valued expression
    net/sysctl_net.c:85:2: warning: returning void-valued expression

    Signed-off-by: Harvey Harrison
    Acked-by: Alan Cox
    Signed-off-by: David S. Miller

    Harvey Harrison
     

24 Feb, 2008

3 commits


10 Feb, 2008

1 commit

  • gcc-3.4.4 on powerpc:

    drivers/net/bnx2.c:67: error: version causes a section type conflict

    Cc: Jeff Garzik
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton