aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sfc
AgeCommit message (Collapse)Author
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-09-24sfc: Fix type of FALCON_SPI_MAX_LENBen Hutchings
FALCON_SPI_MAX_LEN has type size_t while other SPI lengths have type unsigned int. This results in warnings from min() on 64-bit architectures where they are different. Add a cast to make it match. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Use CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS where appropriateBen Hutchings
For some buffers we use a starting offset of either NET_IP_ALIGN or 0 depending on whether we believe the architecture supports efficient access to unaligned words. There is now a config macro specifying whether this is the case, so check that rather than checking for specific architectures. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Remove obsolete comment about PCI modesBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Disable interrupts after a fatal interrupt occurs until resetBen Hutchings
This should avoid an interrupt storm, which has been observed in the field with one faulty board. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Insert read memory barrier after checking MAC statistics flagBen Hutchings
This prevents speculative reading of the statistics before the completion flag. From: Neil Turton <nturton@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Stop generating bogus events in tenxpress_check_hw()Ben Hutchings
mdio_clause45_links_ok() correctly checks efx_phy_mode_disabled(), so tenxpress_link_ok() doesn't need to. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Don't include net_driver.h from falcon_io.hSteve Hodgson
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Make queue flushes more reliableBen Hutchings
Increase the potential retry count for RX flushes from 5 to 100. Stop polling the RX_DESC_PTR_TBL to infer that a flush might have happened. Instead absolutely rely on the flush events, unless bug 7803 applies (Falcon rev A only). To keep things quick, request flushes for every TX and RX queue up front, and match up the events to requests. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Don't use EFX_OWORD_FIELD on an event (64-bit, quad-word)Steve Hodgson
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Serialise tenxpress_special_reset() with statistics fetchesBen Hutchings
On some boards 10Xpress feeds a 156 MHz clock to the Falcon XMAC. MAC statistics DMA can fail while this clock is stopped during a PHY reset. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Remove workaround for old firmware bugBen Hutchings
There was a bug in XAUI synchronisation in early 10Xpress firmware versions. This is fixed in released firmware and we do not need to work around it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Fix memory BAR release call on error pathBen Hutchings
Match pci_request_region() with pci_release_region(), not release_mem_region(). From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24sfc: Add check for memory allocation failure in falcon_probe_nic()Ben Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Rework efx_set_multicast_hash()Ben Hutchings
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>
2008-09-03sfc: Remove the STATE_RESETTING flagBen Hutchings
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>
2008-09-03sfc: Extend self-testsBen Hutchings
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>
2008-09-03sfc: Rework the bitfield header so that we can identify fields by bit numberBen Hutchings
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>
2008-09-03sfc: Cleanup reset codeBen Hutchings
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>
2008-09-03sfc: Remove some unreachable error pathsBen Hutchings
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>
2008-09-03sfc: Remove remnants of multi-port abstraction for MAC registersBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Remove efx_nic_dummy_op_int() as redundant with efx_port_dummy_op_int()Ben Hutchings
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>
2008-09-03sfc: Enable TSO for 802.1q VLAN devicesBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Do not call netif_{stop,wake}_queue() before register_netdevSteve Hodgson
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Make PHY flash mode a device attribute, not a module parameterBen Hutchings
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>
2008-09-03sfc: Implement get_sset_count, replacing get_stats_count and self_test_countBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Cleanup RX event processingBen Hutchings
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>
2008-09-03sfc: Remove efx_channel::evqnum fieldBen Hutchings
It is redundant with efx_channel::channel. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Make efx_for_each_channel_rx_queue() more efficientBen Hutchings
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>
2008-09-03sfc: Remove initialisation of RX_FILTER_CTL_REG.NUM_KERBen Hutchings
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>
2008-09-03sfc: Cleanup RX queue informationBen Hutchings
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>
2008-09-03sfc: Remove efx_channel::has_interruptBen Hutchings
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>
2008-09-03sfc: Move CPU counting for RSS into a separate function, efx_wanted_rx_queues()Ben Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Export boot configuration in EEPROM through ethtoolBen Hutchings
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>
2008-09-03sfc: Removed forced inlining of long functionsBen Hutchings
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>
2008-09-03sfc: Cleaned up struct tso_state fieldsBen Hutchings
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>
2008-09-03sfc: Set net_device::vlan_features appropriatelyBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Use explicit bool for boolean variables, parameters and return valuesBen Hutchings
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>
2008-09-03sfc: Reduce the size of struct efx_tx_bufferBen Hutchings
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>
2008-09-03sfc: Use pci_map_single() to map the skb header when doing TSOBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Don't leak PCI DMA maps in the TSO code when the queue fills upBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Speed up loopback self-testBen Hutchings
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>
2008-09-03sfc: Self-test reporting cleanupBen Hutchings
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>
2008-09-03sfc: Reduce log level for XGXS lane statusBen Hutchings
This was making noise during 10Xpress self-test. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Reverse the XOFF/XON pause frame control fifo thresholdsBen Hutchings
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>
2008-09-03sfc: Remove inclusion of workarounds.h from efx.cBen Hutchings
efx.c does not use hardware workarounds. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: XMAC statistics fix-upsBen Hutchings
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>
2008-09-03sfc: Remove mistaken hardware workaroundBen Hutchings
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>
2008-09-03sfc: Reduce delays in SFE4001 initialisationBen Hutchings
Currently the board initialisation includes 2 delays of 1 second each. Usually it is unnecessary to wait that long, so check before doing so. Correct some of the comments and log messages while we're here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Avoid mangling error codes in efx_test_loopback()Ben Hutchings
efx_test_loopback() used "|" to combine the results of the RX and TX phases. If both phases fail with different error codes, this results in a bogus error code. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>