2.6.26 net driver updates
Subsystems (7)
PATCH 1/1 2.6.26 net driver updates
Please pull from 'upstream-net26' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-net26
to receive the following updates:
drivers/net/8139too.c | 10 +- drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/atp.c | 4 +- drivers/net/cxgb3/cxgb3_offload.c | 22 +- drivers/net/defxx.c | 3 +- drivers/net/e1000/e1000.h | 27 +- drivers/net/e1000/e1000_ethtool.c | 17 +- drivers/net/e1000/e1000_hw.c | 223 ++++---- drivers/net/e1000/e1000_hw.h | 62 +- drivers/net/e1000/e1000_main.c | 131 ++--- drivers/net/e1000/e1000_osdep.h | 7 - drivers/net/e1000e/e1000.h | 4 - drivers/net/e1000e/lib.c | 56 -- drivers/net/e1000e/netdev.c | 37 +- drivers/net/forcedeth.c | 6 +- drivers/net/gianfar.c | 24 +- drivers/net/gianfar.h | 9 +- drivers/net/ibmveth.c | 42 +-- drivers/net/ixgb/ixgb.h | 28 +- drivers/net/ixgb/ixgb_ee.c | 50 +- drivers/net/ixgb/ixgb_ee.h | 2 +- drivers/net/ixgb/ixgb_ethtool.c | 17 +- drivers/net/ixgb/ixgb_hw.c | 57 +- drivers/net/ixgb/ixgb_hw.h | 18 +- drivers/net/ixgb/ixgb_main.c | 96 ++-- drivers/net/ixgb/ixgb_osdep.h | 7 - drivers/net/korina.c | 1233 +++++++++++++++++++++++++++++++++++++ drivers/net/mv643xx_eth.c | 2 +- drivers/net/natsemi.c | 10 +- drivers/net/ni52.c | 255 ++++---- drivers/net/ni52.h | 4 +- drivers/net/phy/broadcom.c | 57 ++- drivers/net/qla3xxx.c | 6 +- drivers/net/s2io.c | 17 +- drivers/net/skfp/fplustm.c | 12 +- drivers/net/skfp/h/fplustm.h | 20 +- drivers/net/skfp/hwmtm.c | 86 ++-- drivers/net/skfp/skfddi.c | 4 +- drivers/net/usb/dm9601.c | 10 +- drivers/net/usb/rndis_host.c | 5 +- 41 files changed, 1948 insertions(+), 740 deletions(-) create mode 100644 drivers/net/korina.c
Al Viro (13):
ni52 trivial iomem annotations
ni52: unbreak scp_struct
ni52: kill the second argument of check586(), get rid of bogus pointer
ni52: make ->base char __iomem *
ni52: clean up initialization of priv
ni52: clean up check586()
ni52: switch to ioremap()
ni52: more unbreaking
misc drivers/net annotations
skfp annotations
annotate cxgb3 (ab)uses of skb->priority/skb->csum endianness annotations: rndis
s2io annotations
Andy Fleming (2):
gianfar: Only process completed frames
gianfar: Fix Rx/Tx HW interrupt coalescing counter reset procedure.
Anton Vorontsov (1):
phy/broadcom: add support for BCM5481 PHY
Auke Kok (2):
ixgb: move externs out of .c files
e1000e: remove no longer used e1000e_read_nvm_spi
Dai Haruki (2):
gianfar: Fix the data buffer stashing amount
gianfar: Fix frame size calculation when hardware VLAN acceleration is on
Daniel Drake (1):
forcedeth: Use round_jiffies for stats timer
Florian Fainelli (1):
Add support the Korina (IDT RC32434) Ethernet MAC
Jesse Brandeburg (4):
ixgb: add explicit state checking
e1000e: remove irq_sem
e1000: remove irq_sem
ixgb: remove irq_sem
Joe Perches (2):
e1000: Convert boolean_t to bool
ixgb: convert boolean_t to bool
Julia Lawall (1):
drivers/net/mv643xx_eth.c: Use FIELD_SIZEOF
Marcin Slusarz (1):
qla3xxx: convert byte order of constant instead of variable
Pavel Emelyanov (1):
Use single_open instead of manual manipulations.
drivers/net/8139too.c +5 -5
@@ -966,8 +966,8 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, addr_len =read_eeprom (ioaddr,0 ,8 ) ==0x8129 ?8 :6 ;for (i =0 ; i <3 ; i++) - ((u16 *) (dev->dev_addr))[i] = -le16_to_cpu (read_eeprom (ioaddr, i +7 , addr_len)); + ((__le16 *) (dev->dev_addr))[i] = +cpu_to_le16 (read_eeprom (ioaddr, i +7 , addr_len));memcpy (dev->perm_addr, dev->dev_addr, dev->addr_len);/* The Rtl8139-specific entries in the device structure. */
@@ -1373,8 +1373,8 @@ static void rtl8139_hw_start (struct net_device *dev)/* unlock Config[01234] and BMCR register writes */ RTL_W8_F (Cfg9346, Cfg9346_Unlock);/* Restore our idea of the MAC address. */ -RTL_W32_F (MAC0 +0 ,cpu_to_le32 (*(u32 *) (dev->dev_addr +0 ))); -RTL_W32_F (MAC0 +4 ,cpu_to_le32 (*(u32 *) (dev->dev_addr +4 ))); +RTL_W32_F (MAC0 +0 ,le32_to_cpu (*(__le32 *) (dev->dev_addr +0 ))); +RTL_W32_F (MAC0 +4 ,le16_to_cpu (*(__le16 *) (dev->dev_addr +4 )));/* Must enable Tx/Rx before setting transfer thresholds! */ RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb);
@@ -1945,7 +1945,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,rmb ();/* read size+status of next frame from DMA ring buffer */ - rx_status =le32_to_cpu (*(u32 *) (rx_ring + ring_offset)); + rx_status =le32_to_cpu (*(__le32 *) (rx_ring + ring_offset)); rx_size = rx_status >>16 ; pkt_size = rx_size -4 ;
drivers/net/Kconfig +7 -0
@@ -467,6 +467,13 @@ config SNI_82596 Say Y here to support the on-board Intel 82596 ethernet controller built into SNI RM machines. +config KORINA + tristate "Korina (IDT RC32434) Ethernet support" + depends on NET_ETHERNET && MIKROTIK_RB500 + help + If you have a Mikrotik RouterBoard 500 or IDT RC32434 + based system say Y. Otherwise say N. + config MIPS_JAZZ_SONIC tristate "MIPS JAZZ onboard SONIC Ethernet support" depends on MACH_JAZZ
drivers/net/Makefile +1 -0
@@ -190,6 +190,7 @@ obj-$(CONFIG_ZORRO8390) += zorro8390.o obj-$(CONFIG_HPLANCE) += hplance.o 7990.o obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o obj-$(CONFIG_EQUALIZER) += eql.o +obj-$(CONFIG_KORINA) += korina.o obj-$(CONFIG_MIPS_JAZZ_SONIC) += jazzsonic.o obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o
drivers/net/atp.c +2 -2
@@ -378,8 +378,8 @@ static void __init get_node_ID(struct net_device *dev) sa_offset =15 ;for (i =0 ; i <3 ; i++) - ((u16 *)dev->dev_addr)[i] = -be16_to_cpu (eeprom_op (ioaddr,EE_READ (sa_offset + i))); + ((__be16 *)dev->dev_addr)[i] = +cpu_to_be16 (eeprom_op (ioaddr,EE_READ (sa_offset + i)));write_reg (ioaddr,CMR2 ,CMR2_NULL ); }
drivers/net/cxgb3/cxgb3_offload.c +19 -3
@@ -833,10 +833,26 @@ static int do_trace(struct t3cdev *dev, struct sk_buff *skb)return 0 ; } +/* +* That skb would better have come from process_responses() where we abuse +* ->priority and ->csum to carry our data. NB: if we get to per-arch +* ->csum, the things might get really interesting here. +*/ + +static inline u32 get_hwtid (struct sk_buff *skb) +{ +return ntohl ((__force __be32 )skb->priority) >>8 &0xfffff ; +} + +static inline u32 get_opcode (struct sk_buff *skb) +{ +return G_OPCODE (ntohl ((__force __be32 )skb->csum)); +} +static int do_term (struct t3cdev *dev,struct sk_buff *skb) { -unsigned int hwtid =ntohl (skb->priority) >>8 &0xfffff ; -unsigned int opcode =G_OPCODE (ntohl (skb->csum)); +unsigned int hwtid =get_hwtid (skb); +unsigned int opcode =get_opcode (skb);struct t3c_tid_entry *t3c_tid; t3c_tid =lookup_tid (&(T3C_DATA (dev))->tid_maps, hwtid);
@@ -914,7 +930,7 @@ int process_rx(struct t3cdev *dev, struct sk_buff **skbs, int n) {while (n--) {struct sk_buff *skb = *skbs++; -unsigned int opcode =G_OPCODE (ntohl (skb->csum)); +unsigned int opcode =get_opcode (skb);int ret = cpl_handlers[opcode] (dev, skb);#if VALIDATE_TID
drivers/net/defxx.c +2 -1
@@ -971,7 +971,8 @@ static int __devinit dfx_driver_init(struct net_device *dev,int alloc_size;/* total buffer size needed */ char *top_v, *curr_v;/* virtual addrs into memory block */ dma_addr_t top_p, curr_p;/* physical addrs into memory block */ -u32 data, le32;/* host data register value */ +u32 data;/* host data register value */ +__le32 le32;char *board_name =NULL ;DBG_printk ("In dfx_driver_init...\n" );
drivers/net/e1000/e1000.h +13 -14
@@ -188,7 +188,7 @@ struct e1000_tx_ring {spinlock_t tx_lock;uint16_t tdh;uint16_t tdt; -boolean_t last_tx_tso; +bool last_tx_tso; };struct e1000_rx_ring {
@@ -249,7 +249,6 @@ struct e1000_adapter {#ifdef CONFIG_E1000_NAPI spinlock_t tx_queue_lock;#endif -atomic_t irq_sem;unsigned int total_tx_bytes;unsigned int total_tx_packets;unsigned int total_rx_bytes;
@@ -283,17 +282,17 @@ struct e1000_adapter {uint32_t tx_fifo_size;uint8_t tx_timeout_factor;atomic_t tx_fifo_stall; -boolean_t pcix_82544; -boolean_t detect_tx_hung; +bool pcix_82544; +bool detect_tx_hung;/* RX */ #ifdef CONFIG_E1000_NAPI -boolean_t (*clean_rx) (struct e1000_adapter *adapter, -struct e1000_rx_ring *rx_ring, -int *work_done,int work_to_do); +bool (*clean_rx) (struct e1000_adapter *adapter, +struct e1000_rx_ring *rx_ring, +int *work_done,int work_to_do);#else -boolean_t (*clean_rx) (struct e1000_adapter *adapter, -struct e1000_rx_ring *rx_ring); +bool (*clean_rx) (struct e1000_adapter *adapter, +struct e1000_rx_ring *rx_ring);#endif void (*alloc_rx_buf) (struct e1000_adapter *adapter, struct e1000_rx_ring *rx_ring,
@@ -312,7 +311,7 @@ struct e1000_adapter {uint32_t alloc_rx_buff_failed;uint32_t rx_int_delay;uint32_t rx_abs_int_delay; -boolean_t rx_csum; +bool rx_csum;unsigned int rx_ps_pages;uint32_t gorcl;uint64_t gorcl_old;
@@ -335,12 +334,12 @@ struct e1000_adapter {struct e1000_rx_ring test_rx_ring;int msg_enable; -boolean_t have_msi; +bool have_msi;/* to not mess up cache alignment, always add to the bottom */ -boolean_t tso_force; -boolean_t smart_power_down;/* phy smart power down */ -boolean_t quad_port_a; +bool tso_force; +bool smart_power_down;/* phy smart power down */ +bool quad_port_a;unsigned long flags;uint32_t eeprom_wol; };
drivers/net/e1000/e1000_ethtool.c +9 -8
@@ -353,7 +353,7 @@ e1000_set_tso(struct net_device *netdev, uint32_t data) netdev->features &= ~NETIF_F_TSO6 ;DPRINTK (PROBE ,INFO ,"TSO is %s\n" , data ?"Enabled" :"Disabled" ); - adapter->tso_force = TRUE; + adapter->tso_force = true;return 0 ; }
@@ -922,7 +922,8 @@ static int e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) { struct net_device *netdev = adapter->netdev; -uint32_t mask, i=0 , shared_int = TRUE; +uint32_t mask, i =0 ; +bool shared_int = true;uint32_t irq = adapter->pdev->irq; *data =0 ;
@@ -931,7 +932,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)/* Hook up test interrupt handler just for this test */ if (!request_irq (irq, &e1000_test_intr,IRQF_PROBE_SHARED , netdev->name, netdev)) - shared_int = FALSE; + shared_int = false;else if (request_irq (irq, &e1000_test_intr,IRQF_SHARED , netdev->name, netdev)) { *data =1 ;
@@ -1295,7 +1296,7 @@ e1000_integrated_phy_loopback(struct e1000_adapter *adapter)uint32_t ctrl_reg =0 ;uint32_t stat_reg =0 ; - adapter->hw.autoneg = FALSE; + adapter->hw.autoneg = false;if (adapter->hw.phy_type == e1000_phy_m88) {/* Auto-MDI/MDIX Off */
@@ -1473,7 +1474,7 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter)case e1000_82545_rev_3:case e1000_82546_rev_3:default : - hw->autoneg = TRUE; + hw->autoneg = true;if (hw->phy_type == e1000_phy_gg82563) e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
@@ -1607,13 +1608,13 @@ e1000_link_test(struct e1000_adapter *adapter, uint64_t *data) *data =0 ;if (adapter->hw.media_type == e1000_media_type_internal_serdes) {int i =0 ; - adapter->hw.serdes_link_down = TRUE; + adapter->hw.serdes_link_down = true;/* On some blade server designs, link establishment * could take as long as 2-3 minutes */ do {e1000_check_for_link (&adapter->hw); -if (adapter->hw.serdes_link_down == FALSE) +if (!adapter->hw.serdes_link_down)return *data;msleep (20 ); }while (i++ <3750 );
@@ -1649,7 +1650,7 @@ e1000_diag_test(struct net_device *netdev, struct ethtool_test *eth_test, uint64_t *data) { struct e1000_adapter *adapter = netdev_priv(netdev); -boolean_t if_running =netif_running (netdev); +bool if_running =netif_running (netdev);set_bit (__E1000_TESTING, &adapter->flags);if (eth_test->flags ==ETH_TEST_FL_OFFLINE ) {
drivers/net/e1000/e1000_hw.c +111 -112
709 lines not on this page · raw message
drivers/net/e1000/e1000_hw.h +31 -31
103 lines not on this page · raw message
drivers/net/e1000/e1000_main.c +60 -71
374 lines not on this page · raw message
drivers/net/e1000/e1000_osdep.h +0 -7
@@ -41,13 +41,6 @@#include <linux/interrupt.h> #include <linux/sched.h> -typedef enum { -#undef FALSE - FALSE = 0, -#undef TRUE - TRUE = 1 -}boolean_t ; -#ifdef DBG #define DEBUGOUT (S ) printk(KERN_DEBUG S "\n") #define DEBUGOUT1(S, A...) printk(KERN_DEBUG S "\n", A)
drivers/net/e1000e/e1000.h +0 -4
@@ -167,9 +167,6 @@ struct e1000_adapter {spinlock_t tx_queue_lock;/* prevent concurrent tail updates */ -/* this is still needed for 82571 and above */ -atomic_t irq_sem; -/* track device up/down/testing state */ unsigned long state;
@@ -462,7 +459,6 @@ extern s32 e1000e_acquire_nvm(struct e1000_hw *hw);extern s32 e1000e_write_nvm_spi (struct e1000_hw *hw,u16 offset,u16 words,u16 *data);extern s32 e1000e_update_nvm_checksum_generic (struct e1000_hw *hw);extern s32 e1000e_poll_eerd_eewr_done (struct e1000_hw *hw,int ee_reg); -extern s32 e1000e_read_nvm_spi (struct e1000_hw *hw,u16 offset,u16 words,u16 *data);extern s32 e1000e_read_nvm_eerd (struct e1000_hw *hw,u16 offset,u16 words,u16 *data);extern s32 e1000e_validate_nvm_checksum_generic (struct e1000_hw *hw);extern void e1000e_release_nvm (struct e1000_hw *hw);
drivers/net/e1000e/lib.c +0 -56
62 lines not on this page · raw message
drivers/net/e1000e/netdev.c +14 -23
@@ -836,9 +836,7 @@ static irqreturn_t e1000_intr_msi(int irq, void *data)struct e1000_hw *hw = &adapter->hw;u32 icr =er32 (ICR ); -/* read ICR disables interrupts using IAM, so keep up with our -* enable/disable accounting */ -atomic_inc (&adapter->irq_sem); +/* read ICR disables interrupts using IAM */ if (icr & (E1000_ICR_RXSEQ |E1000_ICR_LSC )) { hw->mac.get_link_status =1 ;
@@ -868,8 +866,6 @@ static irqreturn_t e1000_intr_msi(int irq, void *data) adapter->total_rx_bytes =0 ; adapter->total_rx_packets =0 ;__netif_rx_schedule (netdev, &adapter->napi); - }else { -atomic_dec (&adapter->irq_sem); }return IRQ_HANDLED ;
@@ -895,11 +891,8 @@ static irqreturn_t e1000_intr(int irq, void *data)if (!(icr &E1000_ICR_INT_ASSERTED ))return IRQ_NONE ; -/* Interrupt Auto-Mask...upon reading ICR, -* interrupts are masked. No need for the -* IMC write, but it does mean we should -* account for it ASAP. */ -atomic_inc (&adapter->irq_sem); +/* Interrupt Auto-Mask...upon reading ICR, interrupts are masked. No +* need for the IMC write */ if (icr & (E1000_ICR_RXSEQ |E1000_ICR_LSC )) { hw->mac.get_link_status =1 ;
@@ -931,8 +924,6 @@ static irqreturn_t e1000_intr(int irq, void *data) adapter->total_rx_bytes =0 ; adapter->total_rx_packets =0 ;__netif_rx_schedule (netdev, &adapter->napi); - }else { -atomic_dec (&adapter->irq_sem); }return IRQ_HANDLED ;
@@ -983,7 +974,6 @@ static void e1000_irq_disable(struct e1000_adapter *adapter) {struct e1000_hw *hw = &adapter->hw; -atomic_inc (&adapter->irq_sem);ew32 (IMC , ~0 );e1e_flush ();synchronize_irq (adapter->pdev->irq);
@@ -996,10 +986,8 @@ static void e1000_irq_enable(struct e1000_adapter *adapter) {struct e1000_hw *hw = &adapter->hw; -if (atomic_dec_and_test (&adapter->irq_sem)) { -ew32 (IMS ,IMS_ENABLE_MASK ); -e1e_flush (); - } +ew32 (IMS ,IMS_ENABLE_MASK ); +e1e_flush (); }/**
@@ -1427,9 +1415,12 @@ static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)struct e1000_hw *hw = &adapter->hw;u32 vfta, index; -e1000_irq_disable (adapter); +if (!test_bit (__E1000_DOWN, &adapter->state)) +e1000_irq_disable (adapter);vlan_group_set_device (adapter->vlgrp, vid,NULL ); -e1000_irq_enable (adapter); + +if (!test_bit (__E1000_DOWN, &adapter->state)) +e1000_irq_enable (adapter); if ((adapter->hw.mng_cookie.status & E1000_MNG_DHCP_COOKIE_STATUS_VLAN) &&
@@ -1480,7 +1471,8 @@ static void e1000_vlan_rx_register(struct net_device *netdev,struct e1000_hw *hw = &adapter->hw;u32 ctrl, rctl; -e1000_irq_disable (adapter); +if (!test_bit (__E1000_DOWN, &adapter->state)) +e1000_irq_disable (adapter); adapter->vlgrp = grp;if (grp) {
@@ -1517,7 +1509,8 @@ static void e1000_vlan_rx_register(struct net_device *netdev, } } -e1000_irq_enable (adapter); +if (!test_bit (__E1000_DOWN, &adapter->state)) +e1000_irq_enable (adapter); }static void e1000_restore_vlan (struct e1000_adapter *adapter)
@@ -2167,7 +2160,6 @@ void e1000e_down(struct e1000_adapter *adapter)msleep (10 );napi_disable (&adapter->napi); -atomic_set (&adapter->irq_sem,0 );e1000_irq_disable (adapter);del_timer_sync (&adapter->watchdog_timer);
@@ -2227,7 +2219,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)spin_lock_init (&adapter->tx_queue_lock);/* Explicitly disable IRQ since the NIC can be in any state. */ -atomic_set (&adapter->irq_sem,0 );e1000_irq_disable (adapter);spin_lock_init (&adapter->stats_lock);
drivers/net/forcedeth.c +4 -2
@@ -3859,7 +3859,8 @@ static void nv_do_stats_poll(unsigned long data)nv_get_hw_stats (dev);if (!np->in_shutdown) -mod_timer (&np->stats_poll, jiffies +STATS_INTERVAL ); +mod_timer (&np->stats_poll, +round_jiffies (jiffies +STATS_INTERVAL )); }static void nv_get_drvinfo (struct net_device *dev,struct ethtool_drvinfo *info)
@@ -5063,7 +5064,8 @@ static int nv_open(struct net_device *dev)/* start statistics timer */ if (np->driver_data & (DEV_HAS_STATISTICS_V1 |DEV_HAS_STATISTICS_V2 )) -mod_timer (&np->stats_poll, jiffies +STATS_INTERVAL ); +mod_timer (&np->stats_poll, +round_jiffies (jiffies +STATS_INTERVAL ));spin_unlock_irq (&np->lock);
drivers/net/gianfar.c +11 -13
@@ -1185,7 +1185,7 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)int frame_size = new_mtu +ETH_HLEN ;if (priv->vlan_enable) - frame_size +=VLAN_ETH_HLEN ; + frame_size +=VLAN_HLEN ;if (gfar_uses_fcb (priv)) frame_size +=GMAC_FCB_LEN ;
@@ -1299,11 +1299,11 @@ static irqreturn_t gfar_transmit(int irq, void *dev_id)/* If we are coalescing the interrupts, reset the timer */ /* Otherwise, clear it */ -if (priv->txcoalescing) +if (likely (priv->txcoalescing)) { +gfar_write (&priv->regs->txic,0 );gfar_write (&priv->regs->txic,mk_ic_value (priv->txcount, priv->txtime)); -else -gfar_write (&priv->regs->txic,0 ); + }spin_unlock (&priv->txlock);
@@ -1417,11 +1417,11 @@ irqreturn_t gfar_receive(int irq, void *dev_id)/* If we are coalescing interrupts, update the timer */ /* Otherwise, clear it */ -if (priv->rxcoalescing) +if (likely (priv->rxcoalescing)) { +gfar_write (&priv->regs->rxic,0 );gfar_write (&priv->regs->rxic,mk_ic_value (priv->rxcount, priv->rxtime)); -else -gfar_write (&priv->regs->rxic,0 ); + }spin_unlock_irqrestore (&priv->rxlock, flags);#endif
@@ -1526,9 +1526,7 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)rmb (); skb = priv->rx_skbuff[priv->skb_currx]; -if (!(bdp->status & - (RXBD_LARGE |RXBD_SHORT |RXBD_NONOCTET - |RXBD_CRCERR |RXBD_OVERRUN |RXBD_TRUNCATED ))) { +if ((bdp->status &RXBD_LAST ) && !(bdp->status &RXBD_ERR )) {/* Increment the number of packets */ dev->stats.rx_packets++; howmany++;
@@ -1595,11 +1593,11 @@ static int gfar_poll(struct napi_struct *napi, int budget)/* If we are coalescing interrupts, update the timer */ /* Otherwise, clear it */ -if (priv->rxcoalescing) +if (likely (priv->rxcoalescing)) { +gfar_write (&priv->regs->rxic,0 );gfar_write (&priv->regs->rxic,mk_ic_value (priv->rxcount, priv->rxtime)); -else -gfar_write (&priv->regs->rxic,0 ); + } }return howmany;
drivers/net/gianfar.h +6 -3
@@ -102,7 +102,7 @@ extern const char gfar_driver_version[];#define DEFAULT_FIFO_TX_STARVE 0x40#define DEFAULT_FIFO_TX_STARVE_OFF 0x80#define DEFAULT_BD_STASH 1 -#define DEFAULT_STASH_LENGTH 64 +#define DEFAULT_STASH_LENGTH 96#define DEFAULT_STASH_INDEX 0/* The number of Exact Match registers */
@@ -124,11 +124,11 @@ extern const char gfar_driver_version[];#define DEFAULT_TX_COALESCE 1#define DEFAULT_TXCOUNT 16 -#define DEFAULT_TXTIME 4 +#define DEFAULT_TXTIME 21#define DEFAULT_RX_COALESCE 1#define DEFAULT_RXCOUNT 16 -#define DEFAULT_RXTIME 4 +#define DEFAULT_RXTIME 21#define TBIPA_VALUE 0x1f#define MIIMCFG_INIT_VALUE 0x00000007
@@ -340,6 +340,9 @@ extern const char gfar_driver_version[];#define RXBD_OVERRUN 0x0002#define RXBD_TRUNCATED 0x0001#define RXBD_STATS 0x01ff +#define RXBD_ERR (RXBD_LARGE | RXBD_SHORT | RXBD_NONOCTET \ + | RXBD_CRCERR | RXBD_OVERRUN \ + | RXBD_TRUNCATED)/* Rx FCB status field bits */ #define RXFCB_VLN 0x8000
drivers/net/ibmveth.c +3 -39
63 lines not on this page · raw message
drivers/net/ixgb/ixgb.h +23 -5
@@ -158,7 +158,6 @@ struct ixgb_adapter {uint16_t link_speed;uint16_t link_duplex;spinlock_t tx_lock; -atomic_t irq_sem;struct work_struct tx_timeout_task;struct timer_list blink_timer;
@@ -173,15 +172,15 @@ struct ixgb_adapter {uint64_t hw_csum_tx_error;uint32_t tx_int_delay;uint32_t tx_timeout_count; -boolean_t tx_int_delay_enable; -boolean_t detect_tx_hung; +bool tx_int_delay_enable; +bool detect_tx_hung;/* RX */ struct ixgb_desc_ring rx_ring;uint64_t hw_csum_rx_error;uint64_t hw_csum_rx_good;uint32_t rx_int_delay; -boolean_t rx_csum; +bool rx_csum;/* OS defined structs */ struct napi_struct napi;
@@ -194,7 +193,16 @@ struct ixgb_adapter {u16 msg_enable;struct ixgb_hw_stats stats;uint32_t alloc_rx_buff_failed; -boolean_t have_msi; +bool have_msi; +unsigned long flags; +}; + +enum ixgb_state_t { +/* TBD +__IXGB_TESTING, +__IXGB_RESETTING, +*/ + __IXGB_DOWN };/* Exported from other modules */
@@ -203,4 +211,14 @@ extern void ixgb_set_ethtool_ops(struct net_device *netdev);extern char ixgb_driver_name[];extern const char ixgb_driver_version[]; +extern int ixgb_up (struct ixgb_adapter *adapter); +extern void ixgb_down (struct ixgb_adapter *adapter,bool kill_watchdog); +extern void ixgb_reset (struct ixgb_adapter *adapter); +extern int ixgb_setup_rx_resources (struct ixgb_adapter *adapter); +extern int ixgb_setup_tx_resources (struct ixgb_adapter *adapter); +extern void ixgb_free_rx_resources (struct ixgb_adapter *adapter); +extern void ixgb_free_tx_resources (struct ixgb_adapter *adapter); +extern void ixgb_update_stats (struct ixgb_adapter *adapter); + +#endif /* _IXGB_H_ */
drivers/net/ixgb/ixgb_ee.c +25 -25
144 lines not on this page · raw message
drivers/net/ixgb/ixgb_ee.h +1 -1
@@ -97,7 +97,7 @@ struct ixgb_ee_map_type {/* EEPROM Functions */ uint16_t ixgb_read_eeprom (struct ixgb_hw *hw,uint16_t reg); -boolean_t ixgb_validate_eeprom_checksum (struct ixgb_hw *hw); +bool ixgb_validate_eeprom_checksum (struct ixgb_hw *hw);void ixgb_update_eeprom_checksum (struct ixgb_hw *hw);
drivers/net/ixgb/ixgb_ethtool.c +4 -13
@@ -32,15 +32,6 @@#include <asm/uaccess.h> -extern int ixgb_up (struct ixgb_adapter *adapter); -extern void ixgb_down (struct ixgb_adapter *adapter,boolean_t kill_watchdog); -extern void ixgb_reset (struct ixgb_adapter *adapter); -extern int ixgb_setup_rx_resources (struct ixgb_adapter *adapter); -extern int ixgb_setup_tx_resources (struct ixgb_adapter *adapter); -extern void ixgb_free_rx_resources (struct ixgb_adapter *adapter); -extern void ixgb_free_tx_resources (struct ixgb_adapter *adapter); -extern void ixgb_update_stats (struct ixgb_adapter *adapter); -#define IXGB_ALL_RAR_ENTRIES 16struct ixgb_stats {
@@ -136,7 +127,7 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)return -EINVAL ;if (netif_running (adapter->netdev)) { -ixgb_down (adapter, TRUE); +ixgb_down (adapter, true);ixgb_reset (adapter);ixgb_up (adapter);ixgb_set_speed_duplex (netdev);
@@ -185,7 +176,7 @@ ixgb_set_pauseparam(struct net_device *netdev, hw->fc.type = ixgb_fc_none;if (netif_running (adapter->netdev)) { -ixgb_down (adapter, TRUE); +ixgb_down (adapter, true);ixgb_up (adapter);ixgb_set_speed_duplex (netdev); }else
@@ -210,7 +201,7 @@ ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) adapter->rx_csum = data;if (netif_running (netdev)) { -ixgb_down (adapter,TRUE); +ixgb_down (adapter, true);ixgb_up (adapter);ixgb_set_speed_duplex (netdev); }else
@@ -570,7 +561,7 @@ ixgb_set_ringparam(struct net_device *netdev,return -EINVAL ;if (netif_running (adapter->netdev)) -ixgb_down (adapter,TRUE); +ixgb_down (adapter, true); rxdr->count =max (ring->rx_pending,(uint32_t )MIN_RXD ); rxdr->count =min (rxdr->count,(uint32_t )MAX_RXD );
drivers/net/ixgb/ixgb_hw.c +28 -29
180 lines not on this page · raw message
drivers/net/ixgb/ixgb_hw.h +9 -9
@@ -650,7 +650,7 @@ struct ixgb_flash_buffer {* This is a little-endian specific check. */ #define IS_MULTICAST (Address) \ - (boolean_t)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) + (bool)(((uint8_t *)(Address))[0] & ((uint8_t)0x01))/* * Check whether an address is broadcast.
@@ -663,7 +663,7 @@ struct ixgb_fc {uint32_t high_water;/* Flow Control High-water */ uint32_t low_water;/* Flow Control Low-water */ uint16_t pause_time;/* Flow Control Pause timer */ -boolean_t send_xon;/* Flow control send XON */ +bool send_xon;/* Flow control send XON */ ixgb_fc_type type;/* Type of flow control */ };
@@ -700,8 +700,8 @@ struct ixgb_hw {uint32_t num_tx_desc;/* Number of Transmit descriptors */ uint32_t num_rx_desc;/* Number of Receive descriptors */ uint32_t rx_buffer_size;/* Size of Receive buffer */ -boolean_t link_up;/* TRUE if link is valid */ -boolean_t adapter_stopped;/* State of adapter */ +bool link_up;/* true if link is valid */ +bool adapter_stopped;/* State of adapter */ uint16_t device_id;/* device id from PCI configuration space */ uint16_t vendor_id;/* vendor id from PCI configuration space */ uint8_t revision_id;/* revision id from PCI configuration space */
@@ -783,11 +783,11 @@ struct ixgb_hw_stats { };/* Function Prototypes */ -extern boolean_t ixgb_adapter_stop (struct ixgb_hw *hw); -extern boolean_t ixgb_init_hw (struct ixgb_hw *hw); -extern boolean_t ixgb_adapter_start (struct ixgb_hw *hw); +extern bool ixgb_adapter_stop (struct ixgb_hw *hw); +extern bool ixgb_init_hw (struct ixgb_hw *hw); +extern bool ixgb_adapter_start (struct ixgb_hw *hw);extern void ixgb_check_for_link (struct ixgb_hw *hw); -extern boolean_t ixgb_check_for_bad_link (struct ixgb_hw *hw); +extern bool ixgb_check_for_bad_link (struct ixgb_hw *hw); extern void ixgb_rar_set(struct ixgb_hw *hw, uint8_t *addr,
@@ -809,7 +809,7 @@ extern void ixgb_write_vfta(struct ixgb_hw *hw,void ixgb_get_ee_mac_addr (struct ixgb_hw *hw,uint8_t *mac_addr);uint32_t ixgb_get_ee_pba_number (struct ixgb_hw *hw);uint16_t ixgb_get_ee_device_id (struct ixgb_hw *hw); -boolean_t ixgb_get_eeprom_data (struct ixgb_hw *hw); +bool ixgb_get_eeprom_data (struct ixgb_hw *hw);__le16 ixgb_get_eeprom_word (struct ixgb_hw *hw,uint16_t index);/* Everything else */
drivers/net/ixgb/ixgb_main.c +52 -44
283 lines not on this page · raw message
drivers/net/ixgb/ixgb_osdep.h +0 -7
@@ -39,13 +39,6 @@#include <linux/interrupt.h> #include <linux/sched.h> -typedef enum { -#undef FALSE - FALSE = 0, -#undef TRUE - TRUE = 1 -}boolean_t ; -#undef ASSERT#define ASSERT (x) if(!(x)) BUG()#define MSGOUT (S ,A ,B ) printk(KERN_DEBUG S "\n", A, B)
drivers/net/korina.c new file +1233 -0
438 lines not on this page · raw message
drivers/net/ni52.c +132 -123
255 lines not on this page · raw message
drivers/net/phy/broadcom.c +56 -1
57 lines not on this page · raw message
drivers/net/skfp/hwmtm.c +42 -44
86 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
David Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Wed, 26 Mar 2008 01:32:43 -0400
Quoted 5 lines
Please pull from 'upstream-net26' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-net26
to receive the following updates:
Pulled and pushed back out to net-2.6.26, thanks!