diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-20 05:27:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-20 05:27:41 -0400 |
commit | 2b1c4354de72ced917d2f3fe88117613f992234b (patch) | |
tree | 3e7643cad45d94e3c331366418532043bd4fa5a9 /drivers/net | |
parent | 5e140dfc1fe87eae27846f193086724806b33c7d (diff) | |
parent | 170ebf85160dd128e1c4206cc197cce7d1424705 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/virtio_net.c
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2.c | 12 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 25 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 20 | ||||
-rw-r--r-- | drivers/net/sh_eth.h | 4 | ||||
-rw-r--r-- | drivers/net/smsc911x.c | 4 | ||||
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 45 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 1 |
7 files changed, 79 insertions, 32 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 8466d351a703..ad446db8e186 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.9.2" | 60 | #define DRV_MODULE_VERSION "1.9.3" |
61 | #define DRV_MODULE_RELDATE "Feb 11, 2009" | 61 | #define DRV_MODULE_RELDATE "March 17, 2009" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -5855,9 +5855,6 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
5855 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { | 5855 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { |
5856 | msix_ent[i].entry = i; | 5856 | msix_ent[i].entry = i; |
5857 | msix_ent[i].vector = 0; | 5857 | msix_ent[i].vector = 0; |
5858 | |||
5859 | snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); | ||
5860 | bp->irq_tbl[i].handler = bnx2_msi_1shot; | ||
5861 | } | 5858 | } |
5862 | 5859 | ||
5863 | rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); | 5860 | rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); |
@@ -5866,8 +5863,11 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
5866 | 5863 | ||
5867 | bp->irq_nvecs = msix_vecs; | 5864 | bp->irq_nvecs = msix_vecs; |
5868 | bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; | 5865 | bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; |
5869 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) | 5866 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { |
5870 | bp->irq_tbl[i].vector = msix_ent[i].vector; | 5867 | bp->irq_tbl[i].vector = msix_ent[i].vector; |
5868 | snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); | ||
5869 | bp->irq_tbl[i].handler = bnx2_msi_1shot; | ||
5870 | } | ||
5871 | } | 5871 | } |
5872 | 5872 | ||
5873 | static void | 5873 | static void |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index bfe1ed8389ca..dce3cf92c613 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3545,11 +3545,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave | |||
3545 | } | 3545 | } |
3546 | break; | 3546 | break; |
3547 | case NETDEV_CHANGE: | 3547 | case NETDEV_CHANGE: |
3548 | /* | 3548 | if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) { |
3549 | * TODO: is this what we get if somebody | 3549 | struct slave *slave; |
3550 | * sets up a hierarchical bond, then rmmod's | 3550 | |
3551 | * one of the slave bonding devices? | 3551 | slave = bond_get_slave_by_dev(bond, slave_dev); |
3552 | */ | 3552 | if (slave) { |
3553 | u16 old_speed = slave->speed; | ||
3554 | u16 old_duplex = slave->duplex; | ||
3555 | |||
3556 | bond_update_speed_duplex(slave); | ||
3557 | |||
3558 | if (bond_is_lb(bond)) | ||
3559 | break; | ||
3560 | |||
3561 | if (old_speed != slave->speed) | ||
3562 | bond_3ad_adapter_speed_changed(slave); | ||
3563 | if (old_duplex != slave->duplex) | ||
3564 | bond_3ad_adapter_duplex_changed(slave); | ||
3565 | } | ||
3566 | } | ||
3567 | |||
3553 | break; | 3568 | break; |
3554 | case NETDEV_DOWN: | 3569 | case NETDEV_DOWN: |
3555 | /* | 3570 | /* |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 7f8e514eb5e9..7b1882765a0c 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -687,6 +687,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
687 | { | 687 | { |
688 | struct net_device *ndev = netdev; | 688 | struct net_device *ndev = netdev; |
689 | struct sh_eth_private *mdp = netdev_priv(ndev); | 689 | struct sh_eth_private *mdp = netdev_priv(ndev); |
690 | irqreturn_t ret = IRQ_NONE; | ||
690 | u32 ioaddr, boguscnt = RX_RING_SIZE; | 691 | u32 ioaddr, boguscnt = RX_RING_SIZE; |
691 | u32 intr_status = 0; | 692 | u32 intr_status = 0; |
692 | 693 | ||
@@ -696,7 +697,13 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
696 | /* Get interrpt stat */ | 697 | /* Get interrpt stat */ |
697 | intr_status = ctrl_inl(ioaddr + EESR); | 698 | intr_status = ctrl_inl(ioaddr + EESR); |
698 | /* Clear interrupt */ | 699 | /* Clear interrupt */ |
699 | ctrl_outl(intr_status, ioaddr + EESR); | 700 | if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF | |
701 | EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF | | ||
702 | TX_CHECK | EESR_ERR_CHECK)) { | ||
703 | ctrl_outl(intr_status, ioaddr + EESR); | ||
704 | ret = IRQ_HANDLED; | ||
705 | } else | ||
706 | goto other_irq; | ||
700 | 707 | ||
701 | if (intr_status & (EESR_FRC | /* Frame recv*/ | 708 | if (intr_status & (EESR_FRC | /* Frame recv*/ |
702 | EESR_RMAF | /* Multi cast address recv*/ | 709 | EESR_RMAF | /* Multi cast address recv*/ |
@@ -723,9 +730,10 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
723 | ndev->name, intr_status); | 730 | ndev->name, intr_status); |
724 | } | 731 | } |
725 | 732 | ||
733 | other_irq: | ||
726 | spin_unlock(&mdp->lock); | 734 | spin_unlock(&mdp->lock); |
727 | 735 | ||
728 | return IRQ_HANDLED; | 736 | return ret; |
729 | } | 737 | } |
730 | 738 | ||
731 | static void sh_eth_timer(unsigned long data) | 739 | static void sh_eth_timer(unsigned long data) |
@@ -844,7 +852,13 @@ static int sh_eth_open(struct net_device *ndev) | |||
844 | int ret = 0; | 852 | int ret = 0; |
845 | struct sh_eth_private *mdp = netdev_priv(ndev); | 853 | struct sh_eth_private *mdp = netdev_priv(ndev); |
846 | 854 | ||
847 | ret = request_irq(ndev->irq, &sh_eth_interrupt, 0, ndev->name, ndev); | 855 | ret = request_irq(ndev->irq, &sh_eth_interrupt, |
856 | #if defined(CONFIG_CPU_SUBTYPE_SH7763) || defined(CONFIG_CPU_SUBTYPE_SH7764) | ||
857 | IRQF_SHARED, | ||
858 | #else | ||
859 | 0, | ||
860 | #endif | ||
861 | ndev->name, ndev); | ||
848 | if (ret) { | 862 | if (ret) { |
849 | printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); | 863 | printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); |
850 | return ret; | 864 | return ret; |
diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index 73bc7181cc18..1537e13e623d 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h | |||
@@ -43,8 +43,8 @@ | |||
43 | 43 | ||
44 | #define SH7763_SKB_ALIGN 32 | 44 | #define SH7763_SKB_ALIGN 32 |
45 | /* Chip Base Address */ | 45 | /* Chip Base Address */ |
46 | # define SH_TSU_ADDR 0xFFE01800 | 46 | # define SH_TSU_ADDR 0xFEE01800 |
47 | # define ARSTR 0xFFE01800 | 47 | # define ARSTR SH_TSU_ADDR |
48 | 48 | ||
49 | /* Chip Registers */ | 49 | /* Chip Registers */ |
50 | /* E-DMAC */ | 50 | /* E-DMAC */ |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index d61514698bb3..ad3cbc91a8fa 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -1225,6 +1225,10 @@ static int smsc911x_open(struct net_device *dev) | |||
1225 | dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", | 1225 | dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", |
1226 | (unsigned long)pdata->ioaddr, dev->irq); | 1226 | (unsigned long)pdata->ioaddr, dev->irq); |
1227 | 1227 | ||
1228 | /* Reset the last known duplex and carrier */ | ||
1229 | pdata->last_duplex = -1; | ||
1230 | pdata->last_carrier = -1; | ||
1231 | |||
1228 | /* Bring the PHY up */ | 1232 | /* Bring the PHY up */ |
1229 | phy_start(pdata->phy_dev); | 1233 | phy_start(pdata->phy_dev); |
1230 | 1234 | ||
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index bee75fa87a9c..2abb5d3becc6 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -255,6 +255,7 @@ const char tulip_media_cap[32] = | |||
255 | 255 | ||
256 | static void tulip_tx_timeout(struct net_device *dev); | 256 | static void tulip_tx_timeout(struct net_device *dev); |
257 | static void tulip_init_ring(struct net_device *dev); | 257 | static void tulip_init_ring(struct net_device *dev); |
258 | static void tulip_free_ring(struct net_device *dev); | ||
258 | static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); | 259 | static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); |
259 | static int tulip_open(struct net_device *dev); | 260 | static int tulip_open(struct net_device *dev); |
260 | static int tulip_close(struct net_device *dev); | 261 | static int tulip_close(struct net_device *dev); |
@@ -502,16 +503,21 @@ tulip_open(struct net_device *dev) | |||
502 | { | 503 | { |
503 | int retval; | 504 | int retval; |
504 | 505 | ||
505 | if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) | ||
506 | return retval; | ||
507 | |||
508 | tulip_init_ring (dev); | 506 | tulip_init_ring (dev); |
509 | 507 | ||
508 | retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev); | ||
509 | if (retval) | ||
510 | goto free_ring; | ||
511 | |||
510 | tulip_up (dev); | 512 | tulip_up (dev); |
511 | 513 | ||
512 | netif_start_queue (dev); | 514 | netif_start_queue (dev); |
513 | 515 | ||
514 | return 0; | 516 | return 0; |
517 | |||
518 | free_ring: | ||
519 | tulip_free_ring (dev); | ||
520 | return retval; | ||
515 | } | 521 | } |
516 | 522 | ||
517 | 523 | ||
@@ -768,23 +774,11 @@ static void tulip_down (struct net_device *dev) | |||
768 | tulip_set_power_state (tp, 0, 1); | 774 | tulip_set_power_state (tp, 0, 1); |
769 | } | 775 | } |
770 | 776 | ||
771 | 777 | static void tulip_free_ring (struct net_device *dev) | |
772 | static int tulip_close (struct net_device *dev) | ||
773 | { | 778 | { |
774 | struct tulip_private *tp = netdev_priv(dev); | 779 | struct tulip_private *tp = netdev_priv(dev); |
775 | void __iomem *ioaddr = tp->base_addr; | ||
776 | int i; | 780 | int i; |
777 | 781 | ||
778 | netif_stop_queue (dev); | ||
779 | |||
780 | tulip_down (dev); | ||
781 | |||
782 | if (tulip_debug > 1) | ||
783 | printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", | ||
784 | dev->name, ioread32 (ioaddr + CSR5)); | ||
785 | |||
786 | free_irq (dev->irq, dev); | ||
787 | |||
788 | /* Free all the skbuffs in the Rx queue. */ | 782 | /* Free all the skbuffs in the Rx queue. */ |
789 | for (i = 0; i < RX_RING_SIZE; i++) { | 783 | for (i = 0; i < RX_RING_SIZE; i++) { |
790 | struct sk_buff *skb = tp->rx_buffers[i].skb; | 784 | struct sk_buff *skb = tp->rx_buffers[i].skb; |
@@ -803,6 +797,7 @@ static int tulip_close (struct net_device *dev) | |||
803 | dev_kfree_skb (skb); | 797 | dev_kfree_skb (skb); |
804 | } | 798 | } |
805 | } | 799 | } |
800 | |||
806 | for (i = 0; i < TX_RING_SIZE; i++) { | 801 | for (i = 0; i < TX_RING_SIZE; i++) { |
807 | struct sk_buff *skb = tp->tx_buffers[i].skb; | 802 | struct sk_buff *skb = tp->tx_buffers[i].skb; |
808 | 803 | ||
@@ -814,6 +809,24 @@ static int tulip_close (struct net_device *dev) | |||
814 | tp->tx_buffers[i].skb = NULL; | 809 | tp->tx_buffers[i].skb = NULL; |
815 | tp->tx_buffers[i].mapping = 0; | 810 | tp->tx_buffers[i].mapping = 0; |
816 | } | 811 | } |
812 | } | ||
813 | |||
814 | static int tulip_close (struct net_device *dev) | ||
815 | { | ||
816 | struct tulip_private *tp = netdev_priv(dev); | ||
817 | void __iomem *ioaddr = tp->base_addr; | ||
818 | |||
819 | netif_stop_queue (dev); | ||
820 | |||
821 | tulip_down (dev); | ||
822 | |||
823 | if (tulip_debug > 1) | ||
824 | printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", | ||
825 | dev->name, ioread32 (ioaddr + CSR5)); | ||
826 | |||
827 | free_irq (dev->irq, dev); | ||
828 | |||
829 | tulip_free_ring (dev); | ||
817 | 830 | ||
818 | return 0; | 831 | return 0; |
819 | } | 832 | } |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3d0033920224..a6f1e19159d8 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -953,6 +953,7 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
953 | 953 | ||
954 | vi->status = VIRTIO_NET_S_LINK_UP; | 954 | vi->status = VIRTIO_NET_S_LINK_UP; |
955 | virtnet_update_status(vi); | 955 | virtnet_update_status(vi); |
956 | netif_carrier_on(dev); | ||
956 | 957 | ||
957 | pr_debug("virtnet: registered device %s\n", dev->name); | 958 | pr_debug("virtnet: registered device %s\n", dev->name); |
958 | return 0; | 959 | return 0; |