diff options
author | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:11:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:11:50 -0400 |
commit | 48467641bcc057f7cba3b6cbbe66cb834d64cc81 (patch) | |
tree | f7c5c5e964c220de30fcdcd06b0f1efdb3e22439 /drivers/net | |
parent | 3863e72414fa2ebf5f3b615d1bf99de32e59980a (diff) | |
parent | d70063c4634af060a5387337b7632f6334ca3458 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sungem.c | 1 | ||||
-rw-r--r-- | drivers/net/sungem.h | 2 | ||||
-rw-r--r-- | drivers/net/tg3.c | 28 | ||||
-rw-r--r-- | drivers/net/tun.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/airo.c | 5 |
5 files changed, 34 insertions, 17 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 2608e7a3d214..3f67a42e8503 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -948,6 +948,7 @@ static irqreturn_t gem_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
948 | u32 gem_status = readl(gp->regs + GREG_STAT); | 948 | u32 gem_status = readl(gp->regs + GREG_STAT); |
949 | 949 | ||
950 | if (gem_status == 0) { | 950 | if (gem_status == 0) { |
951 | netif_poll_enable(dev); | ||
951 | spin_unlock_irqrestore(&gp->lock, flags); | 952 | spin_unlock_irqrestore(&gp->lock, flags); |
952 | return IRQ_NONE; | 953 | return IRQ_NONE; |
953 | } | 954 | } |
diff --git a/drivers/net/sungem.h b/drivers/net/sungem.h index 7143fd7cf3f8..ff8ae5f79970 100644 --- a/drivers/net/sungem.h +++ b/drivers/net/sungem.h | |||
@@ -1020,7 +1020,7 @@ struct gem { | |||
1020 | 1020 | ||
1021 | struct gem_init_block *init_block; | 1021 | struct gem_init_block *init_block; |
1022 | struct sk_buff *rx_skbs[RX_RING_SIZE]; | 1022 | struct sk_buff *rx_skbs[RX_RING_SIZE]; |
1023 | struct sk_buff *tx_skbs[RX_RING_SIZE]; | 1023 | struct sk_buff *tx_skbs[TX_RING_SIZE]; |
1024 | dma_addr_t gblock_dvma; | 1024 | dma_addr_t gblock_dvma; |
1025 | 1025 | ||
1026 | struct pci_dev *pdev; | 1026 | struct pci_dev *pdev; |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index af8263a1580e..3faf62310f84 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
68 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
69 | #define DRV_MODULE_VERSION "3.37" | 69 | #define DRV_MODULE_VERSION "3.38" |
70 | #define DRV_MODULE_RELDATE "August 25, 2005" | 70 | #define DRV_MODULE_RELDATE "September 1, 2005" |
71 | 71 | ||
72 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
73 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
@@ -121,12 +121,9 @@ | |||
121 | TG3_RX_RCB_RING_SIZE(tp)) | 121 | TG3_RX_RCB_RING_SIZE(tp)) |
122 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ | 122 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ |
123 | TG3_TX_RING_SIZE) | 123 | TG3_TX_RING_SIZE) |
124 | #define TX_RING_GAP(TP) \ | ||
125 | (TG3_TX_RING_SIZE - (TP)->tx_pending) | ||
126 | #define TX_BUFFS_AVAIL(TP) \ | 124 | #define TX_BUFFS_AVAIL(TP) \ |
127 | (((TP)->tx_cons <= (TP)->tx_prod) ? \ | 125 | ((TP)->tx_pending - \ |
128 | (TP)->tx_cons + (TP)->tx_pending - (TP)->tx_prod : \ | 126 | (((TP)->tx_prod - (TP)->tx_cons) & (TG3_TX_RING_SIZE - 1))) |
129 | (TP)->tx_cons - (TP)->tx_prod - TX_RING_GAP(TP)) | ||
130 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) | 127 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) |
131 | 128 | ||
132 | #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) | 129 | #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) |
@@ -2880,9 +2877,13 @@ static void tg3_tx(struct tg3 *tp) | |||
2880 | 2877 | ||
2881 | tp->tx_cons = sw_idx; | 2878 | tp->tx_cons = sw_idx; |
2882 | 2879 | ||
2883 | if (netif_queue_stopped(tp->dev) && | 2880 | if (unlikely(netif_queue_stopped(tp->dev))) { |
2884 | (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) | 2881 | spin_lock(&tp->tx_lock); |
2885 | netif_wake_queue(tp->dev); | 2882 | if (netif_queue_stopped(tp->dev) && |
2883 | (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) | ||
2884 | netif_wake_queue(tp->dev); | ||
2885 | spin_unlock(&tp->tx_lock); | ||
2886 | } | ||
2886 | } | 2887 | } |
2887 | 2888 | ||
2888 | /* Returns size of skb allocated or < 0 on error. | 2889 | /* Returns size of skb allocated or < 0 on error. |
@@ -3198,9 +3199,7 @@ static int tg3_poll(struct net_device *netdev, int *budget) | |||
3198 | 3199 | ||
3199 | /* run TX completion thread */ | 3200 | /* run TX completion thread */ |
3200 | if (sblk->idx[0].tx_consumer != tp->tx_cons) { | 3201 | if (sblk->idx[0].tx_consumer != tp->tx_cons) { |
3201 | spin_lock(&tp->tx_lock); | ||
3202 | tg3_tx(tp); | 3202 | tg3_tx(tp); |
3203 | spin_unlock(&tp->tx_lock); | ||
3204 | } | 3203 | } |
3205 | 3204 | ||
3206 | /* run RX thread, within the bounds set by NAPI. | 3205 | /* run RX thread, within the bounds set by NAPI. |
@@ -3716,8 +3715,11 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3716 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); | 3715 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); |
3717 | 3716 | ||
3718 | tp->tx_prod = entry; | 3717 | tp->tx_prod = entry; |
3719 | if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) | 3718 | if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) { |
3720 | netif_stop_queue(dev); | 3719 | netif_stop_queue(dev); |
3720 | if (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH) | ||
3721 | netif_wake_queue(tp->dev); | ||
3722 | } | ||
3721 | 3723 | ||
3722 | out_unlock: | 3724 | out_unlock: |
3723 | mmiowb(); | 3725 | mmiowb(); |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index effab0b9adca..50b8c6754b1e 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -18,6 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * Changes: | 19 | * Changes: |
20 | * | 20 | * |
21 | * Mike Kershaw <dragorn@kismetwireless.net> 2005/08/14 | ||
22 | * Add TUNSETLINK ioctl to set the link encapsulation | ||
23 | * | ||
21 | * Mark Smith <markzzzsmith@yahoo.com.au> | 24 | * Mark Smith <markzzzsmith@yahoo.com.au> |
22 | * Use random_ether_addr() for tap MAC address. | 25 | * Use random_ether_addr() for tap MAC address. |
23 | * | 26 | * |
@@ -612,6 +615,18 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
612 | DBG(KERN_INFO "%s: owner set to %d\n", tun->dev->name, tun->owner); | 615 | DBG(KERN_INFO "%s: owner set to %d\n", tun->dev->name, tun->owner); |
613 | break; | 616 | break; |
614 | 617 | ||
618 | case TUNSETLINK: | ||
619 | /* Only allow setting the type when the interface is down */ | ||
620 | if (tun->dev->flags & IFF_UP) { | ||
621 | DBG(KERN_INFO "%s: Linktype set failed because interface is up\n", | ||
622 | tun->dev->name); | ||
623 | return -EBUSY; | ||
624 | } else { | ||
625 | tun->dev->type = (int) arg; | ||
626 | DBG(KERN_INFO "%s: linktype set to %d\n", tun->dev->name, tun->dev->type); | ||
627 | } | ||
628 | break; | ||
629 | |||
615 | #ifdef TUN_DEBUG | 630 | #ifdef TUN_DEBUG |
616 | case TUNSETDEBUG: | 631 | case TUNSETDEBUG: |
617 | tun->debug = arg; | 632 | tun->debug = arg; |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index abac1e40154b..dbcb5a8a2194 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -1308,7 +1308,7 @@ static int micsetup(struct airo_info *ai) { | |||
1308 | int i; | 1308 | int i; |
1309 | 1309 | ||
1310 | if (ai->tfm == NULL) | 1310 | if (ai->tfm == NULL) |
1311 | ai->tfm = crypto_alloc_tfm("aes", 0); | 1311 | ai->tfm = crypto_alloc_tfm("aes", CRYPTO_TFM_REQ_MAY_SLEEP); |
1312 | 1312 | ||
1313 | if (ai->tfm == NULL) { | 1313 | if (ai->tfm == NULL) { |
1314 | printk(KERN_ERR "airo: failed to load transform for AES\n"); | 1314 | printk(KERN_ERR "airo: failed to load transform for AES\n"); |
@@ -2410,8 +2410,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) | |||
2410 | } | 2410 | } |
2411 | } | 2411 | } |
2412 | #ifdef MICSUPPORT | 2412 | #ifdef MICSUPPORT |
2413 | if (ai->tfm) | 2413 | crypto_free_tfm(ai->tfm); |
2414 | crypto_free_tfm(ai->tfm); | ||
2415 | #endif | 2414 | #endif |
2416 | del_airo_dev( dev ); | 2415 | del_airo_dev( dev ); |
2417 | free_netdev( dev ); | 2416 | free_netdev( dev ); |