aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c501.c6
-rw-r--r--drivers/net/3c523.c2
-rw-r--r--drivers/net/3c527.c4
-rw-r--r--drivers/net/3c59x.c2
-rw-r--r--drivers/net/acenic.c4
-rw-r--r--drivers/net/amd8111e.c2
-rw-r--r--drivers/net/at1700.c2
-rw-r--r--drivers/net/atl1c/atl1c.h6
-rw-r--r--drivers/net/atl1c/atl1c_main.c14
-rw-r--r--drivers/net/atl1e/atl1e_main.c2
-rw-r--r--drivers/net/atlx/atl2.c2
-rw-r--r--drivers/net/bcm63xx_enet.c2
-rw-r--r--drivers/net/benet/be.h4
-rw-r--r--drivers/net/benet/be_cmds.c2
-rw-r--r--drivers/net/benet/be_main.c22
-rw-r--r--drivers/net/bna/bfa_ioc.c41
-rw-r--r--drivers/net/bna/bfa_ioc.h1
-rw-r--r--drivers/net/bna/bfa_ioc_ct.c28
-rw-r--r--drivers/net/bna/bfi.h6
-rw-r--r--drivers/net/bna/bna_hw.h2
-rw-r--r--drivers/net/bna/bnad.c1
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/bnx2x/bnx2x.h2
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c34
-rw-r--r--drivers/net/bnx2x/bnx2x_ethtool.c9
-rw-r--r--drivers/net/bnx2x/bnx2x_hsi.h2
-rw-r--r--drivers/net/bnx2x/bnx2x_link.c14
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c10
-rw-r--r--drivers/net/bnx2x/bnx2x_reg.h44
-rw-r--r--drivers/net/bonding/bond_3ad.c7
-rw-r--r--drivers/net/bonding/bond_alb.c6
-rw-r--r--drivers/net/bonding/bond_alb.h6
-rw-r--r--drivers/net/caif/caif_shmcore.c2
-rw-r--r--drivers/net/caif/caif_spi.c2
-rw-r--r--drivers/net/caif/caif_spi_slave.c4
-rw-r--r--drivers/net/can/at91_can.c4
-rw-r--r--drivers/net/can/c_can/c_can.c4
-rw-r--r--drivers/net/can/janz-ican3.c8
-rw-r--r--drivers/net/can/mcp251x.c3
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c2
-rw-r--r--drivers/net/can/mscan/mscan.c2
-rw-r--r--drivers/net/can/sja1000/sja1000.c2
-rw-r--r--drivers/net/can/softing/softing.h2
-rw-r--r--drivers/net/can/softing/softing_main.c2
-rw-r--r--drivers/net/can/ti_hecc.c2
-rw-r--r--drivers/net/can/usb/ems_usb.c2
-rw-r--r--drivers/net/can/usb/esd_usb2.c2
-rw-r--r--drivers/net/cassini.c4
-rw-r--r--drivers/net/cassini.h2
-rw-r--r--drivers/net/chelsio/mv88e1xxx.c2
-rw-r--r--drivers/net/chelsio/pm3393.c2
-rw-r--r--drivers/net/chelsio/sge.c2
-rw-r--r--drivers/net/chelsio/vsc7326.c2
-rw-r--r--drivers/net/cris/eth_v10.c2
-rw-r--r--drivers/net/cxgb3/sge.c2
-rw-r--r--drivers/net/cxgb3/t3_hw.c6
-rw-r--r--drivers/net/cxgb4/t4_hw.c2
-rw-r--r--drivers/net/cxgb4vf/cxgb4vf_main.c2
-rw-r--r--drivers/net/cxgb4vf/sge.c8
-rw-r--r--drivers/net/davinci_emac.c8
-rw-r--r--drivers/net/e1000/e1000_ethtool.c2
-rw-r--r--drivers/net/e1000/e1000_hw.h2
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--drivers/net/e1000e/netdev.c2
-rw-r--r--drivers/net/ehea/ehea_main.c9
-rw-r--r--drivers/net/enc28j60_hw.h2
-rw-r--r--drivers/net/eth16i.c2
-rw-r--r--drivers/net/ethoc.c2
-rw-r--r--drivers/net/fec.h4
-rw-r--r--drivers/net/forcedeth.c14
-rw-r--r--drivers/net/fs_enet/mac-fec.c8
-rw-r--r--drivers/net/ftmac100.c8
-rw-r--r--drivers/net/gianfar.h2
-rw-r--r--drivers/net/hamradio/Makefile2
-rw-r--r--drivers/net/hamradio/yam.c2
-rw-r--r--drivers/net/hp100.c16
-rw-r--r--drivers/net/hp100.h2
-rw-r--r--drivers/net/ibm_newemac/tah.c2
-rw-r--r--drivers/net/ibmlana.c4
-rw-r--r--drivers/net/ibmlana.h2
-rw-r--r--drivers/net/igb/e1000_mac.c4
-rw-r--r--drivers/net/igb/e1000_phy.c2
-rw-r--r--drivers/net/igb/igb_main.c14
-rw-r--r--drivers/net/igbvf/netdev.c2
-rw-r--r--drivers/net/ipg.c28
-rw-r--r--drivers/net/irda/ali-ircc.c4
-rw-r--r--drivers/net/irda/donauboe.c2
-rw-r--r--drivers/net/irda/donauboe.h2
-rw-r--r--drivers/net/irda/girbil-sir.c2
-rw-r--r--drivers/net/irda/irda-usb.c4
-rw-r--r--drivers/net/irda/mcs7780.c6
-rw-r--r--drivers/net/irda/nsc-ircc.c2
-rw-r--r--drivers/net/irda/nsc-ircc.h2
-rw-r--r--drivers/net/irda/pxaficp_ir.c4
-rw-r--r--drivers/net/irda/smsc-ircc2.c2
-rw-r--r--drivers/net/irda/via-ircc.c4
-rw-r--r--drivers/net/irda/vlsi_ir.h4
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c8
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_x540.c2
-rw-r--r--drivers/net/ixgbevf/ixgbevf_main.c2
-rw-r--r--drivers/net/ks8842.c2
-rw-r--r--drivers/net/ks8851.c8
-rw-r--r--drivers/net/ks8851_mll.c4
-rw-r--r--drivers/net/lib8390.c4
-rw-r--r--drivers/net/loopback.c3
-rw-r--r--drivers/net/lp486e.c2
-rw-r--r--drivers/net/meth.h4
-rw-r--r--drivers/net/mii.c4
-rw-r--r--drivers/net/mlx4/en_main.c2
-rw-r--r--drivers/net/mlx4/en_netdev.c10
-rw-r--r--drivers/net/mlx4/en_rx.c6
-rw-r--r--drivers/net/mlx4/en_selftest.c2
-rw-r--r--drivers/net/mlx4/en_tx.c2
-rw-r--r--drivers/net/mlx4/main.c5
-rw-r--r--drivers/net/mlx4/mcg.c2
-rw-r--r--drivers/net/mlx4/mlx4.h2
-rw-r--r--drivers/net/mlx4/port.c4
-rw-r--r--drivers/net/mlx4/sense.c4
-rw-r--r--drivers/net/myri10ge/myri10ge.c2
-rw-r--r--drivers/net/myri_sbus.c2
-rw-r--r--drivers/net/natsemi.c9
-rw-r--r--drivers/net/netconsole.c8
-rw-r--r--drivers/net/netxen/netxen_nic.h4
-rw-r--r--drivers/net/netxen/netxen_nic_hdr.h2
-rw-r--r--drivers/net/netxen/netxen_nic_main.c17
-rw-r--r--drivers/net/ns83820.c4
-rw-r--r--drivers/net/pch_gbe/pch_gbe.h14
-rw-r--r--drivers/net/pch_gbe/pch_gbe_ethtool.c2
-rw-r--r--drivers/net/pch_gbe/pch_gbe_main.c4
-rw-r--r--drivers/net/pci-skeleton.c2
-rw-r--r--drivers/net/pcmcia/3c574_cs.c2
-rw-r--r--drivers/net/pcmcia/axnet_cs.c4
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c2
-rw-r--r--drivers/net/pcnet32.c2
-rw-r--r--drivers/net/phy/phy_device.c4
-rw-r--r--drivers/net/ppp_generic.c2
-rw-r--r--drivers/net/ppp_synctty.c2
-rw-r--r--drivers/net/pppoe.c4
-rw-r--r--drivers/net/ps3_gelic_net.c4
-rw-r--r--drivers/net/ps3_gelic_net.h2
-rw-r--r--drivers/net/ps3_gelic_wireless.c2
-rw-r--r--drivers/net/pxa168_eth.c2
-rw-r--r--drivers/net/qla3xxx.h2
-rw-r--r--drivers/net/qlcnic/qlcnic.h1
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c14
-rw-r--r--drivers/net/qlge/qlge_main.c10
-rw-r--r--drivers/net/r6040.c2
-rw-r--r--drivers/net/r8169.c99
-rw-r--r--drivers/net/s2io.c6
-rw-r--r--drivers/net/s2io.h2
-rw-r--r--drivers/net/sfc/efx.c6
-rw-r--r--drivers/net/sfc/falcon.c4
-rw-r--r--drivers/net/sfc/io.h2
-rw-r--r--drivers/net/sfc/mcdi.c2
-rw-r--r--drivers/net/sfc/mcdi_pcol.h6
-rw-r--r--drivers/net/sfc/mcdi_phy.c2
-rw-r--r--drivers/net/sfc/net_driver.h4
-rw-r--r--drivers/net/sfc/nic.c22
-rw-r--r--drivers/net/sfc/nic.h1
-rw-r--r--drivers/net/sfc/selftest.c25
-rw-r--r--drivers/net/sfc/tx.c3
-rw-r--r--drivers/net/sgiseeq.c4
-rw-r--r--drivers/net/sh_eth.c2
-rw-r--r--drivers/net/sis190.c4
-rw-r--r--drivers/net/sis900.c29
-rw-r--r--drivers/net/skfp/ess.c8
-rw-r--r--drivers/net/skfp/fplustm.c6
-rw-r--r--drivers/net/skfp/h/cmtdef.h4
-rw-r--r--drivers/net/skfp/h/fplustm.h4
-rw-r--r--drivers/net/skfp/h/smc.h2
-rw-r--r--drivers/net/skfp/h/smt.h2
-rw-r--r--drivers/net/skfp/h/supern_2.h4
-rw-r--r--drivers/net/skfp/hwmtm.c2
-rw-r--r--drivers/net/skfp/pcmplc.c6
-rw-r--r--drivers/net/skfp/smt.c2
-rw-r--r--drivers/net/skge.h8
-rw-r--r--drivers/net/sky2.c4
-rw-r--r--drivers/net/sky2.h6
-rw-r--r--drivers/net/smc91x.h2
-rw-r--r--drivers/net/smsc911x.c10
-rw-r--r--drivers/net/smsc9420.c2
-rw-r--r--drivers/net/stmmac/dwmac_lib.c28
-rw-r--r--drivers/net/stmmac/norm_desc.c2
-rw-r--r--drivers/net/stmmac/stmmac_main.c49
-rw-r--r--drivers/net/sunbmac.h2
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/sunhme.h2
-rw-r--r--drivers/net/tc35815.c38
-rw-r--r--drivers/net/tehuti.c12
-rw-r--r--drivers/net/tehuti.h2
-rw-r--r--drivers/net/tg3.c2
-rw-r--r--drivers/net/tg3.h4
-rw-r--r--drivers/net/tokenring/3c359.c6
-rw-r--r--drivers/net/tokenring/lanstreamer.c2
-rw-r--r--drivers/net/tokenring/madgemc.c6
-rw-r--r--drivers/net/tokenring/olympic.c2
-rw-r--r--drivers/net/tokenring/smctr.c12
-rw-r--r--drivers/net/tokenring/tms380tr.h2
-rw-r--r--drivers/net/tsi108_eth.h8
-rw-r--r--drivers/net/tulip/de4x5.c6
-rw-r--r--drivers/net/tulip/dmfe.c2
-rw-r--r--drivers/net/tulip/eeprom.c2
-rw-r--r--drivers/net/typhoon.c2
-rw-r--r--drivers/net/ucc_geth.h4
-rw-r--r--drivers/net/usb/cdc_eem.c2
-rw-r--r--drivers/net/usb/cdc_ether.c14
-rw-r--r--drivers/net/usb/cdc_ncm.c4
-rw-r--r--drivers/net/usb/kaweth.c2
-rw-r--r--drivers/net/usb/smsc95xx.c15
-rw-r--r--drivers/net/usb/usbnet.c8
-rw-r--r--drivers/net/via-rhine.c4
-rw-r--r--drivers/net/via-velocity.c4
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c4
-rw-r--r--drivers/net/vxge/vxge-config.c2
-rw-r--r--drivers/net/vxge/vxge-main.c8
-rw-r--r--drivers/net/vxge/vxge-traffic.c4
-rw-r--r--drivers/net/vxge/vxge-traffic.h2
-rw-r--r--drivers/net/wan/cosa.c2
-rw-r--r--drivers/net/wan/dscc4.c8
-rw-r--r--drivers/net/wan/hostess_sv11.c2
-rw-r--r--drivers/net/wan/ixp4xx_hss.c4
-rw-r--r--drivers/net/wan/lmc/lmc_main.c2
-rw-r--r--drivers/net/wan/lmc/lmc_var.h6
-rw-r--r--drivers/net/wan/z85230.c8
-rw-r--r--drivers/net/wimax/i2400m/control.c4
-rw-r--r--drivers/net/wimax/i2400m/driver.c4
-rw-r--r--drivers/net/wimax/i2400m/fw.c4
-rw-r--r--drivers/net/wimax/i2400m/i2400m-usb.h6
-rw-r--r--drivers/net/wimax/i2400m/i2400m.h4
-rw-r--r--drivers/net/wimax/i2400m/netdev.c2
-rw-r--r--drivers/net/wimax/i2400m/op-rfkill.c4
-rw-r--r--drivers/net/wimax/i2400m/rx.c4
-rw-r--r--drivers/net/wimax/i2400m/tx.c4
-rw-r--r--drivers/net/wimax/i2400m/usb-fw.c2
-rw-r--r--drivers/net/wimax/i2400m/usb-rx.c2
-rw-r--r--drivers/net/wimax/i2400m/usb-tx.c2
-rw-r--r--drivers/net/wireless/airo.c14
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c2
-rw-r--r--drivers/net/wireless/ath/ar9170/phy.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/ani.h2
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c6
-rw-r--r--drivers/net/wireless/ath/ath5k/desc.c14
-rw-r--r--drivers/net/wireless/ath/ath5k/eeprom.c4
-rw-r--r--drivers/net/wireless/ath/ath5k/pci.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/pcu.c6
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c22
-rw-r--r--drivers/net/wireless/ath/ath5k/reg.h12
-rw-r--r--drivers/net/wireless/ath/ath9k/ar5008_phy.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_hst.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c4
-rw-r--r--drivers/net/wireless/ath/carl9170/carl9170.h2
-rw-r--r--drivers/net/wireless/ath/carl9170/phy.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/rx.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/usb.c2
-rw-r--r--drivers/net/wireless/ath/hw.c2
-rw-r--r--drivers/net/wireless/ath/regd.c4
-rw-r--r--drivers/net/wireless/atmel.c4
-rw-r--r--drivers/net/wireless/atmel_cs.c2
-rw-r--r--drivers/net/wireless/b43/b43.h2
-rw-r--r--drivers/net/wireless/b43/main.c2
-rw-r--r--drivers/net/wireless/b43/phy_g.h2
-rw-r--r--drivers/net/wireless/b43/phy_n.h2
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h2
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.h2
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_wlan.h2
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c2
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c18
-rw-r--r--drivers/net/wireless/ipw2x00/libipw_rx.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-fh.h2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-scan.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-sta.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ict.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fh.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c2
-rw-r--r--drivers/net/wireless/iwmc3200wifi/hal.c4
-rw-r--r--drivers/net/wireless/iwmc3200wifi/tx.c2
-rw-r--r--drivers/net/wireless/libertas/README4
-rw-r--r--drivers/net/wireless/libertas/cfg.c2
-rw-r--r--drivers/net/wireless/libertas/if_cs.c2
-rw-r--r--drivers/net/wireless/libertas/if_spi.h2
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
-rw-r--r--drivers/net/wireless/orinoco/hw.c2
-rw-r--r--drivers/net/wireless/p54/main.c2
-rw-r--r--drivers/net/wireless/p54/p54spi.c2
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.c4
-rw-r--r--drivers/net/wireless/rayctl.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00crypto.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dump.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00link.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h12
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h2
-rw-r--r--drivers/net/wireless/rtlwifi/base.c2
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c2
-rw-r--r--drivers/net/wireless/rtlwifi/regd.c2
-rw-r--r--drivers/net/wireless/rtlwifi/wifi.h2
-rw-r--r--drivers/net/wireless/wl1251/cmd.c2
-rw-r--r--drivers/net/wireless/wl1251/rx.c2
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c2
-rw-r--r--drivers/net/wireless/wl12xx/conf.h8
-rw-r--r--drivers/net/wireless/wl12xx/io.h2
-rw-r--r--drivers/net/wireless/wl3501_cs.c4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_rf_rf2959.c2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_rf_uw2453.c2
-rw-r--r--drivers/net/xilinx_emaclite.c2
-rw-r--r--drivers/net/znet.c2
321 files changed, 955 insertions, 746 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c
index 9e1c03eb97a..5420f6de27d 100644
--- a/drivers/net/3c501.c
+++ b/drivers/net/3c501.c
@@ -399,7 +399,7 @@ static void el_timeout(struct net_device *dev)
399 * as we may still be attempting to retrieve the last RX packet buffer. 399 * as we may still be attempting to retrieve the last RX packet buffer.
400 * 400 *
401 * When a transmit times out we dump the card into control mode and just 401 * When a transmit times out we dump the card into control mode and just
402 * start again. It happens enough that it isnt worth logging. 402 * start again. It happens enough that it isn't worth logging.
403 * 403 *
404 * We avoid holding the spin locks when doing the packet load to the board. 404 * We avoid holding the spin locks when doing the packet load to the board.
405 * The device is very slow, and its DMA mode is even slower. If we held the 405 * The device is very slow, and its DMA mode is even slower. If we held the
@@ -499,7 +499,7 @@ static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev)
499 * 499 *
500 * Handle the ether interface interrupts. The 3c501 needs a lot more 500 * Handle the ether interface interrupts. The 3c501 needs a lot more
501 * hand holding than most cards. In particular we get a transmit interrupt 501 * hand holding than most cards. In particular we get a transmit interrupt
502 * with a collision error because the board firmware isnt capable of rewinding 502 * with a collision error because the board firmware isn't capable of rewinding
503 * its own transmit buffer pointers. It can however count to 16 for us. 503 * its own transmit buffer pointers. It can however count to 16 for us.
504 * 504 *
505 * On the receive side the card is also very dumb. It has no buffering to 505 * On the receive side the card is also very dumb. It has no buffering to
@@ -732,7 +732,7 @@ static void el_receive(struct net_device *dev)
732 * el_reset: Reset a 3c501 card 732 * el_reset: Reset a 3c501 card
733 * @dev: The 3c501 card about to get zapped 733 * @dev: The 3c501 card about to get zapped
734 * 734 *
735 * Even resetting a 3c501 isnt simple. When you activate reset it loses all 735 * Even resetting a 3c501 isn't simple. When you activate reset it loses all
736 * its configuration. You must hold the lock when doing this. The function 736 * its configuration. You must hold the lock when doing this. The function
737 * cannot take the lock itself as it is callable from the irq handler. 737 * cannot take the lock itself as it is callable from the irq handler.
738 */ 738 */
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c
index de579d04316..bc0d1a1c2e2 100644
--- a/drivers/net/3c523.c
+++ b/drivers/net/3c523.c
@@ -44,7 +44,7 @@
44 this for the 64K version would require a lot of heinous bank 44 this for the 64K version would require a lot of heinous bank
45 switching, which I'm sure not interested in doing. If you try to 45 switching, which I'm sure not interested in doing. If you try to
46 implement a bank switching version, you'll basically have to remember 46 implement a bank switching version, you'll basically have to remember
47 what bank is enabled and do a switch everytime you access a memory 47 what bank is enabled and do a switch every time you access a memory
48 location that's not current. You'll also have to remap pointers on 48 location that's not current. You'll also have to remap pointers on
49 the driver side, because it only knows about 16K of the memory. 49 the driver side, because it only knows about 16K of the memory.
50 Anyone desperate or masochistic enough to try? 50 Anyone desperate or masochistic enough to try?
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c
index 8c094bae8bf..d9d056d207f 100644
--- a/drivers/net/3c527.c
+++ b/drivers/net/3c527.c
@@ -51,7 +51,7 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net.
51 * circular buffer queues. 51 * circular buffer queues.
52 * 52 *
53 * The mailboxes can be used for controlling how the card traverses 53 * The mailboxes can be used for controlling how the card traverses
54 * its buffer rings, but are used only for inital setup in this 54 * its buffer rings, but are used only for initial setup in this
55 * implementation. The exec mailbox allows a variety of commands to 55 * implementation. The exec mailbox allows a variety of commands to
56 * be executed. Each command must complete before the next is 56 * be executed. Each command must complete before the next is
57 * executed. Primarily we use the exec mailbox for controlling the 57 * executed. Primarily we use the exec mailbox for controlling the
@@ -813,7 +813,7 @@ static void mc32_flush_rx_ring(struct net_device *dev)
813 * 813 *
814 * This sets up the host transmit data-structures. 814 * This sets up the host transmit data-structures.
815 * 815 *
816 * First, we obtain from the card it's current postion in the tx 816 * First, we obtain from the card it's current position in the tx
817 * ring, so that we will know where to begin transmitting 817 * ring, so that we will know where to begin transmitting
818 * packets. 818 * packets.
819 * 819 *
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 0a92436f053..8cc22568ebd 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -984,7 +984,7 @@ static int __init vortex_eisa_init(void)
984 * any device have been found when we exit from 984 * any device have been found when we exit from
985 * eisa_driver_register (the bus root driver may not be 985 * eisa_driver_register (the bus root driver may not be
986 * initialized yet). So we blindly assume something was 986 * initialized yet). So we blindly assume something was
987 * found, and let the sysfs magic happend... 987 * found, and let the sysfs magic happened...
988 */ 988 */
989 eisa_found = 1; 989 eisa_found = 1;
990 } 990 }
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 41d9911202d..ee648fe5d96 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1584,7 +1584,7 @@ static void ace_watchdog(struct net_device *data)
1584 /* 1584 /*
1585 * We haven't received a stats update event for more than 2.5 1585 * We haven't received a stats update event for more than 2.5
1586 * seconds and there is data in the transmit queue, thus we 1586 * seconds and there is data in the transmit queue, thus we
1587 * asume the card is stuck. 1587 * assume the card is stuck.
1588 */ 1588 */
1589 if (*ap->tx_csm != ap->tx_ret_csm) { 1589 if (*ap->tx_csm != ap->tx_ret_csm) {
1590 printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n", 1590 printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n",
@@ -2564,7 +2564,7 @@ restart:
2564 2564
2565 /* 2565 /*
2566 * A TX-descriptor producer (an IRQ) might have gotten 2566 * A TX-descriptor producer (an IRQ) might have gotten
2567 * inbetween, making the ring free again. Since xmit is 2567 * between, making the ring free again. Since xmit is
2568 * serialized, this is the only situation we have to 2568 * serialized, this is the only situation we have to
2569 * re-test. 2569 * re-test.
2570 */ 2570 */
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index 2ca880b4c0d..88495c48a81 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1398,7 +1398,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
1398 mc_filter[1] = mc_filter[0] = 0; 1398 mc_filter[1] = mc_filter[0] = 0;
1399 lp->options &= ~OPTION_MULTICAST_ENABLE; 1399 lp->options &= ~OPTION_MULTICAST_ENABLE;
1400 amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); 1400 amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF);
1401 /* disable promiscous mode */ 1401 /* disable promiscuous mode */
1402 writel(PROM, lp->mmio + CMD2); 1402 writel(PROM, lp->mmio + CMD2);
1403 return; 1403 return;
1404 } 1404 }
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index f4744fc8976..65a78f965dd 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -133,7 +133,7 @@ struct net_local {
133/* Run-time register bank 2 definitions. */ 133/* Run-time register bank 2 definitions. */
134#define DATAPORT 8 /* Word-wide DMA or programmed-I/O dataport. */ 134#define DATAPORT 8 /* Word-wide DMA or programmed-I/O dataport. */
135#define TX_START 10 135#define TX_START 10
136#define COL16CNTL 11 /* Controll Reg for 16 collisions */ 136#define COL16CNTL 11 /* Control Reg for 16 collisions */
137#define MODE13 13 137#define MODE13 13
138#define RX_CTRL 14 138#define RX_CTRL 14
139/* Configuration registers only on the '865A/B chips. */ 139/* Configuration registers only on the '865A/B chips. */
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h
index 7cb375e0e29..925929d764c 100644
--- a/drivers/net/atl1c/atl1c.h
+++ b/drivers/net/atl1c/atl1c.h
@@ -566,9 +566,9 @@ struct atl1c_adapter {
566#define __AT_TESTING 0x0001 566#define __AT_TESTING 0x0001
567#define __AT_RESETTING 0x0002 567#define __AT_RESETTING 0x0002
568#define __AT_DOWN 0x0003 568#define __AT_DOWN 0x0003
569 u8 work_event; 569 unsigned long work_event;
570#define ATL1C_WORK_EVENT_RESET 0x01 570#define ATL1C_WORK_EVENT_RESET 0
571#define ATL1C_WORK_EVENT_LINK_CHANGE 0x02 571#define ATL1C_WORK_EVENT_LINK_CHANGE 1
572 u32 msg_enable; 572 u32 msg_enable;
573 573
574 bool have_msi; 574 bool have_msi;
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index 7d9d5067a65..a6e1c36e48e 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -325,7 +325,7 @@ static void atl1c_link_chg_event(struct atl1c_adapter *adapter)
325 } 325 }
326 } 326 }
327 327
328 adapter->work_event |= ATL1C_WORK_EVENT_LINK_CHANGE; 328 set_bit(ATL1C_WORK_EVENT_LINK_CHANGE, &adapter->work_event);
329 schedule_work(&adapter->common_task); 329 schedule_work(&adapter->common_task);
330} 330}
331 331
@@ -337,20 +337,16 @@ static void atl1c_common_task(struct work_struct *work)
337 adapter = container_of(work, struct atl1c_adapter, common_task); 337 adapter = container_of(work, struct atl1c_adapter, common_task);
338 netdev = adapter->netdev; 338 netdev = adapter->netdev;
339 339
340 if (adapter->work_event & ATL1C_WORK_EVENT_RESET) { 340 if (test_and_clear_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event)) {
341 adapter->work_event &= ~ATL1C_WORK_EVENT_RESET;
342 netif_device_detach(netdev); 341 netif_device_detach(netdev);
343 atl1c_down(adapter); 342 atl1c_down(adapter);
344 atl1c_up(adapter); 343 atl1c_up(adapter);
345 netif_device_attach(netdev); 344 netif_device_attach(netdev);
346 return;
347 } 345 }
348 346
349 if (adapter->work_event & ATL1C_WORK_EVENT_LINK_CHANGE) { 347 if (test_and_clear_bit(ATL1C_WORK_EVENT_LINK_CHANGE,
350 adapter->work_event &= ~ATL1C_WORK_EVENT_LINK_CHANGE; 348 &adapter->work_event))
351 atl1c_check_link_status(adapter); 349 atl1c_check_link_status(adapter);
352 }
353 return;
354} 350}
355 351
356 352
@@ -369,7 +365,7 @@ static void atl1c_tx_timeout(struct net_device *netdev)
369 struct atl1c_adapter *adapter = netdev_priv(netdev); 365 struct atl1c_adapter *adapter = netdev_priv(netdev);
370 366
371 /* Do the reset outside of interrupt context */ 367 /* Do the reset outside of interrupt context */
372 adapter->work_event |= ATL1C_WORK_EVENT_RESET; 368 set_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event);
373 schedule_work(&adapter->common_task); 369 schedule_work(&adapter->common_task);
374} 370}
375 371
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index 1ff001a8270..b0a71e2f28a 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -2509,7 +2509,7 @@ static struct pci_driver atl1e_driver = {
2509 .id_table = atl1e_pci_tbl, 2509 .id_table = atl1e_pci_tbl,
2510 .probe = atl1e_probe, 2510 .probe = atl1e_probe,
2511 .remove = __devexit_p(atl1e_remove), 2511 .remove = __devexit_p(atl1e_remove),
2512 /* Power Managment Hooks */ 2512 /* Power Management Hooks */
2513#ifdef CONFIG_PM 2513#ifdef CONFIG_PM
2514 .suspend = atl1e_suspend, 2514 .suspend = atl1e_suspend,
2515 .resume = atl1e_resume, 2515 .resume = atl1e_resume,
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 937ef1afa5d..e3cbf45dc61 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -1701,7 +1701,7 @@ static struct pci_driver atl2_driver = {
1701 .id_table = atl2_pci_tbl, 1701 .id_table = atl2_pci_tbl,
1702 .probe = atl2_probe, 1702 .probe = atl2_probe,
1703 .remove = __devexit_p(atl2_remove), 1703 .remove = __devexit_p(atl2_remove),
1704 /* Power Managment Hooks */ 1704 /* Power Management Hooks */
1705 .suspend = atl2_suspend, 1705 .suspend = atl2_suspend,
1706#ifdef CONFIG_PM 1706#ifdef CONFIG_PM
1707 .resume = atl2_resume, 1707 .resume = atl2_resume,
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index e94a966af41..c48104b0886 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -597,7 +597,7 @@ static int bcm_enet_set_mac_address(struct net_device *dev, void *p)
597} 597}
598 598
599/* 599/*
600 * Change rx mode (promiscous/allmulti) and update multicast list 600 * Change rx mode (promiscuous/allmulti) and update multicast list
601 */ 601 */
602static void bcm_enet_set_multicast_list(struct net_device *dev) 602static void bcm_enet_set_multicast_list(struct net_device *dev)
603{ 603{
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index f803c58b941..66823eded7a 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -154,7 +154,7 @@ struct be_eq_obj {
154 u16 min_eqd; /* in usecs */ 154 u16 min_eqd; /* in usecs */
155 u16 max_eqd; /* in usecs */ 155 u16 max_eqd; /* in usecs */
156 u16 cur_eqd; /* in usecs */ 156 u16 cur_eqd; /* in usecs */
157 u8 msix_vec_idx; 157 u8 eq_idx;
158 158
159 struct napi_struct napi; 159 struct napi_struct napi;
160}; 160};
@@ -291,7 +291,7 @@ struct be_adapter {
291 u32 num_rx_qs; 291 u32 num_rx_qs;
292 u32 big_page_size; /* Compounded page size shared by rx wrbs */ 292 u32 big_page_size; /* Compounded page size shared by rx wrbs */
293 293
294 u8 msix_vec_next_idx; 294 u8 eq_next_idx;
295 struct be_drv_stats drv_stats; 295 struct be_drv_stats drv_stats;
296 296
297 struct vlan_group *vlan_grp; 297 struct vlan_group *vlan_grp;
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 5a4a87e7c5e..1e2d825bb94 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1331,7 +1331,7 @@ err:
1331 1331
1332/* 1332/*
1333 * Uses MCC for this command as it may be called in BH context 1333 * Uses MCC for this command as it may be called in BH context
1334 * (mc == NULL) => multicast promiscous 1334 * (mc == NULL) => multicast promiscuous
1335 */ 1335 */
1336int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, 1336int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
1337 struct net_device *netdev, struct be_dma_mem *mem) 1337 struct net_device *netdev, struct be_dma_mem *mem)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index a71163f1e34..02a0443d182 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -708,7 +708,7 @@ static void be_set_multicast_list(struct net_device *netdev)
708 goto done; 708 goto done;
709 } 709 }
710 710
711 /* BE was previously in promiscous mode; disable it */ 711 /* BE was previously in promiscuous mode; disable it */
712 if (adapter->promiscuous) { 712 if (adapter->promiscuous) {
713 adapter->promiscuous = false; 713 adapter->promiscuous = false;
714 be_cmd_promiscuous_config(adapter, adapter->port_num, 0); 714 be_cmd_promiscuous_config(adapter, adapter->port_num, 0);
@@ -1497,7 +1497,7 @@ static int be_tx_queues_create(struct be_adapter *adapter)
1497 if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd)) 1497 if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd))
1498 goto tx_eq_free; 1498 goto tx_eq_free;
1499 1499
1500 adapter->tx_eq.msix_vec_idx = adapter->msix_vec_next_idx++; 1500 adapter->tx_eq.eq_idx = adapter->eq_next_idx++;
1501 1501
1502 1502
1503 /* Alloc TX eth compl queue */ 1503 /* Alloc TX eth compl queue */
@@ -1590,7 +1590,7 @@ static int be_rx_queues_create(struct be_adapter *adapter)
1590 if (rc) 1590 if (rc)
1591 goto err; 1591 goto err;
1592 1592
1593 rxo->rx_eq.msix_vec_idx = adapter->msix_vec_next_idx++; 1593 rxo->rx_eq.eq_idx = adapter->eq_next_idx++;
1594 1594
1595 /* CQ */ 1595 /* CQ */
1596 cq = &rxo->cq; 1596 cq = &rxo->cq;
@@ -1666,11 +1666,11 @@ static irqreturn_t be_intx(int irq, void *dev)
1666 if (!isr) 1666 if (!isr)
1667 return IRQ_NONE; 1667 return IRQ_NONE;
1668 1668
1669 if ((1 << adapter->tx_eq.msix_vec_idx & isr)) 1669 if ((1 << adapter->tx_eq.eq_idx & isr))
1670 event_handle(adapter, &adapter->tx_eq); 1670 event_handle(adapter, &adapter->tx_eq);
1671 1671
1672 for_all_rx_queues(adapter, rxo, i) { 1672 for_all_rx_queues(adapter, rxo, i) {
1673 if ((1 << rxo->rx_eq.msix_vec_idx & isr)) 1673 if ((1 << rxo->rx_eq.eq_idx & isr))
1674 event_handle(adapter, &rxo->rx_eq); 1674 event_handle(adapter, &rxo->rx_eq);
1675 } 1675 }
1676 } 1676 }
@@ -1873,6 +1873,7 @@ static void be_worker(struct work_struct *work)
1873 be_detect_dump_ue(adapter); 1873 be_detect_dump_ue(adapter);
1874 1874
1875reschedule: 1875reschedule:
1876 adapter->work_counter++;
1876 schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); 1877 schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
1877} 1878}
1878 1879
@@ -1951,7 +1952,7 @@ static void be_sriov_disable(struct be_adapter *adapter)
1951static inline int be_msix_vec_get(struct be_adapter *adapter, 1952static inline int be_msix_vec_get(struct be_adapter *adapter,
1952 struct be_eq_obj *eq_obj) 1953 struct be_eq_obj *eq_obj)
1953{ 1954{
1954 return adapter->msix_entries[eq_obj->msix_vec_idx].vector; 1955 return adapter->msix_entries[eq_obj->eq_idx].vector;
1955} 1956}
1956 1957
1957static int be_request_irq(struct be_adapter *adapter, 1958static int be_request_irq(struct be_adapter *adapter,
@@ -2345,6 +2346,7 @@ static int be_clear(struct be_adapter *adapter)
2345 be_mcc_queues_destroy(adapter); 2346 be_mcc_queues_destroy(adapter);
2346 be_rx_queues_destroy(adapter); 2347 be_rx_queues_destroy(adapter);
2347 be_tx_queues_destroy(adapter); 2348 be_tx_queues_destroy(adapter);
2349 adapter->eq_next_idx = 0;
2348 2350
2349 if (be_physfn(adapter) && adapter->sriov_enabled) 2351 if (be_physfn(adapter) && adapter->sriov_enabled)
2350 for (vf = 0; vf < num_vfs; vf++) 2352 for (vf = 0; vf < num_vfs; vf++)
@@ -3141,12 +3143,14 @@ static int be_resume(struct pci_dev *pdev)
3141static void be_shutdown(struct pci_dev *pdev) 3143static void be_shutdown(struct pci_dev *pdev)
3142{ 3144{
3143 struct be_adapter *adapter = pci_get_drvdata(pdev); 3145 struct be_adapter *adapter = pci_get_drvdata(pdev);
3144 struct net_device *netdev = adapter->netdev;
3145 3146
3146 if (netif_running(netdev)) 3147 if (!adapter)
3148 return;
3149
3150 if (netif_running(adapter->netdev))
3147 cancel_delayed_work_sync(&adapter->work); 3151 cancel_delayed_work_sync(&adapter->work);
3148 3152
3149 netif_device_detach(netdev); 3153 netif_device_detach(adapter->netdev);
3150 3154
3151 be_cmd_reset_function(adapter); 3155 be_cmd_reset_function(adapter);
3152 3156
diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c
index 34933cb9569..7581518ecfa 100644
--- a/drivers/net/bna/bfa_ioc.c
+++ b/drivers/net/bna/bfa_ioc.c
@@ -38,6 +38,8 @@
38#define bfa_ioc_map_port(__ioc) ((__ioc)->ioc_hwif->ioc_map_port(__ioc)) 38#define bfa_ioc_map_port(__ioc) ((__ioc)->ioc_hwif->ioc_map_port(__ioc))
39#define bfa_ioc_notify_fail(__ioc) \ 39#define bfa_ioc_notify_fail(__ioc) \
40 ((__ioc)->ioc_hwif->ioc_notify_fail(__ioc)) 40 ((__ioc)->ioc_hwif->ioc_notify_fail(__ioc))
41#define bfa_ioc_sync_start(__ioc) \
42 ((__ioc)->ioc_hwif->ioc_sync_start(__ioc))
41#define bfa_ioc_sync_join(__ioc) \ 43#define bfa_ioc_sync_join(__ioc) \
42 ((__ioc)->ioc_hwif->ioc_sync_join(__ioc)) 44 ((__ioc)->ioc_hwif->ioc_sync_join(__ioc))
43#define bfa_ioc_sync_leave(__ioc) \ 45#define bfa_ioc_sync_leave(__ioc) \
@@ -602,7 +604,7 @@ bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event)
602 switch (event) { 604 switch (event) {
603 case IOCPF_E_SEMLOCKED: 605 case IOCPF_E_SEMLOCKED:
604 if (bfa_ioc_firmware_lock(ioc)) { 606 if (bfa_ioc_firmware_lock(ioc)) {
605 if (bfa_ioc_sync_complete(ioc)) { 607 if (bfa_ioc_sync_start(ioc)) {
606 iocpf->retry_count = 0; 608 iocpf->retry_count = 0;
607 bfa_ioc_sync_join(ioc); 609 bfa_ioc_sync_join(ioc);
608 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); 610 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit);
@@ -1314,7 +1316,7 @@ bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr)
1314 * execution context (driver/bios) must match. 1316 * execution context (driver/bios) must match.
1315 */ 1317 */
1316static bool 1318static bool
1317bfa_ioc_fwver_valid(struct bfa_ioc *ioc) 1319bfa_ioc_fwver_valid(struct bfa_ioc *ioc, u32 boot_env)
1318{ 1320{
1319 struct bfi_ioc_image_hdr fwhdr, *drv_fwhdr; 1321 struct bfi_ioc_image_hdr fwhdr, *drv_fwhdr;
1320 1322
@@ -1325,7 +1327,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc *ioc)
1325 if (fwhdr.signature != drv_fwhdr->signature) 1327 if (fwhdr.signature != drv_fwhdr->signature)
1326 return false; 1328 return false;
1327 1329
1328 if (fwhdr.exec != drv_fwhdr->exec) 1330 if (swab32(fwhdr.param) != boot_env)
1329 return false; 1331 return false;
1330 1332
1331 return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr); 1333 return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr);
@@ -1352,9 +1354,12 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
1352{ 1354{
1353 enum bfi_ioc_state ioc_fwstate; 1355 enum bfi_ioc_state ioc_fwstate;
1354 bool fwvalid; 1356 bool fwvalid;
1357 u32 boot_env;
1355 1358
1356 ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate); 1359 ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate);
1357 1360
1361 boot_env = BFI_BOOT_LOADER_OS;
1362
1358 if (force) 1363 if (force)
1359 ioc_fwstate = BFI_IOC_UNINIT; 1364 ioc_fwstate = BFI_IOC_UNINIT;
1360 1365
@@ -1362,10 +1367,10 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
1362 * check if firmware is valid 1367 * check if firmware is valid
1363 */ 1368 */
1364 fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ? 1369 fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ?
1365 false : bfa_ioc_fwver_valid(ioc); 1370 false : bfa_ioc_fwver_valid(ioc, boot_env);
1366 1371
1367 if (!fwvalid) { 1372 if (!fwvalid) {
1368 bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id); 1373 bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env);
1369 return; 1374 return;
1370 } 1375 }
1371 1376
@@ -1396,7 +1401,7 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
1396 /** 1401 /**
1397 * Initialize the h/w for any other states. 1402 * Initialize the h/w for any other states.
1398 */ 1403 */
1399 bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id); 1404 bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env);
1400} 1405}
1401 1406
1402void 1407void
@@ -1506,7 +1511,7 @@ bfa_ioc_hb_stop(struct bfa_ioc *ioc)
1506 */ 1511 */
1507static void 1512static void
1508bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, 1513bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type,
1509 u32 boot_param) 1514 u32 boot_env)
1510{ 1515{
1511 u32 *fwimg; 1516 u32 *fwimg;
1512 u32 pgnum, pgoff; 1517 u32 pgnum, pgoff;
@@ -1558,10 +1563,10 @@ bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type,
1558 /* 1563 /*
1559 * Set boot type and boot param at the end. 1564 * Set boot type and boot param at the end.
1560 */ 1565 */
1561 writel((swab32(swab32(boot_type))), ((ioc->ioc_regs.smem_page_start) 1566 writel(boot_type, ((ioc->ioc_regs.smem_page_start)
1562 + (BFI_BOOT_TYPE_OFF))); 1567 + (BFI_BOOT_TYPE_OFF)));
1563 writel((swab32(swab32(boot_param))), ((ioc->ioc_regs.smem_page_start) 1568 writel(boot_env, ((ioc->ioc_regs.smem_page_start)
1564 + (BFI_BOOT_PARAM_OFF))); 1569 + (BFI_BOOT_LOADER_OFF)));
1565} 1570}
1566 1571
1567static void 1572static void
@@ -1721,7 +1726,7 @@ bfa_ioc_pll_init(struct bfa_ioc *ioc)
1721 * as the entry vector. 1726 * as the entry vector.
1722 */ 1727 */
1723static void 1728static void
1724bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) 1729bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_env)
1725{ 1730{
1726 void __iomem *rb; 1731 void __iomem *rb;
1727 1732
@@ -1734,7 +1739,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param)
1734 * Initialize IOC state of all functions on a chip reset. 1739 * Initialize IOC state of all functions on a chip reset.
1735 */ 1740 */
1736 rb = ioc->pcidev.pci_bar_kva; 1741 rb = ioc->pcidev.pci_bar_kva;
1737 if (boot_param == BFI_BOOT_TYPE_MEMTEST) { 1742 if (boot_type == BFI_BOOT_TYPE_MEMTEST) {
1738 writel(BFI_IOC_MEMTEST, (rb + BFA_IOC0_STATE_REG)); 1743 writel(BFI_IOC_MEMTEST, (rb + BFA_IOC0_STATE_REG));
1739 writel(BFI_IOC_MEMTEST, (rb + BFA_IOC1_STATE_REG)); 1744 writel(BFI_IOC_MEMTEST, (rb + BFA_IOC1_STATE_REG));
1740 } else { 1745 } else {
@@ -1743,7 +1748,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param)
1743 } 1748 }
1744 1749
1745 bfa_ioc_msgflush(ioc); 1750 bfa_ioc_msgflush(ioc);
1746 bfa_ioc_download_fw(ioc, boot_type, boot_param); 1751 bfa_ioc_download_fw(ioc, boot_type, boot_env);
1747 1752
1748 /** 1753 /**
1749 * Enable interrupts just before starting LPU 1754 * Enable interrupts just before starting LPU
@@ -2219,13 +2224,9 @@ bfa_nw_ioc_get_mac(struct bfa_ioc *ioc)
2219static void 2224static void
2220bfa_ioc_recover(struct bfa_ioc *ioc) 2225bfa_ioc_recover(struct bfa_ioc *ioc)
2221{ 2226{
2222 u16 bdf; 2227 pr_crit("Heart Beat of IOC has failed\n");
2223 2228 bfa_ioc_stats(ioc, ioc_hbfails);
2224 bdf = (ioc->pcidev.pci_slot << 8 | ioc->pcidev.pci_func << 3 | 2229 bfa_fsm_send_event(ioc, IOC_E_HBFAIL);
2225 ioc->pcidev.device_id);
2226
2227 pr_crit("Firmware heartbeat failure at %d", bdf);
2228 BUG_ON(1);
2229} 2230}
2230 2231
2231static void 2232static void
diff --git a/drivers/net/bna/bfa_ioc.h b/drivers/net/bna/bfa_ioc.h
index e4974bc24ef..bd48abee781 100644
--- a/drivers/net/bna/bfa_ioc.h
+++ b/drivers/net/bna/bfa_ioc.h
@@ -194,6 +194,7 @@ struct bfa_ioc_hwif {
194 bool msix); 194 bool msix);
195 void (*ioc_notify_fail) (struct bfa_ioc *ioc); 195 void (*ioc_notify_fail) (struct bfa_ioc *ioc);
196 void (*ioc_ownership_reset) (struct bfa_ioc *ioc); 196 void (*ioc_ownership_reset) (struct bfa_ioc *ioc);
197 bool (*ioc_sync_start) (struct bfa_ioc *ioc);
197 void (*ioc_sync_join) (struct bfa_ioc *ioc); 198 void (*ioc_sync_join) (struct bfa_ioc *ioc);
198 void (*ioc_sync_leave) (struct bfa_ioc *ioc); 199 void (*ioc_sync_leave) (struct bfa_ioc *ioc);
199 void (*ioc_sync_ack) (struct bfa_ioc *ioc); 200 void (*ioc_sync_ack) (struct bfa_ioc *ioc);
diff --git a/drivers/net/bna/bfa_ioc_ct.c b/drivers/net/bna/bfa_ioc_ct.c
index 469997c4ffd..87aecdf22cf 100644
--- a/drivers/net/bna/bfa_ioc_ct.c
+++ b/drivers/net/bna/bfa_ioc_ct.c
@@ -41,6 +41,7 @@ static void bfa_ioc_ct_map_port(struct bfa_ioc *ioc);
41static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix); 41static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix);
42static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc); 42static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc);
43static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc); 43static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc);
44static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc);
44static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc); 45static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc);
45static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc); 46static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc);
46static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc); 47static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc);
@@ -63,6 +64,7 @@ bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc)
63 nw_hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set; 64 nw_hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set;
64 nw_hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail; 65 nw_hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail;
65 nw_hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset; 66 nw_hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset;
67 nw_hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start;
66 nw_hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join; 68 nw_hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join;
67 nw_hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave; 69 nw_hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave;
68 nw_hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack; 70 nw_hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack;
@@ -345,6 +347,32 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc)
345/** 347/**
346 * Synchronized IOC failure processing routines 348 * Synchronized IOC failure processing routines
347 */ 349 */
350static bool
351bfa_ioc_ct_sync_start(struct bfa_ioc *ioc)
352{
353 u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync);
354 u32 sync_reqd = bfa_ioc_ct_get_sync_reqd(r32);
355
356 /*
357 * Driver load time. If the sync required bit for this PCI fn
358 * is set, it is due to an unclean exit by the driver for this
359 * PCI fn in the previous incarnation. Whoever comes here first
360 * should clean it up, no matter which PCI fn.
361 */
362
363 if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) {
364 writel(0, ioc->ioc_regs.ioc_fail_sync);
365 writel(1, ioc->ioc_regs.ioc_usage_reg);
366 writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate);
367 writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate);
368 return true;
369 }
370
371 return bfa_ioc_ct_sync_complete(ioc);
372}
373/**
374 * Synchronized IOC failure processing routines
375 */
348static void 376static void
349bfa_ioc_ct_sync_join(struct bfa_ioc *ioc) 377bfa_ioc_ct_sync_join(struct bfa_ioc *ioc)
350{ 378{
diff --git a/drivers/net/bna/bfi.h b/drivers/net/bna/bfi.h
index a9739681105..6050379526f 100644
--- a/drivers/net/bna/bfi.h
+++ b/drivers/net/bna/bfi.h
@@ -184,12 +184,14 @@ enum bfi_mclass {
184#define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */ 184#define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */
185 185
186#define BFI_BOOT_TYPE_OFF 8 186#define BFI_BOOT_TYPE_OFF 8
187#define BFI_BOOT_PARAM_OFF 12 187#define BFI_BOOT_LOADER_OFF 12
188 188
189#define BFI_BOOT_TYPE_NORMAL 0 /* param is device id */ 189#define BFI_BOOT_TYPE_NORMAL 0
190#define BFI_BOOT_TYPE_FLASH 1 190#define BFI_BOOT_TYPE_FLASH 1
191#define BFI_BOOT_TYPE_MEMTEST 2 191#define BFI_BOOT_TYPE_MEMTEST 2
192 192
193#define BFI_BOOT_LOADER_OS 0
194
193#define BFI_BOOT_MEMTEST_RES_ADDR 0x900 195#define BFI_BOOT_MEMTEST_RES_ADDR 0x900
194#define BFI_BOOT_MEMTEST_RES_SIG 0xA0A1A2A3 196#define BFI_BOOT_MEMTEST_RES_SIG 0xA0A1A2A3
195 197
diff --git a/drivers/net/bna/bna_hw.h b/drivers/net/bna/bna_hw.h
index 806b224a4c6..6cb89692f5c 100644
--- a/drivers/net/bna/bna_hw.h
+++ b/drivers/net/bna/bna_hw.h
@@ -897,7 +897,7 @@ static struct bna_ritseg_pool_cfg name[BFI_RIT_SEG_TOTAL_POOLS] = \
897 * Catapult RSS Table Base Offset Address 897 * Catapult RSS Table Base Offset Address
898 * 898 *
899 * Exists in RAD memory space. 899 * Exists in RAD memory space.
900 * Each entry is 352 bits, but alligned on 900 * Each entry is 352 bits, but aligned on
901 * 64 byte (512 bit) boundary. Accessed 901 * 64 byte (512 bit) boundary. Accessed
902 * 4 byte words, the whole entry can be 902 * 4 byte words, the whole entry can be
903 * broken into 11 word accesses. 903 * broken into 11 word accesses.
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
index 9f356d5d0f3..8e6ceab9f4d 100644
--- a/drivers/net/bna/bnad.c
+++ b/drivers/net/bna/bnad.c
@@ -1837,7 +1837,6 @@ bnad_setup_rx(struct bnad *bnad, uint rx_id)
1837 /* Initialize the Rx event handlers */ 1837 /* Initialize the Rx event handlers */
1838 rx_cbfn.rcb_setup_cbfn = bnad_cb_rcb_setup; 1838 rx_cbfn.rcb_setup_cbfn = bnad_cb_rcb_setup;
1839 rx_cbfn.rcb_destroy_cbfn = bnad_cb_rcb_destroy; 1839 rx_cbfn.rcb_destroy_cbfn = bnad_cb_rcb_destroy;
1840 rx_cbfn.rcb_destroy_cbfn = NULL;
1841 rx_cbfn.ccb_setup_cbfn = bnad_cb_ccb_setup; 1840 rx_cbfn.ccb_setup_cbfn = bnad_cb_ccb_setup;
1842 rx_cbfn.ccb_destroy_cbfn = bnad_cb_ccb_destroy; 1841 rx_cbfn.ccb_destroy_cbfn = bnad_cb_ccb_destroy;
1843 rx_cbfn.rx_cleanup_cbfn = bnad_cb_rx_cleanup; 1842 rx_cbfn.rx_cleanup_cbfn = bnad_cb_rx_cleanup;
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 8e6d618b530..d8383a9af9a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -8413,6 +8413,8 @@ bnx2_remove_one(struct pci_dev *pdev)
8413 8413
8414 unregister_netdev(dev); 8414 unregister_netdev(dev);
8415 8415
8416 del_timer_sync(&bp->timer);
8417
8416 if (bp->mips_firmware) 8418 if (bp->mips_firmware)
8417 release_firmware(bp->mips_firmware); 8419 release_firmware(bp->mips_firmware);
8418 if (bp->rv2p_firmware) 8420 if (bp->rv2p_firmware)
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index b7ff87b35fb..e0fca701d2f 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1220,7 +1220,7 @@ struct bnx2x {
1220 struct bnx2x_dcbx_port_params dcbx_port_params; 1220 struct bnx2x_dcbx_port_params dcbx_port_params;
1221 int dcb_version; 1221 int dcb_version;
1222 1222
1223 /* DCBX Negotation results */ 1223 /* DCBX Negotiation results */
1224 struct dcbx_features dcbx_local_feat; 1224 struct dcbx_features dcbx_local_feat;
1225 u32 dcbx_error; 1225 u32 dcbx_error;
1226 u32 pending_max; 1226 u32 pending_max;
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index e83ac6dd6fc..16581df5ee4 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -2019,15 +2019,23 @@ static inline void bnx2x_set_pbd_gso(struct sk_buff *skb,
2019static inline u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb, 2019static inline u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb,
2020 u32 *parsing_data, u32 xmit_type) 2020 u32 *parsing_data, u32 xmit_type)
2021{ 2021{
2022 *parsing_data |= ((tcp_hdrlen(skb)/4) << 2022 *parsing_data |=
2023 ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) & 2023 ((((u8 *)skb_transport_header(skb) - skb->data) >> 1) <<
2024 ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW; 2024 ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) &
2025 ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W;
2025 2026
2026 *parsing_data |= ((((u8 *)tcp_hdr(skb) - skb->data) / 2) << 2027 if (xmit_type & XMIT_CSUM_TCP) {
2027 ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) & 2028 *parsing_data |= ((tcp_hdrlen(skb) / 4) <<
2028 ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W; 2029 ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) &
2030 ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW;
2029 2031
2030 return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data; 2032 return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data;
2033 } else
2034 /* We support checksum offload for TCP and UDP only.
2035 * No need to pass the UDP header length - it's a constant.
2036 */
2037 return skb_transport_header(skb) +
2038 sizeof(struct udphdr) - skb->data;
2031} 2039}
2032 2040
2033/** 2041/**
@@ -2043,7 +2051,7 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb,
2043 struct eth_tx_parse_bd_e1x *pbd, 2051 struct eth_tx_parse_bd_e1x *pbd,
2044 u32 xmit_type) 2052 u32 xmit_type)
2045{ 2053{
2046 u8 hlen = (skb_network_header(skb) - skb->data) / 2; 2054 u8 hlen = (skb_network_header(skb) - skb->data) >> 1;
2047 2055
2048 /* for now NS flag is not used in Linux */ 2056 /* for now NS flag is not used in Linux */
2049 pbd->global_data = 2057 pbd->global_data =
@@ -2051,9 +2059,15 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb,
2051 ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT)); 2059 ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT));
2052 2060
2053 pbd->ip_hlen_w = (skb_transport_header(skb) - 2061 pbd->ip_hlen_w = (skb_transport_header(skb) -
2054 skb_network_header(skb)) / 2; 2062 skb_network_header(skb)) >> 1;
2055 2063
2056 hlen += pbd->ip_hlen_w + tcp_hdrlen(skb) / 2; 2064 hlen += pbd->ip_hlen_w;
2065
2066 /* We support checksum offload for TCP and UDP only */
2067 if (xmit_type & XMIT_CSUM_TCP)
2068 hlen += tcp_hdrlen(skb) / 2;
2069 else
2070 hlen += sizeof(struct udphdr) / 2;
2057 2071
2058 pbd->total_hlen_w = cpu_to_le16(hlen); 2072 pbd->total_hlen_w = cpu_to_le16(hlen);
2059 hlen = hlen*2; 2073 hlen = hlen*2;
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c
index f5050155c6b..89cb977898c 100644
--- a/drivers/net/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/bnx2x/bnx2x_ethtool.c
@@ -2114,19 +2114,18 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data)
2114 for (i = 0; i < (data * 2); i++) { 2114 for (i = 0; i < (data * 2); i++) {
2115 if ((i % 2) == 0) 2115 if ((i % 2) == 0)
2116 bnx2x_set_led(&bp->link_params, &bp->link_vars, 2116 bnx2x_set_led(&bp->link_params, &bp->link_vars,
2117 LED_MODE_OPER, SPEED_1000); 2117 LED_MODE_ON, SPEED_1000);
2118 else 2118 else
2119 bnx2x_set_led(&bp->link_params, &bp->link_vars, 2119 bnx2x_set_led(&bp->link_params, &bp->link_vars,
2120 LED_MODE_OFF, 0); 2120 LED_MODE_FRONT_PANEL_OFF, 0);
2121 2121
2122 msleep_interruptible(500); 2122 msleep_interruptible(500);
2123 if (signal_pending(current)) 2123 if (signal_pending(current))
2124 break; 2124 break;
2125 } 2125 }
2126 2126
2127 if (bp->link_vars.link_up) 2127 bnx2x_set_led(&bp->link_params, &bp->link_vars,
2128 bnx2x_set_led(&bp->link_params, &bp->link_vars, LED_MODE_OPER, 2128 LED_MODE_OPER, bp->link_vars.line_speed);
2129 bp->link_vars.line_speed);
2130 2129
2131 return 0; 2130 return 0;
2132} 2131}
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h
index be503cc0a50..dac1bf9cbbf 100644
--- a/drivers/net/bnx2x/bnx2x_hsi.h
+++ b/drivers/net/bnx2x/bnx2x_hsi.h
@@ -3019,7 +3019,7 @@ struct tstorm_eth_mac_filter_config {
3019 3019
3020 3020
3021/* 3021/*
3022 * common flag to indicate existance of TPA. 3022 * common flag to indicate existence of TPA.
3023 */ 3023 */
3024struct tstorm_eth_tpa_exist { 3024struct tstorm_eth_tpa_exist {
3025#if defined(__BIG_ENDIAN) 3025#if defined(__BIG_ENDIAN)
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c
index f2f367d4e74..974ef2be36a 100644
--- a/drivers/net/bnx2x/bnx2x_link.c
+++ b/drivers/net/bnx2x/bnx2x_link.c
@@ -2823,7 +2823,7 @@ static u16 bnx2x_wait_reset_complete(struct bnx2x *bp,
2823 struct link_params *params) 2823 struct link_params *params)
2824{ 2824{
2825 u16 cnt, ctrl; 2825 u16 cnt, ctrl;
2826 /* Wait for soft reset to get cleared upto 1 sec */ 2826 /* Wait for soft reset to get cleared up to 1 sec */
2827 for (cnt = 0; cnt < 1000; cnt++) { 2827 for (cnt = 0; cnt < 1000; cnt++) {
2828 bnx2x_cl45_read(bp, phy, 2828 bnx2x_cl45_read(bp, phy,
2829 MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, &ctrl); 2829 MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, &ctrl);
@@ -4141,7 +4141,7 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy,
4141 val = (1<<5); 4141 val = (1<<5);
4142 /* 4142 /*
4143 * Note that 2.5G works only when used with 1G 4143 * Note that 2.5G works only when used with 1G
4144 * advertisment 4144 * advertisement
4145 */ 4145 */
4146 } else 4146 } else
4147 val = (1<<5); 4147 val = (1<<5);
@@ -4151,7 +4151,7 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy,
4151 PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) 4151 PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)
4152 val |= (1<<7); 4152 val |= (1<<7);
4153 4153
4154 /* Note that 2.5G works only when used with 1G advertisment */ 4154 /* Note that 2.5G works only when used with 1G advertisement */
4155 if (phy->speed_cap_mask & 4155 if (phy->speed_cap_mask &
4156 (PORT_HW_CFG_SPEED_CAPABILITY_D0_1G | 4156 (PORT_HW_CFG_SPEED_CAPABILITY_D0_1G |
4157 PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G)) 4157 PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G))
@@ -5232,14 +5232,14 @@ static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy,
5232 bnx2x_cl45_write(bp, phy, 5232 bnx2x_cl45_write(bp, phy,
5233 MDIO_PMA_DEVAD, MDIO_PMA_REG_LASI_CTRL, 1); 5233 MDIO_PMA_DEVAD, MDIO_PMA_REG_LASI_CTRL, 1);
5234 } else { 5234 } else {
5235 /* Force 1Gbps using autoneg with 1G advertisment */ 5235 /* Force 1Gbps using autoneg with 1G advertisement */
5236 5236
5237 /* Allow CL37 through CL73 */ 5237 /* Allow CL37 through CL73 */
5238 DP(NETIF_MSG_LINK, "XGXS 8706 AutoNeg\n"); 5238 DP(NETIF_MSG_LINK, "XGXS 8706 AutoNeg\n");
5239 bnx2x_cl45_write(bp, phy, 5239 bnx2x_cl45_write(bp, phy,
5240 MDIO_AN_DEVAD, MDIO_AN_REG_CL37_CL73, 0x040c); 5240 MDIO_AN_DEVAD, MDIO_AN_REG_CL37_CL73, 0x040c);
5241 5241
5242 /* Enable Full-Duplex advertisment on CL37 */ 5242 /* Enable Full-Duplex advertisement on CL37 */
5243 bnx2x_cl45_write(bp, phy, 5243 bnx2x_cl45_write(bp, phy,
5244 MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LP, 0x0020); 5244 MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LP, 0x0020);
5245 /* Enable CL37 AN */ 5245 /* Enable CL37 AN */
@@ -6269,7 +6269,7 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy,
6269 6269
6270 switch (actual_phy_selection) { 6270 switch (actual_phy_selection) {
6271 case PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT: 6271 case PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT:
6272 /* Do nothing. Essentialy this is like the priority copper */ 6272 /* Do nothing. Essentially this is like the priority copper */
6273 break; 6273 break;
6274 case PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY: 6274 case PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY:
6275 val |= MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER; 6275 val |= MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER;
@@ -7765,7 +7765,7 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
7765 REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); 7765 REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0);
7766 7766
7767 msleep(10); 7767 msleep(10);
7768 /* The PHY reset is controled by GPIO 1 7768 /* The PHY reset is controlled by GPIO 1
7769 * Hold it as vars low 7769 * Hold it as vars low
7770 */ 7770 */
7771 /* clear link led */ 7771 /* clear link led */
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 32e64cc85d2..a97a4a1c344 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -3702,7 +3702,7 @@ static void bnx2x_eq_int(struct bnx2x *bp)
3702 if ((hw_cons & EQ_DESC_MAX_PAGE) == EQ_DESC_MAX_PAGE) 3702 if ((hw_cons & EQ_DESC_MAX_PAGE) == EQ_DESC_MAX_PAGE)
3703 hw_cons++; 3703 hw_cons++;
3704 3704
3705 /* This function may never run in parralel with itself for a 3705 /* This function may never run in parallel with itself for a
3706 * specific bp, thus there is no need in "paired" read memory 3706 * specific bp, thus there is no need in "paired" read memory
3707 * barrier here. 3707 * barrier here.
3708 */ 3708 */
@@ -5089,7 +5089,7 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code)
5089 /* Step 1: set zeroes to all ilt page entries with valid bit on 5089 /* Step 1: set zeroes to all ilt page entries with valid bit on
5090 * Step 2: set the timers first/last ilt entry to point 5090 * Step 2: set the timers first/last ilt entry to point
5091 * to the entire range to prevent ILT range error for 3rd/4th 5091 * to the entire range to prevent ILT range error for 3rd/4th
5092 * vnic (this code assumes existance of the vnic) 5092 * vnic (this code assumes existence of the vnic)
5093 * 5093 *
5094 * both steps performed by call to bnx2x_ilt_client_init_op() 5094 * both steps performed by call to bnx2x_ilt_client_init_op()
5095 * with dummy TM client 5095 * with dummy TM client
@@ -8685,7 +8685,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
8685 E1H_FUNC_MAX * sizeof(struct drv_func_mb); 8685 E1H_FUNC_MAX * sizeof(struct drv_func_mb);
8686 /* 8686 /*
8687 * get mf configuration: 8687 * get mf configuration:
8688 * 1. existance of MF configuration 8688 * 1. existence of MF configuration
8689 * 2. MAC address must be legal (check only upper bytes) 8689 * 2. MAC address must be legal (check only upper bytes)
8690 * for Switch-Independent mode; 8690 * for Switch-Independent mode;
8691 * OVLAN must be legal for Switch-Dependent mode 8691 * OVLAN must be legal for Switch-Dependent mode
@@ -8727,7 +8727,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
8727 default: 8727 default:
8728 /* Unknown configuration: reset mf_config */ 8728 /* Unknown configuration: reset mf_config */
8729 bp->mf_config[vn] = 0; 8729 bp->mf_config[vn] = 0;
8730 DP(NETIF_MSG_PROBE, "Unkown MF mode 0x%x\n", 8730 DP(NETIF_MSG_PROBE, "Unknown MF mode 0x%x\n",
8731 val); 8731 val);
8732 } 8732 }
8733 } 8733 }
@@ -9777,7 +9777,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
9777 9777
9778#endif 9778#endif
9779 9779
9780 /* Configure interupt mode: try to enable MSI-X/MSI if 9780 /* Configure interrupt mode: try to enable MSI-X/MSI if
9781 * needed, set bp->num_queues appropriately. 9781 * needed, set bp->num_queues appropriately.
9782 */ 9782 */
9783 bnx2x_set_int_mode(bp); 9783 bnx2x_set_int_mode(bp);
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h
index 1c89f19a442..1509a2318af 100644
--- a/drivers/net/bnx2x/bnx2x_reg.h
+++ b/drivers/net/bnx2x/bnx2x_reg.h
@@ -175,9 +175,9 @@
175 the initial credit value; read returns the current value of the credit 175 the initial credit value; read returns the current value of the credit
176 counter. Must be initialized to 1 at start-up. */ 176 counter. Must be initialized to 1 at start-up. */
177#define CCM_REG_CFC_INIT_CRD 0xd0204 177#define CCM_REG_CFC_INIT_CRD 0xd0204
178/* [RW 2] Auxillary counter flag Q number 1. */ 178/* [RW 2] Auxiliary counter flag Q number 1. */
179#define CCM_REG_CNT_AUX1_Q 0xd00c8 179#define CCM_REG_CNT_AUX1_Q 0xd00c8
180/* [RW 2] Auxillary counter flag Q number 2. */ 180/* [RW 2] Auxiliary counter flag Q number 2. */
181#define CCM_REG_CNT_AUX2_Q 0xd00cc 181#define CCM_REG_CNT_AUX2_Q 0xd00cc
182/* [RW 28] The CM header value for QM request (primary). */ 182/* [RW 28] The CM header value for QM request (primary). */
183#define CCM_REG_CQM_CCM_HDR_P 0xd008c 183#define CCM_REG_CQM_CCM_HDR_P 0xd008c
@@ -457,13 +457,13 @@
457#define CSDM_REG_AGG_INT_MODE_9 0xc21dc 457#define CSDM_REG_AGG_INT_MODE_9 0xc21dc
458/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ 458/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
459#define CSDM_REG_CFC_RSP_START_ADDR 0xc2008 459#define CSDM_REG_CFC_RSP_START_ADDR 0xc2008
460/* [RW 16] The maximum value of the competion counter #0 */ 460/* [RW 16] The maximum value of the completion counter #0 */
461#define CSDM_REG_CMP_COUNTER_MAX0 0xc201c 461#define CSDM_REG_CMP_COUNTER_MAX0 0xc201c
462/* [RW 16] The maximum value of the competion counter #1 */ 462/* [RW 16] The maximum value of the completion counter #1 */
463#define CSDM_REG_CMP_COUNTER_MAX1 0xc2020 463#define CSDM_REG_CMP_COUNTER_MAX1 0xc2020
464/* [RW 16] The maximum value of the competion counter #2 */ 464/* [RW 16] The maximum value of the completion counter #2 */
465#define CSDM_REG_CMP_COUNTER_MAX2 0xc2024 465#define CSDM_REG_CMP_COUNTER_MAX2 0xc2024
466/* [RW 16] The maximum value of the competion counter #3 */ 466/* [RW 16] The maximum value of the completion counter #3 */
467#define CSDM_REG_CMP_COUNTER_MAX3 0xc2028 467#define CSDM_REG_CMP_COUNTER_MAX3 0xc2028
468/* [RW 13] The start address in the internal RAM for the completion 468/* [RW 13] The start address in the internal RAM for the completion
469 counters. */ 469 counters. */
@@ -851,7 +851,7 @@
851#define IGU_REG_ATTN_MSG_ADDR_L 0x130120 851#define IGU_REG_ATTN_MSG_ADDR_L 0x130120
852/* [R 4] Debug: [3] - attention write done message is pending (0-no pending; 852/* [R 4] Debug: [3] - attention write done message is pending (0-no pending;
853 * 1-pending). [2:0] = PFID. Pending means attention message was sent; but 853 * 1-pending). [2:0] = PFID. Pending means attention message was sent; but
854 * write done didnt receive. */ 854 * write done didn't receive. */
855#define IGU_REG_ATTN_WRITE_DONE_PENDING 0x130030 855#define IGU_REG_ATTN_WRITE_DONE_PENDING 0x130030
856#define IGU_REG_BLOCK_CONFIGURATION 0x130000 856#define IGU_REG_BLOCK_CONFIGURATION 0x130000
857#define IGU_REG_COMMAND_REG_32LSB_DATA 0x130124 857#define IGU_REG_COMMAND_REG_32LSB_DATA 0x130124
@@ -862,7 +862,7 @@
862#define IGU_REG_CSTORM_TYPE_0_SB_CLEANUP 0x130200 862#define IGU_REG_CSTORM_TYPE_0_SB_CLEANUP 0x130200
863/* [R 5] Debug: ctrl_fsm */ 863/* [R 5] Debug: ctrl_fsm */
864#define IGU_REG_CTRL_FSM 0x130064 864#define IGU_REG_CTRL_FSM 0x130064
865/* [R 1] data availble for error memory. If this bit is clear do not red 865/* [R 1] data available for error memory. If this bit is clear do not red
866 * from error_handling_memory. */ 866 * from error_handling_memory. */
867#define IGU_REG_ERROR_HANDLING_DATA_VALID 0x130130 867#define IGU_REG_ERROR_HANDLING_DATA_VALID 0x130130
868/* [RW 11] Parity mask register #0 read/write */ 868/* [RW 11] Parity mask register #0 read/write */
@@ -3015,7 +3015,7 @@
3015 block. Should be used for close the gates. */ 3015 block. Should be used for close the gates. */
3016#define PXP_REG_HST_DISCARD_DOORBELLS 0x1030a4 3016#define PXP_REG_HST_DISCARD_DOORBELLS 0x1030a4
3017/* [R 1] debug only: '1' means this PSWHST is discarding doorbells. This bit 3017/* [R 1] debug only: '1' means this PSWHST is discarding doorbells. This bit
3018 should update accoring to 'hst_discard_doorbells' register when the state 3018 should update according to 'hst_discard_doorbells' register when the state
3019 machine is idle */ 3019 machine is idle */
3020#define PXP_REG_HST_DISCARD_DOORBELLS_STATUS 0x1030a0 3020#define PXP_REG_HST_DISCARD_DOORBELLS_STATUS 0x1030a0
3021/* [RW 1] When 1; new internal writes arriving to the block are discarded. 3021/* [RW 1] When 1; new internal writes arriving to the block are discarded.
@@ -3023,7 +3023,7 @@
3023#define PXP_REG_HST_DISCARD_INTERNAL_WRITES 0x1030a8 3023#define PXP_REG_HST_DISCARD_INTERNAL_WRITES 0x1030a8
3024/* [R 6] debug only: A bit mask for all PSWHST internal write clients. '1' 3024/* [R 6] debug only: A bit mask for all PSWHST internal write clients. '1'
3025 means this PSWHST is discarding inputs from this client. Each bit should 3025 means this PSWHST is discarding inputs from this client. Each bit should
3026 update accoring to 'hst_discard_internal_writes' register when the state 3026 update according to 'hst_discard_internal_writes' register when the state
3027 machine is idle. */ 3027 machine is idle. */
3028#define PXP_REG_HST_DISCARD_INTERNAL_WRITES_STATUS 0x10309c 3028#define PXP_REG_HST_DISCARD_INTERNAL_WRITES_STATUS 0x10309c
3029/* [WB 160] Used for initialization of the inbound interrupts memory */ 3029/* [WB 160] Used for initialization of the inbound interrupts memory */
@@ -3822,13 +3822,13 @@
3822#define TSDM_REG_AGG_INT_T_1 0x420bc 3822#define TSDM_REG_AGG_INT_T_1 0x420bc
3823/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ 3823/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
3824#define TSDM_REG_CFC_RSP_START_ADDR 0x42008 3824#define TSDM_REG_CFC_RSP_START_ADDR 0x42008
3825/* [RW 16] The maximum value of the competion counter #0 */ 3825/* [RW 16] The maximum value of the completion counter #0 */
3826#define TSDM_REG_CMP_COUNTER_MAX0 0x4201c 3826#define TSDM_REG_CMP_COUNTER_MAX0 0x4201c
3827/* [RW 16] The maximum value of the competion counter #1 */ 3827/* [RW 16] The maximum value of the completion counter #1 */
3828#define TSDM_REG_CMP_COUNTER_MAX1 0x42020 3828#define TSDM_REG_CMP_COUNTER_MAX1 0x42020
3829/* [RW 16] The maximum value of the competion counter #2 */ 3829/* [RW 16] The maximum value of the completion counter #2 */
3830#define TSDM_REG_CMP_COUNTER_MAX2 0x42024 3830#define TSDM_REG_CMP_COUNTER_MAX2 0x42024
3831/* [RW 16] The maximum value of the competion counter #3 */ 3831/* [RW 16] The maximum value of the completion counter #3 */
3832#define TSDM_REG_CMP_COUNTER_MAX3 0x42028 3832#define TSDM_REG_CMP_COUNTER_MAX3 0x42028
3833/* [RW 13] The start address in the internal RAM for the completion 3833/* [RW 13] The start address in the internal RAM for the completion
3834 counters. */ 3834 counters. */
@@ -4284,13 +4284,13 @@
4284#define USDM_REG_AGG_INT_T_6 0xc40d0 4284#define USDM_REG_AGG_INT_T_6 0xc40d0
4285/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ 4285/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
4286#define USDM_REG_CFC_RSP_START_ADDR 0xc4008 4286#define USDM_REG_CFC_RSP_START_ADDR 0xc4008
4287/* [RW 16] The maximum value of the competion counter #0 */ 4287/* [RW 16] The maximum value of the completion counter #0 */
4288#define USDM_REG_CMP_COUNTER_MAX0 0xc401c 4288#define USDM_REG_CMP_COUNTER_MAX0 0xc401c
4289/* [RW 16] The maximum value of the competion counter #1 */ 4289/* [RW 16] The maximum value of the completion counter #1 */
4290#define USDM_REG_CMP_COUNTER_MAX1 0xc4020 4290#define USDM_REG_CMP_COUNTER_MAX1 0xc4020
4291/* [RW 16] The maximum value of the competion counter #2 */ 4291/* [RW 16] The maximum value of the completion counter #2 */
4292#define USDM_REG_CMP_COUNTER_MAX2 0xc4024 4292#define USDM_REG_CMP_COUNTER_MAX2 0xc4024
4293/* [RW 16] The maximum value of the competion counter #3 */ 4293/* [RW 16] The maximum value of the completion counter #3 */
4294#define USDM_REG_CMP_COUNTER_MAX3 0xc4028 4294#define USDM_REG_CMP_COUNTER_MAX3 0xc4028
4295/* [RW 13] The start address in the internal RAM for the completion 4295/* [RW 13] The start address in the internal RAM for the completion
4296 counters. */ 4296 counters. */
@@ -4798,13 +4798,13 @@
4798#define XSDM_REG_AGG_INT_MODE_1 0x1661bc 4798#define XSDM_REG_AGG_INT_MODE_1 0x1661bc
4799/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */ 4799/* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
4800#define XSDM_REG_CFC_RSP_START_ADDR 0x166008 4800#define XSDM_REG_CFC_RSP_START_ADDR 0x166008
4801/* [RW 16] The maximum value of the competion counter #0 */ 4801/* [RW 16] The maximum value of the completion counter #0 */
4802#define XSDM_REG_CMP_COUNTER_MAX0 0x16601c 4802#define XSDM_REG_CMP_COUNTER_MAX0 0x16601c
4803/* [RW 16] The maximum value of the competion counter #1 */ 4803/* [RW 16] The maximum value of the completion counter #1 */
4804#define XSDM_REG_CMP_COUNTER_MAX1 0x166020 4804#define XSDM_REG_CMP_COUNTER_MAX1 0x166020
4805/* [RW 16] The maximum value of the competion counter #2 */ 4805/* [RW 16] The maximum value of the completion counter #2 */
4806#define XSDM_REG_CMP_COUNTER_MAX2 0x166024 4806#define XSDM_REG_CMP_COUNTER_MAX2 0x166024
4807/* [RW 16] The maximum value of the competion counter #3 */ 4807/* [RW 16] The maximum value of the completion counter #3 */
4808#define XSDM_REG_CMP_COUNTER_MAX3 0x166028 4808#define XSDM_REG_CMP_COUNTER_MAX3 0x166028
4809/* [RW 13] The start address in the internal RAM for the completion 4809/* [RW 13] The start address in the internal RAM for the completion
4810 counters. */ 4810 counters. */
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 494bf960442..31912f17653 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1482,8 +1482,11 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best,
1482 1482
1483static int agg_device_up(const struct aggregator *agg) 1483static int agg_device_up(const struct aggregator *agg)
1484{ 1484{
1485 return (netif_running(agg->slave->dev) && 1485 struct port *port = agg->lag_ports;
1486 netif_carrier_ok(agg->slave->dev)); 1486 if (!port)
1487 return 0;
1488 return (netif_running(port->slave->dev) &&
1489 netif_carrier_ok(port->slave->dev));
1487} 1490}
1488 1491
1489/** 1492/**
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 9bc5de3e04a..ba715826e2a 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -176,7 +176,7 @@ static int tlb_initialize(struct bonding *bond)
176 bond_info->tx_hashtbl = new_hashtbl; 176 bond_info->tx_hashtbl = new_hashtbl;
177 177
178 for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) { 178 for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
179 tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1); 179 tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
180 } 180 }
181 181
182 _unlock_tx_hashtbl(bond); 182 _unlock_tx_hashtbl(bond);
@@ -701,7 +701,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
701 */ 701 */
702 rlb_choose_channel(skb, bond); 702 rlb_choose_channel(skb, bond);
703 703
704 /* The ARP relpy packets must be delayed so that 704 /* The ARP reply packets must be delayed so that
705 * they can cancel out the influence of the ARP request. 705 * they can cancel out the influence of the ARP request.
706 */ 706 */
707 bond->alb_info.rlb_update_delay_counter = RLB_UPDATE_DELAY; 707 bond->alb_info.rlb_update_delay_counter = RLB_UPDATE_DELAY;
@@ -1042,7 +1042,7 @@ static void alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *sla
1042 * 1042 *
1043 * If the permanent hw address of @slave is @bond's hw address, we need to 1043 * If the permanent hw address of @slave is @bond's hw address, we need to
1044 * find a different hw address to give @slave, that isn't in use by any other 1044 * find a different hw address to give @slave, that isn't in use by any other
1045 * slave in the bond. This address must be, of course, one of the premanent 1045 * slave in the bond. This address must be, of course, one of the permanent
1046 * addresses of the other slaves. 1046 * addresses of the other slaves.
1047 * 1047 *
1048 * We go over the slave list, and for each slave there we compare its 1048 * We go over the slave list, and for each slave there we compare its
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h
index 4b3e3587840..8ca7158b2dd 100644
--- a/drivers/net/bonding/bond_alb.h
+++ b/drivers/net/bonding/bond_alb.h
@@ -75,8 +75,8 @@ struct tlb_client_info {
75 * gave this entry index. 75 * gave this entry index.
76 */ 76 */
77 u32 tx_bytes; /* Each Client accumulates the BytesTx that 77 u32 tx_bytes; /* Each Client accumulates the BytesTx that
78 * were tranmitted to it, and after each 78 * were transmitted to it, and after each
79 * CallBack the LoadHistory is devided 79 * CallBack the LoadHistory is divided
80 * by the balance interval 80 * by the balance interval
81 */ 81 */
82 u32 load_history; /* This field contains the amount of Bytes 82 u32 load_history; /* This field contains the amount of Bytes
@@ -122,7 +122,6 @@ struct tlb_slave_info {
122}; 122};
123 123
124struct alb_bond_info { 124struct alb_bond_info {
125 struct timer_list alb_timer;
126 struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */ 125 struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */
127 spinlock_t tx_hashtbl_lock; 126 spinlock_t tx_hashtbl_lock;
128 u32 unbalanced_load; 127 u32 unbalanced_load;
@@ -140,7 +139,6 @@ struct alb_bond_info {
140 struct slave *next_rx_slave;/* next slave to be assigned 139 struct slave *next_rx_slave;/* next slave to be assigned
141 * to a new rx client for 140 * to a new rx client for
142 */ 141 */
143 u32 rlb_interval_counter;
144 u8 primary_is_promisc; /* boolean */ 142 u8 primary_is_promisc; /* boolean */
145 u32 rlb_promisc_timeout_counter;/* counts primary 143 u32 rlb_promisc_timeout_counter;/* counts primary
146 * promiscuity time 144 * promiscuity time
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
index 80511167f35..731aa119377 100644
--- a/drivers/net/caif/caif_shmcore.c
+++ b/drivers/net/caif/caif_shmcore.c
@@ -591,7 +591,7 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev)
591 (NR_TX_BUF * TX_BUF_SZ + NR_RX_BUF * RX_BUF_SZ)) { 591 (NR_TX_BUF * TX_BUF_SZ + NR_RX_BUF * RX_BUF_SZ)) {
592 592
593 pr_warn("ERROR, Amount of available" 593 pr_warn("ERROR, Amount of available"
594 " Phys. SHM cannot accomodate current SHM " 594 " Phys. SHM cannot accommodate current SHM "
595 "driver configuration, Bailing out ...\n"); 595 "driver configuration, Bailing out ...\n");
596 free_netdev(pshm_dev->pshm_netdev); 596 free_netdev(pshm_dev->pshm_netdev);
597 return -ENOMEM; 597 return -ENOMEM;
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index 20da1996d35..57e63937381 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -397,7 +397,7 @@ int cfspi_xmitlen(struct cfspi *cfspi)
397 int pkts = 0; 397 int pkts = 0;
398 398
399 /* 399 /*
400 * Decommit previously commited frames. 400 * Decommit previously committed frames.
401 * skb_queue_splice_tail(&cfspi->chead,&cfspi->qhead) 401 * skb_queue_splice_tail(&cfspi->chead,&cfspi->qhead)
402 */ 402 */
403 while (skb_peek(&cfspi->chead)) { 403 while (skb_peek(&cfspi->chead)) {
diff --git a/drivers/net/caif/caif_spi_slave.c b/drivers/net/caif/caif_spi_slave.c
index 1b9943a4eda..b009e03cda9 100644
--- a/drivers/net/caif/caif_spi_slave.c
+++ b/drivers/net/caif/caif_spi_slave.c
@@ -98,7 +98,7 @@ void cfspi_xfer(struct work_struct *work)
98 98
99 cfspi_dbg_state(cfspi, CFSPI_STATE_FETCH_PKT); 99 cfspi_dbg_state(cfspi, CFSPI_STATE_FETCH_PKT);
100 100
101 /* Copy commited SPI frames after the SPI indication. */ 101 /* Copy committed SPI frames after the SPI indication. */
102 ptr = (u8 *) cfspi->xfer.va_tx; 102 ptr = (u8 *) cfspi->xfer.va_tx;
103 ptr += SPI_IND_SZ; 103 ptr += SPI_IND_SZ;
104 len = cfspi_xmitfrm(cfspi, ptr, cfspi->tx_cpck_len); 104 len = cfspi_xmitfrm(cfspi, ptr, cfspi->tx_cpck_len);
@@ -158,7 +158,7 @@ void cfspi_xfer(struct work_struct *work)
158 158
159 cfspi_dbg_state(cfspi, CFSPI_STATE_SIG_ACTIVE); 159 cfspi_dbg_state(cfspi, CFSPI_STATE_SIG_ACTIVE);
160 160
161 /* Signal that we are ready to recieve data. */ 161 /* Signal that we are ready to receive data. */
162 cfspi->dev->sig_xfer(true, cfspi->dev); 162 cfspi->dev->sig_xfer(true, cfspi->dev);
163 163
164 cfspi_dbg_state(cfspi, CFSPI_STATE_WAIT_XFER_DONE); 164 cfspi_dbg_state(cfspi, CFSPI_STATE_WAIT_XFER_DONE);
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 57d2ffbbb43..74efb5a2ad4 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -416,7 +416,7 @@ static netdev_tx_t at91_start_xmit(struct sk_buff *skb, struct net_device *dev)
416 416
417 stats->tx_bytes += cf->can_dlc; 417 stats->tx_bytes += cf->can_dlc;
418 418
419 /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */ 419 /* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
420 can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST); 420 can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST);
421 421
422 /* 422 /*
@@ -782,7 +782,7 @@ static void at91_irq_tx(struct net_device *dev, u32 reg_sr)
782 reg_msr = at91_read(priv, AT91_MSR(mb)); 782 reg_msr = at91_read(priv, AT91_MSR(mb));
783 if (likely(reg_msr & AT91_MSR_MRDY && 783 if (likely(reg_msr & AT91_MSR_MRDY &&
784 ~reg_msr & AT91_MSR_MABT)) { 784 ~reg_msr & AT91_MSR_MABT)) {
785 /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */ 785 /* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
786 can_get_echo_skb(dev, mb - AT91_MB_TX_FIRST); 786 can_get_echo_skb(dev, mb - AT91_MB_TX_FIRST);
787 dev->stats.tx_packets++; 787 dev->stats.tx_packets++;
788 } 788 }
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 31552959aed..7e5cc0bd913 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -813,7 +813,7 @@ static int c_can_handle_state_change(struct net_device *dev,
813 struct sk_buff *skb; 813 struct sk_buff *skb;
814 struct can_berr_counter bec; 814 struct can_berr_counter bec;
815 815
816 /* propogate the error condition to the CAN stack */ 816 /* propagate the error condition to the CAN stack */
817 skb = alloc_can_err_skb(dev, &cf); 817 skb = alloc_can_err_skb(dev, &cf);
818 if (unlikely(!skb)) 818 if (unlikely(!skb))
819 return 0; 819 return 0;
@@ -887,7 +887,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
887 if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR) 887 if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR)
888 return 0; 888 return 0;
889 889
890 /* propogate the error condition to the CAN stack */ 890 /* propagate the error condition to the CAN stack */
891 skb = alloc_can_err_skb(dev, &cf); 891 skb = alloc_can_err_skb(dev, &cf);
892 if (unlikely(!skb)) 892 if (unlikely(!skb))
893 return 0; 893 return 0;
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index 102b16c6cc9..587fba48cdd 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -274,7 +274,7 @@ static inline void ican3_set_page(struct ican3_dev *mod, unsigned int page)
274 */ 274 */
275 275
276/* 276/*
277 * Recieve a message from the ICAN3 "old-style" firmware interface 277 * Receive a message from the ICAN3 "old-style" firmware interface
278 * 278 *
279 * LOCKING: must hold mod->lock 279 * LOCKING: must hold mod->lock
280 * 280 *
@@ -1050,7 +1050,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
1050 complete(&mod->termination_comp); 1050 complete(&mod->termination_comp);
1051 break; 1051 break;
1052 default: 1052 default:
1053 dev_err(mod->dev, "recieved an unknown inquiry response\n"); 1053 dev_err(mod->dev, "received an unknown inquiry response\n");
1054 break; 1054 break;
1055 } 1055 }
1056} 1056}
@@ -1058,7 +1058,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
1058static void ican3_handle_unknown_message(struct ican3_dev *mod, 1058static void ican3_handle_unknown_message(struct ican3_dev *mod,
1059 struct ican3_msg *msg) 1059 struct ican3_msg *msg)
1060{ 1060{
1061 dev_warn(mod->dev, "recieved unknown message: spec 0x%.2x length %d\n", 1061 dev_warn(mod->dev, "received unknown message: spec 0x%.2x length %d\n",
1062 msg->spec, le16_to_cpu(msg->len)); 1062 msg->spec, le16_to_cpu(msg->len));
1063} 1063}
1064 1064
@@ -1113,7 +1113,7 @@ static bool ican3_txok(struct ican3_dev *mod)
1113} 1113}
1114 1114
1115/* 1115/*
1116 * Recieve one CAN frame from the hardware 1116 * Receive one CAN frame from the hardware
1117 * 1117 *
1118 * CONTEXT: must be called from user context 1118 * CONTEXT: must be called from user context
1119 */ 1119 */
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 7513c4523ac..330140ee266 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -931,7 +931,8 @@ static int mcp251x_open(struct net_device *net)
931 priv->tx_len = 0; 931 priv->tx_len = 0;
932 932
933 ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist, 933 ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
934 IRQF_TRIGGER_FALLING, DEVICE_NAME, priv); 934 pdata->irq_flags ? pdata->irq_flags : IRQF_TRIGGER_FALLING,
935 DEVICE_NAME, priv);
935 if (ret) { 936 if (ret) {
936 dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq); 937 dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
937 if (pdata->transceiver_enable) 938 if (pdata->transceiver_enable)
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index c0a1bc5b143..bd1d811c204 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -260,7 +260,7 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
260 260
261 if (!ofdev->dev.of_match) 261 if (!ofdev->dev.of_match)
262 return -EINVAL; 262 return -EINVAL;
263 data = (struct mpc5xxx_can_data *)of_dev->dev.of_match->data; 263 data = (struct mpc5xxx_can_data *)ofdev->dev.of_match->data;
264 264
265 base = of_iomap(np, 0); 265 base = of_iomap(np, 0);
266 if (!base) { 266 if (!base) {
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
index 74cd880c7e0..92feac68b66 100644
--- a/drivers/net/can/mscan/mscan.c
+++ b/drivers/net/can/mscan/mscan.c
@@ -246,7 +246,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
246 out_be16(&regs->tx.idr3_2, can_id); 246 out_be16(&regs->tx.idr3_2, can_id);
247 247
248 can_id >>= 16; 248 can_id >>= 16;
249 /* EFF_FLAGS are inbetween the IDs :( */ 249 /* EFF_FLAGS are between the IDs :( */
250 can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0) 250 can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0)
251 | MSCAN_EFF_FLAGS; 251 | MSCAN_EFF_FLAGS;
252 } else { 252 } else {
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index 0a8de01d52f..a358ea9445a 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -425,7 +425,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
425 cf->data[3] = ecc & ECC_SEG; 425 cf->data[3] = ecc & ECC_SEG;
426 break; 426 break;
427 } 427 }
428 /* Error occured during transmission? */ 428 /* Error occurred during transmission? */
429 if ((ecc & ECC_DIR) == 0) 429 if ((ecc & ECC_DIR) == 0)
430 cf->data[2] |= CAN_ERR_PROT_TX; 430 cf->data[2] |= CAN_ERR_PROT_TX;
431 } 431 }
diff --git a/drivers/net/can/softing/softing.h b/drivers/net/can/softing/softing.h
index 7ec9f4db3d5..afd7d85b691 100644
--- a/drivers/net/can/softing/softing.h
+++ b/drivers/net/can/softing/softing.h
@@ -22,7 +22,7 @@ struct softing_priv {
22 struct softing *card; 22 struct softing *card;
23 struct { 23 struct {
24 int pending; 24 int pending;
25 /* variables wich hold the circular buffer */ 25 /* variables which hold the circular buffer */
26 int echo_put; 26 int echo_put;
27 int echo_get; 27 int echo_get;
28 } tx; 28 } tx;
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c
index aeea9f9ff6e..7a70709d560 100644
--- a/drivers/net/can/softing/softing_main.c
+++ b/drivers/net/can/softing/softing_main.c
@@ -218,7 +218,7 @@ static int softing_handle_1(struct softing *card)
218 ptr = buf; 218 ptr = buf;
219 cmd = *ptr++; 219 cmd = *ptr++;
220 if (cmd == 0xff) 220 if (cmd == 0xff)
221 /* not quite usefull, probably the card has got out */ 221 /* not quite useful, probably the card has got out */
222 return 0; 222 return 0;
223 netdev = card->net[0]; 223 netdev = card->net[0];
224 if (cmd & CMD_BUS2) 224 if (cmd & CMD_BUS2)
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 4d07f1ee716..f7bbde9eb2c 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -663,7 +663,7 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
663 struct can_frame *cf; 663 struct can_frame *cf;
664 struct sk_buff *skb; 664 struct sk_buff *skb;
665 665
666 /* propogate the error condition to the can stack */ 666 /* propagate the error condition to the can stack */
667 skb = alloc_can_err_skb(ndev, &cf); 667 skb = alloc_can_err_skb(ndev, &cf);
668 if (!skb) { 668 if (!skb) {
669 if (printk_ratelimit()) 669 if (printk_ratelimit())
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index e75f1a87697..a72c7bfb409 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -386,7 +386,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg)
386 break; 386 break;
387 } 387 }
388 388
389 /* Error occured during transmission? */ 389 /* Error occurred during transmission? */
390 if ((ecc & SJA1000_ECC_DIR) == 0) 390 if ((ecc & SJA1000_ECC_DIR) == 0)
391 cf->data[2] |= CAN_ERR_PROT_TX; 391 cf->data[2] |= CAN_ERR_PROT_TX;
392 392
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index dc53c831ea9..eb8b0e60028 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -284,7 +284,7 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
284 break; 284 break;
285 } 285 }
286 286
287 /* Error occured during transmission? */ 287 /* Error occurred during transmission? */
288 if (!(ecc & SJA1000_ECC_DIR)) 288 if (!(ecc & SJA1000_ECC_DIR))
289 cf->data[2] |= CAN_ERR_PROT_TX; 289 cf->data[2] |= CAN_ERR_PROT_TX;
290 290
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 3437613f045..143a28c666a 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -51,7 +51,7 @@
51 * TX has 4 queues. currently these queues are used in a round-robin 51 * TX has 4 queues. currently these queues are used in a round-robin
52 * fashion for load balancing. They can also be used for QoS. for that 52 * fashion for load balancing. They can also be used for QoS. for that
53 * to work, however, QoS information needs to be exposed down to the driver 53 * to work, however, QoS information needs to be exposed down to the driver
54 * level so that subqueues get targetted to particular transmit rings. 54 * level so that subqueues get targeted to particular transmit rings.
55 * alternatively, the queues can be configured via use of the all-purpose 55 * alternatively, the queues can be configured via use of the all-purpose
56 * ioctl. 56 * ioctl.
57 * 57 *
@@ -5165,7 +5165,7 @@ err_out_free_res:
5165 pci_release_regions(pdev); 5165 pci_release_regions(pdev);
5166 5166
5167err_write_cacheline: 5167err_write_cacheline:
5168 /* Try to restore it in case the error occured after we 5168 /* Try to restore it in case the error occurred after we
5169 * set it. 5169 * set it.
5170 */ 5170 */
5171 pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, orig_cacheline_size); 5171 pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, orig_cacheline_size);
diff --git a/drivers/net/cassini.h b/drivers/net/cassini.h
index faf4746a0f3..b361424d5f5 100644
--- a/drivers/net/cassini.h
+++ b/drivers/net/cassini.h
@@ -772,7 +772,7 @@
772#define RX_DEBUG_INTR_WRITE_PTR_MASK 0xC0000000 /* interrupt write pointer 772#define RX_DEBUG_INTR_WRITE_PTR_MASK 0xC0000000 /* interrupt write pointer
773 of the interrupt queue */ 773 of the interrupt queue */
774 774
775/* flow control frames are emmitted using two PAUSE thresholds: 775/* flow control frames are emitted using two PAUSE thresholds:
776 * XOFF PAUSE uses pause time value pre-programmed in the Send PAUSE MAC reg 776 * XOFF PAUSE uses pause time value pre-programmed in the Send PAUSE MAC reg
777 * XON PAUSE uses a pause time of 0. granularity of threshold is 64bytes. 777 * XON PAUSE uses a pause time of 0. granularity of threshold is 64bytes.
778 * PAUSE thresholds defined in terms of FIFO occupancy and may be translated 778 * PAUSE thresholds defined in terms of FIFO occupancy and may be translated
diff --git a/drivers/net/chelsio/mv88e1xxx.c b/drivers/net/chelsio/mv88e1xxx.c
index 809047a99e9..71018a4fdf1 100644
--- a/drivers/net/chelsio/mv88e1xxx.c
+++ b/drivers/net/chelsio/mv88e1xxx.c
@@ -41,7 +41,7 @@ static void mdio_clear_bit(struct cphy *cphy, int reg, u32 bitval)
41 * 41 *
42 * PARAMS: cphy - Pointer to PHY instance data. 42 * PARAMS: cphy - Pointer to PHY instance data.
43 * 43 *
44 * RETURN: 0 - Successfull reset. 44 * RETURN: 0 - Successful reset.
45 * -1 - Timeout. 45 * -1 - Timeout.
46 */ 46 */
47static int mv88e1xxx_reset(struct cphy *cphy, int wait) 47static int mv88e1xxx_reset(struct cphy *cphy, int wait)
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c
index 7dbb16d36ff..40c7b93abab 100644
--- a/drivers/net/chelsio/pm3393.c
+++ b/drivers/net/chelsio/pm3393.c
@@ -293,7 +293,7 @@ static int pm3393_enable_port(struct cmac *cmac, int which)
293 pm3393_enable(cmac, which); 293 pm3393_enable(cmac, which);
294 294
295 /* 295 /*
296 * XXX This should be done by the PHY and preferrably not at all. 296 * XXX This should be done by the PHY and preferably not at all.
297 * The PHY doesn't give us link status indication on its own so have 297 * The PHY doesn't give us link status indication on its own so have
298 * the link management code query it instead. 298 * the link management code query it instead.
299 */ 299 */
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index f778b15ad3f..8754d447304 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -1662,7 +1662,7 @@ irqreturn_t t1_interrupt(int irq, void *data)
1662 * The code figures out how many entries the sk_buff will require in the 1662 * The code figures out how many entries the sk_buff will require in the
1663 * cmdQ and updates the cmdQ data structure with the state once the enqueue 1663 * cmdQ and updates the cmdQ data structure with the state once the enqueue
1664 * has complete. Then, it doesn't access the global structure anymore, but 1664 * has complete. Then, it doesn't access the global structure anymore, but
1665 * uses the corresponding fields on the stack. In conjuction with a spinlock 1665 * uses the corresponding fields on the stack. In conjunction with a spinlock
1666 * around that code, we can make the function reentrant without holding the 1666 * around that code, we can make the function reentrant without holding the
1667 * lock when we actually enqueue (which might be expensive, especially on 1667 * lock when we actually enqueue (which might be expensive, especially on
1668 * architectures with IO MMUs). 1668 * architectures with IO MMUs).
diff --git a/drivers/net/chelsio/vsc7326.c b/drivers/net/chelsio/vsc7326.c
index 106a590f0d9..b0cb388f5e1 100644
--- a/drivers/net/chelsio/vsc7326.c
+++ b/drivers/net/chelsio/vsc7326.c
@@ -566,7 +566,7 @@ static int mac_disable(struct cmac *mac, int which)
566 for (i = 0; i <= 0x3a; ++i) 566 for (i = 0; i <= 0x3a; ++i)
567 vsc_write(mac->adapter, CRA(4, port, i), 0); 567 vsc_write(mac->adapter, CRA(4, port, i), 0);
568 568
569 /* Clear sofware counters */ 569 /* Clear software counters */
570 memset(&mac->stats, 0, sizeof(struct cmac_statistics)); 570 memset(&mac->stats, 0, sizeof(struct cmac_statistics));
571 571
572 return 0; 572 return 0;
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 80c2feeefec..9d267d3a689 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -1383,7 +1383,7 @@ e100_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1383 spin_lock(&np->lock); /* Preempt protection */ 1383 spin_lock(&np->lock); /* Preempt protection */
1384 switch (cmd) { 1384 switch (cmd) {
1385 /* The ioctls below should be considered obsolete but are */ 1385 /* The ioctls below should be considered obsolete but are */
1386 /* still present for compatability with old scripts/apps */ 1386 /* still present for compatibility with old scripts/apps */
1387 case SET_ETH_SPEED_10: /* 10 Mbps */ 1387 case SET_ETH_SPEED_10: /* 10 Mbps */
1388 e100_set_speed(dev, 10); 1388 e100_set_speed(dev, 10);
1389 break; 1389 break;
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index f9f6645b2e6..bfa2d56af1e 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -199,7 +199,7 @@ static inline void refill_rspq(struct adapter *adapter,
199 * need_skb_unmap - does the platform need unmapping of sk_buffs? 199 * need_skb_unmap - does the platform need unmapping of sk_buffs?
200 * 200 *
201 * Returns true if the platform needs sk_buff unmapping. The compiler 201 * Returns true if the platform needs sk_buff unmapping. The compiler
202 * optimizes away unecessary code if this returns true. 202 * optimizes away unnecessary code if this returns true.
203 */ 203 */
204static inline int need_skb_unmap(void) 204static inline int need_skb_unmap(void)
205{ 205{
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index d55db6b38e7..c688421da9c 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -1386,11 +1386,11 @@ struct intr_info {
1386 * @reg: the interrupt status register to process 1386 * @reg: the interrupt status register to process
1387 * @mask: a mask to apply to the interrupt status 1387 * @mask: a mask to apply to the interrupt status
1388 * @acts: table of interrupt actions 1388 * @acts: table of interrupt actions
1389 * @stats: statistics counters tracking interrupt occurences 1389 * @stats: statistics counters tracking interrupt occurrences
1390 * 1390 *
1391 * A table driven interrupt handler that applies a set of masks to an 1391 * A table driven interrupt handler that applies a set of masks to an
1392 * interrupt status word and performs the corresponding actions if the 1392 * interrupt status word and performs the corresponding actions if the
1393 * interrupts described by the mask have occured. The actions include 1393 * interrupts described by the mask have occurred. The actions include
1394 * optionally printing a warning or alert message, and optionally 1394 * optionally printing a warning or alert message, and optionally
1395 * incrementing a stat counter. The table is terminated by an entry 1395 * incrementing a stat counter. The table is terminated by an entry
1396 * specifying mask 0. Returns the number of fatal interrupt conditions. 1396 * specifying mask 0. Returns the number of fatal interrupt conditions.
@@ -2783,7 +2783,7 @@ static void init_mtus(unsigned short mtus[])
2783{ 2783{
2784 /* 2784 /*
2785 * See draft-mathis-plpmtud-00.txt for the values. The min is 88 so 2785 * See draft-mathis-plpmtud-00.txt for the values. The min is 88 so
2786 * it can accomodate max size TCP/IP headers when SACK and timestamps 2786 * it can accommodate max size TCP/IP headers when SACK and timestamps
2787 * are enabled and still have at least 8 bytes of payload. 2787 * are enabled and still have at least 8 bytes of payload.
2788 */ 2788 */
2789 mtus[0] = 88; 2789 mtus[0] = 88;
diff --git a/drivers/net/cxgb4/t4_hw.c b/drivers/net/cxgb4/t4_hw.c
index b9fd8a6f2cc..d1ec111aebd 100644
--- a/drivers/net/cxgb4/t4_hw.c
+++ b/drivers/net/cxgb4/t4_hw.c
@@ -883,7 +883,7 @@ struct intr_info {
883 * 883 *
884 * A table driven interrupt handler that applies a set of masks to an 884 * A table driven interrupt handler that applies a set of masks to an
885 * interrupt status word and performs the corresponding actions if the 885 * interrupt status word and performs the corresponding actions if the
886 * interrupts described by the mask have occured. The actions include 886 * interrupts described by the mask have occurred. The actions include
887 * optionally emitting a warning or alert message. The table is terminated 887 * optionally emitting a warning or alert message. The table is terminated
888 * by an entry specifying mask 0. Returns the number of fatal interrupt 888 * by an entry specifying mask 0. Returns the number of fatal interrupt
889 * conditions. 889 * conditions.
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index 6aad64df4dc..4661cbbd9bd 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -2738,7 +2738,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
2738 cfg_queues(adapter); 2738 cfg_queues(adapter);
2739 2739
2740 /* 2740 /*
2741 * Print a short notice on the existance and configuration of the new 2741 * Print a short notice on the existence and configuration of the new
2742 * VF network device ... 2742 * VF network device ...
2743 */ 2743 */
2744 for_each_port(adapter, pidx) { 2744 for_each_port(adapter, pidx) {
diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c
index e0b3d1bc2fd..bb65121f581 100644
--- a/drivers/net/cxgb4vf/sge.c
+++ b/drivers/net/cxgb4vf/sge.c
@@ -224,8 +224,8 @@ static inline bool is_buf_mapped(const struct rx_sw_desc *sdesc)
224/** 224/**
225 * need_skb_unmap - does the platform need unmapping of sk_buffs? 225 * need_skb_unmap - does the platform need unmapping of sk_buffs?
226 * 226 *
227 * Returns true if the platfrom needs sk_buff unmapping. The compiler 227 * Returns true if the platform needs sk_buff unmapping. The compiler
228 * optimizes away unecessary code if this returns true. 228 * optimizes away unnecessary code if this returns true.
229 */ 229 */
230static inline int need_skb_unmap(void) 230static inline int need_skb_unmap(void)
231{ 231{
@@ -267,7 +267,7 @@ static inline unsigned int fl_cap(const struct sge_fl *fl)
267 * 267 *
268 * Tests specified Free List to see whether the number of buffers 268 * Tests specified Free List to see whether the number of buffers
269 * available to the hardware has falled below our "starvation" 269 * available to the hardware has falled below our "starvation"
270 * threshhold. 270 * threshold.
271 */ 271 */
272static inline bool fl_starving(const struct sge_fl *fl) 272static inline bool fl_starving(const struct sge_fl *fl)
273{ 273{
@@ -1149,7 +1149,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1149 if (unlikely(credits < ETHTXQ_STOP_THRES)) { 1149 if (unlikely(credits < ETHTXQ_STOP_THRES)) {
1150 /* 1150 /*
1151 * After we're done injecting the Work Request for this 1151 * After we're done injecting the Work Request for this
1152 * packet, we'll be below our "stop threshhold" so stop the TX 1152 * packet, we'll be below our "stop threshold" so stop the TX
1153 * Queue now and schedule a request for an SGE Egress Queue 1153 * Queue now and schedule a request for an SGE Egress Queue
1154 * Update message. The queue will get started later on when 1154 * Update message. The queue will get started later on when
1155 * the firmware processes this Work Request and sends us an 1155 * the firmware processes this Work Request and sends us an
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index baca6bfcb08..807b6bb200e 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -94,14 +94,14 @@ MODULE_VERSION(EMAC_MODULE_VERSION);
94static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1"; 94static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
95 95
96/* Configuration items */ 96/* Configuration items */
97#define EMAC_DEF_PASS_CRC (0) /* Do not pass CRC upto frames */ 97#define EMAC_DEF_PASS_CRC (0) /* Do not pass CRC up to frames */
98#define EMAC_DEF_QOS_EN (0) /* EMAC proprietary QoS disabled */ 98#define EMAC_DEF_QOS_EN (0) /* EMAC proprietary QoS disabled */
99#define EMAC_DEF_NO_BUFF_CHAIN (0) /* No buffer chain */ 99#define EMAC_DEF_NO_BUFF_CHAIN (0) /* No buffer chain */
100#define EMAC_DEF_MACCTRL_FRAME_EN (0) /* Discard Maccontrol frames */ 100#define EMAC_DEF_MACCTRL_FRAME_EN (0) /* Discard Maccontrol frames */
101#define EMAC_DEF_SHORT_FRAME_EN (0) /* Discard short frames */ 101#define EMAC_DEF_SHORT_FRAME_EN (0) /* Discard short frames */
102#define EMAC_DEF_ERROR_FRAME_EN (0) /* Discard error frames */ 102#define EMAC_DEF_ERROR_FRAME_EN (0) /* Discard error frames */
103#define EMAC_DEF_PROM_EN (0) /* Promiscous disabled */ 103#define EMAC_DEF_PROM_EN (0) /* Promiscuous disabled */
104#define EMAC_DEF_PROM_CH (0) /* Promiscous channel is 0 */ 104#define EMAC_DEF_PROM_CH (0) /* Promiscuous channel is 0 */
105#define EMAC_DEF_BCAST_EN (1) /* Broadcast enabled */ 105#define EMAC_DEF_BCAST_EN (1) /* Broadcast enabled */
106#define EMAC_DEF_BCAST_CH (0) /* Broadcast channel is 0 */ 106#define EMAC_DEF_BCAST_CH (0) /* Broadcast channel is 0 */
107#define EMAC_DEF_MCAST_EN (1) /* Multicast enabled */ 107#define EMAC_DEF_MCAST_EN (1) /* Multicast enabled */
@@ -1013,7 +1013,7 @@ static void emac_rx_handler(void *token, int len, int status)
1013 return; 1013 return;
1014 } 1014 }
1015 1015
1016 /* recycle on recieve error */ 1016 /* recycle on receive error */
1017 if (status < 0) { 1017 if (status < 0) {
1018 ndev->stats.rx_errors++; 1018 ndev->stats.rx_errors++;
1019 goto recycle; 1019 goto recycle;
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index f4d0922ec65..dd70738eb2f 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -160,7 +160,7 @@ static int e1000_get_settings(struct net_device *netdev,
160 &adapter->link_duplex); 160 &adapter->link_duplex);
161 ecmd->speed = adapter->link_speed; 161 ecmd->speed = adapter->link_speed;
162 162
163 /* unfortunatly FULL_DUPLEX != DUPLEX_FULL 163 /* unfortunately FULL_DUPLEX != DUPLEX_FULL
164 * and HALF_DUPLEX != DUPLEX_HALF */ 164 * and HALF_DUPLEX != DUPLEX_HALF */
165 165
166 if (adapter->link_duplex == FULL_DUPLEX) 166 if (adapter->link_duplex == FULL_DUPLEX)
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index c70b23d5228..5c9a8403668 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1026,7 +1026,7 @@ extern void __iomem *ce4100_gbe_mdio_base_virt;
1026 1026
1027#define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */ 1027#define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */
1028#define E1000_MDPHYA 0x0003C /* PHY address - RW */ 1028#define E1000_MDPHYA 0x0003C /* PHY address - RW */
1029#define E1000_MANC2H 0x05860 /* Managment Control To Host - RW */ 1029#define E1000_MANC2H 0x05860 /* Management Control To Host - RW */
1030#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ 1030#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */
1031 1031
1032#define E1000_GCR 0x05B00 /* PCI-Ex Control */ 1032#define E1000_GCR 0x05B00 /* PCI-Ex Control */
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index bfab14092d2..477e066a1cf 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -205,7 +205,7 @@ static struct pci_driver e1000_driver = {
205 .probe = e1000_probe, 205 .probe = e1000_probe,
206 .remove = __devexit_p(e1000_remove), 206 .remove = __devexit_p(e1000_remove),
207#ifdef CONFIG_PM 207#ifdef CONFIG_PM
208 /* Power Managment Hooks */ 208 /* Power Management Hooks */
209 .suspend = e1000_suspend, 209 .suspend = e1000_suspend,
210 .resume = e1000_resume, 210 .resume = e1000_resume,
211#endif 211#endif
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index a39d4a4d871..506a0a0043b 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4886,7 +4886,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
4886 if (skb->protocol == htons(ETH_P_IP)) 4886 if (skb->protocol == htons(ETH_P_IP))
4887 tx_flags |= E1000_TX_FLAGS_IPV4; 4887 tx_flags |= E1000_TX_FLAGS_IPV4;
4888 4888
4889 /* if count is 0 then mapping error has occured */ 4889 /* if count is 0 then mapping error has occurred */
4890 count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss); 4890 count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss);
4891 if (count) { 4891 if (count) {
4892 e1000_tx_queue(adapter, tx_flags, count); 4892 e1000_tx_queue(adapter, tx_flags, count);
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index f75d3144b8a..53c0f04b1b2 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -3040,11 +3040,14 @@ static void ehea_rereg_mrs(void)
3040 3040
3041 if (dev->flags & IFF_UP) { 3041 if (dev->flags & IFF_UP) {
3042 mutex_lock(&port->port_lock); 3042 mutex_lock(&port->port_lock);
3043 port_napi_enable(port);
3044 ret = ehea_restart_qps(dev); 3043 ret = ehea_restart_qps(dev);
3045 check_sqs(port); 3044 if (!ret) {
3046 if (!ret) 3045 check_sqs(port);
3046 port_napi_enable(port);
3047 netif_wake_queue(dev); 3047 netif_wake_queue(dev);
3048 } else {
3049 netdev_err(dev, "Unable to restart QPS\n");
3050 }
3048 mutex_unlock(&port->port_lock); 3051 mutex_unlock(&port->port_lock);
3049 } 3052 }
3050 } 3053 }
diff --git a/drivers/net/enc28j60_hw.h b/drivers/net/enc28j60_hw.h
index 1a0b20969f8..25b41de49f0 100644
--- a/drivers/net/enc28j60_hw.h
+++ b/drivers/net/enc28j60_hw.h
@@ -303,7 +303,7 @@
303/* maximum ethernet frame length */ 303/* maximum ethernet frame length */
304#define MAX_FRAMELEN 1518 304#define MAX_FRAMELEN 1518
305 305
306/* Prefered half duplex: LEDA: Link status LEDB: Rx/Tx activity */ 306/* Preferred half duplex: LEDA: Link status LEDB: Rx/Tx activity */
307#define ENC28J60_LAMPS_MODE 0x3476 307#define ENC28J60_LAMPS_MODE 0x3476
308 308
309#endif 309#endif
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c
index fb717be511f..12d28e9d0cb 100644
--- a/drivers/net/eth16i.c
+++ b/drivers/net/eth16i.c
@@ -13,7 +13,7 @@
13 This driver supports following cards : 13 This driver supports following cards :
14 - ICL EtherTeam 16i 14 - ICL EtherTeam 16i
15 - ICL EtherTeam 32 EISA 15 - ICL EtherTeam 32 EISA
16 (Uses true 32 bit transfers rather than 16i compability mode) 16 (Uses true 32 bit transfers rather than 16i compatibility mode)
17 17
18 Example Module usage: 18 Example Module usage:
19 insmod eth16i.o io=0x2a0 mediatype=bnc 19 insmod eth16i.o io=0x2a0 mediatype=bnc
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index db0290f05bd..a83dd312c3a 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -542,7 +542,7 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id)
542 542
543 /* Figure out what triggered the interrupt... 543 /* Figure out what triggered the interrupt...
544 * The tricky bit here is that the interrupt source bits get 544 * The tricky bit here is that the interrupt source bits get
545 * set in INT_SOURCE for an event irregardless of whether that 545 * set in INT_SOURCE for an event regardless of whether that
546 * event is masked or not. Thus, in order to figure out what 546 * event is masked or not. Thus, in order to figure out what
547 * triggered the interrupt, we need to remove the sources 547 * triggered the interrupt, we need to remove the sources
548 * for all events that are currently masked. This behaviour 548 * for all events that are currently masked. This behaviour
diff --git a/drivers/net/fec.h b/drivers/net/fec.h
index ace318df4c8..8b2c6d797e6 100644
--- a/drivers/net/fec.h
+++ b/drivers/net/fec.h
@@ -97,11 +97,11 @@ struct bufdesc {
97 * The following definitions courtesy of commproc.h, which where 97 * The following definitions courtesy of commproc.h, which where
98 * Copyright (c) 1997 Dan Malek (dmalek@jlc.net). 98 * Copyright (c) 1997 Dan Malek (dmalek@jlc.net).
99 */ 99 */
100#define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */ 100#define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */
101#define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */ 101#define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */
102#define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */ 102#define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
103#define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ 103#define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */
104#define BD_SC_CM ((ushort)0x0200) /* Continous mode */ 104#define BD_SC_CM ((ushort)0x0200) /* Continuous mode */
105#define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */ 105#define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */
106#define BD_SC_P ((ushort)0x0100) /* xmt preamble */ 106#define BD_SC_P ((ushort)0x0100) /* xmt preamble */
107#define BD_SC_BR ((ushort)0x0020) /* Break received */ 107#define BD_SC_BR ((ushort)0x0020) /* Break received */
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 7b92897ca66..d5ab4dad505 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -440,7 +440,7 @@ union ring_type {
440#define NV_RX3_VLAN_TAG_PRESENT (1<<16) 440#define NV_RX3_VLAN_TAG_PRESENT (1<<16)
441#define NV_RX3_VLAN_TAG_MASK (0x0000FFFF) 441#define NV_RX3_VLAN_TAG_MASK (0x0000FFFF)
442 442
443/* Miscelaneous hardware related defines: */ 443/* Miscellaneous hardware related defines: */
444#define NV_PCI_REGSZ_VER1 0x270 444#define NV_PCI_REGSZ_VER1 0x270
445#define NV_PCI_REGSZ_VER2 0x2d4 445#define NV_PCI_REGSZ_VER2 0x2d4
446#define NV_PCI_REGSZ_VER3 0x604 446#define NV_PCI_REGSZ_VER3 0x604
@@ -1488,7 +1488,7 @@ static int phy_init(struct net_device *dev)
1488 } 1488 }
1489 } 1489 }
1490 1490
1491 /* some phys clear out pause advertisment on reset, set it back */ 1491 /* some phys clear out pause advertisement on reset, set it back */
1492 mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg); 1492 mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg);
1493 1493
1494 /* restart auto negotiation, power down phy */ 1494 /* restart auto negotiation, power down phy */
@@ -2535,7 +2535,7 @@ static void nv_tx_timeout(struct net_device *dev)
2535 else 2535 else
2536 nv_tx_done_optimized(dev, np->tx_ring_size); 2536 nv_tx_done_optimized(dev, np->tx_ring_size);
2537 2537
2538 /* save current HW postion */ 2538 /* save current HW position */
2539 if (np->tx_change_owner) 2539 if (np->tx_change_owner)
2540 put_tx.ex = np->tx_change_owner->first_tx_desc; 2540 put_tx.ex = np->tx_change_owner->first_tx_desc;
2541 else 2541 else
@@ -4053,7 +4053,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
4053 4053
4054 } else if (ecmd->autoneg == AUTONEG_DISABLE) { 4054 } else if (ecmd->autoneg == AUTONEG_DISABLE) {
4055 /* Note: autonegotiation disable, speed 1000 intentionally 4055 /* Note: autonegotiation disable, speed 1000 intentionally
4056 * forbidden - noone should need that. */ 4056 * forbidden - no one should need that. */
4057 4057
4058 if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100) 4058 if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100)
4059 return -EINVAL; 4059 return -EINVAL;
@@ -4103,7 +4103,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
4103 adv |= ADVERTISE_100HALF; 4103 adv |= ADVERTISE_100HALF;
4104 if (ecmd->advertising & ADVERTISED_100baseT_Full) 4104 if (ecmd->advertising & ADVERTISED_100baseT_Full)
4105 adv |= ADVERTISE_100FULL; 4105 adv |= ADVERTISE_100FULL;
4106 if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */ 4106 if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisements but disable tx pause */
4107 adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; 4107 adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
4108 if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) 4108 if (np->pause_flags & NV_PAUSEFRAME_TX_REQ)
4109 adv |= ADVERTISE_PAUSE_ASYM; 4109 adv |= ADVERTISE_PAUSE_ASYM;
@@ -4148,7 +4148,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
4148 if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL) 4148 if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL)
4149 adv |= ADVERTISE_100FULL; 4149 adv |= ADVERTISE_100FULL;
4150 np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE); 4150 np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE);
4151 if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisments but disable tx pause */ 4151 if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisements but disable tx pause */
4152 adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; 4152 adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
4153 np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE; 4153 np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE;
4154 } 4154 }
@@ -4449,7 +4449,7 @@ static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam*
4449 4449
4450 adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); 4450 adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ);
4451 adv &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); 4451 adv &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
4452 if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */ 4452 if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisements but disable tx pause */
4453 adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; 4453 adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
4454 if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) 4454 if (np->pause_flags & NV_PAUSEFRAME_TX_REQ)
4455 adv |= ADVERTISE_PAUSE_ASYM; 4455 adv |= ADVERTISE_PAUSE_ASYM;
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index 61035fc5599..b9fbc83d64a 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -226,8 +226,8 @@ static void set_multicast_finish(struct net_device *dev)
226 } 226 }
227 227
228 FC(fecp, r_cntrl, FEC_RCNTRL_PROM); 228 FC(fecp, r_cntrl, FEC_RCNTRL_PROM);
229 FW(fecp, hash_table_high, fep->fec.hthi); 229 FW(fecp, grp_hash_table_high, fep->fec.hthi);
230 FW(fecp, hash_table_low, fep->fec.htlo); 230 FW(fecp, grp_hash_table_low, fep->fec.htlo);
231} 231}
232 232
233static void set_multicast_list(struct net_device *dev) 233static void set_multicast_list(struct net_device *dev)
@@ -273,8 +273,8 @@ static void restart(struct net_device *dev)
273 /* 273 /*
274 * Reset all multicast. 274 * Reset all multicast.
275 */ 275 */
276 FW(fecp, hash_table_high, fep->fec.hthi); 276 FW(fecp, grp_hash_table_high, fep->fec.hthi);
277 FW(fecp, hash_table_low, fep->fec.htlo); 277 FW(fecp, grp_hash_table_low, fep->fec.htlo);
278 278
279 /* 279 /*
280 * Set maximum receive buffer size. 280 * Set maximum receive buffer size.
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index a31661948c4..9bd7746cbfc 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
139 * that hardware reset completed (what the f*ck). 139 * that hardware reset completed (what the f*ck).
140 * We still need to wait for a while. 140 * We still need to wait for a while.
141 */ 141 */
142 usleep_range(500, 1000); 142 udelay(500);
143 return 0; 143 return 0;
144 } 144 }
145 145
146 usleep_range(1000, 10000); 146 udelay(1000);
147 } 147 }
148 148
149 netdev_err(netdev, "software reset failed\n"); 149 netdev_err(netdev, "software reset failed\n");
@@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg)
772 if ((phycr & FTMAC100_PHYCR_MIIRD) == 0) 772 if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
773 return phycr & FTMAC100_PHYCR_MIIRDATA; 773 return phycr & FTMAC100_PHYCR_MIIRDATA;
774 774
775 usleep_range(100, 1000); 775 udelay(100);
776 } 776 }
777 777
778 netdev_err(netdev, "mdio read timed out\n"); 778 netdev_err(netdev, "mdio read timed out\n");
@@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg,
801 if ((phycr & FTMAC100_PHYCR_MIIWR) == 0) 801 if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
802 return; 802 return;
803 803
804 usleep_range(100, 1000); 804 udelay(100);
805 } 805 }
806 806
807 netdev_err(netdev, "mdio write timed out\n"); 807 netdev_err(netdev, "mdio write timed out\n");
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index ec5d595ce2e..b2fe7edefad 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -1043,7 +1043,7 @@ enum gfar_errata {
1043}; 1043};
1044 1044
1045/* Struct stolen almost completely (and shamelessly) from the FCC enet source 1045/* Struct stolen almost completely (and shamelessly) from the FCC enet source
1046 * (Ok, that's not so true anymore, but there is a family resemblence) 1046 * (Ok, that's not so true anymore, but there is a family resemblance)
1047 * The GFAR buffer descriptors track the ring buffers. The rx_bd_base 1047 * The GFAR buffer descriptors track the ring buffers. The rx_bd_base
1048 * and tx_bd_base always point to the currently available buffer. 1048 * and tx_bd_base always point to the currently available buffer.
1049 * The dirty_tx tracks the current buffer that is being sent by the 1049 * The dirty_tx tracks the current buffer that is being sent by the
diff --git a/drivers/net/hamradio/Makefile b/drivers/net/hamradio/Makefile
index 9def86704a9..10409607002 100644
--- a/drivers/net/hamradio/Makefile
+++ b/drivers/net/hamradio/Makefile
@@ -3,7 +3,7 @@
3# 3#
4# 4#
5# 19971130 Moved the amateur radio related network drivers from 5# 19971130 Moved the amateur radio related network drivers from
6# drivers/net/ to drivers/hamradio for easier maintainance. 6# drivers/net/ to drivers/hamradio for easier maintenance.
7# Joerg Reuter DL1BKE <jreuter@yaina.de> 7# Joerg Reuter DL1BKE <jreuter@yaina.de>
8# 8#
9# 20000806 Rewritten to use lists instead of if-statements. 9# 20000806 Rewritten to use lists instead of if-statements.
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 7d9ced0738c..96a98d2ff15 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -30,7 +30,7 @@
30 * 0.1 F1OAT 07.06.98 Add timer polling routine for channel arbitration 30 * 0.1 F1OAT 07.06.98 Add timer polling routine for channel arbitration
31 * 0.2 F6FBB 08.06.98 Added delay after FPGA programming 31 * 0.2 F6FBB 08.06.98 Added delay after FPGA programming
32 * 0.3 F6FBB 29.07.98 Delayed PTT implementation for dupmode=2 32 * 0.3 F6FBB 29.07.98 Delayed PTT implementation for dupmode=2
33 * 0.4 F6FBB 30.07.98 Added TxTail, Slottime and Persistance 33 * 0.4 F6FBB 30.07.98 Added TxTail, Slottime and Persistence
34 * 0.5 F6FBB 01.08.98 Shared IRQs, /proc/net and network statistics 34 * 0.5 F6FBB 01.08.98 Shared IRQs, /proc/net and network statistics
35 * 0.6 F6FBB 25.08.98 Added 1200Bds format 35 * 0.6 F6FBB 25.08.98 Added 1200Bds format
36 * 0.7 F6FBB 12.09.98 Added to the kernel configuration 36 * 0.7 F6FBB 12.09.98 Added to the kernel configuration
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index 8e2c4601b5f..8e10d2f6a5a 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -180,8 +180,8 @@ struct hp100_private {
180 180
181 u_int *page_vaddr_algn; /* Aligned virtual address of allocated page */ 181 u_int *page_vaddr_algn; /* Aligned virtual address of allocated page */
182 u_long whatever_offset; /* Offset to bus/phys/dma address */ 182 u_long whatever_offset; /* Offset to bus/phys/dma address */
183 int rxrcommit; /* # Rx PDLs commited to adapter */ 183 int rxrcommit; /* # Rx PDLs committed to adapter */
184 int txrcommit; /* # Tx PDLs commited to adapter */ 184 int txrcommit; /* # Tx PDLs committed to adapter */
185}; 185};
186 186
187/* 187/*
@@ -716,7 +716,7 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr,
716 * implemented/tested only with the lassen chip anyway... */ 716 * implemented/tested only with the lassen chip anyway... */
717 if (lp->mode == 1) { /* busmaster */ 717 if (lp->mode == 1) { /* busmaster */
718 dma_addr_t page_baddr; 718 dma_addr_t page_baddr;
719 /* Get physically continous memory for TX & RX PDLs */ 719 /* Get physically continuous memory for TX & RX PDLs */
720 /* Conversion to new PCI API : 720 /* Conversion to new PCI API :
721 * Pages are always aligned and zeroed, no need to it ourself. 721 * Pages are always aligned and zeroed, no need to it ourself.
722 * Doc says should be OK for EISA bus as well - Jean II */ 722 * Doc says should be OK for EISA bus as well - Jean II */
@@ -1596,7 +1596,7 @@ drop:
1596 1596
1597/* clean_txring checks if packets have been sent by the card by reading 1597/* clean_txring checks if packets have been sent by the card by reading
1598 * the TX_PDL register from the performance page and comparing it to the 1598 * the TX_PDL register from the performance page and comparing it to the
1599 * number of commited packets. It then frees the skb's of the packets that 1599 * number of committed packets. It then frees the skb's of the packets that
1600 * obviously have been sent to the network. 1600 * obviously have been sent to the network.
1601 * 1601 *
1602 * Needs the PERFORMANCE page selected. 1602 * Needs the PERFORMANCE page selected.
@@ -1617,7 +1617,7 @@ static void hp100_clean_txring(struct net_device *dev)
1617 1617
1618#ifdef HP100_DEBUG 1618#ifdef HP100_DEBUG
1619 if (donecount > MAX_TX_PDL) 1619 if (donecount > MAX_TX_PDL)
1620 printk("hp100: %s: Warning: More PDLs transmitted than commited to card???\n", dev->name); 1620 printk("hp100: %s: Warning: More PDLs transmitted than committed to card???\n", dev->name);
1621#endif 1621#endif
1622 1622
1623 for (; 0 != donecount; donecount--) { 1623 for (; 0 != donecount; donecount--) {
@@ -1765,7 +1765,7 @@ drop:
1765 * Receive Function (Non-Busmaster mode) 1765 * Receive Function (Non-Busmaster mode)
1766 * Called when an "Receive Packet" interrupt occurs, i.e. the receive 1766 * Called when an "Receive Packet" interrupt occurs, i.e. the receive
1767 * packet counter is non-zero. 1767 * packet counter is non-zero.
1768 * For non-busmaster, this function does the whole work of transfering 1768 * For non-busmaster, this function does the whole work of transferring
1769 * the packet to the host memory and then up to higher layers via skb 1769 * the packet to the host memory and then up to higher layers via skb
1770 * and netif_rx. 1770 * and netif_rx.
1771 */ 1771 */
@@ -1892,7 +1892,7 @@ static void hp100_rx_bm(struct net_device *dev)
1892 /* RX_PKT_CNT states how many PDLs are currently formatted and available to 1892 /* RX_PKT_CNT states how many PDLs are currently formatted and available to
1893 * the cards BM engine */ 1893 * the cards BM engine */
1894 if ((hp100_inw(RX_PKT_CNT) & 0x00ff) >= lp->rxrcommit) { 1894 if ((hp100_inw(RX_PKT_CNT) & 0x00ff) >= lp->rxrcommit) {
1895 printk("hp100: %s: More packets received than commited? RX_PKT_CNT=0x%x, commit=0x%x\n", 1895 printk("hp100: %s: More packets received than committed? RX_PKT_CNT=0x%x, commit=0x%x\n",
1896 dev->name, hp100_inw(RX_PKT_CNT) & 0x00ff, 1896 dev->name, hp100_inw(RX_PKT_CNT) & 0x00ff,
1897 lp->rxrcommit); 1897 lp->rxrcommit);
1898 return; 1898 return;
@@ -2256,7 +2256,7 @@ static irqreturn_t hp100_interrupt(int irq, void *dev_id)
2256 if (lp->mode != 1) /* non busmaster */ 2256 if (lp->mode != 1) /* non busmaster */
2257 hp100_rx(dev); 2257 hp100_rx(dev);
2258 else if (!(val & HP100_RX_PDL_FILL_COMPL)) { 2258 else if (!(val & HP100_RX_PDL_FILL_COMPL)) {
2259 /* Shouldnt happen - maybe we missed a RX_PDL_FILL Interrupt? */ 2259 /* Shouldn't happen - maybe we missed a RX_PDL_FILL Interrupt? */
2260 hp100_rx_bm(dev); 2260 hp100_rx_bm(dev);
2261 } 2261 }
2262 } 2262 }
diff --git a/drivers/net/hp100.h b/drivers/net/hp100.h
index e6ca128a556..b60e96fe38b 100644
--- a/drivers/net/hp100.h
+++ b/drivers/net/hp100.h
@@ -109,7 +109,7 @@
109#define HP100_REG_MAC_CFG_2 0x0d /* RW: (8) Misc MAC functions */ 109#define HP100_REG_MAC_CFG_2 0x0d /* RW: (8) Misc MAC functions */
110#define HP100_REG_MAC_CFG_3 0x0e /* RW: (8) Misc MAC functions */ 110#define HP100_REG_MAC_CFG_3 0x0e /* RW: (8) Misc MAC functions */
111#define HP100_REG_MAC_CFG_4 0x0f /* R: (8) Misc MAC states */ 111#define HP100_REG_MAC_CFG_4 0x0f /* R: (8) Misc MAC states */
112#define HP100_REG_DROPPED 0x10 /* R: (16),11:0 Pkts cant fit in mem */ 112#define HP100_REG_DROPPED 0x10 /* R: (16),11:0 Pkts can't fit in mem */
113#define HP100_REG_CRC 0x12 /* R: (8) Pkts with CRC */ 113#define HP100_REG_CRC 0x12 /* R: (8) Pkts with CRC */
114#define HP100_REG_ABORT 0x13 /* R: (8) Aborted Tx pkts */ 114#define HP100_REG_ABORT 0x13 /* R: (8) Aborted Tx pkts */
115#define HP100_REG_TRAIN_REQUEST 0x14 /* RW: (16) Endnode MAC register. */ 115#define HP100_REG_TRAIN_REQUEST 0x14 /* RW: (16) Endnode MAC register. */
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c
index 8ead6a96aba..5f51bf7c9dc 100644
--- a/drivers/net/ibm_newemac/tah.c
+++ b/drivers/net/ibm_newemac/tah.c
@@ -60,7 +60,7 @@ void tah_reset(struct platform_device *ofdev)
60 printk(KERN_ERR "%s: reset timeout\n", 60 printk(KERN_ERR "%s: reset timeout\n",
61 ofdev->dev.of_node->full_name); 61 ofdev->dev.of_node->full_name);
62 62
63 /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ 63 /* 10KB TAH TX FIFO accommodates the max MTU of 9000 */
64 out_be32(&p->mr, 64 out_be32(&p->mr,
65 TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP | 65 TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP |
66 TAH_MR_DIG); 66 TAH_MR_DIG);
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
index 94d9969ec0b..8ff68ae6b52 100644
--- a/drivers/net/ibmlana.c
+++ b/drivers/net/ibmlana.c
@@ -53,7 +53,7 @@ History:
53 still work with 2.0.x.... 53 still work with 2.0.x....
54 Jan 28th, 2000 54 Jan 28th, 2000
55 in Linux 2.2.13, the version.h file mysteriously didn't get 55 in Linux 2.2.13, the version.h file mysteriously didn't get
56 included. Added a workaround for this. Futhermore, it now 56 included. Added a workaround for this. Furthermore, it now
57 not only compiles as a modules ;-) 57 not only compiles as a modules ;-)
58 Jan 30th, 2000 58 Jan 30th, 2000
59 newer kernels automatically probe more than one board, so the 59 newer kernels automatically probe more than one board, so the
@@ -481,7 +481,7 @@ static void InitBoard(struct net_device *dev)
481 if ((dev->flags & IFF_ALLMULTI) || netdev_mc_count(dev) > camcnt) 481 if ((dev->flags & IFF_ALLMULTI) || netdev_mc_count(dev) > camcnt)
482 rcrval |= RCREG_AMC; 482 rcrval |= RCREG_AMC;
483 483
484 /* promiscous mode ? */ 484 /* promiscuous mode ? */
485 485
486 if (dev->flags & IFF_PROMISC) 486 if (dev->flags & IFF_PROMISC)
487 rcrval |= RCREG_PRO; 487 rcrval |= RCREG_PRO;
diff --git a/drivers/net/ibmlana.h b/drivers/net/ibmlana.h
index aa3ddbdee4b..accd5efc9c8 100644
--- a/drivers/net/ibmlana.h
+++ b/drivers/net/ibmlana.h
@@ -90,7 +90,7 @@ typedef struct {
90#define RCREG_ERR 0x8000 /* accept damaged and collided pkts */ 90#define RCREG_ERR 0x8000 /* accept damaged and collided pkts */
91#define RCREG_RNT 0x4000 /* accept packets that are < 64 */ 91#define RCREG_RNT 0x4000 /* accept packets that are < 64 */
92#define RCREG_BRD 0x2000 /* accept broadcasts */ 92#define RCREG_BRD 0x2000 /* accept broadcasts */
93#define RCREG_PRO 0x1000 /* promiscous mode */ 93#define RCREG_PRO 0x1000 /* promiscuous mode */
94#define RCREG_AMC 0x0800 /* accept all multicasts */ 94#define RCREG_AMC 0x0800 /* accept all multicasts */
95#define RCREG_LB_NONE 0x0000 /* no loopback */ 95#define RCREG_LB_NONE 0x0000 /* no loopback */
96#define RCREG_LB_MAC 0x0200 /* MAC loopback */ 96#define RCREG_LB_MAC 0x0200 /* MAC loopback */
diff --git a/drivers/net/igb/e1000_mac.c b/drivers/net/igb/e1000_mac.c
index 90c5e01e923..ce8255fc3c5 100644
--- a/drivers/net/igb/e1000_mac.c
+++ b/drivers/net/igb/e1000_mac.c
@@ -181,7 +181,7 @@ s32 igb_vfta_set(struct e1000_hw *hw, u32 vid, bool add)
181 * address and must override the actual permanent MAC address. If an 181 * address and must override the actual permanent MAC address. If an
182 * alternate MAC address is fopund it is saved in the hw struct and 182 * alternate MAC address is fopund it is saved in the hw struct and
183 * prgrammed into RAR0 and the cuntion returns success, otherwise the 183 * prgrammed into RAR0 and the cuntion returns success, otherwise the
184 * fucntion returns an error. 184 * function returns an error.
185 **/ 185 **/
186s32 igb_check_alt_mac_addr(struct e1000_hw *hw) 186s32 igb_check_alt_mac_addr(struct e1000_hw *hw)
187{ 187{
@@ -982,7 +982,7 @@ out:
982} 982}
983 983
984/** 984/**
985 * igb_get_speed_and_duplex_copper - Retreive current speed/duplex 985 * igb_get_speed_and_duplex_copper - Retrieve current speed/duplex
986 * @hw: pointer to the HW structure 986 * @hw: pointer to the HW structure
987 * @speed: stores the current speed 987 * @speed: stores the current speed
988 * @duplex: stores the current duplex 988 * @duplex: stores the current duplex
diff --git a/drivers/net/igb/e1000_phy.c b/drivers/net/igb/e1000_phy.c
index 6694bf3e5ad..d639706eb3f 100644
--- a/drivers/net/igb/e1000_phy.c
+++ b/drivers/net/igb/e1000_phy.c
@@ -1421,7 +1421,7 @@ out:
1421} 1421}
1422 1422
1423/** 1423/**
1424 * igb_check_downshift - Checks whether a downshift in speed occured 1424 * igb_check_downshift - Checks whether a downshift in speed occurred
1425 * @hw: pointer to the HW structure 1425 * @hw: pointer to the HW structure
1426 * 1426 *
1427 * Success returns 0, Failure returns 1 1427 * Success returns 0, Failure returns 1
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 3d850af0cdd..0dfd1b93829 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -200,7 +200,7 @@ static struct pci_driver igb_driver = {
200 .probe = igb_probe, 200 .probe = igb_probe,
201 .remove = __devexit_p(igb_remove), 201 .remove = __devexit_p(igb_remove),
202#ifdef CONFIG_PM 202#ifdef CONFIG_PM
203 /* Power Managment Hooks */ 203 /* Power Management Hooks */
204 .suspend = igb_suspend, 204 .suspend = igb_suspend,
205 .resume = igb_resume, 205 .resume = igb_resume,
206#endif 206#endif
@@ -2292,7 +2292,7 @@ static void igb_init_hw_timer(struct igb_adapter *adapter)
2292 /** 2292 /**
2293 * Scale the NIC clock cycle by a large factor so that 2293 * Scale the NIC clock cycle by a large factor so that
2294 * relatively small clock corrections can be added or 2294 * relatively small clock corrections can be added or
2295 * substracted at each clock tick. The drawbacks of a large 2295 * subtracted at each clock tick. The drawbacks of a large
2296 * factor are a) that the clock register overflows more quickly 2296 * factor are a) that the clock register overflows more quickly
2297 * (not such a big deal) and b) that the increment per tick has 2297 * (not such a big deal) and b) that the increment per tick has
2298 * to fit into 24 bits. As a result we need to use a shift of 2298 * to fit into 24 bits. As a result we need to use a shift of
@@ -3409,7 +3409,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
3409 } else { 3409 } else {
3410 /* 3410 /*
3411 * Write addresses to the MTA, if the attempt fails 3411 * Write addresses to the MTA, if the attempt fails
3412 * then we should just turn on promiscous mode so 3412 * then we should just turn on promiscuous mode so
3413 * that we can at least receive multicast traffic 3413 * that we can at least receive multicast traffic
3414 */ 3414 */
3415 count = igb_write_mc_addr_list(netdev); 3415 count = igb_write_mc_addr_list(netdev);
@@ -3423,7 +3423,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
3423 /* 3423 /*
3424 * Write addresses to available RAR registers, if there is not 3424 * Write addresses to available RAR registers, if there is not
3425 * sufficient space to store all the addresses then enable 3425 * sufficient space to store all the addresses then enable
3426 * unicast promiscous mode 3426 * unicast promiscuous mode
3427 */ 3427 */
3428 count = igb_write_uc_addr_list(netdev); 3428 count = igb_write_uc_addr_list(netdev);
3429 if (count < 0) { 3429 if (count < 0) {
@@ -4317,7 +4317,7 @@ netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb,
4317 4317
4318 /* 4318 /*
4319 * count reflects descriptors mapped, if 0 or less then mapping error 4319 * count reflects descriptors mapped, if 0 or less then mapping error
4320 * has occured and we need to rewind the descriptor queue 4320 * has occurred and we need to rewind the descriptor queue
4321 */ 4321 */
4322 count = igb_tx_map_adv(tx_ring, skb, first); 4322 count = igb_tx_map_adv(tx_ring, skb, first);
4323 if (!count) { 4323 if (!count) {
@@ -5352,8 +5352,8 @@ static void igb_msg_task(struct igb_adapter *adapter)
5352 * The unicast table address is a register array of 32-bit registers. 5352 * The unicast table address is a register array of 32-bit registers.
5353 * The table is meant to be used in a way similar to how the MTA is used 5353 * The table is meant to be used in a way similar to how the MTA is used
5354 * however due to certain limitations in the hardware it is necessary to 5354 * however due to certain limitations in the hardware it is necessary to
5355 * set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscous 5355 * set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscuous
5356 * enable bit to allow vlan tag stripping when promiscous mode is enabled 5356 * enable bit to allow vlan tag stripping when promiscuous mode is enabled
5357 **/ 5357 **/
5358static void igb_set_uta(struct igb_adapter *adapter) 5358static void igb_set_uta(struct igb_adapter *adapter)
5359{ 5359{
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 6ccc32fd733..1d04ca6fdae 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -2227,7 +2227,7 @@ static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
2227 2227
2228 /* 2228 /*
2229 * count reflects descriptors mapped, if 0 then mapping error 2229 * count reflects descriptors mapped, if 0 then mapping error
2230 * has occured and we need to rewind the descriptor queue 2230 * has occurred and we need to rewind the descriptor queue
2231 */ 2231 */
2232 count = igbvf_tx_map_adv(adapter, tx_ring, skb, first); 2232 count = igbvf_tx_map_adv(adapter, tx_ring, skb, first);
2233 2233
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index a5b0f0e194b..58cd3202b48 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -486,14 +486,14 @@ static int ipg_config_autoneg(struct net_device *dev)
486 phyctrl = ipg_r8(PHY_CTRL); 486 phyctrl = ipg_r8(PHY_CTRL);
487 mac_ctrl_val = ipg_r32(MAC_CTRL); 487 mac_ctrl_val = ipg_r32(MAC_CTRL);
488 488
489 /* Set flags for use in resolving auto-negotation, assuming 489 /* Set flags for use in resolving auto-negotiation, assuming
490 * non-1000Mbps, half duplex, no flow control. 490 * non-1000Mbps, half duplex, no flow control.
491 */ 491 */
492 fullduplex = 0; 492 fullduplex = 0;
493 txflowcontrol = 0; 493 txflowcontrol = 0;
494 rxflowcontrol = 0; 494 rxflowcontrol = 0;
495 495
496 /* To accomodate a problem in 10Mbps operation, 496 /* To accommodate a problem in 10Mbps operation,
497 * set a global flag if PHY running in 10Mbps mode. 497 * set a global flag if PHY running in 10Mbps mode.
498 */ 498 */
499 sp->tenmbpsmode = 0; 499 sp->tenmbpsmode = 0;
@@ -846,7 +846,7 @@ static void init_tfdlist(struct net_device *dev)
846} 846}
847 847
848/* 848/*
849 * Free all transmit buffers which have already been transfered 849 * Free all transmit buffers which have already been transferred
850 * via DMA to the IPG. 850 * via DMA to the IPG.
851 */ 851 */
852static void ipg_nic_txfree(struct net_device *dev) 852static void ipg_nic_txfree(struct net_device *dev)
@@ -920,7 +920,7 @@ static void ipg_tx_timeout(struct net_device *dev)
920 920
921/* 921/*
922 * For TxComplete interrupts, free all transmit 922 * For TxComplete interrupts, free all transmit
923 * buffers which have already been transfered via DMA 923 * buffers which have already been transferred via DMA
924 * to the IPG. 924 * to the IPG.
925 */ 925 */
926static void ipg_nic_txcleanup(struct net_device *dev) 926static void ipg_nic_txcleanup(struct net_device *dev)
@@ -1141,13 +1141,13 @@ static int ipg_nic_rx_check_error(struct net_device *dev)
1141 1141
1142 /* Increment detailed receive error statistics. */ 1142 /* Increment detailed receive error statistics. */
1143 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) { 1143 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) {
1144 IPG_DEBUG_MSG("RX FIFO overrun occured.\n"); 1144 IPG_DEBUG_MSG("RX FIFO overrun occurred.\n");
1145 1145
1146 sp->stats.rx_fifo_errors++; 1146 sp->stats.rx_fifo_errors++;
1147 } 1147 }
1148 1148
1149 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) { 1149 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) {
1150 IPG_DEBUG_MSG("RX runt occured.\n"); 1150 IPG_DEBUG_MSG("RX runt occurred.\n");
1151 sp->stats.rx_length_errors++; 1151 sp->stats.rx_length_errors++;
1152 } 1152 }
1153 1153
@@ -1156,7 +1156,7 @@ static int ipg_nic_rx_check_error(struct net_device *dev)
1156 */ 1156 */
1157 1157
1158 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) { 1158 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) {
1159 IPG_DEBUG_MSG("RX alignment error occured.\n"); 1159 IPG_DEBUG_MSG("RX alignment error occurred.\n");
1160 sp->stats.rx_frame_errors++; 1160 sp->stats.rx_frame_errors++;
1161 } 1161 }
1162 1162
@@ -1421,12 +1421,12 @@ static int ipg_nic_rx(struct net_device *dev)
1421 1421
1422 /* Increment detailed receive error statistics. */ 1422 /* Increment detailed receive error statistics. */
1423 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) { 1423 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) {
1424 IPG_DEBUG_MSG("RX FIFO overrun occured.\n"); 1424 IPG_DEBUG_MSG("RX FIFO overrun occurred.\n");
1425 sp->stats.rx_fifo_errors++; 1425 sp->stats.rx_fifo_errors++;
1426 } 1426 }
1427 1427
1428 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) { 1428 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) {
1429 IPG_DEBUG_MSG("RX runt occured.\n"); 1429 IPG_DEBUG_MSG("RX runt occurred.\n");
1430 sp->stats.rx_length_errors++; 1430 sp->stats.rx_length_errors++;
1431 } 1431 }
1432 1432
@@ -1436,7 +1436,7 @@ static int ipg_nic_rx(struct net_device *dev)
1436 */ 1436 */
1437 1437
1438 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) { 1438 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) {
1439 IPG_DEBUG_MSG("RX alignment error occured.\n"); 1439 IPG_DEBUG_MSG("RX alignment error occurred.\n");
1440 sp->stats.rx_frame_errors++; 1440 sp->stats.rx_frame_errors++;
1441 } 1441 }
1442 1442
@@ -1460,7 +1460,7 @@ static int ipg_nic_rx(struct net_device *dev)
1460 } 1460 }
1461 } else { 1461 } else {
1462 1462
1463 /* Adjust the new buffer length to accomodate the size 1463 /* Adjust the new buffer length to accommodate the size
1464 * of the received frame. 1464 * of the received frame.
1465 */ 1465 */
1466 skb_put(skb, framelen); 1466 skb_put(skb, framelen);
@@ -1488,7 +1488,7 @@ static int ipg_nic_rx(struct net_device *dev)
1488 } 1488 }
1489 1489
1490 /* 1490 /*
1491 * If there are more RFDs to proces and the allocated amount of RFD 1491 * If there are more RFDs to process and the allocated amount of RFD
1492 * processing time has expired, assert Interrupt Requested to make 1492 * processing time has expired, assert Interrupt Requested to make
1493 * sure we come back to process the remaining RFDs. 1493 * sure we come back to process the remaining RFDs.
1494 */ 1494 */
@@ -1886,7 +1886,7 @@ static netdev_tx_t ipg_nic_hard_start_xmit(struct sk_buff *skb,
1886 /* Request TxComplete interrupts at an interval defined 1886 /* Request TxComplete interrupts at an interval defined
1887 * by the constant IPG_FRAMESBETWEENTXCOMPLETES. 1887 * by the constant IPG_FRAMESBETWEENTXCOMPLETES.
1888 * Request TxComplete interrupt for every frame 1888 * Request TxComplete interrupt for every frame
1889 * if in 10Mbps mode to accomodate problem with 10Mbps 1889 * if in 10Mbps mode to accommodate problem with 10Mbps
1890 * processing. 1890 * processing.
1891 */ 1891 */
1892 if (sp->tenmbpsmode) 1892 if (sp->tenmbpsmode)
@@ -2098,7 +2098,7 @@ static int ipg_nic_change_mtu(struct net_device *dev, int new_mtu)
2098 struct ipg_nic_private *sp = netdev_priv(dev); 2098 struct ipg_nic_private *sp = netdev_priv(dev);
2099 int err; 2099 int err;
2100 2100
2101 /* Function to accomodate changes to Maximum Transfer Unit 2101 /* Function to accommodate changes to Maximum Transfer Unit
2102 * (or MTU) of IPG NIC. Cannot use default function since 2102 * (or MTU) of IPG NIC. Cannot use default function since
2103 * the default will not allow for MTU > 1500 bytes. 2103 * the default will not allow for MTU > 1500 bytes.
2104 */ 2104 */
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index 92631eb6f6a..872183f29ec 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -76,7 +76,7 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info);
76static int ali_ircc_init_43(ali_chip_t *chip, chipio_t *info); 76static int ali_ircc_init_43(ali_chip_t *chip, chipio_t *info);
77static int ali_ircc_init_53(ali_chip_t *chip, chipio_t *info); 77static int ali_ircc_init_53(ali_chip_t *chip, chipio_t *info);
78 78
79/* These are the currently known ALi sourth-bridge chipsets, the only one difference 79/* These are the currently known ALi south-bridge chipsets, the only one difference
80 * is that M1543C doesn't support HP HDSL-3600 80 * is that M1543C doesn't support HP HDSL-3600
81 */ 81 */
82static ali_chip_t chips[] = 82static ali_chip_t chips[] =
@@ -1108,7 +1108,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
1108 outb(lcr, iobase+UART_LCR); /* Set 8N1 */ 1108 outb(lcr, iobase+UART_LCR); /* Set 8N1 */
1109 outb(fcr, iobase+UART_FCR); /* Enable FIFO's */ 1109 outb(fcr, iobase+UART_FCR); /* Enable FIFO's */
1110 1110
1111 /* without this, the conection will be broken after come back from FIR speed, 1111 /* without this, the connection will be broken after come back from FIR speed,
1112 but with this, the SIR connection is harder to established */ 1112 but with this, the SIR connection is harder to established */
1113 outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR); 1113 outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR);
1114 1114
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index f81d944fc36..174cafad2c1 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -56,7 +56,7 @@
56/* do_probe module parameter Enable this code */ 56/* do_probe module parameter Enable this code */
57/* Probe code is very useful for understanding how the hardware works */ 57/* Probe code is very useful for understanding how the hardware works */
58/* Use it with various combinations of TT_LEN, RX_LEN */ 58/* Use it with various combinations of TT_LEN, RX_LEN */
59/* Strongly recomended, disable if the probe fails on your machine */ 59/* Strongly recommended, disable if the probe fails on your machine */
60/* and send me <james@fishsoup.dhs.org> the output of dmesg */ 60/* and send me <james@fishsoup.dhs.org> the output of dmesg */
61#define USE_PROBE 1 61#define USE_PROBE 1
62#undef USE_PROBE 62#undef USE_PROBE
diff --git a/drivers/net/irda/donauboe.h b/drivers/net/irda/donauboe.h
index 77fcf445916..d92d54e839b 100644
--- a/drivers/net/irda/donauboe.h
+++ b/drivers/net/irda/donauboe.h
@@ -51,7 +51,7 @@
51 51
52/* The documentation for this chip is allegedly released */ 52/* The documentation for this chip is allegedly released */
53/* However I have not seen it, not have I managed to contact */ 53/* However I have not seen it, not have I managed to contact */
54/* anyone who has. HOWEVER the chip bears a striking resemblence */ 54/* anyone who has. HOWEVER the chip bears a striking resemblance */
55/* to the IrDA controller in the Toshiba RISC TMPR3922 chip */ 55/* to the IrDA controller in the Toshiba RISC TMPR3922 chip */
56/* the documentation for this is freely available at */ 56/* the documentation for this is freely available at */
57/* http://www.madingley.org/james/resources/toshoboe/TMPR3922.pdf */ 57/* http://www.madingley.org/james/resources/toshoboe/TMPR3922.pdf */
diff --git a/drivers/net/irda/girbil-sir.c b/drivers/net/irda/girbil-sir.c
index a31b8fa8aaa..96cdecff349 100644
--- a/drivers/net/irda/girbil-sir.c
+++ b/drivers/net/irda/girbil-sir.c
@@ -38,7 +38,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed);
38/* Control register 1 */ 38/* Control register 1 */
39#define GIRBIL_TXEN 0x01 /* Enable transmitter */ 39#define GIRBIL_TXEN 0x01 /* Enable transmitter */
40#define GIRBIL_RXEN 0x02 /* Enable receiver */ 40#define GIRBIL_RXEN 0x02 /* Enable receiver */
41#define GIRBIL_ECAN 0x04 /* Cancel self emmited data */ 41#define GIRBIL_ECAN 0x04 /* Cancel self emitted data */
42#define GIRBIL_ECHO 0x08 /* Echo control characters */ 42#define GIRBIL_ECHO 0x08 /* Echo control characters */
43 43
44/* LED Current Register (0x2) */ 44/* LED Current Register (0x2) */
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index e4ea61944c2..d9267cb98a2 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -370,7 +370,7 @@ static void speed_bulk_callback(struct urb *urb)
370 /* urb is now available */ 370 /* urb is now available */
371 //urb->status = 0; -> tested above 371 //urb->status = 0; -> tested above
372 372
373 /* New speed and xbof is now commited in hardware */ 373 /* New speed and xbof is now committed in hardware */
374 self->new_speed = -1; 374 self->new_speed = -1;
375 self->new_xbofs = -1; 375 self->new_xbofs = -1;
376 376
@@ -602,7 +602,7 @@ static void write_bulk_callback(struct urb *urb)
602 IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__); 602 IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__);
603 irda_usb_change_speed_xbofs(self); 603 irda_usb_change_speed_xbofs(self);
604 } else { 604 } else {
605 /* New speed and xbof is now commited in hardware */ 605 /* New speed and xbof is now committed in hardware */
606 self->new_speed = -1; 606 self->new_speed = -1;
607 self->new_xbofs = -1; 607 self->new_xbofs = -1;
608 /* Done, waiting for next packet */ 608 /* Done, waiting for next packet */
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index cc821de2c96..be52bfed66a 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -588,7 +588,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
588 588
589 mcs_get_reg(mcs, MCS_MODE_REG, &rval); 589 mcs_get_reg(mcs, MCS_MODE_REG, &rval);
590 590
591 /* MINRXPW values recomended by MosChip */ 591 /* MINRXPW values recommended by MosChip */
592 if (mcs->new_speed <= 115200) { 592 if (mcs->new_speed <= 115200) {
593 rval &= ~MCS_FIR; 593 rval &= ~MCS_FIR;
594 594
@@ -799,7 +799,7 @@ static void mcs_receive_irq(struct urb *urb)
799 ret = usb_submit_urb(urb, GFP_ATOMIC); 799 ret = usb_submit_urb(urb, GFP_ATOMIC);
800} 800}
801 801
802/* Transmit callback funtion. */ 802/* Transmit callback function. */
803static void mcs_send_irq(struct urb *urb) 803static void mcs_send_irq(struct urb *urb)
804{ 804{
805 struct mcs_cb *mcs = urb->context; 805 struct mcs_cb *mcs = urb->context;
@@ -811,7 +811,7 @@ static void mcs_send_irq(struct urb *urb)
811 netif_wake_queue(ndev); 811 netif_wake_queue(ndev);
812} 812}
813 813
814/* Transmit callback funtion. */ 814/* Transmit callback function. */
815static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb, 815static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb,
816 struct net_device *ndev) 816 struct net_device *ndev)
817{ 817{
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 559fe854d76..7a963d4e6d0 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -716,7 +716,7 @@ static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info)
716 int reg, com = 0; 716 int reg, com = 0;
717 int pnp; 717 int pnp;
718 718
719 /* Read funtion enable register (FER) */ 719 /* Read function enable register (FER) */
720 outb(CFG_338_FER, cfg_base); 720 outb(CFG_338_FER, cfg_base);
721 reg = inb(cfg_base+1); 721 reg = inb(cfg_base+1);
722 722
diff --git a/drivers/net/irda/nsc-ircc.h b/drivers/net/irda/nsc-ircc.h
index 7ba7738759b..32fa58211fa 100644
--- a/drivers/net/irda/nsc-ircc.h
+++ b/drivers/net/irda/nsc-ircc.h
@@ -135,7 +135,7 @@
135#define LSR_TXRDY 0x20 /* Transmitter ready */ 135#define LSR_TXRDY 0x20 /* Transmitter ready */
136#define LSR_TXEMP 0x40 /* Transmitter empty */ 136#define LSR_TXEMP 0x40 /* Transmitter empty */
137 137
138#define ASCR 0x07 /* Auxillary Status and Control Register */ 138#define ASCR 0x07 /* Auxiliary Status and Control Register */
139#define ASCR_RXF_TOUT 0x01 /* Rx FIFO timeout */ 139#define ASCR_RXF_TOUT 0x01 /* Rx FIFO timeout */
140#define ASCR_FEND_INF 0x02 /* Frame end bytes in rx FIFO */ 140#define ASCR_FEND_INF 0x02 /* Frame end bytes in rx FIFO */
141#define ASCR_S_EOT 0x04 /* Set end of transmission */ 141#define ASCR_S_EOT 0x04 /* Set end of transmission */
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index c192c31e4c5..001ed0a255f 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -40,7 +40,7 @@
40 40
41#define ICCR0_AME (1 << 7) /* Address match enable */ 41#define ICCR0_AME (1 << 7) /* Address match enable */
42#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */ 42#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
43#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */ 43#define ICCR0_RIE (1 << 5) /* Receive FIFO interrupt enable */
44#define ICCR0_RXE (1 << 4) /* Receive enable */ 44#define ICCR0_RXE (1 << 4) /* Receive enable */
45#define ICCR0_TXE (1 << 3) /* Transmit enable */ 45#define ICCR0_TXE (1 << 3) /* Transmit enable */
46#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */ 46#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
@@ -483,7 +483,7 @@ static irqreturn_t pxa_irda_fir_irq(int irq, void *dev_id)
483 } 483 }
484 484
485 if (icsr0 & ICSR0_EIF) { 485 if (icsr0 & ICSR0_EIF) {
486 /* An error in FIFO occured, or there is a end of frame */ 486 /* An error in FIFO occurred, or there is a end of frame */
487 pxa_irda_fir_irq_eif(si, dev, icsr0); 487 pxa_irda_fir_irq_eif(si, dev, icsr0);
488 } 488 }
489 489
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 1c1677cfea2..8800e1fe412 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -1582,7 +1582,7 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
1582 int iobase; 1582 int iobase;
1583 int iir, lsr; 1583 int iir, lsr;
1584 1584
1585 /* Already locked comming here in smsc_ircc_interrupt() */ 1585 /* Already locked coming here in smsc_ircc_interrupt() */
1586 /*spin_lock(&self->lock);*/ 1586 /*spin_lock(&self->lock);*/
1587 1587
1588 iobase = self->io.sir_base; 1588 iobase = self->io.sir_base;
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 186cd28a61c..f504b262ba3 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -29,7 +29,7 @@ F02 Oct/28/02: Add SB device ID for 3147 and 3177.
29 29
302004-02-16: <sda@bdit.de> 302004-02-16: <sda@bdit.de>
31- Removed unneeded 'legacy' pci stuff. 31- Removed unneeded 'legacy' pci stuff.
32- Make sure SIR mode is set (hw_init()) before calling mode-dependant stuff. 32- Make sure SIR mode is set (hw_init()) before calling mode-dependent stuff.
33- On speed change from core, don't send SIR frame with new speed. 33- On speed change from core, don't send SIR frame with new speed.
34 Use current speed and change speeds later. 34 Use current speed and change speeds later.
35- Make module-param dongle_id actually work. 35- Make module-param dongle_id actually work.
@@ -334,7 +334,7 @@ static __devinit int via_ircc_open(struct pci_dev *pdev, chipio_t * info,
334 self->io.dongle_id = dongle_id; 334 self->io.dongle_id = dongle_id;
335 335
336 /* The only value we must override it the baudrate */ 336 /* The only value we must override it the baudrate */
337 /* Maximum speeds and capabilities are dongle-dependant. */ 337 /* Maximum speeds and capabilities are dongle-dependent. */
338 switch( self->io.dongle_id ){ 338 switch( self->io.dongle_id ){
339 case 0x0d: 339 case 0x0d:
340 self->qos.baud_rate.bits = 340 self->qos.baud_rate.bits =
diff --git a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h
index d66fab854bf..a076eb12534 100644
--- a/drivers/net/irda/vlsi_ir.h
+++ b/drivers/net/irda/vlsi_ir.h
@@ -209,7 +209,7 @@ enum vlsi_pio_irintr {
209 IRINTR_ACTEN = 0x80, /* activity interrupt enable */ 209 IRINTR_ACTEN = 0x80, /* activity interrupt enable */
210 IRINTR_ACTIVITY = 0x40, /* activity monitor (traffic detected) */ 210 IRINTR_ACTIVITY = 0x40, /* activity monitor (traffic detected) */
211 IRINTR_RPKTEN = 0x20, /* receive packet interrupt enable*/ 211 IRINTR_RPKTEN = 0x20, /* receive packet interrupt enable*/
212 IRINTR_RPKTINT = 0x10, /* rx-packet transfered from fifo to memory finished */ 212 IRINTR_RPKTINT = 0x10, /* rx-packet transferred from fifo to memory finished */
213 IRINTR_TPKTEN = 0x08, /* transmit packet interrupt enable */ 213 IRINTR_TPKTEN = 0x08, /* transmit packet interrupt enable */
214 IRINTR_TPKTINT = 0x04, /* last bit of tx-packet+crc shifted to ir-pulser */ 214 IRINTR_TPKTINT = 0x04, /* last bit of tx-packet+crc shifted to ir-pulser */
215 IRINTR_OE_EN = 0x02, /* UART rx fifo overrun error interrupt enable */ 215 IRINTR_OE_EN = 0x02, /* UART rx fifo overrun error interrupt enable */
@@ -739,7 +739,7 @@ typedef struct vlsi_irda_dev {
739/* the remapped error flags we use for returning from frame 739/* the remapped error flags we use for returning from frame
740 * post-processing in vlsi_process_tx/rx() after it was completed 740 * post-processing in vlsi_process_tx/rx() after it was completed
741 * by the hardware. These functions either return the >=0 number 741 * by the hardware. These functions either return the >=0 number
742 * of transfered bytes in case of success or the negative (-) 742 * of transferred bytes in case of success or the negative (-)
743 * of the or'ed error flags. 743 * of the or'ed error flags.
744 */ 744 */
745 745
diff --git a/drivers/net/ixgbe/ixgbe_dcb.c b/drivers/net/ixgbe/ixgbe_dcb.c
index 41c529fac0a..686a17aadef 100644
--- a/drivers/net/ixgbe/ixgbe_dcb.c
+++ b/drivers/net/ixgbe/ixgbe_dcb.c
@@ -36,7 +36,7 @@
36/** 36/**
37 * ixgbe_ieee_credits - This calculates the ieee traffic class 37 * ixgbe_ieee_credits - This calculates the ieee traffic class
38 * credits from the configured bandwidth percentages. Credits 38 * credits from the configured bandwidth percentages. Credits
39 * are the smallest unit programable into the underlying 39 * are the smallest unit programmable into the underlying
40 * hardware. The IEEE 802.1Qaz specification do not use bandwidth 40 * hardware. The IEEE 802.1Qaz specification do not use bandwidth
41 * groups so this is much simplified from the CEE case. 41 * groups so this is much simplified from the CEE case.
42 */ 42 */
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index fec4c724c37..327c8614198 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -360,7 +360,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
360 return DCB_NO_HW_CHG; 360 return DCB_NO_HW_CHG;
361 361
362 /* 362 /*
363 * Only take down the adapter if an app change occured. FCoE 363 * Only take down the adapter if an app change occurred. FCoE
364 * may shuffle tx rings in this case and this can not be done 364 * may shuffle tx rings in this case and this can not be done
365 * without a reset currently. 365 * without a reset currently.
366 */ 366 */
@@ -599,7 +599,7 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev,
599 break; 599 break;
600 600
601 /* The FCoE application priority may be changed multiple 601 /* The FCoE application priority may be changed multiple
602 * times in quick sucession with switches that build up 602 * times in quick succession with switches that build up
603 * TLVs. To avoid creating uneeded device resets this 603 * TLVs. To avoid creating uneeded device resets this
604 * checks the actual HW configuration and clears 604 * checks the actual HW configuration and clears
605 * BIT_APP_UPCHG if a HW configuration change is not 605 * BIT_APP_UPCHG if a HW configuration change is not
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index f17e4a7ee73..6f8adc7f5d7 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -644,7 +644,7 @@ void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *tx_ring,
644 * @adapter: driver private struct 644 * @adapter: driver private struct
645 * @index: reg idx of queue to query (0-127) 645 * @index: reg idx of queue to query (0-127)
646 * 646 *
647 * Helper function to determine the traffic index for a paticular 647 * Helper function to determine the traffic index for a particular
648 * register index. 648 * register index.
649 * 649 *
650 * Returns : a tc index for use in range 0-7, or 0-3 650 * Returns : a tc index for use in range 0-7, or 0-3
@@ -3556,7 +3556,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
3556 } else { 3556 } else {
3557 /* 3557 /*
3558 * Write addresses to the MTA, if the attempt fails 3558 * Write addresses to the MTA, if the attempt fails
3559 * then we should just turn on promiscous mode so 3559 * then we should just turn on promiscuous mode so
3560 * that we can at least receive multicast traffic 3560 * that we can at least receive multicast traffic
3561 */ 3561 */
3562 hw->mac.ops.update_mc_addr_list(hw, netdev); 3562 hw->mac.ops.update_mc_addr_list(hw, netdev);
@@ -3567,7 +3567,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
3567 /* 3567 /*
3568 * Write addresses to available RAR registers, if there is not 3568 * Write addresses to available RAR registers, if there is not
3569 * sufficient space to store all the addresses then enable 3569 * sufficient space to store all the addresses then enable
3570 * unicast promiscous mode 3570 * unicast promiscuous mode
3571 */ 3571 */
3572 count = ixgbe_write_uc_addr_list(netdev); 3572 count = ixgbe_write_uc_addr_list(netdev);
3573 if (count < 0) { 3573 if (count < 0) {
@@ -4443,7 +4443,7 @@ static inline bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter)
4443} 4443}
4444 4444
4445/* 4445/*
4446 * ixgbe_set_num_queues: Allocate queues for device, feature dependant 4446 * ixgbe_set_num_queues: Allocate queues for device, feature dependent
4447 * @adapter: board private structure to initialize 4447 * @adapter: board private structure to initialize
4448 * 4448 *
4449 * This is the top level queue allocation routine. The order here is very 4449 * This is the top level queue allocation routine. The order here is very
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index f72f705f618..df5b8aa4795 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -1694,7 +1694,7 @@ static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw)
1694} 1694}
1695 1695
1696/** 1696/**
1697 * ixgbe_tn_check_overtemp - Checks if an overtemp occured. 1697 * ixgbe_tn_check_overtemp - Checks if an overtemp occurred.
1698 * @hw: pointer to hardware structure 1698 * @hw: pointer to hardware structure
1699 * 1699 *
1700 * Checks if the LASI temp alarm status was triggered due to overtemp 1700 * Checks if the LASI temp alarm status was triggered due to overtemp
diff --git a/drivers/net/ixgbe/ixgbe_x540.c b/drivers/net/ixgbe/ixgbe_x540.c
index f47e93fe32b..d9323c08f5c 100644
--- a/drivers/net/ixgbe/ixgbe_x540.c
+++ b/drivers/net/ixgbe/ixgbe_x540.c
@@ -573,7 +573,7 @@ static s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask)
573 * @hw: pointer to hardware structure 573 * @hw: pointer to hardware structure
574 * @mask: Mask to specify which semaphore to release 574 * @mask: Mask to specify which semaphore to release
575 * 575 *
576 * Releases the SWFW semaphore throught the SW_FW_SYNC register 576 * Releases the SWFW semaphore through the SW_FW_SYNC register
577 * for the specified function (CSR, PHY0, PHY1, EVM, Flash) 577 * for the specified function (CSR, PHY0, PHY1, EVM, Flash)
578 **/ 578 **/
579static void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask) 579static void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask)
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 054ab05b7c6..05fa7c85dee 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -1925,7 +1925,7 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter,
1925} 1925}
1926 1926
1927/* 1927/*
1928 * ixgbevf_set_num_queues: Allocate queues for device, feature dependant 1928 * ixgbevf_set_num_queues: Allocate queues for device, feature dependent
1929 * @adapter: board private structure to initialize 1929 * @adapter: board private structure to initialize
1930 * 1930 *
1931 * This is the top level queue allocation routine. The order here is very 1931 * This is the top level queue allocation routine. The order here is very
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c
index efd44afeae8..f0d8346d0fa 100644
--- a/drivers/net/ks8842.c
+++ b/drivers/net/ks8842.c
@@ -321,7 +321,7 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter)
321 /* RX 2 kb high watermark */ 321 /* RX 2 kb high watermark */
322 ks8842_write16(adapter, 0, 0x1000, REG_QRFCR); 322 ks8842_write16(adapter, 0, 0x1000, REG_QRFCR);
323 323
324 /* aggresive back off in half duplex */ 324 /* aggressive back off in half duplex */
325 ks8842_enable_bits(adapter, 32, 1 << 8, REG_SGCR1); 325 ks8842_enable_bits(adapter, 32, 1 << 8, REG_SGCR1);
326 326
327 /* enable no excessive collison drop */ 327 /* enable no excessive collison drop */
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c
index 0fa4a9887ba..bcd9ba68c9f 100644
--- a/drivers/net/ks8851.c
+++ b/drivers/net/ks8851.c
@@ -141,7 +141,7 @@ static int msg_enable;
141 * 141 *
142 * All these calls issue SPI transactions to access the chip's registers. They 142 * All these calls issue SPI transactions to access the chip's registers. They
143 * all require that the necessary lock is held to prevent accesses when the 143 * all require that the necessary lock is held to prevent accesses when the
144 * chip is busy transfering packet data (RX/TX FIFO accesses). 144 * chip is busy transferring packet data (RX/TX FIFO accesses).
145 */ 145 */
146 146
147/** 147/**
@@ -483,7 +483,7 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
483 * 483 *
484 * This form of operation would require us to hold the SPI bus' 484 * This form of operation would require us to hold the SPI bus'
485 * chipselect low during the entie transaction to avoid any 485 * chipselect low during the entie transaction to avoid any
486 * reset to the data stream comming from the chip. 486 * reset to the data stream coming from the chip.
487 */ 487 */
488 488
489 for (; rxfc != 0; rxfc--) { 489 for (; rxfc != 0; rxfc--) {
@@ -634,7 +634,7 @@ static void ks8851_irq_work(struct work_struct *work)
634 634
635/** 635/**
636 * calc_txlen - calculate size of message to send packet 636 * calc_txlen - calculate size of message to send packet
637 * @len: Lenght of data 637 * @len: Length of data
638 * 638 *
639 * Returns the size of the TXFIFO message needed to send 639 * Returns the size of the TXFIFO message needed to send
640 * this packet. 640 * this packet.
@@ -1472,7 +1472,7 @@ static int ks8851_phy_reg(int reg)
1472 * @reg: The register to read. 1472 * @reg: The register to read.
1473 * 1473 *
1474 * This call reads data from the PHY register specified in @reg. Since the 1474 * This call reads data from the PHY register specified in @reg. Since the
1475 * device does not support all the MII registers, the non-existant values 1475 * device does not support all the MII registers, the non-existent values
1476 * are always returned as zero. 1476 * are always returned as zero.
1477 * 1477 *
1478 * We return zero for unsupported registers as the MII code does not check 1478 * We return zero for unsupported registers as the MII code does not check
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index 2e2c69b2406..61631cace91 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -470,7 +470,7 @@ static int msg_enable;
470 * 470 *
471 * All these calls issue transactions to access the chip's registers. They 471 * All these calls issue transactions to access the chip's registers. They
472 * all require that the necessary lock is held to prevent accesses when the 472 * all require that the necessary lock is held to prevent accesses when the
473 * chip is busy transfering packet data (RX/TX FIFO accesses). 473 * chip is busy transferring packet data (RX/TX FIFO accesses).
474 */ 474 */
475 475
476/** 476/**
@@ -1364,7 +1364,7 @@ static int ks_phy_reg(int reg)
1364 * @reg: The register to read. 1364 * @reg: The register to read.
1365 * 1365 *
1366 * This call reads data from the PHY register specified in @reg. Since the 1366 * This call reads data from the PHY register specified in @reg. Since the
1367 * device does not support all the MII registers, the non-existant values 1367 * device does not support all the MII registers, the non-existent values
1368 * are always returned as zero. 1368 * are always returned as zero.
1369 * 1369 *
1370 * We return zero for unsupported registers as the MII code does not check 1370 * We return zero for unsupported registers as the MII code does not check
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index da74db4a03d..17b75e5f1b0 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -35,7 +35,7 @@
35 Alexey Kuznetsov : use the 8390's six bit hash multicast filter. 35 Alexey Kuznetsov : use the 8390's six bit hash multicast filter.
36 Paul Gortmaker : tweak ANK's above multicast changes a bit. 36 Paul Gortmaker : tweak ANK's above multicast changes a bit.
37 Paul Gortmaker : update packet statistics for v2.1.x 37 Paul Gortmaker : update packet statistics for v2.1.x
38 Alan Cox : support arbitary stupid port mappings on the 38 Alan Cox : support arbitrary stupid port mappings on the
39 68K Macintosh. Support >16bit I/O spaces 39 68K Macintosh. Support >16bit I/O spaces
40 Paul Gortmaker : add kmod support for auto-loading of the 8390 40 Paul Gortmaker : add kmod support for auto-loading of the 8390
41 module by all drivers that require it. 41 module by all drivers that require it.
@@ -121,7 +121,7 @@ static void __NS8390_init(struct net_device *dev, int startp);
121/* 121/*
122 * SMP and the 8390 setup. 122 * SMP and the 8390 setup.
123 * 123 *
124 * The 8390 isnt exactly designed to be multithreaded on RX/TX. There is 124 * The 8390 isn't exactly designed to be multithreaded on RX/TX. There is
125 * a page register that controls bank and packet buffer access. We guard 125 * a page register that controls bank and packet buffer access. We guard
126 * this with ei_local->page_lock. Nobody should assume or set the page other 126 * this with ei_local->page_lock. Nobody should assume or set the page other
127 * than zero when the lock is not held. Lock holders must restore page 0 127 * than zero when the lock is not held. Lock holders must restore page 0
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index ea0dc451da9..d70fb76edb7 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -173,7 +173,8 @@ static void loopback_setup(struct net_device *dev)
173 | NETIF_F_RXCSUM 173 | NETIF_F_RXCSUM
174 | NETIF_F_HIGHDMA 174 | NETIF_F_HIGHDMA
175 | NETIF_F_LLTX 175 | NETIF_F_LLTX
176 | NETIF_F_NETNS_LOCAL; 176 | NETIF_F_NETNS_LOCAL
177 | NETIF_F_VLAN_CHALLENGED;
177 dev->ethtool_ops = &loopback_ethtool_ops; 178 dev->ethtool_ops = &loopback_ethtool_ops;
178 dev->header_ops = &eth_header_ops; 179 dev->header_ops = &eth_header_ops;
179 dev->netdev_ops = &loopback_ops; 180 dev->netdev_ops = &loopback_ops;
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c
index 3698824744c..385a95311cd 100644
--- a/drivers/net/lp486e.c
+++ b/drivers/net/lp486e.c
@@ -27,7 +27,7 @@
27 27
28 Credits: 28 Credits:
29 Thanks to Murphy Software BV for letting me write this in their time. 29 Thanks to Murphy Software BV for letting me write this in their time.
30 Well, actually, I get payed doing this... 30 Well, actually, I get paid doing this...
31 (Also: see http://www.murphy.nl for murphy, and my homepage ~ard for 31 (Also: see http://www.murphy.nl for murphy, and my homepage ~ard for
32 more information on the Professional Workstation) 32 more information on the Professional Workstation)
33 33
diff --git a/drivers/net/meth.h b/drivers/net/meth.h
index a78dc1ca8c2..5b145c6bad6 100644
--- a/drivers/net/meth.h
+++ b/drivers/net/meth.h
@@ -144,7 +144,7 @@ typedef struct rx_packet {
144 /* Bits 22 through 28 are used to determine IPGR2 */ 144 /* Bits 22 through 28 are used to determine IPGR2 */
145 145
146#define METH_REV_SHIFT 29 /* Bits 29 through 31 are used to determine the revision */ 146#define METH_REV_SHIFT 29 /* Bits 29 through 31 are used to determine the revision */
147 /* 000: Inital revision */ 147 /* 000: Initial revision */
148 /* 001: First revision, Improved TX concatenation */ 148 /* 001: First revision, Improved TX concatenation */
149 149
150 150
@@ -193,7 +193,7 @@ typedef struct rx_packet {
193 /* 1: A TX message had the INT request bit set, the packet has been sent. */ 193 /* 1: A TX message had the INT request bit set, the packet has been sent. */
194#define METH_INT_TX_LINK_FAIL BIT(2) /* 0: No interrupt pending, 1: PHY has reported a link failure */ 194#define METH_INT_TX_LINK_FAIL BIT(2) /* 0: No interrupt pending, 1: PHY has reported a link failure */
195#define METH_INT_MEM_ERROR BIT(3) /* 0: No interrupt pending */ 195#define METH_INT_MEM_ERROR BIT(3) /* 0: No interrupt pending */
196 /* 1: A memory error occurred durring DMA, DMA stopped, Fatal */ 196 /* 1: A memory error occurred during DMA, DMA stopped, Fatal */
197#define METH_INT_TX_ABORT BIT(4) /* 0: No interrupt pending, 1: The TX aborted operation, DMA stopped, FATAL */ 197#define METH_INT_TX_ABORT BIT(4) /* 0: No interrupt pending, 1: The TX aborted operation, DMA stopped, FATAL */
198#define METH_INT_RX_THRESHOLD BIT(5) /* 0: No interrupt pending, 1: Selected receive threshold condition Valid */ 198#define METH_INT_RX_THRESHOLD BIT(5) /* 0: No interrupt pending, 1: Selected receive threshold condition Valid */
199#define METH_INT_RX_UNDERFLOW BIT(6) /* 0: No interrupt pending, 1: FIFO was empty, packet could not be queued */ 199#define METH_INT_RX_UNDERFLOW BIT(6) /* 0: No interrupt pending, 1: FIFO was empty, packet could not be queued */
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index 0a6c6a2e755..d4fc00b1ff9 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -49,6 +49,10 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
49 result |= ADVERTISED_100baseT_Half; 49 result |= ADVERTISED_100baseT_Half;
50 if (advert & ADVERTISE_100FULL) 50 if (advert & ADVERTISE_100FULL)
51 result |= ADVERTISED_100baseT_Full; 51 result |= ADVERTISED_100baseT_Full;
52 if (advert & ADVERTISE_PAUSE_CAP)
53 result |= ADVERTISED_Pause;
54 if (advert & ADVERTISE_PAUSE_ASYM)
55 result |= ADVERTISED_Asym_Pause;
52 56
53 return result; 57 return result;
54} 58}
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index 9317b61a75b..9276b1b2558 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -236,7 +236,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
236 goto err_mr; 236 goto err_mr;
237 } 237 }
238 238
239 /* Configure wich ports to start according to module parameters */ 239 /* Configure which ports to start according to module parameters */
240 mdev->port_cnt = 0; 240 mdev->port_cnt = 0;
241 mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) 241 mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH)
242 mdev->port_cnt++; 242 mdev->port_cnt++;
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 4f158baa024..77063f91c56 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -247,7 +247,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
247 priv->port); 247 priv->port);
248 if (err) 248 if (err)
249 en_err(priv, "Failed enabling " 249 en_err(priv, "Failed enabling "
250 "promiscous mode\n"); 250 "promiscuous mode\n");
251 251
252 /* Disable port multicast filter (unconditionally) */ 252 /* Disable port multicast filter (unconditionally) */
253 err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, 253 err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0,
@@ -276,7 +276,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
276 } 276 }
277 277
278 /* 278 /*
279 * Not in promiscous mode 279 * Not in promiscuous mode
280 */ 280 */
281 281
282 if (priv->flags & MLX4_EN_FLAG_PROMISC) { 282 if (priv->flags & MLX4_EN_FLAG_PROMISC) {
@@ -292,14 +292,14 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
292 err = mlx4_unicast_promisc_remove(mdev->dev, priv->base_qpn, 292 err = mlx4_unicast_promisc_remove(mdev->dev, priv->base_qpn,
293 priv->port); 293 priv->port);
294 if (err) 294 if (err)
295 en_err(priv, "Failed disabling promiscous mode\n"); 295 en_err(priv, "Failed disabling promiscuous mode\n");
296 296
297 /* Disable Multicast promisc */ 297 /* Disable Multicast promisc */
298 if (priv->flags & MLX4_EN_FLAG_MC_PROMISC) { 298 if (priv->flags & MLX4_EN_FLAG_MC_PROMISC) {
299 err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn, 299 err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn,
300 priv->port); 300 priv->port);
301 if (err) 301 if (err)
302 en_err(priv, "Failed disabling multicast promiscous mode\n"); 302 en_err(priv, "Failed disabling multicast promiscuous mode\n");
303 priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC; 303 priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC;
304 } 304 }
305 305
@@ -331,7 +331,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
331 err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn, 331 err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn,
332 priv->port); 332 priv->port);
333 if (err) 333 if (err)
334 en_err(priv, "Failed disabling multicast promiscous mode\n"); 334 en_err(priv, "Failed disabling multicast promiscuous mode\n");
335 priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC; 335 priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC;
336 } 336 }
337 337
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index 05998ee297c..62dd21b06df 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -345,6 +345,8 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
345 err = mlx4_en_init_allocator(priv, ring); 345 err = mlx4_en_init_allocator(priv, ring);
346 if (err) { 346 if (err) {
347 en_err(priv, "Failed initializing ring allocator\n"); 347 en_err(priv, "Failed initializing ring allocator\n");
348 if (ring->stride <= TXBB_SIZE)
349 ring->buf -= TXBB_SIZE;
348 ring_ind--; 350 ring_ind--;
349 goto err_allocator; 351 goto err_allocator;
350 } 352 }
@@ -369,6 +371,8 @@ err_buffers:
369 ring_ind = priv->rx_ring_num - 1; 371 ring_ind = priv->rx_ring_num - 1;
370err_allocator: 372err_allocator:
371 while (ring_ind >= 0) { 373 while (ring_ind >= 0) {
374 if (priv->rx_ring[ring_ind].stride <= TXBB_SIZE)
375 priv->rx_ring[ring_ind].buf -= TXBB_SIZE;
372 mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]); 376 mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]);
373 ring_ind--; 377 ring_ind--;
374 } 378 }
@@ -706,7 +710,7 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget)
706} 710}
707 711
708 712
709/* Calculate the last offset position that accomodates a full fragment 713/* Calculate the last offset position that accommodates a full fragment
710 * (assuming fagment size = stride-align) */ 714 * (assuming fagment size = stride-align) */
711static int mlx4_en_last_alloc_offset(struct mlx4_en_priv *priv, u16 stride, u16 align) 715static int mlx4_en_last_alloc_offset(struct mlx4_en_priv *priv, u16 stride, u16 align)
712{ 716{
diff --git a/drivers/net/mlx4/en_selftest.c b/drivers/net/mlx4/en_selftest.c
index 9c91a92da70..191a8dcd8a9 100644
--- a/drivers/net/mlx4/en_selftest.c
+++ b/drivers/net/mlx4/en_selftest.c
@@ -149,7 +149,7 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf)
149 149
150 netif_carrier_off(dev); 150 netif_carrier_off(dev);
151retry_tx: 151retry_tx:
152 /* Wait untill all tx queues are empty. 152 /* Wait until all tx queues are empty.
153 * there should not be any additional incoming traffic 153 * there should not be any additional incoming traffic
154 * since we turned the carrier off */ 154 * since we turned the carrier off */
155 msleep(200); 155 msleep(200);
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index 01feb8fd42a..b229acf1855 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/drivers/net/mlx4/en_tx.c
@@ -636,7 +636,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
636 if (unlikely(!real_size)) 636 if (unlikely(!real_size))
637 goto tx_drop; 637 goto tx_drop;
638 638
639 /* Allign descriptor to TXBB size */ 639 /* Align descriptor to TXBB size */
640 desc_size = ALIGN(real_size, TXBB_SIZE); 640 desc_size = ALIGN(real_size, TXBB_SIZE);
641 nr_txbb = desc_size / TXBB_SIZE; 641 nr_txbb = desc_size / TXBB_SIZE;
642 if (unlikely(nr_txbb > MAX_DESC_TXBBS)) { 642 if (unlikely(nr_txbb > MAX_DESC_TXBBS)) {
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 62fa7eec5f0..3814fc9b114 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -944,6 +944,10 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
944 } 944 }
945 945
946 for (port = 1; port <= dev->caps.num_ports; port++) { 946 for (port = 1; port <= dev->caps.num_ports; port++) {
947 enum mlx4_port_type port_type = 0;
948 mlx4_SENSE_PORT(dev, port, &port_type);
949 if (port_type)
950 dev->caps.port_type[port] = port_type;
947 ib_port_default_caps = 0; 951 ib_port_default_caps = 0;
948 err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); 952 err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps);
949 if (err) 953 if (err)
@@ -958,6 +962,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
958 goto err_mcg_table_free; 962 goto err_mcg_table_free;
959 } 963 }
960 } 964 }
965 mlx4_set_port_mask(dev);
961 966
962 return 0; 967 return 0;
963 968
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c
index c6d336aed2d..e63c37d6a11 100644
--- a/drivers/net/mlx4/mcg.c
+++ b/drivers/net/mlx4/mcg.c
@@ -222,7 +222,7 @@ static int existing_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port,
222 222
223 /* the given qpn is listed as a promisc qpn 223 /* the given qpn is listed as a promisc qpn
224 * we need to add it as a duplicate to this entry 224 * we need to add it as a duplicate to this entry
225 * for future refernce */ 225 * for future references */
226 list_for_each_entry(dqp, &entry->duplicates, list) { 226 list_for_each_entry(dqp, &entry->duplicates, list) {
227 if (qpn == dqp->qpn) 227 if (qpn == dqp->qpn)
228 return 0; /* qp is already duplicated */ 228 return 0; /* qp is already duplicated */
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index c1e0e5f1bcd..dd7d745fbab 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -431,6 +431,8 @@ void mlx4_srq_event(struct mlx4_dev *dev, u32 srqn, int event_type);
431 431
432void mlx4_handle_catas_err(struct mlx4_dev *dev); 432void mlx4_handle_catas_err(struct mlx4_dev *dev);
433 433
434int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
435 enum mlx4_port_type *type);
434void mlx4_do_sense_ports(struct mlx4_dev *dev, 436void mlx4_do_sense_ports(struct mlx4_dev *dev,
435 enum mlx4_port_type *stype, 437 enum mlx4_port_type *stype,
436 enum mlx4_port_type *defaults); 438 enum mlx4_port_type *defaults);
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c
index eca7d8596f8..8856659fb43 100644
--- a/drivers/net/mlx4/port.c
+++ b/drivers/net/mlx4/port.c
@@ -172,7 +172,7 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap)
172 } 172 }
173 173
174 if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { 174 if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) {
175 /* MAC already registered, increase refernce count */ 175 /* MAC already registered, increase references count */
176 ++table->refs[i]; 176 ++table->refs[i];
177 goto out; 177 goto out;
178 } 178 }
@@ -360,7 +360,7 @@ int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index)
360 if (table->refs[i] && 360 if (table->refs[i] &&
361 (vlan == (MLX4_VLAN_MASK & 361 (vlan == (MLX4_VLAN_MASK &
362 be32_to_cpu(table->entries[i])))) { 362 be32_to_cpu(table->entries[i])))) {
363 /* Vlan already registered, increase refernce count */ 363 /* Vlan already registered, increase references count */
364 *index = i; 364 *index = i;
365 ++table->refs[i]; 365 ++table->refs[i];
366 goto out; 366 goto out;
diff --git a/drivers/net/mlx4/sense.c b/drivers/net/mlx4/sense.c
index 015fbe785c1..e2337a7411d 100644
--- a/drivers/net/mlx4/sense.c
+++ b/drivers/net/mlx4/sense.c
@@ -38,8 +38,8 @@
38 38
39#include "mlx4.h" 39#include "mlx4.h"
40 40
41static int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, 41int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
42 enum mlx4_port_type *type) 42 enum mlx4_port_type *type)
43{ 43{
44 u64 out_param; 44 u64 out_param;
45 int err = 0; 45 int err = 0;
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 673dc600c89..1446de59ae5 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -3702,7 +3702,7 @@ abort:
3702 3702
3703/* 3703/*
3704 * This function determines the number of slices supported. 3704 * This function determines the number of slices supported.
3705 * The number slices is the minumum of the number of CPUS, 3705 * The number slices is the minimum of the number of CPUS,
3706 * the number of MSI-X irqs supported, the number of slices 3706 * the number of MSI-X irqs supported, the number of slices
3707 * supported by the firmware 3707 * supported by the firmware
3708 */ 3708 */
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index a761076b69c..53aeea4b536 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -1009,7 +1009,7 @@ static int __devinit myri_sbus_probe(struct platform_device *op)
1009 1009
1010 /* Map in the MyriCOM register/localram set. */ 1010 /* Map in the MyriCOM register/localram set. */
1011 if (mp->eeprom.cpuvers < CPUVERS_4_0) { 1011 if (mp->eeprom.cpuvers < CPUVERS_4_0) {
1012 /* XXX Makes no sense, if control reg is non-existant this 1012 /* XXX Makes no sense, if control reg is non-existent this
1013 * XXX driver cannot function at all... maybe pre-4.0 is 1013 * XXX driver cannot function at all... maybe pre-4.0 is
1014 * XXX only a valid version for PCI cards? Ask feldy... 1014 * XXX only a valid version for PCI cards? Ask feldy...
1015 */ 1015 */
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 2fd39630b1e..1074231f0a0 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -203,7 +203,7 @@ skbuff at an offset of "+2", 16-byte aligning the IP header.
203IIId. Synchronization 203IIId. Synchronization
204 204
205Most operations are synchronized on the np->lock irq spinlock, except the 205Most operations are synchronized on the np->lock irq spinlock, except the
206recieve and transmit paths which are synchronised using a combination of 206receive and transmit paths which are synchronised using a combination of
207hardware descriptor ownership, disabling interrupts and NAPI poll scheduling. 207hardware descriptor ownership, disabling interrupts and NAPI poll scheduling.
208 208
209IVb. References 209IVb. References
@@ -726,7 +726,7 @@ static void move_int_phy(struct net_device *dev, int addr)
726 * There are two addresses we must avoid: 726 * There are two addresses we must avoid:
727 * - the address on the external phy that is used for transmission. 727 * - the address on the external phy that is used for transmission.
728 * - the address that we want to access. User space can access phys 728 * - the address that we want to access. User space can access phys
729 * on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independant from the 729 * on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independent from the
730 * phy that is used for transmission. 730 * phy that is used for transmission.
731 */ 731 */
732 732
@@ -860,6 +860,9 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
860 prev_eedata = eedata; 860 prev_eedata = eedata;
861 } 861 }
862 862
863 /* Store MAC Address in perm_addr */
864 memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);
865
863 dev->base_addr = (unsigned long __force) ioaddr; 866 dev->base_addr = (unsigned long __force) ioaddr;
864 dev->irq = irq; 867 dev->irq = irq;
865 868
@@ -1982,7 +1985,7 @@ static void init_ring(struct net_device *dev)
1982 1985
1983 np->rx_head_desc = &np->rx_ring[0]; 1986 np->rx_head_desc = &np->rx_ring[0];
1984 1987
1985 /* Please be carefull before changing this loop - at least gcc-2.95.1 1988 /* Please be careful before changing this loop - at least gcc-2.95.1
1986 * miscompiles it otherwise. 1989 * miscompiles it otherwise.
1987 */ 1990 */
1988 /* Initialize all Rx descriptors. */ 1991 /* Initialize all Rx descriptors. */
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index dfb67eb2a94..eb41e44921e 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -671,6 +671,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
671 goto done; 671 goto done;
672 672
673 spin_lock_irqsave(&target_list_lock, flags); 673 spin_lock_irqsave(&target_list_lock, flags);
674restart:
674 list_for_each_entry(nt, &target_list, list) { 675 list_for_each_entry(nt, &target_list, list) {
675 netconsole_target_get(nt); 676 netconsole_target_get(nt);
676 if (nt->np.dev == dev) { 677 if (nt->np.dev == dev) {
@@ -683,9 +684,16 @@ static int netconsole_netdev_event(struct notifier_block *this,
683 * rtnl_lock already held 684 * rtnl_lock already held
684 */ 685 */
685 if (nt->np.dev) { 686 if (nt->np.dev) {
687 spin_unlock_irqrestore(
688 &target_list_lock,
689 flags);
686 __netpoll_cleanup(&nt->np); 690 __netpoll_cleanup(&nt->np);
691 spin_lock_irqsave(&target_list_lock,
692 flags);
687 dev_put(nt->np.dev); 693 dev_put(nt->np.dev);
688 nt->np.dev = NULL; 694 nt->np.dev = NULL;
695 netconsole_target_put(nt);
696 goto restart;
689 } 697 }
690 /* Fall through */ 698 /* Fall through */
691 case NETDEV_GOING_DOWN: 699 case NETDEV_GOING_DOWN:
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index d7299f1a494..679dc8519c5 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -174,7 +174,7 @@
174 174
175#define MAX_NUM_CARDS 4 175#define MAX_NUM_CARDS 4
176 176
177#define MAX_BUFFERS_PER_CMD 32 177#define NETXEN_MAX_FRAGS_PER_TX 14
178#define MAX_TSO_HEADER_DESC 2 178#define MAX_TSO_HEADER_DESC 2
179#define MGMT_CMD_DESC_RESV 4 179#define MGMT_CMD_DESC_RESV 4
180#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \ 180#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \
@@ -558,7 +558,7 @@ struct netxen_recv_crb {
558 */ 558 */
559struct netxen_cmd_buffer { 559struct netxen_cmd_buffer {
560 struct sk_buff *skb; 560 struct sk_buff *skb;
561 struct netxen_skb_frag frag_array[MAX_BUFFERS_PER_CMD + 1]; 561 struct netxen_skb_frag frag_array[MAX_SKB_FRAGS + 1];
562 u32 frag_count; 562 u32 frag_count;
563}; 563};
564 564
diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h
index d8bd73d7e29..dc1967c1f31 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -780,7 +780,7 @@ enum {
780 780
781/* 781/*
782 * capabilities register, can be used to selectively enable/disable features 782 * capabilities register, can be used to selectively enable/disable features
783 * for backward compability 783 * for backward compatibility
784 */ 784 */
785#define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8) 785#define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8)
786#define CRB_NIC_MSI_MODE_HOST NETXEN_NIC_REG(0x270) 786#define CRB_NIC_MSI_MODE_HOST NETXEN_NIC_REG(0x270)
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 83348dc4b18..e8a4b665599 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1844,6 +1844,8 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1844 struct cmd_desc_type0 *hwdesc, *first_desc; 1844 struct cmd_desc_type0 *hwdesc, *first_desc;
1845 struct pci_dev *pdev; 1845 struct pci_dev *pdev;
1846 int i, k; 1846 int i, k;
1847 int delta = 0;
1848 struct skb_frag_struct *frag;
1847 1849
1848 u32 producer; 1850 u32 producer;
1849 int frag_count, no_of_desc; 1851 int frag_count, no_of_desc;
@@ -1851,6 +1853,21 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1851 1853
1852 frag_count = skb_shinfo(skb)->nr_frags + 1; 1854 frag_count = skb_shinfo(skb)->nr_frags + 1;
1853 1855
1856 /* 14 frags supported for normal packet and
1857 * 32 frags supported for TSO packet
1858 */
1859 if (!skb_is_gso(skb) && frag_count > NETXEN_MAX_FRAGS_PER_TX) {
1860
1861 for (i = 0; i < (frag_count - NETXEN_MAX_FRAGS_PER_TX); i++) {
1862 frag = &skb_shinfo(skb)->frags[i];
1863 delta += frag->size;
1864 }
1865
1866 if (!__pskb_pull_tail(skb, delta))
1867 goto drop_packet;
1868
1869 frag_count = 1 + skb_shinfo(skb)->nr_frags;
1870 }
1854 /* 4 fragments per cmd des */ 1871 /* 4 fragments per cmd des */
1855 no_of_desc = (frag_count + 3) >> 2; 1872 no_of_desc = (frag_count + 3) >> 2;
1856 1873
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index a41b2cf4d91..6667e0667a8 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -512,7 +512,7 @@ static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group
512/* Packet Receiver 512/* Packet Receiver
513 * 513 *
514 * The hardware supports linked lists of receive descriptors for 514 * The hardware supports linked lists of receive descriptors for
515 * which ownership is transfered back and forth by means of an 515 * which ownership is transferred back and forth by means of an
516 * ownership bit. While the hardware does support the use of a 516 * ownership bit. While the hardware does support the use of a
517 * ring for receive descriptors, we only make use of a chain in 517 * ring for receive descriptors, we only make use of a chain in
518 * an attempt to reduce bus traffic under heavy load scenarios. 518 * an attempt to reduce bus traffic under heavy load scenarios.
@@ -1147,7 +1147,7 @@ again:
1147#ifdef NS83820_VLAN_ACCEL_SUPPORT 1147#ifdef NS83820_VLAN_ACCEL_SUPPORT
1148 if(vlan_tx_tag_present(skb)) { 1148 if(vlan_tx_tag_present(skb)) {
1149 /* fetch the vlan tag info out of the 1149 /* fetch the vlan tag info out of the
1150 * ancilliary data if the vlan code 1150 * ancillary data if the vlan code
1151 * is using hw vlan acceleration 1151 * is using hw vlan acceleration
1152 */ 1152 */
1153 short tag = vlan_tx_tag_get(skb); 1153 short tag = vlan_tx_tag_get(skb);
diff --git a/drivers/net/pch_gbe/pch_gbe.h b/drivers/net/pch_gbe/pch_gbe.h
index e1e33c80fb2..bf126e76fab 100644
--- a/drivers/net/pch_gbe/pch_gbe.h
+++ b/drivers/net/pch_gbe/pch_gbe.h
@@ -351,7 +351,7 @@ struct pch_gbe_functions {
351}; 351};
352 352
353/** 353/**
354 * struct pch_gbe_mac_info - MAC infomation 354 * struct pch_gbe_mac_info - MAC information
355 * @addr[6]: Store the MAC address 355 * @addr[6]: Store the MAC address
356 * @fc: Mode of flow control 356 * @fc: Mode of flow control
357 * @fc_autoneg: Auto negotiation enable for flow control setting 357 * @fc_autoneg: Auto negotiation enable for flow control setting
@@ -375,7 +375,7 @@ struct pch_gbe_mac_info {
375}; 375};
376 376
377/** 377/**
378 * struct pch_gbe_phy_info - PHY infomation 378 * struct pch_gbe_phy_info - PHY information
379 * @addr: PHY address 379 * @addr: PHY address
380 * @id: PHY's identifier 380 * @id: PHY's identifier
381 * @revision: PHY's revision 381 * @revision: PHY's revision
@@ -393,7 +393,7 @@ struct pch_gbe_phy_info {
393/*! 393/*!
394 * @ingroup Gigabit Ether driver Layer 394 * @ingroup Gigabit Ether driver Layer
395 * @struct pch_gbe_bus_info 395 * @struct pch_gbe_bus_info
396 * @brief Bus infomation 396 * @brief Bus information
397 */ 397 */
398struct pch_gbe_bus_info { 398struct pch_gbe_bus_info {
399 u8 type; 399 u8 type;
@@ -404,7 +404,7 @@ struct pch_gbe_bus_info {
404/*! 404/*!
405 * @ingroup Gigabit Ether driver Layer 405 * @ingroup Gigabit Ether driver Layer
406 * @struct pch_gbe_hw 406 * @struct pch_gbe_hw
407 * @brief Hardware infomation 407 * @brief Hardware information
408 */ 408 */
409struct pch_gbe_hw { 409struct pch_gbe_hw {
410 void *back; 410 void *back;
@@ -462,7 +462,7 @@ struct pch_gbe_tx_desc {
462 462
463 463
464/** 464/**
465 * struct pch_gbe_buffer - Buffer infomation 465 * struct pch_gbe_buffer - Buffer information
466 * @skb: pointer to a socket buffer 466 * @skb: pointer to a socket buffer
467 * @dma: DMA address 467 * @dma: DMA address
468 * @time_stamp: time stamp 468 * @time_stamp: time stamp
@@ -477,7 +477,7 @@ struct pch_gbe_buffer {
477}; 477};
478 478
479/** 479/**
480 * struct pch_gbe_tx_ring - tx ring infomation 480 * struct pch_gbe_tx_ring - tx ring information
481 * @tx_lock: spinlock structs 481 * @tx_lock: spinlock structs
482 * @desc: pointer to the descriptor ring memory 482 * @desc: pointer to the descriptor ring memory
483 * @dma: physical address of the descriptor ring 483 * @dma: physical address of the descriptor ring
@@ -499,7 +499,7 @@ struct pch_gbe_tx_ring {
499}; 499};
500 500
501/** 501/**
502 * struct pch_gbe_rx_ring - rx ring infomation 502 * struct pch_gbe_rx_ring - rx ring information
503 * @desc: pointer to the descriptor ring memory 503 * @desc: pointer to the descriptor ring memory
504 * @dma: physical address of the descriptor ring 504 * @dma: physical address of the descriptor ring
505 * @size: length of descriptor ring in bytes 505 * @size: length of descriptor ring in bytes
diff --git a/drivers/net/pch_gbe/pch_gbe_ethtool.c b/drivers/net/pch_gbe/pch_gbe_ethtool.c
index c8c873b31a8..d2174a40d70 100644
--- a/drivers/net/pch_gbe/pch_gbe_ethtool.c
+++ b/drivers/net/pch_gbe/pch_gbe_ethtool.c
@@ -21,7 +21,7 @@
21#include "pch_gbe_api.h" 21#include "pch_gbe_api.h"
22 22
23/** 23/**
24 * pch_gbe_stats - Stats item infomation 24 * pch_gbe_stats - Stats item information
25 */ 25 */
26struct pch_gbe_stats { 26struct pch_gbe_stats {
27 char string[ETH_GSTRING_LEN]; 27 char string[ETH_GSTRING_LEN];
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 50986840c99..2ef2f9cdefa 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -1011,7 +1011,7 @@ static void pch_gbe_tx_queue(struct pch_gbe_adapter *adapter,
1011 tmp_skb->len = skb->len; 1011 tmp_skb->len = skb->len;
1012 memcpy(&tmp_skb->data[ETH_HLEN + 2], &skb->data[ETH_HLEN], 1012 memcpy(&tmp_skb->data[ETH_HLEN + 2], &skb->data[ETH_HLEN],
1013 (skb->len - ETH_HLEN)); 1013 (skb->len - ETH_HLEN));
1014 /*-- Set Buffer infomation --*/ 1014 /*-- Set Buffer information --*/
1015 buffer_info->length = tmp_skb->len; 1015 buffer_info->length = tmp_skb->len;
1016 buffer_info->dma = dma_map_single(&adapter->pdev->dev, tmp_skb->data, 1016 buffer_info->dma = dma_map_single(&adapter->pdev->dev, tmp_skb->data,
1017 buffer_info->length, 1017 buffer_info->length,
@@ -1540,7 +1540,7 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter,
1540 size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count; 1540 size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count;
1541 tx_ring->buffer_info = vzalloc(size); 1541 tx_ring->buffer_info = vzalloc(size);
1542 if (!tx_ring->buffer_info) { 1542 if (!tx_ring->buffer_info) {
1543 pr_err("Unable to allocate memory for the buffer infomation\n"); 1543 pr_err("Unable to allocate memory for the buffer information\n");
1544 return -ENOMEM; 1544 return -ENOMEM;
1545 } 1545 }
1546 1546
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index 1766dc4f07e..c0f23376a46 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -214,7 +214,7 @@ static struct {
214 { "SMC1211TX EZCard 10/100 (RealTek RTL8139)" }, 214 { "SMC1211TX EZCard 10/100 (RealTek RTL8139)" },
215/* { MPX5030, "Accton MPX5030 (RealTek RTL8139)" },*/ 215/* { MPX5030, "Accton MPX5030 (RealTek RTL8139)" },*/
216 { "Delta Electronics 8139 10/100BaseTX" }, 216 { "Delta Electronics 8139 10/100BaseTX" },
217 { "Addtron Technolgy 8139 10/100BaseTX" }, 217 { "Addtron Technology 8139 10/100BaseTX" },
218}; 218};
219 219
220 220
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 321b12f8264..81ac330f931 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -950,7 +950,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
950} 950}
951 951
952/* Update statistics. 952/* Update statistics.
953 Suprisingly this need not be run single-threaded, but it effectively is. 953 Surprisingly this need not be run single-threaded, but it effectively is.
954 The counters clear when read, so the adds must merely be atomic. 954 The counters clear when read, so the adds must merely be atomic.
955 */ 955 */
956static void update_stats(struct net_device *dev) 956static void update_stats(struct net_device *dev)
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index d3cb7720586..3077d72e822 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -780,7 +780,7 @@ module_exit(exit_axnet_cs);
780 Alexey Kuznetsov : use the 8390's six bit hash multicast filter. 780 Alexey Kuznetsov : use the 8390's six bit hash multicast filter.
781 Paul Gortmaker : tweak ANK's above multicast changes a bit. 781 Paul Gortmaker : tweak ANK's above multicast changes a bit.
782 Paul Gortmaker : update packet statistics for v2.1.x 782 Paul Gortmaker : update packet statistics for v2.1.x
783 Alan Cox : support arbitary stupid port mappings on the 783 Alan Cox : support arbitrary stupid port mappings on the
784 68K Macintosh. Support >16bit I/O spaces 784 68K Macintosh. Support >16bit I/O spaces
785 Paul Gortmaker : add kmod support for auto-loading of the 8390 785 Paul Gortmaker : add kmod support for auto-loading of the 8390
786 module by all drivers that require it. 786 module by all drivers that require it.
@@ -842,7 +842,7 @@ static void do_set_multicast_list(struct net_device *dev);
842/* 842/*
843 * SMP and the 8390 setup. 843 * SMP and the 8390 setup.
844 * 844 *
845 * The 8390 isnt exactly designed to be multithreaded on RX/TX. There is 845 * The 8390 isn't exactly designed to be multithreaded on RX/TX. There is
846 * a page register that controls bank and packet buffer access. We guard 846 * a page register that controls bank and packet buffer access. We guard
847 * this with ei_local->page_lock. Nobody should assume or set the page other 847 * this with ei_local->page_lock. Nobody should assume or set the page other
848 * than zero when the lock is not held. Lock holders must restore page 0 848 * than zero when the lock is not held. Lock holders must restore page 0
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 8a9ff531892..10859175644 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -1264,7 +1264,7 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb,
1264 1264
1265/*====================================================================== 1265/*======================================================================
1266 1266
1267 Handle a Tx anomolous event. Entered while in Window 2. 1267 Handle a Tx anomalous event. Entered while in Window 2.
1268 1268
1269======================================================================*/ 1269======================================================================*/
1270 1270
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index aee3bb0358b..768037602df 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1651,7 +1651,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1651 /* 1651 /*
1652 * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit 1652 * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit
1653 * starting until the packet is loaded. Strike one for reliability, lose 1653 * starting until the packet is loaded. Strike one for reliability, lose
1654 * one for latency - although on PCI this isnt a big loss. Older chips 1654 * one for latency - although on PCI this isn't a big loss. Older chips
1655 * have FIFO's smaller than a packet, so you can't do this. 1655 * have FIFO's smaller than a packet, so you can't do this.
1656 * Turn on BCR18:BurstRdEn and BCR18:BurstWrEn. 1656 * Turn on BCR18:BurstRdEn and BCR18:BurstWrEn.
1657 */ 1657 */
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e870c0698bb..ff109fe5af6 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -538,7 +538,7 @@ EXPORT_SYMBOL(phy_detach);
538/* Generic PHY support and helper functions */ 538/* Generic PHY support and helper functions */
539 539
540/** 540/**
541 * genphy_config_advert - sanitize and advertise auto-negotation parameters 541 * genphy_config_advert - sanitize and advertise auto-negotiation parameters
542 * @phydev: target phy_device struct 542 * @phydev: target phy_device struct
543 * 543 *
544 * Description: Writes MII_ADVERTISE with the appropriate values, 544 * Description: Writes MII_ADVERTISE with the appropriate values,
@@ -687,7 +687,7 @@ int genphy_config_aneg(struct phy_device *phydev)
687 return result; 687 return result;
688 688
689 if (result == 0) { 689 if (result == 0) {
690 /* Advertisment hasn't changed, but maybe aneg was never on to 690 /* Advertisement hasn't changed, but maybe aneg was never on to
691 * begin with? Or maybe phy was isolated? */ 691 * begin with? Or maybe phy was isolated? */
692 int ctl = phy_read(phydev, MII_BMCR); 692 int ctl = phy_read(phydev, MII_BMCR);
693 693
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 9f6d670748d..4609bc0e2f5 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1448,7 +1448,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1448 1448
1449 /* 1449 /*
1450 *check if we are on the last channel or 1450 *check if we are on the last channel or
1451 *we exceded the lenght of the data to 1451 *we exceded the length of the data to
1452 *fragment 1452 *fragment
1453 */ 1453 */
1454 if ((nfree <= 0) || (flen > len)) 1454 if ((nfree <= 0) || (flen > len))
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index 4e6b72f57de..2573f525f11 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -178,7 +178,7 @@ ppp_print_buffer (const char *name, const __u8 *buf, int count)
178 * way to fix this is to use a rwlock in the tty struct, but for now 178 * way to fix this is to use a rwlock in the tty struct, but for now
179 * we use a single global rwlock for all ttys in ppp line discipline. 179 * we use a single global rwlock for all ttys in ppp line discipline.
180 * 180 *
181 * FIXME: Fixed in tty_io nowdays. 181 * FIXME: Fixed in tty_io nowadays.
182 */ 182 */
183static DEFINE_RWLOCK(disc_data_lock); 183static DEFINE_RWLOCK(disc_data_lock);
184 184
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 78c0e3c9b2b..718879b35b7 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -115,7 +115,7 @@ struct pppoe_net {
115 * 2) Session stage (MAC and SID are known) 115 * 2) Session stage (MAC and SID are known)
116 * 116 *
117 * Ethernet frames have a special tag for this but 117 * Ethernet frames have a special tag for this but
118 * we use simplier approach based on session id 118 * we use simpler approach based on session id
119 */ 119 */
120static inline bool stage_session(__be16 sid) 120static inline bool stage_session(__be16 sid)
121{ 121{
@@ -317,7 +317,7 @@ static void pppoe_flush_dev(struct net_device *dev)
317 lock_sock(sk); 317 lock_sock(sk);
318 318
319 if (po->pppoe_dev == dev && 319 if (po->pppoe_dev == dev &&
320 sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) { 320 sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
321 pppox_unbind_sock(sk); 321 pppox_unbind_sock(sk);
322 sk->sk_state = PPPOX_ZOMBIE; 322 sk->sk_state = PPPOX_ZOMBIE;
323 sk->sk_state_change(sk); 323 sk->sk_state_change(sk);
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 5ecfa4b1e75..ffdf7349ef7 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -632,7 +632,7 @@ static inline void gelic_card_enable_rxdmac(struct gelic_card *card)
632 * @card: card structure 632 * @card: card structure
633 * 633 *
634 * gelic_card_disable_rxdmac terminates processing on the DMA controller by 634 * gelic_card_disable_rxdmac terminates processing on the DMA controller by
635 * turing off DMA and issueing a force end 635 * turing off DMA and issuing a force end
636 */ 636 */
637static inline void gelic_card_disable_rxdmac(struct gelic_card *card) 637static inline void gelic_card_disable_rxdmac(struct gelic_card *card)
638{ 638{
@@ -650,7 +650,7 @@ static inline void gelic_card_disable_rxdmac(struct gelic_card *card)
650 * @card: card structure 650 * @card: card structure
651 * 651 *
652 * gelic_card_disable_txdmac terminates processing on the DMA controller by 652 * gelic_card_disable_txdmac terminates processing on the DMA controller by
653 * turing off DMA and issueing a force end 653 * turing off DMA and issuing a force end
654 */ 654 */
655static inline void gelic_card_disable_txdmac(struct gelic_card *card) 655static inline void gelic_card_disable_txdmac(struct gelic_card *card)
656{ 656{
diff --git a/drivers/net/ps3_gelic_net.h b/drivers/net/ps3_gelic_net.h
index 32521ae5e82..fadadf9097a 100644
--- a/drivers/net/ps3_gelic_net.h
+++ b/drivers/net/ps3_gelic_net.h
@@ -117,7 +117,7 @@ enum gelic_descr_rx_error {
117 GELIC_DESCR_RXDATAERR = 0x00020000, /* IP packet format error */ 117 GELIC_DESCR_RXDATAERR = 0x00020000, /* IP packet format error */
118 GELIC_DESCR_RXCALERR = 0x00010000, /* cariier extension length 118 GELIC_DESCR_RXCALERR = 0x00010000, /* cariier extension length
119 * error */ 119 * error */
120 GELIC_DESCR_RXCREXERR = 0x00008000, /* carrier extention error */ 120 GELIC_DESCR_RXCREXERR = 0x00008000, /* carrier extension error */
121 GELIC_DESCR_RXMLTCST = 0x00004000, /* multicast address frame */ 121 GELIC_DESCR_RXMLTCST = 0x00004000, /* multicast address frame */
122 /* bit 13..0 reserved */ 122 /* bit 13..0 reserved */
123}; 123};
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
index 4a624a29393..b5ae29d20f2 100644
--- a/drivers/net/ps3_gelic_wireless.c
+++ b/drivers/net/ps3_gelic_wireless.c
@@ -814,7 +814,7 @@ static int gelic_wl_set_auth(struct net_device *netdev,
814 * you will not decide suitable cipher from 814 * you will not decide suitable cipher from
815 * its beacon. 815 * its beacon.
816 * You should have knowledge about the AP's 816 * You should have knowledge about the AP's
817 * cipher infomation in other method prior to 817 * cipher information in other method prior to
818 * the association. 818 * the association.
819 */ 819 */
820 if (!precise_ie()) 820 if (!precise_ie())
diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
index 1b63c8aef12..89f7540d90f 100644
--- a/drivers/net/pxa168_eth.c
+++ b/drivers/net/pxa168_eth.c
@@ -462,7 +462,7 @@ static u32 hash_function(unsigned char *mac_addr_orig)
462 * pep - ETHERNET . 462 * pep - ETHERNET .
463 * mac_addr - MAC address. 463 * mac_addr - MAC address.
464 * skip - if 1, skip this address.Used in case of deleting an entry which is a 464 * skip - if 1, skip this address.Used in case of deleting an entry which is a
465 * part of chain in the hash table.We cant just delete the entry since 465 * part of chain in the hash table.We can't just delete the entry since
466 * that will break the chain.We need to defragment the tables time to 466 * that will break the chain.We need to defragment the tables time to
467 * time. 467 * time.
468 * rd - 0 Discard packet upon match. 468 * rd - 0 Discard packet upon match.
diff --git a/drivers/net/qla3xxx.h b/drivers/net/qla3xxx.h
index 3362a661248..73e234366a8 100644
--- a/drivers/net/qla3xxx.h
+++ b/drivers/net/qla3xxx.h
@@ -770,7 +770,7 @@ enum {
770 FM93C56A_WDS = 0x0, 770 FM93C56A_WDS = 0x0,
771 FM93C56A_ERASE = 0x3, 771 FM93C56A_ERASE = 0x3,
772 FM93C56A_ERASE_ALL = 0x0, 772 FM93C56A_ERASE_ALL = 0x0,
773/* Command Extentions */ 773/* Command Extensions */
774 FM93C56A_WEN_EXT = 0x3, 774 FM93C56A_WEN_EXT = 0x3,
775 FM93C56A_WRITE_ALL_EXT = 0x1, 775 FM93C56A_WRITE_ALL_EXT = 0x1,
776 FM93C56A_WDS_EXT = 0x0, 776 FM93C56A_WDS_EXT = 0x0,
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index dc44564ef6f..b0dead00b2d 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -99,6 +99,7 @@
99#define TX_UDPV6_PKT 0x0c 99#define TX_UDPV6_PKT 0x0c
100 100
101/* Tx defines */ 101/* Tx defines */
102#define QLCNIC_MAX_FRAGS_PER_TX 14
102#define MAX_TSO_HEADER_DESC 2 103#define MAX_TSO_HEADER_DESC 2
103#define MGMT_CMD_DESC_RESV 4 104#define MGMT_CMD_DESC_RESV 4
104#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \ 105#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index cd88c7e1bfa..cb1a1ef36c0 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -2099,6 +2099,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2099 struct cmd_desc_type0 *hwdesc, *first_desc; 2099 struct cmd_desc_type0 *hwdesc, *first_desc;
2100 struct pci_dev *pdev; 2100 struct pci_dev *pdev;
2101 struct ethhdr *phdr; 2101 struct ethhdr *phdr;
2102 int delta = 0;
2102 int i, k; 2103 int i, k;
2103 2104
2104 u32 producer; 2105 u32 producer;
@@ -2118,6 +2119,19 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2118 } 2119 }
2119 2120
2120 frag_count = skb_shinfo(skb)->nr_frags + 1; 2121 frag_count = skb_shinfo(skb)->nr_frags + 1;
2122 /* 14 frags supported for normal packet and
2123 * 32 frags supported for TSO packet
2124 */
2125 if (!skb_is_gso(skb) && frag_count > QLCNIC_MAX_FRAGS_PER_TX) {
2126
2127 for (i = 0; i < (frag_count - QLCNIC_MAX_FRAGS_PER_TX); i++)
2128 delta += skb_shinfo(skb)->frags[i].size;
2129
2130 if (!__pskb_pull_tail(skb, delta))
2131 goto drop_packet;
2132
2133 frag_count = 1 + skb_shinfo(skb)->nr_frags;
2134 }
2121 2135
2122 /* 4 fragments per cmd des */ 2136 /* 4 fragments per cmd des */
2123 no_of_desc = (frag_count + 3) >> 2; 2137 no_of_desc = (frag_count + 3) >> 2;
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 49bfa581306..5bb31194543 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -660,7 +660,7 @@ static void ql_disable_interrupts(struct ql_adapter *qdev)
660/* If we're running with multiple MSI-X vectors then we enable on the fly. 660/* If we're running with multiple MSI-X vectors then we enable on the fly.
661 * Otherwise, we may have multiple outstanding workers and don't want to 661 * Otherwise, we may have multiple outstanding workers and don't want to
662 * enable until the last one finishes. In this case, the irq_cnt gets 662 * enable until the last one finishes. In this case, the irq_cnt gets
663 * incremented everytime we queue a worker and decremented everytime 663 * incremented every time we queue a worker and decremented every time
664 * a worker finishes. Once it hits zero we enable the interrupt. 664 * a worker finishes. Once it hits zero we enable the interrupt.
665 */ 665 */
666u32 ql_enable_completion_interrupt(struct ql_adapter *qdev, u32 intr) 666u32 ql_enable_completion_interrupt(struct ql_adapter *qdev, u32 intr)
@@ -3299,7 +3299,7 @@ msi:
3299 * will service it. An example would be if there are 3299 * will service it. An example would be if there are
3300 * 2 vectors (so 2 RSS rings) and 8 TX completion rings. 3300 * 2 vectors (so 2 RSS rings) and 8 TX completion rings.
3301 * This would mean that vector 0 would service RSS ring 0 3301 * This would mean that vector 0 would service RSS ring 0
3302 * and TX competion rings 0,1,2 and 3. Vector 1 would 3302 * and TX completion rings 0,1,2 and 3. Vector 1 would
3303 * service RSS ring 1 and TX completion rings 4,5,6 and 7. 3303 * service RSS ring 1 and TX completion rings 4,5,6 and 7.
3304 */ 3304 */
3305static void ql_set_tx_vect(struct ql_adapter *qdev) 3305static void ql_set_tx_vect(struct ql_adapter *qdev)
@@ -4152,7 +4152,7 @@ static int ql_change_rx_buffers(struct ql_adapter *qdev)
4152 int i, status; 4152 int i, status;
4153 u32 lbq_buf_len; 4153 u32 lbq_buf_len;
4154 4154
4155 /* Wait for an oustanding reset to complete. */ 4155 /* Wait for an outstanding reset to complete. */
4156 if (!test_bit(QL_ADAPTER_UP, &qdev->flags)) { 4156 if (!test_bit(QL_ADAPTER_UP, &qdev->flags)) {
4157 int i = 3; 4157 int i = 3;
4158 while (i-- && !test_bit(QL_ADAPTER_UP, &qdev->flags)) { 4158 while (i-- && !test_bit(QL_ADAPTER_UP, &qdev->flags)) {
@@ -4281,7 +4281,7 @@ static void qlge_set_multicast_list(struct net_device *ndev)
4281 if (ql_set_routing_reg 4281 if (ql_set_routing_reg
4282 (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) { 4282 (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) {
4283 netif_err(qdev, hw, qdev->ndev, 4283 netif_err(qdev, hw, qdev->ndev,
4284 "Failed to set promiscous mode.\n"); 4284 "Failed to set promiscuous mode.\n");
4285 } else { 4285 } else {
4286 set_bit(QL_PROMISCUOUS, &qdev->flags); 4286 set_bit(QL_PROMISCUOUS, &qdev->flags);
4287 } 4287 }
@@ -4291,7 +4291,7 @@ static void qlge_set_multicast_list(struct net_device *ndev)
4291 if (ql_set_routing_reg 4291 if (ql_set_routing_reg
4292 (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 0)) { 4292 (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 0)) {
4293 netif_err(qdev, hw, qdev->ndev, 4293 netif_err(qdev, hw, qdev->ndev,
4294 "Failed to clear promiscous mode.\n"); 4294 "Failed to clear promiscuous mode.\n");
4295 } else { 4295 } else {
4296 clear_bit(QL_PROMISCUOUS, &qdev->flags); 4296 clear_bit(QL_PROMISCUOUS, &qdev->flags);
4297 } 4297 }
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index e3ebd90ae65..200a363c3bf 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -535,7 +535,7 @@ static int r6040_rx(struct net_device *dev, int limit)
535 /* RX dribble */ 535 /* RX dribble */
536 if (err & DSC_RX_ERR_DRI) 536 if (err & DSC_RX_ERR_DRI)
537 dev->stats.rx_frame_errors++; 537 dev->stats.rx_frame_errors++;
538 /* Buffer lenght exceeded */ 538 /* Buffer length exceeded */
539 if (err & DSC_RX_ERR_BUF) 539 if (err & DSC_RX_ERR_BUF)
540 dev->stats.rx_length_errors++; 540 dev->stats.rx_length_errors++;
541 /* Packet too long */ 541 /* Packet too long */
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 493b0de3848..397c36810a1 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -170,6 +170,16 @@ static const struct {
170}; 170};
171#undef _R 171#undef _R
172 172
173static const struct rtl_firmware_info {
174 int mac_version;
175 const char *fw_name;
176} rtl_firmware_infos[] = {
177 { .mac_version = RTL_GIGA_MAC_VER_25, .fw_name = FIRMWARE_8168D_1 },
178 { .mac_version = RTL_GIGA_MAC_VER_26, .fw_name = FIRMWARE_8168D_2 },
179 { .mac_version = RTL_GIGA_MAC_VER_29, .fw_name = FIRMWARE_8105E_1 },
180 { .mac_version = RTL_GIGA_MAC_VER_30, .fw_name = FIRMWARE_8105E_1 }
181};
182
173enum cfg_version { 183enum cfg_version {
174 RTL_CFG_0 = 0x00, 184 RTL_CFG_0 = 0x00,
175 RTL_CFG_1, 185 RTL_CFG_1,
@@ -565,6 +575,7 @@ struct rtl8169_private {
565 u32 saved_wolopts; 575 u32 saved_wolopts;
566 576
567 const struct firmware *fw; 577 const struct firmware *fw;
578#define RTL_FIRMWARE_UNKNOWN ERR_PTR(-EAGAIN);
568}; 579};
569 580
570MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); 581MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
@@ -1789,25 +1800,26 @@ rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw)
1789 1800
1790static void rtl_release_firmware(struct rtl8169_private *tp) 1801static void rtl_release_firmware(struct rtl8169_private *tp)
1791{ 1802{
1792 release_firmware(tp->fw); 1803 if (!IS_ERR_OR_NULL(tp->fw))
1793 tp->fw = NULL; 1804 release_firmware(tp->fw);
1805 tp->fw = RTL_FIRMWARE_UNKNOWN;
1794} 1806}
1795 1807
1796static int rtl_apply_firmware(struct rtl8169_private *tp, const char *fw_name) 1808static void rtl_apply_firmware(struct rtl8169_private *tp)
1797{ 1809{
1798 const struct firmware **fw = &tp->fw; 1810 const struct firmware *fw = tp->fw;
1799 int rc = !*fw;
1800
1801 if (rc) {
1802 rc = request_firmware(fw, fw_name, &tp->pci_dev->dev);
1803 if (rc < 0)
1804 goto out;
1805 }
1806 1811
1807 /* TODO: release firmware once rtl_phy_write_fw signals failures. */ 1812 /* TODO: release firmware once rtl_phy_write_fw signals failures. */
1808 rtl_phy_write_fw(tp, *fw); 1813 if (!IS_ERR_OR_NULL(fw))
1809out: 1814 rtl_phy_write_fw(tp, fw);
1810 return rc; 1815}
1816
1817static void rtl_apply_firmware_cond(struct rtl8169_private *tp, u8 reg, u16 val)
1818{
1819 if (rtl_readphy(tp, reg) != val)
1820 netif_warn(tp, hw, tp->dev, "chipset not ready for firmware\n");
1821 else
1822 rtl_apply_firmware(tp);
1811} 1823}
1812 1824
1813static void rtl8169s_hw_phy_config(struct rtl8169_private *tp) 1825static void rtl8169s_hw_phy_config(struct rtl8169_private *tp)
@@ -2246,10 +2258,8 @@ static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
2246 2258
2247 rtl_writephy(tp, 0x1f, 0x0005); 2259 rtl_writephy(tp, 0x1f, 0x0005);
2248 rtl_writephy(tp, 0x05, 0x001b); 2260 rtl_writephy(tp, 0x05, 0x001b);
2249 if ((rtl_readphy(tp, 0x06) != 0xbf00) || 2261
2250 (rtl_apply_firmware(tp, FIRMWARE_8168D_1) < 0)) { 2262 rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xbf00);
2251 netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
2252 }
2253 2263
2254 rtl_writephy(tp, 0x1f, 0x0000); 2264 rtl_writephy(tp, 0x1f, 0x0000);
2255} 2265}
@@ -2351,10 +2361,8 @@ static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
2351 2361
2352 rtl_writephy(tp, 0x1f, 0x0005); 2362 rtl_writephy(tp, 0x1f, 0x0005);
2353 rtl_writephy(tp, 0x05, 0x001b); 2363 rtl_writephy(tp, 0x05, 0x001b);
2354 if ((rtl_readphy(tp, 0x06) != 0xb300) || 2364
2355 (rtl_apply_firmware(tp, FIRMWARE_8168D_2) < 0)) { 2365 rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xb300);
2356 netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
2357 }
2358 2366
2359 rtl_writephy(tp, 0x1f, 0x0000); 2367 rtl_writephy(tp, 0x1f, 0x0000);
2360} 2368}
@@ -2474,8 +2482,7 @@ static void rtl8105e_hw_phy_config(struct rtl8169_private *tp)
2474 rtl_writephy(tp, 0x18, 0x0310); 2482 rtl_writephy(tp, 0x18, 0x0310);
2475 msleep(100); 2483 msleep(100);
2476 2484
2477 if (rtl_apply_firmware(tp, FIRMWARE_8105E_1) < 0) 2485 rtl_apply_firmware(tp);
2478 netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
2479 2486
2480 rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init)); 2487 rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init));
2481} 2488}
@@ -3237,6 +3244,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3237 tp->timer.data = (unsigned long) dev; 3244 tp->timer.data = (unsigned long) dev;
3238 tp->timer.function = rtl8169_phy_timer; 3245 tp->timer.function = rtl8169_phy_timer;
3239 3246
3247 tp->fw = RTL_FIRMWARE_UNKNOWN;
3248
3240 rc = register_netdev(dev); 3249 rc = register_netdev(dev);
3241 if (rc < 0) 3250 if (rc < 0)
3242 goto err_out_msi_4; 3251 goto err_out_msi_4;
@@ -3288,10 +3297,10 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
3288 3297
3289 cancel_delayed_work_sync(&tp->task); 3298 cancel_delayed_work_sync(&tp->task);
3290 3299
3291 rtl_release_firmware(tp);
3292
3293 unregister_netdev(dev); 3300 unregister_netdev(dev);
3294 3301
3302 rtl_release_firmware(tp);
3303
3295 if (pci_dev_run_wake(pdev)) 3304 if (pci_dev_run_wake(pdev))
3296 pm_runtime_get_noresume(&pdev->dev); 3305 pm_runtime_get_noresume(&pdev->dev);
3297 3306
@@ -3303,6 +3312,37 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
3303 pci_set_drvdata(pdev, NULL); 3312 pci_set_drvdata(pdev, NULL);
3304} 3313}
3305 3314
3315static void rtl_request_firmware(struct rtl8169_private *tp)
3316{
3317 int i;
3318
3319 /* Return early if the firmware is already loaded / cached. */
3320 if (!IS_ERR(tp->fw))
3321 goto out;
3322
3323 for (i = 0; i < ARRAY_SIZE(rtl_firmware_infos); i++) {
3324 const struct rtl_firmware_info *info = rtl_firmware_infos + i;
3325
3326 if (info->mac_version == tp->mac_version) {
3327 const char *name = info->fw_name;
3328 int rc;
3329
3330 rc = request_firmware(&tp->fw, name, &tp->pci_dev->dev);
3331 if (rc < 0) {
3332 netif_warn(tp, ifup, tp->dev, "unable to load "
3333 "firmware patch %s (%d)\n", name, rc);
3334 goto out_disable_request_firmware;
3335 }
3336 goto out;
3337 }
3338 }
3339
3340out_disable_request_firmware:
3341 tp->fw = NULL;
3342out:
3343 return;
3344}
3345
3306static int rtl8169_open(struct net_device *dev) 3346static int rtl8169_open(struct net_device *dev)
3307{ 3347{
3308 struct rtl8169_private *tp = netdev_priv(dev); 3348 struct rtl8169_private *tp = netdev_priv(dev);
@@ -3334,11 +3374,13 @@ static int rtl8169_open(struct net_device *dev)
3334 3374
3335 smp_mb(); 3375 smp_mb();
3336 3376
3377 rtl_request_firmware(tp);
3378
3337 retval = request_irq(dev->irq, rtl8169_interrupt, 3379 retval = request_irq(dev->irq, rtl8169_interrupt,
3338 (tp->features & RTL_FEATURE_MSI) ? 0 : IRQF_SHARED, 3380 (tp->features & RTL_FEATURE_MSI) ? 0 : IRQF_SHARED,
3339 dev->name, dev); 3381 dev->name, dev);
3340 if (retval < 0) 3382 if (retval < 0)
3341 goto err_release_ring_2; 3383 goto err_release_fw_2;
3342 3384
3343 napi_enable(&tp->napi); 3385 napi_enable(&tp->napi);
3344 3386
@@ -3359,7 +3401,8 @@ static int rtl8169_open(struct net_device *dev)
3359out: 3401out:
3360 return retval; 3402 return retval;
3361 3403
3362err_release_ring_2: 3404err_release_fw_2:
3405 rtl_release_firmware(tp);
3363 rtl8169_rx_clear(tp); 3406 rtl8169_rx_clear(tp);
3364err_free_rx_1: 3407err_free_rx_1:
3365 dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, 3408 dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 356e74d20b8..337bdcd5abc 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -2353,7 +2353,7 @@ static int start_nic(struct s2io_nic *nic)
2353 2353
2354 if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) { 2354 if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) {
2355 /* 2355 /*
2356 * Dont see link state interrupts initally on some switches, 2356 * Dont see link state interrupts initially on some switches,
2357 * so directly scheduling the link state task here. 2357 * so directly scheduling the link state task here.
2358 */ 2358 */
2359 schedule_work(&nic->set_link_task); 2359 schedule_work(&nic->set_link_task);
@@ -3563,7 +3563,7 @@ static void s2io_reset(struct s2io_nic *sp)
3563 } 3563 }
3564 3564
3565 /* 3565 /*
3566 * Clear spurious ECC interrupts that would have occured on 3566 * Clear spurious ECC interrupts that would have occurred on
3567 * XFRAME II cards after reset. 3567 * XFRAME II cards after reset.
3568 */ 3568 */
3569 if (sp->device_type == XFRAME_II_DEVICE) { 3569 if (sp->device_type == XFRAME_II_DEVICE) {
@@ -4065,7 +4065,7 @@ static int s2io_close(struct net_device *dev)
4065 * Description : 4065 * Description :
4066 * This function is the Tx entry point of the driver. S2IO NIC supports 4066 * This function is the Tx entry point of the driver. S2IO NIC supports
4067 * certain protocol assist features on Tx side, namely CSO, S/G, LSO. 4067 * certain protocol assist features on Tx side, namely CSO, S/G, LSO.
4068 * NOTE: when device cant queue the pkt,just the trans_start variable will 4068 * NOTE: when device can't queue the pkt,just the trans_start variable will
4069 * not be upadted. 4069 * not be upadted.
4070 * Return value: 4070 * Return value:
4071 * 0 on success & 1 on failure. 4071 * 0 on success & 1 on failure.
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 7d160306b65..2d144979f6f 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -376,7 +376,7 @@ static const u16 fifo_selector[MAX_TX_FIFOS] = {0, 1, 3, 3, 7, 7, 7, 7};
376/* Maintains Per FIFO related information. */ 376/* Maintains Per FIFO related information. */
377struct tx_fifo_config { 377struct tx_fifo_config {
378#define MAX_AVAILABLE_TXDS 8192 378#define MAX_AVAILABLE_TXDS 8192
379 u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ 379 u32 fifo_len; /* specifies len of FIFO up to 8192, ie no of TxDLs */
380/* Priority definition */ 380/* Priority definition */
381#define TX_FIFO_PRI_0 0 /*Highest */ 381#define TX_FIFO_PRI_0 0 /*Highest */
382#define TX_FIFO_PRI_1 1 382#define TX_FIFO_PRI_1 1
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index d890679e4c4..a3c2aab53de 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -328,7 +328,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
328 * processing to finish, then directly poll (and ack ) the eventq. 328 * processing to finish, then directly poll (and ack ) the eventq.
329 * Finally reenable NAPI and interrupts. 329 * Finally reenable NAPI and interrupts.
330 * 330 *
331 * Since we are touching interrupts the caller should hold the suspend lock 331 * This is for use only during a loopback self-test. It must not
332 * deliver any packets up the stack as this can result in deadlock.
332 */ 333 */
333void efx_process_channel_now(struct efx_channel *channel) 334void efx_process_channel_now(struct efx_channel *channel)
334{ 335{
@@ -336,6 +337,7 @@ void efx_process_channel_now(struct efx_channel *channel)
336 337
337 BUG_ON(channel->channel >= efx->n_channels); 338 BUG_ON(channel->channel >= efx->n_channels);
338 BUG_ON(!channel->enabled); 339 BUG_ON(!channel->enabled);
340 BUG_ON(!efx->loopback_selftest);
339 341
340 /* Disable interrupts and wait for ISRs to complete */ 342 /* Disable interrupts and wait for ISRs to complete */
341 efx_nic_disable_interrupts(efx); 343 efx_nic_disable_interrupts(efx);
@@ -1436,7 +1438,7 @@ static void efx_start_all(struct efx_nic *efx)
1436 * restart the transmit interface early so the watchdog timer stops */ 1438 * restart the transmit interface early so the watchdog timer stops */
1437 efx_start_port(efx); 1439 efx_start_port(efx);
1438 1440
1439 if (efx_dev_registered(efx)) 1441 if (efx_dev_registered(efx) && !efx->port_inhibited)
1440 netif_tx_wake_all_queues(efx->net_dev); 1442 netif_tx_wake_all_queues(efx->net_dev);
1441 1443
1442 efx_for_each_channel(channel, efx) 1444 efx_for_each_channel(channel, efx)
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 734fcfb52e8..d96b23769bd 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -692,7 +692,7 @@ static int falcon_gmii_wait(struct efx_nic *efx)
692 efx_oword_t md_stat; 692 efx_oword_t md_stat;
693 int count; 693 int count;
694 694
695 /* wait upto 50ms - taken max from datasheet */ 695 /* wait up to 50ms - taken max from datasheet */
696 for (count = 0; count < 5000; count++) { 696 for (count = 0; count < 5000; count++) {
697 efx_reado(efx, &md_stat, FR_AB_MD_STAT); 697 efx_reado(efx, &md_stat, FR_AB_MD_STAT);
698 if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) { 698 if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) {
@@ -1221,7 +1221,7 @@ static int falcon_reset_sram(struct efx_nic *efx)
1221 1221
1222 return 0; 1222 return 0;
1223 } 1223 }
1224 } while (++count < 20); /* wait upto 0.4 sec */ 1224 } while (++count < 20); /* wait up to 0.4 sec */
1225 1225
1226 netif_err(efx, hw, efx->net_dev, "timed out waiting for SRAM reset\n"); 1226 netif_err(efx, hw, efx->net_dev, "timed out waiting for SRAM reset\n");
1227 return -ETIMEDOUT; 1227 return -ETIMEDOUT;
diff --git a/drivers/net/sfc/io.h b/drivers/net/sfc/io.h
index d9d8c2ef107..cc978803d48 100644
--- a/drivers/net/sfc/io.h
+++ b/drivers/net/sfc/io.h
@@ -152,6 +152,7 @@ static inline void efx_reado(struct efx_nic *efx, efx_oword_t *value,
152 152
153 spin_lock_irqsave(&efx->biu_lock, flags); 153 spin_lock_irqsave(&efx->biu_lock, flags);
154 value->u32[0] = _efx_readd(efx, reg + 0); 154 value->u32[0] = _efx_readd(efx, reg + 0);
155 rmb();
155 value->u32[1] = _efx_readd(efx, reg + 4); 156 value->u32[1] = _efx_readd(efx, reg + 4);
156 value->u32[2] = _efx_readd(efx, reg + 8); 157 value->u32[2] = _efx_readd(efx, reg + 8);
157 value->u32[3] = _efx_readd(efx, reg + 12); 158 value->u32[3] = _efx_readd(efx, reg + 12);
@@ -174,6 +175,7 @@ static inline void efx_sram_readq(struct efx_nic *efx, void __iomem *membase,
174 value->u64[0] = (__force __le64)__raw_readq(membase + addr); 175 value->u64[0] = (__force __le64)__raw_readq(membase + addr);
175#else 176#else
176 value->u32[0] = (__force __le32)__raw_readl(membase + addr); 177 value->u32[0] = (__force __le32)__raw_readl(membase + addr);
178 rmb();
177 value->u32[1] = (__force __le32)__raw_readl(membase + addr + 4); 179 value->u32[1] = (__force __le32)__raw_readl(membase + addr + 4);
178#endif 180#endif
179 spin_unlock_irqrestore(&efx->biu_lock, flags); 181 spin_unlock_irqrestore(&efx->biu_lock, flags);
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
index 5e118f0d247..d98479030ef 100644
--- a/drivers/net/sfc/mcdi.c
+++ b/drivers/net/sfc/mcdi.c
@@ -453,7 +453,7 @@ static void efx_mcdi_ev_death(struct efx_nic *efx, int rc)
453 * 453 *
454 * There's a race here with efx_mcdi_rpc(), because we might receive 454 * There's a race here with efx_mcdi_rpc(), because we might receive
455 * a REBOOT event *before* the request has been copied out. In polled 455 * a REBOOT event *before* the request has been copied out. In polled
456 * mode (during startup) this is irrelevent, because efx_mcdi_complete() 456 * mode (during startup) this is irrelevant, because efx_mcdi_complete()
457 * is ignored. In event mode, this condition is just an edge-case of 457 * is ignored. In event mode, this condition is just an edge-case of
458 * receiving a REBOOT event after posting the MCDI request. Did the mc 458 * receiving a REBOOT event after posting the MCDI request. Did the mc
459 * reboot before or after the copyout? The best we can do always is 459 * reboot before or after the copyout? The best we can do always is
diff --git a/drivers/net/sfc/mcdi_pcol.h b/drivers/net/sfc/mcdi_pcol.h
index b86a15f221a..41fe06fa060 100644
--- a/drivers/net/sfc/mcdi_pcol.h
+++ b/drivers/net/sfc/mcdi_pcol.h
@@ -103,7 +103,7 @@
103 * 103 *
104 * If Code==CMDDONE, then the fields are further interpreted as: 104 * If Code==CMDDONE, then the fields are further interpreted as:
105 * 105 *
106 * - LEVEL==INFO Command succeded 106 * - LEVEL==INFO Command succeeded
107 * - LEVEL==ERR Command failed 107 * - LEVEL==ERR Command failed
108 * 108 *
109 * 0 8 16 24 32 109 * 0 8 16 24 32
@@ -572,7 +572,7 @@
572 (4*(_numwords)) 572 (4*(_numwords))
573 573
574/* MC_CMD_SET_RAND_SEED: 574/* MC_CMD_SET_RAND_SEED:
575 * Set the 16byte seed for the MC psuedo-random generator 575 * Set the 16byte seed for the MC pseudo-random generator
576 */ 576 */
577#define MC_CMD_SET_RAND_SEED 0x1a 577#define MC_CMD_SET_RAND_SEED 0x1a
578#define MC_CMD_SET_RAND_SEED_IN_LEN 16 578#define MC_CMD_SET_RAND_SEED_IN_LEN 16
@@ -1162,7 +1162,7 @@
1162#define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1 1162#define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1
1163#define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2 1163#define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2
1164#define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1 1164#define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1
1165/* Remaining PERIOD* fields only relevent when PERIODIC_CHANGE is set */ 1165/* Remaining PERIOD* fields only relevant when PERIODIC_CHANGE is set */
1166#define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3 1166#define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3
1167#define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1 1167#define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1
1168#define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4 1168#define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4
diff --git a/drivers/net/sfc/mcdi_phy.c b/drivers/net/sfc/mcdi_phy.c
index ec3f740f546..7e3c65b0c99 100644
--- a/drivers/net/sfc/mcdi_phy.c
+++ b/drivers/net/sfc/mcdi_phy.c
@@ -449,7 +449,7 @@ void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa)
449 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; 449 struct efx_mcdi_phy_data *phy_cfg = efx->phy_data;
450 u32 rmtadv; 450 u32 rmtadv;
451 451
452 /* The link partner capabilities are only relevent if the 452 /* The link partner capabilities are only relevant if the
453 * link supports flow control autonegotiation */ 453 * link supports flow control autonegotiation */
454 if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN)) 454 if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN))
455 return; 455 return;
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 215d5c51bfa..191a311da2d 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -330,7 +330,6 @@ enum efx_rx_alloc_method {
330 * @eventq_mask: Event queue pointer mask 330 * @eventq_mask: Event queue pointer mask
331 * @eventq_read_ptr: Event queue read pointer 331 * @eventq_read_ptr: Event queue read pointer
332 * @last_eventq_read_ptr: Last event queue read pointer value. 332 * @last_eventq_read_ptr: Last event queue read pointer value.
333 * @magic_count: Event queue test event count
334 * @irq_count: Number of IRQs since last adaptive moderation decision 333 * @irq_count: Number of IRQs since last adaptive moderation decision
335 * @irq_mod_score: IRQ moderation score 334 * @irq_mod_score: IRQ moderation score
336 * @rx_alloc_level: Watermark based heuristic counter for pushing descriptors 335 * @rx_alloc_level: Watermark based heuristic counter for pushing descriptors
@@ -360,7 +359,6 @@ struct efx_channel {
360 unsigned int eventq_mask; 359 unsigned int eventq_mask;
361 unsigned int eventq_read_ptr; 360 unsigned int eventq_read_ptr;
362 unsigned int last_eventq_read_ptr; 361 unsigned int last_eventq_read_ptr;
363 unsigned int magic_count;
364 362
365 unsigned int irq_count; 363 unsigned int irq_count;
366 unsigned int irq_mod_score; 364 unsigned int irq_mod_score;
@@ -670,7 +668,7 @@ struct efx_filter_state;
670 * @irq_zero_count: Number of legacy IRQs seen with queue flags == 0 668 * @irq_zero_count: Number of legacy IRQs seen with queue flags == 0
671 * @fatal_irq_level: IRQ level (bit number) used for serious errors 669 * @fatal_irq_level: IRQ level (bit number) used for serious errors
672 * @mtd_list: List of MTDs attached to the NIC 670 * @mtd_list: List of MTDs attached to the NIC
673 * @nic_data: Hardware dependant state 671 * @nic_data: Hardware dependent state
674 * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode, 672 * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode,
675 * @port_inhibited, efx_monitor() and efx_reconfigure_port() 673 * @port_inhibited, efx_monitor() and efx_reconfigure_port()
676 * @port_enabled: Port enabled indicator. 674 * @port_enabled: Port enabled indicator.
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c
index e8396614daf..10f1cb79c14 100644
--- a/drivers/net/sfc/nic.c
+++ b/drivers/net/sfc/nic.c
@@ -84,7 +84,8 @@ static inline void efx_write_buf_tbl(struct efx_nic *efx, efx_qword_t *value,
84static inline efx_qword_t *efx_event(struct efx_channel *channel, 84static inline efx_qword_t *efx_event(struct efx_channel *channel,
85 unsigned int index) 85 unsigned int index)
86{ 86{
87 return ((efx_qword_t *) (channel->eventq.addr)) + index; 87 return ((efx_qword_t *) (channel->eventq.addr)) +
88 (index & channel->eventq_mask);
88} 89}
89 90
90/* See if an event is present 91/* See if an event is present
@@ -673,7 +674,8 @@ void efx_nic_eventq_read_ack(struct efx_channel *channel)
673 efx_dword_t reg; 674 efx_dword_t reg;
674 struct efx_nic *efx = channel->efx; 675 struct efx_nic *efx = channel->efx;
675 676
676 EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR, channel->eventq_read_ptr); 677 EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR,
678 channel->eventq_read_ptr & channel->eventq_mask);
677 efx_writed_table(efx, &reg, efx->type->evq_rptr_tbl_base, 679 efx_writed_table(efx, &reg, efx->type->evq_rptr_tbl_base,
678 channel->channel); 680 channel->channel);
679} 681}
@@ -908,7 +910,7 @@ efx_handle_generated_event(struct efx_channel *channel, efx_qword_t *event)
908 910
909 code = EFX_QWORD_FIELD(*event, FSF_AZ_DRV_GEN_EV_MAGIC); 911 code = EFX_QWORD_FIELD(*event, FSF_AZ_DRV_GEN_EV_MAGIC);
910 if (code == EFX_CHANNEL_MAGIC_TEST(channel)) 912 if (code == EFX_CHANNEL_MAGIC_TEST(channel))
911 ++channel->magic_count; 913 ; /* ignore */
912 else if (code == EFX_CHANNEL_MAGIC_FILL(channel)) 914 else if (code == EFX_CHANNEL_MAGIC_FILL(channel))
913 /* The queue must be empty, so we won't receive any rx 915 /* The queue must be empty, so we won't receive any rx
914 * events, so efx_process_channel() won't refill the 916 * events, so efx_process_channel() won't refill the
@@ -1015,8 +1017,7 @@ int efx_nic_process_eventq(struct efx_channel *channel, int budget)
1015 /* Clear this event by marking it all ones */ 1017 /* Clear this event by marking it all ones */
1016 EFX_SET_QWORD(*p_event); 1018 EFX_SET_QWORD(*p_event);
1017 1019
1018 /* Increment read pointer */ 1020 ++read_ptr;
1019 read_ptr = (read_ptr + 1) & channel->eventq_mask;
1020 1021
1021 ev_code = EFX_QWORD_FIELD(event, FSF_AZ_EV_CODE); 1022 ev_code = EFX_QWORD_FIELD(event, FSF_AZ_EV_CODE);
1022 1023
@@ -1060,6 +1061,13 @@ out:
1060 return spent; 1061 return spent;
1061} 1062}
1062 1063
1064/* Check whether an event is present in the eventq at the current
1065 * read pointer. Only useful for self-test.
1066 */
1067bool efx_nic_event_present(struct efx_channel *channel)
1068{
1069 return efx_event_present(efx_event(channel, channel->eventq_read_ptr));
1070}
1063 1071
1064/* Allocate buffer table entries for event queue */ 1072/* Allocate buffer table entries for event queue */
1065int efx_nic_probe_eventq(struct efx_channel *channel) 1073int efx_nic_probe_eventq(struct efx_channel *channel)
@@ -1165,7 +1173,7 @@ static void efx_poll_flush_events(struct efx_nic *efx)
1165 struct efx_tx_queue *tx_queue; 1173 struct efx_tx_queue *tx_queue;
1166 struct efx_rx_queue *rx_queue; 1174 struct efx_rx_queue *rx_queue;
1167 unsigned int read_ptr = channel->eventq_read_ptr; 1175 unsigned int read_ptr = channel->eventq_read_ptr;
1168 unsigned int end_ptr = (read_ptr - 1) & channel->eventq_mask; 1176 unsigned int end_ptr = read_ptr + channel->eventq_mask - 1;
1169 1177
1170 do { 1178 do {
1171 efx_qword_t *event = efx_event(channel, read_ptr); 1179 efx_qword_t *event = efx_event(channel, read_ptr);
@@ -1205,7 +1213,7 @@ static void efx_poll_flush_events(struct efx_nic *efx)
1205 * it's ok to throw away every non-flush event */ 1213 * it's ok to throw away every non-flush event */
1206 EFX_SET_QWORD(*event); 1214 EFX_SET_QWORD(*event);
1207 1215
1208 read_ptr = (read_ptr + 1) & channel->eventq_mask; 1216 ++read_ptr;
1209 } while (read_ptr != end_ptr); 1217 } while (read_ptr != end_ptr);
1210 1218
1211 channel->eventq_read_ptr = read_ptr; 1219 channel->eventq_read_ptr = read_ptr;
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h
index d9de1b647d4..a42db6e35be 100644
--- a/drivers/net/sfc/nic.h
+++ b/drivers/net/sfc/nic.h
@@ -184,6 +184,7 @@ extern void efx_nic_fini_eventq(struct efx_channel *channel);
184extern void efx_nic_remove_eventq(struct efx_channel *channel); 184extern void efx_nic_remove_eventq(struct efx_channel *channel);
185extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota); 185extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota);
186extern void efx_nic_eventq_read_ack(struct efx_channel *channel); 186extern void efx_nic_eventq_read_ack(struct efx_channel *channel);
187extern bool efx_nic_event_present(struct efx_channel *channel);
187 188
188/* MAC/PHY */ 189/* MAC/PHY */
189extern void falcon_drain_tx_fifo(struct efx_nic *efx); 190extern void falcon_drain_tx_fifo(struct efx_nic *efx);
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index a0f49b348d6..50ad3bcaf68 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -131,8 +131,6 @@ static int efx_test_chip(struct efx_nic *efx, struct efx_self_tests *tests)
131static int efx_test_interrupts(struct efx_nic *efx, 131static int efx_test_interrupts(struct efx_nic *efx,
132 struct efx_self_tests *tests) 132 struct efx_self_tests *tests)
133{ 133{
134 struct efx_channel *channel;
135
136 netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n"); 134 netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n");
137 tests->interrupt = -1; 135 tests->interrupt = -1;
138 136
@@ -140,15 +138,6 @@ static int efx_test_interrupts(struct efx_nic *efx,
140 efx->last_irq_cpu = -1; 138 efx->last_irq_cpu = -1;
141 smp_wmb(); 139 smp_wmb();
142 140
143 /* ACK each interrupting event queue. Receiving an interrupt due to
144 * traffic before a test event is raised is considered a pass */
145 efx_for_each_channel(channel, efx) {
146 if (channel->work_pending)
147 efx_process_channel_now(channel);
148 if (efx->last_irq_cpu >= 0)
149 goto success;
150 }
151
152 efx_nic_generate_interrupt(efx); 141 efx_nic_generate_interrupt(efx);
153 142
154 /* Wait for arrival of test interrupt. */ 143 /* Wait for arrival of test interrupt. */
@@ -173,13 +162,13 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
173 struct efx_self_tests *tests) 162 struct efx_self_tests *tests)
174{ 163{
175 struct efx_nic *efx = channel->efx; 164 struct efx_nic *efx = channel->efx;
176 unsigned int magic_count, count; 165 unsigned int read_ptr, count;
177 166
178 tests->eventq_dma[channel->channel] = -1; 167 tests->eventq_dma[channel->channel] = -1;
179 tests->eventq_int[channel->channel] = -1; 168 tests->eventq_int[channel->channel] = -1;
180 tests->eventq_poll[channel->channel] = -1; 169 tests->eventq_poll[channel->channel] = -1;
181 170
182 magic_count = channel->magic_count; 171 read_ptr = channel->eventq_read_ptr;
183 channel->efx->last_irq_cpu = -1; 172 channel->efx->last_irq_cpu = -1;
184 smp_wmb(); 173 smp_wmb();
185 174
@@ -190,10 +179,7 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
190 do { 179 do {
191 schedule_timeout_uninterruptible(HZ / 100); 180 schedule_timeout_uninterruptible(HZ / 100);
192 181
193 if (channel->work_pending) 182 if (ACCESS_ONCE(channel->eventq_read_ptr) != read_ptr)
194 efx_process_channel_now(channel);
195
196 if (channel->magic_count != magic_count)
197 goto eventq_ok; 183 goto eventq_ok;
198 } while (++count < 2); 184 } while (++count < 2);
199 185
@@ -211,8 +197,7 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
211 } 197 }
212 198
213 /* Check to see if event was received even if interrupt wasn't */ 199 /* Check to see if event was received even if interrupt wasn't */
214 efx_process_channel_now(channel); 200 if (efx_nic_event_present(channel)) {
215 if (channel->magic_count != magic_count) {
216 netif_err(efx, drv, efx->net_dev, 201 netif_err(efx, drv, efx->net_dev,
217 "channel %d event was generated, but " 202 "channel %d event was generated, but "
218 "failed to trigger an interrupt\n", channel->channel); 203 "failed to trigger an interrupt\n", channel->channel);
@@ -770,6 +755,8 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
770 __efx_reconfigure_port(efx); 755 __efx_reconfigure_port(efx);
771 mutex_unlock(&efx->mac_lock); 756 mutex_unlock(&efx->mac_lock);
772 757
758 netif_tx_wake_all_queues(efx->net_dev);
759
773 return rc_test; 760 return rc_test;
774} 761}
775 762
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 13980190821..d2c85dfdf3b 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -435,7 +435,8 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
435 * queue state. */ 435 * queue state. */
436 smp_mb(); 436 smp_mb();
437 if (unlikely(netif_tx_queue_stopped(tx_queue->core_txq)) && 437 if (unlikely(netif_tx_queue_stopped(tx_queue->core_txq)) &&
438 likely(efx->port_enabled)) { 438 likely(efx->port_enabled) &&
439 likely(!efx->port_inhibited)) {
439 fill_level = tx_queue->insert_count - tx_queue->read_count; 440 fill_level = tx_queue->insert_count - tx_queue->read_count;
440 if (fill_level < EFX_TXQ_THRESHOLD(efx)) { 441 if (fill_level < EFX_TXQ_THRESHOLD(efx)) {
441 EFX_BUG_ON_PARANOID(!efx_dev_registered(efx)); 442 EFX_BUG_ON_PARANOID(!efx_dev_registered(efx));
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 3a0cc63428e..dd03bf61998 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -33,7 +33,7 @@ static char *sgiseeqstr = "SGI Seeq8003";
33 * with that in mind, I've decided to make this driver look completely like a 33 * with that in mind, I've decided to make this driver look completely like a
34 * stupid Lance from a driver architecture perspective. Only difference is that 34 * stupid Lance from a driver architecture perspective. Only difference is that
35 * here our "ring buffer" looks and acts like a real Lance one does but is 35 * here our "ring buffer" looks and acts like a real Lance one does but is
36 * layed out like how the HPC DMA and the Seeq want it to. You'd be surprised 36 * laid out like how the HPC DMA and the Seeq want it to. You'd be surprised
37 * how a stupid idea like this can pay off in performance, not to mention 37 * how a stupid idea like this can pay off in performance, not to mention
38 * making this driver 2,000 times easier to write. ;-) 38 * making this driver 2,000 times easier to write. ;-)
39 */ 39 */
@@ -77,7 +77,7 @@ struct sgiseeq_tx_desc {
77}; 77};
78 78
79/* 79/*
80 * Warning: This structure is layed out in a certain way because HPC dma 80 * Warning: This structure is laid out in a certain way because HPC dma
81 * descriptors must be 8-byte aligned. So don't touch this without 81 * descriptors must be 8-byte aligned. So don't touch this without
82 * some care. 82 * some care.
83 */ 83 */
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index e9e7a530552..8a72a979ee7 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -1875,7 +1875,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
1875 if (ret) 1875 if (ret)
1876 goto out_unregister; 1876 goto out_unregister;
1877 1877
1878 /* print device infomation */ 1878 /* print device information */
1879 pr_info("Base address at 0x%x, %pM, IRQ %d.\n", 1879 pr_info("Base address at 0x%x, %pM, IRQ %d.\n",
1880 (u32)ndev->base_addr, ndev->dev_addr, ndev->irq); 1880 (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
1881 1881
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 3406ed87091..b436e007eea 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -93,7 +93,7 @@ enum sis190_registers {
93 IntrStatus = 0x20, 93 IntrStatus = 0x20,
94 IntrMask = 0x24, 94 IntrMask = 0x24,
95 IntrControl = 0x28, 95 IntrControl = 0x28,
96 IntrTimer = 0x2c, // unused (Interupt Timer) 96 IntrTimer = 0x2c, // unused (Interrupt Timer)
97 PMControl = 0x30, // unused (Power Mgmt Control/Status) 97 PMControl = 0x30, // unused (Power Mgmt Control/Status)
98 rsv2 = 0x34, // reserved 98 rsv2 = 0x34, // reserved
99 ROMControl = 0x38, 99 ROMControl = 0x38,
@@ -234,7 +234,7 @@ enum _DescStatusBit {
234 RxSizeMask = 0x0000ffff 234 RxSizeMask = 0x0000ffff
235 /* 235 /*
236 * The asic could apparently do vlan, TSO, jumbo (sis191 only) and 236 * The asic could apparently do vlan, TSO, jumbo (sis191 only) and
237 * provide two (unused with Linux) Tx queues. No publically 237 * provide two (unused with Linux) Tx queues. No publicly
238 * available documentation alas. 238 * available documentation alas.
239 */ 239 */
240}; 240};
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index 84d4167eee9..484f795a779 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -240,7 +240,8 @@ static const struct ethtool_ops sis900_ethtool_ops;
240 * @net_dev: the net device to get address for 240 * @net_dev: the net device to get address for
241 * 241 *
242 * Older SiS900 and friends, use EEPROM to store MAC address. 242 * Older SiS900 and friends, use EEPROM to store MAC address.
243 * MAC address is read from read_eeprom() into @net_dev->dev_addr. 243 * MAC address is read from read_eeprom() into @net_dev->dev_addr and
244 * @net_dev->perm_addr.
244 */ 245 */
245 246
246static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev) 247static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev)
@@ -261,6 +262,9 @@ static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_de
261 for (i = 0; i < 3; i++) 262 for (i = 0; i < 3; i++)
262 ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr); 263 ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);
263 264
265 /* Store MAC Address in perm_addr */
266 memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
267
264 return 1; 268 return 1;
265} 269}
266 270
@@ -271,7 +275,8 @@ static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_de
271 * 275 *
272 * SiS630E model, use APC CMOS RAM to store MAC address. 276 * SiS630E model, use APC CMOS RAM to store MAC address.
273 * APC CMOS RAM is accessed through ISA bridge. 277 * APC CMOS RAM is accessed through ISA bridge.
274 * MAC address is read into @net_dev->dev_addr. 278 * MAC address is read into @net_dev->dev_addr and
279 * @net_dev->perm_addr.
275 */ 280 */
276 281
277static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev, 282static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
@@ -296,6 +301,10 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
296 outb(0x09 + i, 0x70); 301 outb(0x09 + i, 0x70);
297 ((u8 *)(net_dev->dev_addr))[i] = inb(0x71); 302 ((u8 *)(net_dev->dev_addr))[i] = inb(0x71);
298 } 303 }
304
305 /* Store MAC Address in perm_addr */
306 memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
307
299 pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40); 308 pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40);
300 pci_dev_put(isa_bridge); 309 pci_dev_put(isa_bridge);
301 310
@@ -310,7 +319,7 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
310 * 319 *
311 * SiS635 model, set MAC Reload Bit to load Mac address from APC 320 * SiS635 model, set MAC Reload Bit to load Mac address from APC
312 * to rfdr. rfdr is accessed through rfcr. MAC address is read into 321 * to rfdr. rfdr is accessed through rfcr. MAC address is read into
313 * @net_dev->dev_addr. 322 * @net_dev->dev_addr and @net_dev->perm_addr.
314 */ 323 */
315 324
316static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev, 325static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,
@@ -334,6 +343,9 @@ static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,
334 *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr); 343 *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr);
335 } 344 }
336 345
346 /* Store MAC Address in perm_addr */
347 memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
348
337 /* enable packet filtering */ 349 /* enable packet filtering */
338 outl(rfcrSave | RFEN, rfcr + ioaddr); 350 outl(rfcrSave | RFEN, rfcr + ioaddr);
339 351
@@ -353,7 +365,7 @@ static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,
353 * EEDONE signal to refuse EEPROM access by LAN. 365 * EEDONE signal to refuse EEPROM access by LAN.
354 * The EEPROM map of SiS962 or SiS963 is different to SiS900. 366 * The EEPROM map of SiS962 or SiS963 is different to SiS900.
355 * The signature field in SiS962 or SiS963 spec is meaningless. 367 * The signature field in SiS962 or SiS963 spec is meaningless.
356 * MAC address is read into @net_dev->dev_addr. 368 * MAC address is read into @net_dev->dev_addr and @net_dev->perm_addr.
357 */ 369 */
358 370
359static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev, 371static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev,
@@ -372,6 +384,9 @@ static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev,
372 for (i = 0; i < 3; i++) 384 for (i = 0; i < 3; i++)
373 ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr); 385 ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);
374 386
387 /* Store MAC Address in perm_addr */
388 memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
389
375 outl(EEDONE, ee_addr); 390 outl(EEDONE, ee_addr);
376 return 1; 391 return 1;
377 } else { 392 } else {
@@ -1180,7 +1195,7 @@ sis900_init_rx_ring(struct net_device *net_dev)
1180 * 1195 *
1181 * 630E equalizer workaround rule(Cyrus Huang 08/15) 1196 * 630E equalizer workaround rule(Cyrus Huang 08/15)
1182 * PHY register 14h(Test) 1197 * PHY register 14h(Test)
1183 * Bit 14: 0 -- Automatically dectect (default) 1198 * Bit 14: 0 -- Automatically detect (default)
1184 * 1 -- Manually set Equalizer filter 1199 * 1 -- Manually set Equalizer filter
1185 * Bit 13: 0 -- (Default) 1200 * Bit 13: 0 -- (Default)
1186 * 1 -- Speed up convergence of equalizer setting 1201 * 1 -- Speed up convergence of equalizer setting
@@ -1192,7 +1207,7 @@ sis900_init_rx_ring(struct net_device *net_dev)
1192 * Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0 1207 * Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0
1193 * Link Off:Set Bit 13 to 1, Bit 14 to 0 1208 * Link Off:Set Bit 13 to 1, Bit 14 to 0
1194 * Calculate Equalizer value: 1209 * Calculate Equalizer value:
1195 * When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value. 1210 * When Link is ON and Bit 14 is 0, SIS900PHY will auto-detect proper equalizer value.
1196 * When the equalizer is stable, this value is not a fixed value. It will be within 1211 * When the equalizer is stable, this value is not a fixed value. It will be within
1197 * a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9) 1212 * a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9)
1198 * 0 <= max <= 4 --> set equalizer to max 1213 * 0 <= max <= 4 --> set equalizer to max
@@ -1723,7 +1738,7 @@ static int sis900_rx(struct net_device *net_dev)
1723 rx_size = data_size - CRC_SIZE; 1738 rx_size = data_size - CRC_SIZE;
1724 1739
1725#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) 1740#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
1726 /* ``TOOLONG'' flag means jumbo packet recived. */ 1741 /* ``TOOLONG'' flag means jumbo packet received. */
1727 if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE) 1742 if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE)
1728 rx_status &= (~ ((unsigned int)TOOLONG)); 1743 rx_status &= (~ ((unsigned int)TOOLONG));
1729#endif 1744#endif
diff --git a/drivers/net/skfp/ess.c b/drivers/net/skfp/ess.c
index 8639a0884f5..2fc5987b41d 100644
--- a/drivers/net/skfp/ess.c
+++ b/drivers/net/skfp/ess.c
@@ -241,7 +241,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
241 != SMT_RDF_SUCCESS) || 241 != SMT_RDF_SUCCESS) ||
242 (sm->smt_tid != smc->ess.alloc_trans_id)) { 242 (sm->smt_tid != smc->ess.alloc_trans_id)) {
243 243
244 DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ; 244 DB_ESS("ESS: Allocation Response not accepted\n",0,0) ;
245 return fs; 245 return fs;
246 } 246 }
247 247
@@ -393,7 +393,7 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe
393 * | T-NEG | 393 * | T-NEG |
394 * - - 394 * - -
395 * 395 *
396 * T-NEG is discribed by the equation: 396 * T-NEG is described by the equation:
397 * 397 *
398 * (-) fddiMACT-NEG 398 * (-) fddiMACT-NEG
399 * T-NEG = ------------------- 399 * T-NEG = -------------------
@@ -479,7 +479,7 @@ static void ess_send_response(struct s_smc *smc, struct smt_header *sm,
479 void *p ; 479 void *p ;
480 480
481 /* 481 /*
482 * get and initialize the responce frame 482 * get and initialize the response frame
483 */ 483 */
484 if (sba_cmd == CHANGE_ALLOCATION) { 484 if (sba_cmd == CHANGE_ALLOCATION) {
485 if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REPLY, 485 if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REPLY,
@@ -578,7 +578,7 @@ static void ess_send_alc_req(struct s_smc *smc)
578 } 578 }
579 579
580 /* 580 /*
581 * get and initialize the responce frame 581 * get and initialize the response frame
582 */ 582 */
583 if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REQUEST, 583 if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REQUEST,
584 sizeof(struct smt_sba_alc_req)))) 584 sizeof(struct smt_sba_alc_req))))
diff --git a/drivers/net/skfp/fplustm.c b/drivers/net/skfp/fplustm.c
index ca4e7bb6a5a..a20ed1a9809 100644
--- a/drivers/net/skfp/fplustm.c
+++ b/drivers/net/skfp/fplustm.c
@@ -340,7 +340,7 @@ static void mac_counter_init(struct s_smc *smc)
340 outpw(FM_A(FM_LCNTR),0) ; 340 outpw(FM_A(FM_LCNTR),0) ;
341 outpw(FM_A(FM_ECNTR),0) ; 341 outpw(FM_A(FM_ECNTR),0) ;
342 /* 342 /*
343 * clear internal error counter stucture 343 * clear internal error counter structure
344 */ 344 */
345 ec = (u_long *)&smc->hw.fp.err_stats ; 345 ec = (u_long *)&smc->hw.fp.err_stats ;
346 for (i = (sizeof(struct err_st)/sizeof(long)) ; i ; i--) 346 for (i = (sizeof(struct err_st)/sizeof(long)) ; i ; i--)
@@ -1262,8 +1262,8 @@ Function DOWNCALL/INTERN (SMT, fplustm.c)
1262 1262
1263Para mode = 1 RX_ENABLE_ALLMULTI enable all multicasts 1263Para mode = 1 RX_ENABLE_ALLMULTI enable all multicasts
1264 2 RX_DISABLE_ALLMULTI disable "enable all multicasts" 1264 2 RX_DISABLE_ALLMULTI disable "enable all multicasts"
1265 3 RX_ENABLE_PROMISC enable promiscous 1265 3 RX_ENABLE_PROMISC enable promiscuous
1266 4 RX_DISABLE_PROMISC disable promiscous 1266 4 RX_DISABLE_PROMISC disable promiscuous
1267 5 RX_ENABLE_NSA enable reception of NSA frames 1267 5 RX_ENABLE_NSA enable reception of NSA frames
1268 6 RX_DISABLE_NSA disable reception of NSA frames 1268 6 RX_DISABLE_NSA disable reception of NSA frames
1269 1269
diff --git a/drivers/net/skfp/h/cmtdef.h b/drivers/net/skfp/h/cmtdef.h
index f2f771d8be7..5a6c6122ccb 100644
--- a/drivers/net/skfp/h/cmtdef.h
+++ b/drivers/net/skfp/h/cmtdef.h
@@ -19,7 +19,7 @@
19 19
20/* 20/*
21 * implementation specific constants 21 * implementation specific constants
22 * MODIIFY THE FOLLWOING THREE DEFINES 22 * MODIIFY THE FOLLOWING THREE DEFINES
23 */ 23 */
24#define AMDPLC /* if Amd PLC chip used */ 24#define AMDPLC /* if Amd PLC chip used */
25#ifdef CONC 25#ifdef CONC
@@ -456,7 +456,7 @@ struct s_plc {
456 u_long soft_err ; /* error counter */ 456 u_long soft_err ; /* error counter */
457 u_long parity_err ; /* error counter */ 457 u_long parity_err ; /* error counter */
458 u_long ebuf_err ; /* error counter */ 458 u_long ebuf_err ; /* error counter */
459 u_long ebuf_cont ; /* continous error counter */ 459 u_long ebuf_cont ; /* continuous error counter */
460 u_long phyinv ; /* error counter */ 460 u_long phyinv ; /* error counter */
461 u_long vsym_ctr ; /* error counter */ 461 u_long vsym_ctr ; /* error counter */
462 u_long mini_ctr ; /* error counter */ 462 u_long mini_ctr ; /* error counter */
diff --git a/drivers/net/skfp/h/fplustm.h b/drivers/net/skfp/h/fplustm.h
index 6d738e1e239..d43191ed938 100644
--- a/drivers/net/skfp/h/fplustm.h
+++ b/drivers/net/skfp/h/fplustm.h
@@ -237,8 +237,8 @@ struct s_smt_fp {
237 */ 237 */
238#define RX_ENABLE_ALLMULTI 1 /* enable all multicasts */ 238#define RX_ENABLE_ALLMULTI 1 /* enable all multicasts */
239#define RX_DISABLE_ALLMULTI 2 /* disable "enable all multicasts" */ 239#define RX_DISABLE_ALLMULTI 2 /* disable "enable all multicasts" */
240#define RX_ENABLE_PROMISC 3 /* enable promiscous */ 240#define RX_ENABLE_PROMISC 3 /* enable promiscuous */
241#define RX_DISABLE_PROMISC 4 /* disable promiscous */ 241#define RX_DISABLE_PROMISC 4 /* disable promiscuous */
242#define RX_ENABLE_NSA 5 /* enable reception of NSA frames */ 242#define RX_ENABLE_NSA 5 /* enable reception of NSA frames */
243#define RX_DISABLE_NSA 6 /* disable reception of NSA frames */ 243#define RX_DISABLE_NSA 6 /* disable reception of NSA frames */
244 244
diff --git a/drivers/net/skfp/h/smc.h b/drivers/net/skfp/h/smc.h
index 026a83b9f74..c774a95902f 100644
--- a/drivers/net/skfp/h/smc.h
+++ b/drivers/net/skfp/h/smc.h
@@ -388,7 +388,7 @@ struct smt_config {
388 u_long rmt_t_poll ; /* RMT : claim/beacon poller */ 388 u_long rmt_t_poll ; /* RMT : claim/beacon poller */
389 u_long rmt_dup_mac_behavior ; /* Flag for the beavior of SMT if 389 u_long rmt_dup_mac_behavior ; /* Flag for the beavior of SMT if
390 * a Duplicate MAC Address was detected. 390 * a Duplicate MAC Address was detected.
391 * FALSE: SMT will leave finaly the ring 391 * FALSE: SMT will leave finally the ring
392 * TRUE: SMT will reinstert into the ring 392 * TRUE: SMT will reinstert into the ring
393 */ 393 */
394 u_long mac_d_max ; /* MAC : D_Max timer value */ 394 u_long mac_d_max ; /* MAC : D_Max timer value */
diff --git a/drivers/net/skfp/h/smt.h b/drivers/net/skfp/h/smt.h
index 2976757a36f..2030f9cbb24 100644
--- a/drivers/net/skfp/h/smt.h
+++ b/drivers/net/skfp/h/smt.h
@@ -793,7 +793,7 @@ struct smt_rdf {
793} ; 793} ;
794 794
795/* 795/*
796 * SBA Request Allocation Responce Frame 796 * SBA Request Allocation Response Frame
797 */ 797 */
798struct smt_sba_alc_res { 798struct smt_sba_alc_res {
799 struct smt_header smt ; /* generic header */ 799 struct smt_header smt ; /* generic header */
diff --git a/drivers/net/skfp/h/supern_2.h b/drivers/net/skfp/h/supern_2.h
index 5ba0b830675..0b73690280f 100644
--- a/drivers/net/skfp/h/supern_2.h
+++ b/drivers/net/skfp/h/supern_2.h
@@ -14,7 +14,7 @@
14 14
15/* 15/*
16 defines for AMD Supernet II chip set 16 defines for AMD Supernet II chip set
17 the chips are refered to as 17 the chips are referred to as
18 FPLUS Formac Plus 18 FPLUS Formac Plus
19 PLC Physical Layer 19 PLC Physical Layer
20 20
@@ -386,7 +386,7 @@ struct tx_queue {
386#define FM_MDISRCV (4<<8) /* disable receive function */ 386#define FM_MDISRCV (4<<8) /* disable receive function */
387#define FM_MRES0 (5<<8) /* reserve */ 387#define FM_MRES0 (5<<8) /* reserve */
388#define FM_MLIMPROM (6<<8) /* limited-promiscuous mode */ 388#define FM_MLIMPROM (6<<8) /* limited-promiscuous mode */
389#define FM_MPROMISCOUS (7<<8) /* address detection : promiscous */ 389#define FM_MPROMISCOUS (7<<8) /* address detection : promiscuous */
390 390
391#define FM_SELSA 0x0800 /* select-short-address bit */ 391#define FM_SELSA 0x0800 /* select-short-address bit */
392 392
diff --git a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c
index af5a755e269..e26398b5a7d 100644
--- a/drivers/net/skfp/hwmtm.c
+++ b/drivers/net/skfp/hwmtm.c
@@ -691,7 +691,7 @@ static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue)
691 * interrupt service routine, handles the interrupt requests 691 * interrupt service routine, handles the interrupt requests
692 * generated by the FDDI adapter. 692 * generated by the FDDI adapter.
693 * 693 *
694 * NOTE: The operating system dependent module must garantee that the 694 * NOTE: The operating system dependent module must guarantee that the
695 * interrupts of the adapter are disabled when it calls fddi_isr. 695 * interrupts of the adapter are disabled when it calls fddi_isr.
696 * 696 *
697 * About the USE_BREAK_ISR mechanismn: 697 * About the USE_BREAK_ISR mechanismn:
diff --git a/drivers/net/skfp/pcmplc.c b/drivers/net/skfp/pcmplc.c
index 112d35b1bf0..88d02d0a42c 100644
--- a/drivers/net/skfp/pcmplc.c
+++ b/drivers/net/skfp/pcmplc.c
@@ -1680,7 +1680,7 @@ void plc_irq(struct s_smc *smc, int np, unsigned int cmd)
1680 * Prevent counter from being wrapped after 1680 * Prevent counter from being wrapped after
1681 * hanging years in that interrupt. 1681 * hanging years in that interrupt.
1682 */ 1682 */
1683 plc->ebuf_cont++ ; /* Ebuf continous error */ 1683 plc->ebuf_cont++ ; /* Ebuf continuous error */
1684 } 1684 }
1685 1685
1686#ifdef SUPERNET_3 1686#ifdef SUPERNET_3
@@ -1717,8 +1717,8 @@ void plc_irq(struct s_smc *smc, int np, unsigned int cmd)
1717 } 1717 }
1718#endif /* SUPERNET_3 */ 1718#endif /* SUPERNET_3 */
1719 } else { 1719 } else {
1720 /* Reset the continous error variable */ 1720 /* Reset the continuous error variable */
1721 plc->ebuf_cont = 0 ; /* reset Ebuf continous error */ 1721 plc->ebuf_cont = 0 ; /* reset Ebuf continuous error */
1722 } 1722 }
1723 if (cmd & PL_PHYINV) { /* physical layer invalid signal */ 1723 if (cmd & PL_PHYINV) { /* physical layer invalid signal */
1724 plc->phyinv++ ; 1724 plc->phyinv++ ;
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c
index 1e1bd0c201c..08d94329c12 100644
--- a/drivers/net/skfp/smt.c
+++ b/drivers/net/skfp/smt.c
@@ -219,7 +219,7 @@ void smt_emulate_token_ct(struct s_smc *smc, int mac_index)
219 219
220 /* 220 /*
221 * Only when ring is up we will have a token count. The 221 * Only when ring is up we will have a token count. The
222 * flag is unfortunatly a single instance value. This 222 * flag is unfortunately a single instance value. This
223 * doesn't matter now, because we currently have only 223 * doesn't matter now, because we currently have only
224 * one MAC instance. 224 * one MAC instance.
225 */ 225 */
diff --git a/drivers/net/skge.h b/drivers/net/skge.h
index 507addcaffa..51c0214ac25 100644
--- a/drivers/net/skge.h
+++ b/drivers/net/skge.h
@@ -1038,7 +1038,7 @@ enum {
1038 1038
1039 PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */ 1039 PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */
1040 PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */ 1040 PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */
1041 PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occured */ 1041 PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occurred */
1042 PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */ 1042 PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */
1043 PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */ 1043 PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */
1044 PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */ 1044 PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */
@@ -1721,8 +1721,8 @@ enum {
1721 GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */ 1721 GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */
1722 GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */ 1722 GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */
1723 GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */ 1723 GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */
1724 GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occured */ 1724 GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occurred */
1725 GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occured */ 1725 GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occurred */
1726 1726
1727 GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */ 1727 GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */
1728 GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */ 1728 GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */
@@ -2227,7 +2227,7 @@ enum {
2227 XM_ST_BC = 1<<7, /* Bit 7: Broadcast packet */ 2227 XM_ST_BC = 1<<7, /* Bit 7: Broadcast packet */
2228 XM_ST_MC = 1<<6, /* Bit 6: Multicast packet */ 2228 XM_ST_MC = 1<<6, /* Bit 6: Multicast packet */
2229 XM_ST_UC = 1<<5, /* Bit 5: Unicast packet */ 2229 XM_ST_UC = 1<<5, /* Bit 5: Unicast packet */
2230 XM_ST_TX_UR = 1<<4, /* Bit 4: FIFO Underrun occured */ 2230 XM_ST_TX_UR = 1<<4, /* Bit 4: FIFO Underrun occurred */
2231 XM_ST_CS_ERR = 1<<3, /* Bit 3: Carrier Sense Error */ 2231 XM_ST_CS_ERR = 1<<3, /* Bit 3: Carrier Sense Error */
2232 XM_ST_LAT_COL = 1<<2, /* Bit 2: Late Collision Error */ 2232 XM_ST_LAT_COL = 1<<2, /* Bit 2: Late Collision Error */
2233 XM_ST_MUL_COL = 1<<1, /* Bit 1: Multiple Collisions */ 2233 XM_ST_MUL_COL = 1<<1, /* Bit 1: Multiple Collisions */
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 2a91868788f..ff8d262dc27 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -932,7 +932,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
932 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR); 932 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR);
933 sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); 933 sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON);
934 934
935 /* On chips without ram buffer, pause is controled by MAC level */ 935 /* On chips without ram buffer, pause is controlled by MAC level */
936 if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { 936 if (!(hw->flags & SKY2_HW_RAM_BUFFER)) {
937 /* Pause threshold is scaled by 8 in bytes */ 937 /* Pause threshold is scaled by 8 in bytes */
938 if (hw->chip_id == CHIP_ID_YUKON_FE_P && 938 if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
@@ -3255,7 +3255,7 @@ static void sky2_reset(struct sky2_hw *hw)
3255 3255
3256/* Take device down (offline). 3256/* Take device down (offline).
3257 * Equivalent to doing dev_stop() but this does not 3257 * Equivalent to doing dev_stop() but this does not
3258 * inform upper layers of the transistion. 3258 * inform upper layers of the transition.
3259 */ 3259 */
3260static void sky2_detach(struct net_device *dev) 3260static void sky2_detach(struct net_device *dev)
3261{ 3261{
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 6861b0e8db9..0c6d10c5f05 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -1194,7 +1194,7 @@ enum {
1194 1194
1195 PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */ 1195 PHY_ST_PRE_SUP = 1<<6, /* Bit 6: Preamble Suppression */
1196 PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */ 1196 PHY_ST_AN_OVER = 1<<5, /* Bit 5: Auto-Negotiation Over */
1197 PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occured */ 1197 PHY_ST_REM_FLT = 1<<4, /* Bit 4: Remote Fault Condition Occurred */
1198 PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */ 1198 PHY_ST_AN_CAP = 1<<3, /* Bit 3: Auto-Negotiation Capability */
1199 PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */ 1199 PHY_ST_LSYNC = 1<<2, /* Bit 2: Link Synchronized */
1200 PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */ 1200 PHY_ST_JAB_DET = 1<<1, /* Bit 1: Jabber Detected */
@@ -1725,8 +1725,8 @@ enum {
1725 GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */ 1725 GM_GPSR_LINK_UP = 1<<12, /* Bit 12: Link Up Status */
1726 GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */ 1726 GM_GPSR_PAUSE = 1<<11, /* Bit 11: Pause State */
1727 GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */ 1727 GM_GPSR_TX_ACTIVE = 1<<10, /* Bit 10: Tx in Progress */
1728 GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occured */ 1728 GM_GPSR_EXC_COL = 1<<9, /* Bit 9: Excessive Collisions Occurred */
1729 GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occured */ 1729 GM_GPSR_LAT_COL = 1<<8, /* Bit 8: Late Collisions Occurred */
1730 1730
1731 GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */ 1731 GM_GPSR_PHY_ST_CH = 1<<5, /* Bit 5: PHY Status Change */
1732 GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */ 1732 GM_GPSR_GIG_SPEED = 1<<4, /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 68d48ab6eac..5f53fbbf67b 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -921,7 +921,7 @@ static const char * chip_ids[ 16 ] = {
921 * Hack Alert: Some setups just can't write 8 or 16 bits reliably when not 921 * Hack Alert: Some setups just can't write 8 or 16 bits reliably when not
922 * aligned to a 32 bit boundary. I tell you that does exist! 922 * aligned to a 32 bit boundary. I tell you that does exist!
923 * Fortunately the affected register accesses can be easily worked around 923 * Fortunately the affected register accesses can be easily worked around
924 * since we can write zeroes to the preceeding 16 bits without adverse 924 * since we can write zeroes to the preceding 16 bits without adverse
925 * effects and use a 32-bit access. 925 * effects and use a 32-bit access.
926 * 926 *
927 * Enforce it on any 32-bit capable setup for now. 927 * Enforce it on any 32-bit capable setup for now.
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 1566259c1f2..4b42ecc63dc 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1669,7 +1669,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)
1669 } 1669 }
1670 1670
1671 if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { 1671 if (e2cmd & E2P_CMD_EPC_TIMEOUT_) {
1672 SMSC_TRACE(DRV, "Error occured during eeprom operation"); 1672 SMSC_TRACE(DRV, "Error occurred during eeprom operation");
1673 return -EINVAL; 1673 return -EINVAL;
1674 } 1674 }
1675 1675
@@ -1818,6 +1818,7 @@ static int __devinit smsc911x_init(struct net_device *dev)
1818 SMSC_TRACE(PROBE, "PHY will be autodetected."); 1818 SMSC_TRACE(PROBE, "PHY will be autodetected.");
1819 1819
1820 spin_lock_init(&pdata->dev_lock); 1820 spin_lock_init(&pdata->dev_lock);
1821 spin_lock_init(&pdata->mac_lock);
1821 1822
1822 if (pdata->ioaddr == 0) { 1823 if (pdata->ioaddr == 0) {
1823 SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000"); 1824 SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000");
@@ -1895,8 +1896,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
1895 /* workaround for platforms without an eeprom, where the mac address 1896 /* workaround for platforms without an eeprom, where the mac address
1896 * is stored elsewhere and set by the bootloader. This saves the 1897 * is stored elsewhere and set by the bootloader. This saves the
1897 * mac address before resetting the device */ 1898 * mac address before resetting the device */
1898 if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) 1899 if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) {
1900 spin_lock_irq(&pdata->mac_lock);
1899 smsc911x_read_mac_address(dev); 1901 smsc911x_read_mac_address(dev);
1902 spin_unlock_irq(&pdata->mac_lock);
1903 }
1900 1904
1901 /* Reset the LAN911x */ 1905 /* Reset the LAN911x */
1902 if (smsc911x_soft_reset(pdata)) 1906 if (smsc911x_soft_reset(pdata))
@@ -2059,8 +2063,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
2059 SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name); 2063 SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name);
2060 } 2064 }
2061 2065
2062 spin_lock_init(&pdata->mac_lock);
2063
2064 retval = smsc911x_mii_init(pdev, dev); 2066 retval = smsc911x_mii_init(pdev, dev);
2065 if (retval) { 2067 if (retval) {
2066 SMSC_WARNING(PROBE, 2068 SMSC_WARNING(PROBE,
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index b09ee1c319e..4c92ad8be76 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -364,7 +364,7 @@ static int smsc9420_eeprom_send_cmd(struct smsc9420_pdata *pd, u32 op)
364 } 364 }
365 365
366 if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { 366 if (e2cmd & E2P_CMD_EPC_TIMEOUT_) {
367 smsc_info(HW, "Error occured during eeprom operation"); 367 smsc_info(HW, "Error occurred during eeprom operation");
368 return -EINVAL; 368 return -EINVAL;
369 } 369 }
370 370
diff --git a/drivers/net/stmmac/dwmac_lib.c b/drivers/net/stmmac/dwmac_lib.c
index d65fab1ba79..e25093510b0 100644
--- a/drivers/net/stmmac/dwmac_lib.c
+++ b/drivers/net/stmmac/dwmac_lib.c
@@ -26,9 +26,9 @@
26 26
27#undef DWMAC_DMA_DEBUG 27#undef DWMAC_DMA_DEBUG
28#ifdef DWMAC_DMA_DEBUG 28#ifdef DWMAC_DMA_DEBUG
29#define DBG(fmt, args...) printk(fmt, ## args) 29#define DWMAC_LIB_DBG(fmt, args...) printk(fmt, ## args)
30#else 30#else
31#define DBG(fmt, args...) do { } while (0) 31#define DWMAC_LIB_DBG(fmt, args...) do { } while (0)
32#endif 32#endif
33 33
34/* CSR1 enables the transmit DMA to check for new descriptor */ 34/* CSR1 enables the transmit DMA to check for new descriptor */
@@ -152,7 +152,7 @@ int dwmac_dma_interrupt(void __iomem *ioaddr,
152 /* read the status register (CSR5) */ 152 /* read the status register (CSR5) */
153 u32 intr_status = readl(ioaddr + DMA_STATUS); 153 u32 intr_status = readl(ioaddr + DMA_STATUS);
154 154
155 DBG(INFO, "%s: [CSR5: 0x%08x]\n", __func__, intr_status); 155 DWMAC_LIB_DBG(KERN_INFO "%s: [CSR5: 0x%08x]\n", __func__, intr_status);
156#ifdef DWMAC_DMA_DEBUG 156#ifdef DWMAC_DMA_DEBUG
157 /* It displays the DMA process states (CSR5 register) */ 157 /* It displays the DMA process states (CSR5 register) */
158 show_tx_process_state(intr_status); 158 show_tx_process_state(intr_status);
@@ -160,43 +160,43 @@ int dwmac_dma_interrupt(void __iomem *ioaddr,
160#endif 160#endif
161 /* ABNORMAL interrupts */ 161 /* ABNORMAL interrupts */
162 if (unlikely(intr_status & DMA_STATUS_AIS)) { 162 if (unlikely(intr_status & DMA_STATUS_AIS)) {
163 DBG(INFO, "CSR5[15] DMA ABNORMAL IRQ: "); 163 DWMAC_LIB_DBG(KERN_INFO "CSR5[15] DMA ABNORMAL IRQ: ");
164 if (unlikely(intr_status & DMA_STATUS_UNF)) { 164 if (unlikely(intr_status & DMA_STATUS_UNF)) {
165 DBG(INFO, "transmit underflow\n"); 165 DWMAC_LIB_DBG(KERN_INFO "transmit underflow\n");
166 ret = tx_hard_error_bump_tc; 166 ret = tx_hard_error_bump_tc;
167 x->tx_undeflow_irq++; 167 x->tx_undeflow_irq++;
168 } 168 }
169 if (unlikely(intr_status & DMA_STATUS_TJT)) { 169 if (unlikely(intr_status & DMA_STATUS_TJT)) {
170 DBG(INFO, "transmit jabber\n"); 170 DWMAC_LIB_DBG(KERN_INFO "transmit jabber\n");
171 x->tx_jabber_irq++; 171 x->tx_jabber_irq++;
172 } 172 }
173 if (unlikely(intr_status & DMA_STATUS_OVF)) { 173 if (unlikely(intr_status & DMA_STATUS_OVF)) {
174 DBG(INFO, "recv overflow\n"); 174 DWMAC_LIB_DBG(KERN_INFO "recv overflow\n");
175 x->rx_overflow_irq++; 175 x->rx_overflow_irq++;
176 } 176 }
177 if (unlikely(intr_status & DMA_STATUS_RU)) { 177 if (unlikely(intr_status & DMA_STATUS_RU)) {
178 DBG(INFO, "receive buffer unavailable\n"); 178 DWMAC_LIB_DBG(KERN_INFO "receive buffer unavailable\n");
179 x->rx_buf_unav_irq++; 179 x->rx_buf_unav_irq++;
180 } 180 }
181 if (unlikely(intr_status & DMA_STATUS_RPS)) { 181 if (unlikely(intr_status & DMA_STATUS_RPS)) {
182 DBG(INFO, "receive process stopped\n"); 182 DWMAC_LIB_DBG(KERN_INFO "receive process stopped\n");
183 x->rx_process_stopped_irq++; 183 x->rx_process_stopped_irq++;
184 } 184 }
185 if (unlikely(intr_status & DMA_STATUS_RWT)) { 185 if (unlikely(intr_status & DMA_STATUS_RWT)) {
186 DBG(INFO, "receive watchdog\n"); 186 DWMAC_LIB_DBG(KERN_INFO "receive watchdog\n");
187 x->rx_watchdog_irq++; 187 x->rx_watchdog_irq++;
188 } 188 }
189 if (unlikely(intr_status & DMA_STATUS_ETI)) { 189 if (unlikely(intr_status & DMA_STATUS_ETI)) {
190 DBG(INFO, "transmit early interrupt\n"); 190 DWMAC_LIB_DBG(KERN_INFO "transmit early interrupt\n");
191 x->tx_early_irq++; 191 x->tx_early_irq++;
192 } 192 }
193 if (unlikely(intr_status & DMA_STATUS_TPS)) { 193 if (unlikely(intr_status & DMA_STATUS_TPS)) {
194 DBG(INFO, "transmit process stopped\n"); 194 DWMAC_LIB_DBG(KERN_INFO "transmit process stopped\n");
195 x->tx_process_stopped_irq++; 195 x->tx_process_stopped_irq++;
196 ret = tx_hard_error; 196 ret = tx_hard_error;
197 } 197 }
198 if (unlikely(intr_status & DMA_STATUS_FBI)) { 198 if (unlikely(intr_status & DMA_STATUS_FBI)) {
199 DBG(INFO, "fatal bus error\n"); 199 DWMAC_LIB_DBG(KERN_INFO "fatal bus error\n");
200 x->fatal_bus_error_irq++; 200 x->fatal_bus_error_irq++;
201 ret = tx_hard_error; 201 ret = tx_hard_error;
202 } 202 }
@@ -215,7 +215,7 @@ int dwmac_dma_interrupt(void __iomem *ioaddr,
215 /* Clear the interrupt by writing a logic 1 to the CSR5[15-0] */ 215 /* Clear the interrupt by writing a logic 1 to the CSR5[15-0] */
216 writel((intr_status & 0x1ffff), ioaddr + DMA_STATUS); 216 writel((intr_status & 0x1ffff), ioaddr + DMA_STATUS);
217 217
218 DBG(INFO, "\n\n"); 218 DWMAC_LIB_DBG(KERN_INFO "\n\n");
219 return ret; 219 return ret;
220} 220}
221 221
diff --git a/drivers/net/stmmac/norm_desc.c b/drivers/net/stmmac/norm_desc.c
index cd0cc76f7a1..029c2a2cf52 100644
--- a/drivers/net/stmmac/norm_desc.c
+++ b/drivers/net/stmmac/norm_desc.c
@@ -67,7 +67,7 @@ static int ndesc_get_tx_len(struct dma_desc *p)
67 67
68/* This function verifies if each incoming frame has some errors 68/* This function verifies if each incoming frame has some errors
69 * and, if required, updates the multicast statistics. 69 * and, if required, updates the multicast statistics.
70 * In case of success, it returns csum_none becasue the device 70 * In case of success, it returns csum_none because the device
71 * is not able to compute the csum in HW. */ 71 * is not able to compute the csum in HW. */
72static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x, 72static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x,
73 struct dma_desc *p) 73 struct dma_desc *p)
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index 0e5f03135b5..cc973fc3840 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/drivers/net/stmmac/stmmac_main.c
@@ -750,7 +750,6 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
750 priv->hw->dma->dma_mode(priv->ioaddr, tc, SF_DMA_MODE); 750 priv->hw->dma->dma_mode(priv->ioaddr, tc, SF_DMA_MODE);
751 priv->xstats.threshold = tc; 751 priv->xstats.threshold = tc;
752 } 752 }
753 stmmac_tx_err(priv);
754 } else if (unlikely(status == tx_hard_error)) 753 } else if (unlikely(status == tx_hard_error))
755 stmmac_tx_err(priv); 754 stmmac_tx_err(priv);
756} 755}
@@ -781,21 +780,6 @@ static int stmmac_open(struct net_device *dev)
781 780
782 stmmac_verify_args(); 781 stmmac_verify_args();
783 782
784 ret = stmmac_init_phy(dev);
785 if (unlikely(ret)) {
786 pr_err("%s: Cannot attach to PHY (error: %d)\n", __func__, ret);
787 return ret;
788 }
789
790 /* Request the IRQ lines */
791 ret = request_irq(dev->irq, stmmac_interrupt,
792 IRQF_SHARED, dev->name, dev);
793 if (unlikely(ret < 0)) {
794 pr_err("%s: ERROR: allocating the IRQ %d (error: %d)\n",
795 __func__, dev->irq, ret);
796 return ret;
797 }
798
799#ifdef CONFIG_STMMAC_TIMER 783#ifdef CONFIG_STMMAC_TIMER
800 priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL); 784 priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL);
801 if (unlikely(priv->tm == NULL)) { 785 if (unlikely(priv->tm == NULL)) {
@@ -814,6 +798,11 @@ static int stmmac_open(struct net_device *dev)
814 } else 798 } else
815 priv->tm->enable = 1; 799 priv->tm->enable = 1;
816#endif 800#endif
801 ret = stmmac_init_phy(dev);
802 if (unlikely(ret)) {
803 pr_err("%s: Cannot attach to PHY (error: %d)\n", __func__, ret);
804 goto open_error;
805 }
817 806
818 /* Create and initialize the TX/RX descriptors chains. */ 807 /* Create and initialize the TX/RX descriptors chains. */
819 priv->dma_tx_size = STMMAC_ALIGN(dma_txsize); 808 priv->dma_tx_size = STMMAC_ALIGN(dma_txsize);
@@ -822,12 +811,11 @@ static int stmmac_open(struct net_device *dev)
822 init_dma_desc_rings(dev); 811 init_dma_desc_rings(dev);
823 812
824 /* DMA initialization and SW reset */ 813 /* DMA initialization and SW reset */
825 if (unlikely(priv->hw->dma->init(priv->ioaddr, priv->plat->pbl, 814 ret = priv->hw->dma->init(priv->ioaddr, priv->plat->pbl,
826 priv->dma_tx_phy, 815 priv->dma_tx_phy, priv->dma_rx_phy);
827 priv->dma_rx_phy) < 0)) { 816 if (ret < 0) {
828
829 pr_err("%s: DMA initialization failed\n", __func__); 817 pr_err("%s: DMA initialization failed\n", __func__);
830 return -1; 818 goto open_error;
831 } 819 }
832 820
833 /* Copy the MAC addr into the HW */ 821 /* Copy the MAC addr into the HW */
@@ -848,6 +836,15 @@ static int stmmac_open(struct net_device *dev)
848 writel(0xffffffff, priv->ioaddr + MMC_HIGH_INTR_MASK); 836 writel(0xffffffff, priv->ioaddr + MMC_HIGH_INTR_MASK);
849 writel(0xffffffff, priv->ioaddr + MMC_LOW_INTR_MASK); 837 writel(0xffffffff, priv->ioaddr + MMC_LOW_INTR_MASK);
850 838
839 /* Request the IRQ lines */
840 ret = request_irq(dev->irq, stmmac_interrupt,
841 IRQF_SHARED, dev->name, dev);
842 if (unlikely(ret < 0)) {
843 pr_err("%s: ERROR: allocating the IRQ %d (error: %d)\n",
844 __func__, dev->irq, ret);
845 goto open_error;
846 }
847
851 /* Enable the MAC Rx/Tx */ 848 /* Enable the MAC Rx/Tx */
852 stmmac_enable_mac(priv->ioaddr); 849 stmmac_enable_mac(priv->ioaddr);
853 850
@@ -878,7 +875,17 @@ static int stmmac_open(struct net_device *dev)
878 napi_enable(&priv->napi); 875 napi_enable(&priv->napi);
879 skb_queue_head_init(&priv->rx_recycle); 876 skb_queue_head_init(&priv->rx_recycle);
880 netif_start_queue(dev); 877 netif_start_queue(dev);
878
881 return 0; 879 return 0;
880
881open_error:
882#ifdef CONFIG_STMMAC_TIMER
883 kfree(priv->tm);
884#endif
885 if (priv->phydev)
886 phy_disconnect(priv->phydev);
887
888 return ret;
882} 889}
883 890
884/** 891/**
diff --git a/drivers/net/sunbmac.h b/drivers/net/sunbmac.h
index 8db88945b88..4943e975a73 100644
--- a/drivers/net/sunbmac.h
+++ b/drivers/net/sunbmac.h
@@ -185,7 +185,7 @@
185#define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */ 185#define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */
186#define BIGMAC_RXCFG_FIFO 0x0000000e /* Default rx fthresh... */ 186#define BIGMAC_RXCFG_FIFO 0x0000000e /* Default rx fthresh... */
187#define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */ 187#define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */
188#define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscous mode */ 188#define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscuous mode */
189#define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */ 189#define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */
190#define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */ 190#define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */
191#define BIGMAC_RXCFG_ME 0x00000200 /* Receive packets addressed to me */ 191#define BIGMAC_RXCFG_ME 0x00000200 /* Receive packets addressed to me */
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index c1a344829b5..d3be735c471 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -1150,7 +1150,7 @@ static void gem_pcs_reinit_adv(struct gem *gp)
1150 val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO); 1150 val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
1151 writel(val, gp->regs + PCS_CFG); 1151 writel(val, gp->regs + PCS_CFG);
1152 1152
1153 /* Advertise all capabilities except assymetric 1153 /* Advertise all capabilities except asymmetric
1154 * pause. 1154 * pause.
1155 */ 1155 */
1156 val = readl(gp->regs + PCS_MIIADV); 1156 val = readl(gp->regs + PCS_MIIADV);
diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h
index 756b5bf3aa8..64f278360d8 100644
--- a/drivers/net/sunhme.h
+++ b/drivers/net/sunhme.h
@@ -223,7 +223,7 @@
223/* BigMac receive config register. */ 223/* BigMac receive config register. */
224#define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */ 224#define BIGMAC_RXCFG_ENABLE 0x00000001 /* Enable the receiver */
225#define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */ 225#define BIGMAC_RXCFG_PSTRIP 0x00000020 /* Pad byte strip enable */
226#define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscous mode */ 226#define BIGMAC_RXCFG_PMISC 0x00000040 /* Enable promiscuous mode */
227#define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */ 227#define BIGMAC_RXCFG_DERR 0x00000080 /* Disable error checking */
228#define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */ 228#define BIGMAC_RXCFG_DCRCS 0x00000100 /* Disable CRC stripping */
229#define BIGMAC_RXCFG_REJME 0x00000200 /* Reject packets addressed to me */ 229#define BIGMAC_RXCFG_REJME 0x00000200 /* Reject packets addressed to me */
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index b6eec8cea20..7ca51cebcdd 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -119,13 +119,13 @@ struct tc35815_regs {
119/* 119/*
120 * Bit assignments 120 * Bit assignments
121 */ 121 */
122/* DMA_Ctl bit asign ------------------------------------------------------- */ 122/* DMA_Ctl bit assign ------------------------------------------------------- */
123#define DMA_RxAlign 0x00c00000 /* 1:Reception Alignment */ 123#define DMA_RxAlign 0x00c00000 /* 1:Reception Alignment */
124#define DMA_RxAlign_1 0x00400000 124#define DMA_RxAlign_1 0x00400000
125#define DMA_RxAlign_2 0x00800000 125#define DMA_RxAlign_2 0x00800000
126#define DMA_RxAlign_3 0x00c00000 126#define DMA_RxAlign_3 0x00c00000
127#define DMA_M66EnStat 0x00080000 /* 1:66MHz Enable State */ 127#define DMA_M66EnStat 0x00080000 /* 1:66MHz Enable State */
128#define DMA_IntMask 0x00040000 /* 1:Interupt mask */ 128#define DMA_IntMask 0x00040000 /* 1:Interrupt mask */
129#define DMA_SWIntReq 0x00020000 /* 1:Software Interrupt request */ 129#define DMA_SWIntReq 0x00020000 /* 1:Software Interrupt request */
130#define DMA_TxWakeUp 0x00010000 /* 1:Transmit Wake Up */ 130#define DMA_TxWakeUp 0x00010000 /* 1:Transmit Wake Up */
131#define DMA_RxBigE 0x00008000 /* 1:Receive Big Endian */ 131#define DMA_RxBigE 0x00008000 /* 1:Receive Big Endian */
@@ -134,11 +134,11 @@ struct tc35815_regs {
134#define DMA_PowrMgmnt 0x00001000 /* 1:Power Management */ 134#define DMA_PowrMgmnt 0x00001000 /* 1:Power Management */
135#define DMA_DmBurst_Mask 0x000001fc /* DMA Burst size */ 135#define DMA_DmBurst_Mask 0x000001fc /* DMA Burst size */
136 136
137/* RxFragSize bit asign ---------------------------------------------------- */ 137/* RxFragSize bit assign ---------------------------------------------------- */
138#define RxFrag_EnPack 0x00008000 /* 1:Enable Packing */ 138#define RxFrag_EnPack 0x00008000 /* 1:Enable Packing */
139#define RxFrag_MinFragMask 0x00000ffc /* Minimum Fragment */ 139#define RxFrag_MinFragMask 0x00000ffc /* Minimum Fragment */
140 140
141/* MAC_Ctl bit asign ------------------------------------------------------- */ 141/* MAC_Ctl bit assign ------------------------------------------------------- */
142#define MAC_Link10 0x00008000 /* 1:Link Status 10Mbits */ 142#define MAC_Link10 0x00008000 /* 1:Link Status 10Mbits */
143#define MAC_EnMissRoll 0x00002000 /* 1:Enable Missed Roll */ 143#define MAC_EnMissRoll 0x00002000 /* 1:Enable Missed Roll */
144#define MAC_MissRoll 0x00000400 /* 1:Missed Roll */ 144#define MAC_MissRoll 0x00000400 /* 1:Missed Roll */
@@ -152,7 +152,7 @@ struct tc35815_regs {
152#define MAC_HaltImm 0x00000002 /* 1:Halt Immediate */ 152#define MAC_HaltImm 0x00000002 /* 1:Halt Immediate */
153#define MAC_HaltReq 0x00000001 /* 1:Halt request */ 153#define MAC_HaltReq 0x00000001 /* 1:Halt request */
154 154
155/* PROM_Ctl bit asign ------------------------------------------------------ */ 155/* PROM_Ctl bit assign ------------------------------------------------------ */
156#define PROM_Busy 0x00008000 /* 1:Busy (Start Operation) */ 156#define PROM_Busy 0x00008000 /* 1:Busy (Start Operation) */
157#define PROM_Read 0x00004000 /*10:Read operation */ 157#define PROM_Read 0x00004000 /*10:Read operation */
158#define PROM_Write 0x00002000 /*01:Write operation */ 158#define PROM_Write 0x00002000 /*01:Write operation */
@@ -162,7 +162,7 @@ struct tc35815_regs {
162#define PROM_Addr_Ena 0x00000030 /*11xxxx:PROM Write enable */ 162#define PROM_Addr_Ena 0x00000030 /*11xxxx:PROM Write enable */
163 /*00xxxx: disable */ 163 /*00xxxx: disable */
164 164
165/* CAM_Ctl bit asign ------------------------------------------------------- */ 165/* CAM_Ctl bit assign ------------------------------------------------------- */
166#define CAM_CompEn 0x00000010 /* 1:CAM Compare Enable */ 166#define CAM_CompEn 0x00000010 /* 1:CAM Compare Enable */
167#define CAM_NegCAM 0x00000008 /* 1:Reject packets CAM recognizes,*/ 167#define CAM_NegCAM 0x00000008 /* 1:Reject packets CAM recognizes,*/
168 /* accept other */ 168 /* accept other */
@@ -170,7 +170,7 @@ struct tc35815_regs {
170#define CAM_GroupAcc 0x00000002 /* 1:Multicast assept */ 170#define CAM_GroupAcc 0x00000002 /* 1:Multicast assept */
171#define CAM_StationAcc 0x00000001 /* 1:unicast accept */ 171#define CAM_StationAcc 0x00000001 /* 1:unicast accept */
172 172
173/* CAM_Ena bit asign ------------------------------------------------------- */ 173/* CAM_Ena bit assign ------------------------------------------------------- */
174#define CAM_ENTRY_MAX 21 /* CAM Data entry max count */ 174#define CAM_ENTRY_MAX 21 /* CAM Data entry max count */
175#define CAM_Ena_Mask ((1<<CAM_ENTRY_MAX)-1) /* CAM Enable bits (Max 21bits) */ 175#define CAM_Ena_Mask ((1<<CAM_ENTRY_MAX)-1) /* CAM Enable bits (Max 21bits) */
176#define CAM_Ena_Bit(index) (1 << (index)) 176#define CAM_Ena_Bit(index) (1 << (index))
@@ -178,7 +178,7 @@ struct tc35815_regs {
178#define CAM_ENTRY_SOURCE 1 178#define CAM_ENTRY_SOURCE 1
179#define CAM_ENTRY_MACCTL 20 179#define CAM_ENTRY_MACCTL 20
180 180
181/* Tx_Ctl bit asign -------------------------------------------------------- */ 181/* Tx_Ctl bit assign -------------------------------------------------------- */
182#define Tx_En 0x00000001 /* 1:Transmit enable */ 182#define Tx_En 0x00000001 /* 1:Transmit enable */
183#define Tx_TxHalt 0x00000002 /* 1:Transmit Halt Request */ 183#define Tx_TxHalt 0x00000002 /* 1:Transmit Halt Request */
184#define Tx_NoPad 0x00000004 /* 1:Suppress Padding */ 184#define Tx_NoPad 0x00000004 /* 1:Suppress Padding */
@@ -192,7 +192,7 @@ struct tc35815_regs {
192#define Tx_EnTxPar 0x00002000 /* 1:Enable Transmit Parity */ 192#define Tx_EnTxPar 0x00002000 /* 1:Enable Transmit Parity */
193#define Tx_EnComp 0x00004000 /* 1:Enable Completion */ 193#define Tx_EnComp 0x00004000 /* 1:Enable Completion */
194 194
195/* Tx_Stat bit asign ------------------------------------------------------- */ 195/* Tx_Stat bit assign ------------------------------------------------------- */
196#define Tx_TxColl_MASK 0x0000000F /* Tx Collision Count */ 196#define Tx_TxColl_MASK 0x0000000F /* Tx Collision Count */
197#define Tx_ExColl 0x00000010 /* Excessive Collision */ 197#define Tx_ExColl 0x00000010 /* Excessive Collision */
198#define Tx_TXDefer 0x00000020 /* Transmit Defered */ 198#define Tx_TXDefer 0x00000020 /* Transmit Defered */
@@ -208,7 +208,7 @@ struct tc35815_regs {
208#define Tx_Halted 0x00008000 /* Tx Halted */ 208#define Tx_Halted 0x00008000 /* Tx Halted */
209#define Tx_SQErr 0x00010000 /* Signal Quality Error(SQE) */ 209#define Tx_SQErr 0x00010000 /* Signal Quality Error(SQE) */
210 210
211/* Rx_Ctl bit asign -------------------------------------------------------- */ 211/* Rx_Ctl bit assign -------------------------------------------------------- */
212#define Rx_EnGood 0x00004000 /* 1:Enable Good */ 212#define Rx_EnGood 0x00004000 /* 1:Enable Good */
213#define Rx_EnRxPar 0x00002000 /* 1:Enable Receive Parity */ 213#define Rx_EnRxPar 0x00002000 /* 1:Enable Receive Parity */
214#define Rx_EnLongErr 0x00000800 /* 1:Enable Long Error */ 214#define Rx_EnLongErr 0x00000800 /* 1:Enable Long Error */
@@ -222,7 +222,7 @@ struct tc35815_regs {
222#define Rx_RxHalt 0x00000002 /* 1:Receive Halt Request */ 222#define Rx_RxHalt 0x00000002 /* 1:Receive Halt Request */
223#define Rx_RxEn 0x00000001 /* 1:Receive Intrrupt Enable */ 223#define Rx_RxEn 0x00000001 /* 1:Receive Intrrupt Enable */
224 224
225/* Rx_Stat bit asign ------------------------------------------------------- */ 225/* Rx_Stat bit assign ------------------------------------------------------- */
226#define Rx_Halted 0x00008000 /* Rx Halted */ 226#define Rx_Halted 0x00008000 /* Rx Halted */
227#define Rx_Good 0x00004000 /* Rx Good */ 227#define Rx_Good 0x00004000 /* Rx Good */
228#define Rx_RxPar 0x00002000 /* Rx Parity Error */ 228#define Rx_RxPar 0x00002000 /* Rx Parity Error */
@@ -238,7 +238,7 @@ struct tc35815_regs {
238 238
239#define Rx_Stat_Mask 0x0000FFF0 /* Rx All Status Mask */ 239#define Rx_Stat_Mask 0x0000FFF0 /* Rx All Status Mask */
240 240
241/* Int_En bit asign -------------------------------------------------------- */ 241/* Int_En bit assign -------------------------------------------------------- */
242#define Int_NRAbtEn 0x00000800 /* 1:Non-recoverable Abort Enable */ 242#define Int_NRAbtEn 0x00000800 /* 1:Non-recoverable Abort Enable */
243#define Int_TxCtlCmpEn 0x00000400 /* 1:Transmit Ctl Complete Enable */ 243#define Int_TxCtlCmpEn 0x00000400 /* 1:Transmit Ctl Complete Enable */
244#define Int_DmParErrEn 0x00000200 /* 1:DMA Parity Error Enable */ 244#define Int_DmParErrEn 0x00000200 /* 1:DMA Parity Error Enable */
@@ -253,7 +253,7 @@ struct tc35815_regs {
253#define Int_FDAExEn 0x00000001 /* 1:Free Descriptor Area */ 253#define Int_FDAExEn 0x00000001 /* 1:Free Descriptor Area */
254 /* Exhausted Enable */ 254 /* Exhausted Enable */
255 255
256/* Int_Src bit asign ------------------------------------------------------- */ 256/* Int_Src bit assign ------------------------------------------------------- */
257#define Int_NRabt 0x00004000 /* 1:Non Recoverable error */ 257#define Int_NRabt 0x00004000 /* 1:Non Recoverable error */
258#define Int_DmParErrStat 0x00002000 /* 1:DMA Parity Error & Clear */ 258#define Int_DmParErrStat 0x00002000 /* 1:DMA Parity Error & Clear */
259#define Int_BLEx 0x00001000 /* 1:Buffer List Empty & Clear */ 259#define Int_BLEx 0x00001000 /* 1:Buffer List Empty & Clear */
@@ -270,8 +270,8 @@ struct tc35815_regs {
270#define Int_IntMacRx 0x00000002 /* 1:Rx controller & Clear */ 270#define Int_IntMacRx 0x00000002 /* 1:Rx controller & Clear */
271#define Int_IntMacTx 0x00000001 /* 1:Tx controller & Clear */ 271#define Int_IntMacTx 0x00000001 /* 1:Tx controller & Clear */
272 272
273/* MD_CA bit asign --------------------------------------------------------- */ 273/* MD_CA bit assign --------------------------------------------------------- */
274#define MD_CA_PreSup 0x00001000 /* 1:Preamble Supress */ 274#define MD_CA_PreSup 0x00001000 /* 1:Preamble Suppress */
275#define MD_CA_Busy 0x00000800 /* 1:Busy (Start Operation) */ 275#define MD_CA_Busy 0x00000800 /* 1:Busy (Start Operation) */
276#define MD_CA_Wr 0x00000400 /* 1:Write 0:Read */ 276#define MD_CA_Wr 0x00000400 /* 1:Write 0:Read */
277 277
@@ -296,7 +296,7 @@ struct BDesc {
296 296
297#define FD_ALIGN 16 297#define FD_ALIGN 16
298 298
299/* Frame Descripter bit asign ---------------------------------------------- */ 299/* Frame Descripter bit assign ---------------------------------------------- */
300#define FD_FDLength_MASK 0x0000FFFF /* Length MASK */ 300#define FD_FDLength_MASK 0x0000FFFF /* Length MASK */
301#define FD_BDCnt_MASK 0x001F0000 /* BD count MASK in FD */ 301#define FD_BDCnt_MASK 0x001F0000 /* BD count MASK in FD */
302#define FD_FrmOpt_MASK 0x7C000000 /* Frame option MASK */ 302#define FD_FrmOpt_MASK 0x7C000000 /* Frame option MASK */
@@ -309,8 +309,8 @@ struct BDesc {
309#define FD_Next_EOL 0x00000001 /* FD EOL indicator */ 309#define FD_Next_EOL 0x00000001 /* FD EOL indicator */
310#define FD_BDCnt_SHIFT 16 310#define FD_BDCnt_SHIFT 16
311 311
312/* Buffer Descripter bit asign --------------------------------------------- */ 312/* Buffer Descripter bit assign --------------------------------------------- */
313#define BD_BuffLength_MASK 0x0000FFFF /* Recieve Data Size */ 313#define BD_BuffLength_MASK 0x0000FFFF /* Receive Data Size */
314#define BD_RxBDID_MASK 0x00FF0000 /* BD ID Number MASK */ 314#define BD_RxBDID_MASK 0x00FF0000 /* BD ID Number MASK */
315#define BD_RxBDSeqN_MASK 0x7F000000 /* Rx BD Sequence Number */ 315#define BD_RxBDSeqN_MASK 0x7F000000 /* Rx BD Sequence Number */
316#define BD_CownsBD 0x80000000 /* BD Controller owner bit */ 316#define BD_CownsBD 0x80000000 /* BD Controller owner bit */
@@ -339,7 +339,7 @@ struct BDesc {
339#define TX_THRESHOLD 1024 339#define TX_THRESHOLD 1024
340/* used threshold with packet max byte for low pci transfer ability.*/ 340/* used threshold with packet max byte for low pci transfer ability.*/
341#define TX_THRESHOLD_MAX 1536 341#define TX_THRESHOLD_MAX 1536
342/* setting threshold max value when overrun error occured this count. */ 342/* setting threshold max value when overrun error occurred this count. */
343#define TX_THRESHOLD_KEEP_LIMIT 10 343#define TX_THRESHOLD_KEEP_LIMIT 10
344 344
345/* 16 + RX_BUF_NUM * 8 + RX_FD_NUM * 16 + TX_FD_NUM * 32 <= PAGE_SIZE*FD_PAGE_NUM */ 345/* 16 + RX_BUF_NUM * 8 + RX_FD_NUM * 16 + TX_FD_NUM * 32 <= PAGE_SIZE*FD_PAGE_NUM */
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 3397618d4d9..8564ec5cfb7 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -645,7 +645,7 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd)
645 if (cmd != SIOCDEVPRIVATE) { 645 if (cmd != SIOCDEVPRIVATE) {
646 error = copy_from_user(data, ifr->ifr_data, sizeof(data)); 646 error = copy_from_user(data, ifr->ifr_data, sizeof(data));
647 if (error) { 647 if (error) {
648 pr_err("cant copy from user\n"); 648 pr_err("can't copy from user\n");
649 RET(-EFAULT); 649 RET(-EFAULT);
650 } 650 }
651 DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); 651 DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]);
@@ -999,7 +999,7 @@ static inline void bdx_rxdb_free_elem(struct rxdb *db, int n)
999 * 999 *
1000 * RxD fifo is smaller than RxF fifo by design. Upon high load, RxD will be 1000 * RxD fifo is smaller than RxF fifo by design. Upon high load, RxD will be
1001 * filled and packets will be dropped by nic without getting into host or 1001 * filled and packets will be dropped by nic without getting into host or
1002 * cousing interrupt. Anyway, in that condition, host has no chance to proccess 1002 * cousing interrupt. Anyway, in that condition, host has no chance to process
1003 * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles 1003 * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles
1004 */ 1004 */
1005 1005
@@ -1200,8 +1200,8 @@ static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd)
1200 RET(); 1200 RET();
1201} 1201}
1202 1202
1203/* bdx_rx_receive - recieves full packets from RXD fifo and pass them to OS 1203/* bdx_rx_receive - receives full packets from RXD fifo and pass them to OS
1204 * NOTE: a special treatment is given to non-continous descriptors 1204 * NOTE: a special treatment is given to non-continuous descriptors
1205 * that start near the end, wraps around and continue at the beginning. a second 1205 * that start near the end, wraps around and continue at the beginning. a second
1206 * part is copied right after the first, and then descriptor is interpreted as 1206 * part is copied right after the first, and then descriptor is interpreted as
1207 * normal. fifo has an extra space to allow such operations 1207 * normal. fifo has an extra space to allow such operations
@@ -1584,9 +1584,9 @@ err_mem:
1584} 1584}
1585 1585
1586/* 1586/*
1587 * bdx_tx_space - calculates avalable space in TX fifo 1587 * bdx_tx_space - calculates available space in TX fifo
1588 * @priv - NIC private structure 1588 * @priv - NIC private structure
1589 * Returns avaliable space in TX fifo in bytes 1589 * Returns available space in TX fifo in bytes
1590 */ 1590 */
1591static inline int bdx_tx_space(struct bdx_priv *priv) 1591static inline int bdx_tx_space(struct bdx_priv *priv)
1592{ 1592{
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h
index b6ba8601e2b..c5642fefc9e 100644
--- a/drivers/net/tehuti.h
+++ b/drivers/net/tehuti.h
@@ -502,7 +502,7 @@ struct txd_desc {
502#define GMAC_RX_FILTER_ACRC 0x0010 /* accept crc error */ 502#define GMAC_RX_FILTER_ACRC 0x0010 /* accept crc error */
503#define GMAC_RX_FILTER_AM 0x0008 /* accept multicast */ 503#define GMAC_RX_FILTER_AM 0x0008 /* accept multicast */
504#define GMAC_RX_FILTER_AB 0x0004 /* accept broadcast */ 504#define GMAC_RX_FILTER_AB 0x0004 /* accept broadcast */
505#define GMAC_RX_FILTER_PRM 0x0001 /* [0:1] promiscous mode */ 505#define GMAC_RX_FILTER_PRM 0x0001 /* [0:1] promiscuous mode */
506 506
507#define MAX_FRAME_AB_VAL 0x3fff /* 13:0 */ 507#define MAX_FRAME_AB_VAL 0x3fff /* 13:0 */
508 508
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 73c942d85f0..b8c5f35577e 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -9712,7 +9712,7 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
9712 eeprom->len += b_count; 9712 eeprom->len += b_count;
9713 } 9713 }
9714 9714
9715 /* read bytes upto the last 4 byte boundary */ 9715 /* read bytes up to the last 4 byte boundary */
9716 pd = &data[eeprom->len]; 9716 pd = &data[eeprom->len];
9717 for (i = 0; i < (len - (len & 3)); i += 4) { 9717 for (i = 0; i < (len - (len & 3)); i += 4) {
9718 ret = tg3_nvram_read_be32(tp, offset + i, &val); 9718 ret = tg3_nvram_read_be32(tp, offset + i, &val);
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 73884b69b74..5e96706ad10 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2130,7 +2130,7 @@
2130#define MII_TG3_DSP_EXP96 0x0f96 2130#define MII_TG3_DSP_EXP96 0x0f96
2131#define MII_TG3_DSP_EXP97 0x0f97 2131#define MII_TG3_DSP_EXP97 0x0f97
2132 2132
2133#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ 2133#define MII_TG3_AUX_CTRL 0x18 /* auxiliary control register */
2134 2134
2135#define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010 2135#define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010
2136#define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE 0x0020 2136#define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE 0x0020
@@ -2146,7 +2146,7 @@
2146#define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400 2146#define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400
2147#define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000 2147#define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000
2148 2148
2149#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ 2149#define MII_TG3_AUX_STAT 0x19 /* auxiliary status register */
2150#define MII_TG3_AUX_STAT_LPASS 0x0004 2150#define MII_TG3_AUX_STAT_LPASS 0x0004
2151#define MII_TG3_AUX_STAT_SPDMASK 0x0700 2151#define MII_TG3_AUX_STAT_SPDMASK 0x0700
2152#define MII_TG3_AUX_STAT_10HALF 0x0100 2152#define MII_TG3_AUX_STAT_10HALF 0x0100
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 10800f16a23..ff32befd844 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -208,7 +208,7 @@ static void print_rx_state(struct net_device *dev)
208 * passing/getting the next value from the nic. As with all requests 208 * passing/getting the next value from the nic. As with all requests
209 * on this nic it has to be done in two stages, a) tell the nic which 209 * on this nic it has to be done in two stages, a) tell the nic which
210 * memory address you want to access and b) pass/get the value from the nic. 210 * memory address you want to access and b) pass/get the value from the nic.
211 * With the EEProm, you have to wait before and inbetween access a) and b). 211 * With the EEProm, you have to wait before and between access a) and b).
212 * As this is only read at initialization time and the wait period is very 212 * As this is only read at initialization time and the wait period is very
213 * small we shouldn't have to worry about scheduling issues. 213 * small we shouldn't have to worry about scheduling issues.
214 */ 214 */
@@ -1251,7 +1251,7 @@ static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev)
1251/* 1251/*
1252 * The NIC has told us that a packet has been downloaded onto the card, we must 1252 * The NIC has told us that a packet has been downloaded onto the card, we must
1253 * find out which packet it has done, clear the skb and information for the packet 1253 * find out which packet it has done, clear the skb and information for the packet
1254 * then advance around the ring for all tranmitted packets 1254 * then advance around the ring for all transmitted packets
1255 */ 1255 */
1256 1256
1257static void xl_dn_comp(struct net_device *dev) 1257static void xl_dn_comp(struct net_device *dev)
@@ -1568,7 +1568,7 @@ static void xl_arb_cmd(struct net_device *dev)
1568 if (lan_status_diff & LSC_SOFT_ERR) 1568 if (lan_status_diff & LSC_SOFT_ERR)
1569 printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name); 1569 printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name);
1570 if (lan_status_diff & LSC_TRAN_BCN) 1570 if (lan_status_diff & LSC_TRAN_BCN)
1571 printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n",dev->name); 1571 printk(KERN_INFO "%s: We are transmitting the beacon, aaah\n",dev->name);
1572 if (lan_status_diff & LSC_SS) 1572 if (lan_status_diff & LSC_SS)
1573 printk(KERN_INFO "%s: Single Station on the ring\n", dev->name); 1573 printk(KERN_INFO "%s: Single Station on the ring\n", dev->name);
1574 if (lan_status_diff & LSC_RING_REC) 1574 if (lan_status_diff & LSC_RING_REC)
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index 5bd14070453..9354ca9da57 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -1675,7 +1675,7 @@ drop_frame:
1675 if (lan_status_diff & LSC_SOFT_ERR) 1675 if (lan_status_diff & LSC_SOFT_ERR)
1676 printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n", dev->name); 1676 printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n", dev->name);
1677 if (lan_status_diff & LSC_TRAN_BCN) 1677 if (lan_status_diff & LSC_TRAN_BCN)
1678 printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n", dev->name); 1678 printk(KERN_INFO "%s: We are transmitting the beacon, aaah\n", dev->name);
1679 if (lan_status_diff & LSC_SS) 1679 if (lan_status_diff & LSC_SS)
1680 printk(KERN_INFO "%s: Single Station on the ring\n", dev->name); 1680 printk(KERN_INFO "%s: Single Station on the ring\n", dev->name);
1681 if (lan_status_diff & LSC_RING_REC) 1681 if (lan_status_diff & LSC_RING_REC)
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index 785ad1a2157..2bedc0ace81 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -73,7 +73,7 @@ static void madgemc_setint(struct net_device *dev, int val);
73static irqreturn_t madgemc_interrupt(int irq, void *dev_id); 73static irqreturn_t madgemc_interrupt(int irq, void *dev_id);
74 74
75/* 75/*
76 * These work around paging, however they don't guarentee you're on the 76 * These work around paging, however they don't guarantee you're on the
77 * right page. 77 * right page.
78 */ 78 */
79#define SIFREADB(reg) (inb(dev->base_addr + ((reg<0x8)?reg:reg-0x8))) 79#define SIFREADB(reg) (inb(dev->base_addr + ((reg<0x8)?reg:reg-0x8)))
@@ -387,7 +387,7 @@ getout:
387 * both with their own disadvantages... 387 * both with their own disadvantages...
388 * 388 *
389 * 1) Read in the SIFSTS register from the TMS controller. This 389 * 1) Read in the SIFSTS register from the TMS controller. This
390 * is guarenteed to be accurate, however, there's a fairly 390 * is guaranteed to be accurate, however, there's a fairly
391 * large performance penalty for doing so: the Madge chips 391 * large performance penalty for doing so: the Madge chips
392 * must request the register from the Eagle, the Eagle must 392 * must request the register from the Eagle, the Eagle must
393 * read them from its internal bus, and then take the route 393 * read them from its internal bus, and then take the route
@@ -454,7 +454,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
454} 454}
455 455
456/* 456/*
457 * Set the card to the prefered ring speed. 457 * Set the card to the preferred ring speed.
458 * 458 *
459 * Unlike newer cards, the MC16/32 have their speed selection 459 * Unlike newer cards, the MC16/32 have their speed selection
460 * circuit connected to the Madge ASICs and not to the TMS380 460 * circuit connected to the Madge ASICs and not to the TMS380
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index 3d2fbe60b46..2684003b8ab 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -1500,7 +1500,7 @@ drop_frame:
1500 if (lan_status_diff & LSC_SOFT_ERR) 1500 if (lan_status_diff & LSC_SOFT_ERR)
1501 printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name); 1501 printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name);
1502 if (lan_status_diff & LSC_TRAN_BCN) 1502 if (lan_status_diff & LSC_TRAN_BCN)
1503 printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n",dev->name); 1503 printk(KERN_INFO "%s: We are transmitting the beacon, aaah\n",dev->name);
1504 if (lan_status_diff & LSC_SS) 1504 if (lan_status_diff & LSC_SS)
1505 printk(KERN_INFO "%s: Single Station on the ring\n", dev->name); 1505 printk(KERN_INFO "%s: Single Station on the ring\n", dev->name);
1506 if (lan_status_diff & LSC_RING_REC) 1506 if (lan_status_diff & LSC_RING_REC)
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 63db5a6762a..d9044aba7af 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -393,7 +393,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev)
393 tp->rx_bdb_end[NON_MAC_QUEUE] = (BDBlock *)smctr_malloc(dev, 0); 393 tp->rx_bdb_end[NON_MAC_QUEUE] = (BDBlock *)smctr_malloc(dev, 0);
394 394
395 /* Allocate MAC transmit buffers. 395 /* Allocate MAC transmit buffers.
396 * MAC Tx Buffers doen't have to be on an ODD Boundry. 396 * MAC Tx Buffers doen't have to be on an ODD Boundary.
397 */ 397 */
398 tp->tx_buff_head[MAC_QUEUE] 398 tp->tx_buff_head[MAC_QUEUE]
399 = (__u16 *)smctr_malloc(dev, tp->tx_buff_size[MAC_QUEUE]); 399 = (__u16 *)smctr_malloc(dev, tp->tx_buff_size[MAC_QUEUE]);
@@ -415,7 +415,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev)
415 415
416 /* Allocate Non-MAC transmit buffers. 416 /* Allocate Non-MAC transmit buffers.
417 * ?? For maximum Netware performance, put Tx Buffers on 417 * ?? For maximum Netware performance, put Tx Buffers on
418 * ODD Boundry and then restore malloc to Even Boundrys. 418 * ODD Boundary and then restore malloc to Even Boundrys.
419 */ 419 */
420 smctr_malloc(dev, 1L); 420 smctr_malloc(dev, 1L);
421 tp->tx_buff_head[NON_MAC_QUEUE] 421 tp->tx_buff_head[NON_MAC_QUEUE]
@@ -1311,7 +1311,7 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev)
1311 mem_used += sizeof(BDBlock) * tp->num_rx_bdbs[MAC_QUEUE]; 1311 mem_used += sizeof(BDBlock) * tp->num_rx_bdbs[MAC_QUEUE];
1312 1312
1313 /* Allocate MAC transmit buffers. 1313 /* Allocate MAC transmit buffers.
1314 * MAC transmit buffers don't have to be on an ODD Boundry. 1314 * MAC transmit buffers don't have to be on an ODD Boundary.
1315 */ 1315 */
1316 mem_used += tp->tx_buff_size[MAC_QUEUE]; 1316 mem_used += tp->tx_buff_size[MAC_QUEUE];
1317 1317
@@ -1325,7 +1325,7 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev)
1325 1325
1326 /* Allocate Non-MAC transmit buffers. 1326 /* Allocate Non-MAC transmit buffers.
1327 * For maximum Netware performance, put Tx Buffers on 1327 * For maximum Netware performance, put Tx Buffers on
1328 * ODD Boundry,and then restore malloc to Even Boundrys. 1328 * ODD Boundary,and then restore malloc to Even Boundrys.
1329 */ 1329 */
1330 mem_used += 1L; 1330 mem_used += 1L;
1331 mem_used += tp->tx_buff_size[NON_MAC_QUEUE]; 1331 mem_used += tp->tx_buff_size[NON_MAC_QUEUE];
@@ -3069,8 +3069,8 @@ static int smctr_load_node_addr(struct net_device *dev)
3069 * disabled.!? 3069 * disabled.!?
3070 * 3070 *
3071 * NOTE 2: If the monitor_state is MS_BEACON_TEST_STATE and the receive_mask 3071 * NOTE 2: If the monitor_state is MS_BEACON_TEST_STATE and the receive_mask
3072 * has any multi-cast or promiscous bits set, the receive_mask needs to 3072 * has any multi-cast or promiscuous bits set, the receive_mask needs to
3073 * be changed to clear the multi-cast or promiscous mode bits, the lobe_test 3073 * be changed to clear the multi-cast or promiscuous mode bits, the lobe_test
3074 * run, and then the receive mask set back to its original value if the test 3074 * run, and then the receive mask set back to its original value if the test
3075 * is successful. 3075 * is successful.
3076 */ 3076 */
diff --git a/drivers/net/tokenring/tms380tr.h b/drivers/net/tokenring/tms380tr.h
index 60b30ee38dc..e5a617c586c 100644
--- a/drivers/net/tokenring/tms380tr.h
+++ b/drivers/net/tokenring/tms380tr.h
@@ -442,7 +442,7 @@ typedef struct {
442#define PASS_FIRST_BUF_ONLY 0x0100 /* Passes only first internal buffer 442#define PASS_FIRST_BUF_ONLY 0x0100 /* Passes only first internal buffer
443 * of each received frame; FrameSize 443 * of each received frame; FrameSize
444 * of RPLs must contain internal 444 * of RPLs must contain internal
445 * BUFFER_SIZE bits for promiscous mode. 445 * BUFFER_SIZE bits for promiscuous mode.
446 */ 446 */
447#define ENABLE_FULL_DUPLEX_SELECTION 0x2000 447#define ENABLE_FULL_DUPLEX_SELECTION 0x2000
448 /* Enable the use of full-duplex 448 /* Enable the use of full-duplex
diff --git a/drivers/net/tsi108_eth.h b/drivers/net/tsi108_eth.h
index 5a77ae6c5f3..5fee7d78dc6 100644
--- a/drivers/net/tsi108_eth.h
+++ b/drivers/net/tsi108_eth.h
@@ -305,9 +305,9 @@
305#define TSI108_TX_CRC (1 << 5) /* Generate CRC for this packet */ 305#define TSI108_TX_CRC (1 << 5) /* Generate CRC for this packet */
306#define TSI108_TX_INT (1 << 14) /* Generate an IRQ after frag. processed */ 306#define TSI108_TX_INT (1 << 14) /* Generate an IRQ after frag. processed */
307#define TSI108_TX_RETRY (0xf << 16) /* 4 bit field indicating num. of retries */ 307#define TSI108_TX_RETRY (0xf << 16) /* 4 bit field indicating num. of retries */
308#define TSI108_TX_COL (1 << 20) /* Set if a collision occured */ 308#define TSI108_TX_COL (1 << 20) /* Set if a collision occurred */
309#define TSI108_TX_LCOL (1 << 24) /* Set if a late collision occured */ 309#define TSI108_TX_LCOL (1 << 24) /* Set if a late collision occurred */
310#define TSI108_TX_UNDER (1 << 25) /* Set if a FIFO underrun occured */ 310#define TSI108_TX_UNDER (1 << 25) /* Set if a FIFO underrun occurred */
311#define TSI108_TX_RLIM (1 << 26) /* Set if the retry limit was reached */ 311#define TSI108_TX_RLIM (1 << 26) /* Set if the retry limit was reached */
312#define TSI108_TX_OK (1 << 30) /* Set if the frame TX was successful */ 312#define TSI108_TX_OK (1 << 30) /* Set if the frame TX was successful */
313#define TSI108_TX_OWN (1 << 31) /* Set if the device owns the descriptor */ 313#define TSI108_TX_OWN (1 << 31) /* Set if the device owns the descriptor */
@@ -332,7 +332,7 @@ typedef struct {
332#define TSI108_RX_RUNT (1 << 4)/* Packet is less than minimum size */ 332#define TSI108_RX_RUNT (1 << 4)/* Packet is less than minimum size */
333#define TSI108_RX_HASH (1 << 7)/* Hash table match */ 333#define TSI108_RX_HASH (1 << 7)/* Hash table match */
334#define TSI108_RX_BAD (1 << 8) /* Bad frame */ 334#define TSI108_RX_BAD (1 << 8) /* Bad frame */
335#define TSI108_RX_OVER (1 << 9) /* FIFO overrun occured */ 335#define TSI108_RX_OVER (1 << 9) /* FIFO overrun occurred */
336#define TSI108_RX_TRUNC (1 << 11) /* Packet truncated due to excess length */ 336#define TSI108_RX_TRUNC (1 << 11) /* Packet truncated due to excess length */
337#define TSI108_RX_CRC (1 << 12) /* Packet had a CRC error */ 337#define TSI108_RX_CRC (1 << 12) /* Packet had a CRC error */
338#define TSI108_RX_INT (1 << 13) /* Generate an IRQ after frag. processed */ 338#define TSI108_RX_INT (1 << 13) /* Generate an IRQ after frag. processed */
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 4dbd493b996..efaa1d69b72 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -79,7 +79,7 @@
79 every usable DECchip board, I pinched Donald's 'next_module' field to 79 every usable DECchip board, I pinched Donald's 'next_module' field to
80 link my modules together. 80 link my modules together.
81 81
82 Upto 15 EISA cards can be supported under this driver, limited primarily 82 Up to 15 EISA cards can be supported under this driver, limited primarily
83 by the available IRQ lines. I have checked different configurations of 83 by the available IRQ lines. I have checked different configurations of
84 multiple depca, EtherWORKS 3 cards and de4x5 cards and have not found a 84 multiple depca, EtherWORKS 3 cards and de4x5 cards and have not found a
85 problem yet (provided you have at least depca.c v0.38) ... 85 problem yet (provided you have at least depca.c v0.38) ...
@@ -517,7 +517,7 @@ struct mii_phy {
517 u_int mci; /* 21142 MII Connector Interrupt info */ 517 u_int mci; /* 21142 MII Connector Interrupt info */
518}; 518};
519 519
520#define DE4X5_MAX_PHY 8 /* Allow upto 8 attached PHY devices per board */ 520#define DE4X5_MAX_PHY 8 /* Allow up to 8 attached PHY devices per board */
521 521
522struct sia_phy { 522struct sia_phy {
523 u_char mc; /* Media Code */ 523 u_char mc; /* Media Code */
@@ -1436,7 +1436,7 @@ de4x5_sw_reset(struct net_device *dev)
1436 1436
1437 /* Poll for setup frame completion (adapter interrupts are disabled now) */ 1437 /* Poll for setup frame completion (adapter interrupts are disabled now) */
1438 1438
1439 for (j=0, i=0;(i<500) && (j==0);i++) { /* Upto 500ms delay */ 1439 for (j=0, i=0;(i<500) && (j==0);i++) { /* Up to 500ms delay */
1440 mdelay(1); 1440 mdelay(1);
1441 if ((s32)le32_to_cpu(lp->tx_ring[lp->tx_new].status) >= 0) j=1; 1441 if ((s32)le32_to_cpu(lp->tx_ring[lp->tx_new].status) >= 0) j=1;
1442 } 1442 }
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 7064e035757..fb07f48910a 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -1224,7 +1224,7 @@ static void dmfe_timer(unsigned long data)
1224 1224
1225 1225
1226 /* If chip reports that link is failed it could be because external 1226 /* If chip reports that link is failed it could be because external
1227 PHY link status pin is not conected correctly to chip 1227 PHY link status pin is not connected correctly to chip
1228 To be sure ask PHY too. 1228 To be sure ask PHY too.
1229 */ 1229 */
1230 1230
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
index 3031ed9c4a1..296486bf095 100644
--- a/drivers/net/tulip/eeprom.c
+++ b/drivers/net/tulip/eeprom.c
@@ -115,7 +115,7 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp)
115 0x02, /* phy reset sequence length */ 115 0x02, /* phy reset sequence length */
116 0x01, 0x00, /* phy reset sequence */ 116 0x01, 0x00, /* phy reset sequence */
117 0x00, 0x78, /* media capabilities */ 117 0x00, 0x78, /* media capabilities */
118 0x00, 0xe0, /* nway advertisment */ 118 0x00, 0xe0, /* nway advertisement */
119 0x00, 0x05, /* fdx bit map */ 119 0x00, 0x05, /* fdx bit map */
120 0x00, 0x06 /* ttm bit map */ 120 0x00, 0x06 /* ttm bit map */
121 }; 121 };
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 7fa5ec2de94..82653cb0785 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -846,7 +846,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
846 if(typhoon_num_free_tx(txRing) < (numDesc + 2)) { 846 if(typhoon_num_free_tx(txRing) < (numDesc + 2)) {
847 netif_stop_queue(dev); 847 netif_stop_queue(dev);
848 848
849 /* A Tx complete IRQ could have gotten inbetween, making 849 /* A Tx complete IRQ could have gotten between, making
850 * the ring free again. Only need to recheck here, since 850 * the ring free again. Only need to recheck here, since
851 * Tx is serialized. 851 * Tx is serialized.
852 */ 852 */
diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h
index 055b87ab4f0..d12fcad145e 100644
--- a/drivers/net/ucc_geth.h
+++ b/drivers/net/ucc_geth.h
@@ -80,7 +80,7 @@ struct ucc_geth {
80 frames) received that were between 128 80 frames) received that were between 128
81 (Including FCS length==4) and 255 octets */ 81 (Including FCS length==4) and 255 octets */
82 u32 txok; /* Total number of octets residing in frames 82 u32 txok; /* Total number of octets residing in frames
83 that where involved in successfull 83 that where involved in successful
84 transmission */ 84 transmission */
85 u16 txcf; /* Total number of PAUSE control frames 85 u16 txcf; /* Total number of PAUSE control frames
86 transmitted by this MAC */ 86 transmitted by this MAC */
@@ -759,7 +759,7 @@ struct ucc_geth_hardware_statistics {
759 frames) received that were between 128 759 frames) received that were between 128
760 (Including FCS length==4) and 255 octets */ 760 (Including FCS length==4) and 255 octets */
761 u32 txok; /* Total number of octets residing in frames 761 u32 txok; /* Total number of octets residing in frames
762 that where involved in successfull 762 that where involved in successful
763 transmission */ 763 transmission */
764 u16 txcf; /* Total number of PAUSE control frames 764 u16 txcf; /* Total number of PAUSE control frames
765 transmitted by this MAC */ 765 transmitted by this MAC */
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index 8f128541656..882f53f708d 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -190,7 +190,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
190 190
191 /* 191 /*
192 * EEM packet header format: 192 * EEM packet header format:
193 * b0..14: EEM type dependant (Data or Command) 193 * b0..14: EEM type dependent (Data or Command)
194 * b15: bmType 194 * b15: bmType
195 */ 195 */
196 header = get_unaligned_le16(skb->data); 196 header = get_unaligned_le16(skb->data);
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 341f7056a80..a301479ecc6 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -460,7 +460,7 @@ static const struct driver_info cdc_info = {
460 .manage_power = cdc_manage_power, 460 .manage_power = cdc_manage_power,
461}; 461};
462 462
463static const struct driver_info mbm_info = { 463static const struct driver_info wwan_info = {
464 .description = "Mobile Broadband Network Device", 464 .description = "Mobile Broadband Network Device",
465 .flags = FLAG_WWAN, 465 .flags = FLAG_WWAN,
466 .bind = usbnet_cdc_bind, 466 .bind = usbnet_cdc_bind,
@@ -471,6 +471,7 @@ static const struct driver_info mbm_info = {
471 471
472/*-------------------------------------------------------------------------*/ 472/*-------------------------------------------------------------------------*/
473 473
474#define HUAWEI_VENDOR_ID 0x12D1
474 475
475static const struct usb_device_id products [] = { 476static const struct usb_device_id products [] = {
476/* 477/*
@@ -587,8 +588,17 @@ static const struct usb_device_id products [] = {
587}, { 588}, {
588 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, 589 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
589 USB_CDC_PROTO_NONE), 590 USB_CDC_PROTO_NONE),
590 .driver_info = (unsigned long)&mbm_info, 591 .driver_info = (unsigned long)&wwan_info,
591 592
593}, {
594 /* Various Huawei modems with a network port like the UMG1831 */
595 .match_flags = USB_DEVICE_ID_MATCH_VENDOR
596 | USB_DEVICE_ID_MATCH_INT_INFO,
597 .idVendor = HUAWEI_VENDOR_ID,
598 .bInterfaceClass = USB_CLASS_COMM,
599 .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET,
600 .bInterfaceProtocol = 255,
601 .driver_info = (unsigned long)&wwan_info,
592}, 602},
593 { }, // END 603 { }, // END
594}; 604};
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 967371f0445..1033ef6476a 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -54,13 +54,13 @@
54#include <linux/usb/usbnet.h> 54#include <linux/usb/usbnet.h>
55#include <linux/usb/cdc.h> 55#include <linux/usb/cdc.h>
56 56
57#define DRIVER_VERSION "7-Feb-2011" 57#define DRIVER_VERSION "23-Apr-2011"
58 58
59/* CDC NCM subclass 3.2.1 */ 59/* CDC NCM subclass 3.2.1 */
60#define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 60#define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10
61 61
62/* Maximum NTB length */ 62/* Maximum NTB length */
63#define CDC_NCM_NTB_MAX_SIZE_TX 16384 /* bytes */ 63#define CDC_NCM_NTB_MAX_SIZE_TX (16384 + 4) /* bytes, must be short terminated */
64#define CDC_NCM_NTB_MAX_SIZE_RX 16384 /* bytes */ 64#define CDC_NCM_NTB_MAX_SIZE_RX 16384 /* bytes */
65 65
66/* Minimum value for MaxDatagramSize, ch. 6.2.9 */ 66/* Minimum value for MaxDatagramSize, ch. 6.2.9 */
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index 7dc84971f26..ad0298f9b5f 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -1221,7 +1221,7 @@ static void kaweth_disconnect(struct usb_interface *intf)
1221 1221
1222 usb_set_intfdata(intf, NULL); 1222 usb_set_intfdata(intf, NULL);
1223 if (!kaweth) { 1223 if (!kaweth) {
1224 dev_warn(&intf->dev, "unregistering non-existant device\n"); 1224 dev_warn(&intf->dev, "unregistering non-existent device\n");
1225 return; 1225 return;
1226 } 1226 }
1227 netdev = kaweth->net; 1227 netdev = kaweth->net;
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 727874d9deb..47a6c870b51 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1313,6 +1313,21 @@ static const struct usb_device_id products[] = {
1313 USB_DEVICE(0x0424, 0x9909), 1313 USB_DEVICE(0x0424, 0x9909),
1314 .driver_info = (unsigned long) &smsc95xx_info, 1314 .driver_info = (unsigned long) &smsc95xx_info,
1315 }, 1315 },
1316 {
1317 /* SMSC LAN9530 USB Ethernet Device */
1318 USB_DEVICE(0x0424, 0x9530),
1319 .driver_info = (unsigned long) &smsc95xx_info,
1320 },
1321 {
1322 /* SMSC LAN9730 USB Ethernet Device */
1323 USB_DEVICE(0x0424, 0x9730),
1324 .driver_info = (unsigned long) &smsc95xx_info,
1325 },
1326 {
1327 /* SMSC LAN89530 USB Ethernet Device */
1328 USB_DEVICE(0x0424, 0x9E08),
1329 .driver_info = (unsigned long) &smsc95xx_info,
1330 },
1316 { }, /* END */ 1331 { }, /* END */
1317}; 1332};
1318MODULE_DEVICE_TABLE(usb, products); 1333MODULE_DEVICE_TABLE(usb, products);
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 069c1cf0fdf..009bba3d753 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -736,6 +736,7 @@ int usbnet_open (struct net_device *net)
736 } 736 }
737 } 737 }
738 738
739 set_bit(EVENT_DEV_OPEN, &dev->flags);
739 netif_start_queue (net); 740 netif_start_queue (net);
740 netif_info(dev, ifup, dev->net, 741 netif_info(dev, ifup, dev->net,
741 "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", 742 "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
@@ -1259,6 +1260,9 @@ void usbnet_disconnect (struct usb_interface *intf)
1259 if (dev->driver_info->unbind) 1260 if (dev->driver_info->unbind)
1260 dev->driver_info->unbind (dev, intf); 1261 dev->driver_info->unbind (dev, intf);
1261 1262
1263 usb_kill_urb(dev->interrupt);
1264 usb_free_urb(dev->interrupt);
1265
1262 free_netdev(net); 1266 free_netdev(net);
1263 usb_put_dev (xdev); 1267 usb_put_dev (xdev);
1264} 1268}
@@ -1498,6 +1502,10 @@ int usbnet_resume (struct usb_interface *intf)
1498 int retval; 1502 int retval;
1499 1503
1500 if (!--dev->suspend_count) { 1504 if (!--dev->suspend_count) {
1505 /* resume interrupt URBs */
1506 if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
1507 usb_submit_urb(dev->interrupt, GFP_NOIO);
1508
1501 spin_lock_irq(&dev->txq.lock); 1509 spin_lock_irq(&dev->txq.lock);
1502 while ((res = usb_get_from_anchor(&dev->deferred))) { 1510 while ((res = usb_get_from_anchor(&dev->deferred))) {
1503 1511
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 5e7f069eab5..eb5d75df5d5 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -1861,7 +1861,7 @@ static void rhine_restart_tx(struct net_device *dev) {
1861 u32 intr_status; 1861 u32 intr_status;
1862 1862
1863 /* 1863 /*
1864 * If new errors occured, we need to sort them out before doing Tx. 1864 * If new errors occurred, we need to sort them out before doing Tx.
1865 * In that case the ISR will be back here RSN anyway. 1865 * In that case the ISR will be back here RSN anyway.
1866 */ 1866 */
1867 intr_status = get_intr_status(dev); 1867 intr_status = get_intr_status(dev);
@@ -1887,7 +1887,7 @@ static void rhine_restart_tx(struct net_device *dev) {
1887 /* This should never happen */ 1887 /* This should never happen */
1888 if (debug > 1) 1888 if (debug > 1)
1889 printk(KERN_WARNING "%s: rhine_restart_tx() " 1889 printk(KERN_WARNING "%s: rhine_restart_tx() "
1890 "Another error occured %8.8x.\n", 1890 "Another error occurred %8.8x.\n",
1891 dev->name, intr_status); 1891 dev->name, intr_status);
1892 } 1892 }
1893 1893
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 0d6fec6b7d9..4fe05175384 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -292,7 +292,7 @@ VELOCITY_PARAM(DMA_length, "DMA length");
292/* IP_byte_align[] is used for IP header DWORD byte aligned 292/* IP_byte_align[] is used for IP header DWORD byte aligned
293 0: indicate the IP header won't be DWORD byte aligned.(Default) . 293 0: indicate the IP header won't be DWORD byte aligned.(Default) .
294 1: indicate the IP header will be DWORD byte aligned. 294 1: indicate the IP header will be DWORD byte aligned.
295 In some enviroment, the IP header should be DWORD byte aligned, 295 In some environment, the IP header should be DWORD byte aligned,
296 or the packet will be droped when we receive it. (eg: IPVS) 296 or the packet will be droped when we receive it. (eg: IPVS)
297*/ 297*/
298VELOCITY_PARAM(IP_byte_align, "Enable IP header dword aligned"); 298VELOCITY_PARAM(IP_byte_align, "Enable IP header dword aligned");
@@ -1994,7 +1994,7 @@ static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb)
1994 * @dev: network device 1994 * @dev: network device
1995 * 1995 *
1996 * Replace the current skb that is scheduled for Rx processing by a 1996 * Replace the current skb that is scheduled for Rx processing by a
1997 * shorter, immediatly allocated skb, if the received packet is small 1997 * shorter, immediately allocated skb, if the received packet is small
1998 * enough. This function returns a negative value if the received 1998 * enough. This function returns a negative value if the received
1999 * packet is too big or if memory is exhausted. 1999 * packet is too big or if memory is exhausted.
2000 */ 2000 */
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index cc14b4a7504..0d47c3a0530 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -892,7 +892,7 @@ vmxnet3_prepare_tso(struct sk_buff *skb,
892 * Transmits a pkt thru a given tq 892 * Transmits a pkt thru a given tq
893 * Returns: 893 * Returns:
894 * NETDEV_TX_OK: descriptors are setup successfully 894 * NETDEV_TX_OK: descriptors are setup successfully
895 * NETDEV_TX_OK: error occured, the pkt is dropped 895 * NETDEV_TX_OK: error occurred, the pkt is dropped
896 * NETDEV_TX_BUSY: tx ring is full, queue is stopped 896 * NETDEV_TX_BUSY: tx ring is full, queue is stopped
897 * 897 *
898 * Side-effects: 898 * Side-effects:
@@ -2685,7 +2685,7 @@ vmxnet3_read_mac_addr(struct vmxnet3_adapter *adapter, u8 *mac)
2685 * Enable MSIx vectors. 2685 * Enable MSIx vectors.
2686 * Returns : 2686 * Returns :
2687 * 0 on successful enabling of required vectors, 2687 * 0 on successful enabling of required vectors,
2688 * VMXNET3_LINUX_MIN_MSIX_VECT when only minumum number of vectors required 2688 * VMXNET3_LINUX_MIN_MSIX_VECT when only minimum number of vectors required
2689 * could be enabled. 2689 * could be enabled.
2690 * number of vectors which can be enabled otherwise (this number is smaller 2690 * number of vectors which can be enabled otherwise (this number is smaller
2691 * than VMXNET3_LINUX_MIN_MSIX_VECT) 2691 * than VMXNET3_LINUX_MIN_MSIX_VECT)
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index e74e4b42592..401bebf5950 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -187,7 +187,7 @@ vxge_hw_vpath_fw_api(struct __vxge_hw_virtualpath *vpath, u32 action,
187 VXGE_HW_DEF_DEVICE_POLL_MILLIS); 187 VXGE_HW_DEF_DEVICE_POLL_MILLIS);
188 188
189 /* The __vxge_hw_device_register_poll can udelay for a significant 189 /* The __vxge_hw_device_register_poll can udelay for a significant
190 * amount of time, blocking other proccess from the CPU. If it delays 190 * amount of time, blocking other process from the CPU. If it delays
191 * for ~5secs, a NMI error can occur. A way around this is to give up 191 * for ~5secs, a NMI error can occur. A way around this is to give up
192 * the processor via msleep, but this is not allowed is under lock. 192 * the processor via msleep, but this is not allowed is under lock.
193 * So, only allow it to sleep for ~4secs if open. Otherwise, delay for 193 * So, only allow it to sleep for ~4secs if open. Otherwise, delay for
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 395423aeec0..aff68c1118d 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -2282,7 +2282,7 @@ vxge_alarm_msix_handle(int irq, void *dev_id)
2282 VXGE_HW_VPATH_MSIX_ACTIVE) + VXGE_ALARM_MSIX_ID; 2282 VXGE_HW_VPATH_MSIX_ACTIVE) + VXGE_ALARM_MSIX_ID;
2283 2283
2284 for (i = 0; i < vdev->no_of_vpath; i++) { 2284 for (i = 0; i < vdev->no_of_vpath; i++) {
2285 /* Reduce the chance of loosing alarm interrupts by masking 2285 /* Reduce the chance of losing alarm interrupts by masking
2286 * the vector. A pending bit will be set if an alarm is 2286 * the vector. A pending bit will be set if an alarm is
2287 * generated and on unmask the interrupt will be fired. 2287 * generated and on unmask the interrupt will be fired.
2288 */ 2288 */
@@ -2788,7 +2788,7 @@ static int vxge_open(struct net_device *dev)
2788 } 2788 }
2789 2789
2790 /* Enable vpath to sniff all unicast/multicast traffic that not 2790 /* Enable vpath to sniff all unicast/multicast traffic that not
2791 * addressed to them. We allow promiscous mode for PF only 2791 * addressed to them. We allow promiscuous mode for PF only
2792 */ 2792 */
2793 2793
2794 val64 = 0; 2794 val64 = 0;
@@ -2890,7 +2890,7 @@ out0:
2890 return ret; 2890 return ret;
2891} 2891}
2892 2892
2893/* Loop throught the mac address list and delete all the entries */ 2893/* Loop through the mac address list and delete all the entries */
2894static void vxge_free_mac_add_list(struct vxge_vpath *vpath) 2894static void vxge_free_mac_add_list(struct vxge_vpath *vpath)
2895{ 2895{
2896 2896
@@ -2957,7 +2957,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
2957 val64); 2957 val64);
2958 } 2958 }
2959 2959
2960 /* Remove the function 0 from promiscous mode */ 2960 /* Remove the function 0 from promiscuous mode */
2961 vxge_hw_mgmt_reg_write(vdev->devh, 2961 vxge_hw_mgmt_reg_write(vdev->devh,
2962 vxge_hw_mgmt_reg_type_mrpcim, 2962 vxge_hw_mgmt_reg_type_mrpcim,
2963 0, 2963 0,
diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c
index 8674f331311..2638b8d97b8 100644
--- a/drivers/net/vxge/vxge-traffic.c
+++ b/drivers/net/vxge/vxge-traffic.c
@@ -1111,7 +1111,7 @@ void vxge_hw_channel_dtr_free(struct __vxge_hw_channel *channel, void *dtrh)
1111 * vxge_hw_channel_dtr_count 1111 * vxge_hw_channel_dtr_count
1112 * @channel: Channel handle. Obtained via vxge_hw_channel_open(). 1112 * @channel: Channel handle. Obtained via vxge_hw_channel_open().
1113 * 1113 *
1114 * Retreive number of DTRs available. This function can not be called 1114 * Retrieve number of DTRs available. This function can not be called
1115 * from data path. ring_initial_replenishi() is the only user. 1115 * from data path. ring_initial_replenishi() is the only user.
1116 */ 1116 */
1117int vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel) 1117int vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel)
@@ -2060,7 +2060,7 @@ enum vxge_hw_status vxge_hw_vpath_promisc_enable(
2060 2060
2061 vpath = vp->vpath; 2061 vpath = vp->vpath;
2062 2062
2063 /* Enable promiscous mode for function 0 only */ 2063 /* Enable promiscuous mode for function 0 only */
2064 if (!(vpath->hldev->access_rights & 2064 if (!(vpath->hldev->access_rights &
2065 VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM)) 2065 VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM))
2066 return VXGE_HW_OK; 2066 return VXGE_HW_OK;
diff --git a/drivers/net/vxge/vxge-traffic.h b/drivers/net/vxge/vxge-traffic.h
index 9d9dfda4c7a..6c2fc0b72af 100644
--- a/drivers/net/vxge/vxge-traffic.h
+++ b/drivers/net/vxge/vxge-traffic.h
@@ -681,7 +681,7 @@ struct vxge_hw_xmac_aggr_stats {
681 * @rx_red_discard: Count of received frames that are discarded because of RED 681 * @rx_red_discard: Count of received frames that are discarded because of RED
682 * (Random Early Discard). 682 * (Random Early Discard).
683 * @rx_xgmii_ctrl_err_cnt: Maintains a count of unexpected or misplaced control 683 * @rx_xgmii_ctrl_err_cnt: Maintains a count of unexpected or misplaced control
684 * characters occuring between times of normal data transmission 684 * characters occurring between times of normal data transmission
685 * (i.e. not included in RX_XGMII_DATA_ERR_CNT). This counter is 685 * (i.e. not included in RX_XGMII_DATA_ERR_CNT). This counter is
686 * incremented when either - 686 * incremented when either -
687 * 1) The Reconciliation Sublayer (RS) is expecting one control 687 * 1) The Reconciliation Sublayer (RS) is expecting one control
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 10bafd59f9c..6fb6f8e667d 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -329,7 +329,7 @@ static int startmicrocode(struct cosa_data *cosa, int address);
329static int readmem(struct cosa_data *cosa, char __user *data, int addr, int len); 329static int readmem(struct cosa_data *cosa, char __user *data, int addr, int len);
330static int cosa_reset_and_read_id(struct cosa_data *cosa, char *id); 330static int cosa_reset_and_read_id(struct cosa_data *cosa, char *id);
331 331
332/* Auxilliary functions */ 332/* Auxiliary functions */
333static int get_wait_data(struct cosa_data *cosa); 333static int get_wait_data(struct cosa_data *cosa);
334static int put_wait_data(struct cosa_data *cosa, int data); 334static int put_wait_data(struct cosa_data *cosa, int data);
335static int puthexnumber(struct cosa_data *cosa, int number); 335static int puthexnumber(struct cosa_data *cosa, int number);
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 4578e5b4b41..acb9ea83062 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -56,7 +56,7 @@
56 * IV. Notes 56 * IV. Notes
57 * The current error (XDU, RFO) recovery code is untested. 57 * The current error (XDU, RFO) recovery code is untested.
58 * So far, RDO takes his RX channel down and the right sequence to enable it 58 * So far, RDO takes his RX channel down and the right sequence to enable it
59 * again is still a mistery. If RDO happens, plan a reboot. More details 59 * again is still a mystery. If RDO happens, plan a reboot. More details
60 * in the code (NB: as this happens, TX still works). 60 * in the code (NB: as this happens, TX still works).
61 * Don't mess the cables during operation, especially on DTE ports. I don't 61 * Don't mess the cables during operation, especially on DTE ports. I don't
62 * suggest it for DCE either but at least one can get some messages instead 62 * suggest it for DCE either but at least one can get some messages instead
@@ -1065,7 +1065,7 @@ static int dscc4_open(struct net_device *dev)
1065 1065
1066 /* 1066 /*
1067 * Due to various bugs, there is no way to reliably reset a 1067 * Due to various bugs, there is no way to reliably reset a
1068 * specific port (manufacturer's dependant special PCI #RST wiring 1068 * specific port (manufacturer's dependent special PCI #RST wiring
1069 * apart: it affects all ports). Thus the device goes in the best 1069 * apart: it affects all ports). Thus the device goes in the best
1070 * silent mode possible at dscc4_close() time and simply claims to 1070 * silent mode possible at dscc4_close() time and simply claims to
1071 * be up if it's opened again. It still isn't possible to change 1071 * be up if it's opened again. It still isn't possible to change
@@ -1230,9 +1230,9 @@ static inline int dscc4_check_clock_ability(int port)
1230 * scaling. Of course some rounding may take place. 1230 * scaling. Of course some rounding may take place.
1231 * - no high speed mode (40Mb/s). May be trivial to do but I don't have an 1231 * - no high speed mode (40Mb/s). May be trivial to do but I don't have an
1232 * appropriate external clocking device for testing. 1232 * appropriate external clocking device for testing.
1233 * - no time-slot/clock mode 5: shameless lazyness. 1233 * - no time-slot/clock mode 5: shameless laziness.
1234 * 1234 *
1235 * The clock signals wiring can be (is ?) manufacturer dependant. Good luck. 1235 * The clock signals wiring can be (is ?) manufacturer dependent. Good luck.
1236 * 1236 *
1237 * BIG FAT WARNING: if the device isn't provided enough clocking signal, it 1237 * BIG FAT WARNING: if the device isn't provided enough clocking signal, it
1238 * won't pass the init sequence. For example, straight back-to-back DTE without 1238 * won't pass the init sequence. For example, straight back-to-back DTE without
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
index 48edc5f4dac..e817583e6ec 100644
--- a/drivers/net/wan/hostess_sv11.c
+++ b/drivers/net/wan/hostess_sv11.c
@@ -15,7 +15,7 @@
15 * The hardware does the bus handling to avoid the need for delays between 15 * The hardware does the bus handling to avoid the need for delays between
16 * touching control registers. 16 * touching control registers.
17 * 17 *
18 * Port B isnt wired (why - beats me) 18 * Port B isn't wired (why - beats me)
19 * 19 *
20 * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl> 20 * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl>
21 */ 21 */
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index 6c571e19883..f1e1643dc3e 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -178,7 +178,7 @@
178 * 178 *
179 * The resulting average clock frequency (assuming 33.333 MHz oscillator) is: 179 * The resulting average clock frequency (assuming 33.333 MHz oscillator) is:
180 * freq = 66.666 MHz / (A + (B + 1) / (C + 1)) 180 * freq = 66.666 MHz / (A + (B + 1) / (C + 1))
181 * minumum freq = 66.666 MHz / (A + 1) 181 * minimum freq = 66.666 MHz / (A + 1)
182 * maximum freq = 66.666 MHz / A 182 * maximum freq = 66.666 MHz / A
183 * 183 *
184 * Example: A = 2, B = 2, C = 7, CLOCK_CR register = 2 << 22 | 2 << 12 | 7 184 * Example: A = 2, B = 2, C = 7, CLOCK_CR register = 2 << 22 | 2 << 12 | 7
@@ -230,7 +230,7 @@
230#define PKT_PIPE_MODE_WRITE 0x57 230#define PKT_PIPE_MODE_WRITE 0x57
231 231
232/* HDLC packet status values - desc->status */ 232/* HDLC packet status values - desc->status */
233#define ERR_SHUTDOWN 1 /* stop or shutdown occurrance */ 233#define ERR_SHUTDOWN 1 /* stop or shutdown occurrence */
234#define ERR_HDLC_ALIGN 2 /* HDLC alignment error */ 234#define ERR_HDLC_ALIGN 2 /* HDLC alignment error */
235#define ERR_HDLC_FCS 3 /* HDLC Frame Check Sum error */ 235#define ERR_HDLC_FCS 3 /* HDLC Frame Check Sum error */
236#define ERR_RXFREE_Q_EMPTY 4 /* RX-free queue became empty while receiving 236#define ERR_RXFREE_Q_EMPTY 4 /* RX-free queue became empty while receiving
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 70feb84df67..b7f2358d23b 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -24,7 +24,7 @@
24 * 24 *
25 * Linux driver notes: 25 * Linux driver notes:
26 * Linux uses the device struct lmc_private to pass private information 26 * Linux uses the device struct lmc_private to pass private information
27 * arround. 27 * around.
28 * 28 *
29 * The initialization portion of this driver (the lmc_reset() and the 29 * The initialization portion of this driver (the lmc_reset() and the
30 * lmc_dec_reset() functions, as well as the led controls and the 30 * lmc_dec_reset() functions, as well as the led controls and the
diff --git a/drivers/net/wan/lmc/lmc_var.h b/drivers/net/wan/lmc/lmc_var.h
index 65d01978e78..01ad45218d1 100644
--- a/drivers/net/wan/lmc/lmc_var.h
+++ b/drivers/net/wan/lmc/lmc_var.h
@@ -180,7 +180,7 @@ struct lmc___ctl {
180 180
181 181
182/* 182/*
183 * Carefull, look at the data sheet, there's more to this 183 * Careful, look at the data sheet, there's more to this
184 * structure than meets the eye. It should probably be: 184 * structure than meets the eye. It should probably be:
185 * 185 *
186 * struct tulip_desc_t { 186 * struct tulip_desc_t {
@@ -380,7 +380,7 @@ struct lmc___softc {
380/* CSR6 settings */ 380/* CSR6 settings */
381#define OPERATION_MODE 0x00000200 /* Full Duplex */ 381#define OPERATION_MODE 0x00000200 /* Full Duplex */
382#define PROMISC_MODE 0x00000040 /* Promiscuous Mode */ 382#define PROMISC_MODE 0x00000040 /* Promiscuous Mode */
383#define RECIEVE_ALL 0x40000000 /* Recieve All */ 383#define RECIEVE_ALL 0x40000000 /* Receive All */
384#define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames */ 384#define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames */
385 385
386/* Dec control registers CSR6 as well */ 386/* Dec control registers CSR6 as well */
@@ -398,7 +398,7 @@ struct lmc___softc {
398#define TULIP_CMD_RECEIVEALL 0x40000000L /* (RW) Receivel all frames? */ 398#define TULIP_CMD_RECEIVEALL 0x40000000L /* (RW) Receivel all frames? */
399#define TULIP_CMD_MUSTBEONE 0x02000000L /* (RW) Must Be One (21140) */ 399#define TULIP_CMD_MUSTBEONE 0x02000000L /* (RW) Must Be One (21140) */
400#define TULIP_CMD_TXTHRSHLDCTL 0x00400000L /* (RW) Transmit Threshold Mode (21140) */ 400#define TULIP_CMD_TXTHRSHLDCTL 0x00400000L /* (RW) Transmit Threshold Mode (21140) */
401#define TULIP_CMD_STOREFWD 0x00200000L /* (RW) Store and Foward (21140) */ 401#define TULIP_CMD_STOREFWD 0x00200000L /* (RW) Store and Forward (21140) */
402#define TULIP_CMD_NOHEARTBEAT 0x00080000L /* (RW) No Heartbeat (21140) */ 402#define TULIP_CMD_NOHEARTBEAT 0x00080000L /* (RW) No Heartbeat (21140) */
403#define TULIP_CMD_PORTSELECT 0x00040000L /* (RW) Post Select (100Mb) (21140) */ 403#define TULIP_CMD_PORTSELECT 0x00040000L /* (RW) Post Select (100Mb) (21140) */
404#define TULIP_CMD_FULLDUPLEX 0x00000200L /* (RW) Full Duplex Mode */ 404#define TULIP_CMD_FULLDUPLEX 0x00000200L /* (RW) Full Duplex Mode */
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index 93956861ea2..0806232e0f8 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -542,7 +542,7 @@ static void z8530_dma_tx(struct z8530_channel *chan)
542 z8530_tx(chan); 542 z8530_tx(chan);
543 return; 543 return;
544 } 544 }
545 /* This shouldnt occur in DMA mode */ 545 /* This shouldn't occur in DMA mode */
546 printk(KERN_ERR "DMA tx - bogus event!\n"); 546 printk(KERN_ERR "DMA tx - bogus event!\n");
547 z8530_tx(chan); 547 z8530_tx(chan);
548} 548}
@@ -1219,7 +1219,7 @@ static const char *z8530_type_name[]={
1219 * @io: the port value in question 1219 * @io: the port value in question
1220 * 1220 *
1221 * Describe a Z8530 in a standard format. We must pass the I/O as 1221 * Describe a Z8530 in a standard format. We must pass the I/O as
1222 * the port offset isnt predictable. The main reason for this function 1222 * the port offset isn't predictable. The main reason for this function
1223 * is to try and get a common format of report. 1223 * is to try and get a common format of report.
1224 */ 1224 */
1225 1225
@@ -1588,7 +1588,7 @@ static void z8530_rx_done(struct z8530_channel *c)
1588 unsigned long flags; 1588 unsigned long flags;
1589 1589
1590 /* 1590 /*
1591 * Complete this DMA. Neccessary to find the length 1591 * Complete this DMA. Necessary to find the length
1592 */ 1592 */
1593 1593
1594 flags=claim_dma_lock(); 1594 flags=claim_dma_lock();
@@ -1657,7 +1657,7 @@ static void z8530_rx_done(struct z8530_channel *c)
1657 * fifo length for this. Thus we want to flip to the new 1657 * fifo length for this. Thus we want to flip to the new
1658 * buffer and then mess around copying and allocating 1658 * buffer and then mess around copying and allocating
1659 * things. For the current case it doesn't matter but 1659 * things. For the current case it doesn't matter but
1660 * if you build a system where the sync irq isnt blocked 1660 * if you build a system where the sync irq isn't blocked
1661 * by the kernel IRQ disable then you need only block the 1661 * by the kernel IRQ disable then you need only block the
1662 * sync IRQ for the RT_LOCK area. 1662 * sync IRQ for the RT_LOCK area.
1663 * 1663 *
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 12b84ed0e38..727d728649b 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -378,7 +378,7 @@ void i2400m_report_tlv_system_state(struct i2400m *i2400m,
378 * the device's state as sometimes we need to do a link-renew (the BS 378 * the device's state as sometimes we need to do a link-renew (the BS
379 * wants us to renew a DHCP lease, for example). 379 * wants us to renew a DHCP lease, for example).
380 * 380 *
381 * In fact, doc says that everytime we get a link-up, we should do a 381 * In fact, doc says that every time we get a link-up, we should do a
382 * DHCP negotiation... 382 * DHCP negotiation...
383 */ 383 */
384static 384static
@@ -675,7 +675,7 @@ void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code)
675 * - the ack message wasn't formatted correctly 675 * - the ack message wasn't formatted correctly
676 * 676 *
677 * The returned skb has been allocated with wimax_msg_to_user_alloc(), 677 * The returned skb has been allocated with wimax_msg_to_user_alloc(),
678 * it contains the reponse in a netlink attribute and is ready to be 678 * it contains the response in a netlink attribute and is ready to be
679 * passed up to user space with wimax_msg_to_user_send(). To access 679 * passed up to user space with wimax_msg_to_user_send(). To access
680 * the payload and its length, use wimax_msg_{data,len}() on the skb. 680 * the payload and its length, use wimax_msg_{data,len}() on the skb.
681 * 681 *
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c
index 65bc334ed57..47cae7150bc 100644
--- a/drivers/net/wimax/i2400m/driver.c
+++ b/drivers/net/wimax/i2400m/driver.c
@@ -654,7 +654,7 @@ void __i2400m_dev_reset_handle(struct work_struct *ws)
654 if (result == -EUCLEAN) { 654 if (result == -EUCLEAN) {
655 /* 655 /*
656 * We come here because the reset during operational mode 656 * We come here because the reset during operational mode
657 * wasn't successully done and need to proceed to a bus 657 * wasn't successfully done and need to proceed to a bus
658 * reset. For the dev_reset_handle() to be able to handle 658 * reset. For the dev_reset_handle() to be able to handle
659 * the reset event later properly, we restore boot_mode back 659 * the reset event later properly, we restore boot_mode back
660 * to the state before previous reset. ie: just like we are 660 * to the state before previous reset. ie: just like we are
@@ -755,7 +755,7 @@ EXPORT_SYMBOL_GPL(i2400m_error_recovery);
755 * Alloc the command and ack buffers for boot mode 755 * Alloc the command and ack buffers for boot mode
756 * 756 *
757 * Get the buffers needed to deal with boot mode messages. These 757 * Get the buffers needed to deal with boot mode messages. These
758 * buffers need to be allocated before the sdio recieve irq is setup. 758 * buffers need to be allocated before the sdio receive irq is setup.
759 */ 759 */
760static 760static
761int i2400m_bm_buf_alloc(struct i2400m *i2400m) 761int i2400m_bm_buf_alloc(struct i2400m *i2400m)
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
index 8b55a5b1415..85dadd5bf4b 100644
--- a/drivers/net/wimax/i2400m/fw.c
+++ b/drivers/net/wimax/i2400m/fw.c
@@ -54,7 +54,7 @@
54 * endpoint and read from it in the notification endpoint. In SDIO we 54 * endpoint and read from it in the notification endpoint. In SDIO we
55 * talk to it via the write address and read from the read address. 55 * talk to it via the write address and read from the read address.
56 * 56 *
57 * Upon entrance to boot mode, the device sends (preceeded with a few 57 * Upon entrance to boot mode, the device sends (preceded with a few
58 * zero length packets (ZLPs) on the notification endpoint in USB) a 58 * zero length packets (ZLPs) on the notification endpoint in USB) a
59 * reboot barker (4 le32 words with the same value). We ack it by 59 * reboot barker (4 le32 words with the same value). We ack it by
60 * sending the same barker to the device. The device acks with a 60 * sending the same barker to the device. The device acks with a
@@ -1589,7 +1589,7 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags)
1589 i2400m->fw_name = fw_name; 1589 i2400m->fw_name = fw_name;
1590 ret = i2400m_fw_bootstrap(i2400m, fw, flags); 1590 ret = i2400m_fw_bootstrap(i2400m, fw, flags);
1591 release_firmware(fw); 1591 release_firmware(fw);
1592 if (ret >= 0) /* firmware loaded succesfully */ 1592 if (ret >= 0) /* firmware loaded successfully */
1593 break; 1593 break;
1594 i2400m->fw_name = NULL; 1594 i2400m->fw_name = NULL;
1595 } 1595 }
diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h b/drivers/net/wimax/i2400m/i2400m-usb.h
index eb80243e22d..6650fde99e1 100644
--- a/drivers/net/wimax/i2400m/i2400m-usb.h
+++ b/drivers/net/wimax/i2400m/i2400m-usb.h
@@ -105,14 +105,14 @@ static inline void edc_init(struct edc *edc)
105 * 105 *
106 * @edc: pointer to error density counter. 106 * @edc: pointer to error density counter.
107 * @max_err: maximum number of errors we can accept over the timeframe 107 * @max_err: maximum number of errors we can accept over the timeframe
108 * @timeframe: lenght of the timeframe (in jiffies). 108 * @timeframe: length of the timeframe (in jiffies).
109 * 109 *
110 * Returns: !0 1 if maximum acceptable errors per timeframe has been 110 * Returns: !0 1 if maximum acceptable errors per timeframe has been
111 * exceeded. 0 otherwise. 111 * exceeded. 0 otherwise.
112 * 112 *
113 * This is way to determine if the number of acceptable errors per time 113 * This is way to determine if the number of acceptable errors per time
114 * period has been exceeded. It is not accurate as there are cases in which 114 * period has been exceeded. It is not accurate as there are cases in which
115 * this scheme will not work, for example if there are periodic occurences 115 * this scheme will not work, for example if there are periodic occurrences
116 * of errors that straddle updates to the start time. This scheme is 116 * of errors that straddle updates to the start time. This scheme is
117 * sufficient for our usage. 117 * sufficient for our usage.
118 * 118 *
@@ -204,7 +204,7 @@ enum {
204 * usb_autopm_get/put_interface() barriers when executing 204 * usb_autopm_get/put_interface() barriers when executing
205 * commands. See doc in i2400mu_suspend() for more information. 205 * commands. See doc in i2400mu_suspend() for more information.
206 * 206 *
207 * @rx_size_auto_shrink: if true, the rx_size is shrinked 207 * @rx_size_auto_shrink: if true, the rx_size is shrunk
208 * automatically based on the average size of the received 208 * automatically based on the average size of the received
209 * transactions. This allows the receive code to allocate smaller 209 * transactions. This allows the receive code to allocate smaller
210 * chunks of memory and thus reduce pressure on the memory 210 * chunks of memory and thus reduce pressure on the memory
diff --git a/drivers/net/wimax/i2400m/i2400m.h b/drivers/net/wimax/i2400m/i2400m.h
index 030cbfd3170..5eacc653a94 100644
--- a/drivers/net/wimax/i2400m/i2400m.h
+++ b/drivers/net/wimax/i2400m/i2400m.h
@@ -526,7 +526,7 @@ struct i2400m_barker_db;
526 * 526 *
527 * @barker: barker type that the device uses; this is initialized by 527 * @barker: barker type that the device uses; this is initialized by
528 * i2400m_is_boot_barker() the first time it is called. Then it 528 * i2400m_is_boot_barker() the first time it is called. Then it
529 * won't change during the life cycle of the device and everytime 529 * won't change during the life cycle of the device and every time
530 * a boot barker is received, it is just verified for it being the 530 * a boot barker is received, it is just verified for it being the
531 * same. 531 * same.
532 * 532 *
@@ -928,7 +928,7 @@ extern void i2400m_report_tlv_rf_switches_status(
928 struct i2400m *, const struct i2400m_tlv_rf_switches_status *); 928 struct i2400m *, const struct i2400m_tlv_rf_switches_status *);
929 929
930/* 930/*
931 * Helpers for firmware backwards compability 931 * Helpers for firmware backwards compatibility
932 * 932 *
933 * As we aim to support at least the firmware version that was 933 * As we aim to support at least the firmware version that was
934 * released with the previous kernel/driver release, some code will be 934 * released with the previous kernel/driver release, some code will be
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
index 94742e1eafe..2edd8fe1c1f 100644
--- a/drivers/net/wimax/i2400m/netdev.c
+++ b/drivers/net/wimax/i2400m/netdev.c
@@ -166,7 +166,7 @@ void i2400m_wake_tx_work(struct work_struct *ws)
166 d_fnstart(3, dev, "(ws %p i2400m %p skb %p)\n", ws, i2400m, skb); 166 d_fnstart(3, dev, "(ws %p i2400m %p skb %p)\n", ws, i2400m, skb);
167 result = -EINVAL; 167 result = -EINVAL;
168 if (skb == NULL) { 168 if (skb == NULL) {
169 dev_err(dev, "WAKE&TX: skb dissapeared!\n"); 169 dev_err(dev, "WAKE&TX: skb disappeared!\n");
170 goto out_put; 170 goto out_put;
171 } 171 }
172 /* If we have, somehow, lost the connection after this was 172 /* If we have, somehow, lost the connection after this was
diff --git a/drivers/net/wimax/i2400m/op-rfkill.c b/drivers/net/wimax/i2400m/op-rfkill.c
index 9e02b90b008..b0dba35a8ad 100644
--- a/drivers/net/wimax/i2400m/op-rfkill.c
+++ b/drivers/net/wimax/i2400m/op-rfkill.c
@@ -27,7 +27,7 @@
27 * - report changes in the HW RF Kill switch [with 27 * - report changes in the HW RF Kill switch [with
28 * wimax_rfkill_{sw,hw}_report(), which happens when we detect those 28 * wimax_rfkill_{sw,hw}_report(), which happens when we detect those
29 * indications coming through hardware reports]. We also do it on 29 * indications coming through hardware reports]. We also do it on
30 * initialization to let the stack know the intial HW state. 30 * initialization to let the stack know the initial HW state.
31 * 31 *
32 * - implement indications from the stack to change the SW RF Kill 32 * - implement indications from the stack to change the SW RF Kill
33 * switch (coming from sysfs, the wimax stack or user space). 33 * switch (coming from sysfs, the wimax stack or user space).
@@ -73,7 +73,7 @@ int i2400m_radio_is(struct i2400m *i2400m, enum wimax_rf_state state)
73 * Generic Netlink will call this function when a message is sent from 73 * Generic Netlink will call this function when a message is sent from
74 * userspace to change the software RF-Kill switch status. 74 * userspace to change the software RF-Kill switch status.
75 * 75 *
76 * This function will set the device's sofware RF-Kill switch state to 76 * This function will set the device's software RF-Kill switch state to
77 * match what is requested. 77 * match what is requested.
78 * 78 *
79 * NOTE: the i2400m has a strict state machine; we can only set the 79 * NOTE: the i2400m has a strict state machine; we can only set the
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c
index 844133b44af..2f94a872101 100644
--- a/drivers/net/wimax/i2400m/rx.c
+++ b/drivers/net/wimax/i2400m/rx.c
@@ -349,7 +349,7 @@ error_no_waiter:
349 * 349 *
350 * For reports: We can't clone the original skb where the data is 350 * For reports: We can't clone the original skb where the data is
351 * because we need to send this up via netlink; netlink has to add 351 * because we need to send this up via netlink; netlink has to add
352 * headers and we can't overwrite what's preceeding the payload...as 352 * headers and we can't overwrite what's preceding the payload...as
353 * it is another message. So we just dup them. 353 * it is another message. So we just dup them.
354 */ 354 */
355static 355static
@@ -425,7 +425,7 @@ error_check:
425 * 425 *
426 * As in i2400m_rx_ctl(), we can't clone the original skb where the 426 * As in i2400m_rx_ctl(), we can't clone the original skb where the
427 * data is because we need to send this up via netlink; netlink has to 427 * data is because we need to send this up via netlink; netlink has to
428 * add headers and we can't overwrite what's preceeding the 428 * add headers and we can't overwrite what's preceding the
429 * payload...as it is another message. So we just dup them. 429 * payload...as it is another message. So we just dup them.
430 */ 430 */
431static 431static
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c
index 3f819efc06b..4b30ed11d78 100644
--- a/drivers/net/wimax/i2400m/tx.c
+++ b/drivers/net/wimax/i2400m/tx.c
@@ -149,7 +149,7 @@
149 * (with a moved message header to make sure it is size-aligned to 149 * (with a moved message header to make sure it is size-aligned to
150 * 16), TAIL room that was unusable (and thus is marked with a message 150 * 16), TAIL room that was unusable (and thus is marked with a message
151 * header that says 'skip this') and at the head of the buffer, an 151 * header that says 'skip this') and at the head of the buffer, an
152 * imcomplete message with a couple of payloads. 152 * incomplete message with a couple of payloads.
153 * 153 *
154 * N ___________________________________________________ 154 * N ___________________________________________________
155 * | | 155 * | |
@@ -819,7 +819,7 @@ EXPORT_SYMBOL_GPL(i2400m_tx);
819 * the FIF that is ready for transmission. 819 * the FIF that is ready for transmission.
820 * 820 *
821 * It sets the state in @i2400m to indicate the bus-specific driver is 821 * It sets the state in @i2400m to indicate the bus-specific driver is
822 * transfering that message (i2400m->tx_msg_size). 822 * transferring that message (i2400m->tx_msg_size).
823 * 823 *
824 * Once the transfer is completed, call i2400m_tx_msg_sent(). 824 * Once the transfer is completed, call i2400m_tx_msg_sent().
825 * 825 *
diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
index b58ec56b86f..1fda46c55eb 100644
--- a/drivers/net/wimax/i2400m/usb-fw.c
+++ b/drivers/net/wimax/i2400m/usb-fw.c
@@ -169,7 +169,7 @@ retry:
169 * 169 *
170 * Command can be a raw command, which requires no preparation (and 170 * Command can be a raw command, which requires no preparation (and
171 * which might not even be following the command format). Checks that 171 * which might not even be following the command format). Checks that
172 * the right amount of data was transfered. 172 * the right amount of data was transferred.
173 * 173 *
174 * To satisfy USB requirements (no onstack, vmalloc or in data segment 174 * To satisfy USB requirements (no onstack, vmalloc or in data segment
175 * buffers), we copy the command to i2400m->bm_cmd_buf and send it from 175 * buffers), we copy the command to i2400m->bm_cmd_buf and send it from
diff --git a/drivers/net/wimax/i2400m/usb-rx.c b/drivers/net/wimax/i2400m/usb-rx.c
index a26483a812a..e3257681e36 100644
--- a/drivers/net/wimax/i2400m/usb-rx.c
+++ b/drivers/net/wimax/i2400m/usb-rx.c
@@ -58,7 +58,7 @@
58 * a zillion reads; by serializing, we are throttling. 58 * a zillion reads; by serializing, we are throttling.
59 * 59 *
60 * - RX data processing can get heavy enough so that it is not 60 * - RX data processing can get heavy enough so that it is not
61 * appropiate for doing it in the USB callback; thus we run it in a 61 * appropriate for doing it in the USB callback; thus we run it in a
62 * process context. 62 * process context.
63 * 63 *
64 * We provide a read buffer of an arbitrary size (short of a page); if 64 * We provide a read buffer of an arbitrary size (short of a page); if
diff --git a/drivers/net/wimax/i2400m/usb-tx.c b/drivers/net/wimax/i2400m/usb-tx.c
index c65b9979f87..ac357acfb3e 100644
--- a/drivers/net/wimax/i2400m/usb-tx.c
+++ b/drivers/net/wimax/i2400m/usb-tx.c
@@ -168,7 +168,7 @@ retry:
168/* 168/*
169 * Get the next TX message in the TX FIFO and send it to the device 169 * Get the next TX message in the TX FIFO and send it to the device
170 * 170 *
171 * Note we exit the loop if i2400mu_tx() fails; that funtion only 171 * Note we exit the loop if i2400mu_tx() fails; that function only
172 * fails on hard error (failing to tx a buffer not being one of them, 172 * fails on hard error (failing to tx a buffer not being one of them,
173 * see its doc). 173 * see its doc).
174 * 174 *
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 57a79b0475f..4e5c7a11f04 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1884,7 +1884,7 @@ static int airo_open(struct net_device *dev) {
1884 /* Make sure the card is configured. 1884 /* Make sure the card is configured.
1885 * Wireless Extensions may postpone config changes until the card 1885 * Wireless Extensions may postpone config changes until the card
1886 * is open (to pipeline changes and speed-up card setup). If 1886 * is open (to pipeline changes and speed-up card setup). If
1887 * those changes are not yet commited, do it now - Jean II */ 1887 * those changes are not yet committed, do it now - Jean II */
1888 if (test_bit(FLAG_COMMIT, &ai->flags)) { 1888 if (test_bit(FLAG_COMMIT, &ai->flags)) {
1889 disable_MAC(ai, 1); 1889 disable_MAC(ai, 1);
1890 writeConfigRid(ai, 1); 1890 writeConfigRid(ai, 1);
@@ -1992,7 +1992,7 @@ static int mpi_send_packet (struct net_device *dev)
1992/* 1992/*
1993 * Magic, the cards firmware needs a length count (2 bytes) in the host buffer 1993 * Magic, the cards firmware needs a length count (2 bytes) in the host buffer
1994 * right after TXFID_HDR.The TXFID_HDR contains the status short so payloadlen 1994 * right after TXFID_HDR.The TXFID_HDR contains the status short so payloadlen
1995 * is immediatly after it. ------------------------------------------------ 1995 * is immediately after it. ------------------------------------------------
1996 * |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA| 1996 * |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA|
1997 * ------------------------------------------------ 1997 * ------------------------------------------------
1998 */ 1998 */
@@ -2006,7 +2006,7 @@ static int mpi_send_packet (struct net_device *dev)
2006 sizeof(wifictlhdr8023) + 2 ; 2006 sizeof(wifictlhdr8023) + 2 ;
2007 2007
2008 /* 2008 /*
2009 * Firmware automaticly puts 802 header on so 2009 * Firmware automatically puts 802 header on so
2010 * we don't need to account for it in the length 2010 * we don't need to account for it in the length
2011 */ 2011 */
2012 if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && 2012 if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled &&
@@ -2531,7 +2531,7 @@ static int mpi_init_descriptors (struct airo_info *ai)
2531/* 2531/*
2532 * We are setting up three things here: 2532 * We are setting up three things here:
2533 * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid. 2533 * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid.
2534 * 2) Map PCI memory for issueing commands. 2534 * 2) Map PCI memory for issuing commands.
2535 * 3) Allocate memory (shared) to send and receive ethernet frames. 2535 * 3) Allocate memory (shared) to send and receive ethernet frames.
2536 */ 2536 */
2537static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci) 2537static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci)
@@ -3947,7 +3947,7 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) {
3947 3947
3948 if ( max_tries == -1 ) { 3948 if ( max_tries == -1 ) {
3949 airo_print_err(ai->dev->name, 3949 airo_print_err(ai->dev->name,
3950 "Max tries exceeded when issueing command"); 3950 "Max tries exceeded when issuing command");
3951 if (IN4500(ai, COMMAND) & COMMAND_BUSY) 3951 if (IN4500(ai, COMMAND) & COMMAND_BUSY)
3952 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); 3952 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY);
3953 return ERROR; 3953 return ERROR;
@@ -4173,7 +4173,7 @@ done:
4173} 4173}
4174 4174
4175/* Note, that we are using BAP1 which is also used by transmit, so 4175/* Note, that we are using BAP1 which is also used by transmit, so
4176 * make sure this isnt called when a transmit is happening */ 4176 * make sure this isn't called when a transmit is happening */
4177static int PC4500_writerid(struct airo_info *ai, u16 rid, 4177static int PC4500_writerid(struct airo_info *ai, u16 rid,
4178 const void *pBuf, int len, int lock) 4178 const void *pBuf, int len, int lock)
4179{ 4179{
@@ -4776,7 +4776,7 @@ static int proc_stats_rid_open( struct inode *inode,
4776 if (!statsLabels[i]) continue; 4776 if (!statsLabels[i]) continue;
4777 if (j+strlen(statsLabels[i])+16>4096) { 4777 if (j+strlen(statsLabels[i])+16>4096) {
4778 airo_print_warn(apriv->dev->name, 4778 airo_print_warn(apriv->dev->name,
4779 "Potentially disasterous buffer overflow averted!"); 4779 "Potentially disastrous buffer overflow averted!");
4780 break; 4780 break;
4781 } 4781 }
4782 j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i], 4782 j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i],
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index b761fec0d72..ccc2edaaeda 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -974,7 +974,7 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
974 if (ar->rx_failover_missing <= 0) { 974 if (ar->rx_failover_missing <= 0) {
975 /* 975 /*
976 * nested ar9170_rx call! 976 * nested ar9170_rx call!
977 * termination is guranteed, even when the 977 * termination is guaranteed, even when the
978 * combined frame also have a element with 978 * combined frame also have a element with
979 * a bad tag. 979 * a bad tag.
980 */ 980 */
diff --git a/drivers/net/wireless/ath/ar9170/phy.c b/drivers/net/wireless/ath/ar9170/phy.c
index 0dbfcf79ac9..aa8d06ba1ee 100644
--- a/drivers/net/wireless/ath/ar9170/phy.c
+++ b/drivers/net/wireless/ath/ar9170/phy.c
@@ -424,7 +424,7 @@ static u32 ar9170_get_default_phy_reg_val(u32 reg, bool is_2ghz, bool is_40mhz)
424 424
425/* 425/*
426 * initialize some phy regs from eeprom values in modal_header[] 426 * initialize some phy regs from eeprom values in modal_header[]
427 * acc. to band and bandwith 427 * acc. to band and bandwidth
428 */ 428 */
429static int ar9170_init_phy_from_eeprom(struct ar9170 *ar, 429static int ar9170_init_phy_from_eeprom(struct ar9170 *ar,
430 bool is_2ghz, bool is_40mhz) 430 bool is_2ghz, bool is_40mhz)
diff --git a/drivers/net/wireless/ath/ath5k/ani.h b/drivers/net/wireless/ath/ath5k/ani.h
index d0a664039c8..03401539709 100644
--- a/drivers/net/wireless/ath/ath5k/ani.h
+++ b/drivers/net/wireless/ath/ath5k/ani.h
@@ -27,7 +27,7 @@
27#define ATH5K_ANI_RSSI_THR_HIGH 40 27#define ATH5K_ANI_RSSI_THR_HIGH 40
28#define ATH5K_ANI_RSSI_THR_LOW 7 28#define ATH5K_ANI_RSSI_THR_LOW 7
29 29
30/* maximum availabe levels */ 30/* maximum available levels */
31#define ATH5K_ANI_MAX_FIRSTEP_LVL 2 31#define ATH5K_ANI_MAX_FIRSTEP_LVL 2
32#define ATH5K_ANI_MAX_NOISE_IMM_LVL 1 32#define ATH5K_ANI_MAX_NOISE_IMM_LVL 1
33 33
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 4d7f21ee111..349a5963931 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1953,7 +1953,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf)
1953 1953
1954#define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3 1954#define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3
1955 /* We use FUDGE to make sure the next TBTT is ahead of the current TU. 1955 /* We use FUDGE to make sure the next TBTT is ahead of the current TU.
1956 * Since we later substract AR5K_TUNE_SW_BEACON_RESP (10) in the timer 1956 * Since we later subtract AR5K_TUNE_SW_BEACON_RESP (10) in the timer
1957 * configuration we need to make sure it is bigger than that. */ 1957 * configuration we need to make sure it is bigger than that. */
1958 1958
1959 if (bc_tsf == -1) { 1959 if (bc_tsf == -1) {
@@ -1971,7 +1971,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf)
1971 intval |= AR5K_BEACON_RESET_TSF; 1971 intval |= AR5K_BEACON_RESET_TSF;
1972 } else if (bc_tsf > hw_tsf) { 1972 } else if (bc_tsf > hw_tsf) {
1973 /* 1973 /*
1974 * beacon received, SW merge happend but HW TSF not yet updated. 1974 * beacon received, SW merge happened but HW TSF not yet updated.
1975 * not possible to reconfigure timers yet, but next time we 1975 * not possible to reconfigure timers yet, but next time we
1976 * receive a beacon with the same BSSID, the hardware will 1976 * receive a beacon with the same BSSID, the hardware will
1977 * automatically update the TSF and then we need to reconfigure 1977 * automatically update the TSF and then we need to reconfigure
@@ -2651,7 +2651,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
2651 synchronize_irq(sc->irq); 2651 synchronize_irq(sc->irq);
2652 stop_tasklets(sc); 2652 stop_tasklets(sc);
2653 2653
2654 /* Save ani mode and disable ANI durring 2654 /* Save ani mode and disable ANI during
2655 * reset. If we don't we might get false 2655 * reset. If we don't we might get false
2656 * PHY error interrupts. */ 2656 * PHY error interrupts. */
2657 ani_mode = ah->ah_sc->ani_state.ani_mode; 2657 ani_mode = ah->ah_sc->ani_state.ani_mode;
diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c
index 16b44ff7dd3..a8fcc94269f 100644
--- a/drivers/net/wireless/ath/ath5k/desc.c
+++ b/drivers/net/wireless/ath/ath5k/desc.c
@@ -51,7 +51,7 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
51 /* 51 /*
52 * Validate input 52 * Validate input
53 * - Zero retries don't make sense. 53 * - Zero retries don't make sense.
54 * - A zero rate will put the HW into a mode where it continously sends 54 * - A zero rate will put the HW into a mode where it continuously sends
55 * noise on the channel, so it is important to avoid this. 55 * noise on the channel, so it is important to avoid this.
56 */ 56 */
57 if (unlikely(tx_tries0 == 0)) { 57 if (unlikely(tx_tries0 == 0)) {
@@ -190,7 +190,7 @@ static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *ah,
190 /* 190 /*
191 * Validate input 191 * Validate input
192 * - Zero retries don't make sense. 192 * - Zero retries don't make sense.
193 * - A zero rate will put the HW into a mode where it continously sends 193 * - A zero rate will put the HW into a mode where it continuously sends
194 * noise on the channel, so it is important to avoid this. 194 * noise on the channel, so it is important to avoid this.
195 */ 195 */
196 if (unlikely(tx_tries0 == 0)) { 196 if (unlikely(tx_tries0 == 0)) {
@@ -300,7 +300,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
300 /* 300 /*
301 * Rates can be 0 as long as the retry count is 0 too. 301 * Rates can be 0 as long as the retry count is 0 too.
302 * A zero rate and nonzero retry count will put the HW into a mode where 302 * A zero rate and nonzero retry count will put the HW into a mode where
303 * it continously sends noise on the channel, so it is important to 303 * it continuously sends noise on the channel, so it is important to
304 * avoid this. 304 * avoid this.
305 */ 305 */
306 if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) || 306 if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) ||
@@ -342,7 +342,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
342\***********************/ 342\***********************/
343 343
344/* 344/*
345 * Proccess the tx status descriptor on 5210/5211 345 * Process the tx status descriptor on 5210/5211
346 */ 346 */
347static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah, 347static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah,
348 struct ath5k_desc *desc, struct ath5k_tx_status *ts) 348 struct ath5k_desc *desc, struct ath5k_tx_status *ts)
@@ -394,7 +394,7 @@ static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah,
394} 394}
395 395
396/* 396/*
397 * Proccess a tx status descriptor on 5212 397 * Process a tx status descriptor on 5212
398 */ 398 */
399static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah, 399static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah,
400 struct ath5k_desc *desc, struct ath5k_tx_status *ts) 400 struct ath5k_desc *desc, struct ath5k_tx_status *ts)
@@ -519,7 +519,7 @@ int ath5k_hw_setup_rx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
519} 519}
520 520
521/* 521/*
522 * Proccess the rx status descriptor on 5210/5211 522 * Process the rx status descriptor on 5210/5211
523 */ 523 */
524static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, 524static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
525 struct ath5k_desc *desc, struct ath5k_rx_status *rs) 525 struct ath5k_desc *desc, struct ath5k_rx_status *rs)
@@ -602,7 +602,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
602} 602}
603 603
604/* 604/*
605 * Proccess the rx status descriptor on 5212 605 * Process the rx status descriptor on 5212
606 */ 606 */
607static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, 607static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
608 struct ath5k_desc *desc, 608 struct ath5k_desc *desc,
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
index b6561f785c6..efb672cb31e 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -1080,7 +1080,7 @@ ath5k_eeprom_read_pcal_info_5112(struct ath5k_hw *ah, int mode)
1080 * 1080 *
1081 * To recreate the curves we read here the points and interpolate 1081 * To recreate the curves we read here the points and interpolate
1082 * later. Note that in most cases only 2 (higher and lower) curves are 1082 * later. Note that in most cases only 2 (higher and lower) curves are
1083 * used (like RF5112) but vendors have the oportunity to include all 1083 * used (like RF5112) but vendors have the opportunity to include all
1084 * 4 curves on eeprom. The final curve (higher power) has an extra 1084 * 4 curves on eeprom. The final curve (higher power) has an extra
1085 * point for better accuracy like RF5112. 1085 * point for better accuracy like RF5112.
1086 */ 1086 */
@@ -1302,7 +1302,7 @@ ath5k_eeprom_read_pcal_info_2413(struct ath5k_hw *ah, int mode)
1302 /* 1302 /*
1303 * Pd gain 0 is not the last pd gain 1303 * Pd gain 0 is not the last pd gain
1304 * so it only has 2 pd points. 1304 * so it only has 2 pd points.
1305 * Continue wih pd gain 1. 1305 * Continue with pd gain 1.
1306 */ 1306 */
1307 pcinfo->pwr_i[1] = (val >> 10) & 0x1f; 1307 pcinfo->pwr_i[1] = (val >> 10) & 0x1f;
1308 1308
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
index 66598a0d1df..3c44689a700 100644
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -57,7 +57,7 @@ static void ath5k_pci_read_cachesize(struct ath_common *common, int *csz)
57 *csz = (int)u8tmp; 57 *csz = (int)u8tmp;
58 58
59 /* 59 /*
60 * This check was put in to avoid "unplesant" consequences if 60 * This check was put in to avoid "unpleasant" consequences if
61 * the bootrom has not fully initialized all PCI devices. 61 * the bootrom has not fully initialized all PCI devices.
62 * Sometimes the cache line size register is not set 62 * Sometimes the cache line size register is not set
63 */ 63 */
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index a702817daf7..d9b3f828455 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -472,7 +472,7 @@ void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter)
472 } 472 }
473 473
474 /* 474 /*
475 * The AR5210 uses promiscous mode to detect radar activity 475 * The AR5210 uses promiscuous mode to detect radar activity
476 */ 476 */
477 if (ah->ah_version == AR5K_AR5210 && 477 if (ah->ah_version == AR5K_AR5210 &&
478 (filter & AR5K_RX_FILTER_RADARERR)) { 478 (filter & AR5K_RX_FILTER_RADARERR)) {
@@ -706,8 +706,8 @@ ath5k_check_timer_win(int a, int b, int window, int intval)
706 * The need for this function arises from the fact that we have 4 separate 706 * The need for this function arises from the fact that we have 4 separate
707 * HW timer registers (TIMER0 - TIMER3), which are closely related to the 707 * HW timer registers (TIMER0 - TIMER3), which are closely related to the
708 * next beacon target time (NBTT), and that the HW updates these timers 708 * next beacon target time (NBTT), and that the HW updates these timers
709 * seperately based on the current TSF value. The hardware increments each 709 * separately based on the current TSF value. The hardware increments each
710 * timer by the beacon interval, when the local TSF coverted to TU is equal 710 * timer by the beacon interval, when the local TSF converted to TU is equal
711 * to the value stored in the timer. 711 * to the value stored in the timer.
712 * 712 *
713 * The reception of a beacon with the same BSSID can update the local HW TSF 713 * The reception of a beacon with the same BSSID can update the local HW TSF
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 62ce2f4e860..55441913344 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -335,11 +335,11 @@ static void ath5k_hw_wait_for_synth(struct ath5k_hw *ah,
335 * http://madwifi-project.org/ticket/1659 335 * http://madwifi-project.org/ticket/1659
336 * with various measurements and diagrams 336 * with various measurements and diagrams
337 * 337 *
338 * TODO: Deal with power drops due to probes by setting an apropriate 338 * TODO: Deal with power drops due to probes by setting an appropriate
339 * tx power on the probe packets ! Make this part of the calibration process. 339 * tx power on the probe packets ! Make this part of the calibration process.
340 */ 340 */
341 341
342/* Initialize ah_gain durring attach */ 342/* Initialize ah_gain during attach */
343int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah) 343int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah)
344{ 344{
345 /* Initialize the gain optimization values */ 345 /* Initialize the gain optimization values */
@@ -1049,7 +1049,7 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah,
1049\**************************/ 1049\**************************/
1050 1050
1051/* 1051/*
1052 * Convertion needed for RF5110 1052 * Conversion needed for RF5110
1053 */ 1053 */
1054static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel) 1054static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel)
1055{ 1055{
@@ -1088,7 +1088,7 @@ static int ath5k_hw_rf5110_channel(struct ath5k_hw *ah,
1088} 1088}
1089 1089
1090/* 1090/*
1091 * Convertion needed for 5111 1091 * Conversion needed for 5111
1092 */ 1092 */
1093static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee, 1093static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee,
1094 struct ath5k_athchan_2ghz *athchan) 1094 struct ath5k_athchan_2ghz *athchan)
@@ -2201,7 +2201,7 @@ ath5k_create_power_curve(s16 pmin, s16 pmax,
2201/* 2201/*
2202 * Get the surrounding per-channel power calibration piers 2202 * Get the surrounding per-channel power calibration piers
2203 * for a given frequency so that we can interpolate between 2203 * for a given frequency so that we can interpolate between
2204 * them and come up with an apropriate dataset for our current 2204 * them and come up with an appropriate dataset for our current
2205 * channel. 2205 * channel.
2206 */ 2206 */
2207static void 2207static void
@@ -2618,7 +2618,7 @@ ath5k_write_pcdac_table(struct ath5k_hw *ah)
2618/* 2618/*
2619 * Set the gain boundaries and create final Power to PDADC table 2619 * Set the gain boundaries and create final Power to PDADC table
2620 * 2620 *
2621 * We can have up to 4 pd curves, we need to do a simmilar process 2621 * We can have up to 4 pd curves, we need to do a similar process
2622 * as we do for RF5112. This time we don't have an edge_flag but we 2622 * as we do for RF5112. This time we don't have an edge_flag but we
2623 * set the gain boundaries on a separate register. 2623 * set the gain boundaries on a separate register.
2624 */ 2624 */
@@ -2826,13 +2826,13 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
2826 u32 target = channel->center_freq; 2826 u32 target = channel->center_freq;
2827 int pdg, i; 2827 int pdg, i;
2828 2828
2829 /* Get surounding freq piers for this channel */ 2829 /* Get surrounding freq piers for this channel */
2830 ath5k_get_chan_pcal_surrounding_piers(ah, channel, 2830 ath5k_get_chan_pcal_surrounding_piers(ah, channel,
2831 &pcinfo_L, 2831 &pcinfo_L,
2832 &pcinfo_R); 2832 &pcinfo_R);
2833 2833
2834 /* Loop over pd gain curves on 2834 /* Loop over pd gain curves on
2835 * surounding freq piers by index */ 2835 * surrounding freq piers by index */
2836 for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) { 2836 for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) {
2837 2837
2838 /* Fill curves in reverse order 2838 /* Fill curves in reverse order
@@ -2923,7 +2923,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
2923 } 2923 }
2924 2924
2925 /* Interpolate between curves 2925 /* Interpolate between curves
2926 * of surounding freq piers to 2926 * of surrounding freq piers to
2927 * get the final curve for this 2927 * get the final curve for this
2928 * pd gain. Re-use tmpL for interpolation 2928 * pd gain. Re-use tmpL for interpolation
2929 * output */ 2929 * output */
@@ -2947,7 +2947,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
2947 2947
2948 /* Fill min and max power levels for this 2948 /* Fill min and max power levels for this
2949 * channel by interpolating the values on 2949 * channel by interpolating the values on
2950 * surounding channels to complete the dataset */ 2950 * surrounding channels to complete the dataset */
2951 ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target, 2951 ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target,
2952 (s16) pcinfo_L->freq, 2952 (s16) pcinfo_L->freq,
2953 (s16) pcinfo_R->freq, 2953 (s16) pcinfo_R->freq,
@@ -3179,7 +3179,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3179 3179
3180 /* FIXME: TPC scale reduction */ 3180 /* FIXME: TPC scale reduction */
3181 3181
3182 /* Get surounding channels for per-rate power table 3182 /* Get surrounding channels for per-rate power table
3183 * calibration */ 3183 * calibration */
3184 ath5k_get_rate_pcal_data(ah, channel, &rate_info); 3184 ath5k_get_rate_pcal_data(ah, channel, &rate_info);
3185 3185
diff --git a/drivers/net/wireless/ath/ath5k/reg.h b/drivers/net/wireless/ath/ath5k/reg.h
index e1c9abd8c87..d12b827033c 100644
--- a/drivers/net/wireless/ath/ath5k/reg.h
+++ b/drivers/net/wireless/ath/ath5k/reg.h
@@ -132,8 +132,8 @@
132 * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR 132 * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR
133 * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning 133 * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning
134 * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR). 134 * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR).
135 * So SNAPPEDBCRVALID sould also stand for "snapped BCR -values- valid", so i 135 * So SNAPPEDBCRVALID should also stand for "snapped BCR -values- valid", so i
136 * renamed it to SNAPSHOTSVALID to make more sense. I realy have no idea what 136 * renamed it to SNAPSHOTSVALID to make more sense. I really have no idea what
137 * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR. 137 * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR.
138 */ 138 */
139#define AR5K_BSR 0x002c /* Register Address */ 139#define AR5K_BSR 0x002c /* Register Address */
@@ -283,7 +283,7 @@
283 */ 283 */
284#define AR5K_ISR 0x001c /* Register Address [5210] */ 284#define AR5K_ISR 0x001c /* Register Address [5210] */
285#define AR5K_PISR 0x0080 /* Register Address [5211+] */ 285#define AR5K_PISR 0x0080 /* Register Address [5211+] */
286#define AR5K_ISR_RXOK 0x00000001 /* Frame successfuly recieved */ 286#define AR5K_ISR_RXOK 0x00000001 /* Frame successfuly received */
287#define AR5K_ISR_RXDESC 0x00000002 /* RX descriptor request */ 287#define AR5K_ISR_RXDESC 0x00000002 /* RX descriptor request */
288#define AR5K_ISR_RXERR 0x00000004 /* Receive error */ 288#define AR5K_ISR_RXERR 0x00000004 /* Receive error */
289#define AR5K_ISR_RXNOFRM 0x00000008 /* No frame received (receive timeout) */ 289#define AR5K_ISR_RXNOFRM 0x00000008 /* No frame received (receive timeout) */
@@ -372,12 +372,12 @@
372/* 372/*
373 * Interrupt Mask Registers 373 * Interrupt Mask Registers
374 * 374 *
375 * As whith ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary 375 * As with ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary
376 * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match. 376 * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match.
377 */ 377 */
378#define AR5K_IMR 0x0020 /* Register Address [5210] */ 378#define AR5K_IMR 0x0020 /* Register Address [5210] */
379#define AR5K_PIMR 0x00a0 /* Register Address [5211+] */ 379#define AR5K_PIMR 0x00a0 /* Register Address [5211+] */
380#define AR5K_IMR_RXOK 0x00000001 /* Frame successfuly recieved*/ 380#define AR5K_IMR_RXOK 0x00000001 /* Frame successfuly received*/
381#define AR5K_IMR_RXDESC 0x00000002 /* RX descriptor request*/ 381#define AR5K_IMR_RXDESC 0x00000002 /* RX descriptor request*/
382#define AR5K_IMR_RXERR 0x00000004 /* Receive error*/ 382#define AR5K_IMR_RXERR 0x00000004 /* Receive error*/
383#define AR5K_IMR_RXNOFRM 0x00000008 /* No frame received (receive timeout)*/ 383#define AR5K_IMR_RXNOFRM 0x00000008 /* No frame received (receive timeout)*/
@@ -895,7 +895,7 @@
895#define AR5K_PCICFG_SL_INTEN 0x00000800 /* Enable interrupts when asleep */ 895#define AR5K_PCICFG_SL_INTEN 0x00000800 /* Enable interrupts when asleep */
896#define AR5K_PCICFG_LED_BCTL 0x00001000 /* Led blink (?) [5210] */ 896#define AR5K_PCICFG_LED_BCTL 0x00001000 /* Led blink (?) [5210] */
897#define AR5K_PCICFG_RETRY_FIX 0x00001000 /* Enable pci core retry fix */ 897#define AR5K_PCICFG_RETRY_FIX 0x00001000 /* Enable pci core retry fix */
898#define AR5K_PCICFG_SL_INPEN 0x00002000 /* Sleep even whith pending interrupts*/ 898#define AR5K_PCICFG_SL_INPEN 0x00002000 /* Sleep even with pending interrupts*/
899#define AR5K_PCICFG_SPWR_DN 0x00010000 /* Mask for power status */ 899#define AR5K_PCICFG_SPWR_DN 0x00010000 /* Mask for power status */
900#define AR5K_PCICFG_LEDMODE 0x000e0000 /* Ledmode [5211+] */ 900#define AR5K_PCICFG_LEDMODE 0x000e0000 /* Ledmode [5211+] */
901#define AR5K_PCICFG_LEDMODE_PROP 0x00000000 /* Blink on standard traffic [5211+] */ 901#define AR5K_PCICFG_LEDMODE_PROP 0x00000000 /* Blink on standard traffic [5211+] */
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index ffcf44a4058..106c0b06cf5 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -142,7 +142,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
142 142
143/** 143/**
144 * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios 144 * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios
145 * @ah: atheros hardware stucture 145 * @ah: atheros hardware structure
146 * @chan: 146 * @chan:
147 * 147 *
148 * For the external AR2133/AR5133 radios, takes the MHz channel value and set 148 * For the external AR2133/AR5133 radios, takes the MHz channel value and set
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 4a927180299..6eadf975ae4 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3240,7 +3240,7 @@ static int ar9300_compress_decision(struct ath_hw *ah,
3240 eep = ar9003_eeprom_struct_find_by_id(reference); 3240 eep = ar9003_eeprom_struct_find_by_id(reference);
3241 if (eep == NULL) { 3241 if (eep == NULL) {
3242 ath_dbg(common, ATH_DBG_EEPROM, 3242 ath_dbg(common, ATH_DBG_EEPROM,
3243 "cant find reference eeprom struct %d\n", 3243 "can't find reference eeprom struct %d\n",
3244 reference); 3244 reference);
3245 return -1; 3245 return -1;
3246 } 3246 }
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index c41ab8c3016..62e139a30a7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -360,7 +360,7 @@ ret:
360 * HTC Messages are handled directly here and the obtained SKB 360 * HTC Messages are handled directly here and the obtained SKB
361 * is freed. 361 * is freed.
362 * 362 *
363 * Sevice messages (Data, WMI) passed to the corresponding 363 * Service messages (Data, WMI) passed to the corresponding
364 * endpoint RX handlers, which have to free the SKB. 364 * endpoint RX handlers, which have to free the SKB.
365 */ 365 */
366void ath9k_htc_rx_msg(struct htc_target *htc_handle, 366void ath9k_htc_rx_msg(struct htc_target *htc_handle,
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index e83128c50f7..9c65459be10 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -44,7 +44,7 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
44 *csz = (int)u8tmp; 44 *csz = (int)u8tmp;
45 45
46 /* 46 /*
47 * This check was put in to avoid "unplesant" consequences if 47 * This check was put in to avoid "unpleasant" consequences if
48 * the bootrom has not fully initialized all PCI devices. 48 * the bootrom has not fully initialized all PCI devices.
49 * Sometimes the cache line size register is not set 49 * Sometimes the cache line size register is not set
50 */ 50 */
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index a3241cd089b..4c0d36a6980 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -792,7 +792,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
792 792
793 tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; 793 tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
794 } else { 794 } else {
795 /* Set the choosen rate. No RTS for first series entry. */ 795 /* Set the chosen rate. No RTS for first series entry. */
796 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 796 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
797 try_per_rate, rix, 0); 797 try_per_rate, rix, 0);
798 } 798 }
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 26734e53b37..88fa7fdffd0 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -628,8 +628,8 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
628 (u32)ATH_AMPDU_LIMIT_MAX); 628 (u32)ATH_AMPDU_LIMIT_MAX);
629 629
630 /* 630 /*
631 * h/w can accept aggregates upto 16 bit lengths (65535). 631 * h/w can accept aggregates up to 16 bit lengths (65535).
632 * The IE, however can hold upto 65536, which shows up here 632 * The IE, however can hold up to 65536, which shows up here
633 * as zero. Ignore 65536 since we are constrained by hw. 633 * as zero. Ignore 65536 since we are constrained by hw.
634 */ 634 */
635 if (tid->an->maxampdu) 635 if (tid->an->maxampdu)
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 9cad061cc1d..3d4ed586373 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -161,7 +161,7 @@ struct carl9170_sta_tid {
161 * Naturally: The higher the limit, the faster the device CAN send. 161 * Naturally: The higher the limit, the faster the device CAN send.
162 * However, even a slight over-commitment at the wrong time and the 162 * However, even a slight over-commitment at the wrong time and the
163 * hardware is doomed to send all already-queued frames at suboptimal 163 * hardware is doomed to send all already-queued frames at suboptimal
164 * rates. This in turn leads to an enourmous amount of unsuccessful 164 * rates. This in turn leads to an enormous amount of unsuccessful
165 * retries => Latency goes up, whereas the throughput goes down. CRASH! 165 * retries => Latency goes up, whereas the throughput goes down. CRASH!
166 */ 166 */
167#define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2) 167#define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2)
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index b6b0de60050..b6ae0e179c8 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -427,7 +427,7 @@ static u32 carl9170_def_val(u32 reg, bool is_2ghz, bool is_40mhz)
427 427
428/* 428/*
429 * initialize some phy regs from eeprom values in modal_header[] 429 * initialize some phy regs from eeprom values in modal_header[]
430 * acc. to band and bandwith 430 * acc. to band and bandwidth
431 */ 431 */
432static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, 432static int carl9170_init_phy_from_eeprom(struct ar9170 *ar,
433 bool is_2ghz, bool is_40mhz) 433 bool is_2ghz, bool is_40mhz)
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c
index 84866a4b835..ec21ea9fd8d 100644
--- a/drivers/net/wireless/ath/carl9170/rx.c
+++ b/drivers/net/wireless/ath/carl9170/rx.c
@@ -849,7 +849,7 @@ static void carl9170_rx_stream(struct ar9170 *ar, void *buf, unsigned int len)
849 /* 849 /*
850 * nested carl9170_rx_stream call! 850 * nested carl9170_rx_stream call!
851 * 851 *
852 * termination is guranteed, even when the 852 * termination is guaranteed, even when the
853 * combined frame also have an element with 853 * combined frame also have an element with
854 * a bad tag. 854 * a bad tag.
855 */ 855 */
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c
index f82c400be28..2fb53d06751 100644
--- a/drivers/net/wireless/ath/carl9170/usb.c
+++ b/drivers/net/wireless/ath/carl9170/usb.c
@@ -430,7 +430,7 @@ static void carl9170_usb_rx_complete(struct urb *urb)
430 * The system is too slow to cope with 430 * The system is too slow to cope with
431 * the enormous workload. We have simply 431 * the enormous workload. We have simply
432 * run out of active rx urbs and this 432 * run out of active rx urbs and this
433 * unfortunatly leads to an unpredictable 433 * unfortunately leads to an unpredictable
434 * device. 434 * device.
435 */ 435 */
436 436
diff --git a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c
index 183c2828138..cc11d66f15b 100644
--- a/drivers/net/wireless/ath/hw.c
+++ b/drivers/net/wireless/ath/hw.c
@@ -86,7 +86,7 @@
86 * IFRAME-01: 0110 86 * IFRAME-01: 0110
87 * 87 *
88 * An easy eye-inspeciton of this already should tell you that this frame 88 * An easy eye-inspeciton of this already should tell you that this frame
89 * will not pass our check. This is beacuse the bssid_mask tells the 89 * will not pass our check. This is because the bssid_mask tells the
90 * hardware to only look at the second least significant bit and the 90 * hardware to only look at the second least significant bit and the
91 * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB 91 * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB
92 * as 1, which does not match 0. 92 * as 1, which does not match 0.
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index f828f294ba8..0e1b8793c86 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -268,7 +268,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
268 } 268 }
269 269
270 /* 270 /*
271 * If a country IE has been recieved check its rule for this 271 * If a country IE has been received check its rule for this
272 * channel first before enabling active scan. The passive scan 272 * channel first before enabling active scan. The passive scan
273 * would have been enforced by the initial processing of our 273 * would have been enforced by the initial processing of our
274 * custom regulatory domain. 274 * custom regulatory domain.
@@ -476,7 +476,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
476 wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; 476 wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
477 } else { 477 } else {
478 /* 478 /*
479 * This gets applied in the case of the absense of CRDA, 479 * This gets applied in the case of the absence of CRDA,
480 * it's our own custom world regulatory domain, similar to 480 * it's our own custom world regulatory domain, similar to
481 * cfg80211's but we enable passive scanning. 481 * cfg80211's but we enable passive scanning.
482 */ 482 */
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 46e382ed46a..39a11e8af4f 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -439,7 +439,7 @@ static u8 mac_reader[] = {
439}; 439};
440 440
441struct atmel_private { 441struct atmel_private {
442 void *card; /* Bus dependent stucture varies for PCcard */ 442 void *card; /* Bus dependent structure varies for PCcard */
443 int (*present_callback)(void *); /* And callback which uses it */ 443 int (*present_callback)(void *); /* And callback which uses it */
444 char firmware_id[32]; 444 char firmware_id[32];
445 AtmelFWType firmware_type; 445 AtmelFWType firmware_type;
@@ -3895,7 +3895,7 @@ static int reset_atmel_card(struct net_device *dev)
3895 3895
3896 This routine is also responsible for initialising some 3896 This routine is also responsible for initialising some
3897 hardware-specific fields in the atmel_private structure, 3897 hardware-specific fields in the atmel_private structure,
3898 including a copy of the firmware's hostinfo stucture 3898 including a copy of the firmware's hostinfo structure
3899 which is the route into the rest of the firmware datastructures. */ 3899 which is the route into the rest of the firmware datastructures. */
3900 3900
3901 struct atmel_private *priv = netdev_priv(dev); 3901 struct atmel_private *priv = netdev_priv(dev);
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index c96e19da294..05263516c11 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -99,7 +99,7 @@ static void atmel_detach(struct pcmcia_device *link)
99} 99}
100 100
101/* Call-back function to interrogate PCMCIA-specific information 101/* Call-back function to interrogate PCMCIA-specific information
102 about the current existance of the card */ 102 about the current existence of the card */
103static int card_present(void *arg) 103static int card_present(void *arg)
104{ 104{
105 struct pcmcia_device *link = (struct pcmcia_device *)arg; 105 struct pcmcia_device *link = (struct pcmcia_device *)arg;
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index bd4cb75b6ca..229f4388f79 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -648,7 +648,7 @@ struct b43_request_fw_context {
648 char errors[B43_NR_FWTYPES][128]; 648 char errors[B43_NR_FWTYPES][128];
649 /* Temporary buffer for storing the firmware name. */ 649 /* Temporary buffer for storing the firmware name. */
650 char fwname[64]; 650 char fwname[64];
651 /* A fatal error occured while requesting. Firmware reqest 651 /* A fatal error occurred while requesting. Firmware reqest
652 * can not continue, as any other reqest will also fail. */ 652 * can not continue, as any other reqest will also fail. */
653 int fatal_failure; 653 int fatal_failure;
654}; 654};
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 7841b95f393..5af40d9170a 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4011,7 +4011,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
4011 b43_mac_enable(dev); 4011 b43_mac_enable(dev);
4012 b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask); 4012 b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask);
4013 4013
4014 /* Start maintainance work */ 4014 /* Start maintenance work */
4015 b43_periodic_tasks_setup(dev); 4015 b43_periodic_tasks_setup(dev);
4016 4016
4017 b43_leds_init(dev); 4017 b43_leds_init(dev);
diff --git a/drivers/net/wireless/b43/phy_g.h b/drivers/net/wireless/b43/phy_g.h
index 8569fdd4c6b..5413c906a3e 100644
--- a/drivers/net/wireless/b43/phy_g.h
+++ b/drivers/net/wireless/b43/phy_g.h
@@ -164,7 +164,7 @@ struct b43_phy_g {
164 /* Current Interference Mitigation mode */ 164 /* Current Interference Mitigation mode */
165 int interfmode; 165 int interfmode;
166 /* Stack of saved values from the Interference Mitigation code. 166 /* Stack of saved values from the Interference Mitigation code.
167 * Each value in the stack is layed out as follows: 167 * Each value in the stack is laid out as follows:
168 * bit 0-11: offset 168 * bit 0-11: offset
169 * bit 12-15: register ID 169 * bit 12-15: register ID
170 * bit 16-32: value 170 * bit 16-32: value
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index 001e841f118..e789a89f104 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -703,7 +703,7 @@
703#define B43_NPHY_CHAN_ESTHANG B43_PHY_N(0x21D) /* Channel estimate hang */ 703#define B43_NPHY_CHAN_ESTHANG B43_PHY_N(0x21D) /* Channel estimate hang */
704#define B43_NPHY_FINERX2_CGC B43_PHY_N(0x221) /* Fine RX 2 clock gate control */ 704#define B43_NPHY_FINERX2_CGC B43_PHY_N(0x221) /* Fine RX 2 clock gate control */
705#define B43_NPHY_FINERX2_CGC_DECGC 0x0008 /* Decode gated clocks */ 705#define B43_NPHY_FINERX2_CGC_DECGC 0x0008 /* Decode gated clocks */
706#define B43_NPHY_TXPCTL_INIT B43_PHY_N(0x222) /* TX power controll init */ 706#define B43_NPHY_TXPCTL_INIT B43_PHY_N(0x222) /* TX power control init */
707#define B43_NPHY_TXPCTL_INIT_PIDXI1 0x00FF /* Power index init 1 */ 707#define B43_NPHY_TXPCTL_INIT_PIDXI1 0x00FF /* Power index init 1 */
708#define B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT 0 708#define B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT 0
709#define B43_NPHY_PAPD_EN0 B43_PHY_N(0x297) /* PAPD Enable0 TBD */ 709#define B43_NPHY_PAPD_EN0 B43_PHY_N(0x297) /* PAPD Enable0 TBD */
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index c81b2f53b0c..23583be1ee0 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -488,7 +488,7 @@ struct b43legacy_phy {
488 /* Current Interference Mitigation mode */ 488 /* Current Interference Mitigation mode */
489 int interfmode; 489 int interfmode;
490 /* Stack of saved values from the Interference Mitigation code. 490 /* Stack of saved values from the Interference Mitigation code.
491 * Each value in the stack is layed out as follows: 491 * Each value in the stack is laid out as follows:
492 * bit 0-11: offset 492 * bit 0-11: offset
493 * bit 12-15: register ID 493 * bit 12-15: register ID
494 * bit 16-32: value 494 * bit 16-32: value
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 18d63f57777..3d05dc15c6b 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -2359,7 +2359,7 @@ int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
2359} 2359}
2360 2360
2361 2361
2362/* Translate our list of Access Points & Stations to a card independant 2362/* Translate our list of Access Points & Stations to a card independent
2363 * format that the Wireless Tools will understand - Jean II */ 2363 * format that the Wireless Tools will understand - Jean II */
2364int prism2_ap_translate_scan(struct net_device *dev, 2364int prism2_ap_translate_scan(struct net_device *dev,
2365 struct iw_request_info *info, char *buffer) 2365 struct iw_request_info *info, char *buffer)
diff --git a/drivers/net/wireless/hostap/hostap_ap.h b/drivers/net/wireless/hostap/hostap_ap.h
index 655ceeba961..334e2d0b8e1 100644
--- a/drivers/net/wireless/hostap/hostap_ap.h
+++ b/drivers/net/wireless/hostap/hostap_ap.h
@@ -114,7 +114,7 @@ struct sta_info {
114 * has passed since last received frame from the station, a nullfunc data 114 * has passed since last received frame from the station, a nullfunc data
115 * frame is sent to the station. If this frame is not acknowledged and no other 115 * frame is sent to the station. If this frame is not acknowledged and no other
116 * frames have been received, the station will be disassociated after 116 * frames have been received, the station will be disassociated after
117 * AP_DISASSOC_DELAY. Similarily, a the station will be deauthenticated after 117 * AP_DISASSOC_DELAY. Similarly, a the station will be deauthenticated after
118 * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with 118 * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with
119 * max inactivity timer. */ 119 * max inactivity timer. */
120#define AP_MAX_INACTIVITY_SEC (5 * 60) 120#define AP_MAX_INACTIVITY_SEC (5 * 60)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 6038633ef36..12de46407c7 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1945,7 +1945,7 @@ static char * __prism2_translate_scan(local_info_t *local,
1945} 1945}
1946 1946
1947 1947
1948/* Translate scan data returned from the card to a card independant 1948/* Translate scan data returned from the card to a card independent
1949 * format that the Wireless Tools will understand - Jean II */ 1949 * format that the Wireless Tools will understand - Jean II */
1950static inline int prism2_translate_scan(local_info_t *local, 1950static inline int prism2_translate_scan(local_info_t *local,
1951 struct iw_request_info *info, 1951 struct iw_request_info *info,
@@ -2043,7 +2043,7 @@ static inline int prism2_ioctl_giwscan_sta(struct net_device *dev,
2043 * until results are ready for various reasons. 2043 * until results are ready for various reasons.
2044 * First, managing wait queues is complex and racy 2044 * First, managing wait queues is complex and racy
2045 * (there may be multiple simultaneous callers). 2045 * (there may be multiple simultaneous callers).
2046 * Second, we grab some rtnetlink lock before comming 2046 * Second, we grab some rtnetlink lock before coming
2047 * here (in dev_ioctl()). 2047 * here (in dev_ioctl()).
2048 * Third, the caller can wait on the Wireless Event 2048 * Third, the caller can wait on the Wireless Event
2049 * - Jean II */ 2049 * - Jean II */
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index 1c66b3c1030..88dc6a52bdf 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -853,7 +853,7 @@ struct local_info {
853 struct work_struct comms_qual_update; 853 struct work_struct comms_qual_update;
854 854
855 /* RSSI to dBm adjustment (for RX descriptor fields) */ 855 /* RSSI to dBm adjustment (for RX descriptor fields) */
856 int rssi_to_dBm; /* substract from RSSI to get approximate dBm value */ 856 int rssi_to_dBm; /* subtract from RSSI to get approximate dBm value */
857 857
858 /* BSS list / protected by local->lock */ 858 /* BSS list / protected by local->lock */
859 struct list_head bss_list; 859 struct list_head bss_list;
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 4b97f918daf..44307753587 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -63,7 +63,7 @@ When data is sent to the firmware, the first TBD is used to indicate to the
63firmware if a Command or Data is being sent. If it is Command, all of the 63firmware if a Command or Data is being sent. If it is Command, all of the
64command information is contained within the physical address referred to by the 64command information is contained within the physical address referred to by the
65TBD. If it is Data, the first TBD indicates the type of data packet, number 65TBD. If it is Data, the first TBD indicates the type of data packet, number
66of fragments, etc. The next TBD then referrs to the actual packet location. 66of fragments, etc. The next TBD then refers to the actual packet location.
67 67
68The Tx flow cycle is as follows: 68The Tx flow cycle is as follows:
69 69
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 160881f234c..42c3fe37af6 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -1181,7 +1181,7 @@ static void ipw_led_shutdown(struct ipw_priv *priv)
1181/* 1181/*
1182 * The following adds a new attribute to the sysfs representation 1182 * The following adds a new attribute to the sysfs representation
1183 * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) 1183 * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/)
1184 * used for controling the debug level. 1184 * used for controlling the debug level.
1185 * 1185 *
1186 * See the level definitions in ipw for details. 1186 * See the level definitions in ipw for details.
1187 */ 1187 */
@@ -3763,7 +3763,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv,
3763 3763
3764 q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL); 3764 q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL);
3765 if (!q->txb) { 3765 if (!q->txb) {
3766 IPW_ERROR("vmalloc for auxilary BD structures failed\n"); 3766 IPW_ERROR("vmalloc for auxiliary BD structures failed\n");
3767 return -ENOMEM; 3767 return -ENOMEM;
3768 } 3768 }
3769 3769
@@ -5581,7 +5581,7 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5581 return 0; 5581 return 0;
5582 } 5582 }
5583 5583
5584 /* Verify privacy compatability */ 5584 /* Verify privacy compatibility */
5585 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5585 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5586 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5586 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5587 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " 5587 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
@@ -5808,7 +5808,7 @@ static int ipw_best_network(struct ipw_priv *priv,
5808 return 0; 5808 return 0;
5809 } 5809 }
5810 5810
5811 /* Verify privacy compatability */ 5811 /* Verify privacy compatibility */
5812 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5812 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5813 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5813 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5814 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " 5814 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
@@ -8184,7 +8184,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
8184static int is_network_packet(struct ipw_priv *priv, 8184static int is_network_packet(struct ipw_priv *priv,
8185 struct libipw_hdr_4addr *header) 8185 struct libipw_hdr_4addr *header)
8186{ 8186{
8187 /* Filter incoming packets to determine if they are targetted toward 8187 /* Filter incoming packets to determine if they are targeted toward
8188 * this network, discarding packets coming from ourselves */ 8188 * this network, discarding packets coming from ourselves */
8189 switch (priv->ieee->iw_mode) { 8189 switch (priv->ieee->iw_mode) {
8190 case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ 8190 case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */
@@ -8340,9 +8340,9 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv,
8340} 8340}
8341 8341
8342/* 8342/*
8343 * Main entry function for recieving a packet with 80211 headers. This 8343 * Main entry function for receiving a packet with 80211 headers. This
8344 * should be called when ever the FW has notified us that there is a new 8344 * should be called when ever the FW has notified us that there is a new
8345 * skb in the recieve queue. 8345 * skb in the receive queue.
8346 */ 8346 */
8347static void ipw_rx(struct ipw_priv *priv) 8347static void ipw_rx(struct ipw_priv *priv)
8348{ 8348{
@@ -8683,7 +8683,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
8683 * functions defined in ipw_main to provide the HW interaction. 8683 * functions defined in ipw_main to provide the HW interaction.
8684 * 8684 *
8685 * The exception to this is the use of the ipw_get_ordinal() 8685 * The exception to this is the use of the ipw_get_ordinal()
8686 * function used to poll the hardware vs. making unecessary calls. 8686 * function used to poll the hardware vs. making unnecessary calls.
8687 * 8687 *
8688 */ 8688 */
8689 8689
@@ -10419,7 +10419,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
10419 10419
10420 memset(&dummystats, 0, sizeof(dummystats)); 10420 memset(&dummystats, 0, sizeof(dummystats));
10421 10421
10422 /* Filtering of fragment chains is done agains the first fragment */ 10422 /* Filtering of fragment chains is done against the first fragment */
10423 hdr = (void *)txb->fragments[0]->data; 10423 hdr = (void *)txb->fragments[0]->data;
10424 if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { 10424 if (libipw_is_management(le16_to_cpu(hdr->frame_control))) {
10425 if (filter & IPW_PROM_NO_MGMT) 10425 if (filter & IPW_PROM_NO_MGMT)
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
index 0de1b189322..e5ad76cd77d 100644
--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
@@ -925,7 +925,7 @@ drop_free:
925static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; 925static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
926 926
927/* 927/*
928* Make ther structure we read from the beacon packet has 928* Make the structure we read from the beacon packet to have
929* the right values 929* the right values
930*/ 930*/
931static int libipw_verify_qos_info(struct libipw_qos_information_element 931static int libipw_verify_qos_info(struct libipw_qos_information_element
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index 2b08efb3b65..c1511b14b23 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -1035,7 +1035,7 @@ int iwl_legacy_apm_init(struct iwl_priv *priv)
1035 /* 1035 /*
1036 * Enable HAP INTA (interrupt from management bus) to 1036 * Enable HAP INTA (interrupt from management bus) to
1037 * wake device's PCI Express link L1a -> L0s 1037 * wake device's PCI Express link L1a -> L0s
1038 * NOTE: This is no-op for 3945 (non-existant bit) 1038 * NOTE: This is no-op for 3945 (non-existent bit)
1039 */ 1039 */
1040 iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1040 iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1041 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); 1041 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
diff --git a/drivers/net/wireless/iwlegacy/iwl-fh.h b/drivers/net/wireless/iwlegacy/iwl-fh.h
index 4e20c7e5c88..6e6091816e3 100644
--- a/drivers/net/wireless/iwlegacy/iwl-fh.h
+++ b/drivers/net/wireless/iwlegacy/iwl-fh.h
@@ -436,7 +436,7 @@
436 * @finished_rb_num [0:11] - Indicates the index of the current RB 436 * @finished_rb_num [0:11] - Indicates the index of the current RB
437 * in which the last frame was written to 437 * in which the last frame was written to
438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame 438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame
439 * which was transfered 439 * which was transferred
440 */ 440 */
441struct iwl_rb_status { 441struct iwl_rb_status {
442 __le16 closed_rb_num; 442 __le16 closed_rb_num;
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c
index 60f597f796c..353234a02c6 100644
--- a/drivers/net/wireless/iwlegacy/iwl-scan.c
+++ b/drivers/net/wireless/iwlegacy/iwl-scan.c
@@ -143,7 +143,7 @@ static void iwl_legacy_do_scan_abort(struct iwl_priv *priv)
143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); 143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret);
144 iwl_legacy_force_scan_end(priv); 144 iwl_legacy_force_scan_end(priv);
145 } else 145 } else
146 IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n"); 146 IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n");
147} 147}
148 148
149/** 149/**
diff --git a/drivers/net/wireless/iwlegacy/iwl-sta.c b/drivers/net/wireless/iwlegacy/iwl-sta.c
index 47c9da3834e..66f0fb2bbe0 100644
--- a/drivers/net/wireless/iwlegacy/iwl-sta.c
+++ b/drivers/net/wireless/iwlegacy/iwl-sta.c
@@ -110,7 +110,7 @@ static int iwl_legacy_process_add_sta_resp(struct iwl_priv *priv,
110 /* 110 /*
111 * XXX: The MAC address in the command buffer is often changed from 111 * XXX: The MAC address in the command buffer is often changed from
112 * the original sent to the device. That is, the MAC address 112 * the original sent to the device. That is, the MAC address
113 * written to the command buffer often is not the same MAC adress 113 * written to the command buffer often is not the same MAC address
114 * read from the command buffer when the command returns. This 114 * read from the command buffer when the command returns. This
115 * issue has not yet been resolved and this debugging is left to 115 * issue has not yet been resolved and this debugging is left to
116 * observe the problem. 116 * observe the problem.
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
index b5cb3be0eb4..ed0148d714d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
@@ -69,7 +69,7 @@ int iwl_alloc_isr_ict(struct iwl_priv *priv)
69 if (!priv->_agn.ict_tbl_vir) 69 if (!priv->_agn.ict_tbl_vir)
70 return -ENOMEM; 70 return -ENOMEM;
71 71
72 /* align table to PAGE_SIZE boundry */ 72 /* align table to PAGE_SIZE boundary */
73 priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE); 73 priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE);
74 74
75 IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n", 75 IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 6c30fa652e2..bafbe57c960 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1040,7 +1040,7 @@ int iwl_apm_init(struct iwl_priv *priv)
1040 /* 1040 /*
1041 * Enable HAP INTA (interrupt from management bus) to 1041 * Enable HAP INTA (interrupt from management bus) to
1042 * wake device's PCI Express link L1a -> L0s 1042 * wake device's PCI Express link L1a -> L0s
1043 * NOTE: This is no-op for 3945 (non-existant bit) 1043 * NOTE: This is no-op for 3945 (non-existent bit)
1044 */ 1044 */
1045 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1045 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1046 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); 1046 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h
index 55b8370bc6d..474009a244d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fh.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fh.h
@@ -436,7 +436,7 @@
436 * @finished_rb_num [0:11] - Indicates the index of the current RB 436 * @finished_rb_num [0:11] - Indicates the index of the current RB
437 * in which the last frame was written to 437 * in which the last frame was written to
438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame 438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame
439 * which was transfered 439 * which was transferred
440 */ 440 */
441struct iwl_rb_status { 441struct iwl_rb_status {
442 __le16 closed_rb_num; 442 __le16 closed_rb_num;
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 3a4d9e6b042..914c77e4458 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -143,7 +143,7 @@ static void iwl_do_scan_abort(struct iwl_priv *priv)
143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); 143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret);
144 iwl_force_scan_end(priv); 144 iwl_force_scan_end(priv);
145 } else 145 } else
146 IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n"); 146 IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n");
147} 147}
148 148
149/** 149/**
diff --git a/drivers/net/wireless/iwmc3200wifi/hal.c b/drivers/net/wireless/iwmc3200wifi/hal.c
index 907ac890997..1cabcb39643 100644
--- a/drivers/net/wireless/iwmc3200wifi/hal.c
+++ b/drivers/net/wireless/iwmc3200wifi/hal.c
@@ -57,7 +57,7 @@
57 * This is due to the fact the host talks exclusively 57 * This is due to the fact the host talks exclusively
58 * to the UMAC and so there needs to be a special UMAC 58 * to the UMAC and so there needs to be a special UMAC
59 * command for talking to the LMAC. 59 * command for talking to the LMAC.
60 * This is how a wifi command is layed out: 60 * This is how a wifi command is laid out:
61 * ------------------------ 61 * ------------------------
62 * | iwm_udma_out_wifi_hdr | 62 * | iwm_udma_out_wifi_hdr |
63 * ------------------------ 63 * ------------------------
@@ -72,7 +72,7 @@
72 * Those commands are handled by the device's bootrom, 72 * Those commands are handled by the device's bootrom,
73 * and are typically sent when the UMAC and the LMAC 73 * and are typically sent when the UMAC and the LMAC
74 * are not yet available. 74 * are not yet available.
75 * * This is how a non-wifi command is layed out: 75 * * This is how a non-wifi command is laid out:
76 * --------------------------- 76 * ---------------------------
77 * | iwm_udma_out_nonwifi_hdr | 77 * | iwm_udma_out_nonwifi_hdr |
78 * --------------------------- 78 * ---------------------------
diff --git a/drivers/net/wireless/iwmc3200wifi/tx.c b/drivers/net/wireless/iwmc3200wifi/tx.c
index 3216621fc55..be98074c060 100644
--- a/drivers/net/wireless/iwmc3200wifi/tx.c
+++ b/drivers/net/wireless/iwmc3200wifi/tx.c
@@ -197,7 +197,7 @@ int iwm_tx_credit_alloc(struct iwm_priv *iwm, int id, int nb)
197 spin_lock(&iwm->tx_credit.lock); 197 spin_lock(&iwm->tx_credit.lock);
198 198
199 if (!iwm_tx_credit_ok(iwm, id, nb)) { 199 if (!iwm_tx_credit_ok(iwm, id, nb)) {
200 IWM_DBG_TX(iwm, DBG, "No credit avaliable for pool[%d]\n", id); 200 IWM_DBG_TX(iwm, DBG, "No credit available for pool[%d]\n", id);
201 ret = -ENOSPC; 201 ret = -ENOSPC;
202 goto out; 202 goto out;
203 } 203 }
diff --git a/drivers/net/wireless/libertas/README b/drivers/net/wireless/libertas/README
index 60fd1afe89a..1453eec82a9 100644
--- a/drivers/net/wireless/libertas/README
+++ b/drivers/net/wireless/libertas/README
@@ -70,7 +70,7 @@ rdrf
70 These commands are used to read the MAC, BBP and RF registers from the 70 These commands are used to read the MAC, BBP and RF registers from the
71 card. These commands take one parameter that specifies the offset 71 card. These commands take one parameter that specifies the offset
72 location that is to be read. This parameter must be specified in 72 location that is to be read. This parameter must be specified in
73 hexadecimal (its possible to preceed preceding the number with a "0x"). 73 hexadecimal (its possible to precede preceding the number with a "0x").
74 74
75 Path: /sys/kernel/debug/libertas_wireless/ethX/registers/ 75 Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
76 76
@@ -84,7 +84,7 @@ wrrf
84 These commands are used to write the MAC, BBP and RF registers in the 84 These commands are used to write the MAC, BBP and RF registers in the
85 card. These commands take two parameters that specify the offset 85 card. These commands take two parameters that specify the offset
86 location and the value that is to be written. This parameters must 86 location and the value that is to be written. This parameters must
87 be specified in hexadecimal (its possible to preceed the number 87 be specified in hexadecimal (its possible to precede the number
88 with a "0x"). 88 with a "0x").
89 89
90 Usage: 90 Usage:
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 30ef0351bfc..5caa2ac14d6 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -1350,7 +1350,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
1350 * we remove all keys like in the WPA/WPA2 setup, 1350 * we remove all keys like in the WPA/WPA2 setup,
1351 * we just don't set RSN. 1351 * we just don't set RSN.
1352 * 1352 *
1353 * Therefore: fall-throught 1353 * Therefore: fall-through
1354 */ 1354 */
1355 case WLAN_CIPHER_SUITE_TKIP: 1355 case WLAN_CIPHER_SUITE_TKIP:
1356 case WLAN_CIPHER_SUITE_CCMP: 1356 case WLAN_CIPHER_SUITE_CCMP:
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index fc8121190d3..8712cb213f2 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -913,7 +913,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
913 goto out3; 913 goto out3;
914 } 914 }
915 915
916 /* Clear any interrupt cause that happend while sending 916 /* Clear any interrupt cause that happened while sending
917 * firmware/initializing card */ 917 * firmware/initializing card */
918 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK); 918 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK);
919 if_cs_enable_ints(card); 919 if_cs_enable_ints(card);
diff --git a/drivers/net/wireless/libertas/if_spi.h b/drivers/net/wireless/libertas/if_spi.h
index 8b1417d3b71..d2ac1dcd7e2 100644
--- a/drivers/net/wireless/libertas/if_spi.h
+++ b/drivers/net/wireless/libertas/if_spi.h
@@ -66,7 +66,7 @@
66#define IF_SPI_HOST_INT_CTRL_REG 0x40 /* Host interrupt controller reg */ 66#define IF_SPI_HOST_INT_CTRL_REG 0x40 /* Host interrupt controller reg */
67 67
68#define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */ 68#define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */
69#define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interupt status reg */ 69#define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interrupt status reg */
70#define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */ 70#define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */
71#define IF_SPI_CARD_INT_STATUS_MASK_REG 0x50 /* Card interrupt status mask */ 71#define IF_SPI_CARD_INT_STATUS_MASK_REG 0x50 /* Card interrupt status mask */
72 72
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 56f439d5801..f4f4257a9d6 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(fake_hw_scan, "Install fake (no-op) hw-scan handler");
62 * an intersection to occur but each device will still use their 62 * an intersection to occur but each device will still use their
63 * respective regulatory requested domains. Subsequent radios will 63 * respective regulatory requested domains. Subsequent radios will
64 * use the resulting intersection. 64 * use the resulting intersection.
65 * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We acomplish 65 * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We accomplish
66 * this by using a custom beacon-capable regulatory domain for the first 66 * this by using a custom beacon-capable regulatory domain for the first
67 * radio. All other device world roam. 67 * radio. All other device world roam.
68 * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory 68 * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c
index b4772c1c613..3c7877a7c31 100644
--- a/drivers/net/wireless/orinoco/hw.c
+++ b/drivers/net/wireless/orinoco/hw.c
@@ -1031,7 +1031,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
1031 else 1031 else
1032 buf.tsc[4] = 0x10; 1032 buf.tsc[4] = 0x10;
1033 1033
1034 /* Wait upto 100ms for tx queue to empty */ 1034 /* Wait up to 100ms for tx queue to empty */
1035 for (k = 100; k > 0; k--) { 1035 for (k = 100; k > 0; k--) {
1036 udelay(1000); 1036 udelay(1000);
1037 ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, 1037 ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY,
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 356e6bb443a..a946991989c 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -465,7 +465,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
465 465
466 if (slot < 0) { 466 if (slot < 0) {
467 /* 467 /*
468 * The device supports the choosen algorithm, but the 468 * The device supports the chosen algorithm, but the
469 * firmware does not provide enough key slots to store 469 * firmware does not provide enough key slots to store
470 * all of them. 470 * all of them.
471 * But encryption offload for outgoing frames is always 471 * But encryption offload for outgoing frames is always
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 7ecc0bda57b..6d9204fef90 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -287,7 +287,7 @@ static void p54spi_power_on(struct p54s_priv *priv)
287 enable_irq(gpio_to_irq(p54spi_gpio_irq)); 287 enable_irq(gpio_to_irq(p54spi_gpio_irq));
288 288
289 /* 289 /*
290 * need to wait a while before device can be accessed, the lenght 290 * need to wait a while before device can be accessed, the length
291 * is just a guess 291 * is just a guess
292 */ 292 */
293 msleep(10); 293 msleep(10);
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index d44f8e20cce..266d45bf86f 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -113,7 +113,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
113 * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes 113 * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes
114 * and add WDS address information */ 114 * and add WDS address information */
115 if (likely(((long) skb->data & 0x03) | init_wds)) { 115 if (likely(((long) skb->data & 0x03) | init_wds)) {
116 /* get the number of bytes to add and re-allign */ 116 /* get the number of bytes to add and re-align */
117 offset = (4 - (long) skb->data) & 0x03; 117 offset = (4 - (long) skb->data) & 0x03;
118 offset += init_wds ? 6 : 0; 118 offset += init_wds ? 6 : 0;
119 119
@@ -342,7 +342,7 @@ islpci_eth_receive(islpci_private *priv)
342 priv->pci_map_rx_address[index], 342 priv->pci_map_rx_address[index],
343 MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE); 343 MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE);
344 344
345 /* update the skb structure and allign the buffer */ 345 /* update the skb structure and align the buffer */
346 skb_put(skb, size); 346 skb_put(skb, size);
347 if (offset) { 347 if (offset) {
348 /* shift the buffer allocation offset bytes to get the right frame */ 348 /* shift the buffer allocation offset bytes to get the right frame */
diff --git a/drivers/net/wireless/rayctl.h b/drivers/net/wireless/rayctl.h
index 49d9b267bc0..d7646f299bd 100644
--- a/drivers/net/wireless/rayctl.h
+++ b/drivers/net/wireless/rayctl.h
@@ -578,7 +578,7 @@ struct tx_msg {
578 UCHAR var[1]; 578 UCHAR var[1];
579}; 579};
580 580
581/****** ECF Receive Control Stucture (RCS) Area at Shared RAM offset 0x0800 */ 581/****** ECF Receive Control Structure (RCS) Area at Shared RAM offset 0x0800 */
582/* Structures for command specific parameters (rcs.var) */ 582/* Structures for command specific parameters (rcs.var) */
583struct rx_packet_cmd { 583struct rx_packet_cmd {
584 UCHAR rx_data_ptr[2]; 584 UCHAR rx_data_ptr[2];
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 70b9abbdeb9..8fbc5fa965e 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -616,7 +616,7 @@
616 * READ_CONTROL: 0 write BBP, 1 read BBP 616 * READ_CONTROL: 0 write BBP, 1 read BBP
617 * BUSY: ASIC is busy executing BBP commands 617 * BUSY: ASIC is busy executing BBP commands
618 * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks 618 * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks
619 * BBP_RW_MODE: 0 serial, 1 paralell 619 * BBP_RW_MODE: 0 serial, 1 parallel
620 */ 620 */
621#define BBP_CSR_CFG 0x101c 621#define BBP_CSR_CFG 0x101c
622#define BBP_CSR_CFG_VALUE FIELD32(0x000000ff) 622#define BBP_CSR_CFG_VALUE FIELD32(0x000000ff)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2ee6cebb9b2..dbf74d07d94 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1518,7 +1518,7 @@ static void rt2800_config_channel_rf2xxx(struct rt2x00_dev *rt2x00dev,
1518 if (rf->channel > 14) { 1518 if (rf->channel > 14) {
1519 /* 1519 /*
1520 * When TX power is below 0, we should increase it by 7 to 1520 * When TX power is below 0, we should increase it by 7 to
1521 * make it a positive value (Minumum value is -7). 1521 * make it a positive value (Minimum value is -7).
1522 * However this means that values between 0 and 7 have 1522 * However this means that values between 0 and 7 have
1523 * double meaning, and we should set a 7DBm boost flag. 1523 * double meaning, and we should set a 7DBm boost flag.
1524 */ 1524 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index a3940d7300a..7f10239f56a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -484,13 +484,13 @@ struct rt2x00intf_conf {
484 enum nl80211_iftype type; 484 enum nl80211_iftype type;
485 485
486 /* 486 /*
487 * TSF sync value, this is dependant on the operation type. 487 * TSF sync value, this is dependent on the operation type.
488 */ 488 */
489 enum tsf_sync sync; 489 enum tsf_sync sync;
490 490
491 /* 491 /*
492 * The MAC and BSSID addressess are simple array of bytes, 492 * The MAC and BSSID addresses are simple array of bytes,
493 * these arrays are little endian, so when sending the addressess 493 * these arrays are little endian, so when sending the addresses
494 * to the drivers, copy the it into a endian-signed variable. 494 * to the drivers, copy the it into a endian-signed variable.
495 * 495 *
496 * Note that all devices (except rt2500usb) have 32 bits 496 * Note that all devices (except rt2500usb) have 32 bits
@@ -1131,7 +1131,7 @@ void rt2x00queue_stop_queue(struct data_queue *queue);
1131 * @drop: True to drop all pending frames. 1131 * @drop: True to drop all pending frames.
1132 * 1132 *
1133 * This function will flush the queue. After this call 1133 * This function will flush the queue. After this call
1134 * the queue is guarenteed to be empty. 1134 * the queue is guaranteed to be empty.
1135 */ 1135 */
1136void rt2x00queue_flush_queue(struct data_queue *queue, bool drop); 1136void rt2x00queue_flush_queue(struct data_queue *queue, bool drop);
1137 1137
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index e7f67d5eda5..9416e36de29 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -60,7 +60,7 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
60 * Note that when NULL is passed as address we will send 60 * Note that when NULL is passed as address we will send
61 * 00:00:00:00:00 to the device to clear the address. 61 * 00:00:00:00:00 to the device to clear the address.
62 * This will prevent the device being confused when it wants 62 * This will prevent the device being confused when it wants
63 * to ACK frames or consideres itself associated. 63 * to ACK frames or considers itself associated.
64 */ 64 */
65 memset(conf.mac, 0, sizeof(conf.mac)); 65 memset(conf.mac, 0, sizeof(conf.mac));
66 if (mac) 66 if (mac)
diff --git a/drivers/net/wireless/rt2x00/rt2x00crypto.c b/drivers/net/wireless/rt2x00/rt2x00crypto.c
index 5e9074bf2b8..3f5688fbf3f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00crypto.c
+++ b/drivers/net/wireless/rt2x00/rt2x00crypto.c
@@ -237,7 +237,7 @@ void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
237 } 237 }
238 238
239 /* 239 /*
240 * NOTE: Always count the payload as transfered, 240 * NOTE: Always count the payload as transferred,
241 * even when alignment was set to zero. This is required 241 * even when alignment was set to zero. This is required
242 * for determining the correct offset for the ICV data. 242 * for determining the correct offset for the ICV data.
243 */ 243 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00dump.h b/drivers/net/wireless/rt2x00/rt2x00dump.h
index 5d6e0b83151..063ebcce97f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dump.h
+++ b/drivers/net/wireless/rt2x00/rt2x00dump.h
@@ -51,7 +51,7 @@
51 * [rt2x00dump header][hardware descriptor][ieee802.11 frame] 51 * [rt2x00dump header][hardware descriptor][ieee802.11 frame]
52 * 52 *
53 * rt2x00dump header: The description of the dumped frame, as well as 53 * rt2x00dump header: The description of the dumped frame, as well as
54 * additional information usefull for debugging. See &rt2x00dump_hdr. 54 * additional information useful for debugging. See &rt2x00dump_hdr.
55 * hardware descriptor: Descriptor that was used to receive or transmit 55 * hardware descriptor: Descriptor that was used to receive or transmit
56 * the frame. 56 * the frame.
57 * ieee802.11 frame: The actual frame that was received or transmitted. 57 * ieee802.11 frame: The actual frame that was received or transmitted.
diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c
index c975b0a12e9..29abfdeb0b6 100644
--- a/drivers/net/wireless/rt2x00/rt2x00link.c
+++ b/drivers/net/wireless/rt2x00/rt2x00link.c
@@ -283,7 +283,7 @@ void rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev)
283 /** 283 /**
284 * While scanning, link tuning is disabled. By default 284 * While scanning, link tuning is disabled. By default
285 * the most sensitive settings will be used to make sure 285 * the most sensitive settings will be used to make sure
286 * that all beacons and probe responses will be recieved 286 * that all beacons and probe responses will be received
287 * during the scan. 287 * during the scan.
288 */ 288 */
289 if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) 289 if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags))
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 4b3c70eeef1..4358051bfe1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -546,7 +546,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
546 } 546 }
547 547
548 /* 548 /*
549 * When DMA allocation is required we should guarentee to the 549 * When DMA allocation is required we should guarantee to the
550 * driver that the DMA is aligned to a 4-byte boundary. 550 * driver that the DMA is aligned to a 4-byte boundary.
551 * However some drivers require L2 padding to pad the payload 551 * However some drivers require L2 padding to pad the payload
552 * rather then the header. This could be a requirement for 552 * rather then the header. This could be a requirement for
@@ -689,7 +689,7 @@ void rt2x00queue_for_each_entry(struct data_queue *queue,
689 spin_unlock_irqrestore(&queue->index_lock, irqflags); 689 spin_unlock_irqrestore(&queue->index_lock, irqflags);
690 690
691 /* 691 /*
692 * Start from the TX done pointer, this guarentees that we will 692 * Start from the TX done pointer, this guarantees that we will
693 * send out all frames in the correct order. 693 * send out all frames in the correct order.
694 */ 694 */
695 if (index_start < index_end) { 695 if (index_start < index_end) {
@@ -883,7 +883,7 @@ void rt2x00queue_flush_queue(struct data_queue *queue, bool drop)
883 } 883 }
884 884
885 /* 885 /*
886 * Check if driver supports flushing, we can only guarentee 886 * Check if driver supports flushing, we can only guarantee
887 * full support for flushing if the driver is able 887 * full support for flushing if the driver is able
888 * to cancel all pending frames (drop = true). 888 * to cancel all pending frames (drop = true).
889 */ 889 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 0c8b0c69967..217861f8d95 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -344,8 +344,8 @@ struct txentry_desc {
344 * only be touched after the device has signaled it is done with it. 344 * only be touched after the device has signaled it is done with it.
345 * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting 345 * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting
346 * for the signal to start sending. 346 * for the signal to start sending.
347 * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occured 347 * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occurred
348 * while transfering the data to the hardware. No TX status report will 348 * while transferring the data to the hardware. No TX status report will
349 * be expected from the hardware. 349 * be expected from the hardware.
350 * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and 350 * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and
351 * returned. It is now waiting for the status reporting before the 351 * returned. It is now waiting for the status reporting before the
@@ -365,7 +365,7 @@ enum queue_entry_flags {
365 * @flags: Entry flags, see &enum queue_entry_flags. 365 * @flags: Entry flags, see &enum queue_entry_flags.
366 * @queue: The data queue (&struct data_queue) to which this entry belongs. 366 * @queue: The data queue (&struct data_queue) to which this entry belongs.
367 * @skb: The buffer which is currently being transmitted (for TX queue), 367 * @skb: The buffer which is currently being transmitted (for TX queue),
368 * or used to directly recieve data in (for RX queue). 368 * or used to directly receive data in (for RX queue).
369 * @entry_idx: The entry index number. 369 * @entry_idx: The entry index number.
370 * @priv_data: Private data belonging to this queue entry. The pointer 370 * @priv_data: Private data belonging to this queue entry. The pointer
371 * points to data specific to a particular driver and queue type. 371 * points to data specific to a particular driver and queue type.
@@ -388,7 +388,7 @@ struct queue_entry {
388 * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is 388 * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is
389 * owned by the hardware then the queue is considered to be full. 389 * owned by the hardware then the queue is considered to be full.
390 * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been 390 * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been
391 * transfered to the hardware. 391 * transferred to the hardware.
392 * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by 392 * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by
393 * the hardware and for which we need to run the txdone handler. If this 393 * the hardware and for which we need to run the txdone handler. If this
394 * entry is not owned by the hardware the queue is considered to be empty. 394 * entry is not owned by the hardware the queue is considered to be empty.
@@ -627,7 +627,7 @@ static inline int rt2x00queue_threshold(struct data_queue *queue)
627} 627}
628 628
629/** 629/**
630 * rt2x00queue_status_timeout - Check if a timeout occured for STATUS reports 630 * rt2x00queue_status_timeout - Check if a timeout occurred for STATUS reports
631 * @queue: Queue to check. 631 * @queue: Queue to check.
632 */ 632 */
633static inline int rt2x00queue_status_timeout(struct data_queue *queue) 633static inline int rt2x00queue_status_timeout(struct data_queue *queue)
@@ -637,7 +637,7 @@ static inline int rt2x00queue_status_timeout(struct data_queue *queue)
637} 637}
638 638
639/** 639/**
640 * rt2x00queue_timeout - Check if a timeout occured for DMA transfers 640 * rt2x00queue_timeout - Check if a timeout occurred for DMA transfers
641 * @queue: Queue to check. 641 * @queue: Queue to check.
642 */ 642 */
643static inline int rt2x00queue_dma_timeout(struct data_queue *queue) 643static inline int rt2x00queue_dma_timeout(struct data_queue *queue)
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index fbe735f5b35..36f388f97d6 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -173,7 +173,7 @@ static void rt2x00usb_work_txdone_entry(struct queue_entry *entry)
173 /* 173 /*
174 * If the transfer to hardware succeeded, it does not mean the 174 * If the transfer to hardware succeeded, it does not mean the
175 * frame was send out correctly. It only means the frame 175 * frame was send out correctly. It only means the frame
176 * was succesfully pushed to the hardware, we have no 176 * was successfully pushed to the hardware, we have no
177 * way to determine the transmission status right now. 177 * way to determine the transmission status right now.
178 * (Only indirectly by looking at the failed TX counters 178 * (Only indirectly by looking at the failed TX counters
179 * in the register). 179 * in the register).
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index 6aaf51fc7ad..e11c759ac9e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -400,7 +400,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue);
400 * @rt2x00dev: Pointer to &struct rt2x00_dev 400 * @rt2x00dev: Pointer to &struct rt2x00_dev
401 * 401 *
402 * Check the health of the USB communication and determine 402 * Check the health of the USB communication and determine
403 * if timeouts have occured. If this is the case, this function 403 * if timeouts have occurred. If this is the case, this function
404 * will reset all communication to restore functionality again. 404 * will reset all communication to restore functionality again.
405 */ 405 */
406void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev); 406void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev);
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index bb0c781f4a1..0d7d93e1d39 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -520,7 +520,7 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
520 *because hw will nerver use hw_rate 520 *because hw will nerver use hw_rate
521 *when tcb_desc->use_driver_rate = false 521 *when tcb_desc->use_driver_rate = false
522 *so we never set highest N rate here, 522 *so we never set highest N rate here,
523 *and N rate will all be controled by FW 523 *and N rate will all be controlled by FW
524 *when tcb_desc->use_driver_rate = false 524 *when tcb_desc->use_driver_rate = false
525 */ 525 */
526 if (rtlmac->ht_enable) { 526 if (rtlmac->ht_enable) {
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 9cd7703c2a3..5938f6ee21e 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -395,7 +395,7 @@ static void rtl_pci_init_aspm(struct ieee80211_hw *hw)
395 * 0 - Disable ASPM, 395 * 0 - Disable ASPM,
396 * 1 - Enable ASPM without Clock Req, 396 * 1 - Enable ASPM without Clock Req,
397 * 2 - Enable ASPM with Clock Req, 397 * 2 - Enable ASPM with Clock Req,
398 * 3 - Alwyas Enable ASPM with Clock Req, 398 * 3 - Always Enable ASPM with Clock Req,
399 * 4 - Always Enable ASPM without Clock Req. 399 * 4 - Always Enable ASPM without Clock Req.
400 * set defult to RTL8192CE:3 RTL8192E:2 400 * set defult to RTL8192CE:3 RTL8192E:2
401 * */ 401 * */
diff --git a/drivers/net/wireless/rtlwifi/regd.c b/drivers/net/wireless/rtlwifi/regd.c
index 3336ca999df..d26f957981a 100644
--- a/drivers/net/wireless/rtlwifi/regd.c
+++ b/drivers/net/wireless/rtlwifi/regd.c
@@ -179,7 +179,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
179 } 179 }
180 180
181 /* 181 /*
182 *If a country IE has been recieved check its rule for this 182 *If a country IE has been received check its rule for this
183 *channel first before enabling active scan. The passive scan 183 *channel first before enabling active scan. The passive scan
184 *would have been enforced by the initial processing of our 184 *would have been enforced by the initial processing of our
185 *custom regulatory domain. 185 *custom regulatory domain.
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 01226f8e70f..07db95ff9bc 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1555,7 +1555,7 @@ struct rtl_priv {
1555 1555
1556 1556
1557/*************************************** 1557/***************************************
1558 Bluetooth Co-existance Related 1558 Bluetooth Co-existence Related
1559****************************************/ 1559****************************************/
1560 1560
1561enum bt_ant_num { 1561enum bt_ant_num {
diff --git a/drivers/net/wireless/wl1251/cmd.c b/drivers/net/wireless/wl1251/cmd.c
index 0ade4bd617c..81f164bc488 100644
--- a/drivers/net/wireless/wl1251/cmd.c
+++ b/drivers/net/wireless/wl1251/cmd.c
@@ -104,7 +104,7 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
104 * @wl: wl struct 104 * @wl: wl struct
105 * @id: acx id 105 * @id: acx id
106 * @buf: buffer for the response, including all headers, must work with dma 106 * @buf: buffer for the response, including all headers, must work with dma
107 * @len: lenght of buf 107 * @len: length of buf
108 */ 108 */
109int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len) 109int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
110{ 110{
diff --git a/drivers/net/wireless/wl1251/rx.c b/drivers/net/wireless/wl1251/rx.c
index c1b3b3f03da..6af35265c90 100644
--- a/drivers/net/wireless/wl1251/rx.c
+++ b/drivers/net/wireless/wl1251/rx.c
@@ -179,7 +179,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
179 rx_buffer = skb_put(skb, length); 179 rx_buffer = skb_put(skb, length);
180 wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length); 180 wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length);
181 181
182 /* The actual lenght doesn't include the target's alignment */ 182 /* The actual length doesn't include the target's alignment */
183 skb->len = desc->length - PLCP_HEADER_LENGTH; 183 skb->len = desc->length - PLCP_HEADER_LENGTH;
184 184
185 fc = (u16 *)skb->data; 185 fc = (u16 *)skb->data;
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index f0aa7ab97bf..96324336f93 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -359,7 +359,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer)
359 * @wl: wl struct 359 * @wl: wl struct
360 * @id: acx id 360 * @id: acx id
361 * @buf: buffer for the response, including all headers, must work with dma 361 * @buf: buffer for the response, including all headers, must work with dma
362 * @len: lenght of buf 362 * @len: length of buf
363 */ 363 */
364int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len) 364int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len)
365{ 365{
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 856a8a2fff4..8a8323896ee 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -497,7 +497,7 @@ struct conf_rx_settings {
497#define CONF_TX_RATE_RETRY_LIMIT 10 497#define CONF_TX_RATE_RETRY_LIMIT 10
498 498
499/* 499/*
500 * Rates supported for data packets when operating as AP. Note the absense 500 * Rates supported for data packets when operating as AP. Note the absence
501 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop 501 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
502 * one. The rate dropped is not mandatory under any operating mode. 502 * one. The rate dropped is not mandatory under any operating mode.
503 */ 503 */
@@ -572,7 +572,7 @@ enum conf_tx_ac {
572 CONF_TX_AC_BK = 1, /* background */ 572 CONF_TX_AC_BK = 1, /* background */
573 CONF_TX_AC_VI = 2, /* video */ 573 CONF_TX_AC_VI = 2, /* video */
574 CONF_TX_AC_VO = 3, /* voice */ 574 CONF_TX_AC_VO = 3, /* voice */
575 CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */ 575 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
576 CONF_TX_AC_ANY_TID = 0x1f 576 CONF_TX_AC_ANY_TID = 0x1f
577}; 577};
578 578
@@ -1169,7 +1169,7 @@ struct conf_memory_settings {
1169 1169
1170 /* 1170 /*
1171 * Minimum required free tx memory blocks in order to assure optimum 1171 * Minimum required free tx memory blocks in order to assure optimum
1172 * performence 1172 * performance
1173 * 1173 *
1174 * Range: 0-120 1174 * Range: 0-120
1175 */ 1175 */
@@ -1177,7 +1177,7 @@ struct conf_memory_settings {
1177 1177
1178 /* 1178 /*
1179 * Minimum required free rx memory blocks in order to assure optimum 1179 * Minimum required free rx memory blocks in order to assure optimum
1180 * performence 1180 * performance
1181 * 1181 *
1182 * Range: 0-120 1182 * Range: 0-120
1183 */ 1183 */
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h
index c1aac829208..00c771ea70b 100644
--- a/drivers/net/wireless/wl12xx/io.h
+++ b/drivers/net/wireless/wl12xx/io.h
@@ -94,7 +94,7 @@ static inline int wl1271_translate_addr(struct wl1271 *wl, int addr)
94 * translated region. 94 * translated region.
95 * 95 *
96 * The translated regions occur next to each other in physical device 96 * The translated regions occur next to each other in physical device
97 * memory, so just add the sizes of the preceeding address regions to 97 * memory, so just add the sizes of the preceding address regions to
98 * get the offset to the new region. 98 * get the offset to the new region.
99 * 99 *
100 * Currently, only the two first regions are addressed, and the 100 * Currently, only the two first regions are addressed, and the
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 3e5befe4d03..fc08f36fe1f 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -290,7 +290,7 @@ static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest,
290 * \ \- IEEE 802.11 -/ \-------------- len --------------/ 290 * \ \- IEEE 802.11 -/ \-------------- len --------------/
291 * \-struct wl3501_80211_tx_hdr--/ \-------- Ethernet Frame -------/ 291 * \-struct wl3501_80211_tx_hdr--/ \-------- Ethernet Frame -------/
292 * 292 *
293 * Return = Postion in Card 293 * Return = Position in Card
294 */ 294 */
295static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len) 295static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len)
296{ 296{
@@ -1932,7 +1932,7 @@ static int wl3501_config(struct pcmcia_device *link)
1932 this->base_addr = dev->base_addr; 1932 this->base_addr = dev->base_addr;
1933 1933
1934 if (!wl3501_get_flash_mac_addr(this)) { 1934 if (!wl3501_get_flash_mac_addr(this)) {
1935 printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n", 1935 printk(KERN_WARNING "%s: Can't read MAC addr in flash ROM?\n",
1936 dev->name); 1936 dev->name);
1937 unregister_netdev(dev); 1937 unregister_netdev(dev);
1938 goto failed; 1938 goto failed;
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
index 0597d862fbd..e36117486c9 100644
--- a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
+++ b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
@@ -169,7 +169,7 @@ static int rf2959_init_hw(struct zd_rf *rf)
169 { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A }, 169 { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A },
170 { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 }, 170 { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 },
171 /* { CR91, 0x18 }, */ 171 /* { CR91, 0x18 }, */
172 /* should solve continous CTS frame problems */ 172 /* should solve continuous CTS frame problems */
173 { CR91, 0x00 }, 173 { CR91, 0x00 },
174 { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 }, 174 { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 },
175 { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 }, 175 { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 },
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
index 9e74eb1b67d..ba0a0ccb1fa 100644
--- a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
+++ b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
@@ -353,7 +353,7 @@ static int uw2453_init_hw(struct zd_rf *rf)
353 }; 353 };
354 354
355 static const u32 rv[] = { 355 static const u32 rv[] = {
356 UW2453_REGWRITE(4, 0x2b), /* configure reciever gain */ 356 UW2453_REGWRITE(4, 0x2b), /* configure receiver gain */
357 UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */ 357 UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */
358 UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */ 358 UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */
359 UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */ 359 UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 2642af4ee49..372572c0adc 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -786,7 +786,7 @@ static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int reg)
786 * @reg: register number to write to 786 * @reg: register number to write to
787 * @val: value to write to the register number specified by reg 787 * @val: value to write to the register number specified by reg
788 * 788 *
789 * This fucntion waits till the device is ready to accept a new MDIO 789 * This function waits till the device is ready to accept a new MDIO
790 * request and then writes the val to the MDIO Write Data register. 790 * request and then writes the val to the MDIO Write Data register.
791 */ 791 */
792static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg, 792static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index ae07b3dfbcc..ec2800ff8d4 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -652,7 +652,7 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id)
652 dev->stats.tx_errors++; 652 dev->stats.tx_errors++;
653 653
654 /* Transceiver may be stuck if cable 654 /* Transceiver may be stuck if cable
655 * was removed while emiting a 655 * was removed while emitting a
656 * packet. Flip it off, then on to 656 * packet. Flip it off, then on to
657 * reset it. This is very empirical, 657 * reset it. This is very empirical,
658 * but it seems to work. */ 658 * but it seems to work. */