summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_ethtool.c
Commit message (Collapse)AuthorAgeFilesLines
* e1000: Move assignments in tests before testJoe Perches2008-07-221-20/+29
| | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: Remove spaces after casts and function namesJoe Perches2008-07-221-8/+8
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: Move extern function definitions to e1000.hJoe Perches2008-07-221-13/+0
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: Use hw, er32, and ew32Joe Perches2008-07-221-144/+169
| | | | | | | | | Use struct e1000_hw *hw = adapter->hw; where necessary Change macros E1000_READ_REG and E1000_WRITE_REG to er32 and ew32 Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: neaten function declarationsJoe Perches2008-07-221-107/+68
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: only enable TSO6 via ethtool when using correct hardwareAndy Gospodarek2008-06-271-1/+1
| | | | | | | | | When enabling TSO via ethool on e1000, it is possible to set NETIF_F_TSO6 on hardware that does not support it. Setting TSO via ethtool now matches the settings used when the hardware is probed. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: convert uint16_t style integers to u16Joe Perches2008-04-161-80/+80
| | | | | | | | Conglomerate from 4 separate patches from Joe. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* e1000: Convert boolean_t to boolJoe Perches2008-03-261-8/+9
| | | | | | | | | | | | | | On Thu, 2008-03-06 at 10:07 -0800, Kok, Auke wrote: > send me a patch for e1000 and for ixgb and I'll happily apply those :) boolean_t to bool TRUE to true FALSE to false comment typo ahread to ahead Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* replace code with FIELD_SIZEOFJulia Lawall2008-02-111-1/+1
| | | | | | Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [netdrvr] checkpatch cleanupsJeff Garzik2008-01-281-1/+1
| | | | Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* [E1000]: Convert regtest macro's to functionsJoe Perches2008-01-281-29/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimal macro to function conversion in e1000_ethtool.c Adds functions reg_pattern_test and reg_set_and_check Changes REG_PATTERN_TEST and REG_SET_AND_CHECK macros to call these functions. Saves ~2.5KB Compiled x86, untested (no hardware) old: $ size drivers/net/e1000/e1000_ethtool.o text data bss dec hex filename 16778 0 0 16778 418a drivers/net/e1000/e1000_ethtool.o new: $ size drivers/net/e1000/e1000_ethtool.o text data bss dec hex filename 14128 0 0 14128 3730 drivers/net/e1000/e1000_ethtool.o Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LENAlejandro Martinez Ruiz2008-01-281-1/+1
| | | | | | | | Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary to know the value of K when checking its size. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: fix memcpy in e1000_get_stringsRoel Kluin2007-12-071-1/+1
| | | | | | | | | | | | | | | | | | drivers/net/e1000/e1000_ethtool.c:113: #define E1000_TEST_LEN sizeof(e1000_gstrings_test) / ETH_GSTRING_LEN drivers/net/e1000e/ethtool.c:106: #define E1000_TEST_LEN sizeof(e1000_gstrings_test) / ETH_GSTRING_LEN E1000_TEST_LEN*ETH_GSTRING_LEN will expand to sizeof(e1000_gstrings_test) / (ETH_GSTRING_LEN * ETH_GSTRING_LEN) A lack of parentheses around defines causes unexpected results due to operator precedences. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: sparse warnings fixesStephen Hemminger2007-10-301-17/+12
| | | | | | | | | | | Fix sparse warnings and problems from e1000 driver. Added a sparse fix for the module param array index -- Auke Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_countJeff Garzik2007-10-101-12/+10
| | | | | | | These have been superceded by the new ->get_sset_count() hook. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctlsJeff Garzik2007-10-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | For the operations get-tx-csum get-sg get-tso get-ufo the default ethtool_op_xxx behavior is fine for all drivers, so we permit op==NULL to imply the default behavior. This provides a more uniform behavior across all drivers, eliminating ethtool(8) "ioctl not supported" errors on older drivers that had not been updated for the latest sub-ioctls. The ethtool_op_xxx() functions are left exported, in case anyone wishes to call them directly from a driver-private implementation -- a not-uncommon case. Should an ethtool_op_xxx() helper remain unused for a while, except by net/core/ethtool.c, we can un-export it at a later date. [ Resolved conflicts with set/get value ethtool patch... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/: all drivers/net/ cleanup with ARRAY_SIZEDenis Cheng2007-10-101-2/+1
| | | | | Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: Add device IDs of blade version of the 82571 quad portAuke Kok2007-09-271-0/+1
| | | | | | | | This blade-specific board form factor is identical to the 82571EB board. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: Add device IDs of new 82571 board variantsAuke Kok2007-08-141-0/+2
| | | | | | | | | This patch adds support for 2 new board variants: - A Quad port fiber 82571 board - A blade version of the 82571 quad copper board Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [NET]: ethtool_perm_addr only has one implementationMatthew Wilcox2007-07-311-1/+0
| | | | | | | | | All drivers implement ethtool get_perm_addr the same way -- by calling the generic function. So we can inline the generic function into the caller and avoid going through the drivers. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000: ROUND_UP macro cleanup in drivers/net/e1000Milind Arun Choudhary2007-04-281-3/+3
| | | | | | | | E1000_ROUNDUP macro cleanup, use ALIGN Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: Use kcalloc()Yan Burman2007-04-281-14/+12
| | | | | | | | Replace kmalloc+memsetout the driver. Slightly modified by Auke Kok. Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: Use ARRAY_SIZE macro when appropriateAhmed S. Darwish2007-04-281-1/+1
| | | | | | | | A patch to use ARRAY_SIZE macro already defined in kernel.h. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: allow ethtool to see link status when downKok, Auke2007-02-171-1/+1
| | | | | | | | | By reading the MAC status register we can detect whether the MAC has seen the PHY see link. This allows us to show the link properties before the device is up in ethtool. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* remove NETIF_F_TSO ifdeferyArjan van de Ven2007-02-051-6/+0
| | | | | | | | | Remove the NETIF_F_TSO #ifdef-ery in drivers/net; this was for old-old-2.4 compat (even current 2.4 has NETIF_F_TSO) but it's time to get rid of it by now. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: 3 new driver stats for managability testingJeff Garzik2006-12-261-0/+3
| | | | | | | | | | Add 3 extra packet redirect counters for tracking purposes to make sure we can test that all packets arrive properly. Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten to use feature flags by me. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: add queue restart counterJesse Brandeburg2006-12-021-0/+1
| | | | | | | | | Add a netif_wake/start_queue counter to the ethtool statistics to indicated to the user that their transmit ring could be too small for their workload. Signed-off-by: Jesse brandeburg <jesse.brandeburg@intel.com> Cc: Jamal Hadi <hadi@cyberus.ca> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: New hardware supportAuke Kok2006-12-021-0/+1
| | | | | | | Add support for a Low Profile quad-port PCI-E adapter and 2 variants of the ICH8 systems' onboard NIC's. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: FIX: enable hw TSO for IPV6Auke Kok2006-12-021-0/+7
| | | | | | | | | Enable TSO for IPV6. All e1000 hardware supports it. This reduces CPU utilizations by 50% when transmitting IPv6 frames. Fix symbol naming enabling ipv6 TSO. Turn off TSO6 for 10/100. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: whitespace changes, comments, typosAuke Kok2006-12-021-13/+14
| | | | | | Small whitespace changes, comment changes, typo fixes. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: FIX: 82542 doesn't support WoLAuke Kok2006-10-241-0/+1
| | | | | | Exclude 82542 when setting up WoL. This card does not do WoL at all. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: FIX: don't poke at manageability registers for incompatible adaptersJesse Brandeburg2006-10-241-1/+2
| | | | | | | | The MANC register should not be read for PCI-E adapters at all, as well as 82543 and older where 82543 would master abort when this register was accessed. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* e1000: possible memory leak in e1000_set_ringparamVasily Averin2006-09-271-21/+17
| | | | | | | | | | Memory allocated for new tx_ring and rx_ring leaks if e1000_setup_XX_resources() fails.c Also this patch reduces stack usage (removed tx_new and rx_new) and uses kzalloc instead kmalloc+memset(0) Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: driver state fixes (race fix)Auke Kok2006-09-271-3/+3
| | | | | | | | | | We were plagued by our interrupt handler posting a watchdog event which could occur when our adapter was going down in case a late packet arrived just before e1000_down() finished. This caused the watchdog timer to start after the NIC was down and keep rescheduling it every N seconds. Once the driver unloaded it would panic. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: allow ethtool to pass arbitrary speed advertismentJeff Kirsher2006-09-271-7/+3
| | | | | | | | | | With a patch, ethtool can now signify the driver to advertise more than just a single speed/duplex setting. This allows you to tell the card to advertise in 10/100 in any speed if you don't have a gigabit switch for instance. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: add multicast stats countersMitch Williams2006-09-271-14/+18
| | | | | | | | Add 4 multicast and broadcast hardware counters (rx/tx), and eliminate as many non-hardware counters as possible. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: remove unused code and make symbols staticNicholas Nunley2006-09-271-0/+15
| | | | | Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: rename flow control symbolsJeff Kirsher2006-09-271-7/+7
| | | | | Sogned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e100, e1000, ixgb: update copyright header and remove LICENSEAuke Kok2006-09-271-18/+17
| | | | | | | | This update to the copyright header adds the mailinglist, and aligns it with the kernel licensing as well as remove the offending 'all rights reserved'. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000, ixgb: Remove pointless wrappersJeff Garzik2006-09-191-10/+10
| | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* drivers/net: const-ify ethtool_ops declarationsJeff Garzik2006-09-131-1/+1
| | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* e1000: Add PCI ID 0x10a4 for our new 4-port PCI-Express deviceJesse Brandeburg2006-08-311-0/+1
| | | | | | | | Device 0x10a4 is a double 82571 on a single PCI-Express card and has 4 gigabit capable ports. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: unify WoL capability detection codeJesse Brandeburg2006-08-311-75/+91
| | | | | | | | | WoL is constantly giving problems and needed a rewrite. Consolidates all WoL capabilities into a single function, and disables WoL for all other ports on the device except for port A. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: Whitespace cleanup, cosmetic changesAuke Kok2006-08-281-27/+25
| | | | Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: explicit locking for two ethtool path functionsJesse Brandeburg2006-08-161-10/+23
| | | | | | | | Explicitly lock two more ethtool entry points completely instead of the hardware reset only to prevent a race condition. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* e1000: Explicitly power up the PHY during loopback testing.Jesse Brandeburg2006-08-161-0/+7
| | | | | Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
* Merge branch 'upstream' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 ↵Jeff Garzik2006-07-051-56/+85
|\ | | | | | | | | | | | | | | into upstream Conflicts: drivers/net/e1000/e1000_main.c
| * e1000: integrate ich8 support into driverAuke Kok2006-06-271-22/+58
| | | | | | | | | | | | | | | | This hooks up the ich8 structure into the driver itself. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
| * e1000: fix adapter led blinking inconsistencyAuke Kok2006-06-271-14/+1
| | | | | | | | | | | | | | | | | | Several e1000 adapters were not blinking correctly or inconsistently. This patch cleans this up and makes them all behave the same as far as possible. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
OpenPOWER on IntegriCloud