Appiled patches from 2.6.20 to 2.6.22 to e1000 driver.

This commit is contained in:
Florian Pose
2008-02-12 15:18:29 +00:00
parent 036ad39ae3
commit 8e7b04a515
3 changed files with 348 additions and 194 deletions
+7 -3
View File
@@ -69,6 +69,7 @@
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include "../ecdev.h"
#define BAR_0 0
#define BAR_1 1
@@ -82,14 +83,14 @@ struct e1000_adapter;
#include "e1000_hw-2.6.22-ethercat.h"
#ifdef DBG
#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args)
#define E1000_DBG(args...) printk(KERN_DEBUG "ec_e1000: " args)
#else
#define E1000_DBG(args...)
#endif
#define E1000_ERR(args...) printk(KERN_ERR "e1000: " args)
#define E1000_ERR(args...) printk(KERN_ERR "ec_e1000: " args)
#define PFX "e1000: "
#define PFX "ec_e1000: "
#define DPRINTK(nlevel, klevel, fmt, args...) \
(void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \
printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \
@@ -342,6 +343,9 @@ struct e1000_adapter {
boolean_t quad_port_a;
unsigned long flags;
uint32_t eeprom_wol;
ec_device_t *ecdev;
unsigned long ec_watchdog_jiffies;
};
enum e1000_state_t {
+23 -1
View File
@@ -195,6 +195,9 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
if (adapter->ecdev)
return -EBUSY;
/* When SoL/IDER sessions are active, autoneg/speed/duplex
* cannot be changed */
if (e1000_check_phy_reset_block(hw)) {
@@ -263,6 +266,9 @@ e1000_set_pauseparam(struct net_device *netdev,
struct e1000_hw *hw = &adapter->hw;
int retval = 0;
if (adapter->ecdev)
return -EBUSY;
adapter->fc_autoneg = pause->autoneg;
while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
@@ -304,6 +310,10 @@ static int
e1000_set_rx_csum(struct net_device *netdev, uint32_t data)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
if (adapter->ecdev)
return -EBUSY;
adapter->rx_csum = data;
if (netif_running(netdev))
@@ -656,6 +666,9 @@ e1000_set_ringparam(struct net_device *netdev,
struct e1000_rx_ring *rxdr, *rx_old;
int i, err;
if (adapter->ecdev)
return -EBUSY;
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
return -EINVAL;
@@ -1624,7 +1637,12 @@ e1000_diag_test(struct net_device *netdev,
struct ethtool_test *eth_test, uint64_t *data)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
boolean_t if_running = netif_running(netdev);
boolean_t if_running;
if (adapter->ecdev)
return;
if_running = netif_running(netdev);
set_bit(__E1000_TESTING, &adapter->flags);
if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
@@ -1891,6 +1909,10 @@ static int
e1000_nway_reset(struct net_device *netdev)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
if (adapter->ecdev)
return -EBUSY;
if (netif_running(netdev))
e1000_reinit_locked(adapter);
return 0;
File diff suppressed because it is too large Load Diff