]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'upstream-fixes' into upstream
authorJeff Garzik <jeff@garzik.org>
Thu, 21 Sep 2006 04:08:25 +0000 (00:08 -0400)
committerJeff Garzik <jeff@garzik.org>
Thu, 21 Sep 2006 04:08:25 +0000 (00:08 -0400)
354 files changed:
Documentation/networking/LICENSE.qla3xxx [new file with mode: 0644]
MAINTAINERS
drivers/isdn/i4l/Kconfig
drivers/net/3c501.c
drivers/net/3c501.h
drivers/net/3c503.c
drivers/net/3c503.h
drivers/net/3c505.c
drivers/net/3c505.h
drivers/net/3c507.c
drivers/net/3c509.c
drivers/net/3c515.c
drivers/net/3c523.c
drivers/net/3c523.h
drivers/net/3c527.c
drivers/net/3c527.h
drivers/net/3c59x.c
drivers/net/7990.c
drivers/net/7990.h
drivers/net/8139cp.c
drivers/net/8139too.c
drivers/net/82596.c
drivers/net/8390.c
drivers/net/8390.h
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/Space.c
drivers/net/a2065.c
drivers/net/a2065.h
drivers/net/ac3200.c
drivers/net/acenic.c
drivers/net/acenic.h
drivers/net/acenic_firmware.h
drivers/net/amd8111e.c
drivers/net/amd8111e.h
drivers/net/apne.c
drivers/net/arcnet/com20020-pci.c
drivers/net/ariadne.c
drivers/net/arm/at91_ether.c
drivers/net/arm/etherh.c
drivers/net/at1700.c
drivers/net/atari_bionet.c
drivers/net/atari_pamsnet.c
drivers/net/atarilance.c
drivers/net/atp.c
drivers/net/au1000_eth.c
drivers/net/au1000_eth.h
drivers/net/b44.c
drivers/net/bmac.c
drivers/net/bmac.h
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/bonding/bond_main.c
drivers/net/bsd_comp.c
drivers/net/cassini.c
drivers/net/cassini.h
drivers/net/chelsio/cxgb2.c
drivers/net/cris/eth_v10.c
drivers/net/cs89x0.c
drivers/net/cs89x0.h
drivers/net/de600.c
drivers/net/de620.c
drivers/net/declance.c
drivers/net/defxx.c
drivers/net/defxx.h
drivers/net/depca.c
drivers/net/depca.h
drivers/net/dgrs.c
drivers/net/dgrs.h
drivers/net/dgrs_asstruct.h
drivers/net/dgrs_bcomm.h
drivers/net/dgrs_ether.h
drivers/net/dgrs_i82596.h
drivers/net/dl2k.c
drivers/net/dl2k.h
drivers/net/dummy.c
drivers/net/e100.c
drivers/net/e1000/e1000.h
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.h
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_osdep.h
drivers/net/e1000/e1000_param.c
drivers/net/e2100.c
drivers/net/eepro.c
drivers/net/eepro100.c
drivers/net/eexpress.c
drivers/net/eexpress.h
drivers/net/ehea/Makefile [new file with mode: 0644]
drivers/net/ehea/ehea.h [new file with mode: 0644]
drivers/net/ehea/ehea_ethtool.c [new file with mode: 0644]
drivers/net/ehea/ehea_hcall.h [new file with mode: 0644]
drivers/net/ehea/ehea_hw.h [new file with mode: 0644]
drivers/net/ehea/ehea_main.c [new file with mode: 0644]
drivers/net/ehea/ehea_phyp.c [new file with mode: 0644]
drivers/net/ehea/ehea_phyp.h [new file with mode: 0644]
drivers/net/ehea/ehea_qmr.c [new file with mode: 0644]
drivers/net/ehea/ehea_qmr.h [new file with mode: 0644]
drivers/net/epic100.c
drivers/net/eql.c
drivers/net/eth16i.c
drivers/net/ewrk3.c
drivers/net/ewrk3.h
drivers/net/fealnx.c
drivers/net/fec.c
drivers/net/fec_8xx/fec_main.c
drivers/net/forcedeth.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/gianfar.c
drivers/net/gianfar.h
drivers/net/gianfar_ethtool.c
drivers/net/gianfar_mii.c
drivers/net/gianfar_mii.h
drivers/net/gianfar_sysfs.c
drivers/net/gt64240eth.h
drivers/net/gt96100eth.c
drivers/net/gt96100eth.h
drivers/net/hamachi.c
drivers/net/hp-plus.c
drivers/net/hp.c
drivers/net/hp100.c
drivers/net/hp100.h
drivers/net/hplance.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/ibmveth.c
drivers/net/ifb.c
drivers/net/ioc3-eth.c
drivers/net/irda/mcs7780.c
drivers/net/irda/w83977af_ir.c
drivers/net/isa-skeleton.c
drivers/net/iseries_veth.c
drivers/net/ixgb/ixgb.h
drivers/net/ixgb/ixgb_ethtool.c
drivers/net/ixgb/ixgb_hw.c
drivers/net/ixgb/ixgb_ids.h
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgb/ixgb_osdep.h
drivers/net/jazzsonic.c
drivers/net/lance.c
drivers/net/lasi_82596.c
drivers/net/lne390.c
drivers/net/loopback.c
drivers/net/lp486e.c
drivers/net/mac8390.c
drivers/net/mac89x0.c
drivers/net/mace.c
drivers/net/macmace.c
drivers/net/macsonic.c
drivers/net/meth.c
drivers/net/mii.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/myri10ge/myri10ge_mcp.h
drivers/net/myri_code.h
drivers/net/myri_sbus.c
drivers/net/natsemi.c
drivers/net/ne-h8300.c
drivers/net/ne.c
drivers/net/ne2.c
drivers/net/ne2k-pci.c
drivers/net/ne3210.c
drivers/net/netx-eth.c
drivers/net/ni5010.c
drivers/net/ni52.c
drivers/net/ni52.h
drivers/net/ni65.c
drivers/net/ni65.h
drivers/net/ns83820.c
drivers/net/oaknet.c
drivers/net/pci-skeleton.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/ibmtr_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/pcnet32.c
drivers/net/phy/fixed.c
drivers/net/phy/smsc.c
drivers/net/phy/vitesse.c
drivers/net/plip.c
drivers/net/ppp_async.c
drivers/net/ppp_deflate.c
drivers/net/ppp_generic.c
drivers/net/ppp_synctty.c
drivers/net/pppoe.c
drivers/net/qla3xxx.c [new file with mode: 0644]
drivers/net/qla3xxx.h [new file with mode: 0644]
drivers/net/r8169.c
drivers/net/rionet.c
drivers/net/rrunner.c
drivers/net/rrunner.h
drivers/net/s2io-regs.h
drivers/net/s2io.c
drivers/net/s2io.h
drivers/net/saa9730.c
drivers/net/saa9730.h
drivers/net/sb1000.c
drivers/net/sb1250-mac.c
drivers/net/seeq8005.c
drivers/net/seeq8005.h
drivers/net/sgiseeq.h
drivers/net/shaper.c
drivers/net/sis190.c
drivers/net/sis900.c
drivers/net/sis900.h
drivers/net/sk98lin/skethtool.c
drivers/net/sk98lin/skge.c
drivers/net/sk_mca.c
drivers/net/sk_mca.h
drivers/net/skfp/skfddi.c
drivers/net/skge.c
drivers/net/skge.h
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/slhc.c
drivers/net/slip.c
drivers/net/slip.h
drivers/net/smc-mca.c
drivers/net/smc-ultra.c
drivers/net/smc-ultra32.c
drivers/net/smc911x.c
drivers/net/smc9194.c
drivers/net/smc9194.h
drivers/net/smc91x.c
drivers/net/sonic.c
drivers/net/sonic.h
drivers/net/spider_net.h
drivers/net/spider_net_ethtool.c
drivers/net/starfire.c
drivers/net/stnic.c
drivers/net/sun3_82586.c
drivers/net/sun3_82586.h
drivers/net/sun3lance.c
drivers/net/sunbmac.c
drivers/net/sundance.c
drivers/net/sungem.c
drivers/net/sungem.h
drivers/net/sungem_phy.c
drivers/net/sungem_phy.h
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/tc35815.c
drivers/net/tg3.c
drivers/net/tlan.c
drivers/net/tlan.h
drivers/net/tokenring/3c359.c
drivers/net/tokenring/lanstreamer.c
drivers/net/tulip/21142.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/de4x5.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/eeprom.c
drivers/net/tulip/interrupt.c
drivers/net/tulip/media.c
drivers/net/tulip/pnic.c
drivers/net/tulip/pnic2.c
drivers/net/tulip/timer.c
drivers/net/tulip/tulip.h
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/tulip/xircom_tulip_cb.c
drivers/net/tun.c
drivers/net/typhoon-firmware.h
drivers/net/typhoon.c
drivers/net/typhoon.h
drivers/net/ucc_geth.c
drivers/net/via-rhine.c
drivers/net/via-velocity.c
drivers/net/via-velocity.h
drivers/net/wan/cycx_main.c
drivers/net/wan/dlci.c
drivers/net/wan/dscc4.c
drivers/net/wan/farsync.c
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/pc300_drv.c
drivers/net/wan/pci200syn.c
drivers/net/wan/sdla.c
drivers/net/wan/wanxl.c
drivers/net/wd.c
drivers/net/wireless/Kconfig
drivers/net/wireless/airo.c
drivers/net/wireless/atmel_pci.c
drivers/net/wireless/bcm43xx/bcm43xx.h
drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
drivers/net/wireless/bcm43xx/bcm43xx_debugfs.h
drivers/net/wireless/bcm43xx/bcm43xx_dma.c
drivers/net/wireless/bcm43xx/bcm43xx_dma.h
drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
drivers/net/wireless/bcm43xx/bcm43xx_ethtool.h
drivers/net/wireless/bcm43xx/bcm43xx_leds.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/bcm43xx/bcm43xx_main.h
drivers/net/wireless/bcm43xx/bcm43xx_phy.c
drivers/net/wireless/bcm43xx/bcm43xx_pio.c
drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
drivers/net/wireless/bcm43xx/bcm43xx_wx.c
drivers/net/wireless/bcm43xx/bcm43xx_xmit.c
drivers/net/wireless/hostap/hostap.h
drivers/net/wireless/hostap/hostap_cs.c
drivers/net/wireless/hostap/hostap_ioctl.c
drivers/net/wireless/ipw2100.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/ipw2200.h
drivers/net/wireless/orinoco.c
drivers/net/wireless/orinoco.h
drivers/net/wireless/orinoco_nortel.c
drivers/net/wireless/orinoco_pci.c
drivers/net/wireless/orinoco_plx.c
drivers/net/wireless/orinoco_tmd.c
drivers/net/wireless/prism54/isl_ioctl.c
drivers/net/wireless/prism54/isl_ioctl.h
drivers/net/wireless/prism54/islpci_dev.c
drivers/net/wireless/prism54/islpci_dev.h
drivers/net/wireless/prism54/islpci_hotplug.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/zd1211rw/Makefile
drivers/net/wireless/zd1211rw/zd_chip.c
drivers/net/wireless/zd1211rw/zd_chip.h
drivers/net/wireless/zd1211rw/zd_def.h
drivers/net/wireless/zd1211rw/zd_ieee80211.h
drivers/net/wireless/zd1211rw/zd_mac.c
drivers/net/wireless/zd1211rw/zd_mac.h
drivers/net/wireless/zd1211rw/zd_netdev.c
drivers/net/wireless/zd1211rw/zd_rf.c
drivers/net/wireless/zd1211rw/zd_rf.h
drivers/net/wireless/zd1211rw/zd_rf_al2230.c
drivers/net/wireless/zd1211rw/zd_rf_al7230b.c [new file with mode: 0644]
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/net/wireless/zd1211rw/zd_usb.h
drivers/net/yellowfin.c
drivers/net/znet.c
include/linux/netdevice.h
include/net/ieee80211.h
include/net/ieee80211softmac.h
net/core/ethtool.c
net/ieee80211/ieee80211_crypt_ccmp.c
net/ieee80211/ieee80211_crypt_tkip.c
net/ieee80211/ieee80211_crypt_wep.c
net/ieee80211/ieee80211_rx.c
net/ieee80211/ieee80211_tx.c
net/ieee80211/softmac/ieee80211softmac_assoc.c
net/ieee80211/softmac/ieee80211softmac_io.c
net/ieee80211/softmac/ieee80211softmac_module.c
net/ieee80211/softmac/ieee80211softmac_priv.h

diff --git a/Documentation/networking/LICENSE.qla3xxx b/Documentation/networking/LICENSE.qla3xxx
new file mode 100644 (file)
index 0000000..2f2077e
--- /dev/null
@@ -0,0 +1,46 @@
+Copyright (c)  2003-2006 QLogic Corporation
+QLogic Linux Networking HBA Driver
+
+This program includes a device driver for Linux 2.6 that may be
+distributed with QLogic hardware specific firmware binary file.
+You may modify and redistribute the device driver code under the
+GNU General Public License as published by the Free Software
+Foundation (version 2 or a later version).
+
+You may redistribute the hardware specific firmware binary file
+under the following terms:
+
+       1. Redistribution of source code (only if applicable),
+          must retain the above copyright notice, this list of
+          conditions and the following disclaimer.
+
+       2. Redistribution in binary form must reproduce the above
+          copyright notice, this list of conditions and the
+          following disclaimer in the documentation and/or other
+          materials provided with the distribution.
+
+       3. The name of QLogic Corporation may not be used to
+          endorse or promote products derived from this software
+          without specific prior written permission
+
+REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE,
+THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT
+CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR
+OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
+TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN
+ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN
+COMBINATION WITH THIS PROGRAM.
+
index a34c53c08742359258033294993de8c6e3a3d0dd..7a08cdbb246a4e12da9e8e7736723bbdf2eea942 100644 (file)
@@ -449,9 +449,9 @@ L:  linux-hams@vger.kernel.org
 W:     http://www.baycom.org/~tom/ham/ham.html
 S:     Maintained
 
-BCM43XX WIRELESS DRIVER
-P:     Michael Buesch
-M:     mb@bu3sch.de
+BCM43XX WIRELESS DRIVER (SOFTMAC BASED VERSION)
+P:     Larry Finger
+M:     Larry.Finger@lwfinger.net
 P:     Stefano Brivio
 M:     st3@riseup.net
 W:     http://bcm43xx.berlios.de/
@@ -2366,6 +2366,12 @@ M:       linux-driver@qlogic.com
 L:     linux-scsi@vger.kernel.org
 S:     Supported
 
+QLOGIC QLA3XXX NETWORK DRIVER
+P:     Ron Mercer
+M:     linux-driver@qlogic.com
+L:     netdev@vger.kernel.org
+S:     Supported
+
 QNX4 FILESYSTEM
 P:     Anders Larsen
 M:     al@alarsen.net
@@ -2616,6 +2622,18 @@ P:       Nicolas Pitre
 M:     nico@cam.org
 S:     Maintained
 
+SOFTMAC LAYER (IEEE 802.11)
+P:     Johannes Berg
+M:     johannes@sipsolutions.net
+P:     Joe Jezak
+M:     josejx@gentoo.org
+P:     Daniel Drake
+M:     dsd@gentoo.org
+W:     http://softmac.sipsolutions.net/
+L:     softmac-dev@sipsolutions.net
+L:     netdev@vger.kernel.org
+S:     Maintained
+
 SOFTWARE RAID (Multiple Disks) SUPPORT
 P:     Ingo Molnar
 M:     mingo@redhat.com
@@ -2897,8 +2915,8 @@ W:        http://www.auk.cx/tms380tr/
 S:     Maintained
 
 TULIP NETWORK DRIVER
-P:     Jeff Garzik
-M:     jgarzik@pobox.com
+P:     Valerie Henson
+M:     val_henson@linux.intel.com
 L:     tulip-users@lists.sourceforge.net
 W:     http://sourceforge.net/projects/tulip/
 S:     Maintained
@@ -3349,6 +3367,15 @@ W:       http://www.qsl.net/dl1bke/
 L:     linux-hams@vger.kernel.org
 S:     Maintained
 
+ZD1211RW WIRELESS DRIVER
+P:     Daniel Drake
+M:     dsd@gentoo.org
+P:     Ulrich Kunitz
+M:     kune@deine-taler.de
+W:     http://zd1211.ath.cx/wiki/DriverRewrite
+L:     zd1211-devs@lists.sourceforge.net (subscribers-only)
+S:     Maintained
+
 ZF MACHZ WATCHDOG
 P:     Fernando Fuganti
 M:     fuganti@netbank.com.br
index a4f7288a1fc80efff26c7af1f1a57fddec92e365..3ef567b99c740e22e85570d8cc2fec1ed239a5b3 100644 (file)
@@ -5,6 +5,7 @@
 config ISDN_PPP
        bool "Support synchronous PPP"
        depends on INET
+       select SLHC
        help
          Over digital connections such as ISDN, there is no need to
          synchronize sender and recipient's clocks with start and stop bits
index 07136ec423bd1bf0c5daa97f165a8f6ac1030b74..1b82bccd8c713976926ad5bf2649adfea039165c 100644 (file)
     with a TX-TX optimisation to see if we can touch 180-200K/second as seems
     theoretically maximum.
                19950402 Alan Cox <Alan.Cox@linux.org>
-               
-    Cleaned up for 2.3.x because we broke SMP now. 
+
+    Cleaned up for 2.3.x because we broke SMP now.
                20000208 Alan Cox <alan@redhat.com>
 
     Check up pass for 2.5. Nothing significant changed
                20021009 Alan Cox <alan@redhat.com>
 
-    Fixed zero fill corner case 
+    Fixed zero fill corner case
                20030104 Alan Cox <alan@redhat.com>
-               
-               
+
+
    For the avoidance of doubt the "preferred form" of this code is one which
    is in an open non patent encumbered format. Where cryptographic key signing
    forms part of the process of creating an executable the information
@@ -58,7 +58,7 @@
  *  Some documentation is available from 3Com. Due to the boards age
  *  standard responses when you ask for this will range from 'be serious'
  *  to 'give it to a museum'. The documentation is incomplete and mostly
- *  of historical interest anyway. 
+ *  of historical interest anyway.
  *
  *  The basic system is a single buffer which can be used to receive or
  *  transmit a packet. A third command mode exists when you are setting
@@ -80,7 +80,7 @@
  *  out with those too).
  *
  * DOC: Problems
- *  
+ *
  *  There are a wide variety of undocumented error returns from the card
  *  and you basically have to kick the board and pray if they turn up. Most
  *  only occur under extreme load or if you do something the board doesn't
@@ -120,7 +120,6 @@ static const char version[] =
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/errno.h>
-#include <linux/config.h>      /* for CONFIG_IP_MULTICAST */
 #include <linux/spinlock.h>
 #include <linux/ethtool.h>
 #include <linux/delay.h>
@@ -146,7 +145,7 @@ static int mem_start;
 
 /**
  * el1_probe:          -       probe for a 3c501
- * @dev: The device structure passed in to probe. 
+ * @dev: The device structure passed in to probe.
  *
  * This can be called from two places. The network layer will probe using
  * a device structure passed in with the probe information completed. For a
@@ -156,7 +155,7 @@ static int mem_start;
  * Returns 0 on success. ENXIO if asked not to probe and ENODEV if asked to
  * probe and failing to find anything.
  */
+
 struct net_device * __init el1_probe(int unit)
 {
        struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
@@ -201,7 +200,7 @@ out:
 }
 
 /**
- *     el1_probe1: 
+ *     el1_probe1:
  *     @dev: The device structure to use
  *     @ioaddr: An I/O address to probe at.
  *
@@ -308,7 +307,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
        memset(dev->priv, 0, sizeof(struct net_local));
        lp = netdev_priv(dev);
        spin_lock_init(&lp->lock);
-       
+
        /*
         *      The EL1-specific entries in the device structure.
         */
@@ -329,7 +328,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
  *     @dev: device that is being opened
  *
  *     When an ifconfig is issued which changes the device flags to include
- *     IFF_UP this function is called. It is only called when the change 
+ *     IFF_UP this function is called. It is only called when the change
  *     occurs, not when the interface remains up. #el1_close will be called
  *     when it goes down.
  *
@@ -368,12 +367,12 @@ static int el_open(struct net_device *dev)
  * violence and prayer
  *
  */
+
 static void el_timeout(struct net_device *dev)
 {
        struct net_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
+
        if (el_debug)
                printk (KERN_DEBUG "%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n",
                        dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS));
@@ -386,7 +385,7 @@ static void el_timeout(struct net_device *dev)
        netif_wake_queue(dev);
 }
 
+
 /**
  * el_start_xmit:
  * @skb: The packet that is queued to be sent
@@ -422,7 +421,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
         */
 
        spin_lock_irqsave(&lp->lock, flags);
-       
+
        /*
         *      Avoid timer-based retransmission conflicts.
         */
@@ -435,10 +434,10 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
                int pad = 0;
                int gp_start;
                unsigned char *buf = skb->data;
-               
+
                if (len < ETH_ZLEN)
                        pad = ETH_ZLEN - len;
-                       
+
                gp_start = 0x800 - ( len + pad );
 
                lp->tx_pkt_start = gp_start;
@@ -464,7 +463,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
                 */
 
                spin_unlock_irqrestore(&lp->lock, flags);
-               
+
                outw(0x00, RX_BUF_CLR);         /* Set rx packet area to 0. */
                outw(gp_start, GP_LOW);         /* aim - packet will be loaded into buffer start */
                outsb(DATAPORT,buf,len);        /* load buffer (usual thing each byte increments the pointer) */
@@ -473,7 +472,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
                                outb(0, DATAPORT);
                }
                outw(gp_start, GP_LOW);         /* the board reuses the same register */
-       
+
                if(lp->loading != 2)
                {
                        outb(AX_XMIT, AX_CMD);          /* fire ... Trigger xmit.  */
@@ -499,7 +498,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
  * @dev_id: The 3c501 that burped
  * @regs: Register data (surplus to our requirements)
  *
- * Handle the ether interface interrupts. The 3c501 needs a lot more 
+ * Handle the ether interface interrupts. The 3c501 needs a lot more
  * hand holding than most cards. In particular we get a transmit interrupt
  * with a collision error because the board firmware isnt capable of rewinding
  * its own transmit buffer pointers. It can however count to 16 for us.
@@ -527,7 +526,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        lp = netdev_priv(dev);
 
        spin_lock(&lp->lock);
-       
+
        /*
         *      What happened ?
         */
@@ -795,7 +794,7 @@ static void  el_reset(struct net_device *dev)
  * of the rest will be cleaned up by #el1_open. Always returns 0 indicating
  * a success.
  */
+
 static int el1_close(struct net_device *dev)
 {
        int ioaddr = dev->base_addr;
@@ -804,7 +803,7 @@ static int el1_close(struct net_device *dev)
                printk(KERN_INFO "%s: Shutting down Ethernet card at %#x.\n", dev->name, ioaddr);
 
        netif_stop_queue(dev);
-       
+
        /*
         *      Free and disable the IRQ.
         */
@@ -825,7 +824,7 @@ static int el1_close(struct net_device *dev)
  *
  * Returns the statistics for the card from the card private data
  */
+
 static struct net_device_stats *el1_get_stats(struct net_device *dev)
 {
        struct net_local *lp = netdev_priv(dev);
@@ -836,7 +835,7 @@ static struct net_device_stats *el1_get_stats(struct net_device *dev)
  * set_multicast_list:
  * @dev: The device to adjust
  *
- * Set or clear the multicast filter for this adaptor to use the best-effort 
+ * Set or clear the multicast filter for this adaptor to use the best-effort
  * filtering supported. The 3c501 supports only three modes of filtering.
  * It always receives broadcasts and packets for itself. You can choose to
  * optionally receive all packets, or all multicast packets on top of this.
@@ -882,7 +881,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
        debug = level;
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
@@ -908,7 +907,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ number");
  * Returns 0 for success or -EIO if a card is not found. Returning an error
  * here also causes the module to be unloaded
  */
+
 int __init init_module(void)
 {
        dev_3c501 = el1_probe(-1);
@@ -919,11 +918,11 @@ int __init init_module(void)
 
 /**
  * cleanup_module:
- * 
+ *
  * The module is being unloaded. We unhook our network device from the system
  * and then free up the resources we took when the card was found.
  */
+
 void cleanup_module(void)
 {
        struct net_device *dev = dev_3c501;
index adb0588a4d79368bad7bc1ca7663f9cd8511a72e..39d33247475012a87204ebcd353e66685a40bc56 100644 (file)
@@ -13,7 +13,7 @@ static void el_reset(struct net_device *dev);
 static int  el1_close(struct net_device *dev);
 static struct net_device_stats *el1_get_stats(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
-static struct ethtool_ops netdev_ethtool_ops;
+static const struct ethtool_ops netdev_ethtool_ops;
 
 #define EL1_IO_EXTENT  16
 
@@ -37,7 +37,7 @@ struct net_local
        spinlock_t      lock;           /* Serializing lock */
 };
 
-\f
+
 #define RX_STATUS (ioaddr + 0x06)
 #define RX_CMD   RX_STATUS
 #define TX_STATUS (ioaddr + 0x07)
index cb5ef75450dc72c19b98a77c5c5f8ce9c39fc5c8..a34b2206132d2fb6d716419eddc0b20ee50b8a8f 100644 (file)
@@ -79,9 +79,9 @@ static void el2_block_input(struct net_device *dev, int count, struct sk_buff *s
                           int ring_offset);
 static void el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
                         int ring_page);
-static struct ethtool_ops netdev_ethtool_ops;
+static const struct ethtool_ops netdev_ethtool_ops;
+
 
-\f
 /* This routine probes for a memory-mapped 3c503 board by looking for
    the "location register" at the end of the jumpered boot PROM space.
    This works even if a PROM isn't there.
@@ -96,7 +96,7 @@ static int __init do_el2_probe(struct net_device *dev)
     int irq = dev->irq;
 
     SET_MODULE_OWNER(dev);
-    
+
     if (base_addr > 0x1ff)     /* Check a single specified location. */
        return el2_probe1(dev, base_addr);
     else if (base_addr != 0)           /* Don't probe at all. */
@@ -127,7 +127,7 @@ static int __init do_el2_probe(struct net_device *dev)
 
 /*  Try all of the locations that aren't obviously empty.  This touches
     a lot of locations, and is much riskier than the code above. */
-static int __init 
+static int __init
 el2_pio_probe(struct net_device *dev)
 {
     int i;
@@ -173,7 +173,7 @@ out:
 /* Probe for the Etherlink II card at I/O port base IOADDR,
    returning non-zero on success.  If found, set the station
    address and memory parameters in DEVICE. */
-static int __init 
+static int __init
 el2_probe1(struct net_device *dev, int ioaddr)
 {
     int i, iobase_reg, membase_reg, saved_406, wordlength, retval;
@@ -367,7 +367,7 @@ out:
     release_region(ioaddr, EL2_IO_EXTENT);
     return retval;
 }
-\f
+
 static int
 el2_open(struct net_device *dev)
 {
@@ -385,7 +385,7 @@ el2_open(struct net_device *dev)
                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, 
+                   && ((retval = request_irq(dev->irq = *irqp,
                    ei_interrupt, 0, dev->name, dev)) == 0))
                    break;
            }
@@ -666,7 +666,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
        sprintf(info->bus_info, "ISA 0x%lx", dev->base_addr);
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
 };
 
index b9f8a46f89b32ec743ad7a055629f5dbd977fd0f..e2367b82a2ece5a7a790f990b1c7807d6aa19e99 100644 (file)
@@ -14,7 +14,7 @@
 
 /* Shared memory management parameters. NB: The 8 bit cards have only
    one bank (MB1) which serves both Tx and Rx packet space. The 16bit
-   cards have 2 banks, MB0 for Tx packets, and MB1 for Rx packets. 
+   cards have 2 banks, MB0 for Tx packets, and MB1 for Rx packets.
    You choose which bank appears in the sh. mem window with EGACFR_MBSn */
 
 #define EL2_MB0_START_PG       (0x00)  /* EL2/16 Tx packets go in bank 0 */
@@ -82,7 +82,7 @@
        0       1       0       0x4000 -- bank 2, not used
        0       1       1       0x6000 -- bank 3, not used
 
-There was going to be a 32k card that used bank 2 and 3, but it 
+There was going to be a 32k card that used bank 2 and 3, but it
 never got produced.
 
 */
index 19c0b856c488097494f69c27ff14e2c3f615deeb..ab8230a68beaeb092228e131ce9aa278689ec16e 100644 (file)
@@ -315,11 +315,11 @@ static inline void check_3c505_dma(struct net_device *dev)
                spin_lock_irqsave(&adapter->lock, flags);
                adapter->dmaing = 0;
                adapter->busy = 0;
-               
+
                f=claim_dma_lock();
                disable_dma(dev->dma);
                release_dma_lock(f);
-               
+
                if (adapter->rx_active)
                        adapter->rx_active--;
                outb_control(adapter->hcr_val & ~(DMAE | TCEN | DIR), dev);
@@ -660,7 +660,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr)
 
        dev = dev_id;
        adapter = (elp_device *) dev->priv;
-       
+
        spin_lock(&adapter->lock);
 
        do {
@@ -712,7 +712,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr)
                timeout = jiffies + 3*HZ/100;
                while ((inb_status(dev->base_addr) & ACRF) != 0 && time_before(jiffies, timeout)) {
                        if (receive_pcb(dev, &adapter->irx_pcb)) {
-                               switch (adapter->irx_pcb.command) 
+                               switch (adapter->irx_pcb.command)
                                {
                                case 0:
                                        break;
@@ -889,7 +889,7 @@ static int elp_open(struct net_device *dev)
        adapter->send_pcb_semaphore = 0;
        adapter->rx_backlog.in = 0;
        adapter->rx_backlog.out = 0;
-       
+
        spin_lock_init(&adapter->lock);
 
        /*
@@ -1003,7 +1003,7 @@ static int send_packet(struct net_device *dev, struct sk_buff *skb)
        }
 
        adapter->stats.tx_bytes += nlen;
-       
+
        /*
         * send the adapter a transmit packet command. Ignore segment and offset
         * and make sure the length is even
@@ -1044,7 +1044,7 @@ static int send_packet(struct net_device *dev, struct sk_buff *skb)
        outb_control(adapter->hcr_val | DMAE | TCEN, dev);
        enable_dma(dev->dma);
        release_dma_lock(flags);
-       
+
        if (elp_debug >= 3)
                printk(KERN_DEBUG "%s: DMA transfer started\n", dev->name);
 
@@ -1054,7 +1054,7 @@ static int send_packet(struct net_device *dev, struct sk_buff *skb)
 /*
  *     The upper layer thinks we timed out
  */
+
 static void elp_timeout(struct net_device *dev)
 {
        elp_device *adapter = dev->priv;
@@ -1080,7 +1080,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        unsigned long flags;
        elp_device *adapter = dev->priv;
-       
+
        spin_lock_irqsave(&adapter->lock, flags);
        check_3c505_dma(dev);
 
@@ -1088,7 +1088,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
                printk(KERN_DEBUG "%s: request to send packet of length %d\n", dev->name, (int) skb->len);
 
        netif_stop_queue(dev);
-       
+
        /*
         * send the packet at skb->data for skb->len
         */
@@ -1169,7 +1169,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
        debug = level;
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
@@ -1235,7 +1235,7 @@ static void elp_set_mc_list(struct net_device *dev)
                printk(KERN_DEBUG "%s: request to set multicast list\n", dev->name);
 
        spin_lock_irqsave(&adapter->lock, flags);
-       
+
        if (!(dev->flags & (IFF_PROMISC | IFF_ALLMULTI))) {
                /* send a "load multicast list" command to the board, max 10 addrs/cmd */
                /* if num_addrs==0 the list will be cleared */
index 77dfeedff815c9b9e5e0816497baa1602142e511..1910cb1dc787c099bd59781d0f5ccb6083a81b0b 100644 (file)
@@ -72,7 +72,7 @@
 /*****************************************************************
  *
  *  timeout value
- *     this is a rough value used for loops to stop them from 
+ *     this is a rough value used for loops to stop them from
  *     locking up the whole machine in the case of failure or
  *     error conditions
  *
index 6039049259ed1c1e94e56d787fbfb4dd7b57bceb..8205a535c5b74e89ea2e48da9db9376c88ef5de4 100644 (file)
@@ -294,14 +294,14 @@ static void el16_tx_timeout (struct net_device *dev);
 
 static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad);
 static void init_82586_mem(struct net_device *dev);
-static struct ethtool_ops netdev_ethtool_ops;
+static const struct ethtool_ops netdev_ethtool_ops;
 static void init_rx_bufs(struct net_device *);
 
 static int io = 0x300;
 static int irq;
 static int mem_start;
 
-\f
+
 /* Check for a network adaptor of this type, and return '0' iff one exists.
        If dev->base_addr == 0, probe all likely locations.
        If dev->base_addr == 1, always return failure.
@@ -379,7 +379,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
        if (!request_region(ioaddr, EL16_IO_EXTENT, DRV_NAME))
                return -ENODEV;
 
-       if ((inb(ioaddr) != '*') || (inb(ioaddr + 1) != '3') || 
+       if ((inb(ioaddr) != '*') || (inb(ioaddr + 1) != '3') ||
            (inb(ioaddr + 2) != 'C') || (inb(ioaddr + 3) != 'O')) {
                retval = -ENODEV;
                goto out;
@@ -575,7 +575,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        while (lp->tx_pkts_in_ring) {
          unsigned short tx_status = readw(shmem+lp->tx_reap);
          if (!(tx_status & 0x8000)) {
-               if (net_debug > 5) 
+               if (net_debug > 5)
                        printk("Tx command incomplete (%#x).\n", lp->tx_reap);
                break;
          }
@@ -825,7 +825,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
        }
 
        /* Grimly block further packets if there has been insufficient reaping. */
-       if (++lp->tx_pkts_in_ring < NUM_TX_BUFS) 
+       if (++lp->tx_pkts_in_ring < NUM_TX_BUFS)
                netif_wake_queue(dev);
 }
 
@@ -919,7 +919,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
        debug = level;
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
@@ -953,7 +953,7 @@ cleanup_module(void)
 #endif /* MODULE */
 MODULE_LICENSE("GPL");
 
-\f
+
 /*
  * Local variables:
  *  compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -I/usr/src/linux/drivers/net -Wall -Wstrict-prototypes -O6 -m486 -c 3c507.c"
index cbdae54f715f297d1de8bee584401d0d77d60dc5..59c33925be62d2a90cba16c91f767718090bbd0f 100644 (file)
@@ -28,7 +28,7 @@
        FIXES:
                Alan Cox:       Removed the 'Unexpected interrupt' bug.
                Michael Meskes: Upgraded to Donald Becker's version 1.07.
-               Alan Cox:       Increased the eeprom delay. Regardless of 
+               Alan Cox:       Increased the eeprom delay. Regardless of
                                what the docs say some people definitely
                                get problems with lower (but in card spec)
                                delays
@@ -162,7 +162,7 @@ enum RxFilter {
 #define WN4_MEDIA      0x0A            /* Window 4: Various transcvr/media bits. */
 #define        MEDIA_TP        0x00C0          /* Enable link beat and jabber for 10baseT. */
 #define WN4_NETDIAG    0x06            /* Window 4: Net diagnostic */
-#define FD_ENABLE      0x8000          /* Enable full-duplex ("external loopback") */  
+#define FD_ENABLE      0x8000          /* Enable full-duplex ("external loopback") */
 
 /*
  * Must be a power of two (we use a binary and in the
@@ -200,7 +200,7 @@ static void set_multicast_list(struct net_device *dev);
 static void el3_tx_timeout (struct net_device *dev);
 static void el3_down(struct net_device *dev);
 static void el3_up(struct net_device *dev);
-static struct ethtool_ops ethtool_ops;
+static const struct ethtool_ops ethtool_ops;
 #ifdef EL3_SUSPEND
 static int el3_suspend(struct device *, pm_message_t);
 static int el3_resume(struct device *);
@@ -350,7 +350,7 @@ static int __init el3_common_init(struct net_device *dev)
        {
                const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
                printk("%s: 3c5x9 found at %#3.3lx, %s port, address ",
-                       dev->name, dev->base_addr, 
+                       dev->name, dev->base_addr,
                        if_names[(dev->if_port & 0x03)]);
        }
 
@@ -528,7 +528,7 @@ no_pnp:
        SET_MODULE_OWNER(dev);
 
        netdev_boot_setup_check(dev);
-       
+
        /* Set passed-in IRQ or I/O Addr. */
        if (dev->irq > 1  &&  dev->irq < 16)
                        irq = dev->irq;
@@ -630,7 +630,7 @@ static int __init el3_mca_probe(struct device *device)
        if_port = pos4 & 0x03;
 
        irq = mca_device_transform_irq(mdev, irq);
-       ioaddr = mca_device_transform_ioport(mdev, ioaddr); 
+       ioaddr = mca_device_transform_ioport(mdev, ioaddr);
        if (el3_debug > 2) {
                        printk("3c529: irq %d  ioaddr 0x%x  ifport %d\n", irq, ioaddr, if_port);
        }
@@ -667,7 +667,7 @@ static int __init el3_mca_probe(struct device *device)
        el3_cards++;
        return 0;
 }
-               
+
 #endif /* CONFIG_MCA */
 
 #ifdef CONFIG_EISA
@@ -684,7 +684,7 @@ static int __init el3_eisa_probe (struct device *device)
        /* Yeepee, The driver framework is calling us ! */
        edev = to_eisa_device (device);
        ioaddr = edev->base_addr;
-       
+
        if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509"))
                return -EBUSY;
 
@@ -751,7 +751,7 @@ static int __devexit el3_device_remove (struct device *device)
 static ushort read_eeprom(int ioaddr, int index)
 {
        outw(EEPROM_READ + index, ioaddr + 10);
-       /* Pause for at least 162 us. for the read to take place. 
+       /* Pause for at least 162 us. for the read to take place.
           Some chips seem to require much longer */
        mdelay(2);
        return inw(ioaddr + 12);
@@ -769,7 +769,7 @@ static ushort __init id_read_eeprom(int index)
        /* Pause for at least 162 us. for the read to take place. */
        /* Some chips seem to require much longer */
        mdelay(4);
-       
+
        for (bit = 15; bit >= 0; bit--)
                word = (word << 1) + (inb(id_port) & 0x01);
 
@@ -838,7 +838,7 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
        netif_stop_queue (dev);
 
        lp->stats.tx_bytes += skb->len;
-       
+
        if (el3_debug > 4) {
                printk("%s: el3_start_xmit(length = %u) called, status %4.4x.\n",
                           dev->name, skb->len, inw(ioaddr + EL3_STATUS));
@@ -879,11 +879,7 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
        outw(skb->len, ioaddr + TX_FIFO);
        outw(0x00, ioaddr + TX_FIFO);
        /* ... and the packet rounded to a doubleword. */
-#ifdef  __powerpc__
-       outsl_ns(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-#else
        outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-#endif
 
        dev->trans_start = jiffies;
        if (inw(ioaddr + TX_FREE) > 1536)
@@ -1024,7 +1020,7 @@ el3_get_stats(struct net_device *dev)
         *      This is fast enough not to bother with disable IRQ
         *      stuff.
         */
-        
+
        spin_lock_irqsave(&lp->lock, flags);
        update_stats(dev);
        spin_unlock_irqrestore(&lp->lock, flags);
@@ -1103,13 +1099,8 @@ el3_rx(struct net_device *dev)
                                skb_reserve(skb, 2);     /* Align IP on 16 byte */
 
                                /* 'skb->data' points to the start of sk_buff data area. */
-#ifdef  __powerpc__
-                               insl_ns(ioaddr+RX_FIFO, skb_put(skb,pkt_len),
-                                                          (pkt_len + 3) >> 2);
-#else
                                insl(ioaddr + RX_FIFO, skb_put(skb,pkt_len),
                                         (pkt_len + 3) >> 2);
-#endif
 
                                outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */
                                skb->protocol = eth_type_trans(skb,dev);
@@ -1168,7 +1159,7 @@ el3_close(struct net_device *dev)
 {
        int ioaddr = dev->base_addr;
        struct el3_private *lp = netdev_priv(dev);
-       
+
        if (el3_debug > 2)
                printk("%s: Shutting down ethercard.\n", dev->name);
 
@@ -1187,7 +1178,7 @@ el3_close(struct net_device *dev)
        return 0;
 }
 
-static int 
+static int
 el3_link_ok(struct net_device *dev)
 {
        int ioaddr = dev->base_addr;
@@ -1204,9 +1195,9 @@ el3_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
        u16 tmp;
        int ioaddr = dev->base_addr;
-       
+
        EL3WINDOW(0);
-       /* obtain current transceiver via WN4_MEDIA? */ 
+       /* obtain current transceiver via WN4_MEDIA? */
        tmp = inw(ioaddr + WN0_ADDR_CONF);
        ecmd->transceiver = XCVR_INTERNAL;
        switch (tmp >> 14) {
@@ -1349,7 +1340,7 @@ static void el3_set_msglevel(struct net_device *dev, u32 v)
        el3_debug = v;
 }
 
-static struct ethtool_ops ethtool_ops = {
+static const struct ethtool_ops ethtool_ops = {
        .get_drvinfo = el3_get_drvinfo,
        .get_settings = el3_get_settings,
        .set_settings = el3_set_settings,
@@ -1391,7 +1382,7 @@ el3_up(struct net_device *dev)
 {
        int i, sw_info, net_diag;
        int ioaddr = dev->base_addr;
-       
+
        /* Activating the board required and does no harm otherwise */
        outw(0x0001, ioaddr + 4);
 
@@ -1411,7 +1402,7 @@ el3_up(struct net_device *dev)
                /* Combine secondary sw_info word (the adapter level) and primary
                        sw_info word (duplex setting plus other useless bits) */
                EL3WINDOW(0);
-               sw_info = (read_eeprom(ioaddr, 0x14) & 0x400f) | 
+               sw_info = (read_eeprom(ioaddr, 0x14) & 0x400f) |
                        (read_eeprom(ioaddr, 0x0d) & 0xBff0);
 
                EL3WINDOW(4);
@@ -1483,7 +1474,7 @@ el3_suspend(struct device *pdev, pm_message_t state)
        struct net_device *dev;
        struct el3_private *lp;
        int ioaddr;
-       
+
        dev = pdev->driver_data;
        lp = netdev_priv(dev);
        ioaddr = dev->base_addr;
@@ -1507,7 +1498,7 @@ el3_resume(struct device *pdev)
        struct net_device *dev;
        struct el3_private *lp;
        int ioaddr;
-       
+
        dev = pdev->driver_data;
        lp = netdev_priv(dev);
        ioaddr = dev->base_addr;
@@ -1519,7 +1510,7 @@ el3_resume(struct device *pdev)
 
        if (netif_running(dev))
                netif_device_attach(dev);
-               
+
        spin_unlock_irqrestore(&lp->lock, flags);
        return 0;
 }
index aedfddf20cb32c77302903affa7e5584659003d4..91f2232e6050fbfe2f4e8caff253c3b99ed37b43 100644 (file)
        Annapolis MD 21403
 
 
-       2000/2/2- Added support for kernel-level ISAPnP 
+       2000/2/2- Added support for kernel-level ISAPnP
                by Stephen Frost <sfrost@snowman.net> and Alessandro Zummo
        Cleaned up for 2.3.x/softnet by Jeff Garzik and Alan Cox.
-       
+
        2001/11/17 - Added ethtool support (jgarzik)
-       
+
        2002/10/28 - Locking updates for 2.5 (alan@redhat.com)
 
 */
@@ -187,9 +187,9 @@ enum corkscrew_cmd {
        TotalReset = 0 << 11, SelectWindow = 1 << 11, StartCoax = 2 << 11,
        RxDisable = 3 << 11, RxEnable = 4 << 11, RxReset = 5 << 11,
        UpStall = 6 << 11, UpUnstall = (6 << 11) + 1, DownStall = (6 << 11) + 2,
-       DownUnstall = (6 << 11) + 3, RxDiscard = 8 << 11, TxEnable = 9 << 11, 
-       TxDisable = 10 << 11, TxReset = 11 << 11, FakeIntr = 12 << 11, 
-       AckIntr = 13 << 11, SetIntrEnb = 14 << 11, SetStatusEnb = 15 << 11, 
+       DownUnstall = (6 << 11) + 3, RxDiscard = 8 << 11, TxEnable = 9 << 11,
+       TxDisable = 10 << 11, TxReset = 11 << 11, FakeIntr = 12 << 11,
+       AckIntr = 13 << 11, SetIntrEnb = 14 << 11, SetStatusEnb = 15 << 11,
        SetRxFilter = 16 << 11, SetRxThreshold = 17 << 11,
        SetTxThreshold = 18 << 11, SetTxStart = 19 << 11, StartDMAUp = 20 << 11,
        StartDMADown = (20 << 11) + 1, StatsEnable = 21 << 11,
@@ -338,15 +338,15 @@ static struct media_table {
                mask:8,                 /* The transceiver-present bit in Wn3_Config. */
                next:8;                 /* The media type to try next. */
        short wait;                     /* Time before we check media status. */
-} media_tbl[] = {      
-       { "10baseT", Media_10TP, 0x08, XCVR_10base2, (14 * HZ) / 10 }, 
-       { "10Mbs AUI", Media_SQE, 0x20, XCVR_Default, (1 * HZ) / 10}, 
-       { "undefined", 0, 0x80, XCVR_10baseT, 10000}, 
-       { "10base2", 0, 0x10, XCVR_AUI, (1 * HZ) / 10}, 
-       { "100baseTX", Media_Lnk, 0x02, XCVR_100baseFx, (14 * HZ) / 10}, 
-       { "100baseFX", Media_Lnk, 0x04, XCVR_MII, (14 * HZ) / 10}, 
-       { "MII", 0, 0x40, XCVR_10baseT, 3 * HZ}, 
-       { "undefined", 0, 0x01, XCVR_10baseT, 10000}, 
+} media_tbl[] = {
+       { "10baseT", Media_10TP, 0x08, XCVR_10base2, (14 * HZ) / 10 },
+       { "10Mbs AUI", Media_SQE, 0x20, XCVR_Default, (1 * HZ) / 10},
+       { "undefined", 0, 0x80, XCVR_10baseT, 10000},
+       { "10base2", 0, 0x10, XCVR_AUI, (1 * HZ) / 10},
+       { "100baseTX", Media_Lnk, 0x02, XCVR_100baseFx, (14 * HZ) / 10},
+       { "100baseFX", Media_Lnk, 0x04, XCVR_MII, (14 * HZ) / 10},
+       { "MII", 0, 0x40, XCVR_10baseT, 3 * HZ},
+       { "undefined", 0, 0x01, XCVR_10baseT, 10000},
        { "Default", 0, 0xFF, XCVR_10baseT, 10000},
 };
 
@@ -379,10 +379,10 @@ static int corkscrew_close(struct net_device *dev);
 static void update_stats(int addr, struct net_device *dev);
 static struct net_device_stats *corkscrew_get_stats(struct net_device *dev);
 static void set_rx_mode(struct net_device *dev);
-static struct ethtool_ops netdev_ethtool_ops;
-\f
+static const struct ethtool_ops netdev_ethtool_ops;
 
-/* 
+
+/*
    Unfortunately maximizing the shared code between the integrated and
    module version of the driver results in a complicated set of initialization
    procedures.
@@ -612,7 +612,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
        printk(KERN_INFO "%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr);
 
        spin_lock_init(&vp->lock);
-       
+
        /* Read the station address from the EEPROM. */
        EL3WINDOW(0);
        for (i = 0; i < 0x18; i++) {
@@ -691,7 +691,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
 
        return register_netdev(dev);
 }
-\f
+
 
 static int corkscrew_open(struct net_device *dev)
 {
@@ -715,7 +715,7 @@ static int corkscrew_open(struct net_device *dev)
        } else if (vp->autoselect) {
                /* Find first available media type, starting with 100baseTx. */
                dev->if_port = 4;
-               while (!(vp->available_media & media_tbl[dev->if_port].mask)) 
+               while (!(vp->available_media & media_tbl[dev->if_port].mask))
                        dev->if_port = media_tbl[dev->if_port].next;
 
                if (corkscrew_debug > 1)
@@ -871,7 +871,7 @@ static void corkscrew_timer(unsigned long data)
                       dev->name, media_tbl[dev->if_port].name);
 
        spin_lock_irqsave(&vp->lock, flags);
-       
+
        {
                int old_window = inw(ioaddr + EL3_CMD) >> 13;
                int media_status;
@@ -911,7 +911,7 @@ static void corkscrew_timer(unsigned long data)
                                    media_tbl[dev->if_port].next;
                        }
                        while (!(vp->available_media & media_tbl[dev->if_port].mask));
-                       
+
                        if (dev->if_port == 8) {        /* Go back to default. */
                                dev->if_port = vp->default_media;
                                if (corkscrew_debug > 1)
@@ -940,7 +940,7 @@ static void corkscrew_timer(unsigned long data)
                }
                EL3WINDOW(old_window);
        }
-       
+
        spin_unlock_irqrestore(&vp->lock, flags);
        if (corkscrew_debug > 1)
                printk("%s: Media selection timer finished, %s.\n",
@@ -1026,7 +1026,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
                outw(DownStall, ioaddr + EL3_CMD);
                /* Wait for the stall to complete. */
                for (i = 20; i >= 0; i--)
-                       if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0) 
+                       if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0)
                                break;
                if (prev_entry)
                        prev_entry->next = isa_virt_to_bus(&vp->tx_ring[entry]);
@@ -1102,7 +1102,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
                                        int j;
                                        outw(TxReset, ioaddr + EL3_CMD);
                                        for (j = 20; j >= 0; j--)
-                                               if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress)) 
+                                               if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
                                                        break;
                                }
                                outw(TxEnable, ioaddr + EL3_CMD);
@@ -1130,7 +1130,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id,
        latency = inb(ioaddr + Timer);
 
        spin_lock(&lp->lock);
-       
+
        status = inw(ioaddr + EL3_STATUS);
 
        if (corkscrew_debug > 4)
@@ -1249,7 +1249,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id,
                outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);
 
        } while ((status = inw(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete));
-       
+
        spin_unlock(&lp->lock);
 
        if (corkscrew_debug > 4)
@@ -1308,7 +1308,7 @@ static int corkscrew_rx(struct net_device *dev)
                                vp->stats.rx_bytes += pkt_len;
                                /* Wait a limited time to go to next packet. */
                                for (i = 200; i >= 0; i--)
-                                       if (! (inw(ioaddr + EL3_STATUS) & CmdInProgress)) 
+                                       if (! (inw(ioaddr + EL3_STATUS) & CmdInProgress))
                                                break;
                                continue;
                        } else if (corkscrew_debug)
@@ -1561,13 +1561,13 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
        corkscrew_debug = level;
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
 };
 
-\f
+
 #ifdef MODULE
 void cleanup_module(void)
 {
@@ -1584,7 +1584,7 @@ void cleanup_module(void)
        }
 }
 #endif                         /* MODULE */
-\f
+
 /*
  * Local variables:
  *  compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c 3c515.c"
index 5dfd97f0ba9ea1b7efc15b856ddf7e0006021a0d..cf8a0bc3bf34c82be6dffcf9f46e0639a91c8f57 100644 (file)
@@ -83,7 +83,7 @@
        Stuart Adamson <stuart.adamson@compsoc.net>
    Nov 2001
    added support for ethtool (jgarzik)
-       
+
    $Header: /fsys2/home/chrisb/linux-1.3.59-MCA/drivers/net/RCS/3c523.c,v 1.1 1996/02/05 01:53:46 chrisb Exp chrisb $
  */
 
@@ -189,7 +189,7 @@ static void elmc_timeout(struct net_device *dev);
 #ifdef ELMC_MULTICAST
 static void set_multicast_list(struct net_device *dev);
 #endif
-static struct ethtool_ops netdev_ethtool_ops;
+static const struct ethtool_ops netdev_ethtool_ops;
 
 /* helper-functions */
 static int init586(struct net_device *dev);
@@ -434,14 +434,14 @@ static int __init do_elmc_probe(struct net_device *dev)
 
                dev->irq=irq_table[(status & ELMC_STATUS_IRQ_SELECT) >> 6];
                dev->base_addr=csr_table[(status & ELMC_STATUS_CSR_SELECT) >> 1];
-               
+
                /*
                   If we're trying to match a specified irq or IO address,
                   we'll reject a match unless it's what we're looking for.
                   Also reject it if the card is already in use.
                 */
 
-               if ((irq && irq != dev->irq) || 
+               if ((irq && irq != dev->irq) ||
                    (base_addr && base_addr != dev->base_addr)) {
                        slot = mca_find_adapter(ELMC_MCA_ID, slot + 1);
                        continue;
@@ -540,7 +540,7 @@ static int __init do_elmc_probe(struct net_device *dev)
 
        /* dump all the assorted information */
        printk(KERN_INFO "%s: IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->name,
-              dev->irq, dev->if_port ? "ex" : "in", 
+              dev->irq, dev->if_port ? "ex" : "in",
               dev->mem_start, dev->mem_end - 1);
 
        /* The hardware address for the 3c523 is stored in the first six
@@ -564,7 +564,7 @@ static int __init do_elmc_probe(struct net_device *dev)
        dev->set_multicast_list = NULL;
 #endif
        dev->ethtool_ops = &netdev_ethtool_ops;
-       
+
        /* note that we haven't actually requested the IRQ from the kernel.
           That gets done in elmc_open().  I'm not sure that's such a good idea,
           but it works, so I'll go with it. */
@@ -583,7 +583,7 @@ err_out:
        release_region(dev->base_addr, ELMC_IO_EXTENT);
        return retval;
 }
+
 static void cleanup_card(struct net_device *dev)
 {
        mca_set_adapter_procfn(((struct priv *) (dev->priv))->slot, NULL, NULL);
@@ -926,7 +926,7 @@ elmc_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr)
 
        p = (struct priv *) dev->priv;
 
-       while ((stat = p->scb->status & STAT_MASK)) 
+       while ((stat = p->scb->status & STAT_MASK))
        {
                p->scb->cmd = stat;
                elmc_attn586(); /* ack inter. */
@@ -1102,7 +1102,7 @@ static void startrecv586(struct net_device *dev)
 /******************************************************
  * timeout
  */
+
 static void elmc_timeout(struct net_device *dev)
 {
        struct priv *p = (struct priv *) dev->priv;
@@ -1129,7 +1129,7 @@ static void elmc_timeout(struct net_device *dev)
                elmc_open(dev);
        }
 }
+
 /******************************************************
  * send frame
  */
@@ -1146,7 +1146,7 @@ static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev)
        netif_stop_queue(dev);
 
        len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
-       
+
        if (len != skb->len)
                memset((char *) p->xmit_cbuffs[p->xmit_count], 0, ETH_ZLEN);
        memcpy((char *) p->xmit_cbuffs[p->xmit_count], (char *) (skb->data), skb->len);
@@ -1177,7 +1177,7 @@ static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev)
 #else
        next_nop = (p->nop_point + 1) & 0x1;
        p->xmit_buffs[0]->size = TBD_LAST | len;
-       
+
        p->xmit_cmds[0]->cmd_link = p->nop_cmds[next_nop]->cmd_link
            = make16((p->nop_cmds[next_nop]));
        p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0;
@@ -1259,7 +1259,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
        sprintf(info->bus_info, "MCA 0x%lx", dev->base_addr);
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
 };
 
@@ -1281,7 +1281,7 @@ int __init init_module(void)
 {
        int this_dev,found = 0;
 
-       /* Loop until we either can't find any more cards, or we have MAX_3C523_CARDS */        
+       /* Loop until we either can't find any more cards, or we have MAX_3C523_CARDS */
        for(this_dev=0; this_dev<MAX_3C523_CARDS; this_dev++) {
                struct net_device *dev = alloc_etherdev(sizeof(struct priv));
                if (!dev)
index 7292f88b48e3d80ba4d38737b4ff651f3ca693fa..6956441687b97e185f2fcb2d84ac074f62866fc1 100644 (file)
@@ -130,7 +130,7 @@ struct rfd_struct
 /*
  * Receive Buffer Descriptor (RBD)
  */
-struct rbd_struct 
+struct rbd_struct
 {
   unsigned short status;       /* status word,number of used bytes in buff */
   unsigned short next;         /* pointeroffset to next RBD */
@@ -182,7 +182,7 @@ struct nop_cmd_struct
 /*
  * IA Setup command
  */
-struct iasetup_cmd_struct 
+struct iasetup_cmd_struct
 {
   unsigned short cmd_status;
   unsigned short cmd_cmd;
@@ -191,7 +191,7 @@ struct iasetup_cmd_struct
 };
 
 /*
- * Configure command 
+ * Configure command
  */
 struct configure_cmd_struct
 {
@@ -213,9 +213,9 @@ struct configure_cmd_struct
 };
 
 /*
- * Multicast Setup command 
+ * Multicast Setup command
  */
-struct mcsetup_cmd_struct 
+struct mcsetup_cmd_struct
 {
   unsigned short cmd_status;
   unsigned short cmd_cmd;
@@ -225,9 +225,9 @@ struct mcsetup_cmd_struct
 };
 
 /*
- * transmit command 
+ * transmit command
  */
-struct transmit_cmd_struct 
+struct transmit_cmd_struct
 {
   unsigned short cmd_status;
   unsigned short cmd_cmd;
index 03c0f7176fc918a902537c524352e907c5ef0f6d..625e57dc3b4a91aa7bd95ed8b9e999c5e77cccc5 100644 (file)
@@ -1,7 +1,7 @@
 /* 3c527.c: 3Com Etherlink/MC32 driver for Linux 2.4 and 2.6.
  *
  *     (c) Copyright 1998 Red Hat Software Inc
- *     Written by Alan Cox. 
+ *     Written by Alan Cox.
  *     Further debugging by Carl Drougge.
  *      Initial SMP support by Felipe W Damasio <felipewd@terra.com.br>
  *      Heavily modified by Richard Procter <rnp@paradise.net.nz>
@@ -30,12 +30,12 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net.
  *     The diagram (Figure 1-1) and the POS summary disagree with the
  *     "Interrupt Level" section in the manual.
  *
- *     The manual contradicts itself when describing the minimum number 
- *     buffers in the 'configure lists' command. 
- *     My card accepts a buffer config of 4/4. 
+ *     The manual contradicts itself when describing the minimum number
+ *     buffers in the 'configure lists' command.
+ *     My card accepts a buffer config of 4/4.
  *
  *     Setting the SAV BP bit does not save bad packets, but
- *     only enables RX on-card stats collection. 
+ *     only enables RX on-card stats collection.
  *
  *     The documentation in places seems to miss things. In actual fact
  *     I've always eventually found everything is documented, it just
@@ -64,16 +64,16 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net.
  *     received frames exceeding a configurable length are passed
  *     directly to the higher networking layers without incuring a copy,
  *     in what amounts to a time/space trade-off.
- *      
+ *
  *     The card also keeps a large amount of statistical information
  *     on-board. In a perfect world, these could be used safely at no
  *     cost. However, lacking information to the contrary, processing
  *     them without races would involve so much extra complexity as to
  *     make it unworthwhile to do so. In the end, a hybrid SW/HW
- *     implementation was made necessary --- see mc32_update_stats().  
+ *     implementation was made necessary --- see mc32_update_stats().
  *
  * DOC: Notes
- *     
+ *
  *     It should be possible to use two or more cards, but at this stage
  *     only by loading two copies of the same module.
  *
@@ -132,28 +132,28 @@ static unsigned int mc32_debug = NET_DEBUG;
 /* The number of low I/O ports used by the ethercard. */
 #define MC32_IO_EXTENT 8
 
-/* As implemented, values must be a power-of-2 -- 4/8/16/32 */ 
+/* As implemented, values must be a power-of-2 -- 4/8/16/32 */
 #define TX_RING_LEN     32       /* Typically the card supports 37  */
 #define RX_RING_LEN     8        /*     "       "        "          */
 
-/* Copy break point, see above for details. 
- * Setting to > 1512 effectively disables this feature.        */          
+/* Copy break point, see above for details.
+ * Setting to > 1512 effectively disables this feature.        */
 #define RX_COPYBREAK    200      /* Value from 3c59x.c */
 
 /* Issue the 82586 workaround command - this is for "busy lans", but
- * basically means for all lans now days - has a performance (latency) 
- * cost, but best set. */ 
+ * basically means for all lans now days - has a performance (latency)
+ * cost, but best set. */
 static const int WORKAROUND_82586=1;
 
 /* Pointers to buffers and their on-card records */
-struct mc32_ring_desc 
+struct mc32_ring_desc
 {
-       volatile struct skb_header *p;                    
-       struct sk_buff *skb;          
+       volatile struct skb_header *p;
+       struct sk_buff *skb;
 };
 
 /* Information that needs to be kept for each board. */
-struct mc32_local 
+struct mc32_local
 {
        int slot;
 
@@ -165,7 +165,7 @@ struct mc32_local
         volatile struct mc32_stats *stats;    /* Start of on-card statistics */
         u16 tx_chain;           /* Transmit list start offset */
        u16 rx_chain;           /* Receive list start offset */
-        u16 tx_len;             /* Transmit list count */ 
+        u16 tx_len;             /* Transmit list count */
         u16 rx_len;             /* Receive list count */
 
        u16 xceiver_desired_state; /* HALTED or RUNNING */
@@ -180,7 +180,7 @@ struct mc32_local
        atomic_t tx_ring_head;  /* index to tx en-queue end */
        u16 tx_ring_tail;       /* index to tx de-queue end */
 
-       u16 rx_ring_tail;       /* index to rx de-queue end */ 
+       u16 rx_ring_tail;       /* index to rx de-queue end */
 
        struct semaphore cmd_mutex;    /* Serialises issuing of execute commands */
         struct completion execution_cmd; /* Card has completed an execute command */
@@ -204,7 +204,7 @@ static const struct mca_adapters_t mc32_adapters[] = {
 };
 
 
-/* Macros for ring index manipulations */ 
+/* Macros for ring index manipulations */
 static inline u16 next_rx(u16 rx) { return (rx+1)&(RX_RING_LEN-1); };
 static inline u16 prev_rx(u16 rx) { return (rx-1)&(RX_RING_LEN-1); };
 
@@ -222,7 +222,7 @@ static int  mc32_close(struct net_device *dev);
 static struct  net_device_stats *mc32_get_stats(struct net_device *dev);
 static void    mc32_set_multicast_list(struct net_device *dev);
 static void    mc32_reset_multicast_list(struct net_device *dev);
-static struct ethtool_ops netdev_ethtool_ops;
+static const struct ethtool_ops netdev_ethtool_ops;
 
 static void cleanup_card(struct net_device *dev)
 {
@@ -259,21 +259,21 @@ struct net_device *__init mc32_probe(int unit)
 
        SET_MODULE_OWNER(dev);
 
-       /* Do not check any supplied i/o locations. 
+       /* Do not check any supplied i/o locations.
           POS registers usually don't fail :) */
 
-       /* MCA cards have POS registers.  
-          Autodetecting MCA cards is extremely simple. 
+       /* MCA cards have POS registers.
+          Autodetecting MCA cards is extremely simple.
           Just search for the card. */
 
        for(i = 0; (mc32_adapters[i].name != NULL); i++) {
-               current_mca_slot = 
+               current_mca_slot =
                        mca_find_unused_adapter(mc32_adapters[i].id, 0);
 
                if(current_mca_slot != MCA_NOTFOUND) {
                        if(!mc32_probe1(dev, current_mca_slot))
                        {
-                               mca_set_adapter_name(current_mca_slot, 
+                               mca_set_adapter_name(current_mca_slot,
                                                mc32_adapters[i].name);
                                mca_mark_as_used(current_mca_slot);
                                err = register_netdev(dev);
@@ -284,7 +284,7 @@ struct net_device *__init mc32_probe(int unit)
                                }
                                return dev;
                        }
-                       
+
                }
        }
        free_netdev(dev);
@@ -298,7 +298,7 @@ struct net_device *__init mc32_probe(int unit)
  *
  * Decode the slot data and configure the card structures. Having done this we
  * can reset the card and configure it. The card does a full self test cycle
- * in firmware so we have to wait for it to return and post us either a 
+ * in firmware so we have to wait for it to return and post us either a
  * failure case or some addresses we use to find the board internals.
  */
 
@@ -347,7 +347,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
        printk(KERN_INFO "%s: %s found in slot %d:", dev->name, cardname, slot);
 
        POS = mca_read_stored_pos(slot, 2);
-       
+
        if(!(POS&1))
        {
                printk(" disabled.\n");
@@ -357,7 +357,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
        /* Fill in the 'dev' fields. */
        dev->base_addr = mca_io_bases[(POS>>1)&7];
        dev->mem_start = mca_mem_bases[(POS>>4)&7];
-       
+
        POS = mca_read_stored_pos(slot, 4);
        if(!(POS&1))
        {
@@ -366,21 +366,21 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
        }
 
        POS = mca_read_stored_pos(slot, 5);
-       
+
        i=(POS>>4)&3;
        if(i==3)
        {
                printk("invalid memory window.\n");
                return -ENODEV;
        }
-       
+
        i*=16384;
        i+=16384;
-       
+
        dev->mem_end=dev->mem_start + i;
-       
+
        dev->irq = ((POS>>2)&3)+9;
-       
+
        if(!request_region(dev->base_addr, MC32_IO_EXTENT, cardname))
        {
                printk("io 0x%3lX, which is busy.\n", dev->base_addr);
@@ -389,23 +389,23 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
 
        printk("io 0x%3lX irq %d mem 0x%lX (%dK)\n",
                dev->base_addr, dev->irq, dev->mem_start, i/1024);
-       
-       
+
+
        /* We ought to set the cache line size here.. */
-       
-       
+
+
        /*
         *      Go PROM browsing
         */
-        
+
        printk("%s: Address ", dev->name);
-        
+
        /* Retrieve and print the ethernet address. */
        for (i = 0; i < 6; i++)
        {
                mca_write_pos(slot, 6, i+12);
                mca_write_pos(slot, 7, 0);
-       
+
                printk(" %2.2x", dev->dev_addr[i] = mca_read_pos(slot,3));
        }
 
@@ -413,12 +413,12 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
        mca_write_pos(slot, 7, 0);
 
        POS = mca_read_stored_pos(slot, 4);
-       
+
        if(POS&2)
                printk(" : BNC port selected.\n");
-       else 
+       else
                printk(" : AUI port selected.\n");
-               
+
        POS=inb(dev->base_addr+HOST_CTRL);
        POS|=HOST_CTRL_ATTN|HOST_CTRL_RESET;
        POS&=~HOST_CTRL_INTE;
@@ -428,9 +428,9 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
        /* Reset off */
        POS&=~(HOST_CTRL_ATTN|HOST_CTRL_RESET);
        outb(POS, dev->base_addr+HOST_CTRL);
-       
+
        udelay(300);
-       
+
        /*
         *      Grab the IRQ
         */
@@ -448,14 +448,14 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
        i=0;
 
        base = inb(dev->base_addr);
-       
+
        while(base == 0xFF)
        {
                i++;
                if(i == 1000)
                {
                        printk(KERN_ERR "%s: failed to boot adapter.\n", dev->name);
-                       err = -ENODEV; 
+                       err = -ENODEV;
                        goto err_exit_irq;
                }
                udelay(1000);
@@ -470,15 +470,15 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
                                base<0x0A?" test failure":"");
                else
                        printk(KERN_ERR "%s: unknown failure %d.\n", dev->name, base);
-               err = -ENODEV; 
+               err = -ENODEV;
                goto err_exit_irq;
        }
-       
+
        base=0;
        for(i=0;i<4;i++)
        {
                int n=0;
-       
+
                while(!(inb(dev->base_addr+2)&(1<<5)))
                {
                        n++;
@@ -493,31 +493,31 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
 
                base|=(inb(dev->base_addr)<<(8*i));
        }
-       
+
        lp->exec_box=isa_bus_to_virt(dev->mem_start+base);
-       
-       base=lp->exec_box->data[1]<<16|lp->exec_box->data[0];  
-       
+
+       base=lp->exec_box->data[1]<<16|lp->exec_box->data[0];
+
        lp->base = dev->mem_start+base;
-       
-       lp->rx_box=isa_bus_to_virt(lp->base + lp->exec_box->data[2]); 
+
+       lp->rx_box=isa_bus_to_virt(lp->base + lp->exec_box->data[2]);
        lp->tx_box=isa_bus_to_virt(lp->base + lp->exec_box->data[3]);
-       
+
        lp->stats = isa_bus_to_virt(lp->base + lp->exec_box->data[5]);
 
        /*
         *      Descriptor chains (card relative)
         */
-        
+
        lp->tx_chain            = lp->exec_box->data[8];   /* Transmit list start offset */
        lp->rx_chain            = lp->exec_box->data[10];  /* Receive list start offset */
-       lp->tx_len              = lp->exec_box->data[9];   /* Transmit list count */ 
+       lp->tx_len              = lp->exec_box->data[9];   /* Transmit list count */
        lp->rx_len              = lp->exec_box->data[11];  /* Receive list count */
 
        init_MUTEX_LOCKED(&lp->cmd_mutex);
        init_completion(&lp->execution_cmd);
        init_completion(&lp->xceiver_cmd);
-       
+
        printk("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n",
                dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base);
 
@@ -543,12 +543,12 @@ err_exit_ports:
 /**
  *     mc32_ready_poll         -       wait until we can feed it a command
  *     @dev:   The device to wait for
- *     
+ *
  *     Wait until the card becomes ready to accept a command via the
  *     command register. This tells us nothing about the completion
  *     status of any pending commands and takes very little time at all.
  */
+
 static inline void mc32_ready_poll(struct net_device *dev)
 {
        int ioaddr = dev->base_addr;
@@ -608,22 +608,22 @@ static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int
  *
  *     Sends exec commands in a user context. This permits us to wait around
  *     for the replies and also to wait for the command buffer to complete
- *     from a previous command before we execute our command. After our 
+ *     from a previous command before we execute our command. After our
  *     command completes we will attempt any pending multicast reload
  *     we blocked off by hogging the exec buffer.
  *
- *     You feed the card a command, you wait, it interrupts you get a 
+ *     You feed the card a command, you wait, it interrupts you get a
  *     reply. All well and good. The complication arises because you use
  *     commands for filter list changes which come in at bh level from things
  *     like IPV6 group stuff.
  */
-  
+
 static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
 {
        struct mc32_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
        int ret = 0;
-       
+
        down(&lp->cmd_mutex);
 
        /*
@@ -640,7 +640,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
        outb(1<<6, ioaddr+HOST_CMD);
 
        wait_for_completion(&lp->execution_cmd);
-       
+
        if(lp->exec_box->mbox&(1<<13))
                ret = -1;
 
@@ -664,8 +664,8 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
  *     @dev: The 3c527 card to issue the command to
  *
  *     This may be called from the interrupt state, where it is used
- *     to restart the rx ring if the card runs out of rx buffers. 
- *     
+ *     to restart the rx ring if the card runs out of rx buffers.
+ *
  *     We must first check if it's ok to (re)start the transceiver. See
  *      mc32_close for details.
  */
@@ -675,21 +675,21 @@ static void mc32_start_transceiver(struct net_device *dev) {
        struct mc32_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
 
-       /* Ignore RX overflow on device closure */ 
+       /* Ignore RX overflow on device closure */
        if (lp->xceiver_desired_state==HALTED)
-               return; 
+               return;
 
        /* Give the card the offset to the post-EOL-bit RX descriptor */
-       mc32_ready_poll(dev); 
+       mc32_ready_poll(dev);
        lp->rx_box->mbox=0;
-       lp->rx_box->data[0]=lp->rx_ring[prev_rx(lp->rx_ring_tail)].p->next; 
-       outb(HOST_CMD_START_RX, ioaddr+HOST_CMD);      
+       lp->rx_box->data[0]=lp->rx_ring[prev_rx(lp->rx_ring_tail)].p->next;
+       outb(HOST_CMD_START_RX, ioaddr+HOST_CMD);
 
-       mc32_ready_poll(dev); 
+       mc32_ready_poll(dev);
        lp->tx_box->mbox=0;
-       outb(HOST_CMD_RESTRT_TX, ioaddr+HOST_CMD);   /* card ignores this on RX restart */ 
-       
-       /* We are not interrupted on start completion */ 
+       outb(HOST_CMD_RESTRT_TX, ioaddr+HOST_CMD);   /* card ignores this on RX restart */
+
+       /* We are not interrupted on start completion */
 }
 
 
@@ -703,21 +703,21 @@ static void mc32_start_transceiver(struct net_device *dev) {
  *
  *     We then sleep until the card has notified us that both rx and
  *     tx have been suspended.
- */ 
+ */
 
-static void mc32_halt_transceiver(struct net_device *dev) 
+static void mc32_halt_transceiver(struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
 
-       mc32_ready_poll(dev);   
+       mc32_ready_poll(dev);
        lp->rx_box->mbox=0;
-       outb(HOST_CMD_SUSPND_RX, ioaddr+HOST_CMD);                      
+       outb(HOST_CMD_SUSPND_RX, ioaddr+HOST_CMD);
        wait_for_completion(&lp->xceiver_cmd);
 
-       mc32_ready_poll(dev); 
+       mc32_ready_poll(dev);
        lp->tx_box->mbox=0;
-       outb(HOST_CMD_SUSPND_TX, ioaddr+HOST_CMD);      
+       outb(HOST_CMD_SUSPND_TX, ioaddr+HOST_CMD);
        wait_for_completion(&lp->xceiver_cmd);
 }
 
@@ -741,14 +741,14 @@ static void mc32_halt_transceiver(struct net_device *dev)
  *     We then set the end-of-list bit for the last entry so that the
  *     card will know when it has run out of buffers.
  */
-        
+
 static int mc32_load_rx_ring(struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
        int i;
        u16 rx_base;
        volatile struct skb_header *p;
-       
+
        rx_base=lp->rx_chain;
 
        for(i=0; i<RX_RING_LEN; i++) {
@@ -761,14 +761,14 @@ static int mc32_load_rx_ring(struct net_device *dev)
                skb_reserve(lp->rx_ring[i].skb, 18);
 
                p=isa_bus_to_virt(lp->base+rx_base);
-                               
+
                p->control=0;
                p->data=isa_virt_to_bus(lp->rx_ring[i].skb->data);
                p->status=0;
                p->length=1532;
-       
-               lp->rx_ring[i].p=p; 
-               rx_base=p->next; 
+
+               lp->rx_ring[i].p=p;
+               rx_base=p->next;
        }
 
        lp->rx_ring[i-1].p->control |= CONTROL_EOL;
@@ -776,14 +776,14 @@ static int mc32_load_rx_ring(struct net_device *dev)
        lp->rx_ring_tail=0;
 
        return 0;
-}      
+}
 
 
 /**
  *     mc32_flush_rx_ring      -       free the ring of receive buffers
  *     @lp: Local data of 3c527 to flush the rx ring of
  *
- *     Free the buffer for each ring slot. This may be called 
+ *     Free the buffer for each ring slot. This may be called
  *      before mc32_load_rx_ring(), eg. on error in mc32_open().
  *      Requires rx skb pointers to point to a valid skb, or NULL.
  */
@@ -791,16 +791,16 @@ static int mc32_load_rx_ring(struct net_device *dev)
 static void mc32_flush_rx_ring(struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
-       int i; 
+       int i;
 
-       for(i=0; i < RX_RING_LEN; i++) 
-       { 
+       for(i=0; i < RX_RING_LEN; i++)
+       {
                if (lp->rx_ring[i].skb) {
                        dev_kfree_skb(lp->rx_ring[i].skb);
                        lp->rx_ring[i].skb = NULL;
                }
-               lp->rx_ring[i].p=NULL; 
-       } 
+               lp->rx_ring[i].p=NULL;
+       }
 }
 
 
@@ -808,31 +808,31 @@ static void mc32_flush_rx_ring(struct net_device *dev)
  *     mc32_load_tx_ring       -       load transmit ring
  *     @dev: The 3c527 card to issue the command to
  *
- *     This sets up the host transmit data-structures. 
+ *     This sets up the host transmit data-structures.
  *
  *     First, we obtain from the card it's current postion in the tx
  *     ring, so that we will know where to begin transmitting
  *     packets.
- *     
+ *
  *     Then, we read the 'next' pointers from the on-card tx ring into
  *     our tx_ring array to reduce slow shared-mem reads. Finally, we
  *     intitalise the tx house keeping variables.
- * 
- */ 
+ *
+ */
 
 static void mc32_load_tx_ring(struct net_device *dev)
-{ 
+{
        struct mc32_local *lp = netdev_priv(dev);
        volatile struct skb_header *p;
-       int i; 
+       int i;
        u16 tx_base;
 
-       tx_base=lp->tx_box->data[0]; 
+       tx_base=lp->tx_box->data[0];
 
        for(i=0 ; i<TX_RING_LEN ; i++)
        {
                p=isa_bus_to_virt(lp->base+tx_base);
-               lp->tx_ring[i].p=p; 
+               lp->tx_ring[i].p=p;
                lp->tx_ring[i].skb=NULL;
 
                tx_base=p->next;
@@ -841,10 +841,10 @@ static void mc32_load_tx_ring(struct net_device *dev)
        /* -1 so that tx_ring_head cannot "lap" tx_ring_tail */
        /* see mc32_tx_ring */
 
-       atomic_set(&lp->tx_count, TX_RING_LEN-1); 
-       atomic_set(&lp->tx_ring_head, 0); 
-       lp->tx_ring_tail=0; 
-} 
+       atomic_set(&lp->tx_count, TX_RING_LEN-1);
+       atomic_set(&lp->tx_ring_head, 0);
+       lp->tx_ring_tail=0;
+}
 
 
 /**
@@ -871,11 +871,11 @@ static void mc32_flush_tx_ring(struct net_device *dev)
                }
        }
 
-       atomic_set(&lp->tx_count, 0); 
-       atomic_set(&lp->tx_ring_head, 0); 
+       atomic_set(&lp->tx_count, 0);
+       atomic_set(&lp->tx_ring_head, 0);
        lp->tx_ring_tail=0;
 }
-       
+
 
 /**
  *     mc32_open       -       handle 'up' of card
@@ -909,7 +909,7 @@ static int mc32_open(struct net_device *dev)
        regs=inb(ioaddr+HOST_CTRL);
        regs|=HOST_CTRL_INTE;
        outb(regs, ioaddr+HOST_CTRL);
-       
+
        /*
         *      Allow ourselves to issue commands
         */
@@ -924,52 +924,52 @@ static int mc32_open(struct net_device *dev)
        mc32_command(dev, 4, &one, 2);
 
        /*
-        *      Poke it to make sure it's really dead. 
+        *      Poke it to make sure it's really dead.
         */
 
-       mc32_halt_transceiver(dev); 
-       mc32_flush_tx_ring(dev); 
+       mc32_halt_transceiver(dev);
+       mc32_flush_tx_ring(dev);
 
-       /* 
-        *      Ask card to set up on-card descriptors to our spec 
-        */ 
+       /*
+        *      Ask card to set up on-card descriptors to our spec
+        */
 
-       if(mc32_command(dev, 8, descnumbuffs, 4)) { 
+       if(mc32_command(dev, 8, descnumbuffs, 4)) {
                printk("%s: %s rejected our buffer configuration!\n",
                       dev->name, cardname);
-               mc32_close(dev); 
-               return -ENOBUFS; 
+               mc32_close(dev);
+               return -ENOBUFS;
        }
-       
-       /* Report new configuration */ 
-       mc32_command(dev, 6, NULL, 0); 
+
+       /* Report new configuration */
+       mc32_command(dev, 6, NULL, 0);
 
        lp->tx_chain            = lp->exec_box->data[8];   /* Transmit list start offset */
        lp->rx_chain            = lp->exec_box->data[10];  /* Receive list start offset */
-       lp->tx_len              = lp->exec_box->data[9];   /* Transmit list count */ 
+       lp->tx_len              = lp->exec_box->data[9];   /* Transmit list count */
        lp->rx_len              = lp->exec_box->data[11];  /* Receive list count */
+
        /* Set Network Address */
        mc32_command(dev, 1, dev->dev_addr, 6);
-       
+
        /* Set the filters */
        mc32_set_multicast_list(dev);
-                  
-       if (WORKAROUND_82586) { 
+
+       if (WORKAROUND_82586) {
                u16 zero_word=0;
                mc32_command(dev, 0x0D, &zero_word, 2);   /* 82586 bug workaround on  */
        }
 
        mc32_load_tx_ring(dev);
-       
-       if(mc32_load_rx_ring(dev)) 
+
+       if(mc32_load_rx_ring(dev))
        {
                mc32_close(dev);
                return -ENOBUFS;
        }
 
        lp->xceiver_desired_state = RUNNING;
-       
+
        /* And finally, set the ball rolling... */
        mc32_start_transceiver(dev);
 
@@ -1015,14 +1015,14 @@ static void mc32_timeout(struct net_device *dev)
  *      after we've established a valid packet on the tx ring (and
  *      before we let the card "see" it, to prevent it racing with the
  *      irq handler).
- * 
+ *
  */
 
 static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
        u32 head = atomic_read(&lp->tx_ring_head);
-       
+
        volatile struct skb_header *p, *np;
 
        netif_stop_queue(dev);
@@ -1036,31 +1036,31 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
                return 0;
        }
 
-       atomic_dec(&lp->tx_count); 
+       atomic_dec(&lp->tx_count);
 
        /* P is the last sending/sent buffer as a pointer */
        p=lp->tx_ring[head].p;
-               
+
        head = next_tx(head);
 
        /* NP is the buffer we will be loading */
-       np=lp->tx_ring[head].p; 
-       
+       np=lp->tx_ring[head].p;
+
        /* We will need this to flush the buffer out */
        lp->tx_ring[head].skb=skb;
 
-       np->length      = unlikely(skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;                  
+       np->length      = unlikely(skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
        np->data        = isa_virt_to_bus(skb->data);
        np->status      = 0;
-       np->control     = CONTROL_EOP | CONTROL_EOL;     
+       np->control     = CONTROL_EOP | CONTROL_EOL;
        wmb();
-               
+
        /*
         * The new frame has been setup; we can now
         * let the interrupt handler and card "see" it
         */
 
-       atomic_set(&lp->tx_ring_head, head); 
+       atomic_set(&lp->tx_ring_head, head);
        p->control     &= ~CONTROL_EOL;
 
        netif_wake_queue(dev);
@@ -1072,13 +1072,13 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
  *     mc32_update_stats       -       pull off the on board statistics
  *     @dev: 3c527 to service
  *
- * 
+ *
  *     Query and reset the on-card stats. There's the small possibility
  *     of a race here, which would result in an underestimation of
  *     actual errors. As such, we'd prefer to keep all our stats
  *     collection in software. As a rule, we do. However it can't be
  *     used for rx errors and collisions as, by default, the card discards
- *     bad rx packets. 
+ *     bad rx packets.
  *
  *     Setting the SAV BP in the rx filter command supposedly
  *     stops this behaviour. However, testing shows that it only seems to
@@ -1090,30 +1090,30 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
 static void mc32_update_stats(struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
-       volatile struct mc32_stats *st = lp->stats; 
+       volatile struct mc32_stats *st = lp->stats;
 
-       u32 rx_errors=0; 
-      
-       rx_errors+=lp->net_stats.rx_crc_errors   +=st->rx_crc_errors;         
+       u32 rx_errors=0;
+
+       rx_errors+=lp->net_stats.rx_crc_errors   +=st->rx_crc_errors;
                                                   st->rx_crc_errors=0;
-       rx_errors+=lp->net_stats.rx_fifo_errors  +=st->rx_overrun_errors;   
-                                                  st->rx_overrun_errors=0; 
-       rx_errors+=lp->net_stats.rx_frame_errors +=st->rx_alignment_errors; 
+       rx_errors+=lp->net_stats.rx_fifo_errors  +=st->rx_overrun_errors;
+                                                  st->rx_overrun_errors=0;
+       rx_errors+=lp->net_stats.rx_frame_errors +=st->rx_alignment_errors;
                                                   st->rx_alignment_errors=0;
-       rx_errors+=lp->net_stats.rx_length_errors+=st->rx_tooshort_errors; 
+       rx_errors+=lp->net_stats.rx_length_errors+=st->rx_tooshort_errors;
                                                   st->rx_tooshort_errors=0;
        rx_errors+=lp->net_stats.rx_missed_errors+=st->rx_outofresource_errors;
-                                                  st->rx_outofresource_errors=0; 
-        lp->net_stats.rx_errors=rx_errors; 
-                                                  
+                                                  st->rx_outofresource_errors=0;
+        lp->net_stats.rx_errors=rx_errors;
+
        /* Number of packets which saw one collision */
        lp->net_stats.collisions+=st->dataC[10];
-       st->dataC[10]=0; 
+       st->dataC[10]=0;
 
-       /* Number of packets which saw 2--15 collisions */ 
-       lp->net_stats.collisions+=st->dataC[11]; 
-       st->dataC[11]=0; 
-}      
+       /* Number of packets which saw 2--15 collisions */
+       lp->net_stats.collisions+=st->dataC[11];
+       st->dataC[11]=0;
+}
 
 
 /**
@@ -1130,7 +1130,7 @@ static void mc32_update_stats(struct net_device *dev)
  *     For each completed packet, we will either copy it and pass it up
  *     the stack or, if the packet is near MTU sized, we allocate
  *     another buffer and flip the old one up the stack.
- * 
+ *
  *     We must succeed in keeping a buffer on the ring. If necessary we
  *     will toss a received packet rather than lose a ring entry. Once
  *     the first uncompleted descriptor is found, we move the
@@ -1147,72 +1147,72 @@ static void mc32_rx_ring(struct net_device *dev)
        int x=0;
 
        rx_old_tail = rx_ring_tail = lp->rx_ring_tail;
-       
+
        do
-       { 
-               p=lp->rx_ring[rx_ring_tail].p; 
+       {
+               p=lp->rx_ring[rx_ring_tail].p;
 
-               if(!(p->status & (1<<7))) { /* Not COMPLETED */ 
+               if(!(p->status & (1<<7))) { /* Not COMPLETED */
                        break;
-               } 
+               }
                if(p->status & (1<<6)) /* COMPLETED_OK */
-               {                       
+               {
 
                        u16 length=p->length;
-                       struct sk_buff *skb; 
-                       struct sk_buff *newskb; 
+                       struct sk_buff *skb;
+                       struct sk_buff *newskb;
 
                        /* Try to save time by avoiding a copy on big frames */
 
-                       if ((length > RX_COPYBREAK) 
-                           && ((newskb=dev_alloc_skb(1532)) != NULL)) 
-                       { 
+                       if ((length > RX_COPYBREAK)
+                           && ((newskb=dev_alloc_skb(1532)) != NULL))
+                       {
                                skb=lp->rx_ring[rx_ring_tail].skb;
                                skb_put(skb, length);
-                               
-                               skb_reserve(newskb,18); 
-                               lp->rx_ring[rx_ring_tail].skb=newskb;  
-                               p->data=isa_virt_to_bus(newskb->data);  
-                       } 
-                       else 
+
+                               skb_reserve(newskb,18);
+                               lp->rx_ring[rx_ring_tail].skb=newskb;
+                               p->data=isa_virt_to_bus(newskb->data);
+                       }
+                       else
                        {
-                               skb=dev_alloc_skb(length+2);  
+                               skb=dev_alloc_skb(length+2);
 
                                if(skb==NULL) {
-                                       lp->net_stats.rx_dropped++; 
-                                       goto dropped; 
+                                       lp->net_stats.rx_dropped++;
+                                       goto dropped;
                                }
 
                                skb_reserve(skb,2);
                                memcpy(skb_put(skb, length),
                                       lp->rx_ring[rx_ring_tail].skb->data, length);
                        }
-                       
-                       skb->protocol=eth_type_trans(skb,dev); 
-                       skb->dev=dev; 
+
+                       skb->protocol=eth_type_trans(skb,dev);
+                       skb->dev=dev;
                        dev->last_rx = jiffies;
-                       lp->net_stats.rx_packets++; 
-                       lp->net_stats.rx_bytes += length; 
+                       lp->net_stats.rx_packets++;
+                       lp->net_stats.rx_bytes += length;
                        netif_rx(skb);
                }
 
        dropped:
-               p->length = 1532; 
+               p->length = 1532;
                p->status = 0;
-               
-               rx_ring_tail=next_rx(rx_ring_tail); 
+
+               rx_ring_tail=next_rx(rx_ring_tail);
        }
-        while(x++<48);  
+        while(x++<48);
 
-       /* If there was actually a frame to be processed, place the EOL bit */ 
-       /* at the descriptor prior to the one to be filled next */ 
+       /* If there was actually a frame to be processed, place the EOL bit */
+       /* at the descriptor prior to the one to be filled next */
 
-       if (rx_ring_tail != rx_old_tail) 
-       { 
-               lp->rx_ring[prev_rx(rx_ring_tail)].p->control |=  CONTROL_EOL; 
-               lp->rx_ring[prev_rx(rx_old_tail)].p->control  &= ~CONTROL_EOL; 
+       if (rx_ring_tail != rx_old_tail)
+       {
+               lp->rx_ring[prev_rx(rx_ring_tail)].p->control |=  CONTROL_EOL;
+               lp->rx_ring[prev_rx(rx_old_tail)].p->control  &= ~CONTROL_EOL;
 
-               lp->rx_ring_tail=rx_ring_tail; 
+               lp->rx_ring_tail=rx_ring_tail;
        }
 }
 
@@ -1228,10 +1228,10 @@ static void mc32_rx_ring(struct net_device *dev)
  *     any errors. This continues until the transmit ring is emptied
  *     or we reach a descriptor that hasn't yet been processed by the
  *     card.
- * 
+ *
  */
 
-static void mc32_tx_ring(struct net_device *dev) 
+static void mc32_tx_ring(struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
        volatile struct skb_header *np;
@@ -1243,28 +1243,28 @@ static void mc32_tx_ring(struct net_device *dev)
         * condition with 'queue full'
         */
 
-       while (lp->tx_ring_tail != atomic_read(&lp->tx_ring_head))  
-       {   
-               u16 t; 
+       while (lp->tx_ring_tail != atomic_read(&lp->tx_ring_head))
+       {
+               u16 t;
 
-               t=next_tx(lp->tx_ring_tail); 
-               np=lp->tx_ring[t].p; 
+               t=next_tx(lp->tx_ring_tail);
+               np=lp->tx_ring[t].p;
 
-               if(!(np->status & (1<<7))) 
+               if(!(np->status & (1<<7)))
                {
-                       /* Not COMPLETED */ 
-                       break; 
-               } 
+                       /* Not COMPLETED */
+                       break;
+               }
                lp->net_stats.tx_packets++;
                if(!(np->status & (1<<6))) /* Not COMPLETED_OK */
                {
-                       lp->net_stats.tx_errors++;   
+                       lp->net_stats.tx_errors++;
 
                        switch(np->status&0x0F)
                        {
                                case 1:
                                        lp->net_stats.tx_aborted_errors++;
-                                       break; /* Max collisions */ 
+                                       break; /* Max collisions */
                                case 2:
                                        lp->net_stats.tx_fifo_errors++;
                                        break;
@@ -1273,10 +1273,10 @@ static void mc32_tx_ring(struct net_device *dev)
                                        break;
                                case 4:
                                        lp->net_stats.tx_window_errors++;
-                                       break;  /* CTS Lost */ 
+                                       break;  /* CTS Lost */
                                case 5:
                                        lp->net_stats.tx_aborted_errors++;
-                                       break; /* Transmit timeout */ 
+                                       break; /* Transmit timeout */
                        }
                }
                /* Packets are sent in order - this is
@@ -1288,10 +1288,10 @@ static void mc32_tx_ring(struct net_device *dev)
                atomic_inc(&lp->tx_count);
                netif_wake_queue(dev);
 
-               lp->tx_ring_tail=t; 
+               lp->tx_ring_tail=t;
        }
 
-} 
+}
 
 
 /**
@@ -1322,13 +1322,13 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
        struct mc32_local *lp;
        int ioaddr, status, boguscount = 0;
        int rx_event = 0;
-       int tx_event = 0; 
-       
+       int tx_event = 0;
+
        if (dev == NULL) {
                printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq);
                return IRQ_NONE;
        }
+
        ioaddr = dev->base_addr;
        lp = netdev_priv(dev);
 
@@ -1338,19 +1338,19 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
        {
                status=inb(ioaddr+HOST_CMD);
 
-#ifdef DEBUG_IRQ               
+#ifdef DEBUG_IRQ
                printk("Status TX%d RX%d EX%d OV%d BC%d\n",
                        (status&7), (status>>3)&7, (status>>6)&1,
                        (status>>7)&1, boguscount);
 #endif
-                       
+
                switch(status&7)
                {
                        case 0:
                                break;
                        case 6: /* TX fail */
                        case 2: /* TX ok */
-                               tx_event = 1; 
+                               tx_event = 1;
                                break;
                        case 3: /* Halt */
                        case 4: /* Abort */
@@ -1365,7 +1365,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                        case 0:
                                break;
                        case 2: /* RX */
-                               rx_event=1; 
+                               rx_event=1;
                                break;
                        case 3: /* Halt */
                        case 4: /* Abort */
@@ -1375,12 +1375,12 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                                /* Out of RX buffers stat */
                                /* Must restart rx */
                                lp->net_stats.rx_dropped++;
-                               mc32_rx_ring(dev); 
-                               mc32_start_transceiver(dev); 
+                               mc32_rx_ring(dev);
+                               mc32_start_transceiver(dev);
                                break;
                        default:
-                               printk("%s: strange rx ack %d\n", 
-                                       dev->name, status&7);                   
+                               printk("%s: strange rx ack %d\n",
+                                       dev->name, status&7);
                }
                status>>=3;
                if(status&1)
@@ -1389,10 +1389,10 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                         * No thread is waiting: we need to tidy
                         * up ourself.
                         */
-                                  
+
                        if (lp->cmd_nonblocking) {
                                up(&lp->cmd_mutex);
-                               if (lp->mc_reload_wait) 
+                               if (lp->mc_reload_wait)
                                        mc32_reset_multicast_list(dev);
                        }
                        else complete(&lp->execution_cmd);
@@ -1401,22 +1401,22 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                {
                        /*
                         *      We get interrupted once per
-                        *      counter that is about to overflow. 
+                        *      counter that is about to overflow.
                         */
 
-                       mc32_update_stats(dev);                 
+                       mc32_update_stats(dev);
                }
        }
 
 
        /*
-        *      Process the transmit and receive rings 
+        *      Process the transmit and receive rings
          */
 
-       if(tx_event) 
+       if(tx_event)
                mc32_tx_ring(dev);
-        
-       if(rx_event) 
+
+       if(rx_event)
                mc32_rx_ring(dev);
 
        return IRQ_HANDLED;
@@ -1435,7 +1435,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
  *     driver.  Otherwise, it is possible that the card may run out
  *     of receive buffers and restart the transceiver while we're
  *     trying to close it.
- * 
+ *
  *     We abort any receive and transmits going on and then wait until
  *     any pending exec commands have completed in other code threads.
  *     In theory we can't get here while that is true, in practice I am
@@ -1452,7 +1452,7 @@ static int mc32_close(struct net_device *dev)
 
        u8 regs;
        u16 one=1;
-       
+
        lp->xceiver_desired_state = HALTED;
        netif_stop_queue(dev);
 
@@ -1464,22 +1464,22 @@ static int mc32_close(struct net_device *dev)
 
        /* Shut down the transceiver */
 
-       mc32_halt_transceiver(dev); 
-       
+       mc32_halt_transceiver(dev);
+
        /* Ensure we issue no more commands beyond this point */
 
        down(&lp->cmd_mutex);
-       
-       /* Ok the card is now stopping */       
-       
+
+       /* Ok the card is now stopping */
+
        regs=inb(ioaddr+HOST_CTRL);
        regs&=~HOST_CTRL_INTE;
        outb(regs, ioaddr+HOST_CTRL);
 
        mc32_flush_rx_ring(dev);
        mc32_flush_tx_ring(dev);
-               
-       mc32_update_stats(dev); 
+
+       mc32_update_stats(dev);
 
        return 0;
 }
@@ -1490,15 +1490,15 @@ static int mc32_close(struct net_device *dev)
  *     @dev: The 3c527 card to handle
  *
  *     We've collected all the stats we can in software already. Now
- *     it's time to update those kept on-card and return the lot. 
- * 
+ *     it's time to update those kept on-card and return the lot.
+ *
  */
 
 static struct net_device_stats *mc32_get_stats(struct net_device *dev)
 {
        struct mc32_local *lp = netdev_priv(dev);
-       
-       mc32_update_stats(dev); 
+
+       mc32_update_stats(dev);
        return &lp->net_stats;
 }
 
@@ -1506,7 +1506,7 @@ static struct net_device_stats *mc32_get_stats(struct net_device *dev)
 /**
  *     do_mc32_set_multicast_list      -       attempt to update multicasts
  *     @dev: 3c527 device to load the list on
- *     @retry: indicates this is not the first call. 
+ *     @retry: indicates this is not the first call.
  *
  *
  *     Actually set or clear the multicast filter for this adaptor. The
@@ -1514,22 +1514,22 @@ static struct net_device_stats *mc32_get_stats(struct net_device *dev)
  *     state as it may take multiple calls to get the command sequence
  *     completed. We just keep trying to schedule the loads until we
  *     manage to process them all.
- * 
+ *
  *     num_addrs == -1 Promiscuous mode, receive all packets
- * 
+ *
  *     num_addrs == 0  Normal mode, clear multicast list
- * 
- *     num_addrs > 0   Multicast mode, receive normal and MC packets, 
- *                     and do best-effort filtering. 
  *
- *     See mc32_update_stats() regards setting the SAV BP bit. 
+ *     num_addrs > 0   Multicast mode, receive normal and MC packets,
+ *                     and do best-effort filtering.
+ *
+ *     See mc32_update_stats() regards setting the SAV BP bit.
  *
  */
 
 static void do_mc32_set_multicast_list(struct net_device *dev, int retry)
 {
        struct mc32_local *lp = netdev_priv(dev);
-       u16 filt = (1<<2); /* Save Bad Packets, for stats purposes */ 
+       u16 filt = (1<<2); /* Save Bad Packets, for stats purposes */
 
        if (dev->flags&IFF_PROMISC)
                /* Enable promiscuous mode */
@@ -1544,9 +1544,9 @@ 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=dev->mc_list;
-               
+
                int i;
-              
+
                if(retry==0)
                        lp->mc_list_valid = 0;
                if(!lp->mc_list_valid)
@@ -1554,7 +1554,7 @@ static void do_mc32_set_multicast_list(struct net_device *dev, int retry)
                        block[1]=0;
                        block[0]=dev->mc_count;
                        bp=block+2;
-               
+
                        for(i=0;i<dev->mc_count;i++)
                        {
                                memcpy(bp, dmc->dmi_addr, 6);
@@ -1569,12 +1569,12 @@ static void do_mc32_set_multicast_list(struct net_device *dev, int retry)
                        lp->mc_list_valid=1;
                }
        }
-       
-       if(mc32_command_nowait(dev, 0, &filt, 2)==-1) 
+
+       if(mc32_command_nowait(dev, 0, &filt, 2)==-1)
        {
                lp->mc_reload_wait = 1;
-       } 
-       else { 
+       }
+       else {
                lp->mc_reload_wait = 0;
        }
 }
@@ -1627,7 +1627,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
        mc32_debug = level;
 }
 
-static struct ethtool_ops netdev_ethtool_ops = {
+static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
index 53b5b071df08f3a341d474a94eeb4232f8a22416..75e28fef797b05164c500f3f9506f4c16868cbdf 100644 (file)
@@ -5,7 +5,7 @@
 /*
  *     Registers
  */
-  
+
 #define HOST_CMD               0
 #define         HOST_CMD_START_RX   (1<<3)
 #define         HOST_CMD_SUSPND_RX  (3<<3)
@@ -63,7 +63,7 @@ struct mc32_stats
        u32 tx_underrun_errors;
        u32 tx_cts_errors;
        u32 tx_timeout_errors;
-       
+
        /* various cruft */
        u32 dataA[6];
        u16 dataB[5];
index 80e8ca013e448a96e54af66220810e80b3c794fb..e1e53bbd150bd4d9cd6d9e2768075134cac3ef58 100644 (file)
@@ -729,7 +729,7 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 #endif
 static void vortex_tx_timeout(struct net_device *dev);
 static void acpi_set_WOL(struct net_device *dev);
-static struct ethtool_ops vortex_ethtool_ops;
+static const struct ethtool_ops vortex_ethtool_ops;
 static void set_8021q_mode(struct net_device *dev, int enable);
 
 /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
@@ -796,7 +796,7 @@ static void poll_vortex(struct net_device *dev)
        local_irq_disable();
        (vp->full_bus_master_rx ? boomerang_interrupt:vortex_interrupt)(dev->irq,dev,NULL);
        local_irq_restore(flags);
-} 
+}
 #endif
 
 #ifdef CONFIG_PM
@@ -904,7 +904,7 @@ static int vortex_eisa_remove(struct device *device)
 
        vp = netdev_priv(dev);
        ioaddr = vp->ioaddr;
-       
+
        unregister_netdev(dev);
        iowrite16(TotalReset|0x14, ioaddr + EL3_CMD);
        release_region(dev->base_addr, VORTEX_TOTAL_SIZE);
@@ -935,7 +935,7 @@ static int __init vortex_eisa_init(void)
                eisa_found = 1;
        }
 #endif
-       
+
        /* Special code to work-around the Compaq PCI BIOS32 problem. */
        if (compaq_ioaddr) {
                vortex_probe1(NULL, ioport_map(compaq_ioaddr, VORTEX_TOTAL_SIZE),
@@ -953,7 +953,7 @@ static int __devinit vortex_init_one(struct pci_dev *pdev,
        struct vortex_chip_info *vci;
        void __iomem *ioaddr;
 
-       /* wake up and enable device */         
+       /* wake up and enable device */
        rc = pci_enable_device(pdev);
        if (rc < 0)
                goto out;
@@ -1089,7 +1089,7 @@ static int __devinit vortex_probe1(struct device *gendev,
                if (request_region(dev->base_addr, vci->io_size, print_name) != NULL)
                        vp->must_free_region = 1;
 
-               /* enable bus-mastering if necessary */         
+               /* enable bus-mastering if necessary */
                if (vci->flags & PCI_USES_MASTER)
                        pci_set_master(pdev);
 
@@ -1131,7 +1131,7 @@ static int __devinit vortex_probe1(struct device *gendev,
        vp->tx_ring_dma = vp->rx_ring_dma + sizeof(struct boom_rx_desc) * RX_RING_SIZE;
 
        /* if we are a PCI driver, we store info in pdev->driver_data
-        * instead of a module list */  
+        * instead of a module list */
        if (pdev)
                pci_set_drvdata(pdev, dev);
        if (edev)
@@ -1393,7 +1393,7 @@ static int __devinit vortex_probe1(struct device *gendev,
        dev->tx_timeout = vortex_tx_timeout;
        dev->watchdog_timeo = (watchdog * HZ) / 1000;
 #ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = poll_vortex; 
+       dev->poll_controller = poll_vortex;
 #endif
        if (pdev) {
                vp->pm_state_valid = 1;
@@ -1875,11 +1875,11 @@ static void vortex_tx_timeout(struct net_device *dev)
                vp->stats.tx_dropped++;
                netif_wake_queue(dev);
        }
-       
+
        /* Issue Tx Enable */
        iowrite16(TxEnable, ioaddr + EL3_CMD);
        dev->trans_start = jiffies;
-       
+
        /* Switch to register set 7 for normal use. */
        EL3WINDOW(7);
 }
@@ -2316,10 +2316,10 @@ boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                                if ((vp->tx_ring[entry].status & DN_COMPLETE) == 0)
                                        break;                  /* It still hasn't been processed. */
 #endif
-                                       
+
                                if (vp->tx_skbuff[entry]) {
                                        struct sk_buff *skb = vp->tx_skbuff[entry];
-#if DO_ZEROCOPY                                        
+#if DO_ZEROCOPY
                                        int i;
                                        for (i=0; i<=skb_shinfo(skb)->nr_frags; i++)
                                                        pci_unmap_single(VORTEX_PCI(vp),
@@ -2633,7 +2633,7 @@ vortex_close(struct net_device *dev)
                                                "not using them!\n", dev->name);
        }
 #endif
-               
+
        free_irq(dev->irq, dev);
 
        if (vp->full_bus_master_rx) { /* Free Boomerang bus master Rx buffers. */
@@ -2675,7 +2675,7 @@ dump_tx_ring(struct net_device *dev)
        if (vortex_debug > 0) {
        struct vortex_private *vp = netdev_priv(dev);
                void __iomem *ioaddr = vp->ioaddr;
-               
+
                if (vp->full_bus_master_tx) {
                        int i;
                        int stalled = ioread32(ioaddr + PktStatus) & 0x04;      /* Possible racy. But it's only debug stuff */
@@ -2873,7 +2873,7 @@ static void vortex_get_drvinfo(struct net_device *dev,
        }
 }
 
-static struct ethtool_ops vortex_ethtool_ops = {
+static const struct ethtool_ops vortex_ethtool_ops = {
        .get_drvinfo            = vortex_get_drvinfo,
        .get_strings            = vortex_get_strings,
        .get_msglevel           = vortex_get_msglevel,
@@ -2928,7 +2928,7 @@ static void set_rx_mode(struct net_device *dev)
        int new_mode;
 
        if (dev->flags & IFF_PROMISC) {
-               if (vortex_debug > 0)
+               if (vortex_debug > 3)
                        printk(KERN_NOTICE "%s: Setting promiscuous mode.\n", dev->name);
                new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm;
        } else  if ((dev->mc_list)  ||  (dev->flags & IFF_ALLMULTI)) {
@@ -3169,7 +3169,7 @@ static int __init vortex_init(void)
 {
        int pci_rc, eisa_rc;
 
-       pci_rc = pci_module_init(&vortex_driver);
+       pci_rc = pci_register_driver(&vortex_driver);
        eisa_rc = vortex_eisa_init();
 
        if (pci_rc == 0)
@@ -3190,7 +3190,7 @@ static void __exit vortex_eisa_cleanup(void)
        /* Take care of the EISA devices */
        eisa_driver_unregister(&vortex_eisa_driver);
 #endif
-       
+
        if (compaq_net_device) {
                vp = compaq_net_device->priv;
                ioaddr = ioport_map(compaq_net_device->base_addr,
index 86633c5f1a4b9c4d1e7f24aac46656ee995cb114..db7b19a5cd5987983fab53eb1b872d56a2662dc2 100644 (file)
@@ -1,7 +1,7 @@
-/* 
- * 7990.c -- LANCE ethernet IC generic routines. 
+/*
+ * 7990.c -- LANCE ethernet IC generic routines.
  * This is an attempt to separate out the bits of various ethernet
- * drivers that are common because they all use the AMD 7990 LANCE 
+ * drivers that are common because they all use the AMD 7990 LANCE
  * (Local Area Network Controller for Ethernet) chip.
  *
  * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk>
@@ -9,7 +9,7 @@
  * Most of this stuff was obtained by looking at other LANCE drivers,
  * in particular a2065.[ch]. The AMD C-LANCE datasheet was also helpful.
  * NB: this was made easy by the fact that Jes Sorensen had cleaned up
- * most of a2025 and sunlance with the aim of merging them, so the 
+ * most of a2025 and sunlance with the aim of merging them, so the
  * common code was pretty obvious.
  */
 #include <linux/crc32.h>
@@ -109,10 +109,10 @@ do { \
                        ib->btx_ring[t].length,\
                        ib->btx_ring[t].misc, ib->btx_ring[t].tmd1_bits);\
         }\
-} while (0) 
+} while (0)
 #else
 #define PRINT_RINGS()
-#endif        
+#endif
 
 /* Load the CSR registers. The LANCE has to be STOPped when we do this! */
 static void load_csrs (struct lance_private *lp)
@@ -157,7 +157,7 @@ static void lance_init_ring (struct net_device *dev)
          * a2065 and atarilance do the byteswap and lance.c (PC) doesn't.
          * However, the datasheet says that the BSWAP bit doesn't affect
          * the init block, so surely it should be low byte first for
-         * everybody? Um.] 
+         * everybody? Um.]
          * We could define the ib->physaddr as three 16bit values and
          * use (addr[1] << 8) | addr[0] & co, but this is more efficient.
          */
@@ -171,11 +171,11 @@ static void lance_init_ring (struct net_device *dev)
 #else
         for (i=0; i<6; i++)
            ib->phys_addr[i] = dev->dev_addr[i];
-#endif        
+#endif
 
         if (DEBUG_IRING)
                 printk ("TX rings:\n");
-    
+
        lp->tx_full = 0;
         /* Setup the Tx ring entries */
         for (i = 0; i < (1<<lp->lance_log_tx_bufs); i++) {
@@ -185,7 +185,7 @@ static void lance_init_ring (struct net_device *dev)
                 ib->btx_ring [i].tmd1_bits = 0;
                 ib->btx_ring [i].length    = 0xf000; /* The ones required by tmd2 */
                 ib->btx_ring [i].misc      = 0;
-                if (DEBUG_IRING) 
+                if (DEBUG_IRING)
                    printk ("%d: 0x%8.8x\n", i, leptr);
         }
 
@@ -206,14 +206,14 @@ static void lance_init_ring (struct net_device *dev)
         }
 
         /* Setup the initialization block */
-    
+
         /* Setup rx descriptor pointer */
         leptr = LANCE_ADDR(&aib->brx_ring);
         ib->rx_len = (lp->lance_log_rx_bufs << 13) | (leptr >> 16);
         ib->rx_ptr = leptr;
         if (DEBUG_IRING)
                 printk ("RX ptr: %8.8x\n", leptr);
-    
+
         /* Setup tx descriptor pointer */
         leptr = LANCE_ADDR(&aib->btx_ring);
         ib->tx_len = (lp->lance_log_tx_bufs << 13) | (leptr >> 16);
@@ -256,7 +256,7 @@ static int lance_reset (struct net_device *dev)
 {
         struct lance_private *lp = netdev_priv(dev);
         int status;
-    
+
         /* Stop the lance */
         WRITERAP(lp, LE_CSR0);
         WRITERDP(lp, LE_C0_STOP);
@@ -297,7 +297,7 @@ static int lance_rx (struct net_device *dev)
 #endif
 #ifdef CONFIG_HP300
        blinken_leds(0x40, 0);
-#endif    
+#endif
         WRITERDP(lp, LE_C0_RINT | LE_C0_INEA);     /* ack Rx int, reenable ints */
         for (rd = &ib->brx_ring [lp->rx_new];     /* For each Rx ring we own... */
              !((bits = rd->rmd1_bits) & LE_R1_OWN);
@@ -330,7 +330,7 @@ static int lance_rx (struct net_device *dev)
                                 lp->rx_new = (lp->rx_new + 1) & lp->rx_ring_mod_mask;
                                 return 0;
                         }
-            
+
                         skb->dev = dev;
                         skb_reserve (skb, 2);           /* 16 byte align */
                         skb_put (skb, len);             /* make room */
@@ -374,10 +374,10 @@ static int lance_tx (struct net_device *dev)
                 /* If we hit a packet not owned by us, stop */
                 if (td->tmd1_bits & LE_T1_OWN)
                         break;
-                
+
                 if (td->tmd1_bits & LE_T1_ERR) {
                         status = td->misc;
-            
+
                         lp->stats.tx_errors++;
                         if (status & LE_T3_RTY)  lp->stats.tx_aborted_errors++;
                         if (status & LE_T3_LCOL) lp->stats.tx_window_errors++;
@@ -429,7 +429,7 @@ static int lance_tx (struct net_device *dev)
 
                         lp->stats.tx_packets++;
                 }
-        
+
                 j = (j + 1) & lp->tx_ring_mod_mask;
         }
         lp->tx_old = j;
@@ -450,7 +450,7 @@ lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
         csr0 = READRDP(lp);
 
         PRINT_RINGS();
-        
+
         if (!(csr0 & LE_C0_INTR)) {     /* Check if any interrupt has */
                spin_unlock (&lp->devlock);
                 return IRQ_NONE;        /* been generated by the Lance. */
@@ -476,7 +476,7 @@ lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
         if (csr0 & LE_C0_MISS)
                 lp->stats.rx_errors++;       /* Missed a Rx frame. */
         if (csr0 & LE_C0_MERR) {
-                printk("%s: Bus master arbitration failure, status %4.4x.\n", 
+                printk("%s: Bus master arbitration failure, status %4.4x.\n",
                        dev->name, csr0);
                 /* Restart the chip. */
                 WRITERDP(lp, LE_C0_STRT);
@@ -486,7 +486,7 @@ lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
                lp->tx_full = 0;
                netif_wake_queue (dev);
         }
-        
+
         WRITERAP(lp, LE_CSR0);
         WRITERDP(lp, LE_C0_BABL|LE_C0_CERR|LE_C0_MISS|LE_C0_MERR|LE_C0_IDON|LE_C0_INEA);
 
@@ -498,7 +498,7 @@ int lance_open (struct net_device *dev)
 {
         struct lance_private *lp = netdev_priv(dev);
        int res;
-        
+
         /* Install the Interrupt handler. Or we could shunt this out to specific drivers? */
         if (request_irq(lp->irq, lance_interrupt, 0, lp->name, dev))
                 return -EAGAIN;
@@ -513,7 +513,7 @@ int lance_open (struct net_device *dev)
 int lance_close (struct net_device *dev)
 {
         struct lance_private *lp = netdev_priv(dev);
-        
+
        netif_stop_queue (dev);
 
         /* Stop the LANCE */
@@ -553,7 +553,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
         /* dump the packet */
         {
                 int i;
-        
+
                 for (i = 0; i < 64; i++) {
                         if ((i % 16) == 0)
                                 printk ("\n");
@@ -565,11 +565,11 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
         entry = lp->tx_new & lp->tx_ring_mod_mask;
         ib->btx_ring [entry].length = (-len) | 0xf000;
         ib->btx_ring [entry].misc = 0;
-    
+
        if (skb->len < ETH_ZLEN)
                memset((char *)&ib->tx_buf[entry][0], 0, ETH_ZLEN);
         memcpy ((char *)&ib->tx_buf [entry][0], skb->data, skblen);
-    
+
         /* Now, give the packet to the lance */
         ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN);
         lp->tx_new = (lp->tx_new+1) & lp->tx_ring_mod_mask;
@@ -579,7 +579,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
         WRITERDP(lp, LE_C0_INEA | LE_C0_TDMD);
         dev->trans_start = jiffies;
         dev_kfree_skb (skb);
-    
+
        spin_lock_irqsave (&lp->devlock, flags);
         if (TX_BUFFS_AVAIL)
                netif_start_queue (dev);
@@ -607,9 +607,9 @@ static void lance_load_multicast (struct net_device *dev)
         char *addrs;
         int i;
         u32 crc;
-        
+
         /* set all multicast bits */
-        if (dev->flags & IFF_ALLMULTI){ 
+        if (dev->flags & IFF_ALLMULTI){
                 ib->filter [0] = 0xffffffff;
                 ib->filter [1] = 0xffffffff;
                 return;
@@ -626,7 +626,7 @@ static void lance_load_multicast (struct net_device *dev)
                 /* multicast address? */
                 if (!(*addrs & 1))
                         continue;
-                
+
                crc = ether_crc_le(6, addrs);
                 crc = crc >> 26;
                 mcast_table [crc >> 4] |= 1 << (crc & 0xf);
index 31ae5099738d995457f35d9b1bf261a56ca8e459..b1212b5ed92f04e68b281679591491328e4f5fdb 100644 (file)
@@ -1,9 +1,9 @@
-/* 
+/*
  * 7990.h -- LANCE ethernet IC generic routines.
  * This is an attempt to separate out the bits of various ethernet
  * drivers that are common because they all use the AMD 7990 LANCE
  * (Local Area Network Controller for Ethernet) chip.
- * 
+ *
  * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk>
  *
  * Most of this stuff was obtained by looking at other LANCE drivers,
@@ -55,7 +55,7 @@ struct lance_rx_desc {
                                     */
        volatile unsigned short mblength;    /* Actual number of bytes received */
 };
+
 /* Ditto for TMD: */
 struct lance_tx_desc {
        volatile unsigned short tmd0;        /* low address of packet */
@@ -80,8 +80,8 @@ struct lance_init_block {
         volatile unsigned short rx_len;          /* receive len and high addr */
         volatile unsigned short tx_ptr;          /* transmit descriptor addr */
         volatile unsigned short tx_len;          /* transmit len and high addr */
-    
-        /* The Tx and Rx ring entries must be aligned on 8-byte boundaries. 
+
+        /* The Tx and Rx ring entries must be aligned on 8-byte boundaries.
          * This will be true if this whole struct is 8-byte aligned.
          */
         volatile struct lance_tx_desc btx_ring[TX_RING_SIZE];
@@ -104,21 +104,21 @@ struct lance_private
        unsigned long base;
         volatile struct lance_init_block *init_block; /* CPU address of RAM */
         volatile struct lance_init_block *lance_init_block; /* LANCE address of RAM */
-        
+
         int rx_new, tx_new;
         int rx_old, tx_old;
-        
+
         int lance_log_rx_bufs, lance_log_tx_bufs;
         int rx_ring_mod_mask, tx_ring_mod_mask;
-        
+
         struct net_device_stats stats;
         int tpe;                                  /* TPE is selected */
         int auto_select;                          /* cable-selection is by carrier */
         unsigned short busmaster_regval;
 
         unsigned int irq;                         /* IRQ to register */
-        
-        /* This is because the HP LANCE is disgusting and you have to check 
+
+        /* This is because the HP LANCE is disgusting and you have to check
          * a DIO-specific register every time you read/write the LANCE regs :-<
          * [could we get away with making these some sort of macro?]
          */
@@ -148,7 +148,7 @@ struct lance_private
 #define LE_C0_RINT     0x0400          /* Receive Interrupt */
 #define LE_C0_TINT     0x0200          /* Transmit Interrupt */
 #define LE_C0_IDON     0x0100          /* Initialization Done */
-#define LE_C0_INTR     0x0080          /* Interrupt Flag 
+#define LE_C0_INTR     0x0080          /* Interrupt Flag
                                          = BABL | MISS | MERR | RINT | TINT | IDON */
 #define LE_C0_INEA     0x0040          /* Interrupt Enable */
 #define LE_C0_RXON     0x0020          /* Receive On */
@@ -185,7 +185,7 @@ struct lance_private
 #define LE_MO_PSEL1   0x0100          /* port selection bit1 */
 #define LE_MO_PSEL0   0x0080          /* port selection bit0 */
 /* and this one is from the C-LANCE data sheet... */
-#define LE_MO_EMBA      0x0080          /* Enable Modified Backoff Algorithm 
+#define LE_MO_EMBA      0x0080          /* Enable Modified Backoff Algorithm
                                            (C-LANCE, not original LANCE) */
 #define LE_MO_INTL     0x0040          /* Internal Loopback */
 #define LE_MO_DRTY     0x0020          /* Disable Retry */
index 1428bb7715afd16a04fb6132cd560b420636d111..5ba11fa08147caa13edbd6826683abe0f72f7419 100644 (file)
@@ -48,7 +48,7 @@
  */
 
 #define DRV_NAME               "8139cp"
-#define DRV_VERSION            "1.2"
+#define DRV_VERSION            "1.3"
 #define DRV_RELDATE            "Mar 22, 2004"
 
 
@@ -314,12 +314,6 @@ struct cp_desc {
        u64             addr;
 };
 
-struct ring_info {
-       struct sk_buff          *skb;
-       dma_addr_t              mapping;
-       u32                     len;
-};
-
 struct cp_dma_stats {
        u64                     tx_ok;
        u64                     rx_ok;
@@ -353,23 +347,23 @@ struct cp_private {
        struct net_device_stats net_stats;
        struct cp_extra_stats   cp_stats;
 
-       unsigned                rx_tail         ____cacheline_aligned;
+       unsigned                rx_head         ____cacheline_aligned;
+       unsigned                rx_tail;
        struct cp_desc          *rx_ring;
-       struct ring_info        rx_skb[CP_RX_RING_SIZE];
-       unsigned                rx_buf_sz;
+       struct sk_buff          *rx_skb[CP_RX_RING_SIZE];
 
        unsigned                tx_head         ____cacheline_aligned;
        unsigned                tx_tail;
-
        struct cp_desc          *tx_ring;
-       struct ring_info        tx_skb[CP_TX_RING_SIZE];
-       dma_addr_t              ring_dma;
+       struct sk_buff          *tx_skb[CP_TX_RING_SIZE];
+
+       unsigned                rx_buf_sz;
+       unsigned                wol_enabled : 1; /* Is Wake-on-LAN enabled? */
 
 #if CP_VLAN_TAG_USED
        struct vlan_group       *vlgrp;
 #endif
-
-       unsigned int            wol_enabled : 1; /* Is Wake-on-LAN enabled? */
+       dma_addr_t              ring_dma;
 
        struct mii_if_info      mii_if;
 };
@@ -407,10 +401,8 @@ static int cp_set_eeprom(struct net_device *dev,
                         struct ethtool_eeprom *eeprom, u8 *data);
 
 static struct pci_device_id cp_pci_tbl[] = {
-       { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
-       { PCI_VENDOR_ID_TTTECH, PCI_DEVICE_ID_TTTECH_MC322,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
+       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     PCI_DEVICE_ID_REALTEK_8139), },
+       { PCI_DEVICE(PCI_VENDOR_ID_TTTECH,      PCI_DEVICE_ID_TTTECH_MC322), },
        { },
 };
 MODULE_DEVICE_TABLE(pci, cp_pci_tbl);
@@ -542,7 +534,7 @@ rx_status_loop:
                struct cp_desc *desc;
                unsigned buflen;
 
-               skb = cp->rx_skb[rx_tail].skb;
+               skb = cp->rx_skb[rx_tail];
                BUG_ON(!skb);
 
                desc = &cp->rx_ring[rx_tail];
@@ -551,7 +543,7 @@ rx_status_loop:
                        break;
 
                len = (status & 0x1fff) - 4;
-               mapping = cp->rx_skb[rx_tail].mapping;
+               mapping = le64_to_cpu(desc->addr);
 
                if ((status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag)) {
                        /* we don't support incoming fragmented frames.
@@ -572,7 +564,7 @@ rx_status_loop:
 
                if (netif_msg_rx_status(cp))
                        printk(KERN_DEBUG "%s: rx slot %d status 0x%x len %d\n",
-                              cp->dev->name, rx_tail, status, len);
+                              dev->name, rx_tail, status, len);
 
                buflen = cp->rx_buf_sz + RX_OFFSET;
                new_skb = dev_alloc_skb (buflen);
@@ -582,7 +574,7 @@ rx_status_loop:
                }
 
                skb_reserve(new_skb, RX_OFFSET);
-               new_skb->dev = cp->dev;
+               new_skb->dev = dev;
 
                pci_unmap_single(cp->pdev, mapping,
                                 buflen, PCI_DMA_FROMDEVICE);
@@ -595,11 +587,9 @@ rx_status_loop:
 
                skb_put(skb, len);
 
-               mapping =
-               cp->rx_skb[rx_tail].mapping =
-                       pci_map_single(cp->pdev, new_skb->data,
-                                      buflen, PCI_DMA_FROMDEVICE);
-               cp->rx_skb[rx_tail].skb = new_skb;
+               mapping = pci_map_single(cp->pdev, new_skb->data, buflen,
+                                        PCI_DMA_FROMDEVICE);
+               cp->rx_skb[rx_tail] = new_skb;
 
                cp_rx_skb(cp, skb, desc);
                rx++;
@@ -717,19 +707,21 @@ static void cp_tx (struct cp_private *cp)
        unsigned tx_tail = cp->tx_tail;
 
        while (tx_tail != tx_head) {
+               struct cp_desc *txd = cp->tx_ring + tx_tail;
                struct sk_buff *skb;
                u32 status;
 
                rmb();
-               status = le32_to_cpu(cp->tx_ring[tx_tail].opts1);
+               status = le32_to_cpu(txd->opts1);
                if (status & DescOwn)
                        break;
 
-               skb = cp->tx_skb[tx_tail].skb;
+               skb = cp->tx_skb[tx_tail];
                BUG_ON(!skb);
 
-               pci_unmap_single(cp->pdev, cp->tx_skb[tx_tail].mapping,
-                                cp->tx_skb[tx_tail].len, PCI_DMA_TODEVICE);
+               pci_unmap_single(cp->pdev, le64_to_cpu(txd->addr),
+                                le32_to_cpu(txd->opts1) & 0xffff,
+                                PCI_DMA_TODEVICE);
 
                if (status & LastFrag) {
                        if (status & (TxError | TxFIFOUnder)) {
@@ -756,7 +748,7 @@ static void cp_tx (struct cp_private *cp)
                        dev_kfree_skb_irq(skb);
                }
 
-               cp->tx_skb[tx_tail].skb = NULL;
+               cp->tx_skb[tx_tail] = NULL;
 
                tx_tail = NEXT_TX(tx_tail);
        }
@@ -826,9 +818,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
                txd->opts1 = cpu_to_le32(flags);
                wmb();
 
-               cp->tx_skb[entry].skb = skb;
-               cp->tx_skb[entry].mapping = mapping;
-               cp->tx_skb[entry].len = len;
+               cp->tx_skb[entry] = skb;
                entry = NEXT_TX(entry);
        } else {
                struct cp_desc *txd;
@@ -844,9 +834,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
                first_len = skb_headlen(skb);
                first_mapping = pci_map_single(cp->pdev, skb->data,
                                               first_len, PCI_DMA_TODEVICE);
-               cp->tx_skb[entry].skb = skb;
-               cp->tx_skb[entry].mapping = first_mapping;
-               cp->tx_skb[entry].len = first_len;
+               cp->tx_skb[entry] = skb;
                entry = NEXT_TX(entry);
 
                for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
@@ -887,9 +875,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
                        txd->opts1 = cpu_to_le32(ctrl);
                        wmb();
 
-                       cp->tx_skb[entry].skb = skb;
-                       cp->tx_skb[entry].mapping = mapping;
-                       cp->tx_skb[entry].len = len;
+                       cp->tx_skb[entry] = skb;
                        entry = NEXT_TX(entry);
                }
 
@@ -942,8 +928,6 @@ static void __cp_set_rx_mode (struct net_device *dev)
        /* Note: do not reorder, GCC is clever about common statements. */
        if (dev->flags & IFF_PROMISC) {
                /* Unconditionally log net taps. */
-               printk (KERN_NOTICE "%s: Promiscuous mode enabled.\n",
-                       dev->name);
                rx_mode =
                    AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
                    AcceptAllPhys;
@@ -1091,6 +1075,7 @@ static int cp_refill_rx (struct cp_private *cp)
 
        for (i = 0; i < CP_RX_RING_SIZE; i++) {
                struct sk_buff *skb;
+               dma_addr_t mapping;
 
                skb = dev_alloc_skb(cp->rx_buf_sz + RX_OFFSET);
                if (!skb)
@@ -1099,12 +1084,12 @@ static int cp_refill_rx (struct cp_private *cp)
                skb->dev = cp->dev;
                skb_reserve(skb, RX_OFFSET);
 
-               cp->rx_skb[i].mapping = pci_map_single(cp->pdev,
-                       skb->data, cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
-               cp->rx_skb[i].skb = skb;
+               mapping = pci_map_single(cp->pdev, skb->data, cp->rx_buf_sz,
+                                        PCI_DMA_FROMDEVICE);
+               cp->rx_skb[i] = skb;
 
                cp->rx_ring[i].opts2 = 0;
-               cp->rx_ring[i].addr = cpu_to_le64(cp->rx_skb[i].mapping);
+               cp->rx_ring[i].addr = cpu_to_le64(mapping);
                if (i == (CP_RX_RING_SIZE - 1))
                        cp->rx_ring[i].opts1 =
                                cpu_to_le32(DescOwn | RingEnd | cp->rx_buf_sz);
@@ -1152,23 +1137,27 @@ static int cp_alloc_rings (struct cp_private *cp)
 
 static void cp_clean_rings (struct cp_private *cp)
 {
+       struct cp_desc *desc;
        unsigned i;
 
        for (i = 0; i < CP_RX_RING_SIZE; i++) {
-               if (cp->rx_skb[i].skb) {
-                       pci_unmap_single(cp->pdev, cp->rx_skb[i].mapping,
+               if (cp->rx_skb[i]) {
+                       desc = cp->rx_ring + i;
+                       pci_unmap_single(cp->pdev, le64_to_cpu(desc->addr),
                                         cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
-                       dev_kfree_skb(cp->rx_skb[i].skb);
+                       dev_kfree_skb(cp->rx_skb[i]);
                }
        }
 
        for (i = 0; i < CP_TX_RING_SIZE; i++) {
-               if (cp->tx_skb[i].skb) {
-                       struct sk_buff *skb = cp->tx_skb[i].skb;
-
-                       pci_unmap_single(cp->pdev, cp->tx_skb[i].mapping,
-                                        cp->tx_skb[i].len, PCI_DMA_TODEVICE);
-                       if (le32_to_cpu(cp->tx_ring[i].opts1) & LastFrag)
+               if (cp->tx_skb[i]) {
+                       struct sk_buff *skb = cp->tx_skb[i];
+
+                       desc = cp->tx_ring + i;
+                       pci_unmap_single(cp->pdev, le64_to_cpu(desc->addr),
+                                        le32_to_cpu(desc->opts1) & 0xffff,
+                                        PCI_DMA_TODEVICE);
+                       if (le32_to_cpu(desc->opts1) & LastFrag)
                                dev_kfree_skb(skb);
                        cp->net_stats.tx_dropped++;
                }
@@ -1177,8 +1166,8 @@ static void cp_clean_rings (struct cp_private *cp)
        memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE);
        memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE);
 
-       memset(&cp->rx_skb, 0, sizeof(struct ring_info) * CP_RX_RING_SIZE);
-       memset(&cp->tx_skb, 0, sizeof(struct ring_info) * CP_TX_RING_SIZE);
+       memset(cp->rx_skb, 0, sizeof(struct sk_buff *) * CP_RX_RING_SIZE);
+       memset(cp->tx_skb, 0, sizeof(struct sk_buff *) * CP_TX_RING_SIZE);
 }
 
 static void cp_free_rings (struct cp_private *cp)
@@ -1557,7 +1546,7 @@ static void cp_get_ethtool_stats (struct net_device *dev,
        pci_free_consistent(cp->pdev, sizeof(*nic_stats), nic_stats, dma);
 }
 
-static struct ethtool_ops cp_ethtool_ops = {
+static const struct ethtool_ops cp_ethtool_ops = {
        .get_drvinfo            = cp_get_drvinfo,
        .get_regs_len           = cp_get_regs_len,
        .get_stats_count        = cp_get_stats_count,
@@ -2010,7 +1999,6 @@ static void cp_remove_one (struct pci_dev *pdev)
        struct net_device *dev = pci_get_drvdata(pdev);
        struct cp_private *cp = netdev_priv(dev);
 
-       BUG_ON(!dev);
        unregister_netdev(dev);
        iounmap(cp->regs);
        if (cp->wol_enabled)
@@ -2025,14 +2013,12 @@ static void cp_remove_one (struct pci_dev *pdev)
 #ifdef CONFIG_PM
 static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
 {
-       struct net_device *dev;
-       struct cp_private *cp;
+       struct net_device *dev = pci_get_drvdata(pdev);
+       struct cp_private *cp = netdev_priv(dev);
        unsigned long flags;
 
-       dev = pci_get_drvdata (pdev);
-       cp  = netdev_priv(dev);
-
-       if (!dev || !netif_running (dev)) return 0;
+       if (!netif_running(dev))
+               return 0;
 
        netif_device_detach (dev);
        netif_stop_queue (dev);
@@ -2098,7 +2084,7 @@ static int __init cp_init (void)
 #ifdef MODULE
        printk("%s", version);
 #endif
-       return pci_module_init (&cp_driver);
+       return pci_register_driver(&cp_driver);
 }
 
 static void __exit cp_exit (void)
index e4f4eaff76792292abe07865d7fcdbae34ac59de..dbc5c0b1b96c60676b5102812cbc89d50a5b35b2 100644 (file)
@@ -90,7 +90,7 @@
 */
 
 #define DRV_NAME       "8139too"
-#define DRV_VERSION    "0.9.27"
+#define DRV_VERSION    "0.9.28"
 
 
 #include <linux/module.h>
@@ -639,7 +639,7 @@ static void __set_rx_mode (struct net_device *dev);
 static void rtl8139_hw_start (struct net_device *dev);
 static void rtl8139_thread (void *_data);
 static void rtl8139_tx_timeout_task(void *_data);
-static struct ethtool_ops rtl8139_ethtool_ops;
+static const struct ethtool_ops rtl8139_ethtool_ops;
 
 /* write MMIO register, with flush */
 /* Flush avoids rtl8139 bug w/ posted MMIO writes */
@@ -2446,7 +2446,7 @@ static void rtl8139_get_strings(struct net_device *dev, u32 stringset, u8 *data)
        memcpy(data, ethtool_stats_keys, sizeof(ethtool_stats_keys));
 }
 
-static struct ethtool_ops rtl8139_ethtool_ops = {
+static const struct ethtool_ops rtl8139_ethtool_ops = {
        .get_drvinfo            = rtl8139_get_drvinfo,
        .get_settings           = rtl8139_get_settings,
        .set_settings           = rtl8139_set_settings,
@@ -2512,9 +2512,6 @@ static void __set_rx_mode (struct net_device *dev)
 
        /* Note: do not reorder, GCC is clever about common statements. */
        if (dev->flags & IFF_PROMISC) {
-               /* Unconditionally log net taps. */
-               printk (KERN_NOTICE "%s: Promiscuous mode enabled.\n",
-                       dev->name);
                rx_mode =
                    AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
                    AcceptAllPhys;
@@ -2629,7 +2626,7 @@ static int __init rtl8139_init_module (void)
        printk (KERN_INFO RTL8139_DRIVER_NAME "\n");
 #endif
 
-       return pci_module_init (&rtl8139_pci_driver);
+       return pci_register_driver(&rtl8139_pci_driver);
 }
 
 
index 257d3bce3993956b9c4fca79f5b086c65be776ff..c9e4dca9d4108e1b65cf6625e17ce88695e53395 100644 (file)
@@ -444,7 +444,7 @@ static inline int wait_cmd(struct net_device *dev, struct i596_private *lp, int
 static inline int wait_cfg(struct net_device *dev, struct i596_cmd *cmd, int delcnt, char *str)
 {
        volatile struct i596_cmd *c = cmd;
-       
+
        while (--delcnt && c->command)
                udelay(10);
        if (!delcnt) {
@@ -455,7 +455,7 @@ static inline int wait_cfg(struct net_device *dev, struct i596_cmd *cmd, int del
                return 0;
 }
 
+
 static void i596_display_data(struct net_device *dev)
 {
        struct i596_private *lp = dev->priv;
@@ -787,7 +787,7 @@ static inline int i596_rx(struct net_device *dev)
                }
                DEB(DEB_RXFRAME, printk(KERN_DEBUG "  rfd %p, rfd.rbd %p, rfd.stat %04x\n",
                        rfd, rfd->rbd, rfd->stat));
-               
+
                if (rbd != I596_NULL && ((rfd->stat) & STAT_OK)) {
                        /* a good frame */
                        int pkt_len = rbd->count & 0x3fff;
@@ -1208,7 +1208,7 @@ struct net_device * __init i82596_probe(int unit)
                   Some other boards trip the checksum.. but then appear as
                   ether address 0. Trap these - AC */
 
-               if ((checksum % 0x100) || 
+               if ((checksum % 0x100) ||
                    (memcmp(eth_addr, "\x00\x00\x49", 3) != 0)) {
                        err = -ENODEV;
                        goto out1;
@@ -1545,7 +1545,7 @@ static void set_multicast_list(struct net_device *dev)
                printk(KERN_ERR "%s: Only %d multicast addresses supported",
                        dev->name, cnt);
        }
-       
+
        if (dev->mc_count > 0) {
                struct dev_mc_list *dmi;
                unsigned char *cp;
@@ -1609,7 +1609,7 @@ void __exit cleanup_module(void)
 }
 
 #endif                         /* MODULE */
-\f
+
 /*
  * Local variables:
  *  compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c 82596.c"
index d2935ae39814ae8e5dce9e4e66b7b2cba43d96ea..5b6b05ed8f3c90553d5b9d710e39d4da54edb74d 100644 (file)
@@ -1,7 +1,7 @@
 /* 8390.c: A general NS8390 ethernet driver core for linux. */
 /*
        Written 1992-94 by Donald Becker.
-  
+
        Copyright 1993 United States Government as represented by the
        Director, National Security Agency.
 
@@ -13,7 +13,7 @@
        410 Severn Ave., Suite 210
        Annapolis MD 21403
 
-  
+
   This is the chip-specific code for many 8390-based ethernet adaptors.
   This is not a complete driver, it must be combined with board-specific
   code such as ne.c, wd.c, 3c503.c, etc.
@@ -27,7 +27,7 @@
   Changelog:
 
   Paul Gortmaker       : remove set_bit lock, other cleanups.
-  Paul Gortmaker       : add ei_get_8390_hdr() so we can pass skb's to 
+  Paul Gortmaker       : add ei_get_8390_hdr() so we can pass skb's to
                          ei_block_input() for eth_io_copy_and_sum().
   Paul Gortmaker       : exchange static int ei_pingpong for a #define,
                          also add better Tx error handling.
@@ -94,9 +94,9 @@ static const char version[] =
                Read the 4 byte, page aligned 8390 header. *If* there is a
                subsequent read, it will be of the rest of the packet.
        void block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
-               Read COUNT bytes from the packet buffer into the skb data area. Start 
+               Read COUNT bytes from the packet buffer into the skb data area. Start
                reading from RING_OFFSET, the address as the 8390 sees it.  This will always
-               follow the read of the 8390 header. 
+               follow the read of the 8390 header.
 */
 #define ei_reset_8390 (ei_local->reset_8390)
 #define ei_block_output (ei_local->block_output)
@@ -128,7 +128,7 @@ static void do_set_multicast_list(struct net_device *dev);
  *     a page register that controls bank and packet buffer access. We guard
  *     this with ei_local->page_lock. Nobody should assume or set the page other
  *     than zero when the lock is not held. Lock holders must restore page 0
- *     before unlocking. Even pure readers must take the lock to protect in 
+ *     before unlocking. Even pure readers must take the lock to protect in
  *     page 0.
  *
  *     To make life difficult the chip can also be very slow. We therefore can't
@@ -141,14 +141,14 @@ static void do_set_multicast_list(struct net_device *dev);
  *     a latency on SMP irq delivery. So we can easily go "disable irq" "sync irqs"
  *     enter lock, take the queued irq. So we waddle instead of flying.
  *
- *     Finally by special arrangement for the purpose of being generally 
+ *     Finally by special arrangement for the purpose of being generally
  *     annoying the transmit function is called bh atomic. That places
  *     restrictions on the user context callers as disable_irq won't save
  *     them.
  */
 
-\f
+
+
 /**
  * ei_open - Open/initialize the board.
  * @dev: network device to initialize
@@ -168,12 +168,12 @@ int ei_open(struct net_device *dev)
                 dev->tx_timeout = ei_tx_timeout;
        if (dev->watchdog_timeo <= 0)
                 dev->watchdog_timeo = TX_TIMEOUT;
-    
+
        /*
         *      Grab the page lock so we own the register set, then call
         *      the init function.
         */
-      
+
        spin_lock_irqsave(&ei_local->page_lock, flags);
        NS8390_init(dev, 1);
        /* Set the flag before we drop the lock, That way the IRQ arrives
@@ -198,7 +198,7 @@ int ei_close(struct net_device *dev)
        /*
         *      Hold the page lock during close
         */
-               
+
        spin_lock_irqsave(&ei_local->page_lock, flags);
        NS8390_init(dev, 0);
        spin_unlock_irqrestore(&ei_local->page_lock, flags);
@@ -241,26 +241,26 @@ void ei_tx_timeout(struct net_device *dev)
                dev->name, (txsr & ENTSR_ABT) ? "excess collisions." :
                (isr) ? "lost interrupt?" : "cable problem?", txsr, isr, tickssofar);
 
-       if (!isr && !ei_local->stat.tx_packets) 
+       if (!isr && !ei_local->stat.tx_packets)
        {
                /* The 8390 probably hasn't gotten on the cable yet. */
                ei_local->interface_num ^= 1;   /* Try a different xcvr.  */
        }
 
        /* Ugly but a reset can be slow, yet must be protected */
-               
+
        disable_irq_nosync_lockdep(dev->irq);
        spin_lock(&ei_local->page_lock);
-               
+
        /* Try to restart the card.  Perhaps the user has fixed something. */
        ei_reset_8390(dev);
        NS8390_init(dev, 1);
-               
+
        spin_unlock(&ei_local->page_lock);
        enable_irq_lockdep(dev->irq);
        netif_wake_queue(dev);
 }
-    
+
 /**
  * ei_start_xmit - begin packet transmission
  * @skb: packet to be sent
@@ -268,7 +268,7 @@ void ei_tx_timeout(struct net_device *dev)
  *
  * Sends a packet to an 8390 network device.
  */
+
 static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        long e8390_base = dev->base_addr;
@@ -285,24 +285,24 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
                data = buf;
        }
 
-       /* Mask interrupts from the ethercard. 
+       /* Mask interrupts from the ethercard.
           SMP: We have to grab the lock here otherwise the IRQ handler
           on another CPU can flip window and race the IRQ mask set. We end
           up trashing the mcast filter not disabling irqs if we don't lock */
-          
+
        spin_lock_irqsave(&ei_local->page_lock, flags);
        outb_p(0x00, e8390_base + EN0_IMR);
        spin_unlock_irqrestore(&ei_local->page_lock, flags);
-       
-       
+
+
        /*
         *      Slow phase with lock held.
         */
-        
-       disable_irq_nosync(dev->irq);
-       
+
+       disable_irq_nosync_lockdep(dev->irq);
+
        spin_lock(&ei_local->page_lock);
-       
+
        ei_local->irqlock = 1;
 
        /*
@@ -313,7 +313,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
         * card, leaving a substantial gap between each transmitted packet.
         */
 
-       if (ei_local->tx1 == 0) 
+       if (ei_local->tx1 == 0)
        {
                output_page = ei_local->tx_start_page;
                ei_local->tx1 = send_length;
@@ -321,7 +321,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        printk(KERN_DEBUG "%s: idle transmitter tx2=%d, lasttx=%d, txing=%d.\n",
                                dev->name, ei_local->tx2, ei_local->lasttx, ei_local->txing);
        }
-       else if (ei_local->tx2 == 0) 
+       else if (ei_local->tx2 == 0)
        {
                output_page = ei_local->tx_start_page + TX_PAGES/2;
                ei_local->tx2 = send_length;
@@ -338,7 +338,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
                netif_stop_queue(dev);
                outb_p(ENISR_ALL, e8390_base + EN0_IMR);
                spin_unlock(&ei_local->page_lock);
-               enable_irq(dev->irq);
+               enable_irq_lockdep(dev->irq);
                ei_local->stat.tx_errors++;
                return 1;
        }
@@ -348,20 +348,20 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
         * isn't already sending. If it is busy, the interrupt handler will
         * trigger the send later, upon receiving a Tx done interrupt.
         */
-        
+
        ei_block_output(dev, send_length, data, output_page);
-               
-       if (! ei_local->txing) 
+
+       if (! ei_local->txing)
        {
                ei_local->txing = 1;
                NS8390_trigger_send(dev, send_length, output_page);
                dev->trans_start = jiffies;
-               if (output_page == ei_local->tx_start_page) 
+               if (output_page == ei_local->tx_start_page)
                {
                        ei_local->tx1 = -1;
                        ei_local->lasttx = -1;
                }
-               else 
+               else
                {
                        ei_local->tx2 = -1;
                        ei_local->lasttx = -2;
@@ -377,16 +377,16 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
        /* Turn 8390 interrupts back on. */
        ei_local->irqlock = 0;
        outb_p(ENISR_ALL, e8390_base + EN0_IMR);
-       
+
        spin_unlock(&ei_local->page_lock);
-       enable_irq(dev->irq);
+       enable_irq_lockdep(dev->irq);
 
        dev_kfree_skb (skb);
        ei_local->stat.tx_bytes += send_length;
-    
+
        return 0;
 }
-\f
+
 /**
  * ei_interrupt - handle the interrupts from an 8390
  * @irq: interrupt number
@@ -406,23 +406,23 @@ irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs * regs)
        long e8390_base;
        int interrupts, nr_serviced = 0;
        struct ei_device *ei_local;
-    
-       if (dev == NULL) 
+
+       if (dev == NULL)
        {
                printk ("net_interrupt(): irq %d for unknown device.\n", irq);
                return IRQ_NONE;
        }
-    
+
        e8390_base = dev->base_addr;
        ei_local = (struct ei_device *) netdev_priv(dev);
 
        /*
         *      Protect the irq test too.
         */
-        
+
        spin_lock(&ei_local->page_lock);
 
-       if (ei_local->irqlock) 
+       if (ei_local->irqlock)
        {
 #if 1 /* This might just be an interrupt for a PCI device sharing this line */
                /* The "irqlock" check is only for testing. */
@@ -435,16 +435,16 @@ irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                spin_unlock(&ei_local->page_lock);
                return IRQ_NONE;
        }
-    
+
        /* Change to page 0 and read the intr status reg. */
        outb_p(E8390_NODMA+E8390_PAGE0, e8390_base + E8390_CMD);
        if (ei_debug > 3)
                printk(KERN_DEBUG "%s: interrupt(isr=%#2.2x).\n", dev->name,
                           inb_p(e8390_base + EN0_ISR));
-    
+
        /* !!Assumption!! -- we stay in page 0.  Don't break this. */
        while ((interrupts = inb_p(e8390_base + EN0_ISR)) != 0
-                  && ++nr_serviced < MAX_SERVICE) 
+                  && ++nr_serviced < MAX_SERVICE)
        {
                if (!netif_running(dev)) {
                        printk(KERN_WARNING "%s: interrupt from stopped card\n", dev->name);
@@ -453,9 +453,9 @@ irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                        interrupts = 0;
                        break;
                }
-               if (interrupts & ENISR_OVER) 
+               if (interrupts & ENISR_OVER)
                        ei_rx_overrun(dev);
-               else if (interrupts & (ENISR_RX+ENISR_RX_ERR)) 
+               else if (interrupts & (ENISR_RX+ENISR_RX_ERR))
                {
                        /* Got a good (?) packet. */
                        ei_receive(dev);
@@ -466,27 +466,27 @@ irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                else if (interrupts & ENISR_TX_ERR)
                        ei_tx_err(dev);
 
-               if (interrupts & ENISR_COUNTERS) 
+               if (interrupts & ENISR_COUNTERS)
                {
                        ei_local->stat.rx_frame_errors += inb_p(e8390_base + EN0_COUNTER0);
                        ei_local->stat.rx_crc_errors   += inb_p(e8390_base + EN0_COUNTER1);
                        ei_local->stat.rx_missed_errors+= inb_p(e8390_base + EN0_COUNTER2);
                        outb_p(ENISR_COUNTERS, e8390_base + EN0_ISR); /* Ack intr. */
                }
-               
+
                /* Ignore any RDC interrupts that make it back to here. */
-               if (interrupts & ENISR_RDC) 
+               if (interrupts & ENISR_RDC)
                {
                        outb_p(ENISR_RDC, e8390_base + EN0_ISR);
                }
 
                outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base + E8390_CMD);
        }
-    
-       if (interrupts && ei_debug) 
+
+       if (interrupts && ei_debug)
        {
                outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base + E8390_CMD);
-               if (nr_serviced >= MAX_SERVICE) 
+               if (nr_serviced >= MAX_SERVICE)
                {
                        /* 0xFF is valid for a card removal */
                        if(interrupts!=0xFF)
@@ -505,9 +505,9 @@ irqreturn_t ei_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 #ifdef CONFIG_NET_POLL_CONTROLLER
 void ei_poll(struct net_device *dev)
 {
-       disable_irq(dev->irq);
+       disable_irq_lockdep(dev->irq);
        ei_interrupt(dev->irq, dev, NULL);
-       enable_irq(dev->irq);
+       enable_irq_lockdep(dev->irq);
 }
 #endif
 
@@ -551,7 +551,7 @@ static void ei_tx_err(struct net_device *dev)
 
        if (tx_was_aborted)
                ei_tx_intr(dev);
-       else 
+       else
        {
                ei_local->stat.tx_errors++;
                if (txsr & ENTSR_CRS) ei_local->stat.tx_carrier_errors++;
@@ -573,7 +573,7 @@ static void ei_tx_intr(struct net_device *dev)
        long e8390_base = dev->base_addr;
        struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
        int status = inb(e8390_base + EN0_TSR);
-    
+
        outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */
 
        /*
@@ -582,13 +582,13 @@ static void ei_tx_intr(struct net_device *dev)
         */
        ei_local->txqueue--;
 
-       if (ei_local->tx1 < 0) 
+       if (ei_local->tx1 < 0)
        {
                if (ei_local->lasttx != 1 && ei_local->lasttx != -1)
                        printk(KERN_ERR "%s: bogus last_tx_buffer %d, tx1=%d.\n",
                                ei_local->name, ei_local->lasttx, ei_local->tx1);
                ei_local->tx1 = 0;
-               if (ei_local->tx2 > 0) 
+               if (ei_local->tx2 > 0)
                {
                        ei_local->txing = 1;
                        NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6);
@@ -596,15 +596,15 @@ static void ei_tx_intr(struct net_device *dev)
                        ei_local->tx2 = -1,
                        ei_local->lasttx = 2;
                }
-               else ei_local->lasttx = 20, ei_local->txing = 0;        
+               else ei_local->lasttx = 20, ei_local->txing = 0;
        }
-       else if (ei_local->tx2 < 0) 
+       else if (ei_local->tx2 < 0)
        {
                if (ei_local->lasttx != 2  &&  ei_local->lasttx != -2)
                        printk("%s: bogus last_tx_buffer %d, tx2=%d.\n",
                                ei_local->name, ei_local->lasttx, ei_local->tx2);
                ei_local->tx2 = 0;
-               if (ei_local->tx1 > 0) 
+               if (ei_local->tx1 > 0)
                {
                        ei_local->txing = 1;
                        NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page);
@@ -623,17 +623,17 @@ static void ei_tx_intr(struct net_device *dev)
                ei_local->stat.collisions++;
        if (status & ENTSR_PTX)
                ei_local->stat.tx_packets++;
-       else 
+       else
        {
                ei_local->stat.tx_errors++;
-               if (status & ENTSR_ABT) 
+               if (status & ENTSR_ABT)
                {
                        ei_local->stat.tx_aborted_errors++;
                        ei_local->stat.collisions += 16;
                }
-               if (status & ENTSR_CRS) 
+               if (status & ENTSR_CRS)
                        ei_local->stat.tx_carrier_errors++;
-               if (status & ENTSR_FU) 
+               if (status & ENTSR_FU)
                        ei_local->stat.tx_fifo_errors++;
                if (status & ENTSR_CDH)
                        ei_local->stat.tx_heartbeat_errors++;
@@ -647,7 +647,7 @@ static void ei_tx_intr(struct net_device *dev)
  * ei_receive - receive some packets
  * @dev: network device with which receive will be run
  *
- * We have a good packet(s), get it/them out of the buffers. 
+ * We have a good packet(s), get it/them out of the buffers.
  * Called with lock held.
  */
 
@@ -660,42 +660,42 @@ static void ei_receive(struct net_device *dev)
        int rx_pkt_count = 0;
        struct e8390_pkt_hdr rx_frame;
        int num_rx_pages = ei_local->stop_page-ei_local->rx_start_page;
-    
-       while (++rx_pkt_count < 10) 
+
+       while (++rx_pkt_count < 10)
        {
                int pkt_len, pkt_stat;
-               
+
                /* Get the rx page (incoming packet pointer). */
                outb_p(E8390_NODMA+E8390_PAGE1, e8390_base + E8390_CMD);
                rxing_page = inb_p(e8390_base + EN1_CURPAG);
                outb_p(E8390_NODMA+E8390_PAGE0, e8390_base + E8390_CMD);
-               
+
                /* Remove one frame from the ring.  Boundary is always a page behind. */
                this_frame = inb_p(e8390_base + EN0_BOUNDARY) + 1;
                if (this_frame >= ei_local->stop_page)
                        this_frame = ei_local->rx_start_page;
-               
+
                /* Someday we'll omit the previous, iff we never get this message.
-                  (There is at least one clone claimed to have a problem.)  
-                  
+                  (There is at least one clone claimed to have a problem.)
+
                   Keep quiet if it looks like a card removal. One problem here
                   is that some clones crash in roughly the same way.
                 */
                if (ei_debug > 0  &&  this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF))
                        printk(KERN_ERR "%s: mismatched read page pointers %2x vs %2x.\n",
                                   dev->name, this_frame, ei_local->current_page);
-               
+
                if (this_frame == rxing_page)   /* Read all the frames? */
                        break;                          /* Done for now */
-               
+
                current_offset = this_frame << 8;
                ei_get_8390_hdr(dev, &rx_frame, this_frame);
-               
+
                pkt_len = rx_frame.count - sizeof(struct e8390_pkt_hdr);
                pkt_stat = rx_frame.status;
-               
+
                next_frame = this_frame + 1 + ((pkt_len+4)>>8);
-               
+
                /* Check for bogosity warned by 3c503 book: the status byte is never
                   written.  This happened a lot during testing! This code should be
                   cleaned up someday. */
@@ -709,7 +709,7 @@ static void ei_receive(struct net_device *dev)
                        continue;
                }
 
-               if (pkt_len < 60  ||  pkt_len > 1518) 
+               if (pkt_len < 60  ||  pkt_len > 1518)
                {
                        if (ei_debug)
                                printk(KERN_DEBUG "%s: bogus packet size: %d, status=%#2x nxpg=%#2x.\n",
@@ -718,12 +718,12 @@ static void ei_receive(struct net_device *dev)
                        ei_local->stat.rx_errors++;
                        ei_local->stat.rx_length_errors++;
                }
-                else if ((pkt_stat & 0x0F) == ENRSR_RXOK) 
+                else if ((pkt_stat & 0x0F) == ENRSR_RXOK)
                {
                        struct sk_buff *skb;
-                       
+
                        skb = dev_alloc_skb(pkt_len+2);
-                       if (skb == NULL) 
+                       if (skb == NULL)
                        {
                                if (ei_debug > 1)
                                        printk(KERN_DEBUG "%s: Couldn't allocate a sk_buff of size %d.\n",
@@ -745,8 +745,8 @@ static void ei_receive(struct net_device *dev)
                                if (pkt_stat & ENRSR_PHY)
                                        ei_local->stat.multicast++;
                        }
-               } 
-               else 
+               }
+               else
                {
                        if (ei_debug)
                                printk(KERN_DEBUG "%s: bogus packet: status=%#2x nxpg=%#2x size=%d\n",
@@ -758,7 +758,7 @@ static void ei_receive(struct net_device *dev)
                                ei_local->stat.rx_fifo_errors++;
                }
                next_frame = rx_frame.next;
-               
+
                /* This _should_ never happen: it's here for avoiding bad clones. */
                if (next_frame >= ei_local->stop_page) {
                        printk("%s: next frame inconsistency, %#2x\n", dev->name,
@@ -785,7 +785,7 @@ static void ei_receive(struct net_device *dev)
  * This includes causing "the NIC to defer indefinitely when it is stopped
  * on a busy network."  Ugh.
  * Called with lock held. Don't call this with the interrupts off or your
- * computer will hate you - it takes 10ms or so. 
+ * computer will hate you - it takes 10ms or so.
  */
 
 static void ei_rx_overrun(struct net_device *dev)
@@ -793,19 +793,19 @@ static void ei_rx_overrun(struct net_device *dev)
        long e8390_base = dev->base_addr;
        unsigned char was_txing, must_resend = 0;
        struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
-    
+
        /*
         * Record whether a Tx was in progress and then issue the
         * stop command.
         */
        was_txing = inb_p(e8390_base+E8390_CMD) & E8390_TRANS;
        outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD);
-    
+
        if (ei_debug > 1)
                printk(KERN_DEBUG "%s: Receiver overrun.\n", dev->name);
        ei_local->stat.rx_over_errors++;
-    
-       /* 
+
+       /*
         * Wait a full Tx time (1.2ms) + some guard time, NS says 1.6ms total.
         * Early datasheets said to poll the reset bit, but now they say that
         * it "is not a reliable indicator and subsequently should be ignored."
@@ -826,7 +826,7 @@ static void ei_rx_overrun(struct net_device *dev)
         */
 
        if (was_txing)
-       { 
+       {
                unsigned char tx_completed = inb_p(e8390_base+EN0_ISR) & (ENISR_TX+ENISR_TX_ERR);
                if (!tx_completed)
                        must_resend = 1;
@@ -848,7 +848,7 @@ static void ei_rx_overrun(struct net_device *dev)
        /*
         * Leave loopback mode, and resend any packet that got stopped.
         */
-       outb_p(E8390_TXCONFIG, e8390_base + EN0_TXCR); 
+       outb_p(E8390_TXCONFIG, e8390_base + EN0_TXCR);
        if (must_resend)
                outb_p(E8390_NODMA + E8390_PAGE0 + E8390_START + E8390_TRANS, e8390_base + E8390_CMD);
 }
@@ -856,13 +856,13 @@ static void ei_rx_overrun(struct net_device *dev)
 /*
  *     Collect the stats. This is called unlocked and from several contexts.
  */
+
 static struct net_device_stats *get_stats(struct net_device *dev)
 {
        long ioaddr = dev->base_addr;
        struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
        unsigned long flags;
-    
+
        /* If the card is stopped, just return the present stats. */
        if (!netif_running(dev))
                return &ei_local->stat;
@@ -873,7 +873,7 @@ static struct net_device_stats *get_stats(struct net_device *dev)
        ei_local->stat.rx_crc_errors   += inb_p(ioaddr + EN0_COUNTER1);
        ei_local->stat.rx_missed_errors+= inb_p(ioaddr + EN0_COUNTER2);
        spin_unlock_irqrestore(&ei_local->page_lock, flags);
-    
+
        return &ei_local->stat;
 }
 
@@ -881,21 +881,21 @@ static struct net_device_stats *get_stats(struct net_device *dev)
  * Form the 64 bit 8390 multicast table from the linked list of addresses
  * associated with this dev structure.
  */
+
 static inline void make_mc_bits(u8 *bits, struct net_device *dev)
 {
        struct dev_mc_list *dmi;
 
-       for (dmi=dev->mc_list; dmi; dmi=dmi->next) 
+       for (dmi=dev->mc_list; dmi; dmi=dmi->next)
        {
                u32 crc;
-               if (dmi->dmi_addrlen != ETH_ALEN) 
+               if (dmi->dmi_addrlen != ETH_ALEN)
                {
                        printk(KERN_INFO "%s: invalid multicast address length given.\n", dev->name);
                        continue;
                }
                crc = ether_crc(ETH_ALEN, dmi->dmi_addr);
-               /* 
+               /*
                 * The 8390 uses the 6 most significant bits of the
                 * CRC to index the multicast table.
                 */
@@ -908,16 +908,16 @@ static inline void make_mc_bits(u8 *bits, struct net_device *dev)
  * @dev: net device for which multicast filter is adjusted
  *
  *     Set or clear the multicast filter for this adaptor. May be called
- *     from a BH in 2.1.x. Must be called with lock held. 
+ *     from a BH in 2.1.x. Must be called with lock held.
  */
+
 static void do_set_multicast_list(struct net_device *dev)
 {
        long e8390_base = dev->base_addr;
        int i;
        struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
 
-       if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) 
+       if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
        {
                memset(ei_local->mcfilter, 0, 8);
                if (dev->mc_list)
@@ -926,23 +926,23 @@ static void do_set_multicast_list(struct net_device *dev)
        else
                memset(ei_local->mcfilter, 0xFF, 8);    /* mcast set to accept-all */
 
-       /* 
+       /*
         * DP8390 manuals don't specify any magic sequence for altering
         * the multicast regs on an already running card. To be safe, we
         * ensure multicast mode is off prior to loading up the new hash
         * table. If this proves to be not enough, we can always resort
         * to stopping the NIC, loading the table and then restarting.
         *
-        * Bug Alert!  The MC regs on the SMC 83C690 (SMC Elite and SMC 
+        * Bug Alert!  The MC regs on the SMC 83C690 (SMC Elite and SMC
         * Elite16) appear to be write-only. The NS 8390 data sheet lists
         * them as r/w so this is a bug.  The SMC 83C790 (SMC Ultra and
         * Ultra32 EISA) appears to have this bug fixed.
         */
-        
+
        if (netif_running(dev))
                outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
        outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD);
-       for(i = 0; i < 8; i++) 
+       for(i = 0; i < 8; i++)
        {
                outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
 #ifndef BUG_83C690
@@ -965,16 +965,16 @@ static void do_set_multicast_list(struct net_device *dev)
  *     be parallel to just about everything else. Its also fairly quick and
  *     not called too often. Must protect against both bh and irq users
  */
+
 static void set_multicast_list(struct net_device *dev)
 {
        unsigned long flags;
        struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
-       
+
        spin_lock_irqsave(&ei_local->page_lock, flags);
        do_set_multicast_list(dev);
        spin_unlock_irqrestore(&ei_local->page_lock, flags);
-}      
+}
 
 /**
  * ethdev_setup - init rest of 8390 device struct
@@ -989,7 +989,7 @@ static void ethdev_setup(struct net_device *dev)
        struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
        if (ei_debug > 1)
                printk(version);
-    
+
        dev->hard_start_xmit = &ei_start_xmit;
        dev->get_stats  = get_stats;
        dev->set_multicast_list = &set_multicast_list;
@@ -1011,7 +1011,7 @@ struct net_device *__alloc_ei_netdev(int size)
                                ethdev_setup);
 }
 
-\f
+
 
 
 /* This page of functions should be 8390 generic */
@@ -1033,9 +1033,9 @@ void NS8390_init(struct net_device *dev, int startp)
        int endcfg = ei_local->word16
            ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
            : 0x48;
-    
+
        if(sizeof(struct e8390_pkt_hdr)!=4)
-               panic("8390.c: header struct mispacked\n");    
+               panic("8390.c: header struct mispacked\n");
        /* Follow National Semi's recommendations for initing the DP83902. */
        outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD); /* 0x21 */
        outb_p(endcfg, e8390_base + EN0_DCFG);  /* 0x48 or 0x49 */
@@ -1055,11 +1055,11 @@ void NS8390_init(struct net_device *dev, int startp)
        /* Clear the pending interrupts and mask. */
        outb_p(0xFF, e8390_base + EN0_ISR);
        outb_p(0x00,  e8390_base + EN0_IMR);
-    
+
        /* Copy the station address into the DS8390 registers. */
 
        outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP, e8390_base+E8390_CMD); /* 0x61 */
-       for(i = 0; i < 6; i++) 
+       for(i = 0; i < 6; i++)
        {
                outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i));
                if (ei_debug > 1 && inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
@@ -1073,7 +1073,7 @@ void NS8390_init(struct net_device *dev, int startp)
        ei_local->tx1 = ei_local->tx2 = 0;
        ei_local->txing = 0;
 
-       if (startp) 
+       if (startp)
        {
                outb_p(0xff,  e8390_base + EN0_ISR);
                outb_p(ENISR_ALL,  e8390_base + EN0_IMR);
@@ -1085,18 +1085,18 @@ void NS8390_init(struct net_device *dev, int startp)
        }
 }
 
-/* Trigger a transmit start, assuming the length is valid. 
+/* Trigger a transmit start, assuming the length is valid.
    Always called with the page lock held */
-   
+
 static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
                                                                int start_page)
 {
        long e8390_base = dev->base_addr;
        struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
-   
+
        outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
-    
-       if (inb_p(e8390_base + E8390_CMD) & E8390_TRANS) 
+
+       if (inb_p(e8390_base + E8390_CMD) & E8390_TRANS)
        {
                printk(KERN_WARNING "%s: trigger_send() called with the transmitter busy.\n",
                        dev->name);
index a9a58f518f45cc28cdef4c71ba7c6d6b6708860f..ca4eb0ccf8cfe4f55b0084432db8744c47cd891d 100644 (file)
@@ -106,7 +106,7 @@ struct ei_device {
  *     Only generate indirect loads given a machine that needs them.
  *      - removed AMIGA_PCMCIA from this list, handled as ISA io now
  */
+
 #if defined(CONFIG_MAC) ||  \
     defined(CONFIG_ZORRO8390) || defined(CONFIG_ZORRO8390_MODULE) || \
     defined(CONFIG_HYDRA) || defined(CONFIG_HYDRA_MODULE)
index a2bd8119270e02d35801757e82c4b3a6c311dbf5..d30ab6b492d1289dc66c6a80b98118cf80c6b34a 100644 (file)
@@ -1300,6 +1300,23 @@ config PCNET32
          <file:Documentation/networking/net-modules.txt>. The module
          will be called pcnet32.
 
+config PCNET32_NAPI
+       bool "Use RX polling (NAPI) (EXPERIMENTAL)"
+       depends on PCNET32 && EXPERIMENTAL
+       help
+         NAPI is a new driver API designed to reduce CPU and interrupt load
+         when the driver is receiving lots of packets from the card. It is
+         still somewhat experimental and thus not yet enabled by default.
+
+         If your estimated Rx load is 10kpps or more, or if the card will be
+         deployed on potentially unfriendly networks (e.g. in a firewall),
+         then say Y here.
+
+         See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+         information.
+
+         If in doubt, say N.
+
 config AMD8111_ETH
        tristate "AMD 8111 (new PCI lance) support"
        depends on NET_PCI && PCI
@@ -1411,6 +1428,22 @@ config FORCEDETH
          <file:Documentation/networking/net-modules.txt>.  The module will be
          called forcedeth.
 
+config FORCEDETH_NAPI
+       bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)"
+       depends on FORCEDETH && EXPERIMENTAL
+       help
+         NAPI is a new driver API designed to reduce CPU and interrupt load
+         when the driver is receiving lots of packets from the card. It is
+         still somewhat experimental and thus not yet enabled by default.
+
+         If your estimated Rx load is 10kpps or more, or if the card will be
+         deployed on potentially unfriendly networks (e.g. in a firewall),
+         then say Y here.
+
+         See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+         information.
+
+         If in doubt, say N.
 
 config CS89x0
        tristate "CS89x0 support"
@@ -2290,6 +2323,15 @@ config MV643XX_ETH_2
          This enables support for Port 2 of the Marvell MV643XX Gigabit
          Ethernet.
 
+config QLA3XXX
+       tristate "QLogic QLA3XXX Network Driver Support"
+       depends on PCI
+       help
+         This driver supports QLogic ISP3XXX gigabit Ethernet cards.
+
+         To compile this driver as a module, choose M here: the module
+         will be called qla3xxx.
+
 endmenu
 
 #
@@ -2318,6 +2360,15 @@ config CHELSIO_T1
           To compile this driver as a module, choose M here: the module
           will be called cxgb.
 
+config EHEA
+       tristate "eHEA Ethernet support"
+       depends on IBMEBUS
+       ---help---
+         This driver supports the IBM pSeries eHEA ethernet adapter.
+
+         To compile the driver as a module, choose M here. The module
+         will be called ehea.
+
 config IXGB
        tristate "Intel(R) PRO/10GbE support"
        depends on PCI
@@ -2550,6 +2601,7 @@ config PLIP
 
 config PPP
        tristate "PPP (point-to-point protocol) support"
+       select SLHC
        ---help---
          PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
          the same purpose: sending Internet traffic over telephone (and other
@@ -2730,6 +2782,7 @@ config SLIP
 config SLIP_COMPRESSED
        bool "CSLIP compressed headers"
        depends on SLIP
+       select SLHC
        ---help---
          This protocol is faster than SLIP because it uses compression on the
          TCP/IP headers (not on the data itself), but it has to be supported
@@ -2742,6 +2795,12 @@ config SLIP_COMPRESSED
          <http://www.tldp.org/docs.html#howto>, explains how to configure
          CSLIP. This won't enlarge your kernel.
 
+config SLHC
+       tristate
+       help
+         This option enables Van Jacobsen serial line header compression
+         routines.
+
 config SLIP_SMART
        bool "Keepalive and linefill"
        depends on SLIP
index 8427bf9dec9d9b9aa558a44dbf85fb75c09acda7..0f329e56345e68732955552cea8f29af32388a23 100644 (file)
@@ -2,14 +2,11 @@
 # Makefile for the Linux network (ethercard) device drivers.
 #
 
-ifeq ($(CONFIG_ISDN_PPP),y)
-  obj-$(CONFIG_ISDN) += slhc.o
-endif
-
 obj-$(CONFIG_E1000) += e1000/
 obj-$(CONFIG_IBM_EMAC) += ibm_emac/
 obj-$(CONFIG_IXGB) += ixgb/
 obj-$(CONFIG_CHELSIO_T1) += chelsio/
+obj-$(CONFIG_EHEA) += ehea/
 obj-$(CONFIG_BONDING) += bonding/
 obj-$(CONFIG_GIANFAR) += gianfar_driver.o
 
@@ -113,8 +110,9 @@ obj-$(CONFIG_FORCEDETH) += forcedeth.o
 obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o
 
 obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
+obj-$(CONFIG_QLA3XXX) += qla3xxx.o
 
-obj-$(CONFIG_PPP) += ppp_generic.o slhc.o
+obj-$(CONFIG_PPP) += ppp_generic.o
 obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
 obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
 obj-$(CONFIG_PPP_DEFLATE) += ppp_deflate.o
@@ -123,9 +121,7 @@ obj-$(CONFIG_PPP_MPPE) += ppp_mppe.o
 obj-$(CONFIG_PPPOE) += pppox.o pppoe.o
 
 obj-$(CONFIG_SLIP) += slip.o
-ifeq ($(CONFIG_SLIP_COMPRESSED),y)
-  obj-$(CONFIG_SLIP) += slhc.o
-endif
+obj-$(CONFIG_SLHC) += slhc.o
 
 obj-$(CONFIG_DUMMY) += dummy.o
 obj-$(CONFIG_IFB) += ifb.o
index a8c245a822611d39bbfc92ef60200d28e1bf3a7c..9953201c670dcaab69b88a8bad8a3b5e19b8a729 100644 (file)
@@ -18,7 +18,7 @@
  *             - struct init cleanup, enable multiple ISA autoprobes.
  *             Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 09/1999
  *             - fix sbni: s/device/net_device/
- *             Paul Gortmaker (06/98): 
+ *             Paul Gortmaker (06/98):
  *              - sort probes in a sane way, make sure all (safe) probes
  *                get run once & failed autoprobes don't autoprobe again.
  *
@@ -91,7 +91,7 @@ extern struct net_device *mac89x0_probe(int unit);
 extern struct net_device *mc32_probe(int unit);
 extern struct net_device *cops_probe(int unit);
 extern struct net_device *ltpc_probe(void);
-  
+
 /* Detachable devices ("pocket adaptors") */
 extern struct net_device *de620_probe(int unit);
 
@@ -129,10 +129,10 @@ static int __init probe_list2(int unit, struct devprobe2 *p, int autoprobe)
  */
 
 static struct devprobe2 eisa_probes[] __initdata = {
-#ifdef CONFIG_ULTRA32 
-       {ultra32_probe, 0},     
+#ifdef CONFIG_ULTRA32
+       {ultra32_probe, 0},
 #endif
-#ifdef CONFIG_AC3200   
+#ifdef CONFIG_AC3200
        {ac3200_probe, 0},
 #endif
 #ifdef CONFIG_ES3210
@@ -167,14 +167,14 @@ static struct devprobe2 mca_probes[] __initdata = {
 static struct devprobe2 isa_probes[] __initdata = {
 #ifdef CONFIG_HP100            /* ISA, EISA & PCI */
        {hp100_probe, 0},
-#endif 
+#endif
 #ifdef CONFIG_3C515
        {tc515_probe, 0},
 #endif
-#ifdef CONFIG_ULTRA 
+#ifdef CONFIG_ULTRA
        {ultra_probe, 0},
 #endif
-#ifdef CONFIG_WD80x3 
+#ifdef CONFIG_WD80x3
        {wd_probe, 0},
 #endif
 #ifdef CONFIG_EL2              /* 3c503 */
@@ -199,7 +199,7 @@ static struct devprobe2 isa_probes[] __initdata = {
 #ifdef CONFIG_SMC9194
        {smc_init, 0},
 #endif
-#ifdef CONFIG_SEEQ8005 
+#ifdef CONFIG_SEEQ8005
        {seeq8005_probe, 0},
 #endif
 #ifdef CONFIG_CS89x0
@@ -295,7 +295,7 @@ static struct devprobe2 m68k_probes[] __initdata = {
  * Unified ethernet device probe, segmented per architecture and
  * per bus interface. This drives the legacy devices only for now.
  */
+
 static void __init ethif_probe2(int unit)
 {
        unsigned long base_addr = netdev_boot_base("eth", unit);
@@ -349,7 +349,7 @@ static void __init trif_probe2(int unit)
 }
 #endif
 
-       
+
 /*
  *     The loopback device is global so it can be directly referenced
  *     by the network code. Also, it must be first on device list.
@@ -365,7 +365,7 @@ static int __init net_olddevs_init(void)
                printk(KERN_ERR "Network loopback device setup failed\n");
        }
 
-       
+
 #ifdef CONFIG_SBNI
        for (num = 0; num < 8; ++num)
                sbni_probe(num);
index f4ea62641acd59c41958bc96721051045f171bd3..5f7258fea19d2ba5de2f423979d508d8b2898ca4 100644 (file)
@@ -93,7 +93,7 @@ struct lance_init_block {
        unsigned short rx_len;          /* receive len and high addr */
        unsigned short tx_ptr;          /* transmit descriptor addr */
        unsigned short tx_len;          /* transmit len and high addr */
-    
+
        /* The Tx and Rx ring entries must aligned on 8-byte boundaries. */
        struct lance_rx_desc brx_ring[RX_RING_SIZE];
        struct lance_tx_desc btx_ring[TX_RING_SIZE];
@@ -115,7 +115,7 @@ struct lance_private {
 
        int rx_new, tx_new;
        int rx_old, tx_old;
-    
+
        int lance_log_rx_bufs, lance_log_tx_bufs;
        int rx_ring_mod_mask, tx_ring_mod_mask;
 
@@ -190,7 +190,7 @@ static void lance_init_ring (struct net_device *dev)
 
        if (ZERO)
                printk(KERN_DEBUG "TX rings:\n");
-    
+
        /* Setup the Tx ring entries */
        for (i = 0; i <= (1<<lp->lance_log_tx_bufs); i++) {
                leptr = LANCE_ADDR(&aib->tx_buf[i][0]);
@@ -219,14 +219,14 @@ static void lance_init_ring (struct net_device *dev)
        }
 
        /* Setup the initialization block */
-    
+
        /* Setup rx descriptor pointer */
        leptr = LANCE_ADDR(&aib->brx_ring);
        ib->rx_len = (lp->lance_log_rx_bufs << 13) | (leptr >> 16);
        ib->rx_ptr = leptr;
        if (ZERO)
                printk(KERN_DEBUG "RX ptr: %8.8x\n", leptr);
-    
+
        /* Setup tx descriptor pointer */
        leptr = LANCE_ADDR(&aib->btx_ring);
        ib->tx_len = (lp->lance_log_tx_bufs << 13) | (leptr >> 16);
@@ -286,7 +286,7 @@ static int lance_rx (struct net_device *dev)
        }
        printk ("]\n");
 #endif
-    
+
        ll->rdp = LE_C0_RINT|LE_C0_INEA;
        for (rd = &ib->brx_ring [lp->rx_new];
             !((bits = rd->rmd1_bits) & LE_R1_OWN);
@@ -319,7 +319,7 @@ static int lance_rx (struct net_device *dev)
                                lp->rx_new = (lp->rx_new + 1) & lp->rx_ring_mod_mask;
                                return 0;
                        }
-           
+
                        skb->dev = dev;
                        skb_reserve (skb, 2);           /* 16 byte align */
                        skb_put (skb, len);             /* make room */
@@ -361,10 +361,10 @@ static int lance_tx (struct net_device *dev)
                /* If we hit a packet not owned by us, stop */
                if (td->tmd1_bits & LE_T1_OWN)
                        break;
-               
+
                if (td->tmd1_bits & LE_T1_ERR) {
                        status = td->misc;
-           
+
                        lp->stats.tx_errors++;
                        if (status & LE_T3_RTY)  lp->stats.tx_aborted_errors++;
                        if (status & LE_T3_LCOL) lp->stats.tx_window_errors++;
@@ -417,7 +417,7 @@ static int lance_tx (struct net_device *dev)
 
                        lp->stats.tx_packets++;
                }
-       
+
                j = (j + 1) & lp->tx_ring_mod_mask;
        }
        lp->tx_old = j;
@@ -452,7 +452,7 @@ lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
                /* Clear the error condition */
                ll->rdp = LE_C0_BABL|LE_C0_ERR|LE_C0_MISS|LE_C0_INEA;
        }
-    
+
        if (csr0 & LE_C0_RINT)
                lance_rx (dev);
 
@@ -528,7 +528,7 @@ static inline int lance_reset (struct net_device *dev)
        struct lance_private *lp = netdev_priv(dev);
        volatile struct lance_regs *ll = lp->ll;
        int status;
-    
+
        /* Stop the lance */
        ll->rap = LE_CSR0;
        ll->rdp = LE_C0_STOP;
@@ -569,7 +569,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
        skblen = skb->len;
        len = skblen;
-       
+
        if (len < ETH_ZLEN) {
                len = ETH_ZLEN;
                if (skb_padto(skb, ETH_ZLEN))
@@ -587,7 +587,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
        /* dump the packet */
        {
                int i;
-       
+
                for (i = 0; i < 64; i++) {
                        if ((i % 16) == 0)
                                printk("\n" KERN_DEBUG);
@@ -599,13 +599,13 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
        entry = lp->tx_new & lp->tx_ring_mod_mask;
        ib->btx_ring [entry].length = (-len) | 0xf000;
        ib->btx_ring [entry].misc = 0;
-    
+
        memcpy ((char *)&ib->tx_buf [entry][0], skb->data, skblen);
 
        /* Clear the slack of the packet, do I need this? */
        if (len != skblen)
                memset ((char *) &ib->tx_buf [entry][skblen], 0, len - skblen);
-    
+
        /* Now, give the packet to the lance */
        ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN);
        lp->tx_new = (lp->tx_new+1) & lp->tx_ring_mod_mask;
@@ -619,7 +619,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
        ll->rdp = LE_C0_INEA | LE_C0_TDMD;
        dev->trans_start = jiffies;
        dev_kfree_skb (skb);
-    
+
        local_irq_restore(flags);
 
        return status;
@@ -642,9 +642,9 @@ static void lance_load_multicast (struct net_device *dev)
        char *addrs;
        int i;
        u32 crc;
-       
+
        /* set all multicast bits */
-       if (dev->flags & IFF_ALLMULTI){ 
+       if (dev->flags & IFF_ALLMULTI){
                ib->filter [0] = 0xffffffff;
                ib->filter [1] = 0xffffffff;
                return;
@@ -661,7 +661,7 @@ static void lance_load_multicast (struct net_device *dev)
                /* multicast address? */
                if (!(*addrs & 1))
                        continue;
-               
+
                crc = ether_crc_le(6, addrs);
                crc = crc >> 26;
                mcast_table [crc >> 4] |= 1 << (crc & 0xf);
index 184ad573dbda3b75ab88f30970c59300a913dc46..5117759d4e9c82823c1ff7a5d265ba77a7a4ba9d 100644 (file)
@@ -109,7 +109,7 @@ struct lance_rx_desc {
                                     */
        unsigned short mblength;    /* Aactual number of bytes received */
 };
+
 struct lance_tx_desc {
        unsigned short tmd0;        /* low address of packet */
        unsigned char  tmd1_bits;   /* descriptor bits */
@@ -117,7 +117,7 @@ struct lance_tx_desc {
        short    length;            /* Length is 2s complement (negative)! */
        unsigned short misc;
 };
-               
+
 
 /*
  *             Receive Flags
index 0fbbcb75af69740fd07887727f8d79a8bb9d741c..0dca8bb9d2c724254947964abd642bc39647fc17 100644 (file)
@@ -45,7 +45,7 @@ static const char version[] =
 #define AC_NIC_BASE    0x00
 #define AC_SA_PROM     0x16                    /* The station address PROM. */
 #define AC_ADDR0       0x00                    /* Prefix station address values. */
-#define AC_ADDR1       0x40                    
+#define AC_ADDR1       0x40
 #define AC_ADDR2       0x90
 #define AC_ID_PORT     0xC80
 #define AC_EISA_ID     0x0110d305
@@ -89,7 +89,7 @@ static void ac_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
                                        int ring_page);
 
 static int ac_close_card(struct net_device *dev);
-\f
+
 
 /*     Probe for the AC3200.
 
@@ -217,7 +217,7 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev)
        dev->if_port = inb(ioaddr + AC_CONFIG) >> 6;
        dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG));
 
-       printk("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n", 
+       printk("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n",
                        dev->name, ioaddr, AC_STOP_PG/4, dev->mem_start);
 
        /*
index 1c01e9b3d07c88cd2856232d268736ac77d87adc..0473c6d14b4ac8657ba3f2f4a97afeafb3804602 100644 (file)
@@ -99,7 +99,7 @@
 #endif
 
 #ifndef PCI_VENDOR_ID_ALTEON
-#define PCI_VENDOR_ID_ALTEON           0x12ae  
+#define PCI_VENDOR_ID_ALTEON           0x12ae
 #endif
 #ifndef PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE
 #define PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE  0x0001
@@ -443,7 +443,7 @@ MODULE_PARM_DESC(max_rx_desc, "AceNIC/3C985/GA620 max number of receive descript
 MODULE_PARM_DESC(tx_ratio, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)");
 
 
-static char version[] __devinitdata = 
+static char version[] __devinitdata =
   "acenic.c: v0.92 08/05/2002  Jes Sorensen, linux-acenic@SunSITE.dk\n"
   "                            http://home.cern.ch/~jes/gige/acenic.html\n";
 
@@ -451,7 +451,7 @@ static int ace_get_settings(struct net_device *, struct ethtool_cmd *);
 static int ace_set_settings(struct net_device *, struct ethtool_cmd *);
 static void ace_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
 
-static struct ethtool_ops ace_ethtool_ops = {
+static const struct ethtool_ops ace_ethtool_ops = {
        .get_settings = ace_get_settings,
        .set_settings = ace_set_settings,
        .get_drvinfo = ace_get_drvinfo,
@@ -516,7 +516,7 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev,
 
        pci_read_config_word(pdev, PCI_COMMAND, &ap->pci_command);
 
-       /* OpenFirmware on Mac's does not set this - DOH.. */ 
+       /* OpenFirmware on Mac's does not set this - DOH.. */
        if (!(ap->pci_command & PCI_COMMAND_MEMORY)) {
                printk(KERN_INFO "%s: Enabling PCI Memory Mapped "
                       "access - was not enabled by BIOS/Firmware\n",
@@ -636,7 +636,7 @@ static void __devexit acenic_remove_one(struct pci_dev *pdev)
        writel(readl(&regs->CpuCtrl) | CPU_HALT, &regs->CpuCtrl);
        if (ap->version >= 2)
                writel(readl(&regs->CpuBCtrl) | CPU_HALT, &regs->CpuBCtrl);
-       
+
        /*
         * This clears any pending interrupts
         */
@@ -725,7 +725,7 @@ static struct pci_driver acenic_pci_driver = {
 
 static int __init acenic_init(void)
 {
-       return pci_module_init(&acenic_pci_driver);
+       return pci_register_driver(&acenic_pci_driver);
 }
 
 static void __exit acenic_exit(void)
@@ -1059,7 +1059,7 @@ static int __devinit ace_init(struct net_device *dev)
        printk(KERN_INFO "  PCI bus width: %i bits, speed: %iMHz, "
               "latency: %i clks\n",
                (pci_state & PCI_32BIT) ? 32 : 64,
-               (pci_state & PCI_66MHZ) ? 66 : 33, 
+               (pci_state & PCI_66MHZ) ? 66 : 33,
                ap->pci_latency);
 
        /*
@@ -1161,7 +1161,7 @@ static int __devinit ace_init(struct net_device *dev)
                pci_write_config_word(pdev, PCI_COMMAND, ap->pci_command);
        }
 #endif
-               
+
        /*
         * Configure DMA attributes.
         */
@@ -1284,7 +1284,7 @@ static int __devinit ace_init(struct net_device *dev)
                              (RX_STD_RING_ENTRIES +
                               RX_JUMBO_RING_ENTRIES))));
                info->rx_mini_ctrl.max_len = ACE_MINI_SIZE;
-               info->rx_mini_ctrl.flags = 
+               info->rx_mini_ctrl.flags =
                  RCB_FLG_TCP_UDP_SUM|RCB_FLG_NO_PSEUDO_HDR|ACE_RCB_VLAN_FLAG;
 
                for (i = 0; i < RX_MINI_RING_ENTRIES; i++)
@@ -1318,7 +1318,7 @@ static int __devinit ace_init(struct net_device *dev)
 
        if (ACE_IS_TIGON_I(ap)) {
                ap->tx_ring = (struct tx_desc *) regs->Window;
-               for (i = 0; i < (TIGON_I_TX_RING_ENTRIES 
+               for (i = 0; i < (TIGON_I_TX_RING_ENTRIES
                                 * sizeof(struct tx_desc)) / sizeof(u32); i++)
                        writel(0, (void __iomem *)ap->tx_ring  + i * 4);
 
@@ -1670,7 +1670,7 @@ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
 {
        struct ace_regs __iomem *regs = ap->regs;
        short i, idx;
-       
+
 
        prefetchw(&ap->cur_rx_bufs);
 
@@ -1966,7 +1966,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
 
        prefetchw(&ap->cur_rx_bufs);
        prefetchw(&ap->cur_mini_bufs);
-       
+
        while (idx != rxretprd) {
                struct ring_info *rip;
                struct sk_buff *skb;
@@ -1977,7 +1977,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
 
 
                /* make sure the rx descriptor isn't read before rxretprd */
-               if (idx == rxretcsm) 
+               if (idx == rxretcsm)
                        rmb();
 
                retdesc = &ap->rx_return_ring[idx];
@@ -2009,7 +2009,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
                        rip = &ap->skb->rx_mini_skbuff[skbidx];
                        mapsize = ACE_MINI_BUFSIZE;
                        rxdesc = &ap->rx_mini_ring[skbidx];
-                       mini_count++; 
+                       mini_count++;
                        break;
                default:
                        printk(KERN_INFO "%s: unknown frame type (0x%02x) "
@@ -2377,7 +2377,7 @@ static int ace_close(struct net_device *dev)
         */
        netif_stop_queue(dev);
 
-       
+
        if (ap->promisc) {
                cmd.evt = C_SET_PROMISC_MODE;
                cmd.code = C_C_PROMISC_DISABLE;
@@ -2412,7 +2412,7 @@ static int ace_close(struct net_device *dev)
 
                if (mapping) {
                        if (ACE_IS_TIGON_I(ap)) {
-                               struct tx_desc __iomem *tx 
+                               struct tx_desc __iomem *tx
                                        = (struct tx_desc __iomem *) &ap->tx_ring[i];
                                writel(0, &tx->addr.addrhi);
                                writel(0, &tx->addr.addrlo);
@@ -2625,7 +2625,7 @@ overflow:
                cpu_relax();
                goto restart;
        }
-       
+
        /* The ring is stuck full. */
        printk(KERN_WARNING "%s: Transmit ring stuck full\n", dev->name);
        return NETDEV_TX_BUSY;
@@ -2784,18 +2784,18 @@ static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
        return 0;
 }
 
-static void ace_get_drvinfo(struct net_device *dev, 
+static void ace_get_drvinfo(struct net_device *dev,
                            struct ethtool_drvinfo *info)
 {
        struct ace_private *ap = netdev_priv(dev);
 
        strlcpy(info->driver, "acenic", sizeof(info->driver));
-       snprintf(info->version, sizeof(info->version), "%i.%i.%i", 
+       snprintf(info->version, sizeof(info->version), "%i.%i.%i",
                tigonFwReleaseMajor, tigonFwReleaseMinor,
                tigonFwReleaseFix);
 
        if (ap->pdev)
-               strlcpy(info->bus_info, pci_name(ap->pdev), 
+               strlcpy(info->bus_info, pci_name(ap->pdev),
                        sizeof(info->bus_info));
 
 }
@@ -2912,7 +2912,7 @@ static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src,
        while (size > 0) {