usr/src/linuxelf-1.2.13/arch/i386/config.in100644 0 0 24113 6253342014 16326 0ustar rootroot# # For a description of the syntax of this configuration file, # see the Configure script. # comment 'General setup' bool 'Kernel math emulation' CONFIG_MATH_EMULATION n bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD y bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506 y if [ "$CONFIG_ST506" = "y" ]; then comment 'Please see drivers/block/README.ide for help/info on IDE drives' bool ' Use old disk-only driver for primary i/f' CONFIG_BLK_DEV_HD n if [ "$CONFIG_BLK_DEV_HD" = "y" ]; then bool ' Include new IDE driver for secondary i/f support' CONFIG_BLK_DEV_IDE n else bool ' Use new IDE driver for primary/secondary i/f' CONFIG_BLK_DEV_IDE y fi if [ "$CONFIG_BLK_DEV_IDE" = "y" ]; then bool ' Include support for IDE/ATAPI CDROMs' CONFIG_BLK_DEV_IDECD n fi fi bool 'XT harddisk support' CONFIG_BLK_DEV_XD n bool 'Networking support' CONFIG_NET y bool 'Limit memory to low 16MB' CONFIG_MAX_16M n bool 'PCI bios support' CONFIG_PCI n if [ "$CONFIG_PCI" = "y" ]; then bool ' PCI bridge optimisation (experimental)' CONFIG_PCI_OPTIMIZE n fi bool 'System V IPC' CONFIG_SYSVIPC y bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y #bool 'Use -mpentium flag for Pentium-specific optimizations' CONFIG_M586 n #if [ "$CONFIG_M586" = "n" ]; then bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y #fi comment 'Loadable module support' bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS n if [ "$CONFIG_NET" = "y" ]; then comment 'Networking options' bool 'TCP/IP networking' CONFIG_INET y if [ "$CONFIG_INET" = "y" ]; then bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n bool 'IP multicasting' CONFIG_IP_MULTICAST n bool 'IP firewalling' CONFIG_IP_FIREWALL n bool 'IP accounting' CONFIG_IP_ACCT n comment '(it is safe to leave these untouched)' bool 'PC/TCP compatibility mode' CONFIG_INET_PCTCP n bool 'Reverse ARP' CONFIG_INET_RARP n bool 'Assume subnets are local' CONFIG_INET_SNARL y bool 'Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n fi bool 'The IPX protocol' CONFIG_IPX n #bool 'Appletalk DDP' CONFIG_ATALK n #bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n fi comment 'SCSI support' bool 'SCSI support?' CONFIG_SCSI n if [ "$CONFIG_SCSI" = "n" ]; then comment 'Skipping SCSI configuration options...' else comment 'SCSI support type (disk, tape, CDrom)' bool 'SCSI disk support' CONFIG_BLK_DEV_SD y bool 'SCSI tape support' CONFIG_CHR_DEV_ST n bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR n bool 'SCSI generic support' CONFIG_CHR_DEV_SG n comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs' bool 'Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN n comment 'SCSI low-level drivers' bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 y bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n bool 'Adaptec AHA274X/284X support' CONFIG_SCSI_AHA274X n bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n bool 'EATA-DMA (DPT,NEC&ATT for ISA,EISA,PCI) support' CONFIG_SCSI_EATA_DMA n bool 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n if [ "$CONFIG_PCI" = "y" ]; then bool 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx n fi bool 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 n bool 'QLOGIC SCSI support' CONFIG_SCSI_QLOGIC n bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n #bool 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n #bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n fi if [ "$CONFIG_NET" = "y" ]; then comment 'Network device support' bool 'Network device support?' CONFIG_NETDEVICES y if [ "$CONFIG_NETDEVICES" = "n" ]; then comment 'Skipping network driver configuration options...' else bool 'Dummy net driver support' CONFIG_DUMMY y bool 'SLIP (serial line) support' CONFIG_SLIP n if [ "$CONFIG_SLIP" = "y" ]; then bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED y bool ' 16 channels instead of 4' SL_SLIP_LOTS n # bool ' SLIP debugging on' SL_DUMP y fi bool 'PPP (point-to-point) support' CONFIG_PPP n bool 'PLIP (parallel port) support' CONFIG_PLIP n bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then bool 'WD80*3 support' CONFIG_WD80x3 n bool 'SMC Ultra support' CONFIG_ULTRA n fi bool 'AMD LANCE and PCnet (AT1500 and NE2100) support' CONFIG_LANCE n bool '3COM cards' CONFIG_NET_VENDOR_3COM y if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then bool '3c501 support' CONFIG_EL1 n bool '3c503 support' CONFIG_EL2 n if [ "$CONFIG_NET_ALPHA" = "y" ]; then bool '3c505 support' CONFIG_ELPLUS n bool '3c507 support' CONFIG_EL16 n fi bool '3c509/3c579 support' CONFIG_EL3 y fi bool 'Realtek cards' CONFIG_NET_VENDOR_RTL y if [ "$CONFIG_NET_VENDOR_RTL" = "y" ]; then bool 'RTL8019 support' CONFIG_RTL8019 n bool 'RTL8029 support' CONFIG_RTL8029 n fi bool 'Other ISA cards' CONFIG_NET_ISA n if [ "$CONFIG_NET_ISA" = "y" ]; then bool 'Cabletron E21xx support' CONFIG_E2100 n bool 'DEPCA support' CONFIG_DEPCA n bool 'EtherWorks 3 support' CONFIG_EWRK3 n if [ "$CONFIG_NET_ALPHA" = "y" ]; then bool 'Arcnet support' CONFIG_ARCNET n bool 'AT1700 support' CONFIG_AT1700 n # bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n bool 'EtherExpress support' CONFIG_EEXPRESS n bool 'NI5210 support' CONFIG_NI52 n bool 'NI6510 support' CONFIG_NI65 n bool 'WaveLAN support' CONFIG_WAVELAN n fi bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n bool 'NE2000/NE1000 support' CONFIG_NE2000 y bool 'SK_G16 support' CONFIG_SK_G16 n fi bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA n if [ "$CONFIG_NET_EISA" = "y" ]; then if [ "$CONFIG_NET_ALPHA" = "y" ]; then bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n fi bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n bool 'DE425, DE434, DE435 support' CONFIG_DE4X5 n # bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n # bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n # bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n bool 'Zenith Z-Note support' CONFIG_ZNET y fi bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n if [ "$CONFIG_NET_POCKET" = "y" ]; then bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n # bool 'Silicom pocket adaptor support' CONFIG_SILICOM_PEA n # bool 'WaveLAN PCMCIA support' CONFIG_WaveLAN n # bool '3 Com 3c589 PCMCIA support' CONFIG_3C589 n fi fi fi comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)' bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n bool 'Mitsumi (not IDE/ATAPI) CDROM driver support' CONFIG_MCD n bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n if [ "$CONFIG_SBPCD" = "y" ]; then bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n if [ "$CONFIG_SBPCD2" = "y" ]; then bool 'Matsushita/Panasonic third CDROM controller support' CONFIG_SBPCD3 n if [ "$CONFIG_SBPCD3" = "y" ]; then bool 'Matsushita/Panasonic fourth CDROM controller support' CONFIG_SBPCD4 n fi fi fi bool 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n bool 'Sony CDU535 CDROM driver support' CONFIG_CDU535 n comment 'Filesystems' bool 'Standard (minix) fs support' CONFIG_MINIX_FS y bool 'Extended fs support' CONFIG_EXT_FS n bool 'Second extended fs support' CONFIG_EXT2_FS y bool 'xiafs filesystem support' CONFIG_XIA_FS n bool 'msdos fs support' CONFIG_MSDOS_FS y if [ "$CONFIG_MSDOS_FS" = "y" ]; then bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n fi bool '/proc filesystem support' CONFIG_PROC_FS y if [ "$CONFIG_INET" = "y" ]; then bool 'NFS filesystem support' CONFIG_NFS_FS y fi if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_AZTCD" = "y" -o "$CONFIG_CDU535" = "y" ]; then bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y else bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n fi bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n comment 'character devices' bool 'Cyclades async mux support' CONFIG_CYCLADES n bool 'Parallel printer support' CONFIG_PRINTER n bool 'Logitech busmouse support' CONFIG_BUSMOUSE n bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE n if [ "$CONFIG_PSMOUSE" = "y" ]; then bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y fi bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n bool 'QIC-02 tape support' CONFIG_QIC02_TAPE n if [ "$CONFIG_QIC02_TAPE" = "y" ]; then bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then comment '>>> Edit configuration parameters in ./include/linux/tpqic02.h!' else comment '>>> Setting runtime QIC-02 configuration is done with qic02conf' comment '>>> Which is available from ftp://ftp.funet.fi/pub/OS/Linux/BETA/QIC-02/' fi fi bool 'QIC-117 tape support' CONFIG_FTAPE n if [ "$CONFIG_FTAPE" = "y" ]; then int ' number of ftape buffers' NR_FTAPE_BUFFERS 3 fi comment 'Sound' bool 'Sound card support' CONFIG_SOUND n comment 'Kernel hacking' #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n bool 'Kernel profiling support' CONFIG_PROFILE n if [ "$CONFIG_PROFILE" = "y" ]; then int ' Profile shift count' CONFIG_PROFILE_SHIFT 2 fi if [ "$CONFIG_SCSI" = "y" ]; then bool 'Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS y fi usr/src/linuxelf-1.2.13/drivers/net/Makefile100644 0 0 13211 6253342101 17021 0ustar rootroot# File: drivers/net/Makefile # # Makefile for the Linux network (ethercard) device drivers. # # This will go away in some future future: hidden configuration files # are difficult for users to deal with. include CONFIG # Build MODULES by appending to this string for every driver below MODULES := NETDRV_OBJS := Space.o auto_irq.o net_init.o loopback.o override CFLAGS := $(CFLAGS) -I../../net/inet override CPP := $(CPP) -I../../net/inet .c.o: $(CC) $(CFLAGS) -c $< # The point of the makefile... all: net.a Space.o: Space.c ../../include/linux/autoconf.h $(CC) $(CFLAGS) $(OPTS) -c $< net_init.o: ../../include/linux/autoconf.h ifdef CONFIG_SK_G16 NETDRV_OBJS := $(NETDRV_OBJS) sk_g16.o endif ifdef CONFIG_WD80x3 NETDRV_OBJS := $(NETDRV_OBJS) wd.o CONFIG_8390 = CONFIG_8390 endif wd.o: wd.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(WD_OPTS) -c $< ifdef CONFIG_EL2 NETDRV_OBJS := $(NETDRV_OBJS) 3c503.o CONFIG_8390 = CONFIG_8390 endif 3c503.o: 3c503.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(EL2_OPTS) -c $< ifdef CONFIG_NE2000 NETDRV_OBJS := $(NETDRV_OBJS) ne.o CONFIG_8390 = CONFIG_8390 endif ne.o: ne.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(NE_OPTS) -c $< ifdef CONFIG_RTL8019 NETDRV_OBJS := $(NETDRV_OBJS) rtl8019.o CONFIG_8390 = CONFIG_8390 endif rtl8019.o: rtl8019.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(NE_OPTS) -c $< ifdef CONFIG_RTL8029 NETDRV_OBJS := $(NETDRV_OBJS) rtl8029.o CONFIG_8390 = CONFIG_8390 endif rtl8029.o: rtl8029.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(NE_OPTS) -c $< ifdef CONFIG_HPLAN NETDRV_OBJS := $(NETDRV_OBJS) hp.o CONFIG_8390 = CONFIG_8390 endif hp.o: hp.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(HP_OPTS) -c $< ifdef CONFIG_HPLAN_PLUS NETDRV_OBJS := $(NETDRV_OBJS) hp-plus.o CONFIG_8390 = CONFIG_8390 endif ifdef CONFIG_ULTRA NETDRV_OBJS := $(NETDRV_OBJS) smc-ultra.o CONFIG_8390 = CONFIG_8390 endif ifdef CONFIG_E2100 NETDRV_OBJS := $(NETDRV_OBJS) e2100.o CONFIG_8390 = CONFIG_8390 endif ifdef CONFIG_PLIP NETDRV_OBJS := $(NETDRV_OBJS) plip.o else MODULES := $(MODULES) plip.o endif plip.o: plip.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(PLIP_OPTS) -c $< ifdef CONFIG_PPP NETDRV_OBJS := $(NETDRV_OBJS) ppp.o CONFIG_SLHC = CONFIG_SLHC else MODULES := $(MODULES) ppp.o endif ifdef CONFIG_SLIP NETDRV_OBJS := $(NETDRV_OBJS) slip.o CONFIG_SLHC = CONFIG_SLHC else MODULES := $(MODULES) slip.o endif slip.o: slip.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) -c $< ifdef CONFIG_DE650 NETDRV_OBJS := $(NETDRV_OBJS) de650.o CONFIG_8390 = CONFIG_8390 endif ifdef CONFIG_3C589 NETDRV_OBJS := $(NETDRV_OBJS) 3c589.o endif ifdef CONFIG_DUMMY NETDRV_OBJS := $(NETDRV_OBJS) dummy.o else MODULES := $(MODULES) dummy.o endif dummy.o: dummy.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) -c $< ifdef CONFIG_DE600 NETDRV_OBJS := $(NETDRV_OBJS) de600.o else MODULES := $(MODULES) de600.o endif de600.o: de600.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(DE600_OPTS) -c $< ifdef CONFIG_DE620 NETDRV_OBJS := $(NETDRV_OBJS) de620.o else MODULES := $(MODULES) de620.o endif de620.o: de620.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(DE620_OPTS) -c $< ifdef CONFIG_AT1500 NETDRV_OBJS := $(NETDRV_OBJS) lance.o endif ifdef CONFIG_LANCE NETDRV_OBJS := $(NETDRV_OBJS) lance.o endif ifdef CONFIG_AT1700 NETDRV_OBJS := $(NETDRV_OBJS) at1700.o endif ifdef CONFIG_EL1 NETDRV_OBJS := $(NETDRV_OBJS) 3c501.o else MODULES := $(MODULES) 3c501.o endif ifdef CONFIG_EL16 NETDRV_OBJS := $(NETDRV_OBJS) 3c507.o endif ifdef CONFIG_EL3 NETDRV_OBJS := $(NETDRV_OBJS) 3c509.o else MODULES := $(MODULES) 3c509.o endif ifdef CONFIG_EEXPRESS NETDRV_OBJS := $(NETDRV_OBJS) eexpress.o else MODULES := $(MODULES) eexpress.o endif ifdef CONFIG_WAVELAN NETDRV_OBJS := $(NETDRV_OBJS) wavelan.o else MODULES := $(MODULES) wavelan.o endif ifdef CONFIG_ZNET NETDRV_OBJS := $(NETDRV_OBJS) znet.o endif ifdef CONFIG_DEPCA NETDRV_OBJS := $(NETDRV_OBJS) depca.o else MODULES := $(MODULES) depca.o endif depca.o: depca.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(DEPCA_OPTS) -c $< ifdef CONFIG_EWRK3 NETDRV_OBJS := $(NETDRV_OBJS) ewrk3.o else MODULES := $(MODULES) ewrk3.o endif ewrk3.o: ewrk3.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(EWRK3_OPTS) -c $< ifdef CONFIG_ATP NETDRV_OBJS := $(NETDRV_OBJS) atp.o endif ifdef CONFIG_DE4X5 NETDRV_OBJS := $(NETDRV_OBJS) de4x5.o else MODULES := $(MODULES) de4x5.o endif de4x5.o: de4x5.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(DE4x5_OPTS) -c $< ifdef CONFIG_NI52 NETDRV_OBJS := $(NETDRV_OBJS) ni52.o endif ifdef CONFIG_NI65 NETDRV_OBJS := $(NETDRV_OBJS) ni65.o endif ifdef CONFIG_ELPLUS NETDRV_OBJS := $(NETDRV_OBJS) 3c505.o endif ifdef CONFIG_AC3200 NETDRV_OBJS := $(NETDRV_OBJS) ac3200.o CONFIG_8390 = CONFIG_8390 endif ifdef CONFIG_APRICOT NETDRV_OBJS := $(NETDRV_OBJS) apricot.o else MODULES := $(MODULES) apricot.o endif ifdef CONFIG_DEC_ELCP NETDRV_OBJS := $(NETDRV_OBJS) tulip.o endif ifdef CONFIG_ARCNET NETDRV_OBJS := $(NETDRV_OBJS) arcnet.o else MODULES := $(MODULES) arcnet.o endif ifdef CONFIG_PI NETDRV_OBJS := $(NETDRV_OBJS) pi2.o CONFIG_PI = CONFIG_PI endif pi2.o: pi2.c CONFIG $(CC) $(CPPFLAGS) $(CFLAGS) $(PI_OPTS) -c $< ifdef CONFIG_SLHC NETDRV_OBJS := $(NETDRV_OBJS) slhc.o else MODULES := slhc.o $(MODULES) endif ifdef CONFIG_8390 NETDRV_OBJS := $(NETDRV_OBJS) 8390.o else MODULES := 8390.o $(MODULES) endif net.a: $(NETDRV_OBJS) rm -f net.a $(AR) rcs net.a $(NETDRV_OBJS) clean: rm -f core *.o *.a *.s dep: $(CPP) -M $(NETDRV_OBJS:.o=.c) > .depend ifdef MODULES $(CPP) -M -DMODULE $(MODULES:.o=.c) >> .depend endif tar: ifdef MODULES modules: $(MODULES) echo $(MODULES) > ../../modules/NET_MODULES cd ../../modules; \ for i in $(MODULES); do ln -sf ../drivers/net/$$i .; done else modules: endif # include a dependency file if one exists ifeq (.depend,$(wildcard .depend)) include .depend endif usr/src/linuxelf-1.2.13/drivers/net/Space.c100644 0 0 25103 6253342062 16571 0ustar rootroot/* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * Holds initial configuration information for devices. * * NOTE: This file is a nice idea, but its current format does not work * well for drivers that support multiple units, like the SLIP * driver. We should actually have only one pointer to a driver * here, with the driver knowing how many units it supports. * Currently, the SLIP driver abuses the "base_addr" integer * field of the 'device' structure to store the unit number... * -FvK * * Version: @(#)Space.c 1.0.7 08/12/93 * * Authors: Ross Biro, * Fred N. van Kempen, * Donald J. Becker, * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include #include #include #define NEXT_DEV NULL /* A unified ethernet device probe. This is the easiest way to have every ethernet adaptor have the name "eth[0123...]". */ extern int ultra_probe(struct device *dev); extern int wd_probe(struct device *dev); extern int el2_probe(struct device *dev); extern int ne_probe(struct device *dev); extern int r8e_probe(struct device *dev); extern int r9e_probe(struct device *dev); extern int hp_probe(struct device *dev); extern int hp_plus_probe(struct device *dev); extern int znet_probe(struct device *); extern int express_probe(struct device *); extern int el3_probe(struct device *); extern int at1500_probe(struct device *); extern int at1700_probe(struct device *); extern int depca_probe(struct device *); extern int apricot_probe(struct device *); extern int ewrk3_probe(struct device *); extern int de4x5_probe(struct device *); extern int el1_probe(struct device *); #if defined(CONFIG_WAVELAN) extern int wavelan_probe(struct device *); #endif /* defined(CONFIG_WAVELAN) */ extern int el16_probe(struct device *); extern int elplus_probe(struct device *); extern int ac3200_probe(struct device *); extern int e2100_probe(struct device *); extern int ni52_probe(struct device *); extern int ni65_probe(struct device *); extern int SK_init(struct device *); /* Detachable devices ("pocket adaptors") */ extern int atp_init(struct device *); extern int de600_probe(struct device *); extern int de620_probe(struct device *); static int ethif_probe(struct device *dev) { short base_addr = dev->base_addr; if (base_addr < 0 || base_addr == 1) return 1; /* ENXIO */ if (1 #if defined(CONFIG_ULTRA) && ultra_probe(dev) #endif #if defined(CONFIG_WD80x3) || defined(WD80x3) && wd_probe(dev) #endif #if defined(CONFIG_EL2) || defined(EL2) /* 3c503 */ && el2_probe(dev) #endif #if defined(CONFIG_NE2000) || defined(NE2000) && ne_probe(dev) #endif #if defined(CONFIG_RTL8019) || defined(RTL8019) && r8e_probe(dev) #endif #if defined(CONFIG_RTL8029) || defined(RTL8029) && r9e_probe(dev) #endif #if defined(CONFIG_HPLAN) || defined(HPLAN) && hp_probe(dev) #endif #if defined(CONFIG_HPLAN_PLUS) && hp_plus_probe(dev) #endif #ifdef CONFIG_AT1500 && at1500_probe(dev) #endif #ifdef CONFIG_AT1700 && at1700_probe(dev) #endif #ifdef CONFIG_EL3 /* 3c509 */ && el3_probe(dev) #endif #ifdef CONFIG_ZNET /* Zenith Z-Note and some IBM Thinkpads. */ && znet_probe(dev) #endif #ifdef CONFIG_EEXPRESS /* Intel EtherExpress */ && express_probe(dev) #endif #ifdef CONFIG_DEPCA /* DEC DEPCA */ && depca_probe(dev) #endif #ifdef CONFIG_EWRK3 /* DEC EtherWORKS 3 */ && ewrk3_probe(dev) #endif #ifdef CONFIG_DE4X5 /* DEC DE425, DE434, DE435 adapters */ && de4x5_probe(dev) #endif #ifdef CONFIG_APRICOT /* Apricot I82596 */ && apricot_probe(dev) #endif #ifdef CONFIG_EL1 /* 3c501 */ && el1_probe(dev) #endif #if defined(CONFIG_WAVELAN) /* WaveLAN */ && wavelan_probe(dev) #endif /* defined(CONFIG_WAVELAN) */ #ifdef CONFIG_EL16 /* 3c507 */ && el16_probe(dev) #endif #ifdef CONFIG_ELPLUS /* 3c505 */ && elplus_probe(dev) #endif #ifdef CONFIG_AC3200 /* Ansel Communications EISA 3200. */ && ac3200_probe(dev) #endif #ifdef CONFIG_E2100 /* Cabletron E21xx series. */ && e2100_probe(dev) #endif #ifdef CONFIG_DE600 /* D-Link DE-600 adapter */ && de600_probe(dev) #endif #ifdef CONFIG_DE620 /* D-Link DE-620 adapter */ && de620_probe(dev) #endif #if defined(CONFIG_SK_G16) && SK_init(dev) #endif #ifdef CONFIG_NI52 && ni52_probe(dev) #endif #ifdef CONFIG_NI65 && ni65_probe(dev) #endif && 1 ) { return 1; /* -ENODEV or -EAGAIN would be more accurate. */ } return 0; } /* Run-time ATtachable (Pocket) devices have a different (not "eth#") name. */ #ifdef CONFIG_ATP /* AT-LAN-TEC (RealTek) pocket adaptor. */ static struct device atp_dev = { "atp0", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, atp_init, /* ... */ }; # undef NEXT_DEV # define NEXT_DEV (&atp_dev) #endif #ifdef CONFIG_ARCNET extern int arcnet_probe(struct device *dev); static struct device arcnet_dev = { "arc0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, arcnet_probe, }; # undef NEXT_DEV # define NEXT_DEV (&arcnet_dev) #endif /* The first device defaults to I/O base '0', which means autoprobe. */ #ifndef ETH0_ADDR # define ETH0_ADDR 0 #endif #ifndef ETH0_IRQ # define ETH0_IRQ 0 #endif /* "eth0" defaults to autoprobe (== 0), other use a base of 0xffe0 (== -0x20), which means "don't probe". These entries exist to only to provide empty slots which may be enabled at boot-time. */ static struct device eth3_dev = { "eth3", 0,0,0,0,0xffe0 /* I/O base*/, 0,0,0,0, NEXT_DEV, ethif_probe }; static struct device eth2_dev = { "eth2", 0,0,0,0,0xffe0 /* I/O base*/, 0,0,0,0, ð3_dev, ethif_probe }; static struct device eth1_dev = { "eth1", 0,0,0,0,0xffe0 /* I/O base*/, 0,0,0,0, ð2_dev, ethif_probe }; static struct device eth0_dev = { "eth0", 0, 0, 0, 0, ETH0_ADDR, ETH0_IRQ, 0, 0, 0, ð1_dev, ethif_probe }; # undef NEXT_DEV # define NEXT_DEV (ð0_dev) #if defined(PLIP) || defined(CONFIG_PLIP) extern int plip_init(struct device *); static struct device plip2_dev = { "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, }; static struct device plip1_dev = { "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, }; static struct device plip0_dev = { "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, }; # undef NEXT_DEV # define NEXT_DEV (&plip0_dev) #endif /* PLIP */ #if defined(SLIP) || defined(CONFIG_SLIP) extern int slip_init(struct device *); #ifdef SL_SLIP_LOTS static struct device slip15_dev={"sl15",0,0,0,0,15,0,0,0,0,NEXT_DEV,slip_init}; static struct device slip14_dev={"sl14",0,0,0,0,14,0,0,0,0,&slip15_dev,slip_init}; static struct device slip13_dev={"sl13",0,0,0,0,13,0,0,0,0,&slip14_dev,slip_init}; static struct device slip12_dev={"sl12",0,0,0,0,12,0,0,0,0,&slip13_dev,slip_init}; static struct device slip11_dev={"sl11",0,0,0,0,11,0,0,0,0,&slip12_dev,slip_init}; static struct device slip10_dev={"sl10",0,0,0,0,10,0,0,0,0,&slip11_dev,slip_init}; static struct device slip9_dev={"sl9",0,0,0,0,9,0,0,0,0,&slip10_dev,slip_init}; static struct device slip8_dev={"sl8",0,0,0,0,8,0,0,0,0,&slip9_dev,slip_init}; static struct device slip7_dev={"sl7",0,0,0,0,7,0,0,0,0,&slip8_dev,slip_init}; static struct device slip6_dev={"sl6",0,0,0,0,6,0,0,0,0,&slip7_dev,slip_init}; static struct device slip5_dev={"sl5",0,0,0,0,5,0,0,0,0,&slip6_dev,slip_init}; static struct device slip4_dev={"sl4",0,0,0,0,4,0,0,0,0,&slip5_dev,slip_init}; # undef NEXT_DEV # define NEXT_DEV (&slip4_dev) #endif /* SL_SLIP_LOTS */ static struct device slip3_dev = { "sl3", /* Internal SLIP driver, channel 3 */ 0x0, /* recv memory end */ 0x0, /* recv memory start */ 0x0, /* memory end */ 0x0, /* memory start */ 0x3, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ NEXT_DEV, /* next device */ slip_init /* slip_init should set up the rest */ }; static struct device slip2_dev = { "sl2", /* Internal SLIP driver, channel 2 */ 0x0, /* recv memory end */ 0x0, /* recv memory start */ 0x0, /* memory end */ 0x0, /* memory start */ 0x2, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ &slip3_dev, /* next device */ slip_init /* slip_init should set up the rest */ }; static struct device slip1_dev = { "sl1", /* Internal SLIP driver, channel 1 */ 0x0, /* recv memory end */ 0x0, /* recv memory start */ 0x0, /* memory end */ 0x0, /* memory start */ 0x1, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ &slip2_dev, /* next device */ slip_init /* slip_init should set up the rest */ }; static struct device slip0_dev = { "sl0", /* Internal SLIP driver, channel 0 */ 0x0, /* recv memory end */ 0x0, /* recv memory start */ 0x0, /* memory end */ 0x0, /* memory start */ 0x0, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ &slip1_dev, /* next device */ slip_init /* slip_init should set up the rest */ }; # undef NEXT_DEV # define NEXT_DEV (&slip0_dev) #endif /* SLIP */ #if defined(CONFIG_PPP) extern int ppp_init(struct device *); static struct device ppp3_dev = { "ppp3", 0x0, 0x0, 0x0, 0x0, 3, 0, 0, 0, 0, NEXT_DEV, ppp_init, }; static struct device ppp2_dev = { "ppp2", 0x0, 0x0, 0x0, 0x0, 2, 0, 0, 0, 0, &ppp3_dev, ppp_init, }; static struct device ppp1_dev = { "ppp1", 0x0, 0x0, 0x0, 0x0, 1, 0, 0, 0, 0, &ppp2_dev, ppp_init, }; static struct device ppp0_dev = { "ppp0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, &ppp1_dev, ppp_init, }; #undef NEXT_DEV #define NEXT_DEV (&ppp0_dev) #endif /* PPP */ #ifdef CONFIG_DUMMY extern int dummy_init(struct device *dev); static struct device dummy_dev = { "dummy", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, dummy_init, }; # undef NEXT_DEV # define NEXT_DEV (&dummy_dev) #endif extern int loopback_init(struct device *dev); struct device loopback_dev = { "lo", /* Software Loopback interface */ 0x0, /* recv memory end */ 0x0, /* recv memory start */ 0x0, /* memory end */ 0x0, /* memory start */ 0, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ NEXT_DEV, /* next device */ loopback_init /* loopback_init should set up the rest */ }; struct device *dev_base = &loopback_dev; usr/src/linuxelf-1.2.13/drivers/net/rtl8029.c100644 0 0 31743 6235700775 16702 0ustar rootroot/* rtl8029.c: A general non-shared-memory RTL8019 ethernet driver for linux. */ /* Written 1992-94 by Donald Backer. Copyright 1993 United States Government as represented by the Director, National Security Agency. This software may be used and distributed according to the terms of the GNU Public License, incorporated herein by reference. The author may be reached as becker@CESDIS.gsfc.nasa.gov, or C/O Center of Excellence in Space Data and Information Sciences Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771 */ /* Routines for the Realtek-based designs (RTL8029). */ static char *version = "rtl8029.c:v1.10 10/23/96 \n"; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "8390.h" extern struct device *init_etherdev(struct device *dev, int sizeof_private, unsigned long *mem_startp); #define NE_BASE (dev->base_addr) #define NE_CMD 0x00 #define NE_DATAPORT 0x10 /* NatSemi-defined port window offset. */ #define NE_RESET 0x1f /* Issue a read to reset, a write to clear. */ #define NE_IO_EXTENT 0x20 #define NE1SM_START_PG 0x20 /* First page of TX buffer */ #define NE1SM_STOP_PG 0x40 /* Last page +1 of RX ring */ #define NESM_START_PG 0x40 /* First page of TX buffer */ #define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */ #define NE_RDC_TIMEOUT 0x02 /* Max wait in jiffies for Tx RDC */ static unsigned char pci_irq_line; int r9e_probe(struct device *dev); static int r9e_probe1(struct device *dev, int ioaddr); static void r9e_reset_8390(struct device *dev); static int r9e_block_input(struct device *dev, int count, char *buf, int ring_offset); static void r9e_block_output(struct device *dev, const int count, const unsigned char *buf, const int start_page); #ifdef HAVE_DEVLIST struct netdev_entry netcard_drv = {"r9e", r9e_probe1, NE_IO_EXTENT}; #else int r9e_probe(struct device *dev) { int exist=0; unsigned long pci_addr=0; if(pcibios_present()) { int pci_index; printk("RTL8029: PCI bios is present \n"); for (pci_index=0; pci_index<8;pci_index++) { unsigned char pci_bus, pci_device_fn; if(pcibios_find_device(PCI_VENDOR_ID_RTL,PCI_DEVICE_ID_RTL_8029 ,pci_index,&pci_bus,&pci_device_fn)!=0) break; /* fetch IO and IRQ on the pci_configuration_table */ pcibios_read_config_byte(pci_bus,pci_device_fn,PCI_INTERRUPT_LINE, &pci_irq_line); pcibios_read_config_dword(pci_bus,pci_device_fn,PCI_BASE_ADDRESS_0, &pci_addr); pci_addr=pci_addr & 0x0000fffe; /* mask the bit0 */ r9e_probe1(dev,pci_addr); exist=1; } } if(exist==1) /* 8029 adapter exist */ return 0; return ENODEV; } #endif static int r9e_probe1(struct device *dev, int ioaddr) { int i; unsigned char SA_prom[32]; int wordlength = 2; char *name = NULL; int start_page, stop_page; int reg0 = inb_p(ioaddr); if (reg0 == 0xFF) return ENODEV; /* Do a preliminary verification that we have a 8390. */ { int regd; outb_p(E8390_NODMA+E8390_PAGE1+E8390_STOP, ioaddr + E8390_CMD); regd = inb_p(ioaddr + 0x0d); outb_p(0xff, ioaddr + 0x0d); outb_p(E8390_NODMA+E8390_PAGE0, ioaddr + E8390_CMD); inb_p(ioaddr + EN0_COUNTER0); /* Clear the counter by reading. */ if (inb_p(ioaddr + EN0_COUNTER0) != 0) { outb_p(reg0, ioaddr); outb_p(regd, ioaddr + 0x0d); /* Restore the old values. */ return ENODEV; } } printk("RTL8029 ethercard probe at %#3x:", ioaddr); /* Read the 16 bytes of station address PROM. We must first initialize registers, similar to NS8390_init(eifdev, 0). We can't reliably read the SAPROM address without this. (I learned the hard way!). */ { struct {unsigned char value, offset; } program_seq[] = { {E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/ {0x48, EN0_DCFG}, /* Set byte-wide (0x48) access. */ {0x00, EN0_RCNTLO}, /* Clear the count regs. */ {0x00, EN0_RCNTHI}, {0x00, EN0_IMR}, /* Mask completion irq. */ {0xFF, EN0_ISR}, {E8390_RXOFF, EN0_RXCR}, /* 0x20 Set to monitor */ {E8390_TXOFF, EN0_TXCR}, /* 0x02 and loopback mode. */ {32, EN0_RCNTLO}, {0x00, EN0_RCNTHI}, {0x00, EN0_RSARLO}, /* DMA starting at 0x0000. */ {0x00, EN0_RSARHI}, {E8390_RREAD+E8390_START, E8390_CMD}, }; for (i = 0; i < sizeof(program_seq)/sizeof(program_seq[0]); i++) outb_p(program_seq[i].value, ioaddr + program_seq[i].offset); } for(i = 0; i < 32 /*sizeof(SA_prom)*/; i+=2) { SA_prom[i] = inb(ioaddr + NE_DATAPORT); SA_prom[i+1] = inb(ioaddr + NE_DATAPORT); if (SA_prom[i] != SA_prom[i+1]) wordlength = 1; } /* We must set the 8390 for word mode. */ outb_p(0x49, ioaddr + EN0_DCFG); /* We used to reset the ethercard here, but it doesn't seem to be necessary. */ /* Un-double the SA_prom values. */ for (i = 0; i < 16; i++) SA_prom[i] = SA_prom[i+i]; start_page = NESM_START_PG; stop_page = NESM_STOP_PG; for(i = 0; i < ETHER_ADDR_LEN; i++) { dev->dev_addr[i] = SA_prom[i]; printk(" %2.2x", SA_prom[i]); } /* Set up the rest of the parameters. */ name = "RTL8029"; dev = init_etherdev(0, sizeof(struct ei_device), 0); dev->irq=pci_irq_line; { int irqval = request_irq (dev->irq, ei_interrupt, 0, "RTL8029"); if (irqval) { printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, irqval); return EAGAIN; } } dev->base_addr = ioaddr; request_region(ioaddr, NE_IO_EXTENT, "RTL8029"); for(i = 0; i < ETHER_ADDR_LEN; i++) dev->dev_addr[i] = SA_prom[i]; ethdev_init(dev); printk("\n%s: %s found at %#x, using IRQ %d.\n", dev->name, name, ioaddr, dev->irq); if (ei_debug > 0) printk(version); ei_status.name = name; ei_status.tx_start_page = start_page; ei_status.stop_page = stop_page; ei_status.word16 = (wordlength == 2); ei_status.rx_start_page = start_page + TX_PAGES; #ifdef PACKETBUF_MEMSIZE /* Allow the packet buffer size to be overridden by know-it-alls. */ ei_status.stop_page = ei_status.tx_start_page + PACKETBUF_MEMSIZE; #endif ei_status.reset_8390 = &r9e_reset_8390; ei_status.block_input = &r9e_block_input; ei_status.block_output = &r9e_block_output; NS8390_init(dev, 0); return 0; } /* Hard reset the card. This used to pause for the same period that a 8390 reset command required, but that shouldn't be necessary. */ static void r9e_reset_8390(struct device *dev) { int tmp = inb_p(NE_BASE + NE_RESET); int reset_start_time = jiffies; if (ei_debug > 1) printk("resetting the 8390 t=%ld...", jiffies); ei_status.txing = 0; outb_p(tmp, NE_BASE + NE_RESET); /* This check _should_not_ be necessary, omit eventually. */ while ((inb_p(NE_BASE+EN0_ISR) & ENISR_RESET) == 0) if (jiffies - reset_start_time > 2) { printk("%s: r9e_reset_8390() did not complete.\n", dev->name); break; } } /* Block input and output, similar to the Crynwr packet driver. If you porting to a new ethercard look at the packet driver source for hints. The NEx000 doesn't share it on-board packet memory -- you have to put the packet out through the "remote DMA" dataport using outb. */ static int r9e_block_input(struct device *dev, int count, char *buf, int ring_offset) { #ifdef CONFIG_NE_SANITY int xfer_count = count; #endif int nic_base = dev->base_addr; /* This *shouldn't* happen. If it does, it's the last thing you'll see */ if (set_bit(0,(void*)&ei_status.dmaing)) { if (ei_debug > 0) printk("%s: DMAing conflict in ne_block_input " "[DMAstat:%d][irqlock:%d][intr:%d].\n", dev->name, ei_status.dmaing, ei_status.irqlock, dev->interrupt); return 0; } ei_status.dmaing |= 0x02; outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD); outb_p(count & 0xff, nic_base + EN0_RCNTLO); outb_p(count >> 8, nic_base + EN0_RCNTHI); outb_p(ring_offset & 0xff, nic_base + EN0_RSARLO); outb_p(ring_offset >> 8, nic_base + EN0_RSARHI); outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD); if (ei_status.word16) { insw(NE_BASE + NE_DATAPORT,buf,count>>1); if (count & 0x01) { buf[count-1] = inb(NE_BASE + NE_DATAPORT); #ifdef CONFIG_NE_SANITY xfer_count++; #endif } } else { insb(NE_BASE + NE_DATAPORT, buf, count); } /* This was for the ALPHA version only, but enough people have been encountering problems so it is still here. If you see this message you either 1) have a slightly incompatible clone or 2) have noise/speed problems with your bus. */ #ifdef CONFIG_NE_SANITY if (ei_debug > 1) { /* DMA termination address check... */ int addr, tries = 20; do { /* DON'T check for 'inb_p(EN0_ISR) & ENISR_RDC' here -- it's broken for Rx on some cards! */ int high = inb_p(nic_base + EN0_RSARHI); int low = inb_p(nic_base + EN0_RSARLO); addr = (high << 8) + low; if (((ring_offset + xfer_count) & 0xff) == low) break; } while (--tries > 0); if (tries <= 0) printk("%s: RX transfer address mismatch," "%#4.4x (expected) vs. %#4.4x (actual).\n", dev->name, ring_offset + xfer_count, addr); } #endif outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ ei_status.dmaing &= ~0x03; return ring_offset + count; } static void r9e_block_output(struct device *dev, int count, const unsigned char *buf, const int start_page) { #ifdef CONFIG_NE_SANITY int retries = 0; #endif int nic_base = NE_BASE; unsigned long dma_start; /* Round the count up for word writes. Do we need to do this? What effect will an odd byte count have on the 8390? I should check someday. */ if (ei_status.word16 && (count & 0x01)) count++; /* This *shouldn't* happen. If it does, it's the last thing you'll see */ if (set_bit(0,(void*)&ei_status.dmaing)) { if (ei_debug > 0) printk("%s: DMAing conflict in ne_block_output." "[DMAstat:%d][irqlock:%d][intr:%d]\n", dev->name, ei_status.dmaing, ei_status.irqlock, dev->interrupt); return; } ei_status.dmaing |= 0x04; /* We should already be in page 0, but to be safe... */ outb_p(E8390_PAGE0+E8390_START+E8390_NODMA, nic_base + NE_CMD); #ifdef CONFIG_NE_SANITY retry: #endif #ifdef CONFIG_NE_RW_BUGFIX /* Handle the read-before-write bug the same way as the Crynwr packet driver -- the NatSemi method doesn't work. Actually this doesn't always work either, but if you have problems with your NEx000 this is better than nothing! */ outb_p(0x42, nic_base + EN0_RCNTLO); outb_p(0x00, nic_base + EN0_RCNTHI); outb_p(0x42, nic_base + EN0_RSARLO); outb_p(0x00, nic_base + EN0_RSARHI); outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD); /* Make certain that the dummy read has occurred. */ SLOW_DOWN_IO; SLOW_DOWN_IO; SLOW_DOWN_IO; #endif /* rw_bugfix */ outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Now the normal output. */ outb_p(count & 0xff, nic_base + EN0_RCNTLO); outb_p(count >> 8, nic_base + EN0_RCNTHI); outb_p(0x00, nic_base + EN0_RSARLO); outb_p(start_page, nic_base + EN0_RSARHI); outb_p(E8390_RWRITE+E8390_START, nic_base + NE_CMD); if (ei_status.word16) { outsw(NE_BASE + NE_DATAPORT, buf, count>>1); } else { outsb(NE_BASE + NE_DATAPORT, buf, count); } dma_start = jiffies; #ifdef CONFIG_NE_SANITY /* This was for the ALPHA version only, but enough people have been encountering problems so it is still here. */ if (ei_debug > 1) { /* DMA termination address check... */ int addr, tries = 20; do { int high = inb_p(nic_base + EN0_RSARHI); int low = inb_p(nic_base + EN0_RSARLO); addr = (high << 8) + low; if ((start_page << 8) + count == addr) break; } while (--tries > 0); if (tries <= 0) { printk("%s: Tx packet transfer address mismatch," "%#4.4x (expected) vs. %#4.4x (actual).\n", dev->name, (start_page << 8) + count, addr); if (retries++ == 0) goto retry; } } #endif while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) if (jiffies - dma_start > NE_RDC_TIMEOUT) { printk("%s: timeout waiting for Tx RDC.\n", dev->name); r9e_reset_8390(dev); NS8390_init(dev,1); break; } outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ ei_status.dmaing &= ~0x05; return; } /* * Local variables: * compile-command: "gcc -DKERNEL -Wall -O6 -fomit-frame-pointer -I/usr/src/linux/net/tcp -c rtl8029.c" * version-control: t * kept-new-versions: 5 * End: */