aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-10-21 11:43:05 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 11:43:05 -0400
commit2198a10b501fd4443430cb17e065a9e859cc58c9 (patch)
tree87f3781d293da0f8f8f61615905eb7bf62b7c128 /drivers/net
parent9941fb62762253774cc6177d0b9172ece5133fe1 (diff)
parentdb5a753bf198ef7a50e17d2ff358adf37efe8648 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/core/dev.c
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/b44.c4
-rw-r--r--drivers/net/ehea/ehea_main.c9
-rw-r--r--drivers/net/ehea/ehea_qmr.h1
-rw-r--r--drivers/net/fec.c41
-rw-r--r--drivers/net/gianfar_ethtool.c2
-rw-r--r--drivers/net/r6040.c22
-rw-r--r--drivers/net/tg3.c6
-rw-r--r--drivers/net/tg3.h2
8 files changed, 56 insertions, 31 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 171da7f75108..c6e86315b3f8 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2170,8 +2170,6 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
2170 dev->irq = sdev->irq; 2170 dev->irq = sdev->irq;
2171 SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); 2171 SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
2172 2172
2173 netif_carrier_off(dev);
2174
2175 err = ssb_bus_powerup(sdev->bus, 0); 2173 err = ssb_bus_powerup(sdev->bus, 0);
2176 if (err) { 2174 if (err) {
2177 dev_err(sdev->dev, 2175 dev_err(sdev->dev,
@@ -2213,6 +2211,8 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
2213 goto err_out_powerdown; 2211 goto err_out_powerdown;
2214 } 2212 }
2215 2213
2214 netif_carrier_off(dev);
2215
2216 ssb_set_drvdata(sdev, dev); 2216 ssb_set_drvdata(sdev, dev);
2217 2217
2218 /* Chip reset provides power to the b44 MAC & PCI cores, which 2218 /* Chip reset provides power to the b44 MAC & PCI cores, which
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index a0d117022be6..bb7d306fb446 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -533,8 +533,15 @@ static inline void ehea_fill_skb(struct net_device *dev,
533 int length = cqe->num_bytes_transfered - 4; /*remove CRC */ 533 int length = cqe->num_bytes_transfered - 4; /*remove CRC */
534 534
535 skb_put(skb, length); 535 skb_put(skb, length);
536 skb->ip_summed = CHECKSUM_UNNECESSARY;
537 skb->protocol = eth_type_trans(skb, dev); 536 skb->protocol = eth_type_trans(skb, dev);
537
538 /* The packet was not an IPV4 packet so a complemented checksum was
539 calculated. The value is found in the Internet Checksum field. */
540 if (cqe->status & EHEA_CQE_BLIND_CKSUM) {
541 skb->ip_summed = CHECKSUM_COMPLETE;
542 skb->csum = csum_unfold(~cqe->inet_checksum_value);
543 } else
544 skb->ip_summed = CHECKSUM_UNNECESSARY;
538} 545}
539 546
540static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array, 547static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array,
diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h
index f608a6c54af5..38104734a3be 100644
--- a/drivers/net/ehea/ehea_qmr.h
+++ b/drivers/net/ehea/ehea_qmr.h
@@ -150,6 +150,7 @@ struct ehea_rwqe {
150#define EHEA_CQE_TYPE_RQ 0x60 150#define EHEA_CQE_TYPE_RQ 0x60
151#define EHEA_CQE_STAT_ERR_MASK 0x700F 151#define EHEA_CQE_STAT_ERR_MASK 0x700F
152#define EHEA_CQE_STAT_FAT_ERR_MASK 0xF 152#define EHEA_CQE_STAT_FAT_ERR_MASK 0xF
153#define EHEA_CQE_BLIND_CKSUM 0x8000
153#define EHEA_CQE_STAT_ERR_TCP 0x4000 154#define EHEA_CQE_STAT_ERR_TCP 0x4000
154#define EHEA_CQE_STAT_ERR_IP 0x2000 155#define EHEA_CQE_STAT_ERR_IP 0x2000
155#define EHEA_CQE_STAT_ERR_CRC 0x1000 156#define EHEA_CQE_STAT_ERR_CRC 0x1000
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index e83f67d22fe3..cce32d43175f 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -678,24 +678,37 @@ static int fec_enet_mii_probe(struct net_device *dev)
678{ 678{
679 struct fec_enet_private *fep = netdev_priv(dev); 679 struct fec_enet_private *fep = netdev_priv(dev);
680 struct phy_device *phy_dev = NULL; 680 struct phy_device *phy_dev = NULL;
681 int ret; 681 char mdio_bus_id[MII_BUS_ID_SIZE];
682 char phy_name[MII_BUS_ID_SIZE + 3];
683 int phy_id;
682 684
683 fep->phy_dev = NULL; 685 fep->phy_dev = NULL;
684 686
685 /* find the first phy */ 687 /* check for attached phy */
686 phy_dev = phy_find_first(fep->mii_bus); 688 for (phy_id = 0; (phy_id < PHY_MAX_ADDR); phy_id++) {
687 if (!phy_dev) { 689 if ((fep->mii_bus->phy_mask & (1 << phy_id)))
688 printk(KERN_ERR "%s: no PHY found\n", dev->name); 690 continue;
689 return -ENODEV; 691 if (fep->mii_bus->phy_map[phy_id] == NULL)
692 continue;
693 if (fep->mii_bus->phy_map[phy_id]->phy_id == 0)
694 continue;
695 strncpy(mdio_bus_id, fep->mii_bus->id, MII_BUS_ID_SIZE);
696 break;
690 } 697 }
691 698
692 /* attach the mac to the phy */ 699 if (phy_id >= PHY_MAX_ADDR) {
693 ret = phy_connect_direct(dev, phy_dev, 700 printk(KERN_INFO "%s: no PHY, assuming direct connection "
694 &fec_enet_adjust_link, 0, 701 "to switch\n", dev->name);
695 PHY_INTERFACE_MODE_MII); 702 strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE);
696 if (ret) { 703 phy_id = 0;
697 printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); 704 }
698 return ret; 705
706 snprintf(phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
707 phy_dev = phy_connect(dev, phy_name, &fec_enet_adjust_link, 0,
708 PHY_INTERFACE_MODE_MII);
709 if (IS_ERR(phy_dev)) {
710 printk(KERN_ERR "%s: could not attach to PHY\n", dev->name);
711 return PTR_ERR(phy_dev);
699 } 712 }
700 713
701 /* mask with MAC supported features */ 714 /* mask with MAC supported features */
@@ -738,7 +751,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
738 fep->mii_bus->read = fec_enet_mdio_read; 751 fep->mii_bus->read = fec_enet_mdio_read;
739 fep->mii_bus->write = fec_enet_mdio_write; 752 fep->mii_bus->write = fec_enet_mdio_write;
740 fep->mii_bus->reset = fec_enet_mdio_reset; 753 fep->mii_bus->reset = fec_enet_mdio_reset;
741 snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id); 754 snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id + 1);
742 fep->mii_bus->priv = fep; 755 fep->mii_bus->priv = fep;
743 fep->mii_bus->parent = &pdev->dev; 756 fep->mii_bus->parent = &pdev->dev;
744 757
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index ae8e5d3c6c1f..5c566ebc54b8 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -538,7 +538,7 @@ static int gfar_set_rx_csum(struct net_device *dev, uint32_t data)
538 538
539 unlock_tx_qs(priv); 539 unlock_tx_qs(priv);
540 unlock_rx_qs(priv); 540 unlock_rx_qs(priv);
541 local_irq_save(flags); 541 local_irq_restore(flags);
542 542
543 for (i = 0; i < priv->num_rx_queues; i++) 543 for (i = 0; i < priv->num_rx_queues; i++)
544 gfar_clean_rx_ring(priv->rx_queue[i], 544 gfar_clean_rx_ring(priv->rx_queue[i],
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 68a84198eb05..0b014c894686 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -908,16 +908,18 @@ static void r6040_multicast_list(struct net_device *dev)
908 /* Multicast Address 1~4 case */ 908 /* Multicast Address 1~4 case */
909 i = 0; 909 i = 0;
910 netdev_for_each_mc_addr(ha, dev) { 910 netdev_for_each_mc_addr(ha, dev) {
911 if (i < MCAST_MAX) { 911 if (i >= MCAST_MAX)
912 adrp = (u16 *) ha->addr; 912 break;
913 iowrite16(adrp[0], ioaddr + MID_1L + 8 * i); 913 adrp = (u16 *) ha->addr;
914 iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); 914 iowrite16(adrp[0], ioaddr + MID_1L + 8 * i);
915 iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); 915 iowrite16(adrp[1], ioaddr + MID_1M + 8 * i);
916 } else { 916 iowrite16(adrp[2], ioaddr + MID_1H + 8 * i);
917 iowrite16(0xffff, ioaddr + MID_1L + 8 * i); 917 i++;
918 iowrite16(0xffff, ioaddr + MID_1M + 8 * i); 918 }
919 iowrite16(0xffff, ioaddr + MID_1H + 8 * i); 919 while (i < MCAST_MAX) {
920 } 920 iowrite16(0xffff, ioaddr + MID_1L + 8 * i);
921 iowrite16(0xffff, ioaddr + MID_1M + 8 * i);
922 iowrite16(0xffff, ioaddr + MID_1H + 8 * i);
921 i++; 923 i++;
922 } 924 }
923} 925}
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 22720eeabddb..852e917778f8 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4754,7 +4754,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
4754 desc_idx, *post_ptr); 4754 desc_idx, *post_ptr);
4755 drop_it_no_recycle: 4755 drop_it_no_recycle:
4756 /* Other statistics kept track of by card. */ 4756 /* Other statistics kept track of by card. */
4757 tp->net_stats.rx_dropped++; 4757 tp->rx_dropped++;
4758 goto next_pkt; 4758 goto next_pkt;
4759 } 4759 }
4760 4760
@@ -4814,7 +4814,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
4814 if (len > (tp->dev->mtu + ETH_HLEN) && 4814 if (len > (tp->dev->mtu + ETH_HLEN) &&
4815 skb->protocol != htons(ETH_P_8021Q)) { 4815 skb->protocol != htons(ETH_P_8021Q)) {
4816 dev_kfree_skb(skb); 4816 dev_kfree_skb(skb);
4817 goto next_pkt; 4817 goto drop_it_no_recycle;
4818 } 4818 }
4819 4819
4820 if (desc->type_flags & RXD_FLAG_VLAN && 4820 if (desc->type_flags & RXD_FLAG_VLAN &&
@@ -9453,6 +9453,8 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
9453 stats->rx_missed_errors = old_stats->rx_missed_errors + 9453 stats->rx_missed_errors = old_stats->rx_missed_errors +
9454 get_stat64(&hw_stats->rx_discards); 9454 get_stat64(&hw_stats->rx_discards);
9455 9455
9456 stats->rx_dropped = tp->rx_dropped;
9457
9456 return stats; 9458 return stats;
9457} 9459}
9458 9460
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 8342190df0ff..4a1974804b9f 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2813,7 +2813,7 @@ struct tg3 {
2813 2813
2814 2814
2815 /* begin "everything else" cacheline(s) section */ 2815 /* begin "everything else" cacheline(s) section */
2816 struct rtnl_link_stats64 net_stats; 2816 unsigned long rx_dropped;
2817 struct rtnl_link_stats64 net_stats_prev; 2817 struct rtnl_link_stats64 net_stats_prev;
2818 struct tg3_ethtool_stats estats; 2818 struct tg3_ethtool_stats estats;
2819 struct tg3_ethtool_stats estats_prev; 2819 struct tg3_ethtool_stats estats_prev;