aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAge
* ixgbe: use different context for tso and offloadPJ Waskiewicz2008-09-03
| | | | | | | | | | | Change TSO offloads to use a different context than VLAN insertion and Tx checksumming. Hardware has separate registers internally for storing these so use them. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: fix dca hints going to wrong processorJesse Brandeburg2008-09-03
| | | | | | | | | hardware was configured incorrectly which led all hints to be sent to queue[0]'s DCA configuration. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: fix bug where lro settings are per ringJesse Brandeburg2008-09-03
| | | | | | Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: update dca to new interface, fix CONFIG_DCA_MODULEJesse Brandeburg2008-09-03
| | | | | | | | | | | | | DCA related fixes ================= - ixgbe was not compiling and using DCA correctly if dca was a module - DCA interface changed with new kernel - ixgbe was not correctly configured to indicate DCA hints to the correct CPU. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: should not use HW_CSUM, should use IP* flagsJesse Brandeburg2008-09-03
| | | | | | | | | | as mentioned by Herbert, our hardware supports IP offloads, not full checksum offloads for any protocol in existence (even though the hardware just provides generic csum support over any range of bytes) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: Lock RSS seed, move rx_buf_len to the rx_ringJesse Brandeburg2008-09-03
| | | | | | | | | | | This locks the seed down so loading/unloading the driver will present predictable hashing from RSS. Also move the rx_buf_len out of the adapter struct, and into the Rx ring struct. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: Implement Tx Head WritebackJesse Brandeburg2008-09-03
| | | | | | | | | | Enable Tx Head Writeback in the hardware. This helps performance by removing adapter writebacks to descriptors on transmit completion. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: disable flow control by defaultJesse Brandeburg2008-09-03
| | | | | | | | | Since the adapter cannot tell what the remote end's flow control capability is through auto-neg, we must turn off flow control by default. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: Cleanup references to Tx and Rx rings to becommon across the driverJesse Brandeburg2008-09-03
| | | | | | | | | | Cleanup all the different references to the Tx ring and Rx ring structures and make them common across the driver. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: do not update stats twice each receiveJesse Brandeburg2008-09-03
| | | | | | Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: Implement HAVE_SET_RX_MODEChristopher Leech2008-09-03
| | | | | | | | | Implement HAVE_SET_RX_MODE in the driver for MC and UC lists. Signed-off-by: Christopher Leech <christopher.leech@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: add little endian annotations for sparseJesse Brandeburg2008-09-03
| | | | | | Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ixgbe: fix rx csum return status misinterpretationJesse Brandeburg2008-09-03
| | | | | | | | | | | | the driver was misinterpreting rx_csum return value in the descriptor so occassionally we would indicate an rx_csum error in our stats when there was none. This would have no effect on traffic because we would just hand the packet to the stack anyway without the offload flag set, but would increase CPU for those packets that needed a recompute. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ibm_newemac: MAL[12]_IER_EVENTS definition: 2x *_OTE -> *_DEroel kluin2008-09-03
| | | | | | | | MAL[12]_IER_EVENTS definitions have MAL_IER_OTE twice but lack MAL_IER_DE Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* hp-plus: fix link objectsRandy Dunlap2008-09-03
| | | | | | | | | | | | | | | | | | Fix hp-plus Makefile object file: drivers/built-in.o: In function `hpp_open': hp-plus.c:(.text+0xaf445): undefined reference to `ei_interrupt' hp-plus.c:(.text+0xaf4ac): undefined reference to `ei_open' drivers/built-in.o: In function `hpp_close': hp-plus.c:(.text+0xaf59d): undefined reference to `ei_close' drivers/built-in.o: In function `hpp_probe1': hp-plus.c:(.init.text+0x7314): undefined reference to `ei_poll' drivers/built-in.o: In function `hp_plus_probe': (.init.text+0x7407): undefined reference to `__alloc_ei_netdev' make[1]: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* bonding: change some __constant_htons() to htons()Brian Haley2008-09-03
| | | | | | | | | | | | Resending since I didn't see any responses from the first try. Change __constant_htons() to htons() in the bonding driver, it should only be used for initializers. -Brian Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Rework efx_set_multicast_hash()Ben Hutchings2008-09-03
| | | | | | | | | | | When !port_enabled, defer the write to reconfigure_mac_wrapper. Whilst here, simplify the logic now that efx_start_port() always calls efx_reconfigure_port(). From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove the STATE_RESETTING flagBen Hutchings2008-09-03
| | | | | | | | This was originally a kludge to fix broken locking, which has since been fixed properly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Extend self-testsBen Hutchings2008-09-03
| | | | | | | | | | | | | Include PMA/PMD in loopback self-tests as intended. Add NVRAM checksum validation and include it in self-tests. Add register self-tests. Run PHY self-tests where available. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Rework the bitfield header so that we can identify fields by bit numberBen Hutchings2008-09-03
| | | | | | | | This will support register self-tests. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Cleanup reset codeBen Hutchings2008-09-03
| | | | | | | | | | Move more code from efx_reset() into efx_reset_down() and efx_reset_up(). Stop propagating MAC/PHY setting failures from efx_reset_down() and efx_reset_up() as these should not be fatal. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove some unreachable error pathsBen Hutchings2008-09-03
| | | | | | | | Some functions return an error code which is always 0. Change their return types to void and simplify their callers accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove remnants of multi-port abstraction for MAC registersBen Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove efx_nic_dummy_op_int() as redundant with efx_port_dummy_op_int()Ben Hutchings2008-09-03
| | | | | | | | | Update comment on the dummy operation implementations. Line up the board operation initialisers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Enable TSO for 802.1q VLAN devicesBen Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Do not call netif_{stop,wake}_queue() before register_netdevSteve Hodgson2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Make PHY flash mode a device attribute, not a module parameterBen Hutchings2008-09-03
| | | | | | | | | | | | | This allows updating PHY firmware for one interface without removing all other interfaces handled by the driver. Replace tx_disabled flags and 10Xpress status enumeration with flags in enum efx_phy_mode. Prevent an interface from being brought up while in PHY flash mode. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Implement get_sset_count, replacing get_stats_count and self_test_countBen Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Cleanup RX event processingBen Hutchings2008-09-03
| | | | | | | | | | | | | Make efx_process_channel() and falcon_process_eventq() return the number of packets received rather than updating the quota, consistent with new NAPI. Since channels and RX queues are mapped one-to-one, remove return value from falcon_handle_rx_event() and add a warning for events with the wrong RX queue number. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove efx_channel::evqnum fieldBen Hutchings2008-09-03
| | | | | | | It is redundant with efx_channel::channel. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Make efx_for_each_channel_rx_queue() more efficientBen Hutchings2008-09-03
| | | | | | | | Currently each channel can have at most one RX queue, so go straight to that one. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove initialisation of RX_FILTER_CTL_REG.NUM_KERBen Hutchings2008-09-03
| | | | | | | | We have long since given up doing RSS on Falcon A1 and therefore we would always write the default value of 0. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Cleanup RX queue informationBen Hutchings2008-09-03
| | | | | | | | | Rename efx_nic::rss_queues to the more obvious n_rx_queues Remove efx_rx_queue::used and other stuff that's redundant with it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove efx_channel::has_interruptBen Hutchings2008-09-03
| | | | | | | | | efx_channel::has_interrupt is redundant with efx_channel::used_flags. Remove efx_test_eventq() because it is now obviously unreachable. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Move CPU counting for RSS into a separate function, efx_wanted_rx_queues()Ben Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Export boot configuration in EEPROM through ethtoolBen Hutchings2008-09-03
| | | | | | | Extend the SPI device setup code to support this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Removed forced inlining of long functionsBen Hutchings2008-09-03
| | | | | | | | | gcc will automatically inline static functions with only one caller, and may inline other functions depending on the kernel configuration and size of the intermediate code. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Cleaned up struct tso_state fieldsBen Hutchings2008-09-03
| | | | | | | | | | | | Squashed nested structures. Renamed remaining_len to out_len, ifc.len to in_len, header_length to header_len. Moved ipv4_id into the group of output variables where it belongs. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Set net_device::vlan_features appropriatelyBen Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Use explicit bool for boolean variables, parameters and return valuesBen Hutchings2008-09-03
| | | | | | | | | | | | Replace (cond ? 1 : 0) with cond or !!cond as appropriate, and (cond ? 0 : 1) with !cond. Remove some redundant boolean temporaries. Rename one field that looks like a flag but isn't. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Reduce the size of struct efx_tx_bufferBen Hutchings2008-09-03
| | | | | | | | Remove unmap_addr since it can be calculated from dma_addr, len and unmap_len. This saves 4-16 bytes. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Use pci_map_single() to map the skb header when doing TSOBen Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Don't leak PCI DMA maps in the TSO code when the queue fills upBen Hutchings2008-09-03
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Speed up loopback self-testBen Hutchings2008-09-03
| | | | | | | | | | | | | | Add efx_poll_loopback() function to test for successful completion of test. Change efx_test_loopback() to end the test after 1 ms if efx_poll_loopback() indicates success, and otherwise to wait for 100 ms as before. While we're here, rename efx_{rx,tx}_loopback() to efx_{begin,end}_loopback() which more accurately reflect their purpose. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Self-test reporting cleanupBen Hutchings2008-09-03
| | | | | | | | Removed log messages that are redundant with calling functions. Fixed bitwise or-ing of return codes. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Reduce log level for XGXS lane statusBen Hutchings2008-09-03
| | | | | | | This was making noise during 10Xpress self-test. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Reverse the XOFF/XON pause frame control fifo thresholdsBen Hutchings2008-09-03
| | | | | | | | These were clearly bogus. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove inclusion of workarounds.h from efx.cBen Hutchings2008-09-03
| | | | | | | efx.c does not use hardware workarounds. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: XMAC statistics fix-upsBen Hutchings2008-09-03
| | | | | | | | | | Exclude assumed size of RX control frames from rx_bad_bytes. Exclude assumed size of TX control frames from tx_good_bytes for consistency with rx_good_bytes. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sfc: Remove mistaken hardware workaroundBen Hutchings2008-09-03
| | | | | | | | We believed that some valid SNAP frames were being marked as invalid. In fact this is not the case and no workaround is needed. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>