12 Dec, 2010

2 commits

  • Put immutable data in read/only section.

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

    Jon Mason
     
  • modparm rx_ring_sz can be set to be greater than the maximum allowable
    number of blocks. This results in an array overrun when probing the
    driver, and causes memory corruption.

    Also, the MAX_RX_DESC_1 multiply the max number of rings by max number
    of blocker per ring by 127, but the driver does the same calculation
    with 127+1. This results in the possibility of the value being set
    being larger than the maximum allowable value.

    Finally, clean-up the s2io_ethtool_gringparam code to be more
    intuitive.

    Signed-off-by: Jon Mason
    Signed-off-by: David S. Miller

    Jon Mason
     

26 Aug, 2010

1 commit


19 Aug, 2010

1 commit

  • usr_addrs is never referenced outside the initial struct population
    during open, thus making it unnecessary. Remove it, the code that
    references it, and the struct that it is the only user of.

    Signed-off-by: Jon Mason
    Signed-off-by: David S. Miller

    Jon Mason
     

28 Jul, 2010

1 commit


27 Jul, 2010

1 commit

  • Patch 9e39f7c5b311a306977c5471f9e2ce4c456aa038 changed the
    DBG_PRINT() macro and the if clause was wrongly changed. It means
    that currently all the DBG_PRINT are being printed, flooding the
    kernel log buffer with things like:

    s2io: eth6: Next block at: c0000000b9c90000
    s2io: eth6: In Neterion Tx routine

    Signed-off-by: Breno Leitao
    Acked-by: Sreenivasa Honnur
    Signed-off-by: David S. Miller

    Breno Leitao
     

16 Jul, 2010

1 commit


03 Jul, 2010

1 commit

  • This patch resolves a number of issues in the statistics gathering of
    the s2io driver.

    On Xframe adapters, the received multicast statistics counter includes
    pause frames which are not indicated to the driver. This can cause
    issues where the multicast packet count is higher than what has actually
    been received, possibly higher than the number of packets received.

    The driver software counters are replaced with the adapter hardware
    statistics for rx_packets, rx_bytes, and tx_bytes. It also uses the
    overflow registers to determine if the statistics wrapped the 32bit
    register (removing the window of having a statistic value less than the
    previous call). rx_length_errors statistic now includes undersized
    packets in addition to oversized packets in its counting. Finally,
    rx_crc_errors are now being counted.

    Signed-off-by: Jon Mason
    Signed-off-by: David S. Miller

    Jon Mason
     

31 Aug, 2009

1 commit

  • Single line log messages should be emitted by a single call
    where possible.

    Converted multiple calls to DBG_PRINT to single call form.
    Removed "s2io:" preface from DBG_PRINTs.

    The DBG_PRINT macro now emits a log level and is surrounded by
    a do {...} while (0)

    All s2io log output is now prefaced with KBUILD_MODNAME ": "
    via pr_fmt.

    The DBG_PRINT macro should probably be converted to use the
    dev_ form eventually.

    Signed-off-by: Joe Perches
    Acked-by: Sreenivasa Honnur
    Signed-off-by: David S. Miller

    Joe Perches
     

08 Jun, 2009

1 commit


25 Sep, 2008

1 commit

  • VLAN doesn't work except if you'd opened the interface in promiscuous
    mode before. This happens because VLAN tag stripping is not correctly
    marked as enabled at device startup

    Also, the vlan_strip_flag field was moved to the private network
    structure.

    Signed-off-by: Breno Leitao
    Signed-off-by: Jay Vosburgh
    Signed-off-by: Jeff Garzik

    Breno Leitao
     

11 Jul, 2008

1 commit

  • - Enable msi-x link interrupts because the timer based scheduler was getting
    cancelled causing the link state to be lost with repetitive card up/downs
    when changing the mtu.
    - Unmask mac_rmac_link interrupts only for Xframe I and prevent a spurious
    link interrupt in Xframe II.
    - Stop the tx queue and indicate link down when card is down

    Signed-off-by: Santosh Rastapur
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sreenivasa Honnur
     

28 Jun, 2008

1 commit


27 Jun, 2008

1 commit

  • s2io has IOMMU overflow checking, but unfortunately it is wrong.

    It didn't use the standard macros, which meant that it only worked
    on POWER and SPARC because only those define DMA_ERROR_CODE. Convert it to
    use the standard macros instead.

    I also commented two more bugs in the IOMMU handling. It assumes
    that 0 DMA addresses cannot happen, but that's not true in all IOMMU setups.
    The information if a buffer has been already mapped needs to be stored
    elsewhere.

    Didn't fix those because it needs careful checking of the buffer handling
    by the maintainers.

    Cc: ram.vepa@neterion.com
    Cc: santosh.rastapur@neterion.com
    Cc: sivakumar.subramani@neterion.com
    Cc: sreenivasa.honnur@neterion.com

    Signed-off-by: Andi Kleen
    Signed-off-by: Jeff Garzik

    Andi Kleen
     

26 May, 2008

1 commit


22 May, 2008

2 commits


13 May, 2008

1 commit


29 Apr, 2008

1 commit

  • - Seperate ring specific data
    - Initialize all configured rings with equal priority.
    - Updated boundary check for number of Rings.
    - Updated per ring statistics of rx_bytes and rx_packets.
    - Moved lro struct from struct s2io_nic to struct ring_info.
    - Access respective rx ring directly in fill_rx_buffers.
    - Moved rx_bufs_left struct s2io_nic to struct ring_info.
    - Added per ring variables - rxd_mode, rxd_count, dev, pdev.

    Signed-off-by: Surjit Reang
    Signed-off-by: Sreenivasa Honnur
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sreenivasa Honnur
     

25 Apr, 2008

2 commits


17 Mar, 2008

3 commits

  • - Resubmit #3
    - Added s2io_vlan_rx_kill_vid entry point function for unregistering vlan.
    - Fix to aggregate vlan packets. IP offset is incremented by
    4 bytes if the packet contains vlan header.

    Signed-off-by: Surjit Reang
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sreenivasa Honnur
     
  • - Resubmit #2
    - Transmit fifo selection based on TCP/UDP ports.
    - Added tx_steering_type loadable parameter for transmit fifo selection.
    0x0 NO_STEERING: Default FIFO is selected.
    0x1 TX_PRIORITY_STEERING: FIFO is selected based on skb->priority.
    0x2 TX_DEFAULT_STEERING: FIFO is selected based on L4 Ports.

    Signed-off-by: Surjit Reang
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sreenivasa Honnur
     
  • - Resubmit #3
    Multiqueue netwrok device support implementation.
    - Added a loadable parameter "multiq" to enable/disable multiqueue support,
    by default it is disabled.
    - skb->queue_mapping is not used for queue/fifo selection. FIFO selection is
    based on skb->priority.
    - Added per FIFO flags FIFO_QUEUE_START and FIFO_QUEUE_STOP. Check this flag
    for starting and stopping netif queue and update the flags accordingly.
    - In tx_intr_handler added a check to ensure that we have free TXDs before wak-
    ing up the queue.
    - Added helper functions for queue manipulation(start/stop/wakeup) to invoke
    appropriate netif_ functions.
    - Calling netif_start/stop for link up/down case respectively.

    - As per Andi kleen's review comments, using skb->priority field for FIFO
    selection.

    Signed-off-by: Surjit Reang
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sreenivasa Honnur
     

03 Feb, 2008

1 commit

  • Resubmitting patch from Al Viro , with subject -
    [PATCH] s2io LRO bugs.
    a) initiate_new_session() sets ->tcp_ack to ntohl(...); everything
    else stores and expects to find there the net-endian value.
    b) check for monotonic timestamps in verify_l3_l4_lro_capable()
    compares the value sitting in TCP option (right there in the skb->data,
    net-endian 32bit) with the value picked from earlier packet.
    Doing that without ntohl() is an interesting idea and it might even
    work occasionally; unfortunately, it's quite broken.

    Signed-off-by: Surjit Reang
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Surjit Reang
     

29 Jan, 2008

2 commits

  • Fixes to enable multiple transmit fifos (upto a maximum of eight).
    - Moved single tx_lock from struct s2io_nic to struct fifo_info.
    - Moved single ufo_in_band_v structure from struct s2io_nic to struct
    fifo_info.
    - Assign the respective interrupt number for the transmitting fifo in the
    transmit descriptor (TXD).
    - Added boundary checks for number of FIFOs enabled and FIFO length.

    Signed-off-by: Surjit Reang
    Signed-off-by: Sreenivasa Honnur
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Surjit Reang
     
  • - Support to add/delete/store/restore 64 and 128 Ethernet addresses for Xframe I and Xframe II respectively.

    Signed-off-by: Sreenivasa Honnur
    Signed-off-by: David S. Miller

    Sreenivasa Honnur
     

20 Oct, 2007

1 commit

  • s2io, rename BIT macro

    BIT macro will be global definiton of (1<
    Cc: Ramkrishna Vepa
    Cc: Rastapur Santosh
    Cc: Sivakumar Subramani
    Cc: Sreenivasa Honnur
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

11 Oct, 2007

10 commits

  • - Added set_mac_address driver entry point
    - Copying permanent mac address to dev->perm_addr
    - Incorporated following review comments from Jeff
    - Converted the macro to a function and removed call to memset
    - regarding function naming convention, for all callbacks and entry points
    will have 's2io_' prefix and helper functions will have 'do_s2io_' prefix.

    Signed-off-by: Sreenivasa Honnur
    Signed-off-by: Jeff Garzik

    Sivakumar Subramani
     
  • Removed bimodal interrupt support - unused feature

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    [also, trim trailing whitespace]

    Sivakumar Subramani
     
  • - Code Optimization of s2io_isr function.
    - Isr check using per device napi variable instead of driver global.
    - Reduced from 3 to 1 if condition before check for processing packet receive
    packets.
    - Implemented Jeff's comment to use synchronize_irq. Removed the isr_cnt
    variable as it became redundant.
    - One time de assert the interrupts by writing all F's to the general_int_mask
    register instead of de asserting by clearing the source of interrupts with
    multiple writes which causes loss of interrupts (race conditions). It is
    entirely possible that before the driver has a chance to mask the asserted
    alarm bit, another alarm/traffic interrupt bit gets asserted as well. In
    this case Herc will keep the INTA line asserted and the bridge will not
    send a new Assert_INTA message upstream.

    [ Resolved conflicts due to napi_struct changes... -DaveM ]

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

    Sivakumar Subramani
     
  • - Added check to return from the traffic handling function, if the card status
    is DOWN.
    - Implemented Jeff's comments on incorrect return value in s2io_poll function.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Santosh Rastapur
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sivakumar Subramani
     
  • - Removed the unused variable, intr_type, in device private structure.

    [ Resolve conflicts with napi_struct changes... -DaveM ]

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

    Sivakumar Subramani
     
  • - Added support to poll entire set of device errors and alarams.
    - A note on how device errors and alarms are handled:
    - The adapter will automatically recover from uncorrectable ECC errors.
    Packets containing corrupted data will be dropped (not transmitted) or tagged
    as invalid before being passed to the host.
    - The adapter cannot recover from any internal state machine errors. A state
    machine error requires a device reset.
    - Any internal error that could potentially result in .store trampling.
    (undesirable PCI behaviour)is tagged as a "serious error". In such cases
    the adapter will give up its ability to be a bus master. In this situation
    the host will still be able to read internal device registers in order to
    generate an error report. A device reset is necessary to return to normal
    operation.
    - In the event of a pcix data parity error, the adapter will automatically
    disable itself. Adapter_En will automatically transition from '1' to '0' and
    the adapter will enter its clean-up routine. Once the device has achieved
    quiescence, an adapter reset should be performed.
    - Replaced alarm_intr_handler() with s2io_handle_errors().
    - Added statistic counters to monitor the alarms.

    [ Fix warnings wrt. do_s2io_chk_alarm_bit(), Callers pass in an
    "unsigned long long *" but the function takes a "u64 *" which is
    different on many 64-bit platforms. -DaveM ]

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Santosh Rastapur
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sivakumar Subramani
     
  • - Added support to unmask entire set of device errors and alarams.
    Alarm interrupts are generated for a myriad of purposes, ranging from
    illegal operations or requests to internal state machine errors and
    uncorrectable data corruption errors. In several cases the adapter can
    recover gracefully from unexpected events; however, in some cases, a device
    reset may be necessary. This patch handles alarms generated by all the
    blocks within the device.

    The adapter generates the following types of alarms:
    1. Link state transitions (local/remote fault) or other link-related
    problems.
    2. Problems with any device peripherals, including the EEPROM, FLASH,
    etc.
    3. Correctable ECC errors (single-bit errors) on internal data
    structures or frame data.
    4. Uncorrectable ECC errors (multi-bit errors) on internal data
    structures or frame data.
    5. State machine errors, which indicate that internal control
    structures have become corrupted.
    6. PCI related errors, including parity errors or illegal transactions.
    7. Other unexpected events.

    - Implemented Jeff's review comments to use do_s2io_write_bits function to avoid
    duplicate codes.

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Santosh Rastapur
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sivakumar Subramani
     
  • - Calling store_xmsi_data to store the MSI-X datas during initialization
    in s2io-init_nic function
    - Disabling NAPI when MSI-X is enabled
    - Freeing sp->entries and sp->s2io_entries in s2io_rem_isr

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik

    Sivakumar Subramani
     
  • - Making MSIX as default intr_type
    - Driver will test MSI-X by issuing test MSI-X vector and if fails it will
    fallback to INTA

    Signed-off-by: Sivakumar Subramani
    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Sivakumar Subramani
     
  • 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
     

31 Jul, 2007

2 commits