Commit 8244132e authored by David S. Miller's avatar David S. Miller

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
	net/ipv4/ip_output.c
parents 7b2ff18e 38000a94
...@@ -2755,6 +2755,7 @@ config MYRI10GE_DCA ...@@ -2755,6 +2755,7 @@ config MYRI10GE_DCA
config NETXEN_NIC config NETXEN_NIC
tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC" tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC"
depends on PCI depends on PCI
select FW_LOADER
help help
This enables the support for NetXen's Gigabit Ethernet card. This enables the support for NetXen's Gigabit Ethernet card.
...@@ -2820,6 +2821,7 @@ config BNX2X ...@@ -2820,6 +2821,7 @@ config BNX2X
config QLCNIC config QLCNIC
tristate "QLOGIC QLCNIC 1/10Gb Converged Ethernet NIC Support" tristate "QLOGIC QLCNIC 1/10Gb Converged Ethernet NIC Support"
depends on PCI depends on PCI
select FW_LOADER
help help
This driver supports QLogic QLE8240 and QLE8242 Converged Ethernet This driver supports QLogic QLE8240 and QLE8242 Converged Ethernet
devices. devices.
......
...@@ -3086,7 +3086,6 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) ...@@ -3086,7 +3086,6 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod; u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod;
struct l2_fhdr *rx_hdr; struct l2_fhdr *rx_hdr;
int rx_pkt = 0, pg_ring_used = 0; int rx_pkt = 0, pg_ring_used = 0;
struct pci_dev *pdev = bp->pdev;
hw_cons = bnx2_get_hw_rx_cons(bnapi); hw_cons = bnx2_get_hw_rx_cons(bnapi);
sw_cons = rxr->rx_cons; sw_cons = rxr->rx_cons;
...@@ -3112,12 +3111,10 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) ...@@ -3112,12 +3111,10 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
skb = rx_buf->skb; skb = rx_buf->skb;
prefetchw(skb); prefetchw(skb);
if (!get_dma_ops(&pdev->dev)->sync_single_for_cpu) {
next_rx_buf = next_rx_buf =
&rxr->rx_buf_ring[ &rxr->rx_buf_ring[RX_RING_IDX(NEXT_RX_BD(sw_cons))];
RX_RING_IDX(NEXT_RX_BD(sw_cons))];
prefetch(next_rx_buf->desc); prefetch(next_rx_buf->desc);
}
rx_buf->skb = NULL; rx_buf->skb = NULL;
dma_addr = dma_unmap_addr(rx_buf, mapping); dma_addr = dma_unmap_addr(rx_buf, mapping);
......
...@@ -3925,8 +3925,9 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev) ...@@ -3925,8 +3925,9 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev)
HC_INDEX_DEF_C_ETH_ISCSI_CQ_CONS; HC_INDEX_DEF_C_ETH_ISCSI_CQ_CONS;
context->cstorm_st_context.status_block_id = BNX2X_DEF_SB_ID; context->cstorm_st_context.status_block_id = BNX2X_DEF_SB_ID;
context->xstorm_st_context.statistics_data = (cli | if (cli < MAX_X_STAT_COUNTER_ID)
XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE); context->xstorm_st_context.statistics_data = cli |
XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE;
context->xstorm_ag_context.cdu_reserved = context->xstorm_ag_context.cdu_reserved =
CDU_RSRVD_VALUE_TYPE_A(BNX2X_HW_CID(BNX2X_ISCSI_L2_CID, func), CDU_RSRVD_VALUE_TYPE_A(BNX2X_HW_CID(BNX2X_ISCSI_L2_CID, func),
...@@ -3934,10 +3935,12 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev) ...@@ -3934,10 +3935,12 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev)
ETH_CONNECTION_TYPE); ETH_CONNECTION_TYPE);
/* reset xstorm per client statistics */ /* reset xstorm per client statistics */
if (cli < MAX_X_STAT_COUNTER_ID) {
val = BAR_XSTRORM_INTMEM + val = BAR_XSTRORM_INTMEM +
XSTORM_PER_COUNTER_ID_STATS_OFFSET(port, cli); XSTORM_PER_COUNTER_ID_STATS_OFFSET(port, cli);
for (i = 0; i < sizeof(struct xstorm_per_client_stats) / 4; i++) for (i = 0; i < sizeof(struct xstorm_per_client_stats) / 4; i++)
CNIC_WR(dev, val + i * 4, 0); CNIC_WR(dev, val + i * 4, 0);
}
cp->tx_cons_ptr = cp->tx_cons_ptr =
&cp->bnx2x_def_status_blk->c_def_status_block.index_values[ &cp->bnx2x_def_status_blk->c_def_status_block.index_values[
...@@ -3984,9 +3987,11 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev) ...@@ -3984,9 +3987,11 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev)
BNX2X_ISCSI_RX_SB_INDEX_NUM; BNX2X_ISCSI_RX_SB_INDEX_NUM;
context->ustorm_st_context.common.clientId = cli; context->ustorm_st_context.common.clientId = cli;
context->ustorm_st_context.common.status_block_id = BNX2X_DEF_SB_ID; context->ustorm_st_context.common.status_block_id = BNX2X_DEF_SB_ID;
if (cli < MAX_U_STAT_COUNTER_ID) {
context->ustorm_st_context.common.flags = context->ustorm_st_context.common.flags =
USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_STATISTICS; USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_STATISTICS;
context->ustorm_st_context.common.statistics_counter_id = cli; context->ustorm_st_context.common.statistics_counter_id = cli;
}
context->ustorm_st_context.common.mc_alignment_log_size = 0; context->ustorm_st_context.common.mc_alignment_log_size = 0;
context->ustorm_st_context.common.bd_buff_size = context->ustorm_st_context.common.bd_buff_size =
cp->l2_single_buf_size; cp->l2_single_buf_size;
...@@ -4017,10 +4022,13 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev) ...@@ -4017,10 +4022,13 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev)
/* client tstorm info */ /* client tstorm info */
tstorm_client.mtu = cp->l2_single_buf_size - 14; tstorm_client.mtu = cp->l2_single_buf_size - 14;
tstorm_client.config_flags = tstorm_client.config_flags = TSTORM_ETH_CLIENT_CONFIG_E1HOV_REM_ENABLE;
(TSTORM_ETH_CLIENT_CONFIG_E1HOV_REM_ENABLE |
TSTORM_ETH_CLIENT_CONFIG_STATSITICS_ENABLE); if (cli < MAX_T_STAT_COUNTER_ID) {
tstorm_client.config_flags |=
TSTORM_ETH_CLIENT_CONFIG_STATSITICS_ENABLE;
tstorm_client.statistics_counter_id = cli; tstorm_client.statistics_counter_id = cli;
}
CNIC_WR(dev, BAR_TSTRORM_INTMEM + CNIC_WR(dev, BAR_TSTRORM_INTMEM +
TSTORM_CLIENT_CONFIG_OFFSET(port, cli), TSTORM_CLIENT_CONFIG_OFFSET(port, cli),
...@@ -4030,16 +4038,21 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev) ...@@ -4030,16 +4038,21 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev)
((u32 *)&tstorm_client)[1]); ((u32 *)&tstorm_client)[1]);
/* reset tstorm per client statistics */ /* reset tstorm per client statistics */
if (cli < MAX_T_STAT_COUNTER_ID) {
val = BAR_TSTRORM_INTMEM + val = BAR_TSTRORM_INTMEM +
TSTORM_PER_COUNTER_ID_STATS_OFFSET(port, cli); TSTORM_PER_COUNTER_ID_STATS_OFFSET(port, cli);
for (i = 0; i < sizeof(struct tstorm_per_client_stats) / 4; i++) for (i = 0; i < sizeof(struct tstorm_per_client_stats) / 4; i++)
CNIC_WR(dev, val + i * 4, 0); CNIC_WR(dev, val + i * 4, 0);
}
/* reset ustorm per client statistics */ /* reset ustorm per client statistics */
if (cli < MAX_U_STAT_COUNTER_ID) {
val = BAR_USTRORM_INTMEM + val = BAR_USTRORM_INTMEM +
USTORM_PER_COUNTER_ID_STATS_OFFSET(port, cli); USTORM_PER_COUNTER_ID_STATS_OFFSET(port, cli);
for (i = 0; i < sizeof(struct ustorm_per_client_stats) / 4; i++) for (i = 0; i < sizeof(struct ustorm_per_client_stats) / 4; i++)
CNIC_WR(dev, val + i * 4, 0); CNIC_WR(dev, val + i * 4, 0);
}
cp->rx_cons_ptr = cp->rx_cons_ptr =
&cp->bnx2x_def_status_blk->u_def_status_block.index_values[ &cp->bnx2x_def_status_blk->u_def_status_block.index_values[
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <asm/io.h> #include <asm/io.h>
#define DRV_NAME "ehea" #define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0103" #define DRV_VERSION "EHEA_0105"
/* eHEA capability flags */ /* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1 #define DLPAR_PORT_ADD_REM 1
......
...@@ -867,6 +867,7 @@ static int ehea_poll(struct napi_struct *napi, int budget) ...@@ -867,6 +867,7 @@ static int ehea_poll(struct napi_struct *napi, int budget)
ehea_reset_cq_ep(pr->send_cq); ehea_reset_cq_ep(pr->send_cq);
ehea_reset_cq_n1(pr->recv_cq); ehea_reset_cq_n1(pr->recv_cq);
ehea_reset_cq_n1(pr->send_cq); ehea_reset_cq_n1(pr->send_cq);
rmb();
cqe = ehea_poll_rq1(pr->qp, &wqe_index); cqe = ehea_poll_rq1(pr->qp, &wqe_index);
cqe_skb = ehea_poll_cq(pr->send_cq); cqe_skb = ehea_poll_cq(pr->send_cq);
...@@ -2859,6 +2860,7 @@ static void ehea_reset_port(struct work_struct *work) ...@@ -2859,6 +2860,7 @@ static void ehea_reset_port(struct work_struct *work)
container_of(work, struct ehea_port, reset_task); container_of(work, struct ehea_port, reset_task);
struct net_device *dev = port->netdev; struct net_device *dev = port->netdev;
mutex_lock(&dlpar_mem_lock);
port->resets++; port->resets++;
mutex_lock(&port->port_lock); mutex_lock(&port->port_lock);
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -2881,6 +2883,7 @@ static void ehea_reset_port(struct work_struct *work) ...@@ -2881,6 +2883,7 @@ static void ehea_reset_port(struct work_struct *work)
netif_wake_queue(dev); netif_wake_queue(dev);
out: out:
mutex_unlock(&port->port_lock); mutex_unlock(&port->port_lock);
mutex_unlock(&dlpar_mem_lock);
} }
static void ehea_rereg_mrs(struct work_struct *work) static void ehea_rereg_mrs(struct work_struct *work)
...@@ -3542,10 +3545,7 @@ static int ehea_mem_notifier(struct notifier_block *nb, ...@@ -3542,10 +3545,7 @@ static int ehea_mem_notifier(struct notifier_block *nb,
int ret = NOTIFY_BAD; int ret = NOTIFY_BAD;
struct memory_notify *arg = data; struct memory_notify *arg = data;
if (!mutex_trylock(&dlpar_mem_lock)) { mutex_lock(&dlpar_mem_lock);
ehea_info("ehea_mem_notifier must not be called parallelized");
goto out;
}
switch (action) { switch (action) {
case MEM_CANCEL_OFFLINE: case MEM_CANCEL_OFFLINE:
...@@ -3574,7 +3574,6 @@ static int ehea_mem_notifier(struct notifier_block *nb, ...@@ -3574,7 +3574,6 @@ static int ehea_mem_notifier(struct notifier_block *nb,
out_unlock: out_unlock:
mutex_unlock(&dlpar_mem_lock); mutex_unlock(&dlpar_mem_lock);
out:
return ret; return ret;
} }
......
...@@ -381,10 +381,14 @@ static void gfar_init_mac(struct net_device *ndev) ...@@ -381,10 +381,14 @@ static void gfar_init_mac(struct net_device *ndev)
/* Insert receive time stamps into padding alignment bytes */ /* Insert receive time stamps into padding alignment bytes */
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) { if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) {
rctrl &= ~RCTRL_PAL_MASK; rctrl &= ~RCTRL_PAL_MASK;
rctrl |= RCTRL_PRSDEP_INIT | RCTRL_TS_ENABLE | RCTRL_PADDING(8); rctrl |= RCTRL_PADDING(8);
priv->padding = 8; priv->padding = 8;
} }
/* Enable HW time stamping if requested from user space */
if (priv->hwts_rx_en)
rctrl |= RCTRL_PRSDEP_INIT | RCTRL_TS_ENABLE;
/* keep vlan related bits if it's enabled */ /* keep vlan related bits if it's enabled */
if (priv->vlgrp) { if (priv->vlgrp) {
rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT; rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT;
...@@ -747,7 +751,8 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) ...@@ -747,7 +751,8 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_CSUM |
FSL_GIANFAR_DEV_HAS_VLAN | FSL_GIANFAR_DEV_HAS_VLAN |
FSL_GIANFAR_DEV_HAS_MAGIC_PACKET | FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |
FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; FSL_GIANFAR_DEV_HAS_EXTENDED_HASH |
FSL_GIANFAR_DEV_HAS_TIMER;
ctype = of_get_property(np, "phy-connection-type", NULL); ctype = of_get_property(np, "phy-connection-type", NULL);
...@@ -805,12 +810,20 @@ static int gfar_hwtstamp_ioctl(struct net_device *netdev, ...@@ -805,12 +810,20 @@ static int gfar_hwtstamp_ioctl(struct net_device *netdev,
switch (config.rx_filter) { switch (config.rx_filter) {
case HWTSTAMP_FILTER_NONE: case HWTSTAMP_FILTER_NONE:
if (priv->hwts_rx_en) {
stop_gfar(netdev);
priv->hwts_rx_en = 0; priv->hwts_rx_en = 0;
startup_gfar(netdev);
}
break; break;
default: default:
if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)) if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER))
return -ERANGE; return -ERANGE;
if (!priv->hwts_rx_en) {
stop_gfar(netdev);
priv->hwts_rx_en = 1; priv->hwts_rx_en = 1;
startup_gfar(netdev);
}
config.rx_filter = HWTSTAMP_FILTER_ALL; config.rx_filter = HWTSTAMP_FILTER_ALL;
break; break;
} }
...@@ -2642,6 +2655,10 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit) ...@@ -2642,6 +2655,10 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
dma_unmap_single(&priv->ofdev->dev, bdp->bufPtr, dma_unmap_single(&priv->ofdev->dev, bdp->bufPtr,
priv->rx_buffer_size, DMA_FROM_DEVICE); priv->rx_buffer_size, DMA_FROM_DEVICE);
if (unlikely(!(bdp->status & RXBD_ERR) &&
bdp->length > priv->rx_buffer_size))
bdp->status = RXBD_LARGE;
/* We drop the frame if we failed to allocate a new buffer */ /* We drop the frame if we failed to allocate a new buffer */
if (unlikely(!newskb || !(bdp->status & RXBD_LAST) || if (unlikely(!newskb || !(bdp->status & RXBD_LAST) ||
bdp->status & RXBD_ERR)) { bdp->status & RXBD_ERR)) {
......
...@@ -575,6 +575,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) ...@@ -575,6 +575,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
* 4 SFP_DA_CORE1 - 82599-specific * 4 SFP_DA_CORE1 - 82599-specific
* 5 SFP_SR/LR_CORE0 - 82599-specific * 5 SFP_SR/LR_CORE0 - 82599-specific
* 6 SFP_SR/LR_CORE1 - 82599-specific * 6 SFP_SR/LR_CORE1 - 82599-specific
* 7 SFP_act_lmt_DA_CORE0 - 82599-specific
* 8 SFP_act_lmt_DA_CORE1 - 82599-specific
*/ */
if (hw->mac.type == ixgbe_mac_82598EB) { if (hw->mac.type == ixgbe_mac_82598EB) {
if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
......
...@@ -1343,7 +1343,7 @@ static void set_multicast_list(struct net_device *dev) ...@@ -1343,7 +1343,7 @@ static void set_multicast_list(struct net_device *dev)
DEB(DEB_MULTI, DEB(DEB_MULTI,
printk(KERN_DEBUG printk(KERN_DEBUG
"%s: set multicast list, %d entries, promisc %s, allmulti %s\n", "%s: set multicast list, %d entries, promisc %s, allmulti %s\n",
dev->name, dev->mc_count, dev->name, netdev_mc_count(dev),
dev->flags & IFF_PROMISC ? "ON" : "OFF", dev->flags & IFF_PROMISC ? "ON" : "OFF",
dev->flags & IFF_ALLMULTI ? "ON" : "OFF")); dev->flags & IFF_ALLMULTI ? "ON" : "OFF"));
......
...@@ -247,7 +247,7 @@ static const struct net_device_ops mipsnet_netdev_ops = { ...@@ -247,7 +247,7 @@ static const struct net_device_ops mipsnet_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr, .ndo_set_mac_address = eth_mac_addr,
}; };
static int __init mipsnet_probe(struct platform_device *dev) static int __devinit mipsnet_probe(struct platform_device *dev)
{ {
struct net_device *netdev; struct net_device *netdev;
int err; int err;
......
...@@ -629,7 +629,8 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) ...@@ -629,7 +629,8 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
if (addr == NULL) { if (addr == NULL) {
dev_err(&pdev->dev, "%s: failed to allocate tx desc ring\n", dev_err(&pdev->dev, "%s: failed to allocate tx desc ring\n",
netdev->name); netdev->name);
return -ENOMEM; err = -ENOMEM;
goto err_out_free;
} }
tx_ring->desc_head = (struct cmd_desc_type0 *)addr; tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
......
...@@ -1159,9 +1159,6 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong off) ...@@ -1159,9 +1159,6 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong off)
window = CRB_HI(off); window = CRB_HI(off);
if (adapter->ahw.crb_win == window)
return;
writel(window, addr); writel(window, addr);
if (readl(addr) != window) { if (readl(addr) != window) {
if (printk_ratelimit()) if (printk_ratelimit())
...@@ -1169,7 +1166,6 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong off) ...@@ -1169,7 +1166,6 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong off)
"failed to set CRB window to %d off 0x%lx\n", "failed to set CRB window to %d off 0x%lx\n",
window, off); window, off);
} }
adapter->ahw.crb_win = window;
} }
static void __iomem * static void __iomem *
......
...@@ -218,7 +218,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) ...@@ -218,7 +218,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
if (cmd_buf_arr == NULL) { if (cmd_buf_arr == NULL) {
dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n", dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n",
netdev->name); netdev->name);
return -ENOMEM; goto err_out;
} }
memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
tx_ring->cmd_buf_arr = cmd_buf_arr; tx_ring->cmd_buf_arr = cmd_buf_arr;
...@@ -230,7 +230,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) ...@@ -230,7 +230,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
if (rds_ring == NULL) { if (rds_ring == NULL) {
dev_err(&pdev->dev, "%s: failed to allocate rds ring struct\n", dev_err(&pdev->dev, "%s: failed to allocate rds ring struct\n",
netdev->name); netdev->name);
return -ENOMEM; goto err_out;
} }
recv_ctx->rds_rings = rds_ring; recv_ctx->rds_rings = rds_ring;
...@@ -1805,9 +1805,10 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, ...@@ -1805,9 +1805,10 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
netxen_ctx_msg msg = 0; netxen_ctx_msg msg = 0;
struct list_head *head; struct list_head *head;
spin_lock(&rds_ring->lock);
producer = rds_ring->producer; producer = rds_ring->producer;
spin_lock(&rds_ring->lock);
head = &rds_ring->free_list; head = &rds_ring->free_list;
while (!list_empty(head)) { while (!list_empty(head)) {
...@@ -1829,7 +1830,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, ...@@ -1829,7 +1830,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
producer = get_next_index(producer, rds_ring->num_desc); producer = get_next_index(producer, rds_ring->num_desc);
} }
spin_unlock(&rds_ring->lock);
if (count) { if (count) {
rds_ring->producer = producer; rds_ring->producer = producer;
...@@ -1853,6 +1853,8 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, ...@@ -1853,6 +1853,8 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
NETXEN_RCV_PRODUCER_OFFSET), msg); NETXEN_RCV_PRODUCER_OFFSET), msg);
} }
} }
spin_unlock(&rds_ring->lock);
} }
static void static void
...@@ -1864,10 +1866,11 @@ netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, ...@@ -1864,10 +1866,11 @@ netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter,
int producer, count = 0; int producer, count = 0;
struct list_head *head; struct list_head *head;
producer = rds_ring->producer;
if (!spin_trylock(&rds_ring->lock)) if (!spin_trylock(&rds_ring->lock))
return; return;
producer = rds_ring->producer;
head = &rds_ring->free_list; head = &rds_ring->free_list;
while (!list_empty(head)) { while (!list_empty(head)) {
......
...@@ -1727,6 +1727,7 @@ static struct pcmcia_device_id pcnet_ids[] = { ...@@ -1727,6 +1727,7 @@ static struct pcmcia_device_id pcnet_ids[] = {
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "TOSHIBA", "Modem/LAN Card", 0xb4585a1a, 0x53f922f8, "cis/PCMLM28.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"),
......
...@@ -322,6 +322,7 @@ static int smc91c92_probe(struct pcmcia_device *link) ...@@ -322,6 +322,7 @@ static int smc91c92_probe(struct pcmcia_device *link)
return -ENOMEM; return -ENOMEM;
smc = netdev_priv(dev); smc = netdev_priv(dev);
smc->p_dev = link; smc->p_dev = link;
link->priv = dev;
spin_lock_init(&smc->lock); spin_lock_init(&smc->lock);
link->io.NumPorts1 = 16; link->io.NumPorts1 = 16;
......
...@@ -717,11 +717,24 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port) ...@@ -717,11 +717,24 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port)
sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
} }
/* Enable Rx/Tx */
static void sky2_enable_rx_tx(struct sky2_port *sky2)
{
struct sky2_hw *hw = sky2->hw;
unsigned port = sky2->port;
u16 reg;
reg = gma_read16(hw, port, GM_GP_CTRL);
reg |= GM_GPCR_RX_ENA | GM_GPCR_TX_ENA;
gma_write16(hw, port, GM_GP_CTRL, reg);
}
/* Force a renegotiation */ /* Force a renegotiation */
static void sky2_phy_reinit(struct sky2_port *sky2) static void sky2_phy_reinit(struct sky2_port *sky2)
{ {
spin_lock_bh(&sky2->phy_lock); spin_lock_bh(&sky2->phy_lock);
sky2_phy_init(sky2->hw, sky2->port); sky2_phy_init(sky2->hw, sky2->port);
sky2_enable_rx_tx(sky2);
spin_unlock_bh(&sky2->phy_lock); spin_unlock_bh(&sky2->phy_lock);
} }
...@@ -2040,7 +2053,6 @@ static void sky2_link_up(struct sky2_port *sky2) ...@@ -2040,7 +2053,6 @@ static void sky2_link_up(struct sky2_port *sky2)
{ {
struct sky2_hw *hw = sky2->hw; struct sky2_hw *hw = sky2->hw;
unsigned port = sky2->port; unsigned port = sky2->port;
u16 reg;
static const char *fc_name[] = { static const char *fc_name[] = {
[FC_NONE] = "none", [FC_NONE] = "none",
[FC_TX] = "tx", [FC_TX] = "tx",
...@@ -2048,10 +2060,7 @@ static void sky2_link_up(struct sky2_port *sky2) ...@@ -2048,10 +2060,7 @@ static void sky2_link_up(struct sky2_port *sky2)
[FC_BOTH] = "both", [FC_BOTH] = "both",
}; };
/* enable Rx/Tx */ sky2_enable_rx_tx(sky2);
reg = gma_read16(hw, port, GM_GP_CTRL);
reg |= GM_GPCR_RX_ENA | GM_GPCR_TX_ENA;
gma_write16(hw, port, GM_GP_CTRL, reg);
gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK); gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
......
...@@ -3215,6 +3215,8 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit ...@@ -3215,6 +3215,8 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit
__func__, __LINE__, (u32) skb); __func__, __LINE__, (u32) skb);
if (skb) { if (skb) {
skb->data = skb->head + NET_SKB_PAD; skb->data = skb->head + NET_SKB_PAD;
skb->len = 0;
skb_reset_tail_pointer(skb);
__skb_queue_head(&ugeth->rx_recycle, skb); __skb_queue_head(&ugeth->rx_recycle, skb);
} }
......
...@@ -1334,7 +1334,6 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) ...@@ -1334,7 +1334,6 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
/* check for port already opened, if not set the termios */ /* check for port already opened, if not set the termios */
serial->open_count++; serial->open_count++;
if (serial->open_count == 1) { if (serial->open_count == 1) {
tty->low_latency = 1;
serial->rx_state = RX_IDLE; serial->rx_state = RX_IDLE;
/* Force default termio settings */ /* Force default termio settings */
_hso_serial_set_termios(tty, NULL); _hso_serial_set_termios(tty, NULL);
......
...@@ -126,6 +126,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc) ...@@ -126,6 +126,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT; ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT;
ah->ah_noise_floor = -95; /* until first NF calibration is run */ ah->ah_noise_floor = -95; /* until first NF calibration is run */
sc->ani_state.ani_mode = ATH5K_ANI_MODE_AUTO; sc->ani_state.ani_mode = ATH5K_ANI_MODE_AUTO;
ah->ah_current_channel = &sc->channels[0];
/* /*
* Find the mac version * Find the mac version
......
...@@ -807,6 +807,7 @@ static struct pcmcia_device_id serial_ids[] = { ...@@ -807,6 +807,7 @@ static struct pcmcia_device_id serial_ids[] = {
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "TOSHIBA", "Modem/LAN Card", 0xb4585a1a, 0x53f922f8, "cis/PCMLM28.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0556, "cis/3CCFEM556.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0556, "cis/3CCFEM556.cis"),
......
...@@ -134,7 +134,7 @@ struct linux_xfrm_mib { ...@@ -134,7 +134,7 @@ struct linux_xfrm_mib {
#define SNMP_ADD_STATS_USER(mib, field, addend) \ #define SNMP_ADD_STATS_USER(mib, field, addend) \
this_cpu_add(mib[1]->mibs[field], addend) this_cpu_add(mib[1]->mibs[field], addend)
#define SNMP_ADD_STATS(mib, field, addend) \ #define SNMP_ADD_STATS(mib, field, addend) \
this_cpu_add(mib[0]->mibs[field], addend) this_cpu_add(mib[!in_softirq()]->mibs[field], addend)
/* /*
* Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr" * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr"
* to make @ptr a non-percpu pointer. * to make @ptr a non-percpu pointer.
......
...@@ -128,7 +128,7 @@ void br_fdb_cleanup(unsigned long _data) ...@@ -128,7 +128,7 @@ void br_fdb_cleanup(unsigned long _data)
{ {
struct net_bridge *br = (struct net_bridge *)_data; struct net_bridge *br = (struct net_bridge *)_data;
unsigned long delay = hold_time(br); unsigned long delay = hold_time(br);
unsigned long next_timer = jiffies + br->forward_delay; unsigned long next_timer = jiffies + br->ageing_time;
int i; int i;
spin_lock_bh(&br->hash_lock); spin_lock_bh(&br->hash_lock);
...@@ -149,9 +149,7 @@ void br_fdb_cleanup(unsigned long _data) ...@@ -149,9 +149,7 @@ void br_fdb_cleanup(unsigned long _data)
} }
spin_unlock_bh(&br->hash_lock); spin_unlock_bh(&br->hash_lock);
/* Add HZ/4 to ensure we round the jiffies upwards to be after the next mod_timer(&br->gc_timer, round_jiffies_up(next_timer));
* timer, otherwise we might round down and will have no-op run. */
mod_timer(&br->gc_timer, round_jiffies(next_timer + HZ/4));
} }
/* Completely flush all dynamic entries in forwarding database.*/ /* Completely flush all dynamic entries in forwarding database.*/
......
...@@ -130,10 +130,10 @@ static int deliver_clone(const struct net_bridge_port *prev, ...@@ -130,10 +130,10 @@ static int deliver_clone(const struct net_bridge_port *prev,
void (*__packet_hook)(const struct net_bridge_port *p, void (*__packet_hook)(const struct net_bridge_port *p,
struct sk_buff *skb)) struct sk_buff *skb))
{ {
skb = skb_clone(skb, GFP_ATOMIC);
if (!skb) {
struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
skb = skb_clone(skb, GFP_ATOMIC);
if (!skb) {
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -873,8 +873,10 @@ int ip_append_data(struct sock *sk, ...@@ -873,8 +873,10 @@ int ip_append_data(struct sock *sk,
!exthdrlen) !exthdrlen)
csummode = CHECKSUM_PARTIAL; csummode = CHECKSUM_PARTIAL;
skb = skb_peek_tail(&sk->sk_write_queue);
inet->cork.length += length; inet->cork.length += length;
if (((length> mtu) || !skb_queue_empty(&sk->sk_write_queue)) && if (((length > mtu) || (skb && skb_is_gso(skb))) &&
(sk->sk_protocol == IPPROTO_UDP) && (sk->sk_protocol == IPPROTO_UDP) &&
(rt->dst.dev->features & NETIF_F_UFO)) { (rt->dst.dev->features & NETIF_F_UFO)) {
err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, err = ip_ufo_append_data(sk, getfrag, from, length, hh_len,
...@@ -892,7 +894,7 @@ int ip_append_data(struct sock *sk, ...@@ -892,7 +894,7 @@ int ip_append_data(struct sock *sk,
* adding appropriate IP header. * adding appropriate IP header.
*/ */
if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) if (!skb)
goto alloc_new_skb; goto alloc_new_skb;
while (length > 0) { while (length > 0) {
...@@ -1121,7 +1123,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, ...@@ -1121,7 +1123,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
return -EINVAL; return -EINVAL;
inet->cork.length += size; inet->cork.length += size;
if ((sk->sk_protocol == IPPROTO_UDP) && if ((size + skb->len > mtu) &&
(sk->sk_protocol == IPPROTO_UDP) &&
(rt->dst.dev->features & NETIF_F_UFO)) { (rt->dst.dev->features & NETIF_F_UFO)) {
skb_shinfo(skb)->gso_size = mtu - fragheaderlen; skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
skb_shinfo(skb)->gso_type = SKB_GSO_UDP; skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
......
...@@ -162,6 +162,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) ...@@ -162,6 +162,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport);
ct_write_lock(hash); ct_write_lock(hash);
spin_lock(&cp->lock);
if (!(cp->flags & IP_VS_CONN_F_HASHED)) { if (!(cp->flags & IP_VS_CONN_F_HASHED)) {
list_add(&cp->c_list, &ip_vs_conn_tab[hash]); list_add(&cp->c_list, &ip_vs_conn_tab[hash]);
...@@ -174,6 +175,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) ...@@ -174,6 +175,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
ret = 0; ret = 0;
} }
spin_unlock(&cp->lock);
ct_write_unlock(hash); ct_write_unlock(hash);
return ret; return ret;
...@@ -193,6 +195,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp) ...@@ -193,6 +195,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp)
hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport);
ct_write_lock(hash); ct_write_lock(hash);
spin_lock(&cp->lock);
if (cp->flags & IP_VS_CONN_F_HASHED) { if (cp->flags & IP_VS_CONN_F_HASHED) {
list_del(&cp->c_list); list_del(&cp->c_list);
...@@ -202,6 +205,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp) ...@@ -202,6 +205,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp)
} else } else
ret = 0; ret = 0;
spin_unlock(&cp->lock);
ct_write_unlock(hash); ct_write_unlock(hash);
return ret; return ret;
......
...@@ -449,6 +449,7 @@ static __init void teql_master_setup(struct net_device *dev) ...@@ -449,6 +449,7 @@ static __init void teql_master_setup(struct net_device *dev)
dev->tx_queue_len = 100; dev->tx_queue_len = 100;
dev->flags = IFF_NOARP; dev->flags = IFF_NOARP;
dev->hard_header_len = LL_MAX_HEADER; dev->hard_header_len = LL_MAX_HEADER;
dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
} }
static LIST_HEAD(master_dev_list); static LIST_HEAD(master_dev_list);
......
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