aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sfc
AgeCommit message (Collapse)AuthorFilesLines
2008-09-24sfc: Add check for memory allocation failure in falcon_probe_nic()Ben Hutchings1-0/+2
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Rework efx_set_multicast_hash()Ben Hutchings1-11/+17
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 <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove the STATE_RESETTING flagBen Hutchings2-6/+2
This was originally a kludge to fix broken locking, which has since been fixed properly. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Extend self-testsBen Hutchings12-184/+429
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Rework the bitfield header so that we can identify fields by bit numberBen Hutchings2-68/+95
This will support register self-tests. From: Steve Hodgson <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Cleanup reset codeBen Hutchings1-57/+41
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove some unreachable error pathsBen Hutchings9-95/+39
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove remnants of multi-port abstraction for MAC registersBen Hutchings4-170/+129
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove efx_nic_dummy_op_int() as redundant with efx_port_dummy_op_int()Ben Hutchings1-11/+6
Update comment on the dummy operation implementations. Line up the board operation initialisers. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Enable TSO for 802.1q VLAN devicesBen Hutchings2-7/+20
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Do not call netif_{stop,wake}_queue() before register_netdevSteve Hodgson1-2/+3
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Make PHY flash mode a device attribute, not a module parameterBen Hutchings9-123/+171
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Implement get_sset_count, replacing get_stats_count and self_test_countBen Hutchings1-11/+12
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Cleanup RX event processingBen Hutchings3-36/+23
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove efx_channel::evqnum fieldBen Hutchings3-10/+7
It is redundant with efx_channel::channel. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Make efx_for_each_channel_rx_queue() more efficientBen Hutchings1-3/+3
Currently each channel can have at most one RX queue, so go straight to that one. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove initialisation of RX_FILTER_CTL_REG.NUM_KERBen Hutchings1-7/+2
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Cleanup RX queue informationBen Hutchings4-58/+27
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove efx_channel::has_interruptBen Hutchings4-67/+12
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Move CPU counting for RSS into a separate function, efx_wanted_rx_queues()Ben Hutchings1-25/+35
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Export boot configuration in EEPROM through ethtoolBen Hutchings5-95/+446
Extend the SPI device setup code to support this. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Removed forced inlining of long functionsBen Hutchings4-50/+49
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Cleaned up struct tso_state fieldsBen Hutchings1-86/+75
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Set net_device::vlan_features appropriatelyBen Hutchings1-0/+3
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Use explicit bool for boolean variables, parameters and return valuesBen Hutchings18-178/+175
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Reduce the size of struct efx_tx_bufferBen Hutchings2-11/+11
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Use pci_map_single() to map the skb header when doing TSOBen Hutchings1-69/+83
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Don't leak PCI DMA maps in the TSO code when the queue fills upBen Hutchings1-0/+5
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Speed up loopback self-testBen Hutchings1-15/+29
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Self-test reporting cleanupBen Hutchings1-26/+16
Removed log messages that are redundant with calling functions. Fixed bitwise or-ing of return codes. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Reduce log level for XGXS lane statusBen Hutchings1-1/+1
This was making noise during 10Xpress self-test. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Reverse the XOFF/XON pause frame control fifo thresholdsBen Hutchings1-2/+2
These were clearly bogus. From: Steve Hodgson <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove inclusion of workarounds.h from efx.cBen Hutchings1-1/+0
efx.c does not use hardware workarounds. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: XMAC statistics fix-upsBen Hutchings1-2/+4
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove mistaken hardware workaroundBen Hutchings2-63/+4
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Reduce delays in SFE4001 initialisationBen Hutchings1-22/+35
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Avoid mangling error codes in efx_test_loopback()Ben Hutchings1-6/+6
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Use separate hardware TX queues to select checksum generationBen Hutchings7-92/+48
Checksum generation is an attribute of our hardware TX queues, not TX descriptors. We previously used a single queue and turned checksum generation on or off as requested through ethtool. However, this can result in regenerating checksums in raw packets that should not be modified. We now create 2 hardware TX queues with checksum generation on or off. They are presented to the net core as one queue since it does not know how to select between them. The self-test verifies that a bad checksum is unaltered on the queue with checksum generation off. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Remove unused field efx_channel::reset_workSteve Hodgson1-1/+0
Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Change first parameter type of {set,clear}_bit_le() to unsignedBen Hutchings1-2/+2
This means the compiler doesn't need to use real division instructions. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-09-03sfc: Replace net_dev->priv with netdev_priv(net_dev)Ben Hutchings4-32/+32
Use of the net_device::priv field is deprecated. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-07-26dma-mapping: add the device argument to dma_mapping_error()FUJITA Tomonori2-5/+6
Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER architecture does: This enables us to cleanly fix the Calgary IOMMU issue that some devices are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423). I think that per-device dma_mapping_ops support would be also helpful for KVM people to support PCI passthrough but Andi thinks that this makes it difficult to support the PCI passthrough (see the above thread). So I CC'ed this to KVM camp. Comments are appreciated. A pointer to dma_mapping_ops to struct dev_archdata is added. If the pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's NULL, the system-wide dma_ops pointer is used as before. If it's useful for KVM people, I plan to implement a mechanism to register a hook called when a new pci (or dma capable) device is created (it works with hot plugging). It enables IOMMUs to set up an appropriate dma_mapping_ops per device. The major obstacle is that dma_mapping_error doesn't take a pointer to the device unlike other DMA operations. So x86 can't have dma_mapping_ops per device. Note all the POWER IOMMUs use the same dma_mapping_error function so this is not a problem for POWER but x86 IOMMUs use different dma_mapping_error functions. The first patch adds the device argument to dma_mapping_error. The patch is trivial but large since it touches lots of drivers and dma-mapping.h in all the architecture. This patch: dma_mapping_error() doesn't take a pointer to the device unlike other DMA operations. So we can't have dma_mapping_ops per device. Note that POWER already has dma_mapping_ops per device but all the POWER IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device argument. [[email protected]: fix sge] [[email protected]: fix svc_rdma] [[email protected]: build fix] [[email protected]: fix bnx2x] [[email protected]: fix s2io] [[email protected]: fix pasemi_mac] [[email protected]: fix sdhci] [[email protected]: build fix] [[email protected]: fix sparc] [[email protected]: fix ibmvscsi] Signed-off-by: FUJITA Tomonori <[email protected]> Cc: Muli Ben-Yehuda <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Avi Kivity <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-22sfc: Create one RX queue and interrupt per CPU package by defaultBen Hutchings1-1/+18
Using multiple cores in the same package to handle received traffic does not appear to provide a performance benefit. Therefore use CPU topology information to count CPU packages and use that as the default number of RX queues and interrupts. We rely on interrupt balancing to spread the interrupts across packages. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-07-22sfc: Use a separate workqueue for resetsBen Hutchings2-4/+21
This avoids deadlock in case a reset is triggered during self-test. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-07-22sfc: I2C adapter initialisation fixesBen Hutchings1-9/+3
As recommended by Jean Delvare: - Increase timeout to 50 ms - Leave adapter class clear so that unwanted drivers do not probe our bus - Use strlcpy() for name initialisation Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-07-15netdev: Do not use TX lock to protect address lists.David S. Miller1-4/+2
Now that we have a specific lock to protect the network device unicast and multicast lists, remove extraneous grabs of the TX lock in cases where the code only needs address list protection. Signed-off-by: David S. Miller <[email protected]>
2008-07-15netdev: Add netdev->addr_list_lock protection.David S. Miller1-0/+2
Add netif_addr_{lock,unlock}{,_bh}() helpers. Use them to protect operations that operate on or read the network device unicast and multicast address lists. Also use them in cases where the code simply wants to block calls into the driver's ->set_rx_mode() and ->set_multicast_list() methods. Signed-off-by: David S. Miller <[email protected]>
2008-06-13Merge branch 'master' of ↵David S. Miller1-1/+3
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/smc911x.c
2008-06-10sfc: Recover from RX queue flush failureSteve Hodgson1-1/+3
RX queue flush can fail if traffic continues to arrive. Recover by performing an invisible reset. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2008-06-10Merge branch 'master' of ↵David S. Miller1-1/+1
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h