Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 14 Apr 2010 12:01:33 +0000 (05:01 -0700)]
Conflicts:
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/virtio_net.c

697 files changed:
Documentation/ABI/obsolete/sysfs-class-rfkill [new file with mode: 0644]
Documentation/ABI/stable/sysfs-class-rfkill [new file with mode: 0644]
Documentation/feature-removal-schedule.txt
Documentation/networking/caif/Linux-CAIF.txt [new file with mode: 0644]
Documentation/networking/caif/README [new file with mode: 0644]
Documentation/networking/l2tp.txt
Documentation/rfkill.txt
MAINTAINERS
arch/arm/mach-pxa/icontrol.c
arch/arm/mach-pxa/zeus.c
arch/microblaze/include/asm/system.h
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/media/dvb/dvb-core/dvb_net.c
drivers/net/3c503.c
drivers/net/3c505.c
drivers/net/3c523.c
drivers/net/3c527.c
drivers/net/7990.c
drivers/net/8139cp.c
drivers/net/8139too.c
drivers/net/82596.c
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/a2065.c
drivers/net/acenic.c
drivers/net/acenic.h
drivers/net/amd8111e.c
drivers/net/arm/am79c961a.c
drivers/net/arm/at91_ether.c
drivers/net/arm/ixp4xx_eth.c
drivers/net/arm/ks8695net.c
drivers/net/arm/w90p910_ether.c
drivers/net/at1700.c
drivers/net/atl1c/atl1c_main.c
drivers/net/atl1e/atl1e_main.c
drivers/net/atlx/atl2.c
drivers/net/atlx/atlx.c
drivers/net/atp.c
drivers/net/au1000_eth.c
drivers/net/au1000_eth.h
drivers/net/b44.c
drivers/net/bcm63xx_enet.c
drivers/net/benet/be.h
drivers/net/benet/be_cmds.c
drivers/net/benet/be_cmds.h
drivers/net/benet/be_ethtool.c
drivers/net/benet/be_hw.h
drivers/net/benet/be_main.c
drivers/net/bfin_mac.c
drivers/net/bmac.c
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/bnx2x.h
drivers/net/bnx2x_link.c
drivers/net/bnx2x_main.c
drivers/net/bonding/bond_ipv6.c
drivers/net/bonding/bond_main.c
drivers/net/bonding/bonding.h
drivers/net/caif/Kconfig [new file with mode: 0644]
drivers/net/caif/Makefile [new file with mode: 0644]
drivers/net/caif/caif_serial.c [new file with mode: 0644]
drivers/net/can/at91_can.c
drivers/net/can/bfin_can.c
drivers/net/can/mcp251x.c
drivers/net/can/mscan/mpc5xxx_can.c
drivers/net/can/mscan/mscan.c
drivers/net/can/sja1000/Kconfig
drivers/net/can/sja1000/ems_pci.c
drivers/net/can/sja1000/kvaser_pci.c
drivers/net/can/sja1000/plx_pci.c
drivers/net/can/sja1000/sja1000.c
drivers/net/can/sja1000/sja1000_isa.c
drivers/net/can/sja1000/sja1000_of_platform.c
drivers/net/can/sja1000/sja1000_platform.c
drivers/net/can/ti_hecc.c
drivers/net/cassini.c
drivers/net/chelsio/pm3393.c
drivers/net/chelsio/sge.c
drivers/net/cpmac.c
drivers/net/cris/eth_v10.c
drivers/net/cxgb3/sge.c
drivers/net/cxgb3/xgmac.c
drivers/net/cxgb4/cxgb4_main.c
drivers/net/davinci_emac.c
drivers/net/declance.c
drivers/net/defxx.c
drivers/net/depca.c
drivers/net/dl2k.c
drivers/net/dm9000.c
drivers/net/dnet.c
drivers/net/e100.c
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/82571.c
drivers/net/e1000e/e1000.h
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/lib.c
drivers/net/e1000e/netdev.c
drivers/net/e1000e/param.c
drivers/net/eepro.c
drivers/net/eexpress.c
drivers/net/ehea/ehea_main.c
drivers/net/enic/cq_enet_desc.h
drivers/net/enic/enic.h
drivers/net/enic/enic_main.c
drivers/net/enic/vnic_dev.c
drivers/net/enic/vnic_dev.h
drivers/net/enic/vnic_rq.c
drivers/net/enic/vnic_wq.c
drivers/net/epic100.c
drivers/net/ethoc.c
drivers/net/ewrk3.c
drivers/net/fealnx.c
drivers/net/fec.c
drivers/net/fec_mpc52xx.c
drivers/net/forcedeth.c
drivers/net/fs_enet/mac-fcc.c
drivers/net/fs_enet/mac-fec.c
drivers/net/fs_enet/mac-scc.c
drivers/net/gianfar.c
drivers/net/gianfar.h
drivers/net/greth.c
drivers/net/hamachi.c
drivers/net/hamradio/baycom_ser_fdx.c
drivers/net/hp100.c
drivers/net/ibm_newemac/core.c
drivers/net/ibmlana.c
drivers/net/ibmveth.c
drivers/net/igb/e1000_82575.c
drivers/net/igb/e1000_82575.h
drivers/net/igb/e1000_defines.h
drivers/net/igb/e1000_hw.h
drivers/net/igb/igb.h
drivers/net/igb/igb_ethtool.c
drivers/net/igb/igb_main.c
drivers/net/igbvf/netdev.c
drivers/net/ioc3-eth.c
drivers/net/ipg.c
drivers/net/ipg.h
drivers/net/irda/Kconfig
drivers/net/irda/Makefile
drivers/net/irda/ali-ircc.c
drivers/net/irda/irda-usb.c
drivers/net/irda/sh_irda.c [new file with mode: 0644]
drivers/net/irda/sh_sir.c
drivers/net/irda/vlsi_ir.c
drivers/net/iseries_veth.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgbe/ixgbe_82599.c
drivers/net/ixgbe/ixgbe_common.c
drivers/net/ixgbe/ixgbe_common.h
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_phy.c
drivers/net/ixgbe/ixgbe_type.h
drivers/net/ixgbevf/ixgbevf_main.c
drivers/net/ixgbevf/vf.c
drivers/net/ixgbevf/vf.h
drivers/net/jme.c
drivers/net/korina.c
drivers/net/ks8842.c
drivers/net/ks8851.c
drivers/net/ks8851_mll.c
drivers/net/ksz884x.c
drivers/net/lib82596.c
drivers/net/lib8390.c
drivers/net/ll_temac.h
drivers/net/ll_temac_main.c
drivers/net/lp486e.c
drivers/net/macb.c
drivers/net/mace.c
drivers/net/macmace.c
drivers/net/macvlan.c
drivers/net/mlx4/en_netdev.c
drivers/net/mlx4/mlx4_en.h
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/natsemi.c
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_ethtool.c
drivers/net/netxen/netxen_nic_hw.c
drivers/net/netxen/netxen_nic_init.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/ni52.c
drivers/net/niu.c
drivers/net/octeon/octeon_mgmt.c
drivers/net/pci-skeleton.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/pcnet32.c
drivers/net/phy/bcm63xx.c
drivers/net/phy/broadcom.c
drivers/net/phy/cicada.c
drivers/net/phy/davicom.c
drivers/net/phy/et1011c.c
drivers/net/phy/icplus.c
drivers/net/phy/lxt.c
drivers/net/phy/marvell.c
drivers/net/phy/mdio-bitbang.c
drivers/net/phy/mdio_bus.c
drivers/net/phy/national.c
drivers/net/phy/phy_device.c
drivers/net/phy/qsemi.c
drivers/net/phy/realtek.c
drivers/net/phy/smsc.c
drivers/net/phy/ste10Xp.c
drivers/net/phy/vitesse.c
drivers/net/ppp_generic.c
drivers/net/pppol2tp.c [deleted file]
drivers/net/ps3_gelic_net.c
drivers/net/ps3_gelic_wireless.c
drivers/net/qla3xxx.c
drivers/net/qla3xxx.h
drivers/net/qlcnic/qlcnic.h
drivers/net/qlcnic/qlcnic_ethtool.c
drivers/net/qlcnic/qlcnic_hdr.h
drivers/net/qlcnic/qlcnic_hw.c
drivers/net/qlcnic/qlcnic_init.c
drivers/net/qlcnic/qlcnic_main.c
drivers/net/qlge/qlge.h
drivers/net/qlge/qlge_dbg.c
drivers/net/qlge/qlge_main.c
drivers/net/r6040.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/s6gmac.c
drivers/net/sb1250-mac.c
drivers/net/sc92031.c
drivers/net/sfc/efx.c
drivers/net/sis190.c
drivers/net/sis900.c
drivers/net/skfp/fplustm.c
drivers/net/skfp/pcmplc.c
drivers/net/skfp/skfddi.c
drivers/net/skfp/srf.c
drivers/net/skge.c
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/smc911x.c
drivers/net/smc9194.c
drivers/net/smc91x.c
drivers/net/smsc911x.c
drivers/net/smsc9420.c
drivers/net/sonic.c
drivers/net/spider_net.c
drivers/net/starfire.c
drivers/net/stmmac/Makefile
drivers/net/stmmac/common.h
drivers/net/stmmac/dwmac100.c [deleted file]
drivers/net/stmmac/dwmac100.h
drivers/net/stmmac/dwmac1000.h
drivers/net/stmmac/dwmac1000_core.c
drivers/net/stmmac/dwmac1000_dma.c
drivers/net/stmmac/dwmac100_core.c [new file with mode: 0644]
drivers/net/stmmac/dwmac100_dma.c [new file with mode: 0644]
drivers/net/stmmac/dwmac_dma.h
drivers/net/stmmac/dwmac_lib.c
drivers/net/stmmac/enh_desc.c [new file with mode: 0644]
drivers/net/stmmac/norm_desc.c [new file with mode: 0644]
drivers/net/stmmac/stmmac.h
drivers/net/stmmac/stmmac_main.c
drivers/net/sun3_82586.c
drivers/net/sunbmac.c
drivers/net/sundance.c
drivers/net/sungem.c
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/sunvnet.c
drivers/net/tc35815.c
drivers/net/tehuti.c
drivers/net/tg3.c
drivers/net/tg3.h
drivers/net/tlan.c
drivers/net/tokenring/3c359.c
drivers/net/tokenring/ibmtr.c
drivers/net/tokenring/lanstreamer.c
drivers/net/tokenring/olympic.c
drivers/net/tokenring/tms380tr.c
drivers/net/tsi108_eth.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/de4x5.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/tulip_core.c
drivers/net/tulip/uli526x.c
drivers/net/tulip/winbond-840.c
drivers/net/tulip/xircom_cb.c
drivers/net/typhoon.c
drivers/net/ucc_geth.c
drivers/net/usb/asix.c
drivers/net/usb/catc.c
drivers/net/usb/dm9601.c
drivers/net/usb/mcs7830.c
drivers/net/usb/smsc75xx.c
drivers/net/usb/smsc95xx.c
drivers/net/usb/usbnet.c
drivers/net/via-rhine.c
drivers/net/via-velocity.c
drivers/net/via-velocity.h
drivers/net/virtio_net.c
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/vxge/vxge-config.c
drivers/net/vxge/vxge-config.h
drivers/net/vxge/vxge-ethtool.c
drivers/net/vxge/vxge-main.c
drivers/net/vxge/vxge-main.h
drivers/net/vxge/vxge-traffic.c
drivers/net/vxge/vxge-traffic.h
drivers/net/vxge/vxge-version.h
drivers/net/wan/pc300_drv.c
drivers/net/wan/pc300_tty.c
drivers/net/wan/sdla.c
drivers/net/wimax/i2400m/tx.c
drivers/net/wireless/adm8211.c
drivers/net/wireless/airo.c
drivers/net/wireless/ath/Kconfig
drivers/net/wireless/ath/ar9170/main.c
drivers/net/wireless/ath/ath5k/ath5k.h
drivers/net/wireless/ath/ath5k/attach.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/base.h
drivers/net/wireless/ath/ath5k/caps.c
drivers/net/wireless/ath/ath5k/debug.c
drivers/net/wireless/ath/ath5k/debug.h
drivers/net/wireless/ath/ath5k/desc.c
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/ath5k/eeprom.h
drivers/net/wireless/ath/ath5k/pcu.c
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/ath/ath5k/qcu.c
drivers/net/wireless/ath/ath5k/reg.h
drivers/net/wireless/ath/ath5k/reset.c
drivers/net/wireless/ath/ath9k/Kconfig
drivers/net/wireless/ath/ath9k/Makefile
drivers/net/wireless/ath/ath9k/calib.c
drivers/net/wireless/ath/ath9k/common.c
drivers/net/wireless/ath/ath9k/common.h
drivers/net/wireless/ath/ath9k/hif_usb.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/hif_usb.h [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc.h [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc_drv_init.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc_drv_main.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc_hst.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/htc_hst.h [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/initvals.h
drivers/net/wireless/ath/ath9k/mac.c
drivers/net/wireless/ath/ath9k/mac.h
drivers/net/wireless/ath/ath9k/rc.c
drivers/net/wireless/ath/ath9k/rc.h
drivers/net/wireless/ath/ath9k/reg.h
drivers/net/wireless/ath/ath9k/wmi.c [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/wmi.h [new file with mode: 0644]
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/ath/debug.h
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/phy_n.c
drivers/net/wireless/b43/phy_n.h
drivers/net/wireless/b43/tables_nphy.h
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/ipw2x00/libipw.h
drivers/net/wireless/ipw2x00/libipw_module.c
drivers/net/wireless/iwlwifi/Makefile
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-3945-hw.h
drivers/net/wireless/iwlwifi/iwl-3945-rs.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-3945.h
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn-ict.c [new file with mode: 0644]
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-agn-rs.h
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-agn.h [new file with mode: 0644]
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-debugfs.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-helpers.h
drivers/net/wireless/iwlwifi/iwl-prph.h
drivers/net/wireless/iwlwifi/iwl-rx.c
drivers/net/wireless/iwlwifi/iwl-scan.c
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl-sta.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwmc3200wifi/Kconfig
drivers/net/wireless/iwmc3200wifi/Makefile
drivers/net/wireless/iwmc3200wifi/cfg80211.c
drivers/net/wireless/iwmc3200wifi/commands.c
drivers/net/wireless/iwmc3200wifi/commands.h
drivers/net/wireless/iwmc3200wifi/debugfs.c
drivers/net/wireless/iwmc3200wifi/hal.c
drivers/net/wireless/iwmc3200wifi/hal.h
drivers/net/wireless/iwmc3200wifi/iwm.h
drivers/net/wireless/iwmc3200wifi/main.c
drivers/net/wireless/iwmc3200wifi/rx.c
drivers/net/wireless/iwmc3200wifi/trace.c [new file with mode: 0644]
drivers/net/wireless/iwmc3200wifi/trace.h [new file with mode: 0644]
drivers/net/wireless/iwmc3200wifi/tx.c
drivers/net/wireless/iwmc3200wifi/umac.h
drivers/net/wireless/libertas/assoc.c
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/main.c
drivers/net/wireless/libertas/rx.c
drivers/net/wireless/libertas/wext.c
drivers/net/wireless/libertas_tf/main.c
drivers/net/wireless/mwl8k.c
drivers/net/wireless/orinoco/Kconfig
drivers/net/wireless/orinoco/hw.c
drivers/net/wireless/orinoco/hw.h
drivers/net/wireless/orinoco/orinoco_cs.c
drivers/net/wireless/orinoco/wext.c
drivers/net/wireless/p54/main.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/rndis_wlan.c
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rtl818x/rtl8180_dev.c
drivers/net/wireless/rtl818x/rtl8187_dev.c
drivers/net/wireless/wl12xx/Kconfig
drivers/net/wireless/wl12xx/Makefile
drivers/net/wireless/wl12xx/wl1251.h
drivers/net/wireless/wl12xx/wl1251_boot.c
drivers/net/wireless/wl12xx/wl1251_io.h
drivers/net/wireless/wl12xx/wl1251_main.c
drivers/net/wireless/wl12xx/wl1251_ps.c
drivers/net/wireless/wl12xx/wl1251_sdio.c
drivers/net/wireless/wl12xx/wl1271.h
drivers/net/wireless/wl12xx/wl1271_acx.c
drivers/net/wireless/wl12xx/wl1271_acx.h
drivers/net/wireless/wl12xx/wl1271_boot.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_cmd.h
drivers/net/wireless/wl12xx/wl1271_conf.h
drivers/net/wireless/wl12xx/wl1271_debugfs.c
drivers/net/wireless/wl12xx/wl1271_event.c
drivers/net/wireless/wl12xx/wl1271_init.c
drivers/net/wireless/wl12xx/wl1271_io.c
drivers/net/wireless/wl12xx/wl1271_io.h
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_ps.c
drivers/net/wireless/wl12xx/wl1271_rx.c
drivers/net/wireless/wl12xx/wl1271_sdio.c [new file with mode: 0644]
drivers/net/wireless/wl12xx/wl1271_spi.c
drivers/net/wireless/wl12xx/wl1271_spi.h [deleted file]
drivers/net/wireless/wl12xx/wl1271_testmode.c
drivers/net/wireless/wl12xx/wl1271_tx.c
drivers/net/wireless/wl12xx/wl1271_tx.h
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/zd1201.c
drivers/net/wireless/zd1211rw/zd_mac.c
drivers/net/xilinx_emaclite.c
drivers/net/yellowfin.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c
drivers/scsi/fcoe/fcoe.c
drivers/ssb/driver_chipcommon.c
drivers/staging/arlan/arlan-main.c
drivers/staging/et131x/et131x_netdev.c
drivers/staging/slicoss/slicoss.c
drivers/staging/vt6655/device_main.c
drivers/staging/vt6656/main_usb.c
drivers/staging/wavelan/wavelan.c
drivers/staging/wavelan/wavelan_cs.c
drivers/staging/winbond/wbusb.c
drivers/staging/wlags49_h2/wl_netdev.c
include/linux/caif/caif_socket.h [new file with mode: 0644]
include/linux/caif/if_caif.h [new file with mode: 0644]
include/linux/can/dev.h
include/linux/can/platform/mcp251x.h
include/linux/ethtool.h
include/linux/fib_rules.h
include/linux/genetlink.h
include/linux/if_arp.h
include/linux/if_ether.h
include/linux/if_link.h
include/linux/if_packet.h
include/linux/if_pppol2tp.h
include/linux/if_pppox.h
include/linux/l2tp.h [new file with mode: 0644]
include/linux/mod_devicetable.h
include/linux/mroute.h
include/linux/netdevice.h
include/linux/nl80211.h
include/linux/notifier.h
include/linux/phy.h
include/linux/ppp_channel.h
include/linux/rculist.h
include/linux/skbuff.h
include/linux/snmp.h
include/linux/socket.h
include/linux/stmmac.h
include/linux/tipc.h
include/linux/tty.h
include/linux/wireless.h
include/net/caif/caif_dev.h [new file with mode: 0644]
include/net/caif/caif_device.h [new file with mode: 0644]
include/net/caif/caif_layer.h [new file with mode: 0644]
include/net/caif/cfcnfg.h [new file with mode: 0644]
include/net/caif/cfctrl.h [new file with mode: 0644]
include/net/caif/cffrml.h [new file with mode: 0644]
include/net/caif/cfmuxl.h [new file with mode: 0644]
include/net/caif/cfpkt.h [new file with mode: 0644]
include/net/caif/cfserl.h [new file with mode: 0644]
include/net/caif/cfsrvl.h [new file with mode: 0644]
include/net/cfg80211.h
include/net/dn_fib.h
include/net/dst.h
include/net/fib_rules.h
include/net/flow.h
include/net/icmp.h
include/net/if_inet6.h
include/net/inet_connection_sock.h
include/net/ip6_fib.h
include/net/ip6_route.h
include/net/ipv6.h
include/net/mac80211.h
include/net/netns/ipv4.h
include/net/pkt_sched.h
include/net/raw.h
include/net/sch_generic.h
include/net/sctp/sctp.h
include/net/snmp.h
include/net/sock.h
include/net/tcp.h
include/net/xfrm.h
net/802/garp.c
net/8021q/vlan.c
net/8021q/vlan_dev.c
net/Kconfig
net/Makefile
net/appletalk/ddp.c
net/atm/proc.c
net/bluetooth/bnep/netdev.c
net/bridge/br_device.c
net/bridge/br_if.c
net/bridge/br_input.c
net/bridge/br_multicast.c
net/bridge/br_notify.c
net/bridge/br_private.h
net/caif/Kconfig [new file with mode: 0644]
net/caif/Makefile [new file with mode: 0644]
net/caif/caif_config_util.c [new file with mode: 0644]
net/caif/caif_dev.c [new file with mode: 0644]
net/caif/caif_socket.c [new file with mode: 0644]
net/caif/cfcnfg.c [new file with mode: 0644]
net/caif/cfctrl.c [new file with mode: 0644]
net/caif/cfdbgl.c [new file with mode: 0644]
net/caif/cfdgml.c [new file with mode: 0644]
net/caif/cffrml.c [new file with mode: 0644]
net/caif/cfmuxl.c [new file with mode: 0644]
net/caif/cfpkt_skbuff.c [new file with mode: 0644]
net/caif/cfrfml.c [new file with mode: 0644]
net/caif/cfserl.c [new file with mode: 0644]
net/caif/cfsrvl.c [new file with mode: 0644]
net/caif/cfutill.c [new file with mode: 0644]
net/caif/cfveil.c [new file with mode: 0644]
net/caif/cfvidl.c [new file with mode: 0644]
net/caif/chnl_net.c [new file with mode: 0644]
net/core/Makefile
net/core/dev.c
net/core/dev_addr_lists.c [new file with mode: 0644]
net/core/dev_mcast.c [deleted file]
net/core/dst.c
net/core/ethtool.c
net/core/fib_rules.c
net/core/flow.c
net/core/net-sysfs.c
net/core/pktgen.c
net/core/rtnetlink.c
net/core/skbuff.c
net/core/sock.c
net/dccp/ccids/ccid3.c
net/dccp/dccp.h
net/dccp/input.c
net/dccp/ipv4.c
net/dccp/ipv6.c
net/dccp/output.c
net/dccp/timer.c
net/decnet/af_decnet.c
net/decnet/dn_dev.c
net/decnet/dn_rules.c
net/dsa/slave.c
net/ipv4/Kconfig
net/ipv4/af_inet.c
net/ipv4/devinet.c
net/ipv4/fib_rules.c
net/ipv4/icmp.c
net/ipv4/igmp.c
net/ipv4/ip_sockglue.c
net/ipv4/ipconfig.c
net/ipv4/ipmr.c
net/ipv4/netfilter/ipt_CLUSTERIP.c
net/ipv4/proc.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_output.c
net/ipv4/tcp_timer.c
net/ipv4/xfrm4_policy.c
net/ipv6/addrconf.c
net/ipv6/fib6_rules.c
net/ipv6/icmp.c
net/ipv6/ip6_fib.c
net/ipv6/ipv6_sockglue.c
net/ipv6/mcast.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/proc.c
net/ipv6/tcp_ipv6.c
net/ipv6/xfrm6_policy.c
net/irda/ircomm/ircomm_param.c
net/l2tp/Kconfig [new file with mode: 0644]
net/l2tp/Makefile [new file with mode: 0644]
net/l2tp/l2tp_core.c [new file with mode: 0644]
net/l2tp/l2tp_core.h [new file with mode: 0644]
net/l2tp/l2tp_debugfs.c [new file with mode: 0644]
net/l2tp/l2tp_eth.c [new file with mode: 0644]
net/l2tp/l2tp_ip.c [new file with mode: 0644]
net/l2tp/l2tp_netlink.c [new file with mode: 0644]
net/l2tp/l2tp_ppp.c [new file with mode: 0644]
net/llc/llc_core.c
net/mac80211/Kconfig
net/mac80211/cfg.c
net/mac80211/debugfs_sta.c
net/mac80211/driver-ops.h
net/mac80211/ibss.c
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/main.c
net/mac80211/mlme.c
net/mac80211/rc80211_minstrel.c
net/mac80211/rc80211_minstrel.h
net/mac80211/rc80211_minstrel_debugfs.c
net/mac80211/rx.c
net/mac80211/scan.c
net/mac80211/sta_info.h
net/mac80211/status.c
net/mac80211/tx.c
net/netlink/af_netlink.c
net/netlink/genetlink.c
net/packet/af_packet.c
net/rds/af_rds.c
net/rds/cong.c
net/rds/ib_cm.c
net/rds/ib_rdma.c
net/rds/ib_recv.c
net/rds/ib_send.c
net/rds/iw_cm.c
net/rds/iw_recv.c
net/rds/iw_send.c
net/rds/loop.c
net/rds/rdma.c
net/rds/rdma_transport.c
net/rds/rds.h
net/rds/send.c
net/rds/tcp_recv.c
net/rds/tcp_send.c
net/rds/threads.c
net/rfkill/core.c
net/sched/act_api.c
net/sched/cls_api.c
net/sched/cls_u32.c
net/sched/sch_api.c
net/sched/sch_generic.c
net/sctp/ipv6.c
net/sctp/socket.c
net/socket.c
net/sunrpc/auth_gss/gss_spkm3_token.c
net/sunrpc/bc_svc.c
net/tipc/bcast.c
net/tipc/core.c
net/tipc/link.c
net/tipc/net.c
net/tipc/node.c
net/tipc/subscr.c
net/wimax/op-reset.c
net/wimax/op-state-get.c
net/wireless/mlme.c
net/wireless/nl80211.c
net/wireless/nl80211.h
net/wireless/wext-core.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c
scripts/mod/file2alias.c

diff --git a/Documentation/ABI/obsolete/sysfs-class-rfkill b/Documentation/ABI/obsolete/sysfs-class-rfkill
new file mode 100644 (file)
index 0000000..4201d5b
--- /dev/null
@@ -0,0 +1,29 @@
+rfkill - radio frequency (RF) connector kill switch support
+
+For details to this subsystem look at Documentation/rfkill.txt.
+
+What:          /sys/class/rfkill/rfkill[0-9]+/state
+Date:          09-Jul-2007
+KernelVersion  v2.6.22
+Contact:       linux-wireless@vger.kernel.org
+Description:   Current state of the transmitter.
+               This file is deprecated and sheduled to be removed in 2014,
+               because its not possible to express the 'soft and hard block'
+               state of the rfkill driver.
+Values:        A numeric value.
+               0: RFKILL_STATE_SOFT_BLOCKED
+                       transmitter is turned off by software
+               1: RFKILL_STATE_UNBLOCKED
+                       transmitter is (potentially) active
+               2: RFKILL_STATE_HARD_BLOCKED
+                       transmitter is forced off by something outside of
+                       the driver's control.
+
+What:          /sys/class/rfkill/rfkill[0-9]+/claim
+Date:          09-Jul-2007
+KernelVersion  v2.6.22
+Contact:       linux-wireless@vger.kernel.org
+Description:   This file is deprecated because there no longer is a way to
+               claim just control over a single rfkill instance.
+               This file is scheduled to be removed in 2012.
+Values:        0: Kernel handles events
diff --git a/Documentation/ABI/stable/sysfs-class-rfkill b/Documentation/ABI/stable/sysfs-class-rfkill
new file mode 100644 (file)
index 0000000..097f522
--- /dev/null
@@ -0,0 +1,67 @@
+rfkill - radio frequency (RF) connector kill switch support
+
+For details to this subsystem look at Documentation/rfkill.txt.
+
+For the deprecated /sys/class/rfkill/*/state and
+/sys/class/rfkill/*/claim knobs of this interface look in
+Documentation/ABI/obsolete/sysfs-class-rfkill.
+
+What:          /sys/class/rfkill
+Date:          09-Jul-2007
+KernelVersion: v2.6.22
+Contact:       linux-wireless@vger.kernel.org,
+Description:   The rfkill class subsystem folder.
+               Each registered rfkill driver is represented by an rfkillX
+               subfolder (X being an integer > 0).
+
+
+What:          /sys/class/rfkill/rfkill[0-9]+/name
+Date:          09-Jul-2007
+KernelVersion  v2.6.22
+Contact:       linux-wireless@vger.kernel.org
+Description:   Name assigned by driver to this key (interface or driver name).
+Values:        arbitrary string.
+
+
+What:          /sys/class/rfkill/rfkill[0-9]+/type
+Date:          09-Jul-2007
+KernelVersion  v2.6.22
+Contact:       linux-wireless@vger.kernel.org
+Description:   Driver type string ("wlan", "bluetooth", etc).
+Values:        See include/linux/rfkill.h.
+
+
+What:          /sys/class/rfkill/rfkill[0-9]+/persistent
+Date:          09-Jul-2007
+KernelVersion  v2.6.22
+Contact:       linux-wireless@vger.kernel.org
+Description:   Whether the soft blocked state is initialised from non-volatile
+               storage at startup.
+Values:        A numeric value.
+               0: false
+               1: true
+
+
+What:          /sys/class/rfkill/rfkill[0-9]+/hard
+Date:          12-March-2010
+KernelVersion  v2.6.34
+Contact:       linux-wireless@vger.kernel.org
+Description:   Current hardblock state. This file is read only.
+Values:        A numeric value.
+               0: inactive
+                       The transmitter is (potentially) active.
+               1: active
+                       The transmitter is forced off by something outside of
+                       the driver's control.
+
+
+What:          /sys/class/rfkill/rfkill[0-9]+/soft
+Date:          12-March-2010
+KernelVersion  v2.6.34
+Contact:       linux-wireless@vger.kernel.org
+Description:   Current softblock state. This file is read and write.
+Values:        A numeric value.
+               0: inactive
+                       The transmitter is (potentially) active.
+               1: active
+                       The transmitter is turned off by software.
index ed511af..267e905 100644 (file)
@@ -520,6 +520,7 @@ Who:        Hans de Goede <hdegoede@redhat.com>
 
 ----------------------------
 
+
 What:  corgikbd, spitzkbd, tosakbd driver
 When:  2.6.35
 Files: drivers/input/keyboard/{corgi,spitz,tosa}kbd.c
@@ -543,6 +544,24 @@ Who:       Eric Miao <eric.y.miao@gmail.com>
 
 ----------------------------
 
+What:  sysfs-class-rfkill state file
+When:  Feb 2014
+Files: net/rfkill/core.c
+Why:   Documented as obsolete since Feb 2010. This file is limited to 3
+       states while the rfkill drivers can have 4 states.
+Who:   anybody or Florian Mickler <florian@mickler.org>
+
+----------------------------
+
+What:  sysfs-class-rfkill claim file
+When:  Feb 2012
+Files: net/rfkill/core.c
+Why:   It is not possible to claim an rfkill driver since 2007. This is
+       Documented as obsolete since Feb 2010.
+Who:   anybody or Florian Mickler <florian@mickler.org>
+
+----------------------------
+
 What:  capifs
 When:  February 2011
 Files: drivers/isdn/capi/capifs.*
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt
new file mode 100644 (file)
index 0000000..7fe7a9a
--- /dev/null
@@ -0,0 +1,212 @@
+Linux CAIF
+===========
+copyright (C) ST-Ericsson AB 2010
+Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
+License terms: GNU General Public License (GPL) version 2
+
+
+Introduction
+------------
+CAIF is a MUX protocol used by ST-Ericsson cellular modems for
+communication between Modem and host. The host processes can open virtual AT
+channels, initiate GPRS Data connections, Video channels and Utility Channels.
+The Utility Channels are general purpose pipes between modem and host.
+
+ST-Ericsson modems support a number of transports between modem
+and host. Currently, UART and Loopback are available for Linux.
+
+
+Architecture:
+------------
+The implementation of CAIF is divided into:
+* CAIF Socket Layer, Kernel API, and  Net Device.
+* CAIF Core Protocol Implementation
+* CAIF Link Layer, implemented as NET devices.
+
+
+  RTNL
+   !
+   !    +------+   +------+   +------+
+   !   +------+!  +------+!  +------+!
+   !   ! Sock !!  !Kernel!!  ! Net  !!
+   !   ! API  !+  ! API  !+  ! Dev  !+   <- CAIF Client APIs
+   !   +------+   +------!   +------+
+   !      !          !          !
+   !      +----------!----------+
+   !              +------+               <- CAIF Protocol Implementation
+   +------->      ! CAIF !
+                  ! Core !
+                  +------+
+            +--------!--------+
+            !                 !
+         +------+          +-----+
+         !      !          ! TTY !       <- Link Layer (Net Devices)
+         +------+          +-----+
+
+
+Using the Kernel API
+----------------------
+The Kernel API is used for accessing CAIF channels from the
+kernel.
+The user of the API has to implement two callbacks for receive
+and control.
+The receive callback gives a CAIF packet as a SKB. The control
+callback will
+notify of channel initialization complete, and flow-on/flow-
+off.
+
+
+  struct caif_device caif_dev = {
+    .caif_config = {
+     .name = "MYDEV"
+     .type = CAIF_CHTY_AT
+    }
+   .receive_cb = my_receive,
+   .control_cb = my_control,
+  };
+  caif_add_device(&caif_dev);
+  caif_transmit(&caif_dev, skb);
+
+See the caif_kernel.h for details about the CAIF kernel API.
+
+
+I M P L E M E N T A T I O N
+===========================
+===========================
+
+CAIF Core Protocol Layer
+=========================================
+
+CAIF Core layer implements the CAIF protocol as defined by ST-Ericsson.
+It implements the CAIF protocol stack in a layered approach, where
+each layer described in the specification is implemented as a separate layer.
+The architecture is inspired by the design patterns "Protocol Layer" and
+"Protocol Packet".
+
+== CAIF structure ==
+The Core CAIF implementation contains:
+      -        Simple implementation of CAIF.
+      -        Layered architecture (a la Streams), each layer in the CAIF
+       specification is implemented in a separate c-file.
+      -        Clients must implement PHY layer to access physical HW
+       with receive and transmit functions.
+      -        Clients must call configuration function to add PHY layer.
+      -        Clients must implement CAIF layer to consume/produce
+       CAIF payload with receive and transmit functions.
+      -        Clients must call configuration function to add and connect the
+       Client layer.
+      - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed
+       to the called function (except for framing layers' receive functions
+       or if a transmit function returns an error, in which case the caller
+       must free the packet).
+
+Layered Architecture
+--------------------
+The CAIF protocol can be divided into two parts: Support functions and Protocol
+Implementation. The support functions include:
+
+      - CFPKT CAIF Packet. Implementation of CAIF Protocol Packet. The
+       CAIF Packet has functions for creating, destroying and adding content
+       and for adding/extracting header and trailers to protocol packets.
+
+      - CFLST CAIF list implementation.
+
+      - CFGLUE CAIF Glue. Contains OS Specifics, such as memory
+       allocation, endianness, etc.
+
+The CAIF Protocol implementation contains:
+
+      - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol
+       Stack and provides a Client interface for adding Link-Layer and
+       Driver interfaces on top of the CAIF Stack.
+
+      - CFCTRL CAIF Control layer. Encodes and Decodes control messages
+       such as enumeration and channel setup. Also matches request and
+       response messages.
+
+      - CFSERVL General CAIF Service Layer functionality; handles flow
+       control and remote shutdown requests.
+
+      - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual
+        External Interface). This layer encodes/decodes VEI frames.
+
+      - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP
+       traffic), encodes/decodes Datagram frames.
+
+      - CFMUX CAIF Mux layer. Handles multiplexing between multiple
+       physical bearers and multiple channels such as VEI, Datagram, etc.
+       The MUX keeps track of the existing CAIF Channels and
+       Physical Instances and selects the apropriate instance based
+       on Channel-Id and Physical-ID.
+
+      - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length
+       and frame checksum.
+
+      - CFSERL CAIF Serial layer. Handles concatenation/split of frames
+       into CAIF Frames with correct length.
+
+
+
+                   +---------+
+                   | Config  |
+                   | CFCNFG  |
+                   +---------+
+                        !
+    +---------+            +---------+     +---------+
+    |  AT    |     | Control |     | Datagram|
+    | CFVEIL  |            | CFCTRL  |     | CFDGML  |
+    +---------+            +---------+     +---------+
+          \_____________!______________/
+                        !
+                   +---------+
+                   |   MUX   |
+                   |         |
+                   +---------+
+                   _____!_____
+                  /           \
+           +---------+     +---------+
+           | CFFRML  |     | CFFRML  |
+           | Framing |     | Framing |
+           +---------+     +---------+
+                !              !
+           +---------+     +---------+
+           |         |     | Serial  |
+           |         |     | CFSERL  |
+           +---------+     +---------+
+
+
+In this layered approach the following "rules" apply.
+      - All layers embed the same structure "struct cflayer"
+      - A layer does not depend on any other layer's private data.
+      - Layers are stacked by setting the pointers
+                 layer->up , layer->dn
+      -        In order to send data upwards, each layer should do
+                layer->up->receive(layer->up, packet);
+      - In order to send data downwards, each layer should do
+                layer->dn->transmit(layer->dn, packet);
+
+
+Linux Driver Implementation
+===========================
+
+Linux GPRS Net Device and CAIF socket are implemented on top of the
+CAIF Core protocol. The Net device and CAIF socket have an instance of
+'struct cflayer', just like the CAIF Core protocol stack.
+Net device and Socket implement the 'receive()' function defined by
+'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and
+receive of packets is handled as by the rest of the layers: the 'dn->transmit()'
+function is called in order to transmit data.
+
+The layer on top of the CAIF Core implementation is
+sometimes referred to as the "Client layer".
+
+
+Configuration of Link Layer
+---------------------------
+The Link Layer is implemented as Linux net devices (struct net_device).
+Payload handling and registration is done using standard Linux mechanisms.
+
+The CAIF Protocol relies on a loss-less link layer without implementing
+retransmission. This implies that packet drops must not happen.
+Therefore a flow-control mechanism is implemented where the physical
+interface can initiate flow stop for all CAIF Channels.
diff --git a/Documentation/networking/caif/README b/Documentation/networking/caif/README
new file mode 100644 (file)
index 0000000..757ccfa
--- /dev/null
@@ -0,0 +1,109 @@
+Copyright (C) ST-Ericsson AB 2010
+Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
+License terms: GNU General Public License (GPL) version 2
+---------------------------------------------------------
+
+=== Start ===
+If you have compiled CAIF for modules do:
+
+$modprobe crc_ccitt
+$modprobe caif
+$modprobe caif_socket
+$modprobe chnl_net
+
+
+=== Preparing the setup with a STE modem ===
+
+If you are working on integration of CAIF you should make sure
+that the kernel is built with module support.
+
+There are some things that need to be tweaked to get the host TTY correctly
+set up to talk to the modem.
+Since the CAIF stack is running in the kernel and we want to use the existing
+TTY, we are installing our physical serial driver as a line discipline above
+the TTY device.
+
+To achieve this we need to install the N_CAIF ldisc from user space.
+The benefit is that we can hook up to any TTY.
+
+The use of Start-of-frame-extension (STX) must also be set as
+module parameter "ser_use_stx".
+
+Normally Frame Checksum is always used on UART, but this is also provided as a
+module parameter "ser_use_fcs".
+
+$ modprobe caif_serial ser_ttyname=/dev/ttyS0 ser_use_stx=yes
+$ ifconfig caif_ttyS0 up
+
+PLEASE NOTE:   There is a limitation in Android shell.
+               It only accepts one argument to insmod/modprobe!
+
+=== Trouble shooting ===
+
+There are debugfs parameters provided for serial communication.
+/sys/kernel/debug/caif_serial/<tty-name>/
+
+* ser_state:   Prints the bit-mask status where
+  - 0x02 means SENDING, this is a transient state.
+  - 0x10 means FLOW_OFF_SENT, i.e. the previous frame has not been sent
+       and is blocking further send operation. Flow OFF has been propagated
+       to all CAIF Channels using this TTY.
+
+* tty_status: Prints the bit-mask tty status information
+  - 0x01 - tty->warned is on.
+  - 0x02 - tty->low_latency is on.
+  - 0x04 - tty->packed is on.
+  - 0x08 - tty->flow_stopped is on.
+  - 0x10 - tty->hw_stopped is on.
+  - 0x20 - tty->stopped is on.
+
+* last_tx_msg: Binary blob Prints the last transmitted frame.
+       This can be printed with
+       $od --format=x1 /sys/kernel/debug/caif_serial/<tty>/last_rx_msg.
+       The first two tx messages sent look like this. Note: The initial
+       byte 02 is start of frame extension (STX) used for re-syncing
+       upon errors.
+
+  - Enumeration:
+        0000000  02 05 00 00 03 01 d2 02
+                 |  |     |  |  |  |
+                 STX(1)   |  |  |  |
+                    Length(2)|  |  |
+                          Control Channel(1)
+                             Command:Enumeration(1)
+                                Link-ID(1)
+                                    Checksum(2)
+  - Channel Setup:
+        0000000  02 07 00 00 00 21 a1 00 48 df
+                 |  |     |  |  |  |  |  |
+                 STX(1)   |  |  |  |  |  |
+                    Length(2)|  |  |  |  |
+                          Control Channel(1)
+                             Command:Channel Setup(1)
+                                Channel Type(1)
+                                    Priority and Link-ID(1)
+                                     Endpoint(1)
+                                         Checksum(2)
+
+* last_rx_msg: Prints the last transmitted frame.
+       The RX messages for LinkSetup look almost identical but they have the
+       bit 0x20 set in the command bit, and Channel Setup has added one byte
+       before Checksum containing Channel ID.
+       NOTE: Several CAIF Messages might be concatenated. The maximum debug
+       buffer size is 128 bytes.
+
+== Error Scenarios:
+- last_tx_msg contains channel setup message and last_rx_msg is empty ->
+  The host seems to be able to send over the UART, at least the CAIF ldisc get
+  notified that sending is completed.
+
+- last_tx_msg contains enumeration message and last_rx_msg is empty ->
+  The host is not able to send the message from UART, the tty has not been
+  able to complete the transmit operation.
+
+- if /sys/kernel/debug/caif_serial/<tty>/tty_status is non-zero there
+  might be problems transmitting over UART.
+  E.g. host and modem wiring is not correct you will typically see
+  tty_status = 0x10 (hw_stopped) and ser_state = 0x10 (FLOW_OFF_SENT).
+  You will probably see the enumeration message in last_tx_message
+  and empty last_rx_message.
index 63214b2..e7bf397 100644 (file)
@@ -1,44 +1,95 @@
-This brief document describes how to use the kernel's PPPoL2TP driver
-to provide L2TP functionality. L2TP is a protocol that tunnels one or
-more PPP sessions over a UDP tunnel. It is commonly used for VPNs
+This document describes how to use the kernel's L2TP drivers to
+provide L2TP functionality. L2TP is a protocol that tunnels one or
+more sessions over an IP tunnel. It is commonly used for VPNs
 (L2TP/IPSec) and by ISPs to tunnel subscriber PPP sessions over an IP
-network infrastructure.
+network infrastructure. With L2TPv3, it is also useful as a Layer-2
+tunneling infrastructure.
+
+Features
+========
+
+L2TPv2 (PPP over L2TP (UDP tunnels)).
+L2TPv3 ethernet pseudowires.
+L2TPv3 PPP pseudowires.
+L2TPv3 IP encapsulation.
+Netlink sockets for L2TPv3 configuration management.
+
+History
+=======
+
+The original pppol2tp driver was introduced in 2.6.23 and provided
+L2TPv2 functionality (rfc2661). L2TPv2 is used to tunnel one or more PPP
+sessions over a UDP tunnel.
+
+L2TPv3 (rfc3931) changes the protocol to allow different frame types
+to be passed over an L2TP tunnel by moving the PPP-specific parts of
+the protocol out of the core L2TP packet headers. Each frame type is
+known as a pseudowire type. Ethernet, PPP, HDLC, Frame Relay and ATM
+pseudowires for L2TP are defined in separate RFC standards. Another
+change for L2TPv3 is that it can be carried directly over IP with no
+UDP header (UDP is optional). It is also possible to create static
+unmanaged L2TPv3 tunnels manually without a control protocol
+(userspace daemon) to manage them.
+
+To support L2TPv3, the original pppol2tp driver was split up to
+separate the L2TP and PPP functionality. Existing L2TPv2 userspace
+apps should be unaffected as the original pppol2tp sockets API is
+retained. L2TPv3, however, uses netlink to manage L2TPv3 tunnels and
+sessions.
 
 Design
 ======
 
-The PPPoL2TP driver, drivers/net/pppol2tp.c, provides a mechanism by
-which PPP frames carried through an L2TP session are passed through
-the kernel's PPP subsystem. The standard PPP daemon, pppd, handles all
-PPP interaction with the peer. PPP network interfaces are created for
-each local PPP endpoint.
-
-The L2TP protocol http://www.faqs.org/rfcs/rfc2661.html defines L2TP
-control and data frames. L2TP control frames carry messages between
-L2TP clients/servers and are used to setup / teardown tunnels and
-sessions. An L2TP client or server is implemented in userspace and
-will use a regular UDP socket per tunnel. L2TP data frames carry PPP
-frames, which may be PPP control or PPP data. The kernel's PPP
+The L2TP protocol separates control and data frames.  The L2TP kernel
+drivers handle only L2TP data frames; control frames are always
+handled by userspace. L2TP control frames carry messages between L2TP
+clients/servers and are used to setup / teardown tunnels and
+sessions. An L2TP client or server is implemented in userspace.
+
+Each L2TP tunnel is implemented using a UDP or L2TPIP socket; L2TPIP
+provides L2TPv3 IP encapsulation (no UDP) and is implemented using a
+new l2tpip socket family. The tunnel socket is typically created by
+userspace, though for unmanaged L2TPv3 tunnels, the socket can also be
+created by the kernel. Each L2TP session (pseudowire) gets a network
+interface instance. In the case of PPP, these interfaces are created
+indirectly by pppd using a pppol2tp socket. In the case of ethernet,
+the netdevice is created upon a netlink request to create an L2TPv3
+ethernet pseudowire.
+
+For PPP, the PPPoL2TP driver, net/l2tp/l2tp_ppp.c, provides a
+mechanism by which PPP frames carried through an L2TP session are
+passed through the kernel's PPP subsystem. The standard PPP daemon,
+pppd, handles all PPP interaction with the peer. PPP network
+interfaces are created for each local PPP endpoint. The kernel's PPP
 subsystem arranges for PPP control frames to be delivered to pppd,
 while data frames are forwarded as usual.
 
+For ethernet, the L2TPETH driver, net/l2tp/l2tp_eth.c, implements a
+netdevice driver, managing virtual ethernet devices, one per
+pseudowire. These interfaces can be managed using standard Linux tools
+such as "ip" and "ifconfig". If only IP frames are passed over the
+tunnel, the interface can be given an IP addresses of itself and its
+peer. If non-IP frames are to be passed over the tunnel, the interface
+can be added to a bridge using brctl. All L2TP datapath protocol
+functions are handled by the L2TP core driver.
+
 Each tunnel and session within a tunnel is assigned a unique tunnel_id
 and session_id. These ids are carried in the L2TP header of every
-control and data packet. The pppol2tp driver uses them to lookup
-internal tunnel and/or session contexts. Zero tunnel / session ids are
-treated specially - zero ids are never assigned to tunnels or sessions
-in the network. In the driver, the tunnel context keeps a pointer to
-the tunnel UDP socket. The session context keeps a pointer to the
-PPPoL2TP socket, as well as other data that lets the driver interface
-to the kernel PPP subsystem.
-
-Note that the pppol2tp kernel driver handles only L2TP data frames;
-L2TP control frames are simply passed up to userspace in the UDP
-tunnel socket. The kernel handles all datapath aspects of the
-protocol, including data packet resequencing (if enabled).
-
-There are a number of requirements on the userspace L2TP daemon in
-order to use the pppol2tp driver.
+control and data packet. (Actually, in L2TPv3, the tunnel_id isn't
+present in data frames - it is inferred from the IP connection on
+which the packet was received.) The L2TP driver uses the ids to lookup
+internal tunnel and/or session contexts to determine how to handle the
+packet. Zero tunnel / session ids are treated specially - zero ids are
+never assigned to tunnels or sessions in the network. In the driver,
+the tunnel context keeps a reference to the tunnel UDP or L2TPIP
+socket. The session context holds data that lets the driver interface
+to the kernel's network frame type subsystems, i.e. PPP, ethernet.
+
+Userspace Programming
+=====================
+
+For L2TPv2, there are a number of requirements on the userspace L2TP
+daemon in order to use the pppol2tp driver.
 
 1. Use a UDP socket per tunnel.
 
@@ -86,6 +137,35 @@ In addition to the standard PPP ioctls, a PPPIOCGL2TPSTATS is provided
 to retrieve tunnel and session statistics from the kernel using the
 PPPoX socket of the appropriate tunnel or session.
 
+For L2TPv3, userspace must use the netlink API defined in
+include/linux/l2tp.h to manage tunnel and session contexts. The
+general procedure to create a new L2TP tunnel with one session is:-
+
+1. Open a GENL socket using L2TP_GENL_NAME for configuring the kernel
+   using netlink.
+
+2. Create a UDP or L2TPIP socket for the tunnel.
+
+3. Create a new L2TP tunnel using a L2TP_CMD_TUNNEL_CREATE
+   request. Set attributes according to desired tunnel parameters,
+   referencing the UDP or L2TPIP socket created in the previous step.
+
+4. Create a new L2TP session in the tunnel using a
+   L2TP_CMD_SESSION_CREATE request.
+
+The tunnel and all of its sessions are closed when the tunnel socket
+is closed. The netlink API may also be used to delete sessions and
+tunnels. Configuration and status info may be set or read using netlink.
+
+The L2TP driver also supports static (unmanaged) L2TPv3 tunnels. These
+are where there is no L2TP control message exchange with the peer to
+setup the tunnel; the tunnel is configured manually at each end of the
+tunnel. There is no need for an L2TP userspace application in this
+case -- the tunnel socket is created by the kernel and configured
+using parameters sent in the L2TP_CMD_TUNNEL_CREATE netlink
+request. The "ip" utility of iproute2 has commands for managing static
+L2TPv3 tunnels; do "ip l2tp help" for more information.
+
 Debugging
 =========
 
@@ -102,6 +182,69 @@ PPPOL2TP_MSG_CONTROL  userspace - kernel interface
 PPPOL2TP_MSG_SEQ      sequence numbers handling
 PPPOL2TP_MSG_DATA     data packets
 
+If enabled, files under a l2tp debugfs directory can be used to dump
+kernel state about L2TP tunnels and sessions. To access it, the
+debugfs filesystem must first be mounted.
+
+# mount -t debugfs debugfs /debug
+
+Files under the l2tp directory can then be accessed.
+
+# cat /debug/l2tp/tunnels
+
+The debugfs files should not be used by applications to obtain L2TP
+state information because the file format is subject to change. It is
+implemented to provide extra debug information to help diagnose
+problems.) Users should use the netlink API.
+
+/proc/net/pppol2tp is also provided for backwards compaibility with
+the original pppol2tp driver. It lists information about L2TPv2
+tunnels and sessions only. Its use is discouraged.
+
+Unmanaged L2TPv3 Tunnels
+========================
+
+Some commercial L2TP products support unmanaged L2TPv3 ethernet
+tunnels, where there is no L2TP control protocol; tunnels are
+configured at each side manually. New commands are available in
+iproute2's ip utility to support this.
+
+To create an L2TPv3 ethernet pseudowire between local host 192.168.1.1
+and peer 192.168.1.2, using IP addresses 10.5.1.1 and 10.5.1.2 for the
+tunnel endpoints:-
+
+# modprobe l2tp_eth
+# modprobe l2tp_netlink
+
+# ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5000 \
+  udp_dport 5000 encap udp local 192.168.1.1 remote 192.168.1.2
+# ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1
+# ifconfig -a
+# ip addr add 10.5.1.2/32 peer 10.5.1.1/32 dev l2tpeth0
+# ifconfig l2tpeth0 up
+
+Choose IP addresses to be the address of a local IP interface and that
+of the remote system. The IP addresses of the l2tpeth0 interface can be
+anything suitable.
+
+Repeat the above at the peer, with ports, tunnel/session ids and IP
+addresses reversed.  The tunnel and session IDs can be any non-zero
+32-bit number, but the values must be reversed at the peer.
+
+Host 1                         Host2
+udp_sport=5000                 udp_sport=5001
+udp_dport=5001                 udp_dport=5000
+tunnel_id=42                   tunnel_id=45
+peer_tunnel_id=45              peer_tunnel_id=42
+session_id=128                 session_id=5196755
+peer_session_id=5196755        peer_session_id=128
+
+When done at both ends of the tunnel, it should be possible to send
+data over the network. e.g.
+
+# ping 10.5.1.1
+
+
 Sample Userspace Code
 =====================
 
@@ -158,12 +301,48 @@ Sample Userspace Code
         }
         return 0;
 
+Internal Implementation
+=======================
+
+The driver keeps a struct l2tp_tunnel context per L2TP tunnel and a
+struct l2tp_session context for each session. The l2tp_tunnel is
+always associated with a UDP or L2TP/IP socket and keeps a list of
+sessions in the tunnel. The l2tp_session context keeps kernel state
+about the session. It has private data which is used for data specific
+to the session type. With L2TPv2, the session always carried PPP
+traffic. With L2TPv3, the session can also carry ethernet frames
+(ethernet pseudowire) or other data types such as ATM, HDLC or Frame
+Relay.
+
+When a tunnel is first opened, the reference count on the socket is
+increased using sock_hold(). This ensures that the kernel socket
+cannot be removed while L2TP's data structures reference it.
+
+Some L2TP sessions also have a socket (PPP pseudowires) while others
+do not (ethernet pseudowires). We can't use the socket reference count
+as the reference count for session contexts. The L2TP implementation
+therefore has its own internal reference counts on the session
+contexts.
+
+To Do
+=====
+
+Add L2TP tunnel switching support. This would route tunneled traffic
+from one L2TP tunnel into another. Specified in
+http://tools.ietf.org/html/draft-ietf-l2tpext-tunnel-switching-08
+
+Add L2TPv3 VLAN pseudowire support.
+
+Add L2TPv3 IP pseudowire support.
+
+Add L2TPv3 ATM pseudowire support.
+
 Miscellaneous
-============
+=============
 
-The PPPoL2TP driver was developed as part of the OpenL2TP project by
+The L2TP drivers were developed as part of the OpenL2TP project by
 Katalix Systems Ltd. OpenL2TP is a full-featured L2TP client / server,
 designed from the ground up to have the L2TP datapath in the
 kernel. The project also implemented the pppol2tp plugin for pppd
 which allows pppd to use the kernel driver. Details can be found at
-http://openl2tp.sourceforge.net.
+http://www.openl2tp.org.
index b486050..83668e5 100644 (file)
@@ -99,37 +99,15 @@ system. Also, it is possible to switch all rfkill drivers (or all drivers of
 a specified type) into a state which also updates the default state for
 hotplugged devices.
 
-After an application opens /dev/rfkill, it can read the current state of
-all devices, and afterwards can poll the descriptor for hotplug or state
-change events.
-
-Applications must ignore operations (the "op" field) they do not handle,
-this allows the API to be extended in the future.
-
-Additionally, each rfkill device is registered in sysfs and there has the
-following attributes:
-
-       name: Name assigned by driver to this key (interface or driver name).
-       type: Driver type string ("wlan", "bluetooth", etc).
-       persistent: Whether the soft blocked state is initialised from
-                   non-volatile storage at startup.
-       state: Current state of the transmitter
-               0: RFKILL_STATE_SOFT_BLOCKED
-                       transmitter is turned off by software
-               1: RFKILL_STATE_UNBLOCKED
-                       transmitter is (potentially) active
-               2: RFKILL_STATE_HARD_BLOCKED
-                       transmitter is forced off by something outside of
-                       the driver's control.
-              This file is deprecated because it can only properly show
-              three of the four possible states, soft-and-hard-blocked is
-              missing.
-       claim: 0: Kernel handles events
-              This file is deprecated because there no longer is a way to
-              claim just control over a single rfkill instance.
-
-rfkill devices also issue uevents (with an action of "change"), with the
-following environment variables set:
+After an application opens /dev/rfkill, it can read the current state of all
+devices. Changes can be either obtained by either polling the descriptor for
+hotplug or state change events or by listening for uevents emitted by the
+rfkill core framework.
+
+Additionally, each rfkill device is registered in sysfs and emits uevents.
+
+rfkill devices issue uevents (with an action of "change"), with the following
+environment variables set:
 
 RFKILL_NAME
 RFKILL_STATE
@@ -137,3 +115,7 @@ RFKILL_TYPE
 
 The contents of these variables corresponds to the "name", "state" and
 "type" sysfs files explained above.
+
+
+For further details consult Documentation/ABI/stable/dev-rfkill and
+Documentation/ABI/stable/sysfs-class-rfkill.
index 7a9ccda..a7ff13e 100644 (file)
@@ -1491,9 +1491,10 @@ M:       Andy Whitcroft <apw@canonical.com>
 S:     Supported
 F:     scripts/checkpatch.pl
 
-CISCO 10G ETHERNET DRIVER
+CISCO VIC ETHERNET NIC DRIVER
 M:     Scott Feldman <scofeldm@cisco.com>
-M:     Joe Eykholt <jeykholt@cisco.com>
+M:     Vasanthy Kolluri <vkolluri@cisco.com>
+M:     Roopa Prabhu <roprabhu@cisco.com>
 S:     Supported
 F:     drivers/net/enic/
 
@@ -2992,10 +2993,9 @@ F:       net/ipv4/netfilter/ipt_MASQUERADE.c
 IP1000A 10/100/1000 GIGABIT ETHERNET DRIVER
 M:     Francois Romieu <romieu@fr.zoreil.com>
 M:     Sorbica Shieh <sorbica@icplus.com.tw>
-M:     Jesse Huang <jesse@icplus.com.tw>
 L:     netdev@vger.kernel.org
 S:     Maintained
-F:     drivers/net/ipg.c
+F:     drivers/net/ipg.*
 
 IPATH DRIVER
 M:     Ralph Campbell <infinipath@qlogic.com>
@@ -3842,7 +3842,6 @@ M:        Ramkrishna Vepa <ram.vepa@neterion.com>
 M:     Rastapur Santosh <santosh.rastapur@neterion.com>
 M:     Sivakumar Subramani <sivakumar.subramani@neterion.com>
 M:     Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
-M:     Anil Murthy <anil.murthy@neterion.com>
 L:     netdev@vger.kernel.org
 W:     http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous
 W:     http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
index 771137f..5ccb0ce 100644 (file)
@@ -73,7 +73,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info4 = {
 
 static struct mcp251x_platform_data mcp251x_info = {
        .oscillator_frequency = 16E6,
-       .model                = CAN_MCP251X_MCP2515,
        .board_specific_setup = NULL,
        .power_enable         = NULL,
        .transceiver_enable   = NULL
@@ -81,7 +80,7 @@ static struct mcp251x_platform_data mcp251x_info = {
 
 static struct spi_board_info mcp251x_board_info[] = {
        {
-               .modalias        = "mcp251x",
+               .modalias        = "mcp2515",
                .max_speed_hz    = 6500000,
                .bus_num         = 3,
                .chip_select     = 0,
@@ -90,7 +89,7 @@ static struct spi_board_info mcp251x_board_info[] = {
                .irq             = gpio_to_irq(ICONTROL_MCP251x_nIRQ1)
        },
        {
-               .modalias        = "mcp251x",
+               .modalias        = "mcp2515",
                .max_speed_hz    = 6500000,
                .bus_num         = 3,
                .chip_select     = 1,
@@ -99,7 +98,7 @@ static struct spi_board_info mcp251x_board_info[] = {
                .irq             = gpio_to_irq(ICONTROL_MCP251x_nIRQ2)
        },
        {
-               .modalias        = "mcp251x",
+               .modalias        = "mcp2515",
                .max_speed_hz    = 6500000,
                .bus_num         = 4,
                .chip_select     = 0,
@@ -108,7 +107,7 @@ static struct spi_board_info mcp251x_board_info[] = {
                .irq             = gpio_to_irq(ICONTROL_MCP251x_nIRQ3)
        },
        {
-               .modalias        = "mcp251x",
+               .modalias        = "mcp2515",
                .max_speed_hz    = 6500000,
                .bus_num         = 4,
                .chip_select     = 1,
index 39896d8..dbd2569 100644 (file)
@@ -414,15 +414,13 @@ static int zeus_mcp2515_transceiver_enable(int enable)
 
 static struct mcp251x_platform_data zeus_mcp2515_pdata = {
        .oscillator_frequency   = 16*1000*1000,
-       .model                  = CAN_MCP251X_MCP2515,
        .board_specific_setup   = zeus_mcp2515_setup,
-       .transceiver_enable     = zeus_mcp2515_transceiver_enable,
        .power_enable           = zeus_mcp2515_transceiver_enable,
 };
 
 static struct spi_board_info zeus_spi_board_info[] = {
        [0] = {
-               .modalias       = "mcp251x",
+               .modalias       = "mcp2515",
                .platform_data  = &zeus_mcp2515_pdata,
                .irq            = gpio_to_irq(ZEUS_CAN_GPIO),
                .max_speed_hz   = 1*1000*1000,
index 59efb3f..48c4f03 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/registers.h>
 #include <asm/setup.h>
 #include <asm/irqflags.h>
+#include <asm/cache.h>
 
 #include <asm-generic/cmpxchg.h>
 #include <asm-generic/cmpxchg-local.h>
@@ -96,4 +97,14 @@ extern struct dentry *of_debugfs_root;
 
 #define arch_align_stack(x) (x)
 
+/*
+ * MicroBlaze doesn't handle unaligned accesses in hardware.
+ *
+ * Based on this we force the IP header alignment in network drivers.
+ * We also modify NET_SKB_PAD to be a cacheline in size, thus maintaining
+ * cacheline alignment of buffers.
+ */
+#define NET_IP_ALIGN   2
+#define NET_SKB_PAD    L1_CACHE_BYTES
+
 #endif /* _ASM_MICROBLAZE_SYSTEM_H */
index b7c813f..65369d3 100644 (file)
@@ -877,7 +877,7 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
        if (!mc_all_on) {
                char *addrs;
                int i;
-               struct dev_mc_list *mcaddr;
+               struct netdev_hw_addr *ha;
 
                addrs = kmalloc(ETH_ALEN * mc_count, GFP_ATOMIC);
                if (!addrs) {
@@ -885,9 +885,8 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
                        goto unlock;
                }
                i = 0;
-               netdev_for_each_mc_addr(mcaddr, netdev)
-                       memcpy(get_addr(addrs, i++),
-                              mcaddr->dmi_addr, ETH_ALEN);
+               netdev_for_each_mc_addr(ha, netdev)
+                       memcpy(get_addr(addrs, i++), ha->addr, ETH_ALEN);
 
                perfect_filter_register_address = NES_IDX_PERFECT_FILTER_LOW +
                                                pft_entries_preallocated * 0x8;
index b166bb7..3871ac6 100644 (file)
@@ -768,11 +768,8 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
        }
 }
 
-static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen,
-                                    const u8 *broadcast)
+static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast)
 {
-       if (addrlen != INFINIBAND_ALEN)
-               return 0;
        /* reserved QPN, prefix, scope */
        if (memcmp(addr, broadcast, 6))
                return 0;
@@ -787,7 +784,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
        struct ipoib_dev_priv *priv =
                container_of(work, struct ipoib_dev_priv, restart_task);
        struct net_device *dev = priv->dev;
-       struct dev_mc_list *mclist;
+       struct netdev_hw_addr *ha;
        struct ipoib_mcast *mcast, *tmcast;
        LIST_HEAD(remove_list);
        unsigned long flags;
@@ -812,15 +809,13 @@ void ipoib_mcast_restart_task(struct work_struct *work)
                clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);
 
        /* Mark all of the entries that are found or don't exist */
-       netdev_for_each_mc_addr(mclist, dev) {
+       netdev_for_each_mc_addr(ha, dev) {
                union ib_gid mgid;
 
-               if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr,
-                                              mclist->dmi_addrlen,
-                                              dev->broadcast))
+               if (!ipoib_mcast_addr_is_valid(ha->addr, dev->broadcast))
                        continue;
 
-               memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid);
+               memcpy(mgid.raw, ha->addr + 4, sizeof mgid);
 
                mcast = __ipoib_mcast_find(dev, &mgid);
                if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
index 441c064..cccea41 100644 (file)
@@ -1109,14 +1109,14 @@ static int dvb_net_feed_stop(struct net_device *dev)
 }
 
 
-static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc)
+static int dvb_set_mc_filter(struct net_device *dev, unsigned char *addr)
 {
        struct dvb_net_priv *priv = netdev_priv(dev);
 
        if (priv->multi_num == DVB_NET_MULTICAST_MAX)
                return -ENOMEM;
 
-       memcpy(priv->multi_macs[priv->multi_num], mc->dmi_addr, 6);
+       memcpy(priv->multi_macs[priv->multi_num], addr, ETH_ALEN);
 
        priv->multi_num++;
        return 0;
@@ -1140,8 +1140,7 @@ static void wq_set_multicast_list (struct work_struct *work)
                dprintk("%s: allmulti mode\n", dev->name);
                priv->rx_mode = RX_MODE_ALL_MULTI;
        } else if (!netdev_mc_empty(dev)) {
-               int mci;
-               struct dev_mc_list *mc;
+               struct netdev_hw_addr *ha;
 
                dprintk("%s: set_mc_list, %d entries\n",
                        dev->name, netdev_mc_count(dev));
@@ -1149,11 +1148,8 @@ static void wq_set_multicast_list (struct work_struct *work)
                priv->rx_mode = RX_MODE_MULTI;
                priv->multi_num = 0;
 
-               for (mci = 0, mc=dev->mc_list;
-                    mci < netdev_mc_count(dev);
-                    mc = mc->next, mci++) {
-                       dvb_set_mc_filter(dev, mc);
-               }
+               netdev_for_each_mc_addr(ha, dev)
+                       dvb_set_mc_filter(dev, ha->addr);
        }
 
        netif_addr_unlock_bh(dev);
index 66e0323..b74a0ea 100644 (file)
@@ -380,6 +380,12 @@ out:
     return retval;
 }
 
+static irqreturn_t el2_probe_interrupt(int irq, void *seen)
+{
+       *(bool *)seen = true;
+       return IRQ_HANDLED;
+}
+
 static int
 el2_open(struct net_device *dev)
 {
@@ -391,23 +397,35 @@ el2_open(struct net_device *dev)
 
        outb(EGACFR_NORM, E33G_GACFR);  /* Enable RAM and interrupts. */
        do {
-           retval = request_irq(*irqp, NULL, 0, "bogus", dev);
-           if (retval >= 0) {
+               bool seen;
+
+               retval = request_irq(*irqp, el2_probe_interrupt, 0,
+                                    dev->name, &seen);
+               if (retval == -EBUSY)
+                       continue;
+               if (retval < 0)
+                       goto err_disable;
+
                /* Twinkle the interrupt, and check if it's seen. */
-               unsigned long cookie = probe_irq_on();
+               seen = false;
+               smp_wmb();
                outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR);
                outb_p(0x00, E33G_IDCFR);
-               if (*irqp == probe_irq_off(cookie) &&   /* It's a good IRQ line! */
-                   ((retval = request_irq(dev->irq = *irqp,
-                                          eip_interrupt, 0,
-                                          dev->name, dev)) == 0))
-                   break;
-           } else {
-                   if (retval != -EBUSY)
-                           return retval;
-           }
+               msleep(1);
+               free_irq(*irqp, el2_probe_interrupt);
+               if (!seen)
+                       continue;
+
+               retval = request_irq(dev->irq = *irqp, eip_interrupt, 0,
+                                    dev->name, dev);
+               if (retval == -EBUSY)
+                       continue;
+               if (retval < 0)
+                       goto err_disable;
        } while (*++irqp);
+
        if (*irqp == 0) {
+       err_disable:
            outb(EGACFR_IRQOFF, E33G_GACFR);    /* disable interrupts. */
            return -EAGAIN;
        }
index 29b8d1d..8d584f5 100644 (file)
@@ -1216,7 +1216,7 @@ static int elp_close(struct net_device *dev)
 static void elp_set_mc_list(struct net_device *dev)
 {
        elp_device *adapter = netdev_priv(dev);
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
        int i;
        unsigned long flags;
 
@@ -1231,8 +1231,9 @@ static void elp_set_mc_list(struct net_device *dev)
                adapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST;
                adapter->tx_pcb.length = 6 * netdev_mc_count(dev);
                i = 0;
-               netdev_for_each_mc_addr(dmi, dev)
-                       memcpy(adapter->tx_pcb.data.multicast[i++], dmi->dmi_addr, 6);
+               netdev_for_each_mc_addr(ha, dev)
+                       memcpy(adapter->tx_pcb.data.multicast[i++],
+                              ha->addr, 6);
                adapter->got[CMD_LOAD_MULTICAST_LIST] = 0;
                if (!send_pcb(dev, &adapter->tx_pcb))
                        pr_err("%s: couldn't send set_multicast command\n", dev->name);
index 1719079..8c70686 100644 (file)
@@ -624,7 +624,7 @@ static int init586(struct net_device *dev)
        volatile struct iasetup_cmd_struct *ias_cmd;
        volatile struct tdr_cmd_struct *tdr_cmd;
        volatile struct mcsetup_cmd_struct *mc_cmd;
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
        int num_addrs = netdev_mc_count(dev);
 
        ptr = (void *) ((char *) p->scb + sizeof(struct scb_struct));
@@ -787,8 +787,9 @@ static int init586(struct net_device *dev)
                        mc_cmd->cmd_link = 0xffff;
                        mc_cmd->mc_cnt = num_addrs * 6;
                        i = 0;
-                       netdev_for_each_mc_addr(dmi, dev)
-                               memcpy((char *) mc_cmd->mc_list[i++], dmi->dmi_addr, 6);
+                       netdev_for_each_mc_addr(ha, dev)
+                               memcpy((char *) mc_cmd->mc_list[i++],
+                                      ha->addr, 6);
                        p->scb->cbl_offset = make16(mc_cmd);
                        p->scb->cmd = CUC_START;
                        elmc_id_attn586();
index 5c07b14..38395df 100644 (file)
@@ -1533,7 +1533,7 @@ static void do_mc32_set_multicast_list(struct net_device *dev, int retry)
        {
                unsigned char block[62];
                unsigned char *bp;
-               struct dev_mc_list *dmc;
+               struct netdev_hw_addr *ha;
 
                if(retry==0)
                        lp->mc_list_valid = 0;
@@ -1543,8 +1543,8 @@ static void do_mc32_set_multicast_list(struct net_device *dev, int retry)
                        block[0]=netdev_mc_count(dev);
                        bp=block+2;
 
-                       netdev_for_each_mc_addr(dmc, dev) {
-                               memcpy(bp, dmc->dmi_addr, 6);
+                       netdev_for_each_mc_addr(ha, dev) {
+                               memcpy(bp, ha->addr, 6);
                                bp+=6;
                        }
                        if(mc32_command_nowait(dev, 2, block,
index 500e135..f09e594 100644 (file)
@@ -594,7 +594,7 @@ static void lance_load_multicast (struct net_device *dev)
         struct lance_private *lp = netdev_priv(dev);
         volatile struct lance_init_block *ib = lp->init_block;
         volatile u16 *mcast_table = (u16 *)&ib->filter;
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
         char *addrs;
         u32 crc;
 
@@ -609,8 +609,8 @@ static void lance_load_multicast (struct net_device *dev)
         ib->filter [1] = 0;
 
         /* Add addresses */
-       netdev_for_each_mc_addr(dmi, dev) {
-                addrs = dmi->dmi_addr;
+       netdev_for_each_mc_addr(ha, dev) {
+               addrs = ha->addr;
 
                 /* multicast address? */
                 if (!(*addrs & 1))
index a09e6ce..4e8d11c 100644 (file)
@@ -910,11 +910,11 @@ static void __cp_set_rx_mode (struct net_device *dev)
                rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
                mc_filter[1] = mc_filter[0] = 0xffffffff;
        } else {
-               struct dev_mc_list *mclist;
+               struct netdev_hw_addr *ha;
                rx_mode = AcceptBroadcast | AcceptMyPhys;
                mc_filter[1] = mc_filter[0] = 0;
-               netdev_for_each_mc_addr(mclist, dev) {
-                       int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
+               netdev_for_each_mc_addr(ha, dev) {
+                       int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
 
                        mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
                        rx_mode |= AcceptMulticast;
index a03d291..d149624 100644 (file)
@@ -2503,11 +2503,11 @@ static void __set_rx_mode (struct net_device *dev)
                rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
                mc_filter[1] = mc_filter[0] = 0xffffffff;
        } else {
-               struct dev_mc_list *mclist;
+               struct netdev_hw_addr *ha;
                rx_mode = AcceptBroadcast | AcceptMyPhys;
                mc_filter[1] = mc_filter[0] = 0;
-               netdev_for_each_mc_addr(mclist, dev) {
-                       int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
+               netdev_for_each_mc_addr(ha, dev) {
+                       int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
 
                        mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
                        rx_mode |= AcceptMulticast;
index 56e68db..97c5fc0 100644 (file)
@@ -1542,7 +1542,7 @@ static void set_multicast_list(struct net_device *dev)
        }
 
        if (!netdev_mc_empty(dev)) {
-               struct dev_mc_list *dmi;
+               struct netdev_hw_addr *ha;
                unsigned char *cp;
                struct mc_cmd *cmd;
 
@@ -1552,10 +1552,10 @@ static void set_multicast_list(struct net_device *dev)
                cmd->cmd.command = CmdMulticastList;
                cmd->mc_cnt = cnt * ETH_ALEN;
                cp = cmd->mc_addrs;
-               netdev_for_each_mc_addr(dmi, dev) {
+               netdev_for_each_mc_addr(ha, dev) {
                        if (!cnt--)
                                break;
-                       memcpy(cp, dmi->dmi_addr, ETH_ALEN);
+                       memcpy(cp, ha->addr, ETH_ALEN);
                        if (i596_debug > 1)
                                DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n",
                                                dev->name, cp));
index 7b832c7..dbd26f9 100644 (file)
@@ -483,7 +483,7 @@ config XTENSA_XT2000_SONIC
          This is the driver for the onboard card of the Xtensa XT2000 board.
 
 config MIPS_AU1X00_ENET
-       bool "MIPS AU1000 Ethernet support"
+       tristate "MIPS AU1000 Ethernet support"
        depends on SOC_AU1X00
        select PHYLIB
        select CRC32
@@ -1916,6 +1916,7 @@ config FEC
        bool "FEC ethernet controller (of ColdFire and some i.MX CPUs)"
        depends on M523x || M527x || M5272 || M528x || M520x || M532x || \
                MACH_MX27 || ARCH_MX35 || ARCH_MX25 || ARCH_MX5
+       select PHYLIB
        help
          Say Y here if you want to use the built-in 10/100 Fast ethernet
          controller on some Motorola ColdFire and Freescale i.MX processors.
@@ -2434,8 +2435,8 @@ config MV643XX_ETH
 
 config XILINX_LL_TEMAC
        tristate "Xilinx LL TEMAC (LocalLink Tri-mode Ethernet MAC) driver"
+       depends on PPC || MICROBLAZE
        select PHYLIB
-       depends on PPC_DCR_NATIVE
        help
          This driver supports the Xilinx 10/100/1000 LocalLink TEMAC
          core used in Xilinx Spartan and Virtex FPGAs
@@ -2618,11 +2619,11 @@ config EHEA
          will be called ehea.
 
 config ENIC
-       tristate "Cisco 10G Ethernet NIC support"
+       tristate "Cisco VIC Ethernet NIC Support"
        depends on PCI && INET
        select INET_LRO
        help
-         This enables the support for the Cisco 10G Ethernet card.
+         This enables the support for the Cisco VIC Ethernet card.
 
 config IXGBE
        tristate "Intel(R) 10GbE PCI Express adapters support"
@@ -2862,6 +2863,8 @@ source "drivers/ieee802154/Kconfig"
 
 source "drivers/s390/net/Kconfig"
 
+source "drivers/net/caif/Kconfig"
+
 config XEN_NETDEV_FRONTEND
        tristate "Xen network device frontend driver"
        depends on XEN
@@ -3180,17 +3183,12 @@ config PPPOATM
 
 config PPPOL2TP
        tristate "PPP over L2TP (EXPERIMENTAL)"
-       depends on EXPERIMENTAL && PPP && INET
+       depends on EXPERIMENTAL && L2TP && PPP
        help
          Support for PPP-over-L2TP socket family. L2TP is a protocol
          used by ISPs and enterprises to tunnel PPP traffic over UDP
          tunnels. L2TP is replacing PPTP for VPN uses.
 
-         This kernel component handles only L2TP data packets: a
-         userland daemon handles L2TP the control protocol (tunnel
-         and session setup). One such daemon is OpenL2TP
-         (http://openl2tp.sourceforge.net/).
-
 config SLIP
        tristate "SLIP (serial line) support"
        ---help---
@@ -3277,15 +3275,14 @@ config NET_FC
          "SCSI generic support".
 
 config NETCONSOLE
-       tristate "Network console logging support (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       tristate "Network console logging support"
        ---help---
        If you want to log kernel messages over the network, enable this.
        See <file:Documentation/networking/netconsole.txt> for details.
 
 config NETCONSOLE_DYNAMIC
-       bool "Dynamic reconfiguration of logging targets (EXPERIMENTAL)"
-       depends on NETCONSOLE && SYSFS && EXPERIMENTAL
+       bool "Dynamic reconfiguration of logging targets"
+       depends on NETCONSOLE && SYSFS
        select CONFIGFS_FS
        help
          This option enables the ability to dynamically reconfigure target
index a583b50..ebf80b9 100644 (file)
@@ -161,7 +161,7 @@ obj-$(CONFIG_PPP_DEFLATE) += ppp_deflate.o
 obj-$(CONFIG_PPP_BSDCOMP) += bsd_comp.o
 obj-$(CONFIG_PPP_MPPE) += ppp_mppe.o
 obj-$(CONFIG_PPPOE) += pppox.o pppoe.o
-obj-$(CONFIG_PPPOL2TP) += pppox.o pppol2tp.o
+obj-$(CONFIG_PPPOL2TP) += pppox.o
 
 obj-$(CONFIG_SLIP) += slip.o
 obj-$(CONFIG_SLHC) += slhc.o
@@ -291,5 +291,6 @@ obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
 obj-$(CONFIG_SFC) += sfc/
 
 obj-$(CONFIG_WIMAX) += wimax/
+obj-$(CONFIG_CAIF) += caif/
 
 obj-$(CONFIG_OCTEON_MGMT_ETHERNET) += octeon/
index ed5e974..ce0a0b8 100644 (file)
@@ -602,7 +602,7 @@ static void lance_load_multicast (struct net_device *dev)
        struct lance_private *lp = netdev_priv(dev);
        volatile struct lance_init_block *ib = lp->init_block;
        volatile u16 *mcast_table = (u16 *)&ib->filter;
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
        char *addrs;
        u32 crc;
 
@@ -617,8 +617,8 @@ static void lance_load_multicast (struct net_device *dev)
        ib->filter [1] = 0;
 
        /* Add addresses */
-       netdev_for_each_mc_addr(dmi, dev) {
-               addrs = dmi->dmi_addr;
+       netdev_for_each_mc_addr(ha, dev) {
+               addrs = ha->addr;
 
                /* multicast address? */
                if (!(*addrs & 1))
index 97a3dfd..1328eb9 100644 (file)
@@ -661,7 +661,7 @@ static void __devexit acenic_remove_one(struct pci_dev *pdev)
                        dma_addr_t mapping;
 
                        ringp = &ap->skb->rx_std_skbuff[i];
-                       mapping = pci_unmap_addr(ringp, mapping);
+                       mapping = dma_unmap_addr(ringp, mapping);
                        pci_unmap_page(ap->pdev, mapping,
                                       ACE_STD_BUFSIZE,
                                       PCI_DMA_FROMDEVICE);
@@ -681,7 +681,7 @@ static void __devexit acenic_remove_one(struct pci_dev *pdev)
                                dma_addr_t mapping;
 
                                ringp = &ap->skb->rx_mini_skbuff[i];
-                               mapping = pci_unmap_addr(ringp,mapping);
+                               mapping = dma_unmap_addr(ringp,mapping);
                                pci_unmap_page(ap->pdev, mapping,
                                               ACE_MINI_BUFSIZE,
                                               PCI_DMA_FROMDEVICE);
@@ -700,7 +700,7 @@ static void __devexit acenic_remove_one(struct pci_dev *pdev)
                        dma_addr_t mapping;
 
                        ringp = &ap->skb->rx_jumbo_skbuff[i];
-                       mapping = pci_unmap_addr(ringp, mapping);
+                       mapping = dma_unmap_addr(ringp, mapping);
                        pci_unmap_page(ap->pdev, mapping,
                                       ACE_JUMBO_BUFSIZE,
                                       PCI_DMA_FROMDEVICE);
@@ -1683,7 +1683,7 @@ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
                                       ACE_STD_BUFSIZE,
                                       PCI_DMA_FROMDEVICE);
                ap->skb->rx_std_skbuff[idx].skb = skb;
-               pci_unmap_addr_set(&ap->skb->rx_std_skbuff[idx],
+               dma_unmap_addr_set(&ap->skb->rx_std_skbuff[idx],
                                   mapping, mapping);
 
                rd = &ap->rx_std_ring[idx];
@@ -1744,7 +1744,7 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs)
                                       ACE_MINI_BUFSIZE,
                                       PCI_DMA_FROMDEVICE);
                ap->skb->rx_mini_skbuff[idx].skb = skb;
-               pci_unmap_addr_set(&ap->skb->rx_mini_skbuff[idx],
+               dma_unmap_addr_set(&ap->skb->rx_mini_skbuff[idx],
                                   mapping, mapping);
 
                rd = &ap->rx_mini_ring[idx];
@@ -1800,7 +1800,7 @@ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs)
                                       ACE_JUMBO_BUFSIZE,
                                       PCI_DMA_FROMDEVICE);
                ap->skb->rx_jumbo_skbuff[idx].skb = skb;
-               pci_unmap_addr_set(&ap->skb->rx_jumbo_skbuff[idx],
+               dma_unmap_addr_set(&ap->skb->rx_jumbo_skbuff[idx],
                                   mapping, mapping);
 
                rd = &ap->rx_jumbo_ring[idx];
@@ -2013,7 +2013,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
                skb = rip->skb;
                rip->skb = NULL;
                pci_unmap_page(ap->pdev,
-                              pci_unmap_addr(rip, mapping),
+                              dma_unmap_addr(rip, mapping),
                               mapsize,
                               PCI_DMA_FROMDEVICE);
                skb_put(skb, retdesc->size);
@@ -2078,18 +2078,16 @@ static inline void ace_tx_int(struct net_device *dev,
 
        do {
                struct sk_buff *skb;
-               dma_addr_t mapping;
                struct tx_ring_info *info;
 
                info = ap->skb->tx_skbuff + idx;
                skb = info->skb;
-               mapping = pci_unmap_addr(info, mapping);
 
-               if (mapping) {
-                       pci_unmap_page(ap->pdev, mapping,
-                                      pci_unmap_len(info, maplen),
+               if (dma_unmap_len(info, maplen)) {
+                       pci_unmap_page(ap->pdev, dma_unmap_addr(info, mapping),
+                                      dma_unmap_len(info, maplen),
                                       PCI_DMA_TODEVICE);
-                       pci_unmap_addr_set(info, mapping, 0);
+                       dma_unmap_len_set(info, maplen, 0);
                }
 
                if (skb) {
@@ -2377,14 +2375,12 @@ static int ace_close(struct net_device *dev)
 
        for (i = 0; i < ACE_TX_RING_ENTRIES(ap); i++) {
                struct sk_buff *skb;
-               dma_addr_t mapping;
                struct tx_ring_info *info;
 
                info = ap->skb->tx_skbuff + i;
                skb = info->skb;
-               mapping = pci_unmap_addr(info, mapping);
 
-               if (mapping) {
+               if (dma_unmap_len(info, maplen)) {
                        if (ACE_IS_TIGON_I(ap)) {
                                /* NB: TIGON_1 is special, tx_ring is in io space */
                                struct tx_desc __iomem *tx;
@@ -2395,10 +2391,10 @@ static int ace_close(struct net_device *dev)
                        } else
                                memset(ap->tx_ring + i, 0,
                                       sizeof(struct tx_desc));
-                       pci_unmap_page(ap->pdev, mapping,
-                                      pci_unmap_len(info, maplen),
+                       pci_unmap_page(ap->pdev, dma_unmap_addr(info, mapping),
+                                      dma_unmap_len(info, maplen),
                                       PCI_DMA_TODEVICE);
-                       pci_unmap_addr_set(info, mapping, 0);
+                       dma_unmap_len_set(info, maplen, 0);
                }
                if (skb) {
                        dev_kfree_skb(skb);
@@ -2433,8 +2429,8 @@ ace_map_tx_skb(struct ace_private *ap, struct sk_buff *skb,
 
        info = ap->skb->tx_skbuff + idx;
        info->skb = tail;
-       pci_unmap_addr_set(info, mapping, mapping);
-       pci_unmap_len_set(info, maplen, skb->len);
+       dma_unmap_addr_set(info, mapping, mapping);
+       dma_unmap_len_set(info, maplen, skb->len);
        return mapping;
 }
 
@@ -2553,8 +2549,8 @@ restart:
                        } else {
                                info->skb = NULL;
                        }
-                       pci_unmap_addr_set(info, mapping, mapping);
-                       pci_unmap_len_set(info, maplen, frag->size);
+                       dma_unmap_addr_set(info, mapping, mapping);
+                       dma_unmap_len_set(info, maplen, frag->size);
                        ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag);
                }
        }
index 17079b9..0681da7 100644 (file)
@@ -589,7 +589,7 @@ struct ace_info {
 
 struct ring_info {
        struct sk_buff          *skb;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 
@@ -600,8 +600,8 @@ struct ring_info {
  */
 struct tx_ring_info {
        struct sk_buff          *skb;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
-       DECLARE_PCI_UNMAP_LEN(maplen)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
+       DEFINE_DMA_UNMAP_LEN(maplen);
 };
 
 
index 8d58f0a..97d71a9 100644 (file)
@@ -1376,7 +1376,7 @@ list to the device.
 */
 static void amd8111e_set_multicast_list(struct net_device *dev)
 {
-       struct dev_mc_list *mc_ptr;
+       struct netdev_hw_addr *ha;
        struct amd8111e_priv *lp = netdev_priv(dev);
        u32 mc_filter[2] ;
        int bit_num;
@@ -1407,8 +1407,8 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
        /* load all the multicast addresses in the logic filter */
        lp->options |= OPTION_MULTICAST_ENABLE;
        mc_filter[1] = mc_filter[0] = 0;
-       netdev_for_each_mc_addr(mc_ptr, dev) {
-               bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f;
+       netdev_for_each_mc_addr(ha, dev) {
+               bit_num = (ether_crc_le(ETH_ALEN, ha->addr) >> 26) & 0x3f;
                mc_filter[bit_num >> 5] |= 1 << (bit_num & 31);
        }
        amd8111e_writeq(*(u64*)mc_filter,lp->mmio+ LADRF);
index f1f58c5..a4b5b08 100644 (file)
@@ -383,12 +383,12 @@ static void am79c961_setmulticastlist (struct net_device *dev)
        } else if (dev->flags & IFF_ALLMULTI) {
                memset(multi_hash, 0xff, sizeof(multi_hash));
        } else {
-               struct dev_mc_list *dmi;
+               struct netdev_hw_addr *ha;
 
                memset(multi_hash, 0x00, sizeof(multi_hash));
 
-               netdev_for_each_mc_addr(dmi, dev)
-                       am79c961_mc_hash(dmi->dmi_addr, multi_hash);
+               netdev_for_each_mc_addr(ha, dev)
+                       am79c961_mc_hash(ha->addr, multi_hash);
        }
 
        spin_lock_irqsave(&priv->chip_lock, flags);
index aed5b54..0adab30 100644 (file)
@@ -557,14 +557,14 @@ static int hash_get_index(__u8 *addr)
  */
 static void at91ether_sethashtable(struct net_device *dev)
 {
-       struct dev_mc_list *curr;
+       struct netdev_hw_addr *ha;
        unsigned long mc_filter[2];
        unsigned int bitnr;
 
        mc_filter[0] = mc_filter[1] = 0;
 
-       netdev_for_each_mc_addr(curr, dev) {
-               bitnr = hash_get_index(curr->dmi_addr);
+       netdev_for_each_mc_addr(ha, dev) {
+               bitnr = hash_get_index(ha->addr);
                mc_filter[bitnr >> 5] |= 1 << (bitnr & 31);
        }
 
index 6be8b09..7800d7d 100644 (file)
@@ -736,7 +736,7 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev)
 static void eth_set_mcast_list(struct net_device *dev)
 {
        struct port *port = netdev_priv(dev);
-       struct dev_mc_list *mclist;
+       struct netdev_hw_addr *ha;
        u8 diffs[ETH_ALEN], *addr;
        int i;
 
@@ -749,11 +749,11 @@ static void eth_set_mcast_list(struct net_device *dev)
        memset(diffs, 0, ETH_ALEN);
 
        addr = NULL;
-       netdev_for_each_mc_addr(mclist, dev) {
+       netdev_for_each_mc_addr(ha, dev) {
                if (!addr)
-                       addr = mclist->dmi_addr; /* first MAC address */
+                       addr = ha->addr; /* first MAC address */
                for (i = 0; i < ETH_ALEN; i++)
-                       diffs[i] |= addr[i] ^ mclist->dmi_addr[i];
+                       diffs[i] |= addr[i] ^ ha->addr[i];
        }
 
        for (i = 0; i < ETH_ALEN; i++) {
index 84f8a8f..7413a87 100644 (file)
@@ -332,16 +332,16 @@ ks8695_init_partial_multicast(struct ks8695_priv *ksp,
 {
        u32 low, high;
        int i;
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
 
        i = 0;
-       netdev_for_each_mc_addr(dmi, ndev) {
+       netdev_for_each_mc_addr(ha, ndev) {
                /* Ran out of space in chip? */
                BUG_ON(i == KS8695_NR_ADDRESSES);
 
-               low = (dmi->dmi_addr[2] << 24) | (dmi->dmi_addr[3] << 16) |
-                     (dmi->dmi_addr[4] << 8) | (dmi->dmi_addr[5]);
-               high = (dmi->dmi_addr[0] << 8) | (dmi->dmi_addr[1]);
+               low = (ha->addr[2] << 24) | (ha->addr[3] << 16) |
+                     (ha->addr[4] << 8) | (ha->addr[5]);
+               high = (ha->addr[0] << 8) | (ha->addr[1]);
 
                ks8695_writereg(ksp, KS8695_AAL_(i), low);
                ks8695_writereg(ksp, KS8695_AAH_(i), AAH_E | high);
index f7c9ca1..2491934 100644 (file)
@@ -744,7 +744,6 @@ static void netdev_rx(struct net_device *dev)
                                return;
                        }
 
-                       skb->dev = dev;
                        skb_reserve(skb, 2);
                        skb_put(skb, length);
                        skb_copy_to_linear_data(skb, data, length);
index 10a20fb..332f980 100644 (file)
@@ -847,12 +847,12 @@ set_rx_mode(struct net_device *dev)
                memset(mc_filter, 0x00, sizeof(mc_filter));
                outb(1, ioaddr + RX_MODE);      /* Ignore almost all multicasts. */
        } else {
-               struct dev_mc_list *mclist;
+               struct netdev_hw_addr *ha;
 
                memset(mc_filter, 0, sizeof(mc_filter));
-               netdev_for_each_mc_addr(mclist, dev) {
+               netdev_for_each_mc_addr(ha, dev) {
                        unsigned int bit =
-                               ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 26;
+                               ether_crc_le(ETH_ALEN, ha->addr) >> 26;
                        mc_filter[bit >> 3] |= (1 << bit);
                }
                outb(0x02, ioaddr + RX_MODE);   /* Use normal mode. */
index 50dc531..3d70511 100644 (file)
@@ -354,7 +354,7 @@ static void atl1c_set_multi(struct net_device *netdev)
 {
        struct atl1c_adapter *adapter = netdev_priv(netdev);
        struct atl1c_hw *hw = &adapter->hw;
-       struct dev_mc_list *mc_ptr;
+       struct netdev_hw_addr *ha;
        u32 mac_ctrl_data;
        u32 hash_value;
 
@@ -377,8 +377,8 @@ static void atl1c_set_multi(struct net_device *netdev)
        AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0);
 
        /* comoute mc addresses' hash value ,and put it into hash table */
-       netdev_for_each_mc_addr(mc_ptr, netdev) {
-               hash_value = atl1c_hash_mc_addr(hw, mc_ptr->dmi_addr);
+       netdev_for_each_mc_addr(ha, netdev) {
+               hash_value = atl1c_hash_mc_addr(hw, ha->addr);
                atl1c_hash_set(hw, hash_value);
        }
 }
@@ -1817,7 +1817,6 @@ rrs_checked:
                atl1c_clean_rfd(rfd_ring, rrs, rfd_num);
                skb_put(skb, length - ETH_FCS_LEN);
                skb->protocol = eth_type_trans(skb, netdev);
-               skb->dev = netdev;
                atl1c_rx_checksum(adapter, skb, rrs);
                if (unlikely(adapter->vlgrp) && rrs->word3 & RRS_VLAN_INS) {
                        u16 vlan;
index 73302ae..b6605d4 100644 (file)
@@ -284,7 +284,7 @@ static void atl1e_set_multi(struct net_device *netdev)
 {
        struct atl1e_adapter *adapter = netdev_priv(netdev);
        struct atl1e_hw *hw = &adapter->hw;
-       struct dev_mc_list *mc_ptr;
+       struct netdev_hw_addr *ha;
        u32 mac_ctrl_data = 0;
        u32 hash_value;
 
@@ -307,8 +307,8 @@ static void atl1e_set_multi(struct net_device *netdev)
        AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0);
 
        /* comoute mc addresses' hash value ,and put it into hash table */
-       netdev_for_each_mc_addr(mc_ptr, netdev) {
-               hash_value = atl1e_hash_mc_addr(hw, mc_ptr->dmi_addr);
+       netdev_for_each_mc_addr(ha, netdev) {
+               hash_value = atl1e_hash_mc_addr(hw, ha->addr);
                atl1e_hash_set(hw, hash_value);
        }
 }
@@ -1428,7 +1428,6 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,
                                            "Memory squeeze, deferring packet\n");
                                goto skip_pkt;
                        }
-                       skb->dev = netdev;
                        memcpy(skb->data, (u8 *)(prrs + 1), packet_size);
                        skb_put(skb, packet_size);
                        skb->protocol = eth_type_trans(skb, netdev);
index 54662f2..fee9cf6 100644 (file)
@@ -136,7 +136,7 @@ static void atl2_set_multi(struct net_device *netdev)
 {
        struct atl2_adapter *adapter = netdev_priv(netdev);
        struct atl2_hw *hw = &adapter->hw;
-       struct dev_mc_list *mc_ptr;
+       struct netdev_hw_addr *ha;
        u32 rctl;
        u32 hash_value;
 
@@ -158,8 +158,8 @@ static void atl2_set_multi(struct net_device *netdev)
        ATL2_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0);
 
        /* comoute mc addresses' hash value ,and put it into hash table */
-       netdev_for_each_mc_addr(mc_ptr, netdev) {
-               hash_value = atl2_hash_mc_addr(hw, mc_ptr->dmi_addr);
+       netdev_for_each_mc_addr(ha, netdev) {
+               hash_value = atl2_hash_mc_addr(hw, ha->addr);
                atl2_hash_set(hw, hash_value);
        }
 }
@@ -422,7 +422,6 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
                                netdev->stats.rx_dropped++;
                                break;
                        }
-                       skb->dev = netdev;
                        memcpy(skb->data, rxd->packet, rx_size);
                        skb_put(skb, rx_size);
                        skb->protocol = eth_type_trans(skb, netdev);
index 72f3306..f979ea2 100644 (file)
@@ -123,7 +123,7 @@ static void atlx_set_multi(struct net_device *netdev)
 {
        struct atlx_adapter *adapter = netdev_priv(netdev);
        struct atlx_hw *hw = &adapter->hw;
-       struct dev_mc_list *mc_ptr;
+       struct netdev_hw_addr *ha;
        u32 rctl;
        u32 hash_value;
 
@@ -144,8 +144,8 @@ static void atlx_set_multi(struct net_device *netdev)
        iowrite32(0, (hw->hw_addr + REG_RX_HASH_TABLE) + (1 << 2));
 
        /* compute mc addresses' hash value ,and put it into hash table */
-       netdev_for_each_mc_addr(mc_ptr, netdev) {
-               hash_value = atlx_hash_mc_addr(hw, mc_ptr->dmi_addr);
+       netdev_for_each_mc_addr(ha, netdev) {
+               hash_value = atlx_hash_mc_addr(hw, ha->addr);
                atlx_hash_set(hw, hash_value);
        }
 }
index 55039d4..2bd1a5c 100644 (file)
@@ -882,11 +882,11 @@ static void set_rx_mode_8012(struct net_device *dev)
                memset(mc_filter, 0xff, sizeof(mc_filter));
                new_mode = CMR2h_Normal;
        } else {
-               struct dev_mc_list *mclist;
+               struct netdev_hw_addr *ha;
 
                memset(mc_filter, 0, sizeof(mc_filter));
-               netdev_for_each_mc_addr(mclist, dev) {
-                       int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f;
+               netdev_for_each_mc_addr(ha, dev) {
+                       int filterbit = ether_crc_le(ETH_ALEN, ha->addr) & 0x3f;
                        mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
                }
                new_mode = CMR2h_Normal;
index 4da191b..7abb2c8 100644 (file)
@@ -75,14 +75,19 @@ static int au1000_debug = 5;
 static int au1000_debug = 3;
 #endif
 
+#define AU1000_DEF_MSG_ENABLE  (NETIF_MSG_DRV  | \
+                               NETIF_MSG_PROBE | \
+                               NETIF_MSG_LINK)
+
 #define DRV_NAME       "au1000_eth"
-#define DRV_VERSION    "1.6"
+#define DRV_VERSION    "1.7"
 #define DRV_AUTHOR     "Pete Popov <ppopov@embeddedalley.com>"
 #define DRV_DESC       "Au1xxx on-chip Ethernet driver"
 
 MODULE_AUTHOR(DRV_AUTHOR);
 MODULE_DESCRIPTION(DRV_DESC);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
 /*
  * Theory of operation
@@ -148,7 +153,7 @@ struct au1000_private *au_macs[NUM_ETH_INTERFACES];
  * specific irq-map
  */
 
-static void enable_mac(struct net_device *dev, int force_reset)
+static void au1000_enable_mac(struct net_device *dev, int force_reset)
 {
        unsigned long flags;
        struct au1000_private *aup = netdev_priv(dev);
@@ -182,8 +187,7 @@ static int au1000_mdio_read(struct net_device *dev, int phy_addr, int reg)
        while (*mii_control_reg & MAC_MII_BUSY) {
                mdelay(1);
                if (--timedout == 0) {
-                       printk(KERN_ERR "%s: read_MII busy timeout!!\n",
-                                       dev->name);
+                       netdev_err(dev, "read_MII busy timeout!!\n");
                        return -1;
                }
        }
@@ -197,8 +201,7 @@ static int au1000_mdio_read(struct net_device *dev, int phy_addr, int reg)
        while (*mii_control_reg & MAC_MII_BUSY) {
                mdelay(1);
                if (--timedout == 0) {
-                       printk(KERN_ERR "%s: mdio_read busy timeout!!\n",
-                                       dev->name);
+                       netdev_err(dev, "mdio_read busy timeout!!\n");
                        return -1;
                }
        }
@@ -217,8 +220,7 @@ static void au1000_mdio_write(struct net_device *dev, int phy_addr,
        while (*mii_control_reg & MAC_MII_BUSY) {
                mdelay(1);
                if (--timedout == 0) {
-                       printk(KERN_ERR "%s: mdio_write busy timeout!!\n",
-                                       dev->name);
+                       netdev_err(dev, "mdio_write busy timeout!!\n");
                        return;
                }
        }
@@ -236,7 +238,7 @@ static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
         * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */
        struct net_device *const dev = bus->priv;
 
-       enable_mac(dev, 0); /* make sure the MAC associated with this
+       au1000_enable_mac(dev, 0); /* make sure the MAC associated with this
                             * mii_bus is enabled */
        return au1000_mdio_read(dev, phy_addr, regnum);
 }
@@ -246,7 +248,7 @@ static int au1000_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
 {
        struct net_device *const dev = bus->priv;
 
-       enable_mac(dev, 0); /* make sure the MAC associated with this
+       au1000_enable_mac(dev, 0); /* make sure the MAC associated with this
                             * mii_bus is enabled */
        au1000_mdio_write(dev, phy_addr, regnum, value);
        return 0;
@@ -256,28 +258,26 @@ static int au1000_mdiobus_reset(struct mii_bus *bus)
 {
        struct net_device *const dev = bus->priv;
 
-       enable_mac(dev, 0); /* make sure the MAC associated with this
+       au1000_enable_mac(dev, 0); /* make sure the MAC associated with this
                             * mii_bus is enabled */
        return 0;
 }
 
-static void hard_stop(struct net_device *dev)
+static void au1000_hard_stop(struct net_device *dev)
 {
        struct au1000_private *aup = netdev_priv(dev);
 
-       if (au1000_debug > 4)
-               printk(KERN_INFO "%s: hard stop\n", dev->name);
+       netif_dbg(aup, drv, dev, "hard stop\n");
 
        aup->mac->control &= ~(MAC_RX_ENABLE | MAC_TX_ENABLE);
        au_sync_delay(10);
 }
 
-static void enable_rx_tx(struct net_device *dev)
+static void au1000_enable_rx_tx(struct net_device *dev)
 {
        struct au1000_private *aup = netdev_priv(dev);
 
-       if (au1000_debug > 4)
-               printk(KERN_INFO "%s: enable_rx_tx\n", dev->name);
+       netif_dbg(aup, hw, dev, "enable_rx_tx\n");
 
        aup->mac->control |= (MAC_RX_ENABLE | MAC_TX_ENABLE);
        au_sync_delay(10);
@@ -297,16 +297,15 @@ au1000_adjust_link(struct net_device *dev)
        spin_lock_irqsave(&aup->lock, flags);
 
        if (phydev->link && (aup->old_speed != phydev->speed)) {
-               // speed changed
+               /* speed changed */
 
-               switch(phydev->speed) {
+               switch (phydev->speed) {
                case SPEED_10:
                case SPEED_100:
                        break;
                default:
-                       printk(KERN_WARNING
-                              "%s: Speed (%d) is not 10/100 ???\n",
-                              dev->name, phydev->speed);
+                       netdev_warn(dev, "Speed (%d) is not 10/100 ???\n",
+                                                       phydev->speed);
                        break;
                }
 
@@ -316,10 +315,10 @@ au1000_adjust_link(struct net_device *dev)
        }
 
        if (phydev->link && (aup->old_duplex != phydev->duplex)) {
-               // duplex mode changed
+               /* duplex mode changed */
 
                /* switching duplex mode requires to disable rx and tx! */
-               hard_stop(dev);
+               au1000_hard_stop(dev);
 
                if (DUPLEX_FULL == phydev->duplex)
                        aup->mac->control = ((aup->mac->control
@@ -331,14 +330,14 @@ au1000_adjust_link(struct net_device *dev)
                                             | MAC_DISABLE_RX_OWN);
                au_sync_delay(1);
 
-               enable_rx_tx(dev);
+               au1000_enable_rx_tx(dev);
                aup->old_duplex = phydev->duplex;
 
                status_change = 1;
        }
 
-       if(phydev->link != aup->old_link) {
-               // link state changed
+       if (phydev->link != aup->old_link) {
+               /* link state changed */
 
                if (!phydev->link) {
                        /* link went down */
@@ -354,15 +353,15 @@ au1000_adjust_link(struct net_device *dev)
 
        if (status_change) {
                if (phydev->link)
-                       printk(KERN_INFO "%s: link up (%d/%s)\n",
-                              dev->name, phydev->speed,
+                       netdev_info(dev, "link up (%d/%s)\n",
+                              phydev->speed,
                               DUPLEX_FULL == phydev->duplex ? "Full" : "Half");
                else
-                       printk(KERN_INFO "%s: link down\n", dev->name);
+                       netdev_info(dev, "link down\n");
        }
 }
 
-static int mii_probe (struct net_device *dev)
+static int au1000_mii_probe (struct net_device *dev)
 {
        struct au1000_private *const aup = netdev_priv(dev);
        struct phy_device *phydev = NULL;
@@ -373,8 +372,7 @@ static int mii_probe (struct net_device *dev)
                if (aup->phy_addr)
                        phydev = aup->mii_bus->phy_map[aup->phy_addr];
                else
-                       printk (KERN_INFO DRV_NAME ":%s: using PHY-less setup\n",
-                               dev->name);
+                       netdev_info(dev, "using PHY-less setup\n");
                return 0;
        } else {
                int phy_addr;
@@ -391,7 +389,7 @@ static int mii_probe (struct net_device *dev)
                        /* try harder to find a PHY */
                        if (!phydev && (aup->mac_id == 1)) {
                                /* no PHY found, maybe we have a dual PHY? */
-                               printk (KERN_INFO DRV_NAME ": no PHY found on MAC1, "
+                               dev_info(&dev->dev, ": no PHY found on MAC1, "
                                        "let's see if it's attached to MAC0...\n");
 
                                /* find the first (lowest address) non-attached PHY on
@@ -417,7 +415,7 @@ static int mii_probe (struct net_device *dev)
        }
 
        if (!phydev) {
-               printk (KERN_ERR DRV_NAME ":%s: no PHY found\n", dev->name);
+               netdev_err(dev, "no PHY found\n");
                return -1;
        }
 
@@ -428,7 +426,7 @@ static int mii_probe (struct net_device *dev)
                        0, PHY_INTERFACE_MODE_MII);
 
        if (IS_ERR(phydev)) {
-               printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
+               netdev_err(dev, "Could not attach to PHY\n");
                return PTR_ERR(phydev);
        }
 
@@ -449,8 +447,8 @@ static int mii_probe (struct net_device *dev)
        aup->old_duplex = -1;
        aup->phy_dev = phydev;
 
-       printk(KERN_INFO "%s: attached PHY driver [%s] "
-              "(mii_bus:phy_addr=%s, irq=%d)\n", dev->name,
+       netdev_info(dev, "attached PHY driver [%s] "
+              "(mii_bus:phy_addr=%s, irq=%d)\n",
               phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
 
        return 0;
@@ -462,7 +460,7 @@ static int mii_probe (struct net_device *dev)
  * has the virtual and dma address of a buffer suitable for
  * both, receive and transmit operations.
  */
-static db_dest_t *GetFreeDB(struct au1000_private *aup)
+static db_dest_t *au1000_GetFreeDB(struct au1000_private *aup)
 {
        db_dest_t *pDB;
        pDB = aup->pDBfree;
@@ -473,7 +471,7 @@ static db_dest_t *GetFreeDB(struct au1000_private *aup)
        return pDB;
 }
 
-void ReleaseDB(struct au1000_private *aup, db_dest_t *pDB)
+void au1000_ReleaseDB(struct au1000_private *aup, db_dest_t *pDB)
 {
        db_dest_t *pDBfree = aup->pDBfree;
        if (pDBfree)
@@ -481,12 +479,12 @@ void ReleaseDB(struct au1000_private *aup, db_dest_t *pDB)
        aup->pDBfree = pDB;
 }
 
-static void reset_mac_unlocked(struct net_device *dev)
+static void au1000_reset_mac_unlocked(struct net_device *dev)
 {
        struct au1000_private *const aup = netdev_priv(dev);
        int i;
 
-       hard_stop(dev);
+       au1000_hard_stop(dev);
 
        *aup->enable = MAC_EN_CLOCK_ENABLE;
        au_sync_delay(2);
@@ -507,18 +505,17 @@ static void reset_mac_unlocked(struct net_device *dev)
 
 }
 
-static void reset_mac(struct net_device *dev)
+static void au1000_reset_mac(struct net_device *dev)
 {
        struct au1000_private *const aup = netdev_priv(dev);
        unsigned long flags;
 
-       if (au1000_debug > 4)
-               printk(KERN_INFO "%s: reset mac, aup %x\n",
-                      dev->name, (unsigned)aup);
+       netif_dbg(aup, hw, dev, "reset mac, aup %x\n",
+                                       (unsigned)aup);
 
        spin_lock_irqsave(&aup->lock, flags);
 
-       reset_mac_unlocked (dev);
+       au1000_reset_mac_unlocked (dev);
 
        spin_unlock_irqrestore(&aup->lock, flags);
 }
@@ -529,7 +526,7 @@ static void reset_mac(struct net_device *dev)
  * these are not descriptors sitting in memory.
  */
 static void
-setup_hw_rings(struct au1000_private *aup, u32 rx_base, u32 tx_base)
+au1000_setup_hw_rings(struct au1000_private *aup, u32 rx_base, u32 tx_base)
 {
        int i;
 
@@ -582,11 +579,25 @@ au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
        info->regdump_len = 0;
 }
 
+static void au1000_set_msglevel(struct net_device *dev, u32 value)
+{
+       struct au1000_private *aup = netdev_priv(dev);
+       aup->msg_enable = value;
+}
+
+static u32 au1000_get_msglevel(struct net_device *dev)
+{
+       struct au1000_private *aup = netdev_priv(dev);
+       return aup->msg_enable;
+}
+
 static const struct ethtool_ops au1000_ethtool_ops = {
        .get_settings = au1000_get_settings,
        .set_settings = au1000_set_settings,
        .get_drvinfo = au1000_get_drvinfo,
        .get_link = ethtool_op_get_link,
+       .get_msglevel = au1000_get_msglevel,
+       .set_msglevel = au1000_set_msglevel,
 };
 
 
@@ -606,11 +617,10 @@ static int au1000_init(struct net_device *dev)
        int i;
        u32 control;
 
-       if (au1000_debug > 4)
-               printk("%s: au1000_init\n", dev->name);
+       netif_dbg(aup, hw, dev, "au1000_init\n");
 
        /* bring the device out of reset */
-       enable_mac(dev, 1);
+       au1000_enable_mac(dev, 1);
 
        spin_lock_irqsave(&aup->lock, flags);
 
@@ -649,7 +659,7 @@ static int au1000_init(struct net_device *dev)
        return 0;
 }
 
-static inline void update_rx_stats(struct net_device *dev, u32 status)
+static inline void au1000_update_rx_stats(struct net_device *dev, u32 status)
 {
        struct net_device_stats *ps = &dev->stats;
 
@@ -667,8 +677,7 @@ static inline void update_rx_stats(struct net_device *dev, u32 status)
                        ps->rx_crc_errors++;
                if (status & RX_COLL)
                        ps->collisions++;
-       }
-       else
+       } else
                ps->rx_bytes += status & RX_FRAME_LEN_MASK;
 
 }
@@ -685,15 +694,14 @@ static int au1000_rx(struct net_device *dev)
        db_dest_t *pDB;
        u32     frmlen;
 
-       if (au1000_debug > 5)
-               printk("%s: au1000_rx head %d\n", dev->name, aup->rx_head);
+       netif_dbg(aup, rx_status, dev, "au1000_rx head %d\n", aup->rx_head);
 
        prxd = aup->rx_dma_ring[aup->rx_head];
        buff_stat = prxd->buff_stat;
        while (buff_stat & RX_T_DONE)  {
                status = prxd->status;
                pDB = aup->rx_db_inuse[aup->rx_head];
-               update_rx_stats(dev, status);
+               au1000_update_rx_stats(dev, status);
                if (!(status & RX_ERROR))  {
 
                        /* good frame */
@@ -701,9 +709,7 @@ static int au1000_rx(struct net_device *dev)
                        frmlen -= 4; /* Remove FCS */
                        skb = dev_alloc_skb(frmlen + 2);
                        if (skb == NULL) {
-                               printk(KERN_ERR
-                                      "%s: Memory squeeze, dropping packet.\n",
-                                      dev->name);
+                               netdev_err(dev, "Memory squeeze, dropping packet.\n");
                                dev->stats.rx_dropped++;
                                continue;
                        }
@@ -713,8 +719,7 @@ static int au1000_rx(struct net_device *dev)
                        skb_put(skb, frmlen);
                        skb->protocol = eth_type_trans(skb, dev);
                        netif_rx(skb);  /* pass the packet to upper layers */
-               }
-               else {
+               } else {
                        if (au1000_debug > 4) {
                                if (status & RX_MISSED_FRAME)
                                        printk("rx miss\n");
@@ -747,7 +752,7 @@ static int au1000_rx(struct net_device *dev)
        return 0;
 }
 
-static void update_tx_stats(struct net_device *dev, u32 status)
+static void au1000_update_tx_stats(struct net_device *dev, u32 status)
 {
        struct au1000_private *aup = netdev_priv(dev);
        struct net_device_stats *ps = &dev->stats;
@@ -760,8 +765,7 @@ static void update_tx_stats(struct net_device *dev, u32 status)
                                ps->tx_errors++;
                                ps->tx_aborted_errors++;
                        }
-               }
-               else {
+               } else {
                        ps->tx_errors++;
                        ps->tx_aborted_errors++;
                        if (status & (TX_NO_CARRIER | TX_LOSS_CARRIER))
@@ -783,7 +787,7 @@ static void au1000_tx_ack(struct net_device *dev)
        ptxd = aup->tx_dma_ring[aup->tx_tail];
 
        while (ptxd->buff_stat & TX_T_DONE) {
-               update_tx_stats(dev, ptxd->status);
+               au1000_update_tx_stats(dev, ptxd->status);
                ptxd->buff_stat &= ~TX_T_DONE;
                ptxd->len = 0;
                au_sync();
@@ -817,18 +821,18 @@ static int au1000_open(struct net_device *dev)
        int retval;
        struct au1000_private *aup = netdev_priv(dev);
 
-       if (au1000_debug > 4)
-               printk("%s: open: dev=%p\n", dev->name, dev);
+       netif_dbg(aup, drv, dev, "open: dev=%p\n", dev);
 
-       if ((retval = request_irq(dev->irq, au1000_interrupt, 0,
-                                       dev->name, dev))) {
-               printk(KERN_ERR "%s: unable to get IRQ %d\n",
-                               dev->name, dev->irq);
+       retval = request_irq(dev->irq, au1000_interrupt, 0,
+                                       dev->name, dev);
+       if (retval) {
+               netdev_err(dev, "unable to get IRQ %d\n", dev->irq);
                return retval;
        }
 
-       if ((retval = au1000_init(dev))) {
-               printk(KERN_ERR "%s: error in au1000_init\n", dev->name);
+       retval = au1000_init(dev);
+       if (retval) {
+               netdev_err(dev, "error in au1000_init\n");
                free_irq(dev->irq, dev);
                return retval;
        }
@@ -841,8 +845,7 @@ static int au1000_open(struct net_device *dev)
 
        netif_start_queue(dev);
 
-       if (au1000_debug > 4)
-               printk("%s: open: Initialization done.\n", dev->name);
+       netif_dbg(aup, drv, dev, "open: Initialization done.\n");
 
        return 0;
 }
@@ -852,15 +855,14 @@ static int au1000_close(struct net_device *dev)
        unsigned long flags;
        struct au1000_private *const aup = netdev_priv(dev);
 
-       if (au1000_debug > 4)
-               printk("%s: close: dev=%p\n", dev->name, dev);
+       netif_dbg(aup, drv, dev, "close: dev=%p\n", dev);
 
        if (aup->phy_dev)
                phy_stop(aup->phy_dev);
 
        spin_lock_irqsave(&aup->lock, flags);
 
-       reset_mac_unlocked (dev);
+       au1000_reset_mac_unlocked (dev);
 
        /* stop the device */
        netif_stop_queue(dev);
@@ -884,9 +886,8 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
        db_dest_t *pDB;
        int i;
 
-       if (au1000_debug > 5)
-               printk("%s: tx: aup %x len=%d, data=%p, head %d\n",
-                               dev->name, (unsigned)aup, skb->len,
+       netif_dbg(aup, tx_queued, dev, "tx: aup %x len=%d, data=%p, head %d\n",
+                               (unsigned)aup, skb->len,
                                skb->data, aup->tx_head);
 
        ptxd = aup->tx_dma_ring[aup->tx_head];
@@ -896,9 +897,8 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
                netif_stop_queue(dev);
                aup->tx_full = 1;
                return NETDEV_TX_BUSY;
-       }
-       else if (buff_stat & TX_T_DONE) {
-               update_tx_stats(dev, ptxd->status);
+       } else if (buff_stat & TX_T_DONE) {
+               au1000_update_tx_stats(dev, ptxd->status);
                ptxd->len = 0;
        }
 
@@ -910,12 +910,11 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
        pDB = aup->tx_db_inuse[aup->tx_head];
        skb_copy_from_linear_data(skb, (void *)pDB->vaddr, skb->len);
        if (skb->len < ETH_ZLEN) {
-               for (i=skb->len; i<ETH_ZLEN; i++) {
+               for (i = skb->len; i < ETH_ZLEN; i++) {
                        ((char *)pDB->vaddr)[i] = 0;
                }
                ptxd->len = ETH_ZLEN;
-       }
-       else
+       } else
                ptxd->len = skb->len;
 
        ps->tx_packets++;
@@ -935,8 +934,8 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
  */
 static void au1000_tx_timeout(struct net_device *dev)
 {
-       printk(KERN_ERR "%s: au1000_tx_timeout: dev=%p\n", dev->name, dev);
-       reset_mac(dev);
+       netdev_err(dev, "au1000_tx_timeout: dev=%p\n", dev);
+       au1000_reset_mac(dev);
        au1000_init(dev);
        dev->trans_start = jiffies;
        netif_wake_queue(dev);
@@ -946,8 +945,7 @@ static void au1000_multicast_list(struct net_device *dev)
 {
        struct au1000_private *aup = netdev_priv(dev);
 
-       if (au1000_debug > 4)
-               printk("%s: au1000_multicast_list: flags=%x\n", dev->name, dev->flags);
+       netif_dbg(aup, drv, dev, "au1000_multicast_list: flags=%x\n", dev->flags);
 
        if (dev->flags & IFF_PROMISC) {                 /* Set promiscuous. */
                aup->mac->control |= MAC_PROMISCUOUS;
@@ -955,14 +953,14 @@ static void au1000_multicast_list(struct net_device *dev)
                           netdev_mc_count(dev) > MULTICAST_FILTER_LIMIT) {
                aup->mac->control |= MAC_PASS_ALL_MULTI;
                aup->mac->control &= ~MAC_PROMISCUOUS;
-               printk(KERN_INFO "%s: Pass all multicast\n", dev->name);
+               netdev_info(dev, "Pass all multicast\n");
        } else {
-               struct dev_mc_list *mclist;
+               struct netdev_hw_addr *ha;
                u32 mc_filter[2];       /* Multicast hash filter */
 
                mc_filter[1] = mc_filter[0] = 0;
-               netdev_for_each_mc_addr(mclist, dev)
-                       set_bit(ether_crc(ETH_ALEN, mclist->dmi_addr)>>26,
+               netdev_for_each_mc_addr(ha, dev)
+                       set_bit(ether_crc(ETH_ALEN, ha->addr)>>26,
                                        (long *)mc_filter);
                aup->mac->multi_hash_high = mc_filter[1];
                aup->mac->multi_hash_low = mc_filter[0];
@@ -975,9 +973,11 @@ static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
        struct au1000_private *aup = netdev_priv(dev);
 
-       if (!netif_running(dev)) return -EINVAL;
+       if (!netif_running(dev))
+               return -EINVAL;
 
-       if (!aup->phy_dev) return -EINVAL; // PHY not controllable
+       if (!aup->phy_dev)
+               return -EINVAL; /* PHY not controllable */
 
        return phy_mii_ioctl(aup->phy_dev, if_mii(rq), cmd);
 }
@@ -996,7 +996,7 @@ static const struct net_device_ops au1000_netdev_ops = {
 
 static int __devinit au1000_probe(struct platform_device *pdev)
 {
-       static unsigned version_printed = 0;
+       static unsigned version_printed;
        struct au1000_private *aup = NULL;
        struct au1000_eth_platform_data *pd;
        struct net_device *dev = NULL;
@@ -1007,40 +1007,40 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 
        base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!base) {
-               printk(KERN_ERR DRV_NAME ": failed to retrieve base register\n");
+               dev_err(&pdev->dev, "failed to retrieve base register\n");
                err = -ENODEV;
                goto out;
        }
 
        macen = platform_get_resource(pdev, IORESOURCE_MEM, 1);
        if (!macen) {
-               printk(KERN_ERR DRV_NAME ": failed to retrieve MAC Enable register\n");
+               dev_err(&pdev->dev, "failed to retrieve MAC Enable register\n");
                err = -ENODEV;
                goto out;
        }
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
-               printk(KERN_ERR DRV_NAME ": failed to retrieve IRQ\n");
+               dev_err(&pdev->dev, "failed to retrieve IRQ\n");
                err = -ENODEV;
                goto out;
        }
 
        if (!request_mem_region(base->start, resource_size(base), pdev->name)) {
-               printk(KERN_ERR DRV_NAME ": failed to request memory region for base registers\n");
+               dev_err(&pdev->dev, "failed to request memory region for base registers\n");
                err = -ENXIO;
                goto out;
        }
 
        if (!request_mem_region(macen->start, resource_size(macen), pdev->name)) {
-               printk(KERN_ERR DRV_NAME ": failed to request memory region for MAC enable register\n");
+               dev_err(&pdev->dev, "failed to request memory region for MAC enable register\n");
                err = -ENXIO;
                goto err_request;
        }
 
        dev = alloc_etherdev(sizeof(struct au1000_private));
        if (!dev) {
-               printk(KERN_ERR "%s: alloc_etherdev failed\n", DRV_NAME);
+               dev_err(&pdev->dev, "alloc_etherdev failed\n");
                err = -ENOMEM;
                goto err_alloc;
        }
@@ -1050,6 +1050,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        aup = netdev_priv(dev);
 
        spin_lock_init(&aup->lock);
+       aup->msg_enable = (au1000_debug < 4 ? AU1000_DEF_MSG_ENABLE : au1000_debug);
 
        /* Allocate the data buffers */
        /* Snooping works fine with eth on all au1xxx */
@@ -1057,7 +1058,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
                                                (NUM_TX_BUFFS + NUM_RX_BUFFS),
                                                &aup->dma_addr, 0);
        if (!aup->vaddr) {
-               printk(KERN_ERR DRV_NAME ": failed to allocate data buffers\n");
+               dev_err(&pdev->dev, "failed to allocate data buffers\n");
                err = -ENOMEM;
                goto err_vaddr;
        }
@@ -1065,7 +1066,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        /* aup->mac is the base address of the MAC's registers */
        aup->mac = (volatile mac_reg_t *)ioremap_nocache(base->start, resource_size(base));
        if (!aup->mac) {
-               printk(KERN_ERR DRV_NAME ": failed to ioremap MAC registers\n");
+               dev_err(&pdev->dev, "failed to ioremap MAC registers\n");
                err = -ENXIO;
                goto err_remap1;
        }
@@ -1073,7 +1074,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
         /* Setup some variables for quick register address access */
        aup->enable = (volatile u32 *)ioremap_nocache(macen->start, resource_size(macen));
        if (!aup->enable) {
-               printk(KERN_ERR DRV_NAME ": failed to ioremap MAC enable register\n");
+               dev_err(&pdev->dev, "failed to ioremap MAC enable register\n");
                err = -ENXIO;
                goto err_remap2;
        }
@@ -1083,14 +1084,13 @@ static int __devinit au1000_probe(struct platform_device *pdev)
                if (prom_get_ethernet_addr(ethaddr) == 0)
                        memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr));
                else {
-                       printk(KERN_INFO "%s: No MAC address found\n",
-                                        dev->name);
+                       netdev_info(dev, "No MAC address found\n");
                                /* Use the hard coded MAC addresses */
                }
 
-               setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR);
+               au1000_setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR);
        } else if (pdev->id == 1)
-               setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR);
+               au1000_setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR);
 
        /*
         * Assign to the Ethernet ports two consecutive MAC addresses
@@ -1104,7 +1104,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 
        pd = pdev->dev.platform_data;
        if (!pd) {
-               printk(KERN_INFO DRV_NAME ": no platform_data passed, PHY search on MAC0\n");
+               dev_info(&pdev->dev, "no platform_data passed, PHY search on MAC0\n");
                aup->phy1_search_mac0 = 1;
        } else {
                aup->phy_static_config = pd->phy_static_config;
@@ -1116,7 +1116,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        }
 
        if (aup->phy_busid && aup->phy_busid > 0) {
-               printk(KERN_ERR DRV_NAME ": MAC0-associated PHY attached 2nd MACs MII"
+               dev_err(&pdev->dev, "MAC0-associated PHY attached 2nd MACs MII"
                                "bus not supported yet\n");
                err = -ENODEV;
                goto err_mdiobus_alloc;
@@ -1124,7 +1124,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 
        aup->mii_bus = mdiobus_alloc();
        if (aup->mii_bus == NULL) {
-               printk(KERN_ERR DRV_NAME ": failed to allocate mdiobus structure\n");
+               dev_err(&pdev->dev, "failed to allocate mdiobus structure\n");
                err = -ENOMEM;
                goto err_mdiobus_alloc;
        }
@@ -1139,7 +1139,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        if (aup->mii_bus->irq == NULL)
                goto err_out;
 
-       for(i = 0; i < PHY_MAX_ADDR; ++i)
+       for (i = 0; i < PHY_MAX_ADDR; ++i)
                aup->mii_bus->irq[i] = PHY_POLL;
        /* if known, set corresponding PHY IRQs */
        if (aup->phy_static_config)
@@ -1148,11 +1148,11 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 
        err = mdiobus_register(aup->mii_bus);
        if (err) {
-               printk(KERN_ERR DRV_NAME " failed to register MDIO bus\n");
+               dev_err(&pdev->dev, "failed to register MDIO bus\n");
                goto err_mdiobus_reg;
        }
 
-       if (mii_probe(dev) != 0)
+       if (au1000_mii_probe(dev) != 0)
                goto err_out;
 
        pDBfree = NULL;
@@ -1168,7 +1168,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        aup->pDBfree = pDBfree;
 
        for (i = 0; i < NUM_RX_DMA; i++) {
-               pDB = GetFreeDB(aup);
+               pDB = au1000_GetFreeDB(aup);
                if (!pDB) {
                        goto err_out;
                }
@@ -1176,7 +1176,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
                aup->rx_db_inuse[i] = pDB;
        }
        for (i = 0; i < NUM_TX_DMA; i++) {
-               pDB = GetFreeDB(aup);
+               pDB = au1000_GetFreeDB(aup);
                if (!pDB) {
                        goto err_out;
                }
@@ -1195,17 +1195,16 @@ static int __devinit au1000_probe(struct platform_device *pdev)
         * The boot code uses the ethernet controller, so reset it to start
         * fresh.  au1000_init() expects that the device is in reset state.
         */
-       reset_mac(dev);
+       au1000_reset_mac(dev);
 
        err = register_netdev(dev);
        if (err) {
-               printk(KERN_ERR DRV_NAME "%s: Cannot register net device, aborting.\n",
-                                       dev->name);
+               netdev_err(dev, "Cannot register net device, aborting.\n");
                goto err_out;
        }
 
-       printk("%s: Au1xx0 Ethernet found at 0x%lx, irq %d\n",
-                       dev->name, (unsigned long)base->start, irq);
+       netdev_info(dev, "Au1xx0 Ethernet found at 0x%lx, irq %d\n",
+                       (unsigned long)base->start, irq);
        if (version_printed++ == 0)
                printk("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR);
 
@@ -1217,15 +1216,15 @@ err_out:
 
        /* here we should have a valid dev plus aup-> register addresses
         * so we can reset the mac properly.*/
-       reset_mac(dev);
+       au1000_reset_mac(dev);
 
        for (i = 0; i < NUM_RX_DMA; i++) {
                if (aup->rx_db_inuse[i])
-                       ReleaseDB(aup, aup->rx_db_inuse[i]);
+                       au1000_ReleaseDB(aup, aup->rx_db_inuse[i]);
        }
        for (i = 0; i < NUM_TX_DMA; i++) {
                if (aup->tx_db_inuse[i])
-                       ReleaseDB(aup, aup->tx_db_inuse[i]);
+                       au1000_ReleaseDB(aup, aup->tx_db_inuse[i]);
        }
 err_mdiobus_reg:
        mdiobus_free(aup->mii_bus);
@@ -1261,11 +1260,11 @@ static int __devexit au1000_remove(struct platform_device *pdev)
 
        for (i = 0; i < NUM_RX_DMA; i++)
                if (aup->rx_db_inuse[i])
-                       ReleaseDB(aup, aup->rx_db_inuse[i]);
+                       au1000_ReleaseDB(aup, aup->rx_db_inuse[i]);
 
        for (i = 0; i < NUM_TX_DMA; i++)
                if (aup->tx_db_inuse[i])
-                       ReleaseDB(aup, aup->tx_db_inuse[i]);
+                       au1000_ReleaseDB(aup, aup->tx_db_inuse[i]);
 
        dma_free_noncoherent(NULL, MAX_BUF_SIZE *
                        (NUM_TX_BUFFS + NUM_RX_BUFFS),
index f9d29a2..d06ec00 100644 (file)
@@ -35,7 +35,7 @@
 #define NUM_TX_BUFFS 4
 #define MAX_BUF_SIZE 2048
 
-#define ETH_TX_TIMEOUT HZ/4
+#define ETH_TX_TIMEOUT (HZ/4)
 #define MAC_MIN_PKT_SIZE 64
 
 #define MULTICAST_FILTER_LIMIT 64
@@ -125,4 +125,6 @@ struct au1000_private {
        dma_addr_t dma_addr;      /* dma address of rx/tx buffers       */
 
        spinlock_t lock;       /* Serialise access to device */
+
+       u32 msg_enable;
 };
index 69d9f3d..4582721 100644 (file)
@@ -1681,15 +1681,15 @@ static struct net_device_stats *b44_get_stats(struct net_device *dev)
 
 static int __b44_load_mcast(struct b44 *bp, struct net_device *dev)
 {
-       struct dev_mc_list *mclist;
+       struct netdev_hw_addr *ha;
        int i, num_ents;
 
        num_ents = min_t(int, netdev_mc_count(dev), B44_MCAST_TABLE_SIZE);
        i = 0;
-       netdev_for_each_mc_addr(mclist, dev) {
+       netdev_for_each_mc_addr(ha, dev) {
                if (i == num_ents)
                        break;
-               __b44_cam_write(bp, mclist->dmi_addr, i++ + 1);
+               __b44_cam_write(bp, ha->addr, i++ + 1);
        }
        return i+1;
 }
index 17460ab..9a8bdea 100644 (file)
@@ -341,11 +341,9 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
                }
 
                skb_put(skb, len);
-               skb->dev = dev;
                skb->protocol = eth_type_trans(skb, dev);
                priv->stats.rx_packets++;
                priv->stats.rx_bytes += len;
-               dev->last_rx = jiffies;
                netif_receive_skb(skb);
 
        } while (--budget > 0);
@@ -605,7 +603,7 @@ static int bcm_enet_set_mac_address(struct net_device *dev, void *p)
 static void bcm_enet_set_multicast_list(struct net_device *dev)
 {
        struct bcm_enet_priv *priv;
-       struct dev_mc_list *mc_list;
+       struct netdev_hw_addr *ha;
        u32 val;
        int i;
 
@@ -633,14 +631,14 @@ static void bcm_enet_set_multicast_list(struct net_device *dev)
        }
 
        i = 0;
-       netdev_for_each_mc_addr(mc_list, dev) {
+       netdev_for_each_mc_addr(ha, dev) {
                u8 *dmi_addr;
                u32 tmp;
 
                if (i == 3)
                        break;
                /* update perfect match registers */
-               dmi_addr = mc_list->dmi_addr;
+               dmi_addr = ha->addr;
                tmp = (dmi_addr[2] << 24) | (dmi_addr[3] << 16) |
                        (dmi_addr[4] << 8) | dmi_addr[5];
                enet_writel(priv, tmp, ENET_PML_REG(i + 1));
@@ -960,7 +958,9 @@ static int bcm_enet_open(struct net_device *dev)
        /* all set, enable mac and interrupts, start dma engine and
         * kick rx dma channel */
        wmb();
-       enet_writel(priv, ENET_CTL_ENABLE_MASK, ENET_CTL_REG);
+       val = enet_readl(priv, ENET_CTL_REG);
+       val |= ENET_CTL_ENABLE_MASK;
+       enet_writel(priv, val, ENET_CTL_REG);
        enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
        enet_dma_writel(priv, ENETDMA_CHANCFG_EN_MASK,
                        ENETDMA_CHANCFG_REG(priv->rx_chan));
index 56387b1..373c1a5 100644 (file)
@@ -84,6 +84,8 @@ static inline char *nic_name(struct pci_dev *pdev)
 
 #define FW_VER_LEN             32
 
+#define BE_MAX_VF              32
+
 struct be_dma_mem {
        void *va;
        dma_addr_t dma;
@@ -207,7 +209,7 @@ struct be_tx_obj {
 /* Struct to remember the pages posted for rx frags */
 struct be_rx_page_info {
        struct page *page;
-       dma_addr_t bus;
+       DEFINE_DMA_UNMAP_ADDR(bus);
        u16 page_offset;
        bool last_page_user;
 };
@@ -281,8 +283,15 @@ struct be_adapter {
        u8 port_type;
        u8 transceiver;
        u8 generation;          /* BladeEngine ASIC generation */
+
+       bool sriov_enabled;
+       u32 vf_if_handle[BE_MAX_VF];
+       u32 vf_pmac_id[BE_MAX_VF];
+       u8 base_eq_id;
 };
 
+#define be_physfn(adapter) (!adapter->pdev->is_virtfn)
+
 /* BladeEngine Generation numbers */
 #define BE_GEN2 2
 #define BE_GEN3 3
index d0ef4ac..e79bf8b 100644 (file)
@@ -843,7 +843,8 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
  * Uses mbox
  */
 int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
-               u8 *mac, bool pmac_invalid, u32 *if_handle, u32 *pmac_id)
+               u8 *mac, bool pmac_invalid, u32 *if_handle, u32 *pmac_id,
+               u32 domain)
 {
        struct be_mcc_wrb *wrb;
        struct be_cmd_req_if_create *req;
@@ -860,6 +861,7 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
        be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
                OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req));
 
+       req->hdr.domain = domain;
        req->capability_flags = cpu_to_le32(cap_flags);
        req->enable_flags = cpu_to_le32(en_flags);
        req->pmac_invalid = pmac_invalid;
@@ -1111,6 +1113,10 @@ int be_cmd_promiscuous_config(struct be_adapter *adapter, u8 port_num, bool en)
        be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH,
                OPCODE_ETH_PROMISCUOUS, sizeof(*req));
 
+       /* In FW versions X.102.149/X.101.487 and later,
+        * the port setting associated only with the
+        * issuing pci function will take effect
+        */
        if (port_num)
                req->port1_promiscuous = en;
        else
@@ -1157,13 +1163,13 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
        req->interface_id = if_id;
        if (netdev) {
                int i;
-               struct dev_mc_list *mc;
+               struct netdev_hw_addr *ha;
 
                req->num_mac = cpu_to_le16(netdev_mc_count(netdev));
 
                i = 0;
-               netdev_for_each_mc_addr(mc, netdev)
-                       memcpy(req->mac[i].byte, mc->dmi_addr, ETH_ALEN);
+               netdev_for_each_mc_addr(ha, netdev)
+                       memcpy(req->mac[i].byte, ha->addr, ETH_ALEN);
        } else {
                req->promiscuous = 1;
        }
index cce61f9..763dc19 100644 (file)
@@ -878,7 +878,7 @@ extern int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr,
 extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id);
 extern int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags,
                        u32 en_flags, u8 *mac, bool pmac_invalid,
-                       u32 *if_handle, u32 *pmac_id);
+                       u32 *if_handle, u32 *pmac_id, u32 domain);
 extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle);
 extern int be_cmd_eq_create(struct be_adapter *adapter,
                        struct be_queue_info *eq, int eq_delay);
index 51e1065..d488d52 100644 (file)
@@ -496,7 +496,7 @@ be_test_ddr_dma(struct be_adapter *adapter)
        ddrdma_cmd.va = pci_alloc_consistent(adapter->pdev, ddrdma_cmd.size,
                                        &ddrdma_cmd.dma);
        if (!ddrdma_cmd.va) {
-               dev_err(&adapter->pdev->dev, "Memory allocation failure \n");
+               dev_err(&adapter->pdev->dev, "Memory allocation failure\n");
                return -ENOMEM;
        }
 
index 2d4a4b8..063026d 100644 (file)
@@ -99,6 +99,9 @@
 /* Number of entries posted */
 #define DB_MCCQ_NUM_POSTED_SHIFT       (16)    /* bits 16 - 29 */
 
+/********** SRIOV VF PCICFG OFFSET ********/
+#define SRIOV_VF_PCICFG_OFFSET         (4096)
+
 /* Flashrom related descriptors */
 #define IMAGE_TYPE_FIRMWARE            160
 #define IMAGE_TYPE_BOOTCODE            224
index ec6ace8..18e0a80 100644 (file)
@@ -26,8 +26,11 @@ MODULE_AUTHOR("ServerEngines Corporation");
 MODULE_LICENSE("GPL");
 
 static unsigned int rx_frag_size = 2048;
+static unsigned int num_vfs;
 module_param(rx_frag_size, uint, S_IRUGO);
+module_param(num_vfs, uint, S_IRUGO);
 MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data.");
+MODULE_PARM_DESC(num_vfs, "Number of PCI VFs to initialize");
 
 static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = {
        { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) },
@@ -138,12 +141,19 @@ static int be_mac_addr_set(struct net_device *netdev, void *p)
        if (!is_valid_ether_addr(addr->sa_data))
                return -EADDRNOTAVAIL;
 
+       /* MAC addr configuration will be done in hardware for VFs
+        * by their corresponding PFs. Just copy to netdev addr here
+        */
+       if (!be_physfn(adapter))
+               goto netdev_addr;
+
        status = be_cmd_pmac_del(adapter, adapter->if_handle, adapter->pmac_id);
        if (status)
                return status;
 
        status = be_cmd_pmac_add(adapter, (u8 *)addr->sa_data,
                        adapter->if_handle, &adapter->pmac_id);
+netdev_addr:
        if (!status)
                memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
 
@@ -386,26 +396,48 @@ static void wrb_fill_hdr(struct be_eth_hdr_wrb *hdr, struct sk_buff *skb,
        AMAP_SET_BITS(struct amap_eth_hdr_wrb, len, hdr, len);
 }
 
+static void unmap_tx_frag(struct pci_dev *pdev, struct be_eth_wrb *wrb,
+               bool unmap_single)
+{
+       dma_addr_t dma;
+
+       be_dws_le_to_cpu(wrb, sizeof(*wrb));
+
+       dma = (u64)wrb->frag_pa_hi << 32 | (u64)wrb->frag_pa_lo;
+       if (wrb->frag_len) {
+               if (unmap_single)
+                       pci_unmap_single(pdev, dma, wrb->frag_len,
+                               PCI_DMA_TODEVICE);
+               else
+                       pci_unmap_page(pdev, dma, wrb->frag_len,
+                               PCI_DMA_TODEVICE);
+       }
+}
 
 static int make_tx_wrbs(struct be_adapter *adapter,
                struct sk_buff *skb, u32 wrb_cnt, bool dummy_wrb)
 {
-       u64 busaddr;
-       u32 i, copied = 0;
+       dma_addr_t busaddr;
+       int i, copied = 0;
        struct pci_dev *pdev = adapter->pdev;
        struct sk_buff *first_skb = skb;
        struct be_queue_info *txq = &adapter->tx_obj.q;
        struct be_eth_wrb *wrb;
        struct be_eth_hdr_wrb *hdr;
+       bool map_single = false;
+       u16 map_head;
 
        hdr = queue_head_node(txq);
-       atomic_add(wrb_cnt, &txq->used);
        queue_head_inc(txq);
+       map_head = txq->head;
 
        if (skb->len > skb->data_len) {
                int len = skb->len - skb->data_len;
                busaddr = pci_map_single(pdev, skb->data, len,
                                         PCI_DMA_TODEVICE);
+               if (pci_dma_mapping_error(pdev, busaddr))
+                       goto dma_err;
+               map_single = true;
                wrb = queue_head_node(txq);
                wrb_fill(wrb, busaddr, len);
                be_dws_cpu_to_le(wrb, sizeof(*wrb));
@@ -419,6 +451,8 @@ static int make_tx_wrbs(struct be_adapter *adapter,
                busaddr = pci_map_page(pdev, frag->page,
                                       frag->page_offset,
                                       frag->size, PCI_DMA_TODEVICE);
+               if (pci_dma_mapping_error(pdev, busaddr))
+                       goto dma_err;
                wrb = queue_head_node(txq);
                wrb_fill(wrb, busaddr, frag->size);
                be_dws_cpu_to_le(wrb, sizeof(*wrb));
@@ -438,6 +472,16 @@ static int make_tx_wrbs(struct be_adapter *adapter,
        be_dws_cpu_to_le(hdr, sizeof(*hdr));
 
        return copied;
+dma_err:
+       txq->head = map_head;
+       while (copied) {
+               wrb = queue_head_node(txq);
+               unmap_tx_frag(pdev, wrb, map_single);
+               map_single = false;
+               copied -= wrb->frag_len;
+               queue_head_inc(txq);
+       }
+       return 0;
 }
 
 static netdev_tx_t be_xmit(struct sk_buff *skb,
@@ -462,6 +506,7 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
                 * *BEFORE* ringing the tx doorbell, so that we serialze the
                 * tx compls of the current transmit which'll wake up the queue
                 */
+               atomic_add(wrb_cnt, &txq->used);
                if ((BE_MAX_TX_FRAG_COUNT + atomic_read(&txq->used)) >=
                                                                txq->len) {
                        netif_stop_queue(netdev);
@@ -541,6 +586,9 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid)
 {
        struct be_adapter *adapter = netdev_priv(netdev);
 
+       if (!be_physfn(adapter))
+               return;
+
        adapter->vlan_tag[vid] = 1;
        adapter->vlans_added++;
        if (adapter->vlans_added <= (adapter->max_vlans + 1))
@@ -551,6 +599,9 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
 {
        struct be_adapter *adapter = netdev_priv(netdev);
 
+       if (!be_physfn(adapter))
+               return;
+
        adapter->vlan_tag[vid] = 0;
        vlan_group_set_device(adapter->vlan_grp, vid, NULL);
        adapter->vlans_added--;
@@ -588,6 +639,28 @@ done:
        return;
 }
 
+static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
+{
+       struct be_adapter *adapter = netdev_priv(netdev);
+       int status;
+
+       if (!adapter->sriov_enabled)
+               return -EPERM;
+
+       if (!is_valid_ether_addr(mac) || (vf >= num_vfs))
+               return -EINVAL;
+
+       status = be_cmd_pmac_del(adapter, adapter->vf_if_handle[vf],
+                               adapter->vf_pmac_id[vf]);
+
+       status = be_cmd_pmac_add(adapter, mac, adapter->vf_if_handle[vf],
+                               &adapter->vf_pmac_id[vf]);
+       if (!status)
+               dev_err(&adapter->pdev->dev, "MAC %pM set on VF %d Failed\n",
+                               mac, vf);
+       return status;
+}
+
 static void be_rx_rate_update(struct be_adapter *adapter)
 {
        struct be_drvr_stats *stats = drvr_stats(adapter);
@@ -647,7 +720,7 @@ get_rx_page_info(struct be_adapter *adapter, u16 frag_idx)
        BUG_ON(!rx_page_info->page);
 
        if (rx_page_info->last_page_user) {
-               pci_unmap_page(adapter->pdev, pci_unmap_addr(rx_page_info, bus),
+               pci_unmap_page(adapter->pdev, dma_unmap_addr(rx_page_info, bus),
                        adapter->big_page_size, PCI_DMA_FROMDEVICE);
                rx_page_info->last_page_user = false;
        }
@@ -791,7 +864,6 @@ static void be_rx_compl_process(struct be_adapter *adapter,
 
        skb->truesize = skb->len + sizeof(struct sk_buff);
        skb->protocol = eth_type_trans(skb, adapter->netdev);
-       skb->dev = adapter->netdev;
 
        vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
        vtm = AMAP_GET_BITS(struct amap_eth_rx_compl, vtm, rxcp);
@@ -959,7 +1031,7 @@ static void be_post_rx_frags(struct be_adapter *adapter)
                }
                page_offset = page_info->page_offset;
                page_info->page = pagep;
-               pci_unmap_addr_set(page_info, bus, page_dmaaddr);
+               dma_unmap_addr_set(page_info, bus, page_dmaaddr);
                frag_dmaaddr = page_dmaaddr + page_info->page_offset;
 
                rxd = queue_head_node(rxq);
@@ -1012,35 +1084,26 @@ static void be_tx_compl_process(struct be_adapter *adapter, u16 last_index)
        struct be_eth_wrb *wrb;
        struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list;
        struct sk_buff *sent_skb;
-       u64 busaddr;
-       u16 cur_index, num_wrbs = 0;
+       u16 cur_index, num_wrbs = 1; /* account for hdr wrb */
+       bool unmap_skb_hdr = true;
 
-       cur_index = txq->tail;
-       sent_skb = sent_skbs[cur_index];
+       sent_skb = sent_skbs[txq->tail];
        BUG_ON(!sent_skb);
-       sent_skbs[cur_index] = NULL;
-       wrb = queue_tail_node(txq);
-       be_dws_le_to_cpu(wrb, sizeof(*wrb));
-       busaddr = ((u64)wrb->frag_pa_hi << 32) | (u64)wrb->frag_pa_lo;
-       if (busaddr != 0) {
-               pci_unmap_single(adapter->pdev, busaddr,
-                                wrb->frag_len, PCI_DMA_TODEVICE);
-       }
-       num_wrbs++;
+       sent_skbs[txq->tail] = NULL;
+
+       /* skip header wrb */
        queue_tail_inc(txq);
 
-       while (cur_index != last_index) {
+       do {
                cur_index = txq->tail;
                wrb = queue_tail_node(txq);
-               be_dws_le_to_cpu(wrb, sizeof(*wrb));
-               busaddr = ((u64)wrb->frag_pa_hi << 32) | (u64)wrb->frag_pa_lo;
-               if (busaddr != 0) {
-                       pci_unmap_page(adapter->pdev, busaddr,
-                                      wrb->frag_len, PCI_DMA_TODEVICE);
-               }
+               unmap_tx_frag(adapter->pdev, wrb, (unmap_skb_hdr &&
+                                       sent_skb->len > sent_skb->data_len));
+               unmap_skb_hdr = false;
+
                num_wrbs++;
                queue_tail_inc(txq);
-       }
+       } while (cur_index != last_index);
 
        atomic_sub(num_wrbs, &txq->used);
 
@@ -1255,6 +1318,8 @@ static int be_tx_queues_create(struct be_adapter *adapter)
        /* Ask BE to create Tx Event queue */
        if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd))
                goto tx_eq_free;
+       adapter->base_eq_id = adapter->tx_eq.q.id;
+
        /* Alloc TX eth compl queue */
        cq = &adapter->tx_obj.cq;
        if (be_queue_alloc(adapter, cq, TX_CQ_LEN,
@@ -1382,7 +1447,7 @@ rx_eq_free:
 /* There are 8 evt ids per func. Retruns the evt id's bit number */
 static inline int be_evt_bit_get(struct be_adapter *adapter, u32 eq_id)
 {
-       return eq_id % 8;
+       return eq_id - adapter->base_eq_id;
 }
 
 static irqreturn_t be_intx(int irq, void *dev)
@@ -1560,6 +1625,28 @@ static void be_msix_enable(struct be_adapter *adapter)
        return;
 }
 
+static void be_sriov_enable(struct be_adapter *adapter)
+{
+#ifdef CONFIG_PCI_IOV
+       int status;
+       if (be_physfn(adapter) && num_vfs) {
+               status = pci_enable_sriov(adapter->pdev, num_vfs);
+               adapter->sriov_enabled = status ? false : true;
+       }
+#endif
+       return;
+}
+
+static void be_sriov_disable(struct be_adapter *adapter)
+{
+#ifdef CONFIG_PCI_IOV
+       if (adapter->sriov_enabled) {
+               pci_disable_sriov(adapter->pdev);
+               adapter->sriov_enabled = false;
+       }
+#endif
+}
+
 static inline int be_msix_vec_get(struct be_adapter *adapter, u32 eq_id)
 {
        return adapter->msix_entries[
@@ -1617,6 +1704,9 @@ static int be_irq_register(struct be_adapter *adapter)
                status = be_msix_register(adapter);
                if (status == 0)
                        goto done;
+               /* INTx is not supported for VF */
+               if (!be_physfn(adapter))
+                       return status;
        }
 
        /* INTx */
@@ -1690,14 +1780,17 @@ static int be_open(struct net_device *netdev)
                goto ret_sts;
        be_link_status_update(adapter, link_up);
 
-       status = be_vid_config(adapter);
+       if (be_physfn(adapter))
+               status = be_vid_config(adapter);
        if (status)
                goto ret_sts;
 
-       status = be_cmd_set_flow_control(adapter,
-                                       adapter->tx_fc, adapter->rx_fc);
-       if (status)
-               goto ret_sts;
+       if (be_physfn(adapter)) {
+               status = be_cmd_set_flow_control(adapter,
+                               adapter->tx_fc, adapter->rx_fc);
+               if (status)
+                       goto ret_sts;
+       }
 
        schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
 ret_sts:
@@ -1723,7 +1816,7 @@ static int be_setup_wol(struct be_adapter *adapter, bool enable)
                        PCICFG_PM_CONTROL_OFFSET, PCICFG_PM_CONTROL_MASK);
                if (status) {
                        dev_err(&adapter->pdev->dev,
-                               "Could not enable Wake-on-lan \n");
+                               "Could not enable Wake-on-lan\n");
                        pci_free_consistent(adapter->pdev, cmd.size, cmd.va,
                                        cmd.dma);
                        return status;
@@ -1745,22 +1838,48 @@ static int be_setup_wol(struct be_adapter *adapter, bool enable)
 static int be_setup(struct be_adapter *adapter)
 {
        struct net_device *netdev = adapter->netdev;
-       u32 cap_flags, en_flags;
+       u32 cap_flags, en_flags, vf = 0;
        int status;
+       u8 mac[ETH_ALEN];
 
-       cap_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST |
-                       BE_IF_FLAGS_MCAST_PROMISCUOUS |
-                       BE_IF_FLAGS_PROMISCUOUS |
-                       BE_IF_FLAGS_PASS_L3L4_ERRORS;
-       en_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST |
-                       BE_IF_FLAGS_PASS_L3L4_ERRORS;
+       cap_flags = en_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST;
+
+       if (be_physfn(adapter)) {
+               cap_flags |= BE_IF_FLAGS_MCAST_PROMISCUOUS |
+                               BE_IF_FLAGS_PROMISCUOUS |
+                               BE_IF_FLAGS_PASS_L3L4_ERRORS;
+               en_flags |= BE_IF_FLAGS_PASS_L3L4_ERRORS;
+       }
 
        status = be_cmd_if_create(adapter, cap_flags, en_flags,
                        netdev->dev_addr, false/* pmac_invalid */,
-                       &adapter->if_handle, &adapter->pmac_id);
+                       &adapter->if_handle, &adapter->pmac_id, 0);
        if (status != 0)
                goto do_none;
 
+       if (be_physfn(adapter)) {
+               while (vf < num_vfs) {
+                       cap_flags = en_flags = BE_IF_FLAGS_UNTAGGED
+                                       | BE_IF_FLAGS_BROADCAST;
+                       status = be_cmd_if_create(adapter, cap_flags, en_flags,
+                                       mac, true, &adapter->vf_if_handle[vf],
+                                       NULL, vf+1);
+                       if (status) {
+                               dev_err(&adapter->pdev->dev,
+                               "Interface Create failed for VF %d\n", vf);
+                               goto if_destroy;
+                       }
+                       vf++;
+               } while (vf < num_vfs);
+       } else if (!be_physfn(adapter)) {
+               status = be_cmd_mac_addr_query(adapter, mac,
+                       MAC_ADDRESS_TYPE_NETWORK, false, adapter->if_handle);
+               if (!status) {
+                       memcpy(adapter->netdev->dev_addr, mac, ETH_ALEN);
+                       memcpy(adapter->netdev->perm_addr, mac, ETH_ALEN);
+               }
+       }
+
        status = be_tx_queues_create(adapter);
        if (status != 0)
                goto if_destroy;
@@ -1782,6 +1901,9 @@ rx_qs_destroy:
 tx_qs_destroy:
        be_tx_queues_destroy(adapter);
 if_destroy:
+       for (vf = 0; vf < num_vfs; vf++)
+               if (adapter->vf_if_handle[vf])
+                       be_cmd_if_destroy(adapter, adapter->vf_if_handle[vf]);
        be_cmd_if_destroy(adapter, adapter->if_handle);
 do_none:
        return status;
@@ -2061,6 +2183,7 @@ static struct net_device_ops be_netdev_ops = {
        .ndo_vlan_rx_register   = be_vlan_register,
        .ndo_vlan_rx_add_vid    = be_vlan_add_vid,
        .ndo_vlan_rx_kill_vid   = be_vlan_rem_vid,
+       .ndo_set_vf_mac         = be_set_vf_mac
 };
 
 static void be_netdev_init(struct net_device *netdev)
@@ -2102,37 +2225,48 @@ static void be_unmap_pci_bars(struct be_adapter *adapter)
                iounmap(adapter->csr);
        if (adapter->db)
                iounmap(adapter->db);
-       if (adapter->pcicfg)
+       if (adapter->pcicfg && be_physfn(adapter))
                iounmap(adapter->pcicfg);
 }
 
 static int be_map_pci_bars(struct be_adapter *adapter)
 {
        u8 __iomem *addr;
-       int pcicfg_reg;
-
-       addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2),
-                       pci_resource_len(adapter->pdev, 2));
-       if (addr == NULL)
-               return -ENOMEM;
-       adapter->csr = addr;
+       int pcicfg_reg, db_reg;
 
-       addr = ioremap_nocache(pci_resource_start(adapter->pdev, 4),
-                       128 * 1024);
-       if (addr == NULL)
-               goto pci_map_err;
-       adapter->db = addr;
+       if (be_physfn(adapter)) {
+               addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2),
+                               pci_resource_len(adapter->pdev, 2));
+               if (addr == NULL)
+                       return -ENOMEM;
+               adapter->csr = addr;
+       }
 
-       if (adapter->generation == BE_GEN2)
+       if (adapter->generation == BE_GEN2) {
                pcicfg_reg = 1;
-       else
+               db_reg = 4;
+       } else {
                pcicfg_reg = 0;
-
-       addr = ioremap_nocache(pci_resource_start(adapter->pdev, pcicfg_reg),
-                       pci_resource_len(adapter->pdev, pcicfg_reg));
+               if (be_physfn(adapter))
+                       db_reg = 4;
+               else
+                       db_reg = 0;
+       }
+       addr = ioremap_nocache(pci_resource_start(adapter->pdev, db_reg),
+                               pci_resource_len(adapter->pdev, db_reg));
        if (addr == NULL)
                goto pci_map_err;
-       adapter->pcicfg = addr;
+       adapter->db = addr;
+
+       if (be_physfn(adapter)) {
+               addr = ioremap_nocache(
+                               pci_resource_start(adapter->pdev, pcicfg_reg),
+                               pci_resource_len(adapter->pdev, pcicfg_reg));
+               if (addr == NULL)
+                       goto pci_map_err;
+               adapter->pcicfg = addr;
+       } else
+               adapter->pcicfg = adapter->db + SRIOV_VF_PCICFG_OFFSET;
 
        return 0;
 pci_map_err:
@@ -2246,6 +2380,8 @@ static void __devexit be_remove(struct pci_dev *pdev)
 
        be_ctrl_cleanup(adapter);
 
+       be_sriov_disable(adapter);
+
        be_msix_disable(adapter);
 
        pci_set_drvdata(pdev, NULL);
@@ -2270,16 +2406,20 @@ static int be_get_config(struct be_adapter *adapter)
                return status;
 
        memset(mac, 0, ETH_ALEN);
-       status = be_cmd_mac_addr_query(adapter, mac,
+
+       if (be_physfn(adapter)) {
+               status = be_cmd_mac_addr_query(adapter, mac,
                        MAC_ADDRESS_TYPE_NETWORK, true /*permanent */, 0);
-       if (status)
-               return status;
 
-       if (!is_valid_ether_addr(mac))
-               return -EADDRNOTAVAIL;
+               if (status)
+                       return status;
+
+               if (!is_valid_ether_addr(mac))
+                       return -EADDRNOTAVAIL;
 
-       memcpy(adapter->netdev->dev_addr, mac, ETH_ALEN);
-       memcpy(adapter->netdev->perm_addr, mac, ETH_ALEN);
+               memcpy(adapter->netdev->dev_addr, mac, ETH_ALEN);
+               memcpy(adapter->netdev->perm_addr, mac, ETH_ALEN);
+       }
 
        if (adapter->cap & 0x400)
                adapter->max_vlans = BE_NUM_VLANS_SUPPORTED/4;
@@ -2296,6 +2436,7 @@ static int __devinit be_probe(struct pci_dev *pdev,
        struct be_adapter *adapter;
        struct net_device *netdev;
 
+
        status = pci_enable_device(pdev);
        if (status)
                goto do_none;
@@ -2344,24 +2485,28 @@ static int __devinit be_probe(struct pci_dev *pdev,
                }
        }
 
+       be_sriov_enable(adapter);
+
        status = be_ctrl_init(adapter);
        if (status)
                goto free_netdev;
 
        /* sync up with fw's ready state */
-       status = be_cmd_POST(adapter);
-       if (status)
-               goto ctrl_clean;
+       if (be_physfn(adapter)) {
+               status = be_cmd_POST(adapter);
+               if (status)
+                       goto ctrl_clean;
+
+               status = be_cmd_reset_function(adapter);
+               if (status)
+                       goto ctrl_clean;
+       }
 
        /* tell fw we're ready to fire cmds */
        status = be_cmd_fw_init(adapter);
        if (status)
                goto ctrl_clean;
 
-       status = be_cmd_reset_function(adapter);
-       if (status)
-               goto ctrl_clean;
-
        status = be_stats_init(adapter);
        if (status)
                goto ctrl_clean;
@@ -2391,6 +2536,7 @@ ctrl_clean:
        be_ctrl_cleanup(adapter);
 free_netdev:
        be_msix_disable(adapter);
+       be_sriov_disable(adapter);
        free_netdev(adapter->netdev);
        pci_set_drvdata(pdev, NULL);
 rel_reg:
@@ -2587,6 +2733,13 @@ static int __init be_init_module(void)
                rx_frag_size = 2048;
        }
 
+       if (num_vfs > 32) {
+               printk(KERN_WARNING DRV_NAME
+                       " : Module param num_vfs must not be greater than 32."
+                       "Using 32\n");
+               num_vfs = 32;
+       }
+
        return pci_register_driver(&be_driver);
 }
 module_init(be_init_module);
index 587f93c..c488cea 100644 (file)
@@ -812,14 +812,14 @@ static void bfin_mac_timeout(struct net_device *dev)
 static void bfin_mac_multicast_hash(struct net_device *dev)
 {
        u32 emac_hashhi, emac_hashlo;
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
        char *addrs;
        u32 crc;
 
        emac_hashhi = emac_hashlo = 0;
 
-       netdev_for_each_mc_addr(dmi, dev) {
-               addrs = dmi->dmi_addr;
+       netdev_for_each_mc_addr(ha, dev) {
+               addrs = ha->addr;
 
                /* skip non-multicast addresses */
                if (!(*addrs & 1))
index 598b007..44ceecf 100644 (file)
@@ -972,7 +972,7 @@ bmac_remove_multi(struct net_device *dev,
  */
 static void bmac_set_multicast(struct net_device *dev)
 {
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
        struct bmac_data *bp = netdev_priv(dev);
        int num_addrs = netdev_mc_count(dev);
        unsigned short rx_cfg;
@@ -1001,8 +1001,8 @@ static void bmac_set_multicast(struct net_device *dev)
                        rx_cfg = bmac_rx_on(dev, 0, 0);
                        XXDEBUG(("bmac: multi disabled, rx_cfg=%#08x\n", rx_cfg));
                } else {
-                       netdev_for_each_mc_addr(dmi, dev)
-                               bmac_addhash(bp, dmi->dmi_addr);
+                       netdev_for_each_mc_addr(ha, dev)
+                               bmac_addhash(bp, ha->addr);
                        bmac_update_hash_table_mask(dev, bp);
                        rx_cfg = bmac_rx_on(dev, 1, 0);
                        XXDEBUG(("bmac: multi enabled, rx_cfg=%#08x\n", rx_cfg));
@@ -1016,7 +1016,7 @@ static void bmac_set_multicast(struct net_device *dev)
 
 static void bmac_set_multicast(struct net_device *dev)
 {
-       struct dev_mc_list *dmi;
+       struct netdev_hw_addr *ha;
        char *addrs;
        int i;
        unsigned short rx_cfg;
@@ -1040,8 +1040,8 @@ static void bmac_set_multicast(struct net_device *dev)
 
                for(i = 0; i < 4; i++) hash_table[i] = 0;
 
-               netdev_for_each_mc_addr(dmi, dev) {
-                       addrs = dmi->dmi_addr;
+               netdev_for_each_mc_addr(ha, dev) {
+                       addrs = ha->addr;
 
                        if(!(*addrs & 1))
                                continue;
index a257bab..53326fe 100644 (file)
@@ -2670,7 +2670,7 @@ bnx2_alloc_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
        }
 
        rx_pg->page = page;
-       pci_unmap_addr_set(rx_pg, mapping, mapping);
+       dma_unmap_addr_set(rx_pg, mapping, mapping);
        rxbd->rx_bd_haddr_hi = (u64) mapping >> 32;
        rxbd->rx_bd_haddr_lo = (u64) mapping & 0xffffffff;
        return 0;
@@ -2685,7 +2685,7 @@ bnx2_free_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
        if (!page)
                return;
 
-       pci_unmap_page(bp->pdev, pci_unmap_addr(rx_pg, mapping), PAGE_SIZE,
+       pci_unmap_page(bp->pdev, dma_unmap_addr(rx_pg, mapping), PAGE_SIZE,
                       PCI_DMA_FROMDEVICE);
 
        __free_page(page);
@@ -2717,7 +2717,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
        }
 
        rx_buf->skb = skb;
-       pci_unmap_addr_set(rx_buf, mapping, mapping);
+       dma_unmap_addr_set(rx_buf, mapping, mapping);
 
        rxbd->rx_bd_haddr_hi = (u64) mapping >> 32;
        rxbd->rx_bd_haddr_lo = (u64) mapping & 0xffffffff;
@@ -2816,7 +2816,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
                        }
                }
 
-               pci_unmap_single(bp->pdev, pci_unmap_addr(tx_buf, mapping),
+               pci_unmap_single(bp->pdev, dma_unmap_addr(tx_buf, mapping),
                        skb_headlen(skb), PCI_DMA_TODEVICE);
 
                tx_buf->skb = NULL;
@@ -2826,7 +2826,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
                        sw_cons = NEXT_TX_BD(sw_cons);
 
                        pci_unmap_page(bp->pdev,
-                               pci_unmap_addr(
+                               dma_unmap_addr(
                                        &txr->tx_buf_ring[TX_RING_IDX(sw_cons)],
                                        mapping),
                                skb_shinfo(skb)->frags[i].size,
@@ -2908,8 +2908,8 @@ bnx2_reuse_rx_skb_pages(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
                if (prod != cons) {
                        prod_rx_pg->page = cons_rx_pg->page;
                        cons_rx_pg->page = NULL;
-                       pci_unmap_addr_set(prod_rx_pg, mapping,
-                               pci_unmap_addr(cons_rx_pg, mapping));
+                       dma_unmap_addr_set(prod_rx_pg, mapping,
+                               dma_unmap_addr(cons_rx_pg, mapping));
 
                        prod_bd->rx_bd_haddr_hi = cons_bd->rx_bd_haddr_hi;
                        prod_bd->rx_bd_haddr_lo = cons_bd->rx_bd_haddr_lo;
@@ -2933,7 +2933,7 @@ bnx2_reuse_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
        prod_rx_buf = &rxr->rx_buf_ring[prod];
 
        pci_dma_sync_single_for_device(bp->pdev,
-               pci_unmap_addr(cons_rx_buf, mapping),
+               dma_unmap_addr(cons_rx_buf, mapping),
                BNX2_RX_OFFSET + BNX2_RX_COPY_THRESH, PCI_DMA_FROMDEVICE);
 
        rxr->rx_prod_bseq += bp->rx_buf_use_size;
@@ -2943,8 +2943,8 @@ bnx2_reuse_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
        if (cons == prod)
                return;
 
-       pci_unmap_addr_set(prod_rx_buf, mapping,
-                       pci_unmap_addr(cons_rx_buf, mapping));
+       dma_unmap_addr_set(prod_rx_buf, mapping,
+                       dma_unmap_addr(cons_rx_buf, mapping));
 
        cons_bd = &rxr->rx_desc_ring[RX_RING(cons)][RX_IDX(cons)];
        prod_bd = &rxr->rx_desc_ring[RX_RING(prod)][RX_IDX(prod)];
@@ -3017,7 +3017,7 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, struct sk_buff *skb,
                        /* Don't unmap yet.  If we're unable to allocate a new
                         * page, we need to recycle the page and the DMA addr.
                         */
-                       mapping_old = pci_unmap_addr(rx_pg, mapping);
+                       mapping_old = dma_unmap_addr(rx_pg, mapping);
                        if (i == pages - 1)
                                frag_len -= 4;
 
@@ -3098,7 +3098,7 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
 
                rx_buf->skb = NULL;
 
-               dma_addr = pci_unmap_addr(rx_buf, mapping);
+               dma_addr = dma_unmap_addr(rx_buf, mapping);
 
                pci_dma_sync_single_for_cpu(bp->pdev, dma_addr,
                        BNX2_RX_OFFSET + BNX2_RX_COPY_THRESH,
@@ -3546,7 +3546,6 @@ bnx2_set_rx_mode(struct net_device *dev)
        }
        else {
                /* Accept one or more multicast(s). */
-               struct dev_mc_list *mclist;
                u32 mc_filter[NUM_MC_HASH_REGISTERS];
                u32 regidx;
                u32 bit;
@@ -3554,8 +3553,8 @@ bnx2_set_rx_mode(struct net_device *dev)
 
                memset(mc_filter, 0, 4 * NUM_MC_HASH_REGISTERS);
 
-               netdev_for_each_mc_addr(mclist, dev) {
-                       crc = ether_crc_le(ETH_ALEN, mclist->dmi_addr);
+               netdev_for_each_mc_addr(ha, dev) {
+                       crc = ether_crc_le(ETH_ALEN, ha->addr);
                        bit = crc & 0xff;
                        regidx = (bit & 0xe0) >> 5;
                        bit &= 0x1f;
@@ -5312,7 +5311,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp)
                        }
 
                        pci_unmap_single(bp->pdev,
-                                        pci_unmap_addr(tx_buf, mapping),
+                                        dma_unmap_addr(tx_buf, mapping),
                                         skb_headlen(skb),
                                         PCI_DMA_TODEVICE);
 
@@ -5323,7 +5322,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp)
                        for (k = 0; k < last; k++, j++) {
                                tx_buf = &txr->tx_buf_ring[TX_RING_IDX(j)];
                                pci_unmap_page(bp->pdev,
-                                       pci_unmap_addr(tx_buf, mapping),
+                                       dma_unmap_addr(tx_buf, mapping),
                                        skb_shinfo(skb)->frags[k].size,
                                        PCI_DMA_TODEVICE);
                        }
@@ -5353,7 +5352,7 @@ bnx2_free_rx_skbs(struct bnx2 *bp)
                                continue;
 
                        pci_unmap_single(bp->pdev,
-                                        pci_unmap_addr(rx_buf, mapping),
+                                        dma_unmap_addr(rx_buf, mapping),
                                         bp->rx_buf_use_size,
                                         PCI_DMA_FROMDEVICE);
 
@@ -5763,7 +5762,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
        skb_reserve(rx_skb, BNX2_RX_OFFSET);
 
        pci_dma_sync_single_for_cpu(bp->pdev,
-               pci_unmap_addr(rx_buf, mapping),
+               dma_unmap_addr(rx_buf, mapping),
                bp->rx_buf_size, PCI_DMA_FROMDEVICE);
 
        if (rx_hdr->l2_fhdr_status &
@@ -6423,7 +6422,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        tx_buf = &txr->tx_buf_ring[ring_prod];
        tx_buf->skb = skb;
-       pci_unmap_addr_set(tx_buf, mapping, mapping);
+       dma_unmap_addr_set(tx_buf, mapping, mapping);
 
        txbd = &txr->tx_desc_ring[ring_prod];
 
@@ -6448,7 +6447,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        len, PCI_DMA_TODEVICE);
                if (pci_dma_mapping_error(bp->pdev, mapping))
                        goto dma_error;
-               pci_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping,
+               dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping,
                                   mapping);
 
                txbd->tx_bd_haddr_hi = (u64) mapping >> 32;
@@ -6485,7 +6484,7 @@ dma_error:
        ring_prod = TX_RING_IDX(prod);
        tx_buf = &txr->tx_buf_ring[ring_prod];
        tx_buf->skb = NULL;
-       pci_unmap_single(bp->pdev, pci_unmap_addr(tx_buf, mapping),
+       pci_unmap_single(bp->pdev, dma_unmap_addr(tx_buf, mapping),
                         skb_headlen(skb), PCI_DMA_TODEVICE);
 
        /* unmap remaining mapped pages */
@@ -6493,7 +6492,7 @@ dma_error:
                prod = NEXT_TX_BD(prod);
                ring_prod = TX_RING_IDX(prod);
                tx_buf = &txr->tx_buf_ring[ring_prod];
-               pci_unmap_page(bp->pdev, pci_unmap_addr(tx_buf, mapping),
+               pci_unmap_page(bp->pdev, dma_unmap_addr(tx_buf, mapping),
                               skb_shinfo(skb)->frags[i].size,
                               PCI_DMA_TODEVICE);
        }
index cd4b0e4..ab34a5d 100644 (file)
@@ -6551,17 +6551,17 @@ struct l2_fhdr {
 
 struct sw_bd {
        struct sk_buff          *skb;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 struct sw_pg {
        struct page             *page;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 struct sw_tx_bd {
        struct sk_buff          *skb;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
        unsigned short          is_gso;
        unsigned short          nr_frags;
 };
index 3c48a7a..ae9c89e 100644 (file)
@@ -163,7 +163,7 @@ do {                                                                 \
 
 struct sw_rx_bd {
        struct sk_buff  *skb;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 struct sw_tx_bd {
@@ -176,7 +176,7 @@ struct sw_tx_bd {
 
 struct sw_rx_page {
        struct page     *page;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 union db_prod {
index 32e79c3..ff70be8 100644 (file)
@@ -1594,7 +1594,7 @@ static u8 bnx2x_ext_phy_resolve_fc(struct link_params *params,
                                MDIO_AN_REG_ADV_PAUSE_MASK) >> 8;
                pause_result |= (lp_pause &
                                 MDIO_AN_REG_ADV_PAUSE_MASK) >> 10;
-               DP(NETIF_MSG_LINK, "Ext PHY pause result 0x%x \n",
+               DP(NETIF_MSG_LINK, "Ext PHY pause result 0x%x\n",
                   pause_result);
                bnx2x_pause_resolve(vars, pause_result);
                if (vars->flow_ctrl == BNX2X_FLOW_CTRL_NONE &&
@@ -1616,7 +1616,7 @@ static u8 bnx2x_ext_phy_resolve_fc(struct link_params *params,
                                MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH) >> 7;
 
                        bnx2x_pause_resolve(vars, pause_result);
-                       DP(NETIF_MSG_LINK, "Ext PHY CL37 pause result 0x%x \n",
+                       DP(NETIF_MSG_LINK, "Ext PHY CL37 pause result 0x%x\n",
                                 pause_re