Commit 95f3eff6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (37 commits)
  [netdrvr] hp100: encapsulate all non-module code
  drivers/net/wireless/{airo,ipw2100}: fix error handling bugs
  [netdrvr] phy: Fix bugs in error handling
  [PATCH] spidernet: Use pci_dma_mapping_error()
  [PATCH] sky2: version 1.9
  [PATCH] sky2: fragmented receive for large MTU
  [PATCH] sky2: use netif_tx_lock instead of LLTX
  [PATCH] sky2: incremental transmit completion
  [PATCH] sky2: name irq after eth for irqbalance
  [PATCH] sky2: workarounds for some 88e806x chips
  [PATCH] sky2: use standard pci register capabilties for error register
  [PATCH] sky2: gigabit full duplex negotiation
  e100, e1000, ixgb: increment version numbers
  ixgb: convert to netdev_priv(netdev)
  ixgb: combine more rx descriptors to improve performance
  e1000: possible memory leak in e1000_set_ringparam
  e1000: Janitor: Use #defined values for literals
  e1000: don't strip vlan ID if 8021q claims it
  e1000: rework polarity, NVM, eeprom code and fixes.
  e1000: driver state fixes (race fix)
  ...
parents 44f54921 2c81fbc4
/******************************************************************************* /*******************************************************************************
Intel PRO/100 Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
#define DRV_NAME "e100" #define DRV_NAME "e100"
#define DRV_EXT "-NAPI" #define DRV_EXT "-NAPI"
#define DRV_VERSION "3.5.16-k2"DRV_EXT #define DRV_VERSION "3.5.17-k2"DRV_EXT
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation" #define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation"
#define PFX DRV_NAME ": " #define PFX DRV_NAME ": "
...@@ -1657,13 +1657,14 @@ static int e100_tx_clean(struct nic *nic) ...@@ -1657,13 +1657,14 @@ static int e100_tx_clean(struct nic *nic)
spin_lock(&nic->cb_lock); spin_lock(&nic->cb_lock);
DPRINTK(TX_DONE, DEBUG, "cb->status = 0x%04X\n",
nic->cb_to_clean->status);
/* Clean CBs marked complete */ /* Clean CBs marked complete */
for(cb = nic->cb_to_clean; for(cb = nic->cb_to_clean;
cb->status & cpu_to_le16(cb_complete); cb->status & cpu_to_le16(cb_complete);
cb = nic->cb_to_clean = cb->next) { cb = nic->cb_to_clean = cb->next) {
DPRINTK(TX_DONE, DEBUG, "cb[%d]->status = 0x%04X\n",
(int)(((void*)cb - (void*)nic->cbs)/sizeof(struct cb)),
cb->status);
if(likely(cb->skb != NULL)) { if(likely(cb->skb != NULL)) {
nic->net_stats.tx_packets++; nic->net_stats.tx_packets++;
nic->net_stats.tx_bytes += cb->skb->len; nic->net_stats.tx_bytes += cb->skb->len;
...@@ -2572,7 +2573,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, ...@@ -2572,7 +2573,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
netdev->poll_controller = e100_netpoll; netdev->poll_controller = e100_netpoll;
#endif #endif
strcpy(netdev->name, pci_name(pdev)); strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
nic = netdev_priv(netdev); nic = netdev_priv(netdev);
nic->netdev = netdev; nic->netdev = netdev;
...@@ -2714,68 +2715,56 @@ static void __devexit e100_remove(struct pci_dev *pdev) ...@@ -2714,68 +2715,56 @@ static void __devexit e100_remove(struct pci_dev *pdev)
} }
} }
#ifdef CONFIG_PM
static int e100_suspend(struct pci_dev *pdev, pm_message_t state) static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
int retval;
if(netif_running(netdev)) if (netif_running(netdev))
e100_down(nic); e100_down(nic);
e100_hw_reset(nic); e100_hw_reset(nic);
netif_device_detach(netdev); netif_device_detach(netdev);
#ifdef CONFIG_PM
pci_save_state(pdev); pci_save_state(pdev);
retval = pci_enable_wake(pdev, pci_choose_state(pdev, state), if (nic->flags & (wol_magic | e100_asf(nic)))
nic->flags & (wol_magic | e100_asf(nic))); #else
if (retval) if (nic->flags & (wol_magic))
DPRINTK(PROBE,ERR, "Error enabling wake\n"); #endif
pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
else
/* disable PME */
pci_enable_wake(pdev, 0, 0);
pci_disable_device(pdev); pci_disable_device(pdev);
retval = pci_set_power_state(pdev, pci_choose_state(pdev, state)); pci_set_power_state(pdev, pci_choose_state(pdev, state));
if (retval)
DPRINTK(PROBE,ERR, "Error %d setting power state\n", retval);
return 0; return 0;
} }
#ifdef CONFIG_PM
static int e100_resume(struct pci_dev *pdev) static int e100_resume(struct pci_dev *pdev)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
int retval;
retval = pci_set_power_state(pdev, PCI_D0); pci_set_power_state(pdev, PCI_D0);
if (retval)
DPRINTK(PROBE,ERR, "Error waking adapter\n");
pci_restore_state(pdev); pci_restore_state(pdev);
/* ack any pending wake events, disable PME */ /* ack any pending wake events, disable PME */
retval = pci_enable_wake(pdev, 0, 0); pci_enable_wake(pdev, 0, 0);
if (retval)
DPRINTK(PROBE,ERR, "Error clearing wake events\n");
netif_device_attach(netdev); netif_device_attach(netdev);
if(netif_running(netdev)) if (netif_running(netdev))
e100_up(nic); e100_up(nic);
return 0; return 0;
} }
#endif #endif /* CONFIG_PM */
static void e100_shutdown(struct pci_dev *pdev) static void e100_shutdown(struct pci_dev *pdev)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); e100_suspend(pdev, PMSG_SUSPEND);
struct nic *nic = netdev_priv(netdev);
int retval;
#ifdef CONFIG_PM
retval = pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic)));
#else
retval = pci_enable_wake(pdev, 0, nic->flags & (wol_magic));
#endif
if (retval)
DPRINTK(PROBE,ERR, "Error enabling wake\n");
} }
/* ------------------ PCI Error Recovery infrastructure -------------- */ /* ------------------ PCI Error Recovery infrastructure -------------- */
...@@ -2859,8 +2848,9 @@ static struct pci_driver e100_driver = { ...@@ -2859,8 +2848,9 @@ static struct pci_driver e100_driver = {
.id_table = e100_id_table, .id_table = e100_id_table,
.probe = e100_probe, .probe = e100_probe,
.remove = __devexit_p(e100_remove), .remove = __devexit_p(e100_remove),
#ifdef CONFIG_PM /* Power Management hooks */
.suspend = e100_suspend, .suspend = e100_suspend,
#ifdef CONFIG_PM
.resume = e100_resume, .resume = e100_resume,
#endif #endif
.shutdown = e100_shutdown, .shutdown = e100_shutdown,
......
This diff is collapsed.
################################################################################ ################################################################################
# #
# # Intel PRO/1000 Linux driver
# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. # Copyright(c) 1999 - 2006 Intel Corporation.
# #
# This program is free software; you can redistribute it and/or modify it # This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free # under the terms and conditions of the GNU General Public License,
# Software Foundation; either version 2 of the License, or (at your option) # version 2, as published by the Free Software Foundation.
# any later version. #
# # This program is distributed in the hope it will be useful, but WITHOUT
# This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details. # more details.
# #
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 # this program; if not, write to the Free Software Foundation, Inc.,
# Temple Place - Suite 330, Boston, MA 02111-1307, USA. # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# #
# The full GNU General Public License is included in this distribution in the # The full GNU General Public License is included in this distribution in
# file called LICENSE. # the file called "COPYING".
# #
# Contact Information: # Contact Information:
# Linux NICS <linux.nics@intel.com> # Linux NICS <linux.nics@intel.com>
# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> # e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
......
/******************************************************************************* /*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
...@@ -346,29 +345,9 @@ struct e1000_adapter { ...@@ -346,29 +345,9 @@ struct e1000_adapter {
}; };
enum e1000_state_t { enum e1000_state_t {
__E1000_DRIVER_TESTING, __E1000_TESTING,
__E1000_RESETTING, __E1000_RESETTING,
__E1000_DOWN
}; };
/* e1000_main.c */
extern char e1000_driver_name[];
extern char e1000_driver_version[];
int e1000_up(struct e1000_adapter *adapter);
void e1000_down(struct e1000_adapter *adapter);
void e1000_reset(struct e1000_adapter *adapter);
void e1000_reinit_locked(struct e1000_adapter *adapter);
int e1000_setup_all_tx_resources(struct e1000_adapter *adapter);
void e1000_free_all_tx_resources(struct e1000_adapter *adapter);
int e1000_setup_all_rx_resources(struct e1000_adapter *adapter);
void e1000_free_all_rx_resources(struct e1000_adapter *adapter);
void e1000_update_stats(struct e1000_adapter *adapter);
int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx);
/* e1000_ethtool.c */
void e1000_set_ethtool_ops(struct net_device *netdev);
/* e1000_param.c */
void e1000_check_options(struct e1000_adapter *adapter);
#endif /* _E1000_H_ */ #endif /* _E1000_H_ */
/******************************************************************************* /*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
...@@ -33,6 +32,21 @@ ...@@ -33,6 +32,21 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
extern char e1000_driver_name[];
extern char e1000_driver_version[];
extern int e1000_up(struct e1000_adapter *adapter);
extern void e1000_down(struct e1000_adapter *adapter);
extern void e1000_reinit_locked(struct e1000_adapter *adapter);
extern void e1000_reset(struct e1000_adapter *adapter);
extern int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx);
extern int e1000_setup_all_rx_resources(struct e1000_adapter *adapter);
extern int e1000_setup_all_tx_resources(struct e1000_adapter *adapter);
extern void e1000_free_all_rx_resources(struct e1000_adapter *adapter);
extern void e1000_free_all_tx_resources(struct e1000_adapter *adapter);
extern void e1000_update_stats(struct e1000_adapter *adapter);
struct e1000_stats { struct e1000_stats {
char stat_string[ETH_GSTRING_LEN]; char stat_string[ETH_GSTRING_LEN];
int sizeof_stat; int sizeof_stat;
...@@ -42,26 +56,30 @@ struct e1000_stats { ...@@ -42,26 +56,30 @@ struct e1000_stats {
#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \ #define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \
offsetof(struct e1000_adapter, m) offsetof(struct e1000_adapter, m)
static const struct e1000_stats e1000_gstrings_stats[] = { static const struct e1000_stats e1000_gstrings_stats[] = {
{ "rx_packets", E1000_STAT(net_stats.rx_packets) }, { "rx_packets", E1000_STAT(stats.gprc) },
{ "tx_packets", E1000_STAT(net_stats.tx_packets) }, { "tx_packets", E1000_STAT(stats.gptc) },
{ "rx_bytes", E1000_STAT(net_stats.rx_bytes) }, { "rx_bytes", E1000_STAT(stats.gorcl) },
{ "tx_bytes", E1000_STAT(net_stats.tx_bytes) }, { "tx_bytes", E1000_STAT(stats.gotcl) },
{ "rx_errors", E1000_STAT(net_stats.rx_errors) }, { "rx_broadcast", E1000_STAT(stats.bprc) },
{ "tx_errors", E1000_STAT(net_stats.tx_errors) }, { "tx_broadcast", E1000_STAT(stats.bptc) },
{ "rx_multicast", E1000_STAT(stats.mprc) },
{ "tx_multicast", E1000_STAT(stats.mptc) },
{ "rx_errors", E1000_STAT(stats.rxerrc) },
{ "tx_errors", E1000_STAT(stats.txerrc) },
{ "tx_dropped", E1000_STAT(net_stats.tx_dropped) }, { "tx_dropped", E1000_STAT(net_stats.tx_dropped) },
{ "multicast", E1000_STAT(net_stats.multicast) }, { "multicast", E1000_STAT(stats.mprc) },
{ "collisions", E1000_STAT(net_stats.collisions) }, { "collisions", E1000_STAT(stats.colc) },
{ "rx_length_errors", E1000_STAT(net_stats.rx_length_errors) }, { "rx_length_errors", E1000_STAT(stats.rlerrc) },
{ "rx_over_errors", E1000_STAT(net_stats.rx_over_errors) }, { "rx_over_errors", E1000_STAT(net_stats.rx_over_errors) },
{ "rx_crc_errors", E1000_STAT(net_stats.rx_crc_errors) }, { "rx_crc_errors", E1000_STAT(stats.crcerrs) },
{ "rx_frame_errors", E1000_STAT(net_stats.rx_frame_errors) }, { "rx_frame_errors", E1000_STAT(net_stats.rx_frame_errors) },
{ "rx_no_buffer_count", E1000_STAT(stats.rnbc) }, { "rx_no_buffer_count", E1000_STAT(stats.rnbc) },
{ "rx_missed_errors", E1000_STAT(net_stats.rx_missed_errors) }, { "rx_missed_errors", E1000_STAT(stats.mpc) },
{ "tx_aborted_errors", E1000_STAT(net_stats.tx_aborted_errors) }, { "tx_aborted_errors", E1000_STAT(stats.ecol) },
{ "tx_carrier_errors", E1000_STAT(net_stats.tx_carrier_errors) }, { "tx_carrier_errors", E1000_STAT(stats.tncrs) },
{ "tx_fifo_errors", E1000_STAT(net_stats.tx_fifo_errors) }, { "tx_fifo_errors", E1000_STAT(net_stats.tx_fifo_errors) },
{ "tx_heartbeat_errors", E1000_STAT(net_stats.tx_heartbeat_errors) }, { "tx_heartbeat_errors", E1000_STAT(net_stats.tx_heartbeat_errors) },
{ "tx_window_errors", E1000_STAT(net_stats.tx_window_errors) }, { "tx_window_errors", E1000_STAT(stats.latecol) },
{ "tx_abort_late_coll", E1000_STAT(stats.latecol) }, { "tx_abort_late_coll", E1000_STAT(stats.latecol) },
{ "tx_deferred_ok", E1000_STAT(stats.dc) }, { "tx_deferred_ok", E1000_STAT(stats.dc) },
{ "tx_single_coll_ok", E1000_STAT(stats.scc) }, { "tx_single_coll_ok", E1000_STAT(stats.scc) },
...@@ -193,13 +211,9 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -193,13 +211,9 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
ADVERTISED_FIBRE | ADVERTISED_FIBRE |
ADVERTISED_Autoneg; ADVERTISED_Autoneg;
else else
hw->autoneg_advertised = ADVERTISED_10baseT_Half | hw->autoneg_advertised = ecmd->advertising |
ADVERTISED_10baseT_Full | ADVERTISED_TP |
ADVERTISED_100baseT_Half | ADVERTISED_Autoneg;
ADVERTISED_100baseT_Full |
ADVERTISED_1000baseT_Full|
ADVERTISED_Autoneg |
ADVERTISED_TP;
ecmd->advertising = hw->autoneg_advertised; ecmd->advertising = hw->autoneg_advertised;
} else } else
if (e1000_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) { if (e1000_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) {
...@@ -229,11 +243,11 @@ e1000_get_pauseparam(struct net_device *netdev, ...@@ -229,11 +243,11 @@ e1000_get_pauseparam(struct net_device *netdev,
pause->autoneg = pause->autoneg =
(adapter->fc_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE); (adapter->fc_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE);
if (hw->fc == e1000_fc_rx_pause) if (hw->fc == E1000_FC_RX_PAUSE)
pause->rx_pause = 1; pause->rx_pause = 1;
else if (hw->fc == e1000_fc_tx_pause) else if (hw->fc == E1000_FC_TX_PAUSE)
pause->tx_pause = 1; pause->tx_pause = 1;
else if (hw->fc == e1000_fc_full) { else if (hw->fc == E1000_FC_FULL) {
pause->rx_pause = 1; pause->rx_pause = 1;
pause->tx_pause = 1; pause->tx_pause = 1;
} }
...@@ -253,13 +267,13 @@ e1000_set_pauseparam(struct net_device *netdev, ...@@ -253,13 +267,13 @@ e1000_set_pauseparam(struct net_device *netdev,
msleep(1); msleep(1);
if (pause->rx_pause && pause->tx_pause) if (pause->rx_pause && pause->tx_pause)
hw->fc = e1000_fc_full; hw->fc = E1000_FC_FULL;
else if (pause->rx_pause && !pause->tx_pause) else if (pause->rx_pause && !pause->tx_pause)
hw->fc = e1000_fc_rx_pause; hw->fc = E1000_FC_RX_PAUSE;
else if (!pause->rx_pause && pause->tx_pause) else if (!pause->rx_pause && pause->tx_pause)
hw->fc = e1000_fc_tx_pause; hw->fc = E1000_FC_TX_PAUSE;
else if (!pause->rx_pause && !pause->tx_pause) else if (!pause->rx_pause && !pause->tx_pause)
hw->fc = e1000_fc_none; hw->fc = E1000_FC_NONE;
hw->original_fc = hw->fc; hw->original_fc = hw->fc;
...@@ -632,8 +646,8 @@ e1000_set_ringparam(struct net_device *netdev, ...@@ -632,8 +646,8 @@ e1000_set_ringparam(struct net_device *netdev,
{ {
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
e1000_mac_type mac_type = adapter->hw.mac_type; e1000_mac_type mac_type = adapter->hw.mac_type;
struct e1000_tx_ring *txdr, *tx_old, *tx_new; struct e1000_tx_ring *txdr, *tx_old;
struct e1000_rx_ring *rxdr, *rx_old, *rx_new; struct e1000_rx_ring *rxdr, *rx_old;
int i, err, tx_ring_size, rx_ring_size; int i, err, tx_ring_size, rx_ring_size;
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
...@@ -651,23 +665,17 @@ e1000_set_ringparam(struct net_device *netdev, ...@@ -651,23 +665,17 @@ e1000_set_ringparam(struct net_device *netdev,
tx_old = adapter->tx_ring; tx_old = adapter->tx_ring;
rx_old = adapter->rx_ring; rx_old = adapter->rx_ring;
adapter->tx_ring = kmalloc(tx_ring_size, GFP_KERNEL); err = -ENOMEM;
if (!adapter->tx_ring) { txdr = kzalloc(tx_ring_size, GFP_KERNEL);
err = -ENOMEM; if (!txdr)
goto err_setup_rx; goto err_alloc_tx;
}
memset(adapter->tx_ring, 0, tx_ring_size);
adapter->rx_ring = kmalloc(rx_ring_size, GFP_KERNEL); rxdr = kzalloc(rx_ring_size, GFP_KERNEL);
if (!adapter->rx_ring) { if (!rxdr)
kfree(adapter->tx_ring); goto err_alloc_rx;
err = -ENOMEM;
goto err_setup_rx;
}
memset(adapter->rx_ring, 0, rx_ring_size);
txdr = adapter->tx_ring; adapter->tx_ring = txdr;
rxdr = adapter->rx_ring; adapter->rx_ring = rxdr;
rxdr->count = max(ring->rx_pending,(uint32_t)E1000_MIN_RXD); rxdr->count = max(ring->rx_pending,(uint32_t)E1000_MIN_RXD);
rxdr->count = min(rxdr->count,(uint32_t)(mac_type < e1000_82544 ? rxdr->count = min(rxdr->count,(uint32_t)(mac_type < e1000_82544 ?
...@@ -694,16 +702,14 @@ e1000_set_ringparam(struct net_device *netdev, ...@@ -694,16 +702,14 @@ e1000_set_ringparam(struct net_device *netdev,
/* save the new, restore the old in order to free it, /* save the new, restore the old in order to free it,
* then restore the new back again */ * then restore the new back again */
rx_new = adapter->rx_ring;
tx_new = adapter->tx_ring;
adapter->rx_ring = rx_old; adapter->rx_ring = rx_old;
adapter->tx_ring = tx_old; adapter->tx_ring = tx_old;
e1000_free_all_rx_resources(adapter); e1000_free_all_rx_resources(adapter);
e1000_free_all_tx_resources(adapter); e1000_free_all_tx_resources(adapter);
kfree(tx_old); kfree(tx_old);
kfree(rx_old); kfree(rx_old);
adapter->rx_ring = rx_new; adapter->rx_ring = rxdr;
adapter->tx_ring = tx_new; adapter->tx_ring = txdr;
if ((err = e1000_up(adapter))) if ((err = e1000_up(adapter)))
goto err_setup; goto err_setup;
} }
...@@ -715,6 +721,10 @@ err_setup_tx: ...@@ -715,6 +721,10 @@ err_setup_tx:
err_setup_rx: err_setup_rx:
adapter->rx_ring = rx_old; adapter->rx_ring = rx_old;
adapter->tx_ring = tx_old; adapter->tx_ring = tx_old;
kfree(rxdr);
err_alloc_rx:
kfree(txdr);
err_alloc_tx:
e1000_up(adapter); e1000_up(adapter);
err_setup: err_setup:
clear_bit(__E1000_RESETTING, &adapter->flags); clear_bit(__E1000_RESETTING, &adapter->flags);
...@@ -1610,7 +1620,7 @@ e1000_diag_test(struct net_device *netdev, ...@@ -1610,7 +1620,7 @@ e1000_diag_test(struct net_device *netdev,
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
boolean_t if_running = netif_running(netdev); boolean_t if_running = netif_running(netdev);
set_bit(__E1000_DRIVER_TESTING, &adapter->flags); set_bit(__E1000_TESTING, &adapter->flags);
if (eth_test->flags == ETH_TEST_FL_OFFLINE) { if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
/* Offline tests */ /* Offline tests */
...@@ -1655,7 +1665,7 @@ e1000_diag_test(struct net_device *netdev, ...@@ -1655,7 +1665,7 @@ e1000_diag_test(struct net_device *netdev,
adapter->hw.autoneg = autoneg; adapter->hw.autoneg = autoneg;
e1000_reset(adapter); e1000_reset(adapter);
clear_bit(__E1000_DRIVER_TESTING, &adapter->flags); clear_bit(__E1000_TESTING, &adapter->flags);
if (if_running) if (if_running)
dev_open(netdev); dev_open(netdev);
} else { } else {
...@@ -1670,7 +1680,7 @@ e1000_diag_test(struct net_device *netdev, ...@@ -1670,7 +1680,7 @@ e1000_diag_test(struct net_device *netdev,
data[2] = 0; data[2] = 0;
data[3] = 0; data[3] = 0;
clear_bit(__E1000_DRIVER_TESTING, &adapter->flags); clear_bit(__E1000_TESTING, &adapter->flags);
} }
msleep_interruptible(4 * 1000); msleep_interruptible(4 * 1000);
} }
......
This diff is collapsed.
/******************************************************************************* /*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
...@@ -93,11 +92,11 @@ typedef enum { ...@@ -93,11 +92,11 @@ typedef enum {
/* Flow Control Settings */ /* Flow Control Settings */
typedef enum { typedef enum {
e1000_fc_none = 0, E1000_FC_NONE = 0,
e1000_fc_rx_pause = 1, E1000_FC_RX_PAUSE = 1,
e1000_fc_tx_pause = 2, E1000_FC_TX_PAUSE = 2,
e1000_fc_full = 3, E1000_FC_FULL = 3,
e1000_fc_default = 0xFF E1000_FC_DEFAULT = 0xFF
} e1000_fc_type; } e1000_fc_type;
struct e1000_shadow_ram { struct e1000_shadow_ram {
...@@ -302,6 +301,9 @@ typedef enum { ...@@ -302,6 +301,9 @@ typedef enum {
#define E1000_BLK_PHY_RESET 12 #define E1000_BLK_PHY_RESET 12
#define E1000_ERR_SWFW_SYNC 13 #define E1000_ERR_SWFW_SYNC 13
#define E1000_BYTE_SWAP_WORD(_value) ((((_value) & 0x00ff) << 8) | \
(((_value) & 0xff00) >> 8))
/* Function prototypes */ /* Function prototypes */
/* Initialization */ /* Initialization */
int32_t e1000_reset_hw(struct e1000_hw *hw); int32_t e1000_reset_hw(struct e1000_hw *hw);
...@@ -314,7 +316,7 @@ int32_t e1000_setup_link(struct e1000_hw *hw); ...@@ -314,7 +316,7 @@ int32_t e1000_setup_link(struct e1000_hw *hw);
int32_t e1000_phy_setup_autoneg(struct e1000_hw *hw); int32_t e1000_phy_setup_autoneg(struct e1000_hw *hw);
void e1000_config_collision_dist(struct e1000_hw *hw); void e1000_config_collision_dist(struct e1000_hw *hw);
int32_t e1000_check_for_link(struct e1000_hw *hw); int32_t e1000_check_for_link(struct e1000_hw *hw);
int32_t e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t * speed, uint16_t * duplex); int32_t e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t *speed, uint16_t *duplex);
int32_t e1000_force_mac_fc(struct e1000_hw *hw); int32_t e1000_force_mac_fc(struct e1000_hw *hw);
/* PHY */ /* PHY */
...@@ -322,9 +324,9 @@ int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy ...@@ -322,9 +324,9 @@ int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy
int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data);
int32_t e1000_phy_hw_reset(struct e1000_hw *hw); int32_t e1000_phy_hw_reset(struct e1000_hw *hw);
int32_t e1000_phy_reset(struct e1000_hw *hw); int32_t e1000_phy_reset(struct e1000_hw *hw);
void e1000_phy_powerdown_workaround(struct e1000_hw *hw);
int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info);
int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); int32_t e1000_validate_mdi_setting(struct e1000_hw *hw);
void e1000_phy_powerdown_workaround(struct e1000_hw *hw);
/* EEPROM Functions */ /* EEPROM Functions */
int32_t e1000_init_eeprom_params(struct e1000_hw *hw); int32_t e1000_init_eeprom_params(struct e1000_hw *hw);
...@@ -393,7 +395,6 @@ int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uin ...@@ -393,7 +395,6 @@ int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uin
int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw); int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw);
int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw); int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw);
int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data);
int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num);
int32_t e1000_read_mac_addr(struct e1000_hw * hw); int32_t e1000_read_mac_addr(struct e1000_hw * hw);
/* Filters (multicast, vlan, receive) */ /* Filters (multicast, vlan, receive) */
...@@ -420,6 +421,7 @@ void e1000_pci_set_mwi(struct e1000_hw *hw); ...@@ -420,6 +421,7 @@ void e1000_pci_set_mwi(struct e1000_hw *hw);
void e1000_pci_clear_mwi(struct e1000_hw *hw); void e1000_pci_clear_mwi(struct e1000_hw *hw);
void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
int32_t e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value);
/* Port I/O is only supported on 82544 and newer */ /* Port I/O is only supported on 82544 and newer */
void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value);
int32_t e1000_disable_pciex_master(struct e1000_hw *hw); int32_t e1000_disable_pciex_master(struct e1000_hw *hw);
...@@ -574,10 +576,10 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); ...@@ -574,10 +576,10 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
* E1000_RAR_ENTRIES - 1 multicast addresses. * E1000_RAR_ENTRIES - 1 multicast addresses.
*/ */
#define E1000_RAR_ENTRIES 15 #define E1000_RAR_ENTRIES 15
#define E1000_RAR_ENTRIES_ICH8LAN 7 #define E1000_RAR_ENTRIES_ICH8LAN 6
#define MIN_NUMBER_OF_DESCRIPTORS 8 #define MIN_NUMBER_OF_DESCRIPTORS 8
#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8 #define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8
/* Receive Descriptor */ /* Receive Descriptor */
struct e1000_rx_desc { struct e1000_rx_desc {
...@@ -1300,6 +1302,7 @@ struct e1000_hw_stats { ...@@ -1300,6 +1302,7 @@ struct e1000_hw_stats {
uint64_t algnerrc; uint64_t algnerrc;
uint64_t symerrs; uint64_t symerrs;
uint64_t rxerrc; uint64_t rxerrc;
uint64_t txerrc;
uint64_t mpc; uint64_t mpc;
uint64_t scc; uint64_t scc;
uint64_t ecol; uint64_t ecol;
...@@ -1332,8 +1335,9 @@ struct e1000_hw_stats { ...@@ -1332,8 +1335,9 @@ struct e1000_hw_stats {
uint64_t gotch; uint64_t gotch;
uint64_t rnbc; uint64_t rnbc;
uint64_t ruc; uint64_t ruc;
uint64_t rfc;
uint64_t roc; uint64_t roc;
uint64_t rlerrc;
uint64_t rfc;
uint64_t rjc; uint64_t rjc;
uint64_t mgprc; uint64_t mgprc;
uint64_t mgpdc; uint64_t mgpdc;
...@@ -1440,6 +1444,7 @@ struct e1000_hw { ...@@ -1440,6 +1444,7 @@ struct e1000_hw {
boolean_t tbi_compatibility_on; boolean_t tbi_compatibility_on;
boolean_t laa_is_present; boolean_t laa_is_present;
boolean_t phy_reset_disable; boolean_t phy_reset_disable;
boolean_t initialize_hw_bits_disable;
boolean_t fc_send_xon; boolean_t fc_send_xon;
boolean_t fc_strict_ieee; boolean_t fc_strict_ieee;
boolean_t report_tx_early; boolean_t report_tx_early;
...@@ -1613,16 +1618,17 @@ struct e1000_hw { ...@@ -1613,16 +1618,17 @@ struct e1000_hw {
#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 #define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 #define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 #define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000
#define E1000_CTRL_EXT_LINK_MODE_KMRN 0x00000000 #define E1000_CTRL_EXT_LINK_MODE_KMRN 0x00000000
#define E1000_CTRL_EXT_LINK_MODE_SERDES 0x00C00000 #define E1000_CTRL_EXT_LINK_MODE_SERDES 0x00C00000
#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 #define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000
#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 #define E1000_CTRL_EXT_WR_WMARK_256 0x00000000
#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 #define E1000_CTRL_EXT_WR_WMARK_320 0x01000000
#define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 #define E1000_CTRL_EXT_WR_WMARK_384 0x02000000
#define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 #define E1000_CTRL_EXT_WR_WMARK_448 0x03000000
#define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */ #define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */
#define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ #define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */
#define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ #define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */
#define E1000_CRTL_EXT_PB_PAREN 0x01000000 /* packet buffer parity error detection enabled */ #define E1000_CRTL_EXT_PB_PAREN 0x01000000 /* packet buffer parity error detection enabled */
#define E1000_CTRL_EXT_DF_PAREN 0x02000000 /* descriptor FIFO parity error detection enable */ #define E1000_CTRL_EXT_DF_PAREN 0x02000000 /* descriptor FIFO parity error detection enable */
#define E1000_CTRL_EXT_GHOST_PAREN 0x40000000 #define E1000_CTRL_EXT_GHOST_PAREN 0x40000000
...@@ -2218,6 +2224,11 @@ struct e1000_host_command_info { ...@@ -2218,6 +2224,11 @@ struct e1000_host_command_info {
#define E1000_FACTPS_LAN_FUNC_SEL 0x40000000 #define E1000_FACTPS_LAN_FUNC_SEL 0x40000000
#define E1000_FACTPS_PM_STATE_CHANGED 0x80000000 #define E1000_FACTPS_PM_STATE_CHANGED 0x80000000
/* PCI-Ex Config Space */
#define PCI_EX_LINK_STATUS 0x12
#define PCI_EX_LINK_WIDTH_MASK 0x3F0
#define PCI_EX_LINK_WIDTH_SHIFT 4
/* EEPROM Commands - Microwire */ /* EEPROM Commands - Microwire */
#define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */ #define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */
#define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */ #define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */
...@@ -3120,6 +3131,7 @@ struct e1000_host_command_info { ...@@ -3120,6 +3131,7 @@ struct e1000_host_command_info {
/* I = Integrated /* I = Integrated
* E = External * E = External
*/ */
#define M88_VENDOR 0x0141
#define M88E1000_E_PHY_ID 0x01410C50 #define M88E1000_E_PHY_ID 0x01410C50
#define M88E1000_I_PHY_ID 0x01410C30 #define M88E1000_I_PHY_ID 0x01410C30
#define M88E1011_I_PHY_ID 0x01410C20 #define M88E1011_I_PHY_ID 0x01410C20
...@@ -3244,10 +3256,12 @@ struct e1000_host_command_info { ...@@ -3244,10 +3256,12 @@ struct e1000_host_command_info {
#define IFE_PSCL_PROBE_LEDS_OFF 0x0006 /* Force LEDs 0 and 2 off */ #define IFE_PSCL_PROBE_LEDS_OFF 0x0006 /* Force LEDs 0 and 2 off */
#define IFE_PSCL_PROBE_LEDS_ON 0x0007 /* Force LEDs 0 and 2 on */ #define IFE_PSCL_PROBE_LEDS_ON 0x0007 /* Force LEDs 0 and 2 on */
#define ICH8_FLASH_COMMAND_TIMEOUT 500 /* 500 ms , should be adjusted */ #define ICH8_FLASH_COMMAND_TIMEOUT 5000 /* 5000 uSecs - adjusted */
#define ICH8_FLASH_CYCLE_REPEAT_COUNT 10 /* 10 cycles , should be adjusted */ #define ICH8_FLASH_ERASE_TIMEOUT 3000000 /* Up to 3 seconds - worst case */
#define ICH8_FLASH_CYCLE_REPEAT_COUNT 10 /* 10 cycles */
#define ICH8_FLASH_SEG_SIZE_256 256 #define ICH8_FLASH_SEG_SIZE_256 256
#define ICH8_FLASH_SEG_SIZE_4K 4096 #define ICH8_FLASH_SEG_SIZE_4K 4096
#define ICH9_FLASH_SEG_SIZE_8K 8192
#define ICH8_FLASH_SEG_SIZE_64K 65536 #define ICH8_FLASH_SEG_SIZE_64K 65536
#define ICH8_CYCLE_READ 0x0 #define ICH8_CYCLE_READ 0x0
......
This diff is collapsed.
/******************************************************************************* /*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
......
/******************************************************************************* /*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
...@@ -397,17 +396,17 @@ e1000_check_options(struct e1000_adapter *adapter) ...@@ -397,17 +396,17 @@ e1000_check_options(struct e1000_adapter *adapter)
{ /* Flow Control */ { /* Flow Control */
struct e1000_opt_list fc_list[] = struct e1000_opt_list fc_list[] =
{{ e1000_fc_none, "Flow Control Disabled" }, {{ E1000_FC_NONE, "Flow Control Disabled" },
{ e1000_fc_rx_pause,"Flow Control Receive Only" }, { E1000_FC_RX_PAUSE,"Flow Control Receive Only" },
{ e1000_fc_tx_pause,"Flow Control Transmit Only" }, { E1000_FC_TX_PAUSE,"Flow Control Transmit Only" },
{ e1000_fc_full, "Flow Control Enabled" }, { E1000_FC_FULL, "Flow Control Enabled" },
{ e1000_fc_default, "Flow Control Hardware Default" }}; { E1000_FC_DEFAULT, "Flow Control Hardware Default" }};
struct e1000_option opt = { struct e1000_option opt = {
.type = list_option, .type = list_option,
.name = "Flow Control", .name = "Flow Control",
.err = "reading default settings from EEPROM", .err = "reading default settings from EEPROM",
.def = e1000_fc_default, .def = E1000_FC_DEFAULT,
.arg = { .l = { .nr = ARRAY_SIZE(fc_list), .arg = { .l = { .nr = ARRAY_SIZE(fc_list),
.p = fc_list }} .p = fc_list }}
}; };
......
...@@ -188,10 +188,12 @@ struct hp100_private { ...@@ -188,10 +188,12 @@ struct hp100_private {
/* /*
* variables * variables
*/ */
#ifndef MODULE
static const char *hp100_isa_tbl[] = { static const char *hp100_isa_tbl[] = {
"HWPF150", /* HP J2573 rev A */ "HWPF150", /* HP J2573 rev A */
"HWP1950", /* HP J2573 */ "HWP1950", /* HP J2573 */
}; };
#endif
#ifdef CONFIG_EISA #ifdef CONFIG_EISA
static struct eisa_device_id hp100_eisa_tbl[] = { static struct eisa_device_id hp100_eisa_tbl[] = {
...@@ -333,6 +335,7 @@ static __devinit const char *hp100_read_id(int ioaddr) ...@@ -333,6 +335,7 @@ static __devinit const char *hp100_read_id(int ioaddr)
return str; return str;
} }
#ifndef MODULE
static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr) static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
{ {
const char *sig; const char *sig;
...@@ -391,8 +394,6 @@ static int __init hp100_isa_probe(struct net_device *dev, int addr) ...@@ -391,8 +394,6 @@ static int __init hp100_isa_probe(struct net_device *dev, int addr)
return err; return err;
} }
#ifndef MODULE
struct net_device * __init hp100_probe(int unit) struct net_device * __init hp100_probe(int unit)
{ {
struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private)); struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
......
################################################################################ ################################################################################
# #
# # Intel PRO/10GbE Linux driver
# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. # Copyright(c) 1999 - 2006 Intel Corporation.
# #
# This program is free software; you can redistribute it and/or modify it # This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free # under the terms and conditions of the GNU General Public License,
# Software Foundation; either version 2 of the License, or (at your option) # version 2, as published by the Free Software Foundation.
# any later version. #
# # This program is distributed in the hope it will be useful, but WITHOUT
# This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details. # more details.
# #
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 # this program; if not, write to the Free Software Foundation, Inc.,
# Temple Place - Suite 330, Boston, MA 02111-1307, USA. # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# #
# The full GNU General Public License is included in this distribution in the # The full GNU General Public License is included in this distribution in
# file called LICENSE. # the file called "COPYING".
# #
# Contact Information: # Contact Information:
# Linux NICS <linux.nics@intel.com> # Linux NICS <linux.nics@intel.com>
# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
# #
################################################################################ ################################################################################
# #
# Makefile for the Intel(R) PRO/10GbE driver # Makefile for the Intel(R) PRO/10GbE ethernet driver
# #
obj-$(CONFIG_IXGB) += ixgb.o obj-$(CONFIG_IXGB) += ixgb.o
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
...@@ -111,7 +111,7 @@ struct ixgb_adapter; ...@@ -111,7 +111,7 @@ struct ixgb_adapter;
#define IXGB_RXBUFFER_16384 16384 #define IXGB_RXBUFFER_16384 16384
/* How many Rx Buffers do we bundle into one write to the hardware ? */ /* How many Rx Buffers do we bundle into one write to the hardware ? */
#define IXGB_RX_BUFFER_WRITE 4 /* Must be power of 2 */ #define IXGB_RX_BUFFER_WRITE 8 /* Must be power of 2 */
/* only works for sizes that are powers of 2 */ /* only works for sizes that are powers of 2 */
#define IXGB_ROUNDUP(i, size) ((i) = (((i) + (size) - 1) & ~((size) - 1))) #define IXGB_ROUNDUP(i, size) ((i) = (((i) + (size) - 1) & ~((size) - 1)))
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
...@@ -36,7 +36,7 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; ...@@ -36,7 +36,7 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver";
#else #else
#define DRIVERNAPI "-NAPI" #define DRIVERNAPI "-NAPI"
#endif #endif
#define DRV_VERSION "1.0.112-k2"DRIVERNAPI #define DRV_VERSION "1.0.117-k2"DRIVERNAPI
char ixgb_driver_version[] = DRV_VERSION; char ixgb_driver_version[] = DRV_VERSION;
static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
...@@ -437,7 +437,7 @@ ixgb_probe(struct pci_dev *pdev, ...@@ -437,7 +437,7 @@ ixgb_probe(struct pci_dev *pdev,
netdev->poll_controller = ixgb_netpoll; netdev->poll_controller = ixgb_netpoll;
#endif #endif
strcpy(netdev->name, pci_name(pdev)); strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
netdev->mem_start = mmio_start; netdev->mem_start = mmio_start;
netdev->mem_end = mmio_start + mmio_len; netdev->mem_end = mmio_start + mmio_len;
netdev->base_addr = adapter->hw.io_base; netdev->base_addr = adapter->hw.io_base;
...@@ -2230,7 +2230,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, ...@@ -2230,7 +2230,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
enum pci_channel_state state) enum pci_channel_state state)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct ixgb_adapter *adapter = netdev->priv; struct ixgb_adapter *adapter = netdev_priv(netdev);
if(netif_running(netdev)) if(netif_running(netdev))
ixgb_down(adapter, TRUE); ixgb_down(adapter, TRUE);
...@@ -2253,7 +2253,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, ...@@ -2253,7 +2253,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev) static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct ixgb_adapter *adapter = netdev->priv; struct ixgb_adapter *adapter = netdev_priv(netdev);
if(pci_enable_device(pdev)) { if(pci_enable_device(pdev)) {
DPRINTK(PROBE, ERR, "Cannot re-enable PCI device after reset.\n"); DPRINTK(PROBE, ERR, "Cannot re-enable PCI device after reset.\n");
...@@ -2297,7 +2297,7 @@ static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev) ...@@ -2297,7 +2297,7 @@ static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev)
static void ixgb_io_resume (struct pci_dev *pdev) static void ixgb_io_resume (struct pci_dev *pdev)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct ixgb_adapter *adapter = netdev->priv; struct ixgb_adapter *adapter = netdev_priv(netdev);
pci_set_master(pdev); pci_set_master(pdev);
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
/******************************************************************************* /*******************************************************************************
Intel PRO/10GbE Linux driver
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2006 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms and conditions of the GNU General Public License,
Software Foundation; either version 2 of the License, or (at your option) version 2, as published by the Free Software Foundation.
any later version.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 this program; if not, write to the Free Software Foundation, Inc.,
Temple Place - Suite 330, Boston, MA 02111-1307, USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in the The full GNU General Public License is included in this distribution in
file called LICENSE. the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com> Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/ *******************************************************************************/
......
...@@ -289,9 +289,13 @@ static int fixed_mdio_register_device(int number, int speed, int duplex) ...@@ -289,9 +289,13 @@ static int fixed_mdio_register_device(int number, int speed, int duplex)
goto probe_fail; goto probe_fail;
} }
device_bind_driver(&phydev->dev); err = device_bind_driver(&phydev->dev);
up_write(&phydev->dev.bus->subsys.rwsem); up_write(&phydev->dev.bus->subsys.rwsem);
if (err)
goto probe_fail;
return 0; return 0;
probe_fail: probe_fail:
......
...@@ -212,11 +212,13 @@ struct phy_device *phy_attach(struct net_device *dev, ...@@ -212,11 +212,13 @@ struct phy_device *phy_attach(struct net_device *dev,
err = d->driver->probe(d); err = d->driver->probe(d);
if (err < 0) if (err >= 0)
return ERR_PTR(err); err = device_bind_driver(d);
device_bind_driver(d);
up_write(&d->bus->subsys.rwsem); up_write(&d->bus->subsys.rwsem);
if (err)
return ERR_PTR(err);
} }
if (phydev->attached_dev) { if (phydev->attached_dev) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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