Commit a82fa3a4 authored by Scott Feldman's avatar Scott Feldman Committed by Jeff Garzik

e100 net driver update:

* Added Documentation/networking/e100.txt.
* Added drivers/net/Config.help text for CONFIG_E100.
* Added ethtool ETHTOOL_PHYS_ID support
* Made ethtool WoL advertisement more selective on h/w controller
version.
parent 3e60a0a8
This diff is collapsed.
...@@ -795,6 +795,11 @@ P: Tigran Aivazian ...@@ -795,6 +795,11 @@ P: Tigran Aivazian
M: tigran@veritas.com M: tigran@veritas.com
S: Maintained S: Maintained
INTEL PRO/100 ETHERNET SUPPORT
P: Scott Feldman
M: scott.feldman@intel.com
S: Supported
INTEL PRO/1000 GIGABIT ETHERNET SUPPORT INTEL PRO/1000 GIGABIT ETHERNET SUPPORT
P: Chris Leech P: Chris Leech
M: christopher.leech@intel.com M: christopher.leech@intel.com
......
...@@ -1358,6 +1358,80 @@ CONFIG_EEPRO100 ...@@ -1358,6 +1358,80 @@ CONFIG_EEPRO100
a module, say M here and read <file:Documentation/modules.txt> as a module, say M here and read <file:Documentation/modules.txt> as
well as <file:Documentation/networking/net-modules.txt>. well as <file:Documentation/networking/net-modules.txt>.
CONFIG_E100
This driver supports Intel(R) PRO/100 family of adapters, which
includes:
Controller Adapter Name Board IDs
---------- ------------ ---------
82558 PRO/100+ PCI Adapter 668081-xxx,
689661-xxx
82558 PRO/100+ Management Adapter 691334-xxx,
701738-xxx,
721383-xxx
82558 PRO/100+ Dual Port Server Adapter 714303-xxx,
711269-xxx,
A28276-xxx
82558 PRO/100+ PCI Server Adapter 710550-xxx
82550 PRO/100 S Server Adapter 752438-xxx
82559 A56831-xxx,
A10563-xxx,
A12171-xxx,
A12321-xxx,
A12320-xxx,
A12170-xxx
748568-xxx
748565-xxx
82550 PRO/100 S Desktop Adapter 751767-xxx
82559 748592-xxx,
A12167-xxx,
A12318-xxx,
A12317-xxx,
A12165-xxx,
748569-xxx
82559 PRO/100+ Server Adapter 729757-xxx
82559 PRO/100 S Management Adapter 748566-xxx,
748564-xxx
82550 PRO/100 S Dual Port Server Adapter A56831-xxx
82551 PRO/100 M Desktop Adapter A80897-xxx
PRO/100 S Advanced Management Adapter
747842-xxx,
745171-xxx
CNR PRO/100 VE Desktop Adapter A10386-xxx,
A10725-xxx,
A23801-xxx,
A19716-xxx
PRO/100 VM Desktop Adapter A14323-xxx,
A19725-xxx,
A23801-xxx,
A22220-xxx,
A23796-xxx
To verify that your adapter is supported, find the board ID number
on the adapter. Look for a label that has a barcode and a number
in the format 123456-001 (six digits hyphen three digits). Match
this to the list of numbers above.
For more information on how to identify your adapter, go to the
Adapter & Driver ID Guide at:
http://support.intel.com/support/network/adapter/pro100/21397.htm
For the latest Intel PRO/100 network driver for Linux, see:
http://appsr.intel.com/scripts-df/support_intel.asp
More specific information on configuring the driver is in
<file:Documentation/networking/e100.txt>.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called e100.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
CONFIG_FEALNX CONFIG_FEALNX
Say Y here to support the Mysom MTD-800 family of PCI-based Ethernet Say Y here to support the Mysom MTD-800 family of PCI-based Ethernet
cards. Specifications and data at cards. Specifications and data at
......
...@@ -503,6 +503,7 @@ enum led_state_e { ...@@ -503,6 +503,7 @@ enum led_state_e {
#define IS_BACHELOR 0x00000010 /* set if 82558 or newer board */ #define IS_BACHELOR 0x00000010 /* set if 82558 or newer board */
#define IS_ICH 0x00000020 #define IS_ICH 0x00000020
#define DF_SPEED_FORCED 0x00000040 /* set if speed is forced */ #define DF_SPEED_FORCED 0x00000040 /* set if speed is forced */
#define LED_IS_ON 0x00000080 /* LED is turned ON by the driver */
typedef struct net_device_stats net_dev_stats_t; typedef struct net_device_stats net_dev_stats_t;
...@@ -909,7 +910,6 @@ struct ethtool_lpbk_data{ ...@@ -909,7 +910,6 @@ struct ethtool_lpbk_data{
}; };
#endif #endif
struct e100_private { struct e100_private {
u32 flags; /* board management flags */ u32 flags; /* board management flags */
u32 tx_per_underrun; /* number of good tx frames per underrun */ u32 tx_per_underrun; /* number of good tx frames per underrun */
...@@ -999,7 +999,10 @@ struct e100_private { ...@@ -999,7 +999,10 @@ struct e100_private {
u16 ip_lbytes; u16 ip_lbytes;
#endif #endif
#ifdef ETHTOOL_TEST #ifdef ETHTOOL_TEST
struct ethtool_lpbk_data loopback; struct ethtool_lpbk_data loopback;
#endif
#ifdef ETHTOOL_PHYS_ID
struct timer_list blink_timer; /* led blink timer id */
#endif #endif
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
...@@ -593,7 +593,6 @@ e100_config_wol(struct e100_private *bdp) ...@@ -593,7 +593,6 @@ e100_config_wol(struct e100_private *bdp)
} }
#endif #endif
#ifdef ETHTOOL_TEST
/** /**
* e100_config_loopback_mode * e100_config_loopback_mode
* @bdp: atapter's private data struct * @bdp: atapter's private data struct
...@@ -690,5 +689,4 @@ e100_config_dynamic_tbd(struct e100_private *bdp, unsigned char enable) ...@@ -690,5 +689,4 @@ e100_config_dynamic_tbd(struct e100_private *bdp, unsigned char enable)
return bc_changed; return bc_changed;
} }
#endif
...@@ -163,6 +163,9 @@ static char *test_strings[] = { ...@@ -163,6 +163,9 @@ static char *test_strings[] = {
"E100_LPBK_PHY_FAIL" "E100_LPBK_PHY_FAIL"
}; };
#endif
#ifdef ETHTOOL_PHYS_ID
static int e100_ethtool_led_blink(struct net_device *, struct ifreq *);
#endif #endif
#endif /*E100_ETHTOOL_IOCTL */ #endif /*E100_ETHTOOL_IOCTL */
...@@ -182,7 +185,7 @@ static void e100_non_tx_background(unsigned long); ...@@ -182,7 +185,7 @@ static void e100_non_tx_background(unsigned long);
/* Global Data structures and variables */ /* Global Data structures and variables */
char e100_copyright[] __devinitdata = "Copyright (c) 2002 Intel Corporation"; char e100_copyright[] __devinitdata = "Copyright (c) 2002 Intel Corporation";
#define E100_VERSION "2.0.27-pre3" #define E100_VERSION "2.0.30-k1"
#define E100_FULL_DRIVER_NAME "Intel(R) PRO/100 Fast Ethernet Adapter - Loadable driver, ver " #define E100_FULL_DRIVER_NAME "Intel(R) PRO/100 Fast Ethernet Adapter - Loadable driver, ver "
...@@ -691,9 +694,10 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -691,9 +694,10 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
#ifdef ETHTOOL_GWOL #ifdef ETHTOOL_GWOL
/* Disabling all WOLs as initialization */ /* Disabling all WOLs as initialization */
bdp->wolsupported = bdp->wolopts = 0; bdp->wolsupported = bdp->wolopts = 0;
if (bdp->rev_id >= D101MA_REV_ID) { if (bdp->rev_id >= D101A4_REV_ID) {
bdp->wolsupported = bdp->wolsupported = WAKE_PHY | WAKE_MAGIC;
WAKE_PHY | WAKE_UCAST | WAKE_ARP | WAKE_MAGIC; if (bdp->rev_id >= D101MA_REV_ID)
bdp->wolsupported |= WAKE_UCAST | WAKE_ARP;
bdp->wolopts = WAKE_MAGIC; bdp->wolopts = WAKE_MAGIC;
} }
#endif #endif
...@@ -3334,6 +3338,11 @@ e100_do_ethtool_ioctl(struct net_device *dev, struct ifreq *ifr) ...@@ -3334,6 +3338,11 @@ e100_do_ethtool_ioctl(struct net_device *dev, struct ifreq *ifr)
case ETHTOOL_GSTRINGS: case ETHTOOL_GSTRINGS:
rc = e100_ethtool_gstrings(dev,ifr); rc = e100_ethtool_gstrings(dev,ifr);
break; break;
#endif
#ifdef ETHTOOL_PHYS_ID
case ETHTOOL_PHYS_ID:
rc = e100_ethtool_led_blink(dev,ifr);
break;
#endif #endif
default: default:
break; break;
...@@ -3641,6 +3650,94 @@ e100_ethtool_eeprom(struct net_device *dev, struct ifreq *ifr) ...@@ -3641,6 +3650,94 @@ e100_ethtool_eeprom(struct net_device *dev, struct ifreq *ifr)
} }
#endif #endif
#ifdef ETHTOOL_PHYS_ID
#define E100_BLINK_INTERVAL (HZ/4)
/**
* e100_led_control
* @bdp: atapter's private data struct
* @led_mdi_op: led operation
*
* Software control over adapter's led. The possible operations are:
* TURN LED OFF, TURN LED ON and RETURN LED CONTROL TO HARDWARE.
*/
static void
e100_led_control(struct e100_private *bdp, u16 led_mdi_op)
{
spin_lock_bh(&bdp->mdi_access_lock);
e100_mdi_write(bdp, PHY_82555_LED_SWITCH_CONTROL,
bdp->phy_addr, led_mdi_op);
spin_unlock_bh(&bdp->mdi_access_lock);
}
/**
* e100_led_blink_callback
* @data: pointer to atapter's private data struct
*
* Blink timer callback function. Toggles ON/OFF led status bit and calls
* led hardware access function.
*/
static void
e100_led_blink_callback(unsigned long data)
{
struct e100_private *bdp = (struct e100_private *) data;
if(bdp->flags & LED_IS_ON) {
bdp->flags &= ~LED_IS_ON;
e100_led_control(bdp, PHY_82555_LED_OFF);
} else {
bdp->flags |= LED_IS_ON;
if (bdp->rev_id >= D101MA_REV_ID)
e100_led_control(bdp, PHY_82555_LED_ON_559);
else
e100_led_control(bdp, PHY_82555_LED_ON_PRE_559);
}
mod_timer(&bdp->blink_timer, jiffies + E100_BLINK_INTERVAL);
}
/**
* e100_ethtool_led_blink
* @dev: pointer to atapter's net_device struct
* @ifr: pointer to ioctl request structure
*
* Blink led ioctl handler. Initialtes blink timer and sleeps until
* blink period expires. Than it kills timer and returns. The led control
* is returned back to hardware when blink timer is killed.
*/
static int
e100_ethtool_led_blink(struct net_device *dev, struct ifreq *ifr)
{
struct e100_private *bdp;
struct ethtool_value ecmd;
bdp = dev->priv;
if (copy_from_user(&ecmd, ifr->ifr_data, sizeof (ecmd)))
return -EFAULT;
if(!bdp->blink_timer.function) {
init_timer(&bdp->blink_timer);
bdp->blink_timer.function = e100_led_blink_callback;
bdp->blink_timer.data = (unsigned long) bdp;
}
mod_timer(&bdp->blink_timer, jiffies);
set_current_state(TASK_INTERRUPTIBLE);
if ((!ecmd.data) || (ecmd.data > MAX_SCHEDULE_TIMEOUT / HZ))
ecmd.data = MAX_SCHEDULE_TIMEOUT / HZ;
schedule_timeout(ecmd.data * HZ);
del_timer_sync(&bdp->blink_timer);
e100_led_control(bdp, PHY_82555_LED_NORMAL_CONTROL);
return 0;
}
#endif
static inline int __devinit static inline int __devinit
e100_10BaseT_adapter(struct e100_private *bdp) e100_10BaseT_adapter(struct e100_private *bdp)
{ {
......
...@@ -548,7 +548,7 @@ read_bundle_max_def(char *page, char **start, off_t off, ...@@ -548,7 +548,7 @@ read_bundle_max_def(char *page, char **start, off_t off,
int len; int len;
len = read_int_param(page, "CPU Saver Maximum Bundle", len = read_int_param(page, "CPU Saver Maximum Bundle",
"Sets the value for CPU saver's maximum value", "Sets CPU saver's maximum value",
E100_DEFAULT_CPUSAVER_BUNDLE_MAX, 0x1, 0xFFFF); E100_DEFAULT_CPUSAVER_BUNDLE_MAX, 0x1, 0xFFFF);
return generic_read(page, start, off, count, eof, len); return generic_read(page, start, off, count, eof, len);
......
...@@ -69,6 +69,7 @@ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR ...@@ -69,6 +69,7 @@ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/ *******************************************************************************/
#include "e100.h" #include "e100.h"
#include "e100_config.h" #include "e100_config.h"
#ifdef ETHTOOL_TEST #ifdef ETHTOOL_TEST
...@@ -458,10 +459,3 @@ e100_diag_loopback_free (struct e100_private *bdp) ...@@ -458,10 +459,3 @@ e100_diag_loopback_free (struct e100_private *bdp)
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment