diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /drivers/net/arm | |
parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'drivers/net/arm')
-rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 1fcf8388b1c8..6f42ad728915 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -456,7 +456,8 @@ static inline void queue_put_desc(unsigned int queue, u32 phys, | |||
456 | debug_desc(phys, desc); | 456 | debug_desc(phys, desc); |
457 | BUG_ON(phys & 0x1F); | 457 | BUG_ON(phys & 0x1F); |
458 | qmgr_put_entry(queue, phys); | 458 | qmgr_put_entry(queue, phys); |
459 | BUG_ON(qmgr_stat_overflow(queue)); | 459 | /* Don't check for queue overflow here, we've allocated sufficient |
460 | length and queues >= 32 don't support this check anyway. */ | ||
460 | } | 461 | } |
461 | 462 | ||
462 | 463 | ||
@@ -512,8 +513,8 @@ static int eth_poll(struct napi_struct *napi, int budget) | |||
512 | #endif | 513 | #endif |
513 | napi_complete(napi); | 514 | napi_complete(napi); |
514 | qmgr_enable_irq(rxq); | 515 | qmgr_enable_irq(rxq); |
515 | if (!qmgr_stat_empty(rxq) && | 516 | if (!qmgr_stat_below_low_watermark(rxq) && |
516 | napi_reschedule(napi)) { | 517 | napi_reschedule(napi)) { /* not empty again */ |
517 | #if DEBUG_RX | 518 | #if DEBUG_RX |
518 | printk(KERN_DEBUG "%s: eth_poll" | 519 | printk(KERN_DEBUG "%s: eth_poll" |
519 | " napi_reschedule successed\n", | 520 | " napi_reschedule successed\n", |
@@ -630,9 +631,9 @@ static void eth_txdone_irq(void *unused) | |||
630 | port->tx_buff_tab[n_desc] = NULL; | 631 | port->tx_buff_tab[n_desc] = NULL; |
631 | } | 632 | } |
632 | 633 | ||
633 | start = qmgr_stat_empty(port->plat->txreadyq); | 634 | start = qmgr_stat_below_low_watermark(port->plat->txreadyq); |
634 | queue_put_desc(port->plat->txreadyq, phys, desc); | 635 | queue_put_desc(port->plat->txreadyq, phys, desc); |
635 | if (start) { | 636 | if (start) { /* TX-ready queue was empty */ |
636 | #if DEBUG_TX | 637 | #if DEBUG_TX |
637 | printk(KERN_DEBUG "%s: eth_txdone_irq xmit ready\n", | 638 | printk(KERN_DEBUG "%s: eth_txdone_irq xmit ready\n", |
638 | port->netdev->name); | 639 | port->netdev->name); |
@@ -708,13 +709,14 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
708 | queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc); | 709 | queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc); |
709 | dev->trans_start = jiffies; | 710 | dev->trans_start = jiffies; |
710 | 711 | ||
711 | if (qmgr_stat_empty(txreadyq)) { | 712 | if (qmgr_stat_below_low_watermark(txreadyq)) { /* empty */ |
712 | #if DEBUG_TX | 713 | #if DEBUG_TX |
713 | printk(KERN_DEBUG "%s: eth_xmit queue full\n", dev->name); | 714 | printk(KERN_DEBUG "%s: eth_xmit queue full\n", dev->name); |
714 | #endif | 715 | #endif |
715 | netif_stop_queue(dev); | 716 | netif_stop_queue(dev); |
716 | /* we could miss TX ready interrupt */ | 717 | /* we could miss TX ready interrupt */ |
717 | if (!qmgr_stat_empty(txreadyq)) { | 718 | /* really empty in fact */ |
719 | if (!qmgr_stat_below_low_watermark(txreadyq)) { | ||
718 | #if DEBUG_TX | 720 | #if DEBUG_TX |
719 | printk(KERN_DEBUG "%s: eth_xmit ready again\n", | 721 | printk(KERN_DEBUG "%s: eth_xmit ready again\n", |
720 | dev->name); | 722 | dev->name); |
@@ -814,29 +816,29 @@ static int request_queues(struct port *port) | |||
814 | int err; | 816 | int err; |
815 | 817 | ||
816 | err = qmgr_request_queue(RXFREE_QUEUE(port->id), RX_DESCS, 0, 0, | 818 | err = qmgr_request_queue(RXFREE_QUEUE(port->id), RX_DESCS, 0, 0, |
817 | "%s:RX-free", port->netdev->name); | 819 | "%s:RX-free", port->netdev->name); |
818 | if (err) | 820 | if (err) |
819 | return err; | 821 | return err; |
820 | 822 | ||
821 | err = qmgr_request_queue(port->plat->rxq, RX_DESCS, 0, 0, | 823 | err = qmgr_request_queue(port->plat->rxq, RX_DESCS, 0, 0, |
822 | "%s:RX", port->netdev->name); | 824 | "%s:RX", port->netdev->name); |
823 | if (err) | 825 | if (err) |
824 | goto rel_rxfree; | 826 | goto rel_rxfree; |
825 | 827 | ||
826 | err = qmgr_request_queue(TX_QUEUE(port->id), TX_DESCS, 0, 0, | 828 | err = qmgr_request_queue(TX_QUEUE(port->id), TX_DESCS, 0, 0, |
827 | "%s:TX", port->netdev->name); | 829 | "%s:TX", port->netdev->name); |
828 | if (err) | 830 | if (err) |
829 | goto rel_rx; | 831 | goto rel_rx; |
830 | 832 | ||
831 | err = qmgr_request_queue(port->plat->txreadyq, TX_DESCS, 0, 0, | 833 | err = qmgr_request_queue(port->plat->txreadyq, TX_DESCS, 0, 0, |
832 | "%s:TX-ready", port->netdev->name); | 834 | "%s:TX-ready", port->netdev->name); |
833 | if (err) | 835 | if (err) |
834 | goto rel_tx; | 836 | goto rel_tx; |
835 | 837 | ||
836 | /* TX-done queue handles skbs sent out by the NPEs */ | 838 | /* TX-done queue handles skbs sent out by the NPEs */ |
837 | if (!ports_open) { | 839 | if (!ports_open) { |
838 | err = qmgr_request_queue(TXDONE_QUEUE, TXDONE_QUEUE_LEN, 0, 0, | 840 | err = qmgr_request_queue(TXDONE_QUEUE, TXDONE_QUEUE_LEN, 0, 0, |
839 | "%s:TX-done", DRV_NAME); | 841 | "%s:TX-done", DRV_NAME); |
840 | if (err) | 842 | if (err) |
841 | goto rel_txready; | 843 | goto rel_txready; |
842 | } | 844 | } |