net driver updates
Subsystems (2)
PATCH 1/1 net driver updates
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
drivers/net/Kconfig | 8 + drivers/net/chelsio/cxgb2.c | 23 +- drivers/net/chelsio/sge.c | 115 ++++----- drivers/net/chelsio/sge.h | 4 drivers/net/macb.c | 8 - drivers/net/macb.h | 6 drivers/net/myri10ge/myri10ge.c | 498 ++++++++++++++++++++------------------- drivers/net/smc91x.h | 90 ------- drivers/net/ucc_geth.c | 12 + 9 files changed, 334 insertions(+), 430 deletions(-)
Brice Goglin:
myri10ge: indentation cleanups
myri10ge: add page-based skb routines
myri10ge: switch to page-based skb
myri10ge: drop contiguous skb routines
myri10ge: Full vlan frame in small_bytes
myri10ge: fix big_bytes in case of vlan frames
myri10ge: update driver version to 1.1.0
Haavard Skinnemoen:
MACB: Use struct delayed_work instead of struct work_struct
MACB: Use __raw register access
Paul Mundt:
smc91x: Kill off excessive versatile hooks.
Scott Wood:
ucc_geth: compilation error fixes
ucc_geth: Initialize mdio_lock.
Stephen Hemminger:
chelsio: working NAPI
drivers/net/Kconfig +8 -0
@@ -2384,6 +2384,14 @@ config CHELSIO_T1_1G Enables support for Chelsio's gigabit Ethernet PCI cards. If you are using only 10G cards say 'N' here. +config CHELSIO_T1_NAPI + bool "Use Rx Polling (NAPI)" + depends on CHELSIO_T1 + default y + help + NAPI is a driver API designed to reduce CPU and interrupt load + when the driver is receiving lots of packets from the card. + config EHEA tristate "eHEA Ethernet support" depends on IBMEBUS
drivers/net/chelsio/cxgb2.c +7 -16
@@ -220,9 +220,8 @@ static int cxgb_up(struct adapter *adaptt1_interrupts_clear (adapter); - adapter->params.has_msi = !disable_msi &&pci_enable_msi (adapter->pdev) ==0 ; - err =request_irq (adapter->pdev->irq, -t1_select_intr_handler (adapter), + adapter->params.has_msi = !disable_msi && !pci_enable_msi (adapter->pdev); + err =request_irq (adapter->pdev->irq, t1_interrupt, adapter->params.has_msi ?0 :IRQF_SHARED , adapter->name, adapter);if (err) {
@@ -764,18 +763,7 @@ static int set_coalesce(struct net_devic {struct adapter *adapter = dev->priv; -/* -* If RX coalescing is requested we use NAPI, otherwise interrupts. -* This choice can be made only when all ports and the TOE are off. -*/ -if (adapter->open_device_map ==0 ) - adapter->params.sge.polling = c->use_adaptive_rx_coalesce; - -if (adapter->params.sge.polling) { - adapter->params.sge.rx_coalesce_usecs =0 ; - }else { - adapter->params.sge.rx_coalesce_usecs = c->rx_coalesce_usecs; - } + adapter->params.sge.rx_coalesce_usecs = c->rx_coalesce_usecs; adapter->params.sge.coalesce_enable = c->use_adaptive_rx_coalesce; adapter->params.sge.sample_interval_usecs = c->rate_sample_interval;t1_sge_set_coalesce_params (adapter->sge, &adapter->params.sge);
@@ -944,7 +932,7 @@ static void t1_netpoll(struct net_devicestruct adapter *adapter = dev->priv;local_irq_save (flags); -t1_select_intr_handler (adapter)(adapter->pdev->irq, adapter); +t1_interrupt (adapter->pdev->irq, adapter); local_irq_restore(flags); }#endif
@@ -1165,7 +1153,10 @@ #endif#ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = t1_netpoll;#endif +#ifdef CONFIG_CHELSIO_T1_NAPI netdev->weight =64 ; + netdev->poll = t1_poll; +#endif SET_ETHTOOL_OPS (netdev, &t1_ethtool_ops); }
drivers/net/chelsio/sge.c +49 -66
195 lines not on this page · raw message
drivers/net/chelsio/sge.h +3 -1
@@ -76,7 +76,9 @@ struct sge *t1_sge_create(struct adapterint t1_sge_configure (struct sge *,struct sge_params *);int t1_sge_set_coalesce_params (struct sge *,struct sge_params *);void t1_sge_destroy (struct sge *); -irq_handler_t t1_select_intr_handler (adapter_t *adapter); +irqreturn_t t1_interrupt (int irq,void *cookie); +int t1_poll (struct net_device *,int *); +int t1_start_xmit (struct sk_buff *skb,struct net_device *dev);void t1_set_vlan_accel (struct adapter *adapter,int on_off);void t1_sge_start (struct sge *);
drivers/net/macb.c +4 -4
@@ -264,12 +264,12 @@ static void macb_update_stats(struct macWARN_ON ((unsigned long )(end - p -1 ) != (MACB_TPF -MACB_PFR ) /4 );for (; p < end; p++, reg++) - *p +=readl (reg); + *p +=__raw_readl (reg); } -static void macb_periodic_task (void *arg) +static void macb_periodic_task (struct work_struct *work) { -struct macb *bp = arg; + struct macb *bp = container_of(work, struct macb, periodic_task.work);macb_update_stats (bp);macb_check_media (bp,1 ,0 );
@@ -1088,7 +1088,7 @@ static int __devinit macb_probe(struct p dev->base_addr = regs->start; -INIT_WORK (&bp->periodic_task, macb_periodic_task, bp); +INIT_DELAYED_WORK (&bp->periodic_task, macb_periodic_task);mutex_init (&bp->mdio_mutex);init_completion (&bp->mdio_complete);
drivers/net/macb.h +3 -3
@@ -250,9 +250,9 @@ #define MACB_BFINS(name,value,old) \/* Register access macros */ #define macb_readl (port,reg) \ - readl((port)->regs + MACB_##reg) + __raw_readl((port)->regs + MACB_##reg)#define macb_writel (port,reg,value) \ - writel((value), (port)->regs + MACB_##reg) + __raw_writel((value), (port)->regs + MACB_##reg)struct dma_desc {u32 addr;
@@ -377,7 +377,7 @@ struct macb {unsigned int rx_pending, tx_pending; -struct work_struct periodic_task; +struct delayed_work periodic_task;struct mutex mdio_mutex;struct completion mdio_complete;
drivers/net/myri10ge/myri10ge.c +253 -245
667 lines not on this page · raw message
drivers/net/smc91x.h +0 -90
96 lines not on this page · raw message
drivers/net/ucc_geth.c +7 -5
@@ -194,9 +194,9 @@ static void enqueue(struct list_head *no {unsigned long flags; -spin_lock_irqsave (ugeth_lock, flags); +spin_lock_irqsave (&ugeth_lock, flags);list_add_tail (node, lh); -spin_unlock_irqrestore (ugeth_lock, flags); +spin_unlock_irqrestore (&ugeth_lock, flags); }#endif /* CONFIG_UGETH_FILTERING */
@@ -204,14 +204,14 @@ static struct list_head *dequeue(struct {unsigned long flags; -spin_lock_irqsave (ugeth_lock, flags); +spin_lock_irqsave (&ugeth_lock, flags);if (!list_empty (lh)) {struct list_head *node = lh->next;list_del (node); -spin_unlock_irqrestore (ugeth_lock, flags); +spin_unlock_irqrestore (&ugeth_lock, flags);return node; }else { -spin_unlock_irqrestore (ugeth_lock, flags); +spin_unlock_irqrestore (&ugeth_lock, flags);return NULL ; } }
@@ -1852,6 +1852,8 @@ static int init_phy(struct net_device *d mii_info->mdio_read = &read_phy_reg; mii_info->mdio_write = &write_phy_reg; +spin_lock_init (&mii_info->mdio_lock); + ugeth->mii_info = mii_info;spin_lock_irq (&ugeth->lock);