Skip to content

Commit

Permalink
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…davem/net-2.6
  • Loading branch information
davem330 committed Feb 4, 2011
2 parents 2b7bceb + 1e6d93e commit bd4a697
Show file tree
Hide file tree
Showing 36 changed files with 352 additions and 160 deletions.
2 changes: 1 addition & 1 deletion Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ tcp_cookie_size - INTEGER
tcp_dsack - BOOLEAN
Allows TCP to send "duplicate" SACKs.

tcp_ecn - BOOLEAN
tcp_ecn - INTEGER
Enable Explicit Congestion Notification (ECN) in TCP. ECN is only
used when both ends of the TCP flow support it. It is useful to
avoid losses due to congestion (when the bottleneck router supports
Expand Down
9 changes: 4 additions & 5 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5544,12 +5544,11 @@ S: Supported
F: drivers/scsi/be2iscsi/

SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
M: Sathya Perla <[email protected]>
M: Subbu Seetharaman <[email protected]>
M: Sarveshwar Bandi <[email protected]>
M: Ajit Khaparde <[email protected]>
M: Sathya Perla <[email protected]>
M: Subbu Seetharaman <[email protected]>
M: Ajit Khaparde <[email protected]>
L: [email protected]
W: http://www.serverengines.com
W: http://www.emulex.com
S: Supported
F: drivers/net/benet/

Expand Down
3 changes: 2 additions & 1 deletion drivers/isdn/icn/icn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ __setup("icn=", icn_setup);
static int __init icn_init(void)
{
char *p;
char rev[20];
char rev[21];

memset(&dev, 0, sizeof(icn_dev));
dev.memaddr = (membase & 0x0ffc000);
Expand All @@ -1638,6 +1638,7 @@ static int __init icn_init(void)

if ((p = strchr(revision, ':'))) {
strncpy(rev, p + 1, 20);
rev[20] = '\0';
p = strchr(rev, '$');
if (p)
*p = 0;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static DEFINE_PCI_DEVICE_TABLE(atl1c_pci_tbl) = {
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L2C_B)},
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L2C_B2)},
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L1D)},
{PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATHEROS_L1D_2_0)},
/* required last entry */
{ 0 }
};
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,9 @@ void be_link_status_update(struct be_adapter *adapter, bool link_up)
if (adapter->link_up != link_up) {
adapter->link_speed = -1;
if (link_up) {
netif_start_queue(netdev);
netif_carrier_on(netdev);
printk(KERN_INFO "%s: Link up\n", netdev->name);
} else {
netif_stop_queue(netdev);
netif_carrier_off(netdev);
printk(KERN_INFO "%s: Link down\n", netdev->name);
}
Expand Down Expand Up @@ -2628,8 +2626,6 @@ static void be_netdev_init(struct net_device *netdev)

netif_napi_add(netdev, &adapter->tx_eq.napi, be_poll_tx_mcc,
BE_NAPI_WEIGHT);

netif_stop_queue(netdev);
}

static void be_unmap_pci_bars(struct be_adapter *adapter)
Expand Down
9 changes: 2 additions & 7 deletions drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,15 +2301,10 @@ static void bnx2x_rxq_set_mac_filters(struct bnx2x *bp, u16 cl_id, u32 filters)
/* accept matched ucast */
drop_all_ucast = 0;
}
if (filters & BNX2X_ACCEPT_MULTICAST) {
if (filters & BNX2X_ACCEPT_MULTICAST)
/* accept matched mcast */
drop_all_mcast = 0;
if (IS_MF_SI(bp))
/* since mcast addresses won't arrive with ovlan,
* fw needs to accept all of them in
* switch-independent mode */
accp_all_mcast = 1;
}

if (filters & BNX2X_ACCEPT_ALL_UNICAST) {
/* accept all mcast */
drop_all_ucast = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ static ssize_t at91_sysfs_set_mb0_id(struct device *dev,
return ret;
}

static DEVICE_ATTR(mb0_id, S_IWUGO | S_IRUGO,
static DEVICE_ATTR(mb0_id, S_IWUSR | S_IRUGO,
at91_sysfs_show_mb0_id, at91_sysfs_set_mb0_id);

static struct attribute *at91_sysfs_attrs[] = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/janz-ican3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ static ssize_t ican3_sysfs_set_term(struct device *dev,
return count;
}

static DEVICE_ATTR(termination, S_IWUGO | S_IRUGO, ican3_sysfs_show_term,
static DEVICE_ATTR(termination, S_IWUSR | S_IRUGO, ican3_sysfs_show_term,
ican3_sysfs_set_term);

static struct attribute *ican3_sysfs_attrs[] = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/softing/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config CAN_SOFTING
tristate "Softing Gmbh CAN generic support"
depends on CAN_DEV
depends on CAN_DEV && HAS_IOMEM
---help---
Support for CAN cards from Softing Gmbh & some cards
from Vector Gmbh.
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/depca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ static int depca_rx(struct net_device *dev)
}
}
/* Change buffer ownership for this last frame, back to the adapter */
for (; lp->rx_old != entry; lp->rx_old = (++lp->rx_old) & lp->rxRingMask) {
for (; lp->rx_old != entry; lp->rx_old = (lp->rx_old + 1) & lp->rxRingMask) {
writel(readl(&lp->rx_ring[lp->rx_old].base) | R_OWN, &lp->rx_ring[lp->rx_old].base);
}
writel(readl(&lp->rx_ring[entry].base) | R_OWN, &lp->rx_ring[entry].base);
Expand All @@ -1103,7 +1103,7 @@ static int depca_rx(struct net_device *dev)
/*
** Update entry information
*/
lp->rx_new = (++lp->rx_new) & lp->rxRingMask;
lp->rx_new = (lp->rx_new + 1) & lp->rxRingMask;
}

return 0;
Expand Down Expand Up @@ -1148,7 +1148,7 @@ static int depca_tx(struct net_device *dev)
}

/* Update all the pointers */
lp->tx_old = (++lp->tx_old) & lp->txRingMask;
lp->tx_old = (lp->tx_old + 1) & lp->txRingMask;
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/enc28j60.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ static void enc28j60_read_tsv(struct enc28j60_net *priv, u8 tsv[TSV_SIZE])
if (netif_msg_hw(priv))
printk(KERN_DEBUG DRV_NAME ": reading TSV at addr:0x%04x\n",
endptr + 1);
enc28j60_mem_read(priv, endptr + 1, sizeof(tsv), tsv);
enc28j60_mem_read(priv, endptr + 1, TSV_SIZE, tsv);
}

static void enc28j60_dump_tsv(struct enc28j60_net *priv, const char *msg,
Expand Down
61 changes: 45 additions & 16 deletions drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4489,6 +4489,9 @@ static int niu_alloc_channels(struct niu *np)
{
struct niu_parent *parent = np->parent;
int first_rx_channel, first_tx_channel;
int num_rx_rings, num_tx_rings;
struct rx_ring_info *rx_rings;
struct tx_ring_info *tx_rings;
int i, port, err;

port = np->port;
Expand All @@ -4498,18 +4501,21 @@ static int niu_alloc_channels(struct niu *np)
first_tx_channel += parent->txchan_per_port[i];
}

np->num_rx_rings = parent->rxchan_per_port[port];
np->num_tx_rings = parent->txchan_per_port[port];
num_rx_rings = parent->rxchan_per_port[port];
num_tx_rings = parent->txchan_per_port[port];

netif_set_real_num_rx_queues(np->dev, np->num_rx_rings);
netif_set_real_num_tx_queues(np->dev, np->num_tx_rings);

np->rx_rings = kcalloc(np->num_rx_rings, sizeof(struct rx_ring_info),
GFP_KERNEL);
rx_rings = kcalloc(num_rx_rings, sizeof(struct rx_ring_info),
GFP_KERNEL);
err = -ENOMEM;
if (!np->rx_rings)
if (!rx_rings)
goto out_err;

np->num_rx_rings = num_rx_rings;
smp_wmb();
np->rx_rings = rx_rings;

netif_set_real_num_rx_queues(np->dev, num_rx_rings);

for (i = 0; i < np->num_rx_rings; i++) {
struct rx_ring_info *rp = &np->rx_rings[i];

Expand Down Expand Up @@ -4538,12 +4544,18 @@ static int niu_alloc_channels(struct niu *np)
return err;
}

np->tx_rings = kcalloc(np->num_tx_rings, sizeof(struct tx_ring_info),
GFP_KERNEL);
tx_rings = kcalloc(num_tx_rings, sizeof(struct tx_ring_info),
GFP_KERNEL);
err = -ENOMEM;
if (!np->tx_rings)
if (!tx_rings)
goto out_err;

np->num_tx_rings = num_tx_rings;
smp_wmb();
np->tx_rings = tx_rings;

netif_set_real_num_tx_queues(np->dev, num_tx_rings);

for (i = 0; i < np->num_tx_rings; i++) {
struct tx_ring_info *rp = &np->tx_rings[i];

Expand Down Expand Up @@ -6246,11 +6258,17 @@ static void niu_sync_mac_stats(struct niu *np)
static void niu_get_rx_stats(struct niu *np)
{
unsigned long pkts, dropped, errors, bytes;
struct rx_ring_info *rx_rings;
int i;

pkts = dropped = errors = bytes = 0;

rx_rings = ACCESS_ONCE(np->rx_rings);
if (!rx_rings)
goto no_rings;

for (i = 0; i < np->num_rx_rings; i++) {
struct rx_ring_info *rp = &np->rx_rings[i];
struct rx_ring_info *rp = &rx_rings[i];

niu_sync_rx_discard_stats(np, rp, 0);

Expand All @@ -6259,6 +6277,8 @@ static void niu_get_rx_stats(struct niu *np)
dropped += rp->rx_dropped;
errors += rp->rx_errors;
}

no_rings:
np->dev->stats.rx_packets = pkts;
np->dev->stats.rx_bytes = bytes;
np->dev->stats.rx_dropped = dropped;
Expand All @@ -6268,16 +6288,24 @@ static void niu_get_rx_stats(struct niu *np)
static void niu_get_tx_stats(struct niu *np)
{
unsigned long pkts, errors, bytes;
struct tx_ring_info *tx_rings;
int i;

pkts = errors = bytes = 0;

tx_rings = ACCESS_ONCE(np->tx_rings);
if (!tx_rings)
goto no_rings;

for (i = 0; i < np->num_tx_rings; i++) {
struct tx_ring_info *rp = &np->tx_rings[i];
struct tx_ring_info *rp = &tx_rings[i];

pkts += rp->tx_packets;
bytes += rp->tx_bytes;
errors += rp->tx_errors;
}

no_rings:
np->dev->stats.tx_packets = pkts;
np->dev->stats.tx_bytes = bytes;
np->dev->stats.tx_errors = errors;
Expand All @@ -6287,9 +6315,10 @@ static struct net_device_stats *niu_get_stats(struct net_device *dev)
{
struct niu *np = netdev_priv(dev);

niu_get_rx_stats(np);
niu_get_tx_stats(np);

if (netif_running(dev)) {
niu_get_rx_stats(np);
niu_get_tx_stats(np);
}
return &dev->stats;
}

Expand Down
6 changes: 2 additions & 4 deletions drivers/net/pcmcia/axnet_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,12 +1488,10 @@ static void ei_rx_overrun(struct net_device *dev)

/*
* Wait a full Tx time (1.2ms) + some guard time, NS says 1.6ms total.
* Early datasheets said to poll the reset bit, but now they say that
* it "is not a reliable indicator and subsequently should be ignored."
* We wait at least 10ms.
* We wait at least 2ms.
*/

mdelay(10);
mdelay(2);

/*
* Reset RBCR[01] back to zero as per magic incantation.
Expand Down
41 changes: 32 additions & 9 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,8 @@ static void __rtl8169_check_link_status(struct net_device *dev,
if (pm)
pm_request_resume(&tp->pci_dev->dev);
netif_carrier_on(dev);
netif_info(tp, ifup, dev, "link up\n");
if (net_ratelimit())
netif_info(tp, ifup, dev, "link up\n");
} else {
netif_carrier_off(dev);
netif_info(tp, ifdown, dev, "link down\n");
Expand Down Expand Up @@ -3757,7 +3758,8 @@ static void rtl_hw_start_8168(struct net_device *dev)
RTL_W16(IntrMitigate, 0x5151);

/* Work around for RxFIFO overflow. */
if (tp->mac_version == RTL_GIGA_MAC_VER_11) {
if (tp->mac_version == RTL_GIGA_MAC_VER_11 ||
tp->mac_version == RTL_GIGA_MAC_VER_22) {
tp->intr_event |= RxFIFOOver | PCSTimeout;
tp->intr_event &= ~RxOverflow;
}
Expand Down Expand Up @@ -4639,12 +4641,33 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
break;
}

/* Work around for rx fifo overflow */
if (unlikely(status & RxFIFOOver) &&
(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
netif_stop_queue(dev);
rtl8169_tx_timeout(dev);
break;
if (unlikely(status & RxFIFOOver)) {
switch (tp->mac_version) {
/* Work around for rx fifo overflow */
case RTL_GIGA_MAC_VER_11:
case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_26:
netif_stop_queue(dev);
rtl8169_tx_timeout(dev);
goto done;
/* Testers needed. */
case RTL_GIGA_MAC_VER_17:
case RTL_GIGA_MAC_VER_19:
case RTL_GIGA_MAC_VER_20:
case RTL_GIGA_MAC_VER_21:
case RTL_GIGA_MAC_VER_23:
case RTL_GIGA_MAC_VER_24:
case RTL_GIGA_MAC_VER_27:
case RTL_GIGA_MAC_VER_28:
/* Experimental science. Pktgen proof. */
case RTL_GIGA_MAC_VER_12:
case RTL_GIGA_MAC_VER_25:
if (status == RxFIFOOver)
goto done;
break;
default:
break;
}
}

if (unlikely(status & SYSErr)) {
Expand Down Expand Up @@ -4680,7 +4703,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
(status & RxFIFOOver) ? (status | RxOverflow) : status);
status = RTL_R16(IntrStatus);
}

done:
return IRQ_RETVAL(handled);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/vxge/vxge-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -3694,7 +3694,7 @@ __vxge_hw_vpath_rts_table_get(struct __vxge_hw_vpath_handle *vp,
if (status != VXGE_HW_OK)
goto exit;

if ((rts_table != VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_DA) ||
if ((rts_table != VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_DA) &&
(rts_table !=
VXGE_HW_RTS_ACS_STEER_CTRL_DATA_STRUCT_SEL_RTH_MULTI_IT))
*data1 = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/net/netiucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static int netiucv_callback_connreq(struct iucv_path *path,
struct iucv_event ev;
int rc;

if (memcmp(iucvMagic, ipuser, sizeof(ipuser)))
if (memcmp(iucvMagic, ipuser, 16))
/* ipuser must match iucvMagic. */
return -EINVAL;
rc = -EINVAL;
Expand Down
Loading

0 comments on commit bd4a697

Please sign in to comment.