net driver fixes
Subsystems (5)
PATCH 1/1 net driver fixes
Please pull from 'upstream-fixes' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to obtain the following fixes:
drivers/net/8139cp.c | 46 ++++++------- drivers/net/bonding/bond_main.c | 3 drivers/net/spider_net.c | 4 + drivers/s390/net/qeth.h | 4 - drivers/s390/net/qeth_main.c | 133 ++++++++++++++++++---------------------- drivers/s390/net/qeth_sys.c | 17 ++--- 6 files changed, 103 insertions(+), 104 deletions(-)
Frank Pavlic:
s390: TSO related fixes in qeth driver
s390: qeth driver fixes
Jay Vosburgh:
bonding: plug reference count leak
Jens Osterkamp:
net: fix spider_net media detection
Stephen Hemminger:
8139cp: allocate statistics space only when needed [fixes crash -jg]
drivers/net/8139cp.c +23 -23
@@ -353,8 +353,6 @@ struct cp_private {struct net_device_stats net_stats;struct cp_extra_stats cp_stats; -struct cp_dma_stats *nic_stats; -dma_addr_t nic_stats_dma;unsigned rx_tail____cacheline_aligned ;struct cp_desc *rx_ring;
@@ -1143,10 +1141,6 @@ static int cp_alloc_rings (struct cp_pri cp->rx_ring = mem; cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE ]; - mem += (CP_RING_BYTES -CP_STATS_SIZE ); - cp->nic_stats = mem; - cp->nic_stats_dma = cp->ring_dma + (CP_RING_BYTES -CP_STATS_SIZE ); -return cp_init_rings (cp); }
@@ -1187,7 +1181,6 @@ static void cp_free_rings (struct cp_pripci_free_consistent (cp->pdev,CP_RING_BYTES , cp->rx_ring, cp->ring_dma); cp->rx_ring =NULL ; cp->tx_ring =NULL ; - cp->nic_stats =NULL ; }static int cp_open (struct net_device *dev)
@@ -1516,13 +1509,17 @@ static void cp_get_ethtool_stats (struct struct ethtool_stats *estats, u64 *tmp_stats) { struct cp_private *cp = netdev_priv(dev); +struct cp_dma_stats *nic_stats; +dma_addr_t dma;int i; -memset (cp->nic_stats,0 ,sizeof (struct cp_dma_stats )); + nic_stats =pci_alloc_consistent (cp->pdev,sizeof (*nic_stats), &dma); +if (!nic_stats) +return ;/* begin NIC statistics dump */ -cpw32 (StatsAddr +4 , (cp->nic_stats_dma >>16 ) >>16 ); -cpw32 (StatsAddr, (cp->nic_stats_dma &0xffffffff ) | DumpStats); +cpw32 (StatsAddr +4 , (u64 )dma >>32 ); +cpw32 (StatsAddr, ((u64 )dma &DMA_32BIT_MASK ) | DumpStats);cpr32 (StatsAddr);for (i =0 ; i <1000 ; i++) {
@@ -1532,24 +1529,27 @@ static void cp_get_ethtool_stats (struct }cpw32 (StatsAddr,0 );cpw32 (StatsAddr +4 ,0 ); +cpr32 (StatsAddr); i =0 ; - tmp_stats[i++] =le64_to_cpu (cp->nic_stats->tx_ok); - tmp_stats[i++] =le64_to_cpu (cp->nic_stats->rx_ok); - tmp_stats[i++] =le64_to_cpu (cp->nic_stats->tx_err); - tmp_stats[i++] =le32_to_cpu (cp->nic_stats->rx_err); - tmp_stats[i++] =le16_to_cpu (cp->nic_stats->rx_fifo); - tmp_stats[i++] =le16_to_cpu (cp->nic_stats->frame_align); - tmp_stats[i++] =le32_to_cpu (cp->nic_stats->tx_ok_1col); - tmp_stats[i++] =le32_to_cpu (cp->nic_stats->tx_ok_mcol); - tmp_stats[i++] =le64_to_cpu (cp->nic_stats->rx_ok_phys); - tmp_stats[i++] =le64_to_cpu (cp->nic_stats->rx_ok_bcast); - tmp_stats[i++] =le32_to_cpu (cp->nic_stats->rx_ok_mcast); - tmp_stats[i++] =le16_to_cpu (cp->nic_stats->tx_abort); - tmp_stats[i++] =le16_to_cpu (cp->nic_stats->tx_underrun); + tmp_stats[i++] =le64_to_cpu (nic_stats->tx_ok); + tmp_stats[i++] =le64_to_cpu (nic_stats->rx_ok); + tmp_stats[i++] =le64_to_cpu (nic_stats->tx_err); + tmp_stats[i++] =le32_to_cpu (nic_stats->rx_err); + tmp_stats[i++] =le16_to_cpu (nic_stats->rx_fifo); + tmp_stats[i++] =le16_to_cpu (nic_stats->frame_align); + tmp_stats[i++] =le32_to_cpu (nic_stats->tx_ok_1col); + tmp_stats[i++] =le32_to_cpu (nic_stats->tx_ok_mcol); + tmp_stats[i++] =le64_to_cpu (nic_stats->rx_ok_phys); + tmp_stats[i++] =le64_to_cpu (nic_stats->rx_ok_bcast); + tmp_stats[i++] =le32_to_cpu (nic_stats->rx_ok_mcast); + tmp_stats[i++] =le16_to_cpu (nic_stats->tx_abort); + tmp_stats[i++] =le16_to_cpu (nic_stats->tx_underrun); tmp_stats[i++] = cp->cp_stats.rx_frags;if (i !=CP_NUM_STATS )BUG (); + +pci_free_consistent (cp->pdev,sizeof (*nic_stats), nic_stats, dma); }static struct ethtool_ops cp_ethtool_ops = {
drivers/net/bonding/bond_main.c +3 -0
@@ -2879,6 +2879,7 @@ static void bond_arp_send_all(struct bon* This target is not on a VLAN */ if (rt->u.dst.dev == bond->dev) { +ip_rt_put (rt);dprintk ("basa: rtdev == bond->dev: arp_send\n" );bond_arp_send (slave->dev,ARPOP_REQUEST , targets[i], bond->master_ip,0 );
@@ -2898,6 +2899,7 @@ static void bond_arp_send_all(struct bon }if (vlan_id) { +ip_rt_put (rt);bond_arp_send (slave->dev,ARPOP_REQUEST , targets[i], vlan->vlan_ip, vlan_id);continue ;
@@ -2909,6 +2911,7 @@ static void bond_arp_send_all(struct bon bond->dev->name,NIPQUAD (fl.fl4_dst), rt->u.dst.dev ? rt->u.dst.dev->name : "NULL"); } +ip_rt_put (rt); } }
drivers/net/spider_net.c +4 -0
@@ -1817,6 +1817,10 @@ spider_net_setup_phy(struct spider_net_c/* LEDs active in both modes, autosense prio = fiber */ spider_net_write_phy (card->netdev,1 ,MII_NCONFIG ,0x945f ); +/* switch off fibre autoneg */ +spider_net_write_phy (card->netdev,1 ,MII_NCONFIG ,0xfc01 ); +spider_net_write_phy (card->netdev,1 ,0x0b ,0x0004 ); + phy->def->ops->read_link (phy);pr_info ("Found %s with %i Mbps, %s-duplex.\n" , phy->def->name, phy->speed, phy->duplex==1 ?"Full" :"Half" );
drivers/s390/net/qeth.h +2 -2
@@ -24,7 +24,7 @@#include "qeth_mpc.h" -#define VERSION_QETH_H "$Revision: 1.139 $" +#define VERSION_QETH_H "$Revision: 1.142 $"#ifdef CONFIG_QETH_IPV6 #define QETH_VERSION_IPV6 ":IPv6"
@@ -1172,7 +1172,7 @@ extern int qeth_realloc_buffer_pool(struct qeth_card *, int);extern int -qeth_set_large_send (struct qeth_card *); +qeth_set_large_send (struct qeth_card *,enum qeth_large_send_types ); extern void qeth_fill_header(struct qeth_card *, struct qeth_hdr *,
drivers/s390/net/qeth_main.c +63 -70
299 lines not on this page · raw message
drivers/s390/net/qeth_sys.c +8 -9
@@ -1,6 +1,6 @@/* * -* linux/drivers/s390/net/qeth_sys.c ($Revision: 1.51 $) +* linux/drivers/s390/net/qeth_sys.c ($Revision: 1.54 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs.
@@ -20,7 +20,7 @@#include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_SYS_C ="$Revision: 1.51 $" ; +const char *VERSION_QETH_SYS_C ="$Revision: 1.54 $" ;/*****************************************************************************/ /* */
@@ -722,10 +722,13 @@ qeth_dev_layer2_store(struct device *devif (!card)return -EINVAL ; +if (card->info.type ==QETH_CARD_TYPE_IQD ) { +PRINT_WARN ("Layer2 on Hipersockets is not supported! \n" ); +return -EPERM ; + }if (((card->state !=CARD_STATE_DOWN ) && - (card->state !=CARD_STATE_RECOVER )) || - (card->info.type !=QETH_CARD_TYPE_OSAE )) + (card->state !=CARD_STATE_RECOVER )))return -EPERM ; i =simple_strtoul (buf, &tmp,16 );
@@ -771,9 +774,7 @@ qeth_dev_large_send_store(struct deviceif (!card)return -EINVAL ; - tmp =strsep ((char **) &buf,"\n" ); -if (!strcmp (tmp,"no" )){ type =QETH_LARGE_SEND_NO ; }else if (!strcmp (tmp,"EDDP" )) {
@@ -786,10 +787,8 @@ qeth_dev_large_send_store(struct device }if (card->options.large_send == type)return count; - card->options.large_send = type; -if ((rc =qeth_set_large_send (card))) +if ((rc =qeth_set_large_send (card, type)))return rc; -return count; }
Quoted 2 lines · Jeff Garzik
Please pull from 'upstream-fixes' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
Does it fix the tulip mii-link detection problem on wire-disconnect?
--
Al