Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109277
b: refs/heads/master
c: 3c34a5d
h: refs/heads/master
i:
  109275: 8ec3830
v: v3
  • Loading branch information
Dan Williams authored and John W. Linville committed Aug 27, 2008
1 parent 966d89d commit 551c511
Show file tree
Hide file tree
Showing 45 changed files with 231 additions and 341 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df69471290cbec7714f6d1fabd14f4e41219cee1
refs/heads/master: 3c34a5d821b825b720189e87561ba18500cf8026
5 changes: 0 additions & 5 deletions trunk/arch/powerpc/include/asm/cpm2.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ typedef struct scc_param {
uint scc_tcrc; /* Internal */
} sccp_t;

/* Function code bits.
*/
#define SCC_EB ((u_char) 0x10) /* Set big endian byte order */
#define SCC_GBL ((u_char) 0x20) /* Snooping enabled */

/* CPM Ethernet through SCC1.
*/
typedef struct scc_enet {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -822,14 +822,14 @@ config ULTRA32
will be called smc-ultra32.

config BFIN_MAC
tristate "Blackfin on-chip MAC support"
depends on NET_ETHERNET && (BF526 || BF527 || BF536 || BF537)
tristate "Blackfin 527/536/537 on-chip mac support"
depends on NET_ETHERNET && (BF527 || BF537 || BF536)
select CRC32
select MII
select PHYLIB
select BFIN_MAC_USE_L1 if DMA_UNCACHED_NONE
help
This is the driver for Blackfin on-chip mac device. Say Y if you want it
This is the driver for blackfin on-chip mac device. Say Y if you want it
compiled into the kernel. 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 bfin_mac.
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/atl1e/atl1e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2232,11 +2232,10 @@ static int atl1e_resume(struct pci_dev *pdev)

AT_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0);

if (netif_running(netdev)) {
if (netif_running(netdev))
err = atl1e_request_irq(adapter);
if (err)
return err;
}

atl1e_reset_hw(&adapter->hw);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -3022,6 +3022,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
netdev->features = NETIF_F_HW_CSUM;
netdev->features |= NETIF_F_SG;
netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
netdev->features |= NETIF_F_TSO;
netdev->features |= NETIF_F_LLTX;

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
if ((le16_to_cpu(rfd->command) & cb_el) &&
(RU_RUNNING == nic->ru_running))

if (ioread8(&nic->csr->scb.status) & rus_no_res)
if (readb(&nic->csr->scb.status) & rus_no_res)
nic->ru_running = RU_SUSPENDED;
return -ENODATA;
}
Expand All @@ -1861,7 +1861,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
if ((le16_to_cpu(rfd->command) & cb_el) &&
(RU_RUNNING == nic->ru_running)) {

if (ioread8(&nic->csr->scb.status) & rus_no_res)
if (readb(&nic->csr->scb.status) & rus_no_res)
nic->ru_running = RU_SUSPENDED;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -5522,7 +5522,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
if (id->driver_data & DEV_HAS_CHECKSUM) {
np->rx_csum = 1;
np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;
dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
dev->features |= NETIF_F_TSO;
}

Expand Down Expand Up @@ -5835,7 +5835,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i

dev_printk(KERN_INFO, &pci_dev->dev, "%s%s%s%s%s%s%s%s%s%sdesc-v%u\n",
dev->features & NETIF_F_HIGHDMA ? "highdma " : "",
dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ?
dev->features & (NETIF_F_HW_CSUM | NETIF_F_SG) ?
"csum " : "",
dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX) ?
"vlan " : "",
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,6 @@ static int fs_enet_open(struct net_device *dev)
int r;
int err;

/* to initialize the fep->cur_rx,... */
/* not doing this, will cause a crash in fs_enet_rx_napi */
fs_init_bds(fep->ndev);

if (fep->fpi->use_napi)
napi_enable(&fep->napi);

Expand Down Expand Up @@ -1171,10 +1167,6 @@ static struct of_device_id fs_enet_match[] = {
.compatible = "fsl,cpm1-scc-enet",
.data = (void *)&fs_scc_ops,
},
{
.compatible = "fsl,cpm2-scc-enet",
.data = (void *)&fs_scc_ops,
},
#endif
#ifdef CONFIG_FS_ENET_HAS_FCC
{
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/net/fs_enet/mac-scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "fs_enet.h"

/*************************************************/

#if defined(CONFIG_CPM1)
/* for a 8xx __raw_xxx's are sufficient */
#define __fs_out32(addr, x) __raw_writel(x, addr)
Expand All @@ -61,8 +62,6 @@
#define __fs_out16(addr, x) out_be16(addr, x)
#define __fs_in32(addr) in_be32(addr)
#define __fs_in16(addr) in_be16(addr)
#define __fs_out8(addr, x) out_8(addr, x)
#define __fs_in8(addr) in_8(addr)
#endif

/* write, read, set bits, clear bits */
Expand Down Expand Up @@ -263,13 +262,8 @@ static void restart(struct net_device *dev)

/* Initialize function code registers for big-endian.
*/
#ifndef CONFIG_NOT_COHERENT_CACHE
W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL);
W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL);
#else
W8(ep, sen_genscc.scc_rfcr, SCC_EB);
W8(ep, sen_genscc.scc_tfcr, SCC_EB);
#endif

/* Set maximum bytes per receive buffer.
* This appears to be an Ethernet frame size, not the buffer
Expand Down
22 changes: 4 additions & 18 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ const char gfar_driver_version[] = "1.3";

static int gfar_enet_open(struct net_device *dev);
static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void gfar_reset_task(struct work_struct *work);
static void gfar_timeout(struct net_device *dev);
static int gfar_close(struct net_device *dev);
struct sk_buff *gfar_new_skb(struct net_device *dev);
Expand Down Expand Up @@ -210,7 +209,6 @@ static int gfar_probe(struct platform_device *pdev)
spin_lock_init(&priv->txlock);
spin_lock_init(&priv->rxlock);
spin_lock_init(&priv->bflock);
INIT_WORK(&priv->reset_task, gfar_reset_task);

platform_set_drvdata(pdev, dev);

Expand Down Expand Up @@ -1214,7 +1212,6 @@ static int gfar_close(struct net_device *dev)

napi_disable(&priv->napi);

cancel_work_sync(&priv->reset_task);
stop_gfar(dev);

/* Disconnect from the PHY */
Expand Down Expand Up @@ -1329,16 +1326,13 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}

/* gfar_reset_task gets scheduled when a packet has not been
/* gfar_timeout gets called when a packet has not been
* transmitted after a set amount of time.
* For now, assume that clearing out all the structures, and
* starting over will fix the problem.
*/
static void gfar_reset_task(struct work_struct *work)
* starting over will fix the problem. */
static void gfar_timeout(struct net_device *dev)
{
struct gfar_private *priv = container_of(work, struct gfar_private,
reset_task);
struct net_device *dev = priv->dev;
dev->stats.tx_errors++;

if (dev->flags & IFF_UP) {
stop_gfar(dev);
Expand All @@ -1348,14 +1342,6 @@ static void gfar_reset_task(struct work_struct *work)
netif_tx_schedule_all(dev);
}

static void gfar_timeout(struct net_device *dev)
{
struct gfar_private *priv = netdev_priv(dev);

dev->stats.tx_errors++;
schedule_work(&priv->reset_task);
}

/* Interrupt Handler for Transmit complete */
static int gfar_clean_tx_ring(struct net_device *dev)
{
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/gianfar.h
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@ struct gfar_private {

uint32_t msg_enable;

struct work_struct reset_task;
/* Network Statistics */
struct gfar_extra_stats extra_stats;
};
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/ibm_newemac/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ static int emac_configure(struct emac_instance *dev)
if (emac_phy_gpcs(dev->phy.mode))
emac_mii_reset_phy(&dev->phy);

/* Required for Pause packet support in EMAC */
dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1);

return 0;
}

Expand Down Expand Up @@ -1147,9 +1150,6 @@ static int emac_open(struct net_device *ndev)
} else
netif_carrier_on(dev->ndev);

/* Required for Pause packet support in EMAC */
dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1);

emac_configure(dev);
mal_poll_add(dev->mal, &dev->commac);
mal_enable_tx_channel(dev->mal, dev->mal_tx_chan);
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
unsigned long data_dma_addr;

desc.fields.flags_len = IBMVETH_BUF_VALID | skb->len;
data_dma_addr = dma_map_single(&adapter->vdev->dev, skb->data,
skb->len, DMA_TO_DEVICE);

if (skb->ip_summed == CHECKSUM_PARTIAL &&
ip_hdr(skb)->protocol != IPPROTO_TCP && skb_checksum_help(skb)) {
Expand All @@ -922,8 +924,6 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
buf[1] = 0;
}

data_dma_addr = dma_map_single(&adapter->vdev->dev, skb->data,
skb->len, DMA_TO_DEVICE);
if (dma_mapping_error(&adapter->vdev->dev, data_dma_addr)) {
if (!firmware_has_feature(FW_FEATURE_CMO))
ibmveth_error_printk("tx: unable to map xmit buffer\n");
Expand All @@ -932,7 +932,6 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
desc.fields.address = adapter->bounce_buffer_dma;
tx_map_failed++;
used_bounce = 1;
wmb();
} else
desc.fields.address = data_dma_addr;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/e1000_82575.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
case E1000_DEV_ID_82576:
case E1000_DEV_ID_82576_FIBER:
case E1000_DEV_ID_82576_SERDES:
case E1000_DEV_ID_82576_QUAD_COPPER:
mac->type = e1000_82576;
break;
default:
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/e1000_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct e1000_hw;
#define E1000_DEV_ID_82576 0x10C9
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
#define E1000_DEV_ID_82575EB_COPPER 0x10A7
#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9
#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6
Expand Down
17 changes: 11 additions & 6 deletions trunk/drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,13 @@ static void igb_get_regs(struct net_device *netdev,
regs_buff[12] = rd32(E1000_EECD);

/* Interrupt */
/* Reading EICS for EICR because they read the
* same but EICS does not clear on read */
regs_buff[13] = rd32(E1000_EICS);
regs_buff[13] = rd32(E1000_EICR);
regs_buff[14] = rd32(E1000_EICS);
regs_buff[15] = rd32(E1000_EIMS);
regs_buff[16] = rd32(E1000_EIMC);
regs_buff[17] = rd32(E1000_EIAC);
regs_buff[18] = rd32(E1000_EIAM);
/* Reading ICS for ICR because they read the
* same but ICS does not clear on read */
regs_buff[19] = rd32(E1000_ICS);
regs_buff[19] = rd32(E1000_ICR);
regs_buff[20] = rd32(E1000_ICS);
regs_buff[21] = rd32(E1000_IMS);
regs_buff[22] = rd32(E1000_IMC);
Expand Down Expand Up @@ -1750,6 +1746,15 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
/* return success for non excluded adapter ports */
retval = 0;
break;
case E1000_DEV_ID_82576_QUAD_COPPER:
/* quad port adapters only support WoL on port A */
if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
wol->supported = 0;
break;
}
/* return success for non excluded adapter ports */
retval = 0;
break;
default:
/* dual port cards only support WoL on port A from now on
* unless it was enabled in the eeprom for port B
Expand Down
25 changes: 14 additions & 11 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static struct pci_device_id igb_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576), board_82575 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER), board_82575 },
Expand Down Expand Up @@ -520,7 +521,7 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
adapter->msix_entries,
numvecs);
if (err == 0)
goto out;
return;

igb_reset_interrupt_capability(adapter);

Expand All @@ -530,7 +531,7 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
adapter->num_tx_queues = 1;
if (!pci_enable_msi(adapter->pdev))
adapter->flags |= IGB_FLAG_HAS_MSI;
out:

/* Notify the stack of the (possibly) reduced Tx Queue count. */
adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
return;
Expand Down Expand Up @@ -1216,6 +1217,16 @@ static int __devinit igb_probe(struct pci_dev *pdev,
if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1)
adapter->eeprom_wol = 0;
break;
case E1000_DEV_ID_82576_QUAD_COPPER:
/* if quad port adapter, disable WoL on all but port A */
if (global_quad_port_a != 0)
adapter->eeprom_wol = 0;
else
adapter->flags |= IGB_FLAG_QUAD_PORT_A;
/* Reset for multiple quad port adapters */
if (++global_quad_port_a == 4)
global_quad_port_a = 0;
break;
}

/* initialize the wol settings based on the eeprom settings */
Expand Down Expand Up @@ -2279,9 +2290,7 @@ static void igb_watchdog_task(struct work_struct *work)
struct igb_ring *tx_ring = adapter->tx_ring;
struct e1000_mac_info *mac = &adapter->hw.mac;
u32 link;
u32 eics = 0;
s32 ret_val;
int i;

if ((netif_carrier_ok(netdev)) &&
(rd32(E1000_STATUS) & E1000_STATUS_LU))
Expand Down Expand Up @@ -2383,13 +2392,7 @@ static void igb_watchdog_task(struct work_struct *work)
}

/* Cause software interrupt to ensure rx ring is cleaned */
if (adapter->msix_entries) {
for (i = 0; i < adapter->num_rx_queues; i++)
eics |= adapter->rx_ring[i].eims_value;
wr32(E1000_EICS, eics);
} else {
wr32(E1000_ICS, E1000_ICS_RXDMT0);
}
wr32(E1000_ICS, E1000_ICS_RXDMT0);

/* Force detection of hung controller every watchdog period */
tx_ring->detect_tx_hung = true;
Expand Down
Loading

0 comments on commit 551c511

Please sign in to comment.