Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linux Kernel Patch v2.2, patch-2.2.20 (00/84)

107 views
Skip to first unread message

Thomas Kobienia

unread,
Nov 3, 2001, 3:58:59 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part00

lines added deleted
v2.2.19/CREDITS : 115 38 23
v2.2.19/Documentation/Configure.help : 2379 1666 86
v2.2.19/Documentation/Debugging390.txt : 424 150 104
v2.2.19/Documentation/README.DAC960 : 105 22 22
v2.2.19/Documentation/SubmittingDrivers : 8 1 1
v2.2.19/Documentation/cciss.txt : 8 2 0
v2.2.19/Documentation/computone.txt : 345 115 62
v2.2.19/Documentation/filesystems/fat_cvf.txt : 19 3 3
v2.2.19/Documentation/filesystems/vfs.txt : 32 5 5
v2.2.19/Documentation/i810_rng.txt : 126 126 0
v2.2.19/Documentation/ioctl-number.txt : 8 1 1
v2.2.19/Documentation/isdn/HiSax.cert : 31 18 0
v2.2.19/Documentation/isdn/INTERFACE : 34 5 5
v2.2.19/Documentation/isdn/README.HiSax : 12 0 5
v2.2.19/Documentation/isdn/README.eicon : 5 1 1
v2.2.19/Documentation/networking/ip-sysctl.txt : 11 5 0
v2.2.19/Documentation/networking/sk98lin.txt : 199 54 25
v2.2.19/Documentation/parport.txt : 5 1 1
v2.2.19/Documentation/proc.txt : 26 3 3
v2.2.19/Documentation/s390/Debugging390.txt : 2499 2499 0
v2.2.19/Documentation/s390/TAPE : 122 122 0
v2.2.19/Documentation/s390/cds.txt : 17 2 2
v2.2.19/Documentation/s390/s390dump.txt : 177 177 0
v2.2.19/Documentation/usb/usb-serial.txt : 130 66 15
v2.2.19/Documentation/video4linux/API.html : 8 1 1
v2.2.19/MAINTAINERS : 83 18 16
v2.2.19/Makefile : 30 8 3
v2.2.19/arch/alpha/kernel/entry.S : 22 3 2
v2.2.19/arch/alpha/kernel/ptrace.c : 74 11 11
v2.2.19/arch/alpha/kernel/signal.c : 22 2 6
v2.2.19/arch/alpha/kernel/sys_alcor.c : 34 14 5
v2.2.19/arch/alpha/kernel/sys_miata.c : 36 17 6
v2.2.19/arch/alpha/kernel/traps.c : 85 52 1
v2.2.19/arch/arm/kernel/ptrace.c : 74 11 11
v2.2.19/arch/arm/kernel/signal.c : 22 2 6
v2.2.19/arch/i386/boot/compressed/head.S : 68 20 9
v2.2.19/arch/i386/boot/compressed/misc.c : 91 24 16
v2.2.19/arch/i386/boot/setup.S : 92 42 7
v2.2.19/arch/i386/config.in : 8 2 0
v2.2.19/arch/i386/kernel/bluesmoke.c : 7 1 0
v2.2.19/arch/i386/kernel/entry.S : 16 2 1
v2.2.19/arch/i386/kernel/head.S : 81 21 9
v2.2.19/arch/i386/kernel/io_apic.c : 109 50 11
v2.2.19/arch/i386/kernel/irq.h : 7 1 0
v2.2.19/arch/i386/kernel/process.c : 16 2 1
v2.2.19/arch/i386/kernel/ptrace.c : 79 13 13
v2.2.19/arch/i386/kernel/signal.c : 22 2 6
v2.2.19/arch/i386/kernel/traps.c : 14 2 2
v2.2.19/arch/i386/kernel/vm86.c : 23 9 1
v2.2.19/arch/i386/math-emu/fpu_entry.c : 8 1 1
v2.2.19/arch/m68k/kernel/ptrace.c : 74 11 11
v2.2.19/arch/m68k/kernel/signal.c : 19 2 4
v2.2.19/arch/m68k/kernel/traps.c : 8 1 1
v2.2.19/arch/mips/baget/irq.c : 8 1 1
v2.2.19/arch/mips/dec/prom/memory.c : 8 1 1
v2.2.19/arch/mips/kernel/irixelf.c : 177 12 81
v2.2.19/arch/mips/kernel/irixsig.c : 31 3 7
v2.2.19/arch/mips/kernel/ptrace.c : 67 10 10
v2.2.19/arch/mips/kernel/scall_o32.S : 19 3 3
v2.2.19/arch/mips/kernel/signal.c : 22 2 6
v2.2.19/arch/ppc/config.in : 15 3 5
v2.2.19/arch/ppc/kernel/head.S : 10 2 2
v2.2.19/arch/ppc/kernel/mk_defs.c : 10 2 1
v2.2.19/arch/ppc/kernel/openpic.c : 17 3 3
v2.2.19/arch/ppc/kernel/pmac_pci.c : 8 1 1
v2.2.19/arch/ppc/kernel/ptrace.c : 74 11 11
v2.2.19/arch/ppc/kernel/signal.c : 22 2 6
v2.2.19/arch/s390/boot/Makefile : 29 14 2
v2.2.19/arch/s390/boot/common.S : 298 298 0
v2.2.19/arch/s390/boot/dumpcommon.S : 220 220 0
v2.2.19/arch/s390/boot/dumpeckd.S : 548 548 0
v2.2.19/arch/s390/boot/dumptape.S : 183 183 0
v2.2.19/arch/s390/boot/ipldump.S : 179 0 179
v2.2.19/arch/s390/defconfig : 106 34 4
v2.2.19/arch/s390/kernel/entry.S : 30 5 2
v2.2.19/arch/s390/kernel/process.c : 8 1 1
v2.2.19/arch/s390/kernel/ptrace.c : 74 11 11
v2.2.19/arch/s390/kernel/reipl.S : 8 1 1
v2.2.19/arch/s390/kernel/s390io.c : 289 68 37
v2.2.19/arch/s390/kernel/setup.c : 8 2 0
v2.2.19/arch/s390/kernel/signal.c : 30 3 6
v2.2.19/arch/s390/kernel/smp.c : 34 27 1
v2.2.19/arch/s390/kernel/traps.c : 59 11 6
v2.2.19/arch/s390/mm/fault.c : 131 121 0
v2.2.19/arch/s390/tools/dasdfmt/dasdfmt.8 : 136 68 68
v2.2.19/arch/s390/tools/dasdfmt/dasdfmt.c : 8 1 1
v2.2.19/arch/s390/tools/silo/silo.8 : 211 94 94
v2.2.19/arch/sparc/boot/btfixupprep.c : 46 13 9
v2.2.19/arch/sparc/kernel/entry.S : 98 17 17
v2.2.19/arch/sparc/kernel/head.S : 41 5 5
v2.2.19/arch/sparc/kernel/ptrace.c : 69 10 10
v2.2.19/arch/sparc/kernel/signal.c : 90 41 12
v2.2.19/arch/sparc/kernel/traps.c : 41 21 2
v2.2.19/arch/sparc/lib/memset.S : 8 1 1
v2.2.19/arch/sparc64/kernel/binfmt_aout32.c : 188 13 89
v2.2.19/arch/sparc64/kernel/devices.c : 15 9 0
v2.2.19/arch/sparc64/kernel/entry.S : 62 9 9
v2.2.19/arch/sparc64/kernel/ioctl32.c : 59 23 4
v2.2.19/arch/sparc64/kernel/irq.c : 14 3 1
v2.2.19/arch/sparc64/kernel/process.c : 31 6 1
v2.2.19/arch/sparc64/kernel/psycho.c : 311 215 12
v2.2.19/arch/sparc64/kernel/ptrace.c : 69 10 10
v2.2.19/arch/sparc64/kernel/setup.c : 44 10 3
v2.2.19/arch/sparc64/kernel/signal.c : 38 5 9
v2.2.19/arch/sparc64/kernel/signal32.c : 90 41 12
v2.2.19/arch/sparc64/kernel/smp.c : 34 12 3
v2.2.19/arch/sparc64/kernel/sparc64_ksyms.c : 5 1 1
v2.2.19/arch/sparc64/kernel/sys_sparc32.c : 49 13 3
v2.2.19/arch/sparc64/kernel/ttable.S : 14 2 2
v2.2.19/arch/sparc64/solaris/entry64.S : 39 5 5
v2.2.19/drivers/Makefile : 10 4 0
v2.2.19/drivers/block/Config.in : 8 1 1
v2.2.19/drivers/block/DAC960.c : 1107 546 127
v2.2.19/drivers/block/DAC960.h : 401 127 32
v2.2.19/drivers/block/cciss.c : 206 67 23
v2.2.19/drivers/block/cciss.h : 73 44 0
v2.2.19/drivers/block/cciss_cmd.h : 24 4 4
v2.2.19/drivers/block/cpqarray.c : 28 5 3
v2.2.19/drivers/block/genhd.c : 9 2 1
v2.2.19/drivers/block/ide-cd.c : 8 1 1
v2.2.19/drivers/block/ide-dma.c : 20 14 0
v2.2.19/drivers/block/ide-floppy.c : 17 2 2
v2.2.19/drivers/block/ide-pmac.c : 31 6 5
v2.2.19/drivers/block/ide.c : 13 4 3
v2.2.19/drivers/block/ll_rw_blk.c : 9 3 0
v2.2.19/drivers/block/paride/pt.c : 10 4 0
v2.2.19/drivers/cdrom/cdrom.c : 40 5 4
v2.2.19/drivers/cdrom/sbpcd.c : 8 1 1
v2.2.19/drivers/char/Config.in : 35 5 3
v2.2.19/drivers/char/Makefile : 37 18 2
v2.2.19/drivers/char/README.computone : 231 4 221
v2.2.19/drivers/char/acquirewdt.c : 8 1 1
v2.2.19/drivers/char/advantechwdt.c : 8 1 1
v2.2.19/drivers/char/agp/agp.h : 83 47 3
v2.2.19/drivers/char/agp/agpgart_be.c : 1385 1018 175
v2.2.19/drivers/char/agp/agpgart_fe.c : 28 7 1
v2.2.19/drivers/char/atari_SCC.README : 8 1 1
v2.2.19/drivers/char/atari_SCC.c : 13 2 2
v2.2.19/drivers/char/bttv.c : 10 3 1
v2.2.19/drivers/char/cyclades.c : 8 1 1
v2.2.19/drivers/char/drm/agpsupport.c : 16 10 0
v2.2.19/drivers/char/drm/bufs.c : 12 6 0
v2.2.19/drivers/char/drm/context.c : 14 4 1
v2.2.19/drivers/char/drm/dma.c : 11 4 1
v2.2.19/drivers/char/drm/fops.c : 10 3 0
v2.2.19/drivers/char/drm/i810_bufs.c : 15 8 1
v2.2.19/drivers/char/drm/i810_dma.c : 11 5 0
v2.2.19/drivers/char/drm/ioctl.c : 8 1 1
v2.2.19/drivers/char/drm/mga_bufs.c : 32 18 1
v2.2.19/drivers/char/drm/r128_bufs.c : 18 11 1
v2.2.19/drivers/char/epca.c : 36 5 4
v2.2.19/drivers/char/hfmodem/refclock.c : 8 1 1
v2.2.19/drivers/char/hfmodem/tables.h : 90 90 0
v2.2.19/drivers/char/i810_rng.c : 621 150 260
v2.2.19/drivers/char/ip2/i2ellis.c : 38 17 1
v2.2.19/drivers/char/ip2/i2ellis.h : 12 6 0
v2.2.19/drivers/char/ip2/i2lib.c : 805 133 164
v2.2.19/drivers/char/ip2/i2lib.h : 12 6 0
v2.2.19/drivers/char/ip2/ip2.h : 20 10 0
v2.2.19/drivers/char/ip2.c : 124 74 6
v2.2.19/drivers/char/ip2main.c : 1210 321 234
v2.2.19/drivers/char/lp.c : 8 1 1
v2.2.19/drivers/char/machzwd.c : 545 545 0
v2.2.19/drivers/char/mem.c : 19 6 0
v2.2.19/drivers/char/misc.c : 17 0 4
v2.2.19/drivers/char/mixcomwd.c : 8 1 1
v2.2.19/drivers/char/moxa.c : 49 21 8
v2.2.19/drivers/char/n_hdlc.c : 70 12 19
v2.2.19/drivers/char/pc110pad.c : 8 1 1
v2.2.19/drivers/char/pcwd.c : 43 5 5
v2.2.19/drivers/char/rio/linux_compat.h : 7 1 0
v2.2.19/drivers/char/rio/rio_linux.c : 125 57 29
v2.2.19/drivers/char/rio/rio_linux.h : 20 17 0
v2.2.19/drivers/char/rio/riodrvr.h : 14 2 1
v2.2.19/drivers/char/riscom8.c : 85 45 19
v2.2.19/drivers/char/sbc60xxwdt.c : 24 7 3
v2.2.19/drivers/char/softdog.c : 8 1 1
v2.2.19/drivers/char/specialix.c : 76 43 20
v2.2.19/drivers/char/synclink.c : 1530 811 159
v2.2.19/drivers/char/toshiba.c : 19 1 3
v2.2.19/drivers/char/tty_io.c : 11 6 0
v2.2.19/drivers/char/wdt.c : 8 1 1
v2.2.19/drivers/char/wdt_pci.c : 17 2 2
v2.2.19/drivers/i2o/i2o_scsi.c : 8 1 1
v2.2.19/drivers/isdn/Config.in : 27 3 3
v2.2.19/drivers/isdn/act2000/act2000.h : 5 1 1
v2.2.19/drivers/isdn/act2000/capi.c : 14 2 2
v2.2.19/drivers/isdn/act2000/capi.h : 14 2 2
v2.2.19/drivers/isdn/avmb1/avmcard.h : 76 3 52
v2.2.19/drivers/isdn/avmb1/b1.c : 162 13 104
v2.2.19/drivers/isdn/avmb1/b1dma.c : 111 17 48
v2.2.19/drivers/isdn/avmb1/b1isa.c : 108 9 71
v2.2.19/drivers/isdn/avmb1/b1pci.c : 306 34 152
v2.2.19/drivers/isdn/avmb1/b1pcmcia.c : 109 7 79
v2.2.19/drivers/isdn/avmb1/c4.c : 510 133 154
v2.2.19/drivers/isdn/avmb1/capi.c : 381 34 241
v2.2.19/drivers/isdn/avmb1/capicmd.h : 32 1 23
v2.2.19/drivers/isdn/avmb1/capidev.h : 56 1 47
v2.2.19/drivers/isdn/avmb1/capidrv.c : 280 15 206
v2.2.19/drivers/isdn/avmb1/capidrv.h : 31 1 22
v2.2.19/drivers/isdn/avmb1/capifs.c : 237 11 118
v2.2.19/drivers/isdn/avmb1/capifs.h : 24 1 17
v2.2.19/drivers/isdn/avmb1/capiutil.c : 101 2 82
v2.2.19/drivers/isdn/avmb1/capiutil.h : 46 1 36
v2.2.19/drivers/isdn/avmb1/kcapi.c : 196 13 122
v2.2.19/drivers/isdn/avmb1/t1isa.c : 139 10 92
v2.2.19/drivers/isdn/avmb1/t1pci.c : 223 22 103
v2.2.19/drivers/isdn/divert/isdn_divert.c : 15 2 2
v2.2.19/drivers/isdn/eicon/bri.c : 19 1 5
v2.2.19/drivers/isdn/eicon/common.c : 101 7 19
v2.2.19/drivers/isdn/eicon/eicon.h : 13 2 1
v2.2.19/drivers/isdn/eicon/eicon_idi.c : 24 9 2
v2.2.19/drivers/isdn/eicon/eicon_mod.c : 46 9 17
v2.2.19/drivers/isdn/eicon/idi.h : 8 1 1
v2.2.19/drivers/isdn/eicon/kprintf.c : 24 2 4
v2.2.19/drivers/isdn/eicon/lincfg.c : 56 8 14
v2.2.19/drivers/isdn/eicon/linsys.c : 11 0 5
v2.2.19/drivers/isdn/eicon/log.c : 26 3 3
v2.2.19/drivers/isdn/eicon/uxio.h : 7 0 1
v2.2.19/drivers/isdn/eicon/xlog.c : 8 1 1
v2.2.19/drivers/isdn/hisax/amd7930.c : 38 5 9
v2.2.19/drivers/isdn/hisax/arcofi.c : 12 2 2
v2.2.19/drivers/isdn/hisax/arcofi.h : 12 2 2
v2.2.19/drivers/isdn/hisax/asuscom.c : 32 4 4
v2.2.19/drivers/isdn/hisax/avm_a1.c : 21 3 3
v2.2.19/drivers/isdn/hisax/avm_a1p.c : 23 3 3
v2.2.19/drivers/isdn/hisax/avm_pci.c : 33 5 5
v2.2.19/drivers/isdn/hisax/bkm_a4t.c : 78 10 10
v2.2.19/drivers/isdn/hisax/bkm_a8.c : 76 11 11
v2.2.19/drivers/isdn/hisax/bkm_ax.h : 11 2 2
v2.2.19/drivers/isdn/hisax/callc.c : 184 39 31
v2.2.19/drivers/isdn/hisax/cert.c : 18 3 2
v2.2.19/drivers/isdn/hisax/config.c : 1417 429 414
v2.2.19/drivers/isdn/hisax/diva.c : 21 3 3
v2.2.19/drivers/isdn/hisax/elsa.c : 116 14 14
v2.2.19/drivers/isdn/hisax/elsa_ser.c : 34 4 10
v2.2.19/drivers/isdn/hisax/fsm.c : 40 7 3
v2.2.19/drivers/isdn/hisax/gazel.c : 61 5 11
v2.2.19/drivers/isdn/hisax/hfc_2bds0.c : 23 4 4
v2.2.19/drivers/isdn/hisax/hfc_2bds0.h : 12 2 2
v2.2.19/drivers/isdn/hisax/hfc_2bs0.c : 23 4 4
v2.2.19/drivers/isdn/hisax/hfc_2bs0.h : 12 2 2
v2.2.19/drivers/isdn/hisax/hfc_pci.c : 223 78 22
v2.2.19/drivers/isdn/hisax/hfc_pci.h : 15 4 1
v2.2.19/drivers/isdn/hisax/hfc_sx.c : 34 5 5
v2.2.19/drivers/isdn/hisax/hfcscard.c : 21 3 3
v2.2.19/drivers/isdn/hisax/hisax.h : 168 26 26
v2.2.19/drivers/isdn/hisax/hscx.c : 23 4 4
v2.2.19/drivers/isdn/hisax/hscx.h : 12 2 2
v2.2.19/drivers/isdn/hisax/hscx_irq.c : 14 2 2
v2.2.19/drivers/isdn/hisax/icc.c : 29 5 5
v2.2.19/drivers/isdn/hisax/icc.h : 18 3 3
v2.2.19/drivers/isdn/hisax/ipac.h : 12 2 2
v2.2.19/drivers/isdn/hisax/isac.c : 32 5 5
v2.2.19/drivers/isdn/hisax/isac.h : 12 2 2
v2.2.19/drivers/isdn/hisax/isar.c : 38 6 6
v2.2.19/drivers/isdn/hisax/isar.h : 12 2 2
v2.2.19/drivers/isdn/hisax/isdnl1.c : 74 28 13
v2.2.19/drivers/isdn/hisax/isdnl1.h : 10 2 2
v2.2.19/drivers/isdn/hisax/isdnl2.c : 211 29 29
v2.2.19/drivers/isdn/hisax/isdnl2.h : 10 2 2
v2.2.19/drivers/isdn/hisax/isdnl3.c : 64 8 8
v2.2.19/drivers/isdn/hisax/isdnl3.h : 8 2 2
v2.2.19/drivers/isdn/hisax/isurf.c : 21 3 3
v2.2.19/drivers/isdn/hisax/ix1_micro.c : 23 3 3
v2.2.19/drivers/isdn/hisax/jade.c : 23 4 4
v2.2.19/drivers/isdn/hisax/jade.h : 11 2 2
v2.2.19/drivers/isdn/hisax/jade_irq.c : 12 2 2
v2.2.19/drivers/isdn/hisax/l3_1tr6.c : 21 3 3
v2.2.19/drivers/isdn/hisax/l3_1tr6.h : 10 2 2
v2.2.19/drivers/isdn/hisax/l3dss1.c : 67 9 9
v2.2.19/drivers/isdn/hisax/l3dss1.h : 10 2 2
v2.2.19/drivers/isdn/hisax/l3ni1.c : 56 7 7
v2.2.19/drivers/isdn/hisax/l3ni1.h : 14 2 2
v2.2.19/drivers/isdn/hisax/lmgr.c : 12 2 2
v2.2.19/drivers/isdn/hisax/md5sums.asc : 49 16 27
v2.2.19/drivers/isdn/hisax/mic.c : 23 3 3
v2.2.19/drivers/isdn/hisax/netjet.c : 40 6 5
v2.2.19/drivers/isdn/hisax/netjet.h : 14 2 2
v2.2.19/drivers/isdn/hisax/niccy.c : 23 3 3
v2.2.19/drivers/isdn/hisax/nj_s.c : 31 5 5
v2.2.19/drivers/isdn/hisax/nj_u.c : 31 5 5
v2.2.19/drivers/isdn/hisax/q931.c : 21 3 3
v2.2.19/drivers/isdn/hisax/rawhdlc.c : 13 2 2
v2.2.19/drivers/isdn/hisax/rawhdlc.h : 12 2 2
v2.2.19/drivers/isdn/hisax/s0box.c : 21 3 3
v2.2.19/drivers/isdn/hisax/saphir.c : 23 3 3
v2.2.19/drivers/isdn/hisax/sedlbauer.c : 150 32 30
v2.2.19/drivers/isdn/hisax/sportster.c : 23 3 3
v2.2.19/drivers/isdn/hisax/tei.c : 37 5 5
v2.2.19/drivers/isdn/hisax/teleint.c : 21 3 3
v2.2.19/drivers/isdn/hisax/teles0.c : 23 3 3
v2.2.19/drivers/isdn/hisax/teles3.c : 23 3 3
v2.2.19/drivers/isdn/hisax/telespci.c : 22 3 3
v2.2.19/drivers/isdn/hisax/w6692.c : 44 7 7
v2.2.19/drivers/isdn/hisax/w6692.h : 12 2 2
v2.2.19/drivers/isdn/hysdn/boardergo.c : 51 8 5
v2.2.19/drivers/isdn/hysdn/hycapi.c : 79 10 12
v2.2.19/drivers/isdn/hysdn/hysdn_boot.c : 59 7 7
v2.2.19/drivers/isdn/hysdn/hysdn_defs.h : 21 3 1
v2.2.19/drivers/isdn/hysdn/hysdn_init.c : 32 4 4
v2.2.19/drivers/isdn/hysdn/hysdn_net.c : 37 7 5
v2.2.19/drivers/isdn/hysdn/hysdn_procconf.c : 50 6 6
v2.2.19/drivers/isdn/hysdn/hysdn_proclog.c : 32 4 4
v2.2.19/drivers/isdn/hysdn/hysdn_sched.c : 59 15 6
v2.2.19/drivers/isdn/icn/icn.c : 152 28 25
v2.2.19/drivers/isdn/icn/icn.h : 49 6 13
v2.2.19/drivers/isdn/isdn_bsdcomp.c : 7 1 0
v2.2.19/drivers/isdn/isdn_common.c : 228 22 41
v2.2.19/drivers/isdn/isdn_net.c : 622 357 124
v2.2.19/drivers/isdn/isdn_net.h : 100 49 25
v2.2.19/drivers/isdn/isdn_ppp.c : 153 52 11
v2.2.19/drivers/isdn/isdn_tty.c : 165 22 39
v2.2.19/drivers/isdn/isdn_tty.h : 16 4 1
v2.2.19/drivers/isdn/isdn_ttyfax.c : 23 3 3
v2.2.19/drivers/isdn/isdn_v110.c : 32 4 4
v2.2.19/drivers/isdn/isdnloop/isdnloop.c : 48 5 10
v2.2.19/drivers/isdn/pcbit/callbacks.c : 8 1 1
v2.2.19/drivers/isdn/pcbit/callbacks.h : 8 1 1
v2.2.19/drivers/isdn/pcbit/capi.c : 8 1 1
v2.2.19/drivers/isdn/pcbit/capi.h : 8 1 1
v2.2.19/drivers/isdn/pcbit/drv.c : 8 1 1
v2.2.19/drivers/isdn/pcbit/edss1.c : 8 1 1
v2.2.19/drivers/isdn/pcbit/edss1.h : 8 1 1
v2.2.19/drivers/isdn/pcbit/layer2.c : 8 1 1
v2.2.19/drivers/isdn/pcbit/layer2.h : 8 1 1
v2.2.19/drivers/isdn/pcbit/module.c : 8 1 1
v2.2.19/drivers/isdn/pcbit/pcbit.h : 8 1 1
v2.2.19/drivers/isdn/sc/interrupt.c : 23 2 3
v2.2.19/drivers/isdn/sc/message.c : 63 2 45
v2.2.19/drivers/macintosh/mac_hid.c : 20 11 1
v2.2.19/drivers/macintosh/via-pmu.c : 17 2 2
v2.2.19/drivers/misc/parport_pc.c : 8 1 1
v2.2.19/drivers/net/3c505.c : 23 5 3
v2.2.19/drivers/net/3c509.c : 20 8 0
v2.2.19/drivers/net/8139too.c : 1744 525 361
v2.2.19/drivers/net/82596.c : 8 1 1
v2.2.19/drivers/net/Config.in : 43 9 3
v2.2.19/drivers/net/Makefile : 8 1 1
v2.2.19/drivers/net/cs89x0.c : 8 1 1
v2.2.19/drivers/net/daynaport.c : 8 1 1
v2.2.19/drivers/net/dmfe.c : 1497 677 250
v2.2.19/drivers/net/eepro.c : 272 54 60
v2.2.19/drivers/net/falc-lh.h : 1238 1238 0
v2.2.19/drivers/net/hamradio/bpqether.c : 29 5 4
v2.2.19/drivers/net/hamradio/scc.c : 52 8 3
v2.2.19/drivers/net/hamradio/soundmodem/sm_wss.c : 11 3 1
v2.2.19/drivers/net/hd64572.h : 443 443 0
v2.2.19/drivers/net/lapbether.c : 29 5 4
v2.2.19/drivers/net/lmc/lmc_main.c : 13 6 1
v2.2.19/drivers/net/macmace.c : 17 2 2
v2.2.19/drivers/net/net_init.c : 10 2 2
v2.2.19/drivers/net/ni52.c : 37 9 8
v2.2.19/drivers/net/pc300.c : 1815 1008 246
v2.2.19/drivers/net/pc300.h : 501 501 0
v2.2.19/drivers/net/rtl8139.c : 13 5 2
v2.2.19/drivers/net/sbni.c : 8 1 1
v2.2.19/drivers/net/sdla_fr.c : 35 4 4
v2.2.19/drivers/net/sis900.c : 1124 441 315
v2.2.19/drivers/net/sis900.h : 66 22 8
v2.2.19/drivers/net/sk98lin/Makefile : 41 12 7
v2.2.19/drivers/net/sk98lin/h/lm80.h : 8 1 1
v2.2.19/drivers/net/sk98lin/h/skaddr.h : 307 97 61
v2.2.19/drivers/net/sk98lin/h/skcsum.h : 124 41 21
v2.2.19/drivers/net/sk98lin/h/skdrv1st.h : 30 8 2
v2.2.19/drivers/net/sk98lin/h/skdrv2nd.h : 131 48 10
v2.2.19/drivers/net/sk98lin/h/skgehw.h : 1580 479 449
v2.2.19/drivers/net/sk98lin/h/skgeinit.h : 171 79 44
v2.2.19/drivers/net/sk98lin/h/skgepnm2.h : 119 39 19
v2.2.19/drivers/net/sk98lin/h/skgepnmi.h : 414 141 71
v2.2.19/drivers/net/sk98lin/h/skgesirq.h : 45 12 4
v2.2.19/drivers/net/sk98lin/h/ski2c.h : 71 20 9
v2.2.19/drivers/net/sk98lin/h/skrlmt.h : 561 207 158
v2.2.19/drivers/net/sk98lin/h/skversion.h : 46 46 0
v2.2.19/drivers/net/sk98lin/h/xmac_ii.h : 1026 259 255
v2.2.19/drivers/net/sk98lin/skaddr.c : 1206 325 360
v2.2.19/drivers/net/sk98lin/skcsum.c : 405 101 58
v2.2.19/drivers/net/sk98lin/skge.c : 2103 736 378
v2.2.19/drivers/net/sk98lin/skgeinit.c : 1157 327 195
v2.2.19/drivers/net/sk98lin/skgepnmi.c : 2498 821 336
v2.2.19/drivers/net/sk98lin/skgesirq.c : 2404 833 530
v2.2.19/drivers/net/sk98lin/ski2c.c : 978 283 207
v2.2.19/drivers/net/sk98lin/skproc.c : 441 441 0
v2.2.19/drivers/net/sk98lin/skqueue.c : 8 1 1
v2.2.19/drivers/net/sk98lin/skrlmt.c : 4711 1836 1854
v2.2.19/drivers/net/sk98lin/skvpd.c : 38 7 4
v2.2.19/drivers/net/sk98lin/skxmac2.c : 1570 456 295
v2.2.19/drivers/net/skfp/drvfbi.c : 8 1 1
v2.2.19/drivers/net/skfp/h/smc.h : 17 2 2
v2.2.19/drivers/net/skfp/pcmplc.c : 8 1 1
v2.2.19/drivers/net/skfp/srf.c : 35 4 4
v2.2.19/drivers/net/slip.h : 8 1 1
v2.2.19/drivers/net/starfire-kcomp22.h : 343 343 0
v2.2.19/drivers/net/starfire.c : 1668 618 476
v2.2.19/drivers/net/sunhme.c : 33 6 10
v2.2.19/drivers/net/syncppp.c : 23 7 3
v2.2.19/drivers/net/tulip.c : 9 2 1
v2.2.19/drivers/net/via-rhine.c : 419 201 113
v2.2.19/drivers/pci/oldproc.c : 14 0 7
v2.2.19/drivers/pci/proc.c : 125 107 8
v2.2.19/drivers/pnp/parport_probe.c : 8 1 1
v2.2.19/drivers/s390/Config.in : 16 13 0
v2.2.19/drivers/s390/block/dasd_3990_erp.c : 17 2 2
v2.2.19/drivers/s390/char/Makefile : 31 27 0
v2.2.19/drivers/s390/char/con3215.c : 8 1 1
v2.2.19/drivers/s390/char/hwc.h : 18 4 1
v2.2.19/drivers/s390/char/hwc_con.c : 8 1 1
v2.2.19/drivers/s390/char/hwc_rw.c : 258 91 49
v2.2.19/drivers/s390/char/hwc_rw.h : 8 1 1
v2.2.19/drivers/s390/char/hwc_tty.c : 19 2 4
v2.2.19/drivers/s390/char/hwc_tty.h : 8 1 1
v2.2.19/drivers/s390/char/tape.c : 1120 1120 0
v2.2.19/drivers/s390/char/tape.h : 203 203 0
v2.2.19/drivers/s390/char/tape3480.c : 156 156 0
v2.2.19/drivers/s390/char/tape3480.h : 23 23 0
v2.2.19/drivers/s390/char/tape3490.c : 156 156 0
v2.2.19/drivers/s390/char/tape3490.h : 24 24 0
v2.2.19/drivers/s390/char/tape34xx.c : 2382 2382 0
v2.2.19/drivers/s390/char/tape34xx.h : 183 183 0
v2.2.19/drivers/s390/char/tapeblock.c : 598 598 0
v2.2.19/drivers/s390/char/tapeblock.h : 36 36 0
v2.2.19/drivers/s390/char/tapechar.c : 761 761 0
v2.2.19/drivers/s390/char/tapechar.h : 34 34 0
v2.2.19/drivers/s390/char/tapedefs.h : 76 76 0
v2.2.19/drivers/s390/net/ctc.c : 8 1 1
v2.2.19/drivers/s390/net/iucv.c : 32 7 0
v2.2.19/drivers/sbus/audio/cs4215.h : 35 6 2
v2.2.19/drivers/sbus/audio/dbri.c : 29 4 4
v2.2.19/drivers/sbus/char/aurora.c : 86 45 20
v2.2.19/drivers/sbus/char/aurora.h : 8 1 1
v2.2.19/drivers/sbus/char/envctrl.c : 23 3 3
v2.2.19/drivers/sbus/char/pcikbd.c : 166 99 4
v2.2.19/drivers/sbus/char/sab82532.c : 344 90 59
v2.2.19/drivers/sbus/char/su.c : 66 40 2
v2.2.19/drivers/sbus/char/zs.c : 94 45 20
v2.2.19/drivers/scsi/3w-xxxx.c : 764 355 76
v2.2.19/drivers/scsi/3w-xxxx.h : 75 15 2
v2.2.19/drivers/scsi/NCR53C9x.c : 8 1 1
v2.2.19/drivers/scsi/README.ibmmca : 11 2 2
v2.2.19/drivers/scsi/README.ncr53c8xx : 8 1 1
v2.2.19/drivers/scsi/README.osst : 98 44 9
v2.2.19/drivers/scsi/advansys.c : 10881 2568 4614
v2.2.19/drivers/scsi/advansys.h : 226 33 122
v2.2.19/drivers/scsi/cpqfcTScontrol.c : 17 2 2
v2.2.19/drivers/scsi/cpqfcTSworker.c : 8 1 1
v2.2.19/drivers/scsi/eata_dma.c : 7 1 0
v2.2.19/drivers/scsi/esp.c : 8 1 1
v2.2.19/drivers/scsi/fdomain.c : 30 7 3
v2.2.19/drivers/scsi/gdth.c : 1010 391 277
v2.2.19/drivers/scsi/gdth.h : 139 33 11
v2.2.19/drivers/scsi/gdth_ioctl.h : 58 11 5
v2.2.19/drivers/scsi/gdth_proc.c : 932 286 146
v2.2.19/drivers/scsi/gdth_proc.h : 19 3 3
v2.2.19/drivers/scsi/ips.c : 62 7 7
v2.2.19/drivers/scsi/megaraid.c : 17 2 2
v2.2.19/drivers/scsi/osst.c : 4191 1135 840
v2.2.19/drivers/scsi/osst.h : 44 8 3
v2.2.19/drivers/scsi/osst_options.h : 41 10 4
v2.2.19/drivers/scsi/qlogicfc.c : 7 1 0
v2.2.19/drivers/scsi/qlogicpti.c : 9 2 1
v2.2.19/drivers/scsi/scsi.c : 7 1 0
v2.2.19/drivers/scsi/sd_ioctl.c : 7 1 0
v2.2.19/drivers/scsi/sg.c : 39 4 8
v2.2.19/drivers/scsi/st.c : 125 45 29
v2.2.19/drivers/scsi/st.h : 18 5 0
v2.2.19/drivers/scsi/sym53c8xx.c : 26 3 3
v2.2.19/drivers/scsi/sym53c8xx_defs.h : 17 2 2
v2.2.19/drivers/sound/cs461x_image.h : 6918 3459 3459
v2.2.19/drivers/sound/sscape.c : 19 3 3
v2.2.19/drivers/usb/Config.in : 7 1 0
v2.2.19/drivers/usb/Makefile : 8 1 1
v2.2.19/drivers/usb/acm.c : 138 35 9
v2.2.19/drivers/usb/bluetooth.c : 70 23 5
v2.2.19/drivers/usb/dabusb.c : 72 20 11
v2.2.19/drivers/usb/dabusb.h : 8 1 1
v2.2.19/drivers/usb/dc2xx.c : 130 25 13
v2.2.19/drivers/usb/hub.c : 957 397 230
v2.2.19/drivers/usb/hub.h : 56 8 22
v2.2.19/drivers/usb/mdc800.c : 443 109 68
v2.2.19/drivers/usb/ov511.c : 765 248 152
v2.2.19/drivers/usb/pegasus.c : 718 156 222
v2.2.19/drivers/usb/pegasus.h : 202 202 0
v2.2.19/drivers/usb/plusb.c : 1166 624 240
v2.2.19/drivers/usb/plusb.h : 48 0 48
v2.2.19/drivers/usb/printer.c : 27 7 1
v2.2.19/drivers/usb/rio500.c : 68 23 9
v2.2.19/drivers/usb/scanner.c : 447 129 50
v2.2.19/drivers/usb/scanner.h : 126 36 12
v2.2.19/drivers/usb/serial/Config.in : 30 6 2
v2.2.19/drivers/usb/serial/Makefile : 8 2 0
v2.2.19/drivers/usb/serial/belkin_sa.c : 137 56 11
v2.2.19/drivers/usb/serial/belkin_sa.h : 21 7 1
v2.2.19/drivers/usb/serial/digi_acceleport.c : 103 28 14
v2.2.19/drivers/usb/serial/empeg.c : 254 74 111
v2.2.19/drivers/usb/serial/ftdi_sio.c : 310 151 25
v2.2.19/drivers/usb/serial/ftdi_sio.h : 38 16 2
v2.2.19/drivers/usb/serial/io_16654.h : 195 195 0
v2.2.19/drivers/usb/serial/io_edgeport.c : 3079 3079 0
v2.2.19/drivers/usb/serial/io_edgeport.h : 152 152 0
v2.2.19/drivers/usb/serial/io_fw_boot.h : 558 558 0
v2.2.19/drivers/usb/serial/io_fw_boot2.h : 548 548 0
v2.2.19/drivers/usb/serial/io_fw_down.h : 1123 1123 0
v2.2.19/drivers/usb/serial/io_fw_down2.h : 1135 1135 0
v2.2.19/drivers/usb/serial/io_ionsp.h : 454 454 0
v2.2.19/drivers/usb/serial/io_tables.h : 437 437 0
v2.2.19/drivers/usb/serial/io_usbvend.h : 374 374 0
v2.2.19/drivers/usb/serial/keyspan.c : 114 57 7
v2.2.19/drivers/usb/serial/keyspan_pda.c : 151 40 13
v2.2.19/drivers/usb/serial/keyspan_pda_fw.h : 18 9 3
v2.2.19/drivers/usb/serial/mct_u232.c : 883 883 0
v2.2.19/drivers/usb/serial/mct_u232.h : 369 369 0
v2.2.19/drivers/usb/serial/omninet.c : 198 49 34
v2.2.19/drivers/usb/serial/usb-serial.h : 26 11 2
v2.2.19/drivers/usb/serial/usbserial.c : 117 34 16
v2.2.19/drivers/usb/serial/visor.c : 70 23 8
v2.2.19/drivers/usb/serial/whiteheat.c : 341 152 58
v2.2.19/drivers/usb/serial/whiteheat.h : 16 2 1
v2.2.19/drivers/usb/serial/whiteheat_fw.h : 1653 844 777
v2.2.19/drivers/usb/usb-core.c : 51 0 51
v2.2.19/drivers/usb/usb-storage.c : 23 13 0
v2.2.19/drivers/usb/usb-uhci.c : 8 1 1
v2.2.19/drivers/usb/usb.c : 495 206 33
v2.2.19/drivers/video/aty128fb.c : 64 42 9
v2.2.19/drivers/video/atyfb.c : 8 1 1
v2.2.19/drivers/video/cgfourteenfb.c : 14 3 1
v2.2.19/drivers/video/fbmem.c : 28 7 3
v2.2.19/drivers/video/macmodes.c : 48 19 1
v2.2.19/drivers/video/offb.c : 16 2 1
v2.2.19/fs/binfmt_aout.c : 192 13 92
v2.2.19/fs/binfmt_elf.c : 214 13 87
v2.2.19/fs/binfmt_em86.c : 32 3 15
v2.2.19/fs/binfmt_java.c : 60 6 30
v2.2.19/fs/binfmt_misc.c : 38 3 8
v2.2.19/fs/binfmt_script.c : 32 3 15
v2.2.19/fs/dcache.c : 17 2 2
v2.2.19/fs/dquot.c : 73 26 32
v2.2.19/fs/exec.c : 184 97 16
v2.2.19/fs/lockd/svc4proc.c : 16 2 1
v2.2.19/fs/lockd/svcproc.c : 7 1 0
v2.2.19/fs/locks.c : 7 1 0
v2.2.19/fs/namei.c : 46 19 4
v2.2.19/fs/nfs/dir.c : 75 21 18
v2.2.19/fs/nfs/inode.c : 61 5 22
v2.2.19/fs/nfs/symlink.c : 29 3 20
v2.2.19/fs/nfsd/nfssvc.c : 118 27 3
v2.2.19/fs/nls/nls_koi8-r.c : 68 12 11
v2.2.19/fs/ntfs/fs.c : 21 8 0
v2.2.19/fs/ntfs/support.c : 8 1 1
v2.2.19/fs/open.c : 18 9 3
v2.2.19/fs/proc/mem.c : 8 1 1
v2.2.19/fs/smbfs/ChangeLog : 16 11 0
v2.2.19/fs/smbfs/inode.c : 33 3 11
v2.2.19/fs/smbfs/proc.c : 17 1 3
v2.2.19/fs/super.c : 8 1 1
v2.2.19/include/asm-alpha/pci.h : 13 9 0
v2.2.19/include/asm-alpha/resource.h : 8 1 1
v2.2.19/include/asm-arm/pci.h : 7 7 0
v2.2.19/include/asm-i386/pci.h : 7 7 0
v2.2.19/include/asm-m68k/entry.h : 18 6 6
v2.2.19/include/asm-mips/offset.h : 13 4 3
v2.2.19/include/asm-mips/pci.h : 7 3 0
v2.2.19/include/asm-ppc/pci.h : 7 2 0
v2.2.19/include/asm-s390/bitops.h : 17 2 2
v2.2.19/include/asm-s390/byteorder.h : 53 6 6
v2.2.19/include/asm-s390/ccwcache.h : 8 1 1
v2.2.19/include/asm-s390/current.h : 8 1 1
v2.2.19/include/asm-s390/debug.h : 8 1 1
v2.2.19/include/asm-s390/io.h : 8 1 1
v2.2.19/include/asm-s390/irq.h : 8 1 1
v2.2.19/include/asm-s390/lowcore.h : 67 18 11
v2.2.19/include/asm-s390/pgtable.h : 32 6 6
v2.2.19/include/asm-s390/processor.h : 8 1 1
v2.2.19/include/asm-s390/system.h : 44 5 5
v2.2.19/include/asm-s390/uaccess.h : 88 10 9
v2.2.19/include/asm-sparc/asm_offsets.h : 441 146 142
v2.2.19/include/asm-sparc/pci.h : 7 7 0
v2.2.19/include/asm-sparc/siginfo.h : 5 1 1
v2.2.19/include/asm-sparc/uaccess.h : 5 1 1
v2.2.19/include/asm-sparc64/asm_offsets.h : 662 219 213
v2.2.19/include/asm-sparc64/bitops.h : 68 8 8
v2.2.19/include/asm-sparc64/pbm.h : 23 5 1
v2.2.19/include/asm-sparc64/pci.h : 19 19 0
v2.2.19/include/asm-sparc64/sab82532.h : 25 6 2
v2.2.19/include/asm-sparc64/smp.h : 8 1 1
v2.2.19/include/asm-sparc64/ttable.h : 29 12 2
v2.2.19/include/asm-sparc64/uaccess.h : 5 1 1
v2.2.19/include/linux/agp_backend.h : 17 10 1
v2.2.19/include/linux/b1lli.h : 85 2 67
v2.2.19/include/linux/b1pcmcia.h : 28 1 18
v2.2.19/include/linux/binfmts.h : 24 7 2
v2.2.19/include/linux/cciss_ioctl.h : 32 7 4
v2.2.19/include/linux/concap.h : 7 1 0
v2.2.19/include/linux/falc-lh.h : 1231 0 1231
v2.2.19/include/linux/fd.h : 10 2 2
v2.2.19/include/linux/fddidevice.h : 8 2 0
v2.2.19/include/linux/fs.h : 7 1 0
v2.2.19/include/linux/hd64572.h : 437 0 437
v2.2.19/include/linux/hysdn_if.h : 25 2 8
v2.2.19/include/linux/ioport.h : 21 17 0
v2.2.19/include/linux/isdn.h : 57 17 7
v2.2.19/include/linux/isdn_ppp.h : 8 1 1
v2.2.19/include/linux/kcomp.h : 8 1 1
v2.2.19/include/linux/kmod.h : 11 4 1
v2.2.19/include/linux/module.h : 7 1 0
v2.2.19/include/linux/netdevice.h : 8 2 0
v2.2.19/include/linux/netlink.h : 8 1 1
v2.2.19/include/linux/nfs_fs.h : 8 0 2
v2.2.19/include/linux/nfs_xdr.h : 8 1 1
v2.2.19/include/linux/parport.h : 8 1 1
v2.2.19/include/linux/pc300.h : 382 0 382
v2.2.19/include/linux/pci.h : 57 24 1
v2.2.19/include/linux/quota.h : 8 1 1
v2.2.19/include/linux/sched.h : 50 11 5
v2.2.19/include/linux/sunrpc/sched.h : 8 1 1
v2.2.19/include/linux/sunrpc/xprt.h : 8 1 1
v2.2.19/include/linux/synclink.h : 46 10 2
v2.2.19/include/linux/tty.h : 8 2 0
v2.2.19/include/linux/usb.h : 161 48 37
v2.2.19/include/net/ip.h : 8 1 1
v2.2.19/include/net/sock.h : 8 2 0
v2.2.19/include/scsi/sg.h : 16 4 2
v2.2.19/include/video/macmodes.h : 10 3 1
v2.2.19/init/main.c : 132 6 48
v2.2.19/kernel/exit.c : 17 2 2
v2.2.19/kernel/fork.c : 8 1 1
v2.2.19/kernel/ksyms.c : 15 2 0
v2.2.19/kernel/module.c : 88 36 4
v2.2.19/kernel/signal.c : 8 1 1
v2.2.19/mm/slab.c : 8 1 1
v2.2.19/mm/swapfile.c : 8 1 1
v2.2.19/net/core/dev.c : 8 1 1
v2.2.19/net/core/sock.c : 21 4 2
v2.2.19/net/ipv4/af_inet.c : 9 2 1
v2.2.19/net/ipv4/arp.c : 17 3 2
v2.2.19/net/ipv4/igmp.c : 17 2 2
v2.2.19/net/ipv4/ip_input.c : 22 6 3
v2.2.19/net/ipv4/ip_masq_irc.c : 119 54 5
v2.2.19/net/ipv4/ip_masq_vdolive.c : 8 1 1
v2.2.19/net/ipv4/ip_sockglue.c : 8 1 1
v2.2.19/net/ipv4/ipmr.c : 8 1 1
v2.2.19/net/ipv4/raw.c : 8 1 1
v2.2.19/net/ipv4/route.c : 17 2 2
v2.2.19/net/ipv4/syncookies.c : 44 6 7
v2.2.19/net/ipv4/sysctl_net_ipv4.c : 8 1 1
v2.2.19/net/ipv4/tcp.c : 8 1 1
v2.2.19/net/ipv4/tcp_input.c : 96 11 14
v2.2.19/net/ipv4/tcp_output.c : 17 3 1
v2.2.19/net/ipv6/ip6_fib.c : 17 2 2
v2.2.19/net/ipv6/ip6_input.c : 24 6 2
v2.2.19/net/ipv6/ipv6_sockglue.c : 8 1 1
v2.2.19/net/ipv6/ndisc.c : 49 16 11
v2.2.19/net/ipv6/raw.c : 8 1 1
v2.2.19/net/rose/af_rose.c : 18 4 1
v2.2.19/net/rose/rose_link.c : 45 23 2
v2.2.19/net/rose/rose_subr.c : 63 26 5
v2.2.19/net/sunrpc/sched.c : 8 1 1
v2.2.19/net/sunrpc/xprt.c : 13 4 2
v2.2.19/scripts/lxdialog/checklist.c : 29 8 2
v2.2.19/scripts/ver_linux : 25 8 4

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:07 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part08

#!/bin/sh -x
# this is part 08 of a 84 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 08; then
echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&
@@ -317,18 +320,20 @@
X pgm_check_table[1] = &illegal_op;
X pgm_check_table[2] = &privileged_op;
X pgm_check_table[3] = &execute_exception;
+ pgm_check_table[4] = &do_page_fault;
X pgm_check_table[5] = &addressing_exception;
X pgm_check_table[6] = &specification_exception;
X pgm_check_table[7] = &data_exception;
X pgm_check_table[9] = &divide_exception;
+ pgm_check_table[0x10] = &do_page_fault;
+ pgm_check_table[0x11] = &do_page_fault;
X pgm_check_table[0x12] = &translation_exception;
X pgm_check_table[0x13] = &special_op_exception;
+ pgm_check_table[0x14] = &do_pseudo_page_fault;
X pgm_check_table[0x15] = &operand_exception;
- pgm_check_table[4] = &do_page_fault;
- pgm_check_table[0x10] = &do_page_fault;
- pgm_check_table[0x11] = &do_page_fault;
X pgm_check_table[0x1C] = &privileged_op;
-
+ if (MACHINE_IS_VM)
+ cpcmd("SET PAGEX ON", NULL, 0);
X }
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/mm/fault.c linux/arch/s390/mm/fault.c
--- v2.2.19/arch/s390/mm/fault.c Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/mm/fault.c Wed Oct 10 01:40:43 2001
@@ -20,6 +20,7 @@
X #include <linux/mm.h>
X #include <linux/smp.h>
X #include <linux/smp_lock.h>
+#include <linux/compatmac.h>
X
X #include <asm/system.h>
X #include <asm/uaccess.h>
@@ -243,3 +244,123 @@
X goto no_context;
X }
X
+typedef struct _pseudo_wait_t {
+ struct _pseudo_wait_t *next;
+ wait_queue_head_t queue;
+ unsigned long address;
+ int resolved;
+} pseudo_wait_t;
+
+static pseudo_wait_t *pseudo_lock_queue = NULL;
+static spinlock_t pseudo_wait_spinlock; /* spinlock to protect lock queue */
+
+/*
+ * This routine handles pseudo page faults.
+ */
+asmlinkage void
+do_pseudo_page_fault(struct pt_regs *regs, unsigned long error_code)
+{
+ DECLARE_WAITQUEUE(wait, current);
+ pseudo_wait_t wait_struct;
+ pseudo_wait_t *ptr, *last, *next;
+ unsigned long psw_mask;
+ unsigned long address;
+ int kernel_address;
+
+ /*
+ * get psw mask of Program old psw to find out,
+ * if user or kernel mode
+ */
+ psw_mask = S390_lowcore.program_old_psw.mask;
+
+ /*
+ * get the failing address
+ * more specific the segment and page table portion of
+ * the address
+ */
+ address = S390_lowcore.trans_exc_code & 0xfffff000;
+
+ if (address & 0x80000000) {
+ /* high bit set -> a page has been swapped in by VM */
+ address &= 0x7fffffff;
+ spin_lock(&pseudo_wait_spinlock);
+ last = NULL;
+ ptr = pseudo_lock_queue;
+ while (ptr != NULL) {
+ next = ptr->next;
+ if (address == ptr->address) {
+ /*
+ * This is one of the processes waiting
+ * for the page. Unchain from the queue.
+ * There can be more than one process
+ * waiting for the same page. VM presents
+ * an initial and a completion interrupt for
+ * every process that tries to access a
+ * page swapped out by VM.
+ */
+ if (last == NULL)
+ pseudo_lock_queue = next;
+ else
+ last->next = next;
+ /* now wake up the process */
+ ptr->resolved = 1;
+ wake_up(&ptr->queue);
+ } else
+ last = ptr;
+ ptr = next;
+ }
+ spin_unlock(&pseudo_wait_spinlock);
+ } else {
+ /* Pseudo page faults in kernel mode is a bad idea */
+ if (!(psw_mask & PSW_PROBLEM_STATE)) {
+ /*
+ * VM presents pseudo page faults if the interrupted
+ * state was not disabled for interrupts. So we can
+ * get pseudo page fault interrupts while running
+ * in kernel mode. We simply access the page here
+ * while we are running disabled. VM will then swap
+ * in the page synchronously.
+ */
+ kernel_address = 0;
+ switch (S390_lowcore.trans_exc_code & 3) {
+ case 0: /* Primary Segment Table Descriptor */
+ kernel_address = 1;
+ break;
+ case 1: /* STD determined via access register */
+ if (S390_lowcore.exc_access_id == 0 ||
+ regs->acrs[S390_lowcore.exc_access_id]==0)
+ kernel_address = 1;
+ break;
+ case 2: /* Secondary Segment Table Descriptor */
+ case 3: /* Home Segment Table Descriptor */
+ break;
+ }
+ if (kernel_address)
+ /* dereference a virtual kernel address */
+ __asm__ __volatile__ (
+ " ic 0,0(%0)"
+ : : "a" (address) : "0");
+ else
+ /* dereference a virtual user address */
+ __asm__ __volatile__ (
+ " la 2,0(%0)\n"
+ " sacf 512\n"
+ " ic 2,0(2)\n"
+ " sacf 0"
+ : : "a" (address) : "2" );
+
+ return;
+ }
+ /* initialize and add element to pseudo_lock_queue */
+ init_waitqueue_head (&wait_struct.queue);
+ wait_struct.address = address;
+ wait_struct.resolved = 0;
+ spin_lock(&pseudo_wait_spinlock);
+ wait_struct.next = pseudo_lock_queue;
+ pseudo_lock_queue = &wait_struct;
+ spin_unlock(&pseudo_wait_spinlock);
+ /* go to sleep */
+ wait_event(wait_struct.queue, wait_struct.resolved);
+ }
+}
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/tools/dasdfmt/dasdfmt.8 linux/arch/s390/tools/dasdfmt/dasdfmt.8
--- v2.2.19/arch/s390/tools/dasdfmt/dasdfmt.8 Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/tools/dasdfmt/dasdfmt.8 Wed Oct 10 01:40:43 2001
@@ -1,68 +1,68 @@
-.TH DASDFMT 8 "Tue Jan 25 2000"
-.UC 4
-.SH NAME
-dasdfmt \- formatting of DSAD (ECKD) disk drives.
-.SH SYNOPSIS
-\fBdasdfmt\fR [-tvyLV] [-b \fIblockSize\fR] [-l \fIdiskLabel\fR] \fIdiskSpec\fR
-.SH DESCRIPTION
-\fBdasdfmt\fR formats a DASD (ECKD) disk drive to prepare it
-for usage with Linux for S/390. \fBWARNING\fR: Incautious usage of
-\fBdasdfmt\fR can result in \fBLOSS OF DATA\fR.
-
-.SH OPTIONS
-.TP
-\fB-t\fR
-Disables any modification of the disk drive. \fBdasdfmt\fR just prints
-out, what it \fBwould\fR do.
-
-.TP
-\fB-v\fR
-Increases verbosity.
-
-.TP
-\fB-y\fR
-Start formatting without further user-confirmation.
-
-.TP
-\fB-L\fR
-Omit the writing of a disk label after formatting.
-
-.TP
-\fB-V\fR
-Print version number and exit.
-
-.TP
-\fB-b\fR \fIblockSize\fR
-Specify blocksize to be used. \fIblocksize\fR must be a positive integer
-and always be a power of two. Due due some limitations in the driver,
-it is \fBstrongly\fR recommended to use a \fIblockSize\fR of \fI4096\fR.
-
-.TP
-\fB-l\fR \fIdiskLabel\fR
-Specify the label to be written to disk after formatting. If no label is
-specified, a sensible default is used. \fIdiskLabel\fR is interpreted as
-ASCII string and is automatically converted to EBCDIC.
-
-.TP
-\fIdiskSpec\fR
-This parameter specified the device to be formatted. It also can be
-given in two variants:
-.sp
- \fB-f\fR \fB/dev/dasd\fR\fIX\fR
-.br
-or
-.br
- \fB-n\fR \fIdevnum\fR
-.sp
-The first form uses the commonly used
-.SM UNIX
-device notation where \fIX\fR is a single lowercase letter.
-The second form uses simply the device number.
-
-.SH BUGS
-None so far ;-)
-
-.SH AUTHOR
-.nf
-This man-page was written by Fritz Elfert <fel...@to.com>
-.fi
+.TH DASDFMT 8 "Tue Jan 25 2000"
+.UC 4
+.SH NAME
+dasdfmt \- formatting of DSAD (ECKD) disk drives.
+.SH SYNOPSIS
+\fBdasdfmt\fR [-tvyLV] [-b \fIblockSize\fR] [-l \fIdiskLabel\fR] \fIdiskSpec\fR
+.SH DESCRIPTION
+\fBdasdfmt\fR formats a DASD (ECKD) disk drive to prepare it
+for usage with Linux for S/390. \fBWARNING\fR: Incautious usage of
+\fBdasdfmt\fR can result in \fBLOSS OF DATA\fR.
+
+.SH OPTIONS
+.TP
+\fB-t\fR
+Disables any modification of the disk drive. \fBdasdfmt\fR just prints
+out, what it \fBwould\fR do.
+
+.TP
+\fB-v\fR
+Increases verbosity.
+
+.TP
+\fB-y\fR
+Start formatting without further user-confirmation.
+
+.TP
+\fB-L\fR
+Omit the writing of a disk label after formatting.
+
+.TP
+\fB-V\fR
+Print version number and exit.
+
+.TP
+\fB-b\fR \fIblockSize\fR
+Specify blocksize to be used. \fIblocksize\fR must be a positive integer
+and always be a power of two. Due due some limitations in the driver,
+it is \fBstrongly\fR recommended to use a \fIblockSize\fR of \fI4096\fR.
+
+.TP
+\fB-l\fR \fIdiskLabel\fR
+Specify the label to be written to disk after formatting. If no label is
+specified, a sensible default is used. \fIdiskLabel\fR is interpreted as
+ASCII string and is automatically converted to EBCDIC.
+
+.TP
+\fIdiskSpec\fR
+This parameter specified the device to be formatted. It also can be
+given in two variants:
+.sp
+ \fB-f\fR \fB/dev/dasd\fR\fIX\fR
+.br
+or
+.br
+ \fB-n\fR \fIdevnum\fR
+.sp
+The first form uses the commonly used
+.SM UNIX
+device notation where \fIX\fR is a single lowercase letter.
+The second form uses simply the device number.
+
+.SH BUGS
+None so far ;-)
+
+.SH AUTHOR
+.nf
+This man-page was written by Fritz Elfert <fel...@to.com>
+.fi
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/tools/dasdfmt/dasdfmt.c linux/arch/s390/tools/dasdfmt/dasdfmt.c
--- v2.2.19/arch/s390/tools/dasdfmt/dasdfmt.c Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/tools/dasdfmt/dasdfmt.c Wed Oct 10 01:40:43 2001
@@ -479,7 +479,7 @@
X
X rc=stat(dev_name,&stat_buf);
X if (rc) {
- ERRMSG_EXIT(EXIT_FAILURE,"%s: error occured during stat: " \
+ ERRMSG_EXIT(EXIT_FAILURE,"%s: error occurred during stat: " \
X "%s\n",prog_name,strerror(errno));
X } else {
X if (!S_ISBLK(stat_buf.st_mode))
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/tools/silo/silo.8 linux/arch/s390/tools/silo/silo.8
--- v2.2.19/arch/s390/tools/silo/silo.8 Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/tools/silo/silo.8 Wed Oct 10 01:40:43 2001
@@ -1,100 +1,100 @@
-.TH SILO 8 "Thu Feb 17 2000"
-.UC 4
-.SH NAME
-silo \- preparing a DASD to become an IPL device
-.SH SYNOPSIS
-\fBsilo\fR -d \fIipldevice\fR [-hV?] [-t[\fI#\fR]] [-v[\fI#\fR]]
- [-F \fIconfig-file\fR] [-b \fIbootsector\fR]
+.TH SILO 8 "Thu Feb 17 2000"
+.UC 4
+.SH NAME
+silo \- preparing a DASD to become an IPL device
+.SH SYNOPSIS
+\fBsilo\fR -d \fIipldevice\fR [-hV?] [-t[\fI#\fR]] [-v[\fI#\fR]]
+ [-F \fIconfig-file\fR] [-b \fIbootsector\fR]
X [-f \fIimage\fR] [-p \fIparameterfile\fR] [-B \fIbootmap\fR]
-.SH DESCRIPTION
-\fBsilo\fR makes a DASD an IPLable volume. All files needed for IPL must
-reside on that volume, namely the \fIimage\fR, the \FIparameterline\fR and
+.SH DESCRIPTION
+\fBsilo\fR makes a DASD an IPLable volume. All files needed for IPL must
+reside on that volume, namely the \fIimage\fR, the \FIparameterline\fR and
X the bootmap.
-Only one IPLable image per volume is supported. Currently we require an ECKD
-type DASD with a blocksize of at least 2048 bytes to IPL. By default silo
-does \fBnot\fR modify anything on your disk, but prints out its actions.
-
-\fBWARNING\fR: Incautious usage of \fBsilo\fR can leave your system in a
-state that is not IPLable!
-
-There are some defaults for the most common parameters compiled into the
-binary. You can overwrite these defaults by your own using /etc/silo.conf
-or another config file specified by \fB-F\fR \fIconfig-file\fR. All values
-set by defaults or the config file can be overwritten using the commandline
+Only one IPLable image per volume is supported. Currently we require an ECKD
+type DASD with a blocksize of at least 2048 bytes to IPL. By default silo
+does \fBnot\fR modify anything on your disk, but prints out its actions.
+
+\fBWARNING\fR: Incautious usage of \fBsilo\fR can leave your system in a
+state that is not IPLable!
+
+There are some defaults for the most common parameters compiled into the
+binary. You can overwrite these defaults by your own using /etc/silo.conf
+or another config file specified by \fB-F\fR \fIconfig-file\fR. All values
+set by defaults or the config file can be overwritten using the commandline
X options of silo.
-
+
X The config file recognizes the following statements:
-.TP
-\fBipldevice\fR=\fIdevicenode\fR
-sets the ipldevice to devicenode. The device node specified must be the node
+.TP
+\fBipldevice\fR=\fIdevicenode\fR
+sets the ipldevice to devicenode. The device node specified must be the node
X of the 'full' device and not one of a partition.
-
-.TP
-\fBappend\fR=\fIlist of parameters\fR
-sets additional parameters to be added to the parmfile. These parameters are
-added to any parmfile specified on the command line. The old parameter file
-is preserved and a new one is created with a temporary name.
-
-.TP
-\fBimage\fR=\fIimage\fR
-sets the name of the image to be IPLed from that volume. The default name
+
+.TP
+\fBappend\fR=\fIlist of parameters\fR
+sets additional parameters to be added to the parmfile. These parameters are
+added to any parmfile specified on the command line. The old parameter file
+is preserved and a new one is created with a temporary name.
+
+.TP
+\fBimage\fR=\fIimage\fR
+sets the name of the image to be IPLed from that volume. The default name
X is \fI./image\fR.
-
-.TP
-\fBbootsect\fR=\fIbootsect\fR
-sets the name of the bootsector to be used as IPL record for that volume.
+
+.TP
+\fBbootsect\fR=\fIbootsect\fR
+sets the name of the bootsector to be used as IPL record for that volume.
X The default name is \fI/boot/ipleckd.boot\fR.
-
-.TP
-\fBmap\fR=\fIbootmap\fR
-sets the name of the bootmap to hold the map information needen during IPL.
-The default name is \fI./boot.map\fR. In testonly mode this name is replaced
+
+.TP
+\fBmap\fR=\fIbootmap\fR
+sets the name of the bootmap to hold the map information needen during IPL.
+The default name is \fI./boot.map\fR. In testonly mode this name is replaced
X by a temporary name.
-.TP
-\fBparmfile\fR=\fIparameter file\fR
-sets the name of the parameter file holding the kernel parameters to be used
+.TP
+\fBparmfile\fR=\fIparameter file\fR
+sets the name of the parameter file holding the kernel parameters to be used
X during setup of the kernel. The default name is \fI./parmfile\fR.
-
-.TP
-\fBramdisk\fR=\fIramdisk image\fR
-optionally sets the name of a ramdisk image to be used as an initial ramdisk.
-
-.TP
-\fBroot\fR=\fIdevice node\fR
-sets the device holding the root device of the IPLed system.
-
-.TP
+
+.TP
+\fBramdisk\fR=\fIramdisk image\fR
+optionally sets the name of a ramdisk image to be used as an initial ramdisk.
+
+.TP
+\fBroot\fR=\fIdevice node\fR
+sets the device holding the root device of the IPLed system.
+
+.TP
X \fBreadonly\fR
-sets the flag to mount thedevice holding the root device of the IPLed system.
+sets the flag to mount thedevice holding the root device of the IPLed system.
X in readonly mode, before the final mount is done by /etc/fstab.
-
-.TP
-\fBverbose\fR=\fIlevel\fR
-sets the level of verbosity to \fIlevel\fR.
-
-.TP
-\fBtestlevel\fR=\fIlevel\fR
-decreases the testing level (from 2) by \fIlevel\fR.
-
-.SH OPTIONS
-.TP
-\fB-t\fR [\fI#\fR]
-decreases the testing level by one, or \fi#\fR, rsp. By default the testing
-level is set to 2, which means that no modifications are made to the disk.
-A testing level of 1 means, that a bootmap is generated with a temporary
-filename, but the IPL records of the disk are not modified. Only with a
+
+.TP
+\fBverbose\fR=\fIlevel\fR
+sets the level of verbosity to \fIlevel\fR.
+
+.TP
+\fBtestlevel\fR=\fIlevel\fR
+decreases the testing level (from 2) by \fIlevel\fR.
+
+.SH OPTIONS
+.TP
+\fB-t\fR [\fI#\fR]
+decreases the testing level by one, or \fi#\fR, rsp. By default the testing
+level is set to 2, which means that no modifications are made to the disk.
+A testing level of 1 means, that a bootmap is generated with a temporary
+filename, but the IPL records of the disk are not modified. Only with a
X testing level of 0 or below, the disk is really made IPLable.
-
-.TP
-\fB-v\fR [\fI#\fR]
-Increases verbosity, or sets verbosity to \fI#\fR, rsp.
-
-.TP
-\fB-V\fR
-Print version number and exit.
-
-.SH FILES
-.TP
+
+.TP
+\fB-v\fR [\fI#\fR]
+Increases verbosity, or sets verbosity to \fI#\fR, rsp.
+
+.TP
+\fB-V\fR
+Print version number and exit.
+
+.SH FILES
+.TP
X \fI/etc/silo.conf\fR the default configuration file.
X \fI/boot/ipleckd.boot\fR the default bootsector for ECKD devices.
X \fI/boot/iplfba.boot\fR the bootsector for FBA devices.
@@ -102,16 +102,16 @@
X \fI./image\fR the default name of the kernel image.
X \fI./parmfile\fR the default name of the parameter file.
X \fI/tmp/silodev\fR a device node which is created temporarily.
-
-.SH BUGS
-.TP
+
+.SH BUGS
+.TP
X IPL from FBA disks is not yet supported.
-.TP
+.TP
X When \fBsilo\fR aborts it does not at all clean up its temporary files.
-.TP
+.TP
X \fBsilo\fR must be run in a directory residing on the device you want to IPL.
-
-.SH AUTHOR
-.nf
+
+.SH AUTHOR
+.nf
X This man-page was written by Holger Smolinski <Holger.S...@de.ibm.com>
-.fi
+.fi
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/boot/btfixupprep.c linux/arch/sparc/boot/btfixupprep.c
--- v2.2.19/arch/sparc/boot/btfixupprep.c Sun Mar 25 17:31:46 2001
+++ linux/arch/sparc/boot/btfixupprep.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: btfixupprep.c,v 1.5 1998/09/16 12:24:55 jj Exp $
+/* $Id: btfixupprep.c,v 1.5.2.1 2001/08/22 15:28:31 davem Exp $
X Simple utility to prepare vmlinux image for sparc.
X Resolves all BTFIXUP uses and settings and creates
X a special .s object to link to the image.
@@ -88,6 +88,16 @@
X return array + last - 1;
X }
X
+void set_mode (char *buffer)
+{
+ for (mode = 0;; mode++)
+ if (buffer[mode] < '0' || buffer[mode] > '9')
+ break;
+ if (mode != 8 && mode != 16)
+ fatal();
+}
+
+
X int main(int argc,char **argv)
X {
X char *p, *q;
@@ -106,14 +116,6 @@
X goto main0;
X fatal();
X main0:
- if (fgets (buffer, 1024, stdin) == NULL || buffer[0] < '0' || buffer[0] > '9')
- fatal();
- for (mode = 0;; mode++)
- if (buffer[mode] < '0' || buffer[mode] > '9')
- break;
- if (mode != 8 && mode != 16)
- fatal();
-
X rellen = strlen(relrec);
X while (fgets (buffer, 1024, stdin) != NULL)
X if (!strncmp (buffer, relrec, rellen))
@@ -132,6 +134,8 @@
X int nbase;
X if (!strncmp (buffer, relrec, rellen))
X goto main1;
+ if (mode == 0)
+ set_mode (buffer);
X p = strchr (buffer, '\n');
X if (p) *p = 0;
X if (strlen (buffer) < 22+mode)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/kernel/entry.S linux/arch/sparc/kernel/entry.S
--- v2.2.19/arch/sparc/kernel/entry.S Sun Mar 25 17:31:46 2001
+++ linux/arch/sparc/kernel/entry.S Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: entry.S,v 1.159.2.8 2000/10/05 04:17:17 anton Exp $
+/* $Id: entry.S,v 1.159.2.9 2001/06/18 12:26:13 davem Exp $
X * arch/sparc/kernel/entry.S: Sparc trap low-level entry points.
X *
X * Copyright (C) 1995 David S. Miller (da...@caip.rutgers.edu)
@@ -1237,8 +1237,8 @@
X call C_LABEL(do_ptrace)
X add %sp, REGWIN_SZ, %o0
X
- ld [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+ ld [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be 1f
X nop
X
@@ -1287,8 +1287,8 @@
X call C_LABEL(do_sigpause)
X add %sp, REGWIN_SZ, %o1
X
- ld [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+ ld [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be 1f
X nop
X
@@ -1305,8 +1305,8 @@
X call C_LABEL(do_sigsuspend)
X add %sp, REGWIN_SZ, %o0
X
- ld [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+ ld [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be 1f
X nop
X
@@ -1324,8 +1324,8 @@
X call C_LABEL(do_rt_sigsuspend)
X add %sp, REGWIN_SZ, %o2
X
- ld [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+ ld [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be 1f
X nop
X
@@ -1342,8 +1342,8 @@
X call C_LABEL(do_sigreturn)
X add %sp, REGWIN_SZ, %o0
X
- ld [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+ ld [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be 1f
X nop
X
@@ -1362,8 +1362,8 @@
X call C_LABEL(do_rt_sigreturn)
X add %sp, REGWIN_SZ, %o0
X
- ld [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+ ld [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be 1f
X nop
X
@@ -1500,9 +1500,9 @@
X mov %i1, %o1
X mov %i2, %o2
X
- ld [%curptr + AOFF_task_flags], %l5
+ ld [%curptr + AOFF_task_ptrace], %l5
X mov %i3, %o3
- andcc %l5, 0x20, %g0
+ andcc %l5, 0x02, %g0
X mov %i4, %o4
X bne linux_syscall_trace
X mov %i0, %l5
@@ -1514,12 +1514,12 @@
X
X .globl C_LABEL(ret_sys_call)
X C_LABEL(ret_sys_call):
- ld [%curptr + AOFF_task_flags], %l6
+ ld [%curptr + AOFF_task_ptrace], %l6
X cmp %o0, -ENOIOCTLCMD
X ld [%sp + REGWIN_SZ + PT_PSR], %g3
X set PSR_C, %g2
X bgeu 1f
- andcc %l6, 0x20, %l6
+ andcc %l6, 0x02, %l6
X
X /* System call success, clear Carry condition code. */
X andn %g3, %g2, %g3
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/kernel/head.S linux/arch/sparc/kernel/head.S
--- v2.2.19/arch/sparc/kernel/head.S Sun Mar 25 17:31:46 2001
+++ linux/arch/sparc/kernel/head.S Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: head.S,v 1.95.2.6 2000/01/21 01:05:39 davem Exp $
+/* $Id: head.S,v 1.95.2.7 2001/08/12 10:56:22 davem Exp $
X * head.S: The initial boot code for the Sparc port of Linux.
X *
X * Copyright (C) 1995 David S. Miller (da...@caip.rutgers.edu)
@@ -157,7 +157,7 @@
X t_sunos:SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */
X #endif
X t_sbkpt:BREAKPOINT_TRAP /* Software Breakpoint/KGDB */
-t_divz: BAD_TRAP(0x82) /* Divide by zero trap */
+t_divz: TRAP_ENTRY(0x82, do_hw_divzero) /* Divide by zero trap */
X t_flwin:TRAP_ENTRY(0x83, do_flush_windows) /* Flush Windows Trap */
X t_clwin:BAD_TRAP(0x84) /* Clean Windows Trap */
X t_rchk: BAD_TRAP(0x85) /* Range Check */
@@ -246,7 +246,7 @@
X SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */
X #endif
X BREAKPOINT_TRAP
- BAD_TRAP(0x82)
+ TRAP_ENTRY(0x82, do_hw_divzero)
X TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85)
X BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP
X NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
@@ -318,7 +318,7 @@
X SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */
X #endif
X BREAKPOINT_TRAP
- BAD_TRAP(0x82)
+ TRAP_ENTRY(0x82, do_hw_divzero)
X TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85)
X BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP
X NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
@@ -390,7 +390,7 @@
X SUNOS_NO_SYSCALL_TRAP /* No SunOS emulation */
X #endif
X BREAKPOINT_TRAP
- BAD_TRAP(0x82)
+ TRAP_ENTRY(0x82, do_hw_divzero)
X TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85)
X BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP
X NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/kernel/ptrace.c linux/arch/sparc/kernel/ptrace.c
--- v2.2.19/arch/sparc/kernel/ptrace.c Sun Mar 25 17:31:47 2001
+++ linux/arch/sparc/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -535,12 +535,12 @@
X #endif
X if(request == PTRACE_TRACEME) {
X /* are we already being traced? */
- if (current->flags & PF_PTRACED) {
+ if (current->ptrace & PT_PTRACED) {
X pt_error_return(regs, EPERM);
X goto out;
X }
X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;
X pt_succ_return(regs, 0);
X goto out;
X }
@@ -578,11 +578,11 @@
X goto out;
X }
X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED) {
+ if (child->ptrace & PT_PTRACED) {
X pt_error_return(regs, EPERM);
X goto out;
X }
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X write_lock_irqsave(&tasklist_lock, flags);
X if(child->p_pptr != current) {
X REMOVE_LINKS(child);
@@ -594,7 +594,7 @@
X pt_succ_return(regs, 0);
X goto out;
X }
- if (!(child->flags & PF_PTRACED)
+ if (!(child->ptrace & PT_PTRACED)
X && ((current->personality & PER_BSD) && (request != PTRACE_SUNATTACH))
X && (!(current->personality & PER_BSD) && (request != PTRACE_ATTACH))) {
X pt_error_return(regs, ESRCH);
@@ -861,9 +861,9 @@
X }
X
X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X
X child->exit_code = data;
X #ifdef DEBUG_PTRACE
@@ -900,7 +900,7 @@
X pt_error_return(regs, EIO);
X goto out;
X }
- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
X wake_up_process(child);
X child->exit_code = data;
X write_lock_irqsave(&tasklist_lock, flags);
@@ -927,8 +927,8 @@
X #ifdef DEBUG_PTRACE
X printk("%s [%d]: syscall_trace\n", current->comm, current->pid);
X #endif
- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;
X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/kernel/signal.c linux/arch/sparc/kernel/signal.c
--- v2.2.19/arch/sparc/kernel/signal.c Sun Mar 25 17:31:46 2001
+++ linux/arch/sparc/kernel/signal.c Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: signal.c,v 1.91.2.2 2000/05/28 19:13:21 ecd Exp $
+/* $Id: signal.c,v 1.91.2.5 2001/08/12 10:56:22 davem Exp $
X * linux/arch/sparc/kernel/signal.c
X *
X * Copyright (C) 1991, 1992 Linus Torvalds
@@ -659,13 +659,48 @@
X switch (signr) {
X case SIGSEGV:
X case SIGILL:
- case SIGFPE:
X case SIGBUS:
X case SIGEMT:
X info->si_code = current->tss.sig_desc;
X info->si_addr = (void *)current->tss.sig_address;
X info->si_trapno = 0;
X break;
+ case SIGFPE:
+ switch (current->tss.sig_desc) {
+ case SUBSIG_FPDISABLED:
+ info->si_code = FPE_FLTSUB;
+ break;
+ case SUBSIG_FPERROR:
+ info->si_code = FPE_FLTSUB;
+ break;
+ case SUBSIG_FPINTOVFL:
+ info->si_code = FPE_INTOVF;
+ break;
+ case SUBSIG_FPSTSIG:
+ info->si_code = FPE_FLTSUB;
+ break;
+ case SUBSIG_IDIVZERO:
+ info->si_code = FPE_INTDIV;
+ break;
+ case SUBSIG_FPINEXACT:
+ info->si_code = FPE_FLTRES;
+ break;
+ case SUBSIG_FPDIVZERO:
+ info->si_code = FPE_FLTDIV;
+ break;
+ case SUBSIG_FPUNFLOW:
+ info->si_code = FPE_FLTUND;
+ break;
+ case SUBSIG_FPOPERROR:
+ info->si_code = FPE_FLTINV;
+ break;
+ case SUBSIG_FPOVFLOW:
+ info->si_code = FPE_FLTOVF;
+ break;
+ }
+ info->si_addr = (void *)current->tss.sig_address;
+ info->si_trapno = 0;
+ break;
X default:
X break;
X }
@@ -1139,7 +1174,7 @@
X
X if (!signr) break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X current->exit_code = signr;
X current->state = TASK_STOPPED;
X
@@ -1203,7 +1238,7 @@
X continue;
X
X case SIGSTOP:
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X continue;
X current->state = TASK_STOPPED;
X current->exit_code = signr;
@@ -1217,14 +1252,8 @@
X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS:
- if(current->binfmt && current->binfmt->core_dump) {
- lock_kernel();
- if(current->binfmt &&
- current->binfmt->core_dump &&
- current->binfmt->core_dump(signr, regs))
- exit_code |= 0x80;
- unlock_kernel();
- }
+ if (do_coredump(signr, regs))
+ exit_code |= 0x80;
X #ifdef DEBUG_SIGNALS
X /* Very useful to debug dynamic linker problems */
X printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/kernel/traps.c linux/arch/sparc/kernel/traps.c
--- v2.2.19/arch/sparc/kernel/traps.c Sun Mar 25 17:31:47 2001
+++ linux/arch/sparc/kernel/traps.c Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: traps.c,v 1.59 1999/03/06 12:07:31 anton Exp $
+/* $Id: traps.c,v 1.59.2.2 2001/08/23 17:36:12 davem Exp $
X * arch/sparc/kernel/traps.c
X *
X * Copyright 1995 David S. Miller (da...@caip.rutgers.edu)
@@ -328,6 +328,18 @@
X
X fpt->tss.sig_address = pc;
X fpt->tss.sig_desc = SUBSIG_FPERROR; /* as good as any */
+ if ((fpt->tss.fsr & 0x1c000) == (1 << 14)) {
+ if (fpt->tss.fsr & 0x01)
+ fpt->tss.sig_desc = SUBSIG_FPINEXACT;
+ else if (fpt->tss.fsr & 0x02)
+ fpt->tss.sig_desc = SUBSIG_FPDIVZERO;
+ else if (fpt->tss.fsr & 0x04)
+ fpt->tss.sig_desc = SUBSIG_FPUNFLOW;
+ else if (fpt->tss.fsr & 0x08)
+ fpt->tss.sig_desc = SUBSIG_FPOVFLOW;
+ else if (fpt->tss.fsr & 0x10)
+ fpt->tss.sig_desc = SUBSIG_FPINTOVFL;
+ }
X #ifdef __SMP__
X fpt->flags &= ~PF_USEDFPU;
X #endif
@@ -417,8 +429,15 @@
X void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, unsigned long npc,
X unsigned long psr)
X {
+#ifndef __SMP__
+ struct task_struct *fpt = last_task_used_math;
+#else
+ struct task_struct *fpt = current;
+#endif
X lock_kernel();
- send_sig(SIGILL, current, 1);
+ fpt->tss.sig_address = pc;
+ fpt->tss.sig_desc = SUBSIG_IDIVZERO;
+ send_sig(SIGFPE, fpt, 1);
X unlock_kernel();
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc/lib/memset.S linux/arch/sparc/lib/memset.S
--- v2.2.19/arch/sparc/lib/memset.S Sun Mar 25 17:31:47 2001
+++ linux/arch/sparc/lib/memset.S Wed Oct 10 01:40:43 2001
@@ -185,7 +185,7 @@
X b 30f
X add %o0, %o1, %o0
X 30:
-/* %o4 is faulting address, %o5 is %pc where fault occured */
+/* %o4 is faulting address, %o5 is %pc where fault occurred */
X save %sp, -104, %sp
X mov %i5, %o0
X mov %i7, %o1
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/binfmt_aout32.c linux/arch/sparc64/kernel/binfmt_aout32.c
--- v2.2.19/arch/sparc64/kernel/binfmt_aout32.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/binfmt_aout32.c Wed Oct 10 01:40:43 2001
@@ -33,13 +33,17 @@
X #include <asm/pgtable.h>
X
X static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs);
-static int load_aout32_library(int fd);
-static int aout32_core_dump(long signr, struct pt_regs * regs);
+static int load_aout32_library(struct file *file);
+static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *);
X
X extern void dump_thread(struct pt_regs *, struct user *);
X
X static struct linux_binfmt aout32_format = {
- NULL, NULL, load_aout32_binary, load_aout32_library, aout32_core_dump
+ module: THIS_MODULE,
+ load_binary: load_aout32_binary,
+ load_shlib: load_aout32_library,
+ core_dump: aout32_core_dump,
+ min_coredump: PAGE_SIZE,
X };
X
X static void set_brk(unsigned long start, unsigned long end)
@@ -87,46 +91,18 @@
X * dumping of the process results in another error..
X */
X
-static inline int
-do_aout32_core_dump(long signr, struct pt_regs * regs)
+static int
+aout32_core_dump(long signr, struct pt_regs * regs, struct file * file)
X {
- struct dentry * dentry = NULL;
- struct inode * inode = NULL;
- struct file * file;
X mm_segment_t fs;
X int has_dumped = 0;
- char corefile[6+sizeof(current->comm)];
X unsigned long dump_start, dump_size;
X struct user dump;
X # define START_DATA(u) (u.u_tsize)
X # define START_STACK(u) ((regs->u_regs[UREG_FP]) & ~(PAGE_SIZE - 1))
X
- if (!current->dumpable || atomic_read(&current->mm->count) != 1)
- return 0;
- current->dumpable = 0;
-
-/* See if we have enough room to write the upage. */
- if (current->rlim[RLIMIT_CORE].rlim_cur < PAGE_SIZE)
- return 0;
X fs = get_fs();
X set_fs(KERNEL_DS);
- memcpy(corefile,"core.",5);
-#if 0
- memcpy(corefile+5,current->comm,sizeof(current->comm));
-#else
- corefile[4] = '\0';
-#endif
- file = filp_open(corefile,O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600);
- if (IS_ERR(file))
- goto end_coredump;
- dentry = file->f_dentry;
- inode = dentry->d_inode;
- if (!S_ISREG(inode->i_mode))
- goto close_coredump;
- if (!inode->i_op || !inode->i_op->default_file_ops)
- goto close_coredump;
- if (!file->f_op->write)
- goto close_coredump;
X has_dumped = 1;
X current->flags |= PF_DUMPCORE;
X strncpy(dump.u_comm, current->comm, sizeof(current->comm));
@@ -172,23 +148,10 @@
X set_fs(KERNEL_DS);
X DUMP_WRITE(current,sizeof(*current));
X close_coredump:
- filp_close(file, NULL);
-end_coredump:
X set_fs(fs);
X return has_dumped;
X }
X
-static int
-aout32_core_dump(long signr, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_aout32_core_dump(signr, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X /*
X * create_aout32_tables() parses the env- and arg-strings in new user
X * memory and creates the pointer tables from them, and puts their
@@ -242,8 +205,7 @@
X * libraries. There is no binary dependent code anywhere else.
X */
X
-static inline int do_load_aout32_binary(struct linux_binprm * bprm,
- struct pt_regs * regs)
+static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs)
X {
X struct exec ex;
X struct file * file;
@@ -357,16 +319,12 @@
X }
X }
X beyond_if:
+ set_binfmt(&aout32_format);
X if (current->exec_domain && current->exec_domain->module)
X __MOD_DEC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_DEC_USE_COUNT(current->binfmt->module);
X current->exec_domain = lookup_exec_domain(current->personality);
- current->binfmt = &aout32_format;
X if (current->exec_domain && current->exec_domain->module)
X __MOD_INC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_INC_USE_COUNT(current->binfmt->module);
X
X set_brk(current->mm->start_brk, current->mm->brk);
X
@@ -375,28 +333,14 @@
X p = (unsigned long) create_aout32_tables((char *)p, bprm);
X current->mm->start_stack = p;
X start_thread32(regs, ex.a_entry, p);
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X send_sig(SIGTRAP, current, 0);
X return 0;
X }
X
-
-static int
-load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_aout32_binary(bprm, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X /* N.B. Move to .h file and use code in fs/binfmt_aout.c? */
-static inline int
-do_load_aout32_library(int fd)
+static int load_aout32_library(struct file *file)
X {
- struct file * file;
X struct inode * inode;
X unsigned long bss, start_addr, len;
X unsigned long error;
@@ -404,12 +348,6 @@
X loff_t offset = 0;
X struct exec ex;
X
- retval = -EACCES;
- file = fget(fd);
- if (!file)
- goto out;
- if (!file->f_op)
- goto out_putf;
X inode = file->f_dentry->d_inode;
X
X retval = -ENOEXEC;
@@ -463,22 +401,8 @@
X retval = 0;
X
X out_putf:
- fput(file);
-out:
- return retval;
-}
-
-static int
-load_aout32_library(int fd)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_aout32_library(fd);
- MOD_DEC_USE_COUNT;
X return retval;
X }
-
X
X __initfunc(int init_aout32_binfmt(void))
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/devices.c linux/arch/sparc64/kernel/devices.c
--- v2.2.19/arch/sparc64/kernel/devices.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/devices.c Wed Oct 10 01:40:43 2001
@@ -73,6 +73,15 @@
X
X prom_cpu_nodes[0] = prom_node_cpu;
X
+#ifndef __SMP__
+ {
+ extern unsigned int up_clock_tick;
+ up_clock_tick = prom_getintdefault(prom_node_cpu,
+ "clock-frequency",
+ 0);
+ }
+#endif
+
X mem_start = central_probe(mem_start);
X
X cpu_probe();
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/entry.S linux/arch/sparc64/kernel/entry.S
--- v2.2.19/arch/sparc64/kernel/entry.S Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/entry.S Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: entry.S,v 1.103.2.6 2000/09/08 14:00:04 jj Exp $
+/* $Id: entry.S,v 1.103.2.7 2001/06/18 12:26:13 davem Exp $
X * arch/sparc64/kernel/entry.S: Sparc64 trap low-level entry points.
X *
X * Copyright (C) 1995,1997 David S. Miller (da...@caip.rutgers.edu)
@@ -880,8 +880,8 @@
X add %o7, 1f-.-4, %o7
X nop
X .align 32
-1: ldx [%curptr + AOFF_task_flags], %l5
- andcc %l5, 0x20, %g0
+1: ldx [%curptr + AOFF_task_ptrace], %l5
+ andcc %l5, 0x02, %g0
X be,pt %icc, rtrap
X clr %l6
X call syscall_trace
@@ -1015,12 +1015,12 @@
X mov %i4, %o4 ! IEU1
X lduw [%l7 + %l4], %l7 ! Load
X srl %i1, 0, %o1 ! IEU0 Group
- ldx [%curptr + AOFF_task_flags], %l0 ! Load
+ ldx [%curptr + AOFF_task_ptrace], %l0 ! Load
X
X mov %i5, %o5 ! IEU1
X srl %i2, 0, %o2 ! IEU0 Group
X mov %i0, %l5 ! IEU1
- andcc %l0, 0x20, %g0 ! IEU1 Group
+ andcc %l0, 0x02, %g0 ! IEU1 Group
X bne,pn %icc, linux_syscall_trace32 ! CTI
X srl %i3, 0, %o3 ! IEU0
X call %l7 ! CTI Group brk forced
@@ -1044,11 +1044,11 @@
X mov %i1, %o1 ! IEU1
X lduw [%l7 + %l4], %l7 ! Load
X 4: mov %i2, %o2 ! IEU0 Group
- ldx [%curptr + AOFF_task_flags], %l0 ! Load
+ ldx [%curptr + AOFF_task_ptrace], %l0 ! Load
X
X mov %i3, %o3 ! IEU1
X mov %i4, %o4 ! IEU0 Group
- andcc %l0, 0x20, %g0 ! IEU1 Group+1 bubble
+ andcc %l0, 0x02, %g0 ! IEU1 Group+1 bubble
X bne,pn %icc, linux_syscall_trace ! CTI Group
X mov %i0, %l5 ! IEU0
X 2: call %l7 ! CTI Group brk forced
@@ -1059,14 +1059,14 @@
X call syscall_trace_exit
X add %sp, STACK_BIAS + REGWIN_SZ, %o1
X #endif
- ldx [%curptr + AOFF_task_flags], %l6
+ ldx [%curptr + AOFF_task_ptrace], %l6
X sra %o0, 0, %o0
X mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
X ldx [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_TSTATE], %g3
X cmp %o0, -ENOIOCTLCMD
X sllx %g2, 32, %g2
X bgeu,pn %xcc, 1f
- andcc %l6, 0x20, %l6
+ andcc %l6, 0x02, %l6
X
X /* System call success, clear Carry condition code. */
X andn %g3, %g2, %g3
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/ioctl32.c
--- v2.2.19/arch/sparc64/kernel/ioctl32.c Sun Mar 25 17:37:30 2001
+++ linux/arch/sparc64/kernel/ioctl32.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: ioctl32.c,v 1.62.2.18 2001/01/26 22:26:07 davem Exp $
+/* $Id: ioctl32.c,v 1.62.2.21 2001/06/08 01:34:11 davem Exp $
X * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
X *
X * Copyright (C) 1997 Jakub Jelinek (j...@sunsite.mff.cuni.cz)
@@ -43,6 +43,7 @@
X #include <linux/blkdev.h>
X #include <linux/in6.h>
X #include <linux/ipv6_route.h>
+#include <linux/pci.h>
X #include <net/sock.h>
X
X #include <scsi/scsi.h>
@@ -492,10 +493,19 @@
X }
X }
X if (!err) {
- if (i <= ifc32.ifc_len)
+ if (ifc32.ifcbuf == 0) {
+ /* Translate from 64-bit structure multiple to
+ * a 32-bit one.
+ */
+ i = ifc.ifc_len;
+ i = ((i / sizeof(struct ifreq)) * sizeof(struct ifreq32));
X ifc32.ifc_len = i;
- else
- ifc32.ifc_len = i - sizeof (struct ifreq32);
+ } else {
+ if (i <= ifc32.ifc_len)
+ ifc32.ifc_len = i;
+ else
+ ifc32.ifc_len = i - sizeof (struct ifreq32);
+ }
X if (copy_to_user((struct ifconf32 *)arg, &ifc32, sizeof(struct ifconf32)))
X err = -EFAULT;
X }
@@ -2682,6 +2692,8 @@
X case /* STOP_ARRAY */ _IO (MD_MAJOR, 0x32):
X case /* STOP_ARRAY_RO */ _IO (MD_MAJOR, 0x33):
X case /* RESTART_ARRAY_RW */ _IO (MD_MAJOR, 0x34):
+ case /* PRINT_RAID_DEBUG */ _IO (MD_MAJOR, 0x13):
+ case /* SET_DISK_FAULTY */ _IO (MD_MAJOR, 0x29):
X
X /* Big K */
X case PIO_FONT:
@@ -3136,6 +3148,13 @@
X case DRM_IOCTL_FINISH:
X #endif /* DRM */
X
+ /* Misc. */
+ case 0x41545900: /* ATYIO_CLKR */
+ case 0x41545901: /* ATYIO_CLKW */
+ case PCIIOC_CONTROLLER:
+ case PCIIOC_MMAP_IS_IO:
+ case PCIIOC_MMAP_IS_MEM:
+ case PCIIOC_WRITE_COMBINE:
X
X error = sys_ioctl (fd, cmd, arg);
X goto out;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/irq.c linux/arch/sparc64/kernel/irq.c
--- v2.2.19/arch/sparc64/kernel/irq.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/irq.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.76.2.3 2000/03/02 02:03:27 davem Exp $
+/* $Id: irq.c,v 1.76.2.4 2001/06/04 06:51:17 ecd Exp $
X * irq.c: UltraSparc IRQ handling/init/registry.
X *
X * Copyright (C) 1997 David S. Miller (da...@caip.rutgers.edu)
@@ -1048,6 +1048,8 @@
X unsigned char flags = bp->flags;
X
X nbp = __bucket(bp->irq_chain);
+ bp->irq_chain = 0;
+
X if((flags & IBF_ACTIVE) != 0) {
X if((flags & IBF_MULTI) == 0) {
X struct irqaction *ap = bp->irq_info;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/process.c linux/arch/sparc64/kernel/process.c
--- v2.2.19/arch/sparc64/kernel/process.c Sun Mar 25 17:31:52 2001
+++ linux/arch/sparc64/kernel/process.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.92.2.3 1999/12/05 07:24:38 davem Exp $
+/* $Id: process.c,v 1.92.2.4 2001/06/03 13:41:48 ecd Exp $
X * arch/sparc64/kernel/process.c
X *
X * Copyright (C) 1995, 1996 David S. Miller (da...@caip.rutgers.edu)
@@ -116,6 +116,7 @@
X extern void (*prom_palette)(int);
X extern int serial_console;
X #endif
+extern void (*prom_keyboard)(void);
X
X void machine_halt(void)
X {
@@ -126,6 +127,8 @@
X if (!serial_console && prom_palette)
X prom_palette (1);
X #endif
+ if (prom_keyboard)
+ prom_keyboard();
X prom_halt();
X panic("Halt failed!");
X }
@@ -144,6 +147,8 @@
X if (!serial_console && prom_palette)
X prom_palette (1);
X #endif
+ if (prom_keyboard)
+ prom_keyboard();
X if (cmd)
X prom_reboot(cmd);
X if (*reboot_command)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/psycho.c linux/arch/sparc64/kernel/psycho.c
--- v2.2.19/arch/sparc64/kernel/psycho.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/psycho.c Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: psycho.c,v 1.85.2.11 2000/10/24 21:00:53 davem Exp $
+/* $Id: psycho.c,v 1.85.2.14 2001/08/12 13:17:25 davem Exp $
X * psycho.c: Ultra/AX U2P PCI controller support.
X *
X * Copyright (C) 1997 David S. Miller (da...@caipfs.rutgers.edu)
@@ -412,6 +412,7 @@
X pbm = &sabre->pbm_A;
X
X pbm->parent = sabre;
+ pbm->pci_first_slot = 1;
X pbm->IO_assignments = NULL;
X pbm->MEM_assignments = NULL;
X pbm->prom_node = node;
@@ -586,10 +587,18 @@
X pbm = &psycho->pbm_B;
X
X pbm->parent = psycho;
+ pbm->pci_first_slot = 1;
X pbm->IO_assignments = NULL;
X pbm->MEM_assignments = NULL;
X pbm->prom_node = node;
X
+ if (!is_pbm_a) {
+ prom_getstring(prom_root_node, "name",
+ namebuf, sizeof(namebuf));
+ if (!strcmp(namebuf, "SUNW,Ultra-1-Engine"))
+ pbm->pci_first_slot = 2;
+ }
+
X prom_getstring(node, "name", namebuf, sizeof(namebuf));
X strcpy(pbm->prom_name, namebuf);
X
@@ -682,12 +691,26 @@
X
X static inline struct pci_vma *pci_vma_alloc(void)
X {
- return kmalloc(sizeof(struct pci_vma), GFP_ATOMIC);
+ struct pci_vma *vma = kmalloc(sizeof(struct pci_vma), GFP_ATOMIC);
+
+ if (!vma) {
+ prom_printf("PCI: Critical error, cannot allocate PCI_VMA.\n");
+ prom_halt();
+ }
+
+ return vma;
X }
X
X static inline struct pcidev_cookie *pci_devcookie_alloc(void)
X {
- return kmalloc(sizeof(struct pcidev_cookie), GFP_ATOMIC);
+ struct pcidev_cookie *cookie = kmalloc(sizeof(struct pcidev_cookie), GFP_ATOMIC);
+
+ if (!cookie) {
+ prom_printf("PCI: Critical error, cannot allocate PCIDEV_COOKIE.\n");
+ prom_halt();
+ }
+
+ return cookie;
X }
X
X
@@ -804,18 +827,48 @@
X }
X }
X
+static void __init pci_fixup_host_bridge_self(struct pci_bus *pbus)
+{
+ struct pci_dev *pdev;
+
+ for (pdev = pbus->devices; pdev; pdev = pdev->sibling) {
+ if (pdev->class >> 8 == PCI_CLASS_BRIDGE_HOST) {
+ pbus->self = pdev;
+ return;
+ }
+ }
+
+ prom_printf("PCI: Critical error, cannot find host bridge PDEV.\n");
+ prom_halt();
+}
+
+static struct pcidev_cookie * __init pci_alloc_hostbridge_cookie(struct linux_pbm_info *pbm)
+{
+ struct pcidev_cookie *cookie = pci_devcookie_alloc();
+
+ memset(cookie, 0, sizeof(*cookie));
+ cookie->pbm = pbm;
+
+ return cookie;
+}
+
X static void __init sabre_probe(struct linux_psycho *sabre)
X {
X struct pci_bus *pbus = sabre->pci_bus;
X static unsigned char busno = 0;
X
+ sabre->pbms_same_domain = 1;
+
X pbus->number = pbus->secondary = busno;
X pbus->sysdata = sabre;
X
X pbus->subordinate = pci_scan_bus(pbus);
X busno = pbus->subordinate + 1;
X
- for(pbus = pbus->children; pbus; pbus = pbus->next) {
+ pci_fixup_host_bridge_self(pbus);
+ pbus->self->sysdata = pci_alloc_hostbridge_cookie(&sabre->pbm_A);
+
+ for (pbus = pbus->children; pbus; pbus = pbus->next) {
X if (pbus->number == sabre->pbm_A.pci_first_busno)
X memcpy(&sabre->pbm_A.pci_bus, pbus, sizeof(*pbus));
X if (pbus->number == sabre->pbm_B.pci_first_busno)
@@ -845,6 +898,9 @@
X
X pbus->subordinate = pci_scan_bus(pbus);
X
+ pci_fixup_host_bridge_self(pbus);
+ pbus->self->sysdata = pci_alloc_hostbridge_cookie(pbm);
+
X /*
X * Set the maximum subordinate bus of this pbm.
X */
@@ -1852,20 +1908,21 @@
X
X /* Slot determination is only slightly complex. Handle
X * the easy case first.
+ *
+ * Basically, device number zero on the top-level bus is
+ * always the PCI host controller. Slot 0 is then device 1.
+ * PBM A supports two external slots (0 and 1), and PBM B
+ * supports 4 external slots (0, 1, 2, and 3). On-board PCI
+ * devices are wired to device numbers outside of these
+ * ranges. -DaveM
X */
X if(pdev->bus->number == pbm->pci_first_busno) {
- if(pbm == &pbm->parent->pbm_A)
- slot = (pdev->devfn >> 3) - 1;
- else
- slot = (pdev->devfn >> 3) - 2;
+ slot = (pdev->devfn >> 3) - pbm->pci_first_slot;
X } else {
X /* Underneath a bridge, use slot number of parent
X * bridge.
X */
- if(pbm == &pbm->parent->pbm_A)
- slot = (pdev->bus->self->devfn >> 3) - 1;
- else
- slot = (pdev->bus->self->devfn >> 3) - 2;
+ slot = (pdev->bus->self->devfn >> 3) - pbm->pci_first_slot;
X
X /* Use low slot number bits of child as IRQ line. */
X line = (pdev->devfn >> 3) & 0x03;
@@ -2082,6 +2139,8 @@
X if (apb_present(psycho)) {
X sabre_probe(psycho);
X } else {
+ psycho->pbms_same_domain = 0;
+
X /* Probe busses under PBM B. */
X pbm_probe(&psycho->pbm_B);
X
@@ -2654,6 +2713,150 @@
X return NULL;
X }
X return str;
+}
+
+/* Platform support for /proc/bus/pci/X/Y mmap()s. */
+
+/* Adjust vm_offset of VMA such that it is the physical page offset corresponding
+ * to the 32-bit pci bus offset for DEV requested by the user.
+ *
+ * Basically, the user finds the base address for his device which he wishes
+ * to mmap. They read the 32-bit value from the config space base register,
+ * add whatever PAGE_SIZE multiple offset they wish, and feed this into the
+ * offset parameter of mmap on /proc/bus/pci/XXX for that device.
+ *
+ * Returns negative error code on failure, zero on success.
+ */
+static __inline__ int __pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma,
+ enum pci_mmap_state mmap_state)
+{
+ unsigned long user_offset = vma->vm_offset;
+ unsigned long user32 = user_offset & 0xffffffffUL;
+ unsigned long largest_base, this_base, addr32;
+ int i;
+
+ /* Figure out which base address this is for. */
+ largest_base = 0UL;
+ for (i = 0; i <= 6; i++) {
+ unsigned long base = dev->base_address[i];
+
+ /* Active? */
+ if (!base)
+ continue;
+
+ /* Same type? */
+ if (i == 6) {
+ if (mmap_state != pci_mmap_mem)
+ continue;
+ } else {
+ if ((mmap_state == pci_mmap_io &&
+ (base & PCI_BASE_ADDRESS_SPACE_IO) == 0) ||
+ (mmap_state == pci_mmap_mem &&
+ (base & PCI_BASE_ADDRESS_SPACE_IO) != 0))
+ continue;
+ }
+
+ this_base = base;
+
+ addr32 = (this_base & PAGE_MASK) & 0xffffffffUL;
+
+ if (mmap_state == pci_mmap_io)
+ addr32 &= 0xffffff;
+
+ if (addr32 <= user32 && this_base > largest_base)
+ largest_base = this_base;
+ }
+
+ if (largest_base == 0UL)
+ return -EINVAL;
+
+ largest_base = __pa(largest_base);
+
+ /* Now construct the final physical address. */
+ if (mmap_state == pci_mmap_io)
+ vma->vm_offset = (((largest_base & ~0xffffffUL) | user32) & PAGE_MASK);
+ else
+ vma->vm_offset = (((largest_base & ~0xffffffffUL) | user32) & PAGE_MASK);
+
+ return 0;
+}
+
+/* Set vm_flags of VMA, as appropriate for this architecture, for a pci device
+ * mapping.
+ */
+static __inline__ void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma,
+ enum pci_mmap_state mmap_state)
+{
+ vma->vm_flags |= (VM_SHM | VM_LOCKED);
+}
+
+/* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
+ * device mapping.
+ */
+static __inline__ void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma,
+ enum pci_mmap_state mmap_state)
+{
+ /* Our io_remap_page_range takes care of this, do nothing. */
+}
+
+extern int io_remap_page_range(unsigned long from, unsigned long offset,
+ unsigned long size, pgprot_t prot, int space);
+
+/* Perform the actual remap of the pages for a PCI device mapping, as appropriate
+ * for this architecture. The region in the process to map is described by vm_start
+ * and vm_end members of VMA, the base physical address is found in vm_pgoff.
+ * The pci device structure is provided so that architectures may make mapping
+ * decisions on a per-device or per-bus basis.
+ *
+ * Returns a negative error code on failure, zero on success.
+ */
+int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+ enum pci_mmap_state mmap_state,
+ int write_combine)
+{
+ int ret;
+
+ ret = __pci_mmap_make_offset(dev, vma, mmap_state);
+ if (ret < 0)
+ return ret;
+
+ __pci_mmap_set_flags(dev, vma, mmap_state);
+ __pci_mmap_set_pgprot(dev, vma, mmap_state);
+
+ ret = io_remap_page_range(vma->vm_start,
+ (vma->vm_offset |
+ (write_combine ? 0x1UL : 0x0UL)),
+ vma->vm_end - vma->vm_start, vma->vm_page_prot, 0);
+ if (ret)
+ return ret;
+
+ vma->vm_flags |= VM_IO;
+ return 0;
+}
+
+/* Return the index of the PCI controller for device PDEV. */
+
+int pci_controller_num(struct pci_dev *pdev)
+{
+ struct pcidev_cookie *cookie = pdev->sysdata;
+ int ret;
+
+ if (cookie != NULL) {
+ struct linux_pbm_info *pbm = cookie->pbm;
+
+ if (pbm == NULL || pbm->parent == NULL) {
+ ret = -ENXIO;
+ } else {
+ ret = pbm->parent->index;
+ if (!pbm->parent->pbms_same_domain)
+ ret = ((ret << 1) +
+ ((pbm == &pbm->parent->pbm_B) ? 1 : 0));
+ }
+ } else {
+ ret = -ENXIO;
+ }
+
+ return ret;
X }
X
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/ptrace.c linux/arch/sparc64/kernel/ptrace.c
--- v2.2.19/arch/sparc64/kernel/ptrace.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -569,12 +569,12 @@
X #endif
X if(request == PTRACE_TRACEME) {
X /* are we already being traced? */
- if (current->flags & PF_PTRACED) {
+ if (current->ptrace & PT_PTRACED) {
X pt_error_return(regs, EPERM);
X goto out;
X }
X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;
X pt_succ_return(regs, 0);
X goto out;
X }
@@ -616,11 +616,11 @@
X goto out;
X }
X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED) {
+ if (child->ptrace & PT_PTRACED) {
X pt_error_return(regs, EPERM);
X goto out;
X }
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X write_lock_irqsave(&tasklist_lock, flags);
X if(child->p_pptr != current) {
X REMOVE_LINKS(child);
@@ -632,7 +632,7 @@
X pt_succ_return(regs, 0);
X goto out;
X }
- if (!(child->flags & PF_PTRACED)
+ if (!(child->ptrace & PT_PTRACED)
X && ((current->personality & PER_BSD) && (request != PTRACE_SUNATTACH))
X && (!(current->personality & PER_BSD) && (request != PTRACE_ATTACH))) {
X pt_error_return(regs, ESRCH);
@@ -1064,9 +1064,9 @@
X }
X
X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X
X child->exit_code = data;
X #ifdef DEBUG_PTRACE
@@ -1104,7 +1104,7 @@
X pt_error_return(regs, EIO);
X goto out;
X }
- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
X child->exit_code = data;
X
X write_lock_irqsave(&tasklist_lock, flags);
@@ -1139,8 +1139,8 @@
X #ifdef DEBUG_PTRACE
X printk("%s [%d]: syscall_trace\n", current->comm, current->pid);
X #endif
- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;
X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/setup.c linux/arch/sparc64/kernel/setup.c
--- v2.2.19/arch/sparc64/kernel/setup.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/setup.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.43.2.5 2000/10/02 02:05:37 anton Exp $
+/* $Id: setup.c,v 1.43.2.7 2001/06/03 13:41:48 ecd Exp $
X * linux/arch/sparc64/kernel/setup.c
X *
X * Copyright (C) 1995,1996 David S. Miller (da...@caip.rutgers.edu)
@@ -65,6 +65,7 @@
X #if CONFIG_SUN_CONSOLE
X void (*prom_palette)(int);
X #endif
+void (*prom_keyboard)(void);
X asmlinkage void sys_sync(void); /* it's really int */
X
X static void
@@ -620,6 +621,10 @@
X extern int smp_bogo(char *);
X extern int mmu_info(char *);
X
+#ifndef __SMP__
+unsigned int up_clock_tick;
+#endif
+
X int get_cpuinfo(char *buffer)
X {
X int cpuid=smp_processor_id();
@@ -634,7 +639,8 @@
X "ncpus probed\t: %d\n"
X "ncpus active\t: %d\n"
X #ifndef __SMP__
- "BogoMips\t: %lu.%02lu\n"
+ "Cpu0Bogo\t: %lu.%02lu\n"
+ "Cpu0ClkTck\t: %016lx\n"
X #endif
X ,
X sparc_cpu_type[cpuid],
@@ -642,7 +648,8 @@
X prom_rev, prom_prev >> 16, (prom_prev >> 8) & 0xff, prom_prev & 0xff,
X linux_num_cpus, smp_num_cpus
X #ifndef __SMP__
- , loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100
+ , loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100,
+ (unsigned long) up_clock_tick
X #endif
X );
X #ifdef __SMP__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/signal.c linux/arch/sparc64/kernel/signal.c
--- v2.2.19/arch/sparc64/kernel/signal.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: signal.c,v 1.38.2.1 1999/06/14 00:36:21 davem Exp $
+/* $Id: signal.c,v 1.38.2.3 2001/06/19 16:49:41 davem Exp $
X * arch/sparc64/kernel/signal.c
X *
X * Copyright (C) 1991, 1992 Linus Torvalds
@@ -850,7 +850,7 @@
X
X if (!signr) break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X current->exit_code = signr;
X current->state = TASK_STOPPED;
X notify_parent(current, SIGCHLD);
@@ -906,7 +906,7 @@
X continue;
X
X case SIGSTOP:
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X continue;
X current->state = TASK_STOPPED;
X current->exit_code = signr;
@@ -918,12 +918,8 @@
X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS:
- if(current->binfmt && current->binfmt->core_dump) {
- lock_kernel();
- if(current->binfmt->core_dump(signr, regs))
- exit_code |= 0x80;
- unlock_kernel();
- }
+ if (do_coredump(signr, regs))
+ exit_code |= 0x80;
X #ifdef DEBUG_SIGNALS
X /* Very useful to debug the dynamic linker */
X printk ("Sig %d going...\n", (int)signr);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/signal32.c linux/arch/sparc64/kernel/signal32.c
SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi
echo 'End of part 08'
echo 'File patch-2.2.20 is continued in part 09'
echo "09" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:17 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part18

#!/bin/sh -x
# this is part 18 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 18; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X *
@@ -32,7 +32,7 @@
X
X extern const char *CardType[];
X
-static const char *hfcsx_revision = "$Revision: 1.9 $";
+static const char *hfcsx_revision = "$Revision: 1.9.6.2 $";
X
X /***************************************/
X /* IRQ-table for CCDs demo board */
@@ -1288,8 +1288,8 @@
X {
X mode_hfcsx(bcs, 0, bcs->channel);
X if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) {
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;
@@ -1492,7 +1492,7 @@
X if ((!cs->hw.hfcsx.base) ||
X check_region((cs->hw.hfcsx.base), 2)) {
X printk(KERN_WARNING
- "HiSax: HFC-SX io-base 0x%x already in use\n",
+ "HiSax: HFC-SX io-base %#lx already in use\n",
X cs->hw.hfcsx.base);
X return(0);
X } else {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfcscard.c linux/drivers/isdn/hisax/hfcscard.c
--- v2.2.19/drivers/isdn/hisax/hfcscard.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/hfcscard.c Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: hfcscard.c,v 1.8 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfcscard.c,v 1.8.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * hfcscard.c low level stuff for hfcs based cards (Teles3c, ACER P10)
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -16,7 +16,7 @@
X
X extern const char *CardType[];
X
-static const char *hfcs_revision = "$Revision: 1.8 $";
+static const char *hfcs_revision = "$Revision: 1.8.6.1 $";
X
X static void
X hfcs_interrupt(int intno, void *dev_id, struct pt_regs *regs)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hisax.h linux/drivers/isdn/hisax/hisax.h
--- v2.2.19/drivers/isdn/hisax/hisax.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/hisax.h Wed Oct 10 01:40:51 2001
@@ -1,8 +1,8 @@
-/* $Id: hisax.h,v 2.52.6.2 2001/02/10 14:41:22 kai Exp $
+/* $Id: hisax.h,v 2.52.6.7 2001/07/18 16:02:15 kai Exp $
X *
X * Basic declarations, defines and prototypes
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #include <linux/config.h>
@@ -125,13 +125,13 @@
X #define l3dss1_process
X #include "l3dss1.h"
X #undef l3dss1_process
-#endif CONFIG_HISAX_EURO
+#endif /* CONFIG_HISAX_EURO */
X
X #ifdef CONFIG_HISAX_NI1
X #define l3ni1_process
X #include "l3ni1.h"
X #undef l3ni1_process
-#endif CONFIG_HISAX_NI1
+#endif /* CONFIG_HISAX_NI1 */
X
X #define MAX_DFRAME_LEN 260
X #define MAX_DFRAME_LEN_L1 300
@@ -317,10 +317,10 @@
X { u_char uuuu; /* only as dummy */
X #ifdef CONFIG_HISAX_EURO
X dss1_stk_priv dss1; /* private dss1 data */
-#endif CONFIG_HISAX_EURO
+#endif /* CONFIG_HISAX_EURO */
X #ifdef CONFIG_HISAX_NI1
X ni1_stk_priv ni1; /* private ni1 data */
-#endif CONFIG_HISAX_NI1
+#endif /* CONFIG_HISAX_NI1 */
X } prot;
X };
X
@@ -341,10 +341,10 @@
X { u_char uuuu; /* only when euro not defined, avoiding empty union */
X #ifdef CONFIG_HISAX_EURO
X dss1_proc_priv dss1; /* private dss1 data */
-#endif CONFIG_HISAX_EURO
+#endif /* CONFIG_HISAX_EURO */
X #ifdef CONFIG_HISAX_NI1
X ni1_proc_priv ni1; /* private ni1 data */
-#endif CONFIG_HISAX_NI1
+#endif /* CONFIG_HISAX_NI1 */
X } prot;
X };
X
@@ -534,7 +534,7 @@
X };
X
X struct elsa_hw {
- unsigned int base;
+ unsigned long base;
X unsigned int cfg;
X unsigned int ctrl;
X unsigned int ale;
@@ -596,9 +596,9 @@
X unsigned long cfg_reg;
X unsigned long pci_cfg;
X unsigned int ctrl;
- unsigned int isac_adr;
+ unsigned long isac_adr;
X unsigned int isac;
- unsigned int hscx_adr;
+ unsigned long hscx_adr;
X unsigned int hscx;
X unsigned int status;
X struct timer_list tl;
@@ -652,7 +652,7 @@
X };
X
X struct njet_hw {
- unsigned int base;
+ unsigned long base;
X unsigned int isac;
X unsigned int auxa;
X unsigned char auxd;
@@ -686,11 +686,12 @@
X unsigned char *pci_io; /* start of PCI IO memory */
X void *share_start; /* shared memory for Fifos start */
X void *fifos; /* FIFO memory */
+ int last_bfifo_cnt[2]; /* marker saving last b-fifo frame count */
X struct timer_list timer;
X };
X
X struct hfcSX_hw {
- unsigned int base;
+ unsigned long base;
X unsigned char cirm;
X unsigned char ctmt;
X unsigned char conn;
@@ -752,15 +753,15 @@
X };
X
X struct bkm_hw {
- unsigned int base;
+ unsigned long base;
X /* A4T stuff */
- unsigned int isac_adr;
+ unsigned long isac_adr;
X unsigned int isac_ale;
- unsigned int jade_adr;
+ unsigned long jade_adr;
X unsigned int jade_ale;
X /* Scitel Quadro stuff */
- unsigned int plx_adr;
- unsigned int data_adr;
+ unsigned long plx_adr;
+ unsigned long data_adr;
X };
X
X struct gazel_hw {
@@ -1273,7 +1274,7 @@
X struct IsdnCard {
X int typ;
X int protocol; /* EDSS1, 1TR6 or NI1 */
- unsigned int para[4];
+ unsigned long para[4];
X struct IsdnCardState *cs;
X };
X
@@ -1302,7 +1303,7 @@
X int getcallref(u_char * p);
X int newcallref(void);
X
-void FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
+int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
X void FsmFree(struct Fsm *fsm);
X int FsmEvent(struct FsmInst *fi, int event, void *arg);
X void FsmChangeState(struct FsmInst *fi, int newstate);
@@ -1323,7 +1324,6 @@
X void LogFrame(struct IsdnCardState *cs, u_char * p, int size);
X void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir);
X void iecpy(u_char * dest, u_char * iestart, int ieoffset);
-int discard_queue(struct sk_buff_head *q);
X #ifdef ISDN_CHIP_ISAC
X void setstack_isac(struct PStack *st, struct IsdnCardState *cs);
X #endif /* ISDN_CHIP_ISAC */
@@ -1333,19 +1333,19 @@
X
X int ll_run(struct IsdnCardState *cs, int addfeatures);
X void ll_stop(struct IsdnCardState *cs);
-void CallcNew(void);
+int CallcNew(void);
X void CallcFree(void);
X int CallcNewChan(struct IsdnCardState *cs);
X void CallcFreeChan(struct IsdnCardState *cs);
-void Isdnl1New(void);
+int Isdnl1New(void);
X void Isdnl1Free(void);
-void Isdnl2New(void);
+int Isdnl2New(void);
X void Isdnl2Free(void);
-void Isdnl3New(void);
+int Isdnl3New(void);
X void Isdnl3Free(void);
X void init_tei(struct IsdnCardState *cs, int protocol);
X void release_tei(struct IsdnCardState *cs);
X char *HiSax_getrev(const char *revision);
-void TeiNew(void);
+int TeiNew(void);
X void TeiFree(void);
X int certification_check(int output);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hscx.c linux/drivers/isdn/hisax/hscx.c
--- v2.2.19/drivers/isdn/hisax/hscx.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/hscx.c Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: hscx.c,v 1.21 2000/11/24 17:05:37 kai Exp $
+/* $Id: hscx.c,v 1.21.6.2 2001/06/09 15:14:17 kai Exp $
X *
X * hscx.c HSCX specific routines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -166,8 +166,8 @@
X kfree(bcs->blog);
X bcs->blog = NULL;
X }
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hscx.h linux/drivers/isdn/hisax/hscx.h
--- v2.2.19/drivers/isdn/hisax/hscx.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/hscx.h Wed Oct 10 01:40:52 2001
@@ -1,10 +1,10 @@
-/* $Id: hscx.h,v 1.6 2000/06/26 08:59:13 keil Exp $
+/* $Id: hscx.h,v 1.6.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * hscx.h HSCX specific defines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hscx_irq.c linux/drivers/isdn/hisax/hscx_irq.c
--- v2.2.19/drivers/isdn/hisax/hscx_irq.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/hscx_irq.c Wed Oct 10 01:40:52 2001
@@ -1,4 +1,4 @@
-/* $Id: hscx_irq.c,v 1.16 2000/11/19 17:02:47 kai Exp $
+/* $Id: hscx_irq.c,v 1.16.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * hscx_irq.c low level b-channel stuff for Siemens HSCX
X *
@@ -6,7 +6,7 @@
X *
X * This is an include file for fast inline IRQ stuff
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/icc.c linux/drivers/isdn/hisax/icc.c
--- v2.2.19/drivers/isdn/hisax/icc.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/icc.c Wed Oct 10 01:40:52 2001
@@ -1,4 +1,4 @@
-// $Id: icc.c,v 1.5 2000/11/24 17:05:37 kai Exp $
+// $Id: icc.c,v 1.5.6.3 2001/06/09 15:14:17 kai Exp $
X //-----------------------------------------------------------------------------
X //
X // ICC specific routines
@@ -7,10 +7,10 @@
X // www.traverse.com.au
X //
X // 1999.6.25 Initial implementation of routines for Siemens ISDN
-// Communication Controler PEB 2070 based on the ISAC routines
+// Communication Controller PEB 2070 based on the ISAC routines
X // written by Karsten Keil.
X //
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
X //
X //-----------------------------------------------------------------------------
X
@@ -551,8 +551,8 @@
X }
X break;
X case (HW_DEACTIVATE | RESPONSE):
- discard_queue(&cs->rq);
- discard_queue(&cs->sq);
+ skb_queue_purge(&cs->rq);
+ skb_queue_purge(&cs->sq);
X if (cs->tx_skb) {
X dev_kfree_skb(cs->tx_skb);
X cs->tx_skb = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/icc.h linux/drivers/isdn/hisax/icc.h
--- v2.2.19/drivers/isdn/hisax/icc.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/icc.h Wed Oct 10 01:40:52 2001
@@ -1,4 +1,4 @@
-// $Id: icc.h,v 1.2 2000/06/26 08:59:13 keil Exp $
+// $Id: icc.h,v 1.2.6.2 2001/03/13 16:17:08 kai Exp $
X //-----------------------------------------------------------------------------
X //
X // ICC specific routines
@@ -7,10 +7,10 @@
X // www.traverse.com.au
X //
X // 1999.7.14 Initial implementation of routines for Siemens ISDN
-// Communication Controler PEB 2070 based on the ISAC routines
+// Communication Controller PEB 2070 based on the ISAC routines
X // written by Karsten Keil.
X //
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
X //
X //-----------------------------------------------------------------------------
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/ipac.h linux/drivers/isdn/hisax/ipac.h
--- v2.2.19/drivers/isdn/hisax/ipac.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/ipac.h Wed Oct 10 01:40:53 2001
@@ -1,10 +1,10 @@
-/* $Id: ipac.h,v 1.5 2000/06/26 08:59:13 keil Exp $
+/* $Id: ipac.h,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * ipac.h IPAC specific defines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isac.c linux/drivers/isdn/hisax/isac.c
--- v2.2.19/drivers/isdn/hisax/isac.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isac.c Wed Oct 10 01:40:53 2001
@@ -1,10 +1,10 @@
-/* $Id: isac.c,v 1.28 2000/11/24 17:05:37 kai Exp $
+/* $Id: isac.c,v 1.28.6.2 2001/06/09 15:14:17 kai Exp $
X *
X * isac.c ISAC specific routines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X */
@@ -445,7 +445,7 @@
X if (cs->debug & L1_DEB_MONITOR)
X debugl1(cs, "ISAC %02x -> MOX1", cs->dc.isac.mon_tx[cs->dc.isac.mon_txp -1]);
X }
- AfterMOX1:
+ AfterMOX1:;
X #endif
X }
X }
@@ -549,8 +549,8 @@
X }
X break;
X case (HW_DEACTIVATE | RESPONSE):
- discard_queue(&cs->rq);
- discard_queue(&cs->sq);
+ skb_queue_purge(&cs->rq);
+ skb_queue_purge(&cs->sq);
X if (cs->tx_skb) {
X dev_kfree_skb(cs->tx_skb);
X cs->tx_skb = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isac.h linux/drivers/isdn/hisax/isac.h
--- v2.2.19/drivers/isdn/hisax/isac.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isac.h Wed Oct 10 01:40:53 2001
@@ -1,10 +1,10 @@
-/* $Id: isac.h,v 1.7 2000/06/26 08:59:13 keil Exp $
+/* $Id: isac.h,v 1.7.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * isac.h ISAC specific defines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isar.c linux/drivers/isdn/hisax/isar.c
--- v2.2.19/drivers/isdn/hisax/isar.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isar.c Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: isar.c,v 1.17 2000/11/24 17:05:37 kai Exp $
+/* $Id: isar.c,v 1.17.6.3 2001/06/09 15:14:17 kai Exp $
X *
X * isar.c ISAR (Siemens PSB 7110) specific routines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -383,12 +383,12 @@
X } else {
X printk(KERN_DEBUG"isar selftest not OK %x/%x/%x\n",
X ireg->cmsb, ireg->clsb, ireg->par[0]);
- ret = 1;goto reterror;
+ ret = 1;goto reterrflg;
X }
X ireg->iis = 0;
X if (!sendmsg(cs, ISAR_HIS_DIAG, ISAR_CTRL_SWVER, 0, NULL)) {
X printk(KERN_ERR"isar RQST SVN failed\n");
- ret = 1;goto reterror;
+ ret = 1;goto reterrflg;
X }
X cnt = 30000; /* max 300 ms */
X while ((ireg->iis != ISAR_IIS_DIAG) && cnt) {
@@ -1650,8 +1650,8 @@
X kfree(bcs->hw.isar.rcvbuf);
X bcs->hw.isar.rcvbuf = NULL;
X }
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isar.h linux/drivers/isdn/hisax/isar.h
--- v2.2.19/drivers/isdn/hisax/isar.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isar.h Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: isar.h,v 1.9 2000/06/26 08:59:13 keil Exp $
+/* $Id: isar.h,v 1.9.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * isar.h ISAR (Siemens PSB 7110) specific defines
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isdnl1.c linux/drivers/isdn/hisax/isdnl1.c
--- v2.2.19/drivers/isdn/hisax/isdnl1.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isdnl1.c Wed Oct 10 01:40:54 2001
@@ -1,11 +1,11 @@
-/* $Id: isdnl1.c,v 2.41.6.1 2000/12/10 22:01:04 kai Exp $
+/* $Id: isdnl1.c,v 2.41.6.3 2001/05/26 15:19:57 kai Exp $
X *
X * isdnl1.c common low level stuff for Siemens Chipsetbased isdn cards
X * based on the teles driver from Jan den Ouden
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *
@@ -15,7 +15,7 @@
X *
X */
X
-const char *l1_revision = "$Revision: 2.41.6.1 $";
+const char *l1_revision = "$Revision: 2.41.6.3 $";
X
X #define __NO_VERSION__
X #include <linux/init.h>
@@ -736,26 +736,41 @@
X
X #define L1B_FN_COUNT (sizeof(L1BFnList)/sizeof(struct FsmNode))
X
-void __init
+int __init
X Isdnl1New(void)
X {
-#ifdef HISAX_UINTERFACE
- l1fsm_u.state_count = L1U_STATE_COUNT;
- l1fsm_u.event_count = L1_EVENT_COUNT;
- l1fsm_u.strEvent = strL1Event;
- l1fsm_u.strState = strL1UState;
- FsmNew(&l1fsm_u, L1UFnList, L1U_FN_COUNT);
-#endif
+ int retval;
+
X l1fsm_s.state_count = L1S_STATE_COUNT;
X l1fsm_s.event_count = L1_EVENT_COUNT;
X l1fsm_s.strEvent = strL1Event;
X l1fsm_s.strState = strL1SState;
- FsmNew(&l1fsm_s, L1SFnList, L1S_FN_COUNT);
+ retval = FsmNew(&l1fsm_s, L1SFnList, L1S_FN_COUNT);
+ if (retval)
+ return retval;
+
X l1fsm_b.state_count = L1B_STATE_COUNT;
X l1fsm_b.event_count = L1_EVENT_COUNT;
X l1fsm_b.strEvent = strL1Event;
X l1fsm_b.strState = strL1BState;
- FsmNew(&l1fsm_b, L1BFnList, L1B_FN_COUNT);
+ retval = FsmNew(&l1fsm_b, L1BFnList, L1B_FN_COUNT);
+ if (retval) {
+ FsmFree(&l1fsm_s);
+ return retval;
+ }
+#ifdef HISAX_UINTERFACE
+ l1fsm_u.state_count = L1U_STATE_COUNT;
+ l1fsm_u.event_count = L1_EVENT_COUNT;
+ l1fsm_u.strEvent = strL1Event;
+ l1fsm_u.strState = strL1UState;
+ retval = FsmNew(&l1fsm_u, L1UFnList, L1U_FN_COUNT);
+ if (retval) {
+ FsmFree(&l1fsm_s);
+ FsmFree(&l1fsm_b);
+ return retval;
+ }
+#endif
+ return 0;
X }
X
X void Isdnl1Free(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isdnl1.h linux/drivers/isdn/hisax/isdnl1.h
--- v2.2.19/drivers/isdn/hisax/isdnl1.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isdnl1.h Wed Oct 10 01:40:54 2001
@@ -1,8 +1,8 @@
-/* $Id: isdnl1.h,v 2.9 2000/06/26 08:59:13 keil Exp $
+/* $Id: isdnl1.h,v 2.9.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * Layer 1 defines
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isdnl2.c linux/drivers/isdn/hisax/isdnl2.c
--- v2.2.19/drivers/isdn/hisax/isdnl2.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isdnl2.c Wed Oct 10 01:40:54 2001
@@ -1,9 +1,9 @@
-/* $Id: isdnl2.c,v 2.25 2000/11/24 17:05:38 kai Exp $
+/* $Id: isdnl2.c,v 2.25.6.3 2001/06/09 15:14:17 kai Exp $
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *
@@ -16,7 +16,7 @@
X #include "hisax.h"
X #include "isdnl2.h"
X
-const char *l2_revision = "$Revision: 2.25 $";
+const char *l2_revision = "$Revision: 2.25.6.3 $";
X
X static void l2m_debug(struct FsmInst *fi, char *fmt, ...);
X
@@ -649,7 +649,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X test_and_set_bit(FLG_L3_INIT, &st->l2.flag);
X test_and_clear_bit(FLG_PEND_REL, &st->l2.flag);
X }
@@ -659,7 +659,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X establishlink(fi);
X test_and_set_bit(FLG_L3_INIT, &st->l2.flag);
X }
@@ -685,7 +685,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X freewin(st);
X FsmChangeState(fi, ST_L2_6);
X st->l2.rc = 0;
@@ -745,7 +745,7 @@
X st->ma.layer(st, MDL_ERROR | INDICATION, (void *) 'F');
X
X if (st->l2.vs != st->l2.va) {
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X est = 1;
X }
X
@@ -778,7 +778,7 @@
X
X send_uframe(st, UA | get_PollFlagFree(st, skb), RSP);
X
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X freewin(st);
X lapb_dl_release_l2l3(st, INDICATION);
X }
@@ -802,7 +802,7 @@
X if (test_and_clear_bit(FLG_L3_INIT, &st->l2.flag)) {
X pr = DL_ESTABLISH | CONFIRM;
X } else if (st->l2.vs != st->l2.va) {
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X pr = DL_ESTABLISH | INDICATION;
X }
X
@@ -860,7 +860,7 @@
X if (get_PollFlagFree(st, skb)) {
X stop_t200(st, 7);
X if (!test_bit(FLG_L3_INIT, &st->l2.flag))
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X if (test_bit(FLG_LAPB, &st->l2.flag))
X st->l2.l2l1(st, PH_DEACTIVATE | REQUEST, NULL);
X st5_dl_release_l2l3(st);
@@ -1156,7 +1156,7 @@
X } else if (st->l2.rc == st->l2.N200) {
X FsmChangeState(fi, ST_L2_4);
X test_and_clear_bit(FLG_T200_RUN, &st->l2.flag);
- discard_queue(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.i_queue);
X st->ma.layer(st, MDL_ERROR | INDICATION, (void *) 'G');
X if (test_bit(FLG_LAPB, &st->l2.flag))
X st->l2.l2l1(st, PH_DEACTIVATE | REQUEST, NULL);
@@ -1388,7 +1388,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X st->l2.tei = -1;
X FsmChangeState(fi, ST_L2_1);
X }
@@ -1398,7 +1398,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X st->l2.tei = -1;
X st->l2.l2l3(st, DL_RELEASE | INDICATION, NULL);
X FsmChangeState(fi, ST_L2_1);
@@ -1409,8 +1409,8 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X freewin(st);
X st->l2.tei = -1;
X stop_t200(st, 17);
@@ -1423,7 +1423,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X st->l2.tei = -1;
X stop_t200(st, 18);
X st->l2.l2l3(st, DL_RELEASE | CONFIRM, NULL);
@@ -1435,8 +1435,8 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X freewin(st);
X st->l2.tei = -1;
X stop_t200(st, 17);
@@ -1450,8 +1450,8 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X if (test_and_clear_bit(FLG_ESTAB_PEND, &st->l2.flag))
X st->l2.l2l3(st, DL_RELEASE | INDICATION, NULL);
X }
@@ -1461,8 +1461,8 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X freewin(st);
X stop_t200(st, 19);
X st5_dl_release_l2l3(st);
@@ -1474,7 +1474,7 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X stop_t200(st, 20);
X st->l2.l2l3(st, DL_RELEASE | CONFIRM, NULL);
X FsmChangeState(fi, ST_L2_4);
@@ -1485,8 +1485,8 @@
X {
X struct PStack *st = fi->userdata;
X
- discard_queue(&st->l2.i_queue);
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X freewin(st);
X stop_t200(st, 19);
X FsmDelTimer(&st->l2.t203, 19);
@@ -1761,8 +1761,8 @@
X {
X FsmDelTimer(&st->l2.t200, 21);
X FsmDelTimer(&st->l2.t203, 16);
- discard_queue(&st->l2.i_queue);
- discard_queue(&st->l2.ui_queue);
+ skb_queue_purge(&st->l2.i_queue);
+ skb_queue_purge(&st->l2.ui_queue);
X ReleaseWin(&st->l2);
X }
X
@@ -1831,14 +1831,14 @@
X {
X }
X
-void __init
+int __init
X Isdnl2New(void)
X {
X l2fsm.state_count = L2_STATE_COUNT;
X l2fsm.event_count = L2_EVENT_COUNT;
X l2fsm.strEvent = strL2Event;
X l2fsm.strState = strL2State;
- FsmNew(&l2fsm, L2FnList, L2_FN_COUNT);
+ return FsmNew(&l2fsm, L2FnList, L2_FN_COUNT);
X }
X
X void
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isdnl2.h linux/drivers/isdn/hisax/isdnl2.h
--- v2.2.19/drivers/isdn/hisax/isdnl2.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isdnl2.h Wed Oct 10 01:40:54 2001
@@ -1,8 +1,8 @@
-/* $Id: isdnl2.h,v 1.3 2000/06/26 08:59:13 keil Exp $
+/* $Id: isdnl2.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * Layer 2 defines
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isdnl3.c linux/drivers/isdn/hisax/isdnl3.c
--- v2.2.19/drivers/isdn/hisax/isdnl3.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isdnl3.c Wed Oct 10 01:40:54 2001
@@ -1,9 +1,9 @@
-/* $Id: isdnl3.c,v 2.17.6.1 2001/01/08 17:09:20 kai Exp $
+/* $Id: isdnl3.c,v 2.17.6.4 2001/06/09 15:14:17 kai Exp $
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *
@@ -18,7 +18,7 @@
X #include "isdnl3.h"
X #include <linux/config.h>
X
-const char *l3_revision = "$Revision: 2.17.6.1 $";
+const char *l3_revision = "$Revision: 2.17.6.4 $";
X
X static struct Fsm l3fsm;
X
@@ -404,7 +404,7 @@
X st->l3.global = NULL;
X }
X FsmDelTimer(&st->l3.l3m_timer, 54);
- discard_queue(&st->l3.squeue);
+ skb_queue_purge(&st->l3.squeue);
X }
X
X void
@@ -520,7 +520,7 @@
X
X FsmDelTimer(&st->l3.l3m_timer, 52);
X FsmChangeState(fi, ST_L3_LC_REL);
- discard_queue(&st->l3.squeue);
+ skb_queue_purge(&st->l3.squeue);
X l3ml3p(st, DL_RELEASE | INDICATION);
X }
X
@@ -530,7 +530,7 @@
X struct PStack *st = fi->userdata;
X
X FsmChangeState(fi, ST_L3_LC_REL);
- discard_queue(&st->l3.squeue);
+ skb_queue_purge(&st->l3.squeue);
X l3ml3p(st, DL_RELEASE | CONFIRM);
X }
X
@@ -591,14 +591,14 @@
X }
X }
X
-void __init
+int __init
X Isdnl3New(void)
X {
X l3fsm.state_count = L3_STATE_COUNT;
X l3fsm.event_count = L3_EVENT_COUNT;
X l3fsm.strEvent = strL3Event;
X l3fsm.strState = strL3State;
- FsmNew(&l3fsm, L3FnList, L3_FN_COUNT);
+ return FsmNew(&l3fsm, L3FnList, L3_FN_COUNT);
X }
X
X void
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isdnl3.h linux/drivers/isdn/hisax/isdnl3.h
--- v2.2.19/drivers/isdn/hisax/isdnl3.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isdnl3.h Wed Oct 10 01:40:54 2001
@@ -1,6 +1,6 @@
-/* $Id: isdnl3.h,v 2.6 2000/06/26 08:59:13 keil Exp $
+/* $Id: isdnl3.h,v 2.6.6.1 2001/02/16 16:43:27 kai Exp $
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/isurf.c linux/drivers/isdn/hisax/isurf.c
--- v2.2.19/drivers/isdn/hisax/isurf.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/isurf.c Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: isurf.c,v 1.10 2000/11/24 17:05:38 kai Exp $
+/* $Id: isurf.c,v 1.10.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * isurf.c low level stuff for Siemens I-Surf/I-Talk cards
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -17,7 +17,7 @@
X
X extern const char *CardType[];
X
-static const char *ISurf_revision = "$Revision: 1.10 $";
+static const char *ISurf_revision = "$Revision: 1.10.6.1 $";
X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/ix1_micro.c linux/drivers/isdn/hisax/ix1_micro.c
--- v2.2.19/drivers/isdn/hisax/ix1_micro.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/ix1_micro.c Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-/* $Id: ix1_micro.c,v 2.10 2000/11/24 17:05:38 kai Exp $
+/* $Id: ix1_micro.c,v 2.10.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * ix1_micro.c low level stuff for ITK ix1-micro Rev.2 isdn cards
X * derived from the original file teles3.c from Karsten Keil
@@ -14,7 +14,7 @@
X
X /*
X For the modification done by the author the following terms and conditions
- apply (GNU PUBLIC LICENSE)
+ apply (GNU General Public License)
X
X
X This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@
X #include "isdnl1.h"
X
X extern const char *CardType[];
-const char *ix1_revision = "$Revision: 2.10 $";
+const char *ix1_revision = "$Revision: 2.10.6.1 $";
X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/jade.c linux/drivers/isdn/hisax/jade.c
--- v2.2.19/drivers/isdn/hisax/jade.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/jade.c Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: jade.c,v 1.6 2000/11/24 17:05:38 kai Exp $
+/* $Id: jade.c,v 1.6.6.2 2001/06/09 15:14:18 kai Exp $
X *
X * jade.c JADE stuff (derived from original hscx.c)
X *
X * Author Roland Klabunde (R.Kla...@Berkom.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -209,8 +209,8 @@
X kfree(bcs->blog);
X bcs->blog = NULL;
X }
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/jade.h linux/drivers/isdn/hisax/jade.h
--- v2.2.19/drivers/isdn/hisax/jade.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/jade.h Wed Oct 10 01:40:54 2001
@@ -1,9 +1,9 @@
-/* $Id: jade.h,v 1.3 2000/06/26 08:59:14 keil Exp $
+/* $Id: jade.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
X * jade.h JADE specific defines
X *
X * Author Roland Klabunde (R.Kla...@Berkom.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/jade_irq.c linux/drivers/isdn/hisax/jade_irq.c
--- v2.2.19/drivers/isdn/hisax/jade_irq.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/jade_irq.c Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: jade_irq.c,v 1.5 2000/11/19 17:02:48 kai Exp $
+/* $Id: jade_irq.c,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * jade_irq.c Low level JADE IRQ stuff (derived from original hscx_irq.c)
X *
X * Author Roland Klabunde (R.Kla...@Berkom.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/l3_1tr6.c linux/drivers/isdn/hisax/l3_1tr6.c
--- v2.2.19/drivers/isdn/hisax/l3_1tr6.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/l3_1tr6.c Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: l3_1tr6.c,v 2.13 2000/11/19 17:02:48 kai Exp $
+/* $Id: l3_1tr6.c,v 2.13.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * German 1TR6 D-channel protocol
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *
@@ -17,7 +17,7 @@
X #include <linux/ctype.h>
X
X extern char *HiSax_getrev(const char *revision);
-const char *l3_1tr6_revision = "$Revision: 2.13 $";
+const char *l3_1tr6_revision = "$Revision: 2.13.6.1 $";
X
X #define MsgHead(ptr, cref, mty, dis) \
X *ptr++ = dis; \
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/l3_1tr6.h linux/drivers/isdn/hisax/l3_1tr6.h
--- v2.2.19/drivers/isdn/hisax/l3_1tr6.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/l3_1tr6.h Wed Oct 10 01:40:54 2001
@@ -1,8 +1,8 @@
-/* $Id: l3_1tr6.h,v 2.2 2000/06/26 08:59:14 keil Exp $
+/* $Id: l3_1tr6.h,v 2.2.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * German 1TR6 D-channel protocol defines
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #ifndef l3_1tr6
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/l3dss1.c linux/drivers/isdn/hisax/l3dss1.c
--- v2.2.19/drivers/isdn/hisax/l3dss1.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/l3dss1.c Wed Oct 10 01:40:54 2001
@@ -1,11 +1,11 @@
-/* $Id: l3dss1.c,v 2.30 2000/11/19 17:02:48 kai Exp $
+/* $Id: l3dss1.c,v 2.30.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * EURO/DSS1 D-channel protocol
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *
@@ -22,7 +22,7 @@
X #include <linux/config.h>
X
X extern char *HiSax_getrev(const char *revision);
-const char *dss1_revision = "$Revision: 2.30 $";
+const char *dss1_revision = "$Revision: 2.30.6.1 $";
X
X #define EXT_BEARER_CAPS 1
X
@@ -426,9 +426,9 @@
X #undef FOO1
X
X }
-#else not HISAX_DE_AOC
+#else /* not HISAX_DE_AOC */
X l3_debug(st, "invoke break");
-#endif not HISAX_DE_AOC
+#endif /* not HISAX_DE_AOC */
X break;
X case 2: /* return result */
X /* if no process available handle separately */
@@ -438,12 +438,12 @@
X return;
X }
X if ((pc->prot.dss1.invoke_id) && (pc->prot.dss1.invoke_id == id))
- { /* Diversion successfull */
+ { /* Diversion successful */
X free_invoke_id(st,pc->prot.dss1.invoke_id);
X pc->prot.dss1.remote_result = 0; /* success */
X pc->prot.dss1.invoke_id = 0;
X pc->redir_result = pc->prot.dss1.remote_result;
- st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */
+ st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */
X else
X l3_debug(st,"return error unknown identifier");
X break;
@@ -2112,7 +2112,7 @@
X MsgHead(p, pc->callref, MT_FACILITY);
X
X for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */
- if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */
+ if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */
X
X *p++ = 0x1c; /* Facility info element */
X *p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */
@@ -2138,7 +2138,7 @@
X *p++ = pc->chan->setup.phone[l];
X
X if (len_sub)
- { *p++ = 0x04; /* called party subadress */
+ { *p++ = 0x04; /* called party subaddress */
X *p++ = len_sub - 2;
X while (*subp) *p++ = *subp++;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/l3dss1.h linux/drivers/isdn/hisax/l3dss1.h
--- v2.2.19/drivers/isdn/hisax/l3dss1.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/l3dss1.h Wed Oct 10 01:40:54 2001
@@ -1,8 +1,8 @@
-/* $Id: l3dss1.h,v 1.10 2000/06/26 08:59:14 keil Exp $
+/* $Id: l3dss1.h,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
X *
X * DSS1 (Euro) D-channel protocol defines
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/l3ni1.c linux/drivers/isdn/hisax/l3ni1.c
--- v2.2.19/drivers/isdn/hisax/l3ni1.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/l3ni1.c Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-// $Id: l3ni1.c,v 2.5.6.1 2000/12/06 16:59:19 kai Exp $
+// $Id: l3ni1.c,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $
X //
X //-----------------------------------------------------------------------------
X //
@@ -16,7 +16,7 @@
X // Will Scales - beta tester extraordinaire
X // Brett Whittacre - beta tester and remote devel system in Vegas
X //
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
X //
X //-----------------------------------------------------------------------------
X #define __NO_VERSION__
@@ -26,7 +26,7 @@
X #include <linux/ctype.h>
X
X extern char *HiSax_getrev(const char *revision);
-const char *ni1_revision = "$Revision: 2.5.6.1 $";
+const char *ni1_revision = "$Revision: 2.5.6.2 $";
X
X #define EXT_BEARER_CAPS 1
X
@@ -372,12 +372,12 @@
X return;
X }
X if ((pc->prot.ni1.invoke_id) && (pc->prot.ni1.invoke_id == id))
- { /* Diversion successfull */
+ { /* Diversion successful */
X free_invoke_id(st,pc->prot.ni1.invoke_id);
X pc->prot.ni1.remote_result = 0; /* success */
X pc->prot.ni1.invoke_id = 0;
X pc->redir_result = pc->prot.ni1.remote_result;
- st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */
+ st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */
X else
X l3_debug(st,"return error unknown identifier");
X break;
@@ -1973,7 +1973,7 @@
X MsgHead(p, pc->callref, MT_FACILITY);
X
X for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */
- if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */
+ if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */
X
X *p++ = 0x1c; /* Facility info element */
X *p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */
@@ -1999,7 +1999,7 @@
X *p++ = pc->chan->setup.phone[l];
X
X if (len_sub)
- { *p++ = 0x04; /* called party subadress */
+ { *p++ = 0x04; /* called party subaddress */
X *p++ = len_sub - 2;
X while (*subp) *p++ = *subp++;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/l3ni1.h linux/drivers/isdn/hisax/l3ni1.h
--- v2.2.19/drivers/isdn/hisax/l3ni1.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/l3ni1.h Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-// $Id: l3ni1.h,v 2.3 2000/11/16 13:50:43 keil Exp $
+// $Id: l3ni1.h,v 2.3.6.1 2001/02/16 16:43:28 kai Exp $
X //-----------------------------------------------------------------------------
X //
X // NI1 D-channel protocol
@@ -12,7 +12,7 @@
X // code provided by Ragnar Paulson.
X //
X //
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
X //
X //-----------------------------------------------------------------------------
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/lmgr.c linux/drivers/isdn/hisax/lmgr.c
--- v2.2.19/drivers/isdn/hisax/lmgr.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/lmgr.c Wed Oct 10 01:40:54 2001
@@ -1,10 +1,10 @@
-/* $Id: lmgr.c,v 1.7 2000/06/26 08:59:14 keil Exp $
+/* $Id: lmgr.c,v 1.7.6.1 2001/02/16 16:43:28 kai Exp $
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
X * Layermanagement module
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/md5sums.asc linux/drivers/isdn/hisax/md5sums.asc
--- v2.2.19/drivers/isdn/hisax/md5sums.asc Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/md5sums.asc Wed Oct 10 01:40:54 2001
@@ -1,33 +1,22 @@
------BEGIN PGP SIGNED MESSAGE-----
-
X # This are valid md5sums for certificated HiSax driver.
X # The certification is valid only if the md5sums of all files match.
X # The certification is valid only for ELSA Microlink PCI,
-# Eicon Technology Diva 2.01 PCI and Sedlbauer SpeedFax +
-# cards in the moment.
+# Eicon Technology Diva 2.01 PCI, Sedlbauer SpeedFax+,
+# HFC-S PCI A based cards and HFC-S USB based isdn tas
+# in the moment.
X # Read ../../../Documentation/isdn/HiSax.cert for more informations.
X #
-4131693d878d465faf0a4a4b4c6b811e isac.c
-a29f5270c0c89626d8d6fa5dd09e7005 isdnl1.c
-fbe41751c8130a8c3c607bfe1b41cb4e isdnl2.c
-7915b7e802b98f6f4f05b931c4736ad4 isdnl3.c
-7c31c12b3c2cfde33596bd2c406f775c tei.c
-f1fbd532016f005e01decf36e5197d8f callc.c
-a1834e9b2ec068440cff2e899eff4710 cert.c
-a1f908f8b4f225c5c2f2a13842549b72 l3dss1.c
-3d0a3f88fe48f3151813fafb22ea6119 l3_1tr6.c
-6f3420dca0f50084f82471a238545a95 elsa.c
-65da7b33bbfa454df2f99636b83f0610 diva.c
-4bdb7e35627b7e25f17fccb669fda835 sedlbauer.c
+7414b33c6086a3127ce415bd4cba747c isac.c
+13c3eed869f5139f44c563e3a8fea1f5 isdnl1.c
+addcff863b0ff1e366c0f2ae9fa6e81e isdnl2.c
+7076deb94a363945c21ea27aca4a720a isdnl3.c
+51c603829b6cc4f8421f744ad657ceff tei.c
+669050ab5079f02887ed0239d86e5474 callc.c
+ecacd146b8f8881ef9349935dab3df4a cert.c
+fadeb3b85bb23bc1ac48470c0848d6fa l3dss1.c
+cf7dec9fac6283716904d26b99188476 l3_1tr6.c
+f0578fac40d39b525c11a4166ac52790 elsa.c
+66705dadc4d4f98a4bcfffb564267442 diva.c
+bcb6d0855c40c5fc59f0a2539d524eb9 sedlbauer.c
+65ca8b6c32073a2ec11ed485d17e485d hfc_pci.c
X # end of md5sums
-
------BEGIN PGP SIGNATURE-----
-Version: 2.6.3i
-Charset: noconv
-
-iQCVAwUBOVctcDpxHvX/mS9tAQFOhAP+OpOSxDz46cEHjy4jLsYz44/yKZzFAXz4
-s0tYmixrFbbS5XoT1GZqzEF0n/EycO9jsp6d0eanDCg25UX7ehu9dtOJw0o6qRr2
-4M/EbloHK2G1aW4gI8W2eWRNRqTZQJ2cjPJD/V/27jDbxBBP31NvOSYvVxrbBzJG
-qZHWUDiQxRo=
-=mYrg
------END PGP SIGNATURE-----
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/mic.c linux/drivers/isdn/hisax/mic.c
--- v2.2.19/drivers/isdn/hisax/mic.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/mic.c Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-/* $Id: mic.c,v 1.10 2000/11/24 17:05:38 kai Exp $
+/* $Id: mic.c,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
X *
X * mic.c low level stuff for mic cards
X *
@@ -6,7 +6,7 @@
X *
X * Author Stephan von Krawczynski <sk...@ithnet.com>
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -19,7 +19,7 @@
X
X extern const char *CardType[];
X
-const char *mic_revision = "$Revision: 1.10 $";
+const char *mic_revision = "$Revision: 1.10.6.1 $";
X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/netjet.c linux/drivers/isdn/hisax/netjet.c
--- v2.2.19/drivers/isdn/hisax/netjet.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/netjet.c Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-/* $Id: netjet.c,v 1.24.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: netjet.c,v 1.24.6.5 2001/06/09 15:14:18 kai Exp $
X *
X * netjet.c low level stuff for Traverse Technologie NETJet ISDN cards
X *
@@ -6,7 +6,7 @@
X *
X * Thanks to Traverse Technologie Australia for documents and informations
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -16,12 +16,13 @@
X #include "isac.h"
X #include "hscx.h"
X #include "isdnl1.h"
+#include <linux/pci.h>
X #include <linux/interrupt.h>
X #include <linux/ppp_defs.h>
X #include <asm/io.h>
X #include "netjet.h"
X
-const char *NETjet_revision = "$Revision: 1.24.6.3 $";
+const char *NETjet_revision = "$Revision: 1.24.6.5 $";
X
X /* Interface functions */
X
@@ -879,8 +880,8 @@
X kfree(bcs->hw.tiger.sendbuf);
X bcs->hw.tiger.sendbuf = NULL;
X }
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/netjet.h linux/drivers/isdn/hisax/netjet.h
--- v2.2.19/drivers/isdn/hisax/netjet.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/netjet.h Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-// $Id: netjet.h,v 2.5.6.1 2000/11/28 12:02:46 kai Exp $
+// $Id: netjet.h,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $
X //-----------------------------------------------------------------------------
X //
X // NETjet common header file
@@ -6,7 +6,7 @@
X // Author Kerstern Keil repackaged by
X // Matt Henderson - Traverse Technologies P/L www.traverse.com.au
X //
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
X //
X //-----------------------------------------------------------------------------
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/niccy.c linux/drivers/isdn/hisax/niccy.c
--- v2.2.19/drivers/isdn/hisax/niccy.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/niccy.c Wed Oct 10 01:40:54 2001
@@ -1,4 +1,4 @@
-/* $Id: niccy.c,v 1.15.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: niccy.c,v 1.15.6.4 2001/02/16 16:43:28 kai Exp $
X *
X * niccy.c low level stuff for Dr. Neuhaus NICCY PnP and NICCY PCI and
X * compatible (SAGEM cybermodem)
@@ -7,7 +7,7 @@
X *
X * Thanks to Dr. Neuhaus and SAGEM for informations
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -23,7 +23,7 @@
X #include <linux/isdn_compat.h>
X
X extern const char *CardType[];
-const char *niccy_revision = "$Revision: 1.15.6.3 $";
+const char *niccy_revision = "$Revision: 1.15.6.4 $";
X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/nj_s.c linux/drivers/isdn/hisax/nj_s.c
--- v2.2.19/drivers/isdn/hisax/nj_s.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/nj_s.c Wed Oct 10 01:40:54 2001
@@ -1,6 +1,6 @@
-// $Id: nj_s.c,v 2.7.6.3 2001/02/13 10:33:58 kai Exp $
+// $Id: nj_s.c,v 2.7.6.5 2001/07/18 16:25:12 kai Exp $
X //
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
X //
X
X #define __NO_VERSION__
@@ -15,7 +15,7 @@
X #include <linux/ppp_defs.h>
X #include "netjet.h"
X
-const char *NETjet_S_revision = "$Revision: 2.7.6.3 $";
+const char *NETjet_S_revision = "$Revision: 2.7.6.5 $";
X
X static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
X {
@@ -241,11 +241,11 @@
X bytecnt = 256;
X
X printk(KERN_INFO
- "NETjet-S: PCI card configured at 0x%x IRQ %d\n",
+ "NETjet-S: PCI card configured at %#lx IRQ %d\n",
X cs->hw.njet.base, cs->irq);
X if (check_region(cs->hw.njet.base, bytecnt)) {
X printk(KERN_WARNING
- "HiSax: %s config port %x-%x already in use\n",
+ "HiSax: %s config port %#lx-%#lx already in use\n",
X CardType[card->typ],
X cs->hw.njet.base,
X cs->hw.njet.base + bytecnt);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/nj_u.c linux/drivers/isdn/hisax/nj_u.c
--- v2.2.19/drivers/isdn/hisax/nj_u.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/nj_u.c Wed Oct 10 01:40:54 2001
@@ -1,6 +1,6 @@
-/* $Id: nj_u.c,v 2.8.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: nj_u.c,v 2.8.6.5 2001/07/18 16:25:12 kai Exp $
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -16,7 +16,7 @@
X #include <linux/ppp_defs.h>
X #include "netjet.h"
X
-const char *NETjet_U_revision = "$Revision: 2.8.6.3 $";
+const char *NETjet_U_revision = "$Revision: 2.8.6.5 $";
X
X static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
X {
@@ -245,11 +245,11 @@
X bytecnt = 256;
X
X printk(KERN_INFO
- "NETspider-U: PCI card configured at 0x%x IRQ %d\n",
+ "NETspider-U: PCI card configured at %#lx IRQ %d\n",
X cs->hw.njet.base, cs->irq);
X if (check_region(cs->hw.njet.base, bytecnt)) {
X printk(KERN_WARNING
- "HiSax: %s config port %x-%x already in use\n",
+ "HiSax: %s config port %#lx-%#lx already in use\n",
X CardType[card->typ],
X cs->hw.njet.base,
X cs->hw.njet.base + bytecnt);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/q931.c linux/drivers/isdn/hisax/q931.c
--- v2.2.19/drivers/isdn/hisax/q931.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/q931.c Wed Oct 10 01:40:55 2001
@@ -1,10 +1,10 @@
-/* $Id: q931.c,v 1.10 2000/06/26 08:59:14 keil Exp $
+/* $Id: q931.c,v 1.10.6.2 2001/03/13 16:17:08 kai Exp $
X *
X * q931.c code to decode ITU Q.931 call control messages
X *
X * Author Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X * Changelog
X *
@@ -1228,7 +1228,7 @@
X finish = 1;
X }
X } else if (sapi == TEI_SAPI) {
- dp += sprintf(dp, "tei managment\n");
+ dp += sprintf(dp, "tei management\n");
X finish = 1;
X } else {
X dp += sprintf(dp, "unknown sapi %d broadcast\n", sapi);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/rawhdlc.c linux/drivers/isdn/hisax/rawhdlc.c
--- v2.2.19/drivers/isdn/hisax/rawhdlc.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/rawhdlc.c Wed Oct 10 01:40:55 2001
@@ -1,11 +1,11 @@
-/* $Id: rawhdlc.c,v 1.5 2000/06/26 08:59:14 keil Exp $
+/* $Id: rawhdlc.c,v 1.5.6.1 2001/02/16 16:43:28 kai Exp $
X *
X * rawhdlc.c support routines for cards that don't support HDLC
X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X * Brent Baccala <bac...@FreeSoft.org>
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X * Some passive ISDN cards, such as the Traverse NETJet and the AMD 7930,
X * don't perform HDLC encapsulation over the B channel. Drivers for
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/rawhdlc.h linux/drivers/isdn/hisax/rawhdlc.h
--- v2.2.19/drivers/isdn/hisax/rawhdlc.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/rawhdlc.h Wed Oct 10 01:40:55 2001
@@ -1,10 +1,10 @@
-/* $Id: rawhdlc.h,v 1.3 2000/06/26 08:59:14 keil Exp $
+/* $Id: rawhdlc.h,v 1.3.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * rawhdlc.h support routines for cards that don't support HDLC
X *
X * Author Brent Baccala <bac...@FreeSoft.org>
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/s0box.c linux/drivers/isdn/hisax/s0box.c
--- v2.2.19/drivers/isdn/hisax/s0box.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/s0box.c Wed Oct 10 01:40:55 2001
@@ -1,10 +1,10 @@
-/* $Id: s0box.c,v 2.4 2000/11/24 17:05:38 kai Exp $
+/* $Id: s0box.c,v 2.4.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * s0box.c low level stuff for Creatix S0BOX
X *
X * Author S0BOX specific stuff: Enrik Berkhan (en...@starfleet.inka.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #define __NO_VERSION__
@@ -15,7 +15,7 @@
X #include "isdnl1.h"
X
X extern const char *CardType[];
-const char *s0box_revision = "$Revision: 2.4 $";
+const char *s0box_revision = "$Revision: 2.4.6.1 $";
X
X static inline void
X writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/saphir.c linux/drivers/isdn/hisax/saphir.c
--- v2.2.19/drivers/isdn/hisax/saphir.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/saphir.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: saphir.c,v 1.8 2000/11/24 17:05:38 kai Exp $
+/* $Id: saphir.c,v 1.8.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * saphir.c low level stuff for HST Saphir 1
X *
@@ -6,7 +6,7 @@
X *
X * Thanks to HST High Soft Tech GmbH
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -19,7 +19,7 @@
X #include "isdnl1.h"
X
X extern const char *CardType[];
-static char *saphir_rev = "$Revision: 1.8 $";
+static char *saphir_rev = "$Revision: 1.8.6.1 $";
X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/sedlbauer.c linux/drivers/isdn/hisax/sedlbauer.c
--- v2.2.19/drivers/isdn/hisax/sedlbauer.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/sedlbauer.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: sedlbauer.c,v 1.25.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: sedlbauer.c,v 1.25.6.5 2001/07/13 09:20:12 kai Exp $
X *
X * sedlbauer.c low level stuff for Sedlbauer cards
X * includes support for the Sedlbauer speed star (speed star II),
@@ -16,7 +16,7 @@
X * Sedlbauer AG for informations
X * Edgar Toernig
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -30,11 +30,11 @@
X * Speed Win2 IPAC ISAPNP
X * ISDN PC/104 IPAC DIP-SWITCH
X * Speed Star2 IPAC CARDMGR
- * Speed PCI IPAC PCI PNP
+ * Speed PCI IPAC PCI PNP
X * Speed Fax+ ISAC_ISAR PCI PNP Full analog support
X *
X * Important:
- * For the sedlbauer speed fax+ to work properly you have to download
+ * For the sedlbauer speed fax+ to work properly you have to download
X * the firmware onto the card.
X * For example: hisaxctrl <DriverID> 9 ISAR.BIN
X */
@@ -53,10 +53,10 @@
X
X extern const char *CardType[];
X
-const char *Sedlbauer_revision = "$Revision: 1.25.6.3 $";
+const char *Sedlbauer_revision = "$Revision: 1.25.6.5 $";
X
X const char *Sedlbauer_Types[] =
- {"None", "speed card/win", "speed star", "speed fax+",
+ {"None", "speed card/win", "speed star", "speed fax+",
X "speed win II / ISDN PC/104", "speed star II", "speed pci",
X "speed fax+ pyramid", "speed fax+ pci"};
X
@@ -64,7 +64,7 @@
X #define PCI_SUBVENDOR_SEDLBAUER_PCI 0x53
X #define PCI_SUBVENDOR_SPEEDFAX_PCI 0x54
X #define PCI_SUB_ID_SEDLBAUER 0x01
-
+
X #define SEDL_SPEED_CARD_WIN 1
X #define SEDL_SPEED_STAR 2
X #define SEDL_SPEED_FAX 3
@@ -232,7 +232,7 @@
X * mode = 1 access with IRQ off
X * mode = 2 access with IRQ off and using last offset
X */
-
+
X static u_char
X ReadISAR(struct IsdnCardState *cs, int mode, u_char offset)
X {
@@ -288,7 +288,7 @@
X causing us to just crash the kernel. bad. */
X printk(KERN_WARNING "Sedlbauer: card not available!\n");
X return;
- }
+ }
X
X val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40);
X Start_HSCX:
@@ -633,9 +633,10 @@
X #endif /* CONFIG_PCI */
X }
X
- /* In case of the sedlbauer pcmcia card, this region is in use,
- reserved for us by the card manager. So we do not check it
- here, it would fail. */
+ /* In case of the sedlbauer pcmcia card, this region is in use,
+ * reserved for us by the card manager. So we do not check it
+ * here, it would fail.
+ */
X if (cs->hw.sedl.bus != SEDL_BUS_PCMCIA &&
X check_region((cs->hw.sedl.cfg_reg), bytecnt)) {
X printk(KERN_WARNING
@@ -660,22 +661,23 @@
X cs->cardmsg = &Sedl_card_msg;
X
X /*
- * testing ISA and PCMCIA Cards for IPAC, default is ISAC
+ * testing ISA and PCMCIA Cards for IPAC, default is ISAC
X * do not test for PCI card, because ports are different
X * and PCI card uses only IPAC (for the moment)
X */
X if (cs->hw.sedl.bus != SEDL_BUS_PCI) {
X val = readreg(cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR,
- cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC, IPAC_ID);
- if (val == 1) {
- /* IPAC */
- cs->subtyp = SEDL_SPEED_WIN2_PC104;
+ cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC, IPAC_ID);
+ printk(KERN_DEBUG "Sedlbauer: testing IPAC version %x\n", val);
+ if ((val == 1) || (val == 2)) {
+ /* IPAC */
+ cs->subtyp = SEDL_SPEED_WIN2_PC104;
X if (cs->hw.sedl.bus == SEDL_BUS_PCMCIA) {
X cs->subtyp = SEDL_SPEED_STAR2;
X }
X cs->hw.sedl.chip = SEDL_CHIP_IPAC;
X } else {
- /* ISAC_HSCX oder ISAC_ISAR */
+ /* ISAC_HSCX oder ISAC_ISAR */
X if (cs->hw.sedl.chip == SEDL_CHIP_TEST) {
X cs->hw.sedl.chip = SEDL_CHIP_ISAC_HSCX;
X }
@@ -692,25 +694,25 @@
X if (cs->hw.sedl.chip == SEDL_CHIP_IPAC) {
X if (cs->hw.sedl.bus == SEDL_BUS_PCI) {
X cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_ADR;
- cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
- cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 18'
echo 'File patch-2.2.20 is continued in part 19'
echo "19" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:00 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part01

#!/bin/sh -x
# This is a shell archive
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
# existing files will NOT be overwritten unless -c is specified
#
# This is part 01 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
#

if test -r _shar_seq_.tmp; then
echo "Must unpack archives in sequence!"
echo "Please unpack part `cat _shar_seq_.tmp` next"
exit 1
fi
# ============= patch-2.2.20 ==============
if test -f 'patch-2.2.20' -a X"$1" != X"-c"; then
echo 'x - skipping patch-2.2.20 (File already exists)'
rm -f _shar_wnt_.tmp;
else
> _shar_wnt_.tmp;
echo 'x - extracting patch-2.2.20 (Text)'


sed 's/^X//' << 'SHAR_EOF' > 'patch-2.2.20' &&

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/CREDITS linux/CREDITS
--- v2.2.19/CREDITS Sun Mar 25 17:37:29 2001
+++ linux/CREDITS Mon Oct 22 10:45:22 2001
@@ -420,6 +420,12 @@
X S: Las Heras, Mendoza CP 5539
X S: Argentina
X
+N: Steven P. Cole
+E: sc...@lanl.gov
+E: elen...@mesatop.com
+D: Configure.help and ver_linux additions/fixes.
+S: Los Alamos, New Mexico
+
X N: Hamish Coleman
X E: ham...@zot.apana.org.au
X D: SEEQ8005 network driver
@@ -703,6 +709,15 @@
X S: San Jose, California 95131
X S: USA
X
+N: Fernando Fuganti
+E: fug...@conectiva.com.br
+E: fug...@netbank.com.br
+D: random kernel hacker, ZF MachZ Watchdog driver
+S: Conectiva S.A.
+S: R. Tocantins, 89 - Cristo Rei
+S: 80050-430 - Curitiba - Paraná
+S: Brazil
+
X N: Kumar Gala
X E: kumar...@motorola.com
X D: AltiVec PowerPC support
@@ -1051,16 +1066,16 @@
X
X N: Dave Jones
X E: da...@suse.de
-E: da...@powertweak.com
-E: djo...@glam.ac.uk
-W: http://powertweak.sourceforge.net
-D: Userspace PCI bridge tuning (Powertweak).
-D: Centaur/IDT Winchip/Winchip 2 tweaks.
-D: Misc clean ups and other random hacking.
-S: 28 Laura Street,
-S: Treforest, Pontypridd,
-S: Mid Glamorgan, CF37 1NW,
-S: Wales, United Kingdom
+W: http://www.suse.de/~davej
+D: Moved PCI bridge tuning to userspace (Powertweak).
+D: Various x86 (& clones) setup code hacking.
+D: Various Janitorial hacks. (kernel-janitor.sourceforge.net)
+S: c/o SuSE Linux UK Ltd
+S: The Kinetic Centre
+S: Theobald Street
+S: Borehamwood
+S: Herts, WD6 4PJ
+S: United Kingdom
X
X N: Bernhard Kaindl
X E: bka...@netway.at
@@ -1833,14 +1848,15 @@
X S: France
X
X N: Rik van Riel
-E: ri...@nl.linux.org
-W: http://www.nl.linux.org/~riel/
+E: ri...@conectiva.com.br
+W: http://www.surriel.com/
X D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround
X D: clustering contributor, kswapd fixes, random kernel hacker,
-D: nl.linux.org maintainer, minor scheduler additions
-S: IJsselstraat 23a
-S: 9725 GA Groningen
-S: The Netherlands
+D: nl.linux.org administrator, minor scheduler additions
+S: Conectiva S.A.
+S: R. Tocantins, 89 - Cristo Rei
+S: 80050-430 - Curitiba - Paraná
+S: Brazil
X
X N: William E. Roadcap
X E: road...@cfw.com
@@ -2063,14 +2079,13 @@
X S: USA
X
X N: Henrik Storner
-E: sto...@image.dk
-W: http://www.image.dk/~storner/
+E: hen...@storner.dk
X W: http://www.sslug.dk/
X D: Configure script: Invented tristate for module-configuration
X D: vfat/msdos integration, kerneld docs, Linux promotion
X D: Miscellaneous bug-fixes
-S: Chr. Winthersvej 1 B, st.th.
-S: DK-1860 Frederiksberg C
+S: Raunstrupvej 13
+S: DK-2720 Vanloese
X S: Denmark
X
X N: Drew Sullivan
@@ -2299,7 +2314,7 @@
X S: The Netherlands
X
X N: Tim Waugh
-E: t...@cyberelk.demon.co.uk
+E: t...@cyberelk.net
X D: Co-architect of the parallel-port sharing system
X S: 17 Curling Vale
X S: GUILDFORD
@@ -2398,8 +2413,8 @@
X E: jwo...@physics.adelaide.edu.au
X W: http://www.physics.adelaide.edu.au/~jwoithe
X D: ALS-007 sound card extensions to Sound Blaster driver
-S: 4/36 Trevelyan St
-S: Wayville SA 5034
+S: 20 Jordan St
+S: Valley View, SA 5093
X S: Australia
X
X N: Clifford Wolf
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.2.19/Documentation/Configure.help Sun Mar 25 17:37:29 2001
+++ linux/Documentation/Configure.help Wed Oct 10 01:40:42 2001
@@ -758,6 +758,45 @@
X say M here and read Documentation/modules.txt. The module will be
X called DAC960.o.
X
+3ware Hardware ATA-RAID support
+CONFIG_BLK_DEV_3W_XXXX_RAID
+ 3ware is the only hardware ATA-Raid product in Linux to date.
+ This card is 2,4, or 8 channel master mode support only.
+ SCSI support required!!!
+
+ <http://www.3ware.com/>
+
+ Please read the comments at the top of drivers/scsi/3w-xxxx.c
+
+RapIDE interface support
+CONFIG_BLK_DEV_IDE_RAPIDE
+ Say Y here if you want to support the Yellowstone RapIDE controller
+ manufactured for use with Acorn computers.
+
+WarpEngine SCSI support
+CONFIG_WARPENGINE_SCSI
+ Support for MacroSystem Development's WarpEngine Amiga SCSI-2 controller.
+ Info at <http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>.
+
+Builtin PowerMac IDE support
+CONFIG_BLK_DEV_IDE_PMAC
+ This driver provides support for the built-in IDE controller on most
+ of the recent Apple Power Macintoshes and PowerBooks.
+ If unsure, say Y.
+
+PowerMac IDE DMA support
+CONFIG_BLK_DEV_IDEDMA_PMAC
+ This option allows the driver for the built-in IDE controller on
+ Power Macintoshes and PowerBooks to use DMA (direct memory access)
+ to transfer data to and from memory. Saying Y is safe and improves
+ performance.
+
+ICS IDE interface support
+CONFIG_BLK_DEV_IDE_ICSIDE
+ On Acorn systems, say Y here if you wish to use the ICS IDE
+ interface card. This is not required for ICS partition support.
+ If you are unsure, say N to this.
+
X Parallel port IDE device support
X CONFIG_PARIDE
X There are many external CD-ROM and disk devices that connect through
@@ -1123,6 +1162,34 @@
X board uses the R4300 and a R5230 CPUs. For more information about
X this board see http://www.algor.co.uk.
X
+Support for BAGET MIPS series
+CONFIG_BAGET_MIPS
+ This enables support for the Baget, a Russian embedded system. For
+ more details about the Baget see the Linux/MIPS FAQ on
+ <http://oss.sgi.com/mips>.
+
+Baget AMD LANCE support
+CONFIG_BAGETLANCE
+ Say Y to enable kernel support for AMD Lance Ethernet cards on the
+ MIPS-32-based Baget embedded system. This chipset is better known
+ via the NE2100 cards.
+
+Support for DECstations
+CONFIG_DECSTATION
+ This enables support for DEC's MIPS based workstations. For details
+ see the Linux/MIPS FAQ on <http://oss.sgi.com/mips> and the
+ DECstation porting pages on <http://decstation.unix-ag.org>.
+
+ If you have one of the following DECstation Models you definitely
+ want to choose R4xx0 for the CPU Type:
+
+ DECstation 5000/50
+ DECstation 5000/150
+ DECstation 5000/260
+ DECsystem 5900/260
+
+ otherwise choose R3000.
+
X IDE card support
X CONFIG_BLK_DEV_IDE_CARDS
X On Acorn systems, enable this if you wish to use an IDE interface
@@ -1157,6 +1224,44 @@
X http://lena.fnet.fr/ (To browse the WWW, you need to have access to
X a machine on the Internet that has a program like lynx or netscape).
X
+Support for SNI RM200 PCI
+CONFIG_SNI_RM200_PCI
+ The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens
+ Nixdorf Informationssysteme (SNI), parent company of Pyramid Technology
+ and now in turn merged with Fujitsu. Say Y here to support this machine
+ type.
+
+MIPS JAZZ onboard SONIC Ethernet support
+CONFIG_MIPS_JAZZ_SONIC
+ This is the driver for the onboard card of MIPS Magnum 4000,
+ Acer PICA, Olivetti M700-10 and a few other identical OEM systems.
+
+MIPS JAZZ FAS216 SCSI support
+CONFIG_JAZZ_ESP
+ This is the driver for the onboard SCSI host adapter of MIPS Magnum
+ 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
+ systems.
+
+SGI PROM Console Support
+CONFIG_SGI_PROM_CONSOLE
+ Say Y here to set up the boot console on serial port 0.
+
+DZ11 Serial Support
+CONFIG_DZ
+ DZ11-family serial controllers for VAXstations, including the DC7085,
+ M7814, and M7819.
+
+TURBOchannel support
+CONFIG_TC
+ TurboChannel is a DEC (now Compaq) bus for Alpha and MIPS processors.
+ Documentation on writing device drivers for TurboChannel is available at:
+ <http://www.cs.arizona.edu/computer.help/policy/DIGITAL_unix/AA-PS3HD-TET1_html/TITLE.html>.
+
+Z85C30 Serial Support
+CONFIG_ZS
+ Documentation on the Zilog 85C350 serial communications controller is
+ downloadable at <http://www.zilog.com/pdfs/serial/z85c30.pdf>.
+
X CPU type
X CONFIG_CPU_R3000
X Give the type of your machine's MIPS CPU. For this question, it
@@ -1164,6 +1269,55 @@
X In case of doubt select the R3000 CPU. The kernel will then run on
X other MIPS machines but with slightly reduced performance.
X
+ R3000 MIPS Technologies R3000-series processors,
+ including the 3041, 3051, and 3081.
+
+ R6000 MIPS Technologies R6000-series processors,
+ including the 64474, 64475, 64574 and 64575.
+
+ R4300 MIPS Technologies R4300-series processors.
+
+ R4x00 MIPS Technologies R4000-series processors other than 4300,
+ including the 4640, 4650, and 4700.
+
+ R5000 MIPS Technologies R5000-series processors other than the Nevada.
+
+ R52xx MIPS Technologies R52x0-series ("Nevada") processors.
+
+ R8000 MIPS Technologies R8000-series processors.
+
+ R10000 MIPS Technologies R10000-series processors.
+
+R6000
+CONFIG_CPU_R6000
+ MIPS Technologies R6000-series processors, including the 64474,
+ 64475, 64574 and 64575.
+
+R4300
+CONFIG_CPU_R4300
+ MIPS Technologies R4300-series processors.
+
+R4x00
+CONFIG_CPU_R4X00
+ MIPS Technologies R4000-series processors other than 4300, including
+ the 4640, 4650, and 4700.
+
+R5000
+CONFIG_CPU_R5000
+ MIPS Technologies R5000-series processors other than the Nevada.
+
+R52xx
+CONFIG_CPU_NEVADA
+ MIPS Technologies R52x0-series ("Nevada") processors.
+
+R8000
+CONFIG_CPU_R8000
+ MIPS Technologies R8000-series processors.
+
+R10000
+CONFIG_CPU_R10000
+ MIPS Technologies R10000-series processors.
+
X Compile the kernel into the ECOFF object format
X CONFIG_ECOFF_KERNEL
X Some machines require a kernel in the ECOFF format. You will have to
@@ -1176,6 +1330,12 @@
X byte order. These modes require different kernels. Say Y if your
X machine is little endian, N if it's a big endian machine.
X
+Use power LED as a heartbeat
+CONFIG_HEARTBEAT
+ Use the power-on LED on your machine as a load meter. The exact
+ behavior is platform-dependent, but normally the flash frequency is a
+ hyperbolic function of the 5-minute load average.
+
X Kernel support for IRIX binaries
X CONFIG_BINFMT_IRIX
X If you say Y here, the kernel will support running of IRIX binaries.
@@ -1323,6 +1483,136 @@
X
X If you don't know what to do, choose "generic".
X
+# Most of the information on these variants is from
+# http://www.alphalinux.org/docs/alpha-howto.html
+Alcor/Alpha-XLT
+CONFIG_ALPHA_ALCOR
+ For systems using the Digital ALCOR chipset: 5 chips (4, 64-bit data slices
+ (Data Switch, DSW) - 208-pin PQFP and 1 control (Control, I/O Address, CIA)
+ - a 383 pin plastic PGA). It provides a DRAM controller (256-bit memory
+ bus) and a PCI interface. It also does all the work required to support an
+ external Bcache and to maintain memory coherence when a PCI device DMAs
+ into (or out of) memory.
+
+Alpha-XL
+CONFIG_ALPHA_XL
+ XL-233 and XL-266-based Alpha systems.
+
+AlphaBook1
+CONFIG_ALPHA_BOOK1
+ Dec AlphaBook1/Burns Alpha-based laptops.
+
+Avanti
+CONFIG_ALPHA_AVANTI
+ Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based Alphas.
+ Info at <http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
+
+Cabriolet
+CONFIG_ALPHA_CABRIOLET
+ Cabriolet AlphaPC64, AlphaPCI64 systems. Derived from EB64+ but now
+ baby-AT with Flash boot ROM, no on-board SCSI or Ethernet. 3 ISA slots,
+ 4 PCI slots (one pair are on a shared slot), uses plug-in Bcache SIMMs.
+ Requires power supply with 3.3V output.
+
+DP264
+CONFIG_ALPHA_DP264
+ Hard Data HD-DP264-based Alpha systems. There is a Hard Data website at
+ <http://www.harddata.com/alpha/>.
+
+EB164
+CONFIG_ALPHA_EB164
+ EB164 21164 evaluation board from DEC. Uses 21164 and ALCOR. Has ISA and
+ PCI expansion (3 ISA slots, 2 64-bit PCI slots (one is shared with an ISA
+ slot) and 2 32-bit PCI slots. Uses plus-in Bcache SIMMs. I/O sub-system
+ provides SuperI/O (2S, 1P, FD), KBD, MOUSE (PS2 style), RTC/NVRAM. Boot
+ ROM is Flash. PC-AT-sized motherboard. Requires power supply with 3.3V
+ output.
+
+EB64+
+CONFIG_ALPHA_EB64P
+ Uses 21064 or 21064A and APECs. Has ISA and PCI expansion (3 ISA, 2 PCI,
+ one pair are on a shared slot). Supports 36-bit DRAM SIMs. ISA bus
+ generated by Intel SaturnI/O PCI-ISA bridge. On-board SCSI (NCR 810 on
+ PCI) Ethernet (Digital 21040), KBD, MOUSE (PS2 style), SuperI/O (2S,
+ 1P, FD), RTC/NVRAM. Boot ROM is EPROM. PC-AT size. Runs from standard
+ PC power supply.
+
+EB66
+CONFIG_ALPHA_EB66
+ A Digital DS group board. Uses 21066 or 21066A. I/O sub-system is identical
+ to EB64+. Baby PC-AT size. Runs from standard PC power supply. The EB66
+ schematic was published as a marketing poster advertising the 21066 as "the
+ first microprocessor in the world with embedded PCI"
+
+EB66+
+CONFIG_ALPHA_EB66P
+ Later variant of the EB66 board.
+
+Eiger
+CONFIG_ALPHA_EIGER
+ Apparently an obscure OEM single-board computer based on the
+ Typhoon/Tsunami chipset family. Information on it is scanty.
+
+Jensen
+CONFIG_ALPHA_JENSEN
+ DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one
+ of the first-generation Alpha systems. A number of these systems
+ seem to be available on the second- hand market. The Jensen is a
+ floor-standing tower system which originally used a 150MHz 21064 It
+ used programmable logic to interface a 486 EISA I/O bridge to the
+ CPU.
+
+LX164
+CONFIG_ALPHA_LX164
+ A technical overview of this board is available at
+ <http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>.
+
+Miata
+CONFIG_ALPHA_MIATA
+ The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a,
+ or 600au). There is an Installation HOWTO for this hardware at
+ <http://members.brabant.chello.nl/~s.vandereijk/miata.html>.
+
+Mikasa
+CONFIG_ALPHA_MIKASA
+ AlphaServer 1000-based Alpha systems.
+
+Nautilus
+CONFIG_ALPHA_NAUTILUS
+ Alpha systems based on the AMD 751 & ALI 1543C chipsets.
+
+Noname
+CONFIG_ALPHA_NONAME
+ The AXPpci33 (aka NoName), is based on the EB66 (includes the Multia
+ UDB). This design was produced by Digital's Technical OEM (TOEM)
+ group. It uses the 21066 processor running at 166MHz or 233MHz. It
+ is a baby-AT size, and runs from a standard PC power supply. It has
+ 5 ISA slots and 3 PCI slots (one pair are a shared slot). There are
+ 2 versions, with either PS/2 or large DIN connectors for the
+ keyboard.
+
+Noritake
+CONFIG_ALPHA_NORITAKE
+ AlphaServer 1000A, AlphaServer 600A, and AlphaServer 800-based systems.
+
+Rawhide
+CONFIG_ALPHA_RAWHIDE
+ AlphaServer 1200, AlphaServer 4000 and AlphaServer 4100 machines.
+ See HOWTO at <http://www.alphalinux.org/docs/rawhide/4100_install.shtml>.
+
+Ruffian
+CONFIG_ALPHA_RUFFIAN
+ Samsung APC164UX. There is a page on known problems and workarounds
+ at <http://www.alphalinux.org/faq/FAQ-11.html>.
+
+Sable
+CONFIG_ALPHA_SABLE
+ Digital AlphaServer 2000 and 2100-based systems.
+
+Takara
+CONFIG_ALPHA_TAKARA
+ Alpha 11164-based OEM single-board computer.
+
X EV5 CPU daughtercard
X CONFIG_ALPHA_PRIMO
X Say Y if you have an AS 1000 5/xxx or an AS 1000A 5/xxx.
@@ -1426,6 +1716,27 @@
X If you want to use your SGI's built-in serial ports under Linux,
X answer Y.
X
+SGI Newport Graphics support
+CONFIG_SGI_NEWPORT_GFX
+ If you have an SGI machine and you want to compile the graphics
+ drivers, say Y here. This will include the code for the
+ /dev/graphics and /dev/gfx drivers into the kernel for supporting
+ virtualized access to your graphics hardware.
+
+SGI Newport Console support
+CONFIG_SGI_NEWPORT_CONSOLE
+ Say Y here if you want the console on the Newport aka XL graphics
+ card of your Indy. Most people say Y here.
+
+SGI DS1286 RTC support
+CONFIG_SGI_DS1286
+ If you say Y here and create a character special file /dev/rtc with
+ major number 10 and minor number 135 using mknod ("man mknod"), you
+ will get access to the real time clock built into your computer.
+ Every SGI has such a clock built in. It reports status information
+ via the file /proc/rtc and its behaviour is set by various ioctls on
+ /dev/rtc.
+
X SGI graphics support
X CONFIG_SGI_GRAPHICS
X If you have an SGI machine and you want to compile the graphics
@@ -1744,6 +2055,15 @@
X The module will be called solaris.o. If you want to compile it as a
X module, say M here and read Documentation/modules.txt.
X
+SUN SME environment monitoring
+CONFIG_ENVCTRL
+ Kernel support for temperature and fan monitoring on Sun SME machines.
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called envctrl.o. If you want to compile it as a
+ module, say M here and read <file:Documentation/modules.txt>.
+
X Processor family
X CONFIG_M386
X This is the processor type of your CPU. This information is used for
@@ -1757,20 +2077,47 @@
X a i486).
X
X Here are the settings recommended for greatest speed:
- - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
- 486DLC/DLC2 and UMC 486SX-S. Only "386" kernels will run on a 386
- class machine.
- - "486" for the AMD/Cyrix/IBM/Intel DX4 or 486DX/DX2/SL/SX/SX2,
- AMD/Cyrix 5x86, NexGen Nx586 and UMC U5D or U5S.
- - "586" for generic Pentium CPUs, possibly lacking the TSC
- (time stamp counter) register.
- - "Pentium" for the Intel Pentium/Pentium MMX, AMD K5, K6 and
- K6-3D, as well as the Cyrix/VIA CyrixIII
- - "PPro" for the Cyrix/IBM/National Semiconductor 6x86MX, MII and
- Intel Pentium II/Pentium Pro.
+
+ "386" Select this for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX,
+ Cyrix/TI, 486DLC/DLC2 and UMC 486SX-S. Only "386" kernels
+ will run on a 386 class machine.
+
+ "486/Cx486" Select this for a x486 processor, ether Intel or one
+ of the compatible processors from AMD, Cyrix, IBM, or Intel.
+ Includes DX, DX2, and DX4 variants.
+ Also SL/SLC/SLC2/SLC3/SX/SX2, NexGen Nx586 and UMC U5D or U5S.
+
+ "586/K5/5x86/6x86" Select this for an x586 or x686 processor such
+ as the AMD K5, the Intel 5x86 or 6x86, or the Intel 6x86MX.
+ This choice does not assume the RDTSC (time stamp counter)
+ instruction.
+
+ "Pentium/K6/TSC/CyrixIII" Select this for a Pentium Classic,
+ Pentium MMX, AMD K5, K5 and K6-3D, as well as the Cyrix/VIA,
+ CyrixIII with the RDTSC (Read Time Stamp Counter) instruction.
+
+ "PPro/6X86MX" Select this for the Cyrix/IBM/National Semiconductor
+ 6x86MX/MII and Intel Pentium II/Pentium Pro.
X
X If you don't know what to do, choose "386".
X
+486
+CONFIG_M486
+ Select this for a x486 processor, ether Intel or one of the compatible
+ processors from AMD, Cyrix, IBM, or Intel. Includes DX, DX2, and DX4
+ variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
+
+586/K5/5x86/6x86/6x86MX
+CONFIG_M586
+ Select this for an x586 or x686 processor such as the AMD K5, the Intel
+ 5x86 or 6x86, or the Intel 6x86MX. This choice does not assume the
+ RDTSC instruction.
+
+Pentium Classic
+CONFIG_M586TSC
+ Select this for a Pentium Classic processor with the RDTSC (Read Time Stamp
+ Counter) instruction for benchmarking.
+
X VGA text console
X CONFIG_VGA_CONSOLE
X Saying Y here will allow you to use Linux in text mode through a
@@ -1836,6 +2183,26 @@
X This is the frame buffer device driver for the Acorn VIDC graphics
X chipset.
X
+Permedia2 support
+CONFIG_FB_PM2
+ This is the frame buffer device driver for the Permedia2 AGP frame buffer
+ card from ASK, aka `Graphic Blaster Exxtreme'. There is a product page
+ at <http://www.ask.com.hk/product/Permedia%202/permedia2.htm>.
+
+Enable FIFO disconnect feature
+CONFIG_FB_PM2_FIFO_DISCONNECT
+ Support the Permedia2 FIFOI disconnect feature (see CONFIG_FB_PM2).
+
+Generic Permedia2 PCI board support
+CONFIG_FB_PM2_PCI
+ Say Y to enable support for Permedia2 AGP frame buffer card from 3Dlabs
+ (aka `Graphic Blaster Exxtreme') on the PCI bus.
+
+Phase5 CVisionPPC/BVisionPPC support
+CONFIG_FB_PM2_CVPPC
+ Say Y to enable support for the Amiga Phase 5 CVisionPPC BVisionPPC
+ framebuffer cards. Phase 5 is no longer with us, alas.
+
X Apollo frame buffer device
X CONFIG_FB_APOLLO
X This is the frame buffer device driver for the monochrome graphics
@@ -1875,6 +2242,13 @@
X kernel. Please note that this driver DOES NOT support the
X Cybervision 64 3D card, as they use incompatible video chips.
X
+CyberPro 20x0 support
+CONFIG_FB_CYBER2000
+ This enables support for the Integraphics CyberPro 20x0 and 5000
+ VGA chips used in the Rebel.com Netwinder and other machines.
+ Say Y if you have a NetWinder or a graphics card containing this
+ device, otherwise say N.
+
X Amiga CyberVision3D support (EXPERIMENTAL)
X CONFIG_FB_VIRGE
X This enables support for the Cybervision 64/3D graphics card from
@@ -1914,6 +2288,11 @@
X This is the frame buffer device driver for the builtin graphics
X chipset found in Ataris.
X
+Amiga FrameMaster II/Rainbow II support
+CONFIG_FB_FM2
+ This is the frame buffer device driver for the Amiga FrameMaster
+ card from BSC (exhibited 1992 but not shipped as a CBM product).
+
X Open Firmware frame buffer device support
X CONFIG_FB_OF
X Say Y if you want support with Open Firmware for your graphics
@@ -1986,11 +2365,79 @@
X You will get a boot time penguin logo at no additional cost. Please
X read Documentation/fb/vesafb.txt. If unsure, say Y.
X
+VGA 16-color planar support
+CONFIG_FBCON_VGA_PLANES
+ This low level frame buffer console driver enable the kernel to use
+ the 16-color planar modes of the old VGA cards where the bits of
+ each pixel are separated into 4 planes.
+
+ Only answer Y here if you have a (very old) VGA card that isn't VESA
+ 2 compatible.
+
X VGA 16-color graphics console
X CONFIG_FB_VGA16
X This is the frame buffer device driver for VGA 16 color graphic
X cards. Say Y if you have such a card.
X
+Select other compiled-in fonts
+CONFIG_FBCON_FONTS
+ Say Y here if you would like to use fonts other than the default
+ your frame buffer console usually use.
+
+ Note that the answer to this question won't directly affect the
+ kernel: saying N will just cause the configurator to skip all
+ the questions about foreign fonts.
+
+ If unsure, say N (the default choices are safe).
+
+VGA 8x16 font
+CONFIG_FONT_8x16
+ This is the "high resolution" font for the VGA frame buffer (the one
+ provided by the VGA text console 80x25 mode.
+
+ If unsure, say Y.
+
+Support only 8 pixels wide fonts
+CONFIG_FBCON_FONTWIDTH8_ONLY
+ Answer Y here will make the kernel provide only the 8x8 fonts (these
+ are the less readable).
+
+ If unsure, say N.
+
+Sparc console 8x16 font
+CONFIG_FONT_SUN8x16
+ This is the high resolution console font for Sun machines. Say Y.
+
+Sparc console 12x22 font (not supported by all drivers)
+CONFIG_FONT_SUN12x22
+ This is the high resolution console font for Sun machines with very
+ big letters (like the letters used in the SPARC PROM). If the
+ standard font is unreadable for you, say Y, otherwise say N.
+
+VGA 8x8 font
+CONFIG_FONT_8x8
+ This is the "high resolution" font for the VGA frame buffer (the one
+ provided by the text console 80x50 (and higher) modes).
+
+ Note that this is a poor quality font. The VGA 8x16 font is quite a
+ lot more readable.
+
+ Given the resolution provided by the frame buffer device, answer N
+ here is safe.
+
+Mac console 6x11 font (not supported by all drivers)
+CONFIG_FONT_6x11
+ Small console font with Macintosh-style high-half glyphs. Some Mac
+ framebuffer drivers don't support this one at all.
+
+Pearl (old m68k) console 8x8 font
+CONFIG_FONT_PEARL_8x8
+ Small console font with PC-style control-character and high-half glyphs.
+
+Acorn console 8x8 font
+CONFIG_FONT_ACORN_8x8
+ Small console font with PC-style control characters and high-half glyphs.
+
X Backward compatibility mode for Xpmac
X CONFIG_FB_COMPAT_XPMAC
X If you use the Xpmac X server (common with mklinux), you'll need to
@@ -2092,11 +2539,31 @@
X CONFIG_FB_CGTHREE
X This is the frame buffer device driver for the CGthree frame buffer.
X
+CGfourteen (SX) support
+CONFIG_FB_CGFOURTEEN
+ This is the frame buffer device driver for the CGfourteen frame buffer
+ on Desktop SPARCsystems with the SX graphics option.
+
+Leo (ZX) support
+CONFIG_FB_LEO
+ This is the frame buffer device driver for the SBUS-based Sun ZX (leo)
+ frame buffer cards.
+
+IGA 168x display support
+CONFIG_FB_IGA
+ This is the framebuffer device for the INTERGRAPHICS 1680 and
+ successor frame buffer cards.
+
X TCX (SS4/SS5 only) support
X CONFIG_FB_TCX
X This is the frame buffer device driver for the TCX 24/8bit frame
X buffer.
X
+IMS Twin Turbo display support
+CONFIG_FB_IMSTT
+ The IMS Twin Turbo is a PCI-based frame buffer card bundled with many
+ Macintosh and compatible computers.
+
X Virtual Frame Buffer support (ONLY FOR TESTING!)
X CONFIG_FB_VIRTUAL
X This is a `virtual' frame buffer device. It operates on a chunk of
@@ -3397,12 +3864,12 @@
X working properly; please read Documentation/networking/z8530drv.txt
X for details. If unsure, say N.
X
-#support for TRX that feedback the tx signal to rx
-#CONFIG_SCC_TRXECHO
-###
-### Don't know what's going on here.
-###
-#
+Support for TRX that feedback the tx signal to rx
+CONFIG_SCC_TRXECHO
+ Some transmitters feed the transmitted signal back to the receive line.
+ Say Y here to foil this by explicitly disabling the receiver during
+ data transmission. If in doubt, say Y.
+
X YAM driver for AX.25
X CONFIG_YAM
X Support for the YAM modem on serial port. If you want to compile this
@@ -3688,32 +4155,38 @@
X
X Kernel/User network link driver
X CONFIG_NETLINK
- This driver allows for two-way communication between certain parts
- of the kernel or modules and user processes; the user processes are
- able to read from and write to character special files in the /dev
- directory having major mode 36. So far, the kernel uses it to
- publish some network related information if you say Y to "Routing
- messages", below. It is also used by the firewall code to publish
- information about possible attacks if you say Y to "IP: firewall
- packet netlink device" further down. You also need to say Y here if
- you want to use arpd, a daemon that helps keep the internal ARP
- cache (a mapping between IP addresses and hardware addresses on the
- local network) small. The ethertap device, which lets user space
- programs read and write raw Ethernet frames, also needs the network
- link driver. If unsure, say Y.
+ This driver allows for two-way communication between the kernel and
+ user processes. It does so by creating a new socket family, PF_NETLINK.
+ Over this socket, the kernel can send and receive datagrams carrying
+ information. It is documented on many systems in netlink(7), a HOWTO is
+ provided as well, for example on
+ http://snafu.freedom.org/linux2.2/docs/netlink-HOWTO.html
+
+ So far, the kernel uses this feature to publish some network related
+ information if you say Y to "Routing messages", below. You also need
+ to say Y here if you want to use arpd, a daemon that helps keep the
+ internal ARP cache (a mapping between IP addresses and hardware
+ addresses on the local network) small. The ethertap device, which
+ lets user space programs read and write raw Ethernet frames, also
+ needs the network link driver.
+
+ If unsure, say Y.
X
X Routing messages
X CONFIG_RTNETLINK
- If you say Y here and create a character special file /dev/route
- with major number 36 and minor number 0 using mknod ("man mknod"),
- you (or some user space utility) can read some network related
- routing information from that file. Everything you write to that
- file will be discarded.
+ If you say Y here, user space programs can receive some network
+ related routing information over the netlink. 'rtmon', supplied
+ with the iproute2 package (ftp://ftp.inr.ac.ru), can read and
+ interpret this data. Information sent to the kernel over this link
+ is ignored.
X
X Netlink device emulation
X CONFIG_NETLINK_DEV
+ This option will be removed soon. Any programs that want to use
+ character special nodes like /dev/tap0 or /dev/route (all with major
+ number 36) need this option, and need to be rewritten soon to use
+ the real netlink socket.
X This is a backward compatibility option, choose Y for now.
- This option will be removed soon.
X
X SCSI support?
X CONFIG_SCSI
@@ -3870,6 +4343,17 @@
X there should be no noticeable performance impact as long as you have
X logging turned off.
X
+SGI WD93C93 SCSI Driver
+CONFIG_SCSI_SGIWD93
+ Say Y here to support the on-board WD93C93 SCSI controller found (a) on
+ the Indigo2 and other MIPS-based SGI machines, and (b) on ARCS ARM-based
+ machines.
+
+DEC NCR53C94 SCSI Driver
+CONFIG_SCSI_DECNCR
+ Say Y here to support the NCR53C94 SCSI controller chips on IOASIC
+ based TURBOchannel DECstations and TURBOchannel PMAZ-A cards.
+
X AdvanSys SCSI support
X CONFIG_SCSI_ADVANSYS
X This is a driver for all SCSI host adapters manufactured by
@@ -4959,10 +5443,35 @@
X Optic ports, each of which can be connected to a disk array. Only
X the SBus incarnation of the adapter is supported at the moment.
X
+Sun SOC+ (aka SOCAL)
+CONFIG_FC4_SOCAL
+ Serial Optical Channel Plus is an interface card with up to two
+ Fibre Optic ports. This card supports FC Arbitrated Loop (usually
+ A5000 or internal FC disks in E[3-6]000 machines through the
+ Interface Board). You'll probably need the microcode from the
+ Solaris driver to make it work.
+
+ This support is also available as a module called socal.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
X SparcSTORAGE Array 100 and 200 series
X CONFIG_SCSI_PLUTO
X If you never bought a disk array made by Sun, go with N.
X
+Sun Enterprise Network Array (A5000 and EX500)
+CONFIG_SCSI_FCAL
+ This driver drives FC-AL disks connected through a Fibre Channel
+ card using the drivers/fc4 layer (currently only SOCAL). The most
+ common is either A5000 array or internal disks in E[3-6]000
+ machines.
+
+ This support is also available as a module called fcal.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>. If unsure, say N.
+
X AcornSCSI support
X CONFIG_SCSI_ACORNSCSI_3
X This enables support for the Acorn SCSI card (aka30). If you have an
@@ -4985,6 +5494,16 @@
X In general, this improves performance; however some SCSI devices
X don't implement it properly, so the safe answer is N.
X
+ARXE SCSI support
+CONFIG_SCSI_ARXESCSI
+ Around 1991, Arxe Systems Limited released a high density floppy
+ disc interface for the Acorn Archimedes range, to allow the use of
+ HD discs from the then new A5000 on earlier models. This interface
+ was either sold on its own or with an integral SCSI controller.
+ Technical details on this NCR53c94-based device are available at
+ <http://www.cryton.demon.co.uk/acornbits/scsi_arxe.html>
+ Say Y here to compile in support for the SCSI controller.
+
X Oak SCSI support
X CONFIG_SCSI_OAK1
X This enables support for the Oak SCSI card. If you have an Acorn
@@ -5068,6 +5587,26 @@
X time, you need to compile this driver as a module. Instead of
X 'dummy', the devices will then be called 'dummy0', 'dummy1' etc.
X
+Bonding driver support
+CONFIG_BONDING
+ Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
+ Channels together. This is called 'Etherchannel' by Cisco,
+ 'Trunking' by Sun, and 'Bonding' in Linux.
+
+ If you have two Ethernet connections to some other computer, you can
+ make them behave like one double speed connection using this driver.
+ Naturally, this has to be supported at the other end as well, either
+ with a similar Bonding Linux driver, a Cisco 5500 switch or a
+ SunTrunking SunSoft driver.
+
+ This is similar to the EQL driver, but it merges Ethernet segments
+ instead of serial lines.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module will be
+ called bonding.o.
+
X SLIP (serial line) support
X CONFIG_SLIP
X Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
@@ -5663,27 +6202,70 @@
X scheduled to be sent out over a network device be classified in some
X way. If you say Y here, you will get a choice of several different
X packet classifiers with the following questions.
-#
-# Routing tables based classifier
-# CONFIG_NET_CLS_ROUTE
-#
-# Firewall based classifier
-# CONFIG_NET_CLS_FW
-#
-# U32 classifier
-# CONFIG_NET_CLS_U32
-#
-# Special RSVP classifier
-# CONFIG_NET_CLS_RSVP
-#
-# Special RSVP classifier for IPv6
-# CONFIG_NET_CLS_RSVP6
-#
-# Ingres traffic policing
-# CONFIG_NET_CLS_POLICE
-###
-### Some expert please fill these in
-###
+
+Traffic policing (needed for in/egress)
+CONFIG_NET_CLS_POLICE
+ Say Y to support traffic policing (bandwidth limits). Needed for ingress
+ and egress rate limiting.
+
+Routing tables based classifier
+CONFIG_NET_CLS_ROUTE4
+ If you say Y here, you will be able to classify outgoing packets
+ according to the route table entry they matched. If unsure, say Y.
+
+ This code is also available as a module called cls_route.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
+Firewall based classifier
+CONFIG_NET_CLS_FW
+ If you say Y here, you will be able to classify outgoing packets
+ according to firewall criteria you specified.
+
+ This code is also available as a module called cls_fw.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
+U32 classifier
+CONFIG_NET_CLS_U32
+ If you say Y here, you will be able to classify outgoing packets
+ according to their destination address. If unsure, say Y.
+
+ This code is also available as a module called cls_u32.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>
+
+Special RSVP classifier
+CONFIG_NET_CLS_RSVP
+ The Resource Reservation Protocol (RSVP) permits end systems to
+ request a minimum and maximum data flow rate for a connection; this
+ is important for real time data such as streaming sound or video.
+
+ Say Y here if you want to be able to classify outgoing packets based
+ on their RSVP requests.
+
+ This code is also available as a module called cls_rsvp.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>
+
+Special RSVP classifier for IPv6
+CONFIG_NET_CLS_RSVP6
+ The Resource Reservation Protocol (RSVP) permits end systems to
+ request a minimum and maximum data flow rate for a connection; this
+ is important for real time data such as streaming sound or video.
+
+ Say Y here if you want to be able to classify outgoing packets based
+ on their RSVP requests and you are using the new Internet Protocol
+ IPv6 as opposed to the older and more common IPv4.
+
+ This code is also available as a module called cls_rsvp6.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>
X
X Network code profiler
X CONFIG_NET_PROFILE
@@ -5746,6 +6328,26 @@
X The module will be called lmc.o. For general information about
X modules read Documentation/modules.txt.
X
+Fibre Channel driver support
+CONFIG_NET_FC
+ Fibre Channel is a high speed serial protocol mainly used to connect
+ large storage devices to the computer; it is compatible with and
+ intended to replace SCSI.
+
+ If you intend to use Fibre Channel, you need to have a Fibre channel
+ adaptor card in your computer; say Y here and to the driver for your
+ adaptor below. You also should have said Y to "SCSI support" and
+ "SCSI generic support".
+
+Interphase 5526 Tachyon chipset based adaptor support
+CONFIG_IPHASE5526
+ Say Y here if you have a Fibre Channel adaptor of this kind.
+
+ The driver is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called iph5526.o. For general information about
+ modules read <file:Documentation/modules.txt>.
+
X Red Creek Hardware VPN (EXPERIMENTAL)
X CONFIG_RCPCI
X This is a driver for hardware which provides a Virtual Private
@@ -6224,21 +6826,20 @@
X say M here and read Documentation/modules.txt. This is recommended.
X The module will be called rtl8139.o.
X
-Alternative RealTek 8139 driver (8139too) support
+Alternative RealTek 8129/8139 driver (8139too) support
X CONFIG_RTL8139TOO
- This is a sophisticated, multi platform driver for RealTek 8139x
- based Fast Ethernet cards. It tries to work around several not
+ This is a sophisticated, multi platform driver for RealTek 8129 and
+ 8139x based Fast Ethernet cards. It tries to work around several not
X well documented hardware bugs in these chips and is also
- usually faster than the original driver. However, 8129 is not
- supported.
- If you are sure you have a RTL8139-based card, choose this driver.
+ usually faster than the original driver.
+ If you have one of these cards, choose this driver.
X You can find more information in the Ethernet-HOWTO, available by
X anonymous FTP from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO .
X
X If you want to compile this driver as a module ( = code which can be
X inserted in and removed from the running kernel whenever you want),
X say M here and read Documentation/modules.txt. This is recommended.
- The module will be called rtl8139too.o .
+ The module will be called 8139too.o .
X
X Use PIO instead of MMIO
X CONFIG_8139TOO_PIO
@@ -6255,6 +6856,12 @@
X since hardly documented by the manufacturer.
X If unsure, say n.
X
+Support for RealTek 8129
+CONFIG_8139TOO_8129
+ To include 8129 support, say y here. The RTL-8129 chip is basically
+ the same as the RTL-8139 except for the fact that boards with this
+ chip use an external Ethernet transceiver.
+
X SiS 900/7016 support
X CONFIG_SIS900
X This is a driver for the Fast Ethernet PCI network cards based on
@@ -6353,6 +6960,15 @@
X say M here and read Documentation/modules.txt. This is recommended.
X The module will be called sk98lin.o.
X
+MyriCOM Gigabit Ethernet support
+CONFIG_MYRI_SBUS
+ This driver supports MyriCOM Sbus gigabit Ethernet cards.
+
+ If you want to compile this driver as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. This is recommended.
+ The module will be called myri_sbus.o.
+
X AMD LANCE and PCnet (AT1500 and NE2100) support
X CONFIG_LANCE
X If you have a network (Ethernet) card of this type, say Y and read
@@ -6469,6 +7085,18 @@
X Documentation/networking/net-modules.txt. The module will be called
X 3c509.o.
X
+3c515 ISA Fast EtherLink
+CONFIG_3C515
+ If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet
+ network card, say Y and read the Ethernet-HOWTO, available from
+ <http://www.linuxdoc.org/docs.html#howto>.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt> as well as
+ <file:Documentation/networking/net-modules.txt>. The module will be called
+ 3c515.o.
+
X 3c590 series (592/595/597) "Vortex" support
X CONFIG_VORTEX
X If you have a 3Com "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597)
@@ -6709,6 +7337,18 @@
X Documentation/networking/net-modules.txt. The module will be called
X eexpress.o.
X
+Packet Engines Hamachi GNIC-II support
+CONFIG_HAMACHI
+ If you have a Gigabit Ethernet card of this type, say Y and read
+ the Ethernet-HOWTO, available from
+ <http://www.linuxdoc.org/docs.html#howto>.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt> as well as
+ <file:Documentation/networking/net-modules.txt>. The module will be called
+ hamachi.o.
+
X HP PCLAN+ (27247B and 27252A) support
X CONFIG_HPLAN_PLUS
X If you have a network (Ethernet) card of this type, say Y and read
@@ -7034,6 +7674,12 @@
X module, say M here and read Documentation/modules.txt as well as
X Documentation/networking/net-modules.txt.
X
+DEC LANCE Ethernet controller support
+CONFIG_DECLANCE
+ This driver is for the series of Ethernet controllers produced by
+ DEC (now Compaq) based on the AMD Lance chipset, including the
+ DEPCA series. (This chipset is better known via the NE2100 cards.)
+
X SGI Seeq ethernet controller support
X CONFIG_SGISEEQ
X Say Y here if you have an Seeq based Ethernet network card. This is
@@ -7183,6 +7829,51 @@
X the Linux-SNA WWW site for the latest information at
X http://samba.anu.edu.au/linux-sna/documents/drivers/SysKonnect/
X
+Sun Happy Meal 10/100baseT support
+CONFIG_HAPPYMEAL
+ This driver supports the "hme" interface present on most Ultra
+ systems and as an option on older Sbus systems. This driver supports
+ both PCI and Sbus devices. This driver also supports the "qfe" quad
+ 100baseT device available in both PCI and Sbus configurations.
+
+ This support is also available as a module called sunhme.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
+Sun Lance support
+CONFIG_SUNLANCE
+ This driver supports the "le" interface present on all 32-bit Sparc
+ systems, on some older Ultra systems and as an Sbus option. These
+ cards are based on the AMD Lance chipset, which is better known
+ via the NE2100 cards.
+
+ This support is also available as a module called sunlance.o ( =
+ code which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
+Sun BigMAC 10/100baseT support
+CONFIG_SUNBMAC
+ This driver supports the "be" interface available as an Sbus option.
+ This is Sun's older 100baseT Ethernet device.
+
+ This support is also available as a module called sunbmac.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
+Sun QuadEthernet support
+CONFIG_SUNQE
+ This driver supports the "qe" 10baseT Ethernet device, available as
+ an Sbus option. Note that this is not the same as Quad FastEthernet
+ "qfe" which is supported by the Happy Meal driver instead.
+
+ This support is also available as a module called sunqe.o ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+
X Traffic Shaper (EXPERIMENTAL)
X CONFIG_SHAPER
X The traffic shaper is a virtual network device that allows you to
@@ -7440,6 +8131,22 @@
X linux/include/linux/sbpcd.h before compiling the new kernel. Read
X the file Documentation/cdrom/sbpcd.
X
+Matsushita/Panasonic, ... third CD-ROM controller support
+CONFIG_SBPCD3
+ Say Y here only if you have three CD-ROM controller cards of this type
+ (usually only if you have more than six drives). You should enter
+ the parameters for the second, third and fourth interface card into
+ include/linux/sbpcd.h before compiling the new kernel. Read
+ the file <file:Documentation/cdrom/sbpcd>.
+
+Matsushita/Panasonic, ... fourth CD-ROM controller support
+CONFIG_SBPCD4
+ Say Y here only if you have four CD-ROM controller cards of this type
+ (usually only if you have more than eight drives). You should enter
+ the parameters for the second, third and fourth interface card into
+ include/linux/sbpcd.h before compiling the new kernel. Read
+ the file <file:Documentation/cdrom/sbpcd>.
+
X Aztech/Orchid/Okano/Wearnes/TXC/CyDROM CDROM support
X CONFIG_AZTCD
X This is your driver if you have an Aztech CDA268-01A, Orchid
@@ -7710,6 +8417,20 @@
X The module will be called wacom.o. If you want to compile it as a
X module, say M here and read Documentation/modules.txt.
X
+Use input layer for ADB devices
+CONFIG_INPUT_ADBHID
+ Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
+ such as keyboards, mice, joysticks, or graphic tablets handled by the
+ input layer. If you say Y here, make sure to say Y to the
+ corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
+ "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface support"
+ (CONFIG_INPUT_EVDEV) as well.
+
+ If you say N here, you still have the option of using the old ADB
+ keyboard and mouse drivers.
+
+ If unsure, say Y.
+
X Logitech WingMan Force joystick support
X CONFIG_USB_WMFORCE
X Say Y here if you want to use the Logitech WingMan Force with Linux
@@ -7854,6 +8575,17 @@
X The module will be called visor.o. If you want to compile it as a
X module, say M here and read Documentation/modules.txt.
X
+USB Belkin and Paracom Single Port Serial Driver
+CONFIG_USB_SERIAL_BELKIN
+ Say Y here if you want to use a Belkin USB Serial single port
+ adaptor (F5U103 is one of the model numbers) or the Peracom single
+ port USB to serial adapter.
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called belkin_sa.o. If you want to compile it as
+ a module, say M here and read <file:Documentation/modules.txt>.
+
X USB FTDI Single Port Serial Driver
X CONFIG_USB_SERIAL_FTDI_SIO
X Say Y here if you want to use a FTDI SIO single port USB to serial
@@ -7913,6 +8645,10 @@
X CONFIG_USB_SERIAL_KEYSPAN_USA19W
X Say Y here to include firmware for the USA-19W converter.
X
+USB Keyspan USA-49W Firmware
+CONFIG_USB_SERIAL_KEYSPAN_USA49W
+ Say Y here to include firmware for the USA-49W converter.
+
X USB ZyXEL omni.net LCD Plus Driver
X CONFIG_USB_SERIAL_OMNINET
X Say Y here if you want to use a ZyXEL omni.net LCD ISDN TA.
@@ -7947,6 +8683,45 @@
X The module will be called empeg.o. If you want to compile it as a
X module, say M here and read Documentation/modules.txt.
X
+USB MCT Single Port Serial Driver
+CONFIG_USB_SERIAL_MCT_U232
+ Say Y here if you want to use a USB Serial single port adapter from
+ Magic Control Technology Corp. (U232 is one of the model numbers).
+
+ This driver also works with Sitecom U232-P25 and D-Link DU-H3SP USB
+ BAY devices.
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called mct_u232.o. If you want to compile it as
+ a module, say M here and read <file:Documentation/modules.txt>.
+
+USB Edgeport Serial Driver
+CONFIG_USB_SERIAL_EDGEPORT
+ Say Y here if you want to use any of the following devices from
+ Inside Out Networks (Digi):
+ Edgeport/4
+ Rapidport/4
+ Edgeport/4t
+ Edgeport/2
+ Edgeport/4i
+ Edgeport/2i
+ Edgeport/421
+ Edgeport/21
+ Edgeport/8
+ Edgeport/8 Dual
+ Edgeport/2D8
+ Edgeport/4D8
+ Edgeport/8i
+ Edgeport/2 DIN
+ Edgeport/4 DIN
+ Edgeport/16 Dual
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called io_edgeport.o. If you want to compile it
+ as a module, say M here and read <file:Documentation/modules.txt>.
+
X USB Serial Converter verbose debug
X CONFIG_USB_SERIAL_DEBUG
X Say Y here if you want verbose debug messages from the USB Serial
@@ -8480,6 +9255,20 @@
X
X If you don't know what all this is about, say N.
X
+Provide NFS over TCP server support DEVELOPER ONLY
+CONFIG_NFSD_TCP
+ If you are a developer and want to work on fixing problems with
+ NFS server over TCP support, say Y here. If unsure, say N.
+
+ Some problems can be found by looking for FIXME in net/sunrpc/svcsock.c
+
+Provide NFSv3 client support
+CONFIG_NFS_V3
+ Say Y here if you want your NFS client to be able to speak the newer
+ version 3 of the NFS protocol.
+
+ If unsure, say N.
+
X Root file system on NFS
X CONFIG_ROOT_NFS
X If you want your Linux box to mount its whole root filesystem (the
@@ -8649,7 +9438,7 @@
X answer N.
X
X QNX4 filesystem support (EXPERIMENTAL)
-CONFIG_QNX4FS_FS
+CONFIG_QNX4FS_FS
X This is the filesystem used by the operating system QNX 4. Say Y if
X you intend to mount QNX hard disks or floppies. Unless you say Y to
X "QNX4FS write support" below, you will only be able to read
@@ -9537,6 +10326,21 @@
X Also it's possible to say M here and compile this driver as kernel
X loadable module; the module will be called riscom8.o.
X
+Computone IntelliPort Plus serial support
+CONFIG_COMPUTONE
+ This driver supports the entire family of Intelliport II/Plus
+ controllers with the exception of the MicroChannel controllers and
+ products previous to the Intelliport II. These are multiport cards,
+ which give you many serial ports. You would need something like this
+ to connect more than two modems to your Linux box, for instance in
+ order to become a dial-in server. If you have a card like that, say
+ Y here and read <file:Documentation/computone.txt>.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. You will get two
+ modules called ip2.o and ip2main.o.
+
X Specialix IO8+ card support
X CONFIG_SPECIALIX
X This is a driver for the Specialix IO8+ multiport card (both the
@@ -9688,6 +10492,24 @@
X and read Documentation/modules.txt. The module will be called esp.o.
X If unsure, say N.
X
+Moxa Intellio support
+CONFIG_MOXA_INTELLIO
+ Say Y here if you have a Moxa Intellio multiport serial card.
+
+ This driver can also be built as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called moxa.o. If you want to do that, say M
+ here.
+
+Moxa SmartIO support
+CONFIG_MOXA_SMARTIO
+ Say Y here if you have a Moxa SmartIO multiport serial card.
+
+ This driver can also be built as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called mxser.o. If you want to do that, say M
+ here.
+
X Multi-Tech multiport card support
X CONFIG_ISI
X This is a driver for the Multi-Tech cards which provide several
@@ -10061,6 +10883,18 @@
X Please read Documentation/ftape.txt for a short description
X how to control the amount of debugging output.
X
+Excessive
+CONFIG_FT_FULL_DEBUG
+ Extremely verbose output for driver debugging purposes.
+
+Reduced
+CONFIG_FT_NO_TRACE
+ Reduced tape driver debugging output.
+
+None
+CONFIG_FT_NO_TRACE_AT_ALL
+ Suppress all debugging output from the tape drive.
+
X The floppy drive controller for ftape
X CONFIG_FT_STD_FDC
X Only change this setting if you have a special controller. If you
@@ -10231,6 +11065,12 @@
X CONFIG_DRM_MGA
X Choose M here if you have a Matrox g200/g400 AGP graphics card.
X
+Creator/Creator3D/Elite3D
+CONFIG_DRM_FFB
+ Choose this option if you have one of Sun's Creator3D-based graphics
+ and frame buffer cards. Product page at
+ <http://www.sun.com/desktop/products/Graphics/creator3d.html>.
+
X MTRR control and configuration
X CONFIG_MTRR
X On Intel P6 family processors (Pentium Pro, Pentium II and later)
@@ -10287,6 +11127,22 @@
X running kernel whenever you want), say M here and read
X Documentation/modules.txt. The module will be called dtlk.o.
X
+Intel Random Number Generator support
+CONFIG_INTEL_RNG
+ This driver provides kernel-side support for the Random Number
+ Generator hardware found on Intel i8xx-based motherboards.
+
+ Both a character driver, used to read() entropy data, and a timer
+ function which automatically adds entropy directly into the
+ kernel pool, are exported by this driver.
+
+ To compile this driver as a module ( = code which can be inserted in
+ and removed from the running kernel whenever you want), say M here
+ and read <file:Documentation/modules.txt>. The module will be called
+ i810_rng.o.
+
+ If unsure, say N.
+
X Advanced Power Management
X CONFIG_APM
X APM is a BIOS specification for saving power using several different
@@ -10467,6 +11323,20 @@
X say M here and read Documentation/modules.txt. The module will be
X called wdt.o.
X
+WDT PCI Watchdog timer
+CONFIG_WDTPCI
+ If you have a PCI WDT500/501 watchdog board, say Y here,
+ otherwise N. It is not possible to probe for this board, which means
+ that you have to inform the kernel about the IO port and IRQ using
+ the "wdt=" kernel option (try "man bootparam" or see the
+ documentation of your boot loader (lilo or loadlin) about how to
+ pass options to the kernel at boot time).
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module will be
+ called wdt_pci.o.
+
X WDT501 features
X CONFIG_WDT_501
X Saying Y here and creating a character special file /dev/temperature
@@ -10523,6 +11393,12 @@
X module, say M here and read Documentation/modules.txt. Most people
X will say N.
X
+Advantech SBC Watchdog Timer
+CONFIG_ADVANTECH_WDT
+ If you are configuring a Linux kernel for the Advantech single-board
+ computer, say `Y' here to support its built-in watchdog timer feature.
+ See the help for CONFIG_WATCHDOG for discussion.
+
X SBC-60XX Watchdog Timer
X CONFIG_60XX_WDT
X This driver can be used with the watchdog timer found on some
@@ -10535,6 +11411,32 @@
X You can compile this driver directly into the kernel, or use
X it as a module. The module will be called sbc60xxwdt.o.
X
+Mixcom Watchdog
+CONFIG_MIXCOMWD
+ This is a driver for the Mixcom hardware watchdog cards. This
+ watchdog simply watches your kernel to make sure it doesn't freeze,
+ and if it does, it reboots your computer after a certain amount of
+ time.
+
+ This driver is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module is called mixcomwd.o. If you want to compile it as a
+ module, say M here and read <file:Documentation/modules.txt>. Most people
+ will say N.
+
+ZF MachZ Watchdog
+CONFIG_MACHZ_WDT
+ If you are using a ZF Micro MachZ processor, say Y here, otherwise N.
+ This is the driver for the watchdog timer builtin on that processor
+ using ZF-Logic interface. This watchdog simply watches your kernel to
+ make sure it doesn't freeze, and if it does, it reboots your computer
+ after a certain amount of time.
+
+ This driver is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module is called machzwd.o. If you want to compile it as a module,
+ say M here and read Documentation/modules.txt.
+
X CONFIG_MICROCODE
X /dev/cpu/microcode - Intel IA32 CPU microcode support
X
@@ -10941,6 +11843,11 @@
X some other card made by Media Vision or Logitech since they are not
X PAS16 compatible.
X
+Enable PAS16 joystick port
+CONFIG_PAS_JOYSTICK
+ Say Y here to enable the Pro Audio Spectrum 16's auxiliary joystick
+ port.
+
X 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
X CONFIG_SOUND_SB
X Answer Y if you have an original Sound Blaster card made by Creative
@@ -10961,12 +11868,27 @@
X You can say M here to compile this driver as a module; the module is
X called sb.o.
X
-#Loopback MIDI device support
-#CONFIG_SOUND_VMIDI
-###
-### somebody please fill this in.
-###
-#
+Crystal Sound CS4281
+CONFIG_SOUND_CS4281
+ Picture and feature list at <http://www.pcbroker.com/crystal4281.html>.
+
+VIDC 16-bit sound
+CONFIG_SOUND_VIDC
+ 16-bit support for the VIDC onboard sound hardware found on Acorn machines.
+
+Loopback MIDI device support
+CONFIG_SOUND_VMIDI
+ Support for MIDI loopback on port 1 or 2.
+
+Yamaha YMF7xx PCI audio (native mode)
+CONFIG_SOUND_YMFPCI
+ Support for Yamaha cards including the YMF711, YMF715, YMF718, YMF719,
+ YMF724, Waveforce 192XG, and Waveforce 192 Digital.
+
+Yamaha PCI legacy ports support
+CONFIG_SOUND_YMFPCI_LEGACY
+ Support for YMF7xx PCI cards emulating an MP401.
+
X Gravis Ultrasound support
X CONFIG_SOUND_GUS
X Say Y here for any type of Gravis Ultrasound card, including
@@ -11158,6 +12080,18 @@
X See Documentation/sound/MultiSound for important information about
X this driver.
X
+MSND Classic I/O
+CONFIG_MSNDCLAS_IO
+ I/O port address for the MultiSound Classic and related cards.
+
+MSND Classic IRQ
+CONFIG_MSNDCLAS_IRQ
+ Interrupt Request line for the MultiSound Classic and related cards.
+
+MSND Classic memory address
+CONFIG_MSNDCLAS_MEM
+ Memory-mapped I/O base address for the MultiSound Classic and related cards.
+
X Full pathname of MSNDINIT.BIN firmware file


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 01'
echo 'File patch-2.2.20 is continued in part 02'
echo "02" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:08 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part09

#!/bin/sh -x
# this is part 09 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 09; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

--- v2.2.19/arch/sparc64/kernel/signal32.c Sun Mar 25 17:31:52 2001
+++ linux/arch/sparc64/kernel/signal32.c Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: signal32.c,v 1.47.2.3 1999/12/20 01:14:06 davem Exp $
+/* $Id: signal32.c,v 1.47.2.6 2001/08/12 10:56:22 davem Exp $
X * arch/sparc64/kernel/signal32.c


X *
X * Copyright (C) 1991, 1992 Linus Torvalds

@@ -1041,13 +1041,48 @@

@@ -1279,7 +1314,7 @@


X
X if (!signr) break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X current->exit_code = signr;
X current->state = TASK_STOPPED;
X notify_parent(current, SIGCHLD);

@@ -1335,7 +1370,7 @@


X continue;
X
X case SIGSTOP:
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X continue;
X current->state = TASK_STOPPED;
X current->exit_code = signr;

@@ -1347,14 +1382,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS:
- if(current->binfmt && current->binfmt->core_dump) {
- lock_kernel();
- if(current->binfmt &&
- current->binfmt->core_dump &&
- current->binfmt->core_dump(signr, regs))
- exit_code |= 0x80;
- unlock_kernel();
- }
+ if (do_coredump(signr, regs))
+ exit_code |= 0x80;
X #ifdef DEBUG_SIGNALS
X /* Very useful to debug dynamic linker problems */
X printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid);

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/smp.c linux/arch/sparc64/kernel/smp.c
--- v2.2.19/arch/sparc64/kernel/smp.c Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/kernel/smp.c Wed Oct 10 01:40:43 2001
@@ -77,15 +77,17 @@
X for (i = 0; i < NR_CPUS; i++)
X if(cpu_present_map & (1UL << i))
X len += sprintf(buf + len,
- "Cpu%dBogo\t: %lu.%02lu\n",
+ "Cpu%dBogo\t: %lu.%02lu\n"
+ "Cpu%dClkTck\t: %016lx\n",
X i, cpu_data[i].udelay_val / (500000/HZ),
- (cpu_data[i].udelay_val / (5000/HZ)) % 100);
+ (cpu_data[i].udelay_val / (5000/HZ)) % 100,
+ i, (unsigned long) cpu_data[i].clock_tick);
X return len;
X }
X
X __initfunc(void smp_store_cpu_info(int id))
X {
- int i;
+ int i, no;
X
X cpu_data[id].irq_count = 0;
X cpu_data[id].bh_count = 0;
@@ -93,6 +95,13 @@
X smp_setup_percpu_timer() */
X cpu_data[id].udelay_val = loops_per_jiffy;
X
+
+ for (no = 0; no < linux_num_cpus; no++)
+ if (linux_cpus[no].mid == id)
+ break;
+
+ cpu_data[id].clock_tick = prom_getintdefault(linux_cpus[no].prom_node,
+ "clock-frequency", 0);
X cpu_data[id].pgcache_size = 0;
X cpu_data[id].pte_cache[0] = NULL;
X cpu_data[id].pte_cache[1] = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/sparc64_ksyms.c linux/arch/sparc64/kernel/sparc64_ksyms.c
--- v2.2.19/arch/sparc64/kernel/sparc64_ksyms.c Sun Mar 25 17:37:30 2001
+++ linux/arch/sparc64/kernel/sparc64_ksyms.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: sparc64_ksyms.c,v 1.58.2.13 2001/01/03 22:05:54 anton Exp $
+/* $Id: sparc64_ksyms.c,v 1.58.2.14 2001/03/01 00:48:59 davem Exp $
X * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
X *
X * Copyright (C) 1996 David S. Miller (da...@caip.rutgers.edu)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/sys_sparc32.c linux/arch/sparc64/kernel/sys_sparc32.c
--- v2.2.19/arch/sparc64/kernel/sys_sparc32.c Sun Mar 25 17:37:30 2001
+++ linux/arch/sparc64/kernel/sys_sparc32.c Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc32.c,v 1.107.2.16 2000/12/20 02:45:00 anton Exp $
+/* $Id: sys_sparc32.c,v 1.107.2.17 2001/07/06 05:04:31 davem Exp $
X * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
X *
X * Copyright (C) 1997,1998 Jakub Jelinek (j...@sunsite.mff.cuni.cz)
@@ -3002,6 +3002,7 @@
X {
X struct linux_binprm bprm;
X struct dentry * dentry;
+ int was_dumpable;
X int retval;
X int i;
X
@@ -3029,6 +3030,9 @@
X return bprm.envc;
X }
X
+ was_dumpable = current->dumpable;
+ current->dumpable = 0;
+
X retval = prepare_binprm(&bprm);
X
X if(retval>=0) {
@@ -3042,9 +3046,12 @@
X
X if (retval >= 0)
X retval = search_binary_handler(&bprm,regs);
- if(retval>=0)
+
+ if (retval >= 0) {
X /* execve success */
+ current->dumpable = bprm.dumpable;
X return retval;
+ }
X
X /* Something went wrong, return the inode and free the argument pages*/
X if(bprm.dentry)
@@ -3052,7 +3059,10 @@
X
X for (i=0 ; i<MAX_ARG_PAGES ; i++)
X free_page(bprm.page[i]);
- return(retval);
+
+ current->dumpable = was_dumpable;
+
+ return retval;
X }
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/kernel/ttable.S linux/arch/sparc64/kernel/ttable.S
--- v2.2.19/arch/sparc64/kernel/ttable.S Sun Mar 25 17:31:52 2001
+++ linux/arch/sparc64/kernel/ttable.S Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: ttable.S,v 1.28.2.2 1999/12/01 23:55:44 davem Exp $
+/* $Id: ttable.S,v 1.28.2.3 2001/08/12 10:56:22 davem Exp $
X * ttable.S: Sparc V9 Trap Table(s) with SpitFire extensions.
X *
X * Copyright (C) 1996 David S. Miller (da...@caip.rutgers.edu)
@@ -101,7 +101,7 @@
X tl0_f7o: FILL_7_OTHER
X tl0_sunos: SUNOS_SYSCALL_TRAP
X tl0_bkpt: BREAKPOINT_TRAP
-tl0_resv102: BTRAP(0x102)
+tl0_divz: TRAP(do_div0)
X tl0_flushw: FLUSH_WINDOW_TRAP
X tl0_resv104: BTRAP(0x104) BTRAP(0x105) BTRAP(0x106) BTRAP(0x107)
X .globl tl0_solaris
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/sparc64/solaris/entry64.S linux/arch/sparc64/solaris/entry64.S
--- v2.2.19/arch/sparc64/solaris/entry64.S Sun Mar 25 17:31:53 2001
+++ linux/arch/sparc64/solaris/entry64.S Wed Oct 10 01:40:43 2001
@@ -1,4 +1,4 @@
-/* $Id: entry64.S,v 1.5 1998/03/26 08:46:15 jj Exp $
+/* $Id: entry64.S,v 1.5.2.1 2001/06/18 12:26:13 davem Exp $
X * entry64.S: Solaris syscall emulation entry point.
X *
X * Copyright (C) 1996,1997,1998 Jakub Jelinek (j...@sunsite.mff.cuni.cz)
@@ -83,7 +83,7 @@
X 1: srl %i0, 0, %o0
X lduw [%l7 + %l4], %l3


X srl %i1, 0, %o1

- ldx [%g6 + AOFF_task_flags], %l5
+ ldx [%g6 + AOFF_task_ptrace], %l5
X cmp %l3, NR_SYSCALLS
X bleu,a,pn %xcc, linux_syscall_for_solaris
X sethi %hi(sys_call_table32), %l6
@@ -93,21 +93,21 @@
X 10: srl %i2, 0, %o2
X mov %i5, %o5
X andn %l3, 3, %l7


- andcc %l5, 0x20, %g0
+ andcc %l5, 0x02, %g0

X bne,pn %icc, solaris_syscall_trace
X mov %i0, %l5
X 2: call %l7


X srl %i3, 0, %o3

X ret_from_solaris:
X stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I0]
- ldx [%g6 + AOFF_task_flags], %l6
+ ldx [%g6 + AOFF_task_ptrace], %l6


X sra %o0, 0, %o0
X mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
X ldx [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_TSTATE], %g3
X cmp %o0, -ENOIOCTLCMD
X sllx %g2, 32, %g2
X bgeu,pn %xcc, 1f
- andcc %l6, 0x20, %l6
+ andcc %l6, 0x02, %l6
X
X /* System call success, clear Carry condition code. */
X andn %g3, %g2, %g3

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/Makefile linux/drivers/Makefile
--- v2.2.19/drivers/Makefile Sun Mar 25 17:31:34 2001
+++ linux/drivers/Makefile Wed Oct 10 01:40:43 2001
@@ -54,6 +54,10 @@
X else
X ifeq ($(CONFIG_USB),m)
X MOD_SUB_DIRS += usb
+ else
+ ifdef CONFIG_INPUT_ADBHID
+ SUB_DIRS += usb
+ endif
X endif
X endif
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/Config.in linux/drivers/block/Config.in
--- v2.2.19/drivers/block/Config.in Sun Mar 25 17:31:23 2001
+++ linux/drivers/block/Config.in Wed Oct 10 01:40:43 2001
@@ -140,7 +140,7 @@
X tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA
X fi
X if [ "$CONFIG_PCI" = "y" ]; then
- tristate 'Compaq CISS Array support' CONFIG_BLK_CPQ_CISS_DA
+ tristate 'Compaq Smart Array 5xxx support' CONFIG_BLK_CPQ_CISS_DA
X fi
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/DAC960.c linux/drivers/block/DAC960.c
--- v2.2.19/drivers/block/DAC960.c Sun Mar 25 17:37:30 2001
+++ linux/drivers/block/DAC960.c Wed Oct 31 14:15:06 2001
@@ -19,8 +19,8 @@
X */
X
X
-#define DAC960_DriverVersion "2.2.10"
-#define DAC960_DriverDate "1 February 2001"
+#define DAC960_DriverVersion "2.2.11"
+#define DAC960_DriverDate "11 October 2001"
X
X
X #include <linux/version.h>
@@ -107,7 +107,7 @@
X */
X
X static NotifierBlock_T
- DAC960_NotifierBlock = { DAC960_Finalize, NULL, 0 };
+ DAC960_NotifierBlock = { DAC960_Notifier, NULL, 0 };
X
X
X /*
@@ -277,7 +277,9 @@
X
X /*
X DAC960_AllocateCommand allocates a Command structure from Controller's
- free list.
+ free list. During driver initialization, a special initialization command
+ has been placed on the free list to guarantee that command allocation can
+ never fail.
X */
X
X static inline DAC960_Command_T *DAC960_AllocateCommand(DAC960_Controller_T
@@ -488,6 +490,52 @@
X
X
X /*
+ DAC960_P_QueueCommand queues Command for DAC960 P Series Controllers.
+*/
+
+static void DAC960_P_QueueCommand(DAC960_Command_T *Command)
+{
+ DAC960_Controller_T *Controller = Command->Controller;
+ void *ControllerBaseAddress = Controller->BaseAddress;
+ DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox;
+ CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier;
+ switch (CommandMailbox->Common.CommandOpcode)
+ {
+ case DAC960_V1_Enquiry:
+ CommandMailbox->Common.CommandOpcode = DAC960_V1_Enquiry_Old;
+ break;
+ case DAC960_V1_GetDeviceState:
+ CommandMailbox->Common.CommandOpcode = DAC960_V1_GetDeviceState_Old;
+ break;
+ case DAC960_V1_Read:
+ CommandMailbox->Common.CommandOpcode = DAC960_V1_Read_Old;
+ DAC960_PD_To_P_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ case DAC960_V1_Write:
+ CommandMailbox->Common.CommandOpcode = DAC960_V1_Write_Old;
+ DAC960_PD_To_P_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ case DAC960_V1_ReadWithScatterGather:
+ CommandMailbox->Common.CommandOpcode =
+ DAC960_V1_ReadWithScatterGather_Old;
+ DAC960_PD_To_P_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ case DAC960_V1_WriteWithScatterGather:
+ CommandMailbox->Common.CommandOpcode =
+ DAC960_V1_WriteWithScatterGather_Old;
+ DAC960_PD_To_P_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ default:
+ break;
+ }
+ while (DAC960_PD_MailboxFullP(ControllerBaseAddress))
+ udelay(1);
+ DAC960_PD_WriteCommandMailbox(ControllerBaseAddress, CommandMailbox);
+ DAC960_PD_NewCommand(ControllerBaseAddress);
+}
+
+
+/*
X DAC960_ExecuteCommand executes Command and waits for completion.
X */
X
@@ -530,6 +578,32 @@
X
X
X /*
+ DAC960_V1_ExecuteTypeB executes a DAC960 V1 Firmware Controller Type 3B
+ Command and waits for completion. It returns true on success and false
+ on failure.
+*/
+
+static boolean DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller,
+ DAC960_V1_CommandOpcode_T CommandOpcode,
+ unsigned char CommandOpcode2,
+ void *DataPointer)
+{
+ DAC960_Command_T *Command = DAC960_AllocateCommand(Controller);
+ DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox;
+ DAC960_V1_CommandStatus_T CommandStatus;
+ DAC960_V1_ClearCommand(Command);
+ Command->CommandType = DAC960_ImmediateCommand;
+ CommandMailbox->Type3B.CommandOpcode = CommandOpcode;
+ CommandMailbox->Type3B.CommandOpcode2 = CommandOpcode2;
+ CommandMailbox->Type3B.BusAddress = Virtual_to_Bus32(DataPointer);
+ DAC960_ExecuteCommand(Command);
+ CommandStatus = Command->V1.CommandStatus;
+ DAC960_DeallocateCommand(Command);
+ return (CommandStatus == DAC960_V1_NormalCompletion);
+}
+
+
+/*
X DAC960_V1_ExecuteType3D executes a DAC960 V1 Firmware Controller Type 3D
X Command and waits for completion. It returns true on success and false
X on failure.
@@ -1063,7 +1137,17 @@
X DAC1164P 5.06 and above
X DAC960PTL/PRL/PJ/PG 4.06 and above
X DAC960PU/PD/PL 3.51 and above
+ DAC960PU/PD/PL/P 2.73 and above
X */
+ if (Enquiry2.FirmwareID.MajorVersion == 0)
+ {
+ Enquiry2.FirmwareID.MajorVersion =
+ Controller->V1.Enquiry.MajorFirmwareVersion;
+ Enquiry2.FirmwareID.MinorVersion =
+ Controller->V1.Enquiry.MinorFirmwareVersion;
+ Enquiry2.FirmwareID.FirmwareType = '0';
+ Enquiry2.FirmwareID.TurnID = 0;
+ }
X sprintf(Controller->FirmwareVersion, "%d.%02d-%c-%02d",
X Enquiry2.FirmwareID.MajorVersion, Enquiry2.FirmwareID.MinorVersion,
X Enquiry2.FirmwareID.FirmwareType, Enquiry2.FirmwareID.TurnID);
@@ -1072,7 +1156,9 @@
X (Controller->FirmwareVersion[0] == '4' &&
X strcmp(Controller->FirmwareVersion, "4.06") >= 0) ||
X (Controller->FirmwareVersion[0] == '3' &&
- strcmp(Controller->FirmwareVersion, "3.51") >= 0)))
+ strcmp(Controller->FirmwareVersion, "3.51") >= 0) ||
+ (Controller->FirmwareVersion[0] == '2' &&
+ strcmp(Controller->FirmwareVersion, "2.73") >= 0)))
X {
X DAC960_Failure(Controller, "FIRMWARE VERSION VERIFICATION");
X DAC960_Error("Firmware Version = '%s'\n", Controller,
@@ -1128,6 +1214,20 @@
X return DAC960_Failure(Controller, "CONFIG2 DRIVE GEOMETRY");
X }
X /*
+ Initialize the Background Initialization Status.
+ */
+ if ((Controller->FirmwareVersion[0] == '4' &&
+ strcmp(Controller->FirmwareVersion, "4.08") >= 0) ||
+ (Controller->FirmwareVersion[0] == '5' &&
+ strcmp(Controller->FirmwareVersion, "5.08") >= 0))
+ {
+ Controller->V1.BackgroundInitializationStatusSupported = true;
+ DAC960_V1_ExecuteType3B(Controller,
+ DAC960_V1_BackgroundInitializationControl, 0x20,
+ &Controller->
+ V1.LastBackgroundInitializationStatus);
+ }
+ /*
X Initialize the Logical Drive Initially Accessible flag.
X */
X for (LogicalDriveNumber = 0;
@@ -1581,7 +1681,7 @@
X DeviceState->DeviceType == DAC960_V1_DiskType)
X {
X if (Controller->V1.DeviceResetCount[Channel][TargetID] > 0)
- DAC960_Info(" Disk Status: %s, %d blocks, %d resets\n",
+ DAC960_Info(" Disk Status: %s, %u blocks, %d resets\n",
X Controller,
X (DeviceState->DeviceState == DAC960_V1_Device_Dead
X ? "Dead"
@@ -1594,7 +1694,7 @@
X DeviceState->DiskSize,
X Controller->V1.DeviceResetCount[Channel][TargetID]);
X else
- DAC960_Info(" Disk Status: %s, %d blocks\n", Controller,
+ DAC960_Info(" Disk Status: %s, %u blocks\n", Controller,
X (DeviceState->DeviceState == DAC960_V1_Device_Dead
X ? "Dead"
X : DeviceState->DeviceState
@@ -1623,7 +1723,7 @@
X {
X DAC960_V1_LogicalDriveInformation_T *LogicalDriveInformation =
X &Controller->V1.LogicalDriveInformation[LogicalDriveNumber];
- DAC960_Info(" /dev/rd/c%dd%d: RAID-%d, %s, %d blocks, %s\n",
+ DAC960_Info(" /dev/rd/c%dd%d: RAID-%d, %s, %u blocks, %s\n",
X Controller, Controller->ControllerNumber, LogicalDriveNumber,
X LogicalDriveInformation->RAIDLevel,
X (LogicalDriveInformation->LogicalDriveState
@@ -1689,18 +1789,32 @@
X if (PhysicalDeviceInfo->PhysicalDeviceState ==
X DAC960_V2_Device_Unconfigured)
X continue;
- DAC960_Info(" Disk Status: %s, %d blocks\n", Controller,
+ DAC960_Info(" Disk Status: %s, %u blocks\n", Controller,
X (PhysicalDeviceInfo->PhysicalDeviceState
X == DAC960_V2_Device_Online
X ? "Online"
X : PhysicalDeviceInfo->PhysicalDeviceState
- == DAC960_V2_Device_WriteOnly
- ? "Write-Only"
+ == DAC960_V2_Device_Rebuild
+ ? "Rebuild"
X : PhysicalDeviceInfo->PhysicalDeviceState
- == DAC960_V2_Device_Dead
- ? "Dead" : "Standby"),
- PhysicalDeviceInfo
- ->ConfigurableDeviceSizeIn512ByteBlocksOrMB);
+ == DAC960_V2_Device_Missing
+ ? "Missing"
+ : PhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Critical
+ ? "Critical"
+ : PhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Dead
+ ? "Dead"
+ : PhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_SuspectedDead
+ ? "Suspected-Dead"
+ : PhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_CommandedOffline
+ ? "Commanded-Offline"
+ : PhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Standby
+ ? "Standby" : "Unknown"),
+ PhysicalDeviceInfo->ConfigurableDeviceSize);
X if (PhysicalDeviceInfo->ParityErrors == 0 &&
X PhysicalDeviceInfo->SoftErrors == 0 &&
X PhysicalDeviceInfo->HardErrors == 0 &&
@@ -1742,7 +1856,7 @@
X "-", "-", "-", "-" };
X unsigned char *GeometryTranslation;
X if (LogicalDeviceInfo == NULL) continue;
- switch(LogicalDeviceInfo->DriveGeometry)
+ switch (LogicalDeviceInfo->DriveGeometry)
X {
X case DAC960_V2_Geometry_128_32:
X GeometryTranslation = "128/32";
@@ -1756,7 +1870,7 @@
X Controller, LogicalDeviceInfo->DriveGeometry);
X break;
X }
- DAC960_Info(" /dev/rd/c%dd%d: RAID-%d, %s, %d blocks\n",
+ DAC960_Info(" /dev/rd/c%dd%d: RAID-%d, %s, %u blocks\n",
X Controller, Controller->ControllerNumber, LogicalDriveNumber,
X LogicalDeviceInfo->RAIDLevel,
X (LogicalDeviceInfo->LogicalDeviceState
@@ -1765,7 +1879,7 @@
X : LogicalDeviceInfo->LogicalDeviceState
X == DAC960_V2_LogicalDevice_Critical
X ? "Critical" : "Offline"),
- LogicalDeviceInfo->ConfigurableDeviceSizeIn512ByteBlocksOrMB);
+ LogicalDeviceInfo->ConfigurableDeviceSize);
X DAC960_Info(" Logical Device %s, BIOS Geometry: %s\n",
X Controller,
X (LogicalDeviceInfo->LogicalDeviceControl
@@ -1843,12 +1957,11 @@
X blk_dev[MajorNumber].request_fn =
X RequestFunctions[Controller->ControllerNumber];
X /*
- Initialize the Disk Partitions array, Partition Sizes array, Block Sizes
- array, Max Sectors per Request array, and Max Segments per Request array.
+ Initialize the Disk Partitions array, Partition Sizes array, Max Sectors
+ per Request array, and Max Segments per Request array.
X */
X for (MinorNumber = 0; MinorNumber < DAC960_MinorCount; MinorNumber++)
X {
- Controller->BlockSizes[MinorNumber] = BLOCK_SIZE;
X Controller->MaxSectorsPerRequest[MinorNumber] =
X Controller->MaxBlocksPerCommand;
X Controller->MaxSegmentsPerRequest[MinorNumber] =
@@ -1871,8 +1984,8 @@
X Controller->GenericDiskInfo.minor_shift = DAC960_MaxPartitionsBits;
X Controller->GenericDiskInfo.max_p = DAC960_MaxPartitions;
X Controller->GenericDiskInfo.max_nr = DAC960_MaxLogicalDrives;
- Controller->GenericDiskInfo.init = DAC960_InitializeGenericDiskInfo;
- Controller->GenericDiskInfo.nr_real = Controller->LogicalDriveCount;
+ Controller->GenericDiskInfo.init = DAC960_ComputeGenericDiskInfo;
+ Controller->GenericDiskInfo.nr_real = DAC960_MaxLogicalDrives;
X Controller->GenericDiskInfo.real_devices = Controller;
X Controller->GenericDiskInfo.next = NULL;
X /*
@@ -1935,35 +2048,65 @@
X
X
X /*
- DAC960_GenericDiskInit is the Generic Disk Information Initialization
- Function for the DAC960 Driver.
+ DAC960_ComputeGenericDiskInfo computes the values for the Generic Disk
+ Information Partition Sector Counts and Block Sizes.
X */
X
-static void DAC960_InitializeGenericDiskInfo(GenericDiskInfo_T *GenericDiskInfo)
+static void DAC960_ComputeGenericDiskInfo(GenericDiskInfo_T *GenericDiskInfo)
X {
X DAC960_Controller_T *Controller =
X (DAC960_Controller_T *) GenericDiskInfo->real_devices;
- int LogicalDriveNumber;
+ int LogicalDriveNumber, i;
+ for (LogicalDriveNumber = 0;
+ LogicalDriveNumber < DAC960_MaxLogicalDrives;
+ LogicalDriveNumber++)
+ {
+ int MinorNumber = DAC960_MinorNumber(LogicalDriveNumber, 0);
+ if (Controller->FirmwareType == DAC960_V1_Controller)
+ {
+ if (LogicalDriveNumber < Controller->LogicalDriveCount)
+ GenericDiskInfo->part[MinorNumber].nr_sects =
+ Controller->V1.LogicalDriveInformation
+ [LogicalDriveNumber].LogicalDriveSize;
+ else GenericDiskInfo->part[MinorNumber].nr_sects = 0;
+ }
+ else
+ {
+ DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
+ Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
+ if (LogicalDeviceInfo != NULL)
+ GenericDiskInfo->part[MinorNumber].nr_sects =
+ LogicalDeviceInfo->ConfigurableDeviceSize;
+ else GenericDiskInfo->part[MinorNumber].nr_sects = 0;
+ }
+ for (i = 0; i < DAC960_MaxPartitions; i++)
+ if (GenericDiskInfo->part[MinorNumber].nr_sects > 0)
+ Controller->BlockSizes[MinorNumber + i] = BLOCK_SIZE;
+ else Controller->BlockSizes[MinorNumber + i] = 0;
+ }
+}
+
+
+/*
+ DAC960_RegisterDisk registers the DAC960 Logical Disk Device for Logical
+ Drive Number if it exists.
+*/
+
+static void DAC960_RegisterDisk(DAC960_Controller_T *Controller,
+ int LogicalDriveNumber)
+{
X if (Controller->FirmwareType == DAC960_V1_Controller)
- for (LogicalDriveNumber = 0;
- LogicalDriveNumber < Controller->LogicalDriveCount;
- LogicalDriveNumber++)
- GenericDiskInfo->part[DAC960_MinorNumber(LogicalDriveNumber, 0)]
- .nr_sects =
- Controller->V1.LogicalDriveInformation
- [LogicalDriveNumber].LogicalDriveSize;
+ {
+ if (LogicalDriveNumber > Controller->LogicalDriveCount - 1) return;
+ resetup_one_dev(&Controller->GenericDiskInfo, LogicalDriveNumber);
+ }
X else
- for (LogicalDriveNumber = 0;
- LogicalDriveNumber < DAC960_MaxLogicalDrives;
- LogicalDriveNumber++)
- {
- DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
- Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
- if (LogicalDeviceInfo != NULL)
- GenericDiskInfo->part[DAC960_MinorNumber(LogicalDriveNumber, 0)]
- .nr_sects =
- LogicalDeviceInfo->ConfigurableDeviceSizeIn512ByteBlocksOrMB;
- }
+ {
+ DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
+ Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
+ if (LogicalDeviceInfo == NULL) return;
+ resetup_one_dev(&Controller->GenericDiskInfo, LogicalDriveNumber);
+ }
X }
X
X
@@ -2073,6 +2216,13 @@
X InterruptHandler = DAC960_PD_InterruptHandler;
X MemoryWindowSize = DAC960_PD_RegisterWindowSize;
X break;
+ case DAC960_P_Controller:
+ VendorID = PCI_VENDOR_ID_MYLEX;
+ DeviceID = PCI_DEVICE_ID_MYLEX_DAC960_P;
+ FirmwareType = DAC960_V1_Controller;
+ InterruptHandler = DAC960_P_InterruptHandler;
+ MemoryWindowSize = DAC960_PD_RegisterWindowSize;
+ break;
X }
X while ((PCI_Device = pci_find_device(VendorID, DeviceID, PCI_Device)) != NULL)
X {
@@ -2114,6 +2264,10 @@
X IO_Address = BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK;
X PCI_Address = BaseAddress1 & PCI_BASE_ADDRESS_MEM_MASK;
X break;
+ case DAC960_P_Controller:
+ IO_Address = BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK;
+ PCI_Address = BaseAddress1 & PCI_BASE_ADDRESS_MEM_MASK;
+ break;
X }
X if (DAC960_ControllerCount == DAC960_MaxControllers)
X {
@@ -2309,6 +2463,32 @@
X Controller->QueueReadWriteCommand =
X DAC960_V1_QueueReadWriteCommand;
X break;
+ case DAC960_P_Controller:
+ request_region(Controller->IO_Address, 0x80,
+ Controller->FullModelName);
+ DAC960_PD_DisableInterrupts(BaseAddress);
+ DAC960_PD_AcknowledgeStatus(BaseAddress);
+ udelay(1000);
+ while (DAC960_PD_InitializationInProgressP(BaseAddress))
+ {
+ if (DAC960_PD_ReadErrorStatus(BaseAddress, &ErrorStatus,
+ &Parameter0, &Parameter1) &&
+ DAC960_ReportErrorStatus(Controller, ErrorStatus,
+ Parameter0, Parameter1))
+ goto Failure;
+ udelay(10);
+ }
+ DAC960_PD_EnableInterrupts(Controller->BaseAddress);
+ Controller->QueueCommand = DAC960_P_QueueCommand;
+ Controller->ReadControllerConfiguration =
+ DAC960_V1_ReadControllerConfiguration;
+ Controller->ReadDeviceConfiguration =
+ DAC960_V1_ReadDeviceConfiguration;
+ Controller->ReportDeviceConfiguration =
+ DAC960_V1_ReportDeviceConfiguration;
+ Controller->QueueReadWriteCommand =
+ DAC960_V1_QueueReadWriteCommand;
+ break;
X }
X /*
X Acquire shared access to the IRQ Channel.
@@ -2480,7 +2660,7 @@
X DAC960_Initialize initializes the DAC960 Driver.
X */
X
-void DAC960_Initialize(void)
+int DAC960_Initialize(void)
X {
X int ControllerNumber;
X DAC960_DetectControllers(DAC960_BA_Controller);
@@ -2488,15 +2668,28 @@
X DAC960_DetectControllers(DAC960_LA_Controller);
X DAC960_DetectControllers(DAC960_PG_Controller);
X DAC960_DetectControllers(DAC960_PD_Controller);
+ DAC960_DetectControllers(DAC960_P_Controller);
X DAC960_SortControllers();
- if (DAC960_ActiveControllerCount == 0) return;
+ if (DAC960_ActiveControllerCount == 0) return -ENODEV;
X for (ControllerNumber = 0;
X ControllerNumber < DAC960_ControllerCount;
X ControllerNumber++)
- if (DAC960_Controllers[ControllerNumber] != NULL)
- DAC960_InitializeController(DAC960_Controllers[ControllerNumber]);
+ {
+ DAC960_Controller_T *Controller = DAC960_Controllers[ControllerNumber];
+ int LogicalDriveNumber;
+ if (Controller == NULL) continue;
+ DAC960_InitializeController(Controller);
+ DAC960_ComputeGenericDiskInfo(&Controller->GenericDiskInfo);
+#ifdef MODULE
+ for (LogicalDriveNumber = 0;
+ LogicalDriveNumber < DAC960_MaxLogicalDrives;
+ LogicalDriveNumber++)
+ DAC960_RegisterDisk(Controller, LogicalDriveNumber);
+#endif
+ }
X DAC960_CreateProcEntries();
X register_reboot_notifier(&DAC960_NotifierBlock);


+ return 0;
X }
X
X

@@ -2504,14 +2697,10 @@
X DAC960_Finalize finalizes the DAC960 Driver.
X */
X
-static int DAC960_Finalize(NotifierBlock_T *NotifierBlock,
- unsigned long Event,
- void *Buffer)
+static void DAC960_Finalize(void)
X {
X int ControllerNumber;
- if (!(Event == SYS_RESTART || Event == SYS_HALT || Event == SYS_POWER_OFF))
- return NOTIFY_DONE;
- if (DAC960_ActiveControllerCount == 0) return NOTIFY_OK;
+ if (DAC960_ActiveControllerCount == 0) return;
X for (ControllerNumber = 0;
X ControllerNumber < DAC960_ControllerCount;
X ControllerNumber++)
@@ -2519,6 +2708,20 @@
X DAC960_FinalizeController(DAC960_Controllers[ControllerNumber]);
X DAC960_DestroyProcEntries();
X unregister_reboot_notifier(&DAC960_NotifierBlock);
+}
+
+
+/*
+ DAC960_Notifier is the notifier for the DAC960 Driver.
+*/
+
+static int DAC960_Notifier(NotifierBlock_T *NotifierBlock,
+ unsigned long Event,
+ void *Buffer)
+{
+ if (!(Event == SYS_RESTART || Event == SYS_HALT || Event == SYS_POWER_OFF))
+ return NOTIFY_DONE;
+ DAC960_Finalize();
X return NOTIFY_OK;
X }
X
@@ -2552,11 +2755,9 @@
X char *LastDataEndPointer = NULL;
X int SegmentNumber = 0;
X if (Command->CommandType == DAC960_ReadCommand)
- CommandMailbox->Type5.CommandOpcode =
- DAC960_V1_ReadWithOldScatterGather;
+ CommandMailbox->Type5.CommandOpcode = DAC960_V1_ReadWithScatterGather;
X else
- CommandMailbox->Type5.CommandOpcode =
- DAC960_V1_WriteWithOldScatterGather;
+ CommandMailbox->Type5.CommandOpcode = DAC960_V1_WriteWithScatterGather;
X CommandMailbox->Type5.LD.TransferLength = Command->BlockCount;
X CommandMailbox->Type5.LD.LogicalDriveNumber = Command->LogicalDriveNumber;
X CommandMailbox->Type5.LogicalBlockAddress = Command->BlockNumber;
@@ -2976,12 +3177,12 @@
X Controller, Command->V1.CommandStatus, CommandName);
X break;
X }
- DAC960_Error(" /dev/rd/c%dd%d: absolute blocks %d..%d\n",
+ DAC960_Error(" /dev/rd/c%dd%d: absolute blocks %u..%u\n",
X Controller, Controller->ControllerNumber,
X Command->LogicalDriveNumber, Command->BlockNumber,
X Command->BlockNumber + Command->BlockCount - 1);
X if (DAC960_PartitionNumber(Command->BufferHeader->b_rdev) > 0)
- DAC960_Error(" /dev/rd/c%dd%dp%d: relative blocks %d..%d\n",
+ DAC960_Error(" /dev/rd/c%dd%dp%d: relative blocks %u..%u\n",
X Controller, Controller->ControllerNumber,
X Command->LogicalDriveNumber,
X DAC960_PartitionNumber(Command->BufferHeader->b_rdev),
@@ -3144,6 +3345,8 @@
X LogicalDriveNumber,
X Controller->ControllerNumber,
X LogicalDriveNumber);
+ Controller->LogicalDriveCount = NewEnquiry->NumberOfLogicalDrives;
+ DAC960_ComputeGenericDiskInfo(&Controller->GenericDiskInfo);
X }
X if (NewEnquiry->NumberOfLogicalDrives < Controller->LogicalDriveCount)
X {
@@ -3154,8 +3357,9 @@
X LogicalDriveNumber,
X Controller->ControllerNumber,
X LogicalDriveNumber);
+ Controller->LogicalDriveCount = NewEnquiry->NumberOfLogicalDrives;
+ DAC960_ComputeGenericDiskInfo(&Controller->GenericDiskInfo);
X }
- Controller->LogicalDriveCount = NewEnquiry->NumberOfLogicalDrives;
X if (NewEnquiry->StatusFlags.DeferredWriteError !=
X OldEnquiry->StatusFlags.DeferredWriteError)
X DAC960_Critical("Deferred Write Error Flag is now %s\n", Controller,
@@ -3181,6 +3385,8 @@
X Controller->V1.NeedErrorTableInformation = true;
X Controller->V1.NeedDeviceStateInformation = true;
X Controller->V1.StartDeviceStateScan = true;
+ Controller->V1.NeedBackgroundInitializationStatus =
+ Controller->V1.BackgroundInitializationStatusSupported;
X Controller->SecondaryMonitoringTime = jiffies;
X }
X if (NewEnquiry->RebuildFlag == DAC960_V1_StandbyRebuildInProgress ||
@@ -3303,7 +3509,7 @@
X AdditionalSenseCodeQualifier == 0x02))))
X {
X DAC960_Critical("Physical Device %d:%d Error Log: "
- "Sense Key = %d, ASC = %02X, ASCQ = %02X\n",
+ "Sense Key = %X, ASC = %02X, ASCQ = %02X\n",
X Controller,
X EventLogEntry->Channel,
X EventLogEntry->TargetID,
@@ -3513,6 +3719,77 @@
X Controller->EphemeralProgressMessage = false;
X }
X }
+ else if (CommandOpcode == DAC960_V1_BackgroundInitializationControl)
+ {
+ unsigned int LogicalDriveNumber =
+ Controller->V1.BackgroundInitializationStatus.LogicalDriveNumber;
+ unsigned int LogicalDriveSize =
+ Controller->V1.BackgroundInitializationStatus.LogicalDriveSize;
+ unsigned int BlocksCompleted =
+ Controller->V1.BackgroundInitializationStatus.BlocksCompleted;
+ switch (CommandStatus)
+ {
+ case DAC960_V1_NormalCompletion:
+ switch (Controller->V1.BackgroundInitializationStatus.Status)
+ {
+ case DAC960_V1_BackgroundInitializationInvalid:
+ break;
+ case DAC960_V1_BackgroundInitializationStarted:
+ DAC960_Progress("Background Initialization Started\n",
+ Controller);
+ break;
+ case DAC960_V1_BackgroundInitializationInProgress:
+ if (BlocksCompleted ==
+ Controller->V1.LastBackgroundInitializationStatus
+ .BlocksCompleted &&
+ LogicalDriveNumber ==
+ Controller->V1.LastBackgroundInitializationStatus
+ .LogicalDriveNumber)
+ break;
+ Controller->EphemeralProgressMessage = true;
+ DAC960_Progress("Background Initialization in Progress: "
+ "Logical Drive %d (/dev/rd/c%dd%d) "
+ "%d%% completed\n",
+ Controller, LogicalDriveNumber,
+ Controller->ControllerNumber,
+ LogicalDriveNumber,
+ (100 * (BlocksCompleted >> 7))
+ / (LogicalDriveSize >> 7));
+ Controller->EphemeralProgressMessage = false;
+ break;
+ case DAC960_V1_BackgroundInitializationSuspended:
+ DAC960_Progress("Background Initialization Suspended\n",
+ Controller);
+ break;
+ case DAC960_V1_BackgroundInitializationCancelled:
+ DAC960_Progress("Background Initialization Cancelled\n",
+ Controller);
+ break;
+ }
+ memcpy(&Controller->V1.LastBackgroundInitializationStatus,
+ &Controller->V1.BackgroundInitializationStatus,
+ sizeof(DAC960_V1_BackgroundInitializationStatus_T));
+ break;
+ case DAC960_V1_BackgroundInitSuccessful:
+ if (Controller->V1.BackgroundInitializationStatus.Status ==
+ DAC960_V1_BackgroundInitializationInProgress)
+ DAC960_Progress("Background Initialization "
+ "Completed Successfully\n", Controller);
+ Controller->V1.BackgroundInitializationStatus.Status =
+ DAC960_V1_BackgroundInitializationInvalid;
+ break;
+ case DAC960_V1_BackgroundInitAborted:
+ if (Controller->V1.BackgroundInitializationStatus.Status ==
+ DAC960_V1_BackgroundInitializationInProgress)
+ DAC960_Progress("Background Initialization Aborted\n",
+ Controller);
+ Controller->V1.BackgroundInitializationStatus.Status =
+ DAC960_V1_BackgroundInitializationInvalid;
+ break;
+ case DAC960_V1_NoBackgroundInitInProgress:
+ break;
+ }
+ }
X }
X if (CommandType == DAC960_MonitoringCommand)
X {
@@ -3679,6 +3956,17 @@
X DAC960_QueueCommand(Command);
X return;
X }
+ if (Controller->V1.NeedBackgroundInitializationStatus)
+ {
+ Controller->V1.NeedBackgroundInitializationStatus = false;
+ Command->V1.CommandMailbox.Type3B.CommandOpcode =
+ DAC960_V1_BackgroundInitializationControl;
+ Command->V1.CommandMailbox.Type3B.CommandOpcode2 = 0x20;
+ Command->V1.CommandMailbox.Type3B.BusAddress =
+ Virtual_to_Bus32(&Controller->V1.BackgroundInitializationStatus);
+ DAC960_QueueCommand(Command);
+ return;
+ }
X Controller->MonitoringTimerCount++;
X Controller->MonitoringTimer.expires =
X jiffies + DAC960_MonitoringTimerInterval;
@@ -3759,12 +4047,12 @@
X }
X DAC960_Error("Error Condition %s on %s:\n", Controller,
X SenseErrors[Command->V2.RequestSense.SenseKey], CommandName);
- DAC960_Error(" /dev/rd/c%dd%d: absolute blocks %d..%d\n",
+ DAC960_Error(" /dev/rd/c%dd%d: absolute blocks %u..%u\n",
X Controller, Controller->ControllerNumber,
X Command->LogicalDriveNumber, Command->BlockNumber,
X Command->BlockNumber + Command->BlockCount - 1);
X if (DAC960_PartitionNumber(Command->BufferHeader->b_rdev) > 0)
- DAC960_Error(" /dev/rd/c%dd%dp%d: relative blocks %d..%d\n",
+ DAC960_Error(" /dev/rd/c%dd%dp%d: relative blocks %u..%u\n",
X Controller, Controller->ControllerNumber,
X Command->LogicalDriveNumber,
X DAC960_PartitionNumber(Command->BufferHeader->b_rdev),
@@ -3797,11 +4085,14 @@
X { 0x000B, "P Rebuild Failed due to Logical Drive Failure" },
X { 0x000C, "S Offline" },
X { 0x000D, "P Found" },
- { 0x000E, "P Gone" },
+ { 0x000E, "P Removed" },
X { 0x000F, "P Unconfigured" },
X { 0x0010, "P Expand Capacity Started" },
X { 0x0011, "P Expand Capacity Completed" },
X { 0x0012, "P Expand Capacity Failed" },
+ { 0x0013, "P Command Timed Out" },
+ { 0x0014, "P Command Aborted" },
+ { 0x0015, "P Command Retried" },
X { 0x0016, "P Parity Error" },
X { 0x0017, "P Soft Error" },
X { 0x0018, "P Miscellaneous Error" },
@@ -3832,6 +4123,8 @@
X { 0x0031, "P Failed because BDT Write Operation Failed" },
X { 0x0039, "P Missing at Startup" },
X { 0x003A, "P Start Rebuild Failed due to Physical Drive Too Small" },
+ { 0x003C, "P Temporarily Offline Device Automatically Made Online" },
+ { 0x003D, "P Standby Rebuild Started" },
X /* Logical Device Events (0x0080 - 0x00FF) */
X { 0x0080, "M Consistency Check Started" },
X { 0x0081, "M Consistency Check Completed" },
@@ -3854,7 +4147,7 @@
X { 0x0092, "M Initialization Cancelled" },
X { 0x0093, "M Initialization Failed" },
X { 0x0094, "L Found" },
- { 0x0095, "L Gone" },
+ { 0x0095, "L Deleted" },
X { 0x0096, "M Expand Capacity Started" },
X { 0x0097, "M Expand Capacity Completed" },
X { 0x0098, "M Expand Capacity Failed" },
@@ -3864,6 +4157,9 @@
X { 0x009C, "L Bad Data Block Found" },
X { 0x009E, "L Read of Data Block in BDT" },
X { 0x009F, "L Write Back Data for Disk Block Lost" },
+ { 0x00A0, "L Temporarily Offline RAID-5/3 Drive Made Online" },
+ { 0x00A1, "L Temporarily Offline RAID-6/1/0/7 Drive Made Online" },
+ { 0x00A2, "L Standby Rebuild Started" },
X /* Fault Management Events (0x0100 - 0x017F) */
X { 0x0140, "E Fan %d Failed" },
X { 0x0141, "E Fan %d OK" },
@@ -3871,24 +4167,31 @@
X { 0x0143, "E Power Supply %d Failed" },
X { 0x0144, "E Power Supply %d OK" },
X { 0x0145, "E Power Supply %d Not Present" },
- { 0x0146, "E Temperature Sensor %d Failed" },
- { 0x0147, "E Temperature Sensor %d Critical" },
- { 0x0148, "E Temperature Sensor %d OK" },
+ { 0x0146, "E Temperature Sensor %d Temperature Exceeds Safe Limit" },
+ { 0x0147, "E Temperature Sensor %d Temperature Exceeds Working Limit" },
+ { 0x0148, "E Temperature Sensor %d Temperature Normal" },
X { 0x0149, "E Temperature Sensor %d Not Present" },
- { 0x014A, "E Unit %d Access Critical" },
- { 0x014B, "E Unit %d Access OK" },
- { 0x014C, "E Unit %d Access Offline" },
+ { 0x014A, "E Enclosure Management Unit %d Access Critical" },
+ { 0x014B, "E Enclosure Management Unit %d Access OK" },
+ { 0x014C, "E Enclosure Management Unit %d Access Offline" },
X /* Controller Events (0x0180 - 0x01FF) */
X { 0x0181, "C Cache Write Back Error" },
X { 0x0188, "C Battery Backup Unit Found" },
X { 0x0189, "C Battery Backup Unit Charge Level Low" },
X { 0x018A, "C Battery Backup Unit Charge Level OK" },
X { 0x0193, "C Installation Aborted" },
- { 0x0195, "C Mirror Race Recovery In Progress" },
- { 0x0196, "C Mirror Race on Critical Drive" },
- { 0x019E, "C Memory Soft ECC Error" },
- { 0x019F, "C Memory Hard ECC Error" },
+ { 0x0195, "C Battery Backup Unit Physically Removed" },
+ { 0x0196, "C Memory Error During Warm Boot" },
+ { 0x019E, "C Memory Soft ECC Error Corrected" },
+ { 0x019F, "C Memory Hard ECC Error Corrected" },
X { 0x01A2, "C Battery Backup Unit Failed" },
+ { 0x01AB, "C Mirror Race Recovery Failed" },
+ { 0x01AC, "C Mirror Race on Critical Drive" },
+ /* Controller Internal Processor Events */
+ { 0x0380, "C Internal Controller Hung" },
+ { 0x0381, "C Internal Controller Firmware Breakpoint" },
+ { 0x0390, "C Internal Controller i960 Processor Specific Error" },
+ { 0x03A0, "C Internal Controller StrongARM Processor Specific Error" },
X { 0, "" } };
X int EventListIndex = 0, EventCode;
X unsigned char EventType, *EventMessage;
@@ -3938,7 +4241,7 @@
X DAC960_Critical("Physical Device %d:%d %s\n", Controller,
X Event->Channel, Event->TargetID, EventMessage);
X DAC960_Critical("Physical Device %d:%d Request Sense: "
- "Sense Key = %d, ASC = %02X, ASCQ = %02X\n",
+ "Sense Key = %X, ASC = %02X, ASCQ = %02X\n",
X Controller,
X Event->Channel,
X Event->TargetID,
@@ -4265,22 +4568,34 @@
X {
X if (NewPhysicalDeviceInfo->PhysicalDeviceState !=
X PhysicalDeviceInfo->PhysicalDeviceState)
- DAC960_Critical("Physical Device %d:%d is now %s\n", Controller,
- NewPhysicalDeviceInfo->Channel,
- NewPhysicalDeviceInfo->TargetID,
- (NewPhysicalDeviceInfo->PhysicalDeviceState
- == DAC960_V2_Device_Unconfigured
- ? "UNCONFIGURED"
- : NewPhysicalDeviceInfo->PhysicalDeviceState
- == DAC960_V2_Device_Online
- ? "ONLINE"
- : NewPhysicalDeviceInfo->PhysicalDeviceState
- == DAC960_V2_Device_WriteOnly
- ? "WRITE-ONLY"
- : NewPhysicalDeviceInfo
- ->PhysicalDeviceState
- == DAC960_V2_Device_Dead
- ? "DEAD" : "STANDBY"));
+ DAC960_Critical(
+ "Physical Device %d:%d is now %s\n", Controller,
+ NewPhysicalDeviceInfo->Channel,
+ NewPhysicalDeviceInfo->TargetID,
+ (NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Online
+ ? "ONLINE"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Rebuild
+ ? "REBUILD"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Missing
+ ? "MISSING"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Critical
+ ? "CRITICAL"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Dead
+ ? "DEAD"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_SuspectedDead
+ ? "SUSPECTED-DEAD"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_CommandedOffline
+ ? "COMMANDED-OFFLINE"
+ : NewPhysicalDeviceInfo->PhysicalDeviceState
+ == DAC960_V2_Device_Standby
+ ? "STANDBY" : "UNKNOWN"));
X if ((NewPhysicalDeviceInfo->ParityErrors !=
X PhysicalDeviceInfo->ParityErrors) ||
X (NewPhysicalDeviceInfo->SoftErrors !=
@@ -4386,13 +4701,16 @@
X (LogicalDeviceInfo != NULL
X ? "" : " - Allocation Failed"));
X if (LogicalDeviceInfo != NULL)
- memset(LogicalDeviceInfo, 0,
- sizeof(DAC960_V2_LogicalDeviceInfo_T));
+ {
+ memset(LogicalDeviceInfo, 0,
+ sizeof(DAC960_V2_LogicalDeviceInfo_T));
+ DAC960_ComputeGenericDiskInfo(&Controller->GenericDiskInfo);
+ }
X }
X if (LogicalDeviceInfo != NULL)
X {
X unsigned long LogicalDeviceSize =
- NewLogicalDeviceInfo->ConfigurableDeviceSizeIn512ByteBlocksOrMB;
+ NewLogicalDeviceInfo->ConfigurableDeviceSize;
X if (NewLogicalDeviceInfo->LogicalDeviceState !=
X LogicalDeviceInfo->LogicalDeviceState)
X DAC960_Critical("Logical Drive %d (/dev/rd/c%dd%d) "
@@ -4503,6 +4821,7 @@
X kfree(LogicalDeviceInfo);
X Controller->LogicalDriveInitiallyAccessible
X [LogicalDriveNumber] = false;
+ DAC960_ComputeGenericDiskInfo(&Controller->GenericDiskInfo);
X }
X Controller->V2.NeedLogicalDeviceInformation = false;
X }
@@ -4908,6 +5227,85 @@
X
X
X /*
+ DAC960_P_InterruptHandler handles hardware interrupts from DAC960 P Series
+ Controllers.
+*/
+
+static void DAC960_P_InterruptHandler(int IRQ_Channel,
+ void *DeviceIdentifier,
+ Registers_T *InterruptRegisters)
+{
+ DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+ void *ControllerBaseAddress = Controller->BaseAddress;
+ ProcessorFlags_T ProcessorFlags;
+ /*
+ Acquire exclusive access to Controller.
+ */
+ DAC960_AcquireControllerLockIH(Controller, &ProcessorFlags);
+ /*
+ Process Hardware Interrupts for Controller.
+ */
+ while (DAC960_PD_StatusAvailableP(ControllerBaseAddress))
+ {
+ DAC960_V1_CommandIdentifier_T CommandIdentifier =
+ DAC960_PD_ReadStatusCommandIdentifier(ControllerBaseAddress);
+ DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1];
+ DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox;
+ DAC960_V1_CommandOpcode_T CommandOpcode =
+ CommandMailbox->Common.CommandOpcode;
+ Command->V1.CommandStatus =
+ DAC960_PD_ReadStatusRegister(ControllerBaseAddress);
+ DAC960_PD_AcknowledgeInterrupt(ControllerBaseAddress);
+ DAC960_PD_AcknowledgeStatus(ControllerBaseAddress);
+ switch (CommandOpcode)
+ {
+ case DAC960_V1_Enquiry_Old:
+ Command->V1.CommandMailbox.Common.CommandOpcode = DAC960_V1_Enquiry;
+ DAC960_P_To_PD_TranslateEnquiry(
+ Bus32_to_Virtual(CommandMailbox->Type3.BusAddress));
+ break;
+ case DAC960_V1_GetDeviceState_Old:
+ Command->V1.CommandMailbox.Common.CommandOpcode =
+ DAC960_V1_GetDeviceState;
+ DAC960_P_To_PD_TranslateDeviceState(
+ Bus32_to_Virtual(CommandMailbox->Type3.BusAddress));
+ break;
+ case DAC960_V1_Read_Old:
+ Command->V1.CommandMailbox.Common.CommandOpcode = DAC960_V1_Read;
+ DAC960_P_To_PD_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ case DAC960_V1_Write_Old:
+ Command->V1.CommandMailbox.Common.CommandOpcode = DAC960_V1_Write;
+ DAC960_P_To_PD_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ case DAC960_V1_ReadWithScatterGather_Old:
+ Command->V1.CommandMailbox.Common.CommandOpcode =
+ DAC960_V1_ReadWithScatterGather;
+ DAC960_P_To_PD_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ case DAC960_V1_WriteWithScatterGather_Old:
+ Command->V1.CommandMailbox.Common.CommandOpcode =
+ DAC960_V1_WriteWithScatterGather;
+ DAC960_P_To_PD_TranslateReadWriteCommand(CommandMailbox);
+ break;
+ default:
+ break;
+ }
+ DAC960_V1_ProcessCompletedCommand(Command);
+ }
+ /*
+ Attempt to remove additional I/O Requests from the Controller's
+ I/O Request Queue and queue them to the Controller.
+ */
+ while (DAC960_ProcessRequest(Controller, false)) ;
+ /*
+ Release exclusive access to Controller.
+ */
+ DAC960_ReleaseControllerLockIH(Controller, &ProcessorFlags);
+}
+
+
+/*
X DAC960_V1_QueueMonitoringCommand queues a Monitoring Command to DAC960 V1
X Firmware Controllers.
X */
@@ -5004,8 +5402,7 @@
X Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
X if (LogicalDeviceInfo == NULL) continue;
X if (!LogicalDeviceInfo->LogicalDeviceControl
- .LogicalDeviceInitialized &&
- Controller->LogicalDriveUsageCount[LogicalDriveNumber] > 0)
+ .LogicalDeviceInitialized)
X {
X ForceMonitoringCommand = true;
X break;
@@ -5093,8 +5490,8 @@
X if (!Controller->LogicalDriveInitiallyAccessible[LogicalDriveNumber])
X {
X Controller->LogicalDriveInitiallyAccessible[LogicalDriveNumber] = true;
- DAC960_InitializeGenericDiskInfo(&Controller->GenericDiskInfo);
- resetup_one_dev(&Controller->GenericDiskInfo, LogicalDriveNumber);
+ DAC960_ComputeGenericDiskInfo(&Controller->GenericDiskInfo);
+ DAC960_RegisterDisk(Controller, LogicalDriveNumber);
X }
X if (Controller->GenericDiskInfo.sizes[MINOR(Inode->i_rdev)] == 0)
X return -ENXIO;
@@ -5177,7 +5574,7 @@
X Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
X if (LogicalDeviceInfo == NULL)
X return -EINVAL;
- switch(LogicalDeviceInfo->DriveGeometry)
+ switch (LogicalDeviceInfo->DriveGeometry)
X {
X case DAC960_V2_Geometry_128_32:
X Geometry.heads = 128;
@@ -5193,7 +5590,7 @@
X return -EINVAL;
X }
X Geometry.cylinders =
- LogicalDeviceInfo->ConfigurableDeviceSizeIn512ByteBlocksOrMB
+ LogicalDeviceInfo->ConfigurableDeviceSize
X / (Geometry.heads * Geometry.sectors);
X }
X Geometry.start =
@@ -5202,10 +5599,10 @@
X sizeof(DiskGeometry_T)) ? -EFAULT : 0);
X case BLKGETSIZE:
X /* Get Device Size. */
- if ((long *) Argument == NULL) return -EINVAL;
+ if ((unsigned long *) Argument == NULL) return -EINVAL;
X return put_user(Controller->GenericDiskInfo.part[MINOR(Inode->i_rdev)]
X .nr_sects,
- (long *) Argument);
+ (unsigned long *) Argument);
X case BLKRAGET:
X /* Get Read-Ahead. */
X if ((int *) Argument == NULL) return -EINVAL;
@@ -5259,7 +5656,7 @@
X */
X set_blocksize(Device, BLOCK_SIZE);
X }
- resetup_one_dev(&Controller->GenericDiskInfo, LogicalDriveNumber);
+ DAC960_RegisterDisk(Controller, LogicalDriveNumber);
X return 0;
X }
X return -EINVAL;
@@ -6491,6 +6888,43 @@
X == DAC960_V2_NormalCompletion
X ? "Cancelled" : "Not Cancelled"));
X }
+ else if (strcmp(UserCommand, "perform-discovery") == 0)
+ {
+ CommandMailbox->Common.IOCTL_Opcode = DAC960_V2_StartDiscovery;
+ DAC960_ExecuteCommand(Command);
+ DAC960_UserCritical("Discovery %s\n", Controller,
+ (Command->V2.CommandStatus
+ == DAC960_V2_NormalCompletion
+ ? "Initiated" : "Not Initiated"));
+ if (Command->V2.CommandStatus == DAC960_V2_NormalCompletion)
+ {
+ CommandMailbox->ControllerInfo.CommandOpcode = DAC960_V2_IOCTL;
+ CommandMailbox->ControllerInfo.CommandControlBits
+ .DataTransferControllerToHost = true;
+ CommandMailbox->ControllerInfo.CommandControlBits
+ .NoAutoRequestSense = true;
+ CommandMailbox->ControllerInfo.DataTransferSize =
+ sizeof(DAC960_V2_ControllerInfo_T);
+ CommandMailbox->ControllerInfo.ControllerNumber = 0;
+ CommandMailbox->ControllerInfo.IOCTL_Opcode =
+ DAC960_V2_GetControllerInfo;
+ CommandMailbox->ControllerInfo.DataTransferMemoryAddress
+ .ScatterGatherSegments[0]
+ .SegmentDataPointer =
+ Virtual_to_Bus64(&Controller->V2.NewControllerInformation);
+ CommandMailbox->ControllerInfo.DataTransferMemoryAddress
+ .ScatterGatherSegments[0]
+ .SegmentByteCount =
+ CommandMailbox->ControllerInfo.DataTransferSize;
+ DAC960_ExecuteCommand(Command);
+ while (Controller->V2.NewControllerInformation.PhysicalScanActive)
+ {
+ DAC960_ExecuteCommand(Command);
+ sleep_on_timeout(&Controller->CommandWaitQueue, HZ);
+ }
+ DAC960_UserCritical("Discovery Completed\n", Controller);
+ }
+ }
X else if (strcmp(UserCommand, "suppress-enclosure-messages") == 0)
X Controller->SuppressEnclosureMessages = true;
X else DAC960_UserCritical("Illegal User Command: '%s'\n",
@@ -6652,8 +7086,8 @@
X
X
X /*
- DAC960_CreateProcEntries creates the /proc/rd/... entries for the DAC960
- Driver.
+ DAC960_CreateProcEntries creates the /proc/rd/... entries for the
+ DAC960 Driver.
X */
X
X static void DAC960_CreateProcEntries(void)
@@ -6710,8 +7144,8 @@
X
X
X /*
- DAC960_DestroyProcEntries destroys the /proc/rd/... entries for the DAC960
- Driver.
+ DAC960_DestroyProcEntries destroys the /proc/rd/... entries for the
+ DAC960 Driver.
X */
X
X static void DAC960_DestroyProcEntries(void)
@@ -6729,28 +7163,13 @@
X
X int init_module(void)
X {
- int ControllerNumber, LogicalDriveNumber;
- DAC960_Initialize();
- if (DAC960_ActiveControllerCount == 0) return -1;
- for (ControllerNumber = 0;
- ControllerNumber < DAC960_ControllerCount;
- ControllerNumber++)
- {
- DAC960_Controller_T *Controller = DAC960_Controllers[ControllerNumber];
- if (Controller == NULL) continue;
- DAC960_InitializeGenericDiskInfo(&Controller->GenericDiskInfo);
- for (LogicalDriveNumber = 0;
- LogicalDriveNumber < Controller->LogicalDriveCount;
- LogicalDriveNumber++)
- resetup_one_dev(&Controller->GenericDiskInfo, LogicalDriveNumber);
- }
- return 0;
+ return DAC960_Initialize();
X }
X
X
X void cleanup_module(void)
X {
- DAC960_Finalize(&DAC960_NotifierBlock, SYS_RESTART, NULL);
+ DAC960_Finalize();
X }
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/DAC960.h linux/drivers/block/DAC960.h
--- v2.2.19/drivers/block/DAC960.h Sun Mar 25 17:37:30 2001
+++ linux/drivers/block/DAC960.h Wed Oct 31 14:15:06 2001
@@ -224,9 +224,9 @@
X DAC960_V1_ReadExtendedWithScatterGather = 0xB3,
X DAC960_V1_WriteExtendedWithScatterGather = 0xB4,
X DAC960_V1_Read = 0x36,
- DAC960_V1_ReadWithOldScatterGather = 0xB6,
+ DAC960_V1_ReadWithScatterGather = 0xB6,
X DAC960_V1_Write = 0x37,
- DAC960_V1_WriteWithOldScatterGather = 0xB7,
+ DAC960_V1_WriteWithScatterGather = 0xB7,
X DAC960_V1_DCDB = 0x04,
X DAC960_V1_DCDBWithScatterGather = 0x84,
X DAC960_V1_Flush = 0x0A,
@@ -280,7 +280,14 @@
X DAC960_V1_RunDiagnostic = 0x32,
X /* Subsystem Service Commands */
X DAC960_V1_GetSubsystemData = 0x70,
- DAC960_V1_SetSubsystemParameters = 0x71
+ DAC960_V1_SetSubsystemParameters = 0x71,
+ /* Version 2.xx Firmware Commands */
+ DAC960_V1_Enquiry_Old = 0x05,
+ DAC960_V1_GetDeviceState_Old = 0x14,
+ DAC960_V1_Read_Old = 0x02,
+ DAC960_V1_Write_Old = 0x03,
+ DAC960_V1_ReadWithScatterGather_Old = 0x82,
+ DAC960_V1_WriteWithScatterGather_Old = 0x83
X }
X __attribute__ ((packed))
X DAC960_V1_CommandOpcode_T;
@@ -327,6 +334,9 @@
X #define DAC960_V1_RebuildFailed_NewDriveFailed 0x0004 /* Consistency */
X #define DAC960_V1_RebuildSuccessful 0x0100 /* Consistency */
X #define DAC960_V1_RebuildSuccessfullyTerminated 0x0107 /* Consistency */
+#define DAC960_V1_BackgroundInitSuccessful 0x0100 /* Consistency */
+#define DAC960_V1_BackgroundInitAborted 0x0005 /* Consistency */
+#define DAC960_V1_NoBackgroundInitInProgress 0x0105 /* Consistency */
X #define DAC960_V1_AddCapacityInProgress 0x0004 /* Consistency */
X #define DAC960_V1_AddCapacityFailedOrSuspended 0x00F4 /* Consistency */
X #define DAC960_V1_Config2ChecksumError 0x0002 /* Configuration */
@@ -634,6 +644,8 @@
X
X /*
X Define the DAC960 V1 Firmware Get Device State Command reply structure.
+ The structure is padded by 2 bytes for compatibility with Version 2.xx
+ Firmware.
X */
X
X typedef struct DAC960_V1_DeviceState
@@ -658,6 +670,7 @@
X unsigned char SynchronousOffset:5; /* Byte 5 Bits 0-4 */
X unsigned char :3; /* Byte 5 Bits 5-7 */
X unsigned int DiskSize __attribute__ ((packed)); /* Bytes 6-9 */
+ unsigned short :16; /* Bytes 10-11 */
X }
X DAC960_V1_DeviceState_T;
X
@@ -676,6 +689,30 @@
X
X
X /*
+ Define the DAC960 V1 Firmware Background Initialization Status Command
+ reply structure.
+*/
+
+typedef struct DAC960_V1_BackgroundInitializationStatus
+{
+ unsigned int LogicalDriveSize; /* Bytes 0-3 */
+ unsigned int BlocksCompleted; /* Bytes 4-7 */
+ unsigned char Reserved1[12]; /* Bytes 8-19 */
+ unsigned int LogicalDriveNumber; /* Bytes 20-23 */
+ unsigned char RAIDLevel; /* Byte 24 */
+ enum {
+ DAC960_V1_BackgroundInitializationInvalid = 0x00,
+ DAC960_V1_BackgroundInitializationStarted = 0x02,
+ DAC960_V1_BackgroundInitializationInProgress = 0x04,
+ DAC960_V1_BackgroundInitializationSuspended = 0x05,
+ DAC960_V1_BackgroundInitializationCancelled = 0x06
+ } __attribute__ ((packed)) Status; /* Byte 25 */
+ unsigned char Reserved2[6]; /* Bytes 26-31 */
+}
+DAC960_V1_BackgroundInitializationStatus_T;
+
+
+/*
X Define the DAC960 V1 Firmware Error Table Entry structure.
X */
X
@@ -853,6 +890,14 @@
X struct {
X DAC960_V1_CommandOpcode_T CommandOpcode; /* Byte 0 */
X DAC960_V1_CommandIdentifier_T CommandIdentifier; /* Byte 1 */
+ unsigned char CommandOpcode2; /* Byte 2 */
+ unsigned char Dummy1[5]; /* Bytes 3-7 */
+ DAC960_BusAddress32_T BusAddress; /* Bytes 8-11 */
+ unsigned char Dummy2[4]; /* Bytes 12-15 */
+ } __attribute__ ((packed)) Type3B;
+ struct {
+ DAC960_V1_CommandOpcode_T CommandOpcode; /* Byte 0 */
+ DAC960_V1_CommandIdentifier_T CommandIdentifier; /* Byte 1 */
X unsigned char Dummy1[5]; /* Bytes 2-6 */
X unsigned char LogicalDriveNumber:6; /* Byte 7 Bits 0-6 */
X boolean AutoRestore:1; /* Byte 7 Bit 7 */
@@ -956,6 +1001,7 @@
X DAC960_V2_GetPhysicalDeviceInfoValid = 0x05,
X DAC960_V2_GetHealthStatus = 0x11,
X DAC960_V2_GetEvent = 0x15,
+ DAC960_V2_StartDiscovery = 0x81,
X DAC960_V2_SetDeviceState = 0x82,
X DAC960_V2_RebuildDeviceStart = 0x88,
X DAC960_V2_RebuildDeviceStop = 0x89,
@@ -982,7 +1028,10 @@
X
X #define DAC960_V2_NormalCompletion 0x00
X #define DAC960_V2_AbormalCompletion 0x02
+#define DAC960_V2_DeviceBusy 0x08
X #define DAC960_V2_DeviceNonresponsive 0x0E
+#define DAC960_V2_DeviceNonresponsive2 0x0F
+#define DAC960_V2_DeviceRevervationConflict 0x18
X
X typedef unsigned char DAC960_V2_CommandStatus_T;
X
@@ -1056,7 +1105,8 @@
X DAC960_V2_EXR2000P = 0x1C,
X DAC960_V2_EXR3000P = 0x1D,
X DAC960_V2_AcceleRAID352 = 0x1E,
- DAC960_V2_AcceleRAID351 = 0x1F,
+ DAC960_V2_AcceleRAID170 = 0x1F,
+ DAC960_V2_AcceleRAID160 = 0x20,
X DAC960_V2_DAC960S = 0x60,
X DAC960_V2_DAC960SU = 0x61,
X DAC960_V2_DAC960SX = 0x62,
@@ -1073,7 +1123,9 @@
X unsigned char :8; /* Byte 3 */
X unsigned short BusInterfaceSpeedMHz; /* Bytes 4-5 */
X unsigned char BusWidthBits; /* Byte 6 */
- unsigned char Reserved1[9]; /* Bytes 7-15 */
+ unsigned char FlashCodeTypeOrProductID; /* Byte 7 */
+ unsigned char NumberOfHostPortsPresent; /* Byte 8 */
+ unsigned char Reserved1[7]; /* Bytes 9-15 */
X unsigned char BusInterfaceName[16]; /* Bytes 16-31 */
X unsigned char ControllerName[16]; /* Bytes 32-47 */
X unsigned char Reserved2[16]; /* Bytes 48-63 */
@@ -1102,17 +1154,17 @@
X unsigned char HardwareManufacturingMonth; /* Byte 85 */
X unsigned char HardwareManufacturingYearHigh2Digits; /* Byte 86 */
X unsigned char HardwareManufacturingYearLow2Digits; /* Byte 87 */
- unsigned char MaximumNumberOfPDDperXLDD; /* Byte 88 */
- unsigned char MaximumNumberOfILDDperXLDD; /* Byte 89 */
+ unsigned char MaximumNumberOfPDDperXLD; /* Byte 88 */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 09'
echo 'File patch-2.2.20 is continued in part 10'
echo "10" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:01 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part02

#!/bin/sh -x
# this is part 02 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh

# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 02; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'

sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X CONFIG_MSNDCLAS_INIT_FILE
X The MultiSound cards have two firmware files which are required for
@@ -11178,6 +12112,51 @@


X See Documentation/sound/MultiSound for important information about
X this driver.
X

+MSND Pinnacle IDE I/O 0
+CONFIG_MSNDPIN_IDE_IO0
+ CD-ROM drive 0 memory-mapped I/O base address for the MultiSound Pinnacle
+ and Fiji sound cards.
+
+MSND Pinnacle IDE I/O 1
+CONFIG_MSNDPIN_IDE_IO1
+ CD-ROM drive 1 memory-mapped I/O base address for the MultiSound Pinnacle
+ and Fiji sound cards.
+
+MSND Pinnacle IDE IRQ
+CONFIG_MSNDPIN_IDE_IRQ
+ Interrupt request number for the IDE CD-ROM interface on the
+ MultiSound Pinnacle and Fiji sound cards.
+
+MSND Pinnacle I/O
+CONFIG_MSNDPIN_IO
+ Memory-mapped I/O base address for the primary synthesizer on
+ MultiSound Pinnacle and Fiji sound cards.
+
+MSND Pinnacle MPU I/O
+CONFIG_MSNDPIN_MPU_IO
+ Memory-mapped I/O base address for the Kurzweil daughterboard
+ synthesizer on MultiSound Pinnacle and Fiji sound cards.
+
+MSND Pinnacle MPU IRQ
+CONFIG_MSNDPIN_MPU_IRQ
+ Iinterrupt request number for the Kurzweil daughterboard
+ synthesizer on MultiSound Pinnacle and Fiji sound cards.
+
+MSND Pinnacle IRQ
+CONFIG_MSNDPIN_IRQ
+ Interrupt request line for the primary synthesizer on MultiSound
+ Pinnacle and Fiji sound cards.
+
+MSND Pinnacle joystick I/O
+CONFIG_MSNDPIN_JOYSTICK_IO
+ Memory-mapped I/O base address for the joystick port on MultiSound Pinnacle
+ and Fiji sound cards.
+
+MSND Pinnacle memory
+CONFIG_MSNDPIN_MEM
+ Memory-mapped I/O base address for the primary synthesizer on
+ MultiSound Pinnacle and Fiji sound cards.
+
X Full pathname of PNDSPINI.BIN firmware file
X CONFIG_MSNDPIN_INIT_FILE
X The MultiSound cards have two firmware files which are required for
@@ -11373,6 +12352,17 @@
X DSP 16 card. Enter: 0 for Sony, 1 for Panasonic, 2 for IDE, 4 for no
X CDROM present.
X
+SC-6600 CD-ROM Interface I/O Address
+CONFIG_SC6600_CDROMBASE
+ Base I/O port address for the CD-ROM interface of the Audio Excel
+ DSP 16 card.
+
+C-Media PCI (CMI8338/8378)
+CONFIG_SOUND_CMPCI
+ Say Y or M if you have a PCI sound card using the CMI8338
+ or the CMI8378 chip.set. Data on this chip is available at
+ <http://www.cmedia.com.tw/doc8338.htm>.
+
X Audio Excel DSP 16 (MPU401 emulation)
X CONFIG_AEDSP16_MPU401
X Answer Y if you want your audio card to emulate the MPU-401 midi
@@ -11502,6 +12492,11 @@
X of PCI sound chips. This includes the Allegro sound chip that is
X a lighter version of the Maestro3.
X
+Intel ICH audio support
+CONFIG_SOUND_ICH
+ Support for integral audio in Intel's I/O Controller Hub (ICH) chipset,
+ as used on the 810/820/840 motherboards.
+
X Are you using a crosscompiler
X CONFIG_CROSSCOMPILE
X Say Y here if you are compiling the kernel on a different
@@ -11580,6 +12575,15 @@
X This enables Van Jacobson header compression for synchronous PPP.
X Say Y if the other end of the connection supports it.
X
+Support BSD compression
+CONFIG_ISDN_PPP_BSDCOMP
+ Support for the BSD-Compress compression method for PPP, which uses
+ the LZW compression method to compress each PPP packet before it is
+ sent over the wire. The machine at the other end of the PPP link
+ (usually your ISP) has to support the BSD-Compress compression
+ method as well for this to be useful. Even if they don't support it,
+ it is safe to say Y here.
+
X Support audio via ISDN
X CONFIG_ISDN_AUDIO
X If you say Y here, the modem-emulator will support a subset of the
@@ -11958,6 +12962,12 @@
X Interface), a standard making it easy for programs to access ISDN
X hardware, see http://www.capi.org/
X
+CAPI2.0 /dev/capi20 support
+CONFIG_ISDN_CAPI_CAPI20
+ This option will provide the CAPI 2.0 interface to userspace
+ applications via /dev/capi20. Applications should use the standardized
+ libcapi20 to access this functionality. You should say Y/M here.
+
X CAPI2.0 Middleware support
X CONFIG_ISDN_CAPI_MIDDLEWARE
X This option enables CAPI2.0 Middleware support
@@ -11966,6 +12976,13 @@
X CONFIG_ISDN_CAPIFS
X This option enables CAPI CAPI2.0 filesystem support
X
+CAPI2.0 capidrv interface support
+CONFIG_ISDN_CAPI_CAPIDRV
+ This option provides the glue code to hook up CAPI driven cards to
+ the legacy isdn4linux link layer. If you have a card which is supported
+ by a CAPI driver, but still want to use old features like ippp
+ interfaces or ttyI emulation, say Y/M here.
+
X AVM B1 ISA support
X CONFIG_ISDN_DRV_AVMB1_B1ISA
X Enable support for the ISA version of the AVM B1 card.
@@ -12020,6 +13037,17 @@
X WWW, you need to have access to a machine on the Internet that has a
X program like lynx or netscape) or mail to hac...@cafe.anu.edu.au
X
+Hypercope HYSDN cards (Champ, Ergo, Metro) support (module)
+CONFIG_HYSDN
+ Say Y here if you have one of Hypercope's active PCI ISDN cards
+ Champ, Ergo and Metro. You will then get a module called hysdn.o.
+ Please read the file <file:Documentation/isdn/README.hysdn> for more
+ information.
+
+HYSDN CAPI 2.0 support
+CONFIG_HYSDN_CAPI
+ Say Y here if you like to use Hypercope's CAPI 2.0 interface
+
X Support for Sun4 architecture
X CONFIG_SUN4
X Say Y here if, and only if, your machine is a Sun4. Note that
@@ -12031,6 +13059,23 @@
X This is the driver for the Sun ESP SCSI host adapter. The ESP
X chipset is present in most SPARC-based computers.
X
+PTI Qlogic, ISP Driver
+CONFIG_SCSI_QLOGICPTI
+ This driver supports SBUS SCSI controllers from PTI or QLogic. These
+ controllers are known under Solaris as qpti and in the openprom as
+ PTI,ptisp or QLGC,isp. Note that PCI QLogic SCSI controllers are
+ driven by a different driver.
+
+ This support is also available as a module called qlogicpti.o ( =


+ code which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+

+Sun PROM console
+CONFIG_PROM_CONSOLE
+ Say Y to build a console driver for Sun machines that uses the terminal
+ emulation built into their console PROMS.
+
X SPARC /dev/openprom compatibility driver
X CONFIG_SUN_OPENPROMIO
X This driver provides user programs with an interface to the SPARC
@@ -12041,6 +13086,41 @@


X inserted in and removed from the running kernel whenever you want),

X say M and read Documentation/modules.txt. If unsure, say Y.
X
+Openprom tree appears in /proc/openprom
+CONFIG_SUN_OPENPROMFS
+ If you say Y, the OpenPROM device tree will be available as a
+ virtual file system, which you can mount to /proc/openprom by "mount
+ -t openpromfs none /proc/openprom".
+
+ If you want to compile the /proc/openprom support as a module ( =


+ code which can be inserted in and removed from the running kernel

+ whenever you want), say M here and read <file:Documentation/modules.txt>.
+ The module will be called openpromfs.o. If unsure, say M.
+
+Kernel support for Linux/Sparc 32bit binary compatibility
+CONFIG_SPARC32_COMPAT
+ This allows you to run 32-bit binaries on your Ultra.
+ Everybody wants this; say Y.
+
+Kernel support for 32-bit ELF binaries
+CONFIG_BINFMT_ELF32
+ This allows you to run 32-bit Linux/ELF binaries on your Ultra.
+ Everybody wants this; say Y.
+
+Kernel support for 32-bit (ie. SunOS) a.out binaries
+CONFIG_BINFMT_AOUT32
+ This allows you to run 32-bit a.out format binaries on your Ultra.
+ If you want to run SunOS binaries (see SunOS binary emulation below)
+ or other a.out binaries, say Y. If unsure, say N.
+
+SunOS binary emulation
+CONFIG_SUNOS_EMUL
+ This allows you to run most SunOS binaries. If you want to do this,
+ say Y here and place appropriate files in /usr/gnemul/sunos. See
+ <http://www.ultralinux.org/faq.html>for more information. If you want
+ to run SunOS binaries on an Ultra you must also say Y to "Kernel
+ support for 32-bit a.out binaries" above.
+
X Mostek real time clock support
X CONFIG_SUN_MOSTEK_RTC
X The Mostek RTC chip is used on all knows Sun computers except
@@ -12049,12 +13129,69 @@
X
X Say Y here unless you are building a special purpose kernel.
X
-#
-#Siemens SAB82532 serial support
-#CONFIG_SAB82532
-###
-### Please someone fill these in.
-###
+OBP Flash Device support
+CONFIG_OBP_FLASH
+ The OpenBoot PROM on Ultra systems is flashable. If you want to be
+ able to upgrade the OBP firmware, say Y here.
+
+Siemens SAB82532 serial support
+CONFIG_SAB82532
+ This driver supports the serial ports on newer (PCI) Ultra systems.
+ Say Y if you want to be able to use your serial ports.
+
+Videopix Frame Grabber
+CONFIG_SUN_VIDEOPIX
+ Say Y here to support the Videopix Frame Grabber from Sun
+ Microsystems, commonly found on SPARCstations. This card, which is
+ based on the Phillips SAA9051, can handle NTSC and PAL/SECAM and
+ SVIDEO signals.
+
+Sun bidirectional parallel port support
+CONFIG_SUN_BPP
+ Say Y here to support Sun's obsolete variant of IEEE1284
+ bidirectional parallel port protocol as /dev/bppX. Can be built on
+ x86 machines.
+
+Aurora Multiboard 1600se
+CONFIG_SUN_AURORA
+ The Aurora Multiboard is a multi-port high-speed serial controller.
+ If you have one of these, say Y.
+
+Audio support
+CONFIG_SPARCAUDIO
+ This driver provides support for the build-in sound devices on most
+ Sun machines. If you want to be able to use this, select this option
+ and one or more of the lowlevel drivers below. See
+ <http://www.dementia.org/~shadow/sparcaudio.html>for more
+ information.
+
+AMD7930 Lowlevel Driver
+CONFIG_SPARCAUDIO_AMD7930
+ This driver supports the AMD 7930 chip found on sun4c, 4/6xx, and
+ SparcClassic systems.
+
+CS4231 Lowlevel Driver
+CONFIG_SPARCAUDIO_CS4231
+ This driver supports the Crystal Semiconductor CS4231 chip found on
+ the SS4, SS5, and Ultras.
+
+DBRI Lowlevel Driver
+CONFIG_SPARCAUDIO_DBRI
+ This driver supports the DBRI audio interface found on the SS10,
+ SS20, Sparcbook 3, and Voyager systems.
+
+Dummy Lowlevel Driver
+CONFIG_SPARCAUDIO_DUMMY
+ This is a pseudo-driver used for debugging and testing the
+ sparcaudio subsystem. Say N unless you want to work on this
+ subsystem.
+
+/proc/hardware support
+CONFIG_PROC_HARDWARE
+ Say Y here to support the /proc/hardware file, which gives you
+ access to information about the machine you're running on,
+ including the model, CPU, MMU, clock speed, BogoMIPS rating,
+ and memory size.
X
X #
X # m68k-specific kernel options
@@ -12066,6 +13203,16 @@
X you plan to use this kernel on an Amiga, say Y here and browse the
X material available in Documentation/m68k; otherwise say N.
X
+A4000T SCSI support
+CONFIG_A4000T_SCSI
+ Support for the NCR53C710 SCSI controller on the Amiga 4000T.
+
+A4091 SCSI support
+CONFIG_A4091_SCSI
+ Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller
+ (1993). Very obscure -- the 4091 was part of an Amiga 4000 upgrade plan
+ at the time the Amiga business was sold to DKB.
+
X Atari support
X CONFIG_ATARI
X This option enables support for the 68000-based Atari series of
@@ -12094,6 +13241,49 @@
X If you plan to try to use the kernel on such a machine say Y here.
X Everybody else says N.
X
+Q40/Q60 support
+CONFIG_Q40
+ The Q40 is a Motorola 68040-based successor to the Sinclair QL
+ manufactured in Germany. There is an official Q40 home page at
+ <http://www.q40.de/>. This option enables support for the Q40 and Q60.
+ Select your CPU below. For 68LC060 don't forget to enable FPU emulation.
+
+Sun 3 support
+CONFIG_SUN3
+ This option enables support for the Sun 3 series of workstations.
+ Currently, only the Sun 3/80 is supported within the Sun 3x family.
+ You will also want to enable 68030 support. General Linux
+ information on the Sun 3x series (now discontinued) is at
+ <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+ If you don't want to compile a kernel for a Sun 3, say N.
+
+Sun 3X support
+CONFIG_SUN3X
+ This option enables support for the Sun 3x series of workstations.
+ Be warned that this support is very experimental. You will also want
+ to say Y to 68020 support and N to the other processors below.
+ General Linux information on the Sun 3x series (now discontinued)
+ is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+ If you don't want to compile a kernel for a Sun 3x, say N.
+
+Sun3x builtin serial support
+CONFIG_SUN3X_ZS
+ ZS refers to a type of asynchronous serial port built in to the Sun3
+ and Sun3x workstations; if you have a Sun 3, you probably have
+ these. Say 'Y' to support ZS ports directly. This option must be
+ enabled in order to support the
+ keyboard and mouse ports.
+
+Sun keyboard support
+CONFIG_SUN_KEYBOARD
+ Say Y here to support the keyboard found on Sun 3 and 3x workstations.
+ It can also be used support Sun Type-5 keyboards through an adaptor.
+ See <http://www.suse.cz/development/input/adapters.html> and
+ <http://sourceforge.net/projects/linuxconsole/> for details on the
+ latter.
+
X 68020 support
X CONFIG_M68020
X If you anticipate running this kernel on a computer with a MC68020
@@ -12144,6 +13334,25 @@
X it here. The emulator will then only calculate with a 64 bit
X mantissa and round slightly incorrect.
X
+Advanced configuration options
+CONFIG_ADVANCED
+ This gives you access to some advanced options for the CPU. The
+ defaults should be fine for most users, but these options may make
+ it possible for you to improve performance somewhat if you know what
+ you are doing.


+
+ Note that the answer to this question won't directly affect the
+ kernel: saying N will just cause the configurator to skip all

+ the questions about these options.
+
+ Most users should say N to this question.
+
+Use one physical chunk of memory only
+CONFIG_SINGLE_MEMORY_CHUNK
+ Ignore all but the first contiguous chunk of physical memory for VM
+ purposes. This will save a few bytes kernel size and may speed up
+ some operations. Say N if not sure.
+
X Advanced processor options
X CONFIG_ADVANCED_CPU
X This gives you access to some advanced options for the CPU. The
@@ -12181,6 +13390,11 @@
X Include support in the kernel for pcmcia on Amiga 1200 and Amiga 600.
X If you intend to use pcmcia cards say Y; otherwise say N.
X
+Hisoft Whippet PCMCIA serial support
+CONFIG_WHIPPET_SERIAL
+ HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
+ is no listing for the Whippet in their Amiga section.
+
X Amiga GSP (TMS340x0) support
X CONFIG_AMIGA_GSP
X Include support for Amiga graphics cards that use the Texas
@@ -12220,6 +13434,11 @@
X sound). The probability that such allocations at module load time
X fail is drastically reduced.
X
+ST-RAM statistics in /proc
+CONFIG_STRAM_PROC
+ Say Y here to report ST-RAM usage statistics in /proc/stram. See the
+ help for CONFIG_STRAM_SWAP for discussion of ST-RAM and its uses.
+
X Atari ACSI support
X CONFIG_ATARI_ACSI
X This enables support for the Atari ACSI interface. The driver
@@ -12318,6 +13537,12 @@
X If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
X one in the near future, say Y to this question. Otherwise, say N.
X
+BSC Oktagon SCSI support
+CONFIG_OKTAGON_SCSI
+ If you have the BSC Oktagon SCSI disk controller for the Amiga, say Y to
+ this question. If you're in doubt about whether you have one, see the
+ picture at <http://amiga.multigraph.com/photos/oktagon.html>.
+
X Atari native SCSI support
X CONFIG_ATARI_SCSI
X If you have an Atari with built-in NCR5380 SCSI controller (TT,
@@ -12338,6 +13563,12 @@
X use a Toshiba CD-ROM drive; otherwise, the option is not needed and
X would impact performance a bit, so say N.
X
+Reset SCSI-devices at boottime
+CONFIG_ATARI_SCSI_RESET_BOOT
+ Reset the devices on your Atari whenever it boots. This makes the boot
+ process fractionally longer but may assist recovery from errors that
+ leave the devices with SCSI operations partway completed.
+
X Hades SCSI DMA emulator (EXPERIMENTAL)
X CONFIG_TT_DMA_EMUL
X This option enables code which emulates the TT SCSI DMA chip on the
@@ -12400,6 +13631,11 @@
X want). The module is called hydra.o. If you want to compile it as a


X module, say M here and read Documentation/modules.txt.
X

+Sun3x ESP SCSI driver
+CONFIG_SUN3X_ESP
+ The ESP was an on-board SCSI controller used on Sun 3/80
+ machines. Say Y here to compile in support for it.
+
X Pcmcia NE2000 compatible support
X CONFIG_APNE
X If you have a pcmcia ne2000 compatible adapter, say Y. Otherwise,
@@ -12446,6 +13682,25 @@
X LC475/476 models. It is also found in the DuoDock Plus and DuoDock
X II, as well as many NuBus, LC-PDS, and comm-slot cards.
X
+Macintosh NS8390 based Ethernet support
+CONFIG_MAC8390
+ If you want to include a driver to support Nubus or LC-PDS
+ Ethernet cards using an NS8390 chipset or its equivalent, say Y
+ and read the Ethernet-HOWTO, available from

+Macintosh CS89x0 based Ethernet support
+CONFIG_MAC89x0
+ Support for CS89x0 chipset based Ethernet cards. If you have a Nubus
+ or LC-PDS network (Ethernet) card of this type, say Y and read the
+ Ethernet-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.


+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt> as well as

+ <file:Documentation/networking/net-modules.txt>. This module will be
+ called mac89x0.o.
+
X Macintosh (AV) onboard MACE ethernet
X CONFIG_MACMACE
X Say Y here if you have a Centris 660AV, a Quadra 660AV, or a Quadra
@@ -12542,6 +13797,11 @@
X If you want to compile it as a module, say M here and read
X Documentation/modules.txt.
X
+Support for early boot text console
+CONFIG_BOOTX_TEXT
+ Say Y here to see progress messages from the boot firmware in text mode.
+ Requires either BootX or Open Firmware.
+
X Amiga builtin serial support
X CONFIG_AMIGA_BUILTIN_SERIAL
X If you want to use your Amiga's built-in serial port in Linux,
@@ -12557,6 +13817,16 @@
X If you want to use a GVP IO-Extender serial card in Linux, say Y.
X Otherwise, say N.
X
+GVP IO-Extender parallel printer support
+CONFIG_GVPIOEXT_LP
+ Say Y to enable driving a printer from the parallel port on your
+ GVP IO-Extender card, N otherwise
+
+GVP IO-Extender PLIP support
+CONFIG_GVPIOEXT_PLIP
+ Say Y to enable doing IP over the parallel port on your GVP IO-Extender
+ card, N otherwise
+
X Multiface Card III serial support
X CONFIG_MULTIFACE_III_TTY
X If you want to use a Multiface III card's serial port in Linux,
@@ -12625,6 +13895,99 @@
X only supports one type or the other. However, there is very early
X work on support for CHRP, PReP and PowerMac's from a single binary.
X
+# Choice: ppc6xxtype
+Machine Type
+CONFIG_ALL_PPC
+ Linux currently supports several different kinds of PowerPC-based
+ machines: Apple Power Macintoshes and clones (such as the Motorola
+ Starmax series), PReP (PowerPC Reference Platform) machines such as
+ the Motorola PowerStack, CHRP (Common Hardware Reference Platform),
+ the embedded MBX boards from Motorola and many others. Currently,
+ the default option is to build a kernel which works on the first
+ three. Support for other machines is currently incomplete.
+
+ Select PowerMac/PReP/MTX/CHRP if configuring for any of the above.
+
+ Select Gemini if configuring for a Synergy Microsystems' Gemini series
+ Single Board Computer.
+ More information is available at:
+ <http://www.synergymicro.com/PressRel/97_10_15.html>
+
+ Select APUS if configuring for a PowerUP Amiga.
+ More information is available at:
+ <http://linux-apus.sourceforge.net>
+
+Gemini
+CONFIG_GEMINI
+ Select Gemini if configuring for a Synergy Microsystems' Gemini series
+ Single Board Computer.
+ More information is available at:
+ <http://www.synergymicro.com/PressRel/97_10_15.html>
+
+Apus
+CONFIG_APUS
+ Select APUS if configuring for a PowerUP Amiga.
+ More information is available at:
+ <http://linux-apus.sourceforge.net>
+
+Power management support for PowerBooks
+CONFIG_PMAC_PBOOK
+ This provides support for putting a PowerBook to sleep; it also
+ enables media bay support. Power management works on the
+ PB2400/3400/3500, Wallstreet, Lombard, and Bronze PowerBook G3. You
+ must get the power management daemon, pmud, to make it work and you
+ must have the /dev/pmu device (see the pmud README).
+
+ Get pmud from <ftp://ftp.samba.org/pub/ppclinux/pmud/>.
+
+ If you have a PowerBook, you should say Y.
+
+ You may also want to compile the dma sound driver as a module and
+ have it autoloaded. The act of removing the module shuts down the
+ sound hardware for more power savings.
+
+MBX
+CONFIG_MBX
+ MBX is a line of Motorola single-board computer based around the MPC821
+ and MPC860 processors, and intended for embedded-controller applications.
+ Say Y here to support these boards directly.
+
+AltiVec support
+CONFIG_ALTIVEC
+ Say Y here to compile in support for Motorola AltiVec boards. The
+ AltiVec board is baced on the MPC7400 embedded version of the PowerPC
+ and adds a SIMD vector-processing unit. Product information at
+ <http://www.motorola.com/SPS/PowerPC/AltiVec/>.
+
+ADB raw keycode support
+CONFIG_MAC_ADBKEYCODES
+ This provides support for sending raw ADB keycodes to console
+ devices. This is the default up to 2.4.0, but in future this may be
+ phased out in favor of generic Linux keycodes. If you say Y here, you
+ can dynamically switch via the
+ /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
+ sysctl and with the "keyboard_sends_linux_keycodes=" kernel argument.
+
+ If unsure, say Y here.
+
+Mouse button 2+3 emulation support
+CONFIG_MAC_EMUMOUSEBTN
+ This provides generic support for emulating the 2nd and 3rd mouse
+ button with keypresses. If you say Y here, the emulation is still
+ disabled by default. The emulation is controlled by these sysctl entries:
+ /proc/sys/dev/mac_hid/mouse_button_emulation
+ /proc/sys/dev/mac_hid/mouse_button2_keycode
+ /proc/sys/dev/mac_hid/mouse_button3_keycode
+
+Enhanced Real Time Clock Support (/dev/rtc)
+CONFIG_PPC_RTC


+ If you say Y here and create a character special file /dev/rtc with
+ major number 10 and minor number 135 using mknod ("man mknod"), you

+ will get access to the real time clock (or hardware clock) built
+ into your computer.
+
+ If unsure, say Y here.
+
X Support for Open Firmware device tree in /proc
X CONFIG_PROC_DEVICETREE
X This option adds a device-tree directory under /proc which contains
@@ -12704,6 +14067,16 @@
X whenever you want). If you want to compile it as a module, say M
X here and read Documentation/modules.txt.
X
+Symbios 53c885 (Synergy Ethernet) support
+CONFIG_NCR885E
+ This is and Ethernet driver for the dual-function NCR 53C885
+ SCSI/Ethernet controller.
+
+ This driver is also available as a module called ncr885e.o ( = code


+ which can be inserted in and removed from the running kernel
+ whenever you want). If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>.
+

X Video For Linux
X CONFIG_VIDEO_DEV
X Support for audio/video capture and overlay devices and FM radio
@@ -12990,6 +14363,22 @@
X whenever you want). If you want to compile it as a module, say M
X here and read Documentation/modules.txt.
X
+SGI Vino Video For Linux
+CONFIG_VIDEO_VINO
+ Say Y here to build in support for the Vino video input system found on
+ SGI Indy machines.
+
+Zoran ZR36057/36060 Video For Linux
+CONFIG_VIDEO_ZORAN
+ Say Y here to include support for video cards based on the the Zoran
+ ZR36057/36060 encoder/decoder chip (including the Iomega Buz and the
+ Miro DC10 and DC30 video capture cards).
+
+Include support for Iomega Buz
+CONFIG_VIDEO_BUZ
+ Say Y here to include support for the Iomega Buz video card. There is
+ a Buz/Linux homepage at <http://www.lysator.liu.se/~gz/buz/>.
+
X SAA5249 Teletext processor
X CONFIG_VIDEO_SAA5249
X Support for I2C bus based teletext using the SAA5249 chip. At the
@@ -13037,6 +14426,32 @@
X #
X # ARM options
X #
+# Choice: armtype
+A5000
+CONFIG_ARCH_A5K
+ Say Y here to to support the Acorn A5000. Linux can support the internal
+ IDE disk and CD-ROM interface, serial and parallel port, and the floppy
+ drive. Note that on some A5000s the floppy is plugged into the wrong
+ socket on the motherboard.
+
+EBSA-110
+CONFIG_ARCH_EBSA110
+ This is an evaluation board for the StrongARM processor available
+ from Digital. It has limited hardware on-board, including an onboard
+ Ethernet interface, two PCMCIA sockets, two serial ports and a
+ parallel port.
+
+RiscPC
+CONFIG_ARCH_RPC
+ On the Acorn Risc-PC, Linux can support the internal IDE disk and
+ CD-ROM interface, serial and parallel port, and the floppy drive.
+
+2MB physical memory
+CONFIG_PAGESIZE_16
+ Say Y here if your Archimedes or A5000 system has only 2MB of
+ memory, otherwise say N. The resulting kernel will not run on a
+ machine with 4MB of memory.
+
X CPU Optimization
X CONFIG_CPU_ARM2
X This selects the processor type of your CPU. This is only used to
@@ -13066,6 +14481,16 @@
X CONFIG_ARCH_NETWINDER
X Say Y here if you intend to run this kernel on the NetWinder.
X
+Support StrongARM SA-110 processor
+CONFIG_CPU_SA110
+ The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
+ is available at five speeds ranging from 100 MHz to 233 MHz.
+ More information is available at
+ <http://developer.intel.com/design/strong/sa110.htm>
+
+ Say Y if you want support for the SA-110 processor.
+ Otherwise, say N.
+
X Math emulation
X CONFIG_NWFPE
X Say Y to include the NWFPE floating point emulator in the kernel. This
@@ -13121,6 +14546,29 @@
X footprint of the running kernel but it can increase the amount of
X time and disk space needed for compilation. If in doubt say N.
X
+Kernel low-level debugging functions
+CONFIG_DEBUG_LL
+ Say Y here to include definitions of printascii, printchar, printhex
+ in the kernel. This is helpful if you are debugging code that
+ executes before the console is initialized.
+
+Kernel low-level debugging messages via footbridge serial port
+CONFIG_DEBUG_DC21285_PORT
+ Say Y here if you want the low-level print routines to direct their
+ output to the serial port in the DC21285 (Footbridge). Saying N
+ will cause the debug messages to appear on the first 16550
+ serial port.
+
+Include kgdb kernel debugger
+CONFIG_KGDB
+ Include in-kernel hooks for kgdb, the Linux kernel source level debugger.
+ This project has a web page at <http://kgdb.sourceforge.net/>.
+
+Include xmon kernel debugger
+CONFIG_XMON
+ Include in-kernel hooks for the xmon kernel monitor/debugger supported
+ by the PPC port.
+
X Split initialisation functions into discardable section
X CONFIG_TEXT_SECTIONS
X Normally code that is only used during initialisation is collected
@@ -13219,6 +14667,11 @@
X it as a module, say M here and read Documentation/modules.txt. The
X module will be called
X
+Ultra (connectionless) protocol
+CONFIG_IRDA_ULTRA
+ Say Y here to support the connectionless Ultra IRDA protocol, also
+ called IrOBEX.
+
X IrDA protocol options
X CONFIG_IRDA_OPTIONS
X Say Y here if you want to configure any of the following IrDA options.
@@ -13346,6 +14799,24 @@
X read Documentation/modules.txt. This chipset is used by the Toshiba
X Libretto 100CT, and many more laptops.
X
+SMC IrCC
+CONFIG_SMC_IRCC_FIR
+ Say Y here if you want to build support for the SMC Infrared
+ Communications Controller. It is used in the Fujitsu Lifebook 635t
+ and Sony PCG-505TX. If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>. The module will be called
+ smc-ircc.o.
+
+Serial dongle support
+CONFIG_DONGLE
+ Say Y here if you have an infrared device that connects to your
+ computer's serial port. These devices are called dongles. Then say Y
+ or M to the driver for your particular dongle below.


+
+ Note that the answer to this question won't directly affect the
+ kernel: saying N will just cause the configurator to skip all

+ the questions about serial dongles.
+
X ESI JetEye PC Dongle
X CONFIG_ESI_DONGLE
X Say Y here if you want to build support for the Extended Systems
@@ -13392,8 +14863,8 @@
X by IrTTY. To activate support for Parallax dongles you will have to
X start irattach like this "irattach -d litelink".
X
-Old Belking dongle
-CONFIG_OLD_BELKING_DONGLE
+Old Belkin dongle
+CONFIG_OLD_BELKIN_DONGLE
X Say Y here if you want to build support for the old Belkin SmartBeam
X dongle. If you want to compile it as a module, say M here and read
X Documentation/modules.txt. The Belkin SmartBeam dongle (F5F500) come
@@ -13411,6 +14882,13 @@
X MVME166, MVME167, MVME172, and MVME177. BVME4000 and BVME6000
X boards from BVM Ltd are also supported.
X
+MVME147 support
+CONFIG_MVME147
+ Say Y to include support for early Motorola VME boards. This will
+ build a kernel which can run on MVME147 single-board computers. If
+ you select this option you will have to select the appropriate
+ drivers for SCSI, Ethernet and serial ports later on.
+
X MVME162, 166 and 167 support
X CONFIG_MVME16x
X Say Y to include support for Motorola VME boards. This will build a
@@ -13439,6 +14917,23 @@
X is hardwired on. The 53c710 SCSI driver is known to suffer from
X this problem.
X
+WD33C93 SCSI driver for MVME147
+CONFIG_MVME147_SCSI
+ Support for the on-board SCSI controller on the Motorola MVME147
+ single-board computer.
+
+SCC support for MVME147 serial ports
+CONFIG_MVME147_SCC
+ This is the driver for the serial ports on the Motorola MVME147
+ boards. Everyone using one of these boards should say Y here.
+
+MVME147 (Lance) Ethernet support
+CONFIG_MVME147_NET
+ Support for the on-board Ethernet interface on the Motorola MVME147
+ single-board computer. Say Y here to include the
+ driver for this chip in your kernel. If you want to compile it as


+ a module, say M here and read <file:Documentation/modules.txt>.
+

X NCR53C710 SCSI driver for MVME16x
X CONFIG_MVME16x_SCSI
X The Motorola MVME162, 166, 167, 172 and 177 boards use the NCR53C710
@@ -13496,6 +14991,13 @@
X s390-compiler released by IBM (based on gcc-2.95.1) before.
X
X Merge some code into the kernel to make the image IPLable
+CONFIG_IPL
+ If you want to use the produced kernel to IPL directly from a
+ device, you have to merge a bootsector specific to the device
+ into the first bytes of the kernel. You will have to select the
+ IPL device.
+
+Merge some code into the kernel to make the image IPLable
X CONFIG_IPLABLE
X If you want to use the produced kernel to IPL directly from a
X device, you have to merge a bootsector specific to the device
@@ -13551,6 +15053,62 @@
X CONFIG_DASD_FBA
X FBA devices are e.g. the Vitual disk in storage under VM/ESA and others.
X
+Support for 3215 line mode terminal
+CONFIG_3215
+ Include support for IBM 3215 line-mode terminals. Can't be used
+ if 3270 console support is chosen.
+
+Support for console on 3215 line mode terminal
+CONFIG_3215_CONSOLE
+ Include support for using an IBM 3215 line-mode terminal as the Linux
+ system console. Can't be used if 3270 console support is chosen.
+
+Support for HWC line mode terminal
+CONFIG_HWC
+ Include support for IBM HWC line-mode terminals.
+
+Console on HWC line mode terminal
+CONFIG_HWC_CONSOLE
+ Include support for using an IBM HWC line-mode terminal as the Linux
+ system console.
+
+CTC device support
+CONFIG_CTC
+ Select this option if you want to use channel-to-channel networking
+ on IBM S/390 or zSeries. This device driver supports real CTC
+ coupling using ESCON. It also supports virtual CTCs when running
+ under VM. It will use the channel device configuration if this is
+ available. This option is also available as a module which will be
+ called ctc.o. If you do not know what it is, it's safe to say "Y".
+
+XPRAM disk support
+CONFIG_BLK_DEV_XPRAM
+ Select this option if you want to use your expanded storage on S/390
+ or zSeries as a disk. This is useful as a _fast_ swap device if you
+ want to access more than 2G of memory when running in 31 bit mode.
+ This option is also available as a module which will be called
+ xpram.o. If unsure, say "N".
+
+Fast IRQ handling
+CONFIG_FAST_IRQ
+ Select this option in order to get the interrupts processed faster
+ on your S/390 or zSeries machine. If selected, after an interrupt
+ is processed, the channel subsystem will be asked for other pending
+ interrupts which will also be processed before leaving the interrupt
+ context. This speeds up the I/O a lot. Say "Y".
+
+IUCV device support (VM only)
+CONFIG_IUCV
+ Select this option if you want to use inter-user communication
+ vehicle networking under VM or VIF. This option is also available
+ as a module which will be called iucv.o. If unsure, say "Y".
+
+Show crashed user process info
+CONFIG_PROCESS_DEBUG
+ Say Y to print all process fault locations to the console. This is
+ a debugging option; you probably do not want to set it unless you
+ are an S390 port maintainer.
+
X Diag access to CMS formatted minidisk
X CONFIG_DASD_MDSK
X By using this access method you can acess any disk supported by VM/ESA.
@@ -13567,12 +15125,24 @@
X
X Compaq Smart Array support
X CONFIG_BLK_CPQ_CISS_DA
- This is the driver for Compaq Smart Array controllers.
+ This is the driver for Compaq Smart Array 5xxx controllers.
X Everyone using these boards should say Y here.
X See "linux/Documentation/cciss.txt" for the current list of
X boards supported by this driver, and for further information
X on the use of this driver.
X
+Linux telephony support
+CONFIG_PHONE
+ Say Y here if you have a telephony card, which for example allows
+ you to use a regular phone for voice-over-IP applications.
+
+ Note: this has nothing to do with modems. You do not need to say Y
+ here in order to be able to use a modem under Linux.
+
+ This support is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>. The
+ module will be called phonedev.o.
+
X QuickNet Internet LineJack/PhoneJack support
X CONFIG_PHONE_IXJ
X Say M if you have a telephony card manufactured by Quicknet
@@ -13592,15 +15162,17 @@
X ignore this option.
X
X Toshiba Laptop support
-CONFIG_TOSHIBA
- If you intend to run this the kernel on a Toshiba portable say yes
- here. This adds a driver to safely access the System Management
- Mode of the CPU on Toshiba portables. The System Management Mode
+CONFIG_TOSHIBA
+ This adds a driver to safely access the System Management Mode
+ of the CPU on Toshiba portables. The System Management Mode
X is used to set the BIOS and power saving options on Toshiba portables.
X
X For information on utilities to make use of this driver see the
- Toshiba Linux utilities website at:
- http://www.buzzard.org.uk/toshiba/
+ Toshiba Linux utilities web site at:
+ <http://www.buzzard.org.uk/toshiba/>
+
+ Say Y if you intend to run this kernel on a Toshiba portable.
+ Say N otherwise.
X
X CPiA Video For Linux
X CONFIG_VIDEO_CPIA
@@ -13623,6 +15195,14 @@
X Creative Webcam II. If you have the parallel port version of one
X of these cameras, say Y here, otherwise say N. It is also available
X as a module (cpia_pp.o).
+
+CPiA USB Lowlevel Support
+CONFIG_VIDEO_CPIA_USB
+ This is the lowlevel USB support for cameras based on Vision's CPiA
+ (Colour Processor Interface ASIC), such as the Creative Webcam II.
+ If you have the USB version of one of these cameras, say Y here,
+ otherwise say N. This will not work with the Creative Webcam III.
+ It is also available as a module (cpia_usb.o).
X
X CPiA Parallel Port DMA Support
X CONFIG_VIDEO_CPIA_PP_DMA
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/Debugging390.txt linux/Documentation/Debugging390.txt
--- v2.2.19/Documentation/Debugging390.txt Sun Mar 25 17:31:59 2001
+++ linux/Documentation/Debugging390.txt Wed Oct 10 01:40:42 2001
@@ -1,19 +1,21 @@
X
- Debugging on Linux for 390
+ Debugging on Linux for s/390 & zSeries
X by
X Denis Joseph Barrow (djba...@de.ibm.com,barr...@yahoo.com)
- Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
X Best viewed with fixed width fonts
X
X Overview of Document:
X =====================
X This document is intended to give an good overview of how to debug
-Linux for S390 it isn't intended as a complete reference & not a
+Linux for s/390 & zSeries it isn't intended as a complete reference & not a
X tutorial on the fundamentals of C & assembly, it dosen't go into
X 390 IO in any detail. It is intended to compliment the following
X books.
+z/Architecture Principles of Operation SA22-7832-00
X Enterprise Systems Architecture/390 Reference Summary SA22-7209-01 & the
X Enterprise Systems Architecture/390 Principles of Operation SA22-7201-05
+Linux for zSeries and S/390 Elf Application Binary Interface
X & any other worthwhile references you get.
X
X It is intended like the Enterprise Systems Architecture/390 Reference Summary
@@ -22,21 +24,21 @@
X
X Contents
X ========
-S390 Register Set
+Register Set
X Address Spaces on Linux
-Address Spaces on Linux for S390
-The Linux for S390 Kernel Task Structure
-Register Usage & Stackframes on Linux for S390 with glossary
-Compiling programs for debugging on Linux for S390
+Address Spaces on Linux for s/390 & zSeries
+The Linux for s/390 & zSeries Kernel Task Structure
+Register Usage & Stackframes on Linux for s/390 & zSeries with glossary
+Compiling programs for debugging on Linux for s/390 & zSeries
X Figuring out gcc compile errors
X Debugging Tools
X objdump
X strace
X Debugging under VM
X Stack Tracing under VM
-S390 IO Overview
-Debugging IO on S390 under VM
-GDB on S390
+s/390 & zSeries IO Overview
+Debugging IO on s/390 & zSeries under VM
+GDB on s/390 & zSeries
X Stack chaining in gdb by hand
X Examining core dumps
X LDD
@@ -44,13 +46,13 @@
X The proc file system
X Starting points for debugging scripting languages etc.
X
-S390 Register Set
-================
-The current ESA 390 architecture has the following registers.
+Register Set
+============
+The current architectures have the following registers.
X
-16 32 bit General propose registers ( r0-r15 or gpr0-gpr15) used for arithmetic & addressing
+16 General propose registers, 32 bit on s/390 64 bit on zSeries, r0-r15 or gpr0-gpr15 used for arithmetic & addressing.
X
-16 Control registers ( cr0-cr15 kernel usage only ) used for memory managment,
+16 Control registers, 32 bit on s/390 64 bit on zSeries, ( cr0-cr15 kernel usage only ) used for memory managment,
X interrupt control,debugging control etc.
X
X 16 Access registers ( ar0-ar15 ) not used by normal programs but potentially could
@@ -67,8 +69,8 @@
X
X
X The PSW is the most important register on the machine it
-is 64 bit & serves the roles of a program counter (pc),
-condition code register,memory space designator.
+is 64 bit on s/390 & 128 bit on zSeries & serves the roles of
+a program counter (pc), condition code register,memory space designator.
X In IBM standard notation I am counting bit 0 as the MSB.
X It has several advantages over a normal program counter
X in that you can change address translation & program counter
@@ -77,73 +79,98 @@
X have a logical=physical mapping for the address you are
X currently running at.
X
-Bit Value
+ Bit Value
+s/390 zSeries
+0 0 Reserved ( must be 0 ) otherwise specification exception occurs.
+
+1 1 Program Event Recording 1 PER enabled,
+ PER is used to facilititate debugging e.g. single stepping.
X
-0 Reserved ( must be 0 ) otherwise specification exception occurs.
+2-4 2-4 Reserved ( must be 0 ).
X
-1 Program Event Recording 1 PER enabled,
- PER is used to facilititate debugging e.g. single stepping.
+5 5 Dynamic address translation 1=DAT on.
X
-2-4 Reserved ( must be 0 ).
+6 6 Input/Output interrupt Mask
X
-5 Dynamic address translation 1=DAT on.
+7 7 External interrupt Mask used primarily for interprocessor signalling &
+ clock interupts.
X
-6 Input/Output interrupt Mask
+8-11 8-11 PSW Key used for complex memory protection mechanism not used under linux
X
-7 External interrupt Mask used primarily for interprocessor signalling &
- clock interupts.
+12 12 1 on s/390 0 on zSeries
X
-8-12 PSW Key used for complex memory protection mechanism not used under linux
+13 13 Machine Check Mask 1=enable machine check interrupts
X
-13 Machine Check Mask 1=enable machine check interrupts
+14 14 Wait State set this to 1 to stop the processor except for interrupts & give
+ time to other LPARS used in CPU idle in the kernel to increase overall
+ usage of processor resources.
X
-14 Wait State set this to 1 to stop the processor except for interrupts & give
- time to other LPARS used in CPU idle in the kernel to increase overall
- usage of processor resources.
+15 15 Problem state ( if set to 1 certain instructions are disabled )
+ all linux user programs run with this bit 1
+ ( useful info for debugging under VM ).
X
-15 Problem state ( if set to 1 certain instructions are disabled )
- all linux user programs run with this bit 1 ( useful info for debugging under VM ).
+16-17 16-17 Address Space Control
X
-16-17 Address Space Control
+ 00 Primary Space Mode when DAT on
+ The linux kernel currently runs in this mode, CR1 is affiliated with
+ this mode & points to the primary segment table origin etc.
X
- 00 Primary Space Mode when DAT on
- The linux kernel currently runs in this mode, CR1 is affiliated with this mode
- & points to the primary segment table origin etc.
+ 01 Access register mode this mode is used in functions to
+ copy data between kernel & user space.
X
- 01 Access register mode this mode is used in functions to
- copy data between kernel & user space.
+ 10 Secondary space mode not used in linux however CR7 the
+ register affiliated with this mode is & this & normally
+ CR13=CR7 to allow us to copy data between kernel & user space.
+ We do this as follows:
+ We set ar2 to 0 to designate its
+ affiliated gpr ( gpr2 )to point to primary=kernel space.
+ We set ar4 to 1 to designate its
+ affiliated gpr ( gpr4 ) to point to secondary=home=user space
+ & then essentially do a memcopy(gpr2,gpr4,size) to
+ copy data between the address spaces, the reason we use home space for the
+ kernel & don't keep secondary space free is that code will not run in
+ secondary space.
X
- 10 Secondary space mode not used in linux however CR7 the
- register affiliated with this mode is & this & normally
- CR13=CR7 to allow us to copy data between kernel & user space.
- We do this as follows:
- We set ar2 to 0 to designate its
- affiliated gpr ( gpr2 )to point to primary=kernel space.
- We set ar4 to 1 to designate its
- affiliated gpr ( gpr4 ) to point to secondary=home=user space
- & then essentially do a memcopy(gpr2,gpr4,size) to
- copy data between the address spaces, the reason we use home space for the
- kernel & don't keep secondary space free is that code will not run in secondary space.
+ 11 Home Space Mode all user programs run in this mode.
+ it is affiliated with CR13.
X
- 11 Home Space Mode all user programs run in this mode.
- it is affiliated with CR13.
+18-19 18-19 Condition codes (CC)
X
-18-19 Condition codes (CC)
+20 20 Fixed point overflow mask if 1=FPU exceptions for this event
+ occur ( normally 0 )
X
-20 Fixed point overflow mask if 1=FPU exceptions for this event occur ( normally 0 )
+21 21 Decimal overflow mask if 1=FPU exceptions for this event occur
+ ( normally 0 )
X
-21 Decimal overflow mask if 1=FPU exceptions for this event occur ( normally 0 )
+22 22 Exponent underflow mask if 1=FPU exceptions for this event occur
+ ( normally 0 )
X
-22 Exponent underflow mask if 1=FPU exceptions for this event occur ( normally 0 )
+23 23 Significance Mask if 1=FPU exceptions for this event occur
+ ( normally 0 )
X
-23 Significance Mask if 1=FPU exceptions for this event occur ( normally 0 )
+24-31 24-30 Reserved Must be 0.
X
-24-31 Reserved Must be 0.
+ 31 Extended Addressing Mode
+ 32 Basic Addressing Mode
+ Used to set addressing mode
+ PSW 31 PSW 32
+ 0 0 24 bit
+ 0 1 31 bit
+ 1 1 64 bit
X
-32 1=31 bit addressing mode 0=24 bit addressing mode (for backward compatibility ),
- linux always runs with this bit set to 1
+32 1=31 bit addressing mode 0=24 bit addressing mode (for backward
+ compatibility ), linux always runs with this bit set to 1
X
-33-64 Instruction address.
+33-64 Instruction address.
+ 33-63 Reserved must be 0
+ 64-127 Address
+ In 24 bits mode bits 64-103=0 bits 104-127 Address
+ In 31 bits mode bits 64-96=0 bits 97-127 Address
+ Note: unlike 31 bit mode on s/390 bit 96 must be zero
+ when loading the address with LPSWE otherwise a
+ specification exception occurs, LPSW is fully backward
+ compatible.
+
X
X Prefix Page
X -----------
@@ -221,8 +248,8 @@
X Our addressing scheme is as follows
X
X
-Himem 0x7fffffff 2GB ***************** ****************
- * User Stack * * *
+Himem 0x7fffffff 2GB on s/390 ***************** ****************
+2^64 bytes on zSeries * User Stack * * *
X ***************** * *
X * Shared Libs * * *
X ***************** * *
@@ -248,6 +275,7 @@
X The kernel stack pointer is intimately tied with the task stucture for
X each processor as follows.
X
+ s/390
X ************************
X * 1 page kernel stack *
X * ( 4K ) *
@@ -256,9 +284,18 @@
X * ( 4K ) *
X 8K aligned ************************
X
+ zSeries
+ ************************
+ * 2 page kernel stack *
+ * ( 8K ) *
+ ************************
+ * 2 page task_struct *
+ * ( 8K ) *
+16K aligned ************************
+
X What this means is that we don't need to dedicate any register or global variable
X to point to the current running process & can retrieve it with the following
-very simple construct
+very simple construct for s/390 & one very similar for zSeries.
X
X static inline struct task_struct * get_current(void)
X {
@@ -290,6 +327,10 @@
X Note: To follow stackframes requires a knowledge of C or Pascal &
X limited knowledge of one assembly language.
X
+It should be noted that there are some differences between the
+s/390 & zSeries stack layouts as the zSeries stack layout didn't have
+to maintain compatibility with older linkage formats.
+
X Glossary:
X ---------
X alloca:
@@ -404,8 +445,8 @@
X
X f0 argument 0 / return value ( float/double ) call-clobbered
X f2 argument 1 call-clobbered
-f4 saved
-f6 saved
+f4 zSeries argument 2 saved
+f6 zSeries argument 3 saved
X The remaining floating points
X f1,f3,f5 f7-f15 are call-clobbered.
X
@@ -434,33 +475,36 @@
X area if crossing this boundary.
X 6) Floating point parameters are mixed with outgoing args
X on the outgoing args area in the order the are passed in as parameters.
+7) Floating point arguments 2 & 3 are saved in the outgoing args area for zSeries
+
X
X Stack Frame Layout
X ==================
-0 back chain ( a 0 here signifies end of back chain )
-4 eos ( end of stack, not used on Linux for S390 used in other linkage formats )
-8 glue used in other linkage formats for saved routine descriptors etc.
-12 glue used in other linkage formats for saved routine descriptors etc.
-16 scratch area
-20 scratch area
-24 saved r6 of caller function
-28 saved r7 of caller function
-32 saved r8 of caller function
-36 saved r9 of caller function
-40 saved r10 of caller function
-44 saved r11 of caller function
-48 saved r12 of caller function
-52 saved r13 of caller function
-56 saved r14 of caller function
-60 saved r15 of caller function
-64 saved f4 of caller function
-72 saved f6 of caller function
-80 undefined
-96 outgoing args passed from caller to callee
-96+x possible stack alignment ( 8 bytes desirable )
-96+x+y alloca space of caller ( if used )
-96+x+y+z automatics of caller ( if used )
-0 back-chain
+s/390 zSeries
+0 0 back chain ( a 0 here signifies end of back chain )
+4 8 eos ( end of stack, not used on Linux for S390 used in other linkage formats )
+8 16 glue used in other s/390 linkage formats for saved routine descriptors etc.
+12 24 glue used in other s/390 linkage formats for saved routine descriptors etc.
+16 32 scratch area
+20 40 scratch area
+24 48 saved r6 of caller function
+28 56 saved r7 of caller function
+32 64 saved r8 of caller function
+36 72 saved r9 of caller function
+40 80 saved r10 of caller function
+44 88 saved r11 of caller function
+48 96 saved r12 of caller function
+52 104 saved r13 of caller function
+56 112 saved r14 of caller function
+60 120 saved r15 of caller function
+64 128 saved f4 of caller function
+72 132 saved f6 of caller function
+80 undefined
+96 160 outgoing args passed from caller to callee
+96+x 160+x possible stack alignment ( 8 bytes desirable )
+96+x+y 160+x+y alloca space of caller ( if used )
+96+x+y+z 160+x+y+z automatics of caller ( if used )
+0 back-chain
X
X A sample program with comments.
X ===============================
@@ -551,14 +595,10 @@
X
X
X
-Compiling programs for debugging on Linux for S390
-==================================================
-Make sure that the gcc is compiling & linking with the -g flag on
-this generates plain old gnu stabs, don't use
--ggdb, -gxcoff+ or any other silly option these other options more than
-likely don't work ( we haven't tested them ), -gstabs is supposed to add
-extra extensions to the debugging info for debugging c++ we haven't got
-round to testing this yet.
+Compiling programs for debugging on Linux for s/390 & zSeries
+=============================================================
+-gdwarf2 now works & normal -g debugging works much better now
+Thanks to the IBM java compiler developers bug reports.
X
X This is typically done adding/appending the flags -g to the
X CFLAGS & LDFLAGS variables Makefile of the program concerned.
@@ -574,6 +614,10 @@
X parameters will work, however some larger programs which use inline functions
X will not compile without optimisation.
X
+Debugging with optimisation has since much improved after fixing
+some bugs, please make sure you are using gdb-5.0 or later developed
+after Nov'2000.
+
X Figuring out gcc compile errors
X ===============================
X If you are getting a lot of syntax errors compiling a program & the problem
@@ -931,8 +975,8 @@
X as the 390 instructions are easy to decode mentally & you can make a good guess at a lot
X of them as all the operands are nibble ( half byte aligned ) & if you have an objdump listing
X also it is quite easy to follow, if you don't have an objdump listing keep a copy of
-the ESA Reference Summary & look at between pages 2 & 7 or alternatively the
-ESA principles of operation.
+the s/390 Reference Summary & look at between pages 2 & 7 or alternatively the
+s/390 principles of operation.
X e.g. even I can guess that
X 0001AFF8' LR 180F CC 0
X is a ( load register ) lr r0,r15
@@ -1085,7 +1129,7 @@
X 10=segment translation exception
X 11=page translation exception
X
-The full list of these is on page 22 of the current ESA Reference Summary.
+The full list of these is on page 22 of the current s/390 Reference Summary.
X e.g.
X tr prog 10 will trace segment translation exceptions.
X tr prog on its own will trace all program interruption codes.
@@ -1161,7 +1205,7 @@
X 000151B0' SVC 0A05 -> 0001909A' CC 0
X
X D 20.8 to check the SVC old psw in the prefix area & see was it from userspace
-( for the layout of the prefix area consult P18 of the ESA 390 Reference Summary
+( for the layout of the prefix area consult P18 of the s/390 390 Reference Summary
X if you have it available ).
X V00000020 070C2000 800151B2
X The problem state bit wasn't set & it's also too early in the boot sequence
@@ -1334,7 +1378,7 @@
X
X I am not going to give a course in 390 IO architecture as this would take me quite a
X while & I'm no expert. Instead I'll give a 390 IO architecture summary for Dummies if you have
-the ESA principles of operation available read this instead. If nothing else you may find a few
+the s/390 principles of operation available read this instead. If nothing else you may find a few
X useful keywords in here & be able to use them on a web search engine like altavista to find
X more useful information.
X
@@ -2031,4 +2075,6 @@
X Linux & GDB source.
X Various info & man pages.
X CMS Help on tracing commands.
+Linux for zSeries and S/390 Elf Application Binary Interface ( Highly Recommended )
+z/Architecture Principles of Operation
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/README.DAC960 linux/Documentation/README.DAC960
--- v2.2.19/Documentation/README.DAC960 Sun Mar 25 17:37:29 2001
+++ linux/Documentation/README.DAC960 Wed Oct 31 14:15:06 2001
@@ -1,11 +1,11 @@
X Linux Driver for Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers
X
- Version 2.2.10 for Linux 2.2.18
- Version 2.4.10 for Linux 2.4.1
+ Version 2.2.11 for Linux 2.2.19
+ Version 2.4.11 for Linux 2.4.12
X
X PRODUCTION RELEASE
X
- 1 February 2001
+ 11 October 2001
X
X Leonard N. Zubkoff
X Dandelion Digital
@@ -20,7 +20,7 @@
X controllers. Mylex Corporation is located at 34551 Ardenwood Blvd., Fremont,
X California 94555, USA and can be reached at 510.796.6100 or on the World Wide
X Web at http://www.mylex.com. Mylex Technical Support can be reached by
-electronic mail at sup...@mylex.com, by voice at 510.608.2400, or by FAX at
+electronic mail at myle...@us.ibm.com, by voice at 510.608.2400, or by FAX at
X 510.745.7715. Contact information for offices in Europe and Japan is available
X on their Web site.
X
@@ -120,7 +120,7 @@
X 100MHz Intel i960RM RISC Processor
X 16MB/32MB/64MB ECC SDRAM Memory
X
-AcceleRAID 160
+AcceleRAID 160 (AcceleRAID 170LP)
X 1 Wide Ultra-160 LVD SCSI channel
X 100MHz Intel i960RS RISC Processor
X Built in 16M ECC SDRAM Memory
@@ -170,6 +170,10 @@
X Intel i960 RISC Processor
X 2MB/4MB/8MB/16MB/32MB DRAM Memory
X
+DAC960P 1/2/3 Wide Fast SCSI-2 Channels
+ Intel i960 RISC Processor
+ 2MB/4MB/8MB/16MB/32MB DRAM Memory
+
X For the eXtremeRAID 2000/3000 and AcceleRAID 352/170/160, firmware version
X 6.00-01 or above is required.
X
@@ -180,36 +184,29 @@
X
X For the DAC960PJ and DAC960PG, firmware version 4.06-0-00 or above is required.
X
-For the DAC960PU, DAC960PD, and DAC960PL, firmware version 3.51-0-04 or above
-is required.
-
-Note that earlier revisions of the DAC960PU, DAC960PD, and DAC960PL controllers
-were delivered with version 2.xx firmware. Version 2.xx firmware is not
-supported by this driver and no support is envisioned. Contact Mylex RAID
-Technical Support to inquire about upgrading controllers with version 2.xx
-firmware to version 3.51-0-04. Upgrading to version 3.xx firmware requires
-installation of higher capacity Flash ROM chips, and not all DAC960PD and
-DAC960PL controllers can be upgraded.
+For the DAC960PU, DAC960PD, DAC960PL, and DAC960P, either firmware version
+3.51-0-04 or above is required (for dual Flash ROM controllers), or firmware
+version 2.73-0-00 or above is required (for single Flash ROM controllers)
X
X Please note that not all SCSI disk drives are suitable for use with DAC960
X controllers, and only particular firmware versions of any given model may


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 02'
echo 'File patch-2.2.20 is continued in part 03'
echo "03" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:09 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part10

#!/bin/sh -x
# this is part 10 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 10; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ unsigned char MaximumNumberOfILDperXLD; /* Byte 89 */
X unsigned short NonvolatileMemorySizeKB; /* Bytes 90-91 */
- unsigned char MaximumNumberOfXLDD; /* Byte 92 */
+ unsigned char MaximumNumberOfXLD; /* Byte 92 */
X unsigned int :24; /* Bytes 93-95 */
X /* Unique Information per Controller */
X unsigned char ControllerSerialNumber[16]; /* Bytes 96-111 */
X unsigned char Reserved3[16]; /* Bytes 112-127 */
X /* Vendor Information */
X unsigned int :24; /* Bytes 128-130 */
- unsigned char OEM_Information; /* Byte 131 */
+ unsigned char OEM_Code; /* Byte 131 */
X unsigned char VendorName[16]; /* Bytes 132-147 */
X /* Other Physical/Controller/Operation Information */
X boolean BBU_Present:1; /* Byte 148 Bit 0 */
@@ -1193,12 +1245,14 @@
X unsigned short PhysicalDeviceHostCommandAbortsDone; /* Bytes 370-371 */
X unsigned short PhysicalDevicePredictedFailuresDetected; /* Bytes 372-373 */
X unsigned short PhysicalDeviceHostCommandsFailed; /* Bytes 374-375 */
- unsigned char Reserved9[8]; /* Bytes 376-383 */
+ unsigned short PhysicalDeviceHardErrors; /* Bytes 376-377 */
+ unsigned char Reserved9[6]; /* Bytes 378-383 */
X /* Error Counters on Logical Devices */
X unsigned short LogicalDeviceSoftErrors; /* Bytes 384-385 */
X unsigned short LogicalDeviceCommandsFailed; /* Bytes 386-387 */
X unsigned short LogicalDeviceHostCommandAbortsDone; /* Bytes 388-389 */
X unsigned short :16; /* Bytes 390-391 */
+ /* Error Counters on Controller */
X unsigned short ControllerMemoryErrors; /* Bytes 392-393 */
X unsigned short ControllerHostCommandAbortsDone; /* Bytes 394-395 */
X unsigned int :32; /* Bytes 396-399 */
@@ -1210,8 +1264,7 @@
X unsigned short RebuildsActive; /* Bytes 408-409 */
X unsigned short OnlineExpansionsActive; /* Bytes 410-411 */
X unsigned short PatrolActivitiesActive; /* Bytes 412-413 */
- unsigned char LongOperationStatus; /* Byte 414 */
- unsigned char :8; /* Byte 415 */
+ unsigned short :16; /* Bytes 414-415 */
X /* Flash ROM Information */
X unsigned char FlashType; /* Byte 416 */
X unsigned char :8; /* Byte 417 */
@@ -1234,8 +1287,7 @@
X unsigned short NumberOfConfigurationGroups; /* Bytes 474-475 */
X boolean InstallationAbortStatus:1; /* Byte 476 Bit 0 */
X boolean MaintenanceModeStatus:1; /* Byte 476 Bit 1 */
- unsigned int :6; /* Byte 476 Bits 2-7 */
- unsigned int :24; /* Bytes 477-479 */
+ unsigned int :24; /* Bytes 476-479 */
X unsigned char Reserved10[32]; /* Bytes 480-511 */
X unsigned char Reserved11[512]; /* Bytes 512-1023 */
X }
@@ -1311,7 +1363,7 @@
X DAC960_V2_Geometry_Reserved1 = 0x2,
X DAC960_V2_Geometry_Reserved2 = 0x3
X } __attribute__ ((packed)) DriveGeometry:2; /* Byte 14 Bits 5-6 */
- unsigned char :1; /* Byte 14 Bit 7 */
+ boolean SuperReadAheadEnabled:1; /* Byte 14 Bit 7 */
X unsigned char :8; /* Byte 15 */
X /* Error Counters */
X unsigned short SoftErrors; /* Bytes 16-17 */
@@ -1323,8 +1375,8 @@
X /* Device Size Information */
X unsigned short :16; /* Bytes 32-33 */
X unsigned short DeviceBlockSizeInBytes; /* Bytes 34-35 */
- unsigned int OriginalDeviceSizeIn512ByteBlocksOrMB; /* Bytes 36-39 */
- unsigned int ConfigurableDeviceSizeIn512ByteBlocksOrMB; /* Bytes 40-43 */
+ unsigned int OriginalDeviceSize; /* Bytes 36-39 */
+ unsigned int ConfigurableDeviceSize; /* Bytes 40-43 */
X unsigned int :32; /* Bytes 44-47 */
X unsigned char LogicalDeviceName[32]; /* Bytes 48-79 */
X unsigned char SCSI_InquiryData[36]; /* Bytes 80-115 */
@@ -1350,8 +1402,12 @@
X {
X DAC960_V2_Device_Unconfigured = 0x00,
X DAC960_V2_Device_Online = 0x01,
- DAC960_V2_Device_WriteOnly = 0x03,
+ DAC960_V2_Device_Rebuild = 0x03,
+ DAC960_V2_Device_Missing = 0x04,
+ DAC960_V2_Device_Critical = 0x05,
X DAC960_V2_Device_Dead = 0x08,
+ DAC960_V2_Device_SuspectedDead = 0x0C,
+ DAC960_V2_Device_CommandedOffline = 0x10,
X DAC960_V2_Device_Standby = 0x21,
X DAC960_V2_Device_InvalidState = 0xFF
X }
@@ -1371,7 +1427,7 @@
X unsigned char LogicalUnit; /* Byte 3 */
X /* Configuration Status Bits */
X boolean PhysicalDeviceFaultTolerant:1; /* Byte 4 Bit 0 */
- boolean :1; /* Byte 4 Bit 1 */
+ boolean PhysicalDeviceConnected:1; /* Byte 4 Bit 1 */
X boolean PhysicalDeviceLocalToController:1; /* Byte 4 Bit 2 */
X unsigned char :5; /* Byte 4 Bits 3-7 */
X /* Multiple Host/Controller Status Bits */
@@ -1407,15 +1463,15 @@
X unsigned int :32; /* Bytes 44-47 */
X unsigned short :16; /* Bytes 48-49 */
X unsigned short DeviceBlockSizeInBytes; /* Bytes 50-51 */
- unsigned int OriginalDeviceSizeIn512ByteBlocksOrMB; /* Bytes 52-55 */
- unsigned int ConfigurableDeviceSizeIn512ByteBlocksOrMB; /* Bytes 56-59 */
+ unsigned int OriginalDeviceSize; /* Bytes 52-55 */
+ unsigned int ConfigurableDeviceSize; /* Bytes 56-59 */
X unsigned int :32; /* Bytes 60-63 */
X unsigned char PhysicalDeviceName[16]; /* Bytes 64-79 */
X unsigned char Reserved1[16]; /* Bytes 80-95 */
X unsigned char Reserved2[32]; /* Bytes 96-127 */
X unsigned char SCSI_InquiryData[36]; /* Bytes 128-163 */
- unsigned char Reserved3[12]; /* Bytes 164-175 */
- unsigned char Reserved4[16]; /* Bytes 176-191 */
+ unsigned char Reserved3[20]; /* Bytes 164-183 */
+ unsigned char Reserved4[8]; /* Bytes 184-191 */
X DAC960_ByteCount64_T LastReadBlockNumber; /* Bytes 192-199 */
X DAC960_ByteCount64_T LastWrittenBlockNumber; /* Bytes 200-207 */
X DAC960_ByteCount64_T ConsistencyCheckBlockNumber; /* Bytes 208-215 */
@@ -1549,7 +1605,8 @@
X DAC960_V2_RAID_Channel = 0x03,
X DAC960_V2_Physical_Controller = 0x04,
X DAC960_V2_RAID_Controller = 0x05,
- DAC960_V2_Configuration_Group = 0x10
+ DAC960_V2_Configuration_Group = 0x10,
+ DAC960_V2_Enclosure = 0x11
X }
X __attribute__ ((packed))
X DAC960_V2_OperationDevice_T;
@@ -1630,8 +1687,7 @@
X DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */
X DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */
X DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */
- DAC960_ByteCount32_T DataTransferSize:24; /* Bytes 4-6 */
- unsigned char DataTransferPageNumber; /* Byte 7 */
+ DAC960_ByteCount32_T DataTransferSize; /* Bytes 4-7 */
X DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */
X DAC960_V2_PhysicalDevice_T PhysicalDevice; /* Bytes 16-18 */
X DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */
@@ -1645,8 +1701,7 @@
X DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */
X DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */
X DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */
- DAC960_ByteCount32_T DataTransferSize:24; /* Bytes 4-6 */
- unsigned char DataTransferPageNumber; /* Byte 7 */
+ DAC960_ByteCount32_T DataTransferSize; /* Bytes 4-7 */
X DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */
X DAC960_V2_PhysicalDevice_T PhysicalDevice; /* Bytes 16-18 */
X DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */
@@ -1795,7 +1850,6 @@
X DataTransferMemoryAddress; /* Bytes 32-63 */
X } DeviceOperation;
X }
-__attribute__ ((packed))
X DAC960_V2_CommandMailbox_T;
X
X
@@ -2074,7 +2128,8 @@
X DAC960_LP_Controller = 2, /* AcceleRAID 352 */
X DAC960_LA_Controller = 3, /* DAC1164P */
X DAC960_PG_Controller = 4, /* DAC960PTL/PJ/PG */
- DAC960_PD_Controller = 5 /* DAC960PU/PD/PL */
+ DAC960_PD_Controller = 5, /* DAC960PU/PD/PL/P */
+ DAC960_P_Controller = 6 /* DAC960PU/PD/PL/P */
X }
X DAC960_HardwareType_T;
X
@@ -2336,6 +2391,7 @@
X unsigned short DeviceStateChannel;
X unsigned short DeviceStateTargetID;
X boolean DualModeMemoryMailboxInterface;
+ boolean BackgroundInitializationStatusSupported;
X boolean SAFTE_EnclosureManagementEnabled;
X boolean NeedLogicalDriveInformation;
X boolean NeedErrorTableInformation;
@@ -2344,6 +2400,7 @@
X boolean NeedDeviceSerialNumberInformation;
X boolean NeedRebuildProgress;
X boolean NeedConsistencyCheckProgress;
+ boolean NeedBackgroundInitializationStatus;
X boolean StartDeviceStateScan;
X boolean RebuildProgressFirst;
X boolean RebuildFlagPending;
@@ -2367,6 +2424,10 @@
X DAC960_V1_CommandStatus_T PendingRebuildStatus;
X DAC960_V1_LogicalDriveInformationArray_T LogicalDriveInformation;
X DAC960_V1_LogicalDriveInformationArray_T NewLogicalDriveInformation;
+ DAC960_V1_BackgroundInitializationStatus_T
+ BackgroundInitializationStatus;
+ DAC960_V1_BackgroundInitializationStatus_T
+ LastBackgroundInitializationStatus;
X DAC960_V1_DeviceState_T
X DeviceState[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets];
X DAC960_V1_DeviceState_T NewDeviceState;
@@ -4144,13 +4205,46 @@
X return true;
X }
X
+static inline void DAC960_P_To_PD_TranslateEnquiry(void *Enquiry)
+{
+ memcpy(Enquiry + 132, Enquiry + 36, 64);
+ memset(Enquiry + 36, 0, 96);
+}
+
+static inline void DAC960_P_To_PD_TranslateDeviceState(void *DeviceState)
+{
+ memcpy(DeviceState + 2, DeviceState + 3, 1);
+ memcpy(DeviceState + 4, DeviceState + 5, 2);
+ memcpy(DeviceState + 6, DeviceState + 8, 4);
+}
+
+static inline
+void DAC960_PD_To_P_TranslateReadWriteCommand(DAC960_V1_CommandMailbox_T
+ *CommandMailbox)
+{
+ int LogicalDriveNumber = CommandMailbox->Type5.LD.LogicalDriveNumber;
+ CommandMailbox->Bytes[3] &= 0x7;
+ CommandMailbox->Bytes[3] |= CommandMailbox->Bytes[7] << 6;
+ CommandMailbox->Bytes[7] = LogicalDriveNumber;
+}
+
+static inline
+void DAC960_P_To_PD_TranslateReadWriteCommand(DAC960_V1_CommandMailbox_T
+ *CommandMailbox)
+{
+ int LogicalDriveNumber = CommandMailbox->Bytes[7];
+ CommandMailbox->Bytes[7] = CommandMailbox->Bytes[3] >> 6;
+ CommandMailbox->Bytes[3] &= 0x7;
+ CommandMailbox->Bytes[3] |= LogicalDriveNumber << 3;
+}
+
X
X /*
X Define prototypes for the forward referenced DAC960 Driver Internal Functions.
X */
X
X static void DAC960_FinalizeController(DAC960_Controller_T *);
-static int DAC960_Finalize(NotifierBlock_T *, unsigned long, void *);
+static int DAC960_Notifier(NotifierBlock_T *, unsigned long, void *);
X static void DAC960_V1_QueueReadWriteCommand(DAC960_Command_T *);
X static void DAC960_V2_QueueReadWriteCommand(DAC960_Command_T *);
X static void DAC960_RequestFunction0(void);
@@ -4166,6 +4260,7 @@
X static void DAC960_LA_InterruptHandler(int, void *, Registers_T *);
X static void DAC960_PG_InterruptHandler(int, void *, Registers_T *);
X static void DAC960_PD_InterruptHandler(int, void *, Registers_T *);
+static void DAC960_P_InterruptHandler(int, void *, Registers_T *);
X static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *);
X static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *);
X static void DAC960_MonitoringTimerFunction(unsigned long);
@@ -4173,7 +4268,7 @@
X static int DAC960_Release(Inode_T *, File_T *);
X static int DAC960_IOCTL(Inode_T *, File_T *, unsigned int, unsigned long);
X static int DAC960_UserIOCTL(Inode_T *, File_T *, unsigned int, unsigned long);
-static void DAC960_InitializeGenericDiskInfo(GenericDiskInfo_T *);
+static void DAC960_ComputeGenericDiskInfo(GenericDiskInfo_T *GenericDiskInfo);
X static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *,
X DAC960_Controller_T *, ...);
X static void DAC960_CreateProcEntries(void);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/cciss.c linux/drivers/block/cciss.c
--- v2.2.19/drivers/block/cciss.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/cciss.c Wed Oct 10 01:40:43 2001
@@ -42,12 +42,12 @@
X #include <linux/genhd.h>
X
X #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
-#define DRIVER_NAME "Compaq CISS Driver (v 1.0.0)"
-#define DRIVER_VERSION CCISS_DRIVER_VERSION(1,0,0)
+#define DRIVER_NAME "Compaq CISS Driver (v 1.0.4)"
+#define DRIVER_VERSION CCISS_DRIVER_VERSION(1,0,4)
X
X /* Embedded module documentation macros - see modules.h */
X MODULE_AUTHOR("Charles M. White III - Compaq Computer Corporation");
-MODULE_DESCRIPTION("Driver for Compaq Smart Array Controller 5300");
+MODULE_DESCRIPTION("Driver for Compaq Smart Array 5xxx Controllers ");
X
X #include "cciss_cmd.h"
X #include "cciss.h"
@@ -61,6 +61,8 @@
X */
X static struct board_type products[] = {
X { 0x40700E11, "Smart Array 5300", &SA5_access },
+ { 0x40800E11, "Smart Array 5i", &SA5B_access},
+ { 0x40820E11, "Smart Array 532", &SA5B_access},
X };
X
X /* How long to wait (in millesconds) for board to go into simple mode */
@@ -135,10 +137,10 @@
X
X ctlr = h->ctlr;
X size = sprintf(buffer, "%s: Compaq %s Controller\n"
- " Board ID: %08lx\n"
+ " Board ID: 0x%08lx\n"
X " Firmware Version: %c%c%c%c\n"
- " Memory Address: %08lx\n"
- " IRQ: 0x%x\n"
+ " Memory Address: 0x%08lx\n"
+ " IRQ: %d\n"
X " Logical drives: %d\n"
X " Current Q depth: %d\n"
X " Current # commands on controller %d\n"
@@ -416,6 +418,8 @@
X put_user(read_ahead[MAJOR(inode->i_rdev)], (int*)arg);
X return 0;
X case BLKRRPART:
+ if(!capable(CAP_SYS_ADMIN))
+ return -EPERM;
X return revalidate_logvol(inode->i_rdev, 1);
X
X case CCISS_GETPCIINFO:
@@ -719,7 +723,7 @@
X spin_lock_irqsave(&io_request_lock, flags);
X if (hba[ctlr]->drv[target].usage_count > maxusage) {
X spin_unlock_irqrestore(&io_request_lock, flags);
- printk(KERN_WARNING "cpqarray: Device busy for "
+ printk(KERN_WARNING "cciss: Device busy for "
X "revalidation (usage=%d)\n",
X hba[ctlr]->drv[target].usage_count);
X return -EBUSY;
@@ -730,7 +734,7 @@
X max_p = gdev->max_p;
X start = target << gdev->minor_shift;
X
- for(i=max_p; i>=0; i--) {
+ for(i=max_p-1; i>=0; i--) {
X int minor = start+i;
X kdev_t devi = MKDEV(MAJOR_NR + ctlr, minor);
X struct super_block *sb = get_super(devi);
@@ -1125,7 +1129,7 @@
X if (timeout)
X status = 0;
X if(cmd->err_info->CommandStatus != 0)
- { /* an error has occured */
+ { /* an error has occurred */
X switch(cmd->err_info->CommandStatus)
X {
X case CMD_TARGET_STATUS:
@@ -1369,7 +1373,7 @@
X a &= ~3;
X if ((c = h->cmpQ) == NULL)
X {
- printk(KERN_WARNING "cpqarray: Completion of %08lx ignored\n", (unsigned long)a1);
+ printk(KERN_WARNING "cciss: Completion of %08lx ignored\n", (unsigned long)a1);
X continue;
X }
X while(c->busaddr != a) {
@@ -1437,7 +1441,7 @@
X printk(" Heartbeat Counter = 0x%x\n\n\n",
X readl(&(tb->HeartBeat)));
X }
-#endif /* CCISS_DEBUG */
+#endif /* CCISS_DEBUG */
X
X static int cciss_pci_init(ctlr_info_t *c, unchar bus, unchar device_fn)
X {
@@ -1447,7 +1451,9 @@
X uint addr[6];
X __u32 board_id;
X struct pci_dev *pdev;
-
+ int cfg_offset;
+ int cfg_base_addr;
+ int cfg_base_addr_index;
X int i;
X
X pdev = pci_find_slot(bus, device_fn);
@@ -1487,15 +1493,36 @@
X * Memory base addr is first addr , the second points to the config
X * table
X */
- c->paddr = addr[0];
- c->vaddr = remap_pci_mem(c->paddr, 128);
- c->cfgtable = (CfgTable_struct *) remap_pci_mem(addr[1],
- sizeof(CfgTable_struct));
- c->board_id = board_id;
+ c->paddr = addr[0] & 0xfffffff0; /* remove the addressing mode bits */
+#ifdef CCISS_DEBUG
+ printk("address 0 = %x\n", c->paddr);
+#endif /* CCISS_DEBUG */
+ c->vaddr = remap_pci_mem(c->paddr, 200);
X
+ /* get the address index number */
+ cfg_base_addr = readl(c->vaddr + SA5_CTCFG_OFFSET);
+ /* I am not prepared to deal with a 64 bit address value */
+ cfg_base_addr &= 0xffff;
X #ifdef CCISS_DEBUG
- print_cfg_table(c->cfgtable);
+ printk("cfg base address = %x\n", cfg_base_addr);
+#endif /* CCISS_DEBUG */
+ cfg_base_addr_index = (cfg_base_addr - PCI_BASE_ADDRESS_0)/4;
+#ifdef CCISS_DEBUG
+ printk("cfg base address index = %x\n", cfg_base_addr_index);
+#endif /* CCISS_DEBUG */
+
+ cfg_offset = readl(c->vaddr + SA5_CTMEM_OFFSET);
+#ifdef CCISS_DEBUG
+ printk("cfg offset = %x\n", cfg_offset);
X #endif /* CCISS_DEBUG */
+ c->cfgtable = (CfgTable_struct *)
+ remap_pci_mem((addr[cfg_base_addr_index] & 0xfffffff0)
+ + cfg_offset, sizeof(CfgTable_struct));
+ c->board_id = board_id;
+
+#ifdef CCISS_DEBUG
+ print_cfg_table(c->cfgtable);
+#endif CCISS_DEBUG
X for(i=0; i<NR_PRODUCTS; i++) {
X if (board_id == products[i].board_id) {
X c->product_name = products[i].product_name;
@@ -1509,6 +1536,14 @@
X (unsigned long)board_id);
X return -1;
X }
+ if ( (readb(&c->cfgtable->Signature[0]) != 'C') ||
+ (readb(&c->cfgtable->Signature[1]) != 'I') ||
+ (readb(&c->cfgtable->Signature[2]) != 'S') ||
+ (readb(&c->cfgtable->Signature[3]) != 'S') )
+ {
+ printk("Does not appear to be a valid CISS config table\n");
+ return -1;
+ }
X #ifdef CCISS_DEBUG
X printk("Trying to put board into Simple mode\n");
X #endif /* CCISS_DEBUG */
@@ -1550,14 +1585,22 @@
X
X int index;
X unchar bus=0, dev_fn=0;
-
+
+ #define CCISS_BOARD_TYPES 2
+ static int cciss_device_id[CCISS_BOARD_TYPES] = {
+ PCI_DEVICE_ID_COMPAQ_CISS, PCI_DEVICE_ID_COMPAQ_CISSB};
+ int brdtype;
+
+ /* search for all PCI board types that could be for this driver */
+ for(brdtype=0; brdtype<CCISS_BOARD_TYPES; brdtype++)
+ {
X for(index=0; ; index++) {
X if (pcibios_find_device(PCI_VENDOR_ID_COMPAQ,
- PCI_DEVICE_ID_COMPAQ_CISS,
+ cciss_device_id[brdtype],
X index, &bus, &dev_fn))
X break;
X printk(KERN_DEBUG "cciss: Device %x has been found at %x %x\n",
- PCI_DEVICE_ID_COMPAQ_CISS, bus, dev_fn);
+ cciss_device_id[brdtype], bus, dev_fn);
X if (index == 1000000) break;
X if (nr_ctlr == 8) {
X printk(KERN_WARNING "cciss: This driver"
@@ -1583,6 +1626,7 @@
X nr_ctlr++;
X
X }
+ }
X return nr_ctlr;
X
X }
@@ -1712,8 +1756,8 @@
X printk(KERN_WARNING "cciss: read capacity failed\n");
X total_size = block_size = 0;
X }
- printk(" blocks= %d block_size= %d\n", total_size,
- block_size);
+ printk(KERN_INFO " blocks= %d block_size= %d\n",
+ total_size, block_size);
X
X /* Execute the command to read the disk geometry */
X memset(inq_buff, 0, sizeof(InquiryData_struct));
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/cciss.h linux/drivers/block/cciss.h
--- v2.2.19/drivers/block/cciss.h Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/cciss.h Wed Oct 10 01:40:43 2001
@@ -94,8 +94,13 @@
X #define SA5_REPLY_PORT_OFFSET 0x44
X #define SA5_INTR_STATUS 0x30
X
+#define SA5_CTCFG_OFFSET 0xB4
+#define SA5_CTMEM_OFFSET 0xB8
+
X #define SA5_INTR_OFF 0x08
+#define SA5B_INTR_OFF 0x04
X #define SA5_INTR_PENDING 0x08
+#define SA5B_INTR_PENDING 0x04
X #define FIFO_EMPTY 0xffffffff
X
X #define CISS_ERROR_BIT 0x02
@@ -133,6 +138,22 @@
X }
X }
X /*
+ * This card is the oposite of the other cards.
+ * 0 turns interrupts on...
+ * 0x04 turns them off...
+ */
+static void SA5B_intr_mask(ctlr_info_t *h, unsigned long val)
+{
+ if (val)
+ { /* Turn interrupts on */
+ writel(0, h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
+ } else /* Turn them off */
+ {
+ writel( SA5B_INTR_OFF,
+ h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
+ }
+}
+/*
X * Returns true if fifo is full.
X *
X */
@@ -183,6 +204,21 @@


X return 0 ;
X }
X

+/*
+ * Returns true if an interrupt is pending..
+ */
+static unsigned long SA5B_intr_pending(ctlr_info_t *h)
+{
+ unsigned long register_value =
+ readl(h->vaddr + SA5_INTR_STATUS);
+#ifdef CCISS_DEBUG
+ printk("cciss: intr_pending %lx\n", register_value);
+#endif /* CCISS_DEBUG */
+ if( register_value & SA5B_INTR_PENDING)
+ return 1;


+ return 0 ;
+}
+

X
X static struct access_method SA5_access = {
X SA5_submit_command,
@@ -190,6 +226,14 @@
X SA5_fifo_full,
X SA5_intr_pending,
X SA5_completed,
+};
+
+static struct access_method SA5B_access = {
+ SA5_submit_command,
+ SA5B_intr_mask,
+ SA5_fifo_full,
+ SA5B_intr_pending,
+ SA5_completed,
X };
X
X struct board_type {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/cciss_cmd.h linux/drivers/block/cciss_cmd.h
--- v2.2.19/drivers/block/cciss_cmd.h Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/cciss_cmd.h Wed Oct 10 01:40:43 2001
@@ -125,20 +125,20 @@
X //Command List Structure
X typedef union _SCSI3Addr_struct {
X struct {
+ BYTE Dev;
X BYTE Bus:6;
X BYTE Mode:2; // b00
- BYTE Dev;
X } PeripDev;
X struct {
+ BYTE DevLSB;
X BYTE DevMSB:6;
X BYTE Mode:2; // b01
- BYTE DevLSB;
X } LogDev;
X struct {
- BYTE Targ:6;
- BYTE Mode:2; // b10
X BYTE Dev:5;
X BYTE Bus:3;
+ BYTE Targ:6;
+ BYTE Mode:2; // b10
X } LogUnit;
X } SCSI3Addr_struct;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
--- v2.2.19/drivers/block/cpqarray.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/cpqarray.c Wed Oct 10 01:40:43 2001
@@ -41,8 +41,8 @@
X
X #define SMART2_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
X
-#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.11)"
-#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,11)
+#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.12)"
+#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,12)
X
X /* Embedded module documentation macros - see modules.h */
X /* Original author Chris Frantz - Compaq Computer Corporation */
@@ -1167,6 +1167,8 @@
X put_user(read_ahead[MAJOR(inode->i_rdev)], (int*)arg);
X return 0;
X case BLKRRPART:
+ if(!capable(CAP_SYS_ADMIN))
+ return -EPERM;
X return revalidate_logvol(inode->i_rdev, 1);
X case IDAPASSTHRU:
X if (!suser()) return -EPERM;
@@ -1556,7 +1558,7 @@
X max_p = gdev->max_p;
X start = target << gdev->minor_shift;
X
- for(i=max_p; i>=0; i--) {
+ for(i=max_p-1; i>=0; i--) {
X int minor = start+i;
X kdev_t devi = MKDEV(MAJOR_NR + ctlr, minor);
X struct super_block *sb = get_super(devi);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/genhd.c linux/drivers/block/genhd.c
--- v2.2.19/drivers/block/genhd.c Sun Mar 25 17:37:30 2001
+++ linux/drivers/block/genhd.c Wed Oct 10 01:40:43 2001
@@ -336,7 +336,8 @@
X goto done; /* nothing left to do */
X
X hd->part[current_minor].nr_sects = NR_SECTS(p) * sector_size; /* JSt */
- hd->part[current_minor].start_sect = first_sector + START_SECT(p) * sector_size;
+ hd->part[current_minor].start_sect =
+ first_sector + START_SECT(p) * sector_size;
X this_sector = first_sector + START_SECT(p) * sector_size;
X dev = MKDEV(hd->major, current_minor);
X brelse(bh);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c
--- v2.2.19/drivers/block/ide-cd.c Sun Mar 25 17:31:23 2001
+++ linux/drivers/block/ide-cd.c Wed Oct 10 01:40:44 2001
@@ -254,7 +254,7 @@
X * They will disappear later when I get the time to
X * do it cleanly.
X * - Minimize the TOC reading - only do it when we
- * know a media change has occured.
+ * know a media change has occurred.
X * - Moved all the CDROMREADx ioctls to the Uniform layer.
X * - Heiko Eissfeldt <he...@colossus.escape.de> supplied
X * some fixes for CDI.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/ide-dma.c linux/drivers/block/ide-dma.c
--- v2.2.19/drivers/block/ide-dma.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/ide-dma.c Wed Oct 10 01:40:44 2001
@@ -217,6 +217,20 @@
X xcount = bcount & 0xffff;
X if (is_trm290_chipset)
X xcount = ((xcount >> 2) - 1) << 16;
+ if (xcount == 0x0000) {
+ /*
+ * Most chipsets correctly interpret a length of 0x0000 as 64KB,
+ * but at least one (e.g. CS5530) misinterprets it as zero (!).
+ * So here we break the 64KB entry into two 32KB entries instead.
+ */
+ if (count++ >= PRD_ENTRIES) {
+ printk("%s: DMA table too small\n", drive->name);
+ return 0; /* revert to PIO for this request */
+ }
+ *table++ = cpu_to_le32(0x8000);
+ *table++ = cpu_to_le32(addr + 0x8000);
+ xcount = 0x8000;
+ }
X *table++ = cpu_to_le32(xcount);
X addr += bcount;
X size -= bcount;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/ide-floppy.c linux/drivers/block/ide-floppy.c
--- v2.2.19/drivers/block/ide-floppy.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/ide-floppy.c Wed Oct 10 01:40:44 2001
@@ -125,7 +125,7 @@
X byte *current_position; /* Pointer into the above buffer */
X void (*callback) (ide_drive_t *); /* Called when this packet command is completed */
X byte pc_buffer[IDEFLOPPY_PC_BUFFER_SIZE]; /* Temporary buffer */
- unsigned int flags; /* Status/Action bit flags */
+ unsigned long flags; /* Status/Action bit flags */
X } idefloppy_pc_t;
X
X /*
@@ -259,7 +259,7 @@
X idefloppy_flexible_disk_page_t flexible_disk_page; /* Copy of the flexible disk page */
X int wp; /* Write protect */
X
- unsigned int flags; /* Status/Action flags */
+ unsigned long flags; /* Status/Action flags */
X } idefloppy_floppy_t;
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/ide-pmac.c linux/drivers/block/ide-pmac.c
--- v2.2.19/drivers/block/ide-pmac.c Sun Mar 25 17:37:30 2001
+++ linux/drivers/block/ide-pmac.c Wed Oct 10 01:40:44 2001
@@ -97,7 +97,7 @@
X /* Wait 2s for disk to answer on IDE bus after
X * enable operation.
X * NOTE: There is at least one case I know of a disk that needs about 10sec
- * before anwering on the bus. I beleive we could add a kernel command
+ * before anwering on the bus. I believe we could add a kernel command
X * line arg to override this delay for such cases.
X */
X #define IDE_WAKEUP_DELAY_MS 2000
@@ -192,9 +192,10 @@
X }
X #endif
X
-/* Setup timings for the selected drive (master/slave). I still need to verify if this
- * is enough, I beleive selectproc will be called whenever an IDE command is started,
- * but... */
+/* Setup timings for the selected drive (master/slave). I still need to
+ * verify if this is enough, I believe selectproc will be called whenever
+ * an IDE command is started, but...
+ */
X static void
X pmac_ide_selectproc(ide_drive_t *drive)
X {
@@ -905,7 +906,7 @@
X * Problem: This can schedule. I moved the block device
X * wakeup almost late by priority because of that.
X */
- if (DRIVER(drive))
+ if (DRIVER(drive) && DRIVER(drive)->media_change)
X DRIVER(drive)->media_change(drive);
X
X /* We kick the VFS too (see fix in ide.c revalidate) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/ide.c linux/drivers/block/ide.c
--- v2.2.19/drivers/block/ide.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/ide.c Wed Oct 10 01:40:44 2001
@@ -1298,9 +1298,10 @@
X del_timer(&hwgroup->timer);
X if ((handler = hwgroup->handler) == NULL) {
X /*
- * Either a marginal timeout occured (got the interrupt just as timer expired),
- * or we were "sleeping" to give other devices a chance. Either way, we don't
- * really want to complain about anything.
+ * Either a marginal timeout occurred (got the interrupt
+ * just as timer expired), or we were "sleeping" to give
+ * other devices a chance. Either way, we don't really
+ * want to complain about anything.
X */
X if (hwgroup->sleeping) {
X hwgroup->sleeping = 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
--- v2.2.19/drivers/block/ll_rw_blk.c Sun Mar 25 17:37:30 2001
+++ linux/drivers/block/ll_rw_blk.c Wed Oct 10 01:40:44 2001
@@ -1063,6 +1063,9 @@
X #ifdef CONFIG_DASD
X dasd_init();
X #endif
+#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_BLOCK)
+ tapeblock_init();
+#endif
X #ifdef CONFIG_BLK_DEV_XPRAM
X xpram_init();
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/block/paride/pt.c linux/drivers/block/paride/pt.c
--- v2.2.19/drivers/block/paride/pt.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/block/paride/pt.c Wed Oct 10 01:40:44 2001
@@ -753,6 +753,10 @@
X pt_rewind(unit);
X return 0;
X
+ case MTWEOF:
+ pt_write_fm(unit);
+ return 0;
+
X default:
X printk("%s: Unimplemented mt_op %d\n",PT.name,
X mtop.mt_op);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- v2.2.19/drivers/cdrom/cdrom.c Sun Mar 25 18:44:42 2001
+++ linux/drivers/cdrom/cdrom.c Wed Oct 10 01:40:44 2001
@@ -514,12 +514,12 @@
X couldn't close the tray. We only care
X that there is no disc in the drive,
X since that is the _REAL_ problem here.*/
- ret=-ENOMEDIUM;
+ ret = -ENOMEDIUM;
X goto clean_up_and_return;
X }
X } else {
X cdinfo(CD_OPEN, "bummer. this drive can't close the tray.\n");
- ret=-ENOMEDIUM;
+ ret = -ENOMEDIUM;
X goto clean_up_and_return;
X }
X /* Ok, the door should be closed now.. Check again */
@@ -527,7 +527,7 @@
X if ((ret == CDS_NO_DISC) || (ret==CDS_TRAY_OPEN)) {
X cdinfo(CD_OPEN, "bummer. the tray is still not closed.\n");
X cdinfo(CD_OPEN, "tray might not contain a medium.\n");
- ret=-ENOMEDIUM;
+ ret = -ENOMEDIUM;
X goto clean_up_and_return;
X }
X cdinfo(CD_OPEN, "the tray is now closed.\n");
@@ -540,7 +540,7 @@
X cdrom_count_tracks(cdi, &tracks);
X if (tracks.error == CDS_NO_DISC) {
X cdinfo(CD_OPEN, "bummer. no disc.\n");
- ret=-ENOMEDIUM;
+ ret = -ENOMEDIUM;
X goto clean_up_and_return;
X }
X /* CD-Players which don't use O_NONBLOCK, workman
@@ -1952,6 +1952,7 @@
X ra.buf += (CD_FRAMESIZE_RAW * frames);
X ra.nframes -= frames;
X lba += frames;
+ if (frames>ra.nframes) frames=ra.nframes;
X }
X kfree(cgc.buffer);
X return ret;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c
--- v2.2.19/drivers/cdrom/sbpcd.c Sun Mar 25 17:31:37 2001
+++ linux/drivers/cdrom/sbpcd.c Wed Oct 10 01:40:44 2001
@@ -4261,7 +4261,7 @@
X i=verify_area(VERIFY_READ, (void *) arg, sizeof(struct cdrom_read_audio));
X if (i) RETURN_UP(i);
X copy_from_user(&read_audio, (void *) arg, sizeof(struct cdrom_read_audio));
- if (read_audio.nframes>D_S[d].sbp_audsiz) RETURN_UP(-EINVAL);
+ if (read_audio.nframes < 0 || read_audio.nframes>D_S[d].sbp_audsiz) RETURN_UP(-EINVAL);
X i=verify_area(VERIFY_WRITE, read_audio.buf,
X read_audio.nframes*CD_FRAMESIZE_RAW);
X if (i) RETURN_UP(i);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/Config.in linux/drivers/char/Config.in
--- v2.2.19/drivers/char/Config.in Sun Mar 25 17:37:30 2001
+++ linux/drivers/char/Config.in Wed Oct 10 01:40:44 2001
@@ -53,8 +53,8 @@
X tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION
X tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION
X fi
- dep_tristate 'Microgate SyncLink card support' CONFIG_SYNCLINK m
- dep_tristate 'HDLC line discipline support' CONFIG_N_HDLC m
+ tristate 'Microgate SyncLink card support' CONFIG_SYNCLINK
+ tristate 'HDLC line discipline support' CONFIG_N_HDLC
X fi
X bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
X if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
@@ -102,7 +102,7 @@
X tristate ' Acquire SBC Watchdog Timer' CONFIG_ACQUIRE_WDT
X tristate ' Advantech SBC Watchdog Timer' CONFIG_ADVANTECH_WDT
X tristate ' Berkshire Products PC Watchdog' CONFIG_PCWATCHDOG
- tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
+ tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
X tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD
X tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT
X tristate ' Software Watchdog' CONFIG_SOFT_WATCHDOG
@@ -114,6 +114,7 @@
X fi
X fi
X tristate ' WDT PCI Watchdog timer' CONFIG_WDTPCI
+ tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT
X endmenu
X fi
X
@@ -136,6 +137,7 @@
X bool ' AMD Irongate support' CONFIG_AGP_AMD
X bool ' Generic SiS support' CONFIG_AGP_SIS
X bool ' ALI M1541 support' CONFIG_AGP_ALI
+ bool ' Serverworks LE/HE support' CONFIG_AGP_SWORKS
X fi
X source drivers/char/drm/Config.in
X fi
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/Makefile linux/drivers/char/Makefile
--- v2.2.19/drivers/char/Makefile Sun Mar 25 17:37:30 2001
+++ linux/drivers/char/Makefile Wed Oct 10 01:40:44 2001
@@ -184,12 +184,20 @@


X endif
X endif
X

-ifeq ($(CONFIG_SYNCLINK),m)
+ifeq ($(CONFIG_SYNCLINK),y)
+O_OBJS += synclink.o
+else
+ ifeq ($(CONFIG_SYNCLINK),m)
X M_OBJS += synclink.o


+ endif
X endif
X

-ifeq ($(CONFIG_N_HDLC),m)
+ifeq ($(CONFIG_N_HDLC),y)
+O_OBJS += n_hdlc.o
+else
+ ifeq ($(CONFIG_N_HDLC),m)
X M_OBJS += n_hdlc.o


+ endif
X endif
X

X ifeq ($(CONFIG_SPECIALIX),y)
@@ -370,6 +378,14 @@
X else
X ifeq ($(CONFIG_WDTPCI),m)
X M_OBJS += wdt_pci.o
+ endif
+endif
+
+ifeq ($(CONFIG_MACHZ_WDT),y)
+O_OBJS += machzwd.o
+else
+ ifeq ($(CONFIG_MACHZ_WDT),m)
+ M_OBJS += machzwd.o


X endif
X endif
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/README.computone linux/drivers/char/README.computone
--- v2.2.19/drivers/char/README.computone Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/README.computone Wed Oct 31 14:08:37 2001
@@ -1,227 +1,10 @@
-
X Computone Intelliport II/Plus Multiport Serial Driver
X -----------------------------------------------------
X
-Release Notes For Linux Kernel 2.2
-These notes have been tested on Linux kernels 2.0 and 2.2.
-
-Please refer to Documentation/computone.txt for information on the driver
-that is included with the kernel sources.
-
-
-Version: 1.2.9
-Date: 04/12/2000
-Fixes and Updates: Doug McNash
-Historical Author: Andrew Manison
-Kernel Integration: Mike Warfield <m...@wittsend.com>
-
-1. INTRODUCTION
-
-This driver supports the entire family of Intelliport II/Plus controllers
-with the exception of the MicroChannel controllers.
-
-This driver was developed on the v2.0.x Linux source tree and has been
-tested up to v2.2.14; it will probably not work with earlier v1.X kernels,
-and has not yet been tested on the v2.1.x tree. The most likely problems
-will be in patching the kernel sources to support the driver. For this
-reason there are 2 different patch files for 2.0.XX and 2.2.XX kernels.
-Make sure you use the right one!
-Note that a version (1.2.5) is included in the 2.2.12+ kernels so this
-will not be a new install but and upgrade.
-
-
-2. QUICK INSTALLATION
-
-Hardware - If you have an ISA card, find a free interrupt and io port.
- List those in use with `cat /proc/interrupts` and
- `cat /proc/ioports`. Set the card dip switches to that free
- address. You may need to configure your BIOS to reserve the
- irq for the ISA card. PCI and EISA parameters are set
- automagically and need only be set to nonzero values.
- Insert card into computer with the power off before or after
- driver installation.
-
-Software - New Installation
-
-Module installation:
-
-a) Obtain driver-kernel patch file
-b) Copy to the linux source tree root, Run ip2build (if not patch)
-c) Determine free irq/address to use if any (configure BIOS if need be)
-d) Run "make config" or "make menuconfig" or "make xconfig"
- Select (m) module for CONFIG_COMPUTONE under character
- devices. CONFIG_PCI and CONFIG_MODULES also may need to be set.
-e) Set address on ISA cards then:
- edit /usr/src/linux/drivers/char/ip2/ip2.h if needed
- or
- edit /etc/conf.modules (or /etc/modules.conf) if needed (module).
- or both to match this setting.
-f) Run "make dep"
-g) Run "make modules"
-h) Run "make modules_install"
-i) Run "/sbin/depmod -a"
-i) install driver using `modprobe ip2 <options>` (options listed below)
-j) run mkip2dev
-
-
-Kernel installation:
-
-a) Obtain driver-kernel patch file
-b) Copy to the linux source tree root, Run ip2build (if not patch)
-c) Determine free irq/address to use if any (configure BIOS if need be)
-d) Run "make config" or "make menuconfig" or "make xconfig"
- Select (y) kernel for CONFIG_COMPUTONE under character
- devices. CONFIG_PCI may need to be set if you have PCI bus.
-e) Set address on ISA cards then:
- edit /usr/src/linux/drivers/char/ip2/ip2.h
-f) Run "make dep"
-g) Run "make zImage" or whatever target you prefer.
-h) mv /usr/src/linux/arch/i386/boot/zImage to /boot.
-i) add new config for this kernel into /etc/lilo.conf, run "lilo"
-j) reboot using this kernel
-k) make and run ip2/mkip2dev
-
-Software - Upgrades
-
-a) Install new sources in proper location, usually /usr/src/linux/drivers/char
-b) Follow steps above to create new kernel or modules
-
-3. INSTALLATION
-
-Previously, the driver sources were packaged with a set of patch files
-to update the character drivers' makefile and configuration file, and other
-kernel source files. A build script (ip2build) was included which applies
-the patches if needed, and build any utilities needed.
-What you receive may be a single patch file in conventional kernel
-patch format build script. That form can also be applied by
-running patch -p1 < ThePatchFile. Otherwise the drivers source may be
-a tar file, then untar and run ip2build if a new installation.
-
-The driver can be installed as a module (recommended) or built into the
-kernel. This is selected as for other drivers through the `make config`
-command from the root of the Linux source tree. If the driver is built
-into the kernel you will need to edit the file ip2.h to match the boards
-you are installing. See that file for instructions. If the driver is
-installed as a module the configuration can also be specified on the
-modprobe command line as follows:
-
- modprobe ip2 irq=irq1,irq2,irq3,irq4 io=addr1,addr2,addr3,addr4
-
-where irqnum is one of the valid Intelliport II interrupts (3,4,5,7,10,11,
-12,15) and addr1-4 are the base addresses for up to four controllers. If
-the irqs are not specified the driver uses the default in ip2/ip2.h (which
-selects polled mode). The io addresses are set to io=1 for PCI cards,i
-io=2 for EISA cards or io=[some valid ISA address] for ISA cards. If no
-base addresses are specified the defaults in ip2.h are used. If you are
-autoloading the driver module with kerneld or kmod the base addresses and
-interrupt number must also be set in ip2/ip2.h and recompile or just insert
-an options line in /etc/modules.conf or both. The command line takes
-precidence over the options line which takes precidence over the defaults
-in ip2.h.
-
-command line sample:
-
- modprobe ip2 io=1,0x328 irq=1,10
-
-/etc/modules.conf sample:
-
- options ip2 io=1,0x328 irq=1,10
- alias char-major-71 ip2
- alias char-major-72 ip2
- alias char-major-73 ip2
-
-the equivelant ip2.h:
-
-static ip2config_t ip2config =
-{
- {1,10,0,0},
- {
- 0x0001, // Board 0, ttyF0 - ttyF63 /* PCI card */
- 0x0328, // Board 1, ttyF64 - ttyF127 /* ISA card */
- 0x0000, // Board 2, ttyF128 - ttyF191 /* empty */
- 0x0000 // Board 3, ttyF192 - ttyF255 /* empty */
- }
-};
-
-Specifying an invalid or in-use ISA irq will default the driver into
-running in polled mode for that card. If all irq entries are 0 then
-all cards will operate in polled mode. Note that the PCI will be
-assigned it's irq by the BIOS and may not match what you specify.
-It must be non-zero otherwise it will be polled.
-
-Tarball Install:
-
-The whole tarfile should be untarred in the /usr/src/linux/drivers/char/
-directory. Most files required for the driver are placed in the ip2
-subdirectory. Then execute the script (for a new install only)
-
- ip2build
-
-which will patch the files.
-
-Kernel Patch Install:
-
- cd to the Linux source root, run patch -p1 < ThePatchFile.
-
-Now return to the root directory of the Linux
-source tree and run make config or make menuconfig. You will be prompted
-for the Computone drivers, either as a module or part of the kernel.
-If you have a PCI card you many need to select PCI bios support (CONFIG_PCI)
-if not enabled already. Ditto for CONFIG_MODULES if you use modules.
-
-If you select the driver as part of the kernel run :
-
- make depend
- make bzImage(,zlilo or whatever you do to create a bootable kernel)
-
-If you selected a module run :
-
- make modules && make modules_install
-
-The utility ip2mkdev creates all the device nodes required by the driver.
-For a device to be created it must be configured in the driver and the
-board must be installed. Only devices corresponding to real IntelliPort II
-ports are created. With multiple boards and expansion boxes this will
-leave gaps in the sequence of device names. ip2mkdev uses Linux tty naming
-conventions: ttyF0 - ttyF255 for normal devices, and cuf0 - cuf255 for
-callout devices. Note that the callout devices are going away in the
-future and that is what the warning messages are trying to tell you.
-
-4. USING THE DRIVERS
-
-As noted above, the driver implements the ports in accordance with Linux
-conventions, and the devices should be interchangeable with the standard
-serial devices. (This is a key point for problem reporting: please make
-sure that what you are trying do works on the ttySx/cuax ports first; then
-tell us what went wrong with the ip2 ports!)
-
-Higher speeds can be obtained using the setserial utility which remaps
-38,400 bps (extb) to 57,600 bps, 115,200 bps, or a custom speed.
-Intelliport II installations using the PowerPort expansion module can
-use the custom speed setting to select the highest speeds: 153,600 bps,
-230,400 bps, 307,200 bps, 460,800bps and 921,600 bps. The base for
-custom baud rate configuration is fixed at 921,600 for cards/expantion
-modules with ST654's and 115200 for those with Cirrus CD1400's. This
-corresponds to the maximum bit rates those chips are capable.
-For example if the baud base is 921600 and the baud divisor is 18 then
-the custom rate is 921600/18 = 51200 bps. See the setserial man page for
-complete details. Of course, if stty accepts the higher rates now you can
-use that as well as the standard ioctls().
-
-5. NOTES
-
-This is a release version of the driver, but it is impossible to test it
-in all configurations of Linux. If there is any anomalous behaviour that
-does not match the standard serial port's behaviour please let us know.
-
-Some installations report that characters fail to echo immediatly at a
-terminal if the kernel/modules are compiled with the CONFIG_M386 and
-the card is run in polling mode on a pentium class machine. Compiling
-with a more appropriate processor flag or running on interrupt would be
-the fix as well as the wise thing to do.
+Release Notes For Linux Kernel 2.2 and higher
X
+This file is now deprecated and will be removed at some point.
X
+Please refer to the file Documentation/computone.txt instead.
X
-Author: do...@computone.com
-Testing: lar...@computone.com
-Support: sup...@computone.com
+Michael H. Warfield 08/12/2001
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/acquirewdt.c linux/drivers/char/acquirewdt.c
--- v2.2.19/drivers/char/acquirewdt.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/acquirewdt.c Wed Oct 10 01:40:45 2001
@@ -107,7 +107,7 @@
X break;
X
X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
X }
X return 0;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/advantechwdt.c linux/drivers/char/advantechwdt.c
--- v2.2.19/drivers/char/advantechwdt.c Sun Mar 25 17:37:30 2001
+++ linux/drivers/char/advantechwdt.c Wed Oct 10 01:40:45 2001
@@ -119,7 +119,7 @@
X break;
X
X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
X }
X return 0;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h
--- v2.2.19/drivers/char/agp/agp.h Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/agp/agp.h Wed Oct 10 01:40:45 2001
@@ -94,7 +94,7 @@
X u32 mode;
X enum chipset_type type;
X enum aper_size_type size_type;
- u32 *key_list;
+ unsigned long *key_list;
X atomic_t current_memory_agp;
X atomic_t agp_in_use;
X int max_memory_agp; /* in number of pages */
@@ -119,15 +119,17 @@
X int (*remove_memory) (agp_memory *, off_t, int);
X agp_memory *(*alloc_by_type) (size_t, int);
X void (*free_by_type) (agp_memory *);
+ unsigned long (*agp_alloc_page) (void);
+ void (*agp_destroy_page) (unsigned long);
X };
X
X #define OUTREG32(mmap, addr, val) writel((val),(mmap + (addr)))
X #define OUTREG16(mmap, addr, val) writew((val),(mmap + (addr)))
-#define OUTREG8 (mmap, addr, val) writeb((val),(mmap + (addr)))
+#define OUTREG8(mmap, addr, val) writeb((val),(mmap + (addr)))
X
X #define INREG32(mmap, addr) readl(mmap + (addr))
X #define INREG16(mmap, addr) readw(mmap + (addr))
-#define INREG8 (mmap, addr) readb(mmap + (addr))
+#define INREG8(mmap, addr) readb(mmap + (addr))
X
X #define CACHE_FLUSH agp_bridge.cache_flush
X #define A_SIZE_8(x) ((aper_size_info_8 *) x)
@@ -222,6 +224,24 @@
X #ifndef PCI_DEVICE_ID_VIA_8363_0
X #define PCI_DEVICE_ID_VIA_8363_0 0x0305
X #endif
+#ifndef PCI_DEVICE_ID_AL_M1621_0
+#define PCI_DEVICE_ID_AL_M1621_0 0x1621
+#endif
+#ifndef PCI_DEVICE_ID_AL_M1631_0
+#define PCI_DEVICE_ID_AL_M1631_0 0x1631
+#endif
+#ifndef PCI_DEVICE_ID_AL_M1632_0
+#define PCI_DEVICE_ID_AL_M1632_0 0x1632
+#endif
+#ifndef PCI_DEVICE_ID_AL_M1641_0
+#define PCI_DEVICE_ID_AL_M1641_0 0x1641
+#endif
+#ifndef PCI_DEVICE_ID_AL_M1647_0
+#define PCI_DEVICE_ID_AL_M1647_0 0x1647
+#endif
+#ifndef PCI_DEVICE_ID_AL_M1651_0
+#define PCI_DEVICE_ID_AL_M1651_0 0x1651
+#endif
X
X
X /* intel register */
@@ -283,5 +303,29 @@
X #define ALI_AGPCTRL 0xb8
X #define ALI_ATTBASE 0xbc
X #define ALI_TLBCTRL 0xc0
+#define ALI_TAGCTRL 0xc4
+#define ALI_CACHE_FLUSH_CTRL 0xD0
+#define ALI_CACHE_FLUSH_ADDR_MASK 0xFFFFF000
+#define ALI_CACHE_FLUSH_EN 0x100
+
+
+/* Serverworks Registers */
+#define SVWRKS_APSIZE 0x10
+#define SVWRKS_SIZE_MASK 0xfe000000
+
+#define SVWRKS_MMBASE 0x14
+#define SVWRKS_CACHING 0x4b
+#define SVWRKS_FEATURE 0x68
+
+/* func 1 registers */
+#define SVWRKS_AGP_ENABLE 0x60
+#define SVWRKS_COMMAND 0x04
+
+/* Memory mapped registers */
+#define SVWRKS_GART_CACHE 0x02
+#define SVWRKS_GATTBASE 0x04
+#define SVWRKS_TLBFLUSH 0x10
+#define SVWRKS_POSTFLUSH 0x14
+#define SVWRKS_DIRFLUSH 0x0c
X
X #endif /* _AGP_BACKEND_PRIV_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/agp/agpgart_be.c linux/drivers/char/agp/agpgart_be.c
--- v2.2.19/drivers/char/agp/agpgart_be.c Sun Mar 25 17:37:30 2001
+++ linux/drivers/char/agp/agpgart_be.c Wed Oct 10 01:40:45 2001
@@ -32,7 +32,7 @@
X #include <linux/mm.h>
X #include <linux/string.h>
X #include <linux/errno.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
X #include <linux/vmalloc.h>
X #include <linux/pci.h>
X #include <linux/init.h>
@@ -67,7 +67,7 @@
X {
X #if defined(__i386__)
X asm volatile ("wbinvd":::"memory");
-#elif defined(__alpha__)
+#elif defined(__alpha__) || defined(__ia64__) || defined(__sparc__)
X /* ??? I wonder if we'll really need to flush caches, or if the
X core logic can manage to keep the system coherent. The ARM
X speaks only of using `cflush' to get things in memory in
@@ -125,47 +125,6 @@
X }
X
X /*
- * Basic Page Allocation Routines -
- * These routines handle page allocation
- * and by default they reserve the allocated
- * memory. They also handle incrementing the
- * current_memory_agp value, Which is checked
- * against a maximum value.
- */
-
-static unsigned long agp_alloc_page(void)
-{
- void *pt;
-
- pt = (void *) __get_free_page(GFP_KERNEL);
- if (pt == NULL) {
- return 0;
- }
- atomic_inc(&mem_map[MAP_NR(pt)].count);
- set_bit(PG_locked, &mem_map[MAP_NR(pt)].flags);
- atomic_inc(&agp_bridge.current_memory_agp);
- return (unsigned long) pt;
-}
-
-static void agp_destroy_page(unsigned long page)
-{
- void *pt = (void *) page;
-
- if (pt == NULL) {
- return;
- }
- atomic_dec(&mem_map[MAP_NR(pt)].count);
- clear_bit(PG_locked, &mem_map[MAP_NR(pt)].flags);
-#if 0
- wake_up(&mem_map[MAP_NR(pt)].wait);
-#endif
- free_page((unsigned long) pt);
- atomic_dec(&agp_bridge.current_memory_agp);
-}
-
-/* End Basic Page Allocation Routines */
-
-/*
X * Generic routines for handling agp_memory structures -
X * They use the basic page allocation routines to do the
X * brunt of the work.
@@ -239,7 +198,7 @@
X if (curr->page_count != 0) {
X for (i = 0; i < curr->page_count; i++) {
X curr->memory[i] &= ~(0x00000fff);
- agp_destroy_page((unsigned long)
+ agp_bridge.agp_destroy_page((unsigned long)
X phys_to_virt(curr->memory[i]));
X }
X }
@@ -281,7 +240,7 @@
X return NULL;
X }
X for (i = 0; i < page_count; i++) {
- new->memory[i] = agp_alloc_page();
+ new->memory[i] = agp_bridge.agp_alloc_page();
X
X if (new->memory[i] == 0) {
X /* Free this structure */
@@ -782,6 +741,44 @@
X kfree(curr);
X }
X
+/*
+ * Basic Page Allocation Routines -
+ * These routines handle page allocation
+ * and by default they reserve the allocated
+ * memory. They also handle incrementing the
+ * current_memory_agp value, Which is checked
+ * against a maximum value.
+ */
+
+static unsigned long agp_generic_alloc_page(void)
+{
+ void *pt;
+
+ pt = (void *) __get_free_page(GFP_KERNEL);
+ if (pt == NULL) {
+ return 0;
+ }
+ atomic_inc(&mem_map[MAP_NR(pt)].count);
+ set_bit(PG_locked, &mem_map[MAP_NR(pt)].flags);
+ atomic_inc(&agp_bridge.current_memory_agp);
+ return (unsigned long) pt;
+}
+
+static void agp_generic_destroy_page(unsigned long page)
+{
+ void *pt = (void *) page;
+
+ if (pt == NULL) {
+ return;
+ }
+ atomic_dec(&mem_map[MAP_NR(pt)].count);
+ clear_bit(PG_locked, &mem_map[MAP_NR(pt)].flags);
+ free_page((unsigned long) pt);
+ atomic_dec(&agp_bridge.current_memory_agp);
+}
+
+/* End Basic Page Allocation Routines */
+
X void agp_enable(u32 mode)
X {
X agp_bridge.agp_enable(mode);
@@ -998,7 +995,7 @@
X return NULL;
X }
X MOD_INC_USE_COUNT;
- new->memory[0] = agp_alloc_page();
+ new->memory[0] = agp_bridge.agp_alloc_page();
X
X if (new->memory[0] == 0) {
X /* Free this structure */
@@ -1023,7 +1020,7 @@
X {
X agp_free_key(curr->key);
X if(curr->type == AGP_PHYS_MEMORY) {
- agp_destroy_page((unsigned long)
+ agp_bridge.agp_destroy_page((unsigned long)
X phys_to_virt(curr->memory[0]));
X vfree(curr->memory);
X }
@@ -1061,6 +1058,8 @@
X agp_bridge.remove_memory = intel_i810_remove_entries;
X agp_bridge.alloc_by_type = intel_i810_alloc_by_type;
X agp_bridge.free_by_type = intel_i810_free_by_type;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
X
X return 0;
X }
@@ -1247,6 +1246,12 @@
X agp_bridge.remove_memory = agp_generic_remove_memory;
X agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
X agp_bridge.free_by_type = agp_generic_free_by_type;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
X
X return 0;
X
@@ -1360,6 +1365,8 @@
X agp_bridge.remove_memory = agp_generic_remove_memory;
X agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
X agp_bridge.free_by_type = agp_generic_free_by_type;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
X
X return 0;
X
@@ -1469,6 +1476,8 @@
X agp_bridge.remove_memory = agp_generic_remove_memory;
X agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
X agp_bridge.free_by_type = agp_generic_free_by_type;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
X
X return 0;
X }
@@ -1830,6 +1839,8 @@
X agp_bridge.remove_memory = amd_remove_memory;
X agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
X agp_bridge.free_by_type = agp_generic_free_by_type;
+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
X
X return 0;
X
@@ -1867,10 +1878,9 @@
X u32 temp;
X
X pci_read_config_dword(agp_bridge.dev, ALI_TLBCTRL, &temp);
- pci_write_config_dword(agp_bridge.dev, ALI_TLBCTRL,
- ((temp & 0xffffff00) | 0x00000090));
- pci_write_config_dword(agp_bridge.dev, ALI_TLBCTRL,
- ((temp & 0xffffff00) | 0x00000010));
+// clear tag
+ pci_write_config_dword(agp_bridge.dev, ALI_TAGCTRL,
+ ((temp & 0xfffffff0) | 0x00000001|0x00000002));
X }
X
X static void ali_cleanup(void)
@@ -1881,10 +1891,13 @@
X previous_size = A_SIZE_32(agp_bridge.previous_size);
X
X pci_read_config_dword(agp_bridge.dev, ALI_TLBCTRL, &temp);
- pci_write_config_dword(agp_bridge.dev, ALI_TLBCTRL,
- ((temp & 0xffffff00) | 0x00000090));
+// clear tag
+ pci_write_config_dword(agp_bridge.dev, ALI_TAGCTRL,
+ ((temp & 0xffffff00) | 0x00000001|0x00000002));
+
+ pci_read_config_dword(agp_bridge.dev, ALI_ATTBASE, &temp);
X pci_write_config_dword(agp_bridge.dev, ALI_ATTBASE,
- previous_size->size_value);
+ ((temp & 0x00000ff0) | previous_size->size_value));
X }
X
X static int ali_configure(void)
@@ -1895,17 +1908,62 @@
X current_size = A_SIZE_32(agp_bridge.current_size);
X
X /* aperture size and gatt addr */
- pci_write_config_dword(agp_bridge.dev, ALI_ATTBASE,
- agp_bridge.gatt_bus_addr | current_size->size_value);
+ pci_read_config_dword(agp_bridge.dev, ALI_ATTBASE, &temp);
+ temp = (((temp & 0x00000ff0) | (agp_bridge.gatt_bus_addr & 0xfffff000))
+ | (current_size->size_value & 0xf));
+ pci_write_config_dword(agp_bridge.dev, ALI_ATTBASE, temp);
X
X /* tlb control */
- pci_read_config_dword(agp_bridge.dev, ALI_TLBCTRL, &temp);
- pci_write_config_dword(agp_bridge.dev, ALI_TLBCTRL,
- ((temp & 0xffffff00) | 0x00000010));
+
+ /*
+ * Question: Jeff, ALi's patch deletes this:
+ *
+ * pci_read_config_dword(agp_bridge.dev, ALI_TLBCTRL, &temp);
+ * pci_write_config_dword(agp_bridge.dev, ALI_TLBCTRL,
+ * ((temp & 0xffffff00) | 0x00000010));
+ *
+ * and replaces it with the following, which seems to duplicate the
+ * next couple of lines below it. I suspect this was an oversight,
+ * but you might want to check up on this?
+ */
+
+ pci_read_config_dword(agp_bridge.dev, ALI_APBASE, &temp);
+ agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
X
X /* address to map to */
X pci_read_config_dword(agp_bridge.dev, ALI_APBASE, &temp);
X agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+
+#if 0
+ if (agp_bridge.type == ALI_M1541) {
+ u32 nlvm_addr = 0;
+
+ switch (current_size->size_value) {
+ case 0: break;
+ case 1: nlvm_addr = 0x100000;break;
+ case 2: nlvm_addr = 0x200000;break;
+ case 3: nlvm_addr = 0x400000;break;
+ case 4: nlvm_addr = 0x800000;break;
+ case 6: nlvm_addr = 0x1000000;break;
+ case 7: nlvm_addr = 0x2000000;break;
+ case 8: nlvm_addr = 0x4000000;break;
+ case 9: nlvm_addr = 0x8000000;break;
+ case 10: nlvm_addr = 0x10000000;break;
+ default: break;
+ }
+ nlvm_addr--;
+ nlvm_addr&=0xfff00000;
+
+ nlvm_addr+= agp_bridge.gart_bus_addr;
+ nlvm_addr|=(agp_bridge.gart_bus_addr>>12);
+ printk(KERN_INFO PFX "nlvm top &base = %8x\n",nlvm_addr);
+ }
+#endif
+
+ pci_read_config_dword(agp_bridge.dev, ALI_TLBCTRL, &temp);
+ temp &= 0xffffff7f; //enable TLB
+ pci_write_config_dword(agp_bridge.dev, ALI_TLBCTRL, temp);
+


X return 0;
X }
X

@@ -1916,6 +1974,73 @@
X return addr | agp_bridge.masks[0].mask;
X }
X
+static void ali_cache_flush(void)
+{
+ global_cache_flush();
+
+ if (agp_bridge.type == ALI_M1541) {
+ int i, page_count;
+ u32 temp;
+
+ page_count = 1 << A_SIZE_32(agp_bridge.current_size)->page_order;
+ for (i = 0; i < PAGE_SIZE * page_count; i += PAGE_SIZE) {
+ pci_read_config_dword(agp_bridge.dev, ALI_CACHE_FLUSH_CTRL, &temp);
+ pci_write_config_dword(agp_bridge.dev, ALI_CACHE_FLUSH_CTRL,
+ (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
+ (agp_bridge.gatt_bus_addr + i)) |
+ ALI_CACHE_FLUSH_EN));
+ }
+ }
+}
+
+static unsigned long ali_alloc_page(void)
+{
+ void *pt;
+ u32 temp;
+
+ pt = (void *) __get_free_page(GFP_KERNEL);
+ if (pt == NULL)
+ return 0;
+
+ atomic_inc(&mem_map[MAP_NR(pt)].count);
+ set_bit(PG_locked, &mem_map[MAP_NR(pt)].flags);
+ atomic_inc(&agp_bridge.current_memory_agp);
+
+ global_cache_flush();
+
+ if (agp_bridge.type == ALI_M1541) {
+ pci_read_config_dword(agp_bridge.dev, ALI_CACHE_FLUSH_CTRL, &temp);
+ pci_write_config_dword(agp_bridge.dev, ALI_CACHE_FLUSH_CTRL,
+ (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
+ virt_to_phys((void *)pt)) |
+ ALI_CACHE_FLUSH_EN ));
+ }
+ return (unsigned long) pt;
+}
+
+static void ali_destroy_page(unsigned long page)
+{
+ u32 temp;
+ void *pt = (void *) page;
+
+ if (pt == NULL)
+ return;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 10'
echo 'File patch-2.2.20 is continued in part 11'
echo "11" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:11 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part12

#!/bin/sh -x
# this is part 12 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 12; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X
- rc = misc_register (&rng_miscdev);
- if (rc) {
- if (rng_mem)
- iounmap (rng_mem);
- DPRINTK ("EXIT, returning %d\n", rc);
+ pdev = pci_find_device (0x8086, 0x2418, NULL);
+ if (pdev) goto match;
+ pdev = pci_find_device (0x8086, 0x2428, NULL);
+ if (pdev) goto match;
+ pdev = pci_find_device (0x8086, 0x1130, NULL);
+ if (pdev) goto match;
+
+ DPRINTK ("EXIT, returning -ENODEV\n");
+ return -ENODEV;
+
+match:
+ rc = rng_init_one (pdev);
+ if (rc)
X return rc;
- }
X
X printk (KERN_INFO RNG_DRIVER_NAME " loaded\n");
X
@@ -466,24 +359,21 @@


X return 0;
X }
X

-#ifdef MODULE
-
-int init_module (void) { return rng_init (); }
X
X /*
X * rng_init - shutdown RNG module
X */
-void cleanup_module (void)
+static void rng_cleanup (void)
X {
X DPRINTK ("ENTER\n");
-
- iounmap (rng_mem);
-
- rng_hwstatus_set (rng_hwstatus() & ~RNG_ENABLED);
X
X misc_deregister (&rng_miscdev);
X
+ iounmap (rng_mem);
+
X DPRINTK ("EXIT\n");
X }
X
-#endif /* MODULE */
+
+module_init (rng_init);
+module_exit (rng_cleanup);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2/i2ellis.c linux/drivers/char/ip2/i2ellis.c
--- v2.2.19/drivers/char/ip2/i2ellis.c Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2/i2ellis.c Wed Oct 31 14:08:37 2001
@@ -552,6 +552,9 @@
X
X pB->i2eStartMail = iiGetMail(pB);
X
+ // Throw it away and clear the mailbox structure element
+ pB->i2eStartMail = NO_MAIL_HERE;
+
X // Everything is ok now, return with good status/
X
X pB->i2eValid = I2E_MAGIC;
@@ -592,14 +595,27 @@
X static void
X ii2DelayTimer(unsigned int mseconds)
X {
+ wait_queue_t wait;
+
+ init_waitqueue_entry(&wait, current);
+
X init_timer ( pDelayTimer );
X
+ add_wait_queue(&pDelayWait, &wait);
+
+ set_current_state( TASK_INTERRUPTIBLE );
+
X pDelayTimer->expires = jiffies + ( mseconds + 9 ) / 10;
X pDelayTimer->function = ii2DelayWakeup;
X pDelayTimer->data = 0;
X
X add_timer ( pDelayTimer );
- interruptible_sleep_on ( &pDelayWait );
+
+ schedule();
+
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&pDelayWait, &wait);
+
X del_timer ( pDelayTimer );
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2/i2ellis.h linux/drivers/char/ip2/i2ellis.h
--- v2.2.19/drivers/char/ip2/i2ellis.h Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2/i2ellis.h Wed Oct 31 14:08:37 2001
@@ -399,6 +399,12 @@
X spinlock_t read_fifo_spinlock;
X spinlock_t write_fifo_spinlock;
X
+// For queuing interupt bottom half handlers. /\/\|=mhw=|\/\/
+ struct tq_struct tqueue_interrupt;
+
+ struct timer_list SendPendingTimer; // Used by iiSendPending
+ unsigned int SendPendingRetry;
+
X #ifdef CONFIG_DEVFS_FS
X /* Device handles into devfs */
X devfs_handle_t devfs_ipl_handle;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2/i2lib.c linux/drivers/char/ip2/i2lib.c
--- v2.2.19/drivers/char/ip2/i2lib.c Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2/i2lib.c Fri Nov 2 15:42:29 2001
@@ -174,6 +174,25 @@
X pB->i2eWaitingForEmptyFifo |=
X (pB->i2eOutMailWaiting & MB_OUT_STUFFED);
X pB->i2eOutMailWaiting = 0;
+ pB->SendPendingRetry = 0;
+ } else {
+/* The only time we hit this area is when "iiTrySendMail" has
+ failed. That only occurs when the outbound mailbox is
+ still busy with the last message. We take a short breather
+ to let the board catch up with itself and then try again.
+ 16 Retries is the limit - then we got a borked board.
+ /\/\|=mhw=|\/\/ */
+
+ if( ++pB->SendPendingRetry < 16 ) {
+
+ init_timer( &(pB->SendPendingTimer) );
+ pB->SendPendingTimer.expires = jiffies + 1;
+ pB->SendPendingTimer.function = (void*)(unsigned long)iiSendPendingMail;
+ pB->SendPendingTimer.data = (unsigned long)pB;
+ add_timer( &(pB->SendPendingTimer) );
+ } else {
+ printk( KERN_ERR "IP2: iiSendPendingMail unable to queue outbound mail\n" );
+ }
X }
X }
X }
@@ -225,6 +244,8 @@
X pB->i2Dbuf_strip = pB->i2Dbuf_stuff = 0;
X pB->i2Bbuf_strip = pB->i2Bbuf_stuff = 0;
X
+ pB->SendPendingRetry = 0;
+
X memset ( pCh, 0, sizeof (i2ChanStr) * nChannels );
X
X for (index = stuffIndex = 0, ppCh = (i2ChanStrPtr *)(pB->i2Fbuf);
@@ -311,15 +332,15 @@
X pCh->ClosingDelay = 5*HZ/10;
X pCh->ClosingWaitTime = 30*HZ;
X
-#ifdef USE_IQ
X // Initialize task queue objects
X pCh->tqueue_input.routine = (void(*)(void*)) do_input;
X pCh->tqueue_input.data = pCh;
X pCh->tqueue_status.routine = (void(*)(void*)) do_status;
X pCh->tqueue_status.data = pCh;
-#endif
X
+#ifdef IP2DEBUG_TRACE
X pCh->trace = ip2trace;
+#endif
X
X ++pCh;
X --nChannels;
@@ -535,9 +556,9 @@
X if ( !i2Validate ( pCh ) ) {
X return -1;
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_QUEUE, ITRC_ENTER, 0 );
-#endif
+
X pB = pCh->pMyBord;
X
X // Board must also exist, and THE INTERRUPT COMMAND ALREADY SENT
@@ -615,9 +636,9 @@
X if (--bufroom < 0) {
X bufroom += maxBuff;
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_QUEUE, 2, 1, bufroom );
-#endif
+
X // Check for overflow
X if (totalsize <= bufroom) {
X // Normal Expected path - We still hold LOCK


@@ -625,9 +646,8 @@
X }

X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_QUEUE, 3, 1, totalsize );
-#endif
+
X // Prepare to wait for buffers to empty
X WRITE_UNLOCK_IRQRESTORE(lock_var_p,flags);
X serviceOutgoingFifo(pB); // Dump what we got
@@ -650,9 +670,8 @@
X return 0; // Wake up! Time to die!!!
X }
X
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_QUEUE, 4, 0 );
-#endif
+ ip2trace (CHANN, ITRC_QUEUE, 4, 0 );
+
X } // end of for(;;)
X
X // At this point we have room and the lock - stick them in.
@@ -674,9 +693,9 @@
X // pCs->cmd[0].
X if (pCs == CMD_BMARK_REQ) {
X pCh->bookMarks++;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_DRAIN, 30, 1, pCh->bookMarks );
-#endif
+
X }
X cnt = pCs->length;
X
@@ -684,9 +703,9 @@
X // if the last command had to be at the end of a block, we end
X // the existing block here and start a new one.
X if ((blocksize + cnt > maxBlock) || lastended) {
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_QUEUE, 5, 0 );
-#endif
+
X PTYPE_OF(pInsert) = type;
X CHANNEL_OF(pInsert) = channel;
X // count here does not include the header
@@ -748,9 +767,9 @@
X i2QueueNeeds(pB, pCh, NEED_BYPASS);
X break;
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_QUEUE, ITRC_RETURN, 1, nCommands );
-#endif
+
X return nCommands; // Good status: number of commands sent
X }
X
@@ -773,9 +792,7 @@
X unsigned short status;
X i2eBordStrPtr pB;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_STATUS, ITRC_ENTER, 2, pCh->dataSetIn, resetBits );
-#endif
X
X // Make sure the channel exists, otherwise do nothing */
X if ( !i2Validate ( pCh ) )
@@ -793,9 +810,7 @@
X pCh->dataSetIn &= ~(I2_DDCD | I2_DCTS | I2_DDSR | I2_DRI);
X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_STATUS, ITRC_RETURN, 1, pCh->dataSetIn );
-#endif
X
X return status;
X }
@@ -820,9 +835,7 @@
X int count;
X unsigned long flags = 0;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_INPUT, ITRC_ENTER, 0);
-#endif
X
X // Ensure channel structure seems real
X if ( !i2Validate( pCh ) ) {
@@ -888,9 +901,8 @@
X
X i2Input_exit:
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_INPUT, ITRC_RETURN, 1, count);
-#endif
+
X return count;
X }
X
@@ -914,9 +926,7 @@
X if ( !i2Validate ( pCh ) )
X return -1;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_INPUT, 10, 0);
-#endif
X
X WRITE_LOCK_IRQSAVE(&pCh->Ibuf_spinlock,flags);
X count = pCh->Ibuf_stuff - pCh->Ibuf_strip;
@@ -944,9 +954,9 @@
X } else {
X WRITE_UNLOCK_IRQRESTORE(&pCh->Ibuf_spinlock,flags);
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_INPUT, 19, 1, count);
-#endif
+
X return count;
X }
X
@@ -1016,9 +1026,7 @@
X
X int bailout = 10;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, user );
-#endif
X
X // Ensure channel structure seems real
X if ( !i2Validate ( pCh ) )
@@ -1065,9 +1073,8 @@
X // Small WINDOW here with no LOCK but I can't call Flush with LOCK
X // We would be flushing (or ending flush) anyway
X
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_OUTPUT, 10, 1, amountToMove );
-#endif
+ ip2trace (CHANN, ITRC_OUTPUT, 10, 1, amountToMove );
+
X if ( !(pCh->flush_flags && i2RetryFlushOutput(pCh) )
X && amountToMove > 0 )
X {
@@ -1105,9 +1112,7 @@
X
X WRITE_UNLOCK_IRQRESTORE(&pCh->Obuf_spinlock,flags);
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_OUTPUT, 13, 1, stuffIndex );
-#endif
X
X } else {
X
@@ -1115,25 +1120,23 @@
X // becuz we need to stuff a flush
X // or amount to move is <= 0
X
-#ifdef IP2DEBUG_TRACE
X ip2trace(CHANN, ITRC_OUTPUT, 14, 3,
- amountToMove, pB->i2eFifoRemains, pB->i2eWaitingForEmptyFifo );
-#endif
+ amountToMove, pB->i2eFifoRemains,
+ pB->i2eWaitingForEmptyFifo );
+
X // Put this channel back on queue
X // this ultimatly gets more data or wakes write output
X i2QueueNeeds(pB, pCh, NEED_INLINE);
X
X if ( pB->i2eWaitingForEmptyFifo ) {
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_OUTPUT, 16, 0 );
-#endif
+
X // or schedule
X if (!in_interrupt()) {
X
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_OUTPUT, 61, 0 );
-#endif
+ ip2trace (CHANN, ITRC_OUTPUT, 61, 0 );
+
X current->state = TASK_INTERRUPTIBLE;
X current->counter = 0;
X schedule_timeout(2);
@@ -1142,9 +1145,9 @@
X }
X continue;
X } else {
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_OUTPUT, 62, 0 );
-#endif
+
+ ip2trace (CHANN, ITRC_OUTPUT, 62, 0 );
+
X // let interrupt in = WAS restore_flags()
X // We hold no lock nor is irq off anymore???
X
@@ -1154,31 +1157,31 @@
X }
X else if ( pB->i2eFifoRemains < 32 && !pB->i2eTxMailEmpty ( pB ) )
X {
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_OUTPUT, 19, 2, pB->i2eFifoRemains,
- pB->i2eTxMailEmpty );
-#endif
+ ip2trace (CHANN, ITRC_OUTPUT, 19, 2,
+ pB->i2eFifoRemains,
+ pB->i2eTxMailEmpty );
+
X break; // from while(count)
X } else if ( pCh->channelNeeds & NEED_CREDIT ) {
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_OUTPUT, 22, 0 );
-#endif
+
X break; // from while(count)
X } else if ( --bailout) {
X
X // Try to throw more things (maybe not us) in the fifo if we're
X // not already waiting for it.
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_OUTPUT, 20, 0 );
-#endif
+
X serviceOutgoingFifo(pB);
X //break; CONTINUE;
X } else {
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_OUTPUT, 21, 3, pB->i2eFifoRemains,
- pB->i2eOutMailWaiting, pB->i2eWaitingForEmptyFifo );
-#endif
+ ip2trace (CHANN, ITRC_OUTPUT, 21, 3,
+ pB->i2eFifoRemains,
+ pB->i2eOutMailWaiting,
+ pB->i2eWaitingForEmptyFifo );
+
X break; // from while(count)
X }
X }
@@ -1189,14 +1192,13 @@
X // We drop through either when the count expires, or when there is some
X // count left, but there was a non-blocking write.
X if (countOriginal > count) {
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_OUTPUT, 17, 2, countOriginal, count );
-#endif
+
X serviceOutgoingFifo( pB );
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_OUTPUT, ITRC_RETURN, 2, countOriginal, count );
-#endif
X
X return countOriginal - count;
X }
@@ -1215,23 +1217,20 @@
X i2FlushOutput(i2ChanStrPtr pCh)
X {
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_FLUSH, 1, 1, pCh->flush_flags );
-#endif
X
X if (pCh->flush_flags)
X return;
X
X if ( 1 != i2QueueCommands(PTYPE_BYPASS, pCh, 0, 1, CMD_STARTFL) ) {
X pCh->flush_flags = STARTFL_FLAG; // Failed - flag for later
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_FLUSH, 2, 0 );
-#endif
+
X } else if ( 1 != i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL) ) {
X pCh->flush_flags = STOPFL_FLAG; // Failed - flag for later
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_FLUSH, 3, 0 );
-#endif
X }
X }
X
@@ -1240,9 +1239,7 @@
X {
X int old_flags = pCh->flush_flags;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_FLUSH, 14, 1, old_flags );
-#endif
X
X pCh->flush_flags = 0; // Clear flag so we can avoid recursion
X // and queue the commands
@@ -1253,23 +1250,21 @@
X } else {
X old_flags = STARTFL_FLAG; //Failure - Flag for retry later
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_FLUSH, 15, 1, old_flags );
-#endif
+
X }
X if ( old_flags & STOPFL_FLAG ) {
X if ( 1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL) > 0 ) {
X old_flags = 0; // Success - clear flags
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_FLUSH, 16, 1, old_flags );
-#endif
X }
- pCh->flush_flags = old_flags;
+ pCh->flush_flags = old_flags;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_FLUSH, 17, 1, old_flags );
-#endif
+
X return old_flags;
X }
X
@@ -1286,9 +1281,8 @@
X static void
X i2DrainWakeup(i2ChanStrPtr pCh)
X {
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_DRAIN, 10, 1, pCh->BookmarkTimer.expires );
-#endif
+
X pCh->BookmarkTimer.expires = 0;
X wake_up_interruptible( &pCh->pBookmarkWait );
X }
@@ -1296,11 +1290,11 @@
X static void
X i2DrainOutput(i2ChanStrPtr pCh, int timeout)
X {
+ wait_queue_t wait;
X i2eBordStrPtr pB;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_DRAIN, ITRC_ENTER, 1, pCh->BookmarkTimer.expires);
-#endif
+
X pB = pCh->pMyBord;
X // If the board has gone fatal, return bad,
X // and also hit the trap routine if it exists.
@@ -1317,31 +1311,35 @@
X pCh->BookmarkTimer.function = (void*)(unsigned long)i2DrainWakeup;
X pCh->BookmarkTimer.data = (unsigned long)pCh;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_DRAIN, 1, 1, pCh->BookmarkTimer.expires );
-#endif
X
X add_timer( &(pCh->BookmarkTimer) );
X }
X
X i2QueueCommands( PTYPE_INLINE, pCh, -1, 1, CMD_BMARK_REQ );
+
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&(pCh->pBookmarkWait), &wait);
+ set_current_state( TASK_INTERRUPTIBLE );
+
X serviceOutgoingFifo( pB );
X
- interruptible_sleep_on( &(pCh->pBookmarkWait) );
+ schedule(); // Now we take our interruptible sleep on
+
+ // Clean up the queue
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&(pCh->pBookmarkWait), &wait);
X
X // if expires == 0 then timer poped, then do not need to del_timer
X if ((timeout > 0) && pCh->BookmarkTimer.expires &&
X (pCh->BookmarkTimer.expires > jiffies)) {
X del_timer( &(pCh->BookmarkTimer) );
X pCh->BookmarkTimer.expires = 0;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_DRAIN, 3, 1, pCh->BookmarkTimer.expires );
-#endif
X
X }
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_DRAIN, ITRC_RETURN, 1, pCh->BookmarkTimer.expires );
-#endif
X return;
X }
X
@@ -1386,18 +1384,17 @@
X
X pCh = tp->driver_data;
X
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags, (1 << TTY_DO_WRITE_WAKEUP) );
-#endif
+ ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags,
+ (1 << TTY_DO_WRITE_WAKEUP) );
+
X wake_up_interruptible ( &tp->write_wait );
X wake_up_interruptible ( &tp->poll_wait );
X if ( ( tp->flags & (1 << TTY_DO_WRITE_WAKEUP) )
X && tp->ldisc.write_wakeup )
X {
X (tp->ldisc.write_wakeup) ( tp );
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_SICMD, 11, 0 );
-#endif
X }
X }
X
@@ -1483,14 +1480,11 @@
X unsigned char dss_change;
X unsigned long bflags,cflags;
X
-#ifdef IP2DEBUG_TRACE
- //ip2trace (ITRC_NO_PORT, ITRC_SFIFO, ITRC_ENTER, 0 );
-#endif
+// ip2trace (ITRC_NO_PORT, ITRC_SFIFO, ITRC_ENTER, 0 );
X
X while (HAS_INPUT(pB)) {
-#ifdef IP2DEBUG_TRACE
- //ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 2, 0 );
-#endif
+// ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 2, 0 );
+
X // Process packet from fifo a one atomic unit
X WRITE_LOCK_IRQSAVE(&pB->read_fifo_spinlock,bflags);
X
@@ -1503,9 +1497,8 @@
X case PTYPE_DATA:
X pB->got_input = 1;
X
-#ifdef IP2DEBUG_TRACE
- //ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 3, 0 );
-#endif
+// ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 3, 0 );
+
X channel = CHANNEL_OF(pB->i2eLeadoffWord); /* Store channel */
X count = iiReadWord(pB); /* Count is in the next word */
X
@@ -1605,9 +1598,7 @@
X break; // From switch: ready for next packet
X
X case PTYPE_STATUS:
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 4, 0 );
-#endif
X
X count = CMD_COUNT_OF(pB->i2eLeadoffWord);
X
@@ -1620,9 +1611,9 @@
X
X while (pc < pcLimit) {
X channel = *pc++;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (channel, ITRC_SFIFO, 7, 2, channel, *pc );
-#endif
+
X /* check for valid channel */
X if (channel < pB->i2eChannelCnt
X &&
@@ -1655,41 +1646,32 @@
X break;
X
X case STAT_DCD_UP:
-#ifdef IP2DEBUG_TRACE
X ip2trace (channel, ITRC_MODEM, 1, 1, pCh->dataSetIn );
-#endif
+
X if ( !(pCh->dataSetIn & I2_DCD) )
X {
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_MODEM, 2, 0 );
-#endif
X pCh->dataSetIn |= I2_DDCD;
X pCh->icount.dcd++;
X dss_change = 1;
X }
X pCh->dataSetIn |= I2_DCD;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (channel, ITRC_MODEM, 3, 1, pCh->dataSetIn );
-#endif
X break;
X
X case STAT_DCD_DN:
-#ifdef IP2DEBUG_TRACE
X ip2trace (channel, ITRC_MODEM, 4, 1, pCh->dataSetIn );
-#endif
X if ( pCh->dataSetIn & I2_DCD )
X {
-#ifdef IP2DEBUG_TRACE
X ip2trace (channel, ITRC_MODEM, 5, 0 );
-#endif
X pCh->dataSetIn |= I2_DDCD;
X pCh->icount.dcd++;
X dss_change = 1;
X }
X pCh->dataSetIn &= ~I2_DCD;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (channel, ITRC_MODEM, 6, 1, pCh->dataSetIn );
-#endif
X break;
X
X case STAT_DSR_UP:
@@ -1745,9 +1727,8 @@
X if (pCh->bookMarks <= 0 ) {
X pCh->bookMarks = 0;
X wake_up_interruptible( &pCh->pBookmarkWait );
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (channel, ITRC_DRAIN, 20, 1, pCh->BookmarkTimer.expires );
-#endif
X }
X break;
X
@@ -1757,22 +1738,21 @@
X pCh->outfl.room =
X ((flowStatPtr)pc)->room -
X (pCh->outfl.asof - ((flowStatPtr)pc)->asof);
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (channel, ITRC_STFLW, 1, 1, pCh->outfl.room );
-#endif
+
X if (pCh->channelNeeds & NEED_CREDIT)
X {
-#ifdef IP2DEBUG_TRACE
- ip2trace (channel, ITRC_STFLW, 2, 1, pCh->channelNeeds);
-#endif
+ ip2trace (channel, ITRC_STFLW, 2, 1, pCh->channelNeeds);
+
X pCh->channelNeeds &= ~NEED_CREDIT;
X i2QueueNeeds(pB, pCh, NEED_INLINE);
X if ( pCh->pTTY )
X ip2_owake(pCh->pTTY);
X }
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (channel, ITRC_STFLW, 3, 1, pCh->channelNeeds);
-#endif
+
X pc += sizeof(flowStat);
X break;
X
@@ -1868,16 +1848,15 @@
X break;
X
X default: // Neither packet? should be impossible
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 5, 1,
X PTYPE_OF(pB->i2eLeadoffWord) );
-#endif
+
X break;
X } // End of switch on type of packets
X } //while(board HAS_INPUT)
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (ITRC_NO_PORT, ITRC_SFIFO, ITRC_RETURN, 0 );
-#endif
+
X // Send acknowledgement to the board even if there was no data!
X pB->i2eOutMailWaiting |= MB_IN_STRIPPED;
X return;
@@ -1995,9 +1974,8 @@
X i2ChanStrPtr pCh;
X unsigned short paddedSize = ROUNDUP(sizeof(flowIn));
X
-#ifdef IP2DEBUG_TRACE
-ip2trace (ITRC_NO_PORT, ITRC_SFLOW, ITRC_ENTER, 2, pB->i2eFifoRemains, paddedSize );
-#endif
+ ip2trace (ITRC_NO_PORT, ITRC_SFLOW, ITRC_ENTER, 2,
+ pB->i2eFifoRemains, paddedSize );
X
X // Continue processing so long as there are entries, or there is room in the
X // fifo. Each entry represents a channel with something to do.
@@ -2009,14 +1987,12 @@
X break;
X }
X #ifdef DEBUG_FIFO
-WriteDBGBuf("FLOW",(unsigned char *) &(pCh->infl), paddedSize);
+ WriteDBGBuf("FLOW",(unsigned char *) &(pCh->infl), paddedSize);
X #endif /* DEBUG_FIFO */
X
X } // Either clogged or finished all the work
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_SFLOW, ITRC_RETURN, 0 );
-#endif
X }
X
X //******************************************************************************
@@ -2044,10 +2020,8 @@
X int bailout = 1000;
X int bailout2;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_SICMD, ITRC_ENTER, 3, pB->i2eFifoRemains,
X pB->i2Dbuf_strip, pB->i2Dbuf_stuff );
-#endif
X
X // Continue processing so long as there are entries, or there is room in the
X // fifo. Each entry represents a channel with something to do.
@@ -2057,9 +2031,8 @@
X WRITE_LOCK_IRQSAVE(&pCh->Obuf_spinlock,flags);
X stripIndex = pCh->Obuf_strip;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_SICMD, 3, 2, stripIndex, pCh->Obuf_stuff );
-#endif
+
X // as long as there are packets for this channel...
X bailout2 = 1000;
X while ( --bailout2 && stripIndex != pCh->Obuf_stuff) {
@@ -2078,16 +2051,15 @@
X flowsize = CREDIT_USAGE(flowsize);
X paddedSize = ROUNDUP(packetSize);
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_SICMD, 4, 2, pB->i2eFifoRemains, paddedSize );
-#endif
+
X // If we don't have enough credits from the board to send the data,
X // flag the channel that we are waiting for flow control credit, and
X // break out. This will clean up this channel and remove us from the
X // queue of hot things to do.
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_SICMD, 5, 2, pCh->outfl.room, flowsize );
-#endif
+
X if (pCh->outfl.room <= flowsize) {
X // Do Not have the credits to send this packet.
X i2QueueNeeds(pB, pCh, NEED_CREDIT);
@@ -2115,15 +2087,15 @@
X }
X pRemove += packetSize;
X stripIndex += packetSize;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_SICMD, 6, 2, stripIndex, pCh->Obuf_strip);
-#endif
+
X if (stripIndex >= OBUF_SIZE) {
X stripIndex = 0;
X pRemove = pCh->Obuf;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_SICMD, 7, 1, stripIndex );
-#endif
+
X }
X } /* while */
X if ( !bailout2 ) {
@@ -2135,23 +2107,20 @@
X WRITE_UNLOCK_IRQRESTORE(&pCh->Obuf_spinlock,flags);
X if ( notClogged )
X {
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_SICMD, 8, 0 );
-#endif
+
X if ( pCh->pTTY ) {
X ip2_owake(pCh->pTTY);
X }
X }
X } // Either clogged or finished all the work
-#ifdef IP2DEBUG_TRACE
+
X if ( !bailout ) {
X ip2trace (ITRC_NO_PORT, ITRC_ERROR, 4, 0 );
X }
-#endif
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_SICMD, ITRC_RETURN, 1,pB->i2Dbuf_strip);
-#endif
X }
X
X //******************************************************************************
@@ -2215,11 +2184,13 @@
X unsigned long flags;
X
X
- inmail = iiGetMail(pB);
+ /* This should be atomic because of the way we are called... */
+ if (NO_MAIL_HERE == ( inmail = pB->i2eStartMail ) ) {
+ inmail = iiGetMail(pB);
+ }
+ pB->i2eStartMail = NO_MAIL_HERE;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INTR, 2, 1, inmail );
-#endif
X
X if (inmail != NO_MAIL_HERE) {
X // If the board has gone fatal, nothing to do but hit a bit that will
@@ -2241,16 +2212,14 @@
X pB->i2eFifoRemains = pB->i2eFifoSize;
X pB->i2eWaitingForEmptyFifo = 0;
X WRITE_UNLOCK_IRQRESTORE(&pB->write_fifo_spinlock,flags);
-#ifdef IP2DEBUG_TRACE
- ip2trace (ITRC_NO_PORT, ITRC_INTR, 30, 1, pB->i2eFifoRemains );
-#endif
+
+ ip2trace (ITRC_NO_PORT, ITRC_INTR, 30, 1, pB->i2eFifoRemains );
+
X }
X serviceOutgoingFifo(pB);
X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INTR, 8, 0 );
-#endif
X
X exit_i2ServiceBoard:
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2/i2lib.h linux/drivers/char/ip2/i2lib.h
--- v2.2.19/drivers/char/ip2/i2lib.h Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2/i2lib.h Fri Nov 2 15:42:29 2001
@@ -341,6 +341,12 @@
X static int i2ServiceBoard(i2eBordStrPtr);
X static void i2DrainOutput(i2ChanStrPtr, int);
X
+#ifdef IP2DEBUG_TRACE
+void ip2trace(unsigned short,unsigned char,unsigned char,unsigned long,...);
+#else
+#define ip2trace(a,b,c,d...) do {} while (0)
+#endif
+
X // Argument to i2QueueCommands
X //
X #define C_IN_LINE 1
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2/ip2.h linux/drivers/char/ip2/ip2.h
--- v2.2.19/drivers/char/ip2/ip2.h Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2/ip2.h Wed Oct 31 14:08:37 2001
@@ -95,10 +95,20 @@
X * /etc/modules.conf or /etc/conf.modules and load with modprobe, kerneld or
X * kmod, the kernel module loader
X */
+
+ /* This structure is NOW always initialized when the driver is initialized.
+ * Compiled in defaults MUST be added to the io and irq arrays in
+ * ip2.c. Those values are configurable from insmod parameters in the
+ * case of modules or from command line parameters (ip2=io,irq) when
+ * compiled in.
+ */
+
X static ip2config_t ip2config =
X {
X {0,0,0,0}, // irqs
X { // Addresses
+ /* Do NOT set compile time defaults HERE! Use the arrays in
+ ip2.c! These WILL be overwritten! =mhw= */
X 0x0000, // Board 0, ttyF0 - ttyF63
X 0x0000, // Board 1, ttyF64 - ttyF127
X 0x0000, // Board 2, ttyF128 - ttyF191
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2.c linux/drivers/char/ip2.c
--- v2.2.19/drivers/char/ip2.c Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2.c Wed Oct 31 14:08:37 2001
@@ -28,8 +28,15 @@
X int
X ip2_loadmain(int *, int *, unsigned char *, int ); // ref into ip2main.c
X
+/* Note: Add compiled in defaults to these arrays, not to the structure
+ in ip2/ip2.h any longer. That structure WILL get overridden
+ by these values, or command line values, or insmod values!!! =mhw=
+*/
+static int io[IP2_MAX_BOARDS]= { 0, 0, 0, 0 };
+static int irq[IP2_MAX_BOARDS] = { -1, -1, -1, -1 };
+static int poll_only = 0;
+
X #ifdef MODULE
-
X #include <linux/autoconf.h>
X #if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
X # define MODVERSIONS
@@ -38,9 +45,6 @@
X # include <linux/modversions.h>
X #endif
X
-static int io[IP2_MAX_BOARDS]= { 0,};
-static int irq[IP2_MAX_BOARDS] = { 0,};
-
X # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
X MODULE_AUTHOR("Doug McNash");
X MODULE_DESCRIPTION("Computone IntelliPort Plus Driver");
@@ -48,6 +52,8 @@
X MODULE_PARM_DESC(irq,"Interrupts for IntelliPort Cards");
X MODULE_PARM(io,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i");
X MODULE_PARM_DESC(io,"I/O ports for IntelliPort Cards");
+ MODULE_PARM(poll_only,"1i");
+ MODULE_PARM_DESC(poll_only,"Do not use card interrupts");
X # endif /* LINUX_VERSION */
X
X
@@ -59,6 +65,11 @@
X
X MOD_INC_USE_COUNT; // hold till done
X
+ if( poll_only ) {
+ /* Hard lock the interrupts to zero */
+ irq[0] = irq[1] = irq[2] = irq[3] = 0;
+ }
+
X rc = ip2_loadmain(io,irq,(unsigned char *)fip_firm,sizeof(fip_firm));
X // The call to lock and load main, create dep
X
@@ -70,7 +81,7 @@
X int
X ip2_init(void)
X {
- // call to this is int tty_io.c so we need this
+ // call to this is in tty_io.c so we need this


X return 0;
X }
X

@@ -86,9 +97,66 @@
X # define NULL ((void *) 0)
X #endif
X
+/******************************************************************************
+ * ip2_setup:
+ * str: kernel command line string
+ *
+ * Can't autoprobe the boards so user must specify configuration on
+ * kernel command line. Sane people build it modular but the others
+ * come here.
+ *
+ * Alternating pairs of io,irq for up to 4 boards.
+ * ip2=io0,irq0,io1,irq1,io2,irq2,io3,irq3
+ *
+ * io=0 => No board
+ * io=1 => PCI
+ * io=2 => EISA
+ * else => ISA I/O address
+ *
+ * irq=0 or invalid for ISA will revert to polling mode
+ *
+ * Any value = -1, do not overwrite compiled in value.
+ *
+ ******************************************************************************/
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,13)
+void __init ip2_setup(char *str)
+{
+ int ints[10]; /* 4 boards, 2 parameters + 2 */
+ int i, j;
+
+ str = get_options (str, ARRAY_SIZE(ints), ints);
+#else
+void __init ip2_setup(char *str, int *ints)
+{
+ int i, j;
+#endif
+
+ for( i = 0, j = 1; i < 4; i++ ) {
+ if( j > ints[0] ) {
+ break;
+ }
+ if( ints[j] >= 0 ) {
+ io[i] = ints[j];
+ }
+ j++;
+ if( j > ints[0] ) {
+ break;
+ }
+ if( ints[j] >= 0 ) {
+ irq[i] = ints[j];
+ }
+ j++;


+ }
+}
+
X int

X ip2_init(void) {
- return ip2_loadmain(NULL,NULL,(unsigned char *)fip_firm,sizeof(fip_firm));
+ return ip2_loadmain(io,irq,(unsigned char *)fip_firm,sizeof(fip_firm));
X }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13))
+__setup("ip2=", ip2_setup);
+__initcall(ip2_init);
+#endif
X
X #endif /* !MODULE */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/ip2main.c linux/drivers/char/ip2main.c
--- v2.2.19/drivers/char/ip2main.c Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/ip2main.c Fri Nov 2 15:42:29 2001
@@ -14,6 +14,35 @@
X //
X // Done:
X //
+// 1.2.14 /\/\|=mhw=|\/\/
+// Added bounds checking to ip2_ipl_ioctl to avoid potential terroristic acts.
+// Changed the definition of ip2trace to be more consistant with kernel style
+// Thanks to Andreas Dilger <adi...@turbolabs.com> for these updates
+//
+// 1.2.13 /\/\|=mhw=|\/\/
+// DEVFS: Renamed ttf/{n} to tts/F{n} and cuf/{n} to cua/F{n} to conform
+// to agreed devfs serial device naming convention.
+//
+// 1.2.12 /\/\|=mhw=|\/\/
+// Cleaned up some remove queue cut and paste errors
+//
+// 1.2.11 /\/\|=mhw=|\/\/
+// Clean up potential NULL pointer dereferences
+// Clean up devfs registration
+// Add kernel command line parsing for io and irq
+// Compile defaults for io and irq are now set in ip2.c not ip2/ip2.h!
+// Reworked poll_only hack for explicit parameter setting
+// You must now EXPLICITLY set poll_only = 1 or set all irqs to 0
+// Merged ip2_loadmain and old_ip2_init
+// Converted all instances of interruptible_sleep_on into queue calls
+// Most of these had no race conditions but better to clean up now
+//
+// 1.2.10 /\/\|=mhw=|\/\/
+// Fixed the bottom half interrupt handler and enabled USE_IQI
+// to split the interrupt handler into a formal top-half / bottom-half
+// Fixed timing window on high speed processors that queued messages to
+// the outbound mail fifo faster than the board could handle.
+//
X // 1.2.9
X // Four box EX was barfing on >128k kmalloc, made structure smaller by
X // reducing output buffer size
@@ -213,13 +242,13 @@
X
X /* String constants to identify ourselves */
X static char *pcName = "Computone IntelliPort Plus multiport driver";
-static char *pcVersion = "1.2.9";
+static char *pcVersion = "1.2.14";
X
X /* String constants for port names */
X static char *pcDriver_name = "ip2";
X #ifdef CONFIG_DEVFS_FS
-static char *pcTty = "ttf/%d";
-static char *pcCallout = "cuf/%d";
+static char *pcTty = "tts/F%d";
+static char *pcCallout = "cua/F%d";
X #else
X static char *pcTty = "ttyF";
X static char *pcCallout = "cuf";
@@ -245,8 +274,6 @@
X void cleanup_module(void);
X #endif
X
-int old_ip2_init(void);
-
X /* Private (static) functions */
X static int ip2_open(PTTY, struct file *);
X static void ip2_close(PTTY, struct file *);
@@ -266,6 +293,7 @@
X static void ip2_hangup(PTTY);
X
X static void set_irq(int, int);
+static void ip2_interrupt_bh(i2eBordStrPtr pB);
X static void ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs);
X static void ip2_poll(unsigned long arg);
X static inline void service_all_boards(void);
@@ -288,7 +316,6 @@
X static int ip2_ipl_ioctl(struct inode *, struct file *, UINT, ULONG);
X static int ip2_ipl_open(struct inode *, struct file *);
X
-void ip2trace(unsigned short,unsigned char,unsigned char,unsigned long,...);
X static int DumpTraceBuffer(char *, int);
X static int DumpFifoBuffer( char *, int);
X
@@ -340,11 +367,11 @@
X /* NULL, NULL 2.2 */
X };
X
-static long irq_counter = 0;
-static long bh_counter = 0;
+static unsigned long irq_counter = 0;
+static unsigned long bh_counter = 0;
X
X // Use immediate queue to service interrupts
-//#define USE_IQI // PCI&2.2 needs work
+#define USE_IQI
X //#define USE_IQ // PCI&2.2 needs work
X
X /* The timer_list entry for our poll routine. If interrupt operation is not
@@ -404,32 +431,6 @@
X static char rirqs[IP2_MAX_BOARDS] = {0,};
X static int Valid_Irqs[] = { 3, 4, 5, 7, 10, 11, 12, 15, 0};
X
-/******************************************************************************/
-/* Initialisation Section */
-/******************************************************************************/
-int
-ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
-{
- int i;
- /* process command line arguments to modprobe or insmod i.e. iop & irqp */
- /* otherwise ip2config is initialized by what's in ip2/ip2.h */
- /* command line trumps initialization in ip2.h */
- /* first two args are null if builtin to kernel */
- if ((irqp != NULL) || (iop != NULL)) {
- for ( i = 0; i < IP2_MAX_BOARDS; ++i ) {
- if (irqp && irqp[i]) {
- ip2config.irq[i] = irqp[i];
- }
- if (iop && iop[i]) {
- ip2config.addr[i] = iop[i];
- }
- }
- }
- Fip_firmware = firmware;
- Fip_firmware_size = firmsize;
- return old_ip2_init();
-}
-
X // Some functions to keep track of what irq's we have
X
X __initfunc(static int
@@ -449,6 +450,7 @@
X rirqs[iindx++] = irq;
X }
X
+#ifdef MODULE
X __initfunc( static int
X clear_requested_irq( char irq ))
X {
@@ -461,6 +463,7 @@


X }
X return 0;
X }

+#endif
X
X __initfunc( static int
X have_requested_irq( char irq ))
@@ -490,7 +493,6 @@
X #ifdef IP2DEBUG_INIT
X printk (KERN_DEBUG "Loading module ...\n" );
X #endif
- //was return old_ip2_init();
X return 0;
X }
X #endif /* MODULE */
@@ -590,8 +592,9 @@
X #endif /* MODULE */
X
X /******************************************************************************/
-/* Function: old_ip2_init() */
+/* Function: ip2_loadmain() */
X /* Parameters: irq, io from command line of insmod et. al. */
+/* pointer to fip firmware and firmware size for boards */
X /* Returns: Success (0) */
X /* */
X /* Description: */
@@ -606,7 +609,7 @@
X #define IP2_SA_FLAGS 0
X
X __initfunc( int
-old_ip2_init(void))
+ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) )
X {
X #ifdef CONFIG_DEVFS_FS
X static devfs_handle_t devfs_handle = NULL;
@@ -619,9 +622,40 @@
X i2eBordStrPtr pB = NULL;
X int rc = -1;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INIT, ITRC_ENTER, 0 );
-#endif
+
+ /* process command line arguments to modprobe or
+ insmod i.e. iop & irqp */
+ /* irqp and iop should ALWAYS be specified now... But we check
+ them individually just to be sure, anyways... */
+ for ( i = 0; i < IP2_MAX_BOARDS; ++i ) {
+ if (iop) {
+ ip2config.addr[i] = iop[i];
+ if (irqp) {
+ if( irqp[i] >= 0 ) {
+ ip2config.irq[i] = irqp[i];
+ } else {
+ ip2config.irq[i] = 0;
+ }
+ // This is a little bit of a hack. If poll_only=1 on command
+ // line back in ip2.c OR all IRQs on all specified boards are
+ // explicitly set to 0, then drop to poll only mode and override
+ // PCI or EISA interrupts. This superceeds the old hack of
+ // triggering if all interrupts were zero (like da default).
+ // Still a hack but less prone to random acts of terrorism.
+ //
+ // What we really should do, now that the IRQ default is set
+ // to -1, is to use 0 as a hard coded, do not probe.
+ //
+ // /\/\|=mhw=|\/\/
+ poll_only |= irqp[i];
+ }
+ }
+ }
+ poll_only = !poll_only;
+
+ Fip_firmware = firmware;
+ Fip_firmware_size = firmsize;
X
X /* Announce our presence */
X printk( KERN_INFO "%s version %s\n", pcName, pcVersion );
@@ -635,12 +669,6 @@
X }
X loaded++;
X
- /* if all irq config is zero we shall poll_only */
- for ( i = 0; i < IP2_MAX_BOARDS; ++i ) {
- poll_only |= ip2config.irq[i];
- }
- poll_only = !poll_only;
-
X /* Initialise the iiEllis subsystem. */
X iiEllisInit();
X
@@ -703,10 +731,13 @@
X pcibios_read_config_byte(pci_bus, pci_devfn,
X PCI_INTERRUPT_LINE, &pci_irq);
X
- if (!is_valid_irq(pci_irq)) {
- printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
- pci_irq = 0;
- }
+// If the PCI BIOS assigned it, lets try and use it. If we
+// can't acquire it or it screws up, deal with it then.
+
+// if (!is_valid_irq(pci_irq)) {
+// printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
+// pci_irq = 0;
+// }
X ip2config.irq[i] = pci_irq;
X } else { // ann error
X ip2config.addr[i] = 0;
@@ -737,10 +768,13 @@
X status =
X pci_read_config_byte(pci_dev_i, PCI_INTERRUPT_LINE, &pci_irq);
X
- if (!is_valid_irq(pci_irq)) {
- printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
- pci_irq = 0;
- }
+// If the PCI BIOS assigned it, lets try and use it. If we
+// can't acquire it or it screws up, deal with it then.
+
+// if (!is_valid_irq(pci_irq)) {
+// printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
+// pci_irq = 0;
+// }
X ip2config.irq[i] = pci_irq;
X } else { // ann error
X ip2config.addr[i] = 0;
@@ -792,9 +826,7 @@
X }
X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INIT, 2, 0 );
-#endif
X
X /* Zero out the normal tty device structure. */
X memset ( &ip2_tty_driver, 0, sizeof ip2_tty_driver );
@@ -853,9 +885,7 @@
X ip2_callout_driver.major = IP2_CALLOUT_MAJOR;
X ip2_callout_driver.subtype = SERIAL_TYPE_CALLOUT;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 );
-#endif
X
X /* Register the tty devices. */
X if ( ( err = tty_register_driver ( &ip2_tty_driver ) ) ) {
@@ -878,9 +908,7 @@
X printk(KERN_ERR "IP2: failed to register read_procmem (%d)\n", err );
X } else {
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INIT, 4, 0 );
-#endif
X /* Register the interrupt handler or poll handler, depending upon the
X * specified interrupt.
X */
@@ -898,41 +926,45 @@
X }
X
X #ifdef CONFIG_DEVFS_FS
- sprintf( name, "ipl%d", i );
- i2BoardPtrTable[i]->devfs_ipl_handle =
- devfs_register (devfs_handle, name, 0,
- DEVFS_FL_NONE,
- IP2_IPL_MAJOR, 4 * i,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
- 0, 0, &ip2_ipl, NULL);
-
- sprintf( name, "stat%d", i );
- i2BoardPtrTable[i]->devfs_stat_handle =
- devfs_register (devfs_handle, name, 0,
- DEVFS_FL_NONE,
- IP2_IPL_MAJOR, 4 * i + 1,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
- 0, 0, &ip2_ipl, NULL);
+ if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
+ sprintf( name, "ipl%d", i );
+ pB->devfs_ipl_handle =
+ devfs_register (devfs_handle, name, 0,
+ DEVFS_FL_NONE,
+ IP2_IPL_MAJOR, 4 * i,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
+ 0, 0, &ip2_ipl, NULL);
+
+ sprintf( name, "stat%d", i );
+ pB->devfs_stat_handle =
+ devfs_register (devfs_handle, name, 0,
+ DEVFS_FL_NONE,
+ IP2_IPL_MAJOR, 4 * i + 1,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
+ 0, 0, &ip2_ipl, NULL);
X
- for ( box = 0; box < ABS_MAX_BOXES; ++box )
- {
- for ( j = 0; j < ABS_BIGGEST_BOX; ++j )
+ for ( box = 0; box < ABS_MAX_BOXES; ++box )
X {
- if ( pB->i2eChannelMap[box] & (1 << j) )
+ for ( j = 0; j < ABS_BIGGEST_BOX; ++j )
X {
- tty_register_devfs(&ip2_tty_driver,
- 0, j + ABS_BIGGEST_BOX *
+ if ( pB->i2eChannelMap[box] & (1 << j) )
+ {
+ tty_register_devfs(&ip2_tty_driver,
+ 0, j + ABS_BIGGEST_BOX *
X (box+i*ABS_MAX_BOXES));
- tty_register_devfs(&ip2_callout_driver,
- 0, j + ABS_BIGGEST_BOX *
+ tty_register_devfs(&ip2_callout_driver,
+ 0, j + ABS_BIGGEST_BOX *
X (box+i*ABS_MAX_BOXES));
+ }
X }
X }
X }
X #endif
X
X if (poll_only) {
- ip2config.irq[i] = CIR_POLL;
+// Poll only forces driver to only use polling and
+// to ignore the probed PCI or EISA interrupts.
+ ip2config.irq[i] = CIR_POLL;
X }
X if ( ip2config.irq[i] == CIR_POLL ) {
X retry:
@@ -965,9 +997,7 @@
X }
X }
X }
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INIT, ITRC_RETURN, 0 );
-#endif


X
X return 0;
X }

@@ -993,26 +1023,24 @@
X if ( !iiInitialize ( pB ) ) {
X printk ( KERN_ERR "IP2: Failed to initialize board at 0x%x, error %d\n",
X pB->i2eBase, pB->i2eError );
- kfree ( pB );
- i2BoardPtrTable[boardnum] = NULL;
- return;
+ goto err_initialize;
X }
- printk(KERN_INFO "Board %d: addr=0x%x irq=%d ", boardnum + 1,
+ printk(KERN_INFO "IP2: Board %d: addr=0x%x irq=%d\n", boardnum + 1,
X ip2config.addr[boardnum], ip2config.irq[boardnum] );
X
X if (0 != ( rc = check_region( ip2config.addr[boardnum], 8))) {
- i2BoardPtrTable[boardnum] = NULL;
- printk(KERN_ERR "bad addr=0x%x rc = %d\n",
+ printk(KERN_ERR "IP2: bad addr=0x%x rc = %d\n",
X ip2config.addr[boardnum], rc );
- return;
+ goto err_initialize;
X }
X request_region( ip2config.addr[boardnum], 8, pcName );
X
X if ( iiDownloadAll ( pB, (loadHdrStrPtr)Fip_firmware, 1, Fip_firmware_size )
X != II_DOWN_GOOD ) {
- printk ( KERN_ERR "IP2:failed to download loadware " );
+ printk ( KERN_ERR "IP2: failed to download loadware\n" );
+ goto err_release_region;
X } else {
- printk ( KERN_INFO "fv=%d.%d.%d lv=%d.%d.%d\n",
+ printk ( KERN_INFO "IP2: fv=%d.%d.%d lv=%d.%d.%d\n",
X pB->i2ePom.e.porVersion,
X pB->i2ePom.e.porRevision,
X pB->i2ePom.e.porSubRev, pB->i2eLVersion,
@@ -1022,24 +1050,24 @@
X switch ( pB->i2ePom.e.porID & ~POR_ID_RESERVED ) {
X
X default:
- printk( KERN_ERR "IP2: Unknown board type, ID = %x",
+ printk( KERN_ERR "IP2: Unknown board type, ID = %x\n",
X pB->i2ePom.e.porID );
X nports = 0;
- goto ex_exit;
+ goto err_release_region;
X break;
X
X case POR_ID_II_4: /* IntelliPort-II, ISA-4 (4xRJ45) */
- printk ( KERN_INFO "ISA-4" );
+ printk ( KERN_INFO "IP2: ISA-4\n" );
X nports = 4;
X break;
X
X case POR_ID_II_8: /* IntelliPort-II, 8-port using standard brick. */
- printk ( KERN_INFO "ISA-8 std" );
+ printk ( KERN_INFO "IP2: ISA-8 std\n" );
X nports = 8;
X break;
X
X case POR_ID_II_8R: /* IntelliPort-II, 8-port using RJ11's (no CTS) */
- printk ( KERN_INFO "ISA-8 RJ11" );
+ printk ( KERN_INFO "IP2: ISA-8 RJ11\n" );
X nports = 8;
X break;
X
@@ -1060,8 +1088,14 @@
X }
X DevTableMem[boardnum] = pCh =
X kmalloc( sizeof(i2ChanStr) * nports, GFP_KERNEL );
+ if ( !pCh ) {
+ printk ( KERN_ERR "IP2: (i2_init_channel:) Out of memory.\n");
+ goto err_release_region;
+ }
X if ( !i2InitChannels( pB, nports, pCh ) ) {
- printk(KERN_ERR "i2InitChannels failed: %d\n",pB->i2eError);
+ printk(KERN_ERR "IP2: i2InitChannels failed: %d\n",pB->i2eError);
+ kfree ( pCh );
+ goto err_release_region;
X }
X pB->i2eChannelPtr = &DevTable[portnum];
X pB->i2eChannelCnt = ABS_MOST_PORTS;
@@ -1075,17 +1109,24 @@
X }
X }
X }
- printk(KERN_INFO "IP2: EX box=%d ports=%d %d bit",
+ printk(KERN_INFO "IP2: EX box=%d ports=%d %d bit\n",
X nboxes, nports, pB->i2eDataWidth16 ? 16 : 8 );
X }
X goto ex_exit;
- break;
X }
X DevTableMem[boardnum] = pCh =
X kmalloc ( sizeof (i2ChanStr) * nports, GFP_KERNEL );
+ if ( !pCh ) {
+ printk ( KERN_ERR "IP2: (i2_init_channel:) Out of memory.\n");
+ goto err_release_region;
+ }
X pB->i2eChannelPtr = pCh;
X pB->i2eChannelCnt = nports;
- i2InitChannels ( pB, pB->i2eChannelCnt, pCh );
+ if ( !i2InitChannels( pB, nports, pCh ) ) {
+ printk(KERN_ERR "IP2: i2InitChannels failed: %d\n",pB->i2eError);
+ kfree ( pCh );
+ goto err_release_region;
+ }
X pB->i2eChannelPtr = &DevTable[IP2_PORTS_PER_BOARD * boardnum];
X
X for( i = 0; i < pB->i2eChannelCnt; ++i ) {
@@ -1094,7 +1135,17 @@
X pCh++;
X }
X ex_exit:
- printk ( KERN_INFO "\n" );
+ pB->tqueue_interrupt.routine = (void(*)(void*)) ip2_interrupt_bh;
+ pB->tqueue_interrupt.data = pB;
+
+ return;
+
+err_release_region:
+ release_region(ip2config.addr[boardnum], 8);
+err_initialize:
+ kfree ( pB );
+ i2BoardPtrTable[boardnum] = NULL;
+ return;
X }
X
X /******************************************************************************/
@@ -1292,16 +1343,34 @@
X }
X
X
-#ifdef USE_IQI
-static struct tq_struct
-senior_service =
-{ // it's the death that worse than fate
- NULL,
- 0,
- (void(*)(void*)) service_all_boards,
- NULL, //later - board address XXX
-};
-#endif
+/******************************************************************************/
+/* Function: ip2_interrupt_bh(pB) */
+/* Parameters: pB - pointer to the board structure */
+/* Returns: Nothing */
+/* */
+/* Description: */
+/* Service the board in a bottom half interrupt handler and then */
+/* reenable the board's interrupts if it has an IRQ number */
+/* */
+/******************************************************************************/
+static void
+ip2_interrupt_bh(i2eBordStrPtr pB)
+{
+// pB better well be set or we have a problem! We can only get
+// here from the IMMEDIATE queue. Here, we process the boards.
+// Checking pB doesn't cost much and it saves us from the sanity checkers.
+
+ bh_counter++;
+
+ if ( pB ) {
+ i2ServiceBoard( pB );
+ if( pB->i2eUsingIrq ) {
+// Re-enable his interrupts
+ iiEnableMailIrq(pB);
+ }
+ }
+}
+
X
X /******************************************************************************/
X /* Function: ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs) */
@@ -1312,6 +1381,14 @@
X /* */
X /* Description: */
X /* */
+/* Our task here is simply to identify each board which needs servicing. */
+/* If we are queuing then, queue it to be serviced, and disable its irq */
+/* mask otherwise process the board directly. */
+/* */
+/* We could queue by IRQ but that just complicates things on both ends */
+/* with very little gain in performance (how many instructions does */
+/* it take to iterate on the immediate queue). */
+/* */
X /* */
X /******************************************************************************/
X static void
@@ -1320,31 +1397,41 @@
X int i;
X i2eBordStrPtr pB;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );
-#endif
X
-#ifdef USE_IQI
-
- queue_task(&senior_service, &tq_immediate);
- mark_bh(IMMEDIATE_BH);
-
-#else
X /* Service just the boards on the list using this irq */
X for( i = 0; i < i2nBoards; ++i ) {
X pB = i2BoardPtrTable[i];
+
+// Only process those boards which match our IRQ.
+// IRQ = 0 for polled boards, we won't poll "IRQ" boards
+
X if ( pB && (pB->i2eUsingIrq == irq) ) {
+#ifdef USE_IQI
+
+ if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
+// Disable his interrupt (will be enabled when serviced)
+// This is mostly to protect from reentrancy.
+ iiDisableMailIrq(pB);
+
+// Park the board on the immediate queue for processing.
+ queue_task(&pB->tqueue_interrupt, &tq_immediate);
+
+// Make sure the immediate queue is flagged to fire.
+ mark_bh(IMMEDIATE_BH);
+ }
+#else
+// We are using immediate servicing here. This sucks and can
+// cause all sorts of havoc with ppp and others. The failsafe
+// check on iiSendPendingMail could also throw a hairball.
X i2ServiceBoard( pB );
+#endif /* USE_IQI */
X }
X }
X
-#endif /* USE_IQI */
-
X ++irq_counter;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
-#endif
X }
X
X /******************************************************************************/
@@ -1360,31 +1447,20 @@
X static void
X ip2_poll(unsigned long arg)
X {
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INTR, 100, 0 );
-#endif
- TimerOn = 0; // it's the truth but not checked in service
-
- bh_counter++;
-
-#ifdef USE_IQI
X
- queue_task(&senior_service, &tq_immediate);
- mark_bh(IMMEDIATE_BH);
+ TimerOn = 0; // it's the truth but not checked in service
X
-#else
- // Just polled boards, service_all might be better
+ // Just polled boards, IRQ = 0 will hit all non-interrupt boards.
+ // It will NOT poll boards handled by hard interrupts.
+ // The issue of queued BH interrups is handled in ip2_interrupt().
X ip2_interrupt(0, NULL, NULL);
X
-#endif /* USE_IQI */
-
X PollTimer.expires = POLL_TIMEOUT;
X add_timer( &PollTimer );
X TimerOn = 1;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
-#endif
X }


X
X static inline void

@@ -1392,9 +1468,8 @@
X {
X unsigned long flags;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace(CHANN, ITRC_INPUT, 21, 0 );
-#endif
+
X // Data input
X if ( pCh->pTTY != NULL ) {
X READ_LOCK_IRQSAVE(&pCh->Ibuf_spinlock,flags)
@@ -1404,9 +1479,8 @@
X } else
X READ_UNLOCK_IRQRESTORE(&pCh->Ibuf_spinlock,flags)
X } else {
-#ifdef IP2DEBUG_TRACE
X ip2trace(CHANN, ITRC_INPUT, 22, 0 );
-#endif
+
X i2InputFlush( pCh );
X }
X }
@@ -1431,9 +1505,7 @@
X
X status = i2GetStatus( pCh, (I2_BRK|I2_PAR|I2_FRA|I2_OVR) );
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_STATUS, 21, 1, status );
-#endif
X
X if (pCh->pTTY && (status & (I2_BRK|I2_PAR|I2_FRA|I2_OVR)) ) {
X if ( (status & I2_BRK) ) {
@@ -1494,9 +1566,7 @@
X }
X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_STATUS, 26, 0 );
-#endif
X }
X
X /******************************************************************************/
@@ -1546,13 +1616,12 @@
X static int
X ip2_open( PTTY tty, struct file *pFile )
X {
+ wait_queue_t wait;
X int rc = 0;
X int do_clocal = 0;
X i2ChanStrPtr pCh = DevTable[MINOR(tty->device)];
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (MINOR(tty->device), ITRC_OPEN, ITRC_ENTER, 0 );
-#endif
X
X if ( pCh == NULL ) {
X return -ENODEV;
@@ -1579,14 +1648,23 @@
X * 1. If the port is in the middle of closing wait for the completion
X * and then return the appropriate error.
X */
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&pCh->close_wait, &wait);
+ set_current_state( TASK_INTERRUPTIBLE );
+
X if ( tty_hung_up_p(pFile) || ( pCh->flags & ASYNC_CLOSING )) {
X if ( pCh->flags & ASYNC_CLOSING ) {
- interruptible_sleep_on( &pCh->close_wait);
+ schedule();
X }
X if ( tty_hung_up_p(pFile) ) {
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&pCh->close_wait, &wait);
X return( pCh->flags & ASYNC_HUP_NOTIFY ) ? -EAGAIN : -ERESTARTSYS;
X }
X }
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&pCh->close_wait, &wait);
+
X /*
X * 2. If this is a callout device, make sure the normal port is not in
X * use, and that someone else doesn't have the callout device locked.
@@ -1639,13 +1717,20 @@
X #endif
X
X ++pCh->wopen;
+
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&pCh->open_wait, &wait);
+
X for(;;) {
X if ( !(pCh->flags & ASYNC_CALLOUT_ACTIVE)) {
X i2QueueCommands(PTYPE_INLINE, pCh, 100, 2, CMD_DTRUP, CMD_RTSUP);
X pCh->dataSetOut |= (I2_DTR | I2_RTS);
+ set_current_state( TASK_INTERRUPTIBLE );
X serviceOutgoingFifo( pCh->pMyBord );
X }
X if ( tty_hung_up_p(pFile) ) {
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&pCh->open_wait, &wait);
X return ( pCh->flags & ASYNC_HUP_NOTIFY ) ? -EBUSY : -ERESTARTSYS;
X }
X if ( !(pCh->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1662,21 +1747,22 @@
X (pCh->flags & ASYNC_CLOSING)?"True":"False");
X printk(KERN_DEBUG "OpenBlock: waiting for CD or signal\n");
X #endif
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_OPEN, 3, 2, (pCh->flags & ASYNC_CALLOUT_ACTIVE),
- (pCh->flags & ASYNC_CLOSING) );
-#endif
+ (pCh->flags & ASYNC_CLOSING) );
X /* check for signal */
X if (signal_pending(current)) {
X rc = (( pCh->flags & ASYNC_HUP_NOTIFY ) ? -EAGAIN : -ERESTARTSYS);
X break;
X }
- interruptible_sleep_on(&pCh->open_wait);
+ schedule();
X }
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&pCh->open_wait, &wait);
+
X --pCh->wopen; //why count?
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_OPEN, 4, 0 );
-#endif
+
X if (rc != 0 ) {
X return rc;
X }
@@ -1713,9 +1799,8 @@
X #endif
X serviceOutgoingFifo( pCh->pMyBord );
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_OPEN, ITRC_RETURN, 0 );
-#endif


+
X return 0;
X }
X

@@ -1738,9 +1823,7 @@
X return;
X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_CLOSE, ITRC_ENTER, 0 );
-#endif
X
X #ifdef IP2DEBUG_OPEN
X printk(KERN_DEBUG "IP2:close ttyF%02X:\n",MINOR(tty->device));
@@ -1749,16 +1832,15 @@
X if ( tty_hung_up_p ( pFile ) ) {
X MOD_DEC_USE_COUNT;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_CLOSE, 2, 1, 2 );
-#endif
+
X return;
X }
X if ( tty->count > 1 ) { /* not the last close */
X MOD_DEC_USE_COUNT;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_CLOSE, 2, 1, 3 );
-#endif
+
X return;
X }
X pCh->flags |= ASYNC_CLOSING; // last close actually
@@ -1826,9 +1908,8 @@
X
X MOD_DEC_USE_COUNT;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_CLOSE, ITRC_RETURN, 1, 1 );
-#endif
+
X return;
X }
X
@@ -1846,9 +1927,11 @@
X {
X i2ChanStrPtr pCh = tty->driver_data;
X
-#ifdef IP2DEBUG_TRACE
+ if( !pCh ) {
+ return;
+ }
+
X ip2trace (CHANN, ITRC_HANGUP, ITRC_ENTER, 0 );
-#endif
X
X ip2_flush_buffer(tty);
X
@@ -1856,7 +1939,7 @@
X
X i2QueueCommands(PTYPE_BYPASS, pCh, 0, 1, CMD_DCD_NREP);
X i2QueueCommands(PTYPE_INLINE, pCh, 0, 2, CMD_CTSFL_DSAB, CMD_RTSFL_DSAB);
- if ( !tty || (tty->termios->c_cflag & HUPCL) ) {
+ if ( (tty->termios->c_cflag & HUPCL) ) {
X i2QueueCommands(PTYPE_BYPASS, pCh, 0, 2, CMD_RTSDN, CMD_DTRDN);
X pCh->dataSetOut &= ~(I2_DTR | I2_RTS);
X i2QueueCommands( PTYPE_INLINE, pCh, 100, 1, CMD_PAUSE(25));
@@ -1871,9 +1954,7 @@
X pCh->pTTY = NULL;
X wake_up_interruptible ( &pCh->open_wait );
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_HANGUP, ITRC_RETURN, 0 );
-#endif
X }
X
X /******************************************************************************/
@@ -1901,9 +1982,7 @@
X int bytesSent = 0;
X unsigned long flags;
X
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_WRITE, ITRC_ENTER, 2, count, -1 );
-#endif
+ ip2trace (CHANN, ITRC_WRITE, ITRC_ENTER, 2, count, -1 );
X
X /* Flush out any buffered data left over from ip2_putchar() calls. */
X ip2_flush_chars( tty );
@@ -1913,9 +1992,8 @@
X bytesSent = i2Output( pCh, pData, count, user );
X WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags);
X
-#ifdef IP2DEBUG_TRACE
- ip2trace (CHANN, ITRC_WRITE, ITRC_RETURN, 1, bytesSent );
-#endif
+ ip2trace (CHANN, ITRC_WRITE, ITRC_RETURN, 1, bytesSent );
+
X return bytesSent > 0 ? bytesSent : 0;
X }
X
@@ -1935,9 +2013,7 @@
X i2ChanStrPtr pCh = tty->driver_data;
X unsigned long flags;
X
-#ifdef IP2DEBUG_TRACE
X // ip2trace (CHANN, ITRC_PUTC, ITRC_ENTER, 1, ch );
-#endif
X
X WRITE_LOCK_IRQSAVE(&pCh->Pbuf_spinlock,flags);
X pCh->Pbuf[pCh->Pbuf_stuff++] = ch;
@@ -1947,9 +2023,7 @@
X } else
X WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags);
X
-#ifdef IP2DEBUG_TRACE
X // ip2trace (CHANN, ITRC_PUTC, ITRC_RETURN, 1, ch );
-#endif
X }
X
X /******************************************************************************/
@@ -1969,9 +2043,9 @@
X
X WRITE_LOCK_IRQSAVE(&pCh->Pbuf_spinlock,flags);
X if ( pCh->Pbuf_stuff ) {
-#ifdef IP2DEBUG_TRACE
-// ip2trace (CHANN, ITRC_PUTC, 10, 1, strip );
-#endif
+
+// ip2trace (CHANN, ITRC_PUTC, 10, 1, strip );
+
X //
X // We may need to restart i2Output if it does not fullfill this request
X //
@@ -2003,9 +2077,7 @@
X bytesFree = i2OutputFree( pCh ) - pCh->Pbuf_stuff;
X READ_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags);
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_WRITE, 11, 1, bytesFree );
-#endif
X
X return ((bytesFree > 0) ? bytesFree : 0);
X }
@@ -2025,9 +2097,9 @@
X i2ChanStrPtr pCh = tty->driver_data;
X int rc;
X unsigned long flags;
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_WRITE, 12, 1, pCh->Obuf_char_count + pCh->Pbuf_stuff );
-#endif
+
X #ifdef IP2DEBUG_WRITE
X printk (KERN_DEBUG "IP2: chars in buffer = %d (%d,%d)\n",
X pCh->Obuf_char_count + pCh->Pbuf_stuff,
@@ -2057,9 +2129,8 @@
X i2ChanStrPtr pCh = tty->driver_data;
X unsigned long flags;
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_FLUSH, ITRC_ENTER, 0 );
-#endif
+
X #ifdef IP2DEBUG_WRITE
X printk (KERN_DEBUG "IP2: flush buffer\n" );
X #endif
@@ -2068,9 +2139,9 @@
X WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags);
X i2FlushOutput( pCh );
X ip2_owake(tty);
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_FLUSH, ITRC_RETURN, 0 );
-#endif
+
X }
X
X /******************************************************************************/
@@ -2205,6 +2276,7 @@
X static int
X ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg )
X {
+ wait_queue_t wait;
X i2ChanStrPtr pCh = DevTable[MINOR(tty->device)];
X struct async_icount cprev, cnow; /* kernel counter temps */
X struct serial_icounter_struct *p_cuser; /* user space */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 12'
echo 'File patch-2.2.20 is continued in part 13'
echo "13" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:12 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part13

#!/bin/sh -x
# this is part 13 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 13; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

@@ -2215,9 +2287,7 @@
X return -ENODEV;
X }
X
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_IOCTL, ITRC_ENTER, 2, cmd, arg );
-#endif
X
X #ifdef IP2DEBUG_IOCTL
X printk(KERN_DEBUG "IP2: ioctl cmd (%x), arg (%lx)\n", cmd, arg );
@@ -2225,18 +2295,18 @@
X
X switch(cmd) {
X case TIOCGSERIAL:
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 2, 1, rc );
-#endif
+
X rc = get_serial_info(pCh, (struct serial_struct *) arg);
X if (rc)
X return rc;
X break;
X
X case TIOCSSERIAL:
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 3, 1, rc );
-#endif
+
X rc = set_serial_info(pCh, (struct serial_struct *) arg);
X if (rc)
X return rc;
@@ -2272,9 +2342,9 @@
X
X case TCSBRK: /* SVID version: non-zero arg --> no break */
X rc = tty_check_change(tty);
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 4, 1, rc );
-#endif
+
X if (!rc) {
X ip2_wait_until_sent(tty,0);
X if (!arg) {


@@ -2286,9 +2356,9 @@
X

X case TCSBRKP: /* support for POSIX tcsendbreak() */
X rc = tty_check_change(tty);
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 5, 1, rc );
-#endif
+
X if (!rc) {
X ip2_wait_until_sent(tty,0);
X i2QueueCommands(PTYPE_INLINE, pCh, 100, 1,
@@ -2298,18 +2368,18 @@
X break;
X
X case TIOCGSOFTCAR:
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 6, 1, rc );
-#endif
+
X PUT_USER(rc,C_CLOCAL(tty) ? 1 : 0, (unsigned long *) arg);
X if (rc)
X return rc;
X break;
X
X case TIOCSSOFTCAR:
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 7, 1, rc );
-#endif
+
X GET_USER(rc,arg,(unsigned long *) arg);
X if (rc)
X return rc;
@@ -2319,12 +2389,22 @@
X break;
X
X case TIOCMGET:
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (CHANN, ITRC_IOCTL, 8, 1, rc );
-#endif
+
X i2QueueCommands(PTYPE_BYPASS, pCh, 100, 1, CMD_DSS_NOW);
+
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&pCh->dss_now_wait, &wait);


+ set_current_state( TASK_INTERRUPTIBLE );
+

X serviceOutgoingFifo( pCh->pMyBord );
- interruptible_sleep_on(&pCh->dss_now_wait);


+
+ schedule();
+
+ set_current_state( TASK_RUNNING );

+ remove_wait_queue(&pCh->dss_now_wait, &wait);
+
X if (signal_pending(current)) {
X return -EINTR;
X }
@@ -2341,9 +2421,8 @@
X case TIOCMBIS:
X case TIOCMBIC:
X case TIOCMSET:
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_IOCTL, 9, 0 );
-#endif
+
X rc = set_modem_info(pCh, cmd, (unsigned int *) arg);
X break;
X
@@ -2358,15 +2437,18 @@
X restore_flags(flags);
X i2QueueCommands(PTYPE_BYPASS, pCh, 100, 4,
X CMD_DCD_REP, CMD_CTS_REP, CMD_DSR_REP, CMD_RI_REP);
+ init_waitqueue_entry(&wait, current);
+ add_wait_queue(&pCh->delta_msr_wait, &wait);


+ set_current_state( TASK_INTERRUPTIBLE );
+

X serviceOutgoingFifo( pCh->pMyBord );
X for(;;) {
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_IOCTL, 10, 0 );
-#endif
- interruptible_sleep_on(&pCh->delta_msr_wait);
-#ifdef IP2DEBUG_TRACE
+
+ schedule();
+
X ip2trace (CHANN, ITRC_IOCTL, 11, 0 );
-#endif
+
X /* see if a signal did it */
X if (signal_pending(current)) {
X rc = -ERESTARTSYS;


@@ -2389,6 +2471,9 @@
X }

X cprev = cnow;


X }
+ set_current_state( TASK_RUNNING );

+ remove_wait_queue(&pCh->delta_msr_wait, &wait);
+
X i2QueueCommands(PTYPE_BYPASS, pCh, 100, 3,
X CMD_CTS_NREP, CMD_DSR_NREP, CMD_RI_NREP);
X if ( ! (pCh->flags & ASYNC_CHECK_CD)) {
@@ -2407,9 +2492,8 @@
X * serial driver.
X */
X case TIOCGICOUNT:
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_IOCTL, 11, 1, rc );
-#endif
+
X save_flags(flags);cli();
X cnow = pCh->icount;
X restore_flags(flags);
@@ -2440,15 +2524,14 @@
X case TIOCSERSETMULTI:
X
X default:
-#ifdef IP2DEBUG_TRACE
X ip2trace (CHANN, ITRC_IOCTL, 12, 0 );
-#endif
+
X rc = -ENOIOCTLCMD;


X break;
X }
-#ifdef IP2DEBUG_TRACE
+

X ip2trace (CHANN, ITRC_IOCTL, ITRC_RETURN, 0 );
-#endif
+
X return rc;
X }
X
@@ -2659,9 +2742,9 @@
X #ifdef IP2DEBUG_IOCTL
X printk (KERN_DEBUG "IP2: set line discipline\n" );
X #endif
-#ifdef IP2DEBUG_TRACE
+
X ip2trace (((i2ChanStrPtr)tty->driver_data)->port_index, ITRC_IOCTL, 16, 0 );
-#endif
+
X }
X
X /******************************************************************************/
@@ -3117,12 +3200,16 @@


X break;
X
X default:

- pCh = DevTable[cmd];
- if ( pCh )
- {
- COPY_TO_USER(rc, (char*)arg, (char*)pCh, sizeof(i2ChanStr) );
+ if (cmd < IP2_MAX_PORTS) {
+ pCh = DevTable[cmd];
+ if ( pCh )
+ {
+ COPY_TO_USER(rc, (char*)arg, (char*)pCh, sizeof(i2ChanStr) );
+ } else {
+ rc = -ENODEV;
+ }
X } else {
- rc = cmd < 64 ? -ENODEV : -EINVAL;
+ rc = -EINVAL;
X }
X }
X break;
@@ -3437,10 +3524,10 @@
X /* */
X /* */
X /******************************************************************************/
+#ifdef IP2DEBUG_TRACE
X void
X ip2trace (unsigned short pn, unsigned char cat, unsigned char label, unsigned long codes, ...)
X {
-#ifdef IP2DEBUG_TRACE
X long flags;
X unsigned long *pCode = &codes;
X union ip2breadcrumb bc;


@@ -3480,7 +3567,7 @@
X

X tracebuf[tracestuff++] = *++pCode;
X }
-#endif
X }
+#endif
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/lp.c linux/drivers/char/lp.c
--- v2.2.19/drivers/char/lp.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/char/lp.c Wed Oct 10 01:40:46 2001
@@ -306,7 +306,7 @@
X }
X /*
X * NOTE: if you run with irqs you _must_ use
- * `tunelp /dev/lp? -c 1' to be rasonable efficient!
+ * `tunelp /dev/lp? -c 1' to be reasonably efficient!
X *
X * ..but beware that data corruption can happen that way. -Tim
X */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/machzwd.c linux/drivers/char/machzwd.c
--- v2.2.19/drivers/char/machzwd.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/char/machzwd.c Wed Oct 10 01:40:46 2001
@@ -0,0 +1,545 @@
+/*
+ * MachZ ZF-Logic Watchdog Timer driver for Linux
+ *
+ *
+ * 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.
+ *
+ * The author does NOT admit liability nor provide warranty for
+ * any of this software. This material is provided "AS-IS" in
+ * the hope that it may be useful for others.
+ *
+ * Author: Fernando Fuganti <fug...@conectiva.com.br>
+ *
+ * Based on sbc60xxwdt.c by Jakob Oestergaard
+ *
+ *
+ * We have two timers (wd#1, wd#2) driven by a 32 KHz clock with the
+ * following periods:
+ * wd#1 - 2 seconds;
+ * wd#2 - 7.2 ms;
+ * After the expiration of wd#1, it can generate a NMI, SCI, SMI, or
+ * a system RESET and it starts wd#2 that unconditionaly will RESET
+ * the system when the counter reaches zero.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/sched.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/malloc.h>
+#include <linux/ioport.h>
+#include <linux/fcntl.h>
+#include <linux/smp_lock.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <linux/notifier.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+
+
+/* ports */
+#define ZF_IOBASE 0x218
+#define INDEX 0x218
+#define DATA_B 0x219
+#define DATA_W 0x21A
+#define DATA_D 0x21A
+
+/* indexes */ /* size */
+#define ZFL_VERSION 0x02 /* 16 */
+#define CONTROL 0x10 /* 16 */
+#define STATUS 0x12 /* 8 */
+#define COUNTER_1 0x0C /* 16 */
+#define COUNTER_2 0x0E /* 8 */
+#define PULSE_LEN 0x0F /* 8 */
+
+/* controls */
+#define ENABLE_WD1 0x0001
+#define ENABLE_WD2 0x0002
+#define RESET_WD1 0x0010
+#define RESET_WD2 0x0020
+#define GEN_SCI 0x0100
+#define GEN_NMI 0x0200
+#define GEN_SMI 0x0400
+#define GEN_RESET 0x0800
+
+
+/* utilities */
+
+#define WD1 0
+#define WD2 1
+
+#define zf_writew(port, data) { outb(port, INDEX); outw(data, DATA_W); }
+#define zf_writeb(port, data) { outb(port, INDEX); outb(data, DATA_B); }
+#define zf_get_ZFL_version() zf_readw(ZFL_VERSION)
+
+
+static unsigned short zf_readw(unsigned char port)
+{
+ outb(port, INDEX);
+ return inw(DATA_W);
+}
+
+static unsigned short zf_readb(unsigned char port)
+{
+ outb(port, INDEX);
+ return inb(DATA_B);
+}
+
+
+MODULE_AUTHOR("Fernando Fuganti <fug...@conectiva.com.br>");
+MODULE_DESCRIPTION("MachZ ZF-Logic Watchdog driver");
+MODULE_PARM(action, "i");
+MODULE_PARM_DESC(action, "after watchdog resets, generate: 0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI");
+
+#define PFX "machzwd"
+
+static struct watchdog_info zf_info = {
+ options: WDIOF_KEEPALIVEPING,
+ firmware_version: 1,
+ identity: "ZF-Logic watchdog"
+};
+
+
+/*
+ * action refers to action taken when watchdog resets
+ * 0 = GEN_RESET
+ * 1 = GEN_SMI
+ * 2 = GEN_NMI
+ * 3 = GEN_SCI
+ * defaults to GEN_RESET (0)
+ */
+static int action = 0;
+static int zf_action = GEN_RESET;
+static int zf_is_open = 0;
+static int zf_expect_close = 0;
+static spinlock_t zf_lock;
+static struct timer_list zf_timer;
+static unsigned long next_heartbeat = 0;
+
+
+/* timeout for user land heart beat (10 seconds) */
+#define ZF_USER_TIMEO (HZ*10)
+
+/* timeout for hardware watchdog (~500ms) */
+#define ZF_HW_TIMEO (HZ/2)
+
+/* number of ticks on WD#1 (driven by a 32KHz clock, 2s) */
+#define ZF_CTIMEOUT 0xffff
+
+#ifndef ZF_DEBUG
+# define dprintk(format, args...)
+#else
+# define dprintk(format, args...) printk(KERN_DEBUG PFX ":" __FUNCTION__ ":%d: " format, __LINE__ , ## args)
+#endif
+
+
+/* STATUS register functions */
+
+static inline unsigned char zf_get_status(void)
+{
+ return zf_readb(STATUS);
+}
+
+static inline void zf_set_status(unsigned char new)
+{
+ zf_writeb(STATUS, new);
+}
+
+
+/* CONTROL register functions */
+
+static inline unsigned short zf_get_control(void)
+{
+ return zf_readw(CONTROL);
+}
+
+static inline void zf_set_control(unsigned short new)
+{
+ zf_writew(CONTROL, new);
+}
+
+
+/* WD#? counter functions */
+/*
+ * Just get current counter value
+ */
+
+inline unsigned short zf_get_timer(unsigned char n)
+{
+ switch(n){
+ case WD1:
+ return zf_readw(COUNTER_1);
+ case WD2:
+ return zf_readb(COUNTER_2);
+ default:


+ return 0;
+ }
+}

+
+/*
+ * Just set counter value
+ */
+
+static inline void zf_set_timer(unsigned short new, unsigned char n)
+{
+ switch(n){
+ case WD1:
+ zf_writew(COUNTER_1, new);
+ case WD2:
+ zf_writeb(COUNTER_2, new > 0xff ? 0xff : new);
+ default:
+ return;
+ }
+}
+
+/*
+ * stop hardware timer
+ */
+static void zf_timer_off(void)
+{
+ unsigned int ctrl_reg = 0;
+
+ /* stop internal ping */
+ del_timer(&zf_timer);
+
+ /* stop watchdog timer */
+ ctrl_reg = zf_get_control();
+ ctrl_reg |= (ENABLE_WD1|ENABLE_WD2); /* disable wd1 and wd2 */
+ ctrl_reg &= ~(ENABLE_WD1|ENABLE_WD2);
+ zf_set_control(ctrl_reg);
+
+ printk(PFX ": Watchdog timer is now disabled\n");
+}
+
+
+/*
+ * start hardware timer
+ */
+static void zf_timer_on(void)
+{
+ unsigned int ctrl_reg = 0;
+
+ zf_writeb(PULSE_LEN, 0xff);
+
+ zf_set_timer(ZF_CTIMEOUT, WD1);
+
+ /* user land ping */
+ next_heartbeat = jiffies + ZF_USER_TIMEO;
+
+ /* start the timer for internal ping */
+ zf_timer.expires = jiffies + ZF_HW_TIMEO;
+
+ add_timer(&zf_timer);
+
+ /* start watchdog timer */
+ ctrl_reg = zf_get_control();
+ ctrl_reg |= (ENABLE_WD1|zf_action);
+ zf_set_control(ctrl_reg);
+
+ printk(PFX ": Watchdog timer is now enabled\n");
+}
+
+
+static void zf_ping(unsigned long data)
+{
+ unsigned int ctrl_reg = 0;
+
+ zf_writeb(COUNTER_2, 0xff);
+
+ if(time_before(jiffies, next_heartbeat)){
+
+ dprintk("time_before: %ld\n", next_heartbeat - jiffies);
+
+ /*
+ * reset event is activated by transition from 0 to 1 on
+ * RESET_WD1 bit and we assume that it is already zero...
+ */
+ ctrl_reg = zf_get_control();
+ ctrl_reg |= RESET_WD1;
+ zf_set_control(ctrl_reg);
+
+ /* ...and nothing changes until here */
+ ctrl_reg &= ~(RESET_WD1);
+ zf_set_control(ctrl_reg);
+
+ zf_timer.expires = jiffies + ZF_HW_TIMEO;
+ add_timer(&zf_timer);
+ }else{
+ printk(PFX ": I will reset your machine\n");
+ }
+}
+
+static ssize_t zf_write(struct file *file, const char *buf, size_t count,
+ loff_t *ppos)
+{
+ /* Can't seek (pwrite) on this device */
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
+
+ /* See if we got the magic character */
+ if(count){
+
+/*
+ * no need to check for close confirmation
+ * no way to disable watchdog ;)
+ */
+#ifndef CONFIG_WATCHDOG_NOWAYOUT
+ size_t ofs;
+
+ /*
+ * note: just in case someone wrote the magic character
+ * five months ago...
+ */
+ zf_expect_close = 0;
+
+ /* now scan */
+ for(ofs = 0; ofs != count; ofs++){
+ if(buf[ofs] == 'V'){
+ zf_expect_close = 1;
+ dprintk("zf_expect_close 1\n");
+ }
+ }
+#endif
+ /*
+ * Well, anyhow someone wrote to us,
+ * we should return that favour
+ */
+ next_heartbeat = jiffies + ZF_USER_TIMEO;
+ dprintk("user ping at %ld\n", jiffies);
+
+ return 1;
+ }
+


+ return 0;
+}
+

+static ssize_t zf_read(struct file *file, char *buf, size_t count,
+ loff_t *ppos)
+{
+ return -EINVAL;
+}
+
+
+
+static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+ unsigned long arg)


+{
+ int ret;
+

+ switch(cmd){
+ case WDIOC_GETSUPPORT:
+ ret = copy_to_user((struct watchdog_info *)arg,
+ &zf_info, sizeof(zf_info));
+ if(ret)
+ return -EFAULT;
+ break;
+
+ case WDIOC_GETSTATUS:
+ ret = copy_to_user((int *)arg, &zf_is_open,
+ sizeof(int));
+ if(ret)
+ return -EFAULT;
+ break;
+
+ case WDIOC_KEEPALIVE:
+ zf_ping(0);
+ break;
+
+ default:
+ return -ENOTTY;
+ }
+


+ return 0;
+}
+

+static int zf_open(struct inode *inode, struct file *file)
+{
+ switch(MINOR(inode->i_rdev)){
+ case WATCHDOG_MINOR:
+ spin_lock(&zf_lock);
+ if(zf_is_open){
+ spin_unlock(&zf_lock);
+ return -EBUSY;
+ }
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+ MOD_INC_USE_COUNT;
+#endif
+ zf_is_open = 1;
+
+ spin_unlock(&zf_lock);
+
+ zf_timer_on();
+
+ return 0;
+ default:
+ return -ENODEV;
+ }
+}
+
+static int zf_close(struct inode *inode, struct file *file)
+{
+ if(MINOR(inode->i_rdev) == WATCHDOG_MINOR){
+
+ if(zf_expect_close){
+ zf_timer_off();
+ } else {
+ del_timer(&zf_timer);
+ printk(PFX ": device file closed unexpectedly. Will not stop the WDT!\n");
+ }
+
+ spin_lock(&zf_lock);
+ zf_is_open = 0;
+ spin_unlock(&zf_lock);
+
+ zf_expect_close = 0;
+ }
+

+ return 0;
+}
+

+/*
+ * Notifier for system down
+ */
+
+static int zf_notify_sys(struct notifier_block *this, unsigned long code,
+ void *unused)
+{
+ if(code == SYS_DOWN || code == SYS_HALT){
+ zf_timer_off();
+ }
+
+ return NOTIFY_DONE;
+}
+
+
+
+
+static struct file_operations zf_fops = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,34)
+ owner: THIS_MODULE,
+#endif
+ read: zf_read,
+ write: zf_write,
+ ioctl: zf_ioctl,
+ open: zf_open,
+ release: zf_close,
+};
+
+static struct miscdevice zf_miscdev = {
+ WATCHDOG_MINOR,
+ "watchdog",
+ &zf_fops
+};
+
+
+/*
+ * The device needs to learn about soft shutdowns in order to
+ * turn the timebomb registers off.
+ */
+static struct notifier_block zf_notifier = {
+ zf_notify_sys,
+ NULL,
+ 0
+};
+
+static void __init zf_show_action(int act)
+{
+ char *str[] = { "RESET", "SMI", "NMI", "SCI" };
+
+ printk(PFX ": Watchdog using action = %s\n", str[act]);
+}
+
+int __init zf_init(void)


+{
+ int ret;
+

+ printk(PFX ": MachZ ZF-Logic Watchdog driver initializing.\n");
+
+ ret = zf_get_ZFL_version();
+ printk("%#x\n", ret);
+ if((!ret) || (ret != 0xffff)){
+ printk(PFX ": no ZF-Logic found\n");


+ return -ENODEV;
+ }
+

+ if((action <= 3) && (action >= 0)){
+ zf_action = zf_action>>action;
+ } else
+ action = 0;
+
+ zf_show_action(action);
+
+ spin_lock_init(&zf_lock);
+
+ ret = misc_register(&zf_miscdev);
+ if (ret){
+ printk(KERN_ERR "can't misc_register on minor=%d\n",
+ WATCHDOG_MINOR);
+ goto out;
+ }
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,3)
+ if(check_region(ZF_IOBASE, 3)){
+#else
+ if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){
+#endif
+
+ printk(KERN_ERR "cannot reserve I/O ports at %d\n",
+ ZF_IOBASE);
+ ret = -EBUSY;
+ goto no_region;
+ }
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,3)
+ request_region(ZF_IOBASE, 3, "MachZ ZFL WDT");
+#define __exit
+#endif
+
+ ret = register_reboot_notifier(&zf_notifier);
+ if(ret){
+ printk(KERN_ERR "can't register reboot notifier (err=%d)\n",
+ ret);
+ goto no_reboot;
+ }
+
+ zf_set_status(0);
+ zf_set_control(0);
+
+ /* this is the timer that will do the hard work */
+ init_timer(&zf_timer);
+ zf_timer.function = zf_ping;
+ zf_timer.data = 0;


+
+ return 0;
+

+no_reboot:
+ release_region(ZF_IOBASE, 3);
+no_region:
+ misc_deregister(&zf_miscdev);
+out:


+ return ret;
+}
+

+
+void __exit zf_exit(void)
+{
+ zf_timer_off();
+
+ misc_deregister(&zf_miscdev);
+ unregister_reboot_notifier(&zf_notifier);
+ release_region(ZF_IOBASE, 3);
+}
+
+module_init(zf_init);
+module_exit(zf_exit);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/mem.c linux/drivers/char/mem.c
--- v2.2.19/drivers/char/mem.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/char/mem.c Wed Oct 10 01:40:46 2001
@@ -49,6 +49,9 @@
X #ifdef CONFIG_MDA_CONSOLE
X extern void mda_console_init(void);
X #endif
+#ifdef CONFIG_S390_TAPE_CHAR
+extern void tapechar_init(void);
+#endif
X
X static ssize_t do_write_mem(struct file * file, void *p, unsigned long realp,
X const char * buf, size_t count, loff_t *ppos)
@@ -655,6 +658,9 @@
X #endif
X #ifdef CONFIG_PHONE
X telephony_init();
+#endif
+#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR)
+ tapechar_init();
X #endif
X return 0;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/misc.c linux/drivers/char/misc.c
--- v2.2.19/drivers/char/misc.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/char/misc.c Wed Oct 10 01:40:46 2001
@@ -84,7 +84,6 @@
X extern int pc110pad_init(void);
X extern int pmu_device_init(void);
X extern int tosh_init(void);
-extern int rng_init(void);
X
X static int misc_read_proc(char *buf, char **start, off_t offset,
X int len, int *eof, void *private)
@@ -286,9 +285,6 @@
X #endif
X #ifdef CONFIG_SGI
X streamable_init ();
-#endif
-#ifdef CONFIG_INTEL_RNG
- rng_init ();
X #endif
X #ifdef CONFIG_TOSHIBA
X tosh_init();
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/mixcomwd.c linux/drivers/char/mixcomwd.c
--- v2.2.19/drivers/char/mixcomwd.c Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/mixcomwd.c Wed Oct 10 01:40:46 2001
@@ -164,7 +164,7 @@
X mixcomwd_ping();
X break;


X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;

X }
X return 0;
X }

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/moxa.c linux/drivers/char/moxa.c
--- v2.2.19/drivers/char/moxa.c Sun Mar 25 17:31:27 2001
+++ linux/drivers/char/moxa.c Wed Oct 10 01:40:46 2001
@@ -697,21 +697,32 @@
X struct moxa_str *ch;
X int len, port;
X unsigned long flags;
- unsigned char *temp;
X
X ch = (struct moxa_str *) tty->driver_data;
X if (ch == NULL)
X return (0);
X port = ch->port;
X save_flags(flags);
- cli();
X if (from_user) {
- copy_from_user(moxaXmitBuff, buf, count);
- temp = moxaXmitBuff;
- } else
- temp = (unsigned char *) buf;
- len = MoxaPortWriteData(port, temp, count);
- restore_flags(flags);
+ if (count > PAGE_SIZE)
+ count = PAGE_SIZE;
+ down(&moxaBuffSem);
+ if (copy_from_user(moxaXmitBuff, buf, count)) {
+ len = -EFAULT;
+ } else {
+ cli();
+ len = MoxaPortWriteData(port, moxaXmitBuff, count);
+ restore_flags(flags);
+ }
+ up(&moxaBuffSem);
+ if (len < 0)
+ return len;
+ } else {
+ cli();
+ len = MoxaPortWriteData(port, (unsigned char *) buf, count);
+ restore_flags(flags);
+ }
+
X /*********************************************
X if ( !(ch->statusflags & LOWWAIT) &&
X ((len != count) || (MoxaPortTxFree(port) <= 100)) )
@@ -2905,6 +2916,8 @@
X unsigned long baseAddr;
X int i;
X
+ if(len > sizeof(moxaBuff))
+ return -EINVAL;
X if(copy_from_user(moxaBuff, tmp, len))
X return -EFAULT;
X baseAddr = moxaBaseAddr[cardno];
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/n_hdlc.c linux/drivers/char/n_hdlc.c
--- v2.2.19/drivers/char/n_hdlc.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/char/n_hdlc.c Wed Oct 10 01:40:47 2001
@@ -9,7 +9,7 @@
X * Al Longyear <long...@netcom.com>, Paul Mackerras <Paul.Ma...@cs.anu.edu.au>
X *
X * Original release 01/11/99
- * $Id: n_hdlc.c,v 2.2 2000/11/08 17:08:29 paul Exp $
+ * $Id: n_hdlc.c,v 2.3 2001/05/09 14:42:37 paul Exp $
X *
X * This code is released under the GNU General Public License (GPL)
X *
@@ -78,7 +78,7 @@
X */
X
X #define HDLC_MAGIC 0x239e
-#define HDLC_VERSION "2.2"
+#define HDLC_VERSION "$Revision: 2.3 $"
X
X #include <linux/version.h>
X #include <linux/config.h>
@@ -98,6 +98,7 @@
X #include <linux/malloc.h>
X #include <linux/tty.h>
X #include <linux/errno.h>
+#include <linux/init.h>
X #include <linux/string.h> /* used in new tty drivers */
X #include <linux/signal.h> /* used in new tty drivers */
X #include <asm/system.h>
@@ -986,14 +987,7 @@
X
X } /* end of n_hdlc_buf_get() */
X
-/* init_module()
- *
- * called when module is loading to register line discipline
- *
- * Arguments: None
- * Return Value: 0 if success, otherwise error code
- */
-int init_module(void)
+int __init n_hdlc_init()
X {
X static struct tty_ldisc n_hdlc_ldisc;
X int status;
@@ -1031,16 +1025,14 @@
X if (status)
X printk(KERN_INFO"N_HDLC: init failure %d\n", status);
X return (status);
-
-} /* end of init_module() */
+}
+
+#ifdef MODULE
+int init_module(void)
+{
+ return n_hdlc_init();
+}
X
-/* cleanup_module()
- *
- * called when module is unloading to unregister line discipline
- *
- * Arguments: None
- * Return Value: None
- */
X void cleanup_module(void)
X {
X int status;
@@ -1050,3 +1042,4 @@
X else
X printk("N_HDLC: line discipline unregistered\n");
X }
+#endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/pc110pad.c linux/drivers/char/pc110pad.c
--- v2.2.19/drivers/char/pc110pad.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/pc110pad.c Wed Oct 10 01:40:47 2001
@@ -612,7 +612,7 @@
X current_params.tap_interval = new.tap_interval;
X return 0;
X }


- return -ENOIOCTLCMD;
+ return -ENOTTY;
X }

X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/pcwd.c linux/drivers/char/pcwd.c
--- v2.2.19/drivers/char/pcwd.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/pcwd.c Wed Oct 10 01:40:47 2001
@@ -240,7 +240,7 @@
X
X switch(cmd) {


X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
X

X case WDIOC_GETSUPPORT:
X i = copy_to_user((void*)arg, &ident, sizeof(ident));
@@ -476,6 +476,8 @@
X char *ret;
X
X ret = kmalloc(6, GFP_KERNEL);
+ if(ret == NULL)
+ return NULL;
X
X while((count < 3) && (!found)) {
X outb_p(0x80, current_readport + 2);
@@ -497,10 +499,8 @@
X ten = send_command(0x82);
X hund = send_command(0x83);
X minor = send_command(0x84);
- }
-
- if (found)
X sprintf(ret, "%c.%c%c%c", one, ten, hund, minor);
+ }
X else
X sprintf(ret, "ERROR");
X
@@ -622,12 +622,12 @@
X #ifdef MODULE
X void cleanup_module(void)
X {
+ misc_deregister(&pcwd_miscdev);
X /* Disable the board */
X if (revision == PCWD_REVISION_C) {
X outb_p(0xA5, current_readport + 3);
X outb_p(0xA5, current_readport + 3);
X }
- misc_deregister(&pcwd_miscdev);
X if (supports_temp)
X misc_deregister(&temp_miscdev);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/rio/linux_compat.h linux/drivers/char/rio/linux_compat.h
--- v2.2.19/drivers/char/rio/linux_compat.h Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/rio/linux_compat.h Wed Oct 10 01:40:47 2001
@@ -93,6 +93,7 @@
X #define RIO_DEBUG_SPINLOCK 0x010000
X #define RIO_DEBUG_DELAY 0x020000
X #define RIO_DEBUG_MOD_COUNT 0x040000
+#define RIO_DEBUG_IOCTL 0x080000
X
X /* Copied over from riowinif.h . This is ugly. The winif file declares
X also much other stuff which is incompatible with the headers from
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/rio/rio_linux.c linux/drivers/char/rio/rio_linux.c
--- v2.2.19/drivers/char/rio/rio_linux.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/rio/rio_linux.c Wed Oct 10 01:40:47 2001
@@ -730,12 +730,31 @@
X }
X
X
+int rio2l (int rio_bits)
+{
+ return ((rio_bits & MODEM_CD) ?TIOCM_CD :0) |
+ ((rio_bits & MODEM_DSR)?TIOCM_DSR:0) |
+ ((rio_bits & MODEM_RTS)?TIOCM_RTS:0) |
+ ((rio_bits & MODEM_RI) ?TIOCM_RI :0) |
+ ((rio_bits & MODEM_DTR)?TIOCM_DTR:0) |
+ ((rio_bits & MODEM_CTS)?TIOCM_CTS:0);
+}
+
+int l2rio (int l_bits)
+{
+ return ((l_bits & TIOCM_RTS)?MSET_RTS:0) |
+ ((l_bits & TIOCM_DTR)?MSET_DTR:0);
+}
+
+
X static int rio_ioctl (struct tty_struct * tty, struct file * filp,
X unsigned int cmd, unsigned long arg)
X {
X int rc;
X struct Port *PortP;
X int ival;
+ int state;
+ long flags;
X
X func_enter();
X
@@ -766,7 +785,7 @@
X break;
X case TCSBRK:
X if ( PortP->State & RIO_DELETED ) {
- rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n");
+ rio_dprintk (RIO_DEBUG_IOCTL, "BREAK on deleted RTA\n");
X rc = -EIO;
X } else {
X if (RIOShortCommand(p, PortP, SBREAK, 2, 250) == RIO_FAIL) {
@@ -777,7 +796,7 @@
X break;
X case TCSBRKP:
X if ( PortP->State & RIO_DELETED ) {
- rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n");
+ rio_dprintk (RIO_DEBUG_IOCTL, "BREAK on deleted RTA\n");
X rc = -EIO;
X } else {
X int l;
@@ -794,39 +813,48 @@
X sizeof(struct serial_struct))) == 0)
X rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg);
X break;
-#if 0
X case TIOCMGET:
- if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
- sizeof(unsigned int))) == 0) {
- ival = rio_getsignals(port);
- put_user(ival, (unsigned int *) arg);
- }
+ rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMGET: %x -> %x \n",
+ PortP->ModemState, rio2l (PortP->ModemState));
+ return put_user (rio2l (PortP->ModemState), (unsigned int *) arg);
X break;
- case TIOCMBIS:
- if ((rc = verify_area(VERIFY_READ, (void *) arg,
- sizeof(unsigned int))) == 0) {
- Get_user(ival, (unsigned int *) arg);
- rio_setsignals(port, ((ival & TIOCM_DTR) ? 1 : -1),
- ((ival & TIOCM_RTS) ? 1 : -1));
- }
+ case TIOCMSET:
+ Get_user(state, (unsigned int *) arg);
+ rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMSET: %x -> %x\n",
+ PortP->ModemState, l2rio (state));
+
+ rio_spin_lock_irqsave(&PortP->portSem, flags);
+ PortP->ModemState = l2rio (state);
+ PortP->ModemLines = l2rio (state);
+ if (RIOPreemptiveCmd(p, PortP, MSET) == RIO_FAIL)
+ rio_dprintk (RIO_DEBUG_TTY, "MSET command failed\n");
+ PortP->State |= RIO_BUSY;
+ rio_spin_unlock_irqrestore(&PortP->portSem, flags);
X break;
X case TIOCMBIC:
- if ((rc = verify_area(VERIFY_READ, (void *) arg,
- sizeof(unsigned int))) == 0) {
- Get_user(ival, (unsigned int *) arg);
- rio_setsignals(port, ((ival & TIOCM_DTR) ? 0 : -1),
- ((ival & TIOCM_RTS) ? 0 : -1));
- }
+ rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMBIC\n");
+ Get_user(state, (unsigned int *) arg);
+
+ rio_spin_lock_irqsave(&PortP->portSem, flags);
+ PortP->ModemState &= ~l2rio (state);
+ PortP->ModemLines = l2rio (state);
+ if (RIOPreemptiveCmd(p, PortP, MBIC) == RIO_FAIL)
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOMBIC command failed\n");
+ PortP->State |= RIO_BUSY;
+ rio_spin_unlock_irqrestore(&PortP->portSem, flags);
X break;
- case TIOCMSET:
- if ((rc = verify_area(VERIFY_READ, (void *) arg,
- sizeof(unsigned int))) == 0) {
- Get_user(ival, (unsigned int *) arg);
- rio_setsignals(port, ((ival & TIOCM_DTR) ? 1 : 0),
- ((ival & TIOCM_RTS) ? 1 : 0));
- }
+ case TIOCMBIS:
+ rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMBIS\n");
+ Get_user(state, (unsigned int *) arg);
+
+ rio_spin_lock_irqsave(&PortP->portSem, flags);
+ PortP->ModemState |= state;
+ PortP->ModemLines = state;
+ if (RIOPreemptiveCmd(p, PortP, MBIS) == RIO_FAIL)
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOMBIS command failed\n");
+ PortP->State |= RIO_BUSY;
+ rio_spin_unlock_irqrestore(&PortP->portSem, flags);
X break;
-#endif
X default:
X rc = -ENOIOCTLCMD;
X break;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/rio/rio_linux.h linux/drivers/char/rio/rio_linux.h
--- v2.2.19/drivers/char/rio/rio_linux.h Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/rio/rio_linux.h Wed Oct 10 01:40:47 2001
@@ -190,3 +190,20 @@
X #define func_enter2()
X #endif
X
+/* Documentation says to use these defines. Why aren't they in a
+ * header then? Hmm. They are in the header "riowinif.h", however
+ * that file doesn't compile. I give up. Copied here. -- REW
+ */
+
+#define MSET_RTS 0x01 /* RTS modem signal */
+#define MSET_DTR 0x02 /* DTR modem signal */
+
+#define MODEM_DSR 0x80 /* Data Set Ready modem state */
+#define MODEM_CTS 0x40 /* Clear To Send modem state */
+#define MODEM_RI 0x20 /* Ring Indicate modem state */
+#define MODEM_CD 0x10 /* Carrier Detect modem state */
+#define MODEM_TSTOP 0x08 /* Transmit Stopped state */
+#define MODEM_TEMPTY 0x04 /* Transmit Empty state */
+#define MODEM_DTR 0x02 /* DTR modem output state */
+#define MODEM_RTS 0x01 /* RTS modem output state */
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/rio/riodrvr.h linux/drivers/char/rio/riodrvr.h
--- v2.2.19/drivers/char/rio/riodrvr.h Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/rio/riodrvr.h Wed Oct 10 01:40:47 2001
@@ -33,12 +33,13 @@
X #ifndef __riodrvr_h
X #define __riodrvr_h
X
+#include <asm/param.h> /* for HZ */
+
X #ifdef SCCS_LABELS
X static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3";
X #endif
X
X #define MEMDUMP_SIZE 32
-#define HZ 100
X #define MOD_DISABLE (RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/riscom8.c linux/drivers/char/riscom8.c
--- v2.2.19/drivers/char/riscom8.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/riscom8.c Wed Oct 10 01:40:48 2001
@@ -1214,33 +1214,58 @@
X if (!tty || !port->xmit_buf || !tmp_buf)
X return 0;
X
- if (from_user)
+ save_flags(flags);
+ if (from_user) {
X down(&tmp_buf_sem);
+ while (1) {
+ cli();
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
+ if (c <= 0)
+ break;
X
- save_flags(flags);
- while (1) {
- cli();
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
- if (c <= 0)
- break;
+ c -= copy_from_user(tmp_buf, buf, c);
+ if (!c) {
+ if (!total)
+ total = -EFAULT;
+ break;
+ }
X
- if (from_user) {
- copy_from_user(tmp_buf, buf, c);
+ cli();
X c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
X SERIAL_XMIT_SIZE - port->xmit_head));
X memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c);
- } else
+ port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ port->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
+ up(&tmp_buf_sem);
+ } else {
+ while (1) {
+ cli();
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
+ if (c <= 0) {
+ restore_flags(flags);
+ break;
+ }
+
X memcpy(port->xmit_buf + port->xmit_head, buf, c);
- port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
- port->xmit_cnt += c;
- restore_flags(flags);
- buf += c;
- count -= c;
- total += c;
+ port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ port->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
X }
- if (from_user)
- up(&tmp_buf_sem);
+
+ cli();
X if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped &&
X !(port->IER & IER_TXRDY)) {
X port->IER |= IER_TXRDY;
@@ -1248,6 +1273,7 @@
X rc_out(bp, CD180_IER, port->IER);
X }
X restore_flags(flags);
+
X return total;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/sbc60xxwdt.c linux/drivers/char/sbc60xxwdt.c
--- v2.2.19/drivers/char/sbc60xxwdt.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/sbc60xxwdt.c Wed Oct 10 01:40:48 2001
@@ -49,7 +49,7 @@
X *
X * Why `V' ? Well, `V' is the character in ASCII for the value 86,
X * and we all know that 86 is _the_ most random number in the universe.
- * Therefore it is the letter that has the slightest chance of occuring
+ * Therefore it is the letter that has the slightest chance of occurring
X * by chance, when the system becomes corrupted.
X *
X */
@@ -170,9 +170,13 @@
X
X /* now scan */
X for(ofs = 0; ofs != count; ofs++)
- if(buf[ofs] == 'V')
+ {
+ char c;
+ if(get_user(c, buf+ofs))
+ return -EFAULT;
+ if(c == 'V')
X wdt_expect_close = 1;
-
+ }
X /* Well, anyhow someone wrote to us, we should return that favour */
X next_heartbeat = jiffies + WDT_HEARTBEAT;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/softdog.c linux/drivers/char/softdog.c
--- v2.2.19/drivers/char/softdog.c Sun Mar 25 17:31:25 2001
+++ linux/drivers/char/softdog.c Wed Oct 10 01:40:48 2001
@@ -141,7 +141,7 @@
X switch(cmd)


X {
X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;

X case WDIOC_GETSUPPORT:
X if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
X return -EFAULT;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/specialix.c linux/drivers/char/specialix.c
--- v2.2.19/drivers/char/specialix.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/specialix.c Wed Oct 10 01:40:48 2001
@@ -1611,33 +1611,56 @@
X if (!tty || !port->xmit_buf || !tmp_buf)
X return 0;
X
- if (from_user)
+ save_flags(flags);
+ if (from_user) {
X down(&tmp_buf_sem);
+ while (1) {
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
+ if (c <= 0)
+ break;
X
- save_flags(flags);
- while (1) {
- cli();
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
- if (c <= 0)
- break;
+ c -= copy_from_user(tmp_buf, buf, c);
+ if (!c) {
+ if (!total)
+ total = -EFAULT;
+ break;
+ }
X
- if (from_user) {
- copy_from_user(tmp_buf, buf, c);
+ cli();
X c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
+ SERIAL_XMIT_SIZE - port->xmit_head));
X memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c);
- } else
+ port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ port->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
+ up(&tmp_buf_sem);
+ } else {
+ while (1) {
+ cli();
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
+ if (c <= 0) {
+ restore_flags(flags);
+ break;
+ }
X memcpy(port->xmit_buf + port->xmit_head, buf, c);
- port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
- port->xmit_cnt += c;
- restore_flags(flags);
- buf += c;
- count -= c;
- total += c;
+ port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ port->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
X }
- if (from_user)
- up(&tmp_buf_sem);
+
+ cli();
X if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped &&
X !(port->IER & IER_TXRDY)) {
X port->IER |= IER_TXRDY;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/synclink.c linux/drivers/char/synclink.c
--- v2.2.19/drivers/char/synclink.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/char/synclink.c Wed Oct 10 01:40:48 2001
@@ -1,7 +1,7 @@
X /*
X * linux/drivers/char/synclink.c
X *
- * $Id: synclink.c,v 2.4 2000/12/11 20:08:18 paul Exp $
+ * $Id: synclink.c,v 2.12 2001/05/10 20:53:04 paulkf Exp $
X *
X * Device driver for Microgate SyncLink ISA and PCI
X * high speed multiprotocol serial adapters.
@@ -54,7 +54,11 @@
X */
X
X #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq))
-#define BREAKPOINT() asm(" int $3");
+#if defined(__i386__)
+# define BREAKPOINT() asm(" int $3");
+#else
+# define BREAKPOINT() { }
+#endif
X
X #define MAX_ISA_DEVICES 10
X #define MAX_PCI_DEVICES 10
@@ -182,6 +186,13 @@
X int cts_down;
X };
X
+/* transmit holding buffer definitions*/
+#define MAX_TX_HOLDING_BUFFERS 5
+struct tx_holding_buffer {
+ int buffer_size;
+ unsigned char * buffer;
+};
+
X /*
X * Device instance data structure
X */
@@ -247,11 +258,21 @@
X DMABUFFERENTRY *rx_buffer_list; /* list of receive buffer entries */
X unsigned int current_rx_buffer;
X
+ int num_tx_dma_buffers; /* number of tx dma frames required */
+ int tx_dma_buffers_used;
X unsigned int tx_buffer_count; /* count of total allocated Tx buffers */
X DMABUFFERENTRY *tx_buffer_list; /* list of transmit buffer entries */
+ int start_tx_dma_buffer; /* tx dma buffer to start tx dma operation */
+ int current_tx_buffer; /* next tx dma buffer to be loaded */
X
X unsigned char *intermediate_rxbuffer;
X
+ int num_tx_holding_buffers; /* number of tx holding buffer allocated */
+ int get_tx_holding_index; /* next tx holding buffer for adapter to load */
+ int put_tx_holding_index; /* next tx holding buffer to store user request */
+ int tx_holding_count; /* number of tx holding buffers waiting */
+ struct tx_holding_buffer tx_holding_buffers[MAX_TX_HOLDING_BUFFERS];
+
X int rx_enabled;
X int rx_overflow;
X
@@ -691,6 +712,8 @@
X #define usc_TCmd(a,b) usc_OutReg((a), TCSR, (u16)((a)->tcsr_value + (b)))
X #define usc_RCmd(a,b) usc_OutReg((a), RCSR, (b))
X
+#define usc_SetTransmitSyncChars(a,s0,s1) usc_OutReg((a), TSR, (u16)(((u16)s0<<8)|(u16)s1))
+
X void usc_process_rxoverrun_sync( struct mgsl_struct *info );
X void usc_start_receiver( struct mgsl_struct *info );
X void usc_stop_receiver( struct mgsl_struct *info );
@@ -781,7 +804,10 @@
X */
X void mgsl_free_rx_frame_buffers( struct mgsl_struct *info, unsigned int StartIndex, unsigned int EndIndex );
X int mgsl_get_rx_frame( struct mgsl_struct *info );
+int mgsl_get_raw_rx_frame( struct mgsl_struct *info );
X void mgsl_reset_rx_dma_buffers( struct mgsl_struct *info );
+void mgsl_reset_tx_dma_buffers( struct mgsl_struct *info );
+int num_free_tx_dma_buffers(struct mgsl_struct *info);
X void mgsl_load_tx_dma_buffer( struct mgsl_struct *info, const char *Buffer, unsigned int BufferSize);
X void mgsl_load_pci_memory(char* TargetPtr, const char* SourcePtr, unsigned short count);
X
@@ -796,6 +822,11 @@
X void mgsl_free_buffer_list_memory(struct mgsl_struct *info);
X int mgsl_alloc_intermediate_rxbuffer_memory(struct mgsl_struct *info);
X void mgsl_free_intermediate_rxbuffer_memory(struct mgsl_struct *info);
+int mgsl_alloc_intermediate_txbuffer_memory(struct mgsl_struct *info);
+void mgsl_free_intermediate_txbuffer_memory(struct mgsl_struct *info);
+int load_next_tx_holding_buffer(struct mgsl_struct *info);
+int save_tx_buffer_request(struct mgsl_struct *info,const char *Buffer, unsigned int BufferSize);
+
X
X /*
X * Bottom half interrupt handlers
@@ -816,6 +847,7 @@
X void mgsl_isr_io_pin( struct mgsl_struct *info );
X void mgsl_isr_misc( struct mgsl_struct *info );
X void mgsl_isr_receive_dma( struct mgsl_struct *info );
+void mgsl_isr_transmit_dma( struct mgsl_struct *info );
X
X typedef void (*isr_dispatch_func)(struct mgsl_struct *);
X
@@ -880,6 +912,8 @@
X static int debug_level = 0;
X static int maxframe[MAX_TOTAL_DEVICES] = {0,};
X static int dosyncppp[MAX_TOTAL_DEVICES] = {0,};
+static int txdmabufs[MAX_TOTAL_DEVICES] = {0,};
+static int txholdbufs[MAX_TOTAL_DEVICES] = {0,};
X
X MODULE_PARM(break_on_load,"i");
X MODULE_PARM(ttymajor,"i");
@@ -890,9 +924,11 @@
X MODULE_PARM(debug_level,"i");
X MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
X MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
+MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
+MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
X
X static char *driver_name = "SyncLink serial driver";
-static char *driver_version = "2.3";
+static char *driver_version = "$Revision: 2.12 $";
X
X static struct tty_driver serial_driver, callout_driver;
X static int serial_refcount;
@@ -1085,11 +1121,14 @@
X
X void mgsl_bh_receive(struct mgsl_struct *info)
X {
+ int (*get_rx_frame)(struct mgsl_struct *info) =
+ (info->params.mode == MGSL_MODE_HDLC ? mgsl_get_rx_frame : mgsl_get_raw_rx_frame);
+
X if ( debug_level >= DEBUG_LEVEL_BH )
X printk( "%s(%d):mgsl_bh_receive(%s)\n",
X __FILE__,__LINE__,info->device_name);
X
- while( mgsl_get_rx_frame(info) );
+ while( (get_rx_frame)(info) );
X }
X
X void mgsl_bh_transmit(struct mgsl_struct *info)
@@ -1594,6 +1633,58 @@
X
X } /* end of mgsl_isr_receive_dma() */
X
+/* mgsl_isr_transmit_dma()
+ *
+ * This function services a transmit DMA channel interrupt.
+ *
+ * For this driver there is one source of transmit DMA interrupts
+ * as identified in the Transmit DMA Mode Register (TDMR):
+ *
+ * BIT2 EOB End of Buffer. This interrupt occurs when a
+ * transmit DMA buffer has been emptied.
+ *
+ * The driver maintains enough transmit DMA buffers to hold at least
+ * one max frame size transmit frame. When operating in a buffered
+ * transmit mode, there may be enough transmit DMA buffers to hold at
+ * least two or more max frame size frames. On an EOB condition,
+ * determine if there are any queued transmit buffers and copy into
+ * transmit DMA buffers if we have room.
+ *
+ * Arguments: info pointer to device instance data
+ * Return Value: None
+ */
+void mgsl_isr_transmit_dma( struct mgsl_struct *info )
+{
+ u16 status;
+
+ /* clear interrupt pending and IUS bit for Tx DMA IRQ */
+ usc_OutDmaReg(info, CDIR, BIT8+BIT0 );
+
+ /* Read the transmit DMA status to identify interrupt type. */
+ /* This also clears the status bits. */
+
+ status = usc_InDmaReg( info, TDMR );
+
+ if ( debug_level >= DEBUG_LEVEL_ISR )
+ printk("%s(%d):mgsl_isr_transmit_dma(%s) status=%04X\n",
+ __FILE__,__LINE__,info->device_name,status);
+
+ if ( status & BIT2 ) {
+ --info->tx_dma_buffers_used;
+
+ /* if there are transmit frames queued,
+ * try to load the next one
+ */
+ if ( load_next_tx_holding_buffer(info) ) {
+ /* if call returns non-zero value, we have
+ * at least one free tx holding buffer
+ */
+ info->pending_bh |= BH_TRANSMIT;
+ }
+ }
+
+} /* end of mgsl_isr_transmit_dma() */
+
X /* mgsl_interrupt()
X *
X * Interrupt service routine entry point.
@@ -1637,6 +1728,8 @@
X /* Dispatch interrupt vector */
X if ( UscVector )
X (*UscIsrTable[UscVector])(info);
+ else if ( (DmaVector&(BIT10|BIT9)) == BIT10)
+ mgsl_isr_transmit_dma(info);
X else
X mgsl_isr_receive_dma(info);
X
@@ -1803,7 +1896,9 @@
X usc_stop_transmitter(info);
X info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
X
- if (info->params.mode == MGSL_MODE_HDLC || info->netcount)
+ if (info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW ||
+ info->netcount)
X usc_set_sync_mode(info);
X else
X usc_set_async_mode(info);
@@ -1956,8 +2051,7 @@
X
X spin_lock_irqsave(&info->irq_spinlock,flags);
X
- if ( (info->params.mode != MGSL_MODE_HDLC) ||
- !info->tx_active ) {
+ if ( (info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active ) {
X
X if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) {
X info->xmit_buf[info->xmit_head++] = ch;
@@ -2001,8 +2095,8 @@
X spin_lock_irqsave(&info->irq_spinlock,flags);
X
X if (!info->tx_active) {
- if ( (info->params.mode == MGSL_MODE_HDLC) &&
- info->xmit_cnt ) {
+ if ( (info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW) && info->xmit_cnt ) {
X /* operating in synchronous (frame oriented) mode */
X /* copy data from circular xmit_buf to */
X /* transmit DMA buffer. */
@@ -2046,11 +2140,51 @@
X if (!tty || !info->xmit_buf || !tmp_buf)
X goto cleanup;
X
- if ( info->params.mode == MGSL_MODE_HDLC ) {
- /* operating in synchronous (frame oriented) mode */
+ if ( info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW ) {
X
+ /* operating in synchronous (frame oriented) mode */
X if (info->tx_active) {
- ret = 0; goto cleanup;
+
+ if ( info->params.mode == MGSL_MODE_HDLC ) {
+ ret = 0;
+ goto cleanup;
+ }
+ /* transmitter is actively sending data -
+ * if we have multiple transmit dma and
+ * holding buffers, attempt to queue this
+ * frame for transmission at a later time.
+ */
+ if (info->tx_holding_count >= info->num_tx_holding_buffers ) {
+ /* no tx holding buffers available */
+ ret = 0;
+ goto cleanup;
+ }
+
+ /* queue transmit frame request */
+ ret = count;
+ if (from_user) {
+ down(&tmp_buf_sem);
+ COPY_FROM_USER(err,tmp_buf, buf, count);
+ if (err) {
+ if ( debug_level >= DEBUG_LEVEL_INFO )
+ printk( "%s(%d):mgsl_write(%s) sync user buf copy failed\n",
+ __FILE__,__LINE__,info->device_name);
+ ret = -EFAULT;
+ } else
+ save_tx_buffer_request(info,tmp_buf,count);
+ up(&tmp_buf_sem);
+ }
+ else
+ save_tx_buffer_request(info,buf,count);
+
+ /* if we have sufficient tx dma buffers,
+ * load the next buffered tx request
+ */
+ spin_lock_irqsave(&info->irq_spinlock,flags);
+ load_next_tx_holding_buffer(info);
+ spin_unlock_irqrestore(&info->irq_spinlock,flags);
+ goto cleanup;
X }
X
X /* if operating in HDLC LoopMode and the adapter */
@@ -2058,8 +2192,7 @@
X /* transmit */
X
X if ( (info->params.flags & HDLC_FLAG_HDLC_LOOPMODE) &&
- !usc_loopmode_active(info) )
- {
+ !usc_loopmode_active(info) ) {
X ret = 0;
X goto cleanup;
X }
@@ -2186,7 +2319,8 @@
X printk("%s(%d):mgsl_write_room(%s)=%d\n",
X __FILE__,__LINE__, info->device_name,ret );
X
- if ( info->params.mode == MGSL_MODE_HDLC ) {
+ if ( info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW ) {
X /* operating in synchronous (frame oriented) mode */
X if ( info->tx_active )
X return 0;
@@ -2220,10 +2354,12 @@
X printk("%s(%d):mgsl_chars_in_buffer(%s)=%d\n",
X __FILE__,__LINE__, info->device_name,info->xmit_cnt );
X
- if ( info->params.mode == MGSL_MODE_HDLC ) {
+ if ( info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW ) {
X /* operating in synchronous (frame oriented) mode */
- if ( info->tx_active )
- return info->tx_buffer_list[0].rcc;
+ if ( info->tx_active ) {
+ return info->max_frame_size;
+ }
X else
X return 0;
X }
@@ -2613,11 +2749,11 @@
X unsigned long flags;
X int s;
X int rc=0;
- u16 regval;
X struct mgsl_icount cprev, cnow;
- int events = 0;
+ int events;
X int mask;
- struct _input_signal_events signal_events_prev, signal_events_now;
+ struct _input_signal_events oldsigs, newsigs;
+ DECLARE_WAITQUEUE(wait, current);
X
X COPY_FROM_USER(rc,&mask, mask_ptr, sizeof(int));
X if (rc) {
@@ -2630,114 +2766,99 @@
X
X spin_lock_irqsave(&info->irq_spinlock,flags);
X
+ /* return immediately if state matches requested events */
X usc_get_serial_signals(info);
X s = info->serial_signals;
+ events = mask &
+ ( ((s & SerialSignal_DSR) ? MgslEvent_DsrActive:MgslEvent_DsrInactive) +
+ ((s & SerialSignal_DCD) ? MgslEvent_DcdActive:MgslEvent_DcdInactive) +
+ ((s & SerialSignal_CTS) ? MgslEvent_CtsActive:MgslEvent_CtsInactive) +
+ ((s & SerialSignal_RI) ? MgslEvent_RiActive :MgslEvent_RiInactive) );
+ if (events) {
+ spin_unlock_irqrestore(&info->irq_spinlock,flags);
+ goto exit;
+ }
X
- /* note the counters on entry */
+ /* save current irq counts */
X cprev = info->icount;
- signal_events_prev = info->input_signal_events;
+ oldsigs = info->input_signal_events;
X
- if (mask & MgslEvent_ExitHuntMode) {
- /* enable exit hunt mode IRQ */
- regval = usc_InReg(info,RICR);
- if (!(regval & RXSTATUS_EXITED_HUNT))
- usc_OutReg(info, RICR, regval | RXSTATUS_EXITED_HUNT);
+ /* enable hunt and idle irqs if needed */
+ if (mask & (MgslEvent_ExitHuntMode + MgslEvent_IdleReceived)) {
+ u16 oldreg = usc_InReg(info,RICR);
+ u16 newreg = oldreg +
+ (mask & MgslEvent_ExitHuntMode ? RXSTATUS_EXITED_HUNT:0) +
+ (mask & MgslEvent_IdleReceived ? RXSTATUS_IDLE_RECEIVED:0);
+ if (oldreg != newreg)
+ usc_OutReg(info, RICR, newreg);
X }
X
- if (mask & MgslEvent_IdleReceived) {
- /* enable idle mode received IRQ */
- regval = usc_InReg(info,RICR);
- if (!(regval & RXSTATUS_IDLE_RECEIVED))
- usc_OutReg(info, RICR, regval | RXSTATUS_IDLE_RECEIVED);
- }
+ set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue(&info->event_wait_q, &wait);
X
X spin_unlock_irqrestore(&info->irq_spinlock,flags);
X
- /* Determine if any user requested events for input signals is currently TRUE */
-
- events |= (mask & ((s & SerialSignal_DSR) ?
- MgslEvent_DsrActive:MgslEvent_DsrInactive));
-
- events |= (mask & ((s & SerialSignal_DCD) ?
- MgslEvent_DcdActive:MgslEvent_DcdInactive));
-
- events |= (mask & ((s & SerialSignal_CTS) ?
- MgslEvent_CtsActive:MgslEvent_CtsInactive));
-
- events |= (mask & ((s & SerialSignal_RI) ?
- MgslEvent_RiActive:MgslEvent_RiInactive));
X
-
- while(!events) {
- /* sleep until event occurs */
- interruptible_sleep_on(&info->event_wait_q);
-
- /* see if a signal woke us */
+ for(;;) {
+ schedule();
X if (signal_pending(current)) {
X rc = -ERESTARTSYS;
X break;
X }
X
+ /* get current irq counts */
X spin_lock_irqsave(&info->irq_spinlock,flags);
-
- /* get icount and serial signal states */
X cnow = info->icount;
- signal_events_now = info->input_signal_events;
+ newsigs = info->input_signal_events;
+ set_current_state(TASK_INTERRUPTIBLE);
X spin_unlock_irqrestore(&info->irq_spinlock,flags);
X
- if (signal_events_now.dsr_up != signal_events_prev.dsr_up &&
- mask & MgslEvent_DsrActive )
- events |= MgslEvent_DsrActive;
-
- if (signal_events_now.dsr_down != signal_events_prev.dsr_down &&
- mask & MgslEvent_DsrInactive )
- events |= MgslEvent_DsrInactive;
-
- if (signal_events_now.dcd_up != signal_events_prev.dcd_up &&
- mask & MgslEvent_DcdActive )
- events |= MgslEvent_DcdActive;
-
- if (signal_events_now.dcd_down != signal_events_prev.dcd_down &&
- mask & MgslEvent_DcdInactive )
- events |= MgslEvent_DcdInactive;
-
- if (signal_events_now.cts_up != signal_events_prev.cts_up &&
- mask & MgslEvent_CtsActive )
- events |= MgslEvent_CtsActive;
-
- if (signal_events_now.cts_down != signal_events_prev.cts_down &&
- mask & MgslEvent_CtsInactive )
- events |= MgslEvent_CtsInactive;
-
- if (signal_events_now.ri_up != signal_events_prev.ri_up &&
- mask & MgslEvent_RiActive )
- events |= MgslEvent_RiActive;
-
- if (signal_events_now.ri_down != signal_events_prev.ri_down &&
- mask & MgslEvent_RiInactive )
- events |= MgslEvent_RiInactive;
-
- if (cnow.exithunt != cprev.exithunt)
- events |= (mask & MgslEvent_ExitHuntMode);
+ /* if no change, wait aborted for some reason */
+ if (newsigs.dsr_up == oldsigs.dsr_up &&
+ newsigs.dsr_down == oldsigs.dsr_down &&
+ newsigs.dcd_up == oldsigs.dcd_up &&
+ newsigs.dcd_down == oldsigs.dcd_down &&
+ newsigs.cts_up == oldsigs.cts_up &&
+ newsigs.cts_down == oldsigs.cts_down &&
+ newsigs.ri_up == oldsigs.ri_up &&
+ newsigs.ri_down == oldsigs.ri_down &&
+ cnow.exithunt == cprev.exithunt &&
+ cnow.rxidle == cprev.rxidle) {
+ rc = -EIO;
+ break;
+ }
X
- if (cnow.rxidle != cprev.rxidle)
- events |= (mask & MgslEvent_IdleReceived);
+ events = mask &
+ ( (newsigs.dsr_up != oldsigs.dsr_up ? MgslEvent_DsrActive:0) +
+ (newsigs.dsr_down != oldsigs.dsr_down ? MgslEvent_DsrInactive:0) +
+ (newsigs.dcd_up != oldsigs.dcd_up ? MgslEvent_DcdActive:0) +
+ (newsigs.dcd_down != oldsigs.dcd_down ? MgslEvent_DcdInactive:0) +
+ (newsigs.cts_up != oldsigs.cts_up ? MgslEvent_CtsActive:0) +
+ (newsigs.cts_down != oldsigs.cts_down ? MgslEvent_CtsInactive:0) +
+ (newsigs.ri_up != oldsigs.ri_up ? MgslEvent_RiActive:0) +
+ (newsigs.ri_down != oldsigs.ri_down ? MgslEvent_RiInactive:0) +
+ (cnow.exithunt != cprev.exithunt ? MgslEvent_ExitHuntMode:0) +
+ (cnow.rxidle != cprev.rxidle ? MgslEvent_IdleReceived:0) );
+ if (events)
+ break;
X
X cprev = cnow;
- signal_events_prev = signal_events_now;
+ oldsigs = newsigs;
X }
X
+ remove_wait_queue(&info->event_wait_q, &wait);
+ set_current_state(TASK_RUNNING);
+
X if (mask & (MgslEvent_ExitHuntMode + MgslEvent_IdleReceived)) {
X spin_lock_irqsave(&info->irq_spinlock,flags);
X if (!waitqueue_active(&info->event_wait_q)) {
X /* disable enable exit hunt mode/idle rcvd IRQs */
- regval = usc_InReg(info,RICR);
- usc_OutReg(info, RICR, regval &
+ usc_OutReg(info, RICR, usc_InReg(info,RICR) &
X ~(RXSTATUS_EXITED_HUNT + RXSTATUS_IDLE_RECEIVED));
X }
X spin_unlock_irqrestore(&info->irq_spinlock,flags);
X }
-
+exit:
X if ( rc == 0 )
X PUT_USER(rc, events, mask_ptr);
X
@@ -2745,6 +2866,56 @@
X
X } /* end of mgsl_wait_event() */
X
+static int modem_input_wait(struct mgsl_struct *info,int arg)
+{
+ unsigned long flags;
+ int rc;
+ struct mgsl_icount cprev, cnow;
+ DECLARE_WAITQUEUE(wait, current);
+
+ /* save current irq counts */
+ spin_lock_irqsave(&info->irq_spinlock,flags);
+ cprev = info->icount;
+ add_wait_queue(&info->status_event_wait_q, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&info->irq_spinlock,flags);
+
+ for(;;) {
+ schedule();
+ if (signal_pending(current)) {
+ rc = -ERESTARTSYS;
+ break;
+ }
+
+ /* get new irq counts */
+ spin_lock_irqsave(&info->irq_spinlock,flags);
+ cnow = info->icount;
+ set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&info->irq_spinlock,flags);
+
+ /* if no change, wait aborted for some reason */
+ if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+ cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) {
+ rc = -EIO;
+ break;
+ }
+
+ /* check for change in caller specified modem input */
+ if ((arg & TIOCM_RNG && cnow.rng != cprev.rng) ||
+ (arg & TIOCM_DSR && cnow.dsr != cprev.dsr) ||
+ (arg & TIOCM_CD && cnow.dcd != cprev.dcd) ||
+ (arg & TIOCM_CTS && cnow.cts != cprev.cts)) {
+ rc = 0;
+ break;
+ }
+
+ cprev = cnow;
+ }
+ remove_wait_queue(&info->status_event_wait_q, &wait);
+ set_current_state(TASK_RUNNING);
+ return rc;
+}
+
X /* get_modem_info()
X *
X * Read the state of the serial control and
@@ -2912,7 +3083,7 @@
X int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigned long arg)
X {
X int error;
- struct mgsl_icount cprev, cnow; /* kernel counter temps */
+ struct mgsl_icount cnow; /* kernel counter temps */


X struct serial_icounter_struct *p_cuser; /* user space */

X unsigned long flags;
X

@@ -2947,37 +3118,12 @@
X while(MOD_IN_USE)
X MOD_DEC_USE_COUNT;
X return 0;
- /*
- * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
- * - mask passed in arg for lines of interest
- * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
- * Caller should use TIOCGICOUNT to see which one it was
+
+ /* Wait for modem input (DCD,RI,DSR,CTS) change
+ * as specified by mask in arg (TIOCM_RNG/DSR/CD/CTS)
X */
X case TIOCMIWAIT:
- spin_lock_irqsave(&info->irq_spinlock,flags);
- /* note the counters on entry */
- cprev = info->icount;
- spin_unlock_irqrestore(&info->irq_spinlock,flags);
- while (1) {
- interruptible_sleep_on(&info->status_event_wait_q);
- /* see if a signal did it */
- if (signal_pending(current))
- return -ERESTARTSYS;
- save_flags(flags); cli();
- cnow = info->icount; /* atomic copy */
- restore_flags(flags);
- if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
- cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
- return -EIO; /* no change => error */
- if ( ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
- ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
- ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
- ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
- return 0;
- }
- cprev = cnow;
- }
- /* NOTREACHED */
+ return modem_input_wait(info,(int)arg);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 13'
echo 'File patch-2.2.20 is continued in part 14'
echo "14" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:10 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part11

#!/bin/sh -x
# this is part 11 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 11; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&
+

+ global_cache_flush();
+
+ if (agp_bridge.type == ALI_M1541) {
+ pci_read_config_dword(agp_bridge.dev, ALI_CACHE_FLUSH_CTRL, &temp);
+ pci_write_config_dword(agp_bridge.dev, ALI_CACHE_FLUSH_CTRL,
+ (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
+ virt_to_phys((void *)pt)) |
+ ALI_CACHE_FLUSH_EN));
+ }

+
+ atomic_dec(&mem_map[MAP_NR(pt)].count);
+ clear_bit(PG_locked, &mem_map[MAP_NR(pt)].flags);
+ free_page((unsigned long) pt);
+ atomic_dec(&agp_bridge.current_memory_agp);
+}

X
X /* Setup function */
X static gatt_mask ali_generic_masks[] =
@@ -1949,13 +2074,15 @@
X agp_bridge.tlb_flush = ali_tlbflush;
X agp_bridge.mask_memory = ali_mask_memory;
X agp_bridge.agp_enable = agp_generic_agp_enable;
- agp_bridge.cache_flush = global_cache_flush;
+ agp_bridge.cache_flush = ali_cache_flush;
X agp_bridge.create_gatt_table = agp_generic_create_gatt_table;
X agp_bridge.free_gatt_table = agp_generic_free_gatt_table;
X agp_bridge.insert_memory = agp_generic_insert_memory;


X agp_bridge.remove_memory = agp_generic_remove_memory;
X agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
X agp_bridge.free_by_type = agp_generic_free_by_type;

+ agp_bridge.agp_alloc_page = ali_alloc_page;
+ agp_bridge.agp_destroy_page = ali_destroy_page;


X
X return 0;
X

@@ -1964,122 +2091,773 @@
X
X #endif /* CONFIG_AGP_ALI */
X
+#ifdef CONFIG_AGP_SWORKS
+typedef struct _serverworks_page_map {
+ unsigned long *real;
+ unsigned long *remapped;
+} serverworks_page_map;
X
-/* per-chipset initialization data.
- * note -- all chipsets for a single vendor MUST be grouped together
- */
-static struct {
- unsigned short device_id; /* first, to make table easier to read */
- unsigned short vendor_id;
- enum chipset_type chipset;
- const char *vendor_name;
- const char *chipset_name;
- int (*chipset_setup) (struct pci_dev *pdev);
-} agp_bridge_info[] __initdata = {
+static struct _serverworks_private {
+ struct pci_dev *svrwrks_dev; /* device one */
+ volatile u8 *registers;
+ serverworks_page_map **gatt_pages;
+ int num_tables;
+ serverworks_page_map scratch_dir;
X
-#ifdef CONFIG_AGP_ALI
- { PCI_DEVICE_ID_AL_M1541_0,
- PCI_VENDOR_ID_AL,
- ALI_M1541,
- "Ali",
- "M1541",
- ali_generic_setup },
- { 0,
- PCI_VENDOR_ID_AL,
- ALI_GENERIC,
- "Ali",
- "Generic",
- ali_generic_setup },
-#endif /* CONFIG_AGP_ALI */
+ int gart_addr_ofs;
+ int mm_addr_ofs;
+} serverworks_private;
X
-#ifdef CONFIG_AGP_AMD
- { PCI_DEVICE_ID_AMD_IRONGATE_0,
- PCI_VENDOR_ID_AMD,
- AMD_IRONGATE,
- "AMD",
- "Irongate",
- amd_irongate_setup },
- { 0,
- PCI_VENDOR_ID_AMD,
- AMD_GENERIC,
- "AMD",
- "Generic",
- amd_irongate_setup },
-#endif /* CONFIG_AGP_AMD */
+static int serverworks_create_page_map(serverworks_page_map *page_map)
+{
+ int i;
X
-#ifdef CONFIG_AGP_INTEL
- { PCI_DEVICE_ID_INTEL_82443LX_0,
- PCI_VENDOR_ID_INTEL,
- INTEL_LX,
- "Intel",
- "440LX",
- intel_generic_setup },
- { PCI_DEVICE_ID_INTEL_82443BX_0,
- PCI_VENDOR_ID_INTEL,
- INTEL_BX,
- "Intel",
- "440BX",
- intel_generic_setup },
- { PCI_DEVICE_ID_INTEL_82443GX_0,
- PCI_VENDOR_ID_INTEL,
- INTEL_GX,
- "Intel",
- "440GX",
- intel_generic_setup },
- /* could we add support for PCI_DEVICE_ID_INTEL_815_1 too ? */
- { PCI_DEVICE_ID_INTEL_815_0,
- PCI_VENDOR_ID_INTEL,
- INTEL_I815,
- "Intel",
- "i815",
- intel_generic_setup },
- { PCI_DEVICE_ID_INTEL_840_0,
- PCI_VENDOR_ID_INTEL,
- INTEL_I840,
- "Intel",
- "i840",
- intel_840_setup },
- { 0,
- PCI_VENDOR_ID_INTEL,
- INTEL_GENERIC,
- "Intel",
- "Generic",
- intel_generic_setup },
-#endif /* CONFIG_AGP_INTEL */
+ page_map->real = (unsigned long *) __get_free_page(GFP_KERNEL);
+ if (page_map->real == NULL) {
+ return -ENOMEM;
+ }
+ set_bit(PG_reserved, &mem_map[MAP_NR(page_map->real)].flags);
+ CACHE_FLUSH();
+ page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real),
+ PAGE_SIZE);
+ if (page_map->remapped == NULL) {
+ clear_bit(PG_reserved,
+ &mem_map[MAP_NR(page_map->real)].flags);
+ free_page((unsigned long) page_map->real);
+ page_map->real = NULL;
+ return -ENOMEM;
+ }
+ CACHE_FLUSH();
X
-#ifdef CONFIG_AGP_SIS
- { PCI_DEVICE_ID_SI_630,
- PCI_VENDOR_ID_SI,
- SIS_GENERIC,
- "SiS",
- "630",
- sis_generic_setup },
- { PCI_DEVICE_ID_SI_540,
- PCI_VENDOR_ID_SI,
- SIS_GENERIC,
- "SiS",
- "540",
- sis_generic_setup },
- { PCI_DEVICE_ID_SI_620,
- PCI_VENDOR_ID_SI,
- SIS_GENERIC,
- "SiS",
- "620",
- sis_generic_setup },
- { PCI_DEVICE_ID_SI_530,
- PCI_VENDOR_ID_SI,
- SIS_GENERIC,
- "SiS",
- "530",
- sis_generic_setup },
- { PCI_DEVICE_ID_SI_630,
- PCI_VENDOR_ID_SI,
- SIS_GENERIC,
- "SiS",
- "Generic",
- sis_generic_setup },
- { PCI_DEVICE_ID_SI_540,
- PCI_VENDOR_ID_SI,
+ for(i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
+ page_map->remapped[i] = agp_bridge.scratch_page;
+ }
+


+ return 0;
+}
+

+static void serverworks_free_page_map(serverworks_page_map *page_map)
+{
+ iounmap(page_map->remapped);
+ clear_bit(PG_reserved,
+ &mem_map[MAP_NR(page_map->real)].flags);
+ free_page((unsigned long) page_map->real);
+}
+
+static void serverworks_free_gatt_pages(void)
+{
+ int i;
+ serverworks_page_map **tables;
+ serverworks_page_map *entry;
+
+ tables = serverworks_private.gatt_pages;
+ for(i = 0; i < serverworks_private.num_tables; i++) {
+ entry = tables[i];
+ if (entry != NULL) {
+ if (entry->real != NULL) {
+ serverworks_free_page_map(entry);
+ }
+ kfree(entry);
+ }
+ }
+ kfree(tables);
+}
+
+static int serverworks_create_gatt_pages(int nr_tables)
+{
+ serverworks_page_map **tables;
+ serverworks_page_map *entry;
+ int retval = 0;
+ int i;
+
+ tables = kmalloc((nr_tables + 1) * sizeof(serverworks_page_map *),
+ GFP_KERNEL);
+ if (tables == NULL) {
+ return -ENOMEM;
+ }
+ memset(tables, 0, sizeof(serverworks_page_map *) * (nr_tables + 1));
+ for (i = 0; i < nr_tables; i++) {
+ entry = kmalloc(sizeof(serverworks_page_map), GFP_KERNEL);
+ if (entry == NULL) {
+ retval = -ENOMEM;
+ break;
+ }
+ memset(entry, 0, sizeof(serverworks_page_map));
+ tables[i] = entry;
+ retval = serverworks_create_page_map(entry);
+ if (retval != 0) break;
+ }
+ serverworks_private.num_tables = nr_tables;
+ serverworks_private.gatt_pages = tables;
+
+ if (retval != 0) serverworks_free_gatt_pages();
+
+ return retval;
+}
+
+#define SVRWRKS_GET_GATT(addr) (serverworks_private.gatt_pages[\
+ GET_PAGE_DIR_IDX(addr)]->remapped)
+
+#ifndef GET_PAGE_DIR_OFF
+#define GET_PAGE_DIR_OFF(addr) (addr >> 22)
+#endif
+
+#ifndef GET_PAGE_DIR_IDX
+#define GET_PAGE_DIR_IDX(addr) (GET_PAGE_DIR_OFF(addr) - \
+ GET_PAGE_DIR_OFF(agp_bridge.gart_bus_addr))
+#endif
+
+#ifndef GET_GATT_OFF
+#define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12)
+#endif
+
+static int serverworks_create_gatt_table(void)
+{
+ aper_size_info_lvl2 *value;
+ serverworks_page_map page_dir;
+ int retval;
+ u32 temp;
+ int i;
+
+ value = A_SIZE_LVL2(agp_bridge.current_size);
+ retval = serverworks_create_page_map(&page_dir);
+ if (retval != 0) {
+ return retval;
+ }
+ retval = serverworks_create_page_map(&serverworks_private.scratch_dir);
+ if (retval != 0) {
+ serverworks_free_page_map(&page_dir);
+ return retval;
+ }
+ /* Create a fake scratch directory */
+ for(i = 0; i < 1024; i++) {
+ serverworks_private.scratch_dir.remapped[i] = (unsigned long) agp_bridge.scratch_page;
+ page_dir.remapped[i] =
+ virt_to_bus(serverworks_private.scratch_dir.real);
+ page_dir.remapped[i] |= 0x00000001;
+ }
+
+ retval = serverworks_create_gatt_pages(value->num_entries / 1024);
+ if (retval != 0) {
+ serverworks_free_page_map(&page_dir);
+ return retval;
+ }
+
+ agp_bridge.gatt_table_real = page_dir.real;
+ agp_bridge.gatt_table = page_dir.remapped;
+ agp_bridge.gatt_bus_addr = virt_to_bus(page_dir.real);
+
+ /* Get the address for the gart region.
+ * This is a bus address even on the alpha, b/c its
+ * used to program the agp master not the cpu


+ */
+
+ pci_read_config_dword(agp_bridge.dev,

+ serverworks_private.gart_addr_ofs,
+ &temp);


+ agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);

+
+ /* Calculate the agp offset */
+
+ for(i = 0; i < value->num_entries / 1024; i++) {
+ page_dir.remapped[i] =
+ virt_to_bus(serverworks_private.gatt_pages[i]->real);
+ page_dir.remapped[i] |= 0x00000001;
+ }
+


+ return 0;
+}
+

+static int serverworks_free_gatt_table(void)
+{
+ serverworks_page_map page_dir;
+
+ page_dir.real = agp_bridge.gatt_table_real;
+ page_dir.remapped = agp_bridge.gatt_table;
+
+ serverworks_free_gatt_pages();
+ serverworks_free_page_map(&page_dir);


+ return 0;
+}
+

+static int serverworks_fetch_size(void)
+{
+ int i;
+ u32 temp;
+ u32 temp2;
+ aper_size_info_lvl2 *values;
+
+ values = A_SIZE_LVL2(agp_bridge.aperture_sizes);
+ pci_read_config_dword(agp_bridge.dev,
+ serverworks_private.gart_addr_ofs,
+ &temp);
+ pci_write_config_dword(agp_bridge.dev,
+ serverworks_private.gart_addr_ofs,
+ 0xfe000000);
+ pci_read_config_dword(agp_bridge.dev,
+ serverworks_private.gart_addr_ofs,
+ &temp2);
+ pci_write_config_dword(agp_bridge.dev,
+ serverworks_private.gart_addr_ofs,
+ temp);
+ temp2 &= SVWRKS_SIZE_MASK;
+
+ for (i = 0; i < agp_bridge.num_aperture_sizes; i++) {
+ if (temp2 == values[i].size_value) {
+ agp_bridge.previous_size =
+ agp_bridge.current_size = (void *) (values + i);
+
+ agp_bridge.aperture_size_idx = i;
+ return values[i].size;
+ }
+ }
+


+ return 0;
+}
+

+static int serverworks_configure(void)
+{
+ aper_size_info_lvl2 *current_size;
+ u32 temp;
+ u8 enable_reg;
+ u8 cap_ptr;
+ u32 cap_id;
+ u16 cap_reg;
+
+ current_size = A_SIZE_LVL2(agp_bridge.current_size);
+
+ /* Get the memory mapped registers */
+ pci_read_config_dword(agp_bridge.dev,
+ serverworks_private.mm_addr_ofs,
+ &temp);
+ temp = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+ serverworks_private.registers = (volatile u8 *) ioremap(temp, 4096);
+
+ OUTREG8(serverworks_private.registers, SVWRKS_GART_CACHE, 0x0a);
+
+ OUTREG32(serverworks_private.registers, SVWRKS_GATTBASE,
+ agp_bridge.gatt_bus_addr);
+
+ cap_reg = INREG16(serverworks_private.registers, SVWRKS_COMMAND);
+ cap_reg &= ~0x0007;
+ cap_reg |= 0x4;
+ OUTREG16(serverworks_private.registers, SVWRKS_COMMAND, cap_reg);
+
+ pci_read_config_byte(serverworks_private.svrwrks_dev,
+ SVWRKS_AGP_ENABLE, &enable_reg);
+ enable_reg |= 0x1; /* Agp Enable bit */
+ pci_write_config_byte(serverworks_private.svrwrks_dev,
+ SVWRKS_AGP_ENABLE, enable_reg);
+ agp_bridge.tlb_flush(NULL);
+
+ pci_read_config_byte(serverworks_private.svrwrks_dev, 0x34, &cap_ptr);
+ if (cap_ptr != 0x00) {
+ do {
+ pci_read_config_dword(serverworks_private.svrwrks_dev,
+ cap_ptr, &cap_id);
+
+ if ((cap_id & 0xff) != 0x02)
+ cap_ptr = (cap_id >> 8) & 0xff;
+ }
+ while (((cap_id & 0xff) != 0x02) && (cap_ptr != 0x00));
+ }
+ agp_bridge.capndx = cap_ptr;
+
+ /* Fill in the mode register */
+ pci_read_config_dword(serverworks_private.svrwrks_dev,
+ agp_bridge.capndx + 4,
+ &agp_bridge.mode);
+
+ pci_read_config_byte(agp_bridge.dev,
+ SVWRKS_CACHING,
+ &enable_reg);
+ enable_reg &= ~0x3;
+ pci_write_config_byte(agp_bridge.dev,
+ SVWRKS_CACHING,
+ enable_reg);
+
+ pci_read_config_byte(agp_bridge.dev,
+ SVWRKS_FEATURE,
+ &enable_reg);
+ enable_reg |= (1<<6);
+ pci_write_config_byte(agp_bridge.dev,
+ SVWRKS_FEATURE,
+ enable_reg);
+


+ return 0;
+}
+

+static void serverworks_cleanup(void)
+{
+ iounmap((void *) serverworks_private.registers);
+}
+
+/*
+ * This routine could be implemented by taking the addresses
+ * written to the GATT, and flushing them individually. However
+ * currently it just flushes the whole table. Which is probably
+ * more efficent, since agp_memory blocks can be a large number of
+ * entries.
+ */
+
+static void serverworks_tlbflush(agp_memory * temp)
+{
+ unsigned long end;
+
+ OUTREG8(serverworks_private.registers, SVWRKS_POSTFLUSH, 0x01);
+ end = jiffies + 3*HZ;
+ while(INREG8(serverworks_private.registers,
+ SVWRKS_POSTFLUSH) == 0x01) {
+ if((signed)(end - jiffies) <= 0) {
+ printk(KERN_ERR "Posted write buffer flush took more"
+ "then 3 seconds\n");
+ }
+ }
+ OUTREG32(serverworks_private.registers, SVWRKS_DIRFLUSH, 0x00000001);
+ end = jiffies + 3*HZ;
+ while(INREG32(serverworks_private.registers,
+ SVWRKS_DIRFLUSH) == 0x00000001) {
+ if((signed)(end - jiffies) <= 0) {
+ printk(KERN_ERR "TLB flush took more"
+ "then 3 seconds\n");
+ }
+ }
+}
+
+static unsigned long serverworks_mask_memory(unsigned long addr, int type)
+{
+ /* Only type 0 is supported by the serverworks chipsets */
+
+ return addr | agp_bridge.masks[0].mask;
+}
+
+static int serverworks_insert_memory(agp_memory * mem,
+ off_t pg_start, int type)
+{
+ int i, j, num_entries;
+ unsigned long *cur_gatt;
+ unsigned long addr;
+
+ num_entries = A_SIZE_LVL2(agp_bridge.current_size)->num_entries;
+
+ if (type != 0 || mem->type != 0) {
+ return -EINVAL;
+ }
+ if ((pg_start + mem->page_count) > num_entries) {


+ return -EINVAL;
+ }
+

+ j = pg_start;
+ while (j < (pg_start + mem->page_count)) {
+ addr = (j * PAGE_SIZE) + agp_bridge.gart_bus_addr;
+ cur_gatt = SVRWRKS_GET_GATT(addr);
+ if (!PGE_EMPTY(cur_gatt[GET_GATT_OFF(addr)])) {
+ return -EBUSY;
+ }
+ j++;
+ }
+
+ if (mem->is_flushed == FALSE) {
+ CACHE_FLUSH();
+ mem->is_flushed = TRUE;
+ }
+
+ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
+ addr = (j * PAGE_SIZE) + agp_bridge.gart_bus_addr;
+ cur_gatt = SVRWRKS_GET_GATT(addr);
+ cur_gatt[GET_GATT_OFF(addr)] = mem->memory[i];
+ }
+ agp_bridge.tlb_flush(mem);


+ return 0;
+}
+

+static int serverworks_remove_memory(agp_memory * mem, off_t pg_start,
+ int type)
+{
+ int i;
+ unsigned long *cur_gatt;
+ unsigned long addr;
+
+ if (type != 0 || mem->type != 0) {


+ return -EINVAL;
+ }
+

+ CACHE_FLUSH();
+ agp_bridge.tlb_flush(mem);
+
+ for (i = pg_start; i < (mem->page_count + pg_start); i++) {
+ addr = (i * PAGE_SIZE) + agp_bridge.gart_bus_addr;
+ cur_gatt = SVRWRKS_GET_GATT(addr);
+ cur_gatt[GET_GATT_OFF(addr)] =
+ (unsigned long) agp_bridge.scratch_page;
+ }
+
+ agp_bridge.tlb_flush(mem);


+ return 0;
+}
+

+static gatt_mask serverworks_masks[] =
+{
+ {0x00000001, 0}
+};
+
+static aper_size_info_lvl2 serverworks_sizes[7] =
+{
+ {2048, 524288, 0x80000000},
+ {1024, 262144, 0xc0000000},
+ {512, 131072, 0xe0000000},
+ {256, 65536, 0xf0000000},
+ {128, 32768, 0xf8000000},
+ {64, 16384, 0xfc000000},
+ {32, 8192, 0xfe000000}
+};
+
+static void serverworks_agp_enable(u32 mode)
+{
+ struct pci_dev *device = NULL;
+ u32 command, scratch, cap_id;
+ u8 cap_ptr;
+
+ pci_read_config_dword(serverworks_private.svrwrks_dev,
+ agp_bridge.capndx + 4,
+ &command);
+
+ /*
+ * PASS1: go throu all devices that claim to be
+ * AGP devices and collect their data.
+ */
+
+ while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+ device)) != NULL) {
+ pci_read_config_dword(device, 0x04, &scratch);
+
+ if (!(scratch & 0x00100000))
+ continue;
+
+ pci_read_config_byte(device, 0x34, &cap_ptr);
+
+ if (cap_ptr != 0x00) {
+ do {
+ pci_read_config_dword(device,
+ cap_ptr, &cap_id);
+
+ if ((cap_id & 0xff) != 0x02)
+ cap_ptr = (cap_id >> 8) & 0xff;
+ }
+ while (((cap_id & 0xff) != 0x02) && (cap_ptr != 0x00));
+ }
+ if (cap_ptr != 0x00) {
+ /*
+ * Ok, here we have a AGP device. Disable impossible
+ * settings, and adjust the readqueue to the minimum.
+ */
+
+ pci_read_config_dword(device, cap_ptr + 4, &scratch);
+
+ /* adjust RQ depth */
+ command =
+ ((command & ~0xff000000) |
+ min((mode & 0xff000000),
+ min((command & 0xff000000),
+ (scratch & 0xff000000))));
+
+ /* disable SBA if it's not supported */
+ if (!((command & 0x00000200) &&
+ (scratch & 0x00000200) &&
+ (mode & 0x00000200)))
+ command &= ~0x00000200;
+
+ /* disable FW */
+ command &= ~0x00000010;
+
+ command &= ~0x00000008;
+
+ if (!((command & 4) &&
+ (scratch & 4) &&
+ (mode & 4)))
+ command &= ~0x00000004;
+
+ if (!((command & 2) &&
+ (scratch & 2) &&
+ (mode & 2)))
+ command &= ~0x00000002;
+
+ if (!((command & 1) &&
+ (scratch & 1) &&
+ (mode & 1)))
+ command &= ~0x00000001;
+ }
+ }
+ /*
+ * PASS2: Figure out the 4X/2X/1X setting and enable the
+ * target (our motherboard chipset).
+ */
+
+ if (command & 4) {
+ command &= ~3; /* 4X */
+ }
+ if (command & 2) {
+ command &= ~5; /* 2X */
+ }
+ if (command & 1) {
+ command &= ~6; /* 1X */
+ }
+ command |= 0x00000100;
+
+ pci_write_config_dword(serverworks_private.svrwrks_dev,
+ agp_bridge.capndx + 8,
+ command);
+
+ /*
+ * PASS3: Go throu all AGP devices and update the
+ * command registers.
+ */
+
+ while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+ device)) != NULL) {
+ pci_read_config_dword(device, 0x04, &scratch);
+
+ if (!(scratch & 0x00100000))
+ continue;
+
+ pci_read_config_byte(device, 0x34, &cap_ptr);
+
+ if (cap_ptr != 0x00) {
+ do {
+ pci_read_config_dword(device,
+ cap_ptr, &cap_id);
+
+ if ((cap_id & 0xff) != 0x02)
+ cap_ptr = (cap_id >> 8) & 0xff;
+ }
+ while (((cap_id & 0xff) != 0x02) && (cap_ptr != 0x00));
+ }
+ if (cap_ptr != 0x00)
+ pci_write_config_dword(device, cap_ptr + 8, command);
+ }
+}
+
+static int __init serverworks_setup (struct pci_dev *pdev)
+{
+ u32 temp;
+ u32 temp2;
+
+ serverworks_private.svrwrks_dev = pdev;
+
+ agp_bridge.masks = serverworks_masks;
+ agp_bridge.num_of_masks = 1;
+ agp_bridge.aperture_sizes = (void *) serverworks_sizes;
+ agp_bridge.size_type = LVL2_APER_SIZE;
+ agp_bridge.num_aperture_sizes = 7;
+ agp_bridge.dev_private_data = (void *) &serverworks_private;
+ agp_bridge.needs_scratch_page = TRUE;
+ agp_bridge.configure = serverworks_configure;
+ agp_bridge.fetch_size = serverworks_fetch_size;
+ agp_bridge.cleanup = serverworks_cleanup;
+ agp_bridge.tlb_flush = serverworks_tlbflush;
+ agp_bridge.mask_memory = serverworks_mask_memory;
+ agp_bridge.agp_enable = serverworks_agp_enable;
+ agp_bridge.cache_flush = global_cache_flush;
+ agp_bridge.create_gatt_table = serverworks_create_gatt_table;
+ agp_bridge.free_gatt_table = serverworks_free_gatt_table;
+ agp_bridge.insert_memory = serverworks_insert_memory;
+ agp_bridge.remove_memory = serverworks_remove_memory;
+ agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
+ agp_bridge.free_by_type = agp_generic_free_by_type;


+ agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+ agp_bridge.agp_destroy_page = agp_generic_destroy_page;
+

+ pci_read_config_dword(agp_bridge.dev,
+ SVWRKS_APSIZE,
+ &temp);
+
+ serverworks_private.gart_addr_ofs = 0x10;
+
+ if(temp & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ pci_read_config_dword(agp_bridge.dev,
+ SVWRKS_APSIZE + 4,
+ &temp2);
+ if(temp2 != 0) {
+ printk("Detected 64 bit aperture address, but top "
+ "bits are not zero. Disabling agp\n");
+ return -ENODEV;
+ }
+ serverworks_private.mm_addr_ofs = 0x18;
+ } else {
+ serverworks_private.mm_addr_ofs = 0x14;
+ }
+
+ pci_read_config_dword(agp_bridge.dev,
+ serverworks_private.mm_addr_ofs,
+ &temp);
+ if(temp & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ pci_read_config_dword(agp_bridge.dev,
+ serverworks_private.mm_addr_ofs + 4,
+ &temp2);
+ if(temp2 != 0) {
+ printk("Detected 64 bit MMIO address, but top "
+ "bits are not zero. Disabling agp\n");


+ return -ENODEV;
+ }
+ }
+

+ return 0;
+}
+

+#endif /* CONFIG_AGP_SWORKS */
+
+
+/* per-chipset initialization data.
+ * note -- all chipsets for a single vendor MUST be grouped together
+ */
+static struct {
+ unsigned short device_id; /* first, to make table easier to read */
+ unsigned short vendor_id;
+ enum chipset_type chipset;
+ const char *vendor_name;
+ const char *chipset_name;
+ int (*chipset_setup) (struct pci_dev *pdev);
+} agp_bridge_info[] __initdata = {
+
+#ifdef CONFIG_AGP_ALI
+ { PCI_DEVICE_ID_AL_M1541_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1541,
+ "Ali",
+ "M1541",
+ ali_generic_setup },
+ { PCI_DEVICE_ID_AL_M1621_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1621,
+ "Ali",
+ "M1621",
+ ali_generic_setup },
+ { PCI_DEVICE_ID_AL_M1631_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1631,
+ "Ali",
+ "M1631",
+ ali_generic_setup },
+ { PCI_DEVICE_ID_AL_M1632_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1632,
+ "Ali",
+ "M1632",
+ ali_generic_setup },
+ { PCI_DEVICE_ID_AL_M1641_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1641,
+ "Ali",
+ "M1641",
+ ali_generic_setup },
+ { PCI_DEVICE_ID_AL_M1647_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1647,
+ "Ali",
+ "M1647",
+ ali_generic_setup },
+ { PCI_DEVICE_ID_AL_M1651_0,
+ PCI_VENDOR_ID_AL,
+ ALI_M1651,
+ "Ali",
+ "M1651",
+ ali_generic_setup },
+ { 0,
+ PCI_VENDOR_ID_AL,
+ ALI_GENERIC,
+ "Ali",
+ "Generic",
+ ali_generic_setup },
+#endif /* CONFIG_AGP_ALI */
+
+#ifdef CONFIG_AGP_AMD
+ { PCI_DEVICE_ID_AMD_IRONGATE_0,
+ PCI_VENDOR_ID_AMD,
+ AMD_IRONGATE,
+ "AMD",
+ "Irongate",
+ amd_irongate_setup },
+ { 0,
+ PCI_VENDOR_ID_AMD,
+ AMD_GENERIC,
+ "AMD",
+ "Generic",
+ amd_irongate_setup },
+#endif /* CONFIG_AGP_AMD */
+
+#ifdef CONFIG_AGP_INTEL
+ { PCI_DEVICE_ID_INTEL_82443LX_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_LX,
+ "Intel",
+ "440LX",
+ intel_generic_setup },
+ { PCI_DEVICE_ID_INTEL_82443BX_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_BX,
+ "Intel",
+ "440BX",
+ intel_generic_setup },
+ { PCI_DEVICE_ID_INTEL_82443GX_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_GX,
+ "Intel",
+ "440GX",
+ intel_generic_setup },
+ /* could we add support for PCI_DEVICE_ID_INTEL_815_1 too ? */
+ { PCI_DEVICE_ID_INTEL_815_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_I815,
+ "Intel",
+ "i815",
+ intel_generic_setup },
+ { PCI_DEVICE_ID_INTEL_840_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_I840,
+ "Intel",
+ "i840",
+ intel_840_setup },
+ { 0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_GENERIC,
+ "Intel",
+ "Generic",
+ intel_generic_setup },
+#endif /* CONFIG_AGP_INTEL */
+
+#ifdef CONFIG_AGP_SIS
+ { PCI_DEVICE_ID_SI_630,
+ PCI_VENDOR_ID_SI,
+ SIS_GENERIC,
+ "SiS",
+ "630",
+ sis_generic_setup },
+ { PCI_DEVICE_ID_SI_540,
+ PCI_VENDOR_ID_SI,
+ SIS_GENERIC,
+ "SiS",
+ "540",
+ sis_generic_setup },
+ { PCI_DEVICE_ID_SI_620,
+ PCI_VENDOR_ID_SI,
+ SIS_GENERIC,
+ "SiS",
+ "620",
+ sis_generic_setup },
+ { PCI_DEVICE_ID_SI_530,
+ PCI_VENDOR_ID_SI,
+ SIS_GENERIC,
+ "SiS",
+ "530",
+ sis_generic_setup },
+ { PCI_DEVICE_ID_SI_630,
+ PCI_VENDOR_ID_SI,
+ SIS_GENERIC,
+ "SiS",
+ "Generic",
+ sis_generic_setup },
+ { PCI_DEVICE_ID_SI_540,
+ PCI_VENDOR_ID_SI,
X SIS_GENERIC,
X "SiS",
X "Generic",
@@ -2170,6 +2948,35 @@
X while ((i < arraysize (agp_bridge_info)) &&
X (agp_bridge_info[i].vendor_id == pdev->vendor)) {
X if (pdev->device == agp_bridge_info[i].device_id) {
+#ifdef CONFIG_AGP_ALI
+ if (pdev->device == PCI_DEVICE_ID_AL_M1621_0) {
+ u8 hidden_1621_id;
+
+ pci_read_config_byte(pdev, 0xFB, &hidden_1621_id);
+ switch (hidden_1621_id) {
+ case 0x31:
+ agp_bridge_info[i].chipset_name="M1631";
+ break;
+ case 0x32:
+ agp_bridge_info[i].chipset_name="M1632";
+ break;
+ case 0x41:
+ agp_bridge_info[i].chipset_name="M1641";
+ break;
+ case 0x43:
+ break;
+ case 0x47:
+ agp_bridge_info[i].chipset_name="M1647";
+ break;
+ case 0x51:
+ agp_bridge_info[i].chipset_name="M1651";


+ break;
+ default:
+ break;
+ }
+ }

+#endif
+
X printk (KERN_INFO PFX "Detected %s %s chipset\n",
X agp_bridge_info[i].vendor_name,
X agp_bridge_info[i].chipset_name);
@@ -2275,7 +3082,8 @@
X if (i810_dev == NULL) {
X printk(KERN_ERR PFX "agpgart: Detected an "
X "Intel i815, but could not find the"
- " secondary device.\n");
+ " secondary device. Assuming a "
+ "non-integrated video card.\n");
X agp_bridge.type = NOT_SUPPORTED;
X return -ENODEV;
X }
@@ -2290,6 +3098,41 @@
X }
X #endif /* CONFIG_AGP_I810 */
X
+#ifdef CONFIG_AGP_SWORKS
+ /* Everything is on func 1 here so we are hardcoding function one */
+ if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS) {
+ struct pci_dev *bridge_dev;
+
+ bridge_dev = pci_find_slot ((unsigned int)dev->bus->number,
+ PCI_DEVFN(0, 1));
+ if(bridge_dev == NULL) {
+ printk(KERN_INFO PFX "agpgart: Detected a Serverworks "
+ "Chipset, but could not find the secondary "
+ "device.\n");


+ return -ENODEV;
+ }
+

+ switch (dev->device) {
+ case PCI_DEVICE_ID_SERVERWORKS_HE:
+ agp_bridge.type = SVWRKS_HE;
+ return serverworks_setup(bridge_dev);
+
+ case PCI_DEVICE_ID_SERVERWORKS_LE:
+ case 0x0007:
+ agp_bridge.type = SVWRKS_LE;
+ return serverworks_setup(bridge_dev);
+
+ default:
+ if(agp_try_unsupported) {
+ agp_bridge.type = SVWRKS_GENERIC;
+ return serverworks_setup(bridge_dev);
+ }


+ break;
+ }
+ }
+

+#endif /* CONFIG_AGP_SWORKS */
+
X /* find capndx */
X pci_read_config_dword(dev, 0x04, &scratch);
X if (!(scratch & 0x00100000))
@@ -2385,7 +3228,7 @@
X }
X
X if (agp_bridge.needs_scratch_page == TRUE) {
- agp_bridge.scratch_page = agp_alloc_page();
+ agp_bridge.scratch_page = agp_bridge.agp_alloc_page();
X
X if (agp_bridge.scratch_page == 0) {
X printk(KERN_ERR PFX "unable to get memory for "
@@ -2438,7 +3281,7 @@
X err_out:
X if (agp_bridge.needs_scratch_page == TRUE) {
X agp_bridge.scratch_page &= ~(0x00000fff);


- agp_destroy_page((unsigned long)
+ agp_bridge.agp_destroy_page((unsigned long)

X phys_to_virt(agp_bridge.scratch_page));
X }
X if (got_gatt)


@@ -2458,7 +3301,7 @@
X

X if (agp_bridge.needs_scratch_page == TRUE) {
X agp_bridge.scratch_page &= ~(0x00000fff);


- agp_destroy_page((unsigned long)
+ agp_bridge.agp_destroy_page((unsigned long)

X phys_to_virt(agp_bridge.scratch_page));
X }
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/agp/agpgart_fe.c linux/drivers/char/agp/agpgart_fe.c
--- v2.2.19/drivers/char/agp/agpgart_fe.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/agp/agpgart_fe.c Wed Oct 10 01:40:45 2001
@@ -840,6 +840,9 @@
X if (copy_from_user(&reserve, (void *) arg, sizeof(agp_region))) {
X return -EFAULT;
X }
+ if ((unsigned) reserve.seg_count >= ~0U/sizeof(agp_segment))
+ return -EFAULT;
+
X client = agp_find_client_by_pid(reserve.pid);
X
X if (reserve.seg_count == 0) {
@@ -860,6 +863,9 @@
X } else {
X agp_segment *segment;
X
+ if (reserve.seg_count >= 16384)
+ return -EINVAL;
+
X segment = kmalloc((sizeof(agp_segment) * reserve.seg_count),
X GFP_KERNEL);
X
@@ -867,7 +873,7 @@
X return -ENOMEM;
X }
X if (copy_from_user(segment, (void *) reserve.seg_list,
- GFP_KERNEL)) {
+ sizeof(agp_segment) * reserve.seg_count)) {
X kfree(segment);
X return -EFAULT;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/atari_SCC.README linux/drivers/char/atari_SCC.README
--- v2.2.19/drivers/char/atari_SCC.README Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/atari_SCC.README Wed Oct 10 01:40:45 2001
@@ -96,7 +96,7 @@
X
X If you should see a message like:
X
-Sep 26 10:39:32 zaphod kernel: SCC-A: DMA-INT occured, data lost!
+Sep 26 10:39:32 zaphod kernel: SCC-A: DMA-INT occurred, data lost!
X
X that means that the timer routine itself has been delayed so long that the DMA
X counter went to zero already. There's not very much to do about this, because
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/atari_SCC.c linux/drivers/char/atari_SCC.c
--- v2.2.19/drivers/char/atari_SCC.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/atari_SCC.c Wed Oct 10 01:40:45 2001
@@ -1453,11 +1453,11 @@
X }
X
X
-/* DMA finished before timer occured?
+/* DMA finished before timer occurred?
X */
X static void SCC_dma_int (int irq, void *data, struct pt_regs *fp)
X {
- printk ("SCC-A: DMA-INT occured, data lost!\n");
+ printk ("SCC-A: DMA-INT occurred, data lost!\n");
X #if 0
X /* is there any reason why we should call this? if the timer INT was
X * delayed so long that this happened then this INT was delayed too, so
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/bttv.c linux/drivers/char/bttv.c
--- v2.2.19/drivers/char/bttv.c Sun Mar 25 17:31:25 2001
+++ linux/drivers/char/bttv.c Wed Oct 10 01:40:45 2001
@@ -1979,7 +1979,9 @@
X vfree(vcp);
X return -EFAULT;
X }
- } else if (vw.clipcount) {
+ } else if (vw.clipcount > 2048)
+ return -ENOMEM;
+ else {
X if((vcp=vmalloc(sizeof(struct video_clip)*
X (vw.clipcount))) == NULL)
X return -ENOMEM;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/cyclades.c linux/drivers/char/cyclades.c
--- v2.2.19/drivers/char/cyclades.c Sun Mar 25 17:31:25 2001
+++ linux/drivers/char/cyclades.c Wed Oct 10 01:40:45 2001
@@ -149,7 +149,7 @@
X * Revision 2.2.1.4 1998/08/04 11:02:50 ivan
X * /proc/cyclades implementation with great collaboration of
X * Marc Lewis <ma...@blarg.net>;
- * cyy_interrupt was changed to avoid occurence of kernel oopses
+ * cyy_interrupt was changed to avoid occurrence of kernel oopses
X * during PPP operation.
X *
X * Revision 2.2.1.3 1998/06/01 12:09:10 ivan
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/agpsupport.c linux/drivers/char/drm/agpsupport.c
--- v2.2.19/drivers/char/drm/agpsupport.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/agpsupport.c Wed Oct 10 01:40:45 2001
@@ -319,6 +319,16 @@
X
X case ALI_GENERIC: head->chipset = "ALi"; break;
X case ALI_M1541: head->chipset = "ALi M1541"; break;
+ case ALI_M1621: head->chipset = "ALi M1621"; break;
+ case ALI_M1631: head->chipset = "ALi M1631"; break;
+ case ALI_M1632: head->chipset = "ALi M1632"; break;
+ case ALI_M1641: head->chipset = "ALi M1641"; break;
+ case ALI_M1647: head->chipset = "ALi M1647"; break;
+ case ALI_M1651: head->chipset = "ALi M1651"; break;
+ case SVWRKS_GENERIC: head->chipset = "Serverworks Generic";
+ break;
+ case SVWRKS_HE: head->chipset = "Serverworks HE"; break;
+ case SVWRKS_LE: head->chipset = "Serverworks LE"; break;
X
X default: head->chipset = "Unknown"; break;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/bufs.c linux/drivers/char/drm/bufs.c
--- v2.2.19/drivers/char/drm/bufs.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/bufs.c Wed Oct 10 01:40:45 2001
@@ -201,6 +201,12 @@
X return -ENOMEM; /* May only call once for each order */
X }
X
+ if(count < 0 || count > 4096)
+ {
+ up(&dev->struct_sem);


+ return -EINVAL;
+ }
+

X entry->buflist = drm_alloc(count * sizeof(*entry->buflist),
X DRM_MEM_BUFS);
X if (!entry->buflist) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/context.c linux/drivers/char/drm/context.c
--- v2.2.19/drivers/char/drm/context.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/context.c Wed Oct 10 01:40:45 2001
@@ -91,10 +91,13 @@
X atomic_dec(&dev->queuelist[i]->use_count);
X }
X /* Allocate a new queue */
- down(&dev->struct_sem);
X
X queue = drm_alloc(sizeof(*queue), DRM_MEM_QUEUES);
+ if(queue == NULL)
+ return -ENOMEM;
+
X memset(queue, 0, sizeof(*queue));
+ down(&dev->struct_sem);
X atomic_set(&queue->use_count, 1);
X
X ++dev->queue_count;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/dma.c linux/drivers/char/drm/dma.c
--- v2.2.19/drivers/char/drm/dma.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/dma.c Wed Oct 10 01:40:45 2001
@@ -38,7 +38,10 @@
X {
X int i;
X
- dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER);
+ if (!(dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER))) {
+ printk(KERN_ERR "drm_dma_setup: can't drm_alloc dev->dma");
+ return;
+ }
X memset(dev->dma, 0, sizeof(*dev->dma));
X for (i = 0; i <= DRM_MAX_ORDER; i++)
X memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0]));
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/fops.c linux/drivers/char/drm/fops.c
--- v2.2.19/drivers/char/drm/fops.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/fops.c Wed Oct 10 01:40:46 2001
@@ -47,7 +47,10 @@
X DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor);
X
X priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES);
+ if(priv == NULL)
+ return -ENOMEM;
X memset(priv, 0, sizeof(*priv));
+
X filp->private_data = priv;
X priv->uid = current->euid;
X priv->pid = current->pid;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/i810_bufs.c linux/drivers/char/drm/i810_bufs.c
--- v2.2.19/drivers/char/drm/i810_bufs.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/i810_bufs.c Wed Oct 10 01:40:46 2001
@@ -87,7 +87,14 @@
X atomic_dec(&dev->buf_alloc);
X return -ENOMEM; /* May only call once for each order */
X }
-
+
+ if(count < 0 || count > 4096)
+ {
+ up(&dev->struct_sem);
+ atomic_dec(&dev->buf_alloc);


+ return -EINVAL;
+ }
+

X entry->buflist = drm_alloc(count * sizeof(*entry->buflist),
X DRM_MEM_BUFS);
X if (!entry->buflist) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/i810_dma.c linux/drivers/char/drm/i810_dma.c
--- v2.2.19/drivers/char/drm/i810_dma.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/i810_dma.c Wed Oct 10 01:40:46 2001
@@ -1402,6 +1402,11 @@
X buf_priv = buf->dev_private;
X if (buf_priv->currently_mapped != I810_BUF_MAPPED) return -EPERM;
X
+ /* Stopping end users copying their data to the entire kernel
+ is good.. */
+ if (d.used < 0 || d.used > buf->total)
+ return -EINVAL;
+
X copy_from_user_ret(buf_priv->virtual, d.address, d.used, -EFAULT);
X
X sarea_priv->last_dispatch = (int) hw_status[5];
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/ioctl.c linux/drivers/char/drm/ioctl.c
--- v2.2.19/drivers/char/drm/ioctl.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/ioctl.c Wed Oct 10 01:40:46 2001
@@ -75,7 +75,7 @@
X if (dev->unique_len || dev->unique) return -EBUSY;
X
X copy_from_user_ret(&u, (drm_unique_t *)arg, sizeof(u), -EFAULT);
- if (!u.unique_len) return -EINVAL;
+ if (!u.unique_len || u.unique_len > 1024)
X
X dev->unique_len = u.unique_len;
X dev->unique = drm_alloc(u.unique_len + 1, DRM_MEM_DRIVER);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/mga_bufs.c linux/drivers/char/drm/mga_bufs.c
--- v2.2.19/drivers/char/drm/mga_bufs.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/mga_bufs.c Wed Oct 10 01:40:46 2001
@@ -97,7 +97,17 @@
X atomic_dec(&dev->buf_alloc);
X return -ENOMEM; /* May only call once for each order */
X }
-
+
+ /* This isnt neccessarily a good limit, but we have to stop a dumb
+ 32 bit overflow problem below */
+
+ if ( count < 0 || count > 4096)
+ {
+ up(&dev->struct_sem);
+ atomic_dec(&dev->buf_alloc);


+ return -EINVAL;
+ }
+

X entry->buflist = drm_alloc(count * sizeof(*entry->buflist),
X DRM_MEM_BUFS);
X if (!entry->buflist) {
@@ -252,6 +262,13 @@
X up(&dev->struct_sem);
X atomic_dec(&dev->buf_alloc);
X return -ENOMEM; /* May only call once for each order */
+ }
+
+ if(count < 0 || count > 4096)
+ {
+ up(&dev->struct_sem);
+ atomic_dec(&dev->buf_alloc);
+ return -EINVAL;
X }
X
X entry->buflist = drm_alloc(count * sizeof(*entry->buflist),
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/drm/r128_bufs.c linux/drivers/char/drm/r128_bufs.c
--- v2.2.19/drivers/char/drm/r128_bufs.c Sun Mar 25 17:31:28 2001
+++ linux/drivers/char/drm/r128_bufs.c Wed Oct 10 01:40:46 2001
@@ -102,7 +102,17 @@
X atomic_dec(&dev->buf_alloc);
X return -ENOMEM; /* May only call once for each order */
X }
-
+
+ /* Might be a poor limit, but take that up with XFree86
+ if its a problem */
+
+ if(count < 0 || count > 4096)
+ {
+ up(&dev->struct_sem);
+ atomic_dec(&dev->buf_alloc);


+ return -EINVAL;
+ }
+

X entry->buflist = drm_alloc(count * sizeof(*entry->buflist),
X DRM_MEM_BUFS);
X if (!entry->buflist) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/epca.c linux/drivers/char/epca.c
--- v2.2.19/drivers/char/epca.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/epca.c Wed Oct 10 01:40:46 2001


@@ -928,6 +928,9 @@
X

X /* First we read the data in from the file system into a temp buffer */
X
+ memoff(ch);
+ restore_flags(flags);
+
X if (bytesAvailable)
X { /* Begin bytesAvailable */
X
@@ -953,7 +956,7 @@
X Remember copy_from_user WILL generate a page fault if the
X user memory being accessed has been swapped out. This can
X cause this routine to temporarily sleep while this page
- fault is occuring.
+ fault is occurring.
X
X ----------------------------------------------------------------- */
X
@@ -968,8 +971,6 @@
X post_fep_init.
X --------------------------------------------------------------------- */
X buf = ch->tmp_buf;
- memoff(ch);
- restore_flags(flags);
X
X } /* End from_user */


X
@@ -3601,7 +3602,7 @@

X /* ------------------------------------------------------------------
X The below routines pc_throttle and pc_unthrottle are used
X to slow (And resume) the receipt of data into the kernels
- receive buffers. The exact occurence of this depends on the
+ receive buffers. The exact occurrence of this depends on the
X size of the kernels receive buffer and what the 'watermarks'
X are set to for that buffer. See the n_ttys.c file for more
X details.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/hfmodem/refclock.c linux/drivers/char/hfmodem/refclock.c
--- v2.2.19/drivers/char/hfmodem/refclock.c Sun Mar 25 17:31:26 2001
+++ linux/drivers/char/hfmodem/refclock.c Wed Oct 10 01:40:46 2001
@@ -133,7 +133,7 @@
X "subl %2,%%eax\n\t"
X "sbbl %3,%%edx\n\t" : "=&a" (tmp0), "=&d" (tmp1)
X : "m" (dev->clk.starttime_lo), "m" (dev->clk.starttime_hi));
- __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0) : "ax");
+ __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0));
X __asm__("mull %1" : "=a" (tmp3) : "m" (scale_rdtsc), "a" (tmp1) : "dx");
X curtime = tmp2 + tmp3;
X goto time_known;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/hfmodem/tables.h linux/drivers/char/hfmodem/tables.h
--- v2.2.19/drivers/char/hfmodem/tables.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/char/hfmodem/tables.h Mon Oct 22 10:51:00 2001
@@ -0,0 +1,90 @@
+/*
+ * This file is automatically generated by ./gentbl, DO NOT EDIT!
+*/
+
+#define SINTABBITS 9
+#define SINTABSIZE (1<<SINTABBITS)
+
+static short isintab[SINTABSIZE+SINTABSIZE/4] = {
+ 0, 402, 804, 1206, 1607, 2009, 2410, 2811,
+ 3211, 3611, 4011, 4409, 4807, 5205, 5601, 5997,
+ 6392, 6786, 7179, 7571, 7961, 8351, 8739, 9126,
+ 9511, 9895, 10278, 10659, 11038, 11416, 11792, 12166,
+ 12539, 12909, 13278, 13645, 14009, 14372, 14732, 15090,
+ 15446, 15799, 16150, 16499, 16845, 17189, 17530, 17868,
+ 18204, 18537, 18867, 19194, 19519, 19840, 20159, 20474,
+ 20787, 21096, 21402, 21705, 22004, 22301, 22594, 22883,
+ 23169, 23452, 23731, 24006, 24278, 24546, 24811, 25072,
+ 25329, 25582, 25831, 26077, 26318, 26556, 26789, 27019,
+ 27244, 27466, 27683, 27896, 28105, 28309, 28510, 28706,
+ 28897, 29085, 29268, 29446, 29621, 29790, 29955, 30116,
+ 30272, 30424, 30571, 30713, 30851, 30984, 31113, 31236,
+ 31356, 31470, 31580, 31684, 31785, 31880, 31970, 32056,
+ 32137, 32213, 32284, 32350, 32412, 32468, 32520, 32567,
+ 32609, 32646, 32678, 32705, 32727, 32744, 32757, 32764,
+ 32767, 32764, 32757, 32744, 32727, 32705, 32678, 32646,
+ 32609, 32567, 32520, 32468, 32412, 32350, 32284, 32213,
+ 32137, 32056, 31970, 31880, 31785, 31684, 31580, 31470,
+ 31356, 31236, 31113, 30984, 30851, 30713, 30571, 30424,
+ 30272, 30116, 29955, 29790, 29621, 29446, 29268, 29085,
+ 28897, 28706, 28510, 28309, 28105, 27896, 27683, 27466,
+ 27244, 27019, 26789, 26556, 26318, 26077, 25831, 25582,
+ 25329, 25072, 24811, 24546, 24278, 24006, 23731, 23452,
+ 23169, 22883, 22594, 22301, 22004, 21705, 21402, 21096,
+ 20787, 20474, 20159, 19840, 19519, 19194, 18867, 18537,
+ 18204, 17868, 17530, 17189, 16845, 16499, 16150, 15799,
+ 15446, 15090, 14732, 14372, 14009, 13645, 13278, 12909,
+ 12539, 12166, 11792, 11416, 11038, 10659, 10278, 9895,
+ 9511, 9126, 8739, 8351, 7961, 7571, 7179, 6786,
+ 6392, 5997, 5601, 5205, 4807, 4409, 4011, 3611,
+ 3211, 2811, 2410, 2009, 1607, 1206, 804, 402,
+ 0, -402, -804, -1206, -1607, -2009, -2410, -2811,
+ -3211, -3611, -4011, -4409, -4807, -5205, -5601, -5997,
+ -6392, -6786, -7179, -7571, -7961, -8351, -8739, -9126,
+ -9511, -9895,-10278,-10659,-11038,-11416,-11792,-12166,
+ -12539,-12909,-13278,-13645,-14009,-14372,-14732,-15090,
+ -15446,-15799,-16150,-16499,-16845,-17189,-17530,-17868,
+ -18204,-18537,-18867,-19194,-19519,-19840,-20159,-20474,
+ -20787,-21096,-21402,-21705,-22004,-22301,-22594,-22883,
+ -23169,-23452,-23731,-24006,-24278,-24546,-24811,-25072,
+ -25329,-25582,-25831,-26077,-26318,-26556,-26789,-27019,
+ -27244,-27466,-27683,-27896,-28105,-28309,-28510,-28706,
+ -28897,-29085,-29268,-29446,-29621,-29790,-29955,-30116,
+ -30272,-30424,-30571,-30713,-30851,-30984,-31113,-31236,
+ -31356,-31470,-31580,-31684,-31785,-31880,-31970,-32056,
+ -32137,-32213,-32284,-32350,-32412,-32468,-32520,-32567,
+ -32609,-32646,-32678,-32705,-32727,-32744,-32757,-32764,
+ -32767,-32764,-32757,-32744,-32727,-32705,-32678,-32646,
+ -32609,-32567,-32520,-32468,-32412,-32350,-32284,-32213,
+ -32137,-32056,-31970,-31880,-31785,-31684,-31580,-31470,
+ -31356,-31236,-31113,-30984,-30851,-30713,-30571,-30424,
+ -30272,-30116,-29955,-29790,-29621,-29446,-29268,-29085,
+ -28897,-28706,-28510,-28309,-28105,-27896,-27683,-27466,
+ -27244,-27019,-26789,-26556,-26318,-26077,-25831,-25582,
+ -25329,-25072,-24811,-24546,-24278,-24006,-23731,-23452,
+ -23169,-22883,-22594,-22301,-22004,-21705,-21402,-21096,
+ -20787,-20474,-20159,-19840,-19519,-19194,-18867,-18537,
+ -18204,-17868,-17530,-17189,-16845,-16499,-16150,-15799,
+ -15446,-15090,-14732,-14372,-14009,-13645,-13278,-12909,
+ -12539,-12166,-11792,-11416,-11038,-10659,-10278, -9895,
+ -9511, -9126, -8739, -8351, -7961, -7571, -7179, -6786,
+ -6392, -5997, -5601, -5205, -4807, -4409, -4011, -3611,
+ -3211, -2811, -2410, -2009, -1607, -1206, -804, -402,
+ 0, 402, 804, 1206, 1607, 2009, 2410, 2811,
+ 3211, 3611, 4011, 4409, 4807, 5205, 5601, 5997,
+ 6392, 6786, 7179, 7571, 7961, 8351, 8739, 9126,
+ 9511, 9895, 10278, 10659, 11038, 11416, 11792, 12166,
+ 12539, 12909, 13278, 13645, 14009, 14372, 14732, 15090,
+ 15446, 15799, 16150, 16499, 16845, 17189, 17530, 17868,
+ 18204, 18537, 18867, 19194, 19519, 19840, 20159, 20474,
+ 20787, 21096, 21402, 21705, 22004, 22301, 22594, 22883,
+ 23169, 23452, 23731, 24006, 24278, 24546, 24811, 25072,
+ 25329, 25582, 25831, 26077, 26318, 26556, 26789, 27019,
+ 27244, 27466, 27683, 27896, 28105, 28309, 28510, 28706,
+ 28897, 29085, 29268, 29446, 29621, 29790, 29955, 30116,
+ 30272, 30424, 30571, 30713, 30851, 30984, 31113, 31236,
+ 31356, 31470, 31580, 31684, 31785, 31880, 31970, 32056,
+ 32137, 32213, 32284, 32350, 32412, 32468, 32520, 32567,
+ 32609, 32646, 32678, 32705, 32727, 32744, 32757, 32764
+};
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/i810_rng.c linux/drivers/char/i810_rng.c
--- v2.2.19/drivers/char/i810_rng.c Sun Mar 25 17:31:29 2001
+++ linux/drivers/char/i810_rng.c Wed Oct 10 01:40:46 2001
@@ -1,76 +1,17 @@
X /*
X
X Hardware driver for Intel i810 Random Number Generator (RNG)
- Copyright 2000 Jeff Garzik <jga...@mandrakesoft.com>
+ Copyright 2000,2001 Jeff Garzik <jga...@mandrakesoft.com>
+ Copyright 2000,2001 Philipp Rumpf <pru...@mandrakesoft.com>
X
- Driver Web site: http://gtf.org/garzik/drivers/i810_rng/
+ Driver Web site: http://sourceforge.net/projects/gkernel/
X
-
-
- Based on:
- Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet
- May 1999 Order Number: 290658-002 R
-
- Intel 82802 Firmware Hub: Random Number Generator
- Programmer's Reference Manual
- December 1999 Order Number: 298029-001 R
-
- Intel 82802 Firmware HUB Random Number Generator Driver
- Copyright (c) 2000 Matt Sottek <mso...@quiknet.com>
-
- Special thanks to Matt Sottek. I did the "guts", he
- did the "brains" and all the testing. (Anybody wanna send
- me an i810 or i820?)
+ Please read Documentation/i810_rng.txt for details on use.
X
X ----------------------------------------------------------
X
X This software may be used and distributed according to the terms
- of the GNU Public License, incorporated herein by reference.
-
- ----------------------------------------------------------
-
- From the firmware hub datasheet:
-
- The Firmware Hub integrates a Random Number Generator (RNG)
- using thermal noise generated from inherently random quantum
- mechanical properties of silicon. When not generating new random
- bits the RNG circuitry will enter a low power state. Intel will
- provide a binary software driver to give third party software
- access to our RNG for use as a security feature. At this time,
- the RNG is only to be used with a system in an OS-present state.
-
- ----------------------------------------------------------
-
- Theory of operation:
-
- Character driver. Using the standard open()
- and read() system calls, you can read random data from
- the i810 RNG device. This data is NOT CHECKED by any
- fitness tests, and could potentially be bogus (if the
- hardware is faulty or has been tampered with).
-
- /dev/intel_rng is char device major 10, minor 183.
-
-
- ----------------------------------------------------------
-
- Driver notes:
-
- * In order to unload the i810_rng module, you must first
- make sure all users of the character device have closed
-
- * FIXME: Currently only one open() of the character device is allowed.
- If another user tries to open() the device, they will get an
- -EBUSY error. Instead, this really should either support
- multiple simultaneous users of the character device (not hard),
- or simply block open() until the current user of the chrdev
- calls close().
-
- * FIXME: support poll()
-
- * FIXME: should we be crazy and support mmap()?
-
- ----------------------------------------------------------
+ of the GNU General Public License, incorporated herein by reference.
X
X */
X
@@ -80,20 +21,19 @@
X #include <linux/fs.h>
X #include <linux/init.h>
X #include <linux/pci.h>
-#include <asm/spinlock.h>
X #include <linux/random.h>
-#include <linux/sysctl.h>
X #include <linux/miscdevice.h>
X #include <linux/mm.h>
X
X #include <asm/io.h>
X #include <asm/uaccess.h>
+#include <asm/spinlock.h>
X
X
X /*
X * core module and version information
X */
-#define RNG_VERSION "0.6.2-2.2.x"
+#define RNG_VERSION "0.9.6-2.2"
X #define RNG_MODULE_NAME "i810_rng"
X #define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
X #define PFX RNG_MODULE_NAME ": "
@@ -102,7 +42,7 @@
X /*
X * debugging macros
X */
-#undef RNG_DEBUG /* define to 1 to enable copious debugging info */
+#undef RNG_DEBUG /* define to enable copious debugging info */
X
X #ifdef RNG_DEBUG
X /* note: prints function name for you */
@@ -111,8 +51,8 @@
X #define DPRINTK(fmt, args...)
X #endif
X
-#define RNG_NDEBUG 0 /* define to 1 to disable lightweight runtime checks */
-#if RNG_NDEBUG
+#undef RNG_NDEBUG /* define to disable lightweight runtime checks */
+#ifdef RNG_NDEBUG
X #define assert(expr)
X #else
X #define assert(expr) \
@@ -124,12 +64,6 @@
X
X
X /*
- * misc helper macros
- */
-#define arraysize(x) (sizeof(x)/sizeof(*(x)))
-
-
-/*
X * RNG registers (offsets from rng_mem)
X */
X #define RNG_HW_STATUS 0
@@ -139,22 +73,21 @@
X #define RNG_DATA_PRESENT 0x01
X #define RNG_DATA 2
X
+/*
+ * Magic address at which Intel PCI bridges locate the RNG
+ */
X #define RNG_ADDR 0xFFBC015F
X #define RNG_ADDR_LEN 3
X
X #define RNG_MISCDEV_MINOR 183 /* official */
X
-
X /*
X * various RNG status variables. they are globals
X * as we only support a single RNG device
X */
-static int rng_allocated; /* is someone using the RNG region? */
-static int rng_hw_enabled; /* is the RNG h/w enabled? */
-static int rng_use_count; /* number of times RNG has been enabled */
X static void *rng_mem; /* token to our ioremap'd RNG register area */
-static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED; /* hardware lock */
-static int rng_open; /* boolean, 0 (false) if chrdev is closed, 1 (true) if open */
+static struct semaphore rng_open_sem; /* Semaphore for serializing rng_open/release */
+
X
X /*
X * inlined helper functions for accessing RNG registers
@@ -165,18 +98,17 @@
X return readb (rng_mem + RNG_HW_STATUS);
X }
X
-
-static inline void rng_hwstatus_set (u8 hw_status)
+static inline u8 rng_hwstatus_set (u8 hw_status)
X {
X assert (rng_mem != NULL);
X writeb (hw_status, rng_mem + RNG_HW_STATUS);
+ return rng_hwstatus ();
X }
X
X
X static inline int rng_data_present (void)
X {
X assert (rng_mem != NULL);
- assert (rng_hw_enabled == 1);
X
X return (readb (rng_mem + RNG_STATUS) & RNG_DATA_PRESENT) ? 1 : 0;
X }
@@ -185,176 +117,157 @@
X static inline int rng_data_read (void)
X {
X assert (rng_mem != NULL);
- assert (rng_hw_enabled == 1);
X
X return readb (rng_mem + RNG_DATA);
X }
X
-
X /*
- * rng_enable - enable or disable the RNG hardware
+ * rng_enable - enable the RNG hardware
X */
-static int rng_enable (int enable)
+
+static int rng_enable (void)
X {


X int rc = 0;

- u8 hw_status;
+ u8 hw_status, new_status;


X
X DPRINTK ("ENTER\n");

X
- spin_lock (&rng_lock);
-
X hw_status = rng_hwstatus ();
X
- if (enable) {
- rng_hw_enabled = 1;
- rng_use_count++;
- MOD_INC_USE_COUNT;
- } else {
- rng_use_count--;
- if (rng_use_count == 0)
- rng_hw_enabled = 0;
- MOD_DEC_USE_COUNT;
- }
+ if ((hw_status & RNG_ENABLED) == 0) {
+ new_status = rng_hwstatus_set (hw_status | RNG_ENABLED);
X
- if (rng_hw_enabled && ((hw_status & RNG_ENABLED) == 0)) {
- rng_hwstatus_set (hw_status | RNG_ENABLED);
- printk (KERN_INFO PFX "RNG h/w enabled\n");
+ if (new_status & RNG_ENABLED)
+ printk (KERN_INFO PFX "RNG h/w enabled\n");
+ else {
+ printk (KERN_ERR PFX "Unable to enable the RNG\n");


+ rc = -EIO;
+ }

X }
X
- else if (!rng_hw_enabled && (hw_status & RNG_ENABLED)) {
- rng_hwstatus_set (hw_status & ~RNG_ENABLED);
- printk (KERN_INFO PFX "RNG h/w disabled\n");
- }
+ DPRINTK ("EXIT, returning %d\n", rc);


+ return rc;
+}
+

+/*
+ * rng_disable - disable the RNG hardware
+ */
X
- spin_unlock (&rng_lock);
+static void rng_disable(void)
+{
+ u8 hw_status, new_status;
+
+ DPRINTK ("ENTER\n");
+
+ hw_status = rng_hwstatus ();
X
- if ((!!enable) != (!!(rng_hwstatus () & RNG_ENABLED))) {
- printk (KERN_ERR PFX "Unable to %sable the RNG\n",
- enable ? "en" : "dis");
- rc = -EIO;
+ if (hw_status & RNG_ENABLED) {
+ new_status = rng_hwstatus_set (hw_status & ~RNG_ENABLED);
+
+ if ((new_status & RNG_ENABLED) == 0)
+ printk (KERN_INFO PFX "RNG h/w disabled\n");
+ else {
+ printk (KERN_ERR PFX "Unable to disable the RNG\n");
+ }
X }
X

- DPRINTK ("EXIT, returning %d\n", rc);

- return rc;
+ DPRINTK ("EXIT\n");
X }
X
-
X static int rng_dev_open (struct inode *inode, struct file *filp)
X {
- int rc = -EINVAL;
-
- MOD_INC_USE_COUNT;
+ int rc;
X
X if ((filp->f_mode & FMODE_READ) == 0)
- goto err_out;
+ return -EINVAL;
X if (filp->f_mode & FMODE_WRITE)
- goto err_out;
-
- spin_lock (&rng_lock);
+ return -EINVAL;
X
- /* only allow one open of this device, exit with -EBUSY if already open */
- /* FIXME: we should sleep on a semaphore here, unless O_NONBLOCK */
- if (rng_open) {
- spin_unlock (&rng_lock);
- rc = -EBUSY;
- goto err_out;
+ /* wait for device to become free */
+ if (filp->f_flags & O_NONBLOCK) {
+ if (down_trylock (&rng_open_sem))
+ return -EAGAIN;
+ } else {
+ if (down_interruptible (&rng_open_sem))
+ return -ERESTARTSYS;
X }
X
- rng_open = 1;
-
- spin_unlock (&rng_lock);
-
- if (rng_enable(1) != 0) {
- spin_lock (&rng_lock);
- rng_open = 0;
- spin_unlock (&rng_lock);
- rc = -EIO;
- goto err_out;
+ rc = rng_enable ();
+ if (rc) {
+ up (&rng_open_sem);
+ return rc;
X }
X
+ MOD_INC_USE_COUNT;
X return 0;
-
-err_out:
- MOD_DEC_USE_COUNT;
- return rc;
X }
X
X
X static int rng_dev_release (struct inode *inode, struct file *filp)
X {
-
- if (rng_enable(0) != 0)
- return -EIO;
-
- spin_lock (&rng_lock);
- rng_open = 0;
- spin_unlock (&rng_lock);
-
+ rng_disable ();
+ up (&rng_open_sem);
X MOD_DEC_USE_COUNT;


X return 0;
X }
X

X
-static ssize_t rng_dev_read (struct file *filp, char * buf, size_t size,
- loff_t *offp)
+static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size,
+ loff_t * offp)
X {
- int have_data, copied = 0;
- u8 data=0;
- u8 *page;
-
- if (size < 1)
- return 0;
-
- page = (unsigned char *) get_free_page (GFP_KERNEL);
- if (!page)
- return -ENOMEM;
-
-read_loop:
- /* using the fact that read() can return >0 but
- * less than the requested amount, we simply
- * read up to PAGE_SIZE or buffer size, whichever
- * is smaller, and return that data.
- */
- if ((copied == size) || (copied == PAGE_SIZE)) {
- size_t tmpsize = (copied == size) ? size : PAGE_SIZE;
- int rc = copy_to_user (buf, page, tmpsize);
- free_page ((long)page);
- if (rc) return rc;
- return tmpsize;
- }
+ static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED;
+ int have_data;
+ u8 data = 0;
+ ssize_t ret = 0;
X
- spin_lock (&rng_lock);
+ while (size) {
+ spin_lock (&rng_lock);
X
- have_data = 0;
- if (rng_data_present ()) {
- data = rng_data_read ();
- have_data = 1;
- }
+ have_data = 0;
+ if (rng_data_present ()) {
+ data = rng_data_read ();
+ have_data = 1;
+ }
X
- spin_unlock (&rng_lock);
+ spin_unlock (&rng_lock);
X
- if (have_data) {
- page[copied] = data;
- copied++;
- } else {
- if (filp->f_flags & O_NONBLOCK) {
- free_page ((long)page);
- return -EAGAIN;
+ if (have_data) {
+ if (put_user (data, buf++)) {
+ ret = ret ? : -EFAULT;
+ break;
+ }
+ size--;
+ ret++;
X }
- }
X
- if (current->need_resched)
- schedule ();
+ if (filp->f_flags & O_NONBLOCK)
+ return ret ? : -EAGAIN;
+
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(1);
X
- if (signal_pending (current)) {
- free_page ((long)page);
- return -ERESTARTSYS;
+ if (signal_pending (current))
+ return ret ? : -ERESTARTSYS;
X }
X
- goto read_loop;


+ return ret;
X }
X
X

+static struct file_operations rng_chrdev_ops = {
+ open: rng_dev_open,
+ release: rng_dev_release,
+ read: rng_dev_read,
+};
+
+
+static struct miscdevice rng_miscdev = {
+ RNG_MISCDEV_MINOR,
+ RNG_MODULE_NAME,
+ &rng_chrdev_ops,
+};
+
+
X /*
X * rng_init_one - look for and attempt to init a single RNG
X */
@@ -365,10 +278,11 @@


X
X DPRINTK ("ENTER\n");

X
- if (rng_allocated) {
- printk (KERN_ERR PFX "this driver only supports one RNG\n");
- DPRINTK ("EXIT, returning -EBUSY\n");
- return -EBUSY;
+ rc = misc_register (&rng_miscdev);
+ if (rc) {
+ printk (KERN_ERR PFX "cannot register misc device\n");
+ DPRINTK ("EXIT, returning %d\n", rc);
+ goto err_out;
X }
X
X rng_mem = ioremap (RNG_ADDR, RNG_ADDR_LEN);
@@ -376,7 +290,7 @@
X printk (KERN_ERR PFX "cannot ioremap RNG Memory\n");
X DPRINTK ("EXIT, returning -EBUSY\n");
X rc = -EBUSY;
- goto err_out;
+ goto err_out_free_miscdev;
X }
X
X /* Check for Intel 82802 */
@@ -385,80 +299,59 @@
X printk (KERN_ERR PFX "RNG not detected\n");
X DPRINTK ("EXIT, returning -ENODEV\n");
X rc = -ENODEV;
- goto err_out;
+ goto err_out_free_map;
X }
X
- rng_allocated = 1;
-
- rc = rng_enable (0);
- if (rc) {
+ /* turn RNG h/w off, if it's on */
+ if (hw_status & RNG_ENABLED)
+ hw_status = rng_hwstatus_set (hw_status & ~RNG_ENABLED);
+ if (hw_status & RNG_ENABLED) {
X printk (KERN_ERR PFX "cannot disable RNG, aborting\n");
- goto err_out;
+ goto err_out_free_map;
X }
X
X DPRINTK ("EXIT, returning 0\n");
X return 0;
X
+err_out_free_map:
+ iounmap (rng_mem);
+err_out_free_miscdev:
+ misc_deregister (&rng_miscdev);
X err_out:


- if (rng_mem)
- iounmap (rng_mem);

X return rc;
X }
X

X
-/*
- * Data for PCI driver interface
- */
-
-MODULE_AUTHOR("Jeff Garzik, Matt Sottek");
+MODULE_AUTHOR("Jeff Garzik, Philipp Rumpf, Matt Sottek");
X MODULE_DESCRIPTION("Intel i8xx chipset Random Number Generator (RNG) driver");
X
X
-static struct file_operations rng_chrdev_ops = {
- open: rng_dev_open,
- release: rng_dev_release,
- read: rng_dev_read,
-};
-
-
-static struct miscdevice rng_miscdev = {
- RNG_MISCDEV_MINOR,
- RNG_MODULE_NAME,
- &rng_chrdev_ops,
-};
-
-
X /*
X * rng_init - initialize RNG module
X */
-int __init rng_init (void)
+static int __init rng_init (void)
X {
X int rc;


X struct pci_dev *pdev;
-

- pdev = pci_find_device (0x8086, 0x2418, NULL);
- if (!pdev)
- pdev = pci_find_device (0x8086, 0x2428, NULL);
- if (!pdev)
- pdev = pci_find_device (0x8086, 0x1130, NULL);
- if (!pdev)
- return -ENODEV;


X
X DPRINTK ("ENTER\n");

X
- rc = rng_init_one(pdev);
- if (rc) {
- DPRINTK ("EXIT, returning -ENODEV\n");
- return rc;
- }
+ init_MUTEX (&rng_open_sem);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 11'
echo 'File patch-2.2.20 is continued in part 12'
echo "12" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:19 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part20

#!/bin/sh -x
# this is part 20 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 20; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X /* CISCO-HDLC IP with type field and fake I-frame-header */
X skb_pull(skb, 2);
@@ -1693,6 +1931,7 @@
X void *daddr, void *saddr, unsigned plen)
X {
X isdn_net_local *lp = dev->priv;
+ unsigned char *p;
X ushort len = 0;
X
X switch (lp->p_encap) {
@@ -1721,10 +1960,11 @@
X len = 2;
X break;
X case ISDN_NET_ENCAP_CISCOHDLC:
- skb_push(skb, 4);
- skb->data[0] = 0x0f;
- skb->data[1] = 0x00;
- *((ushort *) & skb->data[2]) = htons(type);
+ case ISDN_NET_ENCAP_CISCOHDLCK:
+ p = skb_push(skb, 4);
+ p += put_u8 (p, CISCO_ADDR_UNICAST);
+ p += put_u8 (p, CISCO_CTRL);
+ p += put_u16(p, type);
X len = 4;
X break;
X #ifdef CONFIG_ISDN_X25
@@ -1781,17 +2021,8 @@
X {
X ushort max_hlhdr_len = 0;
X isdn_net_local *lp = (isdn_net_local *) ndev->priv;
- int drvidx,
- i;
+ int drvidx, i;
X
- if (ndev == NULL) {
- printk(KERN_WARNING "isdn_net_init: dev = NULL!\n");
- return -ENODEV;
- }
- if (ndev->priv == NULL) {
- printk(KERN_WARNING "isdn_net_init: dev->priv = NULL!\n");
- return -ENODEV;
- }
X ether_setup(ndev);
X lp->org_hhc = ndev->hard_header_cache;
X lp->org_hcu = ndev->header_cache_update;
@@ -1830,9 +2061,7 @@
X ndev->stop = &isdn_net_close;
X ndev->get_stats = &isdn_net_get_stats;
X ndev->rebuild_header = &isdn_net_rebuild_header;
-#ifdef CONFIG_ISDN_PPP
- ndev->do_ioctl = isdn_ppp_dev_ioctl;
-#endif
+ ndev->do_ioctl = NULL;


X return 0;
X }
X

@@ -2491,6 +2720,7 @@
X #else
X p->dev.type = ARPHRD_PPP; /* change ARP type */
X p->dev.addr_len = 0;
+ p->dev.do_ioctl = isdn_ppp_dev_ioctl;
X #endif
X break;
X case ISDN_NET_ENCAP_X25IFACE:
@@ -2502,6 +2732,9 @@
X p->dev.type = ARPHRD_X25; /* change ARP type */
X p->dev.addr_len = 0;
X #endif
+ break;
+ case ISDN_NET_ENCAP_CISCOHDLCK:
+ p->dev.do_ioctl = isdn_ciscohdlck_dev_ioctl;
X break;
X default:
X if( cfg->p_encap >= 0 &&
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_net.h linux/drivers/isdn/isdn_net.h
--- v2.2.19/drivers/isdn/isdn_net.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/isdn_net.h Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_net.h,v 1.19 2000/06/21 09:54:29 keil Exp $
+/* $Id: isdn_net.h,v 1.19.6.2 2001/08/14 14:04:21 kai Exp $
X
X * header for Linux ISDN subsystem, network related functions (linklevel).
X *
@@ -33,31 +33,10 @@
X * Definitions for Cisco-HDLC header.
X */
X
-typedef struct cisco_hdr {
- __u8 addr; /* unicast/broadcast */
- __u8 ctrl; /* Always 0 */
- __u16 type; /* IP-typefield */
-} cisco_hdr;
-
-typedef struct cisco_slarp {
- __u32 code; /* SLREQ/SLREPLY/KEEPALIVE */
- union {
- struct {
- __u32 ifaddr; /* My interface address */
- __u32 netmask; /* My interface netmask */
- } reply;
- struct {
- __u32 my_seq; /* Packet sequence number */
- __u32 your_seq;
- } keepalive;
- } slarp;
- __u16 rel; /* Always 0xffff */
- __u16 t1; /* Uptime in usec >> 16 */
- __u16 t0; /* Uptime in usec & 0xffff */
-} cisco_slarp;
-
X #define CISCO_ADDR_UNICAST 0x0f
X #define CISCO_ADDR_BROADCAST 0x8f
+#define CISCO_CTRL 0x00
+#define CISCO_TYPE_CDP 0x2000
X #define CISCO_TYPE_INET 0x0800
X #define CISCO_TYPE_SLARP 0x8035
X #define CISCO_SLARP_REPLY 0
@@ -83,7 +62,6 @@
X extern int isdn_net_force_dial(char *);
X extern isdn_net_dev *isdn_net_findif(char *);
X extern int isdn_net_rcv_skb(int, struct sk_buff *);
-extern void isdn_net_slarp_out(void);
X extern int isdn_net_dial_req(isdn_net_local *);
X extern void isdn_net_writebuf_skb(isdn_net_local *lp, struct sk_buff *skb);
X extern void isdn_net_write_super(isdn_net_local *lp, struct sk_buff *skb);
@@ -163,6 +141,52 @@
X master_lp->netdev->queue = lp->next;
X lp->next = lp->last = lp; /* (re)set own pointers */
X spin_unlock_irqrestore(&master_lp->netdev->queue_lock, flags);
+}
+
+static inline int
+put_u8(unsigned char *p, __u8 x)
+{
+ p[0] = x;


+ return 1;
+}
+

+static inline int
+put_u16(unsigned char *p, __u16 x)
+{
+ p[0] = x >> 8;
+ p[1] = x;
+ return 2;
+}
+
+static inline int
+put_u32(unsigned char *p, __u32 x)
+{
+ p[0] = x >> 24;
+ p[1] = x >> 16;
+ p[2] = x >> 8;
+ p[3] = x;
+ return 4;
+}
+
+static inline int
+get_u8(unsigned char *p, __u8 *x)
+{
+ *x = p[0];


+ return 1;
+}
+

+static inline int
+get_u16(unsigned char *p, __u16 *x)
+{
+ *x = (p[0] << 8) + p[1];
+ return 2;
+}
+
+static inline int
+get_u32(unsigned char *p, __u32 *x)
+{
+ *x = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
+ return 4;
X }
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_ppp.c linux/drivers/isdn/isdn_ppp.c
--- v2.2.19/drivers/isdn/isdn_ppp.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/isdn_ppp.c Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_ppp.c,v 1.85.6.2 2001/01/23 17:45:02 kai Exp $
+/* $Id: isdn_ppp.c,v 1.85.6.6 2001/07/27 09:08:27 kai Exp $
X *
X * Linux ISDN subsystem, functions for synchronous PPP (linklevel).
X *
@@ -26,8 +26,8 @@
X #include <linux/version.h>
X #include <linux/poll.h>
X #include <linux/isdn.h>
-#include <linux/ppp-comp.h>
X #include <linux/isdn_compat.h>
+#include <linux/ppp-comp.h>
X
X #include "isdn_common.h"
X #include "isdn_ppp.h"
@@ -84,7 +84,7 @@
X static int isdn_ppp_bundle(struct ippp_struct *, int unit);
X #endif /* CONFIG_ISDN_MPP */
X
-char *isdn_ppp_revision = "$Revision: 1.85.6.2 $";
+char *isdn_ppp_revision = "$Revision: 1.85.6.6 $";
X
X static struct ippp_struct *ippp_table[ISDN_MAX_CHANNELS];
X
@@ -166,6 +166,7 @@
X int unit = 0;
X long flags;
X struct ippp_struct *is;
+ int retval;
X
X save_flags(flags);
X cli();
@@ -198,12 +199,14 @@
X if (i >= ISDN_MAX_CHANNELS) {
X restore_flags(flags);
X printk(KERN_WARNING "isdn_ppp_bind: Can't find a (free) connection to the ipppd daemon.\n");
- return -1;
+ retval = -1;
+ goto out;
X }
X unit = isdn_ppp_if_get_unit(lp->name); /* get unit number from interface name .. ugly! */
X if (unit < 0) {
X printk(KERN_ERR "isdn_ppp_bind: illegal interface name %s.\n", lp->name);
- return -1;
+ retval = -1;
+ goto out;
X }
X
X lp->ppp_slot = i;
@@ -212,13 +215,16 @@
X is->unit = unit;
X is->state = IPPP_OPEN | IPPP_ASSIGNED; /* assigned to a netdevice but not connected */
X #ifdef CONFIG_ISDN_MPP
- if (isdn_ppp_mp_init(lp, NULL) < 0)
- return -ENOMEM;
+ retval = isdn_ppp_mp_init(lp, NULL);
+ if (retval < 0)
+ goto out;
X #endif /* CONFIG_ISDN_MPP */
X
- restore_flags(flags);
+ retval = lp->ppp_slot;
X
- return lp->ppp_slot;
+ out:
+ restore_flags(flags);


+ return retval;
X }
X
X /*

@@ -780,7 +786,10 @@
X }
X skb_reserve(skb, hl);
X if (copy_from_user(skb_put(skb, count), buf, count))
+ {
+ kfree_skb(skb);
X return -EFAULT;
+ }
X if (is->debug & 0x40) {
X printk(KERN_DEBUG "ppp xmit: len %d\n", (int) skb->len);
X isdn_ppp_frame_log("xmit", skb->data, skb->len, 32,is->unit,lp->ppp_slot);
@@ -814,7 +823,7 @@
X kmalloc(sizeof(struct ippp_struct), GFP_KERNEL))) {
X printk(KERN_WARNING "isdn_ppp_init: Could not alloc ippp_table\n");
X for (j = 0; j < i; j++)
- kfree(ippp_table[i]);
+ kfree(ippp_table[j]);
X return -1;
X }
X memset((char *) ippp_table[i], 0, sizeof(struct ippp_struct));
@@ -1904,8 +1913,15 @@
X sdev = lp->slave;
X while (sdev) {
X isdn_net_local *mlp = (isdn_net_local *) sdev->priv;
- if ((mlp->flags & ISDN_NET_CONNECTED))
+
+ if (mlp->slave) { /* find last connected link in chain */
+ isdn_net_local *nlp = (isdn_net_local *) mlp->slave->priv;
+
+ if (!(nlp->flags & ISDN_NET_CONNECTED))
+ break;
+ } else if (mlp->flags & ISDN_NET_CONNECTED)
X break;
+
X sdev = mlp->slave;
X }
X if (!sdev)
@@ -2431,6 +2447,13 @@
X
X switch(skb->data[0]) {
X case CCP_CONFREQ:
+ if(is->debug & 0x10)
+ printk(KERN_DEBUG "Disable compression here!\n");
+ if(proto == PPP_CCP)
+ mis->compflags &= ~SC_COMP_ON;
+ else
+ is->compflags &= ~SC_LINK_COMP_ON;
+ break;
X case CCP_TERMREQ:
X case CCP_TERMACK:
X if(is->debug & 0x10)
@@ -2546,6 +2569,17 @@
X
X /* TODO: Clean this up with new Reset semantics */
X
+/* I believe the CCP handling as-is is done wrong. Compressed frames
+ * should only be sent/received after CCP reaches UP state, which means
+ * both sides have sent CONF_ACK. Currently, we handle both directions
+ * independently, which means we may accept compressed frames too early
+ * (supposedly not a problem), but may also mean we send compressed frames
+ * too early, which may turn out to be a problem.
+ * This part of state machine should actually be handled by (i)pppd, but
+ * that's too big of a change now. --kai
+ */
+
+
X static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct sk_buff *skb)
X {
X struct ippp_struct *mis,*is = ippp_table[lp->ppp_slot];
@@ -2580,6 +2614,13 @@
X
X switch(data[2]) {
X case CCP_CONFREQ:
+ if(is->debug & 0x10)
+ printk(KERN_DEBUG "Disable decompression here!\n");
+ if(proto == PPP_CCP)
+ is->compflags &= ~SC_DECOMP_ON;
+ else
+ is->compflags &= ~SC_LINK_DECOMP_ON;
+ break;
X case CCP_TERMREQ:
X case CCP_TERMACK:
X if(is->debug & 0x10)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_tty.c linux/drivers/isdn/isdn_tty.c
--- v2.2.19/drivers/isdn/isdn_tty.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/isdn_tty.c Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_tty.c,v 1.94 2000/11/25 17:00:59 kai Exp $
+/* $Id: isdn_tty.c,v 1.94.6.5 2001/08/14 14:12:18 kai Exp $
X
X * Linux ISDN subsystem, tty functions and AT-command emulator (linklevel).
X *
@@ -66,7 +66,7 @@
X static int si2bit[8] =
X {4, 1, 4, 4, 4, 4, 4, 4};
X
-char *isdn_tty_revision = "$Revision: 1.94 $";
+char *isdn_tty_revision = "$Revision: 1.94.6.5 $";
X
X
X /* isdn_tty_try_read() is called from within isdn_tty_rcv_skb()
@@ -307,18 +307,13 @@
X void
X isdn_tty_cleanup_xmit(modem_info * info)
X {
- struct sk_buff *skb;


X unsigned long flags;
X

X save_flags(flags);
X cli();
- if (skb_queue_len(&info->xmit_queue))
- while ((skb = skb_dequeue(&info->xmit_queue)))
- kfree_skb(skb);
-#ifdef CONFIG_ISDN_AUDIO
- if (skb_queue_len(&info->dtmf_queue))
- while ((skb = skb_dequeue(&info->dtmf_queue)))
- kfree_skb(skb);
+ skb_queue_purge(&info->xmit_queue);
+#ifdef CONFIG_ISDN_AUDIO
+ skb_queue_purge(&info->dtmf_queue);
X #endif
X restore_flags(flags);
X }
@@ -1187,8 +1182,6 @@
X
X if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write"))
X return 0;
- if (!tty)
- return 0;
X if (from_user)
X down(&info->write_sem);
X /* See isdn_tty_senddown() */
@@ -1425,8 +1418,7 @@
X status = info->lsr;
X restore_flags(flags);
X result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0);
- put_user(result, (uint *) value);
- return 0;
+ return put_user(result, (uint *) value);
X }
X
X
@@ -1449,8 +1441,7 @@
X | ((status & UART_MSR_RI) ? TIOCM_RNG : 0)
X | ((status & UART_MSR_DSR) ? TIOCM_DSR : 0)
X | ((status & UART_MSR_CTS) ? TIOCM_CTS : 0);
- put_user(result, (uint *) value);
- return 0;
+ return put_user(result, (uint *) value);


X }
X
X static int

@@ -1459,7 +1450,8 @@
X uint arg;
X int pre_dtr;
X
- get_user(arg, (uint *) value);
+ if (get_user(arg, (uint *) value))
+ return -EFAULT;
X switch (cmd) {
X case TIOCMBIS:
X #ifdef ISDN_DEBUG_MODEM_IOCTL
@@ -1527,7 +1519,6 @@
X uint cmd, ulong arg)
X {
X modem_info *info = (modem_info *) tty->driver_data;
- int error;
X int retval;
X
X if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_ioctl"))
@@ -1557,19 +1548,13 @@
X #ifdef ISDN_DEBUG_MODEM_IOCTL
X printk(KERN_DEBUG "ttyI%d ioctl TIOCGSOFTCAR\n", info->line);
X #endif
- error = verify_area(VERIFY_WRITE, (void *) arg, sizeof(long));
- if (error)
- return error;
- put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
- return 0;
+ return put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
X case TIOCSSOFTCAR:
X #ifdef ISDN_DEBUG_MODEM_IOCTL
X printk(KERN_DEBUG "ttyI%d ioctl TIOCSSOFTCAR\n", info->line);
X #endif
- error = verify_area(VERIFY_READ, (void *) arg, sizeof(long));
- if (error)
- return error;
- get_user(arg, (ulong *) arg);
+ if (get_user(arg, (ulong *) arg))
+ return -EFAULT;
X tty->termios->c_cflag =
X ((tty->termios->c_cflag & ~CLOCAL) |
X (arg ? CLOCAL : 0));
@@ -1578,26 +1563,16 @@
X #ifdef ISDN_DEBUG_MODEM_IOCTL
X printk(KERN_DEBUG "ttyI%d ioctl TIOCMGET\n", info->line);
X #endif
- error = verify_area(VERIFY_WRITE, (void *) arg, sizeof(uint));
- if (error)
- return error;
X return isdn_tty_get_modem_info(info, (uint *) arg);


X case TIOCMBIS:
X case TIOCMBIC:
X case TIOCMSET:

- error = verify_area(VERIFY_READ, (void *) arg, sizeof(uint));
- if (error)
- return error;
X return isdn_tty_set_modem_info(info, cmd, (uint *) arg);
X case TIOCSERGETLSR: /* Get line status register */
X #ifdef ISDN_DEBUG_MODEM_IOCTL
X printk(KERN_DEBUG "ttyI%d ioctl TIOCSERGETLSR\n", info->line);
X #endif
- error = verify_area(VERIFY_WRITE, (void *) arg, sizeof(uint));
- if (error)
- return error;
- else
- return isdn_tty_get_lsr_info(info, (uint *) arg);
+ return isdn_tty_get_lsr_info(info, (uint *) arg);
X default:
X #ifdef ISDN_DEBUG_MODEM_IOCTL
X printk(KERN_DEBUG "UNKNOWN ioctl 0x%08x on ttyi%d\n", cmd, info->line);
@@ -2734,6 +2709,10 @@
X if (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE)) {
X isdn_tty_at_cout("\r\nCALLER NUMBER: ", info);
X isdn_tty_at_cout(dev->num[info->drv_index], info);
+ if (m->mdmreg[REG_CDN] & BIT_CDN) {
+ isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
+ isdn_tty_at_cout(info->emu.cpn, info);
+ }
X }
X }
X isdn_tty_at_cout("\r\n", info);
@@ -2759,6 +2738,10 @@
X isdn_tty_at_cout("\r\n", info);
X isdn_tty_at_cout("CALLER NUMBER: ", info);
X isdn_tty_at_cout(dev->num[info->drv_index], info);
+ if (m->mdmreg[REG_CDN] & BIT_CDN) {
+ isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
+ isdn_tty_at_cout(info->emu.cpn, info);
+ }
X }
X break;
X case RESULT_NO_CARRIER:
@@ -3773,7 +3756,7 @@
X sprintf(ds, "\r\n%d", info->emu.charge);
X isdn_tty_at_cout(ds, info);
X break;
- default:
+ default:;
X }
X break;
X #ifdef DUMMY_HAYES_AT
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_tty.h linux/drivers/isdn/isdn_tty.h
--- v2.2.19/drivers/isdn/isdn_tty.h Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/isdn_tty.h Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_tty.h,v 1.22 2000/06/21 09:54:29 keil Exp $
+/* $Id: isdn_tty.h,v 1.22.6.1 2001/08/14 14:12:18 kai Exp $
X
X * header for Linux ISDN subsystem, tty related functions (linklevel).
X *
@@ -85,7 +85,10 @@
X
X #define REG_CPN 23
X #define BIT_CPN 1
+#define REG_CPNFCON 23
X #define BIT_CPNFCON 2
+#define REG_CDN 23
+#define BIT_CDN 4
X
X /* defines for result codes */
X #define RESULT_OK 0
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_ttyfax.c linux/drivers/isdn/isdn_ttyfax.c
--- v2.2.19/drivers/isdn/isdn_ttyfax.c Sun Mar 25 17:31:38 2001
+++ linux/drivers/isdn/isdn_ttyfax.c Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_ttyfax.c,v 1.7 2000/05/11 22:29:21 kai Exp $
+/* $Id: isdn_ttyfax.c,v 1.7.6.1 2001/08/14 14:12:18 kai Exp $
X
X * Linux ISDN subsystem, tty_fax AT-command emulator (linklevel).
X *
@@ -33,7 +33,7 @@
X #include "isdn_ttyfax.h"
X
X
-static char *isdn_tty_fax_revision = "$Revision: 1.7 $";
+static char *isdn_tty_fax_revision = "$Revision: 1.7.6.1 $";
X
X #define PARSE_ERROR1 { isdn_tty_fax_modem_result(1, info); return 1; }
X
@@ -86,7 +86,7 @@
X break;
X case 2: /* +FCON */
X /* Append CPN, if enabled */
- if ((m->mdmreg[REG_CPN] & BIT_CPNFCON) &&
+ if ((m->mdmreg[REG_CPNFCON] & BIT_CPNFCON) &&
X (!(dev->usage[info->isdn_channel] & ISDN_USAGE_OUTGOING))) {
X sprintf(rs, "/%s", m->cpn);
X isdn_tty_at_cout(rs, info);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_v110.c linux/drivers/isdn/isdn_v110.c
--- v2.2.19/drivers/isdn/isdn_v110.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/isdn_v110.c Wed Oct 10 01:40:56 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_v110.c,v 1.5.6.2 2001/02/10 14:41:19 kai Exp $
+/* $Id: isdn_v110.c,v 1.5.6.3 2001/02/16 16:43:23 kai Exp $
X
X * Linux ISDN subsystem, V.110 related functions (linklevel).
X *
@@ -30,7 +30,7 @@
X
X #undef ISDN_V110_DEBUG
X
-char *isdn_v110_revision = "$Revision: 1.5.6.2 $";
+char *isdn_v110_revision = "$Revision: 1.5.6.3 $";
X
X #define V110_38400 255
X #define V110_19200 15
@@ -70,7 +70,7 @@
X * FlipBits reorders sequences of keylen bits in one byte.
X * E.g. source order 7654321 will be converted to 45670123 when keylen = 4,
X * and to 67452301 when keylen = 2. This is necessary because ordering on
- * the isdn line is the the other way.
+ * the isdn line is the other way.
X */
X static __inline unsigned char
X FlipBits(unsigned char c, int keylen)
@@ -600,7 +600,7 @@
X case ISDN_PROTO_L2_V11038:
X dev->v110[idx] = isdn_v110_open(V110_38400, hdrlen, maxsize);
X break;
- default:
+ default:;
X }
X if ((v = dev->v110[idx])) {
X while (v->SyncInit) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdnloop/isdnloop.c linux/drivers/isdn/isdnloop/isdnloop.c
--- v2.2.19/drivers/isdn/isdnloop/isdnloop.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/isdnloop/isdnloop.c Wed Oct 10 01:40:56 2001
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.c,v 1.11.6.1 2000/12/17 16:47:18 kai Exp $
+/* $Id: isdnloop.c,v 1.11.6.3 2001/06/09 15:14:19 kai Exp $
X
X * ISDN low-level module implementing a dummy loop driver.
X *
@@ -26,7 +26,7 @@
X #include "isdnloop.h"
X
X static char
-*revision = "$Revision: 1.11.6.1 $";
+*revision = "$Revision: 1.11.6.3 $";
X
X static int isdnloop_addcard(char *);
X
@@ -41,10 +41,8 @@
X isdnloop_free_queue(isdnloop_card * card, int channel)
X {
X struct sk_buff_head *queue = &card->bqueue[channel];
- struct sk_buff *skb;
X
- while ((skb = skb_dequeue(queue)))
- dev_kfree_skb(skb);
+ skb_queue_purge(queue);
X card->sndcount[channel] = 0;
X }
X
@@ -977,7 +975,7 @@
X * user = flag: 1 = called form userlevel, 0 called from kernel.
X * card = pointer to card struct.
X * Return:
- * number of bytes transfered (currently always equals len).
+ * number of bytes transferred (currently always equals len).
X */
X static int
X isdnloop_writecmd(const u_char * buf, int len, int user, isdnloop_card * card)
@@ -1574,11 +1572,8 @@
X }
X card = cards;
X while (card) {
- struct sk_buff *skb;
-
X last = card;
- while ((skb = skb_dequeue(&card->dqueue)))
- dev_kfree_skb(skb);
+ skb_queue_purge(&card->dqueue);
X card = card->next;
X kfree(last);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/callbacks.c linux/drivers/isdn/pcbit/callbacks.c
--- v2.2.19/drivers/isdn/pcbit/callbacks.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/callbacks.c Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/callbacks.h linux/drivers/isdn/pcbit/callbacks.h
--- v2.2.19/drivers/isdn/pcbit/callbacks.h Sun Mar 25 17:31:37 2001
+++ linux/drivers/isdn/pcbit/callbacks.h Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/capi.c linux/drivers/isdn/pcbit/capi.c
--- v2.2.19/drivers/isdn/pcbit/capi.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/capi.c Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/capi.h linux/drivers/isdn/pcbit/capi.h
--- v2.2.19/drivers/isdn/pcbit/capi.h Sun Mar 25 17:31:37 2001
+++ linux/drivers/isdn/pcbit/capi.h Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/drv.c linux/drivers/isdn/pcbit/drv.c
--- v2.2.19/drivers/isdn/pcbit/drv.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/drv.c Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/edss1.c linux/drivers/isdn/pcbit/edss1.c
--- v2.2.19/drivers/isdn/pcbit/edss1.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/edss1.c Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/edss1.h linux/drivers/isdn/pcbit/edss1.h
--- v2.2.19/drivers/isdn/pcbit/edss1.h Sun Mar 25 17:31:37 2001
+++ linux/drivers/isdn/pcbit/edss1.h Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/layer2.c linux/drivers/isdn/pcbit/layer2.c
--- v2.2.19/drivers/isdn/pcbit/layer2.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/layer2.c Wed Oct 10 01:40:56 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/layer2.h linux/drivers/isdn/pcbit/layer2.h
--- v2.2.19/drivers/isdn/pcbit/layer2.h Sun Mar 25 17:31:37 2001
+++ linux/drivers/isdn/pcbit/layer2.h Wed Oct 10 01:40:57 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/module.c linux/drivers/isdn/pcbit/module.c
--- v2.2.19/drivers/isdn/pcbit/module.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/module.c Wed Oct 10 01:40:57 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/pcbit/pcbit.h linux/drivers/isdn/pcbit/pcbit.h
--- v2.2.19/drivers/isdn/pcbit/pcbit.h Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/pcbit/pcbit.h Wed Oct 10 01:40:57 2001
@@ -4,7 +4,7 @@
X * Written by Pedro Roque Marques (ro...@di.fc.ul.pt)
X *
X * This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
X */
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/sc/interrupt.c linux/drivers/isdn/sc/interrupt.c
--- v2.2.19/drivers/isdn/sc/interrupt.c Sun Mar 25 17:31:38 2001
+++ linux/drivers/isdn/sc/interrupt.c Wed Oct 10 01:40:57 2001
@@ -1,5 +1,5 @@
X /*
- * $Id: interrupt.c,v 1.4 1998/01/31 22:10:52 keil Exp $
+ * $Id: interrupt.c,v 1.4.8.2 2001/04/08 17:51:43 kai Exp $
X * Copyright (C) 1996 SpellCaster Telecommunications Inc.
X *
X * This program is free software; you can redistribute it and/or modify
@@ -34,7 +34,6 @@
X
X extern int indicate_status(int, int, ulong, char *);
X extern void check_phystat(unsigned long);
-extern void dump_messages(int);
X extern int receivemessage(int, RspMessage *);
X extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
X unsigned int, unsigned int, unsigned int, unsigned int *);
@@ -141,7 +140,7 @@
X }
X else if(callid>=0x0000 && callid<=0x7FFF)
X {
- pr_debug("%s: Got Incomming Call\n", adapter[card]->devicename);
+ pr_debug("%s: Got Incoming Call\n", adapter[card]->devicename);
X strcpy(setup.phone,&(rcvmsg.msg_data.byte_array[4]));
X strcpy(setup.eazmsn,adapter[card]->channel[rcvmsg.phy_link_no-1].dn);
X setup.si1 = 7;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/sc/message.c linux/drivers/isdn/sc/message.c
--- v2.2.19/drivers/isdn/sc/message.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/isdn/sc/message.c Wed Oct 10 01:40:57 2001
@@ -1,5 +1,5 @@
X /*
- * $Id: message.c,v 1.5 1999/09/04 06:20:07 keil Exp $
+ * $Id: message.c,v 1.5.8.1 2001/04/08 17:51:43 kai Exp $
X * Copyright (C) 1996 SpellCaster Telecommunications Inc.
X *
X * message.c - functions for sending and receiving control messages
@@ -38,55 +38,12 @@
X extern unsigned int cinst;
X
X /*
- * Obligitory function prototypes
+ * Obligatory function prototypes
X */
X extern int indicate_status(int,ulong,char*);
X extern int scm_command(isdn_ctrl *);
X extern void *memcpy_fromshmem(int, void *, const void *, size_t);
X
-/*
- * Dump message queue in shared memory to screen
- */
-void dump_messages(int card)
-{
- DualPortMemory dpm;
- unsigned long flags;
-
- int i =0;
-
- if (!IS_VALID_CARD(card)) {
- pr_debug("Invalid param: %d is not a valid card id\n", card);
- }
-
- save_flags(flags);
- cli();
- outb(adapter[card]->ioport[adapter[card]->shmem_pgport],
- (adapter[card]->shmem_magic >> 14) | 0x80);
- memcpy_fromshmem(card, &dpm, 0, sizeof(dpm));
- restore_flags(flags);
-
- pr_debug("%s: Dumping Request Queue\n", adapter[card]->devicename);
- for (i = 0; i < dpm.req_head; i++) {
- pr_debug("%s: Message #%d: (%d,%d,%d), link: %d\n",
- adapter[card]->devicename, i,
- dpm.req_queue[i].type,
- dpm.req_queue[i].class,
- dpm.req_queue[i].code,
- dpm.req_queue[i].phy_link_no);
- }
-
- pr_debug("%s: Dumping Response Queue\n", adapter[card]->devicename);
- for (i = 0; i < dpm.rsp_head; i++) {
- pr_debug("%s: Message #%d: (%d,%d,%d), link: %d, status: %d\n",
- adapter[card]->devicename, i,
- dpm.rsp_queue[i].type,
- dpm.rsp_queue[i].class,
- dpm.rsp_queue[i].code,
- dpm.rsp_queue[i].phy_link_no,
- dpm.rsp_queue[i].rsp_status);
- }
-
-}
X
X /*
X * receive a message from the board
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/macintosh/mac_hid.c linux/drivers/macintosh/mac_hid.c
--- v2.2.19/drivers/macintosh/mac_hid.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/macintosh/mac_hid.c Wed Oct 10 01:40:58 2001
@@ -478,9 +478,19 @@
X #ifdef CONFIG_MAC_ADBKEYCODES
X memcpy(pc_key_maps_save, key_maps, sizeof(key_maps));
X
- if (!keyboard_sends_linux_keycodes)
+ if (!keyboard_sends_linux_keycodes) {
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate;
+ SYSRQ_KEY = 0x69;
+#endif
X memcpy(key_maps, mac_key_maps_save, sizeof(key_maps));
+ } else {
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ SYSRQ_KEY = 0x54;
X #endif
+ }
+#endif /* CONFIG_MAC_ADBKEYCODES */
X
X #ifdef CONFIG_MAC_EMUMOUSEBTN
X emumousebtn_input_register();
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/macintosh/via-pmu.c linux/drivers/macintosh/via-pmu.c
--- v2.2.19/drivers/macintosh/via-pmu.c Sun Mar 25 17:31:41 2001
+++ linux/drivers/macintosh/via-pmu.c Wed Oct 10 01:40:58 2001
@@ -1356,7 +1356,7 @@
X
X /* Make sure the decrementer won't interrupt us */
X asm volatile("mtdec %0" : : "r" (0x7fffffff));
- /* Make sure any pending DEC interrupt occuring while we did
+ /* Make sure any pending DEC interrupt occurring while we did
X * the above didn't re-enable the DEC */
X mb();
X asm volatile("mtdec %0" : : "r" (0x7fffffff));
@@ -1509,7 +1509,7 @@
X
X /* Make sure the decrementer won't interrupt us */
X asm volatile("mtdec %0" : : "r" (0x7fffffff));
- /* Make sure any pending DEC interrupt occuring while we did
+ /* Make sure any pending DEC interrupt occurring while we did
X * the above didn't re-enable the DEC */
X mb();
X asm volatile("mtdec %0" : : "r" (0x7fffffff));
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/misc/parport_pc.c linux/drivers/misc/parport_pc.c
--- v2.2.19/drivers/misc/parport_pc.c Sun Mar 25 17:31:41 2001
+++ linux/drivers/misc/parport_pc.c Wed Oct 10 01:40:59 2001
@@ -966,7 +966,7 @@
X printk (KERN_INFO
X "Unknown PCI parallel I/O card (%04x/%04x)\n"
X "Please send 'lspci' output to "
- "t...@cyberelk.demon.co.uk\n",
+ "t...@cyberelk.net\n",
X pcidev->vendor, pcidev->device);
X }
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/3c505.c linux/drivers/net/3c505.c
--- v2.2.19/drivers/net/3c505.c Sun Mar 25 17:31:16 2001
+++ linux/drivers/net/3c505.c Wed Oct 10 01:40:59 2001
@@ -617,7 +617,7 @@
X } else {
X skb_reserve(skb, 2);
X target = skb_put(skb, rlen);
- if (virt_to_bus(target + rlen) >= MAX_DMA_ADDRESS) {
+ if ((unsigned long)(target + rlen) >= MAX_DMA_ADDRESS) {
X adapter->current_dma.target = target;
X target = adapter->dma_buffer;
X } else {
@@ -1062,10 +1062,12 @@
X adapter->current_dma.direction = 1;
X adapter->current_dma.start_time = jiffies;
X
- target = virt_to_bus(skb->data);
- if ((target + nlen) >= MAX_DMA_ADDRESS) {
+ if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS) {
X memcpy(adapter->dma_buffer, skb->data, nlen);
X target = virt_to_bus(adapter->dma_buffer);
+ }
+ else {
+ target = virt_to_bus(skb->data);
X }
X adapter->current_dma.skb = skb;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/3c509.c linux/drivers/net/3c509.c
--- v2.2.19/drivers/net/3c509.c Sun Mar 25 17:31:15 2001
+++ linux/drivers/net/3c509.c Wed Oct 10 01:40:59 2001
@@ -180,12 +180,20 @@
X if (EISA_bus) {
X static int eisa_addr = 0x1000;
X while (eisa_addr < 0x9000) {
+ int device_id;
+
X ioaddr = eisa_addr;
X eisa_addr += 0x1000;
X
X /* Check the standard EISA ID register for an encoded '3Com'. */
X if (inw(ioaddr + 0xC80) != 0x6d50)
X continue;
+
+ /* Avoid conflict with 3c590, 3c592, 3c597, etc */
+ device_id = (inb(ioaddr + 0xC82)<<8) + inb(ioaddr + 0xC83);
+ if ((device_id & 0xFF00) == 0x5900) {
+ continue;
+ }
X
X /* Change the register set to the configuration window 0. */
X outw(SelectWindow | 0, ioaddr + 0xC80 + EL3_CMD);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/8139too.c linux/drivers/net/8139too.c
--- v2.2.19/drivers/net/8139too.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/8139too.c Wed Oct 31 14:14:58 2001
@@ -2,40 +2,41 @@
X
X 8139too.c: A RealTek RTL-8139 Fast Ethernet driver for Linux.
X
- Maintained by Jeff Garzik <jga...@mandrakesoft.com>
-
- Much code comes from Donald Becker's rtl8139.c driver,
- versions 1.13 and older. This driver was originally based
- on rtl8139.c version 1.07. Header of rtl8139.c version 1.13:
-
- -----<snip>-----
-
- Written 1997-2001 by Donald Becker.
- This software may be used and distributed according to the
- terms of the GNU General Public License (GPL), incorporated
- herein by reference. Drivers based on or derived from this
- code fall under the GPL and must retain the authorship,
- copyright and license notice. This file is not a complete
- program and may only be used when the entire operating
- system is licensed under the GPL.
-
- This driver is for boards based on the RTL8129 and RTL8139
- PCI ethernet chips.
-
- The author may be reached as bec...@scyld.com, or C/O Scyld
- Computing Corporation 410 Severn Ave., Suite 210 Annapolis
- MD 21403
-
- Support and updates available at
- http://www.scyld.com/network/rtl8139.html
-
- Twister-tuning table provided by Kinston
- <sha...@realtek.com.tw>.
-
- -----<snip>-----
+ Maintained by Jeff Garzik <jga...@mandrakesoft.com>


+ Copyright 2000,2001 Jeff Garzik

+
+ Much code comes from Donald Becker's rtl8139.c driver,
+ versions 1.13 and older. This driver was originally based
+ on rtl8139.c version 1.07. Header of rtl8139.c version 1.13:
+
+ -----<snip>-----
+
+ Written 1997-2001 by Donald Becker.
+ This software may be used and distributed according to the
+ terms of the GNU General Public License (GPL), incorporated
+ herein by reference. Drivers based on or derived from this
+ code fall under the GPL and must retain the authorship,
+ copyright and license notice. This file is not a complete
+ program and may only be used when the entire operating
+ system is licensed under the GPL.
+
+ This driver is for boards based on the RTL8129 and RTL8139
+ PCI ethernet chips.
+
+ The author may be reached as bec...@scyld.com, or C/O Scyld
+ Computing Corporation 410 Severn Ave., Suite 210 Annapolis
+ MD 21403
+
+ Support and updates available at
+ http://www.scyld.com/network/rtl8139.html
+
+ Twister-tuning table provided by Kinston
+ <sha...@realtek.com.tw>.
+
+ -----<snip>-----


X
X This software may be used and distributed according to the terms
- of the GNU Public License, incorporated herein by reference.

+ of the GNU General Public License, incorporated herein by reference.
X

X Contributors:
X
@@ -133,10 +134,12 @@
X problem by having an MMIO register write be immediately followed by
X an MMIO register read.
X
-2) The RTL-8129 is only supported in Donald Becker's rtl8139 driver.
-
X */
X
+#define DRV_NAME "8139too"
+#define DRV_VERSION "0.9.18-pre4"
+
+
X #include <linux/config.h>
X #include <linux/module.h>
X #include <linux/kernel.h>
@@ -148,13 +151,10 @@
X #include <linux/rtnetlink.h>
X #include <linux/delay.h>
X #include <asm/io.h>
+#include <asm/uaccess.h>
X
-
-#define RTL8139_VERSION "0.9.14-2.2"
-#define MODNAME "8139too"
-#define RTL8139_DRIVER_NAME MODNAME " FastEthernet driver " RTL8139_VERSION
-#define RTL8139_AUTHOR "Jeff Garzik <jga...@mandrakesoft.com>"
-#define PFX MODNAME ": "
+#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION
+#define PFX DRV_NAME ": "
X
X
X /* enable PIO instead of MMIO, if CONFIG_8139TOO_PIO is selected */
@@ -171,15 +171,15 @@
X
X #ifdef RTL8139_DEBUG


X /* note: prints function name for you */

-#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
+# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
X #else
-#define DPRINTK(fmt, args...)
+# define DPRINTK(fmt, args...)
X #endif
X
X #ifdef RTL8139_NDEBUG
-#define assert(expr) do {} while (0)
+# define assert(expr) do {} while (0)
X #else
-#define assert(expr) \
+# define assert(expr) \
X if(!(expr)) { \
X printk( "Assertion failed! %s,%s,%s,line=%d\n", \
X #expr,__FILE__,__FUNCTION__,__LINE__); \
@@ -187,7 +187,7 @@
X #endif
X
X #define dev_kfree_skb_irq(a) dev_kfree_skb(a)
-#define netif_wake_queue(dev) clear_bit(0, &dev->tbusy)
+#define netif_wake_queue(dev) do { clear_bit(0, &dev->tbusy); mark_bh(NET_BH); } while (0);
X #define netif_stop_queue(dev) set_bit(0, &dev->tbusy)
X
X static inline void netif_start_queue(struct device *dev)
@@ -282,7 +282,46 @@
X (rtl8139_pci_resource_end((dev_priv),(bar)) - \
X rtl8139_pci_resource_start((dev_priv),(bar)) + 1))
X
+#define RTL8139_PCI_ANY_ID 0xffff
+static inline struct pci_dev *rtl8139_pci_find_device(unsigned int vendor, unsigned int device, struct pci_dev *from)
+{
+ if (!from)
+ from = pci_devices;
+ else
+ from = from->next;
+ while (from && (!(from->vendor == vendor || vendor==RTL8139_PCI_ANY_ID) || !(from->device == device || device==RTL8139_PCI_ANY_ID)))
+ from = from->next;
+ return from;
+}
+
X #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define SIOCETHTOOL 0x8946 /* Ethtool interface */
+#define SIOCGMIIPHY 0x8947 /* Get address of MII PHY in use. */
+#define SIOCGMIIREG 0x8948 /* Read MII PHY register. */
+#define SIOCSMIIREG 0x8949 /* Write MII PHY register. */
+#define ETHTOOL_GSET 0x00000001 /* Get settings. */
+#define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */
+#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
+
+/* these strings are set to whatever the driver author decides... */
+struct ethtool_drvinfo {
+ u32 cmd;
+ char driver[32]; /* driver short name, "tulip", "eepro100" */
+ char version[32]; /* driver version string */
+ char fw_version[32]; /* firmware version string, if applicable */
+ char bus_info[32]; /* Bus info for this interface. For PCI
+ * devices, use pci_dev->slot_name. */
+ char reserved1[32];
+ char reserved2[32];
+};
+
+/* This structure is used in all SIOCxMIIxxx ioctl calls */
+struct mii_ioctl_data {
+ u16 phy_id;
+ u16 reg_num;
+ u16 val_in;
+ u16 val_out;
+};
X
X /* A few user-configurable values. */
X /* media options */
@@ -303,6 +342,7 @@
X #define RX_BUF_PAD 16
X #define RX_BUF_WRAP_PAD 2048 /* spare padding to handle lack of packet wrap */
X #define RX_BUF_TOT_LEN (RX_BUF_LEN + RX_BUF_PAD + RX_BUF_WRAP_PAD)
+#define RX_EARLY_THRESH 2
X
X /* Number of Tx descriptor registers. */
X #define NUM_TX_DESC 4
@@ -319,17 +359,18 @@
X #define TX_FIFO_THRESH 256 /* In bytes, rounded down to 32 byte units. */
X
X /* The following settings are log_2(bytes)-4: 0 == 16 bytes .. 6==1024, 7==end of packet. */
-#define RX_FIFO_THRESH 6 /* Rx buffer level before first PCI xfer. */
-#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
+#define RX_FIFO_THRESH 7 /* Rx buffer level before first PCI xfer. */
+#define RX_DMA_BURST 7 /* Maximum PCI burst, '6' is 1024 */
X #define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
X
X
X /* Operational parameters that usually are not changed. */
X /* Time in jiffies before concluding the transmitter is hung. */
-#define TX_TIMEOUT (HZ/2)
+#define TX_TIMEOUT (6*HZ)
X
X
X enum {
+ RTL_PCI_64BIT = 0x0100,
X HAS_MII_XCVR = 0x010000,
X HAS_CHIP_XCVR = 0x020000,
X HAS_LNK_CHNG = 0x040000,
@@ -345,7 +386,7 @@
X RTL8139 = 0,
X RTL8139_CB,
X SMC1211TX,
- /*MPX5030,*/
+ MPX5030,
X DELTA8139,
X ADDTRON8139,
X DFE538TX,
@@ -360,11 +401,11 @@
X } board_info[] = {
X { "RealTek RTL8139 Fast Ethernet", RTL8139_CAPS },
X { "RealTek RTL8139B PCI/CardBus", RTL8139_CAPS },
- { "SMC1211TX EZCard 10/100 (RealTek RTL8139)", RTL8139_CAPS },
-/* { MPX5030, "Accton MPX5030 (RealTek RTL8139)", RTL8139_CAPS },*/
+ { "SMC1211TX EZCard 10/100 (RealTek RTL8139)", RTL8139_CAPS | (RTL_PCI_64BIT | 2)},
+ { "Accton MPX5030 (RealTek RTL8139)", RTL8139_CAPS | (RTL_PCI_64BIT | 2)},
X { "Delta Electronics 8139 10/100BaseTX", RTL8139_CAPS },
X { "Addtron Technolgy 8139 10/100BaseTX", RTL8139_CAPS },
- { "D-Link DFE-538TX (RealTek RTL8139)", RTL8139_CAPS },
+ { "D-Link DFE-538TX (RealTek RTL8139)", RTL8139_CAPS | (RTL_PCI_64BIT | 1)},
X { "RealTek RTL8129", RTL8129_CAPS },
X };
X
@@ -377,11 +418,18 @@
X {0x10ec, 0x8139, RTL8139 },
X {0x10ec, 0x8138, RTL8139_CB },
X {0x1113, 0x1211, SMC1211TX },
-/* {0x1113, 0x1211, MPX5030 },*/
+ {0x1113, 0x1211, MPX5030 },
X {0x1500, 0x1360, DELTA8139 },
X {0x4033, 0x1360, ADDTRON8139 },
X {0x1186, 0x1300, DFE538TX },
+#ifdef CONFIG_8139TOO_8129
X {0x10ec, 0x8129, RTL8129 },
+#endif
+ /* some crazy card report invalid vendor IDs,
+ * catch this. RTL8139_PCI_ANY_ID means match anything
+ * 1KJD 2001-04-08
+ */
+ {RTL8139_PCI_ANY_ID, 0x8139, RTL8139 },
X {0,}
X };
X
@@ -457,7 +505,10 @@
X TxOK = 0x04,
X RxErr = 0x02,
X RxOK = 0x01,
+
+ RxAckBits = RxFIFOOver | RxOverflow | RxOK,
X };
+
X enum TxStatusBits {
X TxHostOwns = 0x2000,
X TxUnderrun = 0x4000,
@@ -506,10 +557,17 @@
X Cfg1_VPD_Enable = 0x02,
X Cfg1_PIO = 0x04,
X Cfg1_MMIO = 0x08,
- Cfg1_LWAKE = 0x10,
+ LWAKE = 0x10, /* not on 8139, 8139A */
X Cfg1_Driver_Load = 0x20,
X Cfg1_LED0 = 0x40,
X Cfg1_LED1 = 0x80,
+ SLEEP = (1 << 1), /* only on 8139, 8139A */
+ PWRDN = (1 << 0), /* only on 8139, 8139A */
+};
+
+/* Bits in Config4 */
+enum Config4Bits {
+ LWPTN = (1 << 2), /* not on 8139, 8139A */
X };
X
X enum RxConfigBits {
@@ -577,45 +635,62 @@
X CH_8139C,
X } chip_t;
X
+enum chip_flags {
+ HasHltClk = (1 << 0),
+ HasLWake = (1 << 1),
+};
+
X
X /* directly indexed by chip_t, above */
X const static struct {
X const char *name;
X u8 version; /* from RTL8139C docs */
X u32 RxConfigMask; /* should clear the bits supported by this chip */
+ u32 flags;
X } rtl_chip_info[] = {
X { "RTL-8139",
X 0x40,
X 0xf0fe0040, /* XXX copied from RTL8139A, verify */
+ HasHltClk,
X },
X
X { "RTL-8139 rev K",
X 0x60,
X 0xf0fe0040,
+ HasHltClk,
X },
X
X { "RTL-8139A",
X 0x70,
X 0xf0fe0040,
+ HasHltClk, /* XXX undocumented? */
X },
X
X { "RTL-8139B",
X 0x78,
- 0xf0fc0040
+ 0xf0fc0040,
+ HasLWake,
X },
X
X { "RTL-8130",
X 0x7C,
X 0xf0fe0040, /* XXX copied from RTL8139A, verify */
+ HasLWake,
X },
X
X { "RTL-8139C",
X 0x74,
X 0xf0fc0040, /* XXX copied from RTL8139B, verify */
+ HasLWake,
X },
X
X };
X
+struct rtl_extra_stats {
+ unsigned long early_rx;
+ unsigned long tx_buf_mapped;
+ unsigned long tx_timeouts;
+};
X
X struct rtl8139_private {
X void *mmio_addr;
@@ -634,7 +709,7 @@
X unsigned char *tx_bufs; /* Tx bounce buffer region. */
X dma_addr_t rx_ring_dma;
X dma_addr_t tx_bufs_dma;
- char phys[4]; /* MII device addresses. */
+ signed char phys[4]; /* MII device addresses. */
X u16 advertising; /* NWay media advertisement */
X char twistie, twist_row, twist_col; /* Twister tune state. */
X unsigned int full_duplex:1; /* Full-duplex operation requested. */
@@ -648,9 +723,21 @@
X pid_t thr_pid;
X wait_queue_head_t thr_wait;
X struct semaphore thr_exited;
+ u32 rx_config;
+ struct rtl_extra_stats xstats;
X };
X
-
+#define RTL8139_AUTHOR "Jeff Garzik <jga...@mandrakesoft.com>"
+MODULE_AUTHOR (RTL8139_AUTHOR);
+MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver");
+MODULE_PARM (multicast_filter_limit, "i");
+MODULE_PARM (max_interrupt_work, "i");
+MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM_DESC (multicast_filter_limit, "8139too maximum number of filtered multicast addresses");
+MODULE_PARM_DESC (max_interrupt_work, "8139too maximum events handled per interrupt");
+MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps");
+MODULE_PARM_DESC (full_duplex, "8139too: Force full duplex for board(s) (1)");
X
X static int read_eeprom (void *ioaddr, int location, int addr_len);
X static int rtl8139_open (struct device *dev);
@@ -665,7 +752,7 @@
X static void rtl8139_interrupt (int irq, void *dev_instance,
X struct pt_regs *regs);
X static int rtl8139_close (struct device *dev);
-static int mii_ioctl (struct device *dev, struct ifreq *rq, int cmd);
+static int netdev_ioctl (struct device *dev, struct ifreq *rq, int cmd);
X static struct net_device_stats *rtl8139_get_stats (struct device *dev);
X static inline u32 ether_crc (int length, unsigned char *data);
X static void rtl8139_set_rx_mode (struct device *dev);
@@ -704,6 +791,7 @@
X #define RTL_W32_F(reg, val32) do { writel ((val32), ioaddr + (reg)); readl (ioaddr + (reg)); } while (0)
X
X
+#define MMIO_FLUSH_AUDIT_COMPLETE 1
X #if MMIO_FLUSH_AUDIT_COMPLETE
X
X /* write MMIO register */
@@ -733,40 +821,86 @@
X TxErr | TxOK | RxErr | RxOK;
X
X static const unsigned int rtl8139_rx_config =
- RxCfgEarlyRxNone | RxCfgRcv32K | RxNoWrap |
+ (RX_EARLY_THRESH << RxCfgEarlyRxShift) | RxCfgRcv32K | RxNoWrap |
X (RX_FIFO_THRESH << RxCfgFIFOShift) |
X (RX_DMA_BURST << RxCfgDMAShift);
X
X
-static int rtl8139_init_board (struct pci_dev *pdev, struct device **dev_out,
- void **ioaddr_out)
+static void __rtl8139_cleanup_dev (struct device *dev)
+{
+ struct rtl8139_private *tp;


+ struct pci_dev *pdev;
+

+ assert (dev != NULL);
+ assert (dev->priv != NULL);
+
+ tp = dev->priv;
+ assert (tp->pci_dev != NULL);
+ pdev = tp->pci_dev;
+
+#ifndef USE_IO_OPS
+ if (tp->mmio_addr)
+ iounmap (tp->mmio_addr);
+#endif /* !USE_IO_OPS */
+
+#ifndef RTL8139_NDEBUG
+ /* poison memory before freeing */
+ memset (dev, 0xBC,
+ sizeof (struct device) +
+ sizeof (struct rtl8139_private));
+#endif /* RTL8139_NDEBUG */
+
+ kfree (dev);
+}
+
+
+static void rtl8139_chip_reset (void *ioaddr)


+{
+ int i;
+

+ /* Soft reset the chip. */
+ RTL_W8 (ChipCmd, CmdReset);
+
+ /* Check that the chip has finished the reset. */
+ for (i = 1000; i > 0; i--) {
+ barrier();
+ if ((RTL_R8 (ChipCmd) & CmdReset) == 0)
+ break;
+ udelay (10);
+ }
+}
+
+
+static int rtl8139_init_board (struct pci_dev *pdev,
+ struct device **dev_out,
+ u32 hwflags)
X {
- void *ioaddr = NULL;
+ void *ioaddr;
X struct device *dev;
X struct rtl8139_private *tp;
X u8 tmp8;
- int rc, i;
+ int rc;
+ unsigned int i;
X u32 pio_start, pio_end, pio_flags, pio_len;
X unsigned long mmio_start, mmio_end, mmio_flags, mmio_len;
+ unsigned short pci_command, new_command;
X u32 tmp;
- u16 pci_command, new_command;


X
X DPRINTK ("ENTER\n");
X

X assert (pdev != NULL);
- assert (ioaddr_out != NULL);
X
- *ioaddr_out = NULL;
X *dev_out = NULL;
X
- /* dev zeroed in init_etherdev */
+ /* dev and dev->priv zeroed in init_etherdev */
X dev = init_etherdev (NULL, sizeof (*tp));
X if (dev == NULL) {
- printk (KERN_ERR PFX "unable to alloc new ethernet\n");
+ printk (KERN_ERR PFX "Unable to alloc new ethernet device\n");
X DPRINTK ("EXIT, returning -ENOMEM\n");
X return -ENOMEM;
X }
X tp = dev->priv;
+ tp->pci_dev = pdev;
X
X rtl8139_read_pci_resources(pdev, &tp->rtl8139_pci_resource[0]);
X
@@ -779,96 +913,84 @@
X mmio_end = rtl8139_pci_resource_end (tp, 1);
X mmio_flags = rtl8139_pci_resource_flags (tp, 1);
X mmio_len = rtl8139_pci_resource_len (tp, 1);
+#ifdef __alpha__
+ /* handle 64 bit address space mapping */
+ if (hwflags & RTL_PCI_64BIT) {
+ u32 pci_ext64;
+ pcibios_read_config_dword(PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
+ ((hwflags & 0x0f) << 2) + 0x10, &pci_ext64);
+ pio_start |= (unsigned long) pci_ext64 << 32;
+ pio_end |= (unsigned long) pci_ext64 << 32;
+ mmio_start |= (unsigned long) pci_ext64 << 32;
+ mmio_end |= (unsigned long) pci_ext64 << 32;
+ }
+#endif
X
X /* set this immediately, we need to know before
X * we talk to the chip directly */
- DPRINTK("PIO region size == 0x%02X\n", pio_len);
- DPRINTK("MMIO region size == 0x%02lX\n", mmio_len);
- if (pio_len == RTL8139B_IO_SIZE)
- tp->chipset = CH_8139B;
+ DPRINTK("PIO region size at 0x%08lx == 0x%02X\n", (unsigned long) pio_start, pio_len);
+ DPRINTK("MMIO region size at 0x%08lx == 0x%02lX\n", (unsigned long) mmio_start, mmio_len);
X
+#ifdef USE_IO_OPS
X /* make sure PCI base addr 0 is PIO */
X if (!(pio_flags & IORESOURCE_IO)) {
- printk (KERN_ERR PFX "region #0 not a PIO resource, aborting\n");
+ printk (KERN_ERR PFX "8139too: region #0 not a PIO resource, aborting\n");
X rc = -ENODEV;
X goto err_out;
X }
-
- /* make sure PCI base addr 1 is MMIO */
- if (!(mmio_flags & IORESOURCE_MEM)) {
- printk (KERN_ERR PFX "region #1 not an MMIO resource, aborting\n");
+ /* check for weird/broken PCI region reporting */
+ if (pio_len < RTL_MIN_IO_SIZE) {
+ printk (KERN_ERR PFX "8139too: Invalid PCI I/O region size(s), aborting\n");
X rc = -ENODEV;
X goto err_out;
X }
-
- /* check for weird/broken PCI region reporting */
- if ((pio_len < RTL_MIN_IO_SIZE) ||
- (mmio_len < RTL_MIN_IO_SIZE)) {
- printk (KERN_ERR PFX "Invalid PCI region size(s), aborting\n");
+#else
+ /* make sure PCI base addr 1 is MMIO */
+ if (!(mmio_flags & IORESOURCE_MEM)) {
+ printk (KERN_ERR PFX "8139too: region #1 not an MMIO resource, aborting\n");
X rc = -ENODEV;
X goto err_out;
X }
-
- /* make sure our PIO region in PCI space is available */
- if (check_region(pio_start, pio_len)) {
- printk (KERN_ERR PFX "no I/O resource available, aborting\n");
- rc = -EBUSY;
+ if (mmio_len < RTL_MIN_IO_SIZE) {
+ printk (KERN_ERR PFX "8139too: Invalid PCI mem region size(s), aborting\n");
+ rc = -ENODEV;
X goto err_out;
X }
+#endif
X request_region(pio_start, pio_len, dev->name);
X
X pci_set_master (pdev);
X
X #ifdef USE_IO_OPS
X ioaddr = (void *) pio_start;
+ dev->base_addr = pio_start;
X #else
X /* ioremap MMIO region */
- ioaddr = ioremap_nocache(mmio_start, mmio_len);
-
+ ioaddr = ioremap_nocache(mmio_start, mmio_len);
X if (ioaddr == NULL) {
X printk (KERN_ERR PFX "cannot remap MMIO, aborting\n");
X rc = -EIO;
- goto err_out_free_mmio;
+ goto err_out;
X }
+ dev->base_addr = (long) ioaddr;
X #endif /* USE_IO_OPS */
+ tp->mmio_addr = ioaddr;
X
X /* Activate the card: fix for brain-damaged Win98 BIOSes. */
X pci_read_config_word(pdev, PCI_COMMAND, &pci_command);
X new_command = pci_command | PCI_USES_IO | PCI_USES_MEM | PCI_USES_MASTER;
X if (pci_command != new_command)
X pci_write_config_word(pdev, PCI_COMMAND, new_command);
-
- /* Soft reset the chip. */
- RTL_W8 (ChipCmd, (RTL_R8 (ChipCmd) & ChipCmdClear) | CmdReset);
-
- /* Check that the chip has finished the reset. */
- for (i = 10000; i > 0; i--)
- if ((RTL_R8 (ChipCmd) & CmdReset) == 0)
- break;
- else
- udelay (10);
X
- /* Bring the chip out of low-power mode. */
- if (tp->chipset == CH_8139B) {
- RTL_W8 (Config1, RTL_R8 (Config1) & ~(1<<4));
- RTL_W8 (Config4, RTL_R8 (Config4) & ~(1<<2));
- } else {
- /* handle RTL8139A and RTL8139 cases */
- /* XXX from becker driver. is this right?? */
- RTL_W8 (Config1, 0);
- }
+ /* Bring old chips out of low-power mode. */
+ RTL_W8 (HltClk, 'R');
X
- /* make sure chip thinks PIO and MMIO are enabled */
- tmp8 = RTL_R8 (Config1);
- if ((tmp8 & Cfg1_PIO) == 0) {
- printk (KERN_ERR PFX "PIO not enabled, Cfg1=%02X, aborting\n", tmp8);
+ /* check for missing/broken hardware */
+ if (RTL_R32 (TxConfig) == 0xFFFFFFFF) {
+ printk (KERN_ERR PFX "slot %u: Chip not responding, ignoring board\n",
+ PCI_SLOT(pdev->devfn));
X rc = -EIO;
- goto err_out_iounmap;
- }
- if ((tmp8 & Cfg1_MMIO) == 0) {
- printk (KERN_ERR PFX "MMIO not enabled, Cfg1=%02X, aborting\n", tmp8);
- rc = -EIO;
- goto err_out_iounmap;


+ goto err_out;
X }
X

X /* identify chip attached to board */
@@ -891,21 +1013,38 @@
X tp->chipset,
X rtl_chip_info[tp->chipset].name);
X
+ if (tp->chipset >= CH_8139B) {
+ u8 new_tmp8 = tmp8 = RTL_R8 (Config1);
+ DPRINTK("PCI PM wakeup\n");
+ if ((rtl_chip_info[tp->chipset].flags & HasLWake) &&
+ (tmp8 & LWAKE))
+ new_tmp8 &= ~LWAKE;
+ new_tmp8 |= Cfg1_PM_Enable;
+ if (new_tmp8 != tmp8) {
+ RTL_W8 (Cfg9346, Cfg9346_Unlock);
+ RTL_W8 (Config1, tmp8);
+ RTL_W8 (Cfg9346, Cfg9346_Lock);
+ }
+ if (rtl_chip_info[tp->chipset].flags & HasLWake) {
+ tmp8 = RTL_R8 (Config4);
+ if (tmp8 & LWPTN)
+ RTL_W8 (Config4, tmp8 & ~LWPTN);
+ }
+ } else {
+ DPRINTK("Old chip wakeup\n");
+ tmp8 = RTL_R8 (Config1);
+ tmp8 &= ~(SLEEP | PWRDN);
+ RTL_W8 (Config1, tmp8);
+ }
+
+ rtl8139_chip_reset (ioaddr);
+


X DPRINTK ("EXIT, returning 0\n");

- *ioaddr_out = ioaddr;
X *dev_out = dev;
X return 0;
X
-err_out_iounmap:
- assert (ioaddr > 0);
-#ifndef USE_IO_OPS
- iounmap (ioaddr);
-#endif /* !USE_IO_OPS */
-err_out_free_mmio:
- release_region (pio_start, pio_len);
X err_out:
- unregister_netdev (dev);
- kfree (dev);
+ __rtl8139_cleanup_dev (dev);
X DPRINTK ("EXIT, returning %d\n", rc);
X return rc;
X }
@@ -915,9 +1054,8 @@
X struct device *dev = NULL;
X struct rtl8139_private *tp;
X int i, addr_len, option;
- void *ioaddr = NULL;
+ void *ioaddr;
X static int board_idx = -1;
- u8 tmp;


X
X DPRINTK ("ENTER\n");
X

@@ -926,13 +1064,14 @@
X
X board_idx++;
X
- i = rtl8139_init_board (pdev, &dev, &ioaddr);
+ i = rtl8139_init_board (pdev, &dev, board_info[ent->board].hw_flags);
X if (i < 0) {
X DPRINTK ("EXIT, returning %d\n", i);
X return i;
X }
X
X tp = dev->priv;
+ ioaddr = tp->mmio_addr;
X
X assert (ioaddr != NULL);
X assert (dev != NULL);
@@ -949,17 +1088,15 @@
X dev->stop = rtl8139_close;
X dev->get_stats = rtl8139_get_stats;
X dev->set_multicast_list = rtl8139_set_rx_mode;
- dev->do_ioctl = mii_ioctl;
+ dev->do_ioctl = netdev_ioctl;
X
X dev->irq = pdev->irq;
- dev->base_addr = (unsigned long) ioaddr;
X
X /* dev->priv/tp zeroed and aligned in init_etherdev */
X tp = dev->priv;
X
X /* note: tp->chipset set in rtl8139_init_board */
X tp->drv_flags = board_info[ent->board].hw_flags;
- tp->pci_dev = pdev;
X tp->mmio_addr = ioaddr;
X spin_lock_init (&tp->lock);
X init_waitqueue_head (&tp->thr_wait);
@@ -984,16 +1121,17 @@
X /* Find the connected MII xcvrs.
X Doing this in open() would allow detecting external xcvrs later, but
X takes too much time. */
+#ifdef CONFIG_8139TOO_8129
X if (tp->drv_flags & HAS_MII_XCVR) {
X int phy, phy_idx = 0;
X for (phy = 0; phy < 32 && phy_idx < sizeof(tp->phys); phy++) {
X int mii_status = mdio_read(dev, phy, 1);
X if (mii_status != 0xffff && mii_status != 0x0000) {
+ u16 advertising = mdio_read(dev, phy, 4);
X tp->phys[phy_idx++] = phy;
- tp->advertising = mdio_read(dev, phy, 4);
X printk(KERN_INFO "%s: MII transceiver %d status 0x%4.4x "
X "advertising %4.4x.\n",
- dev->name, phy, mii_status, tp->advertising);
+ dev->name, phy, mii_status, advertising);
X }
X }
X if (phy_idx == 0) {
@@ -1003,17 +1141,9 @@
X tp->phys[0] = 32;
X }
X } else
+#endif
X tp->phys[0] = 32;
X
- /* Put the chip into low-power mode. */
- RTL_W8_F (Cfg9346, Cfg9346_Unlock);
-
- tmp = RTL_R8 (Config1) & Config1Clear;
- tmp |= (tp->chipset == CH_8139B) ? 3 : 1; /* Enable PM/VPD */
- RTL_W8_F (Config1, tmp);
-
- RTL_W8_F (HltClk, 'H'); /* 'R' would leave the clock running. */
-
X /* The lower four bits are the media type. */
X option = (board_idx >= MAX_UNITS) ? 0 : media[board_idx];
X if (option > 0) {
@@ -1025,7 +1155,7 @@
X if (board_idx < MAX_UNITS && full_duplex[board_idx] > 0)
X tp->full_duplex = full_duplex[board_idx];
X if (tp->full_duplex) {
- printk (KERN_INFO "%s: Media type forced to Full Duplex.\n", dev->name);
+ printk(KERN_INFO "%s: Media type forced to Full Duplex.\n", dev->name);
X /* Changing the MII-advertised media because might prevent
X re-connection. */
X tp->duplex_lock = 1;
@@ -1040,7 +1170,10 @@
X }
X
X rtl8139_device_tab[rtl8139_device_count++] = dev;
-
+ /* Put the chip into low-power mode. */
+ if (rtl_chip_info[tp->chipset].flags & HasHltClk)
+ RTL_W8 (HltClk, 'H'); /* 'R' would leave the clock running. */
+
X DPRINTK ("EXIT - returning 0\n");
X return 0;
X }
@@ -1062,24 +1195,12 @@
X
X unregister_netdev (dev);
X
-#ifndef USE_IO_OPS
- iounmap (np->mmio_addr);
-#endif /* !USE_IO_OPS */
-
- release_region (rtl8139_pci_resource_start (np, 0),
- rtl8139_pci_resource_len (np, 0));
-#ifndef RTL8139_NDEBUG
- /* poison memory before freeing */
- memset (dev, 0xBC,
- sizeof (struct device) +
- sizeof (struct rtl8139_private));
-#endif /* RTL8139_NDEBUG */
-
- kfree (dev);
+ __rtl8139_cleanup_dev (dev);
X
X DPRINTK ("EXIT\n");
X }
X
+
X /* Serial EEPROM section. */
X
X /* EEPROM_Ctrl bits. */
@@ -1171,7 +1292,7 @@
X 0
X };
X
-
+#ifdef CONFIG_8139TOO_8129
X /* Syncronize the MII management interface by shifting 32 one bits out. */
X static void mdio_sync (void *mdio_addr)
X {
@@ -1188,15 +1309,17 @@
X
X DPRINTK ("EXIT\n");
X }
-
+#endif
X
X static int mdio_read (struct device *dev, int phy_id, int location)
X {
X struct rtl8139_private *tp = dev->priv;
- void *mdio_addr = tp->mmio_addr + Config4;
- int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 20'
echo 'File patch-2.2.20 is continued in part 21'
echo "21" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:02 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part03

#!/bin/sh -x
# this is part 03 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 03; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X actually function correctly. Similarly, not all motherboards have a BIOS that
X properly initializes the AcceleRAID 250, AcceleRAID 200, AcceleRAID 150,
X DAC960PJ, and DAC960PG because the Intel i960RD/RP is a multi-function device.
-If in doubt, contact Mylex RAID Technical Support (sup...@mylex.com) to verify
-compatibility. Mylex makes available a hard disk compatibility list at
+If in doubt, contact Mylex RAID Technical Support (myle...@us.ibm.com) to
+verify compatibility. Mylex makes available a hard disk compatibility list at
X http://www.mylex.com/support/hdcomp/hd-lists.html.
X
X
X DRIVER INSTALLATION
X
-This distribution was prepared for Linux kernel version 2.2.18 or 2.4.1.
+This distribution was prepared for Linux kernel version 2.2.19 or 2.4.12.
X
X To install the DAC960 RAID driver, you may use the following commands,
X replacing "/usr/src" with wherever you keep your Linux kernel source tree:
X
X cd /usr/src
- tar -xvzf DAC960-2.2.10.tar.gz (or DAC960-2.4.10.tar.gz)
+ tar -xvzf DAC960-2.2.11.tar.gz (or DAC960-2.4.11.tar.gz)
X mv README.DAC960 linux/Documentation
X mv DAC960.[ch] linux/drivers/block
X patch -p0 < DAC960.patch (if DAC960.patch is included)
@@ -374,11 +371,14 @@
X
X The "make-online" command changes the physical drive <channel>:<target-id>
X from status DEAD to status ONLINE. In cases where multiple physical drives
- have been killed simultaneously, this command may be used to bring them
- back online, after which a consistency check is advisable.
+ have been killed simultaneously, this command may be used to bring all but
+ one of them back online, after which a rebuild to the final drive is
+ necessary.
X
X Warning: make-online should only be used on a dead physical drive that is
- an active part of a drive group, never on a standby drive.
+ an active part of a drive group, never on a standby drive. The command
+ should never be used on a dead drive that is part of a critical logical
+ drive; rebuild should be used if only a single drive is dead.
X
X make-standby <channel>:<target-id>
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/SubmittingDrivers linux/Documentation/SubmittingDrivers
--- v2.2.19/Documentation/SubmittingDrivers Sun Mar 25 17:37:29 2001
+++ linux/Documentation/SubmittingDrivers Wed Oct 10 01:40:42 2001
@@ -34,7 +34,7 @@
X This kernel tree is under active development. The same rules apply
X as 2.2 but you may wish to submit your driver via linux-kernel (see
X resources) and follow that list to track changes in API's. These
- should no longer be occuring as we are now in a code freeze.
+ should no longer be occurring as we are now in a code freeze.
X The final contact point for Linux 2.4 submissions is
X <torv...@transmeta.com>.
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/cciss.txt linux/Documentation/cciss.txt
--- v2.2.19/Documentation/cciss.txt Sun Mar 25 17:31:58 2001
+++ linux/Documentation/cciss.txt Wed Oct 10 01:40:42 2001
@@ -6,6 +6,8 @@
X This driver is known to work with the following cards:
X
X * SA 5300
+ * SA 5i
+ * SA 532
X
X If notes are not already created in the /dev/cciss directory
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/computone.txt linux/Documentation/computone.txt
--- v2.2.19/Documentation/computone.txt Sun Mar 25 17:31:59 2001
+++ linux/Documentation/computone.txt Fri Nov 2 15:42:29 2001
@@ -4,16 +4,14 @@
X
X Release Notes For Linux Kernel 2.2 and higher.
X These notes are for the drivers which have already been integrated into the
-kernel and have been tested on Linux kernels 2.0, 2.2, and 2.3.
+kernel and have been tested on Linux kernels 2.0, 2.2, 2.3, and 2.4.
X
-Version: 1.2.9
-Date: 04/12/2000
-Author: Andrew Manison <aman...@america.net>
-Testing: lar...@computone.com
+Version: 1.2.14
+Date: 11/01/2001
+Historical Author: Andrew Manison <aman...@america.net>
+Primary Author: Doug McNash
X Support: sup...@computone.com
-Fixes and Updates: Doug McNash <do...@computone.com>
-Proc Filesystem and Kernel Integration: Mike Warfield <m...@wittsend.com>
-
+Fixes and Updates: Mike Warfield <m...@wittsend.com>
X
X This file assumes that you are using the Computone drivers which are
X integrated into the kernel sources. For updating the drivers or installing
@@ -28,7 +26,7 @@
X products previous to the Intelliport II.
X
X This driver was developed on the v2.0.x Linux tree and has been tested up
-to v2.2.14; it will probably not work with earlier v1.X kernels,.
+to v2.4.14; it will probably not work with earlier v1.X kernels,.
X
X
X 2. QUICK INSTALLATION
@@ -42,7 +40,7 @@
X before or after drivers installation.
X
X Note the hardware address from the Computone ISA cards installed into
- the system. These are required for editing ip2.h or editing
+ the system. These are required for editing ip2.c or editing
X /etc/modules.conf, or for specification on the modprobe
X command line.
X
@@ -58,7 +56,7 @@
X Select (m) module for CONFIG_COMPUTONE under character
X devices. CONFIG_PCI and CONFIG_MODULES also may need to be set.
X c) Set address on ISA cards then:


- edit /usr/src/linux/drivers/char/ip2/ip2.h if needed

+ edit /usr/src/linux/drivers/char/ip2.c if needed
X or
X edit /etc/modules.conf if needed (module).
X or both to match this setting.
@@ -77,7 +75,8 @@
X Select (y) kernel for CONFIG_COMPUTONE under character
X devices. CONFIG_PCI may need to be set if you have PCI bus.
X c) Set address on ISA cards then:
- edit /usr/src/linux/drivers/char/ip2/ip2.h
+ edit /usr/src/linux/drivers/char/ip2.c
+ (Optional - may be specified on kernel command line now)
X d) Run "make dep"
X e) Run "make zImage" or whatever target you prefer.
X f) mv /usr/src/linux/arch/i386/boot/zImage to /boot.
@@ -86,6 +85,41 @@
X h) Reboot using this kernel
X i) run ip2mkdev (either the script below or the binary version)
X
+Kernel command line options:
+
+When compiling the driver into the kernel, io and irq may be
+compiled into the driver by editing ip2.c and setting the values for
+io and irq in the appropriate array. An alternative is to specify
+a command line parameter to the kernel at boot up.
+
+ ip2=io0,irq0,io1,irq1,io2,irq2,io3,irq3
+
+Note that this order is very different from the specifications for the
+modload parameters which have separate IRQ and IO specifiers.
+
+The io port also selects PCI (1) and EISA (2) boards.
+
+ io=0 No board
+ io=1 PCI board
+ io=2 EISA board
+ else ISA board io address
+
+You only need to specify the boards which are present.
+
+ Examples:
+
+ 2 PCI boards:
+
+ ip2=1,0,1,0
+
+ 1 ISA board at 0x310 irq 5:
+
+ ip2=0x310,5
+
+This can be added to and "append" option in lilo.conf similar to this:
+
+ append="ip2=1,0,1,0"
+
X
X 3. INSTALLATION
X
@@ -100,7 +134,7 @@
X The driver can be installed as a module (recommended) or built into the
X kernel. This is selected as for other drivers through the `make config`
X command from the root of the Linux source tree. If the driver is built

-into the kernel you will need to edit the file ip2.h to match the boards

+into the kernel you will need to edit the file ip2.c to match the boards
X you are installing. See that file for instructions. If the driver is
X installed as a module the configuration can also be specified on the
X modprobe command line as follows:
@@ -109,13 +143,13 @@
X
X where irqnum is one of the valid Intelliport II interrupts (3,4,5,7,10,11,
X 12,15) and addr1-4 are the base addresses for up to four controllers. If

-the irqs are not specified the driver uses the default in ip2/ip2.h (which

+the irqs are not specified the driver uses the default in ip2.c (which
X selects polled mode). If no base addresses are specified the defaults in
-ip2.h are used. If you are autoloading the driver module with kerneld or
-kmod the base addresses and interrupt number must also be set in ip2/ip2.h
+ip2.c are used. If you are autoloading the driver module with kerneld or
+kmod the base addresses and interrupt number must also be set in ip2.c
X and recompile or just insert and options line in /etc/modules.conf or both.
X The options line is equivalent to the command line and takes precidence over
-what is in ip2.h.
+what is in ip2.c.
X
X /etc/modules.conf sample:
X options ip2 io=1,0x328 irq=1,10
@@ -123,22 +157,18 @@
X alias char-major-72 ip2
X alias char-major-73 ip2
X
-equivelant ip2.h:


-static ip2config_t ip2config =
-{
- {1,10,0,0},
- {
- 0x0001, // Board 0, ttyF0 - ttyF63 /* PCI card */
- 0x0328, // Board 1, ttyF64 - ttyF127 /* ISA card */
- 0x0000, // Board 2, ttyF128 - ttyF191 /* empty */
- 0x0000 // Board 3, ttyF192 - ttyF255 /* empty */
- }
-};

+The equivalent in ip2.c:
+
+static int io[IP2_MAX_BOARDS]= { 1, 0x328, 0, 0 };
+static int irq[IP2_MAX_BOARDS] = { 1, 10, -1, -1 };
+
+The equivalent for the kernel command line (in lilo.conf):
+
+ append="ip2=1,1,0x328,10"
X
X
X Note: Both io and irq should be updated to reflect YOUR system. An "io"
- address of "1/2" indicates a PCI/EISA card in the board table. The
- PCI or EISA irq will be assigned automatically.
+ address of 1 or 2 indicates a PCI or EISA card in the board table. The PCI or EISA irq will be assigned automatically.
X
X Specifying an invalid or in-use irq will default the driver into
X running in polled mode for that card. If all irq entries are 0 then
@@ -162,18 +192,26 @@
X cuf0 - cuf255 for callout devices.
X
X If you are using devfs, existing devices are automatically created within
-the devfs name space. Normal devices will be ttf/0 - ttf/255 and callout
-devices will be cuf/0 - cuf/255. With devfs installed, ip2mkdev will
+the devfs name space. Normal devices will be tts/F0 - tts/F255 and callout
+devices will be cua/F0 - cua/F255. With devfs installed, ip2mkdev will
X create symbolic links in /dev from the old conventional names to the newer
X devfs names as follows:
X
X /dev/ip2ipl[n] -> /dev/ip2/ipl[n] n = 0 - 3
X /dev/ip2stat[n] -> /dev/ip2/stat[n] n = 0 - 3
- /dev/ttyF[n] -> /dev/ttf/[n] n = 0 - 255
- /dev/cuf[n] -> /dev/cuf/[n] n = 0 - 255
+ /dev/ttyF[n] -> /dev/tts/F[n] n = 0 - 255
+ /dev/cuf[n] -> /dev/cua/F[n] n = 0 - 255
X
X Only devices for existing ports and boards will be created.
X
+IMPORTANT NOTE: The naming convention used for devfs by this driver
+was changed from 1.2.12 to 1.2.13. The old naming convention was to
+use ttf/%d for the tty device and cuf/%d for the cua device. That
+has been changed to conform to an agreed-upon standard of placing
+all the tty devices under tts. The device names are now tts/F%d for
+the tty device and cua/F%d for the cua devices. If you were using
+the older devfs names, you must update for the newer convention.
+
X You do not need to run ip2mkdev if you are using devfs and only want to
X use the devfs native device names.
X
@@ -229,18 +267,26 @@
X documentation files, .../linux/Documentation/filesystems/devfs/REAME.
X
X If you are using devfs, existing devices are automatically created within
-the devfs name space. Normal devices will be ttf/0 - ttf/255 and callout
-devices will be cuf/0 - cuf/255. With devfs installed, ip2mkdev will
+the devfs name space. Normal devices will be tts/F0 - tts/F255 and callout
+devices will be cua/F0 - cua/F255. With devfs installed, ip2mkdev will
X create symbolic links in /dev from the old conventional names to the newer
X devfs names as follows:
X
X /dev/ip2ipl[n] -> /dev/ip2/ipl[n] n = 0 - 3
X /dev/ip2stat[n] -> /dev/ip2/stat[n] n = 0 - 3
- /dev/ttyF[n] -> /dev/ttf/[n] n = 0 - 255
- /dev/cuf[n] -> /dev/cuf/[n] n = 0 - 255
+ /dev/ttyF[n] -> /dev/tts/F[n] n = 0 - 255
+ /dev/cuf[n] -> /dev/cua/F[n] n = 0 - 255
X
X Only devices for existing ports and boards will be created.
X
+IMPORTANT NOTE: The naming convention used for devfs by this driver
+was changed from 1.2.12 to 1.2.13. The old naming convention was to
+use ttf/%d for the tty device and cuf/%d for the cua device. That
+has been changed to conform to an agreed-upon standard of placing
+all the tty devices under tts. The device names are now tts/F%d for
+the tty device and cua/F%d for the cua devices. If you were using
+the older devfs names, you must update for the newer convention.
+
X You do not need to run ip2mkdev if you are using devfs and only want to
X use the devfs native device names.
X
@@ -269,19 +315,19 @@
X
X
X #!/bin/sh
-# This is a shell archive (produced by GNU sharutils 4.2).
+# This is a shell archive (produced by GNU sharutils 4.2.1).
X # To extract the files from this archive, save it to some FILE, remove
X # everything before the `!/bin/sh' line above, then type `sh FILE'.
X #
-# Made on 2000-03-10 11:55 EST by <ro...@wittsend.wittsend.com>.
-# Source directory was `/mnt1/src/linux-2.3.50c/Documentation'.
+# Made on 2001-10-29 10:32 EST by <m...@alcove.wittsend.com>.
+# Source directory was `/home2/src/tmp'.
X #
X # Existing files will *not* be overwritten unless `-c' is specified.
X #
X # This shar contains:
X # length mode name
X # ------ ---------- ------------------------------------------
-# 4061 -rwxr-xr-x ip2mkdev
+# 4251 -rwxr-xr-x ip2mkdev
X #
X save_IFS="${IFS}"
X IFS="${IFS}:"
@@ -316,9 +362,12 @@
X export TEXTDOMAIN
X echo="$gettext_dir/gettext -s"
X fi
-touch -am 1231235999 $$.touch >/dev/null 2>&1
-if test ! -f 1231235999 && test -f $$.touch; then
- shar_touch=touch
+if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
+ shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
+elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
+ shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
+elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
+ shar_touch='touch -am $3$4$5$6$2 "$8"'
X else
X shar_touch=:
X echo
@@ -326,9 +375,9 @@
X $echo "installing GNU \`touch', distributed in GNU File Utilities..."
X echo
X fi
-rm -f 1231235999 $$.touch
+rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
X #
-if mkdir _sh17088; then
+if mkdir _sh17581; then
X $echo 'x -' 'creating lock directory'
X else
X $echo 'failed to create lock directory'
@@ -356,11 +405,14 @@
X # before running this script. Running this script will then recreate
X # all the valid devices.
X #
-# =mhw=
X # Michael H. Warfield
+# /\/\|=mhw=|\/\/
X # m...@wittsend.com
X #
-# Updated 03/09/2000 for devfs support in ip2 drivers. =mhw=
+# Updated 10/29/2000 for version 1.2.13 naming convention
+# under devfs. /\/\|=mhw=|\/\/
+#
+# Updated 03/09/2000 for devfs support in ip2 drivers. /\/\|=mhw=|\/\/
X #
X X
X if test -d /dev/ip2 ; then
@@ -375,18 +427,19 @@
X X ln -s ip2/$i ip2$i
X X fi
X X done
-X for i in `ls ttf` ; do
-X if test ! -L ttyF$i ; then
+X for i in `( cd tts ; ls F* )` ; do
+X if test ! -L tty$i ; then
X X # Remove it incase it wasn't a symlink (old device)
-X rm -f ttyF$i
-X ln -s ttyf/$i ttyF$i
+X rm -f tty$i
+X ln -s tts/$i tty$i
X X fi
X X done
-X for i in `ls cuf` ; do
-X if test ! -L cuf$i ; then
+X for i in `( cd cua ; ls F* )` ; do
+X DEVNUMBER=`expr $i : 'F\(.*\)'`
+X if test ! -L cuf$DEVNUMBER ; then
X X # Remove it incase it wasn't a symlink (old device)
-X rm -f cuf$i
-X ln -s cuf/$i cuf$i
+X rm -f cuf$DEVNUMBER
+X ln -s cua/$i cuf$DEVNUMBER
X X fi
X X done
X X exit 0
@@ -508,20 +561,20 @@
X X
X Xexit 0
X SHAR_EOF
- $shar_touch -am 03101153100 'ip2mkdev' &&
+ (set 20 01 10 29 10 32 01 'ip2mkdev'; eval "$shar_touch") &&
X chmod 0755 'ip2mkdev' ||
X $echo 'restore of' 'ip2mkdev' 'failed'
X if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
X && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
X md5sum -c << SHAR_EOF >/dev/null 2>&1 \
X || $echo 'ip2mkdev:' 'MD5 check failed'
-b0671abeba07b0a9266b70aaf24509b3 ip2mkdev
+cb5717134509f38bad9fde6b1f79b4a4 ip2mkdev
X SHAR_EOF
X else
X shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'ip2mkdev'`"
- test 4061 -eq "$shar_count" ||
- $echo 'ip2mkdev:' 'original size' '4061,' 'current size' "$shar_count!"
+ test 4251 -eq "$shar_count" ||
+ $echo 'ip2mkdev:' 'original size' '4251,' 'current size' "$shar_count!"
X fi
X fi
-rm -fr _sh17088
+rm -fr _sh17581
X exit 0
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/filesystems/fat_cvf.txt linux/Documentation/filesystems/fat_cvf.txt
--- v2.2.19/Documentation/filesystems/fat_cvf.txt Sun Mar 25 17:31:56 2001
+++ linux/Documentation/filesystems/fat_cvf.txt Mon Oct 22 10:46:17 2001
@@ -112,7 +112,7 @@
X int (*mount_cvf) (struct super_block*sb,char*options);
X int (*unmount_cvf) (struct super_block*sb);
X [...]
- void (*cvf_zero_cluster) (struct inode*inode,int clusternr);
+ void (*zero_out_cluster) (struct inode*, int clusternr);
X }
X
X This structure defines the capabilities of a CVF module. It must be filled
@@ -161,8 +161,8 @@
X functions. NULL means use the original FAT driver functions instead.
X If you really want "no action", write a function that does nothing and
X hang it in instead.
- - cvf_zero_cluster:
- The cvf_zero_cluster function is called when the fat driver wants to
+ - zero_out_cluster:
+ The zero_out_cluster function is called when the fat driver wants to
X zero out a (new) cluster. This is important for directories (mkdir).
X If it is NULL, the FAT driver defaults to overwriting the whole
X cluster with zeros. Note that clusternr is absolute, not relative
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/filesystems/vfs.txt linux/Documentation/filesystems/vfs.txt
--- v2.2.19/Documentation/filesystems/vfs.txt Sun Mar 25 17:31:56 2001
+++ linux/Documentation/filesystems/vfs.txt Wed Oct 10 01:40:42 2001
@@ -129,7 +129,7 @@
X name: the name of the filesystem type, such as "ext2", "iso9660",
X "msdos" and so on
X
- fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)
+ fs_flags: various flags (e.g. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)
X
X read_super: the method to call when a new instance of this
X filesystem should be mounted
@@ -403,7 +403,7 @@
X
X d_release: called when a dentry is deallocated
X
- d_iput: called when a dentry looses its inode (just prior to its
+ d_iput: called when a dentry loses its inode (just prior to its
X being deallocated). The default when this is NULL is that the
X VFS calls iput(). If you define this method, you must call
X iput() yourself
@@ -425,11 +425,11 @@
X unused list just means that if the system needs some RAM, it
X goes through the unused list of dentries and deallocates them.
X If the dentry has already been unhashed and the usage count
- drops to 0, in this case the dentry is deallocated after the
- "d_delete" method is called
+ drops to 0, the dentry is deallocated after the "d_delete"
+ method is called
X
X d_drop: this unhashes a dentry from its parents hash list. A
- subsequent call to dput() will dellocate the dentry if its
+ subsequent call to dput() will deallocate the dentry if its
X usage count drops to 0
X
X d_delete: delete a dentry. If there are no other open references to
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/i810_rng.txt linux/Documentation/i810_rng.txt
--- v2.2.19/Documentation/i810_rng.txt Thu Jan 1 01:00:00 1970
+++ linux/Documentation/i810_rng.txt Wed Oct 10 01:40:42 2001
@@ -0,0 +1,126 @@
+ Hardware driver for Intel i810 Random Number Generator (RNG)


+ Copyright 2000,2001 Jeff Garzik <jga...@mandrakesoft.com>
+ Copyright 2000,2001 Philipp Rumpf <pru...@mandrakesoft.com>

+
+Introduction:
+
+ The i810_rng device driver is software that makes use of a
+ special hardware feature on the Intel i8xx-based chipsets,
+ a Random Number Generator (RNG).
+
+ In order to make effective use of this device driver, you
+ should download the support software as well. Download the
+ latest version of the "intel-rng-tools" package from the
+ i810_rng driver's official Web site:
+
+ http://sourceforge.net/projects/gkernel/
+
+About the Intel RNG hardware, from the firmware hub datasheet:
+
+ The Firmware Hub integrates a Random Number Generator (RNG)
+ using thermal noise generated from inherently random quantum
+ mechanical properties of silicon. When not generating new random
+ bits the RNG circuitry will enter a low power state. Intel will
+ provide a binary software driver to give third party software
+ access to our RNG for use as a security feature. At this time,
+ the RNG is only to be used with a system in an OS-present state.
+
+Theory of operation:
+
+ Character driver. Using the standard open()
+ and read() system calls, you can read random data from
+ the i810 RNG device. This data is NOT CHECKED by any
+ fitness tests, and could potentially be bogus (if the
+ hardware is faulty or has been tampered with). Data is only
+ output if the hardware "has-data" flag is set, but nevertheless
+ a security-conscious person would run fitness tests on the
+ data before assuming it is truly random.
+
+ /dev/intel_rng is char device major 10, minor 183.
+
+Driver notes:
+
+ * FIXME: support poll(2)
+
+ NOTE: request_mem_region was removed, for two reasons:
+ 1) Only one RNG is supported by this driver, 2) The location
+ used by the RNG is a fixed location in MMIO-addressable memory,
+ 3) users with properly working BIOS e820 handling will always
+ have the region in which the RNG is located reserved, so
+ request_mem_region calls always fail for proper setups.
+ However, for people who use mem=XX, BIOS e820 information is
+ -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can
+ succeed.
+
+Driver details:
+
+ Based on:
+ Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet
+ May 1999 Order Number: 290658-002 R
+
+ Intel 82802 Firmware Hub: Random Number Generator
+ Programmer's Reference Manual
+ December 1999 Order Number: 298029-001 R
+
+ Intel 82802 Firmware HUB Random Number Generator Driver
+ Copyright (c) 2000 Matt Sottek <mso...@quiknet.com>
+
+ Special thanks to Matt Sottek. I did the "guts", he
+ did the "brains" and all the testing.
+
+Change history:
+
+ Version 0.9.6:
+ * Internal driver cleanups, prep for 1.0.0 release.
+
+ Version 0.9.5:
+ * Rip out entropy injection via timer. It never ever worked,
+ and a better solution (rngd) is now available.
+
+ Version 0.9.4:
+ * Fix: Remove request_mem_region
+ * Fix: Horrible bugs in FIPS calculation and test execution
+
+ Version 0.9.3:
+ * Clean up rng_read a bit.
+ * Update i810_rng driver Web site URL.
+ * Increase default timer interval to 4 samples per second.
+ * Abort if mem region is not available.
+ * BSS zero-initialization cleanup.
+ * Call misc_register() from rng_init_one.
+ * Fix O_NONBLOCK to occur before we schedule.
+
+ Version 0.9.2:
+ * Simplify open blocking logic
+
+ Version 0.9.1:
+ * Support i815 chipsets too (Matt Sottek)
+ * Fix reference counting when statically compiled (prumpf)
+ * Rewrite rng_dev_read (prumpf)
+ * Make module races less likely (prumpf)
+ * Small miscellaneous bug fixes (prumpf)
+ * Use pci table for PCI id list
+
+ Version 0.9.0:
+ * Don't register a pci_driver, because we are really
+ using PCI bridge vendor/device ids, and someone
+ may want to register a driver for the bridge. (bug fix)
+ * Don't let the usage count go negative (bug fix)
+ * Clean up spinlocks (bug fix)
+ * Enable PCI device, if necessary (bug fix)
+ * iounmap on module unload (bug fix)
+ * If RNG chrdev is already in use when open(2) is called,
+ sleep until it is available.
+ * Remove redundant globals rng_allocated, rng_use_count
+ * Convert numeric globals to unsigned
+ * Module unload cleanup
+
+ Version 0.6.2:
+ * Clean up spinlocks. Since we don't have any interrupts
+ to worry about, but we do have a timer to worry about,
+ we use spin_lock_bh everywhere except the timer function
+ itself.
+ * Fix module load/unload.
+ * Fix timer function and h/w enable/disable logic
+ * New timer interval sysctl
+ * Clean up sysctl names
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/ioctl-number.txt linux/Documentation/ioctl-number.txt
--- v2.2.19/Documentation/ioctl-number.txt Sun Mar 25 17:37:29 2001
+++ linux/Documentation/ioctl-number.txt Wed Oct 10 01:40:42 2001
@@ -102,7 +102,7 @@
X 'p' 00-3F linux/mc146818rtc.h
X 'p' 40-7F linux/nvram.h
X 'p' 80-9F user-space parport in development:
- <t...@cyberelk.demon.co.uk>
+ <t...@cyberelk.net>
X 'r' all linux/msdos_fs.h
X 's' all linux/cdk.h
X 't' 00-7F linux/if_ppp.h
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/isdn/HiSax.cert linux/Documentation/isdn/HiSax.cert
--- v2.2.19/Documentation/isdn/HiSax.cert Sun Mar 25 17:31:58 2001
+++ linux/Documentation/isdn/HiSax.cert Wed Oct 10 01:40:42 2001
@@ -20,6 +20,23 @@
X version and the tested hardware. Any changes to the HiSax source code may
X therefore affect the certification.
X
+Additional ITU approval tests have been carried out for all generic cards
+using Colognechip single chip solutions HFC-S PCI A for PCI cards as well
+as HFC-S USB based USB ISDN ta adapters.
+These tests included all layers 1-3 and as well all functional tests for
+the layer 1. Because all hardware based on these chips are complete ISDN
+solutions in one chip all cards and USB-TAs using these chips are to be
+regarded as approved for those tests. Some additional electrical tests
+of the layer 1 which are independant of the driver and related to a
+special hardware used will be regarded as approved if at least one
+solution has been tested including those electrical tests. So if cards
+or tas have been completely approved for any other os, the approval
+for those electrical tests is valid for linux, too.
+Please send any questions regarding this drivers or approval abouts to
+wer...@isdn-development.de
+Additional information and the type approval documents will be found
+shortly on the Colognechip website www.colognechip.com
+
X If you change the main files of the HiSax ISDN stack, the certification will
X become invalid. Because in most countries it is illegal to connect
X unapproved ISDN equipment to the public network, I have to guarantee that
@@ -50,6 +67,7 @@
X drivers/isdn/hisax/cert.c
X drivers/isdn/hisax/elsa.c
X drivers/isdn/hisax/diva.c
+drivers/isdn/hisax/hfc_pci.c
X
X Please send any changes, bugfixes and patches to me rather than implementing
X them directly into the HiSax sources.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/isdn/INTERFACE linux/Documentation/isdn/INTERFACE
--- v2.2.19/Documentation/isdn/INTERFACE Sun Mar 25 17:31:58 2001
+++ linux/Documentation/isdn/INTERFACE Wed Oct 10 01:40:42 2001
@@ -1,4 +1,4 @@
-$Id: INTERFACE,v 1.15 1999/08/25 20:02:13 werner Exp $
+$Id: INTERFACE,v 1.15.8.2 2001/03/13 16:17:07 kai Exp $
X
X Description of the Interface between Linklevel and Hardwarelevel
X of isdn4linux:
@@ -480,8 +480,8 @@
X Parameter:
X driver = driver-Id
X command = ISDN_CMD_PROT_IO
- arg = The lower 8 Bits define the adressed protocol as defined
- in ISDN_PTYPE..., the upper bits are used to differenciate
+ arg = The lower 8 Bits define the addressed protocol as defined
+ in ISDN_PTYPE..., the upper bits are used to differentiate
X the protocol specific CMD.
X
X para = protocol and function specific. See isdnif.h for detail.
@@ -734,7 +734,7 @@
X Parameter:
X driver = driver-Id
X command = ISDN_STAT_PROT
- arg = The lower 8 Bits define the adressed protocol as defined
+ arg = The lower 8 Bits define the addressed protocol as defined
X in ISDN_PTYPE..., the upper bits are used to differenciate
X the protocol specific STAT.
X
@@ -748,7 +748,7 @@
X loading the driver. The LL has to ignore a disabled channel when searching
X for free channels. The HL driver itself never delivers STAT callbacks for
X disabled channels.
- The LL returns a nonzero code if the operation was not successfull or the
+ The LL returns a nonzero code if the operation was not successful or the
X selected channel is actually regarded as busy.
X
X Parameter:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/isdn/README.HiSax linux/Documentation/isdn/README.HiSax
--- v2.2.19/Documentation/isdn/README.HiSax Sun Mar 25 17:37:29 2001
+++ linux/Documentation/isdn/README.HiSax Wed Oct 10 01:40:42 2001
@@ -69,12 +69,7 @@
X
X Note: PCF, PCF-Pro: up to now, only the ISDN part is supported
X PCC-8: not tested yet
- Teles PCMCIA is EXPERIMENTAL
- Teles 16.3c is EXPERIMENTAL
- Teles PCI is EXPERIMENTAL
- Teles S0Box is EXPERIMENTAL
X Eicon.Diehl Diva U interface not tested
- HFC-S+, HFC-SP/PCMCIA are experimental
X
X If you know other passive cards with the Siemens chipset, please let me know.
X To use the PNP cards you need the isapnptools.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/isdn/README.eicon linux/Documentation/isdn/README.eicon
--- v2.2.19/Documentation/isdn/README.eicon Sun Mar 25 17:37:29 2001
+++ linux/Documentation/isdn/README.eicon Wed Oct 10 01:40:42 2001
@@ -1,4 +1,4 @@
-$Id: README.eicon,v 1.10 2000/08/13 12:19:15 armin Exp $
+$Id: README.eicon,v 1.10.6.1 2001/02/19 10:04:59 armin Exp $
X
X (c) 1999,2000 Armin Schindler (m...@melware.de)
X (c) 1999,2000 Cytronics & Melware (in...@melware.de)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/networking/ip-sysctl.txt linux/Documentation/networking/ip-sysctl.txt
--- v2.2.19/Documentation/networking/ip-sysctl.txt Sun Mar 25 17:31:57 2001
+++ linux/Documentation/networking/ip-sysctl.txt Wed Oct 10 01:40:42 2001
@@ -39,6 +39,11 @@
X
X IP Fragmentation:
X
+ip_always_defrag - BOOLEAN
+ 0 - (DEFAULT) Normal setting for a normal router or host.
+ 1 - Reassemble all fragments before processing. Useful for
+ a firewall or transparent proxying hosts.
+
X ipfrag_high_thresh - INTEGER
X Maximum memory used to reassemble IP fragments. When
X ipfrag_high_thresh bytes of memory is allocated for this purpose,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/networking/sk98lin.txt linux/Documentation/networking/sk98lin.txt
--- v2.2.19/Documentation/networking/sk98lin.txt Sun Mar 25 17:31:57 2001
+++ linux/Documentation/networking/sk98lin.txt Wed Oct 10 01:40:42 2001
@@ -1,16 +1,17 @@
-(C)Copyright 1999 SysKonnect.
+(C)Copyright 1999-2001 SysKonnect GmbH.
+All rights reserved
X ===========================================================================
X
-sk98lin.txt created 11-Nov-1999
+sk98lin.txt created 07-Jun-2001
X
-Readme File for sk98lin.o v3.04
-SK-NET Gigabit Ethernet Adapter SK-98xx Driver for Linux
+Readme File for sk98lin v4.07
+SK-NET Gigabit Ethernet PCI driver for LINUX
X
X This file contains
X (1) OVERVIEW
X (2) REQUIRED FILES
X (3) INSTALLATION
-(4) INCLUSION OF THE ADAPTER AT SYSTEM START
+(4) INCLUSION OF ADAPTER AT SYSTEM START
X (5) DRIVER PARAMETERS
X (6) LARGE FRAME SUPPORT
X (7) TROUBLESHOOTING
@@ -19,13 +20,12 @@
X ===========================================================================
X
X
-
X (1) OVERVIEW
X ============
X
X The sk98lin driver supports the SysKonnect SK-NET Gigabit Ethernet
X Adapter SK-98xx family on Linux 2.2.x and above.
-It has been tested with Linux on Intel/x86, ALPHA and UltraSPARC machines.
+It has been tested with Linux on Intel/x86 machines.
X From v3.02 on, the driver is integrated in the linux kernel source.
X ***
X
@@ -64,8 +64,8 @@
X "make modules_install".
X Reboot your system.
X
-4) Load the module manually by entering:
- insmod sk98lin.o
+2) Load the module manually by entering:
+ modprobe sk98lin
X If the SysKonnect SK-98xx adapter is installed in your
X computer and you have a /proc filesystem, running the command
X 'more /proc/net/dev' should produce an output containing a
@@ -84,7 +84,7 @@
X for each adapter that is found, containing the
X corresponding 'ethX'.
X
-5) Select an IP address and assign it to the respective adapter by
+3) Select an IP address and assign it to the respective adapter by
X entering:
X ifconfig eth0 <ip-address>
X This causes the adapter to connect to the ethernet. The solitary
@@ -99,22 +99,22 @@
X NOTE: If you are in doubt about IP addresses, ask your network
X administrator for assistance.
X
-6) Your adapter should now be fully operational.
+4) Your adapter should now be fully operational.
X Use 'ping <otherstation>' to verify the connection to other
X computers on your network.
- By entering 'ifconfig', you can check the number of packets sent
- and received by your adapter and additional some other information
- regarding the adapter configuration.
+ By viewing /proc/net/sk98lin/[devicename], you can check some
+ information regarding to the adapter configuration.
+
X
-7) The driver module can be stopped and unloaded using the following
+5) The driver module can be stopped and unloaded using the following
X commands:
X ifconfig eth0 down
X rmmod sk98lin
X ***
X
X
-(4) INCLUSION OF THE ADAPTER AT SYSTEM START
-============================================
+(4) INCLUSION OF ADAPTER AT SYSTEM START
+========================================
X
X Since a large number of different Linux distributions are
X available, we are unable to describe a general installation procedure
@@ -129,7 +129,7 @@
X =====================
X
X Parameters can be set at the command line while loading the
-module with 'insmod'. The configuration tools of some distributions
+module with 'modprobe'. The configuration tools of some distributions
X can also give parameters to the driver module.
X If you use the kernel module loader, you can set driver parameters
X in the file /etc/modules.conf (or old name: /etc/conf.modules).
@@ -138,12 +138,12 @@
X options sk98lin ...
X
X For "...", use the same syntax as described below for the command
-line parameters of insmod.
+line paramaters of modprobe.
X You either have to reboot your computer or unload and reload
X the driver to activate the new parameters.
X The syntax of the driver parameters is:
X
-insmod sk98lin parameter=value1[,value2[,value3...]]
+modprobe sk98lin parameter=value1[,value2[,value3...]]
X
X value1 is for the first adapter, value2 for the second one etc.
X All Parameters are case sensitive, so write them exactly as
@@ -156,7 +156,7 @@
X adapter to FULL and on Port A of the second adapter to HALF.
X You must enter:
X
- insmod sk98lin.o AutoNeg_A=On,Off DupCap_A=Full,Half
+ modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half
X
X NOTE: The number of adapters that can be configured this way is
X limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM).
@@ -187,7 +187,7 @@
X this port is not "Sense". If autonegotiation is "On", all
X three values are possible. If it is "Off", only "Full" and
X "Half" are allowed.
- It is useful if your link partner does not support all
+ It is usefull if your link partner does not support all
X possible combinations.
X
X - Flow Control
@@ -234,7 +234,7 @@
X
X - RLMT (Redundant Link Management Technology) Mode
X Parameter: RlmtMode
- Values: CheckLinkState,CheckLocalPort, CheckSeg
+ Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet
X Default: CheckLinkState
X
X RLMT (the driver part that decides which port to use) knows three
@@ -257,6 +257,13 @@
X Ethernet switches installed in your network that have been configured
X to use the Spanning Tree protocol.
X
+-- DualNet - Both ports A and B are used as separate devices at the same
+ time. So if you have a dual port adapter, port A will show up as eth0
+ and port B as eth1. Both ports can be used independend with distinct
+ IP addresses.
+ The preferred port setting is not used. Rlmt is turned off.
+
+
X NOTE: The modes CheckLocalPort and CheckSeg are meant to operate in
X configurations where a network path between the ports on one
X adapter exists. Especially, they are not designed to work where
@@ -269,7 +276,7 @@
X
X Large frames (also called jumbo frames) are now supported by the
X driver. This can result in a greatly improved throughput if
-transferring large amounts of data.
+transfering large amounts of data.
X To enable large frames, set the MTU (maximum transfer unit)
X of the interface to the value you wish (up to 9000). The command
X for this is:
@@ -285,7 +292,7 @@
X You can switch back to the standard ethernet frame size with:
X ifconfig eth0 mtu 1500
X
-To make this setting persistent, add a script with the 'ifconfig'
+To make this setting persitent, add a script with the 'ifconfig'
X line to the system startup sequence (named something like "S99sk98lin"
X in /etc/rc.d/rc2.d).
X ***
@@ -372,6 +379,28 @@
X
X (8) HISTORY
X ===========
+
+VERSION 4.02 (In-Kernel version)
+New Features:
+- Add Kernel 2.4 changes
+Known limitations:
+- None
+
+VERSION 4.01 (In-Kernel version)
+Problems fixed:
+- Full statistics support for DualNet mode
+Known limitations:
+- None
+
+VERSION 4.00 (In-Kernel version)
+Problems fixed:
+- Memory leak found
+New Features:
+- Proc filesystem integration
+- DualNet functionality integrated
+- Rlmt networks added
+Known limitations:
+- statistics partially incorrect in DualNet mode
X
X VERSION 3.04 (In-Kernel version)
X Problems fixed:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/parport.txt linux/Documentation/parport.txt
--- v2.2.19/Documentation/parport.txt Sun Mar 25 17:31:58 2001
+++ linux/Documentation/parport.txt Wed Oct 10 01:40:42 2001
@@ -147,4 +147,4 @@
X
X --
X Philip....@pobox.com
-t...@cyberelk.demon.co.uk
+t...@cyberelk.net
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/proc.txt linux/Documentation/proc.txt
--- v2.2.19/Documentation/proc.txt Sun Mar 25 17:31:59 2001
+++ linux/Documentation/proc.txt Wed Oct 10 01:40:42 2001
@@ -35,7 +35,7 @@
X 3.6 /proc/sys/dev - Device specific parameters
X 3.7 /proc/sys/sunrpc - Remote procedure calls
X 3.8 /proc/sys/net - Networking stuff
-3.9 /proc/sys/net/ipv4 - IPV4 settings=20
+3.9 /proc/sys/net/ipv4 - IPV4 settings
X 3.10 Appletalk
X 3.11 IPX
X
@@ -861,7 +861,7 @@
X
X sc_age_cluster_fract
X -------------------- * resident set size
- 1024 =20
+ 1024
X
X So if you want kswapd to scan the whole process,
X sc_age_cluster_fract needs to have a value of 1024. The minimum
@@ -1050,7 +1050,7 @@
X
X This is automagically enabled when enabling masquerading.
X
-ipfrag_high_trash and ipfrag_low_trash
+ipfrag_high_tresh and ipfrag_low_tresh
X Maximum memory used to reassemble IP fragments. When
X ipfrag_high_thresh bytes of memory is allocated for this purpose,
X the fragment handler will toss packets until ipfrag_low_thresh is
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/s390/Debugging390.txt linux/Documentation/s390/Debugging390.txt
--- v2.2.19/Documentation/s390/Debugging390.txt Thu Jan 1 01:00:00 1970
+++ linux/Documentation/s390/Debugging390.txt Wed Oct 10 01:40:42 2001
@@ -0,0 +1,2499 @@
+
+ Debugging on Linux for s/390 & z/Architecture
+ by
+ Denis Joseph Barrow (djba...@de.ibm.com,barr...@yahoo.com)
+ Copyright (C) 2000-2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ Best viewed with fixed width fonts
+
+Overview of Document:
+=====================
+This document is intended to give an good overview of how to debug
+Linux for s/390 & z/Architecture it isn't intended as a complete reference & not a
+tutorial on the fundamentals of C & assembly, it dosen't go into
+390 IO in any detail. It is intended to compliment the documents in the
+reference section below & any other worthwhile references you get.
+
+It is intended like the Enterprise Systems Architecture/390 Reference Summary
+to be printed out & used as a quick cheat sheet self help style reference when
+problems occur.
+
+Contents
+========
+Register Set
+Address Spaces on Intel Linux
+Address Spaces on Linux for s/390 & z/Architecture
+The Linux for s/390 & z/Architecture Kernel Task Structure
+Register Usage & Stackframes on Linux for s/390 & z/Architecture
+A sample program with comments
+Compiling programs for debugging on Linux for s/390 & z/Architecture
+Figuring out gcc compile errors
+Debugging Tools
+objdump
+strace
+Performance Debugging
+Debugging under VM
+s/390 & z/Architecture IO Overview
+Debugging IO on s/390 & z/Architecture under VM
+GDB on s/390 & z/Architecture
+Stack chaining in gdb by hand
+Examining core dumps
+ldd
+Debugging modules
+The proc file system
+Starting points for debugging scripting languages etc.
+SysRq
+References
+Special Thanks
+


+Register Set
+============
+The current architectures have the following registers.

+
+16 General propose registers, 32 bit on s/390 64 bit on z/Architecture, r0-r15 or gpr0-gpr15 used for arithmetic & addressing.
+
+16 Control registers, 32 bit on s/390 64 bit on z/Architecture, ( cr0-cr15 kernel usage only ) used for memory managment,
+interrupt control,debugging control etc.
+
+16 Access registers ( ar0-ar15 ) 32 bit on s/390 & z/Architecture
+not used by normal programs but potentially could
+be used as temporary storage. Their main purpose is their 1 to 1
+association with general purpose registers and are used in
+the kernel for copying data between kernel & user address spaces.
+Access register 0 ( & access register 1 on z/Architecture ( needs 64 bit
+pointer ) ) is currently used by the pthread library as a pointer to
+the current running threads private area.
+
+16 64 bit floating point registers (fp0-fp15 ) IEEE & HFP floating
+point format compliant on G5 upwards & a Floating point control reg (FPC)
+4 64 bit registers (fp0,fp2,fp4 & fp6) HFP only on older machines.
+Note:
+Linux (currently) always uses IEEE & emulates G5 IEEE format on older machines,
+( provided the kernel is configured for this ).
+
+
+The PSW is the most important register on the machine it
+is 64 bit on s/390 & 128 bit on z/Architecture & serves the roles of

+a program counter (pc), condition code register,memory space designator.

+In IBM standard notation I am counting bit 0 as the MSB.
+It has several advantages over a normal program counter
+in that you can change address translation & program counter
+in a single instruction. To change address translation,
+e.g. switching address translation off requires that you
+have a logical=physical mapping for the address you are
+currently running at.
+
+ Bit Value
+s/390 z/Architecture


+0 0 Reserved ( must be 0 ) otherwise specification exception occurs.
+
+1 1 Program Event Recording 1 PER enabled,
+ PER is used to facilititate debugging e.g. single stepping.

+


+2-4 2-4 Reserved ( must be 0 ).

+


+5 5 Dynamic address translation 1=DAT on.

+


+6 6 Input/Output interrupt Mask

+


+7 7 External interrupt Mask used primarily for interprocessor signalling &
+ clock interupts.

+


+8-11 8-11 PSW Key used for complex memory protection mechanism not used under linux

+
+12 12 1 on s/390 0 on z/Architecture
+


+13 13 Machine Check Mask 1=enable machine check interrupts

+


+14 14 Wait State set this to 1 to stop the processor except for interrupts & give
+ time to other LPARS used in CPU idle in the kernel to increase overall
+ usage of processor resources.

+


+15 15 Problem state ( if set to 1 certain instructions are disabled )
+ all linux user programs run with this bit 1
+ ( useful info for debugging under VM ).

+


+16-17 16-17 Address Space Control

+


+ 00 Primary Space Mode when DAT on
+ The linux kernel currently runs in this mode, CR1 is affiliated with
+ this mode & points to the primary segment table origin etc.

+


+ 01 Access register mode this mode is used in functions to
+ copy data between kernel & user space.

+


+ 10 Secondary space mode not used in linux however CR7 the
+ register affiliated with this mode is & this & normally
+ CR13=CR7 to allow us to copy data between kernel & user space.
+ We do this as follows:
+ We set ar2 to 0 to designate its
+ affiliated gpr ( gpr2 )to point to primary=kernel space.
+ We set ar4 to 1 to designate its
+ affiliated gpr ( gpr4 ) to point to secondary=home=user space
+ & then essentially do a memcopy(gpr2,gpr4,size) to
+ copy data between the address spaces, the reason we use home space for the
+ kernel & don't keep secondary space free is that code will not run in
+ secondary space.

+


+ 11 Home Space Mode all user programs run in this mode.
+ it is affiliated with CR13.

+


+18-19 18-19 Condition codes (CC)

+


+20 20 Fixed point overflow mask if 1=FPU exceptions for this event
+ occur ( normally 0 )

+


+21 21 Decimal overflow mask if 1=FPU exceptions for this event occur
+ ( normally 0 )

+


+22 22 Exponent underflow mask if 1=FPU exceptions for this event occur
+ ( normally 0 )

+


+23 23 Significance Mask if 1=FPU exceptions for this event occur
+ ( normally 0 )

+


+24-31 24-30 Reserved Must be 0.

+


+ 31 Extended Addressing Mode
+ 32 Basic Addressing Mode
+ Used to set addressing mode
+ PSW 31 PSW 32
+ 0 0 24 bit
+ 0 1 31 bit
+ 1 1 64 bit

+


+32 1=31 bit addressing mode 0=24 bit addressing mode (for backward
+ compatibility ), linux always runs with this bit set to 1

+


+33-64 Instruction address.
+ 33-63 Reserved must be 0
+ 64-127 Address
+ In 24 bits mode bits 64-103=0 bits 104-127 Address
+ In 31 bits mode bits 64-96=0 bits 97-127 Address
+ Note: unlike 31 bit mode on s/390 bit 96 must be zero
+ when loading the address with LPSWE otherwise a
+ specification exception occurs, LPSW is fully backward
+ compatible.
+

+
+Prefix Page(s)
+--------------
+This per cpu memory area is too intimately tied to the processor not to mention.
+It exists between the real addresses 0-4096 on s/390 & 0-8192 z/Architecture & is exchanged
+with a 1 page on s/390 or 2 pages on z/Architecture in absolute storage by the set
+prefix instruction in linux'es startup.
+This page is mapped to a different prefix for each processor in an SMP configuration
+( assuming the os designer is sane of course :-) ).
+Bytes 0-512 ( 200 hex ) on s/390 & 0-512,4096-4544,4604-5119 currently on z/Architecture
+are used by the processor itself for holding such information as exception indications &
+entry points for exceptions.
+Bytes after 0xc00 hex are used by linux for per processor globals on s/390 & z/Architecture
+( there is a gap on z/Architecure too currently between 0xc00 & 1000 which linux uses ).
+The closest thing to this on traditional architectures is the interrupt
+vector table. This is a good thing & does simplify some of the kernel coding
+however it means that we now cannot catch stray NULL pointers in the
+kernel without hard coded checks.
+
+
+
+Address Spaces on Intel Linux
+=============================
+
+The traditional Intel Linux is approximately mapped as follows forgive
+the ascii art.
+0xFFFFFFFF 4GB Himem *****************
+ * *
+ * Kernel Space *
+ * *
+ ***************** ****************
+User Space Himem (typically 0xC0000000 3GB )* User Stack * * *
+ ***************** * *
+ * Shared Libs * * Next Process *
+ ***************** * to *
+ * * <== * Run * <==
+ * User Program * * *
+ * Data BSS * * *
+ * Text * * *
+ * Sections * * *
+0x00000000 ***************** ****************
+
+Now it is easy to see that on Intel it is quite easy to recognise a kernel address
+as being one greater than user space himem ( in this case 0xC0000000).
+& addresses of less than this are the ones in the current running program on this
+processor ( if an smp box ).
+If using the virtual machine ( VM ) as a debugger it is quite difficult to
+know which user process is running as the address space you are looking at
+could be from any process in the run queue.
+
+The limitation of Intels addressing technique is that the linux
+kernel uses a very simple real address to virtual addressing technique
+of Real Address=Virtual Address-User Space Himem.
+This means that on Intel the kernel linux can typically only address
+Himem=0xFFFFFFFF-0xC0000000=1GB & this is all the RAM these machines
+can typically use.
+They can lower User Himem to 2GB or lower & thus be
+able to use 2GB of RAM however this shrinks the maximum size
+of User Space from 3GB to 2GB they have a no win limit of 4GB unless
+they go to 64 Bit.
+
+
+On 390 our limitations & strengths make us slightly different.
+For backward compatibility we are only allowed use 31 bits (2GB)
+of our 32 bit addresses,however, we use entirely separate address
+spaces for the user & kernel.
+
+This means we can support 2GB of non Extended RAM on s/390, & more
+with the Extended memory managment swap device &
+currently 4TB of physical memory currently on z/Architecture.
+
+
+Address Spaces on Linux for s/390 & z/Architecture
+==================================================
+
+Our addressing scheme is as follows
+
+


+Himem 0x7fffffff 2GB on s/390 ***************** ****************

+currently 0x3ffffffffff (2^42)-1 * User Stack * * *
+on z/Architecture. ***************** * *
+ * Shared Libs * * *
+ ***************** * *
+ * * * Kernel *
+ * User Program * * *
+ * Data BSS * * *
+ * Text * * *
+ * Sections * * *
+0x00000000 ***************** ****************
+
+This also means that we need to look at the PSW problem state bit
+or the addressing mode to decide whether we are looking at
+user or kernel space.
+
+Virtual Addresses on s/390 & z/Architecture
+===========================================
+
+A virtual address on s/390 is made up of 3 parts
+The SX ( segment index, roughly corresponding to the PGD & PMD in linux terminology )
+being bits 1-11.
+The PX ( page index, corresponding to the page table entry (pte) in linux terminology )
+being bits 12-19.
+The remaining bits BX (the byte index are the offset in the page )
+i.e. bits 20 to 31.
+
+On z/Architecture in linux we currently make up an address from 4 parts.
+The region index bits (RX) 0-32 we currently use bits 22-32
+The segment index (SX) being bits 33-43
+The page index (PX) being bits 44-51
+The byte index (BX) being bits 52-63
+
+Notes:
+1) s/390 has no PMD so the PMD is really the PGD also.
+A lot of this stuff is defined in pgtable.h.
+
+2) Also seeing as s/390's page indexes are only 1k in size
+(bits 12-19 x 4 bytes per pte ) we use 1 ( page 4k )
+to make the best use of memory by updating 4 segment indices
+entries each time we mess with a PMD & use offsets
+0,1024,2048 & 3072 in this page as for our segment indexes.
+On z/Architecture our page indexes are now 2k in size
+( bits 12-19 x 8 bytes per pte ) we do a similar trick
+but only mess with 2 segment indices each time we mess with
+a PMD.
+
+3) As z/Architecture supports upto a massive 5-level page table lookup we
+can only use 3 currently on Linux ( as this is all the generic kernel
+currently supports ) however this may change in future
+this allows us to access ( according to my sums )
+4TB of virtual storage per process i.e.
+4096*512(PTES)*1024(PMDS)*2048(PGD) = 4398046511104 bytes,
+enough for another 2 or 3 of years I think :-).
+to do this we use a region-third-table designation type in
+our address space control registers.
+
+
+The Linux for s/390 & z/Architecture Kernel Task Structure
+==========================================================
+Each process/thread under Linux for S390 has its own kernel task_struct
+defined in linux/include/linux/sched.h
+The S390 on initialisation & resuming of a process on a cpu sets
+the __LC_KERNEL_STACK variable in the spare prefix area for this cpu
+( which we use for per processor globals).
+
+The kernel stack pointer is intimately tied with the task stucture for
+each processor as follows.
+
+ s/390
+ ************************
+ * 1 page kernel stack *
+ * ( 4K ) *
+ ************************
+ * 1 page task_struct *
+ * ( 4K ) *
+8K aligned ************************
+
+ z/Architecture


+ ************************
+ * 2 page kernel stack *
+ * ( 8K ) *
+ ************************
+ * 2 page task_struct *
+ * ( 8K ) *
+16K aligned ************************
+

+What this means is that we don't need to dedicate any register or global variable
+to point to the current running process & can retrieve it with the following
+very simple construct for s/390 & one very similar for z/Architecture.
+
+static inline struct task_struct * get_current(void)
+{
+ struct task_struct *current;
+ __asm__("lhi %0,-8192\n\t"
+ "nr %0,15"
+ : "=r" (current) );
+ return current;
+}
+
+i.e. just anding the current kernel stack pointer with the mask -8192.
+Thankfully because Linux dosen't have support for nested IO interrupts
+& our devices have large buffers can survive interrupts being shut for
+short amounts of time we don't need a separate stack for interrupts.
+
+
+
+
+Register Usage & Stackframes on Linux for s/390 & z/Architecture
+=================================================================
+Overview:
+---------
+This is the code that gcc produces at the top & the bottom of
+each function, it usually is fairly consistent & similar from
+function to function & if you know its layout you can probalby
+make some headway in finding the ultimate cause of a problem
+after a crash without a source level debugger.
+
+Note: To follow stackframes requires a knowledge of C or Pascal &
+limited knowledge of one assembly language.
+


+It should be noted that there are some differences between the

+s/390 & z/Architecture stack layouts as the z/Architecture stack layout didn't have


+to maintain compatibility with older linkage formats.
+

+Glossary:
+---------
+alloca:
+This is a built in compiler function for runtime allocation
+of extra space on the callers stack which is obviously freed
+up on function exit ( e.g. the caller may choose to allocate nothing
+of a buffer of 4k if required for temporary purposes ), it generates
+very efficent code ( a few cycles ) when compared to alternatives
+like malloc.
+
+automatics: These are local variables on the stack,
+i.e they aren't in registers & they aren't static.
+
+back-chain:
+This is a pointer to the stack pointer before entering a
+framed functions ( see frameless function ) prologue got by
+deferencing the address of the current stack pointer,
+ i.e. got by accessing the 32 bit value at the stack pointers
+current location.
+
+base-pointer:
+This is a pointer to the back of the literal pool which
+is an area just behind each procedure used to store constants
+in each function.
+
+call-clobbered: The caller probably needs to save these registers if there
+is something of value in them, on the stack or elsewhere before making a
+call to another procedure so that it can restore it later.
+
+epilogue:
+The code generated by the compiler to return to the caller.
+
+frameless-function
+A frameless function in Linux for s390 & z/Architecture is one which doesn't
+need more than the register save area ( 96 bytes on s/390, 160 on z/Architecture )
+given to it by the caller.
+A frameless function never:
+1) Sets up a back chain.
+2) Calls alloca.


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 03'
echo 'File patch-2.2.20 is continued in part 04'
echo "04" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:20 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part21

#!/bin/sh -x
# this is part 21 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 21; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X int retval = 0;
+#ifdef CONFIG_8139TOO_8129
X int i;
+ void *mdio_addr = tp->mmio_addr + Config4;
+ int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location;
+#endif


X
X DPRINTK ("ENTER\n");
X

@@ -1205,6 +1328,8 @@
X return location < 8 && mii_2_8139_map[location] ?
X readw (tp->mmio_addr + mii_2_8139_map[location]) : 0;
X }
+
+#ifdef CONFIG_8139TOO_8129
X mdio_sync (mdio_addr);
X /* Shift the read command bits out. */
X for (i = 15; i >= 0; i--) {
@@ -1224,6 +1349,7 @@
X writeb (MDIO_CLK, mdio_addr);
X mdio_delay (mdio_addr);
X }
+#endif
X
X DPRINTK ("EXIT, returning %d\n", (retval >> 1) & 0xffff);
X return (retval >> 1) & 0xffff;
@@ -1234,22 +1360,26 @@
X int value)


X {
X struct rtl8139_private *tp = dev->priv;

+#ifdef CONFIG_8139TOO_8129
+ int i;
X void *mdio_addr = tp->mmio_addr + Config4;
X int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value;
- int i;
+#endif


X
X DPRINTK ("ENTER\n");
X

X if (phy_id > 31) { /* Really a 8139. Use internal registers. */
X void *ioaddr = tp->mmio_addr;
X if (location == 0) {
- RTL_W8_F (Cfg9346, Cfg9346_Unlock);
- RTL_W16_F (BasicModeCtrl, value);
- RTL_W8_F (Cfg9346, Cfg9346_Lock);
+ RTL_W8 (Cfg9346, Cfg9346_Unlock);
+ RTL_W16 (BasicModeCtrl, value);
+ RTL_W8 (Cfg9346, Cfg9346_Lock);
X } else if (location < 8 && mii_2_8139_map[location])
- RTL_W16_F (mii_2_8139_map[location], value);
+ RTL_W16 (mii_2_8139_map[location], value);
X return;
X }
+
+#ifdef CONFIG_8139TOO_8129
X mdio_sync (mdio_addr);
X
X /* Shift the command bits out. */
@@ -1261,7 +1391,6 @@
X writeb (dataval | MDIO_CLK, mdio_addr);
X mdio_delay (mdio_addr);
X }
-
X /* Clear out extra bits. */
X for (i = 2; i > 0; i--) {
X writeb (0, mdio_addr);
@@ -1269,7 +1398,7 @@
X writeb (MDIO_CLK, mdio_addr);
X mdio_delay (mdio_addr);
X }
- return;
+#endif
X }
X
X
@@ -1318,7 +1447,7 @@
X
X DPRINTK ("%s: rtl8139_open() ioaddr %#lx IRQ %d"
X " GP Pins %2.2x %s-duplex.\n",
- dev->name, pci_resource_start (tp, 1),
+ dev->name, (unsigned long) tp->mmio_addr,
X dev->irq, RTL_R8 (MediaStatus),
X tp->full_duplex ? "full" : "half");
X
@@ -1332,6 +1461,28 @@
X }
X
X
+static void rtl_check_media (struct device *dev)
+{
+ struct rtl8139_private *tp = dev->priv;
+
+ DPRINTK("ENTER\n");
+
+ if (tp->phys[0] >= 0) {
+ u16 mii_reg5 = mdio_read(dev, tp->phys[0], 5);
+ if (mii_reg5 == 0xffff)
+ ; /* Not there */
+ else if ((mii_reg5 & 0x0100) == 0x0100
+ || (mii_reg5 & 0x00C0) == 0x0040)
+ tp->full_duplex = 1;
+
+ printk (KERN_INFO"%s: Setting %s%s-duplex based on"
+ " auto-negotiated partner ability %4.4x.\n",
+ dev->name, mii_reg5 == 0 ? "" :
+ (mii_reg5 & 0x0180) ? "100mbps " : "10mbps ",
+ tp->full_duplex ? "full" : "half", mii_reg5);
+ }
+}
+
X /* Start the hardware at open or resume. */
X static void rtl8139_hw_start (struct device *dev)
X {
@@ -1342,14 +1493,11 @@
X
X DPRINTK ("ENTER\n");
X

- /* Soft reset the chip. */
- RTL_W8 (ChipCmd, (RTL_R8 (ChipCmd) & ChipCmdClear) | CmdReset);

- udelay (100);


+ /* Bring old chips out of low-power mode. */

+ if (rtl_chip_info[tp->chipset].flags & HasHltClk)

+ RTL_W8 (HltClk, 'R');
X

- /* Check that the chip has finished the reset. */

- for (i = 1000; i > 0; i--)


- if ((RTL_R8 (ChipCmd) & CmdReset) == 0)
- break;

+ rtl8139_chip_reset (ioaddr);
X
X /* unlock Config[01234] and BMCR register writes */
X RTL_W8_F (Cfg9346, Cfg9346_Unlock);
@@ -1358,57 +1506,28 @@
X RTL_W32_F (MAC0 + 4, cpu_to_le32 (*(u32 *) (dev->dev_addr + 4)));
X
X /* Must enable Tx/Rx before setting transfer thresholds! */
- RTL_W8_F (ChipCmd, (RTL_R8 (ChipCmd) & ChipCmdClear) |
- CmdRxEnb | CmdTxEnb);
+ RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb);
X
- i = rtl8139_rx_config |
- (RTL_R32 (RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
- RTL_W32_F (RxConfig, i);
+ tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys;
+ RTL_W32 (RxConfig, tp->rx_config);
X
X /* Check this value: the documentation for IFG contradicts ifself. */
X RTL_W32 (TxConfig, (TX_DMA_BURST << TxDMAShift));
X
X tp->cur_rx = 0;
-
- /* This is check_duplex() */
- if (tp->phys[0] >= 0 || (tp->drv_flags & HAS_MII_XCVR)) {
- u16 mii_reg5 = mdio_read(dev, tp->phys[0], 5);
- if (mii_reg5 == 0xffff)
- ; /* Not there */
- else if ((mii_reg5 & 0x0100) == 0x0100
- || (mii_reg5 & 0x00C0) == 0x0040)
- tp->full_duplex = 1;
- printk(KERN_INFO"%s: Setting %s%s-duplex based on"
- " auto-negotiated partner ability %4.4x.\n", dev->name,
- mii_reg5 == 0 ? "" :
- (mii_reg5 & 0x0180) ? "100Mbps " : "10Mbps ",
- tp->full_duplex ? "full" : "half", mii_reg5);
- }
-
- if (tp->chipset >= CH_8139A) {


- tmp = RTL_R8 (Config1) & Config1Clear;

- tmp |= Cfg1_Driver_Load;


- tmp |= (tp->chipset == CH_8139B) ? 3 : 1; /* Enable PM/VPD */
- RTL_W8_F (Config1, tmp);

- } else {
- u8 foo = RTL_R8 (Config1) & Config1Clear;
- RTL_W8 (Config1, tp->full_duplex ? (foo|0x60) : (foo|0x20));
- }
+
+ rtl_check_media (dev);
X
X if (tp->chipset >= CH_8139B) {
- tmp = RTL_R8 (Config4) & ~(1<<2);
- /* chip will clear Rx FIFO overflow automatically */
- tmp |= (1<<7);
- RTL_W8 (Config4, tmp);
-
X /* disable magic packet scanning, which is enabled
- * when PM is enabled above (Config1) */
+ * when PM is enabled in Config1 */
X RTL_W8 (Config3, RTL_R8 (Config3) & ~(1<<5));
X }
X
+ DPRINTK("init buffer addresses\n");
+
X /* Lock Config[01234] and BMCR register writes */
- RTL_W8_F (Cfg9346, Cfg9346_Lock);
- udelay (10);
+ RTL_W8 (Cfg9346, Cfg9346_Lock);
X
X /* init Rx ring buffer DMA address */
X RTL_W32_F (RxBuf, tp->rx_ring_dma);
@@ -1417,7 +1536,7 @@
X for (i = 0; i < NUM_TX_DESC; i++)
X RTL_W32_F (TxAddr0 + (i * 4), tp->tx_bufs_dma + (tp->tx_buf[i] - tp->tx_bufs));
X
- RTL_W32_F (RxMissed, 0);
+ RTL_W32 (RxMissed, 0);
X
X rtl8139_set_rx_mode (dev);
X
@@ -1425,11 +1544,12 @@
X RTL_W16 (MultiIntr, RTL_R16 (MultiIntr) & MultiIntrClear);
X
X /* make sure RxTx has started */
- RTL_W8_F (ChipCmd, (RTL_R8 (ChipCmd) & ChipCmdClear) |
- CmdRxEnb | CmdTxEnb);
+ tmp = RTL_R8 (ChipCmd);
+ if ((!(tmp & CmdRxEnb)) || (!(tmp & CmdTxEnb)))
+ RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb);
X
X /* Enable all known interrupts by setting the interrupt mask. */
- RTL_W16_F (IntrMask, rtl8139_intr_mask);
+ RTL_W16 (IntrMask, rtl8139_intr_mask);
X
X netif_start_queue (dev);
X
@@ -1569,14 +1689,23 @@
X || (mii_reg5 & 0x01C0) == 0x0040;
X if (tp->full_duplex != duplex) {
X tp->full_duplex = duplex;
- printk (KERN_INFO
- "%s: Setting %s-duplex based on MII #%d link"
- " partner ability of %4.4x.\n", dev->name,
- tp->full_duplex ? "full" : "half",
- tp->phys[0], mii_reg5);
+
+ if (mii_reg5) {
+ printk (KERN_INFO
+ "%s: Setting %s-duplex based on MII #%d link"
+ " partner ability of %4.4x.\n",
+ dev->name,
+ tp->full_duplex ? "full" : "half",
+ tp->phys[0], mii_reg5);
+ } else {
+ printk(KERN_INFO"%s: media is unconnected, link down, or incompatible connection\n",
+ dev->name);
+ }
+#if 0
X RTL_W8 (Cfg9346, Cfg9346_Unlock);
X RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20);
X RTL_W8 (Cfg9346, Cfg9346_Lock);
+#endif
X }


X }
X
@@ -1603,6 +1732,7 @@

X struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv;
X unsigned long timeout;
X
+ exit_files(current);
X daemonize ();
X spin_lock_irq(&current->sigmask_lock);
X sigemptyset(&current->blocked);
@@ -1613,6 +1743,7 @@
X current->comm[sizeof(current->comm) - 1] = '\0';
X
X while (1) {
+ rtl8139_thread_iter (dev, tp, tp->mmio_addr);
X timeout = next_tick;
X do {
X timeout = interruptible_sleep_on_timeout (&tp->thr_wait, timeout);
@@ -1622,7 +1753,6 @@
X break;
X
X rtnl_lock ();
- rtl8139_thread_iter (dev, tp, tp->mmio_addr);
X rtnl_unlock ();
X }
X
@@ -1656,6 +1786,7 @@
X void *ioaddr = tp->mmio_addr;
X int i;
X u8 tmp8;
+ unsigned long flags;
X
X DPRINTK ("%s: Transmit timeout, status %2.2x %4.4x "
X "media %2.2x.\n", dev->name,
@@ -1663,16 +1794,18 @@
X RTL_R16 (IntrStatus),
X RTL_R8 (MediaStatus));
X
+ tp->xstats.tx_timeouts++;
+
X /* disable Tx ASAP, if not already */
X tmp8 = RTL_R8 (ChipCmd);
X if (tmp8 & CmdTxEnb)
- RTL_W8 (ChipCmd, tmp8 & ~CmdTxEnb);
+ RTL_W8 (ChipCmd, CmdRxEnb);
X
X /* Disable interrupts by clearing the interrupt mask. */
X RTL_W16 (IntrMask, 0x0000);
X
X /* Emit info to figure out what went wrong. */
- printk (KERN_DEBUG "%s: Tx queue start entry %ld dirty entry %ld.\n",
+ printk (KERN_DEBUG "%s: Tx queue start entry %ld dirty entry %ld.\n",
X dev->name, tp->cur_tx, tp->dirty_tx);
X for (i = 0; i < NUM_TX_DESC; i++)
X printk (KERN_DEBUG "%s: Tx descriptor %d is %8.8lx.%s\n",
@@ -1681,12 +1814,14 @@
X " (queue head)" : "");
X
X /* Stop a shared interrupt from scavenging while we are. */
- spin_lock_irq (&tp->lock);
+ spin_lock_irqsave (&tp->lock, flags);
X rtl8139_tx_clear (tp);
- spin_unlock_irq (&tp->lock);
+ spin_unlock_irqrestore (&tp->lock, flags);
X
X /* ...and finally, reset everything */
X rtl8139_hw_start (dev);
+
+ netif_wake_queue (dev);
X }
X
X
@@ -1694,13 +1829,18 @@


X {
X struct rtl8139_private *tp = dev->priv;

X void *ioaddr = tp->mmio_addr;
- int entry;
+ unsigned int entry;
+ u32 dma_addr;
X
X if (dev->tbusy) {
X /* If this happens network layer tells us we're broken. */
- if (jiffies - dev->trans_start > TX_TIMEOUT)
+ if (jiffies - dev->trans_start > TX_TIMEOUT) {
X rtl8139_tx_timeout(dev);
+ if (skb) kfree_skb(skb);


+ return 0;
+ }
X }

+ mb();
X
X /* Calculate the next Tx descriptor entry. */
X entry = tp->cur_tx % NUM_TX_DESC;
@@ -1708,29 +1848,28 @@
X assert (tp->tx_info[entry].skb == NULL);
X
X tp->tx_info[entry].skb = skb;
- if ((long) skb->data & 3) { /* Must use alignment buffer. */
- /* tp->tx_info[entry].mapping = 0 */
+ if ((long) skb->data & 3) { /* Must use alignment buffer. */
+ /* tp->tx_info[entry].mapping = 0; */
X memcpy (tp->tx_buf[entry], skb->data, skb->len);
- RTL_W32 (TxAddr0 + (entry * 4),
- tp->tx_bufs_dma + (tp->tx_buf[entry] - tp->tx_bufs));
+ dma_addr = tp->tx_bufs_dma + (tp->tx_buf[entry] - tp->tx_bufs);
X } else {
- RTL_W32 (TxAddr0 + (entry * 4), virt_to_bus(skb->data));
+ dma_addr = virt_to_bus(skb->data);
X }
X
X /* Note: the chip doesn't have auto-pad! */
- RTL_W32 (TxStatus0 + (entry * sizeof(u32)),
- tp->tx_flag | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN));
+ spin_lock_irq(&tp->lock);
+ RTL_W32_F (TxAddr0 + (entry * 4), dma_addr);
+ RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
+ tp->tx_flag | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN));
+ spin_unlock_irq(&tp->lock);
X
X dev->trans_start = jiffies;
X
- spin_lock_irq (&tp->lock);
-
X tp->cur_tx++;
+ mb();
X if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx)
X netif_stop_queue (dev);
X
- spin_unlock_irq (&tp->lock);
-
X DPRINTK ("%s: Queued Tx packet at %p size %u to slot %d.\n",
X dev->name, skb->data, skb->len, entry);
X
@@ -1767,7 +1906,7 @@
X tp->stats.tx_errors++;
X if (txstatus & TxAborted) {
X tp->stats.tx_aborted_errors++;
- RTL_W32 (TxConfig, TxClearAbt | (TX_DMA_BURST << TxDMAShift));
+ RTL_W32_F (TxConfig, TxClearAbt | (TX_DMA_BURST << TxDMAShift));
X }
X if (txstatus & TxCarrierLost)
X tp->stats.tx_carrier_errors++;
@@ -1798,7 +1937,7 @@
X #ifndef RTL8139_NDEBUG
X if (tp->cur_tx - dirty_tx > NUM_TX_DESC) {
X printk (KERN_ERR "%s: Out-of-sync dirty pointer, %ld vs. %ld.\n",
- dev->name, dirty_tx, tp->cur_tx);
+ dev->name, dirty_tx, tp->cur_tx);
X dirty_tx += NUM_TX_DESC;
X }
X #endif /* RTL8139_NDEBUG */
@@ -1806,11 +1945,13 @@
X /* only wake the queue if we did work, and the queue is stopped */
X if (tp->dirty_tx != dirty_tx) {
X tp->dirty_tx = dirty_tx;
+ mb();
X if (netif_queue_stopped (dev))
X netif_wake_queue (dev);
X }
X }
X
+
X /* TODO: clean this up! Rx reset need not be this intensive */
X static void rtl8139_rx_err (u32 rx_status, struct device *dev,
X struct rtl8139_private *tp, void *ioaddr)
@@ -1836,8 +1977,7 @@
X tp->cur_rx = 0;
X
X /* disable receive */
- tmp8 = RTL_R8 (ChipCmd) & ChipCmdClear;
- RTL_W8_F (ChipCmd, tmp8 | CmdTxEnb);
+ RTL_W8 (ChipCmd, CmdTxEnb);
X
X /* A.C.: Reset the multicast list. */
X rtl8139_set_rx_mode (dev);
@@ -1845,11 +1985,11 @@
X /* XXX potentially temporary hack to
X * restart hung receiver */
X while (--tmp_work > 0) {
+ barrier();
X tmp8 = RTL_R8 (ChipCmd);
X if ((tmp8 & CmdRxEnb) && (tmp8 & CmdTxEnb))
X break;
- RTL_W8_F (ChipCmd,
- (tmp8 & ChipCmdClear) | CmdRxEnb | CmdTxEnb);
+ RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb);
X }
X
X /* G.S.: Re-enable receiver */
@@ -1861,8 +2001,6 @@
X }
X
X
-/* The data sheet doesn't describe the Rx ring at all, so I'm guessing at the
- field alignments and semantics. */
X static void rtl8139_rx_interrupt (struct device *dev,
X struct rtl8139_private *tp, void *ioaddr)
X {
@@ -1888,6 +2026,8 @@
X unsigned int pkt_size;
X struct sk_buff *skb;
X
+ rmb();
+
X /* read size+status of next frame from DMA ring buffer */
X rx_status = le32_to_cpu (*(u32 *) (rx_ring + ring_offset));
X rx_size = rx_status >> 16;
@@ -1907,17 +2047,10 @@
X }
X #endif
X
- /* E. Gill */
- /* Note from BSD driver:
- * Here's a totally undocumented fact for you. When the
- * RealTek chip is in the process of copying a packet into
- * RAM for you, the length will be 0xfff0. If you spot a
- * packet header with this value, you need to stop. The
- * datasheet makes absolutely no mention of this and
- * RealTek should be shot for this.
- */
- if (rx_size == 0xfff0)
+ if (rx_size == 0xfff0) { /* Early Rx in progress */
+ tp->xstats.early_rx++;
X break;
+ }
X
X /* If Rx err or invalid rx_size/rx_status received
X * (which happens if we get lost in the ring),
@@ -1925,6 +2058,7 @@
X * Rx processing.
X */
X if ((rx_size > (MAX_ETH_FRAME_SIZE+4)) ||
+ (rx_size < 8) ||
X (!(rx_status & RxStatusOK))) {
X rtl8139_rx_err (rx_status, dev, tp, ioaddr);
X return;
@@ -1951,6 +2085,7 @@
X netif_rx (skb);
X mark_bh(NET_BH);
X tp->stats.rx_bytes += pkt_size ;
+ dev->last_rx = jiffies;
X tp->stats.rx_packets++;
X } else {
X printk (KERN_WARNING
@@ -1960,15 +2095,22 @@
X }
X
X cur_rx = (cur_rx + rx_size + 4 + 3) & ~3;
- RTL_W16_F (RxBufPtr, cur_rx - 16);
+ RTL_W16 (RxBufPtr, cur_rx - 16);
+
+ if (RTL_R16 (IntrStatus) & RxAckBits)
+ RTL_W16_F (IntrStatus, RxAckBits);
X }
X
X DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x,"
- " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx,
- RTL_R16 (RxBufAddr),
- RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
+ " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx,
+ RTL_R16 (RxBufAddr),
+ RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
X
X tp->cur_rx = cur_rx;
+
+ if ((RTL_R8 (ChipCmd) & RxBufEmpty) &&
+ (RTL_R16 (IntrStatus) & RxAckBits))
+ RTL_W16_F (IntrStatus, RxAckBits);
X }
X
X
@@ -1977,8 +2119,8 @@
X void *ioaddr,
X int status, int link_changed)
X {
- printk (KERN_DEBUG "%s: Abnormal interrupt, status %8.8x.\n",
- dev->name, status);
+ DPRINTK ("%s: Abnormal interrupt, status %8.8x.\n",
+ dev->name, status);
X

X assert (dev != NULL);

X assert (tp != NULL);
@@ -1996,9 +2138,11 @@
X || tp->duplex_lock;
X if (tp->full_duplex != duplex) {
X tp->full_duplex = duplex;
+#if 0
X RTL_W8 (Cfg9346, Cfg9346_Unlock);
X RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20);
X RTL_W8 (Cfg9346, Cfg9346_Lock);
+#endif
X }
X status &= ~RxUnderrun;
X }
@@ -2012,11 +2156,6 @@
X tp->stats.rx_length_errors++;
X if (status & (RxUnderrun | RxFIFOOver))
X tp->stats.rx_fifo_errors++;
- if (status & RxOverflow) {
- tp->stats.rx_over_errors++;
- tp->cur_rx = RTL_R16 (RxBufAddr) % RX_BUF_LEN;
- RTL_W16_F (RxBufPtr, tp->cur_rx - 16);
- }
X if (status & PCIErr) {
X u16 pci_cmd_status;
X pci_read_config_word (tp->pci_dev, PCI_STATUS, &pci_cmd_status);
@@ -2036,7 +2175,10 @@


X struct rtl8139_private *tp = dev->priv;

X int boguscnt = max_interrupt_work;
X void *ioaddr = tp->mmio_addr;
- int status = 0, link_changed = 0; /* avoid bogus "uninit" warning */
+ int ackstat, status;
+ int link_changed = 0; /* avoid bogus "uninit" warning */
+
+ spin_lock (&tp->lock);
X
X do {
X status = RTL_R16 (IntrStatus);
@@ -2050,63 +2192,45 @@
X if (status & RxUnderrun)
X link_changed = RTL_R16 (CSCR) & CSCR_LinkChangeBit;
X
- /* E. Gill */
- /* In case of an RxFIFOOver we must also clear the RxOverflow
- bit to avoid dropping frames for ever. Believe me, I got a
- lot of troubles copying huge data (approximately 2 RxFIFOOver
- errors per 1GB data transfer).
- The following is written in the 'p-guide.pdf' file (RTL8139(A/B)
- Programming guide V0.1, from 1999/1/15) on page 9 from REALTEC.
- -----------------------------------------------------------
- 2. RxFIFOOvw handling:
- When RxFIFOOvw occurs, all incoming packets are discarded.
- Clear ISR(RxFIFOOvw) doesn't dismiss RxFIFOOvw event. To
- dismiss RxFIFOOvw event, the ISR(RxBufOvw) must be written
- with a '1'.
- -----------------------------------------------------------
- Unfortunately I was not able to find any reason for the
- RxFIFOOver error (I got the feeling this depends on the
- CPU speed, lower CPU speed --> more errors).
- After clearing the RxOverflow bit the transfer of the
- packet was repeated and all data are error free transfered */
- RTL_W16_F (IntrStatus, (status & RxFIFOOver) ? (status | RxOverflow) : status);
-
- DPRINTK ("%s: interrupt status=%#4.4x new intstat=%#4.4x.\n",
- dev->name, status,
- RTL_R16 (IntrStatus));
+ /* The chip takes special action when we clear RxAckBits,
+ * so we clear them later in rtl8139_rx_interrupt
+ */
+ ackstat = status & ~RxAckBits;
+ RTL_W16 (IntrStatus, ackstat);
+
+ DPRINTK ("%s: interrupt status=%#4.4x ackstat=%#4.4x new intstat=%#4.4x.\n",
+ dev->name, ackstat, status, RTL_R16 (IntrStatus));
X
- if ((status & (PCIErr | PCSTimeout | RxUnderrun | RxOverflow
- | RxFIFOOver | TxErr | TxOK | RxErr | RxOK)) == 0)
+ if ((status &
+ (PCIErr | PCSTimeout | RxUnderrun | RxOverflow |
+ RxFIFOOver | TxErr | TxOK | RxErr | RxOK)) == 0)
X break;
X
+ if (netif_running (dev) && (status & RxAckBits))
+ rtl8139_rx_interrupt (dev, tp, ioaddr);
+
X /* Check uncommon events with one test. */
X if (status & (PCIErr | PCSTimeout | RxUnderrun | RxOverflow |
X RxFIFOOver | TxErr | RxErr))
X rtl8139_weird_interrupt (dev, tp, ioaddr,
X status, link_changed);
X
- if (status & (RxOK | RxUnderrun | RxOverflow | RxFIFOOver)) /* Rx interrupt */
- rtl8139_rx_interrupt (dev, tp, ioaddr);
-
- if (status & (TxOK | TxErr)) {
- spin_lock (&tp->lock);
+ if (netif_running (dev) && (status & (TxOK | TxErr)))
X rtl8139_tx_interrupt (dev, tp, ioaddr);
- spin_unlock (&tp->lock);
- }
X
X boguscnt--;
X } while (boguscnt > 0);
X
X if (boguscnt <= 0) {
- printk (KERN_WARNING
- "%s: Too much work at interrupt, "
- "IntrStatus=0x%4.4x.\n", dev->name,
- status);
+ printk (KERN_WARNING "%s: Too much work at interrupt, "
+ "IntrStatus=0x%4.4x.\n", dev->name, status);
X
X /* Clear all interrupt sources. */
X RTL_W16 (IntrStatus, 0xffff);
X }
X
+ spin_unlock (&tp->lock);
+
X DPRINTK ("%s: exiting interrupt, intr_status=%#4.4x.\n",
X dev->name, RTL_R16 (IntrStatus));
X }
@@ -2116,8 +2240,9 @@


X {
X struct rtl8139_private *tp = dev->priv;

X void *ioaddr = tp->mmio_addr;
- int i;
X int ret = 0;
+ int i;
+ unsigned long flags;
X

X DPRINTK ("ENTER\n");
X

@@ -2135,26 +2260,21 @@
X DPRINTK ("%s: Shutting down ethercard, status was 0x%4.4x.\n",
X dev->name, RTL_R16 (IntrStatus));
X
- spin_lock_irq(&tp->lock);
+ spin_lock_irqsave (&tp->lock, flags);
X
X /* Stop the chip's Tx and Rx DMA processes. */
- RTL_W8 (ChipCmd, (RTL_R8 (ChipCmd) & ChipCmdClear));
+ RTL_W8 (ChipCmd, 0);
X
X /* Disable interrupts by clearing the interrupt mask. */
- RTL_W16 (IntrMask, 0x0000);
+ RTL_W16 (IntrMask, 0);
X
X /* Update the error counts. */
X tp->stats.rx_missed_errors += RTL_R32 (RxMissed);
X RTL_W32 (RxMissed, 0);
X
- spin_unlock_irq (&tp->lock);
+ spin_unlock_irqrestore (&tp->lock, flags);
X
X synchronize_irq ();
-
- /* snooze for a small bit */


- if (current->need_resched)
- schedule ();

-
X free_irq (dev->irq, dev);
X
X rtl8139_tx_clear (tp);
@@ -2176,53 +2296,92 @@
X
X /* Green! Put the chip in low-power mode. */
X RTL_W8 (Cfg9346, Cfg9346_Unlock);
- RTL_W8 (Config1, 0x03);
- RTL_W8 (HltClk, 'H'); /* 'R' would leave the clock running. */
X
- MOD_DEC_USE_COUNT;


+ if (rtl_chip_info[tp->chipset].flags & HasHltClk)
+ RTL_W8 (HltClk, 'H'); /* 'R' would leave the clock running. */

X
+ MOD_DEC_USE_COUNT;


X DPRINTK ("EXIT\n");

X return 0;
X }
X
X

-static int mii_ioctl (struct device *dev, struct ifreq *rq, int cmd)

+static int netdev_ethtool_ioctl (struct device *dev, void *useraddr)
+{
+ struct rtl8139_private *np = dev->priv;
+ u32 ethcmd;
+
+ if (copy_from_user (&ethcmd, useraddr, sizeof (ethcmd)))
+ return -EFAULT;
+
+ switch (ethcmd) {
+ case ETHTOOL_GDRVINFO:
+ {
+ struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
+ strcpy (info.driver, DRV_NAME);
+ strcpy (info.version, DRV_VERSION);
+ sprintf(info.bus_info, "PCI slot #%u", PCI_SLOT(np->pci_dev->devfn));
+ if (copy_to_user (useraddr, &info, sizeof (info)))
+ return -EFAULT;


+ return 0;
+ }
+

+ default:
+ break;
+ }
+

+ return -EOPNOTSUPP;
+}
+


+static int netdev_ioctl (struct device *dev, struct ifreq *rq, int cmd)

X {
X struct rtl8139_private *tp = dev->priv;

- u16 *data = (u16 *) & rq->ifr_data;
+ struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;


X int rc = 0;

+ int phy = tp->phys[0] & 0x3f;


X
X DPRINTK ("ENTER\n");
X

+#ifdef notdef
+ data->phy_id &= 0x1f;
+ data->reg_num &= 0x1f;
+#endif
+
X switch (cmd) {
- case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */
- data[0] = tp->phys[0] & 0x3f;
+ case SIOCETHTOOL:
+ return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+
+ case SIOCGMIIPHY: /* Get the address of the PHY in use. */
+ case SIOCDEVPRIVATE: /* binary compat, remove in 2.5 */
+ data->phy_id = phy;
X /* Fall Through */
X
- case SIOCDEVPRIVATE + 1: /* Read the specified MII register. */
- data[3] = mdio_read (dev, data[0], data[1] & 0x1f);
+ case SIOCGMIIREG: /* Read the specified MII register. */
+ case SIOCDEVPRIVATE+1: /* binary compat, remove in 2.5 */
+ data->val_out = mdio_read (dev, data->phy_id, data->reg_num);
X break;
X
- case SIOCDEVPRIVATE + 2: /* Write the specified MII register */
+ case SIOCSMIIREG: /* Write the specified MII register */
+ case SIOCDEVPRIVATE+2: /* binary compat, remove in 2.5 */
X if (!capable (CAP_NET_ADMIN)) {
X rc = -EPERM;
X break;
X }
X
- if (data[0] == tp->phys[0]) {
- u16 value = data[2];
- switch (data[1]) {
+ if (data->phy_id == phy) {
+ u16 value = data->val_in;
+ switch (data->reg_num) {
X case 0:
X /* Check for autonegotiation on or reset. */
X tp->medialock = (value & 0x9000) ? 0 : 1;
X if (tp->medialock)
X tp->full_duplex = (value & 0x0100) ? 1 : 0;
X break;
- case 4: tp->advertising = value; break;
+ case 4: /* tp->advertising = value; */ break;
X }
X }
- mdio_write(dev, data[0], data[1] & 0x1f, data[2]);
- break;
+ mdio_write(dev, data->phy_id, data->reg_num, data->val_in);
+ break;
X
X default:
X rc = -EOPNOTSUPP;
@@ -2238,22 +2397,21 @@


X {
X struct rtl8139_private *tp = dev->priv;

X void *ioaddr = tp->mmio_addr;
+ unsigned long flags;
X

X DPRINTK ("ENTER\n");
X

X if (netif_running(dev)) {
- spin_lock_irq(&tp->lock);
+ spin_lock_irqsave (&tp->lock, flags);
X tp->stats.rx_missed_errors += RTL_R32 (RxMissed);
X RTL_W32 (RxMissed, 0);
- spin_unlock_irq(&tp->lock);
+ spin_unlock_irqrestore (&tp->lock, flags);
X }


X
X DPRINTK ("EXIT\n");

X return &tp->stats;
X }
X
-
-
X /* Set or clear the multicast filter for this adaptor.
X This routine is not state sensitive and need not be SMP locked. */
X
@@ -2272,7 +2430,7 @@
X ethernet_polynomial : 0);
X }
X
- DPRINTK ("EXIT\n");
+ DPRINTK ("EXIT, returning %u\n", crc);
X return crc;
X }
X
@@ -2307,20 +2465,25 @@
X mc_filter[1] = mc_filter[0] = 0xffffffff;
X } else {
X struct dev_mc_list *mclist;
- rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
+ rx_mode = AcceptBroadcast | AcceptMyPhys;
X mc_filter[1] = mc_filter[0] = 0;
X for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
- i++, mclist = mclist->next)
- set_bit (ether_crc (ETH_ALEN, mclist->dmi_addr) >> 26,
- mc_filter);
+ i++, mclist = mclist->next) {
+ int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
+
+ mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31));
+ rx_mode |= AcceptMulticast;
+ }
X }
X
X spin_lock_irqsave (&tp->lock, flags);
X
X /* We can safely update without stopping the chip. */
- tmp = rtl8139_rx_config | rx_mode |
- (RTL_R32 (RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
- RTL_W32_F (RxConfig, tmp);
+ tmp = rtl8139_rx_config | rx_mode;
+ if (tp->rx_config != tmp) {
+ RTL_W32 (RxConfig, tmp);
+ tp->rx_config = tmp;
+ }
X RTL_W32_F (MAR0 + 0, mc_filter[0]);
X RTL_W32_F (MAR0 + 4, mc_filter[1]);
X
@@ -2334,13 +2497,21 @@
X {
X struct pci_dev *pcidev;
X struct pci_device_id *pdid;
+ struct rtl8139_private *tp;
+ int i, initialized;
X
X if (rtl8139_initialized) return -ENODEV;
X for (pdid=&rtl8139_pci_tbl[0]; pdid->vendor != 0; pdid++) {
- for (pcidev = pci_find_device(pdid->vendor, pdid->device, NULL); pcidev != NULL; pcidev = pci_find_device(pdid->vendor, pdid->device, pcidev)) {
- if (rtl8139_init_one(pcidev, pdid) != 0) {
- printk(KERN_ERR "Error initializing PCI device %08lX.\n", (unsigned long) pcidev);
+ for (pcidev = rtl8139_pci_find_device(pdid->vendor, pdid->device, NULL); pcidev != NULL; pcidev = rtl8139_pci_find_device(pdid->vendor, pdid->device, pcidev)) {
+ initialized = 0;
+ for (i=0; i<rtl8139_device_count; i++) {
+ tp = (struct rtl8139_private *) rtl8139_device_tab[i]->priv;
+ if (tp->pci_dev == pcidev)
+ initialized = 1;
X }
+ if (!initialized)
+ if (rtl8139_init_one(pcidev, pdid) != 0)
+ printk(KERN_ERR "Error initializing PCI device %08lX.\n", (unsigned long) pcidev);
X }
X }
X rtl8139_initialized++;
@@ -2360,13 +2531,6 @@
X /* ------------------------------------------------------------------------- */
X
X #ifdef MODULE
-
-MODULE_AUTHOR (RTL8139_AUTHOR);
-MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver");
-MODULE_PARM (multicast_filter_limit, "i");
-MODULE_PARM (max_interrupt_work, "i");
-MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
X
X int init_module(void)
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/82596.c linux/drivers/net/82596.c
--- v2.2.19/drivers/net/82596.c Sun Mar 25 17:31:20 2001
+++ linux/drivers/net/82596.c Wed Oct 10 01:40:59 2001
@@ -1106,7 +1106,7 @@
X {
X int i;
X struct i596_private *lp;
- char eth_addr[6];
+ char eth_addr[8];
X static int probed = 0;
X
X if (probed)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/Config.in linux/drivers/net/Config.in
--- v2.2.19/drivers/net/Config.in Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/Config.in Wed Oct 10 01:40:59 2001
@@ -101,10 +101,11 @@
X tristate 'RealTek 8129/8139 (not 8019/8029!) support' CONFIG_RTL8139
X fi
X if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- tristate 'Alternative RealTek 8139 driver (8139too) support' CONFIG_RTL8139TOO
+ tristate 'Alternative RealTek 8129/8139 driver (8139too) support' CONFIG_RTL8139TOO
X if [ "$CONFIG_RTL8139TOO" != "n" ]; then
X bool ' Use PIO instead of MMIO' CONFIG_8139TOO_PIO
X bool ' Support for automatic channel equalization' CONFIG_8139TOO_TUNE_TWISTER
+ bool ' Support for 8129' CONFIG_8139TOO_8129
X fi
X fi
X bool 'Other ISA cards' CONFIG_NET_ISA
@@ -135,8 +136,8 @@
X bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA
X if [ "$CONFIG_NET_EISA" = "y" ]; then
X tristate 'AMD PCnet32 (VLB and PCI) support' CONFIG_PCNET32
+ tristate 'Adaptec Starfire/DuraLAN support' CONFIG_ADAPTEC_STARFIRE
X if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- tristate 'Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE
X tristate 'Ansel Communications EISA 3200 support (EXPERIMENTAL)' CONFIG_AC3200
X fi
X tristate 'Apricot Xen-II on board Ethernet' CONFIG_APRICOT
@@ -301,7 +302,7 @@
X #
X # Microgate Synclink HDLC/SYNCPPP support
X #
-dep_tristate 'SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP m
+tristate 'SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP
X
X #
X # Lan Media's board. Currently 1000, 1200, 5200, 5245
@@ -342,6 +343,11 @@
X fi
X fi
X fi
+fi
+
+if [ "$CONFIG_HDLC" = "y" -o "$CONFIG_SYNCLINK_SYNCPPP" = "y" -o \
+ "$CONFIG_LANMEDIA" = "y" ] ; then
+ define_bool CONFIG_SYNCPPP y
X fi
X
X tristate 'Frame relay DLCI support' CONFIG_DLCI
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/Makefile linux/drivers/net/Makefile
--- v2.2.19/drivers/net/Makefile Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/Makefile Wed Oct 10 01:40:59 2001
@@ -1445,7 +1445,7 @@
X rm -f core *.o *.a *.s
X
X wanpipe.o: $(WANPIPE_OBJS)
- ld -r -o $@ $(WANPIPE_OBJS)
+ $(LD) -r -o $@ $(WANPIPE_OBJS)
X
X rcpci.o: rcpci45.o rclanmtl.o
X $(LD) -r -o rcpci.o rcpci45.o rclanmtl.o
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
--- v2.2.19/drivers/net/cs89x0.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/cs89x0.c Mon Oct 22 10:48:49 2001
@@ -904,7 +904,7 @@
X lp->stats.rx_dropped++;
X return;
X }
- skb->len = length;
+ skb_put(skb, length);
X skb->dev = dev;
X
X insw(ioaddr + RX_FRAME_PORT, skb->data, length >> 1);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/daynaport.c linux/drivers/net/daynaport.c
--- v2.2.19/drivers/net/daynaport.c Sun Mar 25 17:31:20 2001
+++ linux/drivers/net/daynaport.c Wed Oct 10 01:40:59 2001
@@ -447,7 +447,7 @@
X }
X
X /* We should hopefully not get here */
- printk(KERN_ERR "Probe unsucessful.\n");
+ printk(KERN_ERR "Probe unsuccessful.\n");
X return -ENODEV;
X
X membad:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/dmfe.c linux/drivers/net/dmfe.c
--- v2.2.19/drivers/net/dmfe.c Sun Mar 25 17:31:21 2001
+++ linux/drivers/net/dmfe.c Wed Oct 31 14:07:07 2001
@@ -1,7 +1,8 @@
X /*
- dmfe.c: Version 1.28 01/18/2000
+ dmfe.c: Version 1.36 04/20/2001
X
- A Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver for Linux.
+ A Davicom DM9102/DM9102A/DM9102A+DM9801/DM9102A+DM9802 NIC fast
+ ethernet driver for Linux.
X Copyright (C) 1997 Sten Wang
X
X This program is free software; you can redistribute it and/or
@@ -16,11 +17,17 @@
X
X
X Compiler command:
- "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
+ "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall
X -Wstrict-prototypes -O6 -c dmfe.c"
X OR
- "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net -Wall
- -Wstrict-prototypes -O6 -c dmfe.c"
+ "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/include
+ -Wall -Wstrict-prototypes -O6 -c dmfe.c"
+ OR
+ "gcc -D__SMP__ -DMODULE -DMODVERSIONS -D__KERNEL__
+ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O6 -c dmfe.c"
+
+ Note: "O" of -O6 is a capital 'o', not a '0' (zero)
+
X
X The following steps teach you how to active DM9102 board:
X 1. Used the upper compiler command to compile dmfe.c
@@ -30,22 +37,30 @@
X "insmod dmfe mode=1" ;;Force 100M Half Duplex
X "insmod dmfe mode=4" ;;Force 10M Full Duplex
X "insmod dmfe mode=5" ;;Force 100M Full Duplex
+ "insmod dmfe mode=100" ;;Force 1M HomeRun(DM9801)
+ "insmod dmfe mode=200" ;;Force 1M LongRun(DM9802)
X 3. config a dm9102 network interface
X "ifconfig eth0 172.22.3.18"
- ^^^^^^^^^^^ your IP address
+ ^^^^^^^^^^^ your IP address
X 4. active the IP routing table
X "route add -net 172.22.3.0 eth0"
X 5. Well done. Your DM9102 adapter actived now.
X
+
+ DAVICOM Web-Site: http://www.davicom.com.tw
+
X Author: Sten Wang, 886-3-5798797-8517, E-mail: sten...@davicom.com.tw
X
- Date: 10/28,1998
+ Date: 03/08/2001
X
X (C)Copyright 1997-1998 DAVICOM Semiconductor,Inc. All Rights Reserved.
-
+
X Cleaned up for kernel merge by Alan Cox (al...@redhat.com)
-
+
X */
+#if defined(MODVERSIONS)
+#include <linux/modversions.h>
+#endif /* */
X

X #include <linux/module.h>
X #include <linux/kernel.h>

@@ -74,44 +89,58 @@
X #define PCI_DM9132_ID 0x91321282 /* Davicom DM9132 ID */
X #define PCI_DM9102_ID 0x91021282 /* Davicom DM9102 ID */
X #define PCI_DM9100_ID 0x91001282 /* Davicom DM9100 ID */
+#define PCI_DM9009_ID 0x90091282 /* Davicom DM9009 ID */
X
X #define DMFE_SUCC 0
X #define DM9102_IO_SIZE 0x80
X #define DM9102A_IO_SIZE 0x100
-#define TX_FREE_DESC_CNT 0xc /* Tx packet count */
X #define TX_MAX_SEND_CNT 0x1 /* Maximum tx packet per time */
X #define TX_DESC_CNT 0x10 /* Allocated Tx descriptors */
-#define RX_DESC_CNT 0x10 /* Allocated Rx descriptors */
-#define DESC_ALL_CNT TX_DESC_CNT+RX_DESC_CNT
+#define RX_DESC_CNT 0x20 /* Allocated Rx descriptors */
+#define TX_FREE_DESC_CNT (TX_DESC_CNT-2) /* Max TX packet count */
+#define TX_WAKE_DESC_CNT (TX_DESC_CNT-3) /* TX wakeup count */
+#define DESC_ALL_CNT (TX_DESC_CNT+RX_DESC_CNT)
X #define TX_BUF_ALLOC 0x600
X #define RX_ALLOC_SIZE 0x620
X #define DM910X_RESET 1
-#define CR6_DEFAULT 0x00280000 /* SF, HD */
-#define CR7_DEFAULT 0x1a2cd
+#define CR0_DEFAULT 0x00E00000 /* TX & RX burst mode */
+#define CR6_DEFAULT 0x00080000 /* HD */
+#define CR7_DEFAULT 0x180c1
X #define CR15_DEFAULT 0x06 /* TxJabber RxWatchdog */
X #define TDES0_ERR_MASK 0x4302 /* TXJT, LC, EC, FUE */
X #define MAX_PACKET_SIZE 1514
X #define DMFE_MAX_MULTICAST 14
-#define RX_MAX_TRAFFIC 0x14000
+#define RX_COPY_SIZE 100
X #define MAX_CHECK_PACKET 0x8000
+#define DM9801_NOISE_FLOOR 8
+#define DM9802_NOISE_FLOOR 5
X
X #define DMFE_10MHF 0
X #define DMFE_100MHF 1
X #define DMFE_10MFD 4
X #define DMFE_100MFD 5
X #define DMFE_AUTO 8
+#define DMFE_1M_HPNA 0x10
+#define DMFE_1M_LONG 0x20
X
-#define DMFE_TIMER_WUT jiffies+(HZ*2)/2 /* timer wakeup time : 1 second */
-#define DMFE_TX_TIMEOUT ((HZ*3)/2) /* tx packet time-out time 1.5 s" */
+#define DMFE_TXTH_72 0x400000 /* TX TH 72 byte */
+#define DMFE_TXTH_96 0x404000 /* TX TH 96 byte */
+#define DMFE_TXTH_128 0x0000 /* TX TH 128 byte */
+#define DMFE_TXTH_256 0x4000 /* TX TH 256 byte */
+#define DMFE_TXTH_512 0x8000 /* TX TH 512 byte */
+#define DMFE_TXTH_1K 0xC000 /* TX TH 1K byte */
X
-#define DMFE_DBUG(dbug_now, msg, vaule) if (dmfe_debug || dbug_now) printk("DBUG: %s %x\n", msg, vaule)
+#define DMFE_TIMER_WUT (jiffies + HZ * 1)/* timer wakeup time : 1 second */
+#define DMFE_TX_TIMEOUT (HZ * 1.5) /* tx packet time-out time 1.5 s" */
+#define DMFE_TX_KICK (HZ * 0.5) /* tx packet Kick-out time 0.5 s" */
X
-#define DELAY_5US udelay(5) /* udelay scale 1 usec */
+#define DMFE_DBUG(dbug_now, msg, vaule) if (dmfe_debug || dbug_now) printk(KERN_ERR "dmfe: %s %x\n", msg, vaule)
X
-#define DELAY_1US udelay(1) /* udelay scale 1 usec */
+#define DELAY_5US udelay(5) /* udelay scale 1 usec */
X
-#define SHOW_MEDIA_TYPE(mode) printk(KERN_WARNING "dmfe: Change Speed to %sMhz %s duplex\n",mode & 1 ?"100":"10", mode & 4 ? "full":"half");
+#define DELAY_1US udelay(1) /* udelay scale 1 usec */
X
+#define SHOW_MEDIA_TYPE(mode) printk(KERN_ERR "dmfe: Change Speed to %sMhz %s duplex\n",mode & 1 ?"100":"10", mode & 4 ? "full":"half");
X
X /* CR9 definition: SROM/MII */
X #define CR9_SROM_READ 0x4800
@@ -124,6 +153,10 @@
X #define PHY_DATA_0 0x00000
X #define MDCLKH 0x10000
X
+#define PHY_POWER_DOWN 0x800
+
+#define SROM_V41_CODE 0x14
+
X #define SROM_CLK_WRITE(data, ioaddr) outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr);DELAY_5US;outl(data|CR9_SROM_READ|CR9_SRCS|CR9_SRCLK,ioaddr);DELAY_5US;outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr);DELAY_5US;
X
X #define CHK_IO_SIZE(pci_id, dev_rev) ( (pci_id==PCI_DM9132_ID) || (dev_rev >= 0x02000030) ) ? DM9102A_IO_SIZE: DM9102_IO_SIZE
@@ -145,21 +178,20 @@
X u32 next_rx_desc;
X u32 reserved;
X };
-
X struct dmfe_board_info {
X u32 chip_id; /* Chip vendor/Device ID */
- u32 chip_revesion; /* Chip revesion */
+ u32 chip_revision; /* Chip revision */
X struct device *next_dev; /* next device */
X
X struct pci_dev *net_dev; /* PCI device */
X
- unsigned long ioaddr; /* I/O base address */
+ u32 ioaddr; /* I/O base address */
X u32 cr0_data;
X u32 cr5_data;
X u32 cr6_data;
X u32 cr7_data;
X u32 cr15_data;
-
+
X /* descriptor pointer */
X unsigned char *buf_pool_ptr; /* Tx buffer pool memory */
X unsigned char *buf_pool_start; /* Tx buffer pool align dword */
@@ -174,19 +206,33 @@
X u32 tx_queue_cnt; /* wait to send packet count */
X u32 rx_avail_cnt; /* available rx descriptor count */
X u32 interval_rx_cnt; /* rx packet count a callback time */
-
- u16 phy_id2; /* Phyxcer ID2 */
-
+ u16 HPNA_command; /* For HPNA register 16 */
+ u16 HPNA_timer; /* For HPNA remote device check */
+ u16 dbug_cnt;
+ u16 NIC_capability; /* NIC media capability */
+ u16 PHY_reg4; /* Saved Phyxcer register 4 value */
+ u8 HPNA_present; /* 0:none, 1:DM9801, 2:DM9802 */
+ u8 chip_type; /* Keep DM9102A chip type */
X u8 media_mode; /* user specify media mode */
X u8 op_mode; /* real work media mode */
X u8 phy_addr;
X u8 link_failed; /* Ever link failed */
X u8 wait_reset; /* Hardware failed, need to reset */
- u8 in_reset_state; /* Now driver in reset routine */
- u8 rx_error_cnt; /* received abnormal case count */
X u8 dm910x_chk_mode; /* Operating mode check */
+ u8 first_in_callback; /* Flag to record state */
X struct timer_list timer;
X struct enet_statistics stats; /* statistic counter */
+/* Driver defined statistic counter */
+ unsigned long tx_fifo_underrun;
+ unsigned long tx_loss_carrier;
+ unsigned long tx_no_carrier;
+ unsigned long tx_late_collision;
+ unsigned long tx_excessive_collision;
+ unsigned long tx_jabber_timeout;
+ unsigned long reset_count;
+ unsigned long reset_cr8;
+ unsigned long reset_fatal;
+ unsigned long reset_TXtimeout;
X unsigned char srom[128];
X };
X
@@ -204,7 +250,7 @@
X
X /* Global variable declaration ----------------------------- */
X static int dmfe_debug = 0;
-static unsigned char dmfe_media_mode = 8;
+static unsigned char dmfe_media_mode = DMFE_AUTO;
X static struct device *dmfe_root_dev = NULL; /* First device */
X static u32 dmfe_cr6_user_set = 0;
X
@@ -214,6 +260,13 @@
X static unsigned char mode = 8;
X static u8 chkmode = 1;
X
+static u8 HPNA_mode = 0; /* Default: Low Power/High Speed */
+static u8 HPNA_rx_cmd = 0; /* Default: Disable Rx remote command */
+static u8 HPNA_tx_cmd = 0; /* Default: Don't issue remote command */
+static u8 HPNA_NoiseFloor = 0; /* Default: HPNA NoiseFloor */
+static u8 SF_mode = 0; /* Special Function: 1:VLAN, 2:RX Flow Control
+ 4: TX pause packet */
+
X static unsigned long CrcTable[256] =
X {
X 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL,
@@ -283,6 +336,7 @@
X };
X
X /* function declaration ------------------------------------- */
+int dmfe_reg_board(struct device *);
X int dmfe_probe(struct device *);
X static int dmfe_open(struct device *);
X static int dmfe_start_xmit(struct sk_buff *, struct device *);
@@ -301,24 +355,35 @@
X static void phy_write(u32, u8, u8, u16, u32);
X static void phy_write_1bit(u32, u32);
X static u16 phy_read_1bit(u32);
-static void dmfe_sense_speed(struct dmfe_board_info *);
+static u8 dmfe_sense_speed(struct dmfe_board_info *);
X static void dmfe_process_mode(struct dmfe_board_info *);
X static void dmfe_timer(unsigned long);
X static void dmfe_rx_packet(struct device *, struct dmfe_board_info *);
+static void dmfe_free_tx_pkt(struct device *, struct dmfe_board_info *);
X static void dmfe_reused_skb(struct dmfe_board_info *, struct sk_buff *);
X static void dmfe_dynamic_reset(struct device *);
X static void dmfe_free_rxbuffer(struct dmfe_board_info *);
X static void dmfe_init_dm910x(struct device *);
X static unsigned long cal_CRC(unsigned char *, unsigned int, u8);
+static void dmfe_parse_srom(struct dmfe_board_info *);
+static void dmfe_program_DM9801(struct dmfe_board_info *, int);
+static void dmfe_program_DM9802(struct dmfe_board_info *);
+static void dmfe_HPNA_remote_cmd_chk(struct dmfe_board_info *);
+static void dmfe_set_phyxcer(struct dmfe_board_info *);
X
X /* DM910X network baord routine ---------------------------- */
X
X /*
- Search DM910X board ,allocate space and register it
+ Search DM910X board, allocate space and register it
X */
+int dmfe_reg_board(struct device *dev) /* For Kernel 2.2X */
+{
+ return dmfe_probe(dev);
+}
+
X int dmfe_probe(struct device *dev)
X {
- unsigned long pci_iobase;
+ u32 pci_iobase;
X u16 dm9102_count = 0;
X u8 pci_irqline;
X static int index = 0; /* For multiple call */
@@ -332,42 +397,40 @@
X return -ENODEV;
X
X index = 0;
- while ((net_dev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8, net_dev)))
- {
- u32 pci_id;
- u32 dev_rev;
+ while ((net_dev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8, net_dev))) {
+ u32 pci_id, dev_rev, pci_pmr;
X u8 pci_cmd;
X
X index++;
X if (pci_read_config_dword(net_dev, PCI_VENDOR_ID, &pci_id) != DMFE_SUCC)
X continue;
-
- if ((pci_id != PCI_DM9102_ID) && (pci_id != PCI_DM9132_ID))
+ if ((pci_id != PCI_DM9102_ID) && (pci_id != PCI_DM9132_ID) && (pci_id != PCI_DM9009_ID))
X continue;
X
X /* read PCI IO base address and IRQ to check */
- pci_iobase = net_dev->base_address[0];
- pci_irqline = net_dev->irq;
- pci_iobase &= ~0x7f; /* mask off bit0~6 */
+ pci_read_config_dword(net_dev, PCI_BASE_ADDRESS_0, &pci_iobase);
+ pci_read_config_byte(net_dev, PCI_INTERRUPT_LINE, &pci_irqline);
+ pci_read_config_byte(net_dev, PCI_COMMAND, &pci_cmd);
+ pci_read_config_dword(net_dev, 8, &dev_rev); /* Read Chip revision */
+ pci_read_config_dword(net_dev, 0x50, &pci_pmr); /* Read PMR */
X
X /* Enable Master/IO access, Disable memory access */
- pci_read_config_byte(net_dev, PCI_COMMAND, &pci_cmd);
X pci_cmd |= PCI_COMMAND_IO + PCI_COMMAND_MASTER;
X pci_cmd &= ~PCI_COMMAND_MEMORY;
- pci_write_config_byte(net_dev, PCI_COMMAND, pci_cmd);
X
- /* Set Latency Timer 80h */
+ /* Write back PCI command & Let latency timer = 0x80 */
+ pci_write_config_byte(net_dev, PCI_COMMAND, pci_cmd);
X pci_write_config_byte(net_dev, PCI_LATENCY_TIMER, 0x80);
X
- /* Read Chip revesion */
- pci_read_config_dword(net_dev, PCI_REVISION_ID, &dev_rev);
-
X /* IO range check */
- if (check_region(pci_iobase, CHK_IO_SIZE(pci_id, dev_rev)))
+ pci_iobase &= ~0x7f; /* mask off bit0~6 */
+ if (check_region(pci_iobase, CHK_IO_SIZE(pci_id, dev_rev))) {
+ printk(KERN_ERR "dmfe: I/O conflict : IO=%x Range=%x\n", pci_iobase, CHK_IO_SIZE(pci_id, dev_rev));
X continue;
+ }
X
X /* Interrupt check */
- if (pci_irqline == 0) {
+ if ((pci_irqline == 0xff) || (pci_irqline == 0)) {
X printk(KERN_ERR "dmfe: Interrupt wrong : IRQ=%d\n", pci_irqline);
X continue;
X }
@@ -386,7 +449,7 @@
X
X db->chip_id = pci_id; /* keep Chip vandor/Device ID */
X db->ioaddr = pci_iobase;
- db->chip_revesion = dev_rev;
+ db->chip_revision = dev_rev;
X
X db->net_dev = net_dev;
X
@@ -400,6 +463,14 @@
X dev->do_ioctl = &dmfe_do_ioctl;
X
X request_region(pci_iobase, CHK_IO_SIZE(pci_id, dev_rev), dev->name);
+ printk("dmfe: INDEX=%d ID=%x NAME=%s IO=%x IRQ=%d\n", index, pci_id, dev->name, pci_iobase, pci_irqline);
+
+ /* Check Chip type decision */
+ pci_pmr &= 0x070000; /* Leave PMR revision */
+ if ((pci_pmr == 0x010000) && (dev_rev == 0x02000031))
+ db->chip_type = 1; /* DM9102A E3 */
+ else
+ db->chip_type = 0;
X
X /* read 64 word srom data */
X for (i = 0; i < 64; i++)
@@ -411,6 +482,8 @@
X
X dev = 0; /* NULL device */
X }
+ if (!dm9102_count)
+ printk(KERN_ERR "dmfe: Can't find DM910X board or resource error\n");
X return dm9102_count ? 0 : -ENODEV;
X }
X
@@ -452,22 +525,24 @@
X db->tx_packet_cnt = 0;
X db->tx_queue_cnt = 0;
X db->rx_avail_cnt = 0;
- db->link_failed = 0;
+ db->link_failed = 1;
X db->wait_reset = 0;
- db->in_reset_state = 0;
- db->rx_error_cnt = 0;
-
- if (!chkmode || (db->chip_id == PCI_DM9132_ID) || (db->chip_revesion >= 0x02000030)) {
- //db->cr6_data &= ~CR6_SFT; /* Used Tx threshold */
- //db->cr6_data |= CR6_NO_PURGE; /* No purge if rx unavailable */
- db->cr0_data = 0xc00000; /* TX/RX desc burst mode */
+ db->first_in_callback = 0;
+ db->NIC_capability = 0xf; /* All capability */
+ db->PHY_reg4 = 0x1e0;
+
+ /* CR6 operation mode decision */
+ if (!chkmode || (db->chip_id == PCI_DM9132_ID) || (db->chip_revision >= 0x02000030)) {
+ db->cr6_data |= DMFE_TXTH_256;
+ db->cr0_data = CR0_DEFAULT; /* TX/RX desc burst mode */
X db->dm910x_chk_mode = 4; /* Enter the normal mode */
X } else {
+ db->cr6_data |= CR6_SFT; /* Store & Forward mode */
X db->cr0_data = 0;
X db->dm910x_chk_mode = 1; /* Enter the check mode */
X }
X
- /* Initilize DM910X board */
+ /* Initialize DM910X board */
X dmfe_init_dm910x(dev);
X
X /* Active System Interface */
@@ -477,7 +552,7 @@
X
X /* set and active a timer process */
X init_timer(&db->timer);
- db->timer.expires = DMFE_TIMER_WUT;
+ db->timer.expires = DMFE_TIMER_WUT + HZ * 2;
X db->timer.data = (unsigned long) dev;
X db->timer.function = &dmfe_timer;
X add_timer(&db->timer);
@@ -485,9 +560,9 @@


X return 0;
X }
X

-/* Initilize DM910X board
+/* Initialize DM910X board
X Reset DM910X board
- Initilize TX/Rx descriptor chain structure
+ Initialize TX/Rx descriptor chain structure
X Send the set-up frame
X Enable Tx/Rx machine
X */
@@ -498,25 +573,37 @@
X
X DMFE_DBUG(0, "dmfe_init_dm910x()", 0);
X
- /* Reset DM910x board : need 32 PCI clock to complete */
+ /* Reset DM910x MAC controller */
X outl(DM910X_RESET, ioaddr + DCR0); /* RESET MAC */
- DELAY_5US;
+ udelay(100);
X outl(db->cr0_data, ioaddr + DCR0);
+ DELAY_5US;
+
+ /* Phy addr : DM910(A)2/DM9132/9801, phy address = 1 */
+ db->phy_addr = 1;
X
+ /* Parser SROM and media mode */
+ dmfe_parse_srom(db);
+ db->media_mode = dmfe_media_mode;
+
+ /* RESET Phyxcer Chip by GPR port bit 7 */
X outl(0x180, ioaddr + DCR12); /* Let bit 7 output port */
- outl(0x80, ioaddr + DCR12); /* RESET DM9102 phyxcer */
+ if (db->chip_id == PCI_DM9009_ID) {
+ outl(0x80, ioaddr + DCR12); /* Issue RESET signal */
+ mdelay(300); /* Delay 300 ms */
+ }
X outl(0x0, ioaddr + DCR12); /* Clear RESET signal */
X
- /* Phy addr : DM910(A)2/DM9132/9801, phy address = 1 */
- db->phy_addr = 1;
+ /* Process Phyxcer Media Mode */
+ if (!(db->media_mode & 0x10)) /* Force 1M mode */
+ dmfe_set_phyxcer(db);
X
X /* Media Mode Check */
- db->media_mode = dmfe_media_mode;
- if (db->media_mode & DMFE_AUTO)
- dmfe_sense_speed(db);
- else
- db->op_mode = db->media_mode;
- dmfe_process_mode(db);
+ /* Don't need now. We did Restart Auto-Negotiation in dmfe_set_phyxcer()
+ and it should not complete now. We check media mode and program in
+ dmfe_timer() later */
+ if (!(db->media_mode & DMFE_AUTO))
+ db->op_mode = db->media_mode; /* Force Mode */
X
X /* Initiliaze Transmit/Receive decriptor and CR3/4 */
X dmfe_descriptor_init(db, ioaddr);
@@ -531,18 +618,15 @@
X send_filter_frame(dev, dev->mc_count); /* DM9102/DM9102A */
X
X /* Init CR5/CR7, interrupt active bit */
- outl(0xffffffff, ioaddr + DCR5); /* clear all CR5 status */
X db->cr7_data = CR7_DEFAULT;
X outl(db->cr7_data, ioaddr + DCR7);
X
X /* Init CR15, Tx jabber and Rx watchdog timer */
- db->cr15_data = CR15_DEFAULT;
X outl(db->cr15_data, ioaddr + DCR15);
X
X /* Enable DM910X Tx/Rx function */
- db->cr6_data |= CR6_RXSC | CR6_TXSC;
+ db->cr6_data |= CR6_RXSC | CR6_TXSC | 0x40000;
X update_cr6(db->cr6_data, ioaddr);
-
X }
X
X
@@ -558,20 +642,23 @@
X DMFE_DBUG(0, "dmfe_start_xmit", 0);
X
X /* Resource flag check */
- if (dev->tbusy == 1) /* Resource Busy */
+ if (test_and_set_bit(0, (void *) &dev->tbusy))
X return 1;
X
X /* Too large packet check */
X if (skb->len > MAX_PACKET_SIZE) {
- printk(KERN_WARNING "%s: big packet, size=%d\n", dev->name, (u16) skb->len);
+ printk(KERN_ERR "dmfe: A big packet, size=%d\n", (u16) skb->len);
X dev_kfree_skb(skb);


X return 0;
X }
+

X /* No Tx resource check, it never happen normally */
- if (db->tx_queue_cnt >= TX_FREE_DESC_CNT) {
- dev->tbusy = 1;
- return 1;
- }
+ if (db->tx_queue_cnt >= TX_FREE_DESC_CNT)
+ return -EBUSY;
+
+ /* Disable all interrupt */
+ outl(0, dev->base_addr + DCR7);
+
X /* transmit this packet */
X txptr = db->tx_insert_ptr;
X memcpy((char *) txptr->tx_buf_ptr, (char *) skb->data, skb->len);
@@ -581,7 +668,7 @@
X db->tx_insert_ptr = (struct tx_desc *) txptr->next_tx_desc;
X
X /* Transmit Packet Process */
- if (db->tx_packet_cnt < TX_MAX_SEND_CNT) {
+ if ((!db->tx_queue_cnt) && (db->tx_packet_cnt < TX_MAX_SEND_CNT)) {
X txptr->tdes0 = 0x80000000; /* set owner bit to DM910X */
X db->tx_packet_cnt++; /* Ready to send count */
X outl(0x1, dev->base_addr + DCR1); /* Issue Tx polling comand */
@@ -592,14 +679,19 @@
X }
X
X /* Tx resource check */
- if (db->tx_queue_cnt >= TX_FREE_DESC_CNT) {
- dev->tbusy = 1;
+ if (db->tx_queue_cnt < TX_FREE_DESC_CNT) {
+ dev->tbusy = 0;
X }
+
X /* free this SKB */
X dev_kfree_skb(skb);
+
+ /* Restore CR7 to enable interrupt */
+ outl(db->cr7_data, dev->base_addr + DCR7);


X return 0;
X }
X

+
X /*
X Stop the interface.
X The interface is stopped when it is brought.
@@ -612,16 +704,18 @@
X DMFE_DBUG(0, "dmfe_stop", 0);
X
X /* disable system */
- dev->start = 0; /* interface disable */
- dev->tbusy = 1; /* can't transmit */
+ dev->start = 0; /* interface disable */
+ dev->tbusy = 1; /* can't transmit */
X
- /* Reset & stop DM910X board */
- outl(DM910X_RESET, ioaddr + DCR0);
- DELAY_5US;
X
X /* deleted timer */
X del_timer(&db->timer);
X
+ /* Reset & stop DM910X board */
+ outl(DM910X_RESET, ioaddr + DCR0);
+ DELAY_5US;
+ phy_write(db->ioaddr, db->phy_addr, 0, 0x8000, db->chip_id);
+
X /* free interrupt */
X free_irq(dev->irq, dev);
X
@@ -634,114 +728,142 @@
X
X MOD_DEC_USE_COUNT;
X
+#if 0
+ /* show statistic counter */
+ printk("<DM9XS>: FU:%lx EC:%lx LC:%lx NC:%lx LOC:%lx TXJT:%lx RESET:%lx RCR8:%lx FAL:%lx TT:%lx\n", db->tx_fifo_underrun, db->tx_excessive_collision, db->tx_late_collision, db->tx_no_carrier, db->tx_loss_carrier, db->tx_jabber_timeout, db->reset_count, db->reset_cr8, db->reset_fatal, db->reset_TXtimeout);
+
+#endif /* */


X return 0;
X }
X

+
X /*
- DM9102 insterrupt handler
+ DM9102 interrupt handler
X receive the packet to upper layer, free the transmitted packet
X */
-
X static void dmfe_interrupt(int irq, void *dev_id, struct pt_regs *regs)
X {
X struct device *dev = dev_id;
- struct tx_desc *txptr;
- struct dmfe_board_info *db;
- u32 ioaddr;
X
+ struct dmfe_board_info *db = (struct dmfe_board_info *) dev->priv;
+ u32 ioaddr = dev->base_addr;
+ DMFE_DBUG(0, "dmfe_interrupt()", 0);
X if (!dev) {
X DMFE_DBUG(1, "dmfe_interrupt() without device arg", 0);
X return;
X }
- if (dev->interrupt) {
- DMFE_DBUG(1, "dmfe_interrupt() re-entry ", 0);
- return;
- }
- /* A real interrupt coming */
- dev->interrupt = 1; /* Lock interrupt */
- db = (struct dmfe_board_info *) dev->priv;
- ioaddr = dev->base_addr;
-
- DMFE_DBUG(0, "dmfe_interrupt()", 0);
-
-/* Disable all interrupt in CR7 to solve the interrupt edge problem */
- outl(0, ioaddr + DCR7);
X
-/* Got DM910X status */
+ /* Got DM910X status */
X db->cr5_data = inl(ioaddr + DCR5);
X outl(db->cr5_data, ioaddr + DCR5);
- /* printk("CR5=%x\n", db->cr5_data); */
+ if (!(db->cr5_data & 0xc1))
+ return;
+
+ /* Disable MAC interrupt in CR7 to solve the interrupt edge problem */
+ outl(0, ioaddr + DCR7);
X
X /* Check system status */
X if (db->cr5_data & 0x2000) {
X /* system bus error happen */
X DMFE_DBUG(1, "System bus error happen. CR5=", db->cr5_data);
X dev->tbusy = 1;
+ db->reset_fatal++;
X db->wait_reset = 1; /* Need to RESET */
- outl(0, ioaddr + DCR7); /* disable all interrupt */
- dev->interrupt = 0; /* unlock interrupt */
X return;
X }
+
+ /* Received the coming packet */
+ if ((db->cr5_data & 0x40) && db->rx_avail_cnt)
+ dmfe_rx_packet(dev, db);
+
+ /* reallocated rx descriptor buffer */
+ if (db->rx_avail_cnt < RX_DESC_CNT)
+ allocated_rx_buffer(db);
+
X /* Free the transmitted descriptor */
+ // if ( db->cr5_data & 0x01)
+ dmfe_free_tx_pkt(dev, db);
+
+ // mark_bh(NET_BH); /* Active upper layer */
+
+ /* Mode Check */
+ if (db->dm910x_chk_mode & 0x2) {
+ db->dm910x_chk_mode = 0x4;
+ db->cr6_data |= 0x100;
+ update_cr6(db->cr6_data, db->ioaddr);
+ }
+
+ /* Restore CR7 to enable MAC interrupt mask */
+ outl(db->cr7_data, ioaddr + DCR7);
+}
+
+
+/*
+ * Free TX resource after TX complete
+ */
+static void dmfe_free_tx_pkt(struct device *dev, struct dmfe_board_info *db)
+{
+ struct tx_desc *txptr;
+ u32 ioaddr = dev->base_addr;
X txptr = db->tx_remove_ptr;
X while (db->tx_packet_cnt) {
- /* printk("tdes0=%x\n", txptr->tdes0); */
+ /* printk("<DMFE>: tdes0=%x\n", txptr->tdes0); */
X if (txptr->tdes0 & 0x80000000)
X break;
X
X /* A packet sent completed */
+ db->tx_packet_cnt--;
X db->stats.tx_packets++;
X
X /* Transmit statistic counter */
X if (txptr->tdes0 != 0x7fffffff) {
- /* printk("tdes0=%x\n", txptr->tdes0); */
+ /* printk("<DMFE>: tdes0=%x\n", txptr->tdes0); */
X db->stats.collisions += (txptr->tdes0 >> 3) & 0xf;
+
X db->stats.tx_bytes += txptr->tdes1 & 0x7ff;
- if (txptr->tdes0 & TDES0_ERR_MASK)
+
+ if (txptr->tdes0 & TDES0_ERR_MASK) {
X db->stats.tx_errors++;
+ if (txptr->tdes0 & 0x0002) { /* UnderRun */
+ db->tx_fifo_underrun++;
+ if (!(db->cr6_data & CR6_SFT)) {
+ db->cr6_data = db->cr6_data | CR6_SFT;
+ update_cr6(db->cr6_data, db->ioaddr);
+ }
+ }
+ if (txptr->tdes0 & 0x0100)
+ db->tx_excessive_collision++;
+ if (txptr->tdes0 & 0x0200)
+ db->tx_late_collision++;
+ if (txptr->tdes0 & 0x0400)
+ db->tx_no_carrier++;
+ if (txptr->tdes0 & 0x0800)
+ db->tx_loss_carrier++;
+ if (txptr->tdes0 & 0x4000)
+ db->tx_jabber_timeout++;
+ }
X }
X txptr = (struct tx_desc *) txptr->next_tx_desc;
- db->tx_packet_cnt--;
- } /* End of while */
+ } /* End of while */
X
X /* Update TX remove pointer to next */
X db->tx_remove_ptr = (struct tx_desc *) txptr;
X
X /* Send the Tx packet in queue */
X if ((db->tx_packet_cnt < TX_MAX_SEND_CNT) && db->tx_queue_cnt) {
- txptr->tdes0 = 0x80000000; /* set owner bit to DM910X */
- db->tx_packet_cnt++; /* Ready to send count */
- outl(0x1, ioaddr + DCR1); /* Issue Tx polling command */
- dev->trans_start = jiffies; /* saved the time stamp */
+ txptr->tdes0 = 0x80000000; /* Set owner bit */
+ db->tx_packet_cnt++; /* Ready to send */
X db->tx_queue_cnt--;
+ outl(0x1, ioaddr + DCR1); /* Issue Tx polling */
+ dev->trans_start = jiffies; /* saved time stamp */
X }
- /* Resource available check */
- if (dev->tbusy && (db->tx_queue_cnt < TX_FREE_DESC_CNT)) {
- dev->tbusy = 0; /* free a resource */
- mark_bh(NET_BH); /* active bottom half */
- }
- /* Received the coming packet */
- if (db->rx_avail_cnt)
- dmfe_rx_packet(dev, db);
X
- /* reallocated rx descriptor buffer */
- if (db->rx_avail_cnt < RX_DESC_CNT)
- allocated_rx_buffer(db);
-
- /* Mode Check */
- if (db->dm910x_chk_mode & 0x2) {
- db->dm910x_chk_mode = 0x4;
- db->cr6_data |= 0x100;
- update_cr6(db->cr6_data, db->ioaddr);
- }
- dev->interrupt = 0; /* release interrupt lock */
+ /* Resource available check */
+ if (db->tx_queue_cnt < TX_WAKE_DESC_CNT) {
+ dev->tbusy = 0;
+ mark_bh(NET_BH);
+ } /* Active upper layer */
X
- /* Restore CR7 to enable interrupt mask */
- if (db->interval_rx_cnt > RX_MAX_TRAFFIC)
- db->cr7_data = 0x1a28d;
- else
- db->cr7_data = 0x1a2cd;
- outl(db->cr7_data, ioaddr + DCR7);
X }
X
X /*
@@ -767,7 +889,6 @@
X /* reused this SKB */
X DMFE_DBUG(0, "Reused SK buffer, rdes0", rxptr->rdes0);
X dmfe_reused_skb(db, (struct sk_buff *) rxptr->rx_skb_ptr);
- /* db->rx_error_cnt++; */
X } else {
X /* A packet with First/Last flag */
X rxlen = ((rxptr->rdes0 >> 16) & 0x3fff) - 4; /* skip CRC */
@@ -783,8 +904,7 @@
X if (rxptr->rdes0 & 0x80)
X db->stats.rx_length_errors++;
X }
- if (!(rxptr->rdes0 & 0x8000) ||
- ((db->cr6_data & CR6_PM) && (rxlen > 6))) {
+ if (!(rxptr->rdes0 & 0x8000) || ((db->cr6_data & CR6_PM) && (rxlen > 6))) {
X skb = (struct sk_buff *) rxptr->rx_skb_ptr;
X
X /* Received Packet CRC check need or not */
@@ -794,8 +914,18 @@
X db->dm910x_chk_mode = 3;
X } else {
X /* A good packet coming, send to upper layer */
- skb->dev = dev;
- skb_put(skb, rxlen);
+ /* Shorst packet used new SKB */
+ if ((rxlen < RX_COPY_SIZE) && ((skb = dev_alloc_skb(rxlen + 2)) != NULL)) {
+ /* Rx packet size less than COPY_SIZE, allocated a rxlen SKB */
+ skb->dev = dev;
+ skb_reserve(skb, 2); /* 16byte align */
+ memcpy(skb_put(skb, rxlen), ((struct sk_buff *) rxptr->rx_skb_ptr)->tail, rxlen);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 21'
echo 'File patch-2.2.20 is continued in part 22'
echo "22" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:21 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part22

#!/bin/sh -x
# this is part 22 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 22; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ dmfe_reused_skb(db, (struct sk_buff *) rxptr->rx_skb_ptr);
+ } else {
+ /* Pass this Rx buffer to upper layer */


+ skb->dev = dev;

+ skb_put(skb, rxlen);
+ }
X skb->protocol = eth_type_trans(skb, dev);
X netif_rx(skb); /* Send to upper layer */
X dev->last_rx = jiffies;
@@ -877,9 +1007,20 @@
X
X DMFE_DBUG(0, "dmfe_timer()", 0);
X
- /* Do reset now */
- if (db->in_reset_state)
- return;
+ /* Media mode process when Link OK before enter this route */
+ if (db->first_in_callback == 0) {
+ db->first_in_callback = 1;
+ if (db->chip_type && (db->chip_id == PCI_DM9102_ID)) {
+ db->cr6_data &= ~0x40000;


+ update_cr6(db->cr6_data, db->ioaddr);

+ phy_write(db->ioaddr, db->phy_addr, 0, 0x1000, db->chip_id);
+ db->cr6_data |= 0x40000;


+ update_cr6(db->cr6_data, db->ioaddr);

+ db->timer.expires = DMFE_TIMER_WUT + HZ * 2;

+ add_timer(&db->timer);
+ return;
+ }
+ }
X
X /* Operating Mode Check */
X if ((db->dm910x_chk_mode & 0x1) && (db->stats.rx_packets > MAX_CHECK_PACKET)) {
@@ -888,30 +1029,30 @@
X /* Dynamic reset DM910X : system error or transmit time-out */
X tmp_cr8 = inl(db->ioaddr + DCR8);
X if ((db->interval_rx_cnt == 0) && (tmp_cr8)) {
+ db->reset_cr8++;


X db->wait_reset = 1;

- /* printk("CR8 %x, Interval Rx %x\n", tmp_cr8, db->interval_rx_cnt); */
X }
- /* Receiving Traffic check */


- if (db->interval_rx_cnt > RX_MAX_TRAFFIC)
- db->cr7_data = 0x1a28d;
- else
- db->cr7_data = 0x1a2cd;

- outl(db->cr7_data, db->ioaddr + DCR7);
-
X db->interval_rx_cnt = 0;
X
- if (db->wait_reset | (db->tx_packet_cnt &&
- ((jiffies - dev->trans_start) > DMFE_TX_TIMEOUT)) | (db->rx_error_cnt > 3)) {
- /*
- printk("wait_reset %x, tx cnt %x, rx err %x, time %x\n", db->wait_reset, db->tx_packet_cnt, db->rx_error_cnt, jiffies-dev->trans_start);
- */
+ /* TX polling kick monitor */
+ if (db->tx_packet_cnt && ((jiffies - dev->trans_start) > DMFE_TX_KICK)) {
+ outl(0x1, dev->base_addr + DCR1); /* Tx polling again */
+
+ /* TX Timeout */
+ if (db->tx_packet_cnt && ((jiffies - dev->trans_start) > DMFE_TX_TIMEOUT)) {
+ db->reset_TXtimeout++;
+ db->wait_reset = 1;
+ }
+ }
+ if (db->wait_reset) {
X DMFE_DBUG(0, "Warn!! Warn!! Tx/Rx moniotr step1", db->tx_packet_cnt);
+ db->reset_count++;
X dmfe_dynamic_reset(dev);


+ db->first_in_callback = 0;

X db->timer.expires = DMFE_TIMER_WUT;
X add_timer(&db->timer);
X return;
X }
- db->rx_error_cnt = 0; /* Clear previos counter */
X
X /* Link status check, Dynamic media type change */
X if (db->chip_id == PCI_DM9132_ID)
@@ -919,8 +1060,8 @@
X else
X tmp_cr12 = inb(db->ioaddr + DCR12); /* DM9102/DM9102A */
X
- if (((db->chip_id == PCI_DM9102_ID) && (db->chip_revesion == 0x02000030)) ||
- ((db->chip_id == PCI_DM9132_ID) && (db->chip_revesion == 0x02000010))) {
+ if (((db->chip_id == PCI_DM9102_ID) && (db->chip_revision == 0x02000030)) ||
+ ((db->chip_id == PCI_DM9132_ID) && (db->chip_revision == 0x02000010))) {
X /* DM9102A Chip */
X if (tmp_cr12 & 2)
X tmp_cr12 = 0x0; /* Link failed */
@@ -931,35 +1072,39 @@
X /* Link Failed */
X DMFE_DBUG(0, "Link Failed", tmp_cr12);
X db->link_failed = 1;
- phy_write(db->ioaddr, db->phy_addr, 0, 0x8000, db->chip_id); /* reset Phy */
X
- /* 10/100M link failed, used 1M Home-Net */
- db->cr6_data |= 0x00040000; /* CR6 bit18 = 1, select Home-Net */
- db->cr6_data &= ~0x00000200; /* CR6 bit9 =0, half duplex mode */


- update_cr6(db->cr6_data, db->ioaddr);

+ /* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */
+ /* AUTO or force 1M Homerun/Longrun don't need */
+ if (!(db->media_mode & 0x38))
+ phy_write(db->ioaddr, db->phy_addr, 0, 0x1000, db->chip_id);
+
+ /* In AUTO mode, if INT phyxcer link failed, select EXT device */
+ if (db->media_mode & DMFE_AUTO) {
+ /* 10/100M link failed, used 1M Home-Net */
+ db->cr6_data |= 0x00040000; /* CR6 bit18 = 1, select Home-Net */
+ db->cr6_data &= ~0x00000200; /* CR6 bit9 =0, half duplex mode */


+ update_cr6(db->cr6_data, db->ioaddr);
+ }

X
- /* For DM9801 : PHY ID1 0181h, PHY ID2 B900h */
- db->phy_id2 = phy_read(db->ioaddr, db->phy_addr, 3, db->chip_id);
- if (db->phy_id2 == 0xb900)
- phy_write(db->ioaddr, db->phy_addr, 25, 0x7e08, db->chip_id);
X } else if ((tmp_cr12 & 0x3) && db->link_failed) {
X DMFE_DBUG(0, "Link link OK", tmp_cr12);
X db->link_failed = 0;
X
- /* CR6 bit18=0, select 10/100M */
- db->cr6_data &= ~0x00040000;


- update_cr6(db->cr6_data, db->ioaddr);
-

X /* Auto Sense Speed */
X if (db->media_mode & DMFE_AUTO)
- dmfe_sense_speed(db);
+ if (dmfe_sense_speed(db))


+ db->link_failed = 1;

X dmfe_process_mode(db);


- update_cr6(db->cr6_data, db->ioaddr);

+
X /* SHOW_MEDIA_TYPE(db->op_mode); */


X }
- /* reallocated rx descriptor buffer */
- if (db->rx_avail_cnt < RX_DESC_CNT)
- allocated_rx_buffer(db);

+
+ /* HPNA remote command check */
+ if (db->HPNA_command & 0xf00) {
+ db->HPNA_timer--;
+ if (!db->HPNA_timer)
+ dmfe_HPNA_remote_cmd_chk(db);
+ }
X
X /* Timer active again */
X db->timer.expires = DMFE_TIMER_WUT;
@@ -979,15 +1124,15 @@
X
X DMFE_DBUG(0, "dmfe_dynamic_reset()", 0);
X
- /* Enter dynamic reset route */
- db->in_reset_state = 1;
-
X /* Disable upper layer interface */
X dev->tbusy = 1; /* transmit packet disable */
X dev->start = 0; /* interface not ready */
X
- db->cr6_data &= ~(CR6_RXSC | CR6_TXSC); /* Disable Tx/Rx */
+ /* Stop MAC controller */
+ db->cr6_data &= ~(CR6_RXSC | CR6_TXSC); /* Disable Tx/Rx */
X update_cr6(db->cr6_data, dev->base_addr);


+ outl(0, dev->base_addr + DCR7);

+ outl(inl(dev->base_addr + DCR5), dev->base_addr + DCR5);
X
X /* Free Rx Allocate buffer */
X dmfe_free_rxbuffer(db);
@@ -996,9 +1141,8 @@


X db->tx_packet_cnt = 0;
X db->tx_queue_cnt = 0;
X db->rx_avail_cnt = 0;
- db->link_failed = 0;
+ db->link_failed = 1;
X db->wait_reset = 0;

- db->rx_error_cnt = 0;
X
X /* Re-initilize DM910X board */
X dmfe_init_dm910x(dev);
@@ -1007,12 +1151,10 @@
X dev->tbusy = 0; /* Can transmit packet */
X dev->start = 1; /* interface ready */
X
- /* Leave dynamic reser route */


- db->in_reset_state = 0;

X }
X
X /*
- free all allocated rx buffer
+ Free all allocated rx buffer
X */
X static void dmfe_free_rxbuffer(struct dmfe_board_info *db)
X {
@@ -1044,7 +1186,7 @@
X }
X
X /*
- Initialize transmit/Receive descriptor
+ Initialize transmit/Receive descriptor
X Using Chain structure, and allocated Tx/Rx buffer
X */
X static void dmfe_descriptor_init(struct dmfe_board_info *db, u32 ioaddr)
@@ -1108,8 +1250,7 @@
X outl(cr6_tmp, ioaddr + DCR6);
X DELAY_5US;
X outl(cr6_data, ioaddr + DCR6);
- cr6_tmp = inl(ioaddr + DCR6);
- /* printk("CR6 update %x ", cr6_tmp); */
+ DELAY_5US;
X }
X
X /* Send a setup frame for DM9132
@@ -1227,7 +1368,7 @@
X rxptr = db->rx_insert_ptr;
X
X while (db->rx_avail_cnt < RX_DESC_CNT) {
- if ((skb = alloc_skb(RX_ALLOC_SIZE, GFP_ATOMIC)) == NULL)
+ if ((skb = dev_alloc_skb(RX_ALLOC_SIZE)) == NULL)
X break;
X rxptr->rx_skb_ptr = (u32) skb;
X rxptr->rdes2 = virt_to_bus(skb->tail);
@@ -1279,19 +1420,16 @@
X /*
X Auto sense the media mode
X */
-static void dmfe_sense_speed(struct dmfe_board_info *db)
+static u8 dmfe_sense_speed(struct dmfe_board_info *db)
X {
- int i;
+ u8 ErrFlag = 0;
X u16 phy_mode;
X
- for (i = 1000; i; i--) {
- DELAY_5US;
- phy_mode = phy_read(db->ioaddr, db->phy_addr, 1, db->chip_id);
- if ((phy_mode & 0x24) == 0x24)
- break;
- }
-
- if (i) {
+ /* CR6 bit18=0, select 10/100M */
+ update_cr6((db->cr6_data & ~0x40000), db->ioaddr);
+ phy_mode = phy_read(db->ioaddr, db->phy_addr, 1, db->chip_id);
+ phy_mode = phy_read(db->ioaddr, db->phy_addr, 1, db->chip_id);
+ if ((phy_mode & 0x24) == 0x24) {
X if (db->chip_id == PCI_DM9132_ID) /* DM9132 */
X phy_mode = phy_read(db->ioaddr, db->phy_addr, 7, db->chip_id) & 0xf000;
X else /* DM9102/DM9102A */
@@ -1313,14 +1451,74 @@
X default:
X db->op_mode = DMFE_10MHF;
X DMFE_DBUG(0, "Media Type error, phy reg17", phy_mode);
+ ErrFlag = 1;
X break;
X }
X } else {
X db->op_mode = DMFE_10MHF;
X DMFE_DBUG(0, "Link Failed :", phy_mode);
+ ErrFlag = 1;
X }
+ return ErrFlag;
X }
X
+
+/*
+ Set 10/100 phyxcer capability
+ AUTO mode : phyxcer register4 is NIC capability
+ Force mode: phyxcer register4 is the force media
+ */
+static void dmfe_set_phyxcer(struct dmfe_board_info *db)
+{
+ u16 phy_reg;
+
+ /* Select 10/100M phyxcer */
+ db->cr6_data &= ~0x40000;


+ update_cr6(db->cr6_data, db->ioaddr);
+

+ /* DM9009 Chip: Phyxcer reg18 bit12=0 */


+ if (db->chip_id == PCI_DM9009_ID) {

+ phy_reg = phy_read(db->ioaddr, db->phy_addr, 18, db->chip_id) & ~0x1000;
+ phy_write(db->ioaddr, db->phy_addr, 18, phy_reg, db->chip_id);
+ }
+
+ /* Phyxcer capability setting */
+ phy_reg = phy_read(db->ioaddr, db->phy_addr, 4, db->chip_id) & ~0x01e0;
+ if (!(db->media_mode & DMFE_AUTO)) { /* AUTO/Force Mode Check */
+ /* Force Mode */
+ switch (db->media_mode) {
+ case DMFE_10MHF:
+ phy_reg |= 0x20;
+ break;
+ case DMFE_10MFD:
+ phy_reg |= 0x40;
+ break;
+ case DMFE_100MHF:
+ phy_reg |= 0x80;
+ break;
+ case DMFE_100MFD:
+ phy_reg |= 0x100;
+ break;
+ }


+ if (db->chip_id == PCI_DM9009_ID)

+ phy_reg &= 0x61;
+ }
+
+ /* Write new capability to Phyxcer Reg4 */
+ if (!(phy_reg & 0x01e0)) {
+ phy_reg |= db->PHY_reg4;
+ db->media_mode |= DMFE_AUTO;
+ }
+ phy_write(db->ioaddr, db->phy_addr, 4, phy_reg, db->chip_id);
+
+ /* Restart Auto-Negotiation */
+ if (db->chip_type && (db->chip_id == PCI_DM9102_ID))
+ phy_write(db->ioaddr, db->phy_addr, 0, 0x1800, db->chip_id);
+ if (!db->chip_type)
+ phy_write(db->ioaddr, db->phy_addr, 0, 0x1200, db->chip_id);


+}
+
+
X /*

X Process op-mode
X AUTO mode : PHY controller in Auto-negotiation Mode
@@ -1332,34 +1530,26 @@
X u16 phy_reg;
X
X /* Full Duplex Mode Check */
- db->cr6_data &= ~CR6_FDM; /* Clear Full Duplex Bit */
X if (db->op_mode & 0x4)
- db->cr6_data |= CR6_FDM;
+ db->cr6_data |= CR6_FDM; /* Set Full Duplex Bit */
+ else
+ db->cr6_data &= ~CR6_FDM; /* Clear Full Duplex Bit */
X
- if (!(db->media_mode & DMFE_AUTO)) { /* Force Mode Check */
- /* User force the media type */
- phy_reg = phy_read(db->ioaddr, db->phy_addr, 5, db->chip_id);
- /* printk("Nway phy_reg5 %x ",phy_reg); */
- if (phy_reg & 0x1) {
- /* parter own the N-Way capability */
- phy_reg = phy_read(db->ioaddr, db->phy_addr, 4, db->chip_id) & ~0x1e0;
- switch (db->op_mode) {
- case DMFE_10MHF:
- phy_reg |= 0x20;
- break;
- case DMFE_10MFD:
- phy_reg |= 0x40;
- break;
- case DMFE_100MHF:
- phy_reg |= 0x80;
- break;
- case DMFE_100MFD:
- phy_reg |= 0x100;
- break;
- }
- phy_write(db->ioaddr, db->phy_addr, 4, phy_reg, db->chip_id);
- } else {
- /* parter without the N-Way capability */
+ /* Transceiver Selection */
+ if (db->op_mode & 0x10) /* 1M HomePNA */
+ db->cr6_data |= 0x40000; /* External MII select */
+ else
+ db->cr6_data &= ~0x40000; /* Internal 10/100 transciver */


+ update_cr6(db->cr6_data, db->ioaddr);
+

+ /* 10/100M phyxcer force mode need */
+ if (!(db->media_mode & 0x18)) { /* Skip for AUTO mode or HomePNA */
+ /* Forece Mode */
+ phy_reg = phy_read(db->ioaddr, db->phy_addr, 6, db->chip_id);
+ if (!(phy_reg & 0x1)) {
+
+ /* parter without N-Way capability */
+ phy_reg = 0x0;
X switch (db->op_mode) {
X case DMFE_10MHF:
X phy_reg = 0x0;
@@ -1375,6 +1565,9 @@
X break;
X }
X phy_write(db->ioaddr, db->phy_addr, 0, phy_reg, db->chip_id);
+ if (db->chip_type && (db->chip_id == PCI_DM9102_ID))
+ mdelay(20);
+ phy_write(db->ioaddr, db->phy_addr, 0, phy_reg, db->chip_id);
X }
X }
X }
@@ -1503,10 +1696,11 @@
X return phy_data;


X }
X
+
X /*

- Calculate the CRC valude of the Rx packet
+ Calculate the CRC value of the Rx packet
X flag = 1 : return the reverse CRC (for the received packet CRC)
- 0 : return the normal CRC (for Hash Table index)
+ 0 : return the normal CRC (for Hash Table index)
X */
X unsigned long cal_CRC(unsigned char *Data, unsigned int Len, u8 flag)
X {
@@ -1522,6 +1716,224 @@
X return Crc;
X }
X
+
+/*
+ Parser SROM and media mode
+ */
+static void dmfe_parse_srom(struct dmfe_board_info *db)
+{
+ char *srom = db->srom;
+ int dmfe_mode, tmp_reg;
+ DMFE_DBUG(0, "dmfe_parse_srom() ", 0);
+
+ /* Init CR15 */
+ db->cr15_data = CR15_DEFAULT;
+
+ /* Check SROM Version */
+ if (((int) srom[18] & 0xff) == SROM_V41_CODE) {
+ /* SROM V4.01 */
+
+ /* Get NIC support media mode */
+ db->NIC_capability = *(u16 *) (&srom[34]);
+ db->PHY_reg4 = 0;
+ for (tmp_reg = 1; tmp_reg < 0x10; tmp_reg <<= 1) {
+ switch (db->NIC_capability & tmp_reg) {
+ case 0x1:
+ db->PHY_reg4 |= 0x0020;
+ break;
+ case 0x2:
+ db->PHY_reg4 |= 0x0040;
+ break;
+ case 0x4:
+ db->PHY_reg4 |= 0x0080;
+ break;
+ case 0x8:
+ db->PHY_reg4 |= 0x0100;


+ break;
+ }
+ }
+

+ /* Media Mode Force or not check */
+ dmfe_mode = *((int *) &srom[34]) & *((int *) &srom[36]);
+ switch (dmfe_mode) {
+ case 0x1:
+ dmfe_media_mode = DMFE_10MHF;
+ break; /* Select 10MHF */
+ case 0x4:
+ dmfe_media_mode = DMFE_100MHF;
+ break; /* Select 100MHF */
+ case 0x2:
+ dmfe_media_mode = DMFE_10MFD;
+ break; /* Select 10MFD */
+ case 0x8:
+ dmfe_media_mode = DMFE_100MFD;
+ break; /* Select 100MFD */
+ case 0x100:
+ case 0x200:
+ dmfe_media_mode = DMFE_1M_HPNA;
+ break; /* Select HomePNA */
+ }
+
+ /* Special Function setting */
+ /* VLAN function */
+ if ((SF_mode & 0x1) || (srom[43] & 0x80))
+ db->cr15_data |= 0x40;
+
+ /* Flow Control */
+ if ((SF_mode & 0x2) || (srom[40] & 0x1))
+ db->cr15_data |= 0x400;
+
+ /* TX pause packet */
+ if ((SF_mode & 0x4) || (srom[40] & 0xe))
+ db->cr15_data |= 0x9800;
+ }
+
+ /* Parse HPNA parameter */
+ db->HPNA_command = 1;
+
+ /* Accept remote command or not */
+ if (HPNA_rx_cmd == 0)
+ db->HPNA_command |= 0x8000;
+
+ /* Issue remote command & operation mode */
+ if (HPNA_tx_cmd == 1)
+ switch (HPNA_mode) { /* Issue Remote Command */
+ case 0:
+ db->HPNA_command |= 0x0904;


+ break;
+ case 1:

+ db->HPNA_command |= 0x0a00;


+ break;
+ case 2:

+ db->HPNA_command |= 0x0506;
+ break;
+ case 3:
+ db->HPNA_command |= 0x0602;
+ break;
+ }
+ else
+ switch (HPNA_mode) { /* Don't Issue */
+ case 0:
+ db->HPNA_command |= 0x0004;


+ break;
+ case 1:

+ db->HPNA_command |= 0x0000;


+ break;
+ case 2:

+ db->HPNA_command |= 0x0006;
+ break;
+ case 3:
+ db->HPNA_command |= 0x0002;
+ break;
+ }
+
+ /* Check DM9801 or DM9802 present or not */
+ db->HPNA_present = 0;
+ update_cr6(db->cr6_data | 0x40000, db->ioaddr);
+ tmp_reg = phy_read(db->ioaddr, db->phy_addr, 3, db->chip_id);
+ if ((tmp_reg & 0xfff0) == 0xb900) {
+ /* DM9801 or DM9802 present */
+ db->HPNA_timer = 8; /* Check remote device status after 8 second */
+ if (phy_read(db->ioaddr, db->phy_addr, 31, db->chip_id) == 0x4404) {
+ /* DM9801 HomeRun */
+ db->HPNA_present = 1;
+ dmfe_program_DM9801(db, tmp_reg);
+ } else {
+ /* DM9802 LongRun */
+ db->HPNA_present = 2;
+ dmfe_program_DM9802(db);
+ }
+ }
+}
+
+
+/*
+ Description:
+ Init HomeRun DM9801
+ */
+static void dmfe_program_DM9801(struct dmfe_board_info *db, int HPNA_rev)
+{
+ uint reg17, reg25;
+ if (!HPNA_NoiseFloor)
+ HPNA_NoiseFloor = DM9801_NOISE_FLOOR;
+ switch (HPNA_rev) {
+ case 0xb900: /* DM9801 E3 */
+ db->HPNA_command |= 0x1000;
+ reg25 = phy_read(db->ioaddr, db->phy_addr, 24, db->chip_id);
+ reg25 = ((reg25 + HPNA_NoiseFloor) & 0xff) | 0xf000;
+ reg17 = phy_read(db->ioaddr, db->phy_addr, 17, db->chip_id);
+ break;
+ case 0xb901: /* DM9801 E4 */
+ reg25 = phy_read(db->ioaddr, db->phy_addr, 25, db->chip_id);
+ reg25 = (reg25 & 0xff00) + HPNA_NoiseFloor;
+ reg17 = phy_read(db->ioaddr, db->phy_addr, 17, db->chip_id);
+ reg17 = (reg17 & 0xfff0) + HPNA_NoiseFloor + 3;
+ break;
+ case 0xb902: /* DM9801 E5 */
+ case 0xb903: /* DM9801 E6 */
+ default:
+ db->HPNA_command |= 0x1000;
+ reg25 = phy_read(db->ioaddr, db->phy_addr, 25, db->chip_id);
+ reg25 = (reg25 & 0xff00) + HPNA_NoiseFloor - 5;
+ reg17 = phy_read(db->ioaddr, db->phy_addr, 17, db->chip_id);
+ reg17 = (reg17 & 0xfff0) + HPNA_NoiseFloor;
+ break;
+ }
+ phy_write(db->ioaddr, db->phy_addr, 16, db->HPNA_command, db->chip_id);
+ phy_write(db->ioaddr, db->phy_addr, 17, reg17, db->chip_id);
+ phy_write(db->ioaddr, db->phy_addr, 25, reg25, db->chip_id);
+}
+
+
+/* Description:
+ Init HomeRun DM9802
+ */
+static void dmfe_program_DM9802(struct dmfe_board_info *db)
+{
+ uint phy_reg;
+ if (!HPNA_NoiseFloor)
+ HPNA_NoiseFloor = DM9802_NOISE_FLOOR;
+ phy_write(db->ioaddr, db->phy_addr, 16, db->HPNA_command, db->chip_id);
+ phy_reg = phy_read(db->ioaddr, db->phy_addr, 25, db->chip_id);
+ phy_reg = (phy_reg & 0xff00) + HPNA_NoiseFloor;
+ phy_write(db->ioaddr, db->phy_addr, 25, phy_reg, db->chip_id);
+}
+
+
+/* Description:
+ Check remote HPNA power and speed status. If not correct,
+ issue command again.
+ */
+static void dmfe_HPNA_remote_cmd_chk(struct dmfe_board_info *db)
+{
+ uint phy_reg;
+
+ /* Got remote device status */
+ phy_reg = phy_read(db->ioaddr, db->phy_addr, 17, db->chip_id) & 0x60;
+ switch (phy_reg) {
+ case 0x00:
+ phy_reg = 0x0a00;
+ break; /* LP/LS */
+ case 0x20:
+ phy_reg = 0x0900;
+ break; /* LP/HS */
+ case 0x40:
+ phy_reg = 0x0600;
+ break; /* HP/LS */
+ case 0x60:
+ phy_reg = 0x0500;
+ break; /* HP/HS */
+ }
+
+ /* Check remote device status match our setting ot not */
+ if (phy_reg != (db->HPNA_command & 0x0f00)) {
+ phy_write(db->ioaddr, db->phy_addr, 16, db->HPNA_command, db->chip_id);
+ db->HPNA_timer = 8;
+ } else
+ db->HPNA_timer = 600; /* Match, every 10 minutes, check */
+}
+
+
X #ifdef MODULE
X
X MODULE_AUTHOR("Sten Wang, sten...@davicom.com.tw");
@@ -1530,8 +1942,13 @@
X MODULE_PARM(mode, "i");
X MODULE_PARM(cr6set, "i");
X MODULE_PARM(chkmode, "i");
+MODULE_PARM(HPNA_mode, "i");
+MODULE_PARM(HPNA_rx_cmd, "i");
+MODULE_PARM(HPNA_tx_cmd, "i");
+MODULE_PARM(HPNA_NoiseFloor, "i");
+MODULE_PARM(SF_mode, "i");
X
-/* Description:
+/* Description:
X when user used insmod to add module, system invoked init_module()
X to initilize and register.
X */
@@ -1545,21 +1962,31 @@
X dmfe_cr6_user_set = cr6set;
X
X switch (mode) {
- case 0:
- case 1:
- case 4:
- case 5:
+ case DMFE_10MHF:
+ case DMFE_100MHF:
+ case DMFE_10MFD:
+ case DMFE_100MFD:
+ case DMFE_1M_HPNA:
X dmfe_media_mode = mode;
X break;
X default:
- dmfe_media_mode = 8;
+ dmfe_media_mode = DMFE_AUTO;
X break;
X }
X
+ if (HPNA_mode > 4)
+ HPNA_mode = 0; /* Default: LP/HS */
+ if (HPNA_rx_cmd > 1)
+ HPNA_rx_cmd = 0; /* Default: Ignored remote command */
+ if (HPNA_tx_cmd > 1)
+ HPNA_tx_cmd = 0; /* Default: Don't issue remote command */
+ if (HPNA_NoiseFloor > 15)
+ HPNA_NoiseFloor = 0;
X return dmfe_probe(0); /* search board and register */
X }
X
-/* Description:
+
+/* Description:
X when user used rmmod to delete module, system invoked clean_module()
X to un-register device.
X */
@@ -1574,7 +2001,7 @@
X next_dev = ((struct dmfe_board_info *) dmfe_root_dev->priv)->next_dev;
X unregister_netdev(dmfe_root_dev);
X db = dmfe_root_dev->priv;
- release_region(dmfe_root_dev->base_addr, CHK_IO_SIZE(db->chip_id, db->chip_revesion));
+ release_region(dmfe_root_dev->base_addr, CHK_IO_SIZE(db->chip_id, db->chip_revision));
X kfree(db); /* free board information */
X kfree(dmfe_root_dev); /* free device structure */
X dmfe_root_dev = next_dev;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/eepro.c linux/drivers/net/eepro.c
--- v2.2.19/drivers/net/eepro.c Sun Mar 25 17:31:16 2001
+++ linux/drivers/net/eepro.c Mon Oct 22 10:38:05 2001
@@ -23,6 +23,8 @@
X This is a compatibility hardware problem.
X
X Versions:
+ 0.12d tottaly isolated old code to new code (blue cards).
+ (aris, 12/27/2000)
X 0.12c fixed other multiple cards bug and other cleanups
X (aris, 08/21/2000)
X 0.12b added reset when the tx interrupt is called and TX isn't done
@@ -103,7 +105,7 @@
X */
X
X static const char *version =
- "eepro.c: v0.12b 06/20/2000 ar...@conectiva.com.br\n";
+ "eepro.c: v0.12d 12/27/2000 ar...@conectiva.com.br\n";


X
X #include <linux/module.h>
X

@@ -149,47 +151,28 @@
X #include <linux/etherdevice.h>
X #include <linux/skbuff.h>
X
-
X #include <linux/version.h>
X
-/* For linux 2.1.xx */
-#if defined (LINUX_VERSION_CODE) && LINUX_VERSION_CODE > 0x20155
-
X #include <asm/spinlock.h>
X #include <linux/init.h>
X #include <linux/delay.h>
X
-#define compat_dev_kfree_skb( skb, mode ) dev_kfree_skb( (skb) )
X /* I had reports of looong delays with SLOW_DOWN defined as udelay(2) */
X #define SLOW_DOWN inb(0x80)
-/* udelay(2) */
-#define compat_init_func(X) __initfunc(X)
-#define compat_init_data __initdata
-
-#else
-/* for 2.x */
-
-#define compat_dev_kfree_skb( skb, mode ) dev_kfree_skb( (skb), (mode) )
-#define test_and_set_bit(a,b) set_bit((a),(b))
-#define SLOW_DOWN SLOW_DOWN_IO
-#define compat_init_func(X) X
-#define compat_init_data
-
-#endif
X
-
-/* First, a few definitions that the brave might change. */
-/* A zero-terminated list of I/O addresses to be probed. */
-static unsigned int eepro_portlist[] compat_init_data =
+/* First, a few definitions that the brave might change.
+ * A zero-terminated list of I/O addresses to be probed.
+ * note: 0x300 is default, the 595FX supports ALL IO Ports
+ * from 0x000 to 0x3F0, some of which are reserved in PCs
+ */
+static unsigned eepro_portlist[] __initdata =
X { 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360, 0};
-/* note: 0x300 is default, the 595FX supports ALL IO Ports
- from 0x000 to 0x3F0, some of which are reserved in PCs */
X
X /* use 0 for production, 1 for verification, >2 for debug */
X #ifndef NET_DEBUG
X #define NET_DEBUG 0
X #endif
-static unsigned int net_debug = NET_DEBUG;
+static unsigned net_debug = NET_DEBUG;
X
X /* The number of low I/O ports used by the ethercard. */
X #define EEPRO_IO_EXTENT 16
@@ -204,16 +187,17 @@
X struct eepro_local {
X struct enet_statistics stats;
X unsigned rx_start;
- unsigned tx_start; /* start of the transmit chain */
- int tx_last; /* pointer to last packet in the transmit chain */
- unsigned tx_end; /* end of the transmit chain (plus 1) */
- int eepro; /* 1 for the EtherExpress Pro/10,
- 2 for the EtherExpress Pro/10+,
- 0 for other 82595-based lan cards. */
- int version; /* a flag to indicate if this is a TX or FX
- version of the 82595 chip. */
+ unsigned tx_start; /* start of the transmit chain */
+ int tx_last; /* pointer to last packet in the transmit chain */
+ unsigned tx_end; /* end of the transmit chain (plus 1) */
+ int eepro; /* 1 for the EtherExpress Pro/10,
+ * 2 for the EtherExpress Pro/10+,
+ * 3 for the blue cards,
+ * 0 for other 82595-based lan cards. */
+ int version; /* a flag to indicate if this is a TX or FX
+ * version of the 82595 chip. */
X int stepping;
- spinlock_t lock; /* Serializing lock */
+ spinlock_t lock; /* Serializing lock */
X unsigned rcv_ram;
X unsigned rcv_start;
X unsigned xmt_bar;
@@ -322,7 +306,7 @@
X static void set_multicast_list(struct device *dev);
X
X static int read_eeprom(int ioaddr, int location, struct device *dev);
-static void hardware_send_packet(struct device *dev, void *buf, short length);
+static int hardware_send_packet(struct device *dev, void *buf, short length);
X static int eepro_grab_irq(struct device *dev);
X
X /*
@@ -518,8 +502,10 @@
X /* set diagnose flag */
X #define eepro_diag(ioaddr) outb(DIAGNOSE_CMD, ioaddr)
X
+#ifdef ANSWER_TX_AND_RX
X /* ack for rx/tx int */
X #define eepro_ack_rxtx(ioaddr) outb (RX_INT | TX_INT, ioaddr + STATUS_REG)
+#endif
X
X /* ack for rx int */
X #define eepro_ack_rx(ioaddr) outb (RX_INT, ioaddr + STATUS_REG)
@@ -548,14 +534,7 @@
X If dev->base_addr == 2, allocate space for the device and return success
X (detachable devices only).
X */
-#ifdef HAVE_DEVLIST
- /* Support for an alternate probe manager, which will eliminate the
- boilerplate below. */
-struct netdev_entry netcard_drv =
- {"eepro", eepro_probe1, EEPRO_IO_EXTENT, eepro_portlist};
-#else
-compat_init_func(int eepro_probe(struct device *dev))
-{
+__initfunc(int eepro_probe(struct device *dev)) {
X int i;
X int base_addr = dev ? dev->base_addr : 0;
X if (base_addr > 0x1ff) /* Check a single specified location. */
@@ -575,7 +554,6 @@
X
X return ENODEV;
X }
-#endif
X
X static void printEEPROMInfo(short ioaddr, struct device *dev)
X {
@@ -732,6 +710,7 @@
X
X dev->mem_start = (RCV_LOWER_LIMIT << 8);
X
+ /* received mem_end as argument */
X if ((dev->mem_end & 0x3f) < 3 || /* RX buffer must be more than 3K */
X (dev->mem_end & 0x3f) > 29) /* and less than 29K */
X dev->mem_end = (RCV_UPPER_LIMIT << 8);
@@ -1055,6 +1034,8 @@
X }
X
X eepro_sel_reset(ioaddr);
+ SLOW_DOWN;
+ SLOW_DOWN;
X
X lp->tx_start = lp->tx_end = (XMT_LOWER_LIMIT << 8);
X lp->tx_last = 0;
@@ -1112,19 +1093,16 @@
X } else {
X short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
X unsigned char *buf = skb->data;
- int discard = lp->stats.tx_dropped;
X
X lp->stats.tx_bytes+=skb->len;
- hardware_send_packet(dev, buf, length);
-
- if (lp->stats.tx_dropped != discard)
+ if (hardware_send_packet(dev, buf, length))
X return 1;
X

X dev->trans_start = jiffies;
X

X }
X
- compat_dev_kfree_skb (skb, FREE_WRITE);
+ dev_kfree_skb(skb);
X
X /* You might need to clean up and record Tx statistics here. */
X /* lp->stats.tx_aborted_errors++; */
@@ -1175,9 +1153,11 @@
X while (((status = inb(ioaddr + STATUS_REG)) & 0x06) && (boguscount--))
X {
X switch (status & (RX_INT | TX_INT)) {
+#ifdef ANSWER_TX_AND_RX
X case (RX_INT | TX_INT):
X eepro_ack_rxtx(ioaddr);
X break;
+#endif
X case RX_INT:
X eepro_ack_rx(ioaddr);
X break;


@@ -1190,6 +1170,9 @@
X

X /* Get the received packets */
X eepro_rx(dev);
+#ifndef ANSWER_TX_AND_RX
+ continue;
+#endif
X }
X if (status & TX_INT) {
X if (net_debug > 4)
@@ -1385,7 +1368,11 @@
X eepro_en_int(ioaddr);
X
X }
- eepro_complete_selreset(ioaddr);
+ if (lp->eepro == LAN595FX_10ISA) {
+ eepro_complete_selreset(ioaddr);
+ }
+ else
+ eepro_en_rx(ioaddr);
X }
X
X /* The horrible routine to read a word from the serial EEPROM. */
@@ -1445,7 +1432,7 @@
X return retval;
X }
X
-static void
+static int
X hardware_send_packet(struct device *dev, void *buf, short length)
X {
X struct eepro_local *lp = (struct eepro_local *)dev->priv;
@@ -1557,13 +1544,16 @@
X
X if (net_debug > 5)
X printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name);
- return;
- }
X

- dev->tbusy = 1;

+ return 0;
+ }
+ if (lp->eepro == LAN595FX_10ISA)


+ dev->tbusy = 1;

X
X if (net_debug > 5)
X printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name);
+
+ return 1;


X }
X
X static void

@@ -1681,9 +1671,13 @@
X xmt_status = inw(ioaddr+IO_PORT);
X
X if ((xmt_status & TX_DONE_BIT) == 0) {
- udelay(40);
- boguscount--;
- continue;
+ if (lp->eepro == LAN595FX_10ISA) {
+ udelay(40);
+ boguscount--;
+ continue;
+ }
+ else
+ break;
X }
X
X
@@ -1757,7 +1751,7 @@
X * interrupt again for tx. in other words: tx timeout what will take
X * a lot of time to happen, so we'll do a complete selreset.
X */
- if (!boguscount)
+ if (!boguscount && lp->eepro == LAN595FX_10ISA)
X eepro_complete_selreset(ioaddr);
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/falc-lh.h linux/drivers/net/falc-lh.h
--- v2.2.19/drivers/net/falc-lh.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/net/falc-lh.h Wed Oct 31 14:08:10 2001
@@ -0,0 +1,1238 @@
+/*
+ * falc.h Description of the Siemens FALC T1/E1 framer.
+ *
+ * Author: Ivan Passos <iv...@cyclades.com>
+ *
+ * Copyright: (c) 2000-2001 Cyclades Corp.
+ *


+ * 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.
+ *

+ * $Log: falc-lh.h,v $
+ * Revision 3.1 2001/06/15 12:41:10 regina
+ * upping major version number
+ *
+ * Revision 1.1.1.1 2001/06/13 20:24:36 daniela
+ * PC300 initial CVS version (3.4.0-pre1)
+ *
+ * Revision 1.1 2000/05/15 ivan
+ * Included DJA bits for the LIM2 register.
+ *
+ * Revision 1.0 2000/02/22 ivan
+ * Initial version.


+ *
+ */
+

+#ifndef _FALC_LH_H
+#define _FALC_LH_H
+
+#define NUM_OF_T1_CHANNELS 24
+#define NUM_OF_E1_CHANNELS 32
+
+/*>>>>>>>>>>>>>>>>> FALC Register Bits (Transmit Mode) <<<<<<<<<<<<<<<<<<< */
+
+/* CMDR (Command Register)
+ ---------------- E1 & T1 ------------------------------ */
+#define CMDR_RMC 0x80
+#define CMDR_RRES 0x40
+#define CMDR_XREP 0x20
+#define CMDR_XRES 0x10
+#define CMDR_XHF 0x08
+#define CMDR_XTF 0x04
+#define CMDR_XME 0x02
+#define CMDR_SRES 0x01
+
+/* MODE (Mode Register)
+ ----------------- E1 & T1 ----------------------------- */
+#define MODE_MDS2 0x80
+#define MODE_MDS1 0x40
+#define MODE_MDS0 0x20
+#define MODE_BRAC 0x10
+#define MODE_HRAC 0x08
+
+/* IPC (Interrupt Port Configuration)
+ ----------------- E1 & T1 ----------------------------- */
+#define IPC_VIS 0x80
+#define IPC_SCI 0x04
+#define IPC_IC1 0x02
+#define IPC_IC0 0x01
+
+/* CCR1 (Common Configuration Register 1)
+ ----------------- E1 & T1 ----------------------------- */
+#define CCR1_SFLG 0x80
+#define CCR1_XTS16RA 0x40
+#define CCR1_BRM 0x40
+#define CCR1_CASSYM 0x20
+#define CCR1_EDLX 0x20
+#define CCR1_EITS 0x10
+#define CCR1_ITF 0x08
+#define CCR1_RFT1 0x02
+#define CCR1_RFT0 0x01
+
+/* CCR3 (Common Configuration Register 3)
+ ---------------- E1 & T1 ------------------------------ */
+
+#define CCR3_PRE1 0x80
+#define CCR3_PRE0 0x40
+#define CCR3_EPT 0x20
+#define CCR3_RADD 0x10
+#define CCR3_RCRC 0x04
+#define CCR3_XCRC 0x02
+
+
+/* RTR1-4 (Receive Timeslot Register 1-4)
+ ---------------- E1 & T1 ------------------------------ */
+
+#define RTR1_TS0 0x80
+#define RTR1_TS1 0x40
+#define RTR1_TS2 0x20
+#define RTR1_TS3 0x10
+#define RTR1_TS4 0x08
+#define RTR1_TS5 0x04
+#define RTR1_TS6 0x02
+#define RTR1_TS7 0x01
+
+#define RTR2_TS8 0x80
+#define RTR2_TS9 0x40
+#define RTR2_TS10 0x20
+#define RTR2_TS11 0x10
+#define RTR2_TS12 0x08
+#define RTR2_TS13 0x04
+#define RTR2_TS14 0x02
+#define RTR2_TS15 0x01
+
+#define RTR3_TS16 0x80
+#define RTR3_TS17 0x40
+#define RTR3_TS18 0x20
+#define RTR3_TS19 0x10
+#define RTR3_TS20 0x08
+#define RTR3_TS21 0x04
+#define RTR3_TS22 0x02
+#define RTR3_TS23 0x01
+
+#define RTR4_TS24 0x80
+#define RTR4_TS25 0x40
+#define RTR4_TS26 0x20
+#define RTR4_TS27 0x10
+#define RTR4_TS28 0x08
+#define RTR4_TS29 0x04
+#define RTR4_TS30 0x02
+#define RTR4_TS31 0x01
+
+
+/* TTR1-4 (Transmit Timeslot Register 1-4)
+ ---------------- E1 & T1 ------------------------------ */
+
+#define TTR1_TS0 0x80
+#define TTR1_TS1 0x40
+#define TTR1_TS2 0x20
+#define TTR1_TS3 0x10
+#define TTR1_TS4 0x08
+#define TTR1_TS5 0x04
+#define TTR1_TS6 0x02
+#define TTR1_TS7 0x01
+
+#define TTR2_TS8 0x80
+#define TTR2_TS9 0x40
+#define TTR2_TS10 0x20
+#define TTR2_TS11 0x10
+#define TTR2_TS12 0x08
+#define TTR2_TS13 0x04
+#define TTR2_TS14 0x02
+#define TTR2_TS15 0x01
+
+#define TTR3_TS16 0x80
+#define TTR3_TS17 0x40
+#define TTR3_TS18 0x20
+#define TTR3_TS19 0x10
+#define TTR3_TS20 0x08
+#define TTR3_TS21 0x04
+#define TTR3_TS22 0x02
+#define TTR3_TS23 0x01
+
+#define TTR4_TS24 0x80
+#define TTR4_TS25 0x40
+#define TTR4_TS26 0x20
+#define TTR4_TS27 0x10
+#define TTR4_TS28 0x08
+#define TTR4_TS29 0x04
+#define TTR4_TS30 0x02
+#define TTR4_TS31 0x01
+
+
+
+/* IMR0-4 (Interrupt Mask Register 0-4)
+
+ ----------------- E1 & T1 ----------------------------- */
+
+#define IMR0_RME 0x80
+#define IMR0_RFS 0x40
+#define IMR0_T8MS 0x20
+#define IMR0_ISF 0x20
+#define IMR0_RMB 0x10
+#define IMR0_CASC 0x08
+#define IMR0_RSC 0x08
+#define IMR0_CRC6 0x04
+#define IMR0_CRC4 0x04
+#define IMR0_PDEN 0x02
+#define IMR0_RPF 0x01
+
+#define IMR1_CASE 0x80
+#define IMR1_RDO 0x40
+#define IMR1_ALLS 0x20
+#define IMR1_XDU 0x10
+#define IMR1_XMB 0x08
+#define IMR1_XLSC 0x02
+#define IMR1_XPR 0x01
+#define IMR1_LLBSC 0x80
+
+#define IMR2_FAR 0x80
+#define IMR2_LFA 0x40
+#define IMR2_MFAR 0x20
+#define IMR2_T400MS 0x10
+#define IMR2_LMFA 0x10
+#define IMR2_AIS 0x08
+#define IMR2_LOS 0x04
+#define IMR2_RAR 0x02
+#define IMR2_RA 0x01
+
+#define IMR3_ES 0x80
+#define IMR3_SEC 0x40
+#define IMR3_LMFA16 0x20
+#define IMR3_AIS16 0x10
+#define IMR3_RA16 0x08
+#define IMR3_API 0x04
+#define IMR3_XSLP 0x20
+#define IMR3_XSLN 0x10
+#define IMR3_LLBSC 0x08
+#define IMR3_XRS 0x04
+#define IMR3_SLN 0x02
+#define IMR3_SLP 0x01
+
+#define IMR4_LFA 0x80
+#define IMR4_FER 0x40
+#define IMR4_CER 0x20
+#define IMR4_AIS 0x10
+#define IMR4_LOS 0x08
+#define IMR4_CVE 0x04
+#define IMR4_SLIP 0x02
+#define IMR4_EBE 0x01
+
+/* FMR0-5 for E1 and T1 (Framer Mode Register ) */
+
+#define FMR0_XC1 0x80
+#define FMR0_XC0 0x40
+#define FMR0_RC1 0x20
+#define FMR0_RC0 0x10
+#define FMR0_EXTD 0x08
+#define FMR0_ALM 0x04
+#define E1_FMR0_FRS 0x02
+#define T1_FMR0_FRS 0x08
+#define FMR0_SRAF 0x04
+#define FMR0_EXLS 0x02
+#define FMR0_SIM 0x01
+
+#define FMR1_MFCS 0x80
+#define FMR1_AFR 0x40
+#define FMR1_ENSA 0x20
+#define FMR1_CTM 0x80
+#define FMR1_SIGM 0x40
+#define FMR1_EDL 0x20
+#define FMR1_PMOD 0x10
+#define FMR1_XFS 0x08
+#define FMR1_CRC 0x08
+#define FMR1_ECM 0x04
+#define FMR1_IMOD 0x02
+#define FMR1_XAIS 0x01
+
+#define FMR2_RFS1 0x80
+#define FMR2_RFS0 0x40
+#define FMR2_MCSP 0x40
+#define FMR2_RTM 0x20
+#define FMR2_SSP 0x20
+#define FMR2_DAIS 0x10
+#define FMR2_SAIS 0x08
+#define FMR2_PLB 0x04
+#define FMR2_AXRA 0x02
+#define FMR2_ALMF 0x01
+#define FMR2_EXZE 0x01
+
+#define LOOP_RTM 0x40
+#define LOOP_SFM 0x40
+#define LOOP_ECLB 0x20
+#define LOOP_CLA 0x1f
+
+/*--------------------- E1 ----------------------------*/
+#define FMR3_XLD 0x20
+#define FMR3_XLU 0x10
+
+/*--------------------- T1 ----------------------------*/
+#define FMR4_AIS3 0x80
+#define FMR4_TM 0x40
+#define FMR4_XRA 0x20
+#define FMR4_SSC1 0x10
+#define FMR4_SSC0 0x08
+#define FMR4_AUTO 0x04
+#define FMR4_FM1 0x02
+#define FMR4_FM0 0x01
+
+#define FMR5_SRS 0x80
+#define FMR5_EIBR 0x40
+#define FMR5_XLD 0x20
+#define FMR5_XLU 0x10
+
+
+/* LOOP (Channel Loop Back)
+
+ ------------------ E1 & T1 ---------------------------- */
+
+#define LOOP_SFM 0x40
+#define LOOP_ECLB 0x20
+#define LOOP_CLA4 0x10
+#define LOOP_CLA3 0x08
+#define LOOP_CLA2 0x04
+#define LOOP_CLA1 0x02
+#define LOOP_CLA0 0x01
+
+
+
+/* XSW (Transmit Service Word Pulseframe)
+
+ ------------------- E1 --------------------------- */
+
+#define XSW_XSIS 0x80
+#define XSW_XTM 0x40
+#define XSW_XRA 0x20
+#define XSW_XY0 0x10
+#define XSW_XY1 0x08
+#define XSW_XY2 0x04
+#define XSW_XY3 0x02
+#define XSW_XY4 0x01
+
+
+/* XSP (Transmit Spare Bits)
+
+ ------------------- E1 --------------------------- */
+
+#define XSP_XAP 0x80
+#define XSP_CASEN 0x40
+#define XSP_TT0 0x20
+#define XSP_EBP 0x10
+#define XSP_AXS 0x08
+#define XSP_XSIF 0x04
+#define XSP_XS13 0x02
+#define XSP_XS15 0x01
+
+
+/* XC0/1 (Transmit Control 0/1)
+ ------------------ E1 & T1 ---------------------------- */
+
+#define XC0_SA8E 0x80
+#define XC0_SA7E 0x40
+#define XC0_SA6E 0x20
+#define XC0_SA5E 0x10
+#define XC0_SA4E 0x08
+#define XC0_BRM 0x80
+#define XC0_MFBS 0x40
+#define XC0_SFRZ 0x10
+#define XC0_XCO2 0x04
+#define XC0_XCO1 0x02
+#define XC0_XCO0 0x01
+
+#define XC1_XTO5 0x20
+#define XC1_XTO4 0x10
+#define XC1_XTO3 0x08
+#define XC1_XTO2 0x04
+#define XC1_XTO1 0x02
+#define XC1_XTO0 0x01
+
+
+/* RC0/1 (Receive Control 0/1)
+ ------------------ E1 & T1 ---------------------------- */
+
+#define RC0_SICS 0x40
+#define RC0_CRCI 0x20
+#define RC0_XCRCI 0x10
+#define RC0_RDIS 0x08
+#define RC0_RCO2 0x04
+#define RC0_RCO1 0x02
+#define RC0_RCO0 0x01
+
+#define RC1_SWD 0x80
+#define RC1_ASY4 0x40
+#define RC1_RRAM 0x40
+#define RC1_RTO5 0x20
+#define RC1_RTO4 0x10
+#define RC1_RTO3 0x08
+#define RC1_RTO2 0x04
+#define RC1_RTO1 0x02
+#define RC1_RTO0 0x01
+
+
+
+/* XPM0-2 (Transmit Pulse Mask 0-2)
+ --------------------- E1 & T1 ------------------------- */
+
+#define XPM0_XP12 0x80
+#define XPM0_XP11 0x40
+#define XPM0_XP10 0x20
+#define XPM0_XP04 0x10
+#define XPM0_XP03 0x08
+#define XPM0_XP02 0x04
+#define XPM0_XP01 0x02
+#define XPM0_XP00 0x01
+
+#define XPM1_XP30 0x80
+#define XPM1_XP24 0x40
+#define XPM1_XP23 0x20
+#define XPM1_XP22 0x10
+#define XPM1_XP21 0x08
+#define XPM1_XP20 0x04
+#define XPM1_XP14 0x02
+#define XPM1_XP13 0x01
+
+#define XPM2_XLHP 0x80
+#define XPM2_XLT 0x40
+#define XPM2_DAXLT 0x20
+#define XPM2_XP34 0x08
+#define XPM2_XP33 0x04
+#define XPM2_XP32 0x02
+#define XPM2_XP31 0x01
+
+
+/* TSWM (Transparent Service Word Mask)
+ ------------------ E1 ---------------------------- */
+
+#define TSWM_TSIS 0x80
+#define TSWM_TSIF 0x40
+#define TSWM_TRA 0x20
+#define TSWM_TSA4 0x10
+#define TSWM_TSA5 0x08
+#define TSWM_TSA6 0x04
+#define TSWM_TSA7 0x02
+#define TSWM_TSA8 0x01
+
+/* IDLE <Idle Channel Code Register>
+
+ ------------------ E1 & T1 ----------------------- */
+
+#define IDLE_IDL7 0x80
+#define IDLE_IDL6 0x40
+#define IDLE_IDL5 0x20
+#define IDLE_IDL4 0x10
+#define IDLE_IDL3 0x08
+#define IDLE_IDL2 0x04
+#define IDLE_IDL1 0x02
+#define IDLE_IDL0 0x01
+
+
+/* XSA4-8 <Transmit SA4-8 Register(Read/Write) >
+ -------------------E1 ----------------------------- */
+
+#define XSA4_XS47 0x80
+#define XSA4_XS46 0x40
+#define XSA4_XS45 0x20
+#define XSA4_XS44 0x10
+#define XSA4_XS43 0x08
+#define XSA4_XS42 0x04
+#define XSA4_XS41 0x02
+#define XSA4_XS40 0x01
+
+#define XSA5_XS57 0x80
+#define XSA5_XS56 0x40
+#define XSA5_XS55 0x20
+#define XSA5_XS54 0x10
+#define XSA5_XS53 0x08
+#define XSA5_XS52 0x04
+#define XSA5_XS51 0x02
+#define XSA5_XS50 0x01
+
+#define XSA6_XS67 0x80
+#define XSA6_XS66 0x40
+#define XSA6_XS65 0x20
+#define XSA6_XS64 0x10
+#define XSA6_XS63 0x08
+#define XSA6_XS62 0x04
+#define XSA6_XS61 0x02
+#define XSA6_XS60 0x01
+
+#define XSA7_XS77 0x80
+#define XSA7_XS76 0x40
+#define XSA7_XS75 0x20
+#define XSA7_XS74 0x10
+#define XSA7_XS73 0x08
+#define XSA7_XS72 0x04
+#define XSA7_XS71 0x02
+#define XSA7_XS70 0x01
+
+#define XSA8_XS87 0x80
+#define XSA8_XS86 0x40
+#define XSA8_XS85 0x20
+#define XSA8_XS84 0x10
+#define XSA8_XS83 0x08
+#define XSA8_XS82 0x04
+#define XSA8_XS81 0x02
+#define XSA8_XS80 0x01
+
+
+/* XDL1-3 (Transmit DL-Bit Register1-3 (read/write))
+ ----------------------- T1 --------------------- */
+
+#define XDL1_XDL17 0x80
+#define XDL1_XDL16 0x40
+#define XDL1_XDL15 0x20
+#define XDL1_XDL14 0x10
+#define XDL1_XDL13 0x08
+#define XDL1_XDL12 0x04
+#define XDL1_XDL11 0x02
+#define XDL1_XDL10 0x01
+
+#define XDL2_XDL27 0x80
+#define XDL2_XDL26 0x40
+#define XDL2_XDL25 0x20
+#define XDL2_XDL24 0x10
+#define XDL2_XDL23 0x08
+#define XDL2_XDL22 0x04
+#define XDL2_XDL21 0x02
+#define XDL2_XDL20 0x01
+
+#define XDL3_XDL37 0x80
+#define XDL3_XDL36 0x40
+#define XDL3_XDL35 0x20
+#define XDL3_XDL34 0x10
+#define XDL3_XDL33 0x08
+#define XDL3_XDL32 0x04
+#define XDL3_XDL31 0x02
+#define XDL3_XDL30 0x01
+
+
+/* ICB1-4 (Idle Channel Register 1-4)
+ ------------------ E1 ---------------------------- */
+
+#define E1_ICB1_IC0 0x80
+#define E1_ICB1_IC1 0x40
+#define E1_ICB1_IC2 0x20
+#define E1_ICB1_IC3 0x10
+#define E1_ICB1_IC4 0x08
+#define E1_ICB1_IC5 0x04
+#define E1_ICB1_IC6 0x02
+#define E1_ICB1_IC7 0x01
+
+#define E1_ICB2_IC8 0x80
+#define E1_ICB2_IC9 0x40
+#define E1_ICB2_IC10 0x20
+#define E1_ICB2_IC11 0x10
+#define E1_ICB2_IC12 0x08
+#define E1_ICB2_IC13 0x04
+#define E1_ICB2_IC14 0x02
+#define E1_ICB2_IC15 0x01
+
+#define E1_ICB3_IC16 0x80
+#define E1_ICB3_IC17 0x40
+#define E1_ICB3_IC18 0x20
+#define E1_ICB3_IC19 0x10
+#define E1_ICB3_IC20 0x08
+#define E1_ICB3_IC21 0x04
+#define E1_ICB3_IC22 0x02
+#define E1_ICB3_IC23 0x01
+
+#define E1_ICB4_IC24 0x80
+#define E1_ICB4_IC25 0x40
+#define E1_ICB4_IC26 0x20
+#define E1_ICB4_IC27 0x10
+#define E1_ICB4_IC28 0x08
+#define E1_ICB4_IC29 0x04
+#define E1_ICB4_IC30 0x02
+#define E1_ICB4_IC31 0x01
+
+/* ICB1-4 (Idle Channel Register 1-4)
+ ------------------ T1 ---------------------------- */
+
+#define T1_ICB1_IC1 0x80
+#define T1_ICB1_IC2 0x40
+#define T1_ICB1_IC3 0x20
+#define T1_ICB1_IC4 0x10
+#define T1_ICB1_IC5 0x08
+#define T1_ICB1_IC6 0x04
+#define T1_ICB1_IC7 0x02
+#define T1_ICB1_IC8 0x01
+
+#define T1_ICB2_IC9 0x80
+#define T1_ICB2_IC10 0x40
+#define T1_ICB2_IC11 0x20
+#define T1_ICB2_IC12 0x10
+#define T1_ICB2_IC13 0x08
+#define T1_ICB2_IC14 0x04
+#define T1_ICB2_IC15 0x02
+#define T1_ICB2_IC16 0x01
+
+#define T1_ICB3_IC17 0x80
+#define T1_ICB3_IC18 0x40
+#define T1_ICB3_IC19 0x20
+#define T1_ICB3_IC20 0x10
+#define T1_ICB3_IC21 0x08
+#define T1_ICB3_IC22 0x04
+#define T1_ICB3_IC23 0x02
+#define T1_ICB3_IC24 0x01
+
+/* FMR3 (Framer Mode Register 3)
+ --------------------E1------------------------ */
+
+#define FMR3_CMI 0x08
+#define FMR3_SYNSA 0x04
+#define FMR3_CFRZ 0x02
+#define FMR3_EXTIW 0x01
+
+
+
+/* CCB1-3 (Clear Channel Register)
+ ------------------- T1 ----------------------- */
+
+#define CCB1_CH1 0x80
+#define CCB1_CH2 0x40
+#define CCB1_CH3 0x20
+#define CCB1_CH4 0x10
+#define CCB1_CH5 0x08
+#define CCB1_CH6 0x04
+#define CCB1_CH7 0x02
+#define CCB1_CH8 0x01
+
+#define CCB2_CH9 0x80
+#define CCB2_CH10 0x40
+#define CCB2_CH11 0x20
+#define CCB2_CH12 0x10
+#define CCB2_CH13 0x08
+#define CCB2_CH14 0x04
+#define CCB2_CH15 0x02
+#define CCB2_CH16 0x01
+
+#define CCB3_CH17 0x80
+#define CCB3_CH18 0x40
+#define CCB3_CH19 0x20
+#define CCB3_CH20 0x10
+#define CCB3_CH21 0x08
+#define CCB3_CH22 0x04
+#define CCB3_CH23 0x02
+#define CCB3_CH24 0x01
+
+
+/* LIM0/1 (Line Interface Mode 0/1)
+ ------------------- E1 & T1 --------------------------- */
+
+#define LIM0_XFB 0x80
+#define LIM0_XDOS 0x40
+#define LIM0_SCL1 0x20
+#define LIM0_SCL0 0x10
+#define LIM0_EQON 0x08
+#define LIM0_ELOS 0x04
+#define LIM0_LL 0x02
+#define LIM0_MAS 0x01
+
+#define LIM1_EFSC 0x80
+#define LIM1_RIL2 0x40
+#define LIM1_RIL1 0x20
+#define LIM1_RIL0 0x10
+#define LIM1_DCOC 0x08
+#define LIM1_JATT 0x04
+#define LIM1_RL 0x02
+#define LIM1_DRS 0x01
+
+
+/* PCDR (Pulse Count Detection Register(Read/Write))
+ ------------------ E1 & T1 ------------------------- */
+
+#define PCDR_PCD7 0x80
+#define PCDR_PCD6 0x40
+#define PCDR_PCD5 0x20
+#define PCDR_PCD4 0x10
+#define PCDR_PCD3 0x08
+#define PCDR_PCD2 0x04
+#define PCDR_PCD1 0x02
+#define PCDR_PCD0 0x01
+
+#define PCRR_PCR7 0x80
+#define PCRR_PCR6 0x40
+#define PCRR_PCR5 0x20
+#define PCRR_PCR4 0x10
+#define PCRR_PCR3 0x08
+#define PCRR_PCR2 0x04
+#define PCRR_PCR1 0x02
+#define PCRR_PCR0 0x01
+
+
+/* LIM2 (Line Interface Mode 2)
+
+ ------------------ E1 & T1 ---------------------------- */
+
+#define LIM2_DJA2 0x20
+#define LIM2_DJA1 0x10
+#define LIM2_LOS2 0x02
+#define LIM2_LOS1 0x01
+
+/* LCR1 (Loop Code Register 1) */
+
+#define LCR1_EPRM 0x80
+#define LCR1_XPRBS 0x40
+
+/* SIC1 (System Interface Control 1) */
+#define SIC1_SRSC 0x80
+#define SIC1_RBS1 0x20
+#define SIC1_RBS0 0x10
+#define SIC1_SXSC 0x08
+#define SIC1_XBS1 0x02
+#define SIC1_XBS0 0x01
+
+/* DEC (Disable Error Counter)
+ ------------------ E1 & T1 ---------------------------- */
+
+#define DEC_DCEC3 0x20
+#define DEC_DBEC 0x10
+#define DEC_DCEC1 0x08
+#define DEC_DCEC 0x08
+#define DEC_DEBC 0x04
+#define DEC_DCVC 0x02
+#define DEC_DFEC 0x01
+
+
+/* FALC Register Bits (Receive Mode)
+ ---------------------------------------------------------------------------- */
+
+
+/* FRS0/1 (Framer Receive Status Register 0/1)
+ ----------------- E1 & T1 ---------------------------------- */
+
+#define FRS0_LOS 0x80
+#define FRS0_AIS 0x40
+#define FRS0_LFA 0x20
+#define FRS0_RRA 0x10
+#define FRS0_API 0x08
+#define FRS0_NMF 0x04
+#define FRS0_LMFA 0x02
+#define FRS0_FSRF 0x01
+
+#define FRS1_TS16RA 0x40
+#define FRS1_TS16LOS 0x20
+#define FRS1_TS16AIS 0x10
+#define FRS1_TS16LFA 0x08
+#define FRS1_EXZD 0x80
+#define FRS1_LLBDD 0x10
+#define FRS1_LLBAD 0x08
+#define FRS1_XLS 0x02
+#define FRS1_XLO 0x01
+#define FRS1_PDEN 0x40
+
+/* FRS2/3 (Framer Receive Status Register 2/3)
+ ----------------- T1 ---------------------------------- */
+
+#define FRS2_ESC2 0x80
+#define FRS2_ESC1 0x40
+#define FRS2_ESC0 0x20
+
+#define FRS3_FEH5 0x20
+#define FRS3_FEH4 0x10
+#define FRS3_FEH3 0x08
+#define FRS3_FEH2 0x04
+#define FRS3_FEH1 0x02
+#define FRS3_FEH0 0x01
+
+
+/* RSW (Receive Service Word Pulseframe)
+ ----------------- E1 ------------------------------ */
+
+#define RSW_RSI 0x80
+#define RSW_RRA 0x20
+#define RSW_RYO 0x10
+#define RSW_RY1 0x08
+#define RSW_RY2 0x04
+#define RSW_RY3 0x02
+#define RSW_RY4 0x01
+
+
+/* RSP (Receive Spare Bits / Additional Status)
+ ---------------- E1 ------------------------------- */
+
+#define RSP_SI1 0x80
+#define RSP_SI2 0x40
+#define RSP_LLBDD 0x10
+#define RSP_LLBAD 0x08
+#define RSP_RSIF 0x04
+#define RSP_RS13 0x02
+#define RSP_RS15 0x01
+
+
+/* FECL (Framing Error Counter)
+ ---------------- E1 & T1 -------------------------- */
+
+#define FECL_FE7 0x80
+#define FECL_FE6 0x40
+#define FECL_FE5 0x20
+#define FECL_FE4 0x10
+#define FECL_FE3 0x08
+#define FECL_FE2 0x04
+#define FECL_FE1 0x02
+#define FECL_FE0 0x01
+
+#define FECH_FE15 0x80
+#define FECH_FE14 0x40
+#define FECH_FE13 0x20
+#define FECH_FE12 0x10
+#define FECH_FE11 0x08
+#define FECH_FE10 0x04
+#define FECH_FE9 0x02
+#define FECH_FE8 0x01
+
+
+/* CVCl (Code Violation Counter)
+ ----------------- E1 ------------------------- */
+
+#define CVCL_CV7 0x80
+#define CVCL_CV6 0x40
+#define CVCL_CV5 0x20
+#define CVCL_CV4 0x10
+#define CVCL_CV3 0x08
+#define CVCL_CV2 0x04
+#define CVCL_CV1 0x02
+#define CVCL_CV0 0x01
+
+#define CVCH_CV15 0x80
+#define CVCH_CV14 0x40
+#define CVCH_CV13 0x20
+#define CVCH_CV12 0x10
+#define CVCH_CV11 0x08
+#define CVCH_CV10 0x04
+#define CVCH_CV9 0x02
+#define CVCH_CV8 0x01
+
+
+/* CEC1-3L (CRC Error Counter)
+ ------------------ E1 ----------------------------- */
+
+#define CEC1L_CR7 0x80
+#define CEC1L_CR6 0x40
+#define CEC1L_CR5 0x20
+#define CEC1L_CR4 0x10
+#define CEC1L_CR3 0x08
+#define CEC1L_CR2 0x04
+#define CEC1L_CR1 0x02
+#define CEC1L_CR0 0x01
+
+#define CEC1H_CR15 0x80
+#define CEC1H_CR14 0x40
+#define CEC1H_CR13 0x20
+#define CEC1H_CR12 0x10
+#define CEC1H_CR11 0x08
+#define CEC1H_CR10 0x04
+#define CEC1H_CR9 0x02
+#define CEC1H_CR8 0x01
+
+#define CEC2L_CR7 0x80
+#define CEC2L_CR6 0x40
+#define CEC2L_CR5 0x20
+#define CEC2L_CR4 0x10
+#define CEC2L_CR3 0x08
+#define CEC2L_CR2 0x04
+#define CEC2L_CR1 0x02
+#define CEC2L_CR0 0x01
+
+#define CEC2H_CR15 0x80
+#define CEC2H_CR14 0x40
+#define CEC2H_CR13 0x20
+#define CEC2H_CR12 0x10
+#define CEC2H_CR11 0x08
+#define CEC2H_CR10 0x04
+#define CEC2H_CR9 0x02
+#define CEC2H_CR8 0x01
+
+#define CEC3L_CR7 0x80
+#define CEC3L_CR6 0x40
+#define CEC3L_CR5 0x20
+#define CEC3L_CR4 0x10
+#define CEC3L_CR3 0x08
+#define CEC3L_CR2 0x04
+#define CEC3L_CR1 0x02
+#define CEC3L_CR0 0x01
+
+#define CEC3H_CR15 0x80
+#define CEC3H_CR14 0x40
+#define CEC3H_CR13 0x20
+#define CEC3H_CR12 0x10
+#define CEC3H_CR11 0x08
+#define CEC3H_CR10 0x04
+#define CEC3H_CR9 0x02
+#define CEC3H_CR8 0x01
+
+
+/* CECL (CRC Error Counter)
+
+ ------------------ T1 ----------------------------- */
+
+#define CECL_CR7 0x80
+#define CECL_CR6 0x40
+#define CECL_CR5 0x20
+#define CECL_CR4 0x10
+#define CECL_CR3 0x08
+#define CECL_CR2 0x04
+#define CECL_CR1 0x02
+#define CECL_CR0 0x01
+
+#define CECH_CR15 0x80
+#define CECH_CR14 0x40
+#define CECH_CR13 0x20
+#define CECH_CR12 0x10
+#define CECH_CR11 0x08
+#define CECH_CR10 0x04
+#define CECH_CR9 0x02
+#define CECH_CR8 0x01
+
+/* EBCL (E Bit Error Counter)
+ ------------------- E1 & T1 ------------------------- */
+
+#define EBCL_EB7 0x80
+#define EBCL_EB6 0x40
+#define EBCL_EB5 0x20
+#define EBCL_EB4 0x10
+#define EBCL_EB3 0x08
+#define EBCL_EB2 0x04
+#define EBCL_EB1 0x02
+#define EBCL_EB0 0x01
+
+#define EBCH_EB15 0x80
+#define EBCH_EB14 0x40
+#define EBCH_EB13 0x20
+#define EBCH_EB12 0x10
+#define EBCH_EB11 0x08
+#define EBCH_EB10 0x04
+#define EBCH_EB9 0x02
+#define EBCH_EB8 0x01
+
+
+/* RSA4-8 (Receive Sa4-8-Bit Register)
+ -------------------- E1 --------------------------- */
+
+#define RSA4_RS47 0x80
+#define RSA4_RS46 0x40
+#define RSA4_RS45 0x20
+#define RSA4_RS44 0x10
+#define RSA4_RS43 0x08
+#define RSA4_RS42 0x04
+#define RSA4_RS41 0x02
+#define RSA4_RS40 0x01
+
+#define RSA5_RS57 0x80
+#define RSA5_RS56 0x40
+#define RSA5_RS55 0x20
+#define RSA5_RS54 0x10
+#define RSA5_RS53 0x08
+#define RSA5_RS52 0x04
+#define RSA5_RS51 0x02
+#define RSA5_RS50 0x01
+
+#define RSA6_RS67 0x80
+#define RSA6_RS66 0x40
+#define RSA6_RS65 0x20
+#define RSA6_RS64 0x10
+#define RSA6_RS63 0x08
+#define RSA6_RS62 0x04
+#define RSA6_RS61 0x02
+#define RSA6_RS60 0x01
+
+#define RSA7_RS77 0x80
+#define RSA7_RS76 0x40
+#define RSA7_RS75 0x20
+#define RSA7_RS74 0x10
+#define RSA7_RS73 0x08
+#define RSA7_RS72 0x04
+#define RSA7_RS71 0x02
+#define RSA7_RS70 0x01
+
+#define RSA8_RS87 0x80
+#define RSA8_RS86 0x40
+#define RSA8_RS85 0x20
+#define RSA8_RS84 0x10
+#define RSA8_RS83 0x08
+#define RSA8_RS82 0x04
+#define RSA8_RS81 0x02
+#define RSA8_RS80 0x01
+
+/* RSA6S (Receive Sa6 Bit Status Register)
+ ------------------------ T1 ------------------------- */
+
+#define RSA6S_SX 0x20
+#define RSA6S_SF 0x10
+#define RSA6S_SE 0x08
+#define RSA6S_SC 0x04
+#define RSA6S_SA 0x02
+#define RSA6S_S8 0x01
+
+
+/* RDL1-3 Receive DL-Bit Register1-3)
+ ------------------------ T1 ------------------------- */
+
+#define RDL1_RDL17 0x80
+#define RDL1_RDL16 0x40
+#define RDL1_RDL15 0x20
+#define RDL1_RDL14 0x10
+#define RDL1_RDL13 0x08
+#define RDL1_RDL12 0x04
+#define RDL1_RDL11 0x02
+#define RDL1_RDL10 0x01
+
+#define RDL2_RDL27 0x80
+#define RDL2_RDL26 0x40
+#define RDL2_RDL25 0x20
+#define RDL2_RDL24 0x10
+#define RDL2_RDL23 0x08
+#define RDL2_RDL22 0x04
+#define RDL2_RDL21 0x02
+#define RDL2_RDL20 0x01
+
+#define RDL3_RDL37 0x80
+#define RDL3_RDL36 0x40
+#define RDL3_RDL35 0x20
+#define RDL3_RDL34 0x10
+#define RDL3_RDL33 0x08
+#define RDL3_RDL32 0x04
+#define RDL3_RDL31 0x02
+#define RDL3_RDL30 0x01
+
+
+/* SIS (Signaling Status Register)
+
+ -------------------- E1 & T1 -------------------------- */
+
+#define SIS_XDOV 0x80
+#define SIS_XFW 0x40
+#define SIS_XREP 0x20
+#define SIS_RLI 0x08
+#define SIS_CEC 0x04
+#define SIS_BOM 0x01
+
+
+/* RSIS (Receive Signaling Status Register)
+
+ -------------------- E1 & T1 --------------------------- */
+
+#define RSIS_VFR 0x80
+#define RSIS_RDO 0x40
+#define RSIS_CRC16 0x20
+#define RSIS_RAB 0x10
+#define RSIS_HA1 0x08
+#define RSIS_HA0 0x04
+#define RSIS_HFR 0x02
+#define RSIS_LA 0x01
+
+
+/* RBCL/H (Receive Byte Count Low/High)
+
+ ------------------- E1 & T1 ----------------------- */
+
+#define RBCL_RBC7 0x80
+#define RBCL_RBC6 0x40
+#define RBCL_RBC5 0x20
+#define RBCL_RBC4 0x10
+#define RBCL_RBC3 0x08
+#define RBCL_RBC2 0x04
+#define RBCL_RBC1 0x02
+#define RBCL_RBC0 0x01
+
+#define RBCH_OV 0x10
+#define RBCH_RBC11 0x08
+#define RBCH_RBC10 0x04
+#define RBCH_RBC9 0x02
+#define RBCH_RBC8 0x01
+
+
+/* ISR1-3 (Interrupt Status Register 1-3)
+
+ ------------------ E1 & T1 ------------------------------ */
+
+#define FISR0_RME 0x80
+#define FISR0_RFS 0x40
+#define FISR0_T8MS 0x20
+#define FISR0_ISF 0x20
+#define FISR0_RMB 0x10
+#define FISR0_CASC 0x08
+#define FISR0_RSC 0x08
+#define FISR0_CRC6 0x04
+#define FISR0_CRC4 0x04
+#define FISR0_PDEN 0x02
+#define FISR0_RPF 0x01
+
+#define FISR1_CASE 0x80
+#define FISR1_LLBSC 0x80
+#define FISR1_RDO 0x40
+#define FISR1_ALLS 0x20
+#define FISR1_XDU 0x10
+#define FISR1_XMB 0x08
+#define FISR1_XLSC 0x02
+#define FISR1_XPR 0x01
+
+#define FISR2_FAR 0x80
+#define FISR2_LFA 0x40
+#define FISR2_MFAR 0x20
+#define FISR2_T400MS 0x10
+#define FISR2_LMFA 0x10
+#define FISR2_AIS 0x08
+#define FISR2_LOS 0x04
+#define FISR2_RAR 0x02
+#define FISR2_RA 0x01
+
+#define FISR3_ES 0x80
+#define FISR3_SEC 0x40
+#define FISR3_LMFA16 0x20
+#define FISR3_AIS16 0x10
+#define FISR3_RA16 0x08
+#define FISR3_API 0x04
+#define FISR3_XSLP 0x20
+#define FISR3_XSLN 0x10
+#define FISR3_LLBSC 0x08
+#define FISR3_XRS 0x04
+#define FISR3_SLN 0x02
+#define FISR3_SLP 0x01
+
+
+/* GIS (Global Interrupt Status Register)
+
+ --------------------- E1 & T1 --------------------- */
+
+#define GIS_ISR3 0x08
+#define GIS_ISR2 0x04
+#define GIS_ISR1 0x02
+#define GIS_ISR0 0x01
+
+
+/* VSTR (Version Status Register)
+
+ --------------------- E1 & T1 --------------------- */
+
+#define VSTR_VN3 0x08
+#define VSTR_VN2 0x04
+#define VSTR_VN1 0x02
+#define VSTR_VN0 0x01
+
+
+/*>>>>>>>>>>>>>>>>>>>>> Local Control Structures <<<<<<<<<<<<<<<<<<<<<<<<< */
+
+/* Write-only Registers (E1/T1 control mode write registers) */
+#define XFIFOH 0x00 /* Tx FIFO High Byte */
+#define XFIFOL 0x01 /* Tx FIFO Low Byte */
+#define CMDR 0x02 /* Command Reg */
+#define DEC 0x60 /* Disable Error Counter */
+#define TEST2 0x62 /* Manuf. Test Reg 2 */
+#define XS(nbr) (0x70 + (nbr)) /* Tx CAS Reg (0 to 15) */
+
+/* Read-write Registers (E1/T1 status mode read registers) */
+#define MODE 0x03 /* Mode Reg */
+#define RAH1 0x04 /* Receive Address High 1 */
+#define RAH2 0x05 /* Receive Address High 2 */
+#define RAL1 0x06 /* Receive Address Low 1 */
+#define RAL2 0x07 /* Receive Address Low 2 */
+#define IPC 0x08 /* Interrupt Port Configuration */
+#define CCR1 0x09 /* Common Configuration Reg 1 */
+#define CCR3 0x0A /* Common Configuration Reg 3 */
+#define PRE 0x0B /* Preamble Reg */
+#define RTR1 0x0C /* Receive Timeslot Reg 1 */
+#define RTR2 0x0D /* Receive Timeslot Reg 2 */
+#define RTR3 0x0E /* Receive Timeslot Reg 3 */
+#define RTR4 0x0F /* Receive Timeslot Reg 4 */
+#define TTR1 0x10 /* Transmit Timeslot Reg 1 */
+#define TTR2 0x11 /* Transmit Timeslot Reg 2 */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 22'
echo 'File patch-2.2.20 is continued in part 23'
echo "23" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:27 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part28

#!/bin/sh -x
# this is part 28 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 28; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X _pAC = (pAC); \
- _PortIdx = (SK_U32)(PortIdx); \
+ _PortNum = (SK_U32)(PortNum); \
X _pLaPacket = (SK_U8 *)(pLaPacket); \
X if (IsBc) {\
- if (!SK_ADDR_EQUAL( \
- _pLaPacket, \
- _pAC->Addr.CurrentMacAddress.a)) { \
- _pAC->Rlmt.Port[_PortIdx].BcTimeStamp = \
- SkOsGetTime(_pAC); \
+ if (!SK_ADDR_EQUAL(_pLaPacket, _pAC->Addr.Net[_pAC->Rlmt.Port[ \
+ _PortNum].Net->NetNumber].CurrentMacAddress.a)) { \
+ _pAC->Rlmt.Port[_PortNum].BcTimeStamp = SkOsGetTime(_pAC); \
+ _pAC->Rlmt.CheckSwitch = SK_TRUE; \
X } \
- _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \
+ /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
X *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
X } \
X else if (IsMc) { \
X if (SK_ADDR_EQUAL(_pLaPacket, BridgeMcAddr.a)) { \
- _pAC->Rlmt.Port[_PortIdx].BpduPacketsPerTimeSlot++; \
- if (_pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) { \
- *(pForRlmt) = SK_RLMT_RX_RLMT | \
- SK_RLMT_RX_PROTOCOL; \
+ _pAC->Rlmt.Port[_PortNum].BpduPacketsPerTimeSlot++; \
+ if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_CHECK_SEG) { \
+ *(pForRlmt) = SK_RLMT_RX_RLMT | SK_RLMT_RX_PROTOCOL; \
X } \
X else { \
X *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
@@ -330,18 +352,18 @@
X *(pForRlmt) = SK_RLMT_RX_RLMT; \
X } \
X else { \
- _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \
+ /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
X *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
X } \
X } \
X else { \
X if (SK_ADDR_EQUAL( \
X _pLaPacket, \
- _pAC->Addr.Port[_PortIdx].CurrentMacAddress.a)) { \
+ _pAC->Addr.Port[_PortNum].CurrentMacAddress.a)) { \
X *(pForRlmt) = SK_RLMT_RX_RLMT; \
X } \
X else { \
- _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \
+ /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
X *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
X } \
X } \
@@ -350,107 +372,143 @@
X #ifdef SK_RLMT_FAST_LOOKAHEAD
X Error: SK_RLMT_FAST_LOOKAHEAD no longer used. Use new macros for lookahead.
X #endif /* SK_RLMT_FAST_LOOKAHEAD */
+#ifdef SK_RLMT_SLOW_LOOKAHEAD
+Error: SK_RLMT_SLOW_LOOKAHEAD no longer used. Use new macros for lookahead.
+#endif /* SK_RLMT_SLOW_LOOKAHEAD */
X
X /* typedefs *******************************************************************/
X
+#ifdef SK_RLMT_MBUF_PRIVATE
+typedef struct s_RlmtMbuf {
+ some content
+} SK_RLMT_MBUF;
+#endif /* SK_RLMT_MBUF_PRIVATE */
+
+
+#ifdef SK_LA_INFO
+typedef struct s_Rlmt_PacketInfo {
+ unsigned PacketLength; /* Length of packet. */
+ unsigned PacketType; /* Directed/Multicast/Broadcast. */
+} SK_RLMT_PINFO;
+#endif /* SK_LA_INFO */
+
+
X typedef struct s_RootId {
- SK_U8 Id[8]; /* Root Bridge Id. */
+ SK_U8 Id[8]; /* Root Bridge Id. */
X } SK_RLMT_ROOT_ID;
X
+
X typedef struct s_port {
X SK_MAC_ADDR CheckAddr;
X SK_BOOL SuspectTx;
X } SK_PORT_CHECK;
X
+
+typedef struct s_RlmtNet SK_RLMT_NET;
+
+
X typedef struct s_RlmtPort {
X
X /* ----- Public part (read-only) ----- */
X
- SK_U8 PortState; /* Current state of this port. */
+ SK_U8 PortState; /* Current state of this port. */
X
X /* For PNMI */
-
- SK_BOOL LinkDown;
- SK_BOOL PortDown;
-
- SK_U64 TxHelloCts;
- SK_U64 RxHelloCts;
- SK_U64 TxSpHelloReqCts;
- SK_U64 RxSpHelloCts;
+ SK_BOOL LinkDown;
+ SK_BOOL PortDown;
+ SK_U8 Align01;
+
+ SK_U32 PortNumber; /* Number of port on adapter. */
+ SK_RLMT_NET * Net; /* Net port belongs to. */
+
+ SK_U64 TxHelloCts;
+ SK_U64 RxHelloCts;
+ SK_U64 TxSpHelloReqCts;
+ SK_U64 RxSpHelloCts;
X
X /* ----- Private part ----- */
X
- SK_BOOL PortStarted; /* Port is started. */
- SK_BOOL PortNoRx; /* NoRx for >= 1 time slot. */
- SK_U32 CheckingState; /* Checking State. */
-
- SK_U64 PacketsRx; /* Total packets received. */
- SK_U32 PacketsPerTimeSlot; /* Packets rxed between TOs. */
- SK_U32 DataPacketsPerTimeSlot; /* Data packets ... */
-#if 0
- SK_U32 RlmtAcksPerTimeSlot; /* RLMT Acks rxed in TS. */
- SK_U32 RlmtChksPerTimeSlot; /* RLMT Chks rxed in TS. */
-#endif /* 0 */
- SK_U32 BpduPacketsPerTimeSlot; /* BPDU packets rxed in TS. */
- SK_U64 BcTimeStamp; /* Time of last BC receive. */
- SK_U64 GuTimeStamp; /* Time of entering GOING_UP. */
-
- SK_TIMER UpTimer; /* Timer struct Link/Port up. */
- SK_TIMER DownRxTimer; /* Timer struct down rx. */
- SK_TIMER DownTxTimer; /* Timer struct down tx. */
-
- SK_U8 Random[4]; /* Random value. */
- unsigned PortsChecked; /* #ports checked. */
- unsigned PortsSuspect; /* #ports checked that are s. */
+/* SK_U64 PacketsRx; */ /* Total packets received. */
+ SK_U32 PacketsPerTimeSlot; /* Packets rxed between TOs. */
+/* SK_U32 DataPacketsPerTimeSlot; */ /* Data packets ... */
+ SK_U32 BpduPacketsPerTimeSlot; /* BPDU packets rxed in TS. */
+ SK_U64 BcTimeStamp; /* Time of last BC receive. */
+ SK_U64 GuTimeStamp; /* Time of entering GOING_UP. */
+
+ SK_TIMER UpTimer; /* Timer struct Link/Port up. */
+ SK_TIMER DownRxTimer; /* Timer struct down rx. */
+ SK_TIMER DownTxTimer; /* Timer struct down tx. */
+
+ SK_U32 CheckingState; /* Checking State. */
+
+ SK_ADDR_PORT * AddrPort;
+
+ SK_U8 Random[4]; /* Random value. */
+ unsigned PortsChecked; /* #ports checked. */
+ unsigned PortsSuspect; /* #ports checked that are s. */
X SK_PORT_CHECK PortCheck[1];
X /* SK_PORT_CHECK PortCheck[SK_MAX_MACS - 1]; */
X
- SK_BOOL RootIdSet;
- SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
+ SK_BOOL PortStarted; /* Port is started. */
+ SK_BOOL PortNoRx; /* NoRx for >= 1 time slot. */
+ SK_BOOL RootIdSet;
+ SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
X } SK_RLMT_PORT;
X
-#ifdef SK_RLMT_MBUF_PRIVATE
-typedef struct s_RlmtMbuf {
- some content
-} SK_RLMT_MBUF;
-#endif /* SK_RLMT_MBUF_PRIVATE */
X
-#ifdef SK_LA_INFO
-typedef struct s_Rlmt_PacketInfo {
- unsigned PacketLength; /* Length of packet. */
- unsigned PacketType; /* Directed/Multicast/Broadcast. */
-} SK_RLMT_PINFO;
-#endif /* SK_LA_INFO */
-
-typedef struct s_Rlmt {
+struct s_RlmtNet {
X
X /* ----- Public part (read-only) ----- */
X
- SK_U8 RlmtState; /* Current RLMT state. */
- SK_RLMT_PORT Port[SK_MAX_MACS]; /* Array of available ports. */
- SK_U32 PrefPort; /* Preferred port. */
+ SK_U32 NetNumber; /* Number of net. */
+
+ SK_RLMT_PORT * Port[SK_MAX_MACS]; /* Ports that belong to this net. */
+ SK_U32 NumPorts; /* Number of ports. */
+ SK_U32 PrefPort; /* Preferred port. */
X
X /* For PNMI */
X
- SK_U32 RlmtMode; /* Check ... */
- SK_U32 MacActive; /* Active port. */
- SK_U32 MacPreferred; /* 0xFFFFFFFF: Automatic. */
+ SK_U32 RlmtMode; /* Check ... */
+ SK_U32 ActivePort; /* Active port. */
+ SK_U32 Preference; /* 0xFFFFFFFF: Automatic. */
+
+ SK_U8 RlmtState; /* Current RLMT state. */
+
+/* ----- Private part ----- */
+ SK_BOOL RootIdSet;
+ SK_U16 Align01;
+
+ int LinksUp; /* #Links up. */
+ int PortsUp; /* #Ports up. */
+ SK_U32 TimeoutValue; /* RLMT timeout value. */
+
+ SK_U32 CheckingState; /* Checking State. */
+ SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
+
+ SK_TIMER LocTimer; /* Timer struct. */
+ SK_TIMER SegTimer; /* Timer struct. */
+};
+
+
+typedef struct s_Rlmt {
+
+/* ----- Public part (read-only) ----- */
+
+ SK_U32 NumNets; /* Number of nets. */
+ SK_U32 NetsStarted; /* Number of nets started. */
+ SK_RLMT_NET Net[SK_MAX_NETS]; /* Array of available nets. */
+ SK_RLMT_PORT Port[SK_MAX_MACS]; /* Array of available ports. */
X
X /* ----- Private part ----- */
+ SK_BOOL CheckSwitch;
+ SK_U8 Align01;
+ SK_U16 Align02;
X
- int LinksUp; /* #Links up. */
- int PortsUp; /* #Ports up. */
- SK_U32 TimeoutValue; /* RLMT timeout value. */
- SK_TIMER LocTimer; /* Timer struct. */
-
- SK_U32 CheckingState; /* Checking State. */
- SK_BOOL RootIdSet;
- SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
- SK_TIMER SegTimer; /* Timer struct. */
X } SK_RLMT;
X
+
X extern SK_MAC_ADDR BridgeMcAddr;
-extern SK_MAC_ADDR SkRlmtMcAddr;
+extern SK_MAC_ADDR SkRlmtMcAddr;
X
X /* function prototypes ********************************************************/
X
@@ -464,16 +522,7 @@
X extern void SkRlmtInit(
X SK_AC *pAC,
X SK_IOC IoC,
- int Level);
-
-#ifdef SK_RLMT_SLOW_LOOKAHEAD
-extern SK_BOOL SkRlmtLookaheadPacket(
- SK_AC *pAC,
- SK_U32 PortIdx,
- SK_U8 *pLaPacket,
- unsigned PacketLength,
- unsigned LaLength);
-#endif /* SK_RLMT_SLOW_LOOKAHEAD */
+ int Level);
X
X extern int SkRlmtEvent(
X SK_AC *pAC,
@@ -481,11 +530,11 @@
X SK_U32 Event,
X SK_EVPARA Para);
X
-#else /* defined(SK_KR_PROTO)) */
+#else /* defined(SK_KR_PROTO) */
X
X /* Non-ANSI/C++ compliant function prototypes */
X
-xxxx /* not supported yet - force error */
+#error KR-style function prototypes are not yet provided.
X
X #endif /* defined(SK_KR_PROTO)) */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skversion.h linux/drivers/net/sk98lin/h/skversion.h
--- v2.2.19/drivers/net/sk98lin/h/skversion.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/net/sk98lin/h/skversion.h Wed Oct 10 01:41:01 2001
@@ -0,0 +1,46 @@
+/******************************************************************************
+ *
+ * Name: version.h
+ * Project: GEnesis, PCI Gigabit Ethernet Adapter
+ * Version: $Revision: 1.1 $
+ * Date: $Date: 2001/03/06 09:25:00 $
+ * Purpose: SK specific Error log support
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * (C)Copyright 1998,1999 SysKonnect,
+ * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ *
+ * 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.
+ *
+ * The information in this file is provided "AS IS" without warranty.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * History:
+ * $Log: skversion.h,v $
+ * Revision 1.1 2001/03/06 09:25:00 mlindner
+ * first version


+ *
+ *
+ *

+ ******************************************************************************/
+
+
+static const char SysKonnectFileId[] = "@(#)" __FILE__ " (C) SysKonnect GmbH.";
+static const char SysKonnectBuildNumber[] =
+ "@(#)SK-BUILD: 4.07 PL: 01";
+
+#define BOOT_STRING "sk98lin: Network Device Driver v4.07\n" \
+ "Copyright (C) 2000-2001 SysKonnect GmbH."
+
+#define VER_STRING "4.07"
+
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/xmac_ii.h linux/drivers/net/sk98lin/h/xmac_ii.h
--- v2.2.19/drivers/net/sk98lin/h/xmac_ii.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/xmac_ii.h Wed Oct 10 01:41:02 2001
@@ -2,16 +2,15 @@
X *
X * Name: xmac_ii.h
X * Project: GEnesis, PCI Gigabit Ethernet Adapter
- * Version: $Revision: 1.26 $
- * Date: $Date: 1999/11/22 14:03:00 $
+ * Version: $Revision: 1.28 $
+ * Date: $Date: 2000/11/09 12:32:49 $
X * Purpose: Defines and Macros for XaQti's Gigabit Ethernet Controller
X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2000 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
@@ -27,6 +26,12 @@
X * History:
X *
X * $Log: xmac_ii.h,v $
+ * Revision 1.28 2000/11/09 12:32:49 rassmann
+ * Renamed variables.
+ *
+ * Revision 1.27 2000/05/17 11:00:46 malthoff
+ * Add bit for enable/disable power management in BCOM chip.
+ *
X * Revision 1.26 1999/11/22 14:03:00 cgoos
X * Changed license header to GPL.
X *
@@ -142,40 +147,40 @@
X * Note: NA reg = Network Address e.g DA, SA etc.
X *
X */
-#define XM_MMU_CMD 0x0000 /* 16 bit r/w MMU Command Register */
+#define XM_MMU_CMD 0x0000 /* 16 bit r/w MMU Command Register */
X /* 0x0004: reserved */
-#define XM_POFF 0x0008 /* 32 bit r/w Packet Offset Register */
-#define XM_BURST 0x000c /* 32 bit r/w Burst Register for half duplex*/
+#define XM_POFF 0x0008 /* 32 bit r/w Packet Offset Register */
+#define XM_BURST 0x000c /* 32 bit r/w Burst Register for half duplex*/
X #define XM_1L_VLAN_TAG 0x0010 /* 16 bit r/w One Level VLAN Tag ID */
X #define XM_2L_VLAN_TAG 0x0014 /* 16 bit r/w Two Level VLAN Tag ID */
X /* 0x0018 - 0x001e: reserved */
-#define XM_TX_CMD 0x0020 /* 16 bit r/w Transmit Command Register */
+#define XM_TX_CMD 0x0020 /* 16 bit r/w Transmit Command Register */
X #define XM_TX_RT_LIM 0x0024 /* 16 bit r/w Transmit Retry Limit Register */
-#define XM_TX_STIME 0x0028 /* 16 bit r/w Transmit Slottime Register */
-#define XM_TX_IPG 0x002c /* 16 bit r/w Transmit Inter Packet Gap */
-#define XM_RX_CMD 0x0030 /* 16 bit r/w Receive Command Register */
-#define XM_PHY_ADDR 0x0034 /* 16 bit r/w PHY Address Register */
-#define XM_PHY_DATA 0x0038 /* 16 bit r/w PHY Data Register */
+#define XM_TX_STIME 0x0028 /* 16 bit r/w Transmit Slottime Register */
+#define XM_TX_IPG 0x002c /* 16 bit r/w Transmit Inter Packet Gap */
+#define XM_RX_CMD 0x0030 /* 16 bit r/w Receive Command Register */
+#define XM_PHY_ADDR 0x0034 /* 16 bit r/w PHY Address Register */
+#define XM_PHY_DATA 0x0038 /* 16 bit r/w PHY Data Register */
X /* 0x003c: reserved */
-#define XM_GP_PORT 0x0040 /* 32 bit r/w General Purpose Port Register */
-#define XM_IMSK 0x0044 /* 16 bit r/w Interrupt Mask Register */
-#define XM_ISRC 0x0048 /* 16 bit ro Interrupt Status Register */
-#define XM_HW_CFG 0x004c /* 16 bit r/w Hardware Config Register */
+#define XM_GP_PORT 0x0040 /* 32 bit r/w General Purpose Port Register */
+#define XM_IMSK 0x0044 /* 16 bit r/w Interrupt Mask Register */
+#define XM_ISRC 0x0048 /* 16 bit ro Interrupt Status Register */
+#define XM_HW_CFG 0x004c /* 16 bit r/w Hardware Config Register */
X /* 0x0050 - 0x005e: reserved */
-#define XM_TX_LO_WM 0x0060 /* 16 bit r/w Tx FIFO Low Water Mark */
-#define XM_TX_HI_WM 0x0062 /* 16 bit r/w Tx FIFO High Water Mark */
-#define XM_TX_THR 0x0064 /* 16 bit r/w Tx Request Threshold */
-#define XM_HT_THR 0x0066 /* 16 bit r/w Host Request Threshold */
-#define XM_PAUSE_DA 0x0068 /* NA reg r/w Pause Destination Address */
+#define XM_TX_LO_WM 0x0060 /* 16 bit r/w Tx FIFO Low Water Mark */
+#define XM_TX_HI_WM 0x0062 /* 16 bit r/w Tx FIFO High Water Mark */
+#define XM_TX_THR 0x0064 /* 16 bit r/w Tx Request Threshold */
+#define XM_HT_THR 0x0066 /* 16 bit r/w Host Request Threshold */
+#define XM_PAUSE_DA 0x0068 /* NA reg r/w Pause Destination Address */
X /* 0x006e: reserved */
-#define XM_CTL_PARA 0x0070 /* 32 bit r/w Control Parameter Register */
+#define XM_CTL_PARA 0x0070 /* 32 bit r/w Control Parameter Register */
X #define XM_MAC_OPCODE 0x0074 /* 16 bit r/w Opcode for MAC control frames */
X #define XM_MAC_PTIME 0x0076 /* 16 bit r/w Pause time for MAC ctrl frames*/
-#define XM_TX_STAT 0x0078 /* 32 bit ro Tx Status LIFO Register */
+#define XM_TX_STAT 0x0078 /* 32 bit ro Tx Status LIFO Register */
X
X /* 0x0080 - 0x00fc: 16 NA reg r/w Exakt Match Address Registers */
X /* use the XM_EMX() macro to address */
-#define XM_EXM_START 0x0080 /* r/w Start Address of the EXM Regs */
+#define XM_EXM_START 0x0080 /* r/w Start Address of the EXM Regs */
X
X /*
X * XM_EXM(Reg)
@@ -188,18 +193,18 @@
X */
X #define XM_EXM(Reg) (XM_EXM_START + ((Reg) << 3))
X
-#define XM_SRC_CHK 0x0100 /* NA reg r/w Source Check Address Register */
-#define XM_SA 0x0108 /* NA reg r/w Station Address Register */
-#define XM_HSM 0x0110 /* 64 bit r/w Hash Match Address Registers */
-#define XM_RX_LO_WM 0x0118 /* 16 bit r/w Receive Low Water Mark */
-#define XM_RX_HI_WM 0x011a /* 16 bit r/w Receive High Water Mark */
-#define XM_RX_THR 0x011c /* 32 bit r/w Receive Request Threshold */
-#define XM_DEV_ID 0x0120 /* 32 bit ro Device ID Register */
-#define XM_MODE 0x0124 /* 32 bit r/w Mode Register */
-#define XM_LSA 0x0128 /* NA reg ro Last Source Register */
+#define XM_SRC_CHK 0x0100 /* NA reg r/w Source Check Address Register */
+#define XM_SA 0x0108 /* NA reg r/w Station Address Register */
+#define XM_HSM 0x0110 /* 64 bit r/w Hash Match Address Registers */
+#define XM_RX_LO_WM 0x0118 /* 16 bit r/w Receive Low Water Mark */
+#define XM_RX_HI_WM 0x011a /* 16 bit r/w Receive High Water Mark */
+#define XM_RX_THR 0x011c /* 32 bit r/w Receive Request Threshold */
+#define XM_DEV_ID 0x0120 /* 32 bit ro Device ID Register */
+#define XM_MODE 0x0124 /* 32 bit r/w Mode Register */
+#define XM_LSA 0x0128 /* NA reg ro Last Source Register */
X /* 0x012e: reserved */
-#define XM_TS_READ 0x0130 /* 32 bit ro TimeStamp Read Regeister */
-#define XM_TS_LOAD 0x0134 /* 32 bit ro TimeStamp Load Value */
+#define XM_TS_READ 0x0130 /* 32 bit ro TimeStamp Read Regeister */
+#define XM_TS_LOAD 0x0134 /* 32 bit ro TimeStamp Load Value */
X /* 0x0138 - 0x01fe: reserved */
X #define XM_STAT_CMD 0x0200 /* 16 bit r/w Statistics Command Register */
X #define XM_RX_CNT_EV 0x0204 /* 32 bit ro Rx Counter Event Register */
@@ -207,13 +212,13 @@
X #define XM_RX_EV_MSK 0x020c /* 32 bit r/w Rx Counter Event Mask */
X #define XM_TX_EV_MSK 0x0210 /* 32 bit r/w Tx Counter Event Mask */
X /* 0x0204 - 0x027e: reserved */
-#define XM_TXF_OK 0x0280 /* 32 bit ro Frames Transmitted OK Conuter */
+#define XM_TXF_OK 0x0280 /* 32 bit ro Frames Transmitted OK Conuter */
X #define XM_TXO_OK_HI 0x0284 /* 32 bit ro Octets Transmitted OK High Cnt*/
X #define XM_TXO_OK_LO 0x0288 /* 32 bit ro Octets Transmitted OK Low Cnt */
X #define XM_TXF_BC_OK 0x028c /* 32 bit ro Broadcast Frames Xmitted OK */
X #define XM_TXF_MC_OK 0x0290 /* 32 bit ro Multicast Frames Xmitted OK */
X #define XM_TXF_UC_OK 0x0294 /* 32 bit ro Unicast Frames Xmitted OK */
-#define XM_TXF_LONG 0x0298 /* 32 bit ro Tx Long Frame Counter */
+#define XM_TXF_LONG 0x0298 /* 32 bit ro Tx Long Frame Counter */
X #define XM_TXE_BURST 0x029c /* 32 bit ro Tx Burst Event Counter */
X #define XM_TXF_MPAUSE 0x02a0 /* 32 bit ro Tx Pause MAC Ctrl Frame Cnt */
X #define XM_TXF_MCTRL 0x02a4 /* 32 bit ro Tx MAC Ctrl Frame Counter */
@@ -221,20 +226,20 @@
X #define XM_TXF_MUL_COL 0x02ac /* 32 bit ro Tx Multiple Collision Counter */
X #define XM_TXF_ABO_COL 0x02b0 /* 32 bit ro Tx aborted due to Exessive Col*/
X #define XM_TXF_LAT_COL 0x02b4 /* 32 bit ro Tx Late Collision Counter */
-#define XM_TXF_DEF 0x02b8 /* 32 bit ro Tx Deferred Frame Counter */
+#define XM_TXF_DEF 0x02b8 /* 32 bit ro Tx Deferred Frame Counter */
X #define XM_TXF_EX_DEF 0x02bc /* 32 bit ro Tx Excessive Deferall Counter */
X #define XM_TXE_FIFO_UR 0x02c0 /* 32 bit ro Tx FIFO Underrun Event Cnt */
X #define XM_TXE_CS_ERR 0x02c4 /* 32 bit ro Tx Carrier Sence Error Cnt */
-#define XM_TXP_UTIL 0x02c8 /* 32 bit ro Tx Utilization in % */
+#define XM_TXP_UTIL 0x02c8 /* 32 bit ro Tx Utilization in % */
X /* 0x02cc - 0x02ce: reserved */
-#define XM_TXF_64B 0x02d0 /* 32 bit ro 64 Byte Tx Frame Counter */
-#define XM_TXF_127B 0x02d4 /* 32 bit ro 65-127 Byte Tx Frame Counter */
-#define XM_TXF_255B 0x02d8 /* 32 bit ro 128-255 Byte Tx Frame Counter */
-#define XM_TXF_511B 0x02dc /* 32 bit ro 256-511 Byte Tx Frame Counter */
+#define XM_TXF_64B 0x02d0 /* 32 bit ro 64 Byte Tx Frame Counter */
+#define XM_TXF_127B 0x02d4 /* 32 bit ro 65-127 Byte Tx Frame Counter */
+#define XM_TXF_255B 0x02d8 /* 32 bit ro 128-255 Byte Tx Frame Counter */
+#define XM_TXF_511B 0x02dc /* 32 bit ro 256-511 Byte Tx Frame Counter */
X #define XM_TXF_1023B 0x02e0 /* 32 bit ro 512-1023 Byte Tx Frame Counter*/
X #define XM_TXF_MAX_SZ 0x02e4 /* 32 bit ro 1024-MaxSize Byte Tx Frame Cnt*/
X /* 0x02e8 - 0x02fe: reserved */
-#define XM_RXF_OK 0x0300 /* 32 bit ro Frames Received OK */
+#define XM_RXF_OK 0x0300 /* 32 bit ro Frames Received OK */
X #define XM_RXO_OK_HI 0x0304 /* 32 bit ro Octets Received OK High Cnt */
X #define XM_RXO_OK_LO 0x0308 /* 32 bit ro Octets Received OK Low Counter*/
X #define XM_RXF_BC_OK 0x030c /* 32 bit ro Broadcast Frames Received OK */
@@ -253,17 +258,17 @@
X #define XM_RXF_LEN_ERR 0x0340 /* 32 bit ro Rx in Range Length Error */
X #define XM_RXE_SYM_ERR 0x0344 /* 32 bit ro Rx Symbol Error Counter */
X #define XM_RXE_SHT_ERR 0x0348 /* 32 bit ro Rx Short Event Error Cnt */
-#define XM_RXE_RUNT 0x034c /* 32 bit ro Rx Runt Event Counter */
+#define XM_RXE_RUNT 0x034c /* 32 bit ro Rx Runt Event Counter */
X #define XM_RXF_LNG_ERR 0x0350 /* 32 bit ro Rx Frame too Long Error Cnt */
X #define XM_RXF_FCS_ERR 0x0354 /* 32 bit ro Rx Frame Check Seq. Error Cnt */
X /* 0x0358 - 0x035a: reserved */
X #define XM_RXF_CEX_ERR 0x035c /* 32 bit ro Rx Carrier Ext Error Frame Cnt*/
-#define XM_RXP_UTIL 0x0360 /* 32 bit ro Rx Utilization in % */
+#define XM_RXP_UTIL 0x0360 /* 32 bit ro Rx Utilization in % */
X /* 0x0364 - 0x0366: reserved */
-#define XM_RXF_64B 0x0368 /* 32 bit ro 64 Byte Rx Frame Counter */
-#define XM_RXF_127B 0x036c /* 32 bit ro 65-127 Byte Rx Frame Counter */
-#define XM_RXF_255B 0x0370 /* 32 bit ro 128-255 Byte Rx Frame Counter */
-#define XM_RXF_511B 0x0374 /* 32 bit ro 256-511 Byte Rx Frame Counter */
+#define XM_RXF_64B 0x0368 /* 32 bit ro 64 Byte Rx Frame Counter */
+#define XM_RXF_127B 0x036c /* 32 bit ro 65-127 Byte Rx Frame Counter */
+#define XM_RXF_255B 0x0370 /* 32 bit ro 128-255 Byte Rx Frame Counter */
+#define XM_RXF_511B 0x0374 /* 32 bit ro 256-511 Byte Rx Frame Counter */
X #define XM_RXF_1023B 0x0378 /* 32 bit ro 512-1023 Byte Rx Frame Counter*/
X #define XM_RXF_MAX_SZ 0x037c /* 32 bit ro 1024-MaxSize Byte Rx Frame Cnt*/
X /* 0x02e8 - 0x02fe: reserved */
@@ -281,12 +286,12 @@
X */
X
X /* XM_MMU_CMD 16 bit r/w MMU Comamnd Register */
- /* Bit 15..13: reserved */
+ /* Bit 15..13: reserved */
X #define XM_MMU_PHY_RDY (1<<12) /* Bit 12: PHY Read Ready */
X #define XM_MMU_PHY_BUSY (1<<11) /* Bit 11: PHY Busy */
X #define XM_MMU_IGN_PF (1<<10) /* Bit 10: Ignore Pause Frame */
X #define XM_MMU_MAC_LB (1<<9) /* Bit 9: Enable MAC Loopback */
- /* Bit 8: reserved */
+ /* Bit 8: reserved */
X #define XM_MMU_FRC_COL (1<<7) /* Bit 7: Force Collision */
X #define XM_MMU_SIM_COL (1<<6) /* Bit 6: Simulate Collision */
X #define XM_MMU_NO_PRE (1<<5) /* Bit 5: No MDIO Preamble */
@@ -298,8 +303,8 @@
X
X
X /* XM_TX_CMD 16 bit r/w Transmit Command Register */
- /* Bit 15..7: reserved */
-#define XM_TX_BK2BK (1<<6) /* Bit 6: Ignor Carrier Sense (tx Bk2Bk)*/
+ /* Bit 15..7: reserved */
+#define XM_TX_BK2BK (1<<6) /* Bit 6: Ignor Carrier Sense (tx Bk2Bk)*/
X #define XM_TX_ENC_BYP (1<<5) /* Bit 5: Set Encoder in Bypass Mode */
X #define XM_TX_SAM_LINE (1<<4) /* Bit 4: (sc) Start utilization calculation */
X #define XM_TX_NO_GIG_MD (1<<3) /* Bit 3: Disable Carrier Extension */
@@ -309,28 +314,28 @@
X
X
X /* XM_TX_RT_LIM 16 bit r/w Transmit Retry Limit Register */
- /* Bit 15..5: reserved */
+ /* Bit 15..5: reserved */
X #define XM_RT_LIM_MSK 0x1f /* Bit 4..0: Tx Retry Limit */
X
X
X /* XM_TX_STIME 16 bit r/w Transmit Slottime Register */
- /* Bit 15..7: reserved */
+ /* Bit 15..7: reserved */
X #define XM_STIME_MSK 0x7f /* Bit 6..0: Tx Slottime bits */
X
X
X /* XM_TX_IPG 16 bit r/w Transmit Inter Packet Gap */
- /* Bit 15..8: reserved */
-#define XM_IPG_MSK 0xff /* Bit 7..0: IPG value bits */
+ /* Bit 15..8: reserved */
+#define XM_IPG_MSK 0xff /* Bit 7..0: IPG value bits */
X
X
X /* XM_RX_CMD 16 bit r/w Receive Command Register */
- /* Bit 15..9: reserved */
+ /* Bit 15..9: reserved */
X #define XM_RX_LENERR_OK (1<<8) /* Bit 8 don't set Rx Err bit for */
- /* inrange error packets */
+ /* inrange error packets */
X #define XM_RX_BIG_PK_OK (1<<7) /* Bit 7 don't set Rx Err bit for */
- /* jumbo packets */
+ /* jumbo packets */
X #define XM_RX_IPG_CAP (1<<6) /* Bit 6 repl. type field with IPG */
-#define XM_RX_TP_MD (1<<5) /* Bit 5: Enable transparent Mode */
+#define XM_RX_TP_MD (1<<5) /* Bit 5: Enable transparent Mode */
X #define XM_RX_STRIP_FCS (1<<4) /* Bit 4: Enable FCS Stripping */
X #define XM_RX_SELF_RX (1<<3) /* Bit 3: Enable Rx of own packets */
X #define XM_RX_SAM_LINE (1<<2) /* Bit 2: (sc) Start utilization calculation */
@@ -339,24 +344,24 @@
X
X
X /* XM_PHY_ADDR 16 bit r/w PHY Address Register */
- /* Bit 15..5: reserved */
+ /* Bit 15..5: reserved */
X #define XM_PHY_ADDR_SZ 0x1f /* Bit 4..0: PHY Address bits */
X
X
X /* XM_GP_PORT 32 bit r/w General Purpose Port Register */
- /* Bit 31..7: reserved */
-#define XM_GP_ANIP (1L<<6) /* Bit 6: (ro) Auto Negotiation in Progress */
+ /* Bit 31..7: reserved */
+#define XM_GP_ANIP (1L<<6) /* Bit 6: (ro) Auto Negotiation in Progress */
X #define XM_GP_FRC_INT (1L<<5) /* Bit 5: (sc) Force Interrupt */
- /* Bit 4: reserved */
+ /* Bit 4: reserved */
X #define XM_GP_RES_MAC (1L<<3) /* Bit 3: (sc) Reset MAC and FIFOs */
X #define XM_GP_RES_STAT (1L<<2) /* Bit 2: (sc) Reset the statistics module */
- /* Bit 1: reserved */
+ /* Bit 1: reserved */
X #define XM_GP_INP_ASS (1L<<0) /* Bit 0: (ro) GP Input Pin asserted */
X
X
X /* XM_IMSK 16 bit r/w Interrupt Mask Register */
X /* XM_ISRC 16 bit ro Interrupt Status Register */
- /* Bit 15: reserved */
+ /* Bit 15: reserved */
X #define XM_IS_LNK_AE (1<<14) /* Bit 14: Link Asynchronous Event */
X #define XM_IS_TX_ABORT (1<<13) /* Bit 13: Transmit Abort, late Col. etc */
X #define XM_IS_FRC_INT (1<<12) /* Bit 12: Force INT bit set in GP */
@@ -364,7 +369,7 @@
X #define XM_IS_LIPA_RC (1<<10) /* Bit 10: Link Partner requests config */
X #define XM_IS_RX_PAGE (1<<9) /* Bit 9: Page Received */
X #define XM_IS_TX_PAGE (1<<8) /* Bit 8: Next Page Loaded for Transmit */
-#define XM_IS_AND (1<<7) /* Bit 7: Auto Negotiation Done */
+#define XM_IS_AND (1<<7) /* Bit 7: Auto Negotiation Done */
X #define XM_IS_TSC_OV (1<<6) /* Bit 6: Time Stamp Counter Overflow */
X #define XM_IS_RXC_OV (1<<5) /* Bit 5: Rx Counter Event Overflow */
X #define XM_IS_TXC_OV (1<<4) /* Bit 4: Tx Counter Event Overflow */
@@ -374,42 +379,41 @@
X #define XM_IS_RX_COMP (1<<0) /* Bit 0: Frame Rx Complete */
X
X #define XM_DEF_MSK (~(XM_IS_INP_ASS | XM_IS_LIPA_RC | XM_IS_RX_PAGE |\
- XM_IS_AND | XM_IS_RXC_OV | XM_IS_TXC_OV |\
- XM_IS_TXF_UR))
+ XM_IS_AND | XM_IS_RXC_OV | XM_IS_TXC_OV | XM_IS_TXF_UR))
X
X
X /* XM_HW_CFG 16 bit r/w Hardware Config Register */
- /* Bit 15.. 4: reserved */
+ /* Bit 15.. 4: reserved */
X #define XM_HW_GEN_EOP (1<<3) /* Bit 3: generate End of Packet pulse */
X #define XM_HW_COM4SIG (1<<2) /* Bit 2: use Comma Detect for Sig. Det.*/
- /* Bit 1: reserved */
+ /* Bit 1: reserved */
X #define XM_HW_GMII_MD (1<<0) /* Bit 0: GMII Interface selected */
X
X
X /* XM_TX_LO_WM 16 bit r/w Tx FIFO Low Water Mark */
X /* XM_TX_HI_WM 16 bit r/w Tx FIFO High Water Mark */
- /* Bit 15..10 reserved */
+ /* Bit 15..10 reserved */
X #define XM_TX_WM_MSK 0x01ff /* Bit 9.. 0 Tx FIFO Watermark bits */
X
X /* XM_TX_THR 16 bit r/w Tx Request Threshold */
X /* XM_HT_THR 16 bit r/w Host Request Threshold */
X /* XM_RX_THR 16 bit r/w Receive Request Threshold */
- /* Bit 15..11 reserved */
-#define XM_THR_MSK 0x03ff /* Bit 10.. 0 Tx FIFO Watermark bits */
+ /* Bit 15..11 reserved */
+#define XM_THR_MSK 0x03ff /* Bit 10.. 0 Tx FIFO Watermark bits */
X
X
X /* XM_TX_STAT 32 bit ro Tx Status LIFO Register */
-#define XM_ST_VALID (1UL<<31) /* Bit 31: Status Valid */
+#define XM_ST_VALID (1UL<<31) /* Bit 31: Status Valid */
X #define XM_ST_BYTE_CNT (0x3fffL<<17) /* Bit 30..17: Tx frame Length */
X #define XM_ST_RETRY_CNT (0x1fL<<12) /* Bit 16..12: Retry Count */
X #define XM_ST_EX_COL (1L<<11) /* Bit 11: Excessive Collisions */
X #define XM_ST_EX_DEF (1L<<10) /* Bit 10: Excessive Deferral */
-#define XM_ST_BURST (1L<<9) /* Bit 9: p. xmitted in burst md*/
-#define XM_ST_DEFER (1L<<8) /* Bit 8: packet was defered */
-#define XM_ST_BC (1L<<7) /* Bit 7: Broadcast packet */
-#define XM_ST_MC (1L<<6) /* Bit 6: Multicast packet */
-#define XM_ST_UC (1L<<5) /* Bit 5: Unicast packet */
-#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occured */
+#define XM_ST_BURST (1L<<9) /* Bit 9: p. xmitted in burst md*/
+#define XM_ST_DEFER (1L<<8) /* Bit 8: packet was defered */
+#define XM_ST_BC (1L<<7) /* Bit 7: Broadcast packet */
+#define XM_ST_MC (1L<<6) /* Bit 6: Multicast packet */
+#define XM_ST_UC (1L<<5) /* Bit 5: Unicast packet */
+#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occurred */
X #define XM_ST_CS_ERR (1L<<3) /* Bit 3: Carrier Sense Error */
X #define XM_ST_LAT_COL (1L<<2) /* Bit 2: Late Collision Error */
X #define XM_ST_MUL_COL (1L<<1) /* Bit 1: Multiple Collisions */
@@ -417,8 +421,8 @@
X
X /* XM_RX_LO_WM 16 bit r/w Receive Low Water Mark */
X /* XM_RX_HI_WM 16 bit r/w Receive High Water Mark */
- /* Bit 15..11: reserved */
-#define XM_RX_WM_MSK 0x03ff /* Bit 11.. 0: Rx FIFO Watermark bits */
+ /* Bit 15..11: reserved */
+#define XM_RX_WM_MSK 0x03ff /* Bit 11.. 0: Rx FIFO Watermark bits */
X
X
X /* XM_DEV_ID 32 bit ro Device ID Register */
@@ -427,25 +431,25 @@
X
X
X /* XM_MODE 32 bit r/w Mode Register */
- /* Bit 31..27: reserved */
+ /* Bit 31..27: reserved */
X #define XM_MD_ENA_REJ (1L<<26) /* Bit 26: Enable Frame Reject */
X #define XM_MD_SPOE_E (1L<<25) /* Bit 25: Send Pause on Edge */
- /* extern generated */
+ /* extern generated */
X #define XM_MD_TX_REP (1L<<24) /* Bit 24: Transmit Repeater Mode*/
X #define XM_MD_SPOFF_I (1L<<23) /* Bit 23: Send Pause on FIFOfull*/
- /* intern generated */
+ /* intern generated */
X #define XM_MD_LE_STW (1L<<22) /* Bit 22: Rx Stat Word in Lit En*/
X #define XM_MD_TX_CONT (1L<<21) /* Bit 21: Send Continuous */
X #define XM_MD_TX_PAUSE (1L<<20) /* Bit 20: (sc) Send Pause Frame */
-#define XM_MD_ATS (1L<<19) /* Bit 19: Append Time Stamp */
+#define XM_MD_ATS (1L<<19) /* Bit 19: Append Time Stamp */
X #define XM_MD_SPOL_I (1L<<18) /* Bit 18: Send Pause on Low */
- /* intern generated */
+ /* intern generated */
X #define XM_MD_SPOH_I (1L<<17) /* Bit 17: Send Pause on High */
- /* intern generated */
-#define XM_MD_CAP (1L<<16) /* Bit 16: Check Address Pair */
+ /* intern generated */
+#define XM_MD_CAP (1L<<16) /* Bit 16: Check Address Pair */
X #define XM_MD_ENA_HSH (1L<<15) /* Bit 15: Enable Hashing */
-#define XM_MD_CSA (1L<<14) /* Bit 14: Check Station Address */
-#define XM_MD_CAA (1L<<13) /* Bit 13: Check Address Array */
+#define XM_MD_CSA (1L<<14) /* Bit 14: Check Station Address */
+#define XM_MD_CAA (1L<<13) /* Bit 13: Check Address Array */
X #define XM_MD_RX_MCTRL (1L<<12) /* Bit 12: Rx MAC Control Frames */
X #define XM_MD_RX_RUNT (1L<<11) /* Bit 11: Rx Runt Frames */
X #define XM_MD_RX_IRLE (1L<<10) /* Bit 10: Rx in Range Len Err F */
@@ -457,16 +461,15 @@
X #define XM_MD_DIS_BC (1L<<4) /* Bit 4: Disable Rx Boradcast */
X #define XM_MD_ENA_PROM (1L<<3) /* Bit 3: Enable Promiscuous */
X #define XM_MD_ENA_BE (1L<<2) /* Bit 2: Enable Big Endian */
-#define XM_MD_FTF (1L<<1) /* Bit 1: (sc) Flush Tx FIFO */
-#define XM_MD_FRF (1L<<0) /* Bit 0: (sc) Flush Rx FIFO */
+#define XM_MD_FTF (1L<<1) /* Bit 1: (sc) Flush Tx FIFO */
+#define XM_MD_FRF (1L<<0) /* Bit 0: (sc) Flush Rx FIFO */
X
X #define XM_PAUSE_MODE (XM_MD_SPOE_E | XM_MD_SPOL_I | XM_MD_SPOH_I)
X #define XM_DEF_MODE (XM_MD_RX_RUNT | XM_MD_RX_IRLE | XM_MD_RX_LONG |\
- XM_MD_RX_CRCE | XM_MD_RX_ERR | XM_MD_CSA |\
- XM_MD_CAA)
+ XM_MD_RX_CRCE | XM_MD_RX_ERR | XM_MD_CSA | XM_MD_CAA)
X
X /* XM_STAT_CMD 16 bit r/w Statistics Command Register */
- /* Bit 16..6: reserved */
+ /* Bit 16..6: reserved */
X #define XM_SC_SNP_RXC (1<<5) /* Bit 5: (sc) Snap Rx Counters */
X #define XM_SC_SNP_TXC (1<<4) /* Bit 4: (sc) Snap Tx Counters */
X #define XM_SC_CP_RXC (1<<3) /* Bit 3: Copy Rx Counters Continuously */
@@ -479,28 +482,28 @@
X /* XM_RX_EV_MSK 32 bit r/w Rx Counter Event Mask */
X #define XMR_MAX_SZ_OV (1UL<<31) /* Bit 31: 1024-MaxSize Rx Cnt Ov*/
X #define XMR_1023B_OV (1L<<30) /* Bit 30: 512-1023Byte Rx Cnt Ov*/
-#define XMR_511B_OV (1L<<29) /* Bit 29: 256-511 Byte Rx Cnt Ov*/
-#define XMR_255B_OV (1L<<28) /* Bit 28: 128-255 Byte Rx Cnt Ov*/
-#define XMR_127B_OV (1L<<27) /* Bit 27: 65-127 Byte Rx Cnt Ov */
-#define XMR_64B_OV (1L<<26) /* Bit 26: 64 Byte Rx Cnt Ov */
-#define XMR_UTIL_OV (1L<<25) /* Bit 25: Rx Util Cnt Overflow */
-#define XMR_UTIL_UR (1L<<24) /* Bit 24: Rx Util Cnt Underrun */
+#define XMR_511B_OV (1L<<29) /* Bit 29: 256-511 Byte Rx Cnt Ov*/
+#define XMR_255B_OV (1L<<28) /* Bit 28: 128-255 Byte Rx Cnt Ov*/
+#define XMR_127B_OV (1L<<27) /* Bit 27: 65-127 Byte Rx Cnt Ov */
+#define XMR_64B_OV (1L<<26) /* Bit 26: 64 Byte Rx Cnt Ov */
+#define XMR_UTIL_OV (1L<<25) /* Bit 25: Rx Util Cnt Overflow */
+#define XMR_UTIL_UR (1L<<24) /* Bit 24: Rx Util Cnt Underrun */
X #define XMR_CEX_ERR_OV (1L<<23) /* Bit 23: CEXT Err Cnt Ov */
- /* Bit 22: reserved */
+ /* Bit 22: reserved */
X #define XMR_FCS_ERR_OV (1L<<21) /* Bit 21: Rx FCS Error Cnt Ov */
X #define XMR_LNG_ERR_OV (1L<<20) /* Bit 20: Rx too Long Err Cnt Ov*/
-#define XMR_RUNT_OV (1L<<19) /* Bit 19: Runt Event Cnt Ov */
+#define XMR_RUNT_OV (1L<<19) /* Bit 19: Runt Event Cnt Ov */
X #define XMR_SHT_ERR_OV (1L<<18) /* Bit 18: Rx Short Ev Err Cnt Ov*/
X #define XMR_SYM_ERR_OV (1L<<17) /* Bit 17: Rx Sym Err Cnt Ov */
- /* Bit 16: reserved */
+ /* Bit 16: reserved */
X #define XMR_CAR_ERR_OV (1L<<15) /* Bit 15: Rx Carr Ev Err Cnt Ov */
X #define XMR_JAB_PKT_OV (1L<<14) /* Bit 14: Rx Jabb Packet Cnt Ov */
-#define XMR_FIFO_OV (1L<<13) /* Bit 13: Rx FIFO Ov Ev Cnt Ov */
+#define XMR_FIFO_OV (1L<<13) /* Bit 13: Rx FIFO Ov Ev Cnt Ov */
X #define XMR_FRA_ERR_OV (1L<<12) /* Bit 12: Rx Framing Err Cnt Ov */
X #define XMR_FMISS_OV (1L<<11) /* Bit 11: Rx Missed Ev Cnt Ov */
-#define XMR_BURST (1L<<10) /* Bit 10: Rx Burst Event Cnt Ov */
-#define XMR_INV_MOC (1L<<9) /* Bit 9: Rx with inv. MAC OC Ov*/
-#define XMR_INV_MP (1L<<8) /* Bit 8: Rx inv Pause Frame Ov */
+#define XMR_BURST (1L<<10) /* Bit 10: Rx Burst Event Cnt Ov */
+#define XMR_INV_MOC (1L<<9) /* Bit 9: Rx with inv. MAC OC Ov*/
+#define XMR_INV_MP (1L<<8) /* Bit 8: Rx inv Pause Frame Ov */
X #define XMR_MCTRL_OV (1L<<7) /* Bit 7: Rx MAC Ctrl-F Cnt Ov */
X #define XMR_MPAUSE_OV (1L<<6) /* Bit 6: Rx Pause MAC Ctrl-F Ov*/
X #define XMR_UC_OK_OV (1L<<5) /* Bit 5: Rx Unicast Frame CntOv*/
@@ -508,39 +511,39 @@
X #define XMR_BC_OK_OV (1L<<3) /* Bit 3: Rx Broadcast Cnt Ov */
X #define XMR_OK_LO_OV (1L<<2) /* Bit 2: Octets Rx OK Low CntOv*/
X #define XMR_OK_HI_OV (1L<<1) /* Bit 1: Octets Rx OK Hi Cnt Ov*/
-#define XMR_OK_OV (1L<<0) /* Bit 0: Frames Received Ok Ov */
+#define XMR_OK_OV (1L<<0) /* Bit 0: Frames Received Ok Ov */
X
X #define XMR_DEF_MSK 0x00000006L /* all bits excepting 1 and 2 */
X
X /* XM_TX_CNT_EV 32 bit ro Tx Counter Event Register */
X /* XM_TX_EV_MSK 32 bit r/w Tx Counter Event Mask */
- /* Bit 31..26: reserved */
+ /* Bit 31..26: reserved */
X #define XMT_MAX_SZ_OV (1L<<25) /* Bit 25: 1024-MaxSize Tx Cnt Ov*/
X #define XMT_1023B_OV (1L<<24) /* Bit 24: 512-1023Byte Tx Cnt Ov*/
-#define XMT_511B_OV (1L<<23) /* Bit 23: 256-511 Byte Tx Cnt Ov*/
-#define XMT_255B_OV (1L<<22) /* Bit 22: 128-255 Byte Tx Cnt Ov*/
-#define XMT_127B_OV (1L<<21) /* Bit 21: 65-127 Byte Tx Cnt Ov */
-#define XMT_64B_OV (1L<<20) /* Bit 20: 64 Byte Tx Cnt Ov */
-#define XMT_UTIL_OV (1L<<19) /* Bit 19: Tx Util Cnt Overflow */
-#define XMT_UTIL_UR (1L<<18) /* Bit 18: Tx Util Cnt Underrun */
+#define XMT_511B_OV (1L<<23) /* Bit 23: 256-511 Byte Tx Cnt Ov*/
+#define XMT_255B_OV (1L<<22) /* Bit 22: 128-255 Byte Tx Cnt Ov*/
+#define XMT_127B_OV (1L<<21) /* Bit 21: 65-127 Byte Tx Cnt Ov */
+#define XMT_64B_OV (1L<<20) /* Bit 20: 64 Byte Tx Cnt Ov */
+#define XMT_UTIL_OV (1L<<19) /* Bit 19: Tx Util Cnt Overflow */
+#define XMT_UTIL_UR (1L<<18) /* Bit 18: Tx Util Cnt Underrun */
X #define XMT_CS_ERR_OV (1L<<17) /* Bit 17: Tx Carr Sen Err Cnt Ov*/
X #define XMT_FIFO_UR_OV (1L<<16) /* Bit 16: Tx FIFO Ur Ev Cnt Ov */
X #define XMT_EX_DEF_OV (1L<<15) /* Bit 15: Tx Ex Deferall Cnt Ov */
-#define XMT_DEF (1L<<14) /* Bit 14: Tx Deferred Cnt Ov */
+#define XMT_DEF (1L<<14) /* Bit 14: Tx Deferred Cnt Ov */
X #define XMT_LAT_COL_OV (1L<<13) /* Bit 13: Tx Late Col Cnt Ov */
X #define XMT_ABO_COL_OV (1L<<12) /* Bit 12: Tx abo dueto Ex Col Ov*/
X #define XMT_MUL_COL_OV (1L<<11) /* Bit 11: Tx Mult Col Cnt Ov */
-#define XMT_SNG_COL (1L<<10) /* Bit 10: Tx Single Col Cnt Ov */
+#define XMT_SNG_COL (1L<<10) /* Bit 10: Tx Single Col Cnt Ov */
X #define XMT_MCTRL_OV (1L<<9) /* Bit 9: Tx MAC Ctrl Counter Ov*/
-#define XMT_MPAUSE (1L<<8) /* Bit 8: Tx Pause MAC Ctrl-F Ov*/
-#define XMT_BURST (1L<<7) /* Bit 7: Tx Burst Event Cnt Ov */
-#define XMT_LONG (1L<<6) /* Bit 6: Tx Long Frame Cnt Ov */
+#define XMT_MPAUSE (1L<<8) /* Bit 8: Tx Pause MAC Ctrl-F Ov*/
+#define XMT_BURST (1L<<7) /* Bit 7: Tx Burst Event Cnt Ov */
+#define XMT_LONG (1L<<6) /* Bit 6: Tx Long Frame Cnt Ov */
X #define XMT_UC_OK_OV (1L<<5) /* Bit 5: Tx Unicast Cnt Ov */
X #define XMT_MC_OK_OV (1L<<4) /* Bit 4: Tx Multicast Cnt Ov */
X #define XMT_BC_OK_OV (1L<<3) /* Bit 3: Tx Broadcast Cnt Ov */
X #define XMT_OK_LO_OV (1L<<2) /* Bit 2: Octets Tx OK Low CntOv*/
X #define XMT_OK_HI_OV (1L<<1) /* Bit 1: Octets Tx OK Hi Cnt Ov*/
-#define XMT_OK_OV (1L<<0) /* Bit 0: Frames Tx Ok Ov */
+#define XMT_OK_OV (1L<<0) /* Bit 0: Frames Tx Ok Ov */
X
X #define XMT_DEF_MSK 0x00000006L /* all bits excepting 1 and 2 */
X
@@ -550,10 +553,10 @@
X #define XMR_FS_LEN (0x3fffUL<<18) /* Bit 31..18: Rx Frame Length */
X #define XMR_FS_2L_VLAN (1L<<17) /* Bit 17: tagged wh 2Lev VLAN ID*/
X #define XMR_FS_1L_VLAN (1L<<16) /* Bit 16: tagged wh 1Lev VLAN ID*/
-#define XMR_FS_BC (1L<<15) /* Bit 15: Broadcast Frame */
-#define XMR_FS_MC (1L<<14) /* Bit 14: Multicast Frame */
-#define XMR_FS_UC (1L<<13) /* Bit 13: Unicast Frame */
- /* Bit 12: reserved */
+#define XMR_FS_BC (1L<<15) /* Bit 15: Broadcast Frame */
+#define XMR_FS_MC (1L<<14) /* Bit 14: Multicast Frame */
+#define XMR_FS_UC (1L<<13) /* Bit 13: Unicast Frame */
+ /* Bit 12: reserved */
X #define XMR_FS_BURST (1L<<11) /* Bit 11: Burst Mode */
X #define XMR_FS_CEX_ERR (1L<<10) /* Bit 10: Carrier Ext. Error */
X #define XMR_FS_802_3 (1L<<9) /* Bit 9: 802.3 Frame */
@@ -561,10 +564,10 @@
X #define XMR_FS_CAR_ERR (1L<<7) /* Bit 7: Carrier Event Error */
X #define XMR_FS_LEN_ERR (1L<<6) /* Bit 6: In-Range Length Error */
X #define XMR_FS_FRA_ERR (1L<<5) /* Bit 5: Framing Error */
-#define XMR_FS_RUNT (1L<<4) /* Bit 4: Runt Error */
+#define XMR_FS_RUNT (1L<<4) /* Bit 4: Runt Error */
X #define XMR_FS_LNG_ERR (1L<<3) /* Bit 3: Gaint Error */
X #define XMR_FS_FCS_ERR (1L<<2) /* Bit 2: Frame Check Sequ Err */
-#define XMR_FS_ERR (1L<<1) /* Bit 1: Frame Error */
+#define XMR_FS_ERR (1L<<1) /* Bit 1: Frame Error */
X #define XMR_FS_MCTRL (1L<<0) /* Bit 0: MAC Control Packet */
X
X /*
@@ -658,8 +661,8 @@
X */
X #define PHY_NAT_CTRL 0x00 /* 16 bit r/w PHY Control Register */
X #define PHY_NAT_STAT 0x01 /* 16 bit r/w PHY Status Register */
-#define PHY_NAT_ID0 0x02 /* 16 bit ro PHY ID0 Register */
-#define PHY_NAT_ID1 0x03 /* 16 bit ro PHY ID1 Register */
+#define PHY_NAT_ID0 0x02 /* 16 bit ro PHY ID0 Register */
+#define PHY_NAT_ID1 0x03 /* 16 bit ro PHY ID1 Register */
X #define PHY_NAT_AUNE_ADV 0x04 /* 16 bit r/w Autonegotiation Advertisement */
X #define PHY_NAT_AUNE_LP 0x05 /* 16 bit ro Link Partner Ability Reg */
X #define PHY_NAT_AUNE_EXP 0x06 /* 16 bit ro Autonegotiation Expansion Reg */
@@ -692,16 +695,16 @@
X /***** PHY_BCOM_CTRL 16 bit r/w PHY Control Register *****/
X /***** PHY_LONE_CTRL 16 bit r/w PHY Control Register *****/
X #define PHY_CT_RESET (1<<15) /* Bit 15: (sc) clear all PHY releated regs */
-#define PHY_CT_LOOP (1<<14) /* Bit 14: enable Loopback over PHY */
+#define PHY_CT_LOOP (1<<14) /* Bit 14: enable Loopback over PHY */
X #define PHY_CT_SPS_LSB (1<<13) /* Bit 13: (BC,L1) Speed select, lower bit */
-#define PHY_CT_ANE (1<<12) /* Bit 12: Autonegotiation Enabled */
+#define PHY_CT_ANE (1<<12) /* Bit 12: Autonegotiation Enabled */
X #define PHY_CT_PDOWN (1<<11) /* Bit 11: (BC,L1) Power Down Mode */
-#define PHY_CT_ISOL (1<<10) /* Bit 10: (BC,L1) Isolate Mode */
+#define PHY_CT_ISOL (1<<10) /* Bit 10: (BC,L1) Isolate Mode */
X #define PHY_CT_RE_CFG (1<<9) /* Bit 9: (sc) Restart Autonegotiation */
X #define PHY_CT_DUP_MD (1<<8) /* Bit 8: Duplex Mode */
X #define PHY_CT_COL_TST (1<<7) /* Bit 7: (BC,L1) Collsion Test enabled */
X #define PHY_CT_SPS_MSB (1<<6) /* Bit 6: (BC,L1) Speed select, upper bit */
- /* Bit 5..0: reserved */
+ /* Bit 5..0: reserved */
X
X #define PHY_B_CT_SP1000 (1<<6) /* Bit 6: enable speed of 1000 MBit/s */
X #define PHY_B_CT_SP100 (1<<13) /* Bit 13: enable speed of 100 MBit/s */
@@ -715,10 +718,10 @@
X /***** PHY_XMAC_STAT 16 bit r/w PHY Status Register *****/
X /***** PHY_BCOM_STAT 16 bit r/w PHY Status Register *****/
X /***** PHY_LONE_STAT 16 bit r/w PHY Status Register *****/
- /* Bit 15..9: reserved */
+ /* Bit 15..9: reserved */
X /* (BC/L1) 100/10 MBit/s cap bits ignored*/
X #define PHY_ST_EXT_ST (1<<8) /* Bit 8: Extended Status Present */
- /* Bit 7: reserved */
+ /* Bit 7: reserved */
X #define PHY_ST_PRE_SUB (1<<6) /* Bit 6: (BC/L1) preamble suppression */
X #define PHY_ST_AN_OVER (1<<5) /* Bit 5: Autonegotiation Over */
X #define PHY_ST_REM_FLT (1<<4) /* Bit 4: Remode Fault Condition Occured*/
@@ -731,9 +734,9 @@
X /* PHY_XMAC_ID1 16 bit ro PHY ID1 Register */
X /* PHY_BCOM_ID1 16 bit ro PHY ID1 Register */
X /* PHY_LONE_ID1 16 bit ro PHY ID1 Register */
-#define PHY_I1_OUI (0x3f<<10) /* Bit 15..10: Organiz. Unique ID */
+#define PHY_I1_OUI (0x3f<<10) /* Bit 15..10: Organiz. Unique ID */
X #define PHY_I1_MOD_NUM (0x3f<<4) /* Bit 9.. 4: Model Number */
-#define PHY_I1_REV (0x0f<<0) /* Bit 3.. 0: Revision Number */
+#define PHY_I1_REV (0x0f<<0) /* Bit 3.. 0: Revision Number */
X
X
X /***** PHY_XMAC_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/
@@ -741,43 +744,43 @@
X #define PHY_AN_NXT_PG (1<<15) /* Bit 15: Request Next Page */
X #define PHY_X_AN_ACK (1<<14) /* Bit 14: (ro) Acknowledge Received */
X #define PHY_X_AN_RFB (3<<12) /* Bit 13..12: Remode Fault Bits */
- /* Bit 11.. 9: reserved */
+ /* Bit 11.. 9: reserved */
X #define PHY_X_AN_PAUSE (3<<7) /* Bit 8.. 7: Pause Bits */
-#define PHY_X_AN_HD (1<<6) /* Bit 6: Half Duplex */
-#define PHY_X_AN_FD (1<<5) /* Bit 5: Full Duplex */
- /* Bit 4.. 0: reserved */
+#define PHY_X_AN_HD (1<<6) /* Bit 6: Half Duplex */
+#define PHY_X_AN_FD (1<<5) /* Bit 5: Full Duplex */
+ /* Bit 4.. 0: reserved */
X
X /***** PHY_BCOM_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/
X /***** PHY_BCOM_AUNE_LP 16 bit ro Link Partner Ability Reg *****/
-/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
- /* Bit 14: reserved */
-#define PHY_B_AN_RF (1<<13) /* Bit 13: Remote Fault */
- /* Bit 12: reserved */
+/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
+ /* Bit 14: reserved */
+#define PHY_B_AN_RF (1<<13) /* Bit 13: Remote Fault */
+ /* Bit 12: reserved */
X #define PHY_B_AN_ASP (1<<11) /* Bit 11: Asymetric Pause */
-#define PHY_B_AN_PC (1<<10) /* Bit 10: Pause Capable */
- /* Bit 9..5: 100/10 BT cap bits ingnored */
+#define PHY_B_AN_PC (1<<10) /* Bit 10: Pause Capable */
+ /* Bit 9..5: 100/10 BT cap bits ingnored */
X #define PHY_B_AN_SEL (0x1f<<0)/* Bit 4..0: Selector Field, 00001=Ethernet*/
X
X /***** PHY_LONE_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/
X /***** PHY_LONE_AUNE_LP 16 bit ro Link Partner Ability Reg *****/
-/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
- /* Bit 14: reserved */
-#define PHY_L_AN_RF (1<<13) /* Bit 13: Remote Fault */
- /* Bit 12: reserved */
+/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
+ /* Bit 14: reserved */
+#define PHY_L_AN_RF (1<<13) /* Bit 13: Remote Fault */
+ /* Bit 12: reserved */
X #define PHY_L_AN_ASP (1<<11) /* Bit 11: Asymetric Pause */
-#define PHY_L_AN_PC (1<<10) /* Bit 10: Pause Capable */
- /* Bit 9..5: 100/10 BT cap bits ingnored */
+#define PHY_L_AN_PC (1<<10) /* Bit 10: Pause Capable */
+ /* Bit 9..5: 100/10 BT cap bits ingnored */
X #define PHY_L_AN_SEL (0x1f<<0)/* Bit 4..0: Selector Field, 00001=Ethernet*/
X
X /***** PHY_NAT_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/
X /***** PHY_NAT_AUNE_LP 16 bit ro Link Partner Ability Reg *****/
-/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
- /* Bit 14: reserved */
-#define PHY_N_AN_RF (1<<13) /* Bit 13: Remote Fault */
- /* Bit 12: reserved */
+/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
+ /* Bit 14: reserved */
+#define PHY_N_AN_RF (1<<13) /* Bit 13: Remote Fault */
+ /* Bit 12: reserved */
X #define PHY_N_AN_100F (1<<11) /* Bit 11: 100Base-T2 FD Support */
X #define PHY_N_AN_100H (1<<10) /* Bit 10: 100Base-T2 HD Support */
- /* Bit 9..5: 100/10 BT cap bits ingnored */
+ /* Bit 9..5: 100/10 BT cap bits ingnored */
X #define PHY_N_AN_SEL (0x1f<<0)/* Bit 4..0: Selector Field, 00001=Ethernet*/
X
X /* field type definition for PHY_x_AN_SEL */
@@ -788,22 +791,22 @@
X #define PHY_AN_LP_NP (1<<3) /* Bit 3: Link Partner can Next Page */
X #define PHY_AN_LOC_NP (1<<2) /* Bit 2: Local PHY can Next Page */
X #define PHY_AN_RX_PG (1<<1) /* Bit 1: Page Received */
- /* Bit 0: reserved */
+ /* Bit 0: reserved */
X
X /***** PHY_BCOM_AUNE_EXP 16 bit ro Autoneg Expansion Reg *****/
- /* Bit 15..5: reserved */
+ /* Bit 15..5: reserved */
X #define PHY_B_AN_PDF (1<<4) /* Bit 4: Parallel Detection Fault */
-/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
-/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
-/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */
+/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
+/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
+/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */
X #define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Autoneg Cap. */
X
X /***** PHY_LONE_AUNE_EXP 16 bit ro Autoneg Expansion Reg *****/
-#define PHY_L_AN_BP (1<<5) /* Bit 5: Base Page Indication */
+#define PHY_L_AN_BP (1<<5) /* Bit 5: Base Page Indication */
X #define PHY_L_AN_PDF (1<<4) /* Bit 4: Parallel Detection Fault */
-/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
-/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
-/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */
+/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
+/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
+/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */
X #define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Autoneg Cap. */
X
X
@@ -813,35 +816,35 @@
X /***** PHY_XMAC_NEPG_LP 16 bit ro Next Page Link Partner *****/
X /***** PHY_BCOM_NEPG_LP 16 bit ro Next Page Link Partner *****/
X /***** PHY_LONE_NEPG_LP 16 bit ro Next Page Link Partner *****/
-#define PHY_NP_MORE (1<<15) /* Bit 15: More, Next Pages to follow */
-#define PHY_NP_ACK1 (1<<14) /* Bit 14: (ro) Ack 1, for receiving a message*/
+#define PHY_NP_MORE (1<<15) /* Bit 15: More, Next Pages to follow */
+#define PHY_NP_ACK1 (1<<14) /* Bit 14: (ro) Ack 1, for receiving a message*/
X #define PHY_NP_MSG_VAL (1<<13) /* Bit 13: Message Page valid */
-#define PHY_NP_ACK2 (1<<12) /* Bit 12: Ack 2, comply with msg content*/
-#define PHY_NP_TOG (1<<11) /* Bit 11: Toggle Bit, ensure sync */
-#define PHY_NP_MSG 0x07ff /* Bit 10..0: Message from/to Link Partner */
+#define PHY_NP_ACK2 (1<<12) /* Bit 12: Ack 2, comply with msg content*/
+#define PHY_NP_TOG (1<<11) /* Bit 11: Toggle Bit, ensure sync */
+#define PHY_NP_MSG 0x07ff /* Bit 10..0: Message from/to Link Partner */
X
X /*
X * XMAC-Specific
X */
X /***** PHY_XMAC_EXT_STAT 16 bit r/w Extended Status Register *****/
-#define PHY_X_EX_FD (1<<15) /* Bit 15: Device Supports Full Duplex */
-#define PHY_X_EX_HD (1<<14) /* Bit 14: Device Supports Half Duplex */
- /* Bit 13..0: reserved */
+#define PHY_X_EX_FD (1<<15) /* Bit 15: Device Supports Full Duplex */
+#define PHY_X_EX_HD (1<<14) /* Bit 14: Device Supports Half Duplex */
+ /* Bit 13..0: reserved */
X
X /***** PHY_XMAC_RES_ABI 16 bit ro PHY Resolved Ability *****/
- /* Bit 15..9: reserved */
+ /* Bit 15..9: reserved */
X #define PHY_X_RS_PAUSE (3<<7) /* Bit 8..7: selected Pause Mode */
-#define PHY_X_RS_HD (1<<6) /* Bit 6: Half Duplex Mode selected */
-#define PHY_X_RS_FD (1<<5) /* Bit 5: Full Duplex Mode selected */
+#define PHY_X_RS_HD (1<<6) /* Bit 6: Half Duplex Mode selected */
+#define PHY_X_RS_FD (1<<5) /* Bit 5: Full Duplex Mode selected */
X #define PHY_X_RS_ABLMIS (1<<4) /* Bit 4: duplex or pause cap mismatch */
X #define PHY_X_RS_PAUMIS (1<<3) /* Bit 3: pause capability missmatch */
- /* Bit 2..0: reserved */
+ /* Bit 2..0: reserved */
X /*
X * Remote Fault Bits (PHY_X_AN_RFB) encoding
X */
-#define X_RFB_OK (0<<12) /* Bit 12..13 No errors, Link OK */
-#define X_RFB_LF (1<<12) /* Bit 12..13 Link Failure */
-#define X_RFB_OFF (2<<12) /* Bit 12..13 Offline */
+#define X_RFB_OK (0<<12) /* Bit 12..13 No errors, Link OK */
+#define X_RFB_LF (1<<12) /* Bit 12..13 Link Failure */
+#define X_RFB_OFF (2<<12) /* Bit 12..13 Offline */
X #define X_RFB_AN_ERR (3<<12) /* Bit 12..13 Autonegotiation Error */
X
X /*
@@ -863,7 +866,7 @@
X #define PHY_B_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */
X #define PHY_B_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
X #define PHY_B_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */
- /* Bit 7..0: reserved */
+ /* Bit 7..0: reserved */
X
X /***** PHY_BCOM_1000T_STAT 16 bit ro 1000Base-T Status Reg *****/
X #define PHY_B_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */
@@ -872,7 +875,7 @@
X #define PHY_B_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status */
X #define PHY_B_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */
X #define PHY_B_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */
- /* Bit 9..8: reserved */
+ /* Bit 9..8: reserved */
X #define PHY_B_1000S_IEC (255<<0)/* Bit 7..0: Idle Error Count */
X
X /***** PHY_BCOM_EXT_STAT 16 bit ro Extended Status Register *****/
@@ -880,7 +883,7 @@
X #define PHY_B_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */
X #define PHY_B_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */
X #define PHY_B_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */
- /* Bit 11..0: reserved */
+ /* Bit 11..0: reserved */
X
X /***** PHY_BCOM_P_EXT_CTRL 16 bit r/w PHY Extended Control Reg *****/
X #define PHY_B_PEC_MAC_PHY (1<<15) /* Bit 15: 10BIT/GMI-Interface */
@@ -889,36 +892,36 @@
X #define PHY_B_PEC_INT_DIS (1<<12) /* Bit 12: Interrupts Disabled */
X #define PHY_B_PEC_F_INT (1<<11) /* Bit 11: Force Interrupt */
X #define PHY_B_PEC_BY_45 (1<<10) /* Bit 10: Bypass 4B5B-Decoder */
-#define PHY_B_PEC_BY_SCR (1<<9) /* Bit 9: Bypass Scrambler */
-#define PHY_B_PEC_BY_MLT3 (1<<8) /* Bit 8: Bypass MLT3 Encoder */
-#define PHY_B_PEC_BY_RXA (1<<7) /* Bit 7: Bypass Rx Alignm. */
-#define PHY_B_PEC_RES_SCR (1<<6) /* Bit 6: Reset Scrambler */
-#define PHY_B_PEC_EN_LTR (1<<5) /* Bit 5: Ena LED Traffic Mode */
-#define PHY_B_PEC_LED_ON (1<<4) /* Bit 4: Force LED's on */
-#define PHY_B_PEC_LED_OFF (1<<3) /* Bit 3: Force LED's off */
-#define PHY_B_PEC_EX_IPG (1<<2) /* Bit 2: Extend Tx IPG Mode */
-#define PHY_B_PEC_3_LED (1<<1) /* Bit 1: Three Link LED mode */
-#define PHY_B_PEC_HIGH_LA (1<<0) /* Bit 0: GMII Fifo Elasticy */
+#define PHY_B_PEC_BY_SCR (1<<9) /* Bit 9: Bypass Scrambler */
+#define PHY_B_PEC_BY_MLT3 (1<<8) /* Bit 8: Bypass MLT3 Encoder */
+#define PHY_B_PEC_BY_RXA (1<<7) /* Bit 7: Bypass Rx Alignm. */
+#define PHY_B_PEC_RES_SCR (1<<6) /* Bit 6: Reset Scrambler */
+#define PHY_B_PEC_EN_LTR (1<<5) /* Bit 5: Ena LED Traffic Mode */
+#define PHY_B_PEC_LED_ON (1<<4) /* Bit 4: Force LED's on */
+#define PHY_B_PEC_LED_OFF (1<<3) /* Bit 3: Force LED's off */
+#define PHY_B_PEC_EX_IPG (1<<2) /* Bit 2: Extend Tx IPG Mode */
+#define PHY_B_PEC_3_LED (1<<1) /* Bit 1: Three Link LED mode */
+#define PHY_B_PEC_HIGH_LA (1<<0) /* Bit 0: GMII Fifo Elasticy */
X
X /***** PHY_BCOM_P_EXT_STAT 16 bit ro PHY Extended Status Reg *****/
- /* Bit 15..14: reserved */
+ /* Bit 15..14: reserved */
X #define PHY_B_PES_CROSS_STAT (1<<13) /* Bit 13: MDI Crossover Status */
X #define PHY_B_PES_INT_STAT (1<<12) /* Bit 12: Interrupt Status */
X #define PHY_B_PES_RRS (1<<11) /* Bit 11: Remote Receiver Stat. */
X #define PHY_B_PES_LRS (1<<10) /* Bit 10: Local Receiver Stat. */
-#define PHY_B_PES_LOCKED (1<<9) /* Bit 9: Locked */
-#define PHY_B_PES_LS (1<<8) /* Bit 8: Link Status */
-#define PHY_B_PES_RF (1<<7) /* Bit 7: Remote Fault */
-#define PHY_B_PES_CE_ER (1<<6) /* Bit 6: Carrier Ext Error */
-#define PHY_B_PES_BAD_SSD (1<<5) /* Bit 5: Bad SSD */
-#define PHY_B_PES_BAD_ESD (1<<4) /* Bit 4: Bad ESD */
-#define PHY_B_PES_RX_ER (1<<3) /* Bit 3: Receive Error */
-#define PHY_B_PES_TX_ER (1<<2) /* Bit 2: Transmit Error */
-#define PHY_B_PES_LOCK_ER (1<<1) /* Bit 1: Lock Error */
-#define PHY_B_PES_MLT3_ER (1<<0) /* Bit 0: MLT3 code Error */
+#define PHY_B_PES_LOCKED (1<<9) /* Bit 9: Locked */
+#define PHY_B_PES_LS (1<<8) /* Bit 8: Link Status */
+#define PHY_B_PES_RF (1<<7) /* Bit 7: Remote Fault */
+#define PHY_B_PES_CE_ER (1<<6) /* Bit 6: Carrier Ext Error */
+#define PHY_B_PES_BAD_SSD (1<<5) /* Bit 5: Bad SSD */
+#define PHY_B_PES_BAD_ESD (1<<4) /* Bit 4: Bad ESD */
+#define PHY_B_PES_RX_ER (1<<3) /* Bit 3: Receive Error */
+#define PHY_B_PES_TX_ER (1<<2) /* Bit 2: Transmit Error */
+#define PHY_B_PES_LOCK_ER (1<<1) /* Bit 1: Lock Error */
+#define PHY_B_PES_MLT3_ER (1<<0) /* Bit 0: MLT3 code Error */
X
X /***** PHY_BCOM_FC_CTR 16 bit r/w False Carrier Counter *****/
- /* Bit 15..8: reserved */
+ /* Bit 15..8: reserved */
X #define PHY_B_FC_CTR (255<<0)/* Bit 7..0: False Carrier Counter */
X
X /***** PHY_BCOM_RNO_CTR 16 bit r/w Receive NOT_OK Counter *****/
@@ -929,13 +932,15 @@
X #define PHY_B_AC_L_SQE (1<<15) /* Bit 15: Low Squelch */
X #define PHY_B_AC_LONG_PACK (1<<14) /* Bit 14: Rx Long Packets */
X #define PHY_B_AC_ER_CTRL (3<<12) /* Bit 13..12: Edgerate Control */
- /* Bit 11: reserved */
+ /* Bit 11: reserved */
X #define PHY_B_AC_TX_TST (1<<10) /* Bit 10: tx test bit, always 1 */
- /* Bit 9.. 8: reserved */
+ /* Bit 9.. 8: reserved */
X #define PHY_B_AC_DIS_PRF (1<<7) /* Bit 7: dis part resp filter */
- /* Bit 6.. 4: reserved */
+ /* Bit 6: reserved */
+#define PHY_B_AC_DIS_PM (1<<5) /* Bit 5: dis power management */
+ /* Bit 4: reserved */
X #define PHY_B_AC_DIAG (1<<3) /* Bit 3: Diagnostic Mode */
- /* Bit 2.. 0: reserved */
+ /* Bit 2.. 0: reserved */
X
X /***** PHY_BCOM_AUX_STAT 16 bit ro Auxiliary Status Reg *****/
X #define PHY_B_AS_AN_C (1<<15) /* Bit 15: AutoNeg complete */
@@ -944,37 +949,36 @@
X #define PHY_B_AS_ANAB_D (1<<12) /* Bit 12: AN Ability Detect */
X #define PHY_B_AS_NPW (1<<11) /* Bit 11: AN Next Page Wait */
X #define PHY_B_AS_AN_RES (7<<8) /* Bit 10..8: AN HDC */
-#define PHY_B_AS_PDF (1<<7) /* Bit 7: Parallel Detect. Fault*/
-#define PHY_B_AS_RF (1<<6) /* Bit 6: Remote Fault */
-#define PHY_B_AS_ANP_R (1<<5) /* Bit 5: AN Page Received */
-#define PHY_B_AS_LP_ANAB (1<<4) /* Bit 4: LP AN Ability */
-#define PHY_B_AS_LP_NPAB (1<<3) /* Bit 3: LP Next Page Ability */
-#define PHY_B_AS_LS (1<<2) /* Bit 2: Link Status */
-#define PHY_B_AS_PRR (1<<1) /* Bit 1: Pause Resolution-Rx */
-#define PHY_B_AS_PRT (1<<0) /* Bit 0: Pause Resolution-Tx */
+#define PHY_B_AS_PDF (1<<7) /* Bit 7: Parallel Detect. Fault*/
+#define PHY_B_AS_RF (1<<6) /* Bit 6: Remote Fault */
+#define PHY_B_AS_ANP_R (1<<5) /* Bit 5: AN Page Received */
+#define PHY_B_AS_LP_ANAB (1<<4) /* Bit 4: LP AN Ability */
+#define PHY_B_AS_LP_NPAB (1<<3) /* Bit 3: LP Next Page Ability */
+#define PHY_B_AS_LS (1<<2) /* Bit 2: Link Status */
+#define PHY_B_AS_PRR (1<<1) /* Bit 1: Pause Resolution-Rx */
+#define PHY_B_AS_PRT (1<<0) /* Bit 0: Pause Resolution-Tx */
X
X /***** PHY_BCOM_INT_STAT 16 bit ro Interrupt Status Reg *****/
X /***** PHY_BCOM_INT_MASK 16 bit r/w Interrupt Mask Reg *****/
- /* Bit 15: reserved */
+ /* Bit 15: reserved */
X #define PHY_B_IS_PSE (1<<14) /* Bit 14: Pair Swap Error */
X #define PHY_B_IS_MDXI_SC (1<<13) /* Bit 13: MDIX Status Change */
X #define PHY_B_IS_HCT (1<<12) /* Bit 12: counter above 32k */
-#define PHY_B_IS_LCT (1<<11) /* Bit 11: all counter below 128 */
+#define PHY_B_IS_LCT (1<<11) /* Bit 11: counter above 128 */
X #define PHY_B_IS_AN_PR (1<<10) /* Bit 10: Page Received */
-#define PHY_B_IS_NO_HDCL (1<<9) /* Bit 9: No HCD Link */
-#define PHY_B_IS_NO_HDC (1<<8) /* Bit 8: No HCD */
-#define PHY_B_IS_NEG_USHDC (1<<7) /* Bit 7: Negotiated Unsup. HCD */
-#define PHY_B_IS_SCR_S_ER (1<<6) /* Bit 6: Scrambler Sync Error */
-#define PHY_B_IS_RRS_CHANGE (1<<5) /* Bit 5: Remote Rx Stat Change */
-#define PHY_B_IS_LRS_CHANGE (1<<4) /* Bit 4: Local Rx Stat Change */
-#define PHY_B_IS_DUP_CHANGE (1<<3) /* Bit 3: Duplex Mode Change */
-#define PHY_B_IS_LSP_CHANGE (1<<2) /* Bit 2: Link Speed Change */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 28'
echo 'File patch-2.2.20 is continued in part 29'
echo "29" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:13 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part14

#!/bin/sh -x
# this is part 14 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 14; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X
X /*
X * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
@@ -3229,7 +3375,8 @@
X if (timeout)
X char_time = MIN(char_time, timeout);


X
- if ( info->params.mode == MGSL_MODE_HDLC ) {
+ if ( info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW ) {

X while (info->tx_active) {
X set_current_state(TASK_INTERRUPTIBLE);
X schedule_timeout(char_time);
@@ -3587,7 +3734,8 @@
X if (info->serial_signals & SerialSignal_RI)
X strcat(stat_buf, "|RI");
X
- if (info->params.mode == MGSL_MODE_HDLC) {


+ if (info->params.mode == MGSL_MODE_HDLC ||

+ info->params.mode == MGSL_MODE_RAW ) {
X ret += sprintf(buf+ret, " HDLC txok:%d rxok:%d",
X info->icount.txok, info->icount.rxok);
X if (info->icount.txunder)
@@ -3728,28 +3876,27 @@
X *
X * This leaves 62 4K pages.
X *
- * The next N pages are used for a transmit frame. We
- * reserve enough 4K page blocks to hold the configured
- * MaxFrameSize
+ * The next N pages are used for transmit frame(s). We
+ * reserve enough 4K page blocks to hold the required
+ * number of transmit dma buffers (num_tx_dma_buffers),
+ * each of MaxFrameSize size.
X *
X * Of the remaining pages (62-N), determine how many can
X * be used to receive full MaxFrameSize inbound frames
X */
-
- info->tx_buffer_count = BuffersPerFrame;
+ info->tx_buffer_count = info->num_tx_dma_buffers * BuffersPerFrame;
X info->rx_buffer_count = 62 - info->tx_buffer_count;
X } else {
X /* Calculate the number of PAGE_SIZE buffers needed for */
X /* receive and transmit DMA buffers. */
X
-
X /* Calculate the number of DMA buffers necessary to */
X /* hold 7 max size receive frames and one max size transmit frame. */
X /* The receive buffer count is bumped by one so we avoid an */
X /* End of List condition if all receive buffers are used when */
X /* using linked list DMA buffers. */
X
- info->tx_buffer_count = BuffersPerFrame;
+ info->tx_buffer_count = info->num_tx_dma_buffers * BuffersPerFrame;
X info->rx_buffer_count = (BuffersPerFrame * MAXRXFRAMES) + 6;
X
X /*
@@ -3769,12 +3916,14 @@
X if ( mgsl_alloc_buffer_list_memory( info ) < 0 ||
X mgsl_alloc_frame_memory(info, info->rx_buffer_list, info->rx_buffer_count) < 0 ||
X mgsl_alloc_frame_memory(info, info->tx_buffer_list, info->tx_buffer_count) < 0 ||
- mgsl_alloc_intermediate_rxbuffer_memory(info) < 0 ) {
+ mgsl_alloc_intermediate_rxbuffer_memory(info) < 0 ||
+ mgsl_alloc_intermediate_txbuffer_memory(info) < 0 ) {
X printk("%s(%d):Can't allocate DMA buffer memory\n",__FILE__,__LINE__);


X return -ENOMEM;
X }
X

X mgsl_reset_rx_dma_buffers( info );
+ mgsl_reset_tx_dma_buffers( info );


X
X return 0;
X

@@ -4030,6 +4179,149 @@
X
X } /* end of mgsl_free_intermediate_rxbuffer_memory() */
X
+/*
+ * mgsl_alloc_intermediate_txbuffer_memory()
+ *
+ * Allocate intermdiate transmit buffer(s) large enough to hold max_frame_size.
+ * This buffer is used to load transmit frames into the adapter's dma transfer
+ * buffers when there is sufficient space.


+ *
+ * Arguments:

+ *
+ * info pointer to device instance data
+ *
+ * Return Value: 0 if success, otherwise -ENOMEM
+ */
+int mgsl_alloc_intermediate_txbuffer_memory(struct mgsl_struct *info)
+{
+ int i;
+
+ if ( debug_level >= DEBUG_LEVEL_INFO )
+ printk("%s %s(%d) allocating %d tx holding buffers\n",
+ info->device_name, __FILE__,__LINE__,info->num_tx_holding_buffers);
+
+ memset(info->tx_holding_buffers,0,sizeof(info->tx_holding_buffers));
+
+ for ( i=0; i<info->num_tx_holding_buffers; ++i) {
+ info->tx_holding_buffers[i].buffer =
+ kmalloc(info->max_frame_size, GFP_KERNEL);
+ if ( info->tx_holding_buffers[i].buffer == NULL )
+ return -ENOMEM;


+ }
+
+ return 0;
+

+} /* end of mgsl_alloc_intermediate_txbuffer_memory() */
+
+/*
+ * mgsl_free_intermediate_txbuffer_memory()
+ *
+ *
+ * Arguments:
+ *
+ * info pointer to device instance data


+ *
+ * Return Value: None
+ */

+void mgsl_free_intermediate_txbuffer_memory(struct mgsl_struct *info)


+{
+ int i;
+

+ for ( i=0; i<info->num_tx_holding_buffers; ++i ) {
+ if ( info->tx_holding_buffers[i].buffer ) {
+ kfree(info->tx_holding_buffers[i].buffer);
+ info->tx_holding_buffers[i].buffer=NULL;
+ }
+ }
+
+ info->get_tx_holding_index = 0;
+ info->put_tx_holding_index = 0;
+ info->tx_holding_count = 0;
+
+} /* end of mgsl_free_intermediate_txbuffer_memory() */
+
+
+/*
+ * load_next_tx_holding_buffer()
+ *
+ * attempts to load the next buffered tx request into the
+ * tx dma buffers


+ *
+ * Arguments:

+ *
+ * info pointer to device instance data
+ *
+ * Return Value: 1 if next buffered tx request loaded
+ * into adapter's tx dma buffer,
+ * 0 otherwise
+ */
+int load_next_tx_holding_buffer(struct mgsl_struct *info)
+{
+ int ret = 0;
+
+ if ( info->tx_holding_count ) {
+ /* determine if we have enough tx dma buffers
+ * to accomodate the next tx frame
+ */
+ struct tx_holding_buffer *ptx =
+ &info->tx_holding_buffers[info->get_tx_holding_index];
+ int num_free = num_free_tx_dma_buffers(info);
+ int num_needed = ptx->buffer_size / DMABUFFERSIZE;
+ if ( ptx->buffer_size % DMABUFFERSIZE )
+ ++num_needed;
+
+ if (num_needed <= num_free) {
+ info->xmit_cnt = ptx->buffer_size;
+ mgsl_load_tx_dma_buffer(info,ptx->buffer,ptx->buffer_size);
+
+ --info->tx_holding_count;
+ if ( ++info->get_tx_holding_index >= info->num_tx_holding_buffers)
+ info->get_tx_holding_index=0;
+
+ /* restart transmit timer */
+ del_timer(&info->tx_timer);
+ info->tx_timer.expires = jiffies + jiffies_from_ms(5000);
+ add_timer(&info->tx_timer);
+
+ ret = 1;
+ }
+ }
+


+ return ret;
+}
+

+/*
+ * save_tx_buffer_request()
+ *
+ * attempt to store transmit frame request for later transmission


+ *
+ * Arguments:

+ *
+ * info pointer to device instance data
+ * Buffer pointer to buffer containing frame to load
+ * BufferSize size in bytes of frame in Buffer
+ *
+ * Return Value: 1 if able to store, 0 otherwise
+ */


+int save_tx_buffer_request(struct mgsl_struct *info,const char *Buffer, unsigned int BufferSize)

+{
+ struct tx_holding_buffer *ptx;
+
+ if ( info->tx_holding_count >= info->num_tx_holding_buffers ) {
+ return 0; /* all buffers in use */
+ }
+
+ ptx = &info->tx_holding_buffers[info->put_tx_holding_index];
+ ptx->buffer_size = BufferSize;
+ memcpy( ptx->buffer, Buffer, BufferSize);
+
+ ++info->tx_holding_count;
+ if ( ++info->put_tx_holding_index >= info->num_tx_holding_buffers)
+ info->put_tx_holding_index=0;


+
+ return 1;
+}
+

X int mgsl_claim_resources(struct mgsl_struct *info)
X {
X /* claim 16C32 I/O base address */
@@ -4123,6 +4415,7 @@
X }
X mgsl_free_dma_buffers(info);
X mgsl_free_intermediate_rxbuffer_memory(info);
+ mgsl_free_intermediate_txbuffer_memory(info);
X
X if ( info->io_addr_requested ) {
X release_region(info->io_base,info->io_addr_size);
@@ -4163,6 +4456,21 @@
X if (maxframe[info->line])
X info->max_frame_size = maxframe[info->line];
X info->dosyncppp = dosyncppp[info->line];
+
+ if (txdmabufs[info->line]) {
+ info->num_tx_dma_buffers = txdmabufs[info->line];
+ if (info->num_tx_dma_buffers < 1)
+ info->num_tx_dma_buffers = 1;
+ }
+
+ if (txholdbufs[info->line]) {
+ info->num_tx_holding_buffers = txholdbufs[info->line];
+ if (info->num_tx_holding_buffers < 1)
+ info->num_tx_holding_buffers = 1;
+ else if (info->num_tx_holding_buffers > MAX_TX_HOLDING_BUFFERS)
+ info->num_tx_holding_buffers = MAX_TX_HOLDING_BUFFERS;
+ }
+
X }
X
X mgsl_device_count++;
@@ -4182,18 +4490,20 @@
X info->max_frame_size = 65535;
X
X if ( info->bus_type == MGSL_BUS_TYPE_PCI ) {
- printk( "SyncLink device %s added:PCI bus IO=%04X IRQ=%d Mem=%08X LCR=%08X MaxFrameSize=%u\n",
+ printk( "SyncLink device %s:PCI IO=%04X IRQ=%d Mem=%08X LCR=%08X MaxFrameSize=%u\n",
X info->device_name, info->io_base, info->irq_level,
X info->phys_memory_base, info->phys_lcr_base,
X info->max_frame_size );
X } else {
- printk( "SyncLink device %s added:ISA bus IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n",
+ printk( "SyncLink device %s:ISA IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n",
X info->device_name, info->io_base, info->irq_level, info->dma_level,
X info->max_frame_size );
X }
X
X #ifdef CONFIG_SYNCLINK_SYNCPPP
+#ifdef MODULE
X if (info->dosyncppp)
+#endif
X mgsl_sppp_init(info);
X #endif
X } /* end of mgsl_add_device() */
@@ -4231,6 +4541,8 @@
X spin_lock_init(&info->netlock);
X memcpy(&info->params,&default_params,sizeof(MGSL_PARAMS));
X info->idle_mode = HDLC_TXIDLE_FLAGS;
+ info->num_tx_dma_buffers = 1;
+ info->num_tx_holding_buffers = 0;
X }
X
X return info;
@@ -4355,7 +4667,7 @@
X
X EXPORT_NO_SYMBOLS;
X
- printk("%s version %s\n", driver_name, driver_version);
+ printk("%s %s\n", driver_name, driver_version);
X
X /* determine how many SyncLink devices are installed */
X mgsl_enumerate_devices();
@@ -4423,7 +4735,7 @@
X printk("%s(%d):Couldn't register callout driver\n",
X __FILE__,__LINE__);
X
- printk("%s version %s, tty major#%d callout major#%d\n",
+ printk("%s %s, tty major#%d callout major#%d\n",
X driver_name, driver_version,
X serial_driver.major, callout_driver.major);
X
@@ -4440,6 +4752,7 @@
X
X } /* end of mgsl_init() */
X
+#ifdef MODULE
X int __init init_module(void)
X {
X /* Uncomment this to kernel debug module.
@@ -4459,6 +4772,7 @@
X unsigned long flags;
X int rc;
X struct mgsl_struct *info;
+ struct mgsl_struct *tmp;
X
X printk("Unloading %s: version %s\n", driver_name, driver_version);
X save_flags(flags);
@@ -4478,7 +4792,9 @@
X mgsl_sppp_delete(info);
X #endif
X mgsl_release_resources(info);
+ tmp = info;
X info = info->next_device;
+ kfree(tmp);
X }
X
X if (tmp_buf) {
@@ -4487,6 +4803,7 @@
X }
X
X } /* end of cleanup_module() */
+#endif
X
X /*
X * usc_RTCmd()
@@ -4714,7 +5031,27 @@
X *
X * 0000 0110 0000 0110 = 0x0606
X */
+ if (info->params.mode == MGSL_MODE_RAW) {
+ RegValue = 0x0001; /* Set Receive mode = external sync */
X
+ usc_OutReg( info, IOCR, /* Set IOCR DCD is RxSync Detect Input */
+ (unsigned short)((usc_InReg(info, IOCR) & ~(BIT13|BIT12)) | BIT12));
+
+ /*
+ * TxSubMode:
+ * CMR <15> 0 Don't send CRC on Tx Underrun
+ * CMR <14> x undefined
+ * CMR <13> 0 Send preamble before openning sync
+ * CMR <12> 0 Send 8-bit syncs, 1=send Syncs per TxLength
+ *
+ * TxMode:
+ * CMR <11-8) 0100 MonoSync
+ *
+ * 0x00 0100 xxxx xxxx 04xx
+ */
+ RegValue |= 0x0400;
+ }
+ else {
X RegValue = 0x0606;
X
X if ( info->params.flags & HDLC_FLAG_UNDERRUN_ABORT15 )
@@ -4723,12 +5060,14 @@
X RegValue |= BIT15;
X else if ( info->params.flags & HDLC_FLAG_UNDERRUN_CRC )
X RegValue |= BIT15 + BIT14;
+ }
X
X if ( info->params.preamble != HDLC_PREAMBLE_PATTERN_NONE )
X RegValue |= BIT13;
X }
X
- if ( info->params.flags & HDLC_FLAG_SHARE_ZERO )
+ if ( info->params.mode == MGSL_MODE_HDLC &&
+ (info->params.flags & HDLC_FLAG_SHARE_ZERO) )
X RegValue |= BIT12;
X
X if ( info->params.addr_filter != 0xff )
@@ -4768,9 +5107,9 @@
X case HDLC_ENCODING_DIFF_BIPHASE_LEVEL: RegValue |= BIT15 + BIT14 + BIT13; break;
X }
X
- if ( info->params.crc_type == HDLC_CRC_16_CCITT )
+ if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_16_CCITT )
X RegValue |= BIT9;
- else if ( info->params.crc_type == HDLC_CRC_32_CCITT )
+ else if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_32_CCITT )
X RegValue |= ( BIT12 | BIT10 | BIT9 );
X
X usc_OutReg( info, RMR, RegValue );
@@ -4845,9 +5184,9 @@
X case HDLC_ENCODING_DIFF_BIPHASE_LEVEL: RegValue |= BIT15 + BIT14 + BIT13; break;
X }
X
- if ( info->params.crc_type == HDLC_CRC_16_CCITT )
+ if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_16_CCITT )
X RegValue |= BIT9 + BIT8;
- else if ( info->params.crc_type == HDLC_CRC_32_CCITT )
+ else if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_32_CCITT )
X RegValue |= ( BIT12 | BIT10 | BIT9 | BIT8);
X
X usc_OutReg( info, TMR, RegValue );
@@ -5518,7 +5857,8 @@
X usc_OutReg( info, CCSR, (u16)(usc_InReg(info,CCSR) | BIT13) );
X usc_RTCmd( info, RTCmd_PurgeRxFifo );


X
- if ( info->params.mode == MGSL_MODE_HDLC ) {
+ if ( info->params.mode == MGSL_MODE_HDLC ||
+ info->params.mode == MGSL_MODE_RAW ) {

X /* DMA mode Transfers */
X /* Program the DMA controller. */
X /* Enable the DMA controller end of buffer interrupt. */
@@ -5607,9 +5947,14 @@
X
X /* Transmit DMA buffer is loaded, so program USC */
X /* to send the frame contained in the buffers. */
+ FrameSize = info->tx_buffer_list[info->start_tx_dma_buffer].rcc;
X
-
- FrameSize = info->tx_buffer_list[0].rcc;
+ /* if operating in Raw sync mode, reset the rcc component
+ * of the tx dma buffer entry, otherwise, the serial controller
+ * will send a closing sync char after this count.
+ */
+ if ( info->params.mode == MGSL_MODE_RAW )
+ info->tx_buffer_list[info->start_tx_dma_buffer].rcc = 0;
X
X /* Program the Transmit Character Length Register (TCLR) */
X /* and clear FIFO (TCC is loaded with TCLR on FIFO clear) */
@@ -5618,7 +5963,7 @@
X usc_RTCmd( info, RTCmd_PurgeTxFifo );
X
X /* Program the address of the 1st DMA Buffer Entry in linked list */
- phys_addr = info->tx_buffer_list[0].phys_entry;
+ phys_addr = info->tx_buffer_list[info->start_tx_dma_buffer].phys_entry;
X usc_OutDmaReg( info, NTARL, (u16)phys_addr );
X usc_OutDmaReg( info, NTARU, (u16)(phys_addr >> 16) );
X
@@ -5626,6 +5971,19 @@
X usc_ClearIrqPendingBits( info, TRANSMIT_STATUS );
X usc_EnableInterrupts( info, TRANSMIT_STATUS );
X
+ if ( info->params.mode == MGSL_MODE_RAW &&
+ info->num_tx_dma_buffers > 1 ) {
+ /* When running external sync mode, attempt to 'stream' transmit */
+ /* by filling tx dma buffers as they become available. To do this */
+ /* we need to enable Tx DMA EOB Status interrupts : */
+ /* */
+ /* 1. Arm End of Buffer (EOB) Transmit DMA Interrupt (BIT2 of TDIAR) */
+ /* 2. Enable Transmit DMA Interrupts (BIT0 of DICR) */
+
+ usc_OutDmaReg( info, TDIAR, BIT2|BIT3 );
+ usc_OutDmaReg( info, DICR, (u16)(usc_InDmaReg(info,DICR) | BIT0) );
+ }
+
X /* Initialize Transmit DMA Channel */
X usc_DmaCmd( info, DmaCmd_InitTxChannel );


X
@@ -6049,6 +6407,9 @@

X void usc_loopback_frame( struct mgsl_struct *info )
X {
X int i;
+ unsigned long oldmode = info->params.mode;
+
+ info->params.mode = MGSL_MODE_HDLC;
X
X usc_DisableMasterIrqBit( info );
X
@@ -6102,6 +6463,8 @@
X
X usc_EnableMasterIrqBit(info);
X
+ info->params.mode = oldmode;
+
X } /* end of usc_loopback_frame() */
X
X /* usc_set_sync_mode() Programs the USC for SDLC communications.
@@ -6153,6 +6516,38 @@
X info->tcsr_value += usc_idle_mode;
X usc_OutReg(info, TCSR, info->tcsr_value);
X
+ /*
+ * if SyncLink WAN adapter is running in external sync mode, the
+ * transmitter has been set to Monosync in order to try to mimic
+ * a true raw outbound bit stream. Monosync still sends an open/close
+ * sync char at the start/end of a frame. Try to match those sync
+ * patterns to the idle mode set here
+ */
+ if ( info->params.mode == MGSL_MODE_RAW ) {
+ unsigned char syncpat = 0;
+ switch( info->idle_mode ) {
+ case HDLC_TXIDLE_FLAGS:
+ syncpat = 0x7e;
+ break;
+ case HDLC_TXIDLE_ALT_ZEROS_ONES:
+ syncpat = 0x55;
+ break;
+ case HDLC_TXIDLE_ZEROS:
+ case HDLC_TXIDLE_SPACE:
+ syncpat = 0x00;
+ break;
+ case HDLC_TXIDLE_ONES:
+ case HDLC_TXIDLE_MARK:
+ syncpat = 0xff;
+ break;
+ case HDLC_TXIDLE_ALT_MARK_SPACE:
+ syncpat = 0xaa;
+ break;
+ }
+
+ usc_SetTransmitSyncChars(info,syncpat,syncpat);
+ }
+
X } /* end of usc_set_txidle() */
X
X /* usc_get_serial_signals()
@@ -6330,6 +6725,48 @@
X */
X
X /*
+ * mgsl_reset_tx_dma_buffers()
+ *
+ * Set the count for all transmit buffers to 0 to indicate the
+ * buffer is available for use and set the current buffer to the
+ * first buffer. This effectively makes all buffers free and
+ * discards any data in buffers.


+ *
+ * Arguments: info pointer to device instance data
+ * Return Value: None
+ */

+void mgsl_reset_tx_dma_buffers( struct mgsl_struct *info )

+{


+ unsigned int i;
+

+ for ( i = 0; i < info->tx_buffer_count; i++ ) {
+ *((unsigned long *)&(info->tx_buffer_list[i].count)) = 0;
+ }
+
+ info->current_tx_buffer = 0;
+ info->start_tx_dma_buffer = 0;
+ info->tx_dma_buffers_used = 0;
+
+ info->get_tx_holding_index = 0;
+ info->put_tx_holding_index = 0;
+ info->tx_holding_count = 0;
+
+} /* end of mgsl_reset_tx_dma_buffers() */
+
+/*
+ * num_free_tx_dma_buffers()
+ *
+ * returns the number of free tx dma buffers available


+ *
+ * Arguments: info pointer to device instance data

+ * Return Value: number of free tx dma buffers
+ */
+int num_free_tx_dma_buffers(struct mgsl_struct *info)
+{
+ return info->tx_buffer_count - info->tx_dma_buffers_used;
+}
+
+/*
X * mgsl_reset_rx_dma_buffers()
X *
X * Set the count for all receive buffers to DMABUFFERSIZE
@@ -6415,10 +6852,11 @@
X unsigned int StartIndex, EndIndex; /* index of 1st and last buffers of Rx frame */
X unsigned short status;
X DMABUFFERENTRY *pBufEntry;
- unsigned int framesize;
+ unsigned int framesize = 0;
X int ReturnCode = 0;
X unsigned long flags;
X struct tty_struct *tty = info->tty;
+ int return_frame = 0;
X
X /*
X * current_rx_buffer points to the 1st buffer of the next available
@@ -6474,14 +6912,20 @@
X info->icount.rxabort++;
X else if ( status & RXSTATUS_OVERRUN )
X info->icount.rxover++;
- else
+ else {
X info->icount.rxcrc++;
+ if ( info->params.crc_type & HDLC_CRC_RETURN_EX )
+ return_frame = 1;
+ }
X framesize = 0;
X #ifdef CONFIG_SYNCLINK_SYNCPPP
X info->netstats.rx_errors++;
X info->netstats.rx_frame_errors++;
X #endif
- } else {
+ } else
+ return_frame = 1;
+
+ if ( return_frame ) {
X /* receive frame has no errors, get frame size.
X * The frame size is the starting value of the RCC (which was
X * set to 0xffff) minus the ending value of the RCC (decremented
@@ -6506,7 +6950,9 @@
X MIN(framesize,DMABUFFERSIZE),0);
X
X if (framesize) {
- if (framesize > info->max_frame_size)
+ if ( ( (info->params.crc_type & HDLC_CRC_RETURN_EX) &&
+ ((framesize+1) > info->max_frame_size) ) ||
+ (framesize > info->max_frame_size) )
X info->icount.rxlong++;
X else {
X /* copy dma buffer(s) to contiguous intermediate buffer */
@@ -6514,6 +6960,7 @@
X int index = StartIndex;
X unsigned char *ptmp = info->intermediate_rxbuffer;
X
+ if ( !(status & RXSTATUS_CRC_ERROR))
X info->icount.rxok++;
X
X while(copy_count) {
@@ -6532,6 +6979,19 @@
X index = 0;
X }
X
+ if ( info->params.crc_type & HDLC_CRC_RETURN_EX ) {
+ ++framesize;
+ *ptmp = (status & RXSTATUS_CRC_ERROR ?
+ RX_CRC_ERROR :
+ RX_OK);
+
+ if ( debug_level >= DEBUG_LEVEL_DATA )
+ printk("%s(%d):mgsl_get_rx_frame(%s) rx frame status=%d\n",
+ __FILE__,__LINE__,info->device_name,
+ *ptmp);
+ }
+
+
X #ifdef CONFIG_SYNCLINK_SYNCPPP
X if (info->netcount) {
X /* pass frame to syncppp device */
@@ -6541,6 +7001,7 @@
X #endif
X {
X /* Call the line discipline receive callback directly. */
+ if ( tty && tty->ldisc.receive_buf )
X tty->ldisc.receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize);
X }
X }
@@ -6570,6 +7031,180 @@
X
X } /* end of mgsl_get_rx_frame() */
X
+/* mgsl_get_raw_rx_frame()
+ *
+ * This function attempts to return a received frame from the
+ * receive DMA buffers when running in external loop mode. In this mode,
+ * we will return at most one DMABUFFERSIZE frame to the application.
+ * The USC receiver is triggering off of DCD going active to start a new
+ * frame, and DCD going inactive to terminate the frame (similar to
+ * processing a closing flag character).
+ *
+ * In this routine, we will return DMABUFFERSIZE "chunks" at a time.
+ * If DCD goes inactive, the last Rx DMA Buffer will have a non-zero
+ * status field and the RCC field will indicate the length of the
+ * entire received frame. We take this RCC field and get the modulus
+ * of RCC and DMABUFFERSIZE to determine if number of bytes in the
+ * last Rx DMA buffer and return that last portion of the frame.
+ *
+ * Arguments: info pointer to device extension
+ * Return Value: 1 if frame returned, otherwise 0
+ */
+int mgsl_get_raw_rx_frame(struct mgsl_struct *info)
+{
+ unsigned int CurrentIndex, NextIndex;
+ unsigned short status;
+ DMABUFFERENTRY *pBufEntry;
+ unsigned int framesize = 0;
+ int ReturnCode = 0;
+ unsigned long flags;
+ struct tty_struct *tty = info->tty;
+
+ /*
+ * current_rx_buffer points to the 1st buffer of the next available
+ * receive frame. The status field is set by the 16C32 after
+ * completing a receive frame. If the status field of this buffer
+ * is zero, either the USC is still filling this buffer or this
+ * is one of a series of buffers making up a received frame.
+ *
+ * If the count field of this buffer is zero, the USC is either
+ * using this buffer or has used this buffer. Look at the count
+ * field of the next buffer. If that next buffer's count is
+ * non-zero, the USC is still actively using the current buffer.
+ * Otherwise, if the next buffer's count field is zero, the
+ * current buffer is complete and the USC is using the next
+ * buffer.
+ */
+ CurrentIndex = NextIndex = info->current_rx_buffer;
+ ++NextIndex;
+ if ( NextIndex == info->rx_buffer_count )
+ NextIndex = 0;
+
+ if ( info->rx_buffer_list[CurrentIndex].status != 0 ||
+ (info->rx_buffer_list[CurrentIndex].count == 0 &&
+ info->rx_buffer_list[NextIndex].count == 0)) {
+ /*
+ * Either the status field of this dma buffer is non-zero
+ * (indicating the last buffer of a receive frame) or the next
+ * buffer is marked as in use -- implying this buffer is complete
+ * and an intermediate buffer for this received frame.
+ */
+
+ status = info->rx_buffer_list[CurrentIndex].status;
+
+ if ( status & (RXSTATUS_SHORT_FRAME + RXSTATUS_OVERRUN +
+ RXSTATUS_CRC_ERROR + RXSTATUS_ABORT) ) {
+ if ( status & RXSTATUS_SHORT_FRAME )
+ info->icount.rxshort++;
+ else if ( status & RXSTATUS_ABORT )
+ info->icount.rxabort++;
+ else if ( status & RXSTATUS_OVERRUN )
+ info->icount.rxover++;
+ else
+ info->icount.rxcrc++;
+ framesize = 0;
+ } else {
+ /*
+ * A receive frame is available, get frame size and status.
+ *
+ * The frame size is the starting value of the RCC (which was
+ * set to 0xffff) minus the ending value of the RCC (decremented
+ * once for each receive character) minus 2 or 4 for the 16-bit
+ * or 32-bit CRC.
+ *
+ * If the status field is zero, this is an intermediate buffer.
+ * It's size is 4K.
+ *
+ * If the DMA Buffer Entry's Status field is non-zero, the
+ * receive operation completed normally (ie: DCD dropped). The
+ * RCC field is valid and holds the received frame size.
+ * It is possible that the RCC field will be zero on a DMA buffer
+ * entry with a non-zero status. This can occur if the total
+ * frame size (number of bytes between the time DCD goes active
+ * to the time DCD goes inactive) exceeds 65535 bytes. In this
+ * case the 16C32 has underrun on the RCC count and appears to
+ * stop updating this counter to let us know the actual received
+ * frame size. If this happens (non-zero status and zero RCC),
+ * simply return the entire RxDMA Buffer
+ */
+ if ( status ) {
+ /*
+ * In the event that the final RxDMA Buffer is
+ * terminated with a non-zero status and the RCC
+ * field is zero, we interpret this as the RCC
+ * having underflowed (received frame > 65535 bytes).
+ *
+ * Signal the event to the user by passing back
+ * a status of RxStatus_CrcError returning the full
+ * buffer and let the app figure out what data is
+ * actually valid
+ */
+ if ( info->rx_buffer_list[CurrentIndex].rcc )
+ framesize = RCLRVALUE - info->rx_buffer_list[CurrentIndex].rcc;
+ else
+ framesize = DMABUFFERSIZE;
+ }
+ else
+ framesize = DMABUFFERSIZE;
+ }
+
+ if ( framesize > DMABUFFERSIZE ) {
+ /*
+ * if running in raw sync mode, ISR handler for
+ * End Of Buffer events terminates all buffers at 4K.
+ * If this frame size is said to be >4K, get the
+ * actual number of bytes of the frame in this buffer.
+ */
+ framesize = framesize % DMABUFFERSIZE;
+ }
+
+
+ if ( debug_level >= DEBUG_LEVEL_BH )
+ printk("%s(%d):mgsl_get_raw_rx_frame(%s) status=%04X size=%d\n",
+ __FILE__,__LINE__,info->device_name,status,framesize);
+
+ if ( debug_level >= DEBUG_LEVEL_DATA )
+ mgsl_trace_block(info,info->rx_buffer_list[CurrentIndex].virt_addr,
+ MIN(framesize,DMABUFFERSIZE),0);
+
+ if (framesize) {
+ /* copy dma buffer(s) to contiguous intermediate buffer */
+ /* NOTE: we never copy more than DMABUFFERSIZE bytes */
+
+ pBufEntry = &(info->rx_buffer_list[CurrentIndex]);
+ memcpy( info->intermediate_rxbuffer, pBufEntry->virt_addr, framesize);
+ info->icount.rxok++;
+
+ /* Call the line discipline receive callback directly. */
+ if ( tty && tty->ldisc.receive_buf )
+ tty->ldisc.receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize);
+ }
+
+ /* Free the buffers used by this frame. */
+ mgsl_free_rx_frame_buffers( info, CurrentIndex, CurrentIndex );
+
+ ReturnCode = 1;
+ }
+
+
+ if ( info->rx_enabled && info->rx_overflow ) {
+ /* The receiver needs to restarted because of
+ * a receive overflow (buffer or FIFO). If the
+ * receive buffers are now empty, then restart receiver.
+ */
+
+ if ( !info->rx_buffer_list[CurrentIndex].status &&
+ info->rx_buffer_list[CurrentIndex].count ) {
+ spin_lock_irqsave(&info->irq_spinlock,flags);
+ usc_start_receiver(info);


+ spin_unlock_irqrestore(&info->irq_spinlock,flags);
+ }
+ }

+
+ return ReturnCode;
+
+} /* end of mgsl_get_raw_rx_frame() */
+
X /* mgsl_load_tx_dma_buffer()
X *
X * Load the transmit DMA buffer with the specified data.
@@ -6599,12 +7234,19 @@
X info->cmr_value |= BIT13;
X }
X
+ /* begin loading the frame in the next available tx dma
+ * buffer, remember it's starting location for setting
+ * up tx dma operation
+ */
+ i = info->current_tx_buffer;
+ info->start_tx_dma_buffer = i;
+
X /* Setup the status and RCC (Frame Size) fields of the 1st */
X /* buffer entry in the transmit DMA buffer list. */
X
- info->tx_buffer_list[0].status = info->cmr_value & 0xf000;
- info->tx_buffer_list[0].rcc = BufferSize;
- info->tx_buffer_list[0].count = BufferSize;
+ info->tx_buffer_list[i].status = info->cmr_value & 0xf000;
+ info->tx_buffer_list[i].rcc = BufferSize;
+ info->tx_buffer_list[i].count = BufferSize;
X
X /* Copy frame data from 1st source buffer to the DMA buffers. */
X /* The frame data may span multiple DMA buffers. */
@@ -6613,6 +7255,9 @@
X /* Get a pointer to next DMA buffer entry. */
X pBufEntry = &info->tx_buffer_list[i++];
X
+ if ( i == info->tx_buffer_count )
+ i=0;
+
X /* Calculate the number of bytes that can be copied from */
X /* the source buffer to this DMA buffer. */
X if ( BufferSize > DMABUFFERSIZE )
@@ -6632,8 +7277,13 @@
X /* Advance source pointer and reduce remaining data count. */
X Buffer += Copycount;
X BufferSize -= Copycount;
+
+ ++info->tx_dma_buffers_used;
X }
X
+ /* remember next available tx dma buffer */
+ info->current_tx_buffer = i;
+
X } /* end of mgsl_load_tx_dma_buffer() */
X
X /*
@@ -6764,7 +7414,7 @@
X unsigned int i;
X char *TmpPtr;
X BOOLEAN rc = TRUE;
- unsigned short status;
+ unsigned short status=0;
X unsigned long EndTime;
X unsigned long flags;
X MGSL_PARAMS tmp_params;
@@ -7021,7 +7671,7 @@
X status = info->rx_buffer_list[0].status;
X
X if ( status & (BIT8 + BIT3 + BIT1) ) {
- /* receive error has occured */
+ /* receive error has occurred */
X rc = FALSE;
X } else {
X if ( memcmp( info->tx_buffer_list[0].virt_addr ,
@@ -7242,7 +7892,9 @@
X if ( debug_level >= DEBUG_LEVEL_INFO )
X printk( "%s(%d):mgsl_tx_timeout(%s)\n",
X __FILE__,__LINE__,info->device_name);
- if(info->tx_active && info->params.mode == MGSL_MODE_HDLC) {
+ if(info->tx_active &&


+ (info->params.mode == MGSL_MODE_HDLC ||

+ info->params.mode == MGSL_MODE_RAW) ) {
X info->icount.txtimeout++;
X }
X spin_lock_irqsave(&info->irq_spinlock,flags);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/toshiba.c linux/drivers/char/toshiba.c
--- v2.2.19/drivers/char/toshiba.c Sun Mar 25 18:45:19 2001
+++ linux/drivers/char/toshiba.c Wed Oct 10 01:40:48 2001
@@ -60,10 +60,8 @@
X #define TOSH_VERSION "1.9 22/3/2001"
X #define TOSH_DEBUG 0
X
-#ifdef MODULE
X #include<linux/module.h>
X #include<linux/version.h>
-#endif
X #include<linux/kernel.h>
X #include<linux/sched.h>
X #include<linux/types.h>
@@ -78,7 +76,7 @@
X #include<linux/proc_fs.h>
X #endif
X
-#include"toshiba.h"
+#include <linux/toshiba.h>
X
X #define TOSH_MINOR_DEV 181
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- v2.2.19/drivers/char/tty_io.c Sun Mar 25 17:31:24 2001
+++ linux/drivers/char/tty_io.c Wed Oct 10 01:40:48 2001
@@ -2244,5 +2244,11 @@
X #ifdef CONFIG_VT
X vcs_init();
X #endif
+#ifdef CONFIG_SYNCLINK
+ mgsl_init();
+#endif
+#ifdef CONFIG_N_HDLC
+ n_hdlc_init();
+#endif
X return 0;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/wdt.c linux/drivers/char/wdt.c
--- v2.2.19/drivers/char/wdt.c Sun Mar 25 17:31:25 2001
+++ linux/drivers/char/wdt.c Wed Oct 10 01:40:48 2001
@@ -228,7 +228,7 @@


X switch(cmd)
X {
X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
X case WDIOC_GETSUPPORT:

X return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/char/wdt_pci.c linux/drivers/char/wdt_pci.c
--- v2.2.19/drivers/char/wdt_pci.c Sun Mar 25 17:31:29 2001
+++ linux/drivers/char/wdt_pci.c Wed Oct 10 01:40:48 2001
@@ -149,7 +149,7 @@
X *
X * Handle an interrupt from the board. These are raised when the status
X * map changes in what the board considers an interesting way. That means
- * a failure condition occuring.
+ * a failure condition occurring.
X */
X
X static void wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs)
@@ -295,7 +295,7 @@


X switch(cmd)
X {
X default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
X case WDIOC_GETSUPPORT:

X return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/i2o/i2o_scsi.c linux/drivers/i2o/i2o_scsi.c
--- v2.2.19/drivers/i2o/i2o_scsi.c Sun Mar 25 17:31:44 2001
+++ linux/drivers/i2o/i2o_scsi.c Wed Oct 10 01:40:48 2001
@@ -266,7 +266,7 @@
X
X if(st)
X {
- /* An error has occured */
+ /* An error has occurred */
X
X dprintk((KERN_DEBUG "SCSI error %08X", m[4]));
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/Config.in linux/drivers/isdn/Config.in
--- v2.2.19/drivers/isdn/Config.in Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/Config.in Wed Oct 10 01:40:48 2001
@@ -71,8 +71,8 @@
X bool ' Gazel cards' CONFIG_HISAX_GAZEL
X bool ' HFC PCI-Bus cards' CONFIG_HISAX_HFC_PCI
X bool ' Winbond W6692 based cards' CONFIG_HISAX_W6692
+ bool ' HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
X if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
- bool ' HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
X # bool ' TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
X if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
X bool ' Am7930' CONFIG_HISAX_AMD7930
@@ -94,7 +94,7 @@
X bool 'Eicon active card support' CONFIG_ISDN_DRV_EICON
X if [ "$CONFIG_ISDN_DRV_EICON" != "n" ]; then
X if [ "$CONFIG_ISDN_DRV_EICON_OLD" != "y" ]; then
- dep_tristate ' Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS $CONFIG_ISDN
+ dep_tristate ' Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS $CONFIG_ISDN $CONFIG_PCI
X fi
X if [ "$CONFIG_ISDN_DRV_EICON_DIVAS" != "y" ]; then
X dep_tristate ' Legacy Eicon driver' CONFIG_ISDN_DRV_EICON_OLD $CONFIG_ISDN
@@ -132,7 +132,7 @@
X dep_tristate ' AVM T1/T1-B ISA support' CONFIG_ISDN_DRV_AVMB1_T1ISA $CONFIG_ISDN_CAPI
X dep_tristate ' AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_ISDN_CAPI $CONFIG_PCMCIA
X dep_tristate ' AVM T1/T1-B PCI support' CONFIG_ISDN_DRV_AVMB1_T1PCI $CONFIG_ISDN_CAPI $CONFIG_PCI
- dep_tristate ' AVM C4 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI
+ dep_tristate ' AVM C4/C2 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI
X fi
X
X # HYSDN
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/act2000/act2000.h linux/drivers/isdn/act2000/act2000.h
--- v2.2.19/drivers/isdn/act2000/act2000.h Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/act2000/act2000.h Wed Oct 10 01:40:48 2001
@@ -1,4 +1,4 @@
-/* $Id: act2000.h,v 1.8.6.1 2001/02/10 14:41:20 kai Exp $
+/* $Id: act2000.h,v 1.8.6.2 2001/02/16 16:43:23 kai Exp $
X *
X * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
X *
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/act2000/capi.c linux/drivers/isdn/act2000/capi.c
--- v2.2.19/drivers/isdn/act2000/capi.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/act2000/capi.c Wed Oct 10 01:40:48 2001
@@ -1,4 +1,4 @@
-/* $Id: capi.c,v 1.9 2000/11/12 16:32:06 kai Exp $
+/* $Id: capi.c,v 1.9.6.1 2001/02/16 16:43:23 kai Exp $
X *
X * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
X * CAPI encoder/decoder
@@ -124,7 +124,7 @@
X m->hdr.cmd.cmd = c; \
X m->hdr.cmd.subcmd = s; \
X m->hdr.msgnum = actcapi_nextsmsg(card); \
- } \
+ } else m = NULL;\
X }
X
X #define ACTCAPI_CHKSKB if (!skb) { \
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/act2000/capi.h linux/drivers/isdn/act2000/capi.h
--- v2.2.19/drivers/isdn/act2000/capi.h Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/act2000/capi.h Wed Oct 10 01:40:48 2001
@@ -1,4 +1,4 @@
-/* $Id: capi.h,v 1.6 2000/11/12 16:32:06 kai Exp $
+/* $Id: capi.h,v 1.6.6.1 2001/02/16 16:43:23 kai Exp $
X *
X * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
X *
@@ -44,7 +44,7 @@
X char *description;
X } actcapi_msgdsc;
X
-/* CAPI Adress */
+/* CAPI Address */
X typedef struct actcapi_addr {
X __u8 len; /* Length of element */
X __u8 tnp; /* Type/Numbering Plan */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/avmcard.h linux/drivers/isdn/avmb1/avmcard.h
--- v2.2.19/drivers/isdn/avmb1/avmcard.h Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/avmcard.h Wed Oct 10 01:40:49 2001
@@ -1,57 +1,8 @@
X /*
- * $Id: avmcard.h,v 1.8 2000/10/10 17:44:19 kai Exp $
+ * $Id: avmcard.h,v 1.8.6.3 2001/05/17 21:15:33 kai Exp $
X *
X * Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: avmcard.h,v $
- * Revision 1.8 2000/10/10 17:44:19 kai
- * changes from/for 2.2.18
- *
- * Revision 1.7 2000/01/25 14:33:38 calle
- * - Added Support AVM B1 PCI V4.0 (tested with prototype)
- * - splitted up t1pci.c into b1dma.c for common function with b1pciv4
- * - support for revision register
- *
- * Revision 1.6 1999/11/05 16:38:01 calle
- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *
- * Revision 1.5 1999/09/07 09:02:53 calle
- * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
- * DATA_B3_IND is always directly after the CAPI message. The "Data" member
- * ist never used inside the kernel.
- *
- * Revision 1.4 1999/08/04 10:10:08 calle
- * Bugfix: corrected /proc functions, added structure for new AVM cards.
- *
- * Revision 1.3 1999/07/23 08:41:47 calle
- * prepared for new AVM cards.
- *
- * Revision 1.2 1999/07/05 15:09:45 calle
- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *
- * Revision 1.1 1999/07/01 15:26:22 calle
- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *
X */
X
X #ifndef _AVMCARD_H_
@@ -59,7 +10,6 @@
X
X #define AVMB1_PORTLEN 0x1f
X #define AVM_MAXVERSION 8
-#define AVM_NAPPS 30
X #define AVM_NCCI_PER_CHANNEL 4
X
X /*
@@ -83,7 +33,8 @@
X avm_m2,
X avm_t1isa,
X avm_t1pci,
- avm_c4
+ avm_c4,
+ avm_c2
X };
X
X typedef struct avmcard_dmainfo {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/b1.c linux/drivers/isdn/avmb1/b1.c
--- v2.2.19/drivers/isdn/avmb1/b1.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/b1.c Wed Oct 10 01:40:49 2001
@@ -1,105 +1,9 @@
X /*
- * $Id: b1.c,v 1.20.6.1 2001/02/13 11:43:29 kai Exp $
+ * $Id: b1.c,v 1.20.6.6 2001/05/17 21:15:33 kai Exp $
X *
X * Common module for AVM B1 cards.
X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
- *
- * $Log: b1.c,v $
- * Revision 1.20.6.1 2001/02/13 11:43:29 kai
- * more compatility changes for 2.2.19
- *
- * Revision 1.20 2000/11/23 20:45:14 kai
- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *
- * Revision 1.19 2000/11/19 17:02:47 kai
- * compatibility cleanup - part 3
- *
- * Revision 1.18 2000/11/19 17:01:53 kai
- * compatibility cleanup - part 2
- *
- * Revision 1.17 2000/11/01 14:05:02 calle
- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *
- * Revision 1.16 2000/08/04 15:36:31 calle
- * copied wrong from file to file :-(
- *
- * Revision 1.15 2000/08/04 12:20:08 calle
- * - Fix unsigned/signed warning in the right way ...
- *
- * Revision 1.14 2000/06/19 16:51:53 keil
- * don't free skb in irq context
- *
- * Revision 1.13 2000/01/25 14:33:38 calle
- * - Added Support AVM B1 PCI V4.0 (tested with prototype)
- * - splitted up t1pci.c into b1dma.c for common function with b1pciv4
- * - support for revision register
- *
- * Revision 1.12 1999/11/05 16:38:01 calle
- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *
- * Revision 1.11 1999/10/11 22:04:12 keil
- * COMPAT_NEED_UACCESS (no include in isdn_compat.h)
- *
- * Revision 1.10 1999/09/15 08:16:03 calle
- * Implementation of 64Bit extention complete.
- *
- * Revision 1.9 1999/09/07 09:02:53 calle
- * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
- * DATA_B3_IND is always directly after the CAPI message. The "Data" member
- * ist never used inside the kernel.
- *
- * Revision 1.8 1999/08/22 20:26:22 calle
- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- * define in isdn_compat.h for older kernel versions.
- *
- * Revision 1.7 1999/08/04 10:10:09 calle
- * Bugfix: corrected /proc functions, added structure for new AVM cards.
- *
- * Revision 1.6 1999/07/23 08:51:04 calle
- * small fix and typo in checkin before.
- *
- * Revision 1.5 1999/07/23 08:41:48 calle
- * prepared for new AVM cards.
- *
- * Revision 1.4 1999/07/09 15:05:38 keil
- * compat.h is now isdn_compat.h
- *
- * Revision 1.3 1999/07/06 07:41:59 calle
- * - changes in /proc interface
- * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb.
- *
- * Revision 1.2 1999/07/05 15:09:47 calle
- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *
- * Revision 1.1 1999/07/01 15:26:23 calle
- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *


X *
X */
X

@@ -111,15 +15,18 @@
X #include <linux/interrupt.h>
X #include <linux/ioport.h>
X #include <linux/capi.h>
+#include <linux/kernelcapi.h>
X #include <asm/io.h>
X #include <linux/init.h>
+#include <linux/isdn_compat.h>
X #include <asm/uaccess.h>
+#include <linux/netdevice.h>
X #include "capilli.h"
X #include "avmcard.h"
X #include "capicmd.h"
X #include "capiutil.h"
X
-static char *revision = "$Revision: 1.20.6.1 $";
+static char *revision = "$Revision: 1.20.6.6 $";
X
X /* ------------------------------------------------------------- */
X
@@ -364,7 +271,7 @@
X cli();
X b1_setinterrupt(port, card->irq, card->cardtype);
X b1_put_byte(port, SEND_INIT);
- b1_put_word(port, AVM_NAPPS);
+ b1_put_word(port, CAPI_MAXAPPL);
X b1_put_word(port, AVM_NCCI_PER_CHANNEL*2);
X b1_put_word(port, ctrl->cnr - 1);
X restore_flags(flags);
@@ -679,6 +586,7 @@
X case avm_t1isa: s = "T1 ISA (HEMA)"; break;
X case avm_t1pci: s = "T1 PCI"; break;
X case avm_c4: s = "C4"; break;
+ case avm_c2: s = "C2"; break;
X default: s = "???"; break;
X }
X len += sprintf(page+len, "%-16s %s\n", "type", s);
@@ -749,12 +657,13 @@
X static int __init b1_init(void)
X {
X char *p;
- char rev[10];
+ char rev[32];
X
- if ((p = strchr(revision, ':'))) {
- strncpy(rev, p + 1, sizeof(rev));
- p = strchr(rev, '$');
- *p = 0;
+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(rev, p + 2, sizeof(rev));
+ rev[sizeof(rev)-1] = 0;
+ if ((p = strchr(rev, '$')) != 0 && p > rev)
+ *(p-1) = 0;
X } else
X strcpy(rev, "1.0");
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/b1dma.c linux/drivers/isdn/avmb1/b1dma.c
--- v2.2.19/drivers/isdn/avmb1/b1dma.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/b1dma.c Wed Oct 10 01:40:49 2001
@@ -1,50 +1,10 @@
X /*
- * $Id: b1dma.c,v 1.11.6.1 2001/02/13 11:43:29 kai Exp $
+ * $Id: b1dma.c,v 1.11.6.7 2001/07/18 16:02:15 kai Exp $
X *
X * Common module for AVM B1 cards that support dma with AMCC
X *
X * (c) Copyright 2000 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: b1dma.c,v $
- * Revision 1.11.6.1 2001/02/13 11:43:29 kai
- * more compatility changes for 2.2.19
- *
- * Revision 1.11 2000/11/19 17:02:47 kai
- * compatibility cleanup - part 3
- *
- * Revision 1.10 2000/11/19 17:01:53 kai
- * compatibility cleanup - part 2
- *
- * Revision 1.9 2000/11/01 14:05:02 calle
- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *
- * Revision 1.8 2000/10/10 17:44:19 kai
- * changes from/for 2.2.18
- *
- * Revision 1.7 2000/08/04 12:20:08 calle
- * - Fix unsigned/signed warning in the right way ...
- *
- * Revision 1.6 2000/06/29 13:59:06 calle
- * Bugfix: reinit txdma without interrupt will confuse some AMCC chips.
- *
- * Revision 1.5 2000/06/19 16:51:53 keil
- * don't free skb in irq context
- *
- * Revision 1.4 2000/04/03 16:38:05 calle
- * made suppress_pollack static.
- *
- * Revision 1.3 2000/02/26 01:00:53 keil
- * changes from 2.3.47
- *
- * Revision 1.2 2000/01/25 14:44:47 calle
- * typo in b1pciv4_detect().
- *
- * Revision 1.1 2000/01/25 14:36:43 calle
- * common function for T1 PCI and B1 PCI V4.
- *
- *
X */
X
X #include <linux/config.h>
@@ -56,15 +16,22 @@
X #include <linux/interrupt.h>
X #include <linux/ioport.h>
X #include <linux/capi.h>
+#include <linux/kernelcapi.h>
X #include <asm/io.h>
X #include <linux/init.h>
+#include <linux/isdn_compat.h>
X #include <asm/uaccess.h>
+#include <linux/netdevice.h>
X #include "capilli.h"
X #include "avmcard.h"
X #include "capicmd.h"
X #include "capiutil.h"
X
-static char *revision = "$Revision: 1.11.6.1 $";
+#if BITS_PER_LONG != 32
+#error FIXME: driver requires 32-bit platform
+#endif
+
+static char *revision = "$Revision: 1.11.6.7 $";
X
X /* ------------------------------------------------------------- */
X
@@ -721,7 +688,7 @@
X _put_byte(&p, 0);
X _put_byte(&p, 0);
X _put_byte(&p, SEND_INIT);
- _put_word(&p, AVM_NAPPS);
+ _put_word(&p, CAPI_MAXAPPL);
X _put_word(&p, AVM_NCCI_PER_CHANNEL*30);
X _put_word(&p, card->cardnr - 1);
X skb_put(skb, (__u8 *)p - (__u8 *)skb->data);
@@ -900,6 +867,7 @@
X case avm_t1isa: s = "T1 ISA (HEMA)"; break;
X case avm_t1pci: s = "T1 PCI"; break;
X case avm_c4: s = "C4"; break;
+ case avm_c2: s = "C2"; break;
X default: s = "???"; break;
X }
X len += sprintf(page+len, "%-16s %s\n", "type", s);
@@ -990,12 +958,13 @@
X int b1dma_init(void)
X {
X char *p;
- char rev[10];
+ char rev[32];
X
- if ((p = strchr(revision, ':'))) {
- strncpy(rev, p + 1, sizeof(rev));
- p = strchr(rev, '$');
- *p = 0;
+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(rev, p + 2, sizeof(rev));
+ rev[sizeof(rev)-1] = 0;
+ if ((p = strchr(rev, '$')) != 0 && p > rev)
+ *(p-1) = 0;
X } else
X strcpy(rev, "1.0");
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/b1isa.c linux/drivers/isdn/avmb1/b1isa.c
--- v2.2.19/drivers/isdn/avmb1/b1isa.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/b1isa.c Wed Oct 10 01:40:49 2001
@@ -1,74 +1,10 @@
X /*
- * $Id: b1isa.c,v 1.10.6.1 2001/02/13 11:43:29 kai Exp $
+ * $Id: b1isa.c,v 1.10.6.5 2001/05/17 20:41:51 kai Exp $
X *
X * Module for AVM B1 ISA-card.
X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: b1isa.c,v $
- * Revision 1.10.6.1 2001/02/13 11:43:29 kai
- * more compatility changes for 2.2.19
- *
- * Revision 1.10 2000/11/23 20:45:14 kai
- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *
- * Revision 1.9 2000/11/01 14:05:02 calle
- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *
- * Revision 1.8 2000/04/03 13:29:24 calle
- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *
- * Revision 1.7 2000/02/02 18:36:03 calle
- * - Modules are now locked while init_module is running
- * - fixed problem with memory mapping if address is not aligned
- *
- * Revision 1.6 2000/01/25 14:37:39 calle
- * new message after successfull detection including card revision and
- * used resources.
- *
- * Revision 1.5 1999/11/05 16:38:01 calle
- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *
- * Revision 1.4 1999/08/22 20:26:24 calle
- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- * define in isdn_compat.h for older kernel versions.
- *
- * Revision 1.3 1999/07/09 15:05:40 keil
- * compat.h is now isdn_compat.h
- *
- * Revision 1.2 1999/07/05 15:09:49 calle
- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *
- * Revision 1.1 1999/07/01 15:26:27 calle
- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *
- *
X */
X
X #include <linux/module.h>
@@ -81,12 +17,13 @@
X #include <linux/capi.h>
X #include <linux/init.h>
X #include <asm/io.h>
+#include <linux/isdn_compat.h>
X #include "capicmd.h"
X #include "capiutil.h"
X #include "capilli.h"
X #include "avmcard.h"
X
-static char *revision = "$Revision: 1.10.6.1 $";
+static char *revision = "$Revision: 1.10.6.5 $";
X
X /* ------------------------------------------------------------- */
X
@@ -281,11 +218,12 @@
X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {
- strncpy(driver->revision, p + 1, sizeof(driver->revision));
- p = strchr(driver->revision, '$');
- *p = 0;
- }
+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(driver->revision, p + 2, sizeof(driver->revision));
+ driver->revision[sizeof(driver->revision)-1] = 0;
+ if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision)
+ *(p-1) = 0;
+ }
X
X printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/b1pci.c linux/drivers/isdn/avmb1/b1pci.c
--- v2.2.19/drivers/isdn/avmb1/b1pci.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/b1pci.c Wed Oct 10 01:40:49 2001
@@ -1,105 +1,10 @@
X /*
- * $Id: b1pci.c,v 1.29.6.1 2000/11/28 12:02:45 kai Exp $
+ * $Id: b1pci.c,v 1.29.6.4 2001/05/17 20:41:51 kai Exp $
X *
X * Module for AVM B1 PCI-card.
X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: b1pci.c,v $
- * Revision 1.29.6.1 2000/11/28 12:02:45 kai
- * MODULE_DEVICE_TABLE for 2.4
- *
- * Revision 1.29.2.2 2000/11/26 17:47:53 kai
- * added PCI_DEV_TABLE for 2.4
- *
- * Revision 1.29.2.1 2000/11/26 17:14:19 kai
- * fix device ids
- * also needs patches to include/linux/pci_ids.h
- *
- * Revision 1.29 2000/11/23 20:45:14 kai
- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *
- * Revision 1.28 2000/11/01 14:05:02 calle
- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *
- * Revision 1.27 2000/08/08 09:24:19 calle
- * calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI
- *
- * Revision 1.26 2000/07/20 10:21:21 calle
- * Bugfix: driver will not be unregistered, if not cards were detected.
- * this result in an oops in kcapi.c
- *
- * Revision 1.25 2000/05/29 12:29:18 keil
- * make pci_enable_dev compatible to 2.2 kernel versions
- *
- * Revision 1.24 2000/05/19 15:43:22 calle
- * added calls to pci_device_start().
- *
- * Revision 1.23 2000/05/06 00:52:36 kai
- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *
- * Revision 1.22 2000/04/21 13:01:33 calle
- * Revision in b1pciv4 driver was missing.
- *
- * Revision 1.21 2000/04/03 13:29:24 calle
- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *
- * Revision 1.20 2000/02/02 18:36:03 calle
- * - Modules are now locked while init_module is running
- * - fixed problem with memory mapping if address is not aligned
- *
- * Revision 1.19 2000/01/25 14:33:38 calle
- * - Added Support AVM B1 PCI V4.0 (tested with prototype)
- * - splitted up t1pci.c into b1dma.c for common function with b1pciv4
- * - support for revision register
- *
- * Revision 1.18 1999/11/05 16:38:01 calle
- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *
- * Revision 1.17 1999/10/05 06:50:07 calle
- * Forgot SA_SHIRQ as argument to request_irq.
- *
- * Revision 1.16 1999/08/11 21:01:07 keil
- * new PCI codefix
- *
- * Revision 1.15 1999/08/10 16:02:27 calle
- * struct pci_dev changed in 2.3.13. Made the necessary changes.
- *
- * Revision 1.14 1999/07/09 15:05:41 keil
- * compat.h is now isdn_compat.h
- *
- * Revision 1.13 1999/07/05 15:09:50 calle
- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *
- * Revision 1.12 1999/07/01 15:26:29 calle
- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *
- *
X */
X
X #include <linux/config.h>
@@ -120,7 +25,7 @@
X #include "capilli.h"
X #include "avmcard.h"
X
-static char *revision = "$Revision: 1.29.6.1 $";
+static char *revision = "$Revision: 1.29.6.4 $";
X
X /* ------------------------------------------------------------- */
X
@@ -319,7 +224,7 @@
X
X div4->detach_ctr(ctrl);
X free_irq(card->irq, card);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X release_region(card->port, AVMB1_PORTLEN);
X ctrl->driverdata = 0;
X kfree(card->ctrlinfo);
@@ -350,7 +255,6 @@
X
X static int b1pciv4_add_card(struct capi_driver *driver, struct capicardparams *p)
X {
- unsigned long base, page_offset;
X avmcard *card;
X avmctrl_info *cinfo;
X int retval;
@@ -401,12 +305,8 @@
X return -EBUSY;
X }
X
- base = card->membase & PAGE_MASK;
- page_offset = card->membase - base;
- card->mbase = ioremap_nocache(base, page_offset + 64);
- if (card->mbase) {
- card->mbase += page_offset;
- } else {
+ card->mbase = ioremap_nocache(card->membase, 64);
+ if (!card->mbase) {
X printk(KERN_NOTICE "%s: can't remap memory at 0x%lx\n",
X driver->name, card->membase);
X kfree(card->ctrlinfo);
@@ -421,7 +321,7 @@
X if ((retval = b1pciv4_detect(card)) != 0) {
X printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n",
X driver->name, card->port, retval);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X kfree(card->ctrlinfo);
X kfree(card->dma);
X kfree(card);
@@ -437,7 +337,7 @@
X if (retval) {
X printk(KERN_ERR "%s: unable to get IRQ %d.\n",
X driver->name, card->irq);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X release_region(card->port, AVMB1_PORTLEN);
X kfree(card->ctrlinfo);
X kfree(card->dma);
@@ -449,7 +349,7 @@
X cinfo->capi_ctrl = div4->attach_ctr(driver, card->name, cinfo);
X if (!cinfo->capi_ctrl) {
X printk(KERN_ERR "%s: attach controller failed.\n", driver->name);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 14'
echo 'File patch-2.2.20 is continued in part 15'
echo "15" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:03 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part04

#!/bin/sh -x
# this is part 04 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 04; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+3) Calls other normal functions
+4) Has automatics.
+
+GOT-pointer:
+This is a pointer to the global-offset-table in ELF
+( Executable Linkable Format, Linux'es most common executable format ),
+all globals & shared library objects are found using this pointer.
+
+lazy-binding
+ELF shared libraries are typically only loaded when routines in the shared
+library are actually first called at runtime. This is lazy binding.
+
+procedure-linkage-table
+This is a table found from the GOT which contains pointers to routines
+in other shared libraries which can't be called to by easier means.
+
+prologue:
+The code generated by the compiler to set up the stack frame.
+
+outgoing-args:
+This is extra area allocated on the stack of the calling function if the
+parameters for the callee's cannot all be put in registers, the same
+area can be reused by each function the caller calls.
+
+routine-descriptor:
+A COFF executable format based concept of a procedure reference
+actually being 8 bytes or more as opposed to a simple pointer to the routine.
+This is typically defined as follows
+Routine Descriptor offset 0=Pointer to Function
+Routine Descriptor offset 4=Pointer to Table of Contents
+The table of contents/TOC is roughly equivalent to a GOT pointer.
+& it means that shared libraries etc. can be shared between several
+environments each with their own TOC.
+
+
+static-chain: This is used in nested functions a concept adopted from pascal
+by gcc not used in ansi C or C++ ( although quite useful ), basically it
+is a pointer used to reference local variables of enclosing functions.
+You might come across this stuff once or twice in your lifetime.
+
+e.g.
+The function below should return 11 though gcc may get upset & toss warnings
+about unused variables.
+int FunctionA(int a)
+{
+ int b;
+ FunctionC(int c)
+ {
+ b=c+1;
+ }
+ FunctionC(10);
+ return(b);
+}
+
+
+s/390 & z/Architecture Register usage
+=====================================
+r0 used by syscalls/assembly call-clobbered
+r1 used by syscalls/assembly call-clobbered
+r2 argument 0 / return value 0 call-clobbered
+r3 argument 1 / return value 1 (if long long) call-clobbered
+r4 argument 2 call-clobbered
+r5 argument 3 call-clobbered
+r6 argument 5 saved
+r7 pointer-to arguments 5 to ... saved
+r8 this & that saved
+r9 this & that saved
+r10 static-chain ( if nested function ) saved
+r11 frame-pointer ( if function used alloca ) saved
+r12 got-pointer saved
+r13 base-pointer saved
+r14 return-address saved
+r15 stack-pointer saved
+
+f0 argument 0 / return value ( float/double ) call-clobbered
+f2 argument 1 call-clobbered
+f4 z/Architecture argument 2 saved
+f6 z/Architecture argument 3 saved
+The remaining floating points
+f1,f3,f5 f7-f15 are call-clobbered.
+
+Notes:
+------
+1) The only requirement is that registers which are used
+by the callee are saved, e.g. the compiler is perfectly
+capible of using r11 for purposes other than a frame a
+frame pointer if a frame pointer is not needed.
+2) In functions with variable arguments e.g. printf the calling procedure
+is identical to one without variable arguments & the same number of
+parameters. However, the prologue of this function is somewhat more
+hairy owing to it having to move these parameters to the stack to
+get va_start, va_arg & va_end to work.
+3) Access registers are currently unused by gcc but are used in
+the kernel. Possibilities exist to use them at the moment for
+temporary storage but it isn't recommended.
+4) Only 4 of the floating point registers are used for
+parameter passing as older machines such as G3 only have only 4
+& it keeps the stack frame compatible with other compilers.
+However with IEEE floating point emulation under linux on the
+older machines you are free to use the other 12.
+5) A long long or double parameter cannot be have the
+first 4 bytes in a register & the second four bytes in the
+outgoing args area. It must be purely in the outgoing args
+area if crossing this boundary.
+6) Floating point parameters are mixed with outgoing args
+on the outgoing args area in the order the are passed in as parameters.


+7) Floating point arguments 2 & 3 are saved in the outgoing args area for

+z/Architecture
+
+
+Stack Frame Layout
+------------------
+s/390 z/Architecture


+0 0 back chain ( a 0 here signifies end of back chain )
+4 8 eos ( end of stack, not used on Linux for S390 used in other linkage formats )
+8 16 glue used in other s/390 linkage formats for saved routine descriptors etc.
+12 24 glue used in other s/390 linkage formats for saved routine descriptors etc.
+16 32 scratch area
+20 40 scratch area
+24 48 saved r6 of caller function
+28 56 saved r7 of caller function
+32 64 saved r8 of caller function
+36 72 saved r9 of caller function
+40 80 saved r10 of caller function
+44 88 saved r11 of caller function
+48 96 saved r12 of caller function
+52 104 saved r13 of caller function
+56 112 saved r14 of caller function
+60 120 saved r15 of caller function
+64 128 saved f4 of caller function
+72 132 saved f6 of caller function
+80 undefined
+96 160 outgoing args passed from caller to callee
+96+x 160+x possible stack alignment ( 8 bytes desirable )
+96+x+y 160+x+y alloca space of caller ( if used )
+96+x+y+z 160+x+y+z automatics of caller ( if used )
+0 back-chain

+
+A sample program with comments.
+===============================
+
+Comments on the function test
+-----------------------------
+1) It didn't need to set up a pointer to the constant pool gpr13 as it isn't used
+( :-( ).
+2) This is a frameless function & no stack is bought.
+3) The compiler was clever enough to recognise that it could return the
+value in r2 as well as use it for the passed in parameter ( :-) ).
+4) The basr ( branch relative & save ) trick works as follows the instruction
+has a special case with r0,r0 with some instruction operands is understood as
+the literal value 0, some risc architectures also do this ). So now
+we are branching to the next address & the address new program counter is
+in r13,so now we subtract the size of the function prologue we have executed
++ the size of the literal pool to get to the top of the literal pool
+0040037c int test(int b)
+{ # Function prologue below
+ 40037c: 90 de f0 34 stm %r13,%r14,52(%r15) # Save registers r13 & r14
+ 400380: 0d d0 basr %r13,%r0 # Set up pointer to constant pool using
+ 400382: a7 da ff fa ahi %r13,-6 # basr trick
+ return(5+b);
+ # Huge main program
+ 400386: a7 2a 00 05 ahi %r2,5 # add 5 to r2
+
+ # Function epilogue below
+ 40038a: 98 de f0 34 lm %r13,%r14,52(%r15) # restore registers r13 & 14
+ 40038e: 07 fe br %r14 # return
+}
+
+Comments on the function main
+-----------------------------
+1) The compiler did this function optimally ( 8-) )
+
+Literal pool for main.
+400390: ff ff ff ec .long 0xffffffec
+main(int argc,char *argv[])
+{ # Function prologue below
+ 400394: 90 bf f0 2c stm %r11,%r15,44(%r15) # Save necessary registers
+ 400398: 18 0f lr %r0,%r15 # copy stack pointer to r0
+ 40039a: a7 fa ff a0 ahi %r15,-96 # Make area for callee saving
+ 40039e: 0d d0 basr %r13,%r0 # Set up r13 to point to
+ 4003a0: a7 da ff f0 ahi %r13,-16 # literal pool
+ 4003a4: 50 00 f0 00 st %r0,0(%r15) # Save backchain
+
+ return(test(5)); # Main Program Below
+ 4003a8: 58 e0 d0 00 l %r14,0(%r13) # load relative address of test from
+ # literal pool
+ 4003ac: a7 28 00 05 lhi %r2,5 # Set first parameter to 5
+ 4003b0: 4d ee d0 00 bas %r14,0(%r14,%r13) # jump to test setting r14 as return
+ # address using branch & save instruction.
+
+ # Function Epilogue below
+ 4003b4: 98 bf f0 8c lm %r11,%r15,140(%r15)# Restore necessary registers.
+ 4003b8: 07 fe br %r14 # return to do program exit
+}
+
+
+Compiler updates
+----------------
+
+main(int argc,char *argv[])
+{
+ 4004fc: 90 7f f0 1c stm %r7,%r15,28(%r15)
+ 400500: a7 d5 00 04 bras %r13,400508 <main+0xc>
+ 400504: 00 40 04 f4 .long 0x004004f4
+ # compiler now puts constant pool in code to so it saves an instruction
+ 400508: 18 0f lr %r0,%r15
+ 40050a: a7 fa ff a0 ahi %r15,-96
+ 40050e: 50 00 f0 00 st %r0,0(%r15)
+ return(test(5));
+ 400512: 58 10 d0 00 l %r1,0(%r13)
+ 400516: a7 28 00 05 lhi %r2,5
+ 40051a: 0d e1 basr %r14,%r1
+ # compiler adds 1 extra instruction to epilogue this is done to
+ # avoid processor pipeline stalls owing to data dependencies on g5 &
+ # above as register 14 in the old code was needed directly after being loaded
+ # by the lm %r11,%r15,140(%r15) for the br %14.
+ 40051c: 58 40 f0 98 l %r4,152(%r15)
+ 400520: 98 7f f0 7c lm %r7,%r15,124(%r15)
+ 400524: 07 f4 br %r4
+}
+
+
+Hartmut ( our compiler developer ) also has been threatening to take out the
+stack backchain in optimised code as this also causes pipeline stalls, you
+have been warned.
+
+64 bit z/Architecture code disassembly
+--------------------------------------
+
+If you understand the stuff above you'll understand the stuff
+below too so I'll avoid repeating myself & just say that
+some of the instructions have g's on the end of them to indicate
+they are 64 bit & the stack offsets are a bigger,
+the only other difference you'll find between 32 & 64 bit is that
+we now use f4 & f6 for floating point arguments on 64 bit.
+00000000800005b0 <test>:
+int test(int b)
+{
+ return(5+b);
+ 800005b0: a7 2a 00 05 ahi %r2,5
+ 800005b4: b9 14 00 22 lgfr %r2,%r2 # downcast to integer
+ 800005b8: 07 fe br %r14
+ 800005ba: 07 07 bcr 0,%r7
+
+
+}
+
+00000000800005bc <main>:
+main(int argc,char *argv[])
+{
+ 800005bc: eb bf f0 58 00 24 stmg %r11,%r15,88(%r15)
+ 800005c2: b9 04 00 1f lgr %r1,%r15
+ 800005c6: a7 fb ff 60 aghi %r15,-160
+ 800005ca: e3 10 f0 00 00 24 stg %r1,0(%r15)
+ return(test(5));
+ 800005d0: a7 29 00 05 lghi %r2,5
+ # brasl allows jumps > 64k & is overkill here bras would do fune
+ 800005d4: c0 e5 ff ff ff ee brasl %r14,800005b0 <test>
+ 800005da: e3 40 f1 10 00 04 lg %r4,272(%r15)
+ 800005e0: eb bf f0 f8 00 04 lmg %r11,%r15,248(%r15)
+ 800005e6: 07 f4 br %r4
+}
+
+
+


+Compiling programs for debugging on Linux for s/390 & z/Architecture

+====================================================================
+-gdwarf-2 now works it should be considered the default debugging
+format for s/390 & z/Architecture as it is more reliable for debugging
+shared libraries, normal -g debugging works much better now


+Thanks to the IBM java compiler developers bug reports.

+
+This is typically done adding/appending the flags -g or -gdwarf-2 to the
+CFLAGS & LDFLAGS variables Makefile of the program concerned.
+
+If using gdb & you would like accurate displays of registers &
+ stack traces compile without optimisation i.e make sure
+that there is no -O2 or similar on the CFLAGS line of the Makefile &
+the emitted gcc commands, obviously this will produce worse code
+( not advisable for shipment ) but it is an aid to the debugging process.
+
+This aids debugging because the compiler will copy parameters passed in
+in registers onto the stack so backtracing & looking at passed in
+parameters will work, however some larger programs which use inline functions
+will not compile without optimisation.
+


+Debugging with optimisation has since much improved after fixing
+some bugs, please make sure you are using gdb-5.0 or later developed
+after Nov'2000.
+

+Figuring out gcc compile errors

+===============================
+If you are getting a lot of syntax errors compiling a program & the problem
+isn't blatantly obvious from the source.
+It often helps to just preprocess the file, this is done with the -E
+option in gcc.
+What this does is that it runs through the very first phase of compilation
+( compilation in gcc is done in several stages & gcc calls many programs to
+achieve its end result ) with the -E option gcc just calls the gcc preprocessor (cpp).
+The c preprocessor does the following, it joins all the files #included together
+recursively ( #include files can #include other files ) & also the c file you wish to compile.
+It puts a fully qualified path of the #included files in a comment & it
+does macro expansion.
+This is useful for debugging because
+1) You can double check whether the files you expect to be included are the ones
+that are being included ( e.g. double check that you aren't going to the i386 asm directory ).
+2) Check that macro definitions aren't clashing with typedefs,
+3) Check that definitons aren't being used before they are being included.
+4) Helps put the line emitting the error under the microscope if it contains macros.
+
+For convenience the Linux kernel's makefile will do preprocessing automatically for you
+by suffixing the file you want built with .i ( instead of .o )
+
+e.g.
+from the linux directory type
+make arch/s390/kernel/signal.i
+this will build
+
+s390-gcc -D__KERNEL__ -I/home1/barrow/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+-fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -E arch/s390/kernel/signal.c
+> arch/s390/kernel/signal.i
+
+Now look at signal.i you should see something like.
+
+
+# 1 "/home1/barrow/linux/include/asm/types.h" 1
+typedef unsigned short umode_t;
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+If instead you are getting errors further down e.g.
+unknown instruction:2515 "move.l" or better still unknown instruction:2515
+"Fixme not implemented yet, call Martin" you are probably are attempting to compile some code
+meant for another architecture or code that is simply not implemented, with a fixme statement
+stuck into the inline assembly code so that the author of the file now knows he has work to do.
+To look at the assembly emitted by gcc just before it is about to call gas ( the gnu assembler )
+use the -S option.
+Again for your convenience the Linux kernel's Makefile will hold your hand &
+do all this donkey work for you also by building the file with the .s suffix.
+e.g.
+from the Linux directory type
+make arch/s390/kernel/signal.s
+
+s390-gcc -D__KERNEL__ -I/home1/barrow/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+-fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -S arch/s390/kernel/signal.c
+-o arch/s390/kernel/signal.s
+
+
+This will output something like, ( please note the constant pool & the useful comments
+in the prologue to give you a hand at interpreting it ).
+
+.LC54:
+ .string "misaligned (__u16 *) in __xchg\n"
+.LC57:
+ .string "misaligned (__u32 *) in __xchg\n"
+.L$PG1: # Pool sys_sigsuspend
+.LC192:
+ .long -262401
+.LC193:
+ .long -1
+.LC194:
+ .long schedule-.L$PG1
+.LC195:
+ .long do_signal-.L$PG1
+ .align 4
+.globl sys_sigsuspend
+ .type sys_sigsuspend,@function
+sys_sigsuspend:
+# leaf function 0
+# automatics 16
+# outgoing args 0
+# need frame pointer 0
+# call alloca 0
+# has varargs 0
+# incoming args (stack) 0
+# function length 168
+ STM 8,15,32(15)
+ LR 0,15
+ AHI 15,-112
+ BASR 13,0
+.L$CO1: AHI 13,.L$PG1-.L$CO1
+ ST 0,0(15)
+ LR 8,2
+ N 5,.LC192-.L$PG1(13)
+
+Adding -g to the above output makes the output even more useful
+e.g. typing
+make CC:="s390-gcc -g" kernel/sched.s
+
+which compiles.
+s390-gcc -g -D__KERNEL__ -I/home/barrow/linux-2.3/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -S kernel/sched.c -o kernel/sched.s
+
+also outputs stabs ( debugger ) info, from this info you can find out the
+offsets & sizes of various elements in structures.
+e.g. the stab for the structure
+struct rlimit {
+ unsigned long rlim_cur;
+ unsigned long rlim_max;
+};
+is
+.stabs "rlimit:T(151,2)=s8rlim_cur:(0,5),0,32;rlim_max:(0,5),32,32;;",128,0,0,0
+from this stab you can see that
+rlimit_cur starts at bit offset 0 & is 32 bits in size
+rlimit_max starts at bit offset 32 & is 32 bits in size.
+
+
+Debugging Tools:
+================
+
+objdump
+=======
+This is a tool with many options the most useful being ( if compiled with -g).
+objdump --source <victim program or object file> > <victims debug listing >
+
+
+The whole kernel can be compiled like this ( Doing this will make a 17MB kernel
+& a 200 MB listing ) however you have to strip it before building the image
+using the strip command to make it a more reasonable size to boot it.
+
+A source/assembly mixed dump of the kernel can be done with the line
+objdump --source vmlinux > vmlinux.lst
+Also if the file isn't compiled -g this will output as much debugging information
+as it can ( e.g. function names ), however, this is very slow as it spends lots
+of time searching for debugging info, the following self explanitory line should be used
+instead if the code isn't compiled -g.
+objdump --disassemble-all --syms vmlinux > vmlinux.lst
+as it is much faster
+
+As hard drive space is valuble most of us use the following approach.
+1) Look at the emitted psw on the console to find the crash address in the kernel.
+2) Look at the file System.map ( in the linux directory ) produced when building
+the kernel to find the closest address less than the current PSW to find the
+offending function.
+3) use grep or similar to search the source tree looking for the source file
+ with this function if you don't know where it is.
+4) rebuild this object file with -g on, as an example suppose the file was
+( /arch/s390/kernel/signal.o )
+5) Assuming the file with the erroneous function is signal.c Move to the base of the
+Linux source tree.
+6) rm /arch/s390/kernel/signal.o
+7) make /arch/s390/kernel/signal.o
+8) watch the gcc command line emitted
+9) type it in again or alernatively cut & paste it on the console adding the -g option.
+10) objdump --source arch/s390/kernel/signal.o > signal.lst
+This will output the source & the assembly intermixed, as the snippet below shows
+This will unfortunately output addresses which aren't the same
+as the kernel ones you should be able to get around the mental arithmetic
+by playing with the --adjust-vma parameter to objdump.
+
+
+
+
+extern inline void spin_lock(spinlock_t *lp)
+{
+ a0: 18 34 lr %r3,%r4
+ a2: a7 3a 03 bc ahi %r3,956
+ __asm__ __volatile(" lhi 1,-1\n"
+ a6: a7 18 ff ff lhi %r1,-1
+ aa: 1f 00 slr %r0,%r0
+ ac: ba 01 30 00 cs %r0,%r1,0(%r3)
+ b0: a7 44 ff fd jm aa <sys_sigsuspend+0x2e>
+ saveset = current->blocked;
+ b4: d2 07 f0 68 mvc 104(8,%r15),972(%r4)
+ b8: 43 cc
+ return (set->sig[0] & mask) != 0;
+}
+
+6) If debugging under VM go down to that section in the document for more info.
+
+
+I now have a tool which takes the pain out of --adjust-vma
+& you are able to do something like
+make /arch/s390/kernel/traps.lst
+& it automatically generates the correctly relocated entries for
+the text segment in traps.lst.
+This tool is now standard in linux distro's in scripts/makelst
+
+strace:
+-------
+Q. What is it ?
+A. It is a tool for intercepting calls to the kernel & logging them
+to a file & on the screen.
+
+Q. What use is it ?
+A. You can used it to find out what files a particular program opens.
+
+
+
+Example 1
+---------
+If you wanted to know does ping work but didn't have the source
+strace ping -c 1 127.0.0.1
+& then look at the man pages for each of the syscalls below,
+( In fact this is sometimes easier than looking at some spagetti
+source which conditionally compiles for several architectures )
+Not everything that it throws out needs to make sense immeadiately
+
+Just looking quickly you can see that it is making up a RAW socket
+for the ICMP protocol.
+Doing an alarm(10) for a 10 second timeout
+& doing a gettimeofday call before & after each read to see
+how long the replies took, & writing some text to stdout so the user
+has an idea what is going on.
+
+socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3
+getuid() = 0
+setuid(0) = 0
+stat("/usr/share/locale/C/libc.cat", 0xbffff134) = -1 ENOENT (No such file or directory)
+stat("/usr/share/locale/libc/C", 0xbffff134) = -1 ENOENT (No such file or directory)
+stat("/usr/local/share/locale/C/libc.cat", 0xbffff134) = -1 ENOENT (No such file or directory)
+getpid() = 353
+setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
+setsockopt(3, SOL_SOCKET, SO_RCVBUF, [49152], 4) = 0
+fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ...}) = 0
+mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000
+ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0
+write(1, "PING 127.0.0.1 (127.0.0.1): 56 d"..., 42PING 127.0.0.1 (127.0.0.1): 56 data bytes
+) = 42
+sigaction(SIGINT, {0x8049ba0, [], SA_RESTART}, {SIG_DFL}) = 0
+sigaction(SIGALRM, {0x8049600, [], SA_RESTART}, {SIG_DFL}) = 0
+gettimeofday({948904719, 138951}, NULL) = 0
+sendto(3, "\10\0D\201a\1\0\0\17#\2178\307\36"..., 64, 0, {sin_family=AF_INET,
+sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 64
+sigaction(SIGALRM, {0x8049600, [], SA_RESTART}, {0x8049600, [], SA_RESTART}) = 0
+sigaction(SIGALRM, {0x8049ba0, [], SA_RESTART}, {0x8049600, [], SA_RESTART}) = 0
+alarm(10) = 0
+recvfrom(3, "E\0\0T\0005\0\0@\1|r\177\0\0\1\177"..., 192, 0,
+{sin_family=AF_INET, sin_port=htons(50882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 84
+gettimeofday({948904719, 160224}, NULL) = 0
+recvfrom(3, "E\0\0T\0006\0\0\377\1\275p\177\0"..., 192, 0,
+{sin_family=AF_INET, sin_port=htons(50882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 84
+gettimeofday({948904719, 166952}, NULL) = 0
+write(1, "64 bytes from 127.0.0.1: icmp_se"...,
+5764 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=28.0 ms
+
+Example 2
+---------
+strace passwd 2>&1 | grep open
+produces the following output
+open("/etc/ld.so.cache", O_RDONLY) = 3
+open("/opt/kde/lib/libc.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
+open("/lib/libc.so.5", O_RDONLY) = 3
+open("/dev", O_RDONLY) = 3
+open("/var/run/utmp", O_RDONLY) = 3
+open("/etc/passwd", O_RDONLY) = 3
+open("/etc/shadow", O_RDONLY) = 3
+open("/etc/login.defs", O_RDONLY) = 4
+open("/dev/tty", O_RDONLY) = 4
+
+The 2>&1 is done to redirect stderr to stdout & grep is then filtering this input
+through the pipe for each line containing the string open.
+
+
+Example 3
+---------
+Getting sophistocated
+telnetd crashes on & I don't know why
+Steps
+-----
+1) Replace the following line in /etc/inetd.conf
+telnet stream tcp nowait root /usr/sbin/in.telnetd -h
+with
+telnet stream tcp nowait root /blah
+
+2) Create the file /blah with the following contents to start tracing telnetd
+#!/bin/bash
+/usr/bin/strace -o/t1 -f /usr/sbin/in.telnetd -h
+3) chmod 700 /blah to make it executable only to root
+4)
+killall -HUP inetd
+or ps aux | grep inetd
+get inetd's process id
+& kill -HUP inetd to restart it.
+
+Important options
+-----------------
+-o is used to tell strace to output to a file in our case t1 in the root directory
+-f is to follow children i.e.
+e.g in our case above telnetd will start the login process & subsequently a shell like bash.
+You will be able to tell which is which from the process ID's listed on the left hand side
+of the strace output.
+-p<pid> will tell strace to attach to a running process, yup this can be done provided
+ it isn't being traced or debugged already & you have enough privileges,
+the reason 2 processes cannot trace or debug the same program is that strace
+becomes the parent process of the one being debugged & processes ( unlike people )
+can have only one parent.
+
+
+However the file /t1 will get big quite quickly
+to test it telnet 127.0.0.1
+
+now look at what files in.telnetd execve'd
+413 execve("/usr/sbin/in.telnetd", ["/usr/sbin/in.telnetd", "-h"], [/* 17 vars */]) = 0
+414 execve("/bin/login", ["/bin/login", "-h", "localhost", "-p"], [/* 2 vars */]) = 0
+
+Whey it worked!.
+
+
+Other hints:
+------------
+If the program is not very interactive ( i.e. not much keyboard input )
+& is crashing in one architecture but not in another you can do
+an strace of both programs under as identical a scenario as you can
+on both architectures outputting to a file then.
+do a diff of the two traces using the diff program
+i.e.
+diff output1 output2
+& maybe you'll be able to see where the call paths differed, this
+is possibly near the cause of the crash.
+
+More info
+---------
+Look at man pages for strace & the various syscalls
+e.g. man strace, man alarm, man socket.
+
+
+Performance Debugging
+=====================
+gcc is capible of compiling in profiling code just add the -p option
+to the CFLAGS, this obviously affects program size & performance.
+This can be used by the gprof gnu profiling tool or the
+gcov the gnu code coverage tool ( code coverage is a means of testing
+code quality by checking if all the code in an executable in exercised by
+a tester ).
+
+
+Using top to find out where processes are sleeping in the kernel
+----------------------------------------------------------------
+To do this copy the System.map from the root directory where
+the linux kernel was built to the /boot directory on your
+linux machine.
+Start top
+Now type fU<return>
+You should see a new field called WCHAN which
+tells you where each process is sleeping here is a typical output.
+
+ 6:59pm up 41 min, 1 user, load average: 0.00, 0.00, 0.00
+28 processes: 27 sleeping, 1 running, 0 zombie, 0 stopped
+CPU states: 0.0% user, 0.1% system, 0.0% nice, 99.8% idle
+Mem: 254900K av, 45976K used, 208924K free, 0K shrd, 28636K buff
+Swap: 0K av, 0K used, 0K free 8620K cached
+
+ PID USER PRI NI SIZE RSS SHARE WCHAN STAT LIB %CPU %MEM TIME COMMAND
+ 750 root 12 0 848 848 700 do_select S 0 0.1 0.3 0:00 in.telnetd
+ 767 root 16 0 1140 1140 964 R 0 0.1 0.4 0:00 top
+ 1 root 8 0 212 212 180 do_select S 0 0.0 0.0 0:00 init
+ 2 root 9 0 0 0 0 down_inte SW 0 0.0 0.0 0:00 kmcheck
+
+The time command
+----------------
+Another related command is the time command which gives you an indication
+of where a process is spending the majority of its time.
+e.g.
+time ping -c 5 nc
+outputs
+real 0m4.054s
+user 0m0.010s
+sys 0m0.010s
+
+Debugging under VM
+==================
+
+Notes
+-----
+Addresses & values in the VM debugger are always hex never decimal
+Address ranges are of the format <HexValue1>-<HexValue2> or <HexValue1>.<HexValue2>
+e.g. The address range 0x2000 to 0x3000 can be described described as
+2000-3000 or 2000.1000
+
+The VM Debugger is case insensitive.
+
+VM's strengths are usually other debuggers weaknesses you can get at any resource
+no matter how sensitive e.g. memory managment resources,change address translation
+in the PSW. For kernel hacking you will reap dividends if you get good at it.
+
+The VM Debugger displays operators but not operands, probably because some
+of it was written when memory was expensive & the programmer was probably proud that
+it fitted into 2k of memory & the programmers & didn't want to shock hardcore VM'ers by
+changing the interface :-), also the debugger displays useful information on the same line &
+the author of the code probably felt that it was a good idea not to go over
+the 80 columns on the screen.
+
+As some of you are probably in a panic now this isn't as unintuitive as it may seem
+as the 390 instructions are easy to decode mentally & you can make a good guess at a lot
+of them as all the operands are nibble ( half byte aligned ) & if you have an objdump listing
+also it is quite easy to follow, if you don't have an objdump listing keep a copy of


+the s/390 Reference Summary & look at between pages 2 & 7 or alternatively the
+s/390 principles of operation.

+e.g. even I can guess that
+0001AFF8' LR 180F CC 0
+is a ( load register ) lr r0,r15
+
+Also it is very easy to tell the length of a 390 instruction from the 2 most significant
+bits in the instruction ( not that this info is really useful except if you are trying to
+make sense of a hexdump of code ).
+Here is a table
+Bits Instruction Length
+------------------------------------------
+00 2 Bytes
+01 4 Bytes
+10 4 Bytes
+11 6 Bytes
+
+
+
+
+The debugger also displays other useful info on the same line such as the
+addresses being operated on destination addresses of branches & condition codes.
+e.g.
+00019736' AHI A7DAFF0E CC 1
+000198BA' BRC A7840004 -> 000198C2' CC 0
+000198CE' STM 900EF068 >> 0FA95E78 CC 2
+
+
+
+Useful VM debugger commands
+---------------------------
+
+I suppose I'd better mention this before I start
+to list the current active traces do
+Q TR
+there can be a maximum of 255 of these per set
+( more about trace sets later ).
+To stop traces issue a
+TR END.
+To delete a particular breakpoint issue
+TR DEL <breakpoint number>
+
+The PA1 key drops to CP mode so you can issue debugger commands,
+Doing alt c (on my 3270 console at least ) clears the screen.
+hitting b <enter> comes back to the running operating system
+from cp mode ( in our case linux ).
+It is typically useful to add shortcuts to your profile.exec file
+if you have one ( this is roughly equivalent to autoexec.bat in DOS ).
+file here are a few from mine.
+/* this gives me command history on issuing f12 */
+set pf12 retrieve
+/* this continues */
+set pf8 imm b
+/* goes to trace set a */
+set pf1 imm tr goto a
+/* goes to trace set b */
+set pf2 imm tr goto b
+/* goes to trace set c */
+set pf3 imm tr goto c
+
+
+
+Instruction Tracing
+-------------------
+Setting a simple breakpoint
+TR I PSWA <address>
+To debug a particular function try
+TR I R <function address range>
+TR I on its own will single step.
+TR I DATA <MNEMONIC> <OPTIONAL RANGE> will trace for particular mnemonics
+e.g.
+TR I DATA 4D R 0197BC.4000
+will trace for BAS'es ( opcode 4D ) in the range 0197BC.4000
+if you were inclined you could add traces for all branch instructions &
+suffix them with the run prefix so you would have a backtrace on screen
+when a program crashes.
+TR BR <INTO OR FROM> will trace branches into or out of an address.
+e.g.
+TR BR INTO 0 is often quite useful if a program is getting awkward & deciding
+to branch to 0 & crashing as this will stop at the address before in jumps to 0.
+TR I R <address range> RUN cmd d g
+single steps a range of addresses but stays running &
+displays the gprs on each step.
+
+
+
+Displaying & modifying Registers
+--------------------------------
+D G will display all the gprs
+Adding a extra G to all the commands is neccessary to access the full 64 bit
+content in VM on z/Architecture obviously this isn't required for access registers
+as these are still 32 bit.
+e.g. DGG instead of DG
+D X will display all the control registers
+D AR will display all the access registers
+D AR4-7 will display access registers 4 to 7
+CPU ALL D G will display the GRPS of all CPUS in the configuration
+D PSW will display the current PSW
+st PSW 2000 will put the value 2000 into the PSW &
+cause crash your machine.
+D PREFIX displays the prefix offset
+
+
+Displaying Memory
+-----------------
+To display memory mapped using the current PSW's mapping try
+D <range>
+To make VM display a message each time it hits a particular address & continue try
+D I<range> will disassemble/display a range of instructions.
+ST addr 32 bit word will store a 32 bit aligned address
+D T<range> will display the EBCDIC in an address ( if you are that way inclined )
+D R<range> will display real addresses ( without DAT ) but with prefixing.
+There are other complex options to display if you need to get at say home space
+but are in primary space the easiest thing to do is to temporarily
+modify the PSW to the other addressing mode, display the stuff & then
+restore it.
+
+
+
+Hints
+-----
+If you want to issue a debugger command without halting your virtual machine with the
+PA1 key try prefixing the command with #CP e.g.
+#cp tr i pswa 2000
+also suffixing most debugger commands with RUN will cause them not
+to stop just display the mnemonic at the current instruction on the console.
+If you have several breakpoints you want to put into your program &
+you get fed up of cross referencing with System.map
+you can do the following trick for several symbols.
+grep do_signal System.map
+which emits the following among other things
+0001f4e0 T do_signal
+now you can do
+
+TR I PSWA 0001f4e0 cmd msg * do_signal
+This sends a message to your own console each time do_signal is entered.
+( As an aside I wrote a perl script once which automatically generated a REXX
+script with breakpoints on every kernel procedure, this isn't a good idea
+because there are thousands of these routines & VM can only set 255 breakpoints
+at a time so you nearly had to spend as long pruning the file down as you would
+entering the msg's by hand ),however, the trick might be useful for a single object file.
+On linux'es 3270 emulator x3270 there is a very useful option under the file ment
+Save Screens In File this is very good of keeping a copy of traces.
+
+From CMS help <command name> will give you online help on a particular command.
+e.g.
+HELP DISPLAY
+
+Also CP has a file called profile.exec which automatically gets called
+on startup of CMS ( like autoexec.bat ), keeping on a DOS analogy session
+CP has a feature similar to doskey, it may be useful for you to
+use profile.exec to define some keystrokes.
+e.g.
+SET PF9 IMM B
+This does a single step in VM on pressing F8.
+SET PF10 ^
+This sets up the ^ key.
+which can be used for ^c (ctrl-c),^z (ctrl-z) which can't be typed directly into some 3270 consoles.
+SET PF11 ^-
+This types the starting keystrokes for a sysrq see SysRq below.
+SET PF12 RETRIEVE
+This retrieves command history on pressing F12.
+
+
+Sometimes in VM the display is set up to scroll automatically this
+can be very annoying if there are messages you wish to look at
+to stop this do
+TERM MORE 255 255
+This will nearly stop automatic screen updates, however it will
+cause a denial of service if lots of messages go to the 3270 console,
+so it would be foolish to use this as the default on a production machine.
+
+
+Tracing particular processes
+----------------------------
+The kernels text segment is intentionally at an address in memory that it will
+very seldom collide with text segments of user programs ( thanks Martin ),
+this simplifies debugging the kernel.
+However it is quite common for user processes to have addresses which collide
+this can make debugging a particular process under VM painful under normal
+circumstances as the process may change when doing a
+TR I R <address range>.
+Thankfully after reading VM's online help I figured out how to debug
+I particular process.
+
+Your first problem is to find the STD ( segment table designation )
+of the program you wish to debug.
+There are several ways you can do this here are a few
+1) objdump --syms <program to be debugged> | grep main
+To get the address of main in the program.
+tr i pswa <address of main>
+Start the program, if VM drops to CP on what looks like the entry
+point of the main function this is most likely the process you wish to debug.
+Now do a D X13 or D XG13 on z/Architecture.
+On 31 bit the STD is bits 1-19 ( the STO segment table origin )
+& 25-31 ( the STL segment table length ) of CR13.
+now type
+TR I R STD <CR13's value> 0.7fffffff
+e.g.
+TR I R STD 8F32E1FF 0.7fffffff
+Another very useful variation is
+TR STORE INTO STD <CR13's value> <address range>
+for finding out when a particular variable changes.
+
+An alternative way of finding the STD of a currently running process
+is to do the following, ( this method is more complex but
+could be quite convient if you aren't updating the kernel much &
+so your kernel structures will stay constant for a reasonable period of
+time ).
+
+grep task /proc/<pid>/status
+from this you should see something like
+task: 0f160000 ksp: 0f161de8 pt_regs: 0f161f68
+This now gives you a pointer to the task structure.
+Now make CC:="s390-gcc -g" kernel/sched.s
+To get the task_struct stabinfo.
+( task_struct is defined in include/linux/sched.h ).
+Now we want to look at
+task->active_mm->pgd
+on my machine the active_mm in the task structure stab is
+active_mm:(4,12),672,32
+its offset is 672/8=84=0x54
+the pgd member in the mm_struct stab is
+pgd:(4,6)=*(29,5),96,32
+so its offset is 96/8=12=0xc
+
+so we'll
+hexdump -s 0xf160054 /dev/mem | more
+i.e. task_struct+active_mm offset
+to look at the active_mm member
+f160054 0fee cc60 0019 e334 0000 0000 0000 0011
+hexdump -s 0x0feecc6c /dev/mem | more
+i.e. active_mm+pgd offset
+feecc6c 0f2c 0000 0000 0001 0000 0001 0000 0010
+we get something like
+now do
+TR I R STD <pgd|0x7f> 0.7fffffff
+i.e. the 0x7f is added because the pgd only
+gives the page table origin & we need to set the low bits
+to the maximum possible segment table length.
+TR I R STD 0f2c007f 0.7fffffff
+on z/Architecture you'll probably need to do
+TR I R STD <pgd|0x7> 0.ffffffffffffffff
+to set the TableType to 0x1 & the Table length to 3.
+
+
+
+Tracing Program Exceptions
+--------------------------
+If you get a crash which says something like
+illegal operation or specification exception followed by a register dump
+You can restart linux & trace these using the tr prog <range or value> trace option.
+
+
+
+The most common ones you will normally be tracing for is
+1=operation exception
+2=privileged operation exception
+4=protection exception
+5=addressing exception
+6=specification exception
+10=segment translation exception
+11=page translation exception
+


+The full list of these is on page 22 of the current s/390 Reference Summary.

+e.g.
+tr prog 10 will trace segment translation exceptions.
+tr prog on its own will trace all program interruption codes.
+
+Trace Sets
+----------
+On starting VM you are initially in the INITIAL trace set.
+You can do a Q TR to verify this.
+If you have a complex tracing situation where you wish to wait for instance
+till a driver is open before you start tracing IO, but know in your
+heart that you are going to have to make several runs through the code till you
+have a clue whats going on.
+
+What you can do is
+TR I PSWA <Driver open address>
+hit b to continue till breakpoint
+reach the breakpoint
+now do your
+TR GOTO B
+TR IO 7c08-7c09 inst int run
+or whatever the IO channels you wish to trace are & hit b
+
+To got back to the initial trace set do
+TR GOTO INITIAL
+& the TR I PSWA <Driver open address> will be the only active breakpoint again.
+
+
+Tracing linux syscalls under VM
+-------------------------------
+Syscalls are implemented on Linux for S390 by the Supervisor call instruction (SVC) there 256
+possibilities of these as the instruction is made up of a 0xA opcode & the second byte being
+the syscall number. They are traced using the simple command.
+TR SVC <Optional value or range>
+the syscalls are defined in linux/include/asm-s390/unistd.h
+e.g. to trace all file opens just do
+TR SVC 5 ( as this is the syscall number of open )
+
+
+SMP Specific commands
+---------------------
+To find out how many cpus you have
+Q CPUS displays all the CPU's available to your virtual machine
+To find the cpu that the current cpu VM debugger commands are being directed at do
+Q CPU to change the current cpu cpu VM debugger commands are being directed at do
+CPU <desired cpu no>
+
+On a SMP guest issue a command to all CPUs try prefixing the command with cpu all.
+To issue a command to a particular cpu try cpu <cpu number> e.g.
+CPU 01 TR I R 2000.3000
+If you are running on a guest with several cpus & you have a IO related problem
+& cannot follow the flow of code but you know it isnt smp related.
+from the bash prompt issue
+shutdown -h now or halt.
+do a Q CPUS to find out how many cpus you have
+detach each one of them from cp except cpu 0
+by issueing a
+DETACH CPU 01-(number of cpus in configuration)
+& boot linux again.
+TR SIGP will trace inter processor signal processor instructions.
+DEFINE CPU 01-(number in configuration)
+will get your guests cpus back.
+
+
+Help for displaying ascii textstrings
+-------------------------------------
+On the very latest VM Nucleus'es VM can now display ascii
+( thanks Neale for the hint ) by doing
+D TX<lowaddr>.<len>
+e.g.
+D TX0.100
+
+Alternatively
+=============
+Under older VM debuggers ( I love EBDIC too ) you can use this little program I wrote which
+will convert a command line of hex digits to ascii text which can be compiled under linux &
+you can copy the hex digits from your x3270 terminal to your xterm if you are debugging
+from a linuxbox.
+
+This is quite useful when looking at a parameter passed in as a text string
+under VM ( unless you are good at decoding ASCII in your head ).
+
+e.g. consider tracing an open syscall
+TR SVC 5
+We have stopped at a breakpoint
+000151B0' SVC 0A05 -> 0001909A' CC 0
+
+D 20.8 to check the SVC old psw in the prefix area & see was it from userspace


+( for the layout of the prefix area consult P18 of the s/390 390 Reference Summary

+if you have it available ).
+V00000020 070C2000 800151B2
+The problem state bit wasn't set & it's also too early in the boot sequence
+for it to be a userspace SVC if it was we would have to temporarily switch the
+psw to user space addressing so we could get at the first parameter of the open in
+gpr2.
+Next do a
+D G2
+GPR 2 = 00014CB4
+Now display what gpr2 is pointing to
+D 00014CB4.20
+V00014CB4 2F646576 2F636F6E 736F6C65 00001BF5
+V00014CC4 FC00014C B4001001 E0001000 B8070707
+Now copy the text till the first 00 hex ( which is the end of the string
+to an xterm & do hex2ascii on it.
+hex2ascii 2F646576 2F636F6E 736F6C65 00
+outputs
+Decoded Hex:=/ d e v / c o n s o l e 0x00
+We were opening the console device,
+
+You can compile the code below yourself for practice :-),
+/*
+ * hex2ascii.c
+ * a useful little tool for converting a hexadecimal command line to ascii
+ *
+ * Author(s): Denis Joseph Barrow (djba...@de.ibm.com,barr...@yahoo.com)
+ * (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation.
+ */
+#include <stdio.h>
+
+int main(int argc,char *argv[])
+{
+ int cnt1,cnt2,len,toggle=0;
+ int startcnt=1;
+ unsigned char c,hex;
+
+ if(argc>1&&(strcmp(argv[1],"-a")==0))
+ startcnt=2;
+ printf("Decoded Hex:=");
+ for(cnt1=startcnt;cnt1<argc;cnt1++)
+ {
+ len=strlen(argv[cnt1]);
+ for(cnt2=0;cnt2<len;cnt2++)
+ {
+ c=argv[cnt1][cnt2];
+ if(c>='0'&&c<='9')
+ c=c-'0';
+ if(c>='A'&&c<='F')
+ c=c-'A'+10;
+ if(c>='a'&&c<='F')
+ c=c-'a'+10;
+ switch(toggle)
+ {
+ case 0:
+ hex=c<<4;
+ toggle=1;


+ break;
+ case 1:

+ hex+=c;
+ if(hex<32||hex>127)
+ {
+ if(startcnt==1)
+ printf("0x%02X ",(int)hex);
+ else
+ printf(".");
+ }
+ else
+ {
+ printf("%c",hex);
+ if(startcnt==1)
+ printf(" ");
+ }
+ toggle=0;


+ break;
+ }
+ }
+ }

+ printf("\n");


+}
+
+
+
+

+Stack tracing under VM
+----------------------
+A basic backtrace
+-----------------
+
+Here are the tricks I use 9 out of 10 times it works pretty well,
+
+When your backchain reaches a dead end
+--------------------------------------
+This can happen when an exception happens in the kernel & the kernel is entered twice
+if you reach the NULL pointer at the end of the back chain you should be
+able to sniff further back if you follow the following tricks.
+1) A kernel address should be easy to recognise since it is in
+primary space & the problem state bit isn't set & also
+The Hi bit of the address is set.
+2) Another backchain should also be easy to recognise since it is an
+address pointing to another address approximately 100 bytes or 0x70 hex
+behind the current stackpointer.
+
+
+Here is some practice.
+boot the kernel & hit PA1 at some random time
+d g to display the gprs, this should display something like
+GPR 0 = 00000001 00156018 0014359C 00000000
+GPR 4 = 00000001 001B8888 000003E0 00000000
+GPR 8 = 00100080 00100084 00000000 000FE000
+GPR 12 = 00010400 8001B2DC 8001B36A 000FFED8
+Note that GPR14 is a return address but as we are real men we are going to
+trace the stack.
+display 0x40 bytes after the stack pointer.
+
+V000FFED8 000FFF38 8001B838 80014C8E 000FFF38
+V000FFEE8 00000000 00000000 000003E0 00000000
+V000FFEF8 00100080 00100084 00000000 000FE000
+V000FFF08 00010400 8001B2DC 8001B36A 000FFED8
+
+
+Ah now look at whats in sp+56 (sp+0x38) this is 8001B36A our saved r14 if
+you look above at our stackframe & also agrees with GPR14.
+
+now backchain
+d 000FFF38.40
+we now are taking the contents of SP to get our first backchain.
+
+V000FFF38 000FFFA0 00000000 00014995 00147094
+V000FFF48 00147090 001470A0 000003E0 00000000
+V000FFF58 00100080 00100084 00000000 001BF1D0
+V000FFF68 00010400 800149BA 80014CA6 000FFF38
+
+This displays a 2nd return address of 80014CA6
+
+now do d 000FFFA0.40 for our 3rd backchain
+
+V000FFFA0 04B52002 0001107F 00000000 00000000
+V000FFFB0 00000000 00000000 FF000000 0001107F
+V000FFFC0 00000000 00000000 00000000 00000000
+V000FFFD0 00010400 80010802 8001085A 000FFFA0
+
+
+our 3rd return address is 8001085A
+
+as the 04B52002 looks suspiciously like rubbish it is fair to assume that the kernel entry routines
+for the sake of optimisation dont set up a backchain.
+
+now look at System.map to see if the addresses make any sense.
+
+grep -i 0001b3 System.map
+outputs among other things
+0001b304 T cpu_idle
+so 8001B36A
+is cpu_idle+0x66 ( quiet the cpu is asleep, don't wake it )
+
+
+grep -i 00014 System.map
+produces among other things
+00014a78 T start_kernel
+so 0014CA6 is start_kernel+some hex number I can't add in my head.
+
+grep -i 00108 System.map
+this produces
+00010800 T _stext
+so 8001085A is _stext+0x5a
+
+Congrats you've done your first backchain.
+
+
+


+s/390 & z/Architecture IO Overview

+==================================
+
+I am not going to give a course in 390 IO architecture as this would take me quite a
+while & I'm no expert. Instead I'll give a 390 IO architecture summary for Dummies if you have

+the s/390 principles of operation available read this instead. If nothing else you may find a few

+useful keywords in here & be able to use them on a web search engine like altavista to find
+more useful information.
+
+Unlike other bus architectures modern 390 systems do their IO using mostly
+fibre optics & devices such as tapes & disks can be shared between several mainframes,
+also S390 can support upto 65536 devices while a high end PC based system might be choking
+with around 64. Here is some of the common IO terminology
+
+Subchannel:
+This is the logical number most IO commands use to talk to an IO device there can be upto
+0x10000 (65536) of these in a configuration typically there is a few hundred. Under VM
+for simplicity they are allocated contiguously, however on the native hardware they are not
+they typically stay consistent between boots provided no new hardware is inserted or removed.
+Under Linux for 390 we use these as IRQ's & also when issuing an IO command (CLEAR SUBCHANNEL,
+HALT SUBCHANNEL,MODIFY SUBCHANNEL,RESUME SUBCHANNEL,START SUBCHANNEL,STORE SUBCHANNEL &
+TEST SUBCHANNEL ) we use this as the ID of the device we wish to talk to, the most
+important of these instructions are START SUBCHANNEL ( to start IO ), TEST SUBCHANNEL ( to check
+whether the IO completed successfully ), & HALT SUBCHANNEL ( to kill IO ), a subchannel
+can have up to 8 channel paths to a device this offers redunancy if one is not available.
+
+
+Device Number:
+This number remains static & Is closely tied to the hardware, there are 65536 of these
+also they are made up of a CHPID ( Channel Path ID, the most significant 8 bits )
+& another lsb 8 bits. These remain static even if more devices are inserted or removed
+from the hardware, there is a 1 to 1 mapping between Subchannels & Device Numbers provided
+devices arent inserted or removed.
+
+Channel Control Words:
+CCWS are linked lists of instructions initially pointed to by an operation request block (ORB),
+which is initially given to Start Subchannel (SSCH) command along with the subchannel number
+for the IO subsystem to process while the CPU continues executing normal code.
+These come in two flavours, Format 0 ( 24 bit for backward )
+compatibility & Format 1 ( 31 bit ). These are typically used to issue read & write
+( & many other instructions ) they consist of a length field & an absolute address field.
+For each IO typically get 1 or 2 interrupts one for channel end ( primary status ) when the
+channel is idle & the second for device end ( secondary status ) sometimes you get both
+concurrently, you check how the IO went on by issueing a TEST SUBCHANNEL at each interrupt,
+from which you receive an Interruption response block (IRB). If you get channel & device end
+status in the IRB without channel checks etc. your IO probably went okay. If you didn't you
+probably need a doctorto examine the IRB & extended status word etc.
+If an error occurs more sophistocated control units have a facitity known as
+concurrent sense this means that if an error occurs Extended sense information will
+be presented in the Extended status word in the IRB if not you have to issue a
+subsequent SENSE CCW command after the test subchannel.
+
+
+TPI( Test pending interrupt) can also be used for polled IO but in multitasking multiprocessor
+systems it isn't recommended except for checking special cases ( i.e. non looping checks for
+pending IO etc. ).
+
+Store Subchannel & Modify Subchannel can be used to examine & modify operating characteristics
+of a subchannel ( e.g. channel paths ).
+
+Other IO related Terms:
+Sysplex: S390's Clustering Technology
+QDIO: S390's new high speed IO architecture to support devices such as gigabit ethernet,
+this architecture is also designed to be forward compatible with up & coming 64 bit machines.
+
+
+General Concepts
+
+Input Output Processors (IOP's) are responsible for communicating between
+the mainframe CPU's & the channel & relieve the mainframe CPU's from the
+burden of communicating with IO devices directly, this allows the CPU's to
+concentrate on data processing.
+
+IOP's can use one or more links ( known as channel paths ) to talk to each
+IO device. It first checks for path availability & chooses an available one,
+then starts ( & sometimes terminates IO ).
+There are two types of channel path ESCON & the Paralell IO interface.
+
+IO devices are attached to control units, control units provide the
+logic to interface the channel paths & channel path IO protocols to
+the IO devices, they can be integrated with the devices or housed separately
+& often talk to several similar devices ( typical examples would be raid
+controllers or a control unit which connects to 1000 3270 terminals ).
+
+
+ +---------------------------------------------------------------+
+ | +-----+ +-----+ +-----+ +-----+ +----------+ +----------+ |
+ | | CPU | | CPU | | CPU | | CPU | | Main | | Expanded | |
+ | | | | | | | | | | Memory | | Storage | |
+ | +-----+ +-----+ +-----+ +-----+ +----------+ +----------+ |
+ |---------------------------------------------------------------+
+ | IOP | IOP | IOP |
+ |---------------------------------------------------------------
+ | C | C | C | C | C | C | C | C | C | C | C | C | C | C | C | C |
+ ----------------------------------------------------------------
+ || ||
+ || Bus & Tag Channel Path || ESCON
+ || ====================== || Channel
+ || || || || Path
+ +----------+ +----------+ +----------+
+ | | | | | |
+ | CU | | CU | | CU |
+ | | | | | |
+ +----------+ +----------+ +----------+
+ | | | | |
++----------+ +----------+ +----------+ +----------+ +----------+
+|I/O Device| |I/O Device| |I/O Device| |I/O Device| |I/O Device|
++----------+ +----------+ +----------+ +----------+ +----------+
+ CPU = Central Processing Unit
+ C = Channel
+ IOP = IP Processor
+ CU = Control Unit
+
+The 390 IO systems come in 2 flavours the current 390 machines support both
+
+The Older 360 & 370 Interface,sometimes called the paralell I/O interface,
+sometimes called Bus-and Tag & sometimes Original Equipment Manufacturers
+Interface (OEMI).
+
+This byte wide paralell channel path/bus has parity & data on the "Bus" cable
+& control lines on the "Tag" cable. These can operate in byte multiplex mode for
+sharing between several slow devices or burst mode & monopolize the channel for the
+whole burst. Upto 256 devices can be addressed on one of these cables. These cables are
+about one inch in diameter. The maximum unextended length supported by these cables is
+125 Meters but this can be extended up to 2km with a fibre optic channel extended
+such as a 3044. The maximum burst speed supported is 4.5 megabytes per second however
+some really old processors support only transfer rates of 3.0, 2.0 & 1.0 MB/sec.
+One of these paths can be daisy chained to up to 8 control units.
+
+
+ESCON if fibre optic it is also called FICON
+Was introduced by IBM in 1990. Has 2 fibre optic cables & uses either leds or lasers
+for communication at a signaling rate of upto 200 megabits/sec. As 10bits are transferred
+for every 8 bits info this drops to 160 megabits/sec & to 18.6 Megabytes/sec once
+control info & CRC are added. ESCON only operates in burst mode.
+
+ESCONs typical max cable length is 3km for the led version & 20km for the laser version
+known as XDF ( extended distance facility ). This can be further extended by using an
+ESCON director which triples the above mentioned ranges. Unlike Bus & Tag as ESCON is
+serial it uses a packet switching architecture the standard Bus & Tag control protocol
+is however present within the packets. Upto 256 devices can be attached to each control
+unit that uses one of these interfaces.
+
+Common 390 Devices include:
+Network adapters typically OSA2,3172's,2116's & OSA-E gigabit ethernet adapters,
+Consoles 3270 & 3215 ( a teletype emulated under linux for a line mode console ).
+DASD's direct access storage devices ( otherwise known as hard disks ).
+Tape Drives.
+CTC ( Channel to Channel Adapters ),
+ESCON or Paralell Cables used as a very high speed serial link
+between 2 machines. We use 2 cables under linux to do a bi-directional serial link.
+
+


+Debugging IO on s/390 & z/Architecture under VM

+===============================================
+
+Now we are ready to go on with IO tracing commands under VM
+
+A few self explanatory queries:
+Q OSA
+Q CTC
+Q DISK ( This command is CMS specific )
+Q DASD


+
+
+
+
+
+

+Q OSA on my machine returns
+OSA 7C08 ON OSA 7C08 SUBCHANNEL = 0000
+OSA 7C09 ON OSA 7C09 SUBCHANNEL = 0001
+OSA 7C14 ON OSA 7C14 SUBCHANNEL = 0002
+OSA 7C15 ON OSA 7C15 SUBCHANNEL = 0003
+
+If you have a guest with certain priviliges you may be able to see devices
+which don't belong to you to avoid this do add the option V.
+e.g.
+Q V OSA
+
+Now using the device numbers returned by this command we will
+Trace the io starting up on the first device 7c08 & 7c09
+In our simplest case we can trace the

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 04'
echo 'File patch-2.2.20 is continued in part 05'
echo "05" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:16 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part17

#!/bin/sh -x
# this is part 17 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 17; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

--- v2.2.19/drivers/isdn/hisax/config.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/config.c Mon Oct 22 10:41:05 2001
@@ -1,9 +1,9 @@
-/* $Id: config.c,v 2.57.6.9 2001/02/13 10:33:58 kai Exp $
+/* $Id: config.c,v 2.57.6.16 2001/07/13 09:01:00 kai Exp $
X *


X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE

+ * This file is (c) under GNU General Public License

X *
X */
X #include <linux/types.h>
@@ -56,8 +56,8 @@
X * 26 AVM A1 PCMCIA (Fritz) p0=irq p1=iobase
X * 27 AVM PnP/PCI p0=irq p1=iobase (PCI no parameter)
X * 28 Sedlbauer Speed Fax+ p0=irq p1=iobase (from isapnp setup)
- * 29 Siemens I-Surf p0=irq p1=iobase p2=memory (from isapnp setup)
- * 30 ACER P10 p0=irq p1=iobase (from isapnp setup)
+ * 29 Siemens I-Surf p0=irq p1=iobase p2=memory (from isapnp setup)
+ * 30 ACER P10 p0=irq p1=iobase (from isapnp setup)
X * 31 HST Saphir p0=irq p1=iobase
X * 32 Telekom A4T none
X * 33 Scitel Quadro p0=subcontroller (4*S0, subctrl 1...4)
@@ -73,16 +73,18 @@


X *
X */
X

-const char *CardType[] =
-{"No Card", "Teles 16.0", "Teles 8.0", "Teles 16.3", "Creatix/Teles PnP",
- "AVM A1", "Elsa ML", "Elsa Quickstep", "Teles PCMCIA", "ITK ix1-micro Rev.2",
- "Elsa PCMCIA", "Eicon.Diehl Diva", "ISDNLink", "TeleInt", "Teles 16.3c",
- "Sedlbauer Speed Card", "USR Sportster", "ith mic Linux", "Elsa PCI",
- "Compaq ISA", "NETjet-S", "Teles PCI", "Sedlbauer Speed Star (PCMCIA)",
- "AMD 7930", "NICCY", "S0Box", "AVM A1 (PCMCIA)", "AVM Fritz PnP/PCI",
- "Sedlbauer Speed Fax +", "Siemens I-Surf", "Acer P10", "HST Saphir",
- "Telekom A4T", "Scitel Quadro", "Gazel", "HFC 2BDS0 PCI", "Winbond 6692",
- "HFC 2BDS0 SX", "NETspider-U", "HFC-2BDS0-SP PCMCIA",
+const char *CardType[] = {
+ "No Card", "Teles 16.0", "Teles 8.0", "Teles 16.3",
+ "Creatix/Teles PnP", "AVM A1", "Elsa ML", "Elsa Quickstep",
+ "Teles PCMCIA", "ITK ix1-micro Rev.2", "Elsa PCMCIA",
+ "Eicon.Diehl Diva", "ISDNLink", "TeleInt", "Teles 16.3c",
+ "Sedlbauer Speed Card", "USR Sportster", "ith mic Linux",
+ "Elsa PCI", "Compaq ISA", "NETjet-S", "Teles PCI",
+ "Sedlbauer Speed Star (PCMCIA)", "AMD 7930", "NICCY", "S0Box",
+ "AVM A1 (PCMCIA)", "AVM Fritz PnP/PCI", "Sedlbauer Speed Fax +",
+ "Siemens I-Surf", "Acer P10", "HST Saphir", "Telekom A4T",
+ "Scitel Quadro", "Gazel", "HFC 2BDS0 PCI", "Winbond 6692",
+ "HFC 2BDS0 SX", "NETspider-U", "HFC-2BDS0-SP PCMCIA",
X };
X
X void HiSax_closecard(int cardnr);
@@ -90,9 +92,9 @@
X #ifdef CONFIG_HISAX_ELSA
X #define DEFAULT_CARD ISDN_CTYPE_ELSA
X #define DEFAULT_CFG {0,0,0,0}
-int elsa_init_pcmcia(void*, int, int*, int);
+int elsa_init_pcmcia(void *, int, int *, int);
X EXPORT_SYMBOL(elsa_init_pcmcia);
-#endif /* CONFIG_HISAX_ELSA */
+#endif
X
X #ifdef CONFIG_HISAX_AVM_A1
X #undef DEFAULT_CARD
@@ -106,9 +108,9 @@
X #undef DEFAULT_CFG
X #define DEFAULT_CARD ISDN_CTYPE_A1_PCMCIA
X #define DEFAULT_CFG {11,0x170,0,0}
-int avm_a1_init_pcmcia(void*, int, int*, int);
+int avm_a1_init_pcmcia(void *, int, int *, int);
X EXPORT_SYMBOL(avm_a1_init_pcmcia);
-#endif /* CONFIG_HISAX_AVM_A1_PCMCIA */
+#endif
X
X #ifdef CONFIG_HISAX_FRITZPCI
X #undef DEFAULT_CARD
@@ -178,9 +180,9 @@
X #undef DEFAULT_CFG
X #define DEFAULT_CARD ISDN_CTYPE_SEDLBAUER
X #define DEFAULT_CFG {11,0x270,0,0}
-int sedl_init_pcmcia(void*, int, int*, int);
+int sedl_init_pcmcia(void *, int, int *, int);
X EXPORT_SYMBOL(sedl_init_pcmcia);
-#endif /* CONFIG_HISAX_SEDLBAUER */
+#endif
X
X #ifdef CONFIG_HISAX_SPORTSTER
X #undef DEFAULT_CARD
@@ -222,7 +224,7 @@
X #undef DEFAULT_CFG
X #define DEFAULT_CARD ISDN_CTYPE_HFC_SX
X #define DEFAULT_CFG {5,0x2E0,0,0}
-int hfc_init_pcmcia(void*, int, int*, int);
+int hfc_init_pcmcia(void *, int, int *, int);
X EXPORT_SYMBOL(hfc_init_pcmcia);
X #endif
X
@@ -255,7 +257,7 @@
X #define DEFAULT_CFG {5,0x250,0,0}
X #endif
X
-#ifdef CONFIG_HISAX_BKM_A4T
+#ifdef CONFIG_HISAX_BKM_A4T
X #undef DEFAULT_CARD
X #undef DEFAULT_CFG
X #define DEFAULT_CARD ISDN_CTYPE_BKM_A4T
@@ -327,8 +329,7 @@
X
X #define EMPTY_CARD {0, DEFAULT_PROTO, {0, 0, 0, 0}, NULL}
X
-struct IsdnCard cards[] =
-{
+struct IsdnCard cards[] = {
X FIRST_CARD,
X EMPTY_CARD,
X EMPTY_CARD,
@@ -373,7 +374,7 @@
X #ifdef IO0_IO1
X MODULE_PARM(io0, "1-8i");
X MODULE_PARM(io1, "1-8i");
-#endif /* IO0_IO1 */
+#endif


X #endif /* MODULE */
X

X int nrcards;
@@ -384,8 +385,7 @@
X extern char *lli_revision;
X extern char *tei_revision;
X
-char *
-HiSax_getrev(const char *revision)
+char *HiSax_getrev(const char *revision)
X {
X char *rev;
X char *p;
@@ -399,8 +399,7 @@
X return rev;
X }
X
-void __init
-HiSaxVersion(void)
+void __init HiSaxVersion(void)
X {
X char tmp[64];
X
@@ -419,29 +418,27 @@
X strcpy(tmp, l3_revision);
X printk(KERN_INFO "HiSax: Layer3 Revision %s\n", HiSax_getrev(tmp));
X strcpy(tmp, lli_revision);
- printk(KERN_INFO "HiSax: LinkLayer Revision %s\n", HiSax_getrev(tmp));
+ printk(KERN_INFO "HiSax: LinkLayer Revision %s\n",
+ HiSax_getrev(tmp));
X certification_check(1);
X }
X
-void
-HiSax_mod_dec_use_count(void)
+void HiSax_mod_dec_use_count(void)
X {
X MOD_DEC_USE_COUNT;
X }
X
-void
-HiSax_mod_inc_use_count(void)
+void HiSax_mod_inc_use_count(void)
X {
X MOD_INC_USE_COUNT;
X }
X
X #ifndef MODULE
-void __init
-HiSax_setup(char *str, int *ints)
+void __init HiSax_setup(char *str, int *ints)
X {
X int i, j, argc;
X argc = ints[0];
- printk(KERN_DEBUG"HiSax_setup: argc(%d) str(%s)\n", argc, str);
+ printk(KERN_DEBUG "HiSax_setup: argc(%d) str(%s)\n", argc, str);
X i = 0;
X j = 1;
X while (argc && (i < HISAX_MAX_CARDS)) {
@@ -519,7 +516,7 @@
X #endif
X
X #if CARD_DIEHLDIVA
-extern int setup_diva(struct IsdnCard *card);
+extern int setup_diva(struct IsdnCard *card);
X #endif
X
X #if CARD_ASUSCOM
@@ -601,43 +598,41 @@
X /*
X * Find card with given driverId
X */
-static inline struct IsdnCardState
-*hisax_findcard(int driverid)
+static inline struct IsdnCardState *hisax_findcard(int driverid)


X {
X int i;
X

X for (i = 0; i < nrcards; i++)
X if (cards[i].cs)
X if (cards[i].cs->myid == driverid)
- return (cards[i].cs);
- return (NULL);
+ return cards[i].cs;
+ return NULL;
X }
X
X /*
X * Find card with given card number
X */
-struct IsdnCardState
-*hisax_get_card(int cardnr)
+struct IsdnCardState *hisax_get_card(int cardnr)
X {
- if ((cardnr <= nrcards) && (cardnr>0))
- if (cards[cardnr-1].cs)
- return (cards[cardnr-1].cs);
- return (NULL);
+ if ((cardnr <= nrcards) && (cardnr > 0))
+ if (cards[cardnr - 1].cs)
+ return cards[cardnr - 1].cs;


+ return NULL;
X }
X

-int
-HiSax_readstatus(u_char * buf, int len, int user, int id, int channel)
+int HiSax_readstatus(u_char * buf, int len, int user, int id, int channel)
X {
- int count,cnt;
+ int count, cnt;
X u_char *p = buf;
X struct IsdnCardState *cs = hisax_findcard(id);
X
X if (cs) {
X if (len > HISAX_STATUS_BUFSIZE) {
- printk(KERN_WARNING "HiSax: status overflow readstat %d/%d\n",
- len, HISAX_STATUS_BUFSIZE);
+ printk(KERN_WARNING
+ "HiSax: status overflow readstat %d/%d\n",
+ len, HISAX_STATUS_BUFSIZE);
X }
- count = cs->status_end - cs->status_read +1;
+ count = cs->status_end - cs->status_read + 1;
X if (count >= len)
X count = len;
X if (user)
@@ -665,13 +660,12 @@
X return len;
X } else {
X printk(KERN_ERR
- "HiSax: if_readstatus called with invalid driverId!\n");
+ "HiSax: if_readstatus called with invalid driverId!\n");


X return -ENODEV;
X }
X }

X
-inline int
-jiftime(char *s, long mark)
+int jiftime(char *s, long mark)
X {
X s += 8;
X
@@ -689,15 +683,15 @@
X *s-- = mark % 10 + '0';
X mark /= 10;
X *s-- = mark % 10 + '0';
- return(8);
+ return 8;
X }
X
X static u_char tmpbuf[HISAX_STATUS_BUFSIZE];
X
-void
-VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args)
+void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt,
+ va_list args)
X {
-/* if head == NULL the fmt contains the full info */
+ /* if head == NULL the fmt contains the full info */
X
X long flags;
X int count, i;
@@ -721,18 +715,19 @@
X len = strlen(fmt);
X }
X if (!cs) {
- printk(KERN_WARNING "HiSax: No CardStatus for message %s", p);
+ printk(KERN_WARNING "HiSax: No CardStatus for message %s",
+ p);
X restore_flags(flags);
X return;
X }
X if (len > HISAX_STATUS_BUFSIZE) {
X printk(KERN_WARNING "HiSax: status overflow %d/%d\n",
- len, HISAX_STATUS_BUFSIZE);
+ len, HISAX_STATUS_BUFSIZE);
X restore_flags(flags);
X return;
X }
X count = len;
- i = cs->status_end - cs->status_write +1;
+ i = cs->status_end - cs->status_write + 1;
X if (i >= len)
X i = len;
X len -= i;
@@ -746,7 +741,7 @@
X cs->status_write += len;
X }
X #ifdef KERNELSTACK_DEBUG
- i = (ulong)&len - current->kernel_stack_page;
+ i = (ulong) & len - current->kernel_stack_page;
X sprintf(tmpbuf, "kstack %s %lx use %ld\n", current->comm,
X current->kernel_stack_page, i);
X len = strlen(tmpbuf);
@@ -766,8 +761,7 @@
X }
X }
X
-void
-HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...)
+void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...)
X {
X va_list args;
X
@@ -776,8 +770,7 @@
X va_end(args);
X }
X
-int
-ll_run(struct IsdnCardState *cs, int addfeatures)
+int ll_run(struct IsdnCardState *cs, int addfeatures)
X {
X long flags;
X isdn_ctrl ic;
@@ -792,19 +785,17 @@


X return 0;
X }
X

-void
-ll_stop(struct IsdnCardState *cs)
+void ll_stop(struct IsdnCardState *cs)
X {
X isdn_ctrl ic;
X
X ic.command = ISDN_STAT_STOP;
X ic.driver = cs->myid;
X cs->iif.statcallb(&ic);
-// CallcFreeChan(cs);
+ // CallcFreeChan(cs);
X }
X
-static void
-ll_unload(struct IsdnCardState *cs)
+static void ll_unload(struct IsdnCardState *cs)
X {
X isdn_ctrl ic;
X
@@ -819,8 +810,7 @@
X kfree(cs->dlog);
X }
X
-static void
-closecard(int cardnr)
+static void closecard(int cardnr)
X {
X struct IsdnCardState *csta = cards[cardnr].cs;
X
@@ -829,8 +819,8 @@
X csta->bcs->BC_Close(csta->bcs);
X }
X
- discard_queue(&csta->rq);
- discard_queue(&csta->sq);
+ skb_queue_purge(&csta->rq);
+ skb_queue_purge(&csta->sq);
X if (csta->rcvbuf) {
X kfree(csta->rcvbuf);
X csta->rcvbuf = NULL;
@@ -848,56 +838,54 @@
X ll_unload(csta);
X }
X
-static int
-init_card(struct IsdnCardState *cs)
+static int init_card(struct IsdnCardState *cs)
X {
X int irq_cnt, cnt = 3;
X long flags;
X
X if (!cs->irq)
- return(cs->cardmsg(cs, CARD_INIT, NULL));
+ return cs->cardmsg(cs, CARD_INIT, NULL);
X save_flags(flags);
X cli();
X irq_cnt = kstat_irqs(cs->irq);
- printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ], cs->irq,
- irq_cnt);
+ printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ],
+ cs->irq, irq_cnt);
X if (request_irq(cs->irq, cs->irq_func, cs->irq_flags, "HiSax", cs)) {
X printk(KERN_WARNING "HiSax: couldn't get interrupt %d\n",
- cs->irq);
+ cs->irq);
X restore_flags(flags);
- return(1);
+ return 1;
X }
X while (cnt) {
X cs->cardmsg(cs, CARD_INIT, NULL);
X sti();
X set_current_state(TASK_UNINTERRUPTIBLE);
X /* Timeout 10ms */
- schedule_timeout((10*HZ)/1000);
+ schedule_timeout((10 * HZ) / 1000);
X restore_flags(flags);
- printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ],
- cs->irq, kstat_irqs(cs->irq));
+ printk(KERN_INFO "%s: IRQ %d count %d\n",
+ CardType[cs->typ], cs->irq, kstat_irqs(cs->irq));
X if (kstat_irqs(cs->irq) == irq_cnt) {
X printk(KERN_WARNING
X "%s: IRQ(%d) getting no interrupts during init %d\n",
X CardType[cs->typ], cs->irq, 4 - cnt);
X if (cnt == 1) {
X free_irq(cs->irq, cs);
- return (2);
+ return 2;
X } else {
X cs->cardmsg(cs, CARD_RESET, NULL);
X cnt--;
X }
X } else {
X cs->cardmsg(cs, CARD_TEST, NULL);
- return(0);
+ return 0;
X }
X }
X restore_flags(flags);
- return(3);
+ return 3;
X }
X
-static int
-checkcard(int cardnr, char *id, int *busy_flag)
+static int checkcard(int cardnr, char *id, int *busy_flag)
X {
X long flags;


X int ret = 0;

@@ -906,18 +894,17 @@


X
X save_flags(flags);
X cli();

- if (!(cs = (struct IsdnCardState *)
- kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC))) {
+ cs = kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC);
+ if (!cs) {
X printk(KERN_WARNING
X "HiSax: No memory for IsdnCardState(card %d)\n",
X cardnr + 1);
- restore_flags(flags);
- return (0);
+ goto out;
X }
X memset(cs, 0, sizeof(struct IsdnCardState));
X card->cs = cs;
- cs->chanlimit = 2; /* maximum B-channel number */
- cs->logecho = 0; /* No echo logging */
+ cs->chanlimit = 2; /* maximum B-channel number */
+ cs->logecho = 0; /* No echo logging */
X cs->cardnr = cardnr;
X cs->debug = L1_DEB_WARN;
X cs->HW_Flags = 0;
@@ -931,241 +918,232 @@
X #endif
X cs->protocol = card->protocol;
X
- if ((card->typ > 0) && (card->typ <= ISDN_CTYPE_COUNT)) {
- if (!(cs->dlog = kmalloc(MAX_DLOG_SPACE, GFP_ATOMIC))) {
- printk(KERN_WARNING
- "HiSax: No memory for dlog(card %d)\n",
- cardnr + 1);
- restore_flags(flags);
- return (0);
- }
- if (!(cs->status_buf = kmalloc(HISAX_STATUS_BUFSIZE, GFP_ATOMIC))) {
- printk(KERN_WARNING
- "HiSax: No memory for status_buf(card %d)\n",
- cardnr + 1);
- kfree(cs->dlog);
- restore_flags(flags);
- return (0);
- }
- cs->stlist = NULL;
- cs->status_read = cs->status_buf;
- cs->status_write = cs->status_buf;
- cs->status_end = cs->status_buf + HISAX_STATUS_BUFSIZE - 1;
- cs->typ = card->typ;
- strcpy(cs->iif.id, id);
- cs->iif.channels = 2;
- cs->iif.maxbufsize = MAX_DATA_SIZE;
- cs->iif.hl_hdrlen = MAX_HEADER_LEN;
- cs->iif.features =
- ISDN_FEATURE_L2_X75I |
- ISDN_FEATURE_L2_HDLC |
- ISDN_FEATURE_L2_HDLC_56K |
- ISDN_FEATURE_L2_TRANS |
- ISDN_FEATURE_L3_TRANS |
+ if (card->typ <= 0 || card->typ > ISDN_CTYPE_COUNT) {
+ printk(KERN_WARNING
+ "HiSax: Card Type %d out of range\n", card->typ);
+ goto outf_cs;
+ }
+ if (!(cs->dlog = kmalloc(MAX_DLOG_SPACE, GFP_ATOMIC))) {
+ printk(KERN_WARNING
+ "HiSax: No memory for dlog(card %d)\n", cardnr + 1);
+ goto outf_cs;
+ }
+ if (!(cs->status_buf = kmalloc(HISAX_STATUS_BUFSIZE, GFP_ATOMIC))) {
+ printk(KERN_WARNING
+ "HiSax: No memory for status_buf(card %d)\n",
+ cardnr + 1);
+ goto outf_dlog;
+ }
+ cs->stlist = NULL;
+ cs->status_read = cs->status_buf;
+ cs->status_write = cs->status_buf;
+ cs->status_end = cs->status_buf + HISAX_STATUS_BUFSIZE - 1;
+ cs->typ = card->typ;
+ strcpy(cs->iif.id, id);
+ cs->iif.channels = 2;
+ cs->iif.maxbufsize = MAX_DATA_SIZE;
+ cs->iif.hl_hdrlen = MAX_HEADER_LEN;
+ cs->iif.features =
+ ISDN_FEATURE_L2_X75I |
+ ISDN_FEATURE_L2_HDLC |
+ ISDN_FEATURE_L2_HDLC_56K |
+ ISDN_FEATURE_L2_TRANS |
+ ISDN_FEATURE_L3_TRANS |
X #ifdef CONFIG_HISAX_1TR6
- ISDN_FEATURE_P_1TR6 |
+ ISDN_FEATURE_P_1TR6 |
X #endif
X #ifdef CONFIG_HISAX_EURO
- ISDN_FEATURE_P_EURO |
+ ISDN_FEATURE_P_EURO |
X #endif
X #ifdef CONFIG_HISAX_NI1
- ISDN_FEATURE_P_NI1 |
+ ISDN_FEATURE_P_NI1 |
X #endif
- 0;
+ 0;
X
- cs->iif.command = HiSax_command;
- cs->iif.writecmd = NULL;
- cs->iif.writebuf_skb = HiSax_writebuf_skb;
- cs->iif.readstat = HiSax_readstatus;
- register_isdn(&cs->iif);
- cs->myid = cs->iif.channels;
- printk(KERN_INFO
- "HiSax: Card %d Protocol %s Id=%s (%d)\n", cardnr + 1,
- (card->protocol == ISDN_PTYPE_1TR6) ? "1TR6" :
- (card->protocol == ISDN_PTYPE_EURO) ? "EDSS1" :
- (card->protocol == ISDN_PTYPE_LEASED) ? "LEASED" :
- (card->protocol == ISDN_PTYPE_NI1) ? "NI1" :
- "NONE", cs->iif.id, cs->myid);
- switch (card->typ) {
+ cs->iif.command = HiSax_command;
+ cs->iif.writecmd = NULL;
+ cs->iif.writebuf_skb = HiSax_writebuf_skb;
+ cs->iif.readstat = HiSax_readstatus;
+ register_isdn(&cs->iif);
+ cs->myid = cs->iif.channels;
+ printk(KERN_INFO
+ "HiSax: Card %d Protocol %s Id=%s (%d)\n", cardnr + 1,
+ (card->protocol == ISDN_PTYPE_1TR6) ? "1TR6" :
+ (card->protocol == ISDN_PTYPE_EURO) ? "EDSS1" :
+ (card->protocol == ISDN_PTYPE_LEASED) ? "LEASED" :
+ (card->protocol == ISDN_PTYPE_NI1) ? "NI1" :
+ "NONE", cs->iif.id, cs->myid);
+ switch (card->typ) {
X #if CARD_TELES0
- case ISDN_CTYPE_16_0:
- case ISDN_CTYPE_8_0:
- ret = setup_teles0(card);
- break;
+ case ISDN_CTYPE_16_0:
+ case ISDN_CTYPE_8_0:
+ ret = setup_teles0(card);
+ break;
X #endif
X #if CARD_TELES3
- case ISDN_CTYPE_16_3:
- case ISDN_CTYPE_PNP:
- case ISDN_CTYPE_TELESPCMCIA:
- case ISDN_CTYPE_COMPAQ_ISA:
- ret = setup_teles3(card);
- break;
+ case ISDN_CTYPE_16_3:
+ case ISDN_CTYPE_PNP:
+ case ISDN_CTYPE_TELESPCMCIA:
+ case ISDN_CTYPE_COMPAQ_ISA:
+ ret = setup_teles3(card);
+ break;
X #endif
X #if CARD_S0BOX
- case ISDN_CTYPE_S0BOX:
- ret = setup_s0box(card);
- break;
+ case ISDN_CTYPE_S0BOX:
+ ret = setup_s0box(card);
+ break;
X #endif
X #if CARD_TELESPCI
- case ISDN_CTYPE_TELESPCI:
- ret = setup_telespci(card);
- break;
+ case ISDN_CTYPE_TELESPCI:
+ ret = setup_telespci(card);
+ break;
X #endif
X #if CARD_AVM_A1
- case ISDN_CTYPE_A1:
- ret = setup_avm_a1(card);
- break;
+ case ISDN_CTYPE_A1:
+ ret = setup_avm_a1(card);
+ break;
X #endif
X #if CARD_AVM_A1_PCMCIA
- case ISDN_CTYPE_A1_PCMCIA:
- ret = setup_avm_a1_pcmcia(card);
- break;
+ case ISDN_CTYPE_A1_PCMCIA:
+ ret = setup_avm_a1_pcmcia(card);
+ break;
X #endif
X #if CARD_FRITZPCI
- case ISDN_CTYPE_FRITZPCI:
- ret = setup_avm_pcipnp(card);
- break;
+ case ISDN_CTYPE_FRITZPCI:
+ ret = setup_avm_pcipnp(card);
+ break;
X #endif
X #if CARD_ELSA
- case ISDN_CTYPE_ELSA:
- case ISDN_CTYPE_ELSA_PNP:
- case ISDN_CTYPE_ELSA_PCMCIA:
- case ISDN_CTYPE_ELSA_PCI:
- ret = setup_elsa(card);
- break;
+ case ISDN_CTYPE_ELSA:
+ case ISDN_CTYPE_ELSA_PNP:
+ case ISDN_CTYPE_ELSA_PCMCIA:
+ case ISDN_CTYPE_ELSA_PCI:
+ ret = setup_elsa(card);
+ break;
X #endif
X #if CARD_IX1MICROR2
- case ISDN_CTYPE_IX1MICROR2:
- ret = setup_ix1micro(card);
- break;
+ case ISDN_CTYPE_IX1MICROR2:
+ ret = setup_ix1micro(card);
+ break;
X #endif
X #if CARD_DIEHLDIVA
- case ISDN_CTYPE_DIEHLDIVA:
- ret = setup_diva(card);
- break;
+ case ISDN_CTYPE_DIEHLDIVA:
+ ret = setup_diva(card);
+ break;
X #endif
X #if CARD_ASUSCOM
- case ISDN_CTYPE_ASUSCOM:
- ret = setup_asuscom(card);
- break;
+ case ISDN_CTYPE_ASUSCOM:
+ ret = setup_asuscom(card);
+ break;
X #endif
X #if CARD_TELEINT
- case ISDN_CTYPE_TELEINT:
- ret = setup_TeleInt(card);
- break;
+ case ISDN_CTYPE_TELEINT:
+ ret = setup_TeleInt(card);
+ break;
X #endif
X #if CARD_SEDLBAUER
- case ISDN_CTYPE_SEDLBAUER:
- case ISDN_CTYPE_SEDLBAUER_PCMCIA:
- case ISDN_CTYPE_SEDLBAUER_FAX:
- ret = setup_sedlbauer(card);
- break;
+ case ISDN_CTYPE_SEDLBAUER:
+ case ISDN_CTYPE_SEDLBAUER_PCMCIA:
+ case ISDN_CTYPE_SEDLBAUER_FAX:
+ ret = setup_sedlbauer(card);
+ break;
X #endif
X #if CARD_SPORTSTER
- case ISDN_CTYPE_SPORTSTER:
- ret = setup_sportster(card);
- break;
+ case ISDN_CTYPE_SPORTSTER:
+ ret = setup_sportster(card);
+ break;
X #endif
X #if CARD_MIC
- case ISDN_CTYPE_MIC:
- ret = setup_mic(card);
- break;
+ case ISDN_CTYPE_MIC:
+ ret = setup_mic(card);
+ break;
X #endif
X #if CARD_NETJET_S
- case ISDN_CTYPE_NETJET_S:
- ret = setup_netjet_s(card);
- break;
+ case ISDN_CTYPE_NETJET_S:
+ ret = setup_netjet_s(card);
+ break;
X #endif
X #if CARD_HFCS
- case ISDN_CTYPE_TELES3C:
- case ISDN_CTYPE_ACERP10:
- ret = setup_hfcs(card);
- break;
+ case ISDN_CTYPE_TELES3C:
+ case ISDN_CTYPE_ACERP10:
+ ret = setup_hfcs(card);
+ break;
X #endif
X #if CARD_HFC_PCI
- case ISDN_CTYPE_HFC_PCI:
- ret = setup_hfcpci(card);
- break;
+ case ISDN_CTYPE_HFC_PCI:
+ ret = setup_hfcpci(card);
+ break;
X #endif
X #if CARD_HFC_SX
- case ISDN_CTYPE_HFC_SX:
- ret = setup_hfcsx(card);
- break;
+ case ISDN_CTYPE_HFC_SX:
+ ret = setup_hfcsx(card);
+ break;
X #endif
X #if CARD_NICCY
- case ISDN_CTYPE_NICCY:
- ret = setup_niccy(card);
- break;
+ case ISDN_CTYPE_NICCY:
+ ret = setup_niccy(card);
+ break;
X #endif
X #if CARD_AMD7930
- case ISDN_CTYPE_AMD7930:
- ret = setup_amd7930(card);
- break;
+ case ISDN_CTYPE_AMD7930:
+ ret = setup_amd7930(card);
+ break;
X #endif
X #if CARD_ISURF
- case ISDN_CTYPE_ISURF:
- ret = setup_isurf(card);
- break;
+ case ISDN_CTYPE_ISURF:
+ ret = setup_isurf(card);
+ break;
X #endif
X #if CARD_HSTSAPHIR
- case ISDN_CTYPE_HSTSAPHIR:
- ret = setup_saphir(card);
- break;
+ case ISDN_CTYPE_HSTSAPHIR:
+ ret = setup_saphir(card);
+ break;
X #endif
X #if CARD_TESTEMU
- case ISDN_CTYPE_TESTEMU:
- ret = setup_testemu(card);
- break;
-#endif
-#if CARD_BKM_A4T
- case ISDN_CTYPE_BKM_A4T:
- ret = setup_bkm_a4t(card);
- break;
+ case ISDN_CTYPE_TESTEMU:
+ ret = setup_testemu(card);
+ break;
+#endif
+#if CARD_BKM_A4T
+ case ISDN_CTYPE_BKM_A4T:
+ ret = setup_bkm_a4t(card);
+ break;
X #endif
X #if CARD_SCT_QUADRO
- case ISDN_CTYPE_SCT_QUADRO:
- ret = setup_sct_quadro(card);
- break;
+ case ISDN_CTYPE_SCT_QUADRO:
+ ret = setup_sct_quadro(card);
+ break;
X #endif
X #if CARD_GAZEL
- case ISDN_CTYPE_GAZEL:
- ret = setup_gazel(card);
- break;
+ case ISDN_CTYPE_GAZEL:
+ ret = setup_gazel(card);
+ break;
X #endif
X #if CARD_W6692
- case ISDN_CTYPE_W6692:
- ret = setup_w6692(card);
- break;
+ case ISDN_CTYPE_W6692:
+ ret = setup_w6692(card);
+ break;
X #endif
X #if CARD_NETJET_U
- case ISDN_CTYPE_NETJET_U:
- ret = setup_netjet_u(card);
- break;
+ case ISDN_CTYPE_NETJET_U:
+ ret = setup_netjet_u(card);
+ break;
X #endif
- default:
- printk(KERN_WARNING
- "HiSax: Support for %s Card not selected\n",
- CardType[card->typ]);
- ll_unload(cs);
- restore_flags(flags);
- return (0);
- }
- } else {
+ default:
X printk(KERN_WARNING
- "HiSax: Card Type %d out of range\n",
- card->typ);
- restore_flags(flags);
- return (0);
+ "HiSax: Support for %s Card not selected\n",
+ CardType[card->typ]);
+ ll_unload(cs);
+ goto outf_cs;
X }
X if (!ret) {
X ll_unload(cs);
- restore_flags(flags);
- return (0);
+ goto outf_cs;
X }
X if (!(cs->rcvbuf = kmalloc(MAX_DFRAME_LEN_L1, GFP_ATOMIC))) {
- printk(KERN_WARNING
- "HiSax: No memory for isac rcvbuf\n");
- return (1);
+ printk(KERN_WARNING "HiSax: No memory for isac rcvbuf\n");
+ ll_unload(cs);
+ goto outf_cs;
X }
X cs->rcvidx = 0;


X cs->tx_skb = NULL;

@@ -1182,20 +1160,34 @@
X ret = init_card(cs);
X if (ret) {
X closecard(cardnr);
- restore_flags(flags);
- return (0);
+ ret = 0;
+ goto outf_cs;
X }
X init_tei(cs, cs->protocol);
- CallcNewChan(cs);
+ ret = CallcNewChan(cs);
+ if (ret) {
+ closecard(cardnr);
+ ret = 0;
+ goto outf_cs;
+ }
X /* ISAR needs firmware download first */
X if (!test_bit(HW_ISAR, &cs->HW_Flags))
X ll_run(cs, 0);


+
+ ret = 1;

+ goto out;
+
+ outf_dlog:
+ kfree(cs->dlog);
+ outf_cs:
+ kfree(cs);
+ card->cs = NULL;
+ out:
X restore_flags(flags);
- return (1);


+ return ret;
X }
X

-void
-HiSax_shiftcards(int idx)
+void HiSax_shiftcards(int idx)


X {
X int i;
X

@@ -1203,8 +1195,7 @@
X memcpy(&cards[i], &cards[i + 1], sizeof(cards[i]));
X }
X
-int
-HiSax_inithardware(int *busy_flag)
+int HiSax_inithardware(int *busy_flag)
X {
X int foundcards = 0;
X int i = 0;
@@ -1238,11 +1229,9 @@
X foundcards++;
X i++;
X } else {
- printk(KERN_WARNING "HiSax: Card %s not installed !\n",
+ printk(KERN_WARNING
+ "HiSax: Card %s not installed !\n",
X CardType[cards[i].typ]);
- if (cards[i].cs)
- kfree((void *) cards[i].cs);
- cards[i].cs = NULL;
X HiSax_shiftcards(i);
X nrcards--;
X }
@@ -1250,19 +1239,17 @@
X return foundcards;
X }
X
-void
-HiSax_closecard(int cardnr)
+void HiSax_closecard(int cardnr)
X {
- int i,last=nrcards - 1;
+ int i, last = nrcards - 1;
X
- if (cardnr>last)
+ if (cardnr > last)
X return;
X if (cards[cardnr].cs) {
X ll_stop(cards[cardnr].cs);
X release_tei(cards[cardnr].cs);
-
X CallcFreeChan(cards[cardnr].cs);
-
+
X closecard(cardnr);
X if (cards[cardnr].cs->irq)
X free_irq(cards[cardnr].cs->irq, cards[cardnr].cs);
@@ -1270,15 +1257,14 @@
X cards[cardnr].cs = NULL;
X }
X i = cardnr;
- while (i!=last) {
- cards[i] = cards[i+1];
+ while (i <= last) {
+ cards[i] = cards[i + 1];
X i++;
X }
X nrcards--;
X }
X
-void
-HiSax_reportcard(int cardnr, int sel)
+void HiSax_reportcard(int cardnr, int sel)
X {
X struct IsdnCardState *cs = cards[cardnr].cs;
X
@@ -1286,21 +1272,25 @@
X printk(KERN_DEBUG "HiSax: Type %s\n", CardType[cs->typ]);
X printk(KERN_DEBUG "HiSax: debuglevel %x\n", cs->debug);
X printk(KERN_DEBUG "HiSax: HiSax_reportcard address 0x%lX\n",
- (ulong) & HiSax_reportcard);
+ (ulong) & HiSax_reportcard);
X printk(KERN_DEBUG "HiSax: cs 0x%lX\n", (ulong) cs);
X printk(KERN_DEBUG "HiSax: HW_Flags %lx bc0 flg %lx bc1 flg %lx\n",
- cs->HW_Flags, cs->bcs[0].Flag, cs->bcs[1].Flag);
+ cs->HW_Flags, cs->bcs[0].Flag, cs->bcs[1].Flag);
X printk(KERN_DEBUG "HiSax: bcs 0 mode %d ch%d\n",
- cs->bcs[0].mode, cs->bcs[0].channel);
+ cs->bcs[0].mode, cs->bcs[0].channel);
X printk(KERN_DEBUG "HiSax: bcs 1 mode %d ch%d\n",
- cs->bcs[1].mode, cs->bcs[1].channel);
+ cs->bcs[1].mode, cs->bcs[1].channel);
X #ifdef ERROR_STATISTIC
X printk(KERN_DEBUG "HiSax: dc errors(rx,crc,tx) %d,%d,%d\n",
- cs->err_rx, cs->err_crc, cs->err_tx);
- printk(KERN_DEBUG "HiSax: bc0 errors(inv,rdo,crc,tx) %d,%d,%d,%d\n",
- cs->bcs[0].err_inv, cs->bcs[0].err_rdo, cs->bcs[0].err_crc, cs->bcs[0].err_tx);
- printk(KERN_DEBUG "HiSax: bc1 errors(inv,rdo,crc,tx) %d,%d,%d,%d\n",
- cs->bcs[1].err_inv, cs->bcs[1].err_rdo, cs->bcs[1].err_crc, cs->bcs[1].err_tx);
+ cs->err_rx, cs->err_crc, cs->err_tx);
+ printk(KERN_DEBUG
+ "HiSax: bc0 errors(inv,rdo,crc,tx) %d,%d,%d,%d\n",
+ cs->bcs[0].err_inv, cs->bcs[0].err_rdo, cs->bcs[0].err_crc,
+ cs->bcs[0].err_tx);
+ printk(KERN_DEBUG
+ "HiSax: bc1 errors(inv,rdo,crc,tx) %d,%d,%d,%d\n",
+ cs->bcs[1].err_inv, cs->bcs[1].err_rdo, cs->bcs[1].err_crc,
+ cs->bcs[1].err_tx);
X if (sel == 99) {
X cs->err_rx = 0;
X cs->err_crc = 0;
@@ -1319,19 +1309,32 @@
X
X static int __init HiSax_init(void)
X {
- int i,j;
+ int i, retval;
+#ifdef MODULE
+ int j;
X int nzproto = 0;
+#endif
X
X HiSaxVersion();
- CallcNew();
- Isdnl3New();
- Isdnl2New();
- TeiNew();
- Isdnl1New();
+ retval = CallcNew();
+ if (retval)
+ goto out;
+ retval = Isdnl3New();
+ if (retval)
+ goto out_callc;
+ retval = Isdnl2New();
+ if (retval)
+ goto out_isdnl3;
+ retval = TeiNew();
+ if (retval)
+ goto out_isdnl2;
+ retval = Isdnl1New();
+ if (retval)
+ goto out_tei;
X
X #ifdef MODULE
X if (!type[0]) {
- /* We 'll register drivers later, but init basic functions*/
+ /* We 'll register drivers later, but init basic functions */
X return 0;
X }
X #ifdef CONFIG_HISAX_ELSA
@@ -1370,98 +1373,100 @@
X nzproto++;
X }
X switch (type[i]) {
- case ISDN_CTYPE_16_0:
- cards[j].para[0] = irq[i];
- cards[j].para[1] = mem[i];
- cards[j].para[2] = io[i];
- break;
+ case ISDN_CTYPE_16_0:
+ cards[j].para[0] = irq[i];
+ cards[j].para[1] = mem[i];
+ cards[j].para[2] = io[i];
+ break;
X
- case ISDN_CTYPE_8_0:
- cards[j].para[0] = irq[i];
- cards[j].para[1] = mem[i];
- break;
+ case ISDN_CTYPE_8_0:
+ cards[j].para[0] = irq[i];
+ cards[j].para[1] = mem[i];
+ break;
X
X #ifdef IO0_IO1
- case ISDN_CTYPE_PNP:
- case ISDN_CTYPE_NICCY:
- cards[j].para[0] = irq[i];
- cards[j].para[1] = io0[i];
- cards[j].para[2] = io1[i];
- break;
- case ISDN_CTYPE_COMPAQ_ISA:
- cards[j].para[0] = irq[i];
- cards[j].para[1] = io0[i];
- cards[j].para[2] = io1[i];
- cards[j].para[3] = io[i];
- break;
-#endif
- case ISDN_CTYPE_ELSA:
- case ISDN_CTYPE_HFC_PCI:
- cards[j].para[0] = io[i];
- break;
- case ISDN_CTYPE_16_3:
- case ISDN_CTYPE_TELESPCMCIA:
- case ISDN_CTYPE_A1:
- case ISDN_CTYPE_A1_PCMCIA:
- case ISDN_CTYPE_ELSA_PNP:
- case ISDN_CTYPE_ELSA_PCMCIA:
- case ISDN_CTYPE_IX1MICROR2:
- case ISDN_CTYPE_DIEHLDIVA:
- case ISDN_CTYPE_ASUSCOM:
- case ISDN_CTYPE_TELEINT:
- case ISDN_CTYPE_SEDLBAUER:
- case ISDN_CTYPE_SEDLBAUER_PCMCIA:
- case ISDN_CTYPE_SEDLBAUER_FAX:
- case ISDN_CTYPE_SPORTSTER:
- case ISDN_CTYPE_MIC:
- case ISDN_CTYPE_TELES3C:
- case ISDN_CTYPE_ACERP10:
- case ISDN_CTYPE_S0BOX:
- case ISDN_CTYPE_FRITZPCI:
- case ISDN_CTYPE_HSTSAPHIR:
- case ISDN_CTYPE_GAZEL:
- case ISDN_CTYPE_HFC_SX:
- case ISDN_CTYPE_HFC_SP_PCMCIA:
- cards[j].para[0] = irq[i];
- cards[j].para[1] = io[i];
- break;
- case ISDN_CTYPE_ISURF:
+ case ISDN_CTYPE_PNP:
+ case ISDN_CTYPE_NICCY:
+ cards[j].para[0] = irq[i];
+ cards[j].para[1] = io0[i];
+ cards[j].para[2] = io1[i];
+ break;
+ case ISDN_CTYPE_COMPAQ_ISA:
+ cards[j].para[0] = irq[i];
+ cards[j].para[1] = io0[i];
+ cards[j].para[2] = io1[i];
+ cards[j].para[3] = io[i];
+ break;
+#endif
+ case ISDN_CTYPE_ELSA:
+ case ISDN_CTYPE_HFC_PCI:
+ cards[j].para[0] = io[i];
+ break;
+ case ISDN_CTYPE_16_3:
+ case ISDN_CTYPE_TELESPCMCIA:
+ case ISDN_CTYPE_A1:
+ case ISDN_CTYPE_A1_PCMCIA:
+ case ISDN_CTYPE_ELSA_PNP:
+ case ISDN_CTYPE_ELSA_PCMCIA:
+ case ISDN_CTYPE_IX1MICROR2:
+ case ISDN_CTYPE_DIEHLDIVA:
+ case ISDN_CTYPE_ASUSCOM:
+ case ISDN_CTYPE_TELEINT:
+ case ISDN_CTYPE_SEDLBAUER:
+ case ISDN_CTYPE_SEDLBAUER_PCMCIA:
+ case ISDN_CTYPE_SEDLBAUER_FAX:
+ case ISDN_CTYPE_SPORTSTER:
+ case ISDN_CTYPE_MIC:
+ case ISDN_CTYPE_TELES3C:
+ case ISDN_CTYPE_ACERP10:
+ case ISDN_CTYPE_S0BOX:
+ case ISDN_CTYPE_FRITZPCI:
+ case ISDN_CTYPE_HSTSAPHIR:
+ case ISDN_CTYPE_GAZEL:
+ case ISDN_CTYPE_HFC_SX:
+ case ISDN_CTYPE_HFC_SP_PCMCIA:
+ cards[j].para[0] = irq[i];
+ cards[j].para[1] = io[i];
+ break;
+ case ISDN_CTYPE_ISURF:
+ cards[j].para[0] = irq[i];
+ cards[j].para[1] = io[i];
+ cards[j].para[2] = mem[i];
+ break;
+ case ISDN_CTYPE_ELSA_PCI:
+ case ISDN_CTYPE_NETJET_S:
+ case ISDN_CTYPE_AMD7930:
+ case ISDN_CTYPE_TELESPCI:
+ case ISDN_CTYPE_W6692:
+ case ISDN_CTYPE_NETJET_U:
+ break;
+ case ISDN_CTYPE_BKM_A4T:
+ break;
+ case ISDN_CTYPE_SCT_QUADRO:
+ if (irq[i]) {
X cards[j].para[0] = irq[i];
- cards[j].para[1] = io[i];
- cards[j].para[2] = mem[i];
- break;
- case ISDN_CTYPE_ELSA_PCI:
- case ISDN_CTYPE_NETJET_S:
- case ISDN_CTYPE_AMD7930:
- case ISDN_CTYPE_TELESPCI:
- case ISDN_CTYPE_W6692:
- case ISDN_CTYPE_NETJET_U:
- break;
- case ISDN_CTYPE_BKM_A4T:
- break;
- case ISDN_CTYPE_SCT_QUADRO:
- if (irq[i]) {
- cards[j].para[0] = irq[i];
- } else {
- /* QUADRO is a 4 BRI card */
- cards[j++].para[0] = 1;
- cards[j].typ = ISDN_CTYPE_SCT_QUADRO;
- cards[j].protocol = protocol[i];
- cards[j++].para[0] = 2;
- cards[j].typ = ISDN_CTYPE_SCT_QUADRO;
- cards[j].protocol = protocol[i];
- cards[j++].para[0] = 3;
- cards[j].typ = ISDN_CTYPE_SCT_QUADRO;
- cards[j].protocol = protocol[i];
- cards[j].para[0] = 4;
- }
- break;
+ } else {
+ /* QUADRO is a 4 BRI card */
+ cards[j++].para[0] = 1;
+ cards[j].typ = ISDN_CTYPE_SCT_QUADRO;
+ cards[j].protocol = protocol[i];
+ cards[j++].para[0] = 2;
+ cards[j].typ = ISDN_CTYPE_SCT_QUADRO;
+ cards[j].protocol = protocol[i];
+ cards[j++].para[0] = 3;
+ cards[j].typ = ISDN_CTYPE_SCT_QUADRO;
+ cards[j].protocol = protocol[i];
+ cards[j].para[0] = 4;
+ }
+ break;
X }
X j++;
X }
X if (!nzproto) {
- printk(KERN_WARNING "HiSax: Warning - no protocol specified\n");
- printk(KERN_WARNING "HiSax: using protocol %s\n", DEFAULT_PROTO_NAME);
+ printk(KERN_WARNING
+ "HiSax: Warning - no protocol specified\n");
+ printk(KERN_WARNING "HiSax: using protocol %s\n",
+ DEFAULT_PROTO_NAME);
X }
X #endif
X if (!HiSax_id)
@@ -1474,27 +1479,36 @@
X printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
X nrcards, (nrcards > 1) ? "s" : "");
X
- if (HiSax_inithardware(NULL)) {
- /* Install only, if at least one card found */
- return (0);
- } else {
- Isdnl1Free();
- TeiFree();
- Isdnl2Free();
- Isdnl3Free();
- CallcFree();
- return -EIO;
+ /* Install only, if at least one card found */
+ if (!HiSax_inithardware(NULL)) {
+ retval = -EIO;
+ goto out_isdnl1;
X }


+
+ return 0;
+

+ out_isdnl1:
+ Isdnl1Free();
+ out_tei:
+ TeiFree();
+ out_isdnl2:
+ Isdnl2Free();
+ out_isdnl3:
+ Isdnl3Free();
+ out_callc:
+ CallcFree();
+ out:
+ return retval;
X }
X
X static void HiSax_exit(void)
X {
- int cardnr = nrcards -1;
+ int cardnr = nrcards - 1;
X long flags;


X
X save_flags(flags);
X cli();

- while(cardnr>=0)
+ while (cardnr >= 0)
X HiSax_closecard(cardnr--);
X Isdnl1Free();
X TeiFree();
@@ -1514,7 +1528,7 @@
X nrcards = 0;
X /* Initialize all structs, even though we only accept
X two pcmcia cards
- */
+ */
X for (i = 0; i < HISAX_MAX_CARDS; i++) {
X cards[i].para[0] = irq[i];
X cards[i].para[1] = io[i];
@@ -1524,7 +1538,7 @@
X }
X }
X cards[0].para[0] = pcm_irq;
- cards[0].para[1] = (int)pcm_iob;
+ cards[0].para[1] = (int) pcm_iob;
X cards[0].protocol = prot;
X cards[0].typ = ISDN_CTYPE_ELSA_PCMCIA;


X
@@ -1541,7 +1555,7 @@

X HiSax_inithardware(busy_flag);
X printk(KERN_NOTICE "HiSax: module installed\n");
X #endif
- return (0);
+ return 0;
X }
X #endif
X
@@ -1555,7 +1569,7 @@
X nrcards = 0;
X /* Initialize all structs, even though we only accept
X two pcmcia cards
- */
+ */
X for (i = 0; i < HISAX_MAX_CARDS; i++) {
X cards[i].para[0] = irq[i];
X cards[i].para[1] = io[i];
@@ -1566,7 +1580,7 @@
X }
X }
X cards[0].para[0] = pcm_irq;
- cards[0].para[1] = (int)pcm_iob;
+ cards[0].para[1] = (int) pcm_iob;
X cards[0].protocol = prot;
X cards[0].typ = ISDN_CTYPE_HFC_SP_PCMCIA;
X nzproto = 1;
@@ -1584,7 +1598,7 @@
X HiSax_inithardware(busy_flag);
X printk(KERN_NOTICE "HiSax: module installed\n");
X #endif
- return (0);
+ return 0;
X }
X #endif
X
@@ -1598,7 +1612,7 @@
X nrcards = 0;
X /* Initialize all structs, even though we only accept
X two pcmcia cards
- */
+ */
X for (i = 0; i < HISAX_MAX_CARDS; i++) {
X cards[i].para[0] = irq[i];
X cards[i].para[1] = io[i];


@@ -1609,7 +1623,7 @@
X }

X }
X cards[0].para[0] = pcm_irq;
- cards[0].para[1] = (int)pcm_iob;
+ cards[0].para[1] = (int) pcm_iob;
X cards[0].protocol = prot;
X cards[0].typ = ISDN_CTYPE_SEDLBAUER_PCMCIA;
X nzproto = 1;
@@ -1627,7 +1641,7 @@
X HiSax_inithardware(busy_flag);
X printk(KERN_NOTICE "HiSax: module installed\n");
X #endif
- return (0);
+ return 0;
X }
X #endif
X
@@ -1641,7 +1655,7 @@
X nrcards = 0;
X /* Initialize all structs, even though we only accept
X two pcmcia cards
- */
+ */
X for (i = 0; i < HISAX_MAX_CARDS; i++) {
X cards[i].para[0] = irq[i];
X cards[i].para[1] = io[i];
@@ -1652,7 +1666,7 @@
X }
X }
X cards[0].para[0] = pcm_irq;
- cards[0].para[1] = (int)pcm_iob;
+ cards[0].para[1] = (int) pcm_iob;
X cards[0].protocol = prot;
X cards[0].typ = ISDN_CTYPE_A1_PCMCIA;
X nzproto = 1;
@@ -1670,11 +1684,12 @@
X HiSax_inithardware(busy_flag);
X printk(KERN_NOTICE "HiSax: module installed\n");
X #endif
- return (0);
+ return 0;
X }
X #endif
X
-int hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card)
+int hisax_init_pcmcia(void *pcm_iob, int *busy_flag,
+ struct IsdnCard *card)
X {
X u_char ids[16];
X int ret = -1;
@@ -1685,11 +1700,11 @@
X else
X sprintf(ids, "HiSax");
X if (!checkcard(nrcards, ids, busy_flag)) {
- return(-1);
+ return -1;
X }
X ret = nrcards;
X nrcards++;
- return (ret);


+ return ret;
X }
X

X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/diva.c linux/drivers/isdn/hisax/diva.c
--- v2.2.19/drivers/isdn/hisax/diva.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/diva.c Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: diva.c,v 1.25.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: diva.c,v 1.25.6.4 2001/02/16 16:43:25 kai Exp $
X *
X * diva.c low level stuff for Eicon.Diehl Diva Family ISDN cards


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE

+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *

@@ -25,7 +25,7 @@


X
X extern const char *CardType[];
X

-const char *Diva_revision = "$Revision: 1.25.6.3 $";
+const char *Diva_revision = "$Revision: 1.25.6.4 $";


X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/elsa.c linux/drivers/isdn/hisax/elsa.c
--- v2.2.19/drivers/isdn/hisax/elsa.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/elsa.c Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: elsa.c,v 2.26.6.2 2001/02/13 10:33:58 kai Exp $
+/* $Id: elsa.c,v 2.26.6.5 2001/07/18 16:25:12 kai Exp $
X *
X * elsa.c low level stuff for Elsa isdn cards


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE

+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *

@@ -31,7 +31,7 @@


X
X extern const char *CardType[];
X

-const char *Elsa_revision = "$Revision: 2.26.6.2 $";
+const char *Elsa_revision = "$Revision: 2.26.6.5 $";
X const char *Elsa_Types[] =
X {"None", "PC", "PCC-8", "PCC-16", "PCF", "PCF-Pro",
X "PCMCIA", "QS 1000", "QS 3000", "Microlink PCI", "QS 3000 PCI",
@@ -591,13 +591,13 @@
X if (cs->subtyp==ELSA_QS1000) {
X cs->subtyp = ELSA_QS3000;
X printk(KERN_INFO
- "Elsa: %s detected modem at 0x%x\n",
+ "Elsa: %s detected modem at 0x%lx\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base+8);
X release_region(cs->hw.elsa.base, 8);
X if (check_region(cs->hw.elsa.base, 16)) {


X printk(KERN_WARNING
- "HiSax: %s config port %x-%x already in use\n",

+ "HiSax: %s config port %lx-%lx already in use\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base + 8,
X cs->hw.elsa.base + 16);
@@ -607,13 +607,13 @@
X } else if (cs->subtyp==ELSA_PCC16) {
X cs->subtyp = ELSA_PCF;
X printk(KERN_INFO
- "Elsa: %s detected modem at 0x%x\n",
+ "Elsa: %s detected modem at 0x%lx\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base+8);
X release_region(cs->hw.elsa.base, 8);
X if (check_region(cs->hw.elsa.base, 16)) {


X printk(KERN_WARNING
- "HiSax: %s config port %x-%x already in use\n",

+ "HiSax: %s config port %lx-%lx already in use\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base + 8,
X cs->hw.elsa.base + 16);
@@ -622,7 +622,7 @@
X "elsa isdn modem");
X } else
X printk(KERN_INFO
- "Elsa: %s detected modem at 0x%x\n",
+ "Elsa: %s detected modem at 0x%lx\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base+8);
X arcofi_fsm(cs, ARCOFI_START, &ARCOFI_XOP_0);
@@ -882,7 +882,7 @@
X if (!(cs->subtyp = probe_elsa_adr(cs->hw.elsa.base,
X cs->typ))) {
X printk(KERN_WARNING
- "Elsa: no Elsa Microlink at 0x%x\n",
+ "Elsa: no Elsa Microlink at %#lx\n",
X cs->hw.elsa.base);
X return (0);
X }
@@ -920,7 +920,7 @@
X if ((cs->subtyp == ELSA_PCFPRO) && (val = 'G'))
X val = 'C';
X printk(KERN_INFO
- "Elsa: %s found at 0x%x Rev.:%c IRQ %d\n",
+ "Elsa: %s found at %#lx Rev.:%c IRQ %d\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base,
X val, cs->irq);
@@ -947,7 +947,7 @@
X cs->hw.elsa.timer = cs->hw.elsa.base + ELSA_START_TIMER;
X cs->hw.elsa.ctrl = cs->hw.elsa.base + ELSA_CONTROL;
X printk(KERN_INFO
- "Elsa: %s defined at 0x%x IRQ %d\n",
+ "Elsa: %s defined at %#lx IRQ %d\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base,
X cs->irq);
@@ -971,7 +971,7 @@
X cs->hw.elsa.trig = 0;
X cs->hw.elsa.ctrl = 0;
X printk(KERN_INFO
- "Elsa: %s defined at 0x%x IRQ %d\n",
+ "Elsa: %s defined at %#lx IRQ %d\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base,
X cs->irq);
@@ -1029,7 +1029,7 @@
X cs->hw.elsa.trig = 0;
X cs->irq_flags |= SA_SHIRQ;
X printk(KERN_INFO
- "Elsa: %s defined at 0x%x/0x%x IRQ %d\n",
+ "Elsa: %s defined at %#lx/0x%x IRQ %d\n",
X Elsa_Types[cs->subtyp],
X cs->hw.elsa.base,
X cs->hw.elsa.cfg,
@@ -1069,7 +1069,7 @@
X here, it would fail. */
X if (cs->typ != ISDN_CTYPE_ELSA_PCMCIA && check_region(cs->hw.elsa.base, bytecnt)) {


X printk(KERN_WARNING
- "HiSax: %s config port %x-%x already in use\n",
+ "HiSax: %s config port %#lx-%#lx already in use\n",
X CardType[card->typ],

X cs->hw.elsa.base,
X cs->hw.elsa.base + bytecnt);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/elsa_ser.c linux/drivers/isdn/hisax/elsa_ser.c
--- v2.2.19/drivers/isdn/hisax/elsa_ser.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/elsa_ser.c Wed Oct 10 01:40:51 2001
@@ -1,8 +1,8 @@
-/* $Id: elsa_ser.c,v 2.10 2000/11/19 17:02:47 kai Exp $
+/* $Id: elsa_ser.c,v 2.10.6.2 2001/06/09 15:14:17 kai Exp $
X *
X * stuff for the serial modem on ELSA cards


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X #include <linux/config.h>
@@ -439,8 +439,6 @@
X void
X close_elsastate(struct BCState *bcs)


X {
- struct sk_buff *skb;

-
X modehscx(bcs, 0, bcs->channel);


X if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) {

X if (bcs->hw.hscx.rcvbuf) {
@@ -448,12 +446,8 @@
X kfree(bcs->hw.hscx.rcvbuf);
X bcs->hw.hscx.rcvbuf = NULL;
X }
- while ((skb = skb_dequeue(&bcs->rqueue))) {
- dev_kfree_skb(skb);
- }
- while ((skb = skb_dequeue(&bcs->squeue))) {
- dev_kfree_skb(skb);
- }


+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/fsm.c linux/drivers/isdn/hisax/fsm.c
--- v2.2.19/drivers/isdn/hisax/fsm.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/fsm.c Wed Oct 10 01:40:51 2001
@@ -1,4 +1,4 @@
-/* $Id: fsm.c,v 1.14 2000/11/24 17:05:37 kai Exp $
+/* $Id: fsm.c,v 1.14.6.2 2001/05/26 15:19:57 kai Exp $
X *


X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden

@@ -6,7 +6,7 @@
X * Thanks to Jan den Ouden
X * Fritz Elfert


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X #define __NO_VERSION__
@@ -15,13 +15,16 @@
X
X #define FSM_TIMER_DEBUG 0


X
-void __init
+int __init

X FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount)


X {
X int i;
X

X fsm->jumpmatrix = (FSMFNPTR *)
X kmalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL);
+ if (!fsm->jumpmatrix)
+ return -ENOMEM;
+
X memset(fsm->jumpmatrix, 0, sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count);
X
X for (i = 0; i < fncount; i++)
@@ -32,6 +35,7 @@
X } else
X fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
X fnlist[i].state] = (FSMFNPTR) fnlist[i].routine;
+ return 0;
X }
X
X void
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/gazel.c linux/drivers/isdn/hisax/gazel.c
--- v2.2.19/drivers/isdn/hisax/gazel.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/gazel.c Wed Oct 10 01:40:51 2001
@@ -1,11 +1,11 @@
-/* $Id: gazel.c,v 2.11.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: gazel.c,v 2.11.6.6 2001/06/08 08:48:46 kai Exp $
X *
X * gazel.c low level stuff for Gazel isdn cards
X *
X * Author BeWan Systems
X * based on source code from Karsten Keil


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X #include <linux/config.h>
@@ -20,7 +20,7 @@


X #include <linux/isdn_compat.h>
X
X extern const char *CardType[];

-const char *gazel_revision = "$Revision: 2.11.6.3 $";
+const char *gazel_revision = "$Revision: 2.11.6.6 $";
X
X #define R647 1
X #define R685 2
@@ -440,10 +440,6 @@
X reserve_regions(struct IsdnCard *card, struct IsdnCardState *cs)
X {
X unsigned int i, base = 0, adr = 0, len = 0;
- long flags;


-
- save_flags(flags);
- cli();

X
X switch (cs->subtyp) {
X case R647:
@@ -488,17 +484,15 @@
X break;
X }
X
- restore_flags(flags);
X return 0;
X
X error:
- restore_flags(flags);
X printk(KERN_WARNING "Gazel: %s io ports 0x%x-0x%x already in use\n",
X CardType[cs->typ], adr, adr + len);
X return 1;
X }
X
-static int
+static int __init
X setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
X {
X printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n");
@@ -547,7 +541,7 @@
X
X static struct pci_dev *dev_tel __initdata = NULL;
X
-static int
+static int __init
X setup_gazelpci(struct IsdnCardState *cs)
X {
X u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_2bds0.c linux/drivers/isdn/hisax/hfc_2bds0.c
--- v2.2.19/drivers/isdn/hisax/hfc_2bds0.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/hfc_2bds0.c Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bds0.c,v 1.15 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfc_2bds0.c,v 1.15.6.2 2001/06/09 15:14:17 kai Exp $
X *
X * specific routines for CCD's HFC 2BDS0


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X #define __NO_VERSION__
@@ -568,8 +568,8 @@
X {
X mode_2bs0(bcs, 0, bcs->channel);


X if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) {
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_2bds0.h linux/drivers/isdn/hisax/hfc_2bds0.h
--- v2.2.19/drivers/isdn/hisax/hfc_2bds0.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/hfc_2bds0.h Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bds0.h,v 1.4 2000/06/26 08:59:12 keil Exp $
+/* $Id: hfc_2bds0.h,v 1.4.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * specific defines for CCD's HFC 2BDS0


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_2bs0.c linux/drivers/isdn/hisax/hfc_2bs0.c
--- v2.2.19/drivers/isdn/hisax/hfc_2bs0.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/hfc_2bs0.c Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bs0.c,v 1.17 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfc_2bs0.c,v 1.17.6.2 2001/06/09 15:14:17 kai Exp $
X *
X * specific routines for CCD's HFC 2BS0


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X

@@ -532,8 +532,8 @@
X {
X mode_hfc(bcs, 0, bcs->channel);
X if (test_bit(BC_FLG_INIT, &bcs->Flag)) {


- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_2bs0.h linux/drivers/isdn/hisax/hfc_2bs0.h
--- v2.2.19/drivers/isdn/hisax/hfc_2bs0.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/hfc_2bs0.h Wed Oct 10 01:40:51 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bs0.h,v 1.3 2000/06/26 08:59:13 keil Exp $
+/* $Id: hfc_2bs0.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
X *
X * specific defines for CCD's HFC 2BS0


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_pci.c linux/drivers/isdn/hisax/hfc_pci.c
--- v2.2.19/drivers/isdn/hisax/hfc_pci.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/hfc_pci.c Wed Oct 10 01:40:51 2001
@@ -1,11 +1,12 @@
-/* $Id: hfc_pci.c,v 1.34.6.4 2001/02/13 10:33:58 kai Exp $
+/* $Id: hfc_pci.c,v 1.34.6.7 2001/07/27 09:08:27 kai Exp $
X
X * hfc_pci.c low level driver for CCD´s hfc-pci based cards
X *
X * Author Werner Cornelius (wer...@isdn4linux.de)
X * based on existing driver for CCD hfc ISA cards
+ * type approval valid for HFC-S PCI A based card
X *
- * Copyright 1999 by Werner Cornelius (wer...@isdn4linux.de)
+ * Copyright 1999 by Werner Cornelius (wer...@isdn-development.de)
X * Copyright 1999 by Karsten Keil (ke...@isdn4linux.de)
X *
X * This program is free software; you can redistribute it and/or modify
@@ -36,7 +37,7 @@


X
X extern const char *CardType[];
X

-static const char *hfcpci_revision = "$Revision: 1.34.6.4 $";
+static const char *hfcpci_revision = "$Revision: 1.34.6.7 $";
X
X /* table entry in the PCI devices list */
X typedef struct {
@@ -236,6 +237,59 @@
X return (NULL);
X }
X
+/***************************************/
+/* clear the desired B-channel rx fifo */
+/***************************************/
+static void hfcpci_clear_fifo_rx(struct IsdnCardState *cs, int fifo)
+{ u_char fifo_state;
+ bzfifo_type *bzr;
+
+ if (fifo) {
+ bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2;
+ fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B2RX;
+ } else {
+ bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b1;
+ fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B1RX;
+ }
+ if (fifo_state)
+ cs->hw.hfcpci.fifo_en ^= fifo_state;
+ Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en);
+ cs->hw.hfcpci.last_bfifo_cnt[fifo] = 0;
+ bzr->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1;
+ bzr->za[MAX_B_FRAMES].z2 = bzr->za[MAX_B_FRAMES].z1;
+ bzr->f1 = MAX_B_FRAMES;
+ bzr->f2 = bzr->f1; /* init F pointers to remain constant */
+ if (fifo_state)
+ cs->hw.hfcpci.fifo_en |= fifo_state;
+ Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en);
+}
+
+/***************************************/
+/* clear the desired B-channel tx fifo */
+/***************************************/
+static void hfcpci_clear_fifo_tx(struct IsdnCardState *cs, int fifo)
+{ u_char fifo_state;
+ bzfifo_type *bzt;
+
+ if (fifo) {
+ bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b2;
+ fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B2TX;
+ } else {
+ bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b1;
+ fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B1TX;
+ }
+ if (fifo_state)
+ cs->hw.hfcpci.fifo_en ^= fifo_state;
+ Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en);
+ bzt->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1;
+ bzt->za[MAX_B_FRAMES].z2 = bzt->za[MAX_B_FRAMES].z1;
+ bzt->f1 = MAX_B_FRAMES;
+ bzt->f2 = bzt->f1; /* init F pointers to remain constant */
+ if (fifo_state)
+ cs->hw.hfcpci.fifo_en |= fifo_state;
+ Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en);
+}
+
X /*********************************************/
X /* read a complete B-frame out of the buffer */
X /*********************************************/
@@ -429,7 +483,7 @@
X {
X long flags;
X struct IsdnCardState *cs = bcs->cs;
- int rcnt;
+ int rcnt, real_fifo;
X int receive, count = 5;
X struct sk_buff *skb;
X bzfifo_type *bz;
@@ -441,9 +495,11 @@
X if ((bcs->channel) && (!cs->hw.hfcpci.bswapped)) {
X bz = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2;
X bdata = ((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxdat_b2;
+ real_fifo = 1;
X } else {
X bz = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b1;
X bdata = ((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxdat_b1;
+ real_fifo = 0;
X }
X Begin:
X count--;
@@ -476,6 +532,11 @@
X rcnt = bz->f1 - bz->f2;
X if (rcnt < 0)
X rcnt += MAX_B_FRAMES + 1;
+ if (cs->hw.hfcpci.last_bfifo_cnt[real_fifo] > rcnt + 1) {
+ rcnt = 0;
+ hfcpci_clear_fifo_rx(cs, real_fifo);
+ }
+ cs->hw.hfcpci.last_bfifo_cnt[real_fifo] = rcnt;
X if (rcnt > 1)
X receive = 1;
X else
@@ -1173,7 +1234,7 @@
X l1_msg(cs, HW_POWERUP | CONFIRM, NULL);
X break;
X case (HW_ENABLE | REQUEST):
- Write_hfc(cs, HFCPCI_STATES, HFCPCI_ACTIVATE | HFCPCI_DO_ACTION);
+ Write_hfc(cs, HFCPCI_STATES, HFCPCI_DO_ACTION);
X break;
X case (HW_DEACTIVATE | REQUEST):
X cs->hw.hfcpci.mst_m &= ~HFCPCI_MASTER;
@@ -1254,7 +1315,6 @@
X mode_hfcpci(struct BCState *bcs, int mode, int bc)
X {
X struct IsdnCardState *cs = bcs->cs;
- bzfifo_type *bzr, *bzt;
X int flags, fifo2;
X
X if (cs->debug & L1_DEB_HSCX)
@@ -1301,6 +1361,8 @@
X }
X break;
X case (L1_MODE_TRANS):
+ hfcpci_clear_fifo_rx(cs, fifo2);
+ hfcpci_clear_fifo_tx(cs, fifo2);
X if (bc) {
X cs->hw.hfcpci.sctrl |= SCTRL_B2_ENA;
X cs->hw.hfcpci.sctrl_r |= SCTRL_B2_ENA;
@@ -1313,26 +1375,16 @@
X cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B2TRANS + HFCPCI_INTS_B2REC);
X cs->hw.hfcpci.ctmt |= 2;
X cs->hw.hfcpci.conn &= ~0x18;
- bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2;
- bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b2;
X } else {
X cs->hw.hfcpci.fifo_en |= HFCPCI_FIFOEN_B1;
X cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B1TRANS + HFCPCI_INTS_B1REC);
X cs->hw.hfcpci.ctmt |= 1;
X cs->hw.hfcpci.conn &= ~0x03;
- bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b1;
- bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b1;
X }
- bzr->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1;
- bzr->za[MAX_B_FRAMES].z2 = bzr->za[MAX_B_FRAMES].z1;
- bzr->f1 = MAX_B_FRAMES;
- bzr->f2 = bzr->f1; /* init F pointers to remain constant */
- bzt->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1;
- bzt->za[MAX_B_FRAMES].z2 = bzt->za[MAX_B_FRAMES].z1;
- bzt->f1 = MAX_B_FRAMES;
- bzt->f2 = bzt->f1; /* init F pointers to remain constant */
X break;
X case (L1_MODE_HDLC):
+ hfcpci_clear_fifo_rx(cs, fifo2);
+ hfcpci_clear_fifo_tx(cs, fifo2);
X if (bc) {
X cs->hw.hfcpci.sctrl |= SCTRL_B2_ENA;
X cs->hw.hfcpci.sctrl_r |= SCTRL_B2_ENA;
@@ -1341,11 +1393,13 @@
X cs->hw.hfcpci.sctrl_r |= SCTRL_B1_ENA;
X }
X if (fifo2) {
+ cs->hw.hfcpci.last_bfifo_cnt[1] = 0;
X cs->hw.hfcpci.fifo_en |= HFCPCI_FIFOEN_B2;
X cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B2TRANS + HFCPCI_INTS_B2REC);
X cs->hw.hfcpci.ctmt &= ~2;
X cs->hw.hfcpci.conn &= ~0x18;
X } else {
+ cs->hw.hfcpci.last_bfifo_cnt[0] = 0;
X cs->hw.hfcpci.fifo_en |= HFCPCI_FIFOEN_B1;
X cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B1TRANS + HFCPCI_INTS_B1REC);
X cs->hw.hfcpci.ctmt &= ~1;
@@ -1445,8 +1499,8 @@
X {
X mode_hfcpci(bcs, 0, bcs->channel);


X if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) {
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;

@@ -1634,7 +1688,8 @@
X
X #endif /* CONFIG_PCI */
X
-int __init setup_hfcpci(struct IsdnCard *card)
+int __init
+setup_hfcpci(struct IsdnCard *card)
X {
X struct IsdnCardState *cs = card->cs;
X char tmp[64];
@@ -1646,7 +1701,7 @@
X #endif
X strcpy(tmp, hfcpci_revision);
X printk(KERN_INFO "HiSax: HFC-PCI driver Rev. %s\n", HiSax_getrev(tmp));
-#ifdef CONFIG_PCI
+#if CONFIG_PCI
X cs->hw.hfcpci.int_s1 = 0;
X cs->dc.hfcpci.ph_state = 0;
X cs->hw.hfcpci.fifo = 255;
@@ -1660,6 +1715,7 @@
X if (tmp_hfcpci) {
X if (pci_enable_device(tmp_hfcpci))
X continue;
+ pci_set_master(tmp_hfcpci);
X if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->base_address[ 0] & PCI_BASE_ADDRESS_IO_MASK)))
X continue;
X else
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_pci.h linux/drivers/isdn/hisax/hfc_pci.h
--- v2.2.19/drivers/isdn/hisax/hfc_pci.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/hfc_pci.h Wed Oct 10 01:40:51 2001
@@ -1,4 +1,4 @@
-/* $Id: hfc_pci.h,v 1.8 2000/06/26 08:59:13 keil Exp $
+/* $Id: hfc_pci.h,v 1.8.6.1 2001/04/08 19:32:26 kai Exp $
X *
X * specific defines for CCD's HFC 2BDS0 PCI chips
X *
@@ -178,6 +178,9 @@
X #define HFCPCI_FIFOEN_B1 0x03
X #define HFCPCI_FIFOEN_B2 0x0C
X #define HFCPCI_FIFOEN_DTX 0x10
+#define HFCPCI_FIFOEN_B1TX 0x01
+#define HFCPCI_FIFOEN_B1RX 0x02
+#define HFCPCI_FIFOEN_B2TX 0x04
X #define HFCPCI_FIFOEN_B2RX 0x08
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/hfc_sx.c linux/drivers/isdn/hisax/hfc_sx.c
--- v2.2.19/drivers/isdn/hisax/hfc_sx.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/hfc_sx.c Wed Oct 10 01:40:51 2001
@@ -1,4 +1,4 @@
-/* $Id: hfc_sx.c,v 1.9 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfc_sx.c,v 1.9.6.2 2001/07/18 16:25:12 kai Exp $
X
X * hfc_sx.c low level driver for CCD´s hfc-s+/sp based cards


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 17'
echo 'File patch-2.2.20 is continued in part 18'
echo "18" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:15 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part16

#!/bin/sh -x
# this is part 16 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 16; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- * - Added CAPI2.0 Middleware support (CONFIG_ISDN_CAPI)
- * It is now possible to create a connection with a CAPI2.0 applikation
- * and than to handle the data connection from /dev/capi/ (capifs) and also
- * using async or sync PPP on this connection.
- * The two major device number 190 and 191 are not confirmed yet,
- * but I want to save the code in cvs, before I go on.
- *


X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capiutil.c linux/drivers/isdn/avmb1/capiutil.c
--- v2.2.19/drivers/isdn/avmb1/capiutil.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capiutil.c Wed Oct 10 01:40:49 2001
@@ -1,91 +1,11 @@
X /*
- * $Id: capiutil.c,v 1.13.6.1 2001/02/13 11:43:29 kai Exp $
+ * $Id: capiutil.c,v 1.13.6.3 2001/05/17 20:41:51 kai Exp $
X *
X * CAPI 2.0 convert capi message to capi message struct
X *
X * From CAPI 2.0 Development Kit AVM 1995 (msg.c)
X * Rewritten for Linux 1996 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: capiutil.c,v $
- * Revision 1.13.6.1 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.13 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.12 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.11 2000/03/03 15:50:42 calle
- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.
- *
- * Revision 1.10 1999/08/31 11:19:54 paul
- * various spelling corrections (new checksums may be needed, Karsten!)
- *
- * Revision 1.9 1999/07/09 15:05:46 keil


- * compat.h is now isdn_compat.h
- *

- * Revision 1.8 1999/07/01 15:26:37 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *

- * Revision 1.7 1999/07/01 08:23:01 keil
- * compatibility macros now in <linux/isdn_compat.h>
- *
- * Revision 1.6 1997/11/04 06:12:12 calle
- * capi.c: new read/write in file_ops since 2.1.60
- * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware.
- * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON)
- * compat.h: added #define LinuxVersionCode
- *
- * Revision 1.5 1997/10/01 09:21:19 fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.4 1997/08/10 07:43:55 calle
- * forgot to export symbol capi_info2str for 2.1.x
- *
- * Revision 1.3 1997/05/18 09:24:18 calle
- * added verbose disconnect reason reporting to avmb1.
- * some fixes in capi20 interface.
- * changed info messages for B1-PCI
- *
- * Revision 1.2 1997/03/05 21:22:13 fritz
- * Fix: Symbols have to be exported unconditionally.
- *
- * Revision 1.1 1997/03/04 21:50:34 calle
- * Frirst version in isdn4linux
- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *
- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision
- *
X */
X #include <linux/module.h>
X #include <linux/string.h>
@@ -96,7 +16,7 @@
X #include <linux/init.h>
X #include <asm/segment.h>
X #include <linux/config.h>
-
+#include <linux/isdn_compat.h>
X #include "capiutil.h"
X
X /* from CAPI2.0 DDK AVM Berlin GmbH */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capiutil.h linux/drivers/isdn/avmb1/capiutil.h
--- v2.2.19/drivers/isdn/avmb1/capiutil.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capiutil.h Wed Oct 10 01:40:49 2001
@@ -1,45 +1,10 @@
X /*
- * $Id: capiutil.h,v 1.5 2000/03/03 15:50:42 calle Exp $
+ * $Id: capiutil.h,v 1.5.6.1 2001/05/17 20:41:51 kai Exp $
X *
X * CAPI 2.0 defines & types
X *
X * From CAPI 2.0 Development Kit AVM 1995 (capi20.h)
X * Rewritten for Linux 1996 by Carsten Paeth (ca...@calle.in-berlin.de)
- *
- * $Log: capiutil.h,v $
- * Revision 1.5 2000/03/03 15:50:42 calle
- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.
- *
- * Revision 1.4 1999/09/15 08:16:03 calle


- * Implementation of 64Bit extention complete.
- *

- * Revision 1.3 1999/09/07 09:02:53 calle


- * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
- * DATA_B3_IND is always directly after the CAPI message. The "Data" member
- * ist never used inside the kernel.
- *

- * Revision 1.2 1997/05/18 09:24:19 calle
- * added verbose disconnect reason reporting to avmb1.
- * some fixes in capi20 interface.
- * changed info messages for B1-PCI
- *
- * Revision 1.1 1997/03/04 21:50:35 calle
- * Frirst version in isdn4linux
- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *
- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision
- *
X *
X */
X #ifndef __CAPIUTIL_H__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/kcapi.c linux/drivers/isdn/avmb1/kcapi.c
--- v2.2.19/drivers/isdn/avmb1/kcapi.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/kcapi.c Wed Oct 10 01:40:49 2001
@@ -1,119 +1,10 @@
X /*
- * $Id: kcapi.c,v 1.21.6.2 2001/02/13 11:43:29 kai Exp $
+ * $Id: kcapi.c,v 1.21.6.7 2001/06/09 15:14:15 kai Exp $
X *
X * Kernel CAPI 2.0 Module


X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *

- * $Log: kcapi.c,v $
- * Revision 1.21.6.2 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.21.6.1 2000/12/10 23:39:19 kai
- * in 2.4 we don't have tq_scheduler anymore.
- * also add one supported card to hfc_pci.c
- * (from main branch)
- *
- * Revision 1.21 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.20 2000/11/19 17:01:53 kai


- * compatibility cleanup - part 2
- *

- * Revision 1.19 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.18 2000/07/20 10:22:27 calle
- * - Made procfs function cleaner and removed variable "begin".
- *
- * Revision 1.17 2000/04/21 13:00:56 calle
- * Bugfix: driver_proc_info was also wrong.
- *
- * Revision 1.16 2000/04/21 12:38:42 calle
- * Bugfix: error in proc_ functions, begin-off => off-begin
- *
- * Revision 1.15 2000/04/06 15:01:25 calle
- * Bugfix: crash in capidrv.c when reseting a capi controller.
- * - changed code order on remove of controller.
- * - using tq_schedule for notifier in kcapi.c.
- * - now using spin_lock_irqsave() and spin_unlock_irqrestore().
- * strange: sometimes even MP hang on unload of isdn.o ...
- *
- * Revision 1.14 2000/04/03 13:29:25 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.13 2000/03/03 15:50:42 calle
- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.
- *
- * Revision 1.12 2000/01/28 16:45:39 calle
- * new manufacturer command KCAPI_CMD_ADDCARD (generic addcard),
- * will search named driver and call the add_card function if one exist.
- *
- * Revision 1.11 1999/11/23 13:29:29 calle
- * Bugfix: incoming capi message were never traced.
- *
- * Revision 1.10 1999/10/26 15:30:32 calle
- * Generate error message if user want to add card, but driver module is
- * not loaded.
- *
- * Revision 1.9 1999/10/11 22:04:12 keil


- * COMPAT_NEED_UACCESS (no include in isdn_compat.h)
- *

- * Revision 1.8 1999/09/10 17:24:18 calle
- * Changes for proposed standard for CAPI2.0:
- * - AK148 "Linux Exention"
- *
- * Revision 1.7 1999/09/04 06:20:05 keil
- * Changes from kernel set_current_state()
- *
- * Revision 1.6 1999/07/20 06:41:49 calle
- * Bugfix: After the redesign of the AVM B1 driver, the driver didn't even
- * compile, if not selected as modules.
- *
- * Revision 1.5 1999/07/09 15:05:48 keil


- * compat.h is now isdn_compat.h
- *

- * Revision 1.4 1999/07/08 14:15:17 calle
- * Forgot to count down ncards in drivercb_detach_ctr.
- *
- * Revision 1.3 1999/07/06 07:42:02 calle


- * - changes in /proc interface
- * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb.
- *

- * Revision 1.2 1999/07/05 15:09:52 calle


- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *

- * Revision 1.1 1999/07/01 15:26:42 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.

- *
X */
X #define CONFIG_AVMB1_COMPAT
X
@@ -127,6 +18,7 @@
X #include <linux/proc_fs.h>
X #include <linux/skbuff.h>
X #include <linux/tqueue.h>
+#include <linux/isdn_compat.h>
X #include <linux/capi.h>
X #include <linux/kernelcapi.h>
X #include <linux/locks.h>
@@ -139,7 +31,7 @@
X #include <linux/b1lli.h>
X #endif
X
-static char *revision = "$Revision: 1.21.6.2 $";
+static char *revision = "$Revision: 1.21.6.7 $";


X
X /* ------------------------------------------------------------- */
X

@@ -814,7 +706,7 @@
X }
X }
X /*
- * ncci managment
+ * ncci management
X */
X
X static void controllercb_new_ncci(struct capi_ctr * card,
@@ -1235,14 +1127,12 @@
X
X static __u16 capi_release(__u16 applid)


X {
- struct sk_buff *skb;

X int i;
X
X if (!VALID_APPLID(applid) || APPL(applid)->releasing)
X return CAPI_ILLAPPNR;
X APPL(applid)->releasing++;
- while ((skb = skb_dequeue(&APPL(applid)->recv_queue)) != 0)
- kfree_skb(skb);
+ skb_queue_purge(&APPL(applid)->recv_queue);
X for (i = 0; i < CAPI_MAXCONTR; i++) {
X if (cards[i].cardstate != CARD_RUNNING)
X continue;
@@ -1752,7 +1642,7 @@
X static int __init kcapi_init(void)


X {
X char *p;
- char rev[10];
+ char rev[32];
X

X MOD_INC_USE_COUNT;
X
@@ -1766,17 +1656,18 @@
X
X proc_capi_init();


X
- if ((p = strchr(revision, ':'))) {

- strcpy(rev, p + 1);


- p = strchr(rev, '$');
- *p = 0;
+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(rev, p + 2, sizeof(rev));
+ rev[sizeof(rev)-1] = 0;
+ if ((p = strchr(rev, '$')) != 0 && p > rev)
+ *(p-1) = 0;
X } else
X strcpy(rev, "1.0");
X

X #ifdef MODULE
- printk(KERN_NOTICE "CAPI-driver Rev%s: loaded\n", rev);
+ printk(KERN_NOTICE "CAPI-driver Rev %s: loaded\n", rev);
X #else
- printk(KERN_NOTICE "CAPI-driver Rev%s: started\n", rev);
+ printk(KERN_NOTICE "CAPI-driver Rev %s: started\n", rev);
X #endif
X MOD_DEC_USE_COUNT;
X return 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/t1isa.c linux/drivers/isdn/avmb1/t1isa.c
--- v2.2.19/drivers/isdn/avmb1/t1isa.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/t1isa.c Wed Oct 10 01:40:49 2001
@@ -1,95 +1,10 @@
X /*
- * $Id: t1isa.c,v 1.16.6.1 2001/02/13 11:43:29 kai Exp $
+ * $Id: t1isa.c,v 1.16.6.6 2001/05/17 21:15:33 kai Exp $
X *
X * Module for AVM T1 HEMA-card.


X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *

- * $Log: t1isa.c,v $
- * Revision 1.16.6.1 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.16 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.15 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.14 2000/10/10 17:44:19 kai


- * changes from/for 2.2.18
- *

- * Revision 1.13 2000/08/04 15:36:31 calle


- * copied wrong from file to file :-(
- *

- * Revision 1.12 2000/08/04 12:20:08 calle


- * - Fix unsigned/signed warning in the right way ...
- *

- * Revision 1.11 2000/04/03 13:29:25 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.10 2000/02/02 18:36:04 calle


- * - Modules are now locked while init_module is running
- * - fixed problem with memory mapping if address is not aligned
- *

- * Revision 1.9 2000/01/25 14:37:39 calle


- * new message after successfull detection including card revision and
- * used resources.
- *

- * Revision 1.8 1999/11/05 16:38:01 calle


- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *

- * Revision 1.7 1999/09/15 08:16:03 calle


- * Implementation of 64Bit extention complete.
- *

- * Revision 1.6 1999/09/07 09:02:53 calle


- * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
- * DATA_B3_IND is always directly after the CAPI message. The "Data" member
- * ist never used inside the kernel.
- *

- * Revision 1.5 1999/08/22 20:26:28 calle


- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- * define in isdn_compat.h for older kernel versions.
- *

- * Revision 1.4 1999/07/09 15:05:50 keil


- * compat.h is now isdn_compat.h
- *

- * Revision 1.3 1999/07/06 07:42:04 calle


- * - changes in /proc interface
- * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb.
- *

- * Revision 1.2 1999/07/05 15:09:54 calle


- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *

- * Revision 1.1 1999/07/01 15:26:44 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *
- *
X */
X
X #include <linux/module.h>

@@ -100,14 +15,16 @@


X #include <linux/interrupt.h>
X #include <linux/ioport.h>
X #include <linux/capi.h>
+#include <linux/kernelcapi.h>

X #include <linux/init.h>
+#include <linux/isdn_compat.h>

X #include <asm/io.h>


X #include "capicmd.h"
X #include "capiutil.h"
X #include "capilli.h"
X #include "avmcard.h"
X

-static char *revision = "$Revision: 1.16.6.1 $";
+static char *revision = "$Revision: 1.16.6.6 $";


X
X /* ------------------------------------------------------------- */
X

@@ -401,7 +318,7 @@


X cli();
X b1_setinterrupt(port, card->irq, card->cardtype);
X b1_put_byte(port, SEND_INIT);
- b1_put_word(port, AVM_NAPPS);
+ b1_put_word(port, CAPI_MAXAPPL);

X b1_put_word(port, AVM_NCCI_PER_CHANNEL*30);


X b1_put_word(port, ctrl->cnr - 1);
X restore_flags(flags);

@@ -628,10 +545,11 @@


X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {
- strncpy(driver->revision, p + 1, sizeof(driver->revision));
- p = strchr(driver->revision, '$');
- *p = 0;

+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(driver->revision, p + 2, sizeof(driver->revision));
+ driver->revision[sizeof(driver->revision)-1] = 0;
+ if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision)
+ *(p-1) = 0;

X }


X
X printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision);

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/t1pci.c linux/drivers/isdn/avmb1/t1pci.c
--- v2.2.19/drivers/isdn/avmb1/t1pci.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/t1pci.c Wed Oct 10 01:40:49 2001
@@ -1,77 +1,10 @@
X /*
- * $Id: t1pci.c,v 1.13.6.2 2001/02/13 11:43:29 kai Exp $
+ * $Id: t1pci.c,v 1.13.6.5 2001/05/17 20:41:51 kai Exp $
X *
X * Module for AVM T1 PCI-card.


X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *

- * $Log: t1pci.c,v $
- * Revision 1.13.6.2 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.13.6.1 2000/11/28 12:02:45 kai


- * MODULE_DEVICE_TABLE for 2.4
- *

- * Revision 1.13.2.2 2000/11/26 17:47:53 kai


- * added PCI_DEV_TABLE for 2.4
- *

- * Revision 1.13.2.1 2000/11/26 17:14:19 kai


- * fix device ids
- * also needs patches to include/linux/pci_ids.h
- *

- * Revision 1.13 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.12 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.11 2000/08/08 09:24:19 calle


- * calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI
- *

- * Revision 1.10 2000/07/20 10:21:21 calle


- * Bugfix: driver will not be unregistered, if not cards were detected.
- * this result in an oops in kcapi.c
- *

- * Revision 1.9 2000/05/19 15:43:22 calle


- * added calls to pci_device_start().
- *

- * Revision 1.8 2000/05/06 00:52:36 kai


- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *

- * Revision 1.7 2000/04/07 15:26:55 calle
- * better error message if cabel not connected or T1 has no power.
- *
- * Revision 1.6 2000/04/03 13:29:25 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.5 2000/02/02 18:36:04 calle


- * - Modules are now locked while init_module is running
- * - fixed problem with memory mapping if address is not aligned
- *

- * Revision 1.4 2000/01/25 14:33:38 calle


- * - Added Support AVM B1 PCI V4.0 (tested with prototype)
- * - splitted up t1pci.c into b1dma.c for common function with b1pciv4
- * - support for revision register
- *

- * Revision 1.3 1999/11/13 21:27:16 keil
- * remove KERNELVERSION
- *
- * Revision 1.2 1999/11/05 16:38:02 calle


- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *

- * Revision 1.1 1999/10/26 15:31:42 calle
- * Added driver for T1-PCI card.


- *
- *
X */
X
X #include <linux/config.h>

@@ -92,7 +25,7 @@


X #include "capilli.h"
X #include "avmcard.h"
X

-static char *revision = "$Revision: 1.13.6.2 $";
+static char *revision = "$Revision: 1.13.6.5 $";
X
X #undef CONFIG_T1PCI_DEBUG
X #undef CONFIG_T1PCI_POLLDEBUG
@@ -116,7 +49,7 @@
X
X di->detach_ctr(ctrl);


X free_irq(card->irq, card);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X release_region(card->port, AVMB1_PORTLEN);
X ctrl->driverdata = 0;
X kfree(card->ctrlinfo);

@@ -130,7 +63,6 @@
X
X static int t1pci_add_card(struct capi_driver *driver, struct capicardparams *p)


X {
- unsigned long base, page_offset;
X avmcard *card;
X avmctrl_info *cinfo;
X int retval;

@@ -181,12 +113,8 @@


X return -EBUSY;
X }
X
- base = card->membase & PAGE_MASK;
- page_offset = card->membase - base;
- card->mbase = ioremap_nocache(base, page_offset + 64);
- if (card->mbase) {
- card->mbase += page_offset;
- } else {
+ card->mbase = ioremap_nocache(card->membase, 64);
+ if (!card->mbase) {
X printk(KERN_NOTICE "%s: can't remap memory at 0x%lx\n",
X driver->name, card->membase);
X kfree(card->ctrlinfo);

@@ -205,7 +133,7 @@
X else
X printk(KERN_NOTICE "%s: card at 0x%x, but cabel not connected or T1 has no power (%d)\n",


X driver->name, card->port, retval);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X kfree(card->ctrlinfo);
X kfree(card->dma);
X kfree(card);

@@ -220,7 +148,7 @@


X if (retval) {
X printk(KERN_ERR "%s: unable to get IRQ %d.\n",
X driver->name, card->irq);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X release_region(card->port, AVMB1_PORTLEN);
X kfree(card->ctrlinfo);
X kfree(card->dma);

@@ -232,7 +160,7 @@
X cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo);


X if (!cinfo->capi_ctrl) {
X printk(KERN_ERR "%s: attach controller failed.\n", driver->name);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));

+ iounmap(card->mbase);
X free_irq(card->irq, card);


X release_region(card->port, AVMB1_PORTLEN);
X kfree(card->ctrlinfo);

@@ -300,16 +228,16 @@


X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {
- strncpy(driver->revision, p + 1, sizeof(driver->revision));
- p = strchr(driver->revision, '$');
- *p = 0;

+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(driver->revision, p + 2, sizeof(driver->revision));
+ driver->revision[sizeof(driver->revision)-1] = 0;
+ if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision)
+ *(p-1) = 0;

X }


X
X printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision);
X

X di = attach_capi_driver(driver);
-
X if (!di) {
X printk(KERN_ERR "%s: failed to attach capi_driver\n",
X driver->name);
@@ -317,22 +245,20 @@
X return -EIO;
X }
X
-#ifdef CONFIG_PCI
- if (!pci_present()) {
- printk(KERN_ERR "%s: no PCI bus present\n", driver->name);
- detach_capi_driver(driver);
- MOD_DEC_USE_COUNT;


- return -EIO;
- }
-

X while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_T1, dev))) {
X struct capicardparams param;
X
+ if (pci_enable_device(dev) < 0) {
+ printk(KERN_ERR "%s: failed to enable AVM-T1-PCI\n",
+ driver->name);
+ continue;
+ }
+ pci_set_master(dev);
+
X param.port = dev->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK;
X param.irq = dev->irq;
X param.membase = dev->base_address[ 0] & PCI_BASE_ADDRESS_MEM_MASK;
X
-
X printk(KERN_INFO
X "%s: PCI BIOS reports AVM-T1-PCI at i/o %#x, irq %d, mem %#x\n",
X driver->name, param.port, param.irq, param.membase);
@@ -341,9 +267,7 @@
X printk(KERN_ERR
X "%s: no AVM-T1-PCI at i/o %#x, irq %d detected, mem %#x\n",
X driver->name, param.port, param.irq, param.membase);
- detach_capi_driver(&t1pci_driver);


- MOD_DEC_USE_COUNT;
- return retval;

+ continue;
X }
X ncards++;
X }
@@ -356,12 +280,7 @@
X printk(KERN_ERR "%s: NO T1-PCI card detected\n", driver->name);
X detach_capi_driver(&t1pci_driver);
X MOD_DEC_USE_COUNT;
- return -ESRCH;
-#else
- printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
- MOD_DEC_USE_COUNT;
- return -EIO;
-#endif
+ return -ENODEV;
X }
X
X static void t1pci_exit(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/divert/isdn_divert.c linux/drivers/isdn/divert/isdn_divert.c
--- v2.2.19/drivers/isdn/divert/isdn_divert.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/divert/isdn_divert.c Wed Oct 10 01:40:49 2001
@@ -1,5 +1,5 @@
X /*
- * $Id: isdn_divert.c,v 1.6.6.1 2001/02/07 11:31:31 kai Exp $
+ * $Id: isdn_divert.c,v 1.6.6.2 2001/02/16 16:43:25 kai Exp $
X *
X * DSS1 main diversion supplementary handling for i4l.
X *
@@ -290,7 +290,7 @@
X /* insert a new rule before idx */
X /********************************/
X int insertrule(int idx, divert_rule *newrule)
-{ struct deflect_struc *ds,*ds1;
+{ struct deflect_struc *ds,*ds1=NULL;
X int flags;
X
X if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc),
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/bri.c linux/drivers/isdn/eicon/bri.c
--- v2.2.19/drivers/isdn/eicon/bri.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/bri.c Wed Oct 10 01:40:50 2001
@@ -21,8 +21,7 @@


X *
X */
X

-#include <sys/types.h>
-
+#include "eicon.h"
X #include "sys.h"
X #include "idi.h"
X #include "divas.h"
@@ -33,9 +32,6 @@
X #include "adapter.h"
X #include "uxio.h"
X
-#define PCI_COMMAND 0x04
-#define PCI_STATUS 0x06
-#define PCI_LATENCY 0x0D
X #define PCI_BADDR0 0x10
X #define PCI_BADDR1 0x14
X #define PCI_BADDR2 0x18
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/common.c linux/drivers/isdn/eicon/common.c
--- v2.2.19/drivers/isdn/eicon/common.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/common.c Wed Oct 10 01:40:50 2001
@@ -22,6 +22,7 @@
X */
X
X
+#include "eicon.h"
X #include "sys.h"
X #include "idi.h"
X #include "constant.h"
@@ -30,20 +31,12 @@
X #include "pr_pc.h"
X
X #include "uxio.h"
-#include <sys/types.h>
-
-#define MAX_ADDR_LEN
X
X #define DIVAS_LOAD_CMD 0x02
X #define DIVAS_START_CMD 0x03
X #define DIVAS_IRQ_RESET 0xC18
X #define DIVAS_IRQ_RESET_VAL 0xFE
X
-#define PCI_COMMAND 0x04
-#define PCI_STATUS 0x06
-#define PCI_LATENCY 0x0D
-#define PCI_INTERRUPT 0x3C
-
X #define TEST_INT_DIVAS 0x11
X #define TEST_INT_DIVAS_BRI 0x12
X #define TEST_INT_DIVAS_Q 0x13
@@ -82,7 +75,7 @@
X
X void DIVA_DIDD_Read( DESCRIPTOR *table, int tablelength )
X {
- bzero(table, tablelength);
+ memset(table, 0, tablelength);
X
X if (tablelength > sizeof(DIDD_Table))
X tablelength = sizeof(DIDD_Table);
@@ -93,7 +86,7 @@
X }
X
X if (tablelength > 0)
- bcopy((caddr_t)DIDD_Table, (caddr_t)table, tablelength);
+ bcopy((void *)DIDD_Table, (void *)table, tablelength);
X
X return;
X }
@@ -103,7 +96,7 @@
X if (tablelength > sizeof(DIDD_Table))
X tablelength = sizeof(DIDD_Table);
X
- bcopy((caddr_t)table, (caddr_t)DIDD_Table, tablelength);
+ bcopy((void *)table, (void *)DIDD_Table, tablelength);
X
X return;
X }
@@ -113,7 +106,7 @@
X {
X DESCRIPTOR d[32];
X
- bzero(d, sizeof(d));
+ memset(d, 0, sizeof(d));
X
X d[0].type = IDI_DIMAINT; /* identify the DIMAINT entry */
X d[0].channels = 0; /* zero channels associated with dimaint*/
@@ -482,7 +475,6 @@
X int DivasCardNew(dia_card_t *card_info)
X {
X card_t *card;
- byte b;
X static boolean_t first_call = TRUE;
X boolean_t NeedISRandReset = FALSE;
X
@@ -571,10 +563,6 @@


X return -1;
X }
X

- b = card->cfg.irq;
-
- UxPciConfigWrite(card->hw, sizeof(b), PCI_INTERRUPT, &b);
-
X if (card_info->card_type != DIA_CARD_TYPE_DIVA_SERVER_Q)
X {
X if ((*card->card_reset)(card))
@@ -674,7 +662,7 @@
X return -1;
X }
X
- bzero(card->e_tbl, sizeof(E_INFO) * num_entities);
+ memset(card->e_tbl, 0, sizeof(E_INFO) * num_entities);
X card->e_max = num_entities;
X
X DIVA_DIDD_Read(d, sizeof(d));
@@ -861,7 +849,7 @@


X {
X int i;
X

- bzero(card_list, sizeof(dia_card_list_t));
+ memset(card_list, 0, sizeof(dia_card_list_t));
X
X for(i = 0; i < DivasCardNext; i++)
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/eicon.h linux/drivers/isdn/eicon/eicon.h
--- v2.2.19/drivers/isdn/eicon/eicon.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/eicon.h Wed Oct 10 01:40:50 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon.h,v 1.23.6.2 2001/02/13 11:43:30 kai Exp $
+/* $Id: eicon.h,v 1.23.6.4 2001/06/09 15:14:16 kai Exp $
X *
X * ISDN low-level module for Eicon active ISDN-Cards.
X *
@@ -147,6 +147,7 @@
X #include <linux/wait.h>
X #include <linux/delay.h>
X #include <linux/ctype.h>
+#include <linux/pci.h>
X
X #include <linux/isdn.h>
X #include <linux/isdnif.h>
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/eicon_idi.c linux/drivers/isdn/eicon/eicon_idi.c
--- v2.2.19/drivers/isdn/eicon/eicon_idi.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/eicon_idi.c Wed Oct 10 01:40:50 2001
@@ -2221,7 +2221,10 @@
X static char *connmsg[] =
X {"", "V.21", "V.23", "V.22", "V.22bis", "V.32bis", "V.34",
X "V.8", "Bell 212A", "Bell 103", "V.29 Leased", "V.33 Leased", "V.90",
- "V.21 CH2", "V.27ter", "V.29", "V.33", "V.17"};
+ "V.21 CH2", "V.27ter", "V.29", "V.33", "V.17", "V.32", "K56Flex",
+ "X2", "V.18", "V.18LH", "V.18HL", "V.21LH", "V.21HL",
+ "Bell 103LH", "Bell 103HL", "V.23", "V.23", "EDT 110",
+ "Baudot45", "Baudot47", "Baudot50", "DTMF" };
X static u_char dtmf_code[] = {
X '1','4','7','*','2','5','8','0','3','6','9','#','A','B','C','D'
X };
@@ -2243,7 +2246,11 @@
X cmd.driver = ccard->myid;
X cmd.command = ISDN_STAT_BCONN;
X cmd.arg = chan->No;
- sprintf(cmd.parm.num, "%d/%s", p->speed, connmsg[p->norm]);
+ if (p->norm > 34) {
+ sprintf(cmd.parm.num, "%d/(%d)", p->speed, p->norm);
+ } else {
+ sprintf(cmd.parm.num, "%d/%s", p->speed, connmsg[p->norm]);
+ }
X ccard->interface.statcallb(&cmd);
X }
X eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_DCD_ON time %d\n", chan->No, p->time);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/eicon_mod.c linux/drivers/isdn/eicon/eicon_mod.c
--- v2.2.19/drivers/isdn/eicon/eicon_mod.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/eicon_mod.c Wed Oct 10 01:40:50 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon_mod.c,v 1.37.6.4 2001/02/16 09:09:50 armin Exp $
+/* $Id: eicon_mod.c,v 1.37.6.5 2001/07/17 19:42:31 armin Exp $
X *
X * ISDN lowlevel-module for Eicon active cards.
X *
@@ -55,7 +55,7 @@
X static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
X start of card-list */
X
-static char *eicon_revision = "$Revision: 1.37.6.4 $";
+static char *eicon_revision = "$Revision: 1.37.6.5 $";
X
X extern char *eicon_pci_revision;
X extern char *eicon_isa_revision;
@@ -1200,24 +1200,16 @@
X static void
X eicon_freecard(eicon_card *card) {
X int i;


- struct sk_buff *skb;
X

X for(i = 0; i < (card->nchannels + 1); i++) {
- while((skb = skb_dequeue(&card->bch[i].e.X)))
- dev_kfree_skb(skb);
- while((skb = skb_dequeue(&card->bch[i].e.R)))
- dev_kfree_skb(skb);
+ skb_queue_purge(&card->bch[i].e.X);
+ skb_queue_purge(&card->bch[i].e.R);
X }
- while((skb = skb_dequeue(&card->sndq)))
- dev_kfree_skb(skb);
- while((skb = skb_dequeue(&card->rcvq)))
- dev_kfree_skb(skb);
- while((skb = skb_dequeue(&card->rackq)))
- dev_kfree_skb(skb);
- while((skb = skb_dequeue(&card->sackq)))
- dev_kfree_skb(skb);
- while((skb = skb_dequeue(&card->statq)))
- dev_kfree_skb(skb);
+ skb_queue_purge(&card->sndq);
+ skb_queue_purge(&card->rcvq);
+ skb_queue_purge(&card->rackq);
+ skb_queue_purge(&card->sackq);
+ skb_queue_purge(&card->statq);
X
X #ifdef CONFIG_ISDN_DRV_EICON_PCI
X kfree(card->sbufp);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/idi.h linux/drivers/isdn/eicon/idi.h
--- v2.2.19/drivers/isdn/eicon/idi.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/idi.h Wed Oct 10 01:40:50 2001
@@ -62,7 +62,7 @@
X struct postcall_s {
X word command; /* command = 0x0300 */
X word dummy; /* not used */
- IDI_CALL callback; /* routine adress to call back */
+ IDI_CALL callback; /* routine address to call back */
X ENTITY *contxt; /* ptr to entity to use */
X };
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/kprintf.c linux/drivers/isdn/eicon/kprintf.c
--- v2.2.19/drivers/isdn/eicon/kprintf.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/kprintf.c Wed Oct 10 01:40:50 2001
@@ -27,14 +27,12 @@
X */
X
X
+#include "eicon.h"
X #include "sys.h"
X #include <stdarg.h>
X #undef MAX
X #undef MIN
X
-#include <sys/types.h>
-#include <sys/param.h>
-
X #include "divas.h"
X #include "divalog.h"
X #include "uxio.h"
@@ -512,7 +510,7 @@
X
X /* clear log entry */
X
- bzero((caddr_t) &log, sizeof(klog_t));
+ memset((void *) &log, 0, sizeof(klog_t));
X
X log.card = -1;
X log.type = KLOG_TEXT_MSG;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/lincfg.c linux/drivers/isdn/eicon/lincfg.c
--- v2.2.19/drivers/isdn/eicon/lincfg.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/lincfg.c Wed Oct 10 01:40:50 2001
@@ -43,12 +43,6 @@
X #include <linux/kernel.h>
X #include <linux/ioport.h>
X
-#define HW_ID_EICON_PCI 0x1133
-#define HW_ID_DIVA_SERVER_P 0xE014
-#define HW_ID_DIVA_SERVER_B_ST 0xE010
-#define HW_ID_DIVA_SERVER_B_U 0xE013
-#define HW_ID_DIVA_SERVER_Q 0xE012
-
X struct file_operations Divas_fops;
X int Divas_major;
X
@@ -73,8 +67,8 @@
X
X while (wDeviceIndex < 10)
X {
- wPCIConsultation = pcibios_find_device(HW_ID_EICON_PCI,
- HW_ID_DIVA_SERVER_Q,
+ wPCIConsultation = pcibios_find_device(PCI_VENDOR_ID_EICON,
+ PCI_DEVICE_ID_EICON_MAESTRAQ,
X wDeviceIndex,
X &byBus, &byFunc);
X
@@ -174,8 +168,8 @@
X
X while (wDeviceIndex < 10)
X {
- wPCIConsultation = pcibios_find_device(HW_ID_EICON_PCI,
- HW_ID_DIVA_SERVER_B_ST,
+ wPCIConsultation = pcibios_find_device(PCI_VENDOR_ID_EICON,
+ PCI_DEVICE_ID_EICON_MAESTRA,
X wDeviceIndex,
X &byBus, &byFunc);
X
@@ -232,8 +226,8 @@
X wNumCards++;
X }
X
- wPCIConsultation = pcibios_find_device(HW_ID_EICON_PCI,
- HW_ID_DIVA_SERVER_B_U,
+ wPCIConsultation = pcibios_find_device(PCI_VENDOR_ID_EICON,
+ PCI_DEVICE_ID_EICON_MAESTRAQ_U,
X wDeviceIndex,
X &byBus, &byFunc);
X
@@ -298,8 +292,8 @@
X
X while (wDeviceIndex < 10)
X {
- wPCIConsultation = pcibios_find_device(HW_ID_EICON_PCI,
- HW_ID_DIVA_SERVER_P,
+ wPCIConsultation = pcibios_find_device(PCI_VENDOR_ID_EICON,
+ PCI_DEVICE_ID_EICON_MAESTRAP,
X wDeviceIndex,
X &byBus, &byFunc);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/linsys.c linux/drivers/isdn/eicon/linsys.c
--- v2.2.19/drivers/isdn/eicon/linsys.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/linsys.c Wed Oct 10 01:40:50 2001
@@ -45,11 +45,6 @@
X }
X #endif
X
-void bzero(void *pDataArea, dword dwLength)
-{
- memset(pDataArea, 0, dwLength);
-}
-
X int Divas4BRIInitPCI(card_t *card, dia_card_t *cfg)
X {
X /* Use UxPciConfigWrite routines to initialise PCI config space */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/log.c linux/drivers/isdn/eicon/log.c
--- v2.2.19/drivers/isdn/eicon/log.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/log.c Wed Oct 10 01:40:50 2001


@@ -96,7 +96,7 @@
X }
X

X m_count++;
- bzero(new_klog,sizeof(KNODE));
+ memset(new_klog, 0, sizeof(KNODE));
X
X /* Set head & tail to point to the new Msg Struct */
X head=tail=new_klog;


@@ -112,7 +112,7 @@
X }

X
X m_count++;
- bzero(new_klog,sizeof(KNODE));
+ memset(new_klog, 0, sizeof(KNODE));
X
X /* Let last Msg Struct point to new Msg Struct & inc tail */
X tail->next=new_klog;
@@ -155,7 +155,7 @@
X {
X klog_t klog;
X
- bzero(&klog, sizeof(klog));
+ memset(&klog, 0, sizeof(klog));
X
X klog.time_stamp = UxTimeGet();
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/uxio.h linux/drivers/isdn/eicon/uxio.h
--- v2.2.19/drivers/isdn/eicon/uxio.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/uxio.h Wed Oct 10 01:40:50 2001
@@ -59,7 +59,6 @@
X };
X
X void bcopy(void *pSource, void *pDest, dword dwLength);
-void bzero(void *pDataArea, dword dwLength);
X
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/eicon/xlog.c linux/drivers/isdn/eicon/xlog.c
--- v2.2.19/drivers/isdn/eicon/xlog.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/eicon/xlog.c Wed Oct 10 01:40:50 2001
@@ -59,7 +59,7 @@
X
X x = (card_xlog_t *) b;
X
- bzero(&klog, sizeof(klog));
+ memset(&klog, 0, sizeof(klog));
X
X klog.time_stamp = (dword) x->time_hi;
X klog.time_stamp = (klog.time_stamp << 16) | (dword) x->time_lo;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/amd7930.c linux/drivers/isdn/hisax/amd7930.c
--- v2.2.19/drivers/isdn/hisax/amd7930.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/amd7930.c Wed Oct 10 01:40:50 2001
@@ -1,4 +1,4 @@
-/* $Id: amd7930.c,v 1.5 2000/11/24 17:05:37 kai Exp $
+/* $Id: amd7930.c,v 1.5.6.3 2001/06/11 22:08:37 kai Exp $
X *
X * HiSax ISDN driver - chip specific routines for AMD 7930
X *
@@ -14,7 +14,7 @@
X *
X * The code is unreliable enough to be consider alpha


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *

X * Advanced Micro Devices' Am79C30A is an ISDN/audio chip used in the
X * SparcStation 1+. The chip provides microphone and speaker interfaces
@@ -94,7 +94,7 @@
X #include "rawhdlc.h"
X #include <linux/interrupt.h>
X
-static const char *amd7930_revision = "$Revision: 1.5 $";
+static const char *amd7930_revision = "$Revision: 1.5.6.3 $";
X
X #define RCV_BUFSIZE 1024 /* Size of raw receive buffer in bytes */
X #define RCV_BUFBLKS 4 /* Number of blocks to divide buffer into
@@ -362,12 +362,8 @@
X amd7930_bclose(0, bcs->channel);
X

X if (test_bit(BC_FLG_INIT, &bcs->Flag)) {

- while ((skb = skb_dequeue(&bcs->rqueue))) {
- dev_kfree_skb(skb);
- }
- while ((skb = skb_dequeue(&bcs->squeue))) {
- dev_kfree_skb(skb);
- }
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X }

X test_and_clear_bit(BC_FLG_INIT, &bcs->Flag);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/arcofi.c linux/drivers/isdn/hisax/arcofi.c
--- v2.2.19/drivers/isdn/hisax/arcofi.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/arcofi.c Wed Oct 10 01:40:50 2001
@@ -1,10 +1,10 @@
-/* $Id: arcofi.c,v 1.12 2000/11/25 17:01:00 kai Exp $
+/* $Id: arcofi.c,v 1.12.6.1 2001/02/16 16:43:25 kai Exp $
X *
X * arcofi.c Ansteuerung ARCOFI 2165


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/arcofi.h linux/drivers/isdn/hisax/arcofi.h
--- v2.2.19/drivers/isdn/hisax/arcofi.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/arcofi.h Wed Oct 10 01:40:50 2001
@@ -1,10 +1,10 @@
-/* $Id: arcofi.h,v 1.6 2000/06/26 08:59:12 keil Exp $
+/* $Id: arcofi.h,v 1.6.6.1 2001/02/16 16:43:25 kai Exp $
X *
X * arcofi.h Ansteuerung ARCOFI 2165


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/asuscom.c linux/drivers/isdn/hisax/asuscom.c
--- v2.2.19/drivers/isdn/hisax/asuscom.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/asuscom.c Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: asuscom.c,v 1.11 2000/11/24 17:05:37 kai Exp $
+/* $Id: asuscom.c,v 1.11.6.2 2001/07/13 09:20:12 kai Exp $
X *
X * asuscom.c low level stuff for ASUSCOM NETWORK INC. ISDNLink cards
X *


@@ -6,7 +6,7 @@
X *

X * Thanks to ASUSCOM NETWORK INC. Taiwan and Dynalink NL for informations


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

@@ -20,7 +20,7 @@


X
X extern const char *CardType[];
X

-const char *Asuscom_revision = "$Revision: 1.11 $";
+const char *Asuscom_revision = "$Revision: 1.11.6.2 $";


X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)

@@ -341,7 +341,7 @@
X cs->cardmsg = &Asus_card_msg;
X val = readreg(cs->hw.asus.cfg_reg + ASUS_IPAC_ALE,
X cs->hw.asus.cfg_reg + ASUS_IPAC_DATA, IPAC_ID);


- if (val == 1) {

+ if ((val == 1) || (val == 2)) {

X cs->subtyp = ASUS_IPAC;
X cs->hw.asus.adr = cs->hw.asus.cfg_reg + ASUS_IPAC_ALE;
X cs->hw.asus.isac = cs->hw.asus.cfg_reg + ASUS_IPAC_DATA;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/avm_a1.c linux/drivers/isdn/hisax/avm_a1.c
--- v2.2.19/drivers/isdn/hisax/avm_a1.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/avm_a1.c Wed Oct 10 01:40:50 2001
@@ -1,10 +1,10 @@
-/* $Id: avm_a1.c,v 2.13 2000/11/24 17:05:37 kai Exp $
+/* $Id: avm_a1.c,v 2.13.6.1 2001/02/16 16:43:25 kai Exp $
X *
X * avm_a1.c low level stuff for AVM A1 (Fritz) isdn cards


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *

X */
X #define __NO_VERSION__

@@ -15,7 +15,7 @@
X #include "isdnl1.h"

X
X extern const char *CardType[];

-static const char *avm_revision = "$Revision: 2.13 $";
+static const char *avm_revision = "$Revision: 2.13.6.1 $";
X
X #define AVM_A1_STAT_ISAC 0x01
X #define AVM_A1_STAT_HSCX 0x02
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/avm_a1p.c linux/drivers/isdn/hisax/avm_a1p.c
--- v2.2.19/drivers/isdn/hisax/avm_a1p.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/avm_a1p.c Wed Oct 10 01:40:51 2001
@@ -1,4 +1,4 @@
-/* $Id: avm_a1p.c,v 2.7 2000/11/24 17:05:37 kai Exp $
+/* $Id: avm_a1p.c,v 2.7.6.1 2001/02/16 16:43:25 kai Exp $
X *
X * avm_a1p.c low level stuff for the following AVM cards:
X * A1 PCMCIA
@@ -7,7 +7,7 @@
X *
X * Author Carsten Paeth (ca...@calle.in-berlin.de)


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X */


X #define __NO_VERSION__
X #include <linux/init.h>

@@ -53,7 +53,7 @@


X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)

X
-static const char *avm_revision = "$Revision: 2.7 $";
+static const char *avm_revision = "$Revision: 2.7.6.1 $";
X
X static inline u_char
X ReadISAC(struct IsdnCardState *cs, u_char offset)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/avm_pci.c linux/drivers/isdn/hisax/avm_pci.c
--- v2.2.19/drivers/isdn/hisax/avm_pci.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/avm_pci.c Wed Oct 10 01:40:51 2001
@@ -1,11 +1,11 @@
-/* $Id: avm_pci.c,v 1.22.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: avm_pci.c,v 1.22.6.5 2001/06/09 15:14:16 kai Exp $
X *
X * avm_pci.c low level stuff for AVM Fritz!PCI and ISA PnP isdn cards
X * Thanks to AVM, Berlin for informations


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #define __NO_VERSION__

@@ -19,7 +19,7 @@
X #include <linux/interrupt.h>


X
X extern const char *CardType[];

-static const char *avm_pci_rev = "$Revision: 1.22.6.3 $";
+static const char *avm_pci_rev = "$Revision: 1.22.6.5 $";
X
X #define AVM_FRITZ_PCI 1
X #define AVM_FRITZ_PNP 2
@@ -592,8 +592,8 @@


X kfree(bcs->blog);
X bcs->blog = NULL;
X }

- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/bkm_a4t.c linux/drivers/isdn/hisax/bkm_a4t.c
--- v2.2.19/drivers/isdn/hisax/bkm_a4t.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/bkm_a4t.c Wed Oct 10 01:40:51 2001
@@ -1,4 +1,4 @@
-/* $Id: bkm_a4t.c,v 1.13.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: bkm_a4t.c,v 1.13.6.5 2001/07/18 16:02:15 kai Exp $
X * bkm_a4t.c low level stuff for T-Berkom A4T
X * derived from the original file sedlbauer.c
X * derived from the original file niccy.c


@@ -6,7 +6,7 @@
X *

X * Author Roland Klabunde (R.Kla...@Berkom.de)

X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

@@ -25,11 +25,11 @@


X
X extern const char *CardType[];
X

-const char *bkm_a4t_revision = "$Revision: 1.13.6.3 $";
+const char *bkm_a4t_revision = "$Revision: 1.13.6.5 $";
X
X
X static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+readreg(unsigned int ale, unsigned long adr, u_char off)
X {
X register u_int ret;
X long flags;


@@ -47,7 +47,7 @@
X

X
X static inline void

-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(unsigned int ale, unsigned long adr, u_char off, u_char * data, int size)
X {
X /* fifo read without cli because it's allready done */
X int i;
@@ -57,7 +57,7 @@
X

X
X static inline void

-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(unsigned int ale, unsigned long adr, u_char off, u_char data)
X {
X long flags;
X unsigned int *po = (unsigned int *) adr; /* Postoffice */
@@ -72,7 +72,7 @@
X

X
X static inline void

-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+writefifo(unsigned int ale, unsigned long adr, u_char off, u_char * data, int size)
X {
X /* fifo write without cli because it's allready done */
X int i;
@@ -317,11 +317,11 @@
X printk(KERN_WARNING "HiSax: %s: No Memory base address\n", CardType[card->typ]);
X return (0);
X }
- cs->hw.ax.base = (u_int) ioremap(pci_memaddr, 4096);
+ cs->hw.ax.base = (long) ioremap(pci_memaddr, 4096);
X /* Check suspecious address */
X pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base);
X if ((pI20_Regs->i20IntStatus & 0x8EFFFFFF) != 0) {
- printk(KERN_WARNING "HiSax: %s address %x-%x suspecious\n",
+ printk(KERN_WARNING "HiSax: %s address %lx-%lx suspicious\n",
X CardType[card->typ], cs->hw.ax.base, cs->hw.ax.base + 4096);
X iounmap((void *) cs->hw.ax.base);
X cs->hw.ax.base = 0;
@@ -336,7 +336,7 @@
X printk(KERN_WARNING "HiSax: %s: unable to configure\n", CardType[card->typ]);
X return (0);


X #endif /* CONFIG_PCI */

- printk(KERN_INFO "HiSax: %s: Card configured at 0x%X IRQ %d\n",
+ printk(KERN_INFO "HiSax: %s: Card configured at 0x%lX IRQ %d\n",
X CardType[card->typ], cs->hw.ax.base, cs->irq);
X
X reset_bkm(cs);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/bkm_a8.c linux/drivers/isdn/hisax/bkm_a8.c
--- v2.2.19/drivers/isdn/hisax/bkm_a8.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/bkm_a8.c Wed Oct 10 01:40:51 2001
@@ -1,4 +1,4 @@
-/* $Id: bkm_a8.c,v 1.14.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: bkm_a8.c,v 1.14.6.6 2001/07/18 16:02:15 kai Exp $
X * bkm_a8.c low level stuff for Scitel Quadro (4*S0, passive)
X * derived from the original file sedlbauer.c
X * derived from the original file niccy.c


@@ -6,7 +6,7 @@
X *

X * Author Roland Klabunde (R.Kla...@Berkom.de)

X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #define __NO_VERSION__

@@ -28,7 +28,7 @@


X
X extern const char *CardType[];
X

-const char sct_quadro_revision[] = "$Revision: 1.14.6.3 $";
+const char sct_quadro_revision[] = "$Revision: 1.14.6.6 $";
X
X static const char *sct_quadro_subtypes[] =
X {
@@ -206,9 +206,9 @@
X void
X release_io_sct_quadro(struct IsdnCardState *cs)
X {
- release_region(cs->hw.ax.base & 0xffffffc0, 256);
+ release_region(cs->hw.ax.base & 0xffffffc0, 128);
X if (cs->subtyp == SCT_1)
- release_region(cs->hw.ax.plx_adr, 256);
+ release_region(cs->hw.ax.plx_adr, 64);


X }
X
X static void

@@ -404,9 +404,9 @@
X switch(cs->subtyp) {
X case 1:
X cs->hw.ax.base = pci_ioaddr5 + 0x00;
- if (sct_alloc_io(pci_ioaddr1, 256))
+ if (sct_alloc_io(pci_ioaddr1, 128))
X return(0);
- if (sct_alloc_io(pci_ioaddr5, 256))
+ if (sct_alloc_io(pci_ioaddr5, 64))
X return(0);
X /* disable all IPAC */
X writereg(pci_ioaddr5, pci_ioaddr5 + 4,
@@ -420,24 +420,24 @@


X break;
X case 2:

X cs->hw.ax.base = pci_ioaddr4 + 0x08;
- if (sct_alloc_io(pci_ioaddr4, 256))
+ if (sct_alloc_io(pci_ioaddr4, 64))
X return(0);
X break;
X case 3:
X cs->hw.ax.base = pci_ioaddr3 + 0x10;
- if (sct_alloc_io(pci_ioaddr3, 256))
+ if (sct_alloc_io(pci_ioaddr3, 64))
X return(0);
X break;
X case 4:
X cs->hw.ax.base = pci_ioaddr2 + 0x20;
- if (sct_alloc_io(pci_ioaddr2, 256))
+ if (sct_alloc_io(pci_ioaddr2, 64))
X return(0);
X break;
X }
X /* For isac and hscx data path */
X cs->hw.ax.data_adr = cs->hw.ax.base + 4;
X
- printk(KERN_INFO "HiSax: %s (%s) configured at 0x%.4X, 0x%.4X, 0x%.4X and IRQ %d\n",
+ printk(KERN_INFO "HiSax: %s (%s) configured at 0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n",


X CardType[card->typ],

X sct_quadro_subtypes[cs->subtyp],
X cs->hw.ax.plx_adr,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/bkm_ax.h linux/drivers/isdn/hisax/bkm_ax.h
--- v2.2.19/drivers/isdn/hisax/bkm_ax.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/bkm_ax.h Wed Oct 10 01:40:51 2001
@@ -1,9 +1,9 @@
-/* $Id: bkm_ax.h,v 1.5.6.1 2000/11/28 12:02:46 kai Exp $
+/* $Id: bkm_ax.h,v 1.5.6.2 2001/02/16 16:43:25 kai Exp $
X * bkm_ax.h low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive)
X *
X * Author Roland Klabunde (R.Kla...@Berkom.de)


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/callc.c linux/drivers/isdn/hisax/callc.c
--- v2.2.19/drivers/isdn/hisax/callc.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/callc.c Wed Oct 10 01:40:51 2001
@@ -1,9 +1,9 @@
-/* $Id: callc.c,v 2.51 2000/11/24 17:05:37 kai Exp $
+/* $Id: callc.c,v 2.51.6.4 2001/06/09 15:14:17 kai Exp $
X *


X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License

X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *

@@ -20,7 +20,7 @@
X #define MOD_USE_COUNT ( GET_USE_COUNT (&__this_module))


X #endif /* MODULE */
X

-const char *lli_revision = "$Revision: 2.51 $";
+const char *lli_revision = "$Revision: 2.51.6.4 $";
X
X extern struct IsdnCard cards[];
X extern int nrcards;
@@ -66,19 +66,6 @@
X return (struct IsdnCardState *) 0;
X }
X
-int
-discard_queue(struct sk_buff_head *q)
-{
- struct sk_buff *skb;
- int ret=0;
-
- while ((skb = skb_dequeue(q))) {
- dev_kfree_skb(skb);
- ret++;
- }
- return(ret);
-}
-
X static void
X link_debug(struct Channel *chanp, int direction, char *fmt, ...)
X {
@@ -337,7 +324,7 @@
X * RESUME
X */
X
-/* incomming call */
+/* incoming call */
X
X static void
X lli_deliver_call(struct FsmInst *fi, int event, void *arg)
@@ -850,14 +837,14 @@
X
X #define FNCOUNT (sizeof(fnlist)/sizeof(struct FsmNode))


X
-void __init
+int __init

X CallcNew(void)
X {
X callcfsm.state_count = STATE_COUNT;
X callcfsm.event_count = EVENT_COUNT;
X callcfsm.strEvent = strEvent;
X callcfsm.strState = strState;
- FsmNew(&callcfsm, fnlist, FNCOUNT);
+ return FsmNew(&callcfsm, fnlist, FNCOUNT);
X }
X
X void
@@ -1026,9 +1013,11 @@
X printk(KERN_WARNING"call to dummy_pstack pr=%04x arg %lx\n", pr, (long)arg);


X }
X
-static void
+static int

X init_PStack(struct PStack **stp) {
X *stp = kmalloc(sizeof(struct PStack), GFP_ATOMIC);
+ if (!*stp)
+ return -ENOMEM;
X (*stp)->next = NULL;
X (*stp)->l1.l1l2 = dummy_pstack;
X (*stp)->l1.l1hw = dummy_pstack;
@@ -1041,16 +1030,20 @@
X (*stp)->l3.l3l4 = dummy_pstack;
X (*stp)->lli.l4l3 = dummy_pstack;
X (*stp)->ma.layer = dummy_pstack;


+ return 0;
X }
X

-static void
+static int
X init_d_st(struct Channel *chanp)
X {
X struct PStack *st;
X struct IsdnCardState *cs = chanp->cs;
X char tmp[16];
+ int err;
X
- init_PStack(&chanp->d_st);
+ err = init_PStack(&chanp->d_st);
+ if (err)
+ return err;
X st = chanp->d_st;
X st->next = NULL;
X HiSax_addlist(cs, st);
@@ -1075,6 +1068,8 @@
X st->lli.userdata = chanp;
X st->lli.l2writewakeup = NULL;
X st->l3.l3l4 = dchan_l3l4;
+


+ return 0;
X }
X

X static void
@@ -1090,10 +1085,11 @@
X va_end(args);
X }
X
-static void
+static int
X init_chan(int chan, struct IsdnCardState *csta)
X {
X struct Channel *chanp = csta->channel + chan;
+ int err;
X
X chanp->cs = csta;
X chanp->bcs = csta->bcs + chan;
@@ -1102,7 +1098,9 @@
X chanp->debug = 0;
X chanp->Flags = 0;
X chanp->leased = 0;
- init_PStack(&chanp->b_st);
+ err = init_PStack(&chanp->b_st);
+ if (err)
+ return err;
X chanp->b_st->l1.delay = DEFAULT_B_DELAY;
X chanp->fi.fsm = &callcfsm;
X chanp->fi.state = ST_NULL;
@@ -1112,31 +1110,41 @@
X FsmInitTimer(&chanp->fi, &chanp->dial_timer);
X FsmInitTimer(&chanp->fi, &chanp->drel_timer);
X if (!chan || (test_bit(FLG_TWO_DCHAN, &csta->HW_Flags) && chan < 2)) {
- init_d_st(chanp);
+ err = init_d_st(chanp);
+ if (err)
+ return err;
X } else {
X chanp->d_st = csta->channel->d_st;
X }
X chanp->data_open = 0;


+ return 0;
X }
X

X int
X CallcNewChan(struct IsdnCardState *csta) {
- int i;
+ int i, err;
X
X chancount += 2;
- init_chan(0, csta);
- init_chan(1, csta);
+ err = init_chan(0, csta);
+ if (err)
+ return err;
+ err = init_chan(1, csta);
+ if (err)
+ return err;
X printk(KERN_INFO "HiSax: 2 channels added\n");
X
- for (i = 0; i < MAX_WAITING_CALLS; i++)
- init_chan(i+2,csta);
+ for (i = 0; i < MAX_WAITING_CALLS; i++) {
+ err = init_chan(i+2,csta);
+ if (err)
+ return err;
+ }
X printk(KERN_INFO "HiSax: MAX_WAITING_CALLS added\n");
X if (test_bit(FLG_PTP, &csta->channel->d_st->l2.flag)) {
X printk(KERN_INFO "LAYER2 WATCHING ESTABLISH\n");
X csta->channel->d_st->lli.l4l3(csta->channel->d_st,
X DL_ESTABLISH | REQUEST, NULL);
X }
- return (2);
+ return (0);


X }
X
X static void

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/cert.c linux/drivers/isdn/hisax/cert.c
--- v2.2.19/drivers/isdn/hisax/cert.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/hisax/cert.c Wed Oct 10 01:40:51 2001
@@ -1,8 +1,8 @@
-/* $Id: cert.c,v 2.3 2000/06/26 08:59:12 keil Exp $
+/* $Id: cert.c,v 2.3.6.2 2001/07/27 09:08:27 kai Exp $


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *

@@ -20,6 +20,7 @@
X printk(KERN_INFO "HiSax: Approved with ELSA Microlink PCI cards\n");
X printk(KERN_INFO "HiSax: Approved with Eicon Technology Diva 2.01 PCI cards\n");
X printk(KERN_INFO "HiSax: Approved with Sedlbauer Speedfax + cards\n");
+ printk(KERN_INFO "HiSax: Approved with HFC-S PCI A based cards\n");
X }
X return(0);
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 16'
echo 'File patch-2.2.20 is continued in part 17'
echo "17" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:14 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part15

#!/bin/sh -x
# this is part 15 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 15; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ iounmap(card->mbase);
X free_irq(card->irq, card);

X release_region(card->port, AVMB1_PORTLEN);
X kfree(card->ctrlinfo);

@@ -500,14 +400,21 @@
X struct capicardparams param;
X int retval;


X
+ if (pci_enable_device(dev) < 0) {

+ printk(KERN_ERR "%s: failed to enable AVM-B1\n",
+ driver->name);
+ return -ENODEV;
+ }
+ param.irq = dev->irq;
+
X if (dev->base_address[ 2] & PCI_BASE_ADDRESS_IO_MASK) { /* B1 PCI V4 */
X #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
X driver = &b1pciv4_driver;
+
+ pci_set_master(dev);
X #endif


X param.membase = dev->base_address[ 0] & PCI_BASE_ADDRESS_MEM_MASK;

X param.port = dev->base_address[ 2] & PCI_BASE_ADDRESS_IO_MASK;
- param.irq = dev->irq;
-
X
X printk(KERN_INFO
X "%s: PCI BIOS reports AVM-B1 V4 at i/o %#x, irq %d, mem %#x\n",
@@ -525,7 +432,6 @@
X } else {
X param.membase = 0;


X param.port = dev->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK;

- param.irq = dev->irq;
X
X printk(KERN_INFO
X "%s: PCI BIOS reports AVM-B1 at i/o %#x, irq %d\n",
@@ -548,69 +454,50 @@
X #endif
X struct pci_dev *dev = NULL;
X char *p;
- int retval;


X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {
- strncpy(driver->revision, p + 1, sizeof(driver->revision));
- p = strchr(driver->revision, '$');
- *p = 0;

+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(driver->revision, p + 2, sizeof(driver->revision));
+ driver->revision[sizeof(driver->revision)-1] = 0;
+ if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision)
+ *(p-1) = 0;
+ }

X #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
- p = strchr(revision, ':');
- strncpy(driverv4->revision, p + 1, sizeof(driverv4->revision));
- p = strchr(driverv4->revision, '$');
- *p = 0;
-#endif


+ if ((p = strchr(revision, ':')) != 0 && p[1]) {

+ strncpy(driverv4->revision, p + 2, sizeof(driverv4->revision));
+ driverv4->revision[sizeof(driverv4->revision)-1] = 0;
+ if ((p = strchr(driverv4->revision, '$')) != 0 && p > driverv4->revision)
+ *(p-1) = 0;
X }
+#endif


X
X printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision);
X

X di = attach_capi_driver(driver);
-
X if (!di) {
X printk(KERN_ERR "%s: failed to attach capi_driver\n",
X driver->name);

X MOD_DEC_USE_COUNT;
- return -EIO;


+ return -ENODEV;
X }
X

X #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
X printk(KERN_INFO "%s: revision %s\n", driverv4->name, driverv4->revision);
X
X div4 = attach_capi_driver(driverv4);
-
X if (!div4) {
X detach_capi_driver(driver);


X printk(KERN_ERR "%s: failed to attach capi_driver\n",

X driverv4->name);
X MOD_DEC_USE_COUNT;
- return -EIO;
+ return -ENODEV;
X }
X #endif


X
-#ifdef CONFIG_PCI
- if (!pci_present()) {

- printk(KERN_ERR "%s: no PCI bus present\n", driver->name);
- detach_capi_driver(driver);
-#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
- detach_capi_driver(driverv4);
-#endif


- MOD_DEC_USE_COUNT;
- return -EIO;
- }
-

X while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_B1, dev))) {
- retval = add_card(dev);
- if (retval != 0) {
- detach_capi_driver(driver);
-#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
- detach_capi_driver(driverv4);
-#endif


- MOD_DEC_USE_COUNT;
- return retval;

- }
- ncards++;
+ if (add_card(dev) == 0)
+ ncards++;
X }
X if (ncards) {
X printk(KERN_INFO "%s: %d B1-PCI card(s) detected\n",
@@ -624,12 +511,7 @@
X detach_capi_driver(driverv4);
X #endif


X MOD_DEC_USE_COUNT;
- return -ESRCH;
-#else
- printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
- MOD_DEC_USE_COUNT;
- return -EIO;
-#endif
+ return -ENODEV;
X }
X

X static void b1pci_exit(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/b1pcmcia.c linux/drivers/isdn/avmb1/b1pcmcia.c
--- v2.2.19/drivers/isdn/avmb1/b1pcmcia.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/b1pcmcia.c Wed Oct 10 01:40:49 2001
@@ -1,83 +1,10 @@
X /*
- * $Id: b1pcmcia.c,v 1.12.6.1 2001/02/13 11:43:29 kai Exp $
+ * $Id: b1pcmcia.c,v 1.12.6.4 2001/05/17 20:41:51 kai Exp $
X *
X * Module for AVM B1/M1/M2 PCMCIA-card.


X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
X *

- * $Log: b1pcmcia.c,v $
- * Revision 1.12.6.1 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.12 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.11 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.10 2000/05/06 00:52:36 kai


- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *

- * Revision 1.9 2000/04/03 13:29:24 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.8 2000/03/06 18:00:23 calle
- * - Middleware extention now working with 2.3.49 (capifs).
- * - Fixed typos in debug section of capi.c
- * - Bugfix: Makefile corrected for b1pcmcia.c


- *
- * Revision 1.7 2000/02/02 18:36:03 calle
- * - Modules are now locked while init_module is running
- * - fixed problem with memory mapping if address is not aligned
- *
- * Revision 1.6 2000/01/25 14:37:39 calle
- * new message after successfull detection including card revision and
- * used resources.
- *
- * Revision 1.5 1999/11/05 16:38:01 calle
- * Cleanups before kernel 2.4:
- * - Changed all messages to use card->name or driver->name instead of
- * constant string.
- * - Moved some data from struct avmcard into new struct avmctrl_info.
- * Changed all lowlevel capi driver to match the new structur.
- *

- * Revision 1.4 1999/08/22 20:26:26 calle


- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- * define in isdn_compat.h for older kernel versions.
- *

- * Revision 1.3 1999/07/09 15:05:41 keil


- * compat.h is now isdn_compat.h
- *

- * Revision 1.2 1999/07/05 15:09:51 calle


- * - renamed "appl_release" to "appl_released".
- * - version und profile data now cleared on controller reset
- * - extended /proc interface, to allow driver and controller specific
- * informations to include by driver hackers.
- *

- * Revision 1.1 1999/07/01 15:26:30 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *
- *
X */
X
X #include <linux/module.h>

@@ -96,7 +23,7 @@


X #include "capilli.h"
X #include "avmcard.h"
X

-static char *revision = "$Revision: 1.12.6.1 $";
+static char *revision = "$Revision: 1.12.6.4 $";


X
X /* ------------------------------------------------------------- */
X

@@ -321,10 +248,11 @@


X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {
- strncpy(driver->revision, p + 1, sizeof(driver->revision));
- p = strchr(driver->revision, '$');
- *p = 0;

+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(driver->revision, p + 2, sizeof(driver->revision));
+ driver->revision[sizeof(driver->revision)-1] = 0;
+ if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision)
+ *(p-1) = 0;

X }


X
X printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision);

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/c4.c linux/drivers/isdn/avmb1/c4.c
--- v2.2.19/drivers/isdn/avmb1/c4.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/c4.c Wed Oct 10 01:40:49 2001


@@ -1,92 +1,9 @@
X /*

- * $Id: c4.c,v 1.20.6.2 2001/02/13 11:43:29 kai Exp $
+ * $Id: c4.c,v 1.20.6.10 2001/06/09 15:14:15 kai Exp $
X *
- * Module for AVM C4 card.
+ * Module for AVM C4 & C2 card.


X *
X * (c) Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
- *

- * $Log: c4.c,v $
- * Revision 1.20.6.2 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.20.6.1 2000/11/28 12:02:45 kai


- * MODULE_DEVICE_TABLE for 2.4
- *

- * Revision 1.20.2.2 2000/11/26 17:47:53 kai


- * added PCI_DEV_TABLE for 2.4
- *

- * Revision 1.20.2.1 2000/11/26 17:14:19 kai


- * fix device ids
- * also needs patches to include/linux/pci_ids.h
- *

- * Revision 1.20 2000/11/23 20:45:14 kai
- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *
- * Revision 1.19 2000/11/19 17:02:47 kai
- * compatibility cleanup - part 3
- *

- * Revision 1.18 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.17 2000/10/10 17:44:19 kai


- * changes from/for 2.2.18
- *

- * Revision 1.16 2000/08/20 07:30:13 keil
- * changes for 2.4
- *
- * Revision 1.15 2000/08/08 09:24:19 calle


- * calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI
- *

- * Revision 1.14 2000/08/04 12:20:08 calle


- * - Fix unsigned/signed warning in the right way ...
- *

- * Revision 1.13 2000/07/20 10:21:21 calle


- * Bugfix: driver will not be unregistered, if not cards were detected.
- * this result in an oops in kcapi.c
- *

- * Revision 1.12 2000/06/19 16:51:53 keil


- * don't free skb in irq context
- *

- * Revision 1.11 2000/06/19 15:11:24 keil
- * avoid use of freed structs
- * changes from 2.4.0-ac21
- *
- * Revision 1.10 2000/05/29 12:29:18 keil


- * make pci_enable_dev compatible to 2.2 kernel versions
- *

- * Revision 1.9 2000/05/19 15:43:22 calle


- * added calls to pci_device_start().
- *

- * Revision 1.8 2000/04/03 16:38:05 calle


- * made suppress_pollack static.
- *

- * Revision 1.7 2000/04/03 13:29:24 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.6 2000/03/17 12:21:08 calle
- * send patchvalues now working.
- *
- * Revision 1.5 2000/03/16 15:21:03 calle
- * Bugfix in c4_remove: loop 5 times instead of 4 :-(
- *
- * Revision 1.4 2000/02/02 18:36:03 calle


- * - Modules are now locked while init_module is running
- * - fixed problem with memory mapping if address is not aligned
- *

- * Revision 1.3 2000/01/25 14:37:39 calle


- * new message after successfull detection including card revision and
- * used resources.
- *

- * Revision 1.2 2000/01/21 20:52:58 keil
- * pci_find_subsys as local function for 2.2.X kernel
- *
- * Revision 1.1 2000/01/20 10:51:37 calle
- * Added driver for C4.


- *
X *
X */
X

@@ -101,15 +18,17 @@
X #include <linux/pci.h>
X #include <linux/isdn_compat.h>


X #include <linux/capi.h>
+#include <linux/kernelcapi.h>

X #include <linux/init.h>
X #include <asm/io.h>
X #include <asm/uaccess.h>
+#include <linux/netdevice.h>


X #include "capicmd.h"
X #include "capiutil.h"
X #include "capilli.h"
X #include "avmcard.h"
X

-static char *revision = "$Revision: 1.20.6.2 $";
+static char *revision = "$Revision: 1.20.6.10 $";
X
X #undef CONFIG_C4_DEBUG
X #undef CONFIG_C4_POLLDEBUG
@@ -599,7 +518,7 @@
X MsgLen = _get_slice(&p, card->msgbuf);
X DataB3Len = _get_slice(&p, card->databuf);
X cidx = CAPIMSG_CONTROLLER(card->msgbuf)-card->cardnr;
- if (cidx > 3) cidx = 0;
+ if (cidx >= card->nlogcontr) cidx = 0;
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
X
X if (MsgLen < 30) { /* not CAPI 64Bit */
@@ -622,7 +541,7 @@
X ApplId = (unsigned) _get_word(&p);
X MsgLen = _get_slice(&p, card->msgbuf);
X cidx = CAPIMSG_CONTROLLER(card->msgbuf)-card->cardnr;
- if (cidx > 3) cidx = 0;
+ if (cidx >= card->nlogcontr) cidx = 0;
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
X
X if (!(skb = alloc_skb(MsgLen, GFP_ATOMIC))) {
@@ -640,7 +559,7 @@
X NCCI = _get_word(&p);
X WindowSize = _get_word(&p);
X cidx = (NCCI&0x7f) - card->cardnr;
- if (cidx > 3) cidx = 0;
+ if (cidx >= card->nlogcontr) cidx = 0;
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
X
X ctrl->new_ncci(ctrl, ApplId, NCCI, WindowSize);
@@ -654,13 +573,15 @@
X
X if (NCCI != 0xffffffff) {
X cidx = (NCCI&0x7f) - card->cardnr;
- if (cidx > 3) cidx = 0;
+ if (cidx >= card->nlogcontr) cidx = 0;
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
- ctrl->free_ncci(ctrl, ApplId, NCCI);
+ if (ctrl)
+ ctrl->free_ncci(ctrl, ApplId, NCCI);
X } else {
X for (cidx=0; cidx < 4; cidx++) {
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
- ctrl->appl_released(ctrl, ApplId);
+ if (ctrl)
+ ctrl->appl_released(ctrl, ApplId);
X }
X }
X break;
@@ -673,20 +594,28 @@
X queue_pollack(card);
X for (cidx=0; cidx < 4; cidx++) {
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
- ctrl->resume_output(ctrl);
+ if (ctrl)
+ ctrl->resume_output(ctrl);
X }
X break;
X
X case RECEIVE_STOP:
X for (cidx=0; cidx < 4; cidx++) {
X ctrl = card->ctrlinfo[cidx].capi_ctrl;
- ctrl->suspend_output(ctrl);
+ if (ctrl)
+ ctrl->suspend_output(ctrl);
X }
X break;
X
X case RECEIVE_INIT:
X
- cidx = card->nlogcontr++;
+ cidx = card->nlogcontr;
+ if (cidx >= 4 || !card->ctrlinfo[cidx].capi_ctrl) {
+ printk(KERN_ERR "%s: card with %d controllers ??\n",
+ card->name, cidx+1);
+ break;
+ }
+ card->nlogcontr++;
X cinfo = &card->ctrlinfo[cidx];
X ctrl = cinfo->capi_ctrl;
X cinfo->versionlen = _get_slice(&p, cinfo->versionbuf);
@@ -740,6 +669,8 @@
X if (status & DBELL_RESET_HOST) {
X int i;
X c4outmeml(card->mbase+PCI_OUT_INT_MASK, 0x0c);
+ if (card->nlogcontr == 0)
+ return;
X printk(KERN_ERR "%s: unexpected reset\n", card->name);
X for (i=0; i < 4; i++) {
X avmctrl_info *cinfo = &card->ctrlinfo[i];
@@ -747,6 +678,7 @@
X if (cinfo->capi_ctrl)
X cinfo->capi_ctrl->reseted(cinfo->capi_ctrl);
X }
+ card->nlogcontr = 0;
X return;
X }
X
@@ -815,7 +747,7 @@


X _put_byte(&p, 0);
X _put_byte(&p, 0);
X _put_byte(&p, SEND_INIT);
- _put_word(&p, AVM_NAPPS);
+ _put_word(&p, CAPI_MAXAPPL);
X _put_word(&p, AVM_NCCI_PER_CHANNEL*30);
X _put_word(&p, card->cardnr - 1);
X skb_put(skb, (__u8 *)p - (__u8 *)skb->data);

@@ -978,6 +910,7 @@
X if (cinfo->capi_ctrl)
X cinfo->capi_ctrl->reseted(cinfo->capi_ctrl);
X }
+ card->nlogcontr = 0;
X }
X
X static void c4_remove_ctr(struct capi_ctr *ctrl)
@@ -997,7 +930,7 @@
X }
X

X free_irq(card->irq, card);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X release_region(card->port, AVMB1_PORTLEN);
X ctrl->driverdata = 0;
X kfree(card->ctrlinfo);

@@ -1130,6 +1063,7 @@


X case avm_t1isa: s = "T1 ISA (HEMA)"; break;
X case avm_t1pci: s = "T1 PCI"; break;
X case avm_c4: s = "C4"; break;
+ case avm_c2: s = "C2"; break;
X default: s = "???"; break;
X }
X len += sprintf(page+len, "%-16s %s\n", "type", s);

@@ -1177,9 +1111,10 @@


X
X /* ------------------------------------------------------------- */
X

-static int c4_add_card(struct capi_driver *driver, struct capicardparams *p)
+static int c4_add_card(struct capi_driver *driver,
+ struct capicardparams *p,
+ int nr)


X {
- unsigned long base, page_offset;

X avmctrl_info *cinfo;
X avmcard *card;
X int retval;
@@ -1217,11 +1152,11 @@
X cinfo = &card->ctrlinfo[i];
X cinfo->card = card;
X }
- sprintf(card->name, "c4-%x", p->port);
+ sprintf(card->name, "%s-%x", driver->name, p->port);
X card->port = p->port;
X card->irq = p->irq;
X card->membase = p->membase;
- card->cardtype = avm_c4;
+ card->cardtype = nr == 4 ? avm_c4 : avm_c2;
X
X if (check_region(card->port, AVMB1_PORTLEN)) {
X printk(KERN_WARNING
@@ -1234,12 +1169,8 @@


X return -EBUSY;
X }
X
- base = card->membase & PAGE_MASK;
- page_offset = card->membase - base;

- card->mbase = ioremap_nocache(base, page_offset + 128);


- if (card->mbase) {
- card->mbase += page_offset;
- } else {

+ card->mbase = ioremap_nocache(card->membase, 128);
+ if (card->mbase == 0) {


X printk(KERN_NOTICE "%s: can't remap memory at 0x%lx\n",
X driver->name, card->membase);
X kfree(card->ctrlinfo);

@@ -1252,7 +1183,7 @@
X if ((retval = c4_detect(card)) != 0) {


X printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n",
X driver->name, card->port, retval);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X kfree(card->ctrlinfo);
X kfree(card->dma);
X kfree(card);

@@ -1267,7 +1198,7 @@


X if (retval) {
X printk(KERN_ERR "%s: unable to get IRQ %d.\n",
X driver->name, card->irq);
- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);
X release_region(card->port, AVMB1_PORTLEN);
X kfree(card->ctrlinfo);
X kfree(card->dma);

@@ -1276,7 +1207,7 @@


X return -EBUSY;
X }
X

- for (i=0; i < 4; i++) {
+ for (i=0; i < nr ; i++) {
X cinfo = &card->ctrlinfo[i];
X cinfo->card = card;


X cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo);

@@ -1287,7 +1218,7 @@
X cinfo = &card->ctrlinfo[i];
X di->detach_ctr(cinfo->capi_ctrl);
X }


- iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
+ iounmap(card->mbase);

X free_irq(card->irq, card);
X release_region(card->port, AVMB1_PORTLEN);
X kfree(card->dma);
@@ -1303,14 +1234,31 @@
X skb_queue_head_init(&card->dma->send_queue);
X
X printk(KERN_INFO
- "%s: AVM C4 at i/o %#x, irq %d, mem %#lx\n",
- driver->name, card->port, card->irq, card->membase);
+ "%s: AVM C%d at i/o %#x, irq %d, mem %#lx\n",
+ driver->name, nr, card->port, card->irq, card->membase);


X
X return 0;
X }

X
X /* ------------------------------------------------------------- */
X

+static struct capi_driver c2_driver = {
+ name: "c2",
+ revision: "0.0",
+ load_firmware: c4_load_firmware,
+ reset_ctr: c4_reset_ctr,
+ remove_ctr: c4_remove_ctr,
+ register_appl: c4_register_appl,
+ release_appl: c4_release_appl,
+ send_message: c4_send_message,
+
+ procinfo: c4_procinfo,
+ ctr_read_proc: c4_read_proc,
+ driver_read_proc: 0, /* use standard driver_read_proc */
+
+ add_card: 0, /* no add_card function */
+};
+
X static struct capi_driver c4_driver = {
X name: "c4",
X revision: "0.0",
@@ -1330,83 +1278,114 @@
X
X static int ncards = 0;
X
-static int __init c4_init(void)
+static int c4_attach_driver (struct capi_driver * driver)
X {
- struct capi_driver *driver = &c4_driver;
- struct pci_dev *dev = NULL;
X char *p;


- int retval;
-
- MOD_INC_USE_COUNT;
-

- if ((p = strchr(revision, ':'))) {
- strncpy(driver->revision, p + 1, sizeof(driver->revision));
- p = strchr(driver->revision, '$');
- *p = 0;

+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(driver->revision, p + 2, sizeof(driver->revision));
+ driver->revision[sizeof(driver->revision)-1] = 0;
+ if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision)
+ *(p-1) = 0;

X }


X
X printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision);
X

X di = attach_capi_driver(driver);
-
X if (!di) {
X printk(KERN_ERR "%s: failed to attach capi_driver\n",
X driver->name);

X MOD_DEC_USE_COUNT;
- return -EIO;
+ return -ENODEV;
X }
+ return 0;
+}


X
-#ifdef CONFIG_PCI
- if (!pci_present()) {
- printk(KERN_ERR "%s: no PCI bus present\n", driver->name);
- detach_capi_driver(driver);
- MOD_DEC_USE_COUNT;
- return -EIO;
- }

+static int __init search_cards(struct capi_driver * driver,
+ int pci_id, int nr)
+{
+ struct pci_dev * dev = NULL;
+ int retval = 0;
X
X while ((dev = pci_find_subsys(
X PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285,
- PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, dev))) {
+ PCI_VENDOR_ID_AVM, pci_id, dev))) {


X struct capicardparams param;
X
+ if (pci_enable_device(dev) < 0) {

+ printk(KERN_ERR "%s: failed to enable AVM-C%d\n",
+ driver->name, nr);


+ continue;
+ }
+ pci_set_master(dev);
+
X param.port = dev->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK;
X param.irq = dev->irq;
X param.membase = dev->base_address[ 0] & PCI_BASE_ADDRESS_MEM_MASK;

-
-
+
X printk(KERN_INFO
- "%s: PCI BIOS reports AVM-C4 at i/o %#x, irq %d, mem %#x\n",
- driver->name, param.port, param.irq, param.membase);
- retval = c4_add_card(driver, &param);
+ "%s: PCI BIOS reports AVM-C%d at i/o %#x, irq %d, mem %#x\n",
+ driver->name, nr, param.port, param.irq, param.membase);
+ retval = c4_add_card(driver, &param, nr);
X if (retval != 0) {
X printk(KERN_ERR
- "%s: no AVM-C4 at i/o %#x, irq %d detected, mem %#x\n",
- driver->name, param.port, param.irq, param.membase);
- detach_capi_driver(driver);
- MOD_DEC_USE_COUNT;
- return retval;
+ "%s: no AVM-C%d at i/o %#x, irq %d detected, mem %#x\n",
+ driver->name, nr, param.port, param.irq, param.membase);


+ continue;
X }
X ncards++;
X }

+ return retval;
+}
+

+static int __init c4_init(void)
+{
+ int retval;
+
+ MOD_INC_USE_COUNT;
+
+ retval = c4_attach_driver (&c4_driver);
+ if (retval) {
+ MOD_DEC_USE_COUNT;


+ return retval;
+ }
+

+ retval = c4_attach_driver (&c2_driver);
+ if (retval) {
+ MOD_DEC_USE_COUNT;


+ return retval;
+ }
+

+ retval = search_cards(&c4_driver, PCI_DEVICE_ID_AVM_C4, 4);
+ if (retval && ncards == 0) {
+ detach_capi_driver(&c2_driver);
+ detach_capi_driver(&c4_driver);
+ MOD_DEC_USE_COUNT;
+ return retval;
+ }
+ retval = search_cards(&c2_driver, 0x1100, 2);
+ if (retval && ncards == 0) {
+ detach_capi_driver(&c2_driver);
+ detach_capi_driver(&c4_driver);
+ MOD_DEC_USE_COUNT;


+ return retval;
+ }
+

X if (ncards) {
- printk(KERN_INFO "%s: %d C4 card(s) detected\n",
- driver->name, ncards);
+ printk(KERN_INFO "%s: %d C4/C2 card(s) detected\n",
+ c4_driver.name, ncards);


X MOD_DEC_USE_COUNT;
X return 0;

X }
- printk(KERN_ERR "%s: NO C4 card detected\n", driver->name);
- detach_capi_driver(driver);
+ printk(KERN_ERR "%s: NO C4/C2 card detected\n", c4_driver.name);
+ detach_capi_driver(&c4_driver);
+ detach_capi_driver(&c2_driver);


X MOD_DEC_USE_COUNT;
- return -ESRCH;
-#else
- printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
- MOD_DEC_USE_COUNT;
- return -EIO;
-#endif
+ return -ENODEV;
X }
X

X static void c4_exit(void)
X {
+ detach_capi_driver(&c2_driver);
X detach_capi_driver(&c4_driver);
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capi.c linux/drivers/isdn/avmb1/capi.c
--- v2.2.19/drivers/isdn/avmb1/capi.c Sun Mar 25 17:37:31 2001
+++ linux/drivers/isdn/avmb1/capi.c Wed Oct 10 01:40:49 2001
@@ -1,226 +1,10 @@
X /*
- * $Id: capi.c,v 1.44.6.5 2001/02/13 11:43:29 kai Exp $
+ * $Id: capi.c,v 1.44.6.12 2001/06/09 15:14:15 kai Exp $
X *
X * CAPI 2.0 Interface for Linux
X *
X * Copyright 1996 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: capi.c,v $
- * Revision 1.44.6.5 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.44.6.4 2001/02/10 14:41:20 kai
- * Changes from kernel tree
- *
- * Revision 1.44.6.3 2000/12/17 22:45:08 kai
- * That's hopefully it for test13-4
- *
- * Revision 1.44.6.2 2000/12/14 23:04:12 kai
- * Makefile changes and the like for 2.4.0-test13-pre1
- * No compatiblity code for older kernels yet, but note the branch
- *
- * Revision 1.45 2000/12/02 19:47:29 kai
- * Change the Makefiles to new style.
- * There may be problems there that I missed, so this shouldn't go into
- * an offical kernel any time soon.
- * However, if I didn't commit it, we wouldn't find the bugs...
- *
- * Revision 1.44 2000/11/25 17:00:59 kai
- * compatibility cleanup - final part for the time being
- *
- * Revision 1.43 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.42 2000/11/19 17:03:55 kai
- * compatibility cleanup - part 5
- *
- * Revision 1.41 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.40 2000/10/24 15:15:04 calle
- * Workaround: pppd calls restoretty before reseting the ldisc and
- * ldisc "ppp_sync" didn't support this. So we call n_tty_ioctl
- * in the driver ioctl function. (remember: driver ioctl function is
- * only called if ldisc ioctl function did not handle the call)
- *
- * Revision 1.39 2000/07/24 13:42:50 calle
- * - lock_kernel/unlock_kernel for _release functions. (from 2.4)
- *
- * Revision 1.38 2000/07/24 08:49:09 calle
- * - Bugfix: capiminor_del_all_ack completely wrong :-(
- *
- * Revision 1.37 2000/07/20 10:22:27 calle


- * - Made procfs function cleaner and removed variable "begin".

- *
- * Revision 1.36 2000/06/29 13:59:35 calle
- * - call to devfs_register was wrong
- *
- * Revision 1.35 2000/06/19 15:11:24 keil
- * avoid use of freed structs
- * changes from 2.4.0-ac21
- *
- * Revision 1.34 2000/06/18 16:09:54 keil
- * more changes for 2.4
- *
- * Revision 1.33 2000/05/18 16:35:43 calle
- * Uaaahh. Bad memory leak fixed.
- *
- * Revision 1.32 2000/04/21 12:38:42 calle


- * Bugfix: error in proc_ functions, begin-off => off-begin

- *
- * Revision 1.31 2000/04/03 13:29:24 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.30 2000/03/19 12:31:36 calle
- * PPP over CAPI raw driver disabled for now, ppp_generic has been changed.
- *
- * Revision 1.29 2000/03/13 17:48:13 calle
- * removed unused variable.
- *
- * Revision 1.28 2000/03/08 17:06:33 calle
- * - changes for devfs and 2.3.49
- * - capifs now configurable (no need with devfs)
- * - New Middleware ioctl CAPI_NCCI_GETUNIT
- * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs)
- *
- * Revision 1.27 2000/03/06 18:00:23 calle
- * - Middleware extention now working with 2.3.49 (capifs).
- * - Fixed typos in debug section of capi.c
- * - Bugfix: Makefile corrected for b1pcmcia.c
- *
- * Revision 1.26 2000/03/03 16:48:38 calle


- * - Added CAPI2.0 Middleware support (CONFIG_ISDN_CAPI)
- * It is now possible to create a connection with a CAPI2.0 applikation
- * and than to handle the data connection from /dev/capi/ (capifs) and also
- * using async or sync PPP on this connection.
- * The two major device number 190 and 191 are not confirmed yet,
- * but I want to save the code in cvs, before I go on.

- *
- * Revision 1.25 2000/03/03 16:37:11 kai
- * incorporated some cosmetic changes from the official kernel tree back
- * into CVS
- *
- * Revision 1.24 2000/03/03 15:50:42 calle


- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.

- *
- * Revision 1.23 2000/02/26 01:00:53 keil


- * changes from 2.3.47
- *

- * Revision 1.22 1999/11/13 21:27:16 keil
- * remove KERNELVERSION
- *
- * Revision 1.21 1999/09/10 17:24:18 calle


- * Changes for proposed standard for CAPI2.0:
- * - AK148 "Linux Exention"

- *
- * Revision 1.20 1999/09/07 09:02:53 calle


- * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
- * DATA_B3_IND is always directly after the CAPI message. The "Data" member
- * ist never used inside the kernel.
- *

- * Revision 1.19 1999/07/09 15:05:42 keil


- * compat.h is now isdn_compat.h
- *

- * Revision 1.18 1999/07/06 07:42:01 calle


- * - changes in /proc interface
- * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb.
- *

- * Revision 1.17 1999/07/01 15:26:30 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *

- * Revision 1.16 1999/07/01 08:22:57 keil


- * compatibility macros now in <linux/isdn_compat.h>

- *
- * Revision 1.15 1999/06/21 15:24:11 calle
- * extend information in /proc.
- *
- * Revision 1.14 1999/06/10 16:51:03 calle
- * Bugfix: open/release of control device was not handled correct.
- *
- * Revision 1.13 1998/08/28 04:32:25 calle
- * Added patch send by Michael....@post.rwth-aachen.de, to get AVM B1
- * driver running with 2.1.118.
- *
- * Revision 1.12 1998/05/26 22:39:34 he
- * sync'ed with 2.1.102 where appropriate (CAPABILITY changes)
- * concap typo
- * cleared dev.tbusy in isdn_net BCONN status callback
- *
- * Revision 1.11 1998/03/09 17:46:37 he
- * merged in 2.1.89 changes
- *
- * Revision 1.10 1998/02/13 07:09:13 calle
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.9 1998/01/31 11:14:44 calle
- * merged changes to 2.0 tree, prepare 2.1.82 to work.
- *
- * Revision 1.8 1997/11/04 06:12:08 calle


- * capi.c: new read/write in file_ops since 2.1.60
- * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware.
- * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON)
- * compat.h: added #define LinuxVersionCode

- *
- * Revision 1.7 1997/10/11 10:29:34 calle
- * llseek() parameters changed in 2.1.56.
- *
- * Revision 1.6 1997/10/01 09:21:15 fritz


- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.

- *
- * Revision 1.5 1997/08/21 23:11:55 fritz
- * Added changes for kernels >= 2.1.45
- *
- * Revision 1.4 1997/05/27 15:17:50 fritz
- * Added changes for recent 2.1.x kernels:
- * changed return type of isdn_close
- * queue_task_* -> queue_task
- * clear/set_bit -> test_and_... where apropriate.
- * changed type of hard_header_cache parameter.
- *
- * Revision 1.3 1997/05/18 09:24:14 calle


- * added verbose disconnect reason reporting to avmb1.
- * some fixes in capi20 interface.
- * changed info messages for B1-PCI

- *
- * Revision 1.2 1997/03/05 21:17:59 fritz
- * Added capi_poll for compiling under 2.1.27
- *
- * Revision 1.1 1997/03/04 21:50:29 calle


- * Frirst version in isdn4linux

- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *


- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision

- *
X */
X
X #include <linux/config.h>

@@ -237,6 +21,7 @@
X #include <linux/smp_lock.h>
X #include <linux/timer.h>
X #include <linux/wait.h>
+#include <linux/isdn_compat.h>
X #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
X #include <linux/tty.h>
X #ifdef CONFIG_PPP
@@ -258,7 +43,7 @@
X #include "capifs.h"
X #endif
X
-static char *revision = "$Revision: 1.44.6.5 $";
+static char *revision = "$Revision: 1.44.6.12 $";
X
X MODULE_AUTHOR("Carsten Paeth (ca...@calle.in-berlin.de)");
X
@@ -465,7 +250,6 @@
X void capiminor_free(struct capiminor *mp)
X {
X struct capiminor **pp;
- struct sk_buff *skb;
X
X pp = &minors;
X while (*pp) {
@@ -473,12 +257,9 @@
X *pp = (*pp)->next;
X if (mp->ttyskb) kfree_skb(mp->ttyskb);
X mp->ttyskb = 0;
- while ((skb = skb_dequeue(&mp->recvqueue)) != 0)
- kfree_skb(skb);
- while ((skb = skb_dequeue(&mp->inqueue)) != 0)
- kfree_skb(skb);
- while ((skb = skb_dequeue(&mp->outqueue)) != 0)
- kfree_skb(skb);
+ skb_queue_purge(&mp->recvqueue);
+ skb_queue_purge(&mp->inqueue);
+ skb_queue_purge(&mp->outqueue);
X capiminor_del_all_ack(mp);
X kfree(mp);
X MOD_DEC_USE_COUNT;
@@ -517,9 +298,6 @@
X memset(np, 0, sizeof(struct capincci));
X np->ncci = ncci;
X np->cdev = cdev;
- for (pp=&cdev->nccis; *pp; pp = &(*pp)->next)
- ;
- *pp = np;
X #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
X mp = 0;
X if (cdev->userflags & CAPIFLAG_HIGHJACKING)
@@ -537,6 +315,9 @@
X #endif
X }
X #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
+ for (pp=&cdev->nccis; *pp; pp = &(*pp)->next)
+ ;
+ *pp = np;
X return np;
X }
X
@@ -620,15 +401,12 @@
X static void capidev_free(struct capidev *cdev)
X {
X struct capidev **pp;


- struct sk_buff *skb;
X

X if (cdev->applid)
X (*capifuncs->capi_release) (cdev->applid);
X cdev->applid = 0;
X
- while ((skb = skb_dequeue(&cdev->recvqueue)) != 0) {
- kfree_skb(skb);
- }
+ skb_queue_purge(&cdev->recvqueue);
X
X pp=&capidev_openlist;
X while (*pp && *pp != cdev) pp = &(*pp)->next;
@@ -985,6 +763,8 @@
X return -ENODEV;
X
X skb = alloc_skb(count, GFP_USER);
+ if (!skb)
+ return -ENOMEM;
X
X if ((retval = copy_from_user(skb_put(skb, count), buf, count))) {
X kfree_skb(skb);
@@ -1401,6 +1181,8 @@
X return -EINVAL;
X
X skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+count, GFP_USER);
+ if (!skb)
+ return -ENOMEM;
X
X skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
X if ((retval = copy_from_user(skb_put(skb, count), buf, count))) {
@@ -2028,20 +1810,22 @@
X callback: lower_callback,
X };
X
-static char rev[10];
+static char rev[32];
X
X static int __init capi_init(void)
X {
X char *p;
+ char *compileinfo;


X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {

- strcpy(rev, p + 2);


- p = strchr(rev, '$');

- *(p-1) = 0;


+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(rev, p + 2, sizeof(rev));
+ rev[sizeof(rev)-1] = 0;
+ if ((p = strchr(rev, '$')) != 0 && p > rev)
+ *(p-1) = 0;
X } else

- strcpy(rev, "???");
+ strcpy(rev, "1.0");
X
X if (register_chrdev(capi_major, "capi20", &capi_fops)) {
X printk(KERN_ERR "capi20: unable to get major %d\n", capi_major);
@@ -2082,8 +1866,17 @@
X
X (void)proc_init();
X
- printk(KERN_NOTICE "capi20: Rev%s: started up with major %d\n",
- rev, capi_major);
+#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
+#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
+ compileinfo = " (middleware+capifs)";
+#else
+ compileinfo = " (no capifs)";
+#endif
+#else
+ compileinfo = " (no middleware)";
+#endif
+ printk(KERN_NOTICE "capi20: Rev %s: started up with major %d%s\n",
+ rev, capi_major, compileinfo);
X

X MOD_DEC_USE_COUNT;
X return 0;

@@ -2102,7 +1895,7 @@
X unregister_chrdev(capi_rawmajor, "capi/r%d");
X #endif
X (void) detach_capi_interface(&cuser);
- printk(KERN_NOTICE "capi: Rev%s: unloaded\n", rev);
+ printk(KERN_NOTICE "capi: Rev %s: unloaded\n", rev);
X }
X
X module_init(capi_init);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capicmd.h linux/drivers/isdn/avmb1/capicmd.h
--- v2.2.19/drivers/isdn/avmb1/capicmd.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capicmd.h Wed Oct 10 01:40:49 2001
@@ -1,31 +1,9 @@
X /*
- * $Id: capicmd.h,v 1.2 2000/03/03 15:50:42 calle Exp $
+ * $Id: capicmd.h,v 1.2.6.1 2001/05/17 20:41:51 kai Exp $
X *
X * CAPI 2.0 Interface for Linux
X *
X * Copyright 1997 by Carsten Paeth (ca...@calle.in-berlin.de)
- *
- * $Log: capicmd.h,v $
- * Revision 1.2 2000/03/03 15:50:42 calle


- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.

- *
- * Revision 1.1 1997/03/04 21:50:30 calle


- * Frirst version in isdn4linux

- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *


- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision

- *
X *
X */

X #ifndef __CAPICMD_H__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capidev.h linux/drivers/isdn/avmb1/capidev.h
--- v2.2.19/drivers/isdn/avmb1/capidev.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capidev.h Wed Oct 10 01:40:49 2001
@@ -1,55 +1,9 @@
X /*
- * $Id: capidev.h,v 1.6 2000/11/25 17:00:59 kai Exp $
+ * $Id: capidev.h,v 1.6.6.1 2001/05/17 20:41:51 kai Exp $
X *
X * CAPI 2.0 Interface for Linux
X *
X * (c) Copyright 1996 by Carsten Paeth (ca...@calle.in-berlin.de)
- *
- * $Log: capidev.h,v $
- * Revision 1.6 2000/11/25 17:00:59 kai
- * compatibility cleanup - final part for the time being
- *
- * Revision 1.5 2000/03/03 15:50:42 calle


- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.

- *
- * Revision 1.4 1999/07/01 15:26:32 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *

- * Revision 1.3 1999/07/01 08:22:58 keil


- * compatibility macros now in <linux/isdn_compat.h>

- *
- * Revision 1.2 1999/06/21 15:24:13 calle
- * extend information in /proc.
- *
- * Revision 1.1 1997/03/04 21:50:30 calle


- * Frirst version in isdn4linux

- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *


- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision

X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capidrv.c linux/drivers/isdn/avmb1/capidrv.c
--- v2.2.19/drivers/isdn/avmb1/capidrv.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capidrv.c Wed Oct 10 01:40:49 2001
@@ -1,202 +1,10 @@
X /*
- * $Id: capidrv.c,v 1.39.6.2 2001/02/13 11:43:29 kai Exp $
+ * $Id: capidrv.c,v 1.39.6.6 2001/05/17 20:41:51 kai Exp $
X *
X * ISDN4Linux Driver, using capi20 interface (kernelcapi)
X *
X * Copyright 1997 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: capidrv.c,v $
- * Revision 1.39.6.2 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.39.6.1 2001/02/10 14:41:20 kai
- * Changes from kernel tree
- *
- * Revision 1.39 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.38 2000/11/14 08:43:07 calle
- * Bugfix for v110. Connectparamters where setup for sync ...
- *
- * Revision 1.37 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.36 2000/06/26 15:13:41 keil
- * features should be or'ed
- *
- * Revision 1.35 2000/06/19 15:11:25 keil
- * avoid use of freed structs
- * changes from 2.4.0-ac21
- *
- * Revision 1.34 2000/06/19 13:13:55 calle
- * Added Modemsupport!
- *
- * Revision 1.33 2000/05/06 00:52:36 kai


- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *

- * Revision 1.32 2000/04/07 15:19:58 calle
- * remove warnings
- *
- * Revision 1.31 2000/04/06 15:01:25 calle


- * Bugfix: crash in capidrv.c when reseting a capi controller.
- * - changed code order on remove of controller.
- * - using tq_schedule for notifier in kcapi.c.
- * - now using spin_lock_irqsave() and spin_unlock_irqrestore().

- * strange: sometimes even MP hang on unload of isdn.o ...
- *
- * Revision 1.30 2000/03/03 15:50:42 calle


- * - kernel CAPI:
- * - Changed parameter "param" in capi_signal from __u32 to void *.
- * - rewrote notifier handling in kcapi.c
- * - new notifier NCCI_UP and NCCI_DOWN
- * - User CAPI:
- * - /dev/capi20 is now a cloning device.
- * - middleware extentions prepared.
- * - capidrv.c
- * - locking of list operations and module count updates.

- *
- * Revision 1.29 1999/12/06 17:13:06 calle
- * Added controller watchdog.
- *
- * Revision 1.28 1999/11/05 16:22:37 calle
- * Bugfix: Missing break in switch on ISDN_CMD_HANGUP.
- *
- * Revision 1.27 1999/09/16 15:13:04 calle
- * forgot to change paramter type of contr for lower_callback ...
- *
- * Revision 1.26 1999/08/06 07:41:16 calle
- * Added the "vbox patch". if (si1 == 1) si2 = 0;
- *
- * Revision 1.25 1999/08/04 10:10:11 calle


- * Bugfix: corrected /proc functions, added structure for new AVM cards.
- *

- * Revision 1.24 1999/07/20 06:48:02 calle
- * Bugfix: firmware version check for D2 trace was too restrictiv.
- *
- * Revision 1.23 1999/07/09 15:05:44 keil


- * compat.h is now isdn_compat.h
- *

- * Revision 1.22 1999/07/06 07:24:14 calle
- * Bugfix: call to kfree_skb in capidrv_signal was too early,
- * thanks to Lars Heete <h...@admin.de>.
- *
- * Revision 1.21 1999/07/01 15:26:34 calle


- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *

- * Revision 1.20 1999/07/01 08:22:59 keil


- * compatibility macros now in <linux/isdn_compat.h>

- *
- * Revision 1.19 1999/06/29 16:16:54 calle
- * Let ISDN_CMD_UNLOAD work with open isdn devices without crash again.
- * Also right unlocking (ISDN_CMD_UNLOCK) is done now.
- * isdnlog should check returncode of read(2) calls.
- *
- * Revision 1.18 1999/06/21 15:24:15 calle
- * extend information in /proc.
- *
- * Revision 1.17 1999/06/10 16:53:55 calle
- * Removing of module b1pci will now remove card from lower level.
- *
- * Revision 1.16 1999/05/31 11:50:33 calle
- * Bugfix: In if_sendbuf, skb_push'ed DATA_B3 header was not skb_pull'ed
- * on failure, result in data block with DATA_B3 header transmitted
- *
- * Revision 1.15 1999/05/25 21:26:16 calle
- * Include CAPI-Channelallocation (leased lines) from the 2.0 tree.
- *
- * Revision 1.14 1999/05/22 07:55:06 calle
- * Added *V110* to AVM B1 driver.
- *
- * Revision 1.13 1998/06/26 15:12:55 fritz
- * Added handling of STAT_ICALL with incomplete CPN.
- * Added AT&L for ttyI emulator.
- * Added more locking stuff in tty_write.
- *
- * Revision 1.12 1998/03/29 16:06:03 calle
- * changes from 2.0 tree merged.
- *
- * Revision 1.3.2.10 1998/03/20 14:38:24 calle
- * capidrv: prepared state machines for suspend/resume/hold
- * capidrv: fix bug in state machine if B1/T1 is out of nccis
- * b1capi: changed some errno returns.
- * b1capi: detect if you try to add same T1 to different io address.
- * b1capi: change number of nccis depending on number of channels.
- * b1lli: cosmetics
- *
- * Revision 1.3.2.9 1998/03/20 09:01:12 calle
- * Changes capi_register handling to get full support for 30 bchannels.
- *
- * Revision 1.3.2.8 1998/03/18 17:51:28 calle
- * added controller number to error messages
- *
- * Revision 1.3.2.7 1998/02/27 15:40:47 calle
- * T1 running with slow link. bugfix in capi_release.
- *
- * Revision 1.11 1998/02/13 07:09:15 calle
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.10 1998/02/02 19:52:23 calle
- * Fixed vbox (audio) acceptb.
- *
- * Revision 1.9 1998/01/31 11:14:45 calle
- * merged changes to 2.0 tree, prepare 2.1.82 to work.
- *
- * Revision 1.8 1997/11/04 06:12:09 calle


- * capi.c: new read/write in file_ops since 2.1.60
- * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware.
- * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON)
- * compat.h: added #define LinuxVersionCode

- *
- * Revision 1.7 1997/10/11 10:36:34 calle
- * Added isdnlog support. patch to isdnlog needed.
- *
- * Revision 1.6 1997/10/11 10:25:55 calle
- * New interface for lowlevel drivers. BSENT with nr. of bytes sent,
- * allow sending without ACK.
- *
- * Revision 1.5 1997/10/01 09:21:16 fritz


- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.

- *
- * Revision 1.4 1997/07/13 12:22:43 calle
- * bug fix for more than one controller in connect_req.
- * debugoutput now with contrnr.
- *
- * Revision 1.3 1997/05/18 09:24:15 calle


- * added verbose disconnect reason reporting to avmb1.
- * some fixes in capi20 interface.
- * changed info messages for B1-PCI

- *
- * Revision 1.2 1997/03/05 21:19:59 fritz
- * Removed include of config.h (mkdep stated this is unneded).
- *
- * Revision 1.1 1997/03/04 21:50:31 calle


- * Frirst version in isdn4linux

- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *


- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision

- *
X */
X
X #include <linux/module.h>

@@ -225,7 +33,7 @@
X #include "capicmd.h"
X #include "capidrv.h"
X
-static char *revision = "$Revision: 1.39.6.2 $";
+static char *revision = "$Revision: 1.39.6.6 $";
X static int debugmode = 0;
X
X MODULE_AUTHOR("Carsten Paeth <ca...@calle.in-berlin.de>");
@@ -494,7 +302,7 @@
X }
X
X
-/* -------- controller managment ------------------------------------- */
+/* -------- controller management ------------------------------------- */
X
X static inline capidrv_contr *findcontrbydriverid(int driverid)
X {
@@ -2063,8 +1871,8 @@
X __u16 datahandle;
X
X if (!card) {
- printk(KERN_ERR "capidrv-%d: if_sendbuf called with invalid driverId %d!\n",
- card->contrnr, id);
+ printk(KERN_ERR "capidrv: if_sendbuf called with invalid driverId %d!\n",
+ id);
X return 0;
X }
X if (debugmode > 1)
@@ -2133,8 +1941,8 @@
X __u8 *p;
X
X if (!card) {
- printk(KERN_ERR "capidrv-%d: if_readstat called with invalid driverId %d!\n",
- card->contrnr, id);
+ printk(KERN_ERR "capidrv: if_readstat called with invalid driverId %d!\n",
+ id);


X return -ENODEV;
X }
X

@@ -2490,7 +2298,7 @@
X {
X struct capi_register_params rparam;
X capi_profile profile;


- char rev[10];
+ char rev[32];

X char *p;
X __u32 ncontr, contr;
X __u16 errcode;
@@ -2504,12 +2312,13 @@
X return -EIO;
X }


X
- if ((p = strchr(revision, ':'))) {

- strcpy(rev, p + 1);


- p = strchr(rev, '$');
- *p = 0;
+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(rev, p + 2, sizeof(rev));
+ rev[sizeof(rev)-1] = 0;
+ if ((p = strchr(rev, '$')) != 0 && p > rev)
+ *(p-1) = 0;
X } else

- strcpy(rev, " ??? ");
+ strcpy(rev, "1.0");
X
X rparam.level3cnt = -2; /* number of bchannels twice */
X rparam.datablkcnt = 16;
@@ -2540,7 +2349,7 @@
X }
X proc_init();
X
- printk(KERN_NOTICE "capidrv: Rev%s: loaded\n", rev);
+ printk(KERN_NOTICE "capidrv: Rev %s: loaded\n", rev);
X MOD_DEC_USE_COUNT;
X
X return 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capidrv.h linux/drivers/isdn/avmb1/capidrv.h
--- v2.2.19/drivers/isdn/avmb1/capidrv.h Sun Mar 25 17:31:37 2001
+++ linux/drivers/isdn/avmb1/capidrv.h Wed Oct 10 01:40:49 2001
@@ -1,30 +1,9 @@
X /*
- * $Id: capidrv.h,v 1.2 1998/03/29 16:06:06 calle Exp $
+ * $Id: capidrv.h,v 1.2.8.1 2001/05/17 20:41:51 kai Exp $
X *
X * ISDN4Linux Driver, using capi20 interface (kernelcapi)
X *
X * Copyright 1997 by Carsten Paeth (ca...@calle.in-berlin.de)
- *
- * $Log: capidrv.h,v $
- * Revision 1.2 1998/03/29 16:06:06 calle
- * changes from 2.0 tree merged.
- *
- * Revision 1.1.2.1 1998/03/20 14:38:28 calle
- * capidrv: prepared state machines for suspend/resume/hold
- * capidrv: fix bug in state machine if B1/T1 is out of nccis
- * b1capi: changed some errno returns.
- * b1capi: detect if you try to add same T1 to different io address.
- * b1capi: change number of nccis depending on number of channels.
- * b1lli: cosmetics
- *
- * Revision 1.1 1997/03/04 21:50:33 calle


- * Frirst version in isdn4linux

- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *


- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision

X *
X */
X #ifndef __CAPIDRV_H__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capifs.c linux/drivers/isdn/avmb1/capifs.c
--- v2.2.19/drivers/isdn/avmb1/capifs.c Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capifs.c Wed Oct 10 01:40:49 2001
@@ -1,81 +1,10 @@
X /*
- * $Id: capifs.c,v 1.14.6.3 2001/02/13 11:43:29 kai Exp $
+ * $Id: capifs.c,v 1.14.6.7 2001/05/24 08:29:08 kai Exp $
X *
X * (c) Copyright 2000 by Carsten Paeth (ca...@calle.de)
X *
X * Heavily based on devpts filesystem from H. Peter Anvin
X *
- * $Log: capifs.c,v $
- * Revision 1.14.6.3 2001/02/13 11:43:29 kai


- * more compatility changes for 2.2.19
- *

- * Revision 1.14.6.2 2001/02/10 14:41:20 kai
- * Changes from kernel tree
- *
- * Revision 1.14.6.1 2000/11/28 12:02:45 kai


- * MODULE_DEVICE_TABLE for 2.4
- *

- * Revision 1.14.2.1 2000/11/26 17:47:53 kai


- * added PCI_DEV_TABLE for 2.4
- *

- * Revision 1.14 2000/11/23 20:45:14 kai


- * fixed module_init/exit stuff
- * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
- *

- * Revision 1.13 2000/11/18 16:17:25 kai
- * change from 2.4 tree
- *
- * Revision 1.12 2000/11/01 14:05:02 calle


- * - use module_init/module_exit from linux/init.h.
- * - all static struct variables are initialized with "membername:" now.
- * - avm_cs.c, let it work with newer pcmcia-cs.
- *

- * Revision 1.11 2000/10/24 15:08:47 calle
- * Too much includes.
- *
- * Revision 1.10 2000/10/12 10:12:35 calle
- * Bugfix: second iput(inode) on umount, destroies a foreign inode.
- *
- * Revision 1.9 2000/08/20 07:30:13 keil
- * changes for 2.4
- *
- * Revision 1.8 2000/07/20 10:23:13 calle
- * Include isdn_compat.h for people that don't use -p option of std2kern.
- *
- * Revision 1.7 2000/06/18 16:09:54 keil
- * more changes for 2.4
- *
- * Revision 1.6 2000/04/03 13:29:25 calle


- * make Tim Waugh happy (module unload races in 2.3.99-pre3).
- * no real problem there, but now it is much cleaner ...
- *

- * Revision 1.5 2000/03/13 17:49:52 calle
- * make it running with 2.3.51.
- *
- * Revision 1.4 2000/03/08 17:06:33 calle
- * - changes for devfs and 2.3.49
- * - capifs now configurable (no need with devfs)
- * - New Middleware ioctl CAPI_NCCI_GETUNIT
- * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs)
- *
- * Revision 1.3 2000/03/06 18:00:23 calle
- * - Middleware extention now working with 2.3.49 (capifs).
- * - Fixed typos in debug section of capi.c
- * - Bugfix: Makefile corrected for b1pcmcia.c
- *
- * Revision 1.2 2000/03/06 09:17:07 calle
- * - capifs: fileoperations now in inode (change for 2.3.49)
- * - Config.in: Middleware extention not a tristate, uups.
- *
- * Revision 1.1 2000/03/03 16:48:38 calle


- * - Added CAPI2.0 Middleware support (CONFIG_ISDN_CAPI)
- * It is now possible to create a connection with a CAPI2.0 applikation
- * and than to handle the data connection from /dev/capi/ (capifs) and also
- * using async or sync PPP on this connection.
- * The two major device number 190 and 191 are not confirmed yet,
- * but I want to save the code in cvs, before I go on.

- *
- *
X */
X

X #include <linux/version.h>
@@ -94,12 +23,13 @@
X #include <linux/major.h>
X #include <linux/slab.h>
X #include <linux/ctype.h>
+#include <linux/isdn_compat.h>
X #include <asm/bitops.h>
X #include <asm/uaccess.h>
X
X MODULE_AUTHOR("Carsten Paeth <ca...@calle.de>");
X
-static char *revision = "$Revision: 1.14.6.3 $";
+static char *revision = "$Revision: 1.14.6.7 $";
X
X struct capifs_ncci {
X struct inode *inode;
@@ -279,24 +209,16 @@
X
X kfree(sbi->nccis);
X kfree(sbi);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X MOD_DEC_USE_COUNT;
-#endif
X }
X
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X static int capifs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz);
X static void capifs_write_inode(struct inode *inode) { };
-#else
-static int capifs_statfs(struct super_block *sb, struct statfs *buf);
-#endif
X static void capifs_read_inode(struct inode *inode);
X
X static struct super_operations capifs_sops = {
X read_inode: capifs_read_inode,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X write_inode: capifs_write_inode,
-#endif
X put_super: capifs_put_super,
X statfs: capifs_statfs,
X };
@@ -367,10 +289,8 @@
X struct dentry * root;
X struct capifs_sb_info *sbi;
X
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X MOD_INC_USE_COUNT;
X lock_super(s);
-#endif
X /* Super block already completed? */
X if (s->s_root)
X goto out;
@@ -446,19 +366,14 @@
X mounts = s;
X
X out: /* Success ... somebody else completed the super block for us. */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X unlock_super(s);
-#endif
X return s;
X fail:
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X unlock_super(s);
X MOD_DEC_USE_COUNT;
-#endif


X return NULL;
X }
X

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X static int capifs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
X {
X struct statfs tmp;
@@ -473,20 +388,6 @@
X tmp.f_namelen = NAME_MAX;
X return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0;
X }
-#else
-static int capifs_statfs(struct super_block *sb, struct statfs *buf)
-{
- buf->f_type = CAPIFS_SUPER_MAGIC;
- buf->f_bsize = 1024;
- buf->f_blocks = 0;
- buf->f_bfree = 0;
- buf->f_bavail = 0;
- buf->f_files = 0;
- buf->f_ffree = 0;
- buf->f_namelen = NAME_MAX;
- return 0;
-}
-#endif
X
X static void capifs_read_inode(struct inode *inode)
X {
@@ -517,16 +418,12 @@
X return;
X }
X
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51)
X static struct file_system_type capifs_fs_type = {
X "capifs",
X 0,
X capifs_read_super,
X NULL
X };
-#else
-static DECLARE_FSTYPE(capifs_fs_type, "capifs", capifs_read_super, 0);
-#endif
X
X void capifs_new_ncci(char type, unsigned int num, kdev_t device)
X {
@@ -547,8 +444,7 @@


X break;
X }
X }
-

- if ((np->inode = iget(sb, ino+2)) != 0) {
+ if ((np->inode = iget(sb, ino+2)) != NULL) {
X struct inode *inode = np->inode;
X inode->i_uid = sbi->setuid ? sbi->uid : current->fsuid;
X inode->i_gid = sbi->setgid ? sbi->gid : current->fsgid;
@@ -587,16 +483,17 @@
X
X static int __init capifs_init(void)
X {


- char rev[10];
+ char rev[32];

X char *p;
X int err;


X
X MOD_INC_USE_COUNT;
X
- if ((p = strchr(revision, ':'))) {

- strcpy(rev, p + 1);


- p = strchr(rev, '$');
- *p = 0;
+ if ((p = strchr(revision, ':')) != 0 && p[1]) {
+ strncpy(rev, p + 2, sizeof(rev));
+ rev[sizeof(rev)-1] = 0;
+ if ((p = strchr(rev, '$')) != 0 && p > rev)
+ *(p-1) = 0;
X } else
X strcpy(rev, "1.0");
X

@@ -605,11 +502,7 @@
X MOD_DEC_USE_COUNT;
X return err;
X }
-#ifdef MODULE
- printk(KERN_NOTICE "capifs: Rev%s: loaded\n", rev);
-#else
- printk(KERN_NOTICE "capifs: Rev%s: started\n", rev);
-#endif
+ printk(KERN_NOTICE "capifs: Rev %s\n", rev);
X MOD_DEC_USE_COUNT;
X return 0;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/avmb1/capifs.h linux/drivers/isdn/avmb1/capifs.h
--- v2.2.19/drivers/isdn/avmb1/capifs.h Sun Mar 25 17:37:32 2001
+++ linux/drivers/isdn/avmb1/capifs.h Wed Oct 10 01:40:49 2001
@@ -1,23 +1,7 @@
X /*
- * $Id: capifs.h,v 1.2 2000/03/08 17:06:33 calle Exp $
+ * $Id: capifs.h,v 1.2.6.1 2001/05/17 20:41:51 kai Exp $
X *
X * (c) Copyright 2000 by Carsten Paeth (ca...@calle.de)
- *
- * $Log: capifs.h,v $
- * Revision 1.2 2000/03/08 17:06:33 calle
- * - changes for devfs and 2.3.49
- * - capifs now configurable (no need with devfs)
- * - New Middleware ioctl CAPI_NCCI_GETUNIT
- * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs)
- *
- * Revision 1.1 2000/03/03 16:48:38 calle


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 15'
echo 'File patch-2.2.20 is continued in part 16'
echo "16" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:18 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part19

#!/bin/sh -x
# this is part 19 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 19; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
+ cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
X } else {
X cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR;
- cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
- cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
+ cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
+ cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
X }
- test_and_set_bit(HW_IPAC, &cs->HW_Flags);
- cs->readisac = &ReadISAC_IPAC;
- cs->writeisac = &WriteISAC_IPAC;
- cs->readisacfifo = &ReadISACfifo_IPAC;
- cs->writeisacfifo = &WriteISACfifo_IPAC;
- cs->irq_func = &sedlbauer_interrupt_ipac;
+ test_and_set_bit(HW_IPAC, &cs->HW_Flags);
+ cs->readisac = &ReadISAC_IPAC;
+ cs->writeisac = &WriteISAC_IPAC;
+ cs->readisacfifo = &ReadISACfifo_IPAC;
+ cs->writeisacfifo = &WriteISACfifo_IPAC;
+ cs->irq_func = &sedlbauer_interrupt_ipac;
X
X val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ID);
- printk(KERN_INFO "Sedlbauer: IPAC version %x\n", val);
+ printk(KERN_INFO "Sedlbauer: IPAC version %x\n", val);
X reset_sedlbauer(cs);


X } else {
- /* ISAC_HSCX oder ISAC_ISAR */
+ /* ISAC_HSCX oder ISAC_ISAR */

X cs->readisac = &ReadISAC;
X cs->writeisac = &WriteISAC;
X cs->readisacfifo = &ReadISACfifo;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/sportster.c linux/drivers/isdn/hisax/sportster.c
--- v2.2.19/drivers/isdn/hisax/sportster.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/sportster.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: sportster.c,v 1.14 2000/11/24 17:05:38 kai Exp $
+/* $Id: sportster.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * sportster.c low level stuff for USR Sportster internal TA


X *
@@ -6,7 +6,7 @@
X *

X * Thanks to Christian "naddy" Weisgerber (3Com, US Robotics) for documentation


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #define __NO_VERSION__

@@ -17,7 +17,7 @@


X #include "isdnl1.h"
X
X extern const char *CardType[];

-const char *sportster_revision = "$Revision: 1.14 $";
+const char *sportster_revision = "$Revision: 1.14.6.1 $";


X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/tei.c linux/drivers/isdn/hisax/tei.c
--- v2.2.19/drivers/isdn/hisax/tei.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/tei.c Wed Oct 10 01:40:55 2001
@@ -1,9 +1,9 @@
-/* $Id: tei.c,v 2.17 2000/11/24 17:05:38 kai Exp $
+/* $Id: tei.c,v 2.17.6.2 2001/05/26 15:19:57 kai Exp $
X *


X * Author Karsten Keil (ke...@isdn4linux.de)
X * based on the teles driver from Jan den Ouden
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X * For changes and modifications please read
X * ../../../Documentation/isdn/HiSax.cert
X *

@@ -17,7 +17,7 @@
X #include <linux/init.h>
X #include <linux/random.h>
X
-const char *tei_revision = "$Revision: 2.17 $";
+const char *tei_revision = "$Revision: 2.17.6.2 $";
X
X #define ID_REQUEST 1
X #define ID_ASSIGNED 2
@@ -446,14 +446,14 @@
X
X #define TEI_FN_COUNT (sizeof(TeiFnList)/sizeof(struct FsmNode))


X
-void __init
+int __init

X TeiNew(void)
X {
X teifsm.state_count = TEI_STATE_COUNT;
X teifsm.event_count = TEI_EVENT_COUNT;
X teifsm.strEvent = strTeiEvent;
X teifsm.strState = strTeiState;
- FsmNew(&teifsm, TeiFnList, TEI_FN_COUNT);
+ return FsmNew(&teifsm, TeiFnList, TEI_FN_COUNT);
X }
X
X void
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/teleint.c linux/drivers/isdn/hisax/teleint.c
--- v2.2.19/drivers/isdn/hisax/teleint.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/teleint.c Wed Oct 10 01:40:55 2001
@@ -1,10 +1,10 @@
-/* $Id: teleint.c,v 1.14 2000/11/24 17:05:38 kai Exp $
+/* $Id: teleint.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * teleint.c low level stuff for TeleInt isdn cards


X *
X * Author Karsten Keil (ke...@isdn4linux.de)
X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X
@@ -17,7 +17,7 @@
X
X extern const char *CardType[];
X

-const char *TeleInt_revision = "$Revision: 1.14 $";
+const char *TeleInt_revision = "$Revision: 1.14.6.1 $";


X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/teles0.c linux/drivers/isdn/hisax/teles0.c
--- v2.2.19/drivers/isdn/hisax/teles0.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/teles0.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: teles0.c,v 2.13 2000/11/24 17:05:38 kai Exp $
+/* $Id: teles0.c,v 2.13.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * teles0.c low level stuff for Teles Memory IO isdn cards


X * based on the teles driver from Jan den Ouden

@@ -9,7 +9,7 @@
X * Fritz Elfert
X * Beat Doebeli


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #define __NO_VERSION__

@@ -21,7 +21,7 @@


X
X extern const char *CardType[];
X

-const char *teles0_revision = "$Revision: 2.13 $";
+const char *teles0_revision = "$Revision: 2.13.6.1 $";
X
X #define TELES_IOMEM_SIZE 0x400
X #define byteout(addr,val) outb(val,addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/teles3.c linux/drivers/isdn/hisax/teles3.c
--- v2.2.19/drivers/isdn/hisax/teles3.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/teles3.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: teles3.c,v 2.17 2000/11/24 17:05:38 kai Exp $
+/* $Id: teles3.c,v 2.17.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * teles3.c low level stuff for Teles 16.3 & PNP isdn cards
X *
@@ -10,7 +10,7 @@
X * Fritz Elfert
X * Beat Doebeli


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X #define __NO_VERSION__

@@ -21,7 +21,7 @@


X #include "isdnl1.h"
X
X extern const char *CardType[];

-const char *teles3_revision = "$Revision: 2.17 $";
+const char *teles3_revision = "$Revision: 2.17.6.1 $";


X
X #define byteout(addr,val) outb(val,addr)
X #define bytein(addr) inb(addr)

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/telespci.c linux/drivers/isdn/hisax/telespci.c
--- v2.2.19/drivers/isdn/hisax/telespci.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/telespci.c Wed Oct 10 01:40:55 2001
@@ -1,11 +1,11 @@
-/* $Id: telespci.c,v 2.16.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: telespci.c,v 2.16.6.4 2001/02/16 16:43:29 kai Exp $
X *
X * telespci.c low level stuff for Teles PCI isdn cards
X *
X * Author Ton van Rosmalen
X * Karsten Keil (ke...@isdn4linux.de)


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */

X #define __NO_VERSION__
@@ -19,7 +19,7 @@


X #include <linux/isdn_compat.h>
X
X extern const char *CardType[];

-const char *telespci_revision = "$Revision: 2.16.6.3 $";
+const char *telespci_revision = "$Revision: 2.16.6.4 $";
X
X #define ZORAN_PO_RQ_PEN 0x02000000
X #define ZORAN_PO_WR 0x00800000
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/w6692.c linux/drivers/isdn/hisax/w6692.c
--- v2.2.19/drivers/isdn/hisax/w6692.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/w6692.c Wed Oct 10 01:40:55 2001
@@ -1,11 +1,11 @@
-/* $Id: w6692.c,v 1.12.6.3 2001/02/13 10:33:58 kai Exp $
+/* $Id: w6692.c,v 1.12.6.5 2001/06/09 15:14:18 kai Exp $
X *
X * w6692.c Winbond W6692 specific routines
X *
X * Author Petr Novak <petr....@i.cz>
X * (based on HiSax driver by Karsten Keil)


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

@@ -36,7 +36,7 @@


X
X extern const char *CardType[];
X

-const char *w6692_revision = "$Revision: 1.12.6.3 $";
+const char *w6692_revision = "$Revision: 1.12.6.5 $";
X
X #define DBUSY_TIMER_VALUE 80
X
@@ -642,8 +642,8 @@
X /* !!! not implemented yet */
X break;


X case (HW_DEACTIVATE | RESPONSE):
- discard_queue(&cs->rq);
- discard_queue(&cs->sq);
+ skb_queue_purge(&cs->rq);
+ skb_queue_purge(&cs->sq);
X if (cs->tx_skb) {
X dev_kfree_skb(cs->tx_skb);
X cs->tx_skb = NULL;

@@ -806,8 +806,8 @@


X kfree(bcs->blog);
X bcs->blog = NULL;
X }
- discard_queue(&bcs->rqueue);
- discard_queue(&bcs->squeue);
+ skb_queue_purge(&bcs->rqueue);
+ skb_queue_purge(&bcs->squeue);
X if (bcs->tx_skb) {
X dev_kfree_skb(bcs->tx_skb);
X bcs->tx_skb = NULL;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hisax/w6692.h linux/drivers/isdn/hisax/w6692.h
--- v2.2.19/drivers/isdn/hisax/w6692.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hisax/w6692.h Wed Oct 10 01:40:55 2001
@@ -1,10 +1,10 @@
-/* $Id: w6692.h,v 1.2 2000/06/26 08:59:15 keil Exp $
+/* $Id: w6692.h,v 1.2.6.1 2001/02/16 16:43:29 kai Exp $
X *
X * w6692.h Winbond W6692 specific defines
X *
X * Author Petr Novak <petr....@i.cz>


X *
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
X *
X */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/boardergo.c linux/drivers/isdn/hysdn/boardergo.c
--- v2.2.19/drivers/isdn/hysdn/boardergo.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/boardergo.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: boardergo.c,v 1.5.6.1 2000/12/10 22:01:04 kai Exp $
+/* $Id: boardergo.c,v 1.5.6.5 2001/07/18 16:02:16 kai Exp $
X
X * Linux driver for HYSDN cards, specific routines for ergo type boards.
X *
@@ -35,6 +35,7 @@


X #include <linux/kernel.h>
X #include <linux/ioport.h>

X #include <linux/interrupt.h>
+#include <linux/vmalloc.h>
X
X #include "hysdn_defs.h"
X #include "boardergo.h"
@@ -270,7 +271,7 @@
X return (-ERR_BOOTIMG_FAIL);
X }
X } /* start_boot_img */
- return (0); /* successfull */
+ return (0); /* successful */
X } /* ergo_writebootimg */
X
X /********************************************************************************/


@@ -337,7 +338,7 @@
X

X /***********************************************************************************/
X /* ergo_waitpofready waits for a maximum of 10 seconds for the completition of the */
-/* boot process. If the process has been successfull 0 is returned otherwise a */
+/* boot process. If the process has been successful 0 is returned otherwise a */
X /* negative error code is returned. */
X /***********************************************************************************/
X static int
@@ -361,7 +362,7 @@
X (dpr->ToPcSize < MIN_RDY_MSG_SIZE) ||
X (dpr->ToPcSize > MAX_RDY_MSG_SIZE) ||
X ((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC))
- break; /* an error occured */
+ break; /* an error occurred */
X
X /* Check for additional data delivered during SysReady */
X msg_size = dpr->ToPcSize - RDY_MAGIC_SIZE;
@@ -386,7 +387,9 @@
X dpr->ToPcInt = 1; /* interrupt to E1 for all cards */
X
X restore_flags(flags);
- if ((i = hysdn_net_create(card))) {
+ if ((hynet_enable & (1 << card->myid))
+ && (i = hysdn_net_create(card)))
+ {
X ergo_stopcard(card);
X card->state = CARD_STATE_BOOTERR;
X return (i);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hycapi.c linux/drivers/isdn/hysdn/hycapi.c
--- v2.2.19/drivers/isdn/hysdn/hycapi.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hycapi.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hycapi.c,v 1.8 2000/11/22 17:13:13 kai Exp $
+/* $Id: hycapi.c,v 1.8.6.3 2001/05/26 15:19:58 kai Exp $
X *
X * Linux driver for HYSDN cards, CAPI2.0-Interface.
X * written by Ulrich Albrecht (u.alb...@hypercope.de) for Hypercope GmbH
@@ -41,7 +41,10 @@
X #include "hysdn_defs.h"
X #include <linux/kernelcapi.h>
X
-static char hycapi_revision[]="$Revision: 1.8 $";
+static char hycapi_revision[]="$Revision: 1.8.6.3 $";
+
+unsigned int hycapi_enable = 0xffffffff;
+MODULE_PARM(hycapi_enable, "i");
X
X typedef struct _hycapi_appl {
X unsigned int ctrl_mask;
@@ -522,7 +525,7 @@
X /******************************************************************
X hycapi_rx_capipkt
X
-Recieve a capi-message.
+Receive a capi-message.
X
X All B3_DATA_IND are converted to 64K-extension compatible format.
X New nccis are created if neccessary.
@@ -542,15 +545,11 @@
X printk(KERN_NOTICE "hycapi_rx_capipkt\n");
X #endif
X if(!cinfo) {
- printk(KERN_ERR "HYSDN Card%d: no HYCAPI-controller!\n",
- card->myid);
X return;
X }


X ctrl = cinfo->capi_ctrl;

X if(!ctrl)
X {
- printk(KERN_ERR "HYSDN Card%d: no CAPI-controller (1)!\n",
- card->myid);
X return;
X }
X if(len < CAPI_MSG_BASELEN) {
@@ -644,8 +643,6 @@
X printk(KERN_NOTICE "hycapi_tx_capiack\n");
X #endif
X if(!cinfo) {
- printk(KERN_ERR "HYSDN Card%d: no CAPI-controller (2)!\n",
- card->myid);
X return;
X }
X spin_lock_irq(&cinfo->lock);
@@ -671,8 +668,6 @@
X {
X hycapictrl_info *cinfo = card->hyctrlinfo;
X if(!cinfo) {
- printk(KERN_ERR "HYSDN Card%d: no CAPI-controller! (3)\n",
- card->myid);
X return (struct sk_buff *)NULL;
X }
X if (!cinfo->sk_count)
@@ -739,7 +734,7 @@
X struct capi_driver *driver;
X driver = &hycapi_driver;
X if (!hy_di) {
- printk(KERN_ERR "HYSDN: no capi-driver to detach (???)\n");
+ printk(KERN_ERR "HYSDN: no capi-driver to detach (?)\n");
X return;
X }
X printk(KERN_NOTICE "HYSDN: Detaching capi-driver\n");
@@ -792,6 +787,9 @@
X #ifdef HYCAPI_PRINTFNAMES
X printk(KERN_NOTICE "hycapi_capi_create\n");
X #endif
+ if((hycapi_enable & (1 << card->myid)) == 0) {
+ return 1;
+ }
X if (!card->hyctrlinfo) {
X cinfo = (hycapictrl_info *) kmalloc(sizeof(hycapictrl_info), GFP_ATOMIC);
X if (!cinfo) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_boot.c linux/drivers/isdn/hysdn/hysdn_boot.c
--- v2.2.19/drivers/isdn/hysdn/hysdn_boot.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_boot.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_boot.c,v 1.4.6.1 2001/02/10 14:41:22 kai Exp $
+/* $Id: hysdn_boot.c,v 1.4.6.3 2001/03/13 16:17:09 kai Exp $
X
X * Linux driver for HYSDN cards, specific routines for booting and pof handling.
X *
@@ -49,7 +49,7 @@
X uchar pof_state; /* actual state of read handler */
X uchar is_crypted; /* card data is crypted */
X int BufSize; /* actual number of bytes bufferd */
- int last_error; /* last occured error */
+ int last_error; /* last occurred error */
X word pof_recid; /* actual pof recid */
X ulong pof_reclen; /* total length of pof record data */
X ulong pof_recoffset; /* actual offset inside pof record */
@@ -62,7 +62,7 @@
X };
X
X /*****************************************************/
-/* start decryption of sucessive POF file chuncks. */
+/* start decryption of successive POF file chuncks. */
X /* */
X /* to be called at start of POF file reading, */
X /* before starting any decryption on any POF record. */
@@ -93,7 +93,7 @@
X
X /********************************************************************************/
X /* pof_handle_data executes the required actions dependant on the active record */
-/* id. If successfull 0 is returned, a negative value shows an error. */
+/* id. If successful 0 is returned, a negative value shows an error. */
X /********************************************************************************/
X static int
X pof_handle_data(hysdn_card * card, int datlen)
@@ -182,7 +182,7 @@
X /* number of data bytes. The number delivered is additionally supplied for */
X /* verification. The functions handles the data and returns the needed number */
X /* of bytes for the next action. If the returned value is 0 or less an error */
-/* occured and booting must be aborted. */
+/* occurred and booting must be aborted. */
X /******************************************************************************/
X int
X pof_write_buffer(hysdn_card * card, int datlen)
@@ -253,7 +253,7 @@
X break;
X }
X if ((boot->last_error = pof_handle_data(card, datlen)) < 0)
- return (boot->last_error); /* an error occured */
+ return (boot->last_error); /* an error occurred */
X boot->pof_recoffset += datlen;
X if (boot->pof_recoffset >= boot->pof_reclen) {
X boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */
@@ -346,7 +346,7 @@
X
X /*********************************************************************************/
X /* EvalSysrTokData checks additional records delivered with the Sysready Message */
-/* when POF has been booted. A return value of 0 is used if no error occured. */
+/* when POF has been booted. A return value of 0 is used if no error occurred. */
X /*********************************************************************************/
X int
X EvalSysrTokData(hysdn_card * card, uchar * cp, int len)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_defs.h linux/drivers/isdn/hysdn/hysdn_defs.h
--- v2.2.19/drivers/isdn/hysdn/hysdn_defs.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_defs.h Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_defs.h,v 1.5.6.1 2000/11/28 12:02:47 kai Exp $
+/* $Id: hysdn_defs.h,v 1.5.6.2 2001/04/20 02:42:00 keil Exp $
X
X * Linux driver for HYSDN cards, global definitions and exported vars and functions.
X * written by Werner Cornelius (wer...@titro.de) for Hypercope GmbH
@@ -274,6 +274,7 @@
X extern int hysdn_tx_cfgline(hysdn_card *, uchar *, word); /* send one cfg line */
X
X /* hysdn_net.c */
+extern unsigned int hynet_enable;
X extern char *hysdn_net_revision;
X extern int hysdn_net_create(hysdn_card *); /* create a new net device */
X extern int hysdn_net_release(hysdn_card *); /* delete the device */
@@ -283,6 +284,7 @@
X extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from network */
X
X #ifdef CONFIG_HYSDN_CAPI
+extern unsigned int hycapi_enable;
X extern struct capi_driver_interface *hy_di;
X extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */
X extern int hycapi_capi_release(hysdn_card *); /* delete the device */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_init.c linux/drivers/isdn/hysdn/hysdn_init.c
--- v2.2.19/drivers/isdn/hysdn/hysdn_init.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_init.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_init.c,v 1.6.6.4 2001/02/10 14:41:22 kai Exp $
+/* $Id: hysdn_init.c,v 1.6.6.5 2001/02/16 16:43:30 kai Exp $
X
X * Linux driver for HYSDN cards, init functions.
X * written by Werner Cornelius (wer...@titro.de) for Hypercope GmbH


@@ -32,7 +32,7 @@
X

X #include "hysdn_defs.h"
X
-static char *hysdn_init_revision = "$Revision: 1.6.6.4 $";
+static char *hysdn_init_revision = "$Revision: 1.6.6.5 $";
X int cardmax; /* number of found cards */
X hysdn_card *card_root = NULL; /* pointer to first card */
X
@@ -189,7 +189,7 @@
X /****************************************************************************/
X /* init_module is called once when the module is loaded to do all necessary */
X /* things like autodetect... */
-/* If the return value of this function is 0 the init has been successfull */
+/* If the return value of this function is 0 the init has been successful */
X /* and the module is added to the list in /proc/modules, otherwise an error */
X /* is assumed and the module will not be kept in memory. */
X /****************************************************************************/
@@ -227,7 +227,7 @@
X
X /***********************************************************************/
X /* cleanup_module is called when the module is released by the kernel. */
-/* The routine is only called if init_module has been successfull and */
+/* The routine is only called if init_module has been successful and */
X /* the module counter has a value of 0. Otherwise this function will */
X /* not be called. This function must release all resources still allo- */
X /* cated as after the return from this function the module code will */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_net.c linux/drivers/isdn/hysdn/hysdn_net.c
--- v2.2.19/drivers/isdn/hysdn/hysdn_net.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_net.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_net.c,v 1.8 2000/11/13 22:51:47 kai Exp $
+/* $Id: hysdn_net.c,v 1.8.6.3 2001/06/05 19:45:37 kai Exp $
X
X * Linux driver for HYSDN cards, net (ethernet type) handling routines.
X *
@@ -37,8 +37,11 @@
X
X #include "hysdn_defs.h"
X
+unsigned int hynet_enable = 0xffffffff;
+MODULE_PARM(hynet_enable, "i");
+
X /* store the actual version for log reporting */
-char *hysdn_net_revision = "$Revision: 1.8 $";
+char *hysdn_net_revision = "$Revision: 1.8.6.3 $";
X
X #define MAX_SKB_BUFFERS 20 /* number of buffers for keeping TX-data */
X
@@ -272,8 +275,7 @@
X hysdn_net_release(card); /* release an existing net device */
X if ((dev = kmalloc(sizeof(struct net_local), GFP_KERNEL)) == NULL) {
X printk(KERN_WARNING "HYSDN: unable to allocate mem\n");
- if (card->debug_flags & LOG_NET_INIT)
- return (-ENOMEM);
+ return (-ENOMEM);
X }
X memset(dev, 0, sizeof(struct net_local)); /* clean the structure */
X
@@ -317,7 +319,7 @@
X if (card->debug_flags & LOG_NET_INIT)
X hysdn_addlog(card, "network device deleted");
X
- return (0); /* always successfull */
+ return (0); /* always successful */
X } /* hysdn_net_release */
X
X /*****************************************************************************/
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_procconf.c linux/drivers/isdn/hysdn/hysdn_procconf.c
--- v2.2.19/drivers/isdn/hysdn/hysdn_procconf.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_procconf.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_procconf.c,v 1.8 2000/11/13 22:51:47 kai Exp $
+/* $Id: hysdn_procconf.c,v 1.8.6.3 2001/08/13 07:46:15 kai Exp $
X
X * Linux driver for HYSDN cards, /proc/net filesystem dir and conf functions.
X * written by Werner Cornelius (wer...@titro.de) for Hypercope GmbH


@@ -30,7 +30,7 @@
X

X #include "hysdn_defs.h"
X
-static char *hysdn_procconf_revision = "$Revision: 1.8 $";
+static char *hysdn_procconf_revision = "$Revision: 1.8.6.3 $";
X
X #define INFO_OUT_LEN 80 /* length of info line including lf */
X
@@ -40,7 +40,7 @@
X #define CONF_STATE_DETECT 0 /* waiting for detect */
X #define CONF_STATE_CONF 1 /* writing config data */
X #define CONF_STATE_POF 2 /* writing pof data */
-#define CONF_LINE_LEN 80 /* 80 chars max */
+#define CONF_LINE_LEN 255 /* 255 chars max */
X
X struct conf_writedata {
X hysdn_card *card; /* card the device is connected to */
@@ -55,7 +55,7 @@
X /***********************************************************************/
X /* process_line parses one config line and transfers it to the card if */
X /* necessary. */
-/* if the return value is negative an error occured. */
+/* if the return value is negative an error occurred. */
X /***********************************************************************/
X static int
X process_line(struct conf_writedata *cnf)
@@ -129,7 +129,7 @@
X if (ch == 0x1A) {
X /* we detected a pof file */
X if ((cnf->needed_size = pof_write_open(cnf->card, &cnf->pof_buffer)) <= 0)
- return (cnf->needed_size); /* an error occured -> exit */
+ return (cnf->needed_size); /* an error occurred -> exit */
X cnf->buf_size = 0; /* buffer is empty */
X cnf->state = CONF_STATE_POF; /* new state */
X } else {
@@ -157,7 +157,7 @@
X cnf->needed_size = pof_write_buffer(cnf->card, cnf->buf_size); /* write data */
X if (cnf->needed_size <= 0) {
X cnf->card->state = CARD_STATE_BOOTERR; /* show boot error */
- return (cnf->needed_size); /* an error occured */
+ return (cnf->needed_size); /* an error occurred */
X }
X cnf->buf_size = 0; /* buffer is empty again */
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_proclog.c linux/drivers/isdn/hysdn/hysdn_proclog.c
--- v2.2.19/drivers/isdn/hysdn/hysdn_proclog.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_proclog.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_proclog.c,v 1.9 2000/11/25 17:01:01 kai Exp $
+/* $Id: hysdn_proclog.c,v 1.9.6.2 2001/08/13 07:46:15 kai Exp $
X
X * Linux driver for HYSDN cards, /proc/net filesystem log functions.
X * written by Werner Cornelius (wer...@titro.de) for Hypercope GmbH
@@ -227,7 +227,7 @@
X struct log_data *inf;
X int len;
X word ino;
- struct procdata *pd;
+ struct procdata *pd = NULL;
X hysdn_card *card;
X
X if (!*((struct log_data **) file->private_data)) {
@@ -270,7 +270,7 @@
X hysdn_log_open(struct inode *ino, struct file *filep)
X {
X hysdn_card *card;
- struct procdata *pd;
+ struct procdata *pd = NULL;
X ulong flags;
X
X MOD_INC_USE_COUNT;
@@ -378,7 +378,7 @@
X unsigned int mask = 0;
X word ino;
X hysdn_card *card;
- struct procdata *pd;
+ struct procdata *pd = NULL;
X
X if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE)
X return (mask); /* no polling for write supported */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/hysdn/hysdn_sched.c linux/drivers/isdn/hysdn/hysdn_sched.c
--- v2.2.19/drivers/isdn/hysdn/hysdn_sched.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/hysdn/hysdn_sched.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_sched.c,v 1.5 2000/11/22 17:13:13 kai Exp $
+/* $Id: hysdn_sched.c,v 1.5.6.2 2001/04/20 02:42:00 keil Exp $
X
X * Linux driver for HYSDN cards, scheduler routines for handling exchange card <-> pc.
X *


@@ -47,7 +47,10 @@
X

X switch (chan) {
X case CHAN_NDIS_DATA:
- hysdn_rx_netpkt(card, buf, len); /* give packet to network handler */
+ if (hynet_enable & (1 << card->myid)) {
+ /* give packet to network handler */
+ hysdn_rx_netpkt(card, buf, len);
+ }
X break;
X
X case CHAN_ERRLOG:
@@ -58,7 +61,9 @@
X #ifdef CONFIG_HYSDN_CAPI
X case CHAN_CAPI:
X /* give packet to CAPI handler */
- hycapi_rx_capipkt(card, buf, len);
+ if (hycapi_enable & (1 << card->myid)) {
+ hycapi_rx_capipkt(card, buf, len);
+ }
X break;
X #endif /* CONFIG_HYSDN_CAPI */
X default:
@@ -115,7 +120,9 @@
X return (1); /* tell that data should be send */
X } /* error log start and able to send */
X /* now handle network interface packets */
- if ((skb = hysdn_tx_netget(card)) != NULL) {
+ if ((hynet_enable & (1 << card->myid)) &&
+ (skb = hysdn_tx_netget(card)) != NULL)
+ {
X if (skb->len <= maxlen) {
X memcpy(buf, skb->data, skb->len); /* copy the packet to the buffer */
X *len = skb->len;
@@ -126,7 +133,9 @@
X hysdn_tx_netack(card); /* aknowledge packet -> throw away */
X } /* send a network packet if available */
X #ifdef CONFIG_HYSDN_CAPI
- if((skb = hycapi_tx_capiget(card)) != NULL) {
+ if( ((hycapi_enable & (1 << card->myid))) &&
+ ((skb = hycapi_tx_capiget(card)) != NULL) )
+ {
X if (skb->len <= maxlen) {
X memcpy(buf, skb->data, skb->len);
X *len = skb->len;
@@ -141,7 +150,7 @@
X
X
X /*****************************************************************************/
-/* send one config line to the card and return 0 if successfull, otherwise a */
+/* send one config line to the card and return 0 if successful, otherwise a */
X /* negative error code. */
X /* The function works with timeouts perhaps not giving the greatest speed */
X /* sending the line, but this should be meaningless beacuse only some lines */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/icn/icn.c linux/drivers/isdn/icn/icn.c
--- v2.2.19/drivers/isdn/icn/icn.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/icn/icn.c Wed Oct 10 01:40:55 2001
@@ -1,4 +1,4 @@
-/* $Id: icn.c,v 1.65.6.2 2000/12/17 22:45:13 kai Exp $
+/* $Id: icn.c,v 1.65.6.5 2001/06/09 15:14:19 kai Exp $
X
X * ISDN low-level module for the ICN active ISDN-Card.
X *
@@ -34,7 +34,7 @@
X #undef MAP_DEBUG
X
X static char
-*revision = "$Revision: 1.65.6.2 $";
+*revision = "$Revision: 1.65.6.5 $";
X
X static int icn_addcard(int, char *, char *);
X
@@ -51,8 +51,7 @@
X struct sk_buff *skb;
X unsigned long flags;
X

- while ((skb = skb_dequeue(queue)))
- dev_kfree_skb(skb);
+ skb_queue_purge(queue);

X save_flags(flags);
X cli();
X card->xlen[channel] = 0;
@@ -838,23 +837,23 @@
X card->other->rvalid = 1;
X }
X if (!dev.mvalid) {
- if (check_shmem((ulong) dev.shmem, 0x4000)) {
+ if (check_mem_region(dev.memaddr, 0x4000)) {
X printk(KERN_WARNING
- "icn: memory at 0x%08lx in use.\n",
- (ulong) dev.shmem);
+ "icn: memory at 0x%08lx in use.\n", dev.memaddr);
X restore_flags(flags);
X return -EBUSY;
X }
- request_shmem((ulong) dev.shmem, 0x4000, "icn");
+ request_mem_region(dev.memaddr, 0x4000, "icn-isdn (all cards)");
+ dev.shmem = ioremap(dev.memaddr, 0x4000);
X dev.mvalid = 1;
X }
X restore_flags(flags);
X OUTB_P(0, ICN_RUN); /* Reset Controller */
X OUTB_P(0, ICN_MAPRAM); /* Disable RAM */
X icn_shiftout(ICN_CFG, 0x0f, 3, 4); /* Windowsize= 16k */
- icn_shiftout(ICN_CFG, (unsigned long) dev.shmem, 23, 10); /* Set RAM-Addr. */
+ icn_shiftout(ICN_CFG, dev.memaddr, 23, 10); /* Set RAM-Addr. */
X #ifdef BOOT_DEBUG
- printk(KERN_DEBUG "shmem=%08lx\n", (ulong) dev.shmem);
+ printk(KERN_DEBUG "shmem=%08lx\n", dev.memaddr);
X #endif
X SLEEP(1);
X #ifdef BOOT_DEBUG
@@ -868,7 +867,7 @@
X SLEEP(1);
X memcpy_toio(dev.shmem, codebuf, ICN_CODE_STAGE1); /* Copy code */
X #ifdef BOOT_DEBUG
- printk(KERN_DEBUG "Bootloader transfered\n");
+ printk(KERN_DEBUG "Bootloader transferred\n");
X #endif
X if (card->doubleS0) {
X SLEEP(1);
@@ -884,7 +883,7 @@
X SLEEP(1);
X memcpy_toio(dev.shmem, codebuf, ICN_CODE_STAGE1); /* Copy code */
X #ifdef BOOT_DEBUG
- printk(KERN_DEBUG "Bootloader transfered\n");
+ printk(KERN_DEBUG "Bootloader transferred\n");
X #endif
X }
X kfree(codebuf);
@@ -1177,29 +1176,31 @@
X memcpy(&a, c->parm.num, sizeof(ulong));
X switch (c->arg) {
X case ICN_IOCTL_SETMMIO:
- if ((unsigned long) dev.shmem != (a & 0x0ffc000)) {
- if (check_shmem((ulong) (a & 0x0ffc000), 0x4000)) {
+ if (dev.memaddr != (a & 0x0ffc000)) {
+ if (check_mem_region(a & 0x0ffc000, 0x4000)) {
X printk(KERN_WARNING
X "icn: memory at 0x%08lx in use.\n",
- (ulong) (a & 0x0ffc000));
+ a & 0x0ffc000);
X return -EINVAL;
X }
X icn_stopallcards();
X save_flags(flags);
X cli();
- if (dev.mvalid)
- release_shmem((ulong) dev.shmem, 0x4000);
+ if (dev.mvalid) {
+ iounmap(dev.shmem);
+ release_mem_region(dev.memaddr, 0x4000);
+ }
X dev.mvalid = 0;
- dev.shmem = (icn_shmem *) (a & 0x0ffc000);
+ dev.memaddr = a & 0x0ffc000;
X restore_flags(flags);
X printk(KERN_INFO
X "icn: (%s) mmio set to 0x%08lx\n",
X CID,
- (unsigned long) dev.shmem);
+ dev.memaddr);
X }
X break;
X case ICN_IOCTL_GETMMIO:
- return (long) dev.shmem;
+ return (long) dev.memaddr;
X case ICN_IOCTL_SETPORT:
X if (a == 0x300 || a == 0x310 || a == 0x320 || a == 0x330
X || a == 0x340 || a == 0x350 || a == 0x360 ||
@@ -1649,7 +1650,7 @@
X if (ints[0])
X portbase = ints[1];
X if (ints[0] > 1)
- membase = ints[2];
+ membase = (unsigned long)ints[2];
X if (str && *str) {
X strcpy(sid, str);
X icn_id = sid;
@@ -1668,7 +1669,7 @@
X char rev[10];
X
X memset(&dev, 0, sizeof(icn_dev));
- dev.shmem = (icn_shmem *) ((unsigned long) membase & 0x0ffc000);
+ dev.memaddr = (membase & 0x0ffc000);
X dev.channel = -1;
X dev.mcard = NULL;
X dev.firstload = 1;
@@ -1680,7 +1681,7 @@
X } else
X strcpy(rev, " ??? ");
X printk(KERN_NOTICE "ICN-ISDN-driver Rev%smem=0x%08lx\n", rev,
- (ulong) dev.shmem);
+ dev.memaddr);
X return (icn_addcard(portbase, icn_id, icn_id2));
X }
X
@@ -1714,8 +1715,10 @@


X card = card->next;
X kfree(last);
X }

- if (dev.mvalid)
- release_shmem((ulong) dev.shmem, 0x4000);
+ if (dev.mvalid) {
+ iounmap(dev.shmem);
+ release_mem_region(dev.memaddr, 0x4000);
+ }
X printk(KERN_NOTICE "ICN-ISDN-driver unloaded\n");
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/icn/icn.h linux/drivers/isdn/icn/icn.h
--- v2.2.19/drivers/isdn/icn/icn.h Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/icn/icn.h Wed Oct 10 01:40:56 2001
@@ -1,4 +1,4 @@
-/* $Id: icn.h,v 1.30.6.1 2001/02/10 14:41:23 kai Exp $
+/* $Id: icn.h,v 1.30.6.3 2001/04/20 02:42:01 keil Exp $
X
X * ISDN lowlevel-module for the ICN active ISDN-Card.
X *
@@ -187,6 +187,7 @@
X * Main driver data
X */
X typedef struct icn_dev {
+ unsigned long memaddr; /* Address of memory mapped buffers */
X icn_shmem *shmem; /* Pointer to memory-mapped-buffers */
X int mvalid; /* IO-shmem has been requested */
X int channel; /* Currently mapped channel */
@@ -210,16 +211,16 @@
X * integers.
X */
X static int portbase = ICN_BASEADDR;
-static int membase = ICN_MEMADDR;
+static unsigned long membase = ICN_MEMADDR;
X static char *icn_id = "\0";
X static char *icn_id2 = "\0";
X
X #ifdef MODULE
X MODULE_AUTHOR("Fritz Elfert");
X MODULE_PARM(portbase, "i");
-MODULE_PARM_DESC(portbase, "Port adress of first card");
-MODULE_PARM(membase, "i");
-MODULE_PARM_DESC(membase, "Shared memory adress of all cards");
+MODULE_PARM_DESC(portbase, "Port address of first card");
+MODULE_PARM(membase, "l");
+MODULE_PARM_DESC(membase, "Shared memory address of all cards");
X MODULE_PARM(icn_id, "s");
X MODULE_PARM_DESC(icn_id, "ID-String of first card");
X MODULE_PARM(icn_id2, "s");
@@ -286,14 +287,6 @@
X
X #define MIN(a,b) ((a<b)?a:b)
X #define MAX(a,b) ((a>b)?a:b)
-
-/* Hopefully, a separate resource-registration-scheme for shared-memory
- * will be introduced into the kernel. Until then, we use the normal
- * routines, designed for port-registration.
- */
-#define check_shmem check_region
-#define release_shmem release_region
-#define request_shmem request_region
X
X #endif /* defined(__KERNEL__) || defined(__DEBUGVAR__) */
X #endif /* icn_h */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_bsdcomp.c linux/drivers/isdn/isdn_bsdcomp.c
--- v2.2.19/drivers/isdn/isdn_bsdcomp.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/isdn_bsdcomp.c Wed Oct 10 01:40:56 2001
@@ -76,6 +76,7 @@
X #include <linux/skbuff.h>
X #include <linux/inet.h>
X #include <linux/ioctl.h>
+#include <linux/vmalloc.h>
X
X #include <linux/ppp_defs.h>
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_common.c linux/drivers/isdn/isdn_common.c
--- v2.2.19/drivers/isdn/isdn_common.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/isdn_common.c Wed Oct 10 01:40:56 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_common.c,v 1.114.6.7 2001/02/10 14:41:19 kai Exp $
+/* $Id: isdn_common.c,v 1.114.6.12 2001/06/09 15:14:15 kai Exp $
X
X * Linux ISDN subsystem, common used functions (linklevel).
X *
@@ -42,7 +42,7 @@
X #endif
X #ifdef CONFIG_ISDN_DIVERSION
X #include <linux/isdn_divertif.h>
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X #include "isdn_v110.h"
X
X /* Debugflags */


@@ -50,7 +50,7 @@
X

X isdn_dev *dev;
X
-static char *isdn_revision = "$Revision: 1.114.6.7 $";
+static char *isdn_revision = "$Revision: 1.114.6.12 $";
X
X extern char *isdn_net_revision;
X extern char *isdn_tty_revision;
@@ -68,7 +68,7 @@
X
X #ifdef CONFIG_ISDN_DIVERSION
X static isdn_divert_if *divert_if; /* = NULL */
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X
X
X static int isdn_writebuf_stub(int, int, const u_char *, int, int);
@@ -230,20 +230,6 @@
X return isdn_wildmat( TmpMsn1, TmpMsn2 );
X }
X
-static void
-isdn_free_queue(struct sk_buff_head *queue)


-{
- struct sk_buff *skb;

- unsigned long flags;


-
- save_flags(flags);
- cli();

- if (skb_queue_len(queue))


- while ((skb = skb_dequeue(queue)))
- dev_kfree_skb(skb);

- restore_flags(flags);
-}
-
X int
X isdn_dc2minor(int di, int ch)
X {
@@ -257,7 +243,6 @@
X static int isdn_timer_cnt1 = 0;
X static int isdn_timer_cnt2 = 0;
X static int isdn_timer_cnt3 = 0;
-static int isdn_timer_cnt4 = 0;
X
X static void
X isdn_timer_funct(ulong dummy)
@@ -281,16 +266,11 @@
X isdn_timer_cnt2 = 0;
X if (tf & ISDN_TIMER_NETHANGUP)
X isdn_net_autohup();
- if (++isdn_timer_cnt3 > ISDN_TIMER_RINGING) {
+ if (++isdn_timer_cnt3 >= ISDN_TIMER_RINGING) {
X isdn_timer_cnt3 = 0;
X if (tf & ISDN_TIMER_MODEMRING)
X isdn_tty_modem_ring();
X }
- if (++isdn_timer_cnt4 > ISDN_TIMER_KEEPINT) {
- isdn_timer_cnt4 = 0;
- if (tf & ISDN_TIMER_KEEPALIVE)
- isdn_net_slarp_out();
- }
X if (tf & ISDN_TIMER_CARRIER)
X isdn_tty_carrier_timeout();
X }
@@ -309,7 +289,7 @@
X void
X isdn_timer_ctrl(int tf, int onoff)
X {
- int flags;
+ int flags, old_tflags;


X
X save_flags(flags);
X cli();

@@ -318,11 +298,12 @@
X isdn_timer_cnt1 = 0;
X isdn_timer_cnt2 = 0;
X }
+ old_tflags = dev->tflags;
X if (onoff)
X dev->tflags |= tf;
X else
X dev->tflags &= ~tf;
- if (dev->tflags)
+ if (dev->tflags && !old_tflags)
X mod_timer(&dev->timer, jiffies+ISDN_TIMER_RES);
X restore_flags(flags);
X }
@@ -516,7 +497,7 @@
X if (divert_if)
X if ((retval = divert_if->stat_callback(c)))
X return(retval); /* processed */
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X if ((!retval) && (dev->drv[di]->flags & DRV_FLAG_REJBUS)) {
X /* No tty responding */
X cmd.driver = di;
@@ -589,7 +570,7 @@
X #ifdef CONFIG_ISDN_DIVERSION
X if (divert_if)
X divert_if->stat_callback(c);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X break;
X case ISDN_STAT_DISPLAY:
X #ifdef ISDN_DEBUG_STATCALLB
@@ -599,7 +580,7 @@
X #ifdef CONFIG_ISDN_DIVERSION
X if (divert_if)
X divert_if->stat_callback(c);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X break;
X case ISDN_STAT_DCONN:
X if (i < 0)
@@ -641,7 +622,7 @@
X #ifdef CONFIG_ISDN_DIVERSION
X if (divert_if)
X divert_if->stat_callback(c);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X break;
X break;
X case ISDN_STAT_BCONN:
@@ -740,7 +721,7 @@
X kfree(dev->drv[di]->rcverr);
X kfree(dev->drv[di]->rcvcount);
X for (i = 0; i < dev->drv[di]->channels; i++)
- isdn_free_queue(&dev->drv[di]->rpqueue[i]);
+ skb_queue_purge(&dev->drv[di]->rpqueue[i]);
X kfree(dev->drv[di]->rpqueue);
X kfree(dev->drv[di]->rcv_waitq);
X kfree(dev->drv[di]);
@@ -769,7 +750,7 @@
X case ISDN_STAT_REDIR:
X if (divert_if)
X return(divert_if->stat_callback(c));
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X default:
X return -1;
X }
@@ -1021,7 +1002,7 @@
X retval = -ENODEV;
X goto out;
X }
- if (minor < ISDN_MINOR_CTRL) {
+ if (minor <= ISDN_MINOR_BMAX) {
X printk(KERN_WARNING "isdn_read minor %d obsolete!\n", minor);
X drvidx = isdn_minor2drv(minor);
X if (drvidx < 0) {
@@ -1112,7 +1093,7 @@
X if (!dev->drivers)
X return -ENODEV;
X
- if (minor < ISDN_MINOR_CTRL) {
+ if (minor <= ISDN_MINOR_BMAX) {
X printk(KERN_WARNING "isdn_write minor %d obsolete!\n", minor);
X drvidx = isdn_minor2drv(minor);
X if (drvidx < 0) {
@@ -1262,7 +1243,7 @@
X }
X if (!dev->drivers)
X return -ENODEV;
- if (minor < ISDN_MINOR_CTRL) {
+ if (minor <= ISDN_MINOR_BMAX) {
X drvidx = isdn_minor2drv(minor);
X if (drvidx < 0)
X return -ENODEV;
@@ -1678,7 +1659,7 @@
X }
X if (!dev->channels)
X goto out;
- if (minor < ISDN_MINOR_CTRL) {
+ if (minor <= ISDN_MINOR_BMAX) {
X printk(KERN_WARNING "isdn_open minor %d obsolete!\n", minor);
X drvidx = isdn_minor2drv(minor);
X if (drvidx < 0)
@@ -1739,7 +1720,7 @@
X goto out;
X }
X isdn_unlock_drivers();
- if (minor < ISDN_MINOR_CTRL)
+ if (minor <= ISDN_MINOR_BMAX)
X goto out;
X if (minor <= ISDN_MINOR_CTRLMAX) {
X if (dev->profd == current)
@@ -1869,7 +1850,7 @@
X dev->v110[i] = NULL;
X // 20.10.99 JIM, try to reinitialize v110 !
X isdn_info_update();
- isdn_free_queue(&dev->drv[di]->rpqueue[ch]);
+ skb_queue_purge(&dev->drv[di]->rpqueue[ch]);
X }
X restore_flags(flags);
X }
@@ -2032,7 +2013,7 @@
X
X if ((adding) && (d->rpqueue)) {
X for (j = 0; j < d->channels; j++)
- isdn_free_queue(&d->rpqueue[j]);
+ skb_queue_purge(&d->rpqueue[j]);
X kfree(d->rpqueue);
X }
X if (!(d->rpqueue =
@@ -2149,7 +2130,7 @@
X
X EXPORT_SYMBOL(DIVERT_REG_NAME);
X
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
X
X
X EXPORT_SYMBOL(register_isdn);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/isdn/isdn_net.c linux/drivers/isdn/isdn_net.c
--- v2.2.19/drivers/isdn/isdn_net.c Sun Mar 25 17:37:33 2001
+++ linux/drivers/isdn/isdn_net.c Mon Oct 22 10:41:05 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_net.c,v 1.140.6.3 2001/02/07 11:31:30 kai Exp $
+/* $Id: isdn_net.c,v 1.140.6.8 2001/08/14 14:04:21 kai Exp $
X
X * Linux ISDN subsystem, network interfaces and related functions (linklevel).
X *
@@ -22,6 +22,11 @@


X *
X */
X

+/* Jan 2001: fix CISCO HDLC Bjoern A. Zeeb <i...@zabbadoz.net>
+ * for info on the protocol, see
+ * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt
+ */
+
X #include <linux/config.h>
X #define __NO_VERSION__
X #include <linux/module.h>
@@ -30,9 +35,9 @@
X #include <net/dst.h>
X #include <net/pkt_sched.h>
X #include <linux/inetdevice.h>
-#include <linux/isdn_compat.h>
X #include "isdn_common.h"
X #include "isdn_net.h"
+#include <linux/isdn_compat.h>
X #ifdef CONFIG_ISDN_PPP
X #include "isdn_ppp.h"
X #endif
@@ -183,7 +188,10 @@
X int isdn_net_force_dial_lp(isdn_net_local *);
X static int isdn_net_start_xmit(struct sk_buff *, struct device *);
X
-char *isdn_net_revision = "$Revision: 1.140.6.3 $";
+static void isdn_net_ciscohdlck_connected(isdn_net_local *lp);
+static void isdn_net_ciscohdlck_disconnected(isdn_net_local *lp);
+
+char *isdn_net_revision = "$Revision: 1.140.6.8 $";
X
X /*
X * Code for raw-networking over ISDN
@@ -294,13 +302,11 @@
X isdn_net_unbind_channel(isdn_net_local * lp)
X {
X ulong flags;


- struct sk_buff *skb;
X

X save_flags(flags);
X cli();
- while ((skb = skb_dequeue(&lp->super_tx_queue))) {
- kfree_skb(skb);
- }
+ skb_queue_purge(&lp->super_tx_queue);
+
X if (!lp->master) { /* reset only master device */
X /* Moral equivalent of dev_purge_queues():
X BEWARE! This chunk of code cannot be called from hardware
@@ -455,6 +461,8 @@
X pops -> disconn_ind(cprot);
X #endif /* CONFIG_ISDN_X25 */
X if ((!lp->dialstate) && (lp->flags & ISDN_NET_CONNECTED)) {
+ if (lp->p_encap == ISDN_NET_ENCAP_CISCOHDLCK)
+ isdn_net_ciscohdlck_disconnected(lp);
X #ifdef CONFIG_ISDN_PPP
X if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP)
X isdn_ppp_free(lp);
@@ -499,7 +507,7 @@
X lp->dialstate = 0;
X isdn_timer_ctrl(ISDN_TIMER_NETHANGUP, 1);
X if (lp->p_encap == ISDN_NET_ENCAP_CISCOHDLCK)
- isdn_timer_ctrl(ISDN_TIMER_KEEPALIVE, 1);
+ isdn_net_ciscohdlck_connected(lp);
X if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) {
X if (lp->master) { /* is lp a slave? */
X isdn_net_dev *nd = ((isdn_net_local *)lp->master->priv)->netdev;
@@ -661,7 +669,7 @@
X isdn_net_hangup(&p->dev);
X break;
X }
- if (!strcmp(lp->dial->num, "LEASED")) {
+ if (!strncmp(lp->dial->num, "LEASED", strlen("LEASED"))) {
X restore_flags(flags);
X lp->dialstate = 4;
X printk(KERN_INFO "%s: Open leased line ...\n", lp->name);
@@ -1403,92 +1411,352 @@
X return htons(ETH_P_802_2);
X }
X
-static void
-isdn_net_slarp_send(isdn_net_local *lp, int is_reply)
+
+/*
+ * CISCO HDLC keepalive specific stuff
+ */
+static struct sk_buff*
+isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len)
X {
X unsigned short hl = dev->drv[lp->isdn_device]->interface->hl_hdrlen;
- struct sk_buff *skb = alloc_skb(hl + sizeof(cisco_hdr) + sizeof(cisco_slarp), GFP_ATOMIC);
- unsigned long t = (jiffies / HZ * 1000000);
- cisco_hdr *ch;
- cisco_slarp *s;
+ struct sk_buff *skb;
X
+ skb = alloc_skb(hl + len, GFP_ATOMIC);
X if (!skb) {
- printk(KERN_WARNING
- "%s: Could not allocate SLARP reply\n", lp->name);
- return;
+ printk("isdn out of mem at %s:%d!\n", __FILE__, __LINE__);
+ return 0;
X }
X skb_reserve(skb, hl);
- ch = (cisco_hdr *)skb_put(skb, sizeof(cisco_hdr));
- ch->addr = CISCO_ADDR_UNICAST;
- ch->ctrl = 0;
- ch->type = htons(CISCO_TYPE_SLARP);
- s = (cisco_slarp *)skb_put(skb, sizeof(cisco_slarp));
- if (is_reply) {
- s->code = htonl(CISCO_SLARP_REPLY);
- memset(&s->slarp.reply.ifaddr, 0, sizeof(__u32));
- memset(&s->slarp.reply.netmask, 0, sizeof(__u32));
- } else {
- lp->cisco_myseq++;
- s->code = htonl(CISCO_SLARP_KEEPALIVE);
- s->slarp.keepalive.my_seq = htonl(lp->cisco_myseq);
- s->slarp.keepalive.your_seq = htonl(lp->cisco_yourseq);
- }
- s->rel = 0xffff;
- s->t1 = t >> 16;
- s->t0 = t & 0xffff;
- isdn_net_write_super(lp, skb);
+ return skb;
X }
X
-static void
-isdn_net_slarp_in(isdn_net_local *lp, struct sk_buff *skb)
+/* cisco hdlck device private ioctls */
+int
+isdn_ciscohdlck_dev_ioctl(struct device *dev, struct ifreq *ifr, int cmd)
X {
- cisco_slarp *s = (cisco_slarp *)skb->data;
+ isdn_net_local *lp = (isdn_net_local *) dev->priv;
+ unsigned long len = 0;
+ unsigned long expires = 0;
+ int tmp = 0;
+ int period = lp->cisco_keepalive_period;
+ char debserint = lp->cisco_debserint;
+ int rc = 0;
+
+ if (lp->p_encap != ISDN_NET_ENCAP_CISCOHDLCK)
+ return -EINVAL;
+
+ switch (cmd) {
+ /* get/set keepalive period */
+ case SIOCGKEEPPERIOD:
+ len = (unsigned long)sizeof(lp->cisco_keepalive_period);
+ if (copy_to_user((char *)ifr->ifr_ifru.ifru_data,
+ (int *)&lp->cisco_keepalive_period, len))
+ rc = -EFAULT;
+ break;
+ case SIOCSKEEPPERIOD:
+ tmp = lp->cisco_keepalive_period;
+ len = (unsigned long)sizeof(lp->cisco_keepalive_period);
+ if (copy_from_user((int *)&period,
+ (char *)ifr->ifr_ifru.ifru_data, len))
+ rc = -EFAULT;
+ if ((period > 0) && (period <= 32767))
+ lp->cisco_keepalive_period = period;
+ else
+ rc = -EINVAL;
+ if (!rc && (tmp != lp->cisco_keepalive_period)) {
+ expires = (unsigned long)(jiffies +
+ lp->cisco_keepalive_period * HZ);
+ mod_timer(&lp->cisco_timer, expires);
+ printk(KERN_INFO "%s: Keepalive period set "
+ "to %d seconds.\n",
+ lp->name, lp->cisco_keepalive_period);
+ }
+ break;
X
- switch (ntohl(s->code)) {
- case CISCO_SLARP_REQUEST:
- isdn_net_slarp_send(lp, 1);
+ /* get/set debugging */
+ case SIOCGDEBSERINT:
+ len = (unsigned long)sizeof(lp->cisco_debserint);
+ if (copy_to_user((char *)ifr->ifr_ifru.ifru_data,
+ (char *)&lp->cisco_debserint, len))
+ rc = -EFAULT;
X break;
- case CISCO_SLARP_REPLY:
- /* Ignore replies */
+ case SIOCSDEBSERINT:
+ len = (unsigned long)sizeof(lp->cisco_debserint);
+ if (copy_from_user((char *)&debserint,
+ (char *)ifr->ifr_ifru.ifru_data, len))
+ rc = -EFAULT;
+ if ((debserint >= 0) && (debserint <= 64))
+ lp->cisco_debserint = debserint;
+ else
+ rc = -EINVAL;
X break;
- case CISCO_SLARP_KEEPALIVE:
- lp->cisco_yourseq = s->slarp.keepalive.my_seq;
- if (ntohl(s->slarp.keepalive.my_seq == lp->cisco_myseq)) {
- if (lp->cisco_loop++ == 2) {
- printk(KERN_WARNING "%s: Keepalive Loop\n",
- lp->name);
- lp->cisco_myseq ^= jiffies;
- }
- } else
- lp->cisco_loop = 0;
+
+ default:
+ rc = -EINVAL;
X break;
X }
- kfree_skb(skb);
+ return (rc);
X }
X
-/*
- * Called every 10 sec. via timer-interrupt if
- * any network-interface has Cisco-Keepalive-Encapsulation
- * and is online.
- * Send Keepalive-Packet and re-schedule.
- */
-void
-isdn_net_slarp_out(void)
+/* called via cisco_timer.function */
+static void
+isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data)
X {
- isdn_net_dev *p = dev->netdev;
- int anymore = 0;
+ isdn_net_local *lp = (isdn_net_local *) data;
+ struct sk_buff *skb;
+ unsigned char *p;
+ unsigned long last_cisco_myseq = lp->cisco_myseq;
+ int myseq_diff = 0;
X
- while (p) {
- isdn_net_local *l = p->local;
- if ((l->p_encap == ISDN_NET_ENCAP_CISCOHDLCK) &&
- (l->flags & ISDN_NET_CONNECTED) &&
- (!l->dialstate) ) {
- anymore = 1;
- isdn_net_slarp_send(l, 0);
+ if (!(lp->flags & ISDN_NET_CONNECTED) || lp->dialstate) {
+ printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__);
+ return;
+ }
+ lp->cisco_myseq++;
+
+ myseq_diff = (lp->cisco_myseq - lp->cisco_mineseen);
+ if ((lp->cisco_line_state) && ((myseq_diff >= 3)||(myseq_diff <= -3))) {
+ /* line up -> down */
+ lp->cisco_line_state = 0;
+ printk (KERN_WARNING
+ "UPDOWN: Line protocol on Interface %s,"
+ " changed state to down\n", lp->name);
+ /* should stop routing higher-level data accross */
+ } else if ((!lp->cisco_line_state) &&
+ (myseq_diff >= 0) && (myseq_diff <= 2)) {
+ /* line down -> up */
+ lp->cisco_line_state = 1;
+ printk (KERN_WARNING
+ "UPDOWN: Line protocol on Interface %s,"
+ " changed state to up\n", lp->name);
+ /* restart routing higher-level data accross */
+ }
+
+ if (lp->cisco_debserint)
+ printk (KERN_DEBUG "%s: HDLC "
+ "myseq %lu, mineseen %lu%c, yourseen %lu, %s\n",
+ lp->name, last_cisco_myseq, lp->cisco_mineseen,
+ ((last_cisco_myseq == lp->cisco_mineseen) ? '*' : 040),
+ lp->cisco_yourseq,
+ ((lp->cisco_line_state) ? "line up" : "line down"));
+
+ skb = isdn_net_ciscohdlck_alloc_skb(lp, 4 + 14);
+ if (!skb)
+ return;
+
+ p = skb_put(skb, 4 + 14);
+
+ /* cisco header */


+ p += put_u8 (p, CISCO_ADDR_UNICAST);
+ p += put_u8 (p, CISCO_CTRL);

+ p += put_u16(p, CISCO_TYPE_SLARP);
+
+ /* slarp keepalive */
+ p += put_u32(p, CISCO_SLARP_KEEPALIVE);
+ p += put_u32(p, lp->cisco_myseq);
+ p += put_u32(p, lp->cisco_yourseq);
+ p += put_u16(p, 0xffff); // reliablity, always 0xffff
+
+ isdn_net_write_super(lp, skb);
+
+ lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ;
+
+ add_timer(&lp->cisco_timer);
+}
+
+static void
+isdn_net_ciscohdlck_slarp_send_request(isdn_net_local *lp)
+{
+ struct sk_buff *skb;
+ unsigned char *p;
+
+ skb = isdn_net_ciscohdlck_alloc_skb(lp, 4 + 14);
+ if (!skb)
+ return;
+
+ p = skb_put(skb, 4 + 14);
+
+ /* cisco header */


+ p += put_u8 (p, CISCO_ADDR_UNICAST);
+ p += put_u8 (p, CISCO_CTRL);

+ p += put_u16(p, CISCO_TYPE_SLARP);
+
+ /* slarp request */
+ p += put_u32(p, CISCO_SLARP_REQUEST);
+ p += put_u32(p, 0); // address
+ p += put_u32(p, 0); // netmask
+ p += put_u16(p, 0); // unused
+
+ isdn_net_write_super(lp, skb);
+}
+
+static void
+isdn_net_ciscohdlck_connected(isdn_net_local *lp)
+{
+ lp->cisco_myseq = 0;
+ lp->cisco_mineseen = 0;
+ lp->cisco_yourseq = 0;
+ lp->cisco_keepalive_period = ISDN_TIMER_KEEPINT;
+ lp->cisco_last_slarp_in = 0;
+ lp->cisco_line_state = 0;
+ lp->cisco_debserint = 0;
+
+ /* send slarp request because interface/seq.no.s reset */
+ isdn_net_ciscohdlck_slarp_send_request(lp);
+
+ init_timer(&lp->cisco_timer);
+ lp->cisco_timer.data = (unsigned long) lp;
+ lp->cisco_timer.function = isdn_net_ciscohdlck_slarp_send_keepalive;
+ lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ;
+ add_timer(&lp->cisco_timer);
+}
+
+static void
+isdn_net_ciscohdlck_disconnected(isdn_net_local *lp)
+{
+ del_timer(&lp->cisco_timer);
+}
+
+static void
+isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp)
+{
+ struct sk_buff *skb;
+ unsigned char *p;
+ struct in_device *in_dev = NULL;
+ u32 addr = 0; /* local ipv4 address */
+ u32 mask = 0; /* local netmask */
+
+ if ((in_dev = lp->netdev->dev.ip_ptr) != NULL) {
+ /* take primary(first) address of interface */
+ struct in_ifaddr *ifa = in_dev->ifa_list;
+ if (ifa != NULL) {
+ addr = ifa->ifa_local;
+ mask = ifa->ifa_mask;
X }
- p = (isdn_net_dev *) p->next;
X }
- isdn_timer_ctrl(ISDN_TIMER_KEEPALIVE, anymore);
+
+ skb = isdn_net_ciscohdlck_alloc_skb(lp, 4 + 14);
+ if (!skb)
+ return;
+
+ p = skb_put(skb, 4 + 14);
+
+ /* cisco header */


+ p += put_u8 (p, CISCO_ADDR_UNICAST);
+ p += put_u8 (p, CISCO_CTRL);

+ p += put_u16(p, CISCO_TYPE_SLARP);
+
+ /* slarp reply, send own ip/netmask; if values are nonsense remote
+ * should think we are unable to provide it with an address via SLARP */
+ p += put_u32(p, CISCO_SLARP_REPLY);
+ p += put_u32(p, addr); // address
+ p += put_u32(p, mask); // netmask
+ p += put_u16(p, 0); // unused
+
+ isdn_net_write_super(lp, skb);
+}
+
+static void
+isdn_net_ciscohdlck_slarp_in(isdn_net_local *lp, struct sk_buff *skb)
+{
+ unsigned char *p;
+ int period;
+ __u32 code;
+ __u32 my_seq, addr;
+ __u32 your_seq, mask;
+ __u16 unused;
+
+ if (skb->len < 14)
+ return;
+
+ p = skb->data;
+ p += get_u32(p, &code);
+
+ switch (code) {
+ case CISCO_SLARP_REQUEST:
+ lp->cisco_yourseq = 0;
+ isdn_net_ciscohdlck_slarp_send_reply(lp);
+ break;
+ case CISCO_SLARP_REPLY:
+ /* Ignore replies - at least for now */
+ if (lp->cisco_debserint) {
+ p += get_u32(p, &addr);
+ p += get_u32(p, &mask);
+ p += get_u16(p, &unused);
+ printk(KERN_DEBUG "%s: got slarp reply (%ul/%ul) - "
+ "ignored\n", lp->name, addr, mask);
+ }
+ break;
+ case CISCO_SLARP_KEEPALIVE:
+ period = (int)((jiffies - lp->cisco_last_slarp_in
+ + HZ/2 - 1) / HZ);
+ if (lp->cisco_debserint &&
+ (period != lp->cisco_keepalive_period) &&
+ lp->cisco_last_slarp_in) {
+ printk(KERN_DEBUG "%s: Keepalive period mismatch - "
+ "is %d but should be %d.\n",
+ lp->name, period, lp->cisco_keepalive_period);
+ }
+ lp->cisco_last_slarp_in = jiffies;
+ p += get_u32(p, &my_seq);
+ p += get_u32(p, &your_seq);
+ p += get_u16(p, &unused);
+ lp->cisco_yourseq = my_seq;
+ lp->cisco_mineseen = your_seq;


+ break;
+ }
+}
+

+static void
+isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb)
+{
+ unsigned char *p;
+ __u8 addr;
+ __u8 ctrl;
+ __u16 type;
+
+ if (skb->len < 4)
+ goto out_free;
+
+ p = skb->data;
+ p += get_u8 (p, &addr);
+ p += get_u8 (p, &ctrl);
+ p += get_u16(p, &type);
+ skb_pull(skb, 4);
+
+ if (addr != CISCO_ADDR_UNICAST && addr != CISCO_ADDR_BROADCAST) {
+ printk(KERN_WARNING "%s: Unknown Cisco addr 0x%02x\n",
+ lp->name, addr);
+ goto out_free;
+ }
+ if (ctrl != CISCO_CTRL) {
+ printk(KERN_WARNING "%s: Unknown Cisco ctrl 0x%02x\n",
+ lp->name, ctrl);
+ goto out_free;
+ }
+
+ switch (type) {
+ case CISCO_TYPE_INET:
+ skb->protocol = htons(ETH_P_IP);
+ netif_rx(skb);
+ break;
+ case CISCO_TYPE_SLARP:
+ isdn_net_ciscohdlck_slarp_in(lp, skb);
+ goto out_free;
+ case CISCO_TYPE_CDP:
+ if (lp->cisco_debserint)
+ printk(KERN_DEBUG "%s: Received CDP packet. use "
+ "\"no cdp enable\" on cisco.\n", lp->name);
+ goto out_free;
+ default:
+ printk(KERN_WARNING "%s: Unknown Cisco type 0x%04x\n",
+ lp->name, type);
+ goto out_free;
+ }
+ return;
+
+ out_free:
+ kfree_skb(skb);
X }
X
X /*
@@ -1505,8 +1773,6 @@
X #ifdef CONFIG_ISDN_X25
X struct concap_proto *cprot = lp -> netdev -> cprot;
X #endif
- cisco_hdr *ch;
-
X lp->transcount += skb->len;
X
X lp->stats.rx_packets++;
@@ -1546,36 +1812,8 @@
X skb->protocol = htons(ETH_P_IP);
X break;
X case ISDN_NET_ENCAP_CISCOHDLCK:
- ch = (cisco_hdr *)skb->data;
- if ((ch->addr != CISCO_ADDR_UNICAST) &&
- (ch->addr != CISCO_ADDR_BROADCAST) ) {
- printk(KERN_WARNING "%s: Unknown Cisco addr 0x%02x\n",
- lp->name, ch->addr);
- kfree_skb(skb);
- return;
- }
- if (ch->ctrl != 0) {
- printk(KERN_WARNING "%s: Unknown Cisco ctrl 0x%02x\n",
- lp->name, ch->ctrl);
- kfree_skb(skb);
- return;
- }
- switch (ntohs(ch->type)) {
- case CISCO_TYPE_INET:
- skb_pull(skb, 4);
- skb->protocol = htons(ETH_P_IP);
- break;
- case CISCO_TYPE_SLARP:
- skb_pull(skb, 4);
- isdn_net_slarp_in(olp, skb);
- return;
- default:
- printk(KERN_WARNING "%s: Unknown Cisco type 0x%04x\n",
- lp->name, ch->type);
- kfree_skb(skb);
- return;
- }
- break;
+ isdn_net_ciscohdlck_receive(lp, skb);
+ return;
X case ISDN_NET_ENCAP_CISCOHDLC:


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 19'
echo 'File patch-2.2.20 is continued in part 20'
echo "20" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:22 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part23

#!/bin/sh -x
# this is part 23 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 23; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+#define TTR3 0x12 /* Transmit Timeslot Reg 3 */
+#define TTR4 0x13 /* Transmit Timeslot Reg 4 */
+#define IMR0 0x14 /* Interrupt Mask Reg 0 */
+#define IMR1 0x15 /* Interrupt Mask Reg 1 */
+#define IMR2 0x16 /* Interrupt Mask Reg 2 */
+#define IMR3 0x17 /* Interrupt Mask Reg 3 */
+#define IMR4 0x18 /* Interrupt Mask Reg 4 */
+#define IMR5 0x19 /* Interrupt Mask Reg 5 */
+#define FMR0 0x1A /* Framer Mode Reigster 0 */
+#define FMR1 0x1B /* Framer Mode Reigster 1 */
+#define FMR2 0x1C /* Framer Mode Reigster 2 */
+#define LOOP 0x1D /* Channel Loop Back */
+#define XSW 0x1E /* Transmit Service Word */
+#define FMR4 0x1E /* Framer Mode Reg 4 */
+#define XSP 0x1F /* Transmit Spare Bits */
+#define FMR5 0x1F /* Framer Mode Reg 5 */
+#define XC0 0x20 /* Transmit Control 0 */
+#define XC1 0x21 /* Transmit Control 1 */
+#define RC0 0x22 /* Receive Control 0 */
+#define RC1 0x23 /* Receive Control 1 */
+#define XPM0 0x24 /* Transmit Pulse Mask 0 */
+#define XPM1 0x25 /* Transmit Pulse Mask 1 */
+#define XPM2 0x26 /* Transmit Pulse Mask 2 */
+#define TSWM 0x27 /* Transparent Service Word Mask */
+#define TEST1 0x28 /* Manuf. Test Reg 1 */
+#define IDLE 0x29 /* Idle Channel Code */
+#define XSA4 0x2A /* Transmit SA4 Bit Reg */
+#define XDL1 0x2A /* Transmit DL-Bit Reg 2 */
+#define XSA5 0x2B /* Transmit SA4 Bit Reg */
+#define XDL2 0x2B /* Transmit DL-Bit Reg 2 */
+#define XSA6 0x2C /* Transmit SA4 Bit Reg */
+#define XDL3 0x2C /* Transmit DL-Bit Reg 2 */
+#define XSA7 0x2D /* Transmit SA4 Bit Reg */
+#define CCB1 0x2D /* Clear Channel Reg 1 */
+#define XSA8 0x2E /* Transmit SA4 Bit Reg */
+#define CCB2 0x2E /* Clear Channel Reg 2 */
+#define FMR3 0x2F /* Framer Mode Reg. 3 */
+#define CCB3 0x2F /* Clear Channel Reg 3 */
+#define ICB1 0x30 /* Idle Channel Reg 1 */
+#define ICB2 0x31 /* Idle Channel Reg 2 */
+#define ICB3 0x32 /* Idle Channel Reg 3 */
+#define ICB4 0x33 /* Idle Channel Reg 4 */
+#define LIM0 0x34 /* Line Interface Mode 0 */
+#define LIM1 0x35 /* Line Interface Mode 1 */
+#define PCDR 0x36 /* Pulse Count Detection */
+#define PCRR 0x37 /* Pulse Count Recovery */
+#define LIM2 0x38 /* Line Interface Mode Reg 2 */
+#define LCR1 0x39 /* Loop Code Reg 1 */
+#define LCR2 0x3A /* Loop Code Reg 2 */
+#define LCR3 0x3B /* Loop Code Reg 3 */
+#define SIC1 0x3C /* System Interface Control 1 */
+
+/* Read-only Registers (E1/T1 control mode read registers) */
+#define RFIFOH 0x00 /* Receive FIFO */
+#define RFIFOL 0x01 /* Receive FIFO */
+#define FRS0 0x4C /* Framer Receive Status 0 */
+#define FRS1 0x4D /* Framer Receive Status 1 */
+#define RSW 0x4E /* Receive Service Word */
+#define FRS2 0x4E /* Framer Receive Status 2 */
+#define RSP 0x4F /* Receive Spare Bits */
+#define FRS3 0x4F /* Framer Receive Status 3 */
+#define FECL 0x50 /* Framing Error Counter */
+#define FECH 0x51 /* Framing Error Counter */
+#define CVCL 0x52 /* Code Violation Counter */
+#define CVCH 0x53 /* Code Violation Counter */
+#define CECL 0x54 /* CRC Error Counter 1 */
+#define CECH 0x55 /* CRC Error Counter 1 */
+#define EBCL 0x56 /* E-Bit Error Counter */
+#define EBCH 0x57 /* E-Bit Error Counter */
+#define BECL 0x58 /* Bit Error Counter Low */
+#define BECH 0x59 /* Bit Error Counter Low */
+#define CEC3 0x5A /* CRC Error Counter 3 (16-bit) */
+#define RSA4 0x5C /* Receive SA4 Bit Reg */
+#define RDL1 0x5C /* Receive DL-Bit Reg 1 */
+#define RSA5 0x5D /* Receive SA5 Bit Reg */
+#define RDL2 0x5D /* Receive DL-Bit Reg 2 */
+#define RSA6 0x5E /* Receive SA6 Bit Reg */
+#define RDL3 0x5E /* Receive DL-Bit Reg 3 */
+#define RSA7 0x5F /* Receive SA7 Bit Reg */
+#define RSA8 0x60 /* Receive SA8 Bit Reg */
+#define RSA6S 0x61 /* Receive SA6 Bit Status Reg */
+#define TSR0 0x62 /* Manuf. Test Reg 0 */
+#define TSR1 0x63 /* Manuf. Test Reg 1 */
+#define SIS 0x64 /* Signaling Status Reg */
+#define RSIS 0x65 /* Receive Signaling Status Reg */
+#define RBCL 0x66 /* Receive Byte Control */
+#define RBCH 0x67 /* Receive Byte Control */
+#define FISR0 0x68 /* Interrupt Status Reg 0 */
+#define FISR1 0x69 /* Interrupt Status Reg 1 */
+#define FISR2 0x6A /* Interrupt Status Reg 2 */
+#define FISR3 0x6B /* Interrupt Status Reg 3 */
+#define GIS 0x6E /* Global Interrupt Status */
+#define VSTR 0x6F /* Version Status */
+#define RS(nbr) (0x70 + (nbr)) /* Rx CAS Reg (0 to 15) */
+
+#endif /* _FALC_LH_H */
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/hamradio/bpqether.c linux/drivers/net/hamradio/bpqether.c
--- v2.2.19/drivers/net/hamradio/bpqether.c Sun Mar 25 17:31:18 2001
+++ linux/drivers/net/hamradio/bpqether.c Wed Oct 10 01:40:59 2001
@@ -169,7 +169,7 @@
X */
X static int bpq_check_devices(struct device *dev)
X {
- struct bpqdev *bpq, *bpq_prev;
+ struct bpqdev *bpq, *bpq_prev, *bpq_next;
X int result = 0;


X unsigned long flags;
X

@@ -178,7 +178,8 @@
X

X bpq_prev = NULL;
X
- for (bpq = bpq_devices; bpq != NULL; bpq = bpq->next) {
+ for (bpq = bpq_devices; bpq != NULL; bpq = bpq_next) {
+ bpq_next = bpq->next;
X if (!dev_get(bpq->ethname)) {
X if (bpq_prev)
X bpq_prev->next = bpq->next;
@@ -195,8 +196,8 @@
X unregister_netdevice(&bpq->axdev);
X kfree(bpq);
X }
-
- bpq_prev = bpq;
+ else
+ bpq_prev = bpq;
X }
X
X restore_flags(flags);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/hamradio/scc.c linux/drivers/net/hamradio/scc.c
--- v2.2.19/drivers/net/hamradio/scc.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/hamradio/scc.c Mon Oct 22 10:44:29 2001
@@ -104,6 +104,7 @@
X flags that aren't... Restarting the DPLL does not help
X either, it resynchronizes too slow and the first received
X frame gets lost.
+ 2001-10-05 Set skb to NULL when it is freed in scc_spint. (PE1RXQ)
X
X Thanks to all who contributed to this driver with ideas and bug
X reports!
@@ -222,7 +223,7 @@
X
X static unsigned char *SCC_DriverName = "scc";
X
-static struct irqflags { unsigned char used : 1; } Ivec[16];
+static struct irqflags { unsigned char used : 1; } Ivec[NR_IRQS];
X
X static struct scc_channel SCC_Info[2 * SCC_MAXCHIPS]; /* information per channel */
X
@@ -618,6 +619,7 @@
X if (skb != NULL)
X kfree_skb(skb);
X scc->rx_buff = NULL;
+ skb=NULL; /* prevent reuse of skb */
X }
X
X if(status & END_FR && skb != NULL) /* end of frame */
@@ -1547,7 +1549,7 @@
X printk(KERN_INFO "Init Z8530 driver: %u channels, IRQ", Nchips*2);
X
X flag=" ";
- for (k = 0; k < 16; k++)
+ for (k = 0; k < NR_IRQS; k++)
X if (Ivec[k].used)
X {
X printk("%s%d", flag, k);
@@ -1873,6 +1875,9 @@
X
X if (hwcfg.irq == 2) hwcfg.irq = 9;
X
+ if (hwcfg.irq <0 || hwcfg.irq > NR_IRQS)
+ return -EINVAL;
+
X if (!Ivec[hwcfg.irq].used && hwcfg.irq)
X {
X if (request_irq(hwcfg.irq, scc_isr, SA_INTERRUPT, "AX.25 SCC", NULL))
@@ -2323,7 +2328,7 @@
X }
X }
X
- for (k=0; k < 16 ; k++)
+ for (k=0; k < NR_IRQS ; k++)
X if (Ivec[k].used) free_irq(k, NULL);
X
X restore_flags(flags);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/hamradio/soundmodem/sm_wss.c linux/drivers/net/hamradio/soundmodem/sm_wss.c
--- v2.2.19/drivers/net/hamradio/soundmodem/sm_wss.c Sun Mar 25 17:31:18 2001
+++ linux/drivers/net/hamradio/soundmodem/sm_wss.c Wed Oct 10 01:41:00 2001
@@ -172,8 +172,10 @@
X /* MCE and interface config reg */
X write_codec(dev, 0x49, fdx ? 0x8 : 0xc);
X outb(0xb, WSS_CODEC_IA(dev->base_addr)); /* leave MCE */
- if (SCSTATE->crystal && !fullcalib)
+ if (SCSTATE->crystal && !fullcalib) {
+ restore_flags(flags);
X return 0;
+ }
X /*
X * wait for ACI start
X */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/hd64572.h linux/drivers/net/hd64572.h
--- v2.2.19/drivers/net/hd64572.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/net/hd64572.h Wed Oct 31 14:08:10 2001
@@ -0,0 +1,443 @@
+/*
+ * hd64572.h Description of the Hitachi HD64572 (SCA-II), valid for
+ * CPU modes 0 & 2.


+ *
+ * Author: Ivan Passos <iv...@cyclades.com>
+ *
+ * Copyright: (c) 2000-2001 Cyclades Corp.
+ *
+ * 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.
+ *

+ * $Log: hd64572.h,v $


+ * Revision 3.1 2001/06/15 12:41:10 regina
+ * upping major version number
+ *

+ * Revision 1.1.1.1 2001/06/13 20:24:31 daniela


+ * PC300 initial CVS version (3.4.0-pre1)
+ *

+ * Revision 1.0 2000/01/25 ivan


+ * Initial version.
+ *
+ */
+

+#ifndef _HD64572_H
+#define _HD64572_H
+
+/* Illegal Access Register */
+#define ILAR 0x00
+
+/* Wait Controller Registers */
+#define PABR0L 0x20 /* Physical Addr Boundary Register 0 L */
+#define PABR0H 0x21 /* Physical Addr Boundary Register 0 H */
+#define PABR1L 0x22 /* Physical Addr Boundary Register 1 L */
+#define PABR1H 0x23 /* Physical Addr Boundary Register 1 H */
+#define WCRL 0x24 /* Wait Control Register L */
+#define WCRM 0x25 /* Wait Control Register M */
+#define WCRH 0x26 /* Wait Control Register H */
+
+/* Interrupt Registers */
+#define IVR 0x60 /* Interrupt Vector Register */
+#define IMVR 0x64 /* Interrupt Modified Vector Register */
+#define ITCR 0x68 /* Interrupt Control Register */
+#define ISR0 0x6c /* Interrupt Status Register 0 */
+#define ISR1 0x70 /* Interrupt Status Register 1 */
+#define IER0 0x74 /* Interrupt Enable Register 0 */
+#define IER1 0x78 /* Interrupt Enable Register 1 */
+
+/* Register Access Macros (chan is 0 or 1 in _any_ case) */
+#define M_REG(reg, chan) (reg + 0x80*chan) /* MSCI */
+#define DRX_REG(reg, chan) (reg + 0x40*chan) /* DMA Rx */
+#define DTX_REG(reg, chan) (reg + 0x20*(2*chan + 1)) /* DMA Tx */
+#define TRX_REG(reg, chan) (reg + 0x20*chan) /* Timer Rx */
+#define TTX_REG(reg, chan) (reg + 0x10*(2*chan + 1)) /* Timer Tx */
+#define ST_REG(reg, chan) (reg + 0x80*chan) /* Status Cnt */
+#define IR0_DRX(val, chan) ((val)<<(8*(chan))) /* Int DMA Rx */
+#define IR0_DTX(val, chan) ((val)<<(4*(2*chan + 1))) /* Int DMA Tx */
+#define IR0_M(val, chan) ((val)<<(8*(chan))) /* Int MSCI */
+
+/* MSCI Channel Registers */
+#define MD0 0x138 /* Mode reg 0 */
+#define MD1 0x139 /* Mode reg 1 */
+#define MD2 0x13a /* Mode reg 2 */
+#define MD3 0x13b /* Mode reg 3 */
+#define CTL 0x130 /* Control reg */
+#define RXS 0x13c /* RX clock source */
+#define TXS 0x13d /* TX clock source */
+#define EXS 0x13e /* External clock input selection */
+#define TMCT 0x144 /* Time constant (Tx) */
+#define TMCR 0x145 /* Time constant (Rx) */
+#define CMD 0x128 /* Command reg */
+#define ST0 0x118 /* Status reg 0 */
+#define ST1 0x119 /* Status reg 1 */
+#define ST2 0x11a /* Status reg 2 */
+#define ST3 0x11b /* Status reg 3 */
+#define ST4 0x11c /* Status reg 4 */
+#define FST 0x11d /* frame Status reg */
+#define IE0 0x120 /* Interrupt enable reg 0 */
+#define IE1 0x121 /* Interrupt enable reg 1 */
+#define IE2 0x122 /* Interrupt enable reg 2 */
+#define IE4 0x124 /* Interrupt enable reg 4 */
+#define FIE 0x125 /* Frame Interrupt enable reg */
+#define SA0 0x140 /* Syn Address reg 0 */
+#define SA1 0x141 /* Syn Address reg 1 */
+#define IDL 0x142 /* Idle register */
+#define TRBL 0x100 /* TX/RX buffer reg L */
+#define TRBK 0x101 /* TX/RX buffer reg K */
+#define TRBJ 0x102 /* TX/RX buffer reg J */
+#define TRBH 0x103 /* TX/RX buffer reg H */
+#define TRC0 0x148 /* TX Ready control reg 0 */
+#define TRC1 0x149 /* TX Ready control reg 1 */
+#define RRC 0x14a /* RX Ready control reg */
+#define CST0 0x108 /* Current Status Register 0 */
+#define CST1 0x109 /* Current Status Register 1 */
+#define CST2 0x10a /* Current Status Register 2 */
+#define CST3 0x10b /* Current Status Register 3 */
+#define GPO 0x131 /* General Purpose Output Pin Ctl Reg */
+#define TFS 0x14b /* Tx Start Threshold Ctl Reg */
+#define TFN 0x143 /* Inter-transmit-frame Time Fill Ctl Reg */
+#define TBN 0x110 /* Tx Buffer Number Reg */
+#define RBN 0x111 /* Rx Buffer Number Reg */
+#define TNR0 0x150 /* Tx DMA Request Ctl Reg 0 */
+#define TNR1 0x151 /* Tx DMA Request Ctl Reg 1 */
+#define TCR 0x152 /* Tx DMA Critical Request Reg */
+#define RNR 0x154 /* Rx DMA Request Ctl Reg */
+#define RCR 0x156 /* Rx DMA Critical Request Reg */
+
+/* Timer Registers */
+#define TCNTL 0x200 /* Timer Upcounter L */
+#define TCNTH 0x201 /* Timer Upcounter H */
+#define TCONRL 0x204 /* Timer Constant Register L */
+#define TCONRH 0x205 /* Timer Constant Register H */
+#define TCSR 0x206 /* Timer Control/Status Register */
+#define TEPR 0x207 /* Timer Expand Prescale Register */
+
+/* DMA registers */
+#define PCR 0x40 /* DMA priority control reg */
+#define DRR 0x44 /* DMA reset reg */
+#define DMER 0x07 /* DMA Master Enable reg */
+#define BTCR 0x08 /* Burst Tx Ctl Reg */
+#define BOLR 0x0c /* Back-off Length Reg */
+#define DSR_RX(chan) (0x48 + 2*chan) /* DMA Status Reg (Rx) */
+#define DSR_TX(chan) (0x49 + 2*chan) /* DMA Status Reg (Tx) */
+#define DIR_RX(chan) (0x4c + 2*chan) /* DMA Interrupt Enable Reg (Rx) */
+#define DIR_TX(chan) (0x4d + 2*chan) /* DMA Interrupt Enable Reg (Tx) */
+#define FCT_RX(chan) (0x50 + 2*chan) /* Frame End Interrupt Counter (Rx) */
+#define FCT_TX(chan) (0x51 + 2*chan) /* Frame End Interrupt Counter (Tx) */
+#define DMR_RX(chan) (0x54 + 2*chan) /* DMA Mode Reg (Rx) */
+#define DMR_TX(chan) (0x55 + 2*chan) /* DMA Mode Reg (Tx) */
+#define DCR_RX(chan) (0x58 + 2*chan) /* DMA Command Reg (Rx) */
+#define DCR_TX(chan) (0x59 + 2*chan) /* DMA Command Reg (Tx) */
+
+/* DMA Channel Registers */
+#define DARL 0x80 /* Dest Addr Register L (single-block, RX only) */
+#define DARH 0x81 /* Dest Addr Register H (single-block, RX only) */
+#define DARB 0x82 /* Dest Addr Register B (single-block, RX only) */
+#define DARBH 0x83 /* Dest Addr Register BH (single-block, RX only) */
+#define SARL 0x80 /* Source Addr Register L (single-block, TX only) */
+#define SARH 0x81 /* Source Addr Register H (single-block, TX only) */
+#define SARB 0x82 /* Source Addr Register B (single-block, TX only) */
+#define DARBH 0x83 /* Source Addr Register BH (single-block, TX only) */
+#define BARL 0x80 /* Buffer Addr Register L (chained-block) */
+#define BARH 0x81 /* Buffer Addr Register H (chained-block) */
+#define BARB 0x82 /* Buffer Addr Register B (chained-block) */
+#define BARBH 0x83 /* Buffer Addr Register BH (chained-block) */
+#define CDAL 0x84 /* Current Descriptor Addr Register L */
+#define CDAH 0x85 /* Current Descriptor Addr Register H */
+#define CDAB 0x86 /* Current Descriptor Addr Register B */
+#define CDABH 0x87 /* Current Descriptor Addr Register BH */
+#define EDAL 0x88 /* Error Descriptor Addr Register L */
+#define EDAH 0x89 /* Error Descriptor Addr Register H */
+#define EDAB 0x8a /* Error Descriptor Addr Register B */
+#define EDABH 0x8b /* Error Descriptor Addr Register BH */
+#define BFLL 0x90 /* RX Buffer Length L (only RX) */
+#define BFLH 0x91 /* RX Buffer Length H (only RX) */
+#define BCRL 0x8c /* Byte Count Register L */
+#define BCRH 0x8d /* Byte Count Register H */
+
+/* Block Descriptor Structure */
+typedef struct {
+ unsigned long next; /* pointer to next block descriptor */
+ unsigned long ptbuf; /* buffer pointer */
+ unsigned short len; /* data length */
+ unsigned char status; /* status */
+ unsigned char filler[5]; /* alignment filler (16 bytes) */
+} pcsca_bd_t;
+
+/*
+ Descriptor Status definitions:
+
+ Bit Transmission Reception
+
+ 7 EOM EOM
+ 6 - Short Frame
+ 5 - Abort
+ 4 - Residual bit
+ 3 Underrun Overrun
+ 2 - CRC
+ 1 Ownership Ownership
+ 0 EOT -
+*/
+#define DST_EOT 0x01 /* End of transmit command */
+#define DST_OSB 0x02 /* Ownership bit */
+#define DST_CRC 0x04 /* CRC Error */
+#define DST_OVR 0x08 /* Overrun */
+#define DST_UDR 0x08 /* Underrun */
+#define DST_RBIT 0x10 /* Residual bit */
+#define DST_ABT 0x20 /* Abort */
+#define DST_SHRT 0x40 /* Short Frame */
+#define DST_EOM 0x80 /* End of Message */
+
+/* Status Counter Registers */
+#define CMCR 0x158 /* Counter Master Ctl Reg */
+#define TECNTL 0x160 /* Tx EOM Counter L */
+#define TECNTM 0x161 /* Tx EOM Counter M */
+#define TECNTH 0x162 /* Tx EOM Counter H */
+#define TECCR 0x163 /* Tx EOM Counter Ctl Reg */
+#define URCNTL 0x164 /* Underrun Counter L */
+#define URCNTH 0x165 /* Underrun Counter H */
+#define URCCR 0x167 /* Underrun Counter Ctl Reg */
+#define RECNTL 0x168 /* Rx EOM Counter L */
+#define RECNTM 0x169 /* Rx EOM Counter M */
+#define RECNTH 0x16a /* Rx EOM Counter H */
+#define RECCR 0x16b /* Rx EOM Counter Ctl Reg */
+#define ORCNTL 0x16c /* Overrun Counter L */
+#define ORCNTH 0x16d /* Overrun Counter H */
+#define ORCCR 0x16f /* Overrun Counter Ctl Reg */
+#define CECNTL 0x170 /* CRC Counter L */
+#define CECNTH 0x171 /* CRC Counter H */
+#define CECCR 0x173 /* CRC Counter Ctl Reg */
+#define ABCNTL 0x174 /* Abort frame Counter L */
+#define ABCNTH 0x175 /* Abort frame Counter H */
+#define ABCCR 0x177 /* Abort frame Counter Ctl Reg */
+#define SHCNTL 0x178 /* Short frame Counter L */
+#define SHCNTH 0x179 /* Short frame Counter H */
+#define SHCCR 0x17b /* Short frame Counter Ctl Reg */
+#define RSCNTL 0x17c /* Residual bit Counter L */
+#define RSCNTH 0x17d /* Residual bit Counter H */
+#define RSCCR 0x17f /* Residual bit Counter Ctl Reg */
+
+/* Register Programming Constants */
+
+#define IR0_DMIC 0x00000001
+#define IR0_DMIB 0x00000002
+#define IR0_DMIA 0x00000004
+#define IR0_EFT 0x00000008
+#define IR0_DMAREQ 0x00010000
+#define IR0_TXINT 0x00020000
+#define IR0_RXINTB 0x00040000
+#define IR0_RXINTA 0x00080000
+#define IR0_TXRDY 0x00100000
+#define IR0_RXRDY 0x00200000
+
+#define MD0_CRC16_0 0x00
+#define MD0_CRC16_1 0x01
+#define MD0_CRC32 0x02
+#define MD0_CRC_CCITT 0x03
+#define MD0_CRCC0 0x04
+#define MD0_CRCC1 0x08
+#define MD0_AUTO_ENA 0x10
+#define MD0_ASYNC 0x00
+#define MD0_BY_MSYNC 0x20
+#define MD0_BY_BISYNC 0x40
+#define MD0_BY_EXT 0x60
+#define MD0_BIT_SYNC 0x80
+#define MD0_TRANSP 0xc0
+
+#define MD1_NOADDR 0x00
+#define MD1_SADDR1 0x40
+#define MD1_SADDR2 0x80
+#define MD1_DADDR 0xc0
+
+#define MD2_F_DUPLEX 0x00
+#define MD2_AUTO_ECHO 0x01
+#define MD2_LOOP_HI_Z 0x02
+#define MD2_LOOP_MIR 0x03
+#define MD2_ADPLL_X8 0x00
+#define MD2_ADPLL_X16 0x08
+#define MD2_ADPLL_X32 0x10
+#define MD2_NRZ 0x00
+#define MD2_NRZI 0x20
+#define MD2_NRZ_IEEE 0x40
+#define MD2_MANCH 0x00
+#define MD2_FM1 0x20
+#define MD2_FM0 0x40
+#define MD2_FM 0x80
+
+#define CTL_RTS 0x01
+#define CTL_DTR 0x02
+#define CTL_SYN 0x04
+#define CTL_IDLC 0x10
+#define CTL_UDRNC 0x20
+#define CTL_URSKP 0x40
+#define CTL_URCT 0x80
+
+#define RXS_BR0 0x01
+#define RXS_BR1 0x02
+#define RXS_BR2 0x04
+#define RXS_BR3 0x08
+#define RXS_ECLK 0x00
+#define RXS_ECLK_NS 0x20
+#define RXS_IBRG 0x40
+#define RXS_PLL1 0x50
+#define RXS_PLL2 0x60
+#define RXS_PLL3 0x70
+#define RXS_DRTXC 0x80
+
+#define TXS_BR0 0x01
+#define TXS_BR1 0x02
+#define TXS_BR2 0x04
+#define TXS_BR3 0x08
+#define TXS_ECLK 0x00
+#define TXS_IBRG 0x40
+#define TXS_RCLK 0x60
+#define TXS_DTRXC 0x80
+
+#define EXS_RES0 0x01
+#define EXS_RES1 0x02
+#define EXS_RES2 0x04
+#define EXS_TES0 0x10
+#define EXS_TES1 0x20
+#define EXS_TES2 0x40
+
+#define CMD_RX_RST 0x11
+#define CMD_RX_ENA 0x12
+#define CMD_RX_DIS 0x13
+#define CMD_RX_CRC_INIT 0x14
+#define CMD_RX_MSG_REJ 0x15
+#define CMD_RX_MP_SRCH 0x16
+#define CMD_RX_CRC_EXC 0x17
+#define CMD_RX_CRC_FRC 0x18
+#define CMD_TX_RST 0x01
+#define CMD_TX_ENA 0x02
+#define CMD_TX_DISA 0x03
+#define CMD_TX_CRC_INIT 0x04
+#define CMD_TX_CRC_EXC 0x05
+#define CMD_TX_EOM 0x06
+#define CMD_TX_ABORT 0x07
+#define CMD_TX_MP_ON 0x08
+#define CMD_TX_BUF_CLR 0x09
+#define CMD_TX_DISB 0x0b
+#define CMD_CH_RST 0x21
+#define CMD_SRCH_MODE 0x31
+#define CMD_NOP 0x00
+
+#define ST0_RXRDY 0x01
+#define ST0_TXRDY 0x02
+#define ST0_RXINTB 0x20
+#define ST0_RXINTA 0x40
+#define ST0_TXINT 0x80
+
+#define ST1_IDLE 0x01
+#define ST1_ABORT 0x02
+#define ST1_CDCD 0x04
+#define ST1_CCTS 0x08
+#define ST1_SYN_FLAG 0x10
+#define ST1_CLMD 0x20
+#define ST1_TXIDLE 0x40
+#define ST1_UDRN 0x80
+
+#define ST2_CRCE 0x04
+#define ST2_ONRN 0x08
+#define ST2_RBIT 0x10
+#define ST2_ABORT 0x20
+#define ST2_SHORT 0x40
+#define ST2_EOM 0x80
+
+#define ST3_RX_ENA 0x01
+#define ST3_TX_ENA 0x02
+#define ST3_DCD 0x04
+#define ST3_CTS 0x08
+#define ST3_SRCH_MODE 0x10
+#define ST3_SLOOP 0x20
+#define ST3_GPI 0x80
+
+#define ST4_RDNR 0x01
+#define ST4_RDCR 0x02
+#define ST4_TDNR 0x04
+#define ST4_TDCR 0x08
+#define ST4_OCLM 0x20
+#define ST4_CFT 0x40
+#define ST4_CGPI 0x80
+
+#define FST_CRCEF 0x04
+#define FST_OVRNF 0x08
+#define FST_RBIF 0x10
+#define FST_ABTF 0x20
+#define FST_SHRTF 0x40
+#define FST_EOMF 0x80
+
+#define IE0_RXRDY 0x01
+#define IE0_TXRDY 0x02
+#define IE0_RXINTB 0x20
+#define IE0_RXINTA 0x40
+#define IE0_TXINT 0x80
+
+#define IE1_IDLD 0x01
+#define IE1_ABTD 0x02
+#define IE1_CDCD 0x04
+#define IE1_CCTS 0x08
+#define IE1_SYNCD 0x10
+#define IE1_CLMD 0x20
+#define IE1_IDL 0x40
+#define IE1_UDRN 0x80
+
+#define IE2_CRCE 0x04
+#define IE2_OVRN 0x08
+#define IE2_RBIT 0x10
+#define IE2_ABT 0x20
+#define IE2_SHRT 0x40
+#define IE2_EOM 0x80
+
+#define IE4_RDNR 0x01
+#define IE4_RDCR 0x02
+#define IE4_TDNR 0x04
+#define IE4_TDCR 0x08
+#define IE4_OCLM 0x20
+#define IE4_CFT 0x40
+#define IE4_CGPI 0x80
+
+#define FIE_CRCEF 0x04
+#define FIE_OVRNF 0x08
+#define FIE_RBIF 0x10
+#define FIE_ABTF 0x20
+#define FIE_SHRTF 0x40
+#define FIE_EOMF 0x80
+
+#define DSR_DWE 0x01
+#define DSR_DE 0x02
+#define DSR_REF 0x04
+#define DSR_UDRF 0x04
+#define DSR_COA 0x08
+#define DSR_COF 0x10
+#define DSR_BOF 0x20
+#define DSR_EOM 0x40
+#define DSR_EOT 0x80
+
+#define DIR_REF 0x04
+#define DIR_UDRF 0x04
+#define DIR_COA 0x08
+#define DIR_COF 0x10
+#define DIR_BOF 0x20
+#define DIR_EOM 0x40
+#define DIR_EOT 0x80
+
+#define DMR_CNTE 0x02
+#define DMR_NF 0x04
+#define DMR_SEOME 0x08
+#define DMR_TMOD 0x10
+
+#define DCR_SW_ABT 0x01
+#define DCR_FCT_CLR 0x02
+
+#define PCR_PR0 0x01
+#define PCR_PR1 0x02
+#define PCR_PR2 0x04
+#define PCR_CCC 0x08
+#define PCR_BRC 0x10
+#define PCR_OSB 0x40
+#define PCR_BURST 0x80
+
+#endif /* (_HD64572_H) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/lapbether.c linux/drivers/net/lapbether.c
--- v2.2.19/drivers/net/lapbether.c Sun Mar 25 17:31:19 2001
+++ linux/drivers/net/lapbether.c Wed Oct 10 01:41:00 2001
@@ -116,7 +116,7 @@
X */
X static int lapbeth_check_devices(struct device *dev)
X {
- struct lapbethdev *lapbeth, *lapbeth_prev;
+ struct lapbethdev *lapbeth, *lapbeth_prev, *lapbeth_next;
X int result = 0;


X unsigned long flags;
X

@@ -125,7 +125,8 @@
X
X lapbeth_prev = NULL;
X
- for (lapbeth = lapbeth_devices; lapbeth != NULL; lapbeth = lapbeth->next) {
+ for (lapbeth = lapbeth_devices; lapbeth != NULL; lapbeth = lapbeth_next) {
+ lapbeth_next = lapbeth->next;
X if (!dev_get(lapbeth->ethname)) {
X if (lapbeth_prev)
X lapbeth_prev->next = lapbeth->next;
@@ -138,8 +139,8 @@
X unregister_netdev(&lapbeth->axdev);
X kfree(lapbeth);
X }
-
- lapbeth_prev = lapbeth;
+ else
+ lapbeth_prev = lapbeth;
X }
X
X restore_flags(flags);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/lmc/lmc_main.c linux/drivers/net/lmc/lmc_main.c
--- v2.2.19/drivers/net/lmc/lmc_main.c Sun Mar 25 17:31:21 2001
+++ linux/drivers/net/lmc/lmc_main.c Wed Oct 10 01:41:00 2001
@@ -488,7 +488,12 @@
X break;
X }
X
- LMC_COPY_FROM_USER(data, xc.data, xc.len);
+ if(copy_from_user(data, xc.data, xc.len))
+ {
+ kfree(data);
+ ret = -ENOMEM;
+ break;
+ }
X
X printk("%s: Starting load of data Len: %d at 0x%p == 0x%p\n", dev->name, xc.len, xc.data, data);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/macmace.c linux/drivers/net/macmace.c
--- v2.2.19/drivers/net/macmace.c Sun Mar 25 17:31:23 2001
+++ linux/drivers/net/macmace.c Wed Oct 10 01:41:00 2001
@@ -607,7 +607,7 @@
X }
X
X /*
- * A transmit error has occured. (We kick the transmit side from
+ * A transmit error has occurred. (We kick the transmit side from
X * the DMA completion)
X */
X
@@ -636,7 +636,7 @@
X }
X
X /*
- * A receive interrupt occured.
+ * A receive interrupt occurred.
X */
X
X static void mace68k_recv_interrupt(struct device *dev)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/net_init.c linux/drivers/net/net_init.c
--- v2.2.19/drivers/net/net_init.c Sun Mar 25 17:31:16 2001
+++ linux/drivers/net/net_init.c Wed Oct 10 01:41:00 2001
@@ -292,8 +292,8 @@
X void ether_setup(struct device *dev)
X {
X int i;
- /* Fill in the fields of the device structure with ethernet-generic values.
- This should be in a common file instead of per-driver. */
+ /* Fill in the fields of the device structure with
+ ethernet-generic values. */
X
X /* register boot-defined "eth" devices */
X if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/ni52.c linux/drivers/net/ni52.c
--- v2.2.19/drivers/net/ni52.c Sun Mar 25 17:31:16 2001
+++ linux/drivers/net/ni52.c Wed Oct 10 01:41:00 2001
@@ -33,20 +33,20 @@
X * I have also done a look in the following sources: (mail me if you need them)
X * crynwr-packet-driver by Russ Nelson
X * Garret A. Wollman's (fourth) i82586-driver for BSD
- * (before getting an i82596 (yes 596 not 586) manual, the existing drivers helped
- * me a lot to understand this tricky chip.)
+ * (before getting an i82596 (yes 596 not 586) manual, the existing drivers
+ * helped me a lot to understand this tricky chip.)
X *
X * Known Problems:
X * The internal sysbus seems to be slow. So we often lose packets because of
X * overruns while receiving from a fast remote host.
- * This can slow down TCP connections. Maybe the newer ni5210 cards are better.
- * my experience is, that if a machine sends with more then about 500-600K/s
- * the fifo/sysbus overflows.
+ * This can slow down TCP connections. Maybe the newer ni5210 cards are
+ * better. My experience is, that if a machine sends with more than
+ * about 500-600K/s the fifo/sysbus overflows.
X *
X * IMPORTANT NOTE:
X * On fast networks, it's a (very) good idea to have 16K shared memory. With
- * 8K, we can store only 4 receive frames, so it can (easily) happen that a remote
- * machine 'overruns' our system.
+ * 8K, we can store only 4 receive frames, so it can (easily) happen that a
+ * remote machine 'overruns' our system.
X *
X * Known i82586/card problems (I'm sure, there are many more!):
X * Running the NOP-mode, the i82586 sometimes seems to forget to report
@@ -60,7 +60,8 @@
X *
X * results from ftp performance tests with Linux 1.2.5
X * send and receive about 350-400 KByte/s (peak up to 460 kbytes/s)
- * sending in NOP-mode: peak performance up to 530K/s (but better don't run this mode)
+ * sending in NOP-mode: peak performance up to 530K/s (but better
+ * don't run this mode)


X */
X
X /*

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/pc300.c linux/drivers/net/pc300.c
--- v2.2.19/drivers/net/pc300.c Sun Mar 25 17:31:23 2001
+++ linux/drivers/net/pc300.c Wed Oct 31 14:08:10 2001
@@ -1,13 +1,13 @@
X #define USE_PCI_CLOCK
X static char rcsid[] =
-"$Revision: 3.1.0.2 $$Date: 2000/06/27 $";
+"Revision: 3.4.2 Date: 2001/10/11 ";
X
X /*
X * pc300.c Cyclades-PC300(tm) Driver.
X *
X * Author: Ivan Passos <iv...@cyclades.com>
X *
- * Copyright: (c) 1999-2000 Cyclades Corp.
+ * Copyright: (c) 1999-2001 Cyclades Corp.
X *
X * This program is free software; you can redistribute it and/or
X * modify it under the terms of the GNU General Public License
@@ -15,6 +15,44 @@
X * 2 of the License, or (at your option) any later version.
X *
X * $Log: pc300.c,v $
+ * Revision 3.2 to 3.12 2001/10/11 20:26:04 daniela
+ * Fixes for noisy lines: return the size of bad frames in
+ * dma_get_rx_frame_size, so that the Rx buffer descriptors can be cleaned by
+ * dma_buf_read (called in cpc_net_rx); improved Rx statistics; created
+ * rx_dma_start routine.
+ * Changed file revision to the package revision, changed T1/E1 master clock
+ * configuration, reviewed boot messages and default configuration.
+ * Included new configuration parameters (line code, CRC calculation and clock)
+ * Changed the header of message trace to include the device name. New format:
+ * "hdlcX[R/T]: ".


+ *
+ * Revision 3.1 2001/06/15 12:41:10 regina
+ * upping major version number
+ *

+ * Revision 1.1.1.1 2001/06/13 20:24:25 daniela


+ * PC300 initial CVS version (3.4.0-pre1)
+ *

+ * Revision 3.1.0.7 2001/06/08 daniela
+ * Did some changes in the DMA programming implementation to avoid the
+ * occurrence of a SCA-II bug when CDA is accessed during a DMA transfer.
+ *
+ * Revision 3.1.0.6 2001/03/02 daniela
+ * Changed SIOCGPC300CONF ioctl, to give hw information to pc300util.
+ *
+ * Revision 3.1.0.5 2001/02/23 daniela
+ * Fixed falc_check_status for Unframed E1.
+ *
+ * Revision 3.1.0.4 2000/12/22 daniela,ivan
+ * Added support for Unframed E1.
+ * Implemented pc300util support: trace, statistics, status and loopback
+ * tests for the PC300 TE boards.
+ * Implemented monitor mode.
+ * Fixed DCD sensitivity on the second channel.
+ *
+ * Revision 3.1.0.3 2000/09/28 daniela,ivan
+ * Implemented DCD sensitivity.
+ * Changed location of pc300.h .
+ *
X * Revision 3.1.0.2 2000/06/27 ivan
X * Previous bugfix for the framing errors with external clock made X21
X * boards stop working. This version fixes it.
@@ -73,7 +111,7 @@
X * Fixed bug in ch_config that would disable interrupts on a previously
X * enabled channel if the other channel on the same board was enabled later.
X *
- * Revision 0.3.0.0 1999/11/16 Daniela Squassoni
+ * Revision 0.3.0.0 1999/11/16 daniela
X * X.25 support.
X *
X * Revision 0.2.3.0 1999/11/15 ivan
@@ -127,16 +165,14 @@
X #include <net/arp.h>


X #include <asm/io.h>
X #include <asm/uaccess.h>

+#include <asm/spinlock.h>
X
X #ifdef CONFIG_PC300_X25
X #include <linux/lapb.h>
X #endif /* CONFIG_PC300_X25 */
X
X #include "syncppp.h"
-
-#include <linux/pc300.h>
-
-#include <asm/spinlock.h>
+#include "pc300.h"
X
X #define CPC_LOCK(card,flags) \
X do { \
@@ -152,6 +188,7 @@
X #undef PC300_DEBUG_INTR
X #undef PC300_DEBUG_TX
X #undef PC300_DEBUG_RX
+#undef PC300_DEBUG_OTHER
X
X /* Hardware configuration options.
X * These are arrays of configuration options used by verification routines.
@@ -312,8 +349,11 @@
X while ((status = cpc_readb(&ptdescr->status)) & DST_OSB) {
X rcvd += cpc_readw(&ptdescr->len);
X first_bd = (first_bd + 1) & (N_DMA_RX_BUF - 1);
- if (status & DST_EOM)
+ if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) {
+ /* Return the size of a good frame or incomplete bad frame
+ * (dma_buf_read will clean the buffer descriptors in this case). */
X return (rcvd);
+ }
X ptdescr = (pcsca_bd_t *)(card->hw.rambase + cpc_readl(&ptdescr->next));
X }
X return (-1);
@@ -374,7 +414,10 @@
X ptdescr = (pcsca_bd_t *)(card->hw.rambase +
X RX_BD_ADDR(ch, chan->rx_first_bd));
X while ((status = cpc_readb(&ptdescr->status)) & DST_OSB) {
- if (status & (DST_OVR | DST_CRC | DST_RBIT | DST_SHRT | DST_ABT)) {
+ nchar = cpc_readw(&ptdescr->len);
+ if ((status & (DST_OVR | DST_CRC | DST_RBIT | DST_SHRT | DST_ABT)) ||
+ (nchar > BD_DEF_LEN)) {
+ if (nchar > BD_DEF_LEN) status |= DST_RBIT;
X rcvd = -status;
X /* Discard remaining descriptors used by the bad frame */
X while(chan->rx_first_bd != chan->rx_last_bd) {
@@ -389,11 +432,13 @@
X }
X break;
X }
- if ((nchar = cpc_readw(&ptdescr->len)) != 0) {
- memcpy_fromio(skb_put(skb, nchar),
- (void *)(card->hw.rambase +
- cpc_readl(&ptdescr->ptbuf)),
- nchar);
+ if (nchar != 0) {
+ if (skb) {
+ memcpy_fromio(skb_put(skb, nchar),
+ (void *)(card->hw.rambase +
+ cpc_readl(&ptdescr->ptbuf)),
+ nchar);
+ }
X rcvd += nchar;
X }
X cpc_writeb(&ptdescr->status, 0);
@@ -439,6 +484,29 @@
X cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit);
X }
X
+void
+rx_dma_start(pc300_t *card, int ch)
+{
+ uclong scabase = card->hw.scabase;
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+
+ /* Start DMA */
+ cpc_writel(scabase + DRX_REG(CDAL, ch),
+ RX_BD_ADDR(ch, chan->rx_first_bd));
+ if (cpc_readl(scabase + DRX_REG(CDAL,ch)) !=
+ RX_BD_ADDR(ch, chan->rx_first_bd)) {
+ cpc_writel(scabase + DRX_REG(CDAL, ch),
+ RX_BD_ADDR(ch, chan->rx_first_bd));
+ }
+ cpc_writel(scabase + DRX_REG(EDAL, ch),
+ RX_BD_ADDR(ch, chan->rx_last_bd));
+ cpc_writew(scabase + DRX_REG(BFLL, ch), BD_DEF_LEN);
+ cpc_writeb(scabase + DSR_RX(ch), DSR_DE);
+ if (!(cpc_readb(scabase + DSR_RX(ch)) & DSR_DE)) {
+ cpc_writeb(scabase + DSR_RX(ch), DSR_DE);
+ }
+}
+
X /*************************/
X /*** FALC Routines ***/
X /*************************/
@@ -475,28 +543,36 @@
X /* Enable SEC and ES interrupts */
X cpc_writeb(falcbase + F_REG(IMR3, ch),
X cpc_readb(falcbase + F_REG(IMR3, ch)) & ~(IMR3_SEC | IMR3_ES));
- cpc_writeb(falcbase + F_REG(IMR4, ch),
- cpc_readb(falcbase + F_REG(IMR4, ch)) &
- ~(IMR4_LFA | IMR4_AIS | IMR4_LOS | IMR4_SLIP));
+ if (conf->fr_mode == PC300_FR_UNFRAMED) {
+ cpc_writeb(falcbase + F_REG(IMR4, ch),
+ cpc_readb(falcbase + F_REG(IMR4, ch)) & ~(IMR4_LOS));
+ } else {
+ cpc_writeb(falcbase + F_REG(IMR4, ch),
+ cpc_readb(falcbase + F_REG(IMR4, ch)) &
+ ~(IMR4_LFA | IMR4_AIS | IMR4_LOS | IMR4_SLIP));
+ }
X if (conf->media == LINE_T1) {
X cpc_writeb(falcbase + F_REG(IMR3, ch),
X cpc_readb(falcbase + F_REG(IMR3, ch)) & ~IMR3_LLBSC);
X } else {
X cpc_writeb(falcbase + F_REG(IPC, ch),
X cpc_readb(falcbase + F_REG(IPC, ch)) | IPC_SCI);
- cpc_writeb(falcbase + F_REG(IMR2, ch),
- cpc_readb(falcbase + F_REG(IMR2, ch)) &
- ~(IMR2_FAR | IMR2_LFA | IMR2_AIS | IMR2_LOS));
- cpc_writeb(falcbase + F_REG(IMR1, ch),
- cpc_readb(falcbase + F_REG(IMR1, ch)) & ~IMR1_LLBSC);
- if (pfalc->multiframe_mode) {
- cpc_writeb(falcbase + F_REG(IMR2, ch),
- cpc_readb(falcbase + F_REG(IMR2, ch)) &
- ~(IMR2_T400MS | IMR2_MFAR));
+ if (conf->fr_mode == PC300_FR_UNFRAMED) {
+ cpc_writeb(falcbase + F_REG(IMR2, ch),
+ cpc_readb(falcbase + F_REG(IMR2, ch)) & ~(IMR2_LOS));
X } else {
- cpc_writeb(falcbase + F_REG(IMR2, ch),
- cpc_readb(falcbase + F_REG(IMR2, ch)) |
- IMR2_T400MS | IMR2_MFAR);
+ cpc_writeb(falcbase + F_REG(IMR2, ch),
+ cpc_readb(falcbase + F_REG(IMR2, ch)) &
+ ~(IMR2_FAR | IMR2_LFA | IMR2_AIS | IMR2_LOS));
+ if (pfalc->multiframe_mode) {
+ cpc_writeb(falcbase + F_REG(IMR2, ch),
+ cpc_readb(falcbase + F_REG(IMR2, ch)) &
+ ~(IMR2_T400MS | IMR2_MFAR));
+ } else {
+ cpc_writeb(falcbase + F_REG(IMR2, ch),
+ cpc_readb(falcbase + F_REG(IMR2, ch)) |
+ IMR2_T400MS | IMR2_MFAR);
+ }
X }
X }
X }
@@ -565,10 +641,15 @@
X pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;
X uclong falcbase = card->hw.falcbase;
X
- /* Timeslot 0 is never enabled */
X cpc_writeb(falcbase + F_REG(ICB1, ch), 0);
- cpc_writeb(falcbase + F_REG(TTR1, ch), 0x7f);
- cpc_writeb(falcbase + F_REG(RTR1, ch), 0x7f);
+ if (conf->fr_mode == PC300_FR_UNFRAMED) {
+ cpc_writeb(falcbase + F_REG(TTR1, ch), 0xff);
+ cpc_writeb(falcbase + F_REG(RTR1, ch), 0xff);
+ } else {
+ /* Timeslot 0 is never enabled */
+ cpc_writeb(falcbase + F_REG(TTR1, ch), 0x7f);
+ cpc_writeb(falcbase + F_REG(RTR1, ch), 0x7f);
+ }
X cpc_writeb(falcbase + F_REG(ICB2, ch), 0);
X cpc_writeb(falcbase + F_REG(TTR2, ch), 0xff);
X cpc_writeb(falcbase + F_REG(RTR2, ch), 0xff);
@@ -617,9 +698,9 @@
X falc_init_timeslot(card, ch);
X }
X // CTS/DCD ON
- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) |
- ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch)));
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) &
+ ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch)));
X }
X
X void
@@ -632,9 +713,9 @@
X falc_close_all_timeslots(card, ch);
X }
X // CTS/DCD OFF
- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) &
- ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch)));
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) |
+ ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch)));
X }
X
X void
@@ -656,7 +737,7 @@
X cpc_writeb(falcbase + F_REG(SIC1, ch), SIC1_XBS0);
X
X /* Clock mode */
- if (conf->clkrate) { /* Master mode */
+ if (conf->clktype == PC300_CLOCK_INT) { /* Master mode */
X cpc_writeb(falcbase + F_REG(LIM0, ch),
X cpc_readb(falcbase + F_REG(LIM0, ch)) | LIM0_MAS);
X } else { /* Slave mode */
@@ -823,7 +904,7 @@
X cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_PMOD);
X
X /* Clock mode */
- if (conf->clkrate) { /* Master mode */
+ if (conf->clktype == PC300_CLOCK_INT) { /* Master mode */
X cpc_writeb(falcbase + F_REG(LIM0, ch),
X cpc_readb(falcbase + F_REG(LIM0, ch)) | LIM0_MAS);
X } else { /* Slave mode */
@@ -831,7 +912,7 @@
X cpc_readb(falcbase + F_REG(LIM0, ch)) & ~LIM0_MAS);
X }
X cpc_writeb(falcbase + F_REG(LOOP, ch),
- cpc_readb(falcbase + F_REG(LOOP, ch)) & ~LOOP_RTM);
+ cpc_readb(falcbase + F_REG(LOOP, ch)) & ~LOOP_SFM);
X
X cpc_writeb(falcbase + F_REG(IPC, ch), IPC_SCI);
X cpc_writeb(falcbase + F_REG(FMR0, ch),
@@ -894,6 +975,19 @@
X cpc_writeb(falcbase + F_REG(XSP, ch),
X cpc_readb(falcbase + F_REG(XSP, ch)) |
X XSP_XS13 | XSP_XS15);
+
+ /* Automatic Force Resynchronization */
+ cpc_writeb(falcbase + F_REG(FMR1, ch),
+ cpc_readb(falcbase + F_REG(FMR1, ch)) | FMR1_AFR);
+
+ /* Transmit Automatic Remote Alarm */
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_AXRA);
+
+ /* Transmit Spare Bits for National Use (Y, Sn, Sa) */
+ cpc_writeb(falcbase + F_REG(XSW, ch),
+ cpc_readb(falcbase + F_REG(XSW, ch)) |
+ XSW_XY0 | XSW_XY1 | XSW_XY2 | XSW_XY3 | XSW_XY4);
X break;
X
X case PC300_FR_MF_NON_CRC4:
@@ -902,23 +996,53 @@
X cpc_writeb(falcbase + F_REG(FMR1, ch),
X cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_XFS);
X cpc_writeb(falcbase + F_REG(FMR2, ch),
- cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_RFS1);
- cpc_writeb(falcbase + F_REG(FMR2, ch),
- cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_RFS0);
+ cpc_readb(falcbase + F_REG(FMR2, ch)) &
+ ~(FMR2_RFS1|FMR2_RFS0));
X cpc_writeb(falcbase + F_REG(XSW, ch),
X cpc_readb(falcbase + F_REG(XSW, ch)) | XSW_XSIS);
X cpc_writeb(falcbase + F_REG(XSP, ch),
X cpc_readb(falcbase + F_REG(XSP, ch)) | XSP_XSIF);
- break;
- }
X
- /* Automatic Force Resynchronization */
- cpc_writeb(falcbase + F_REG(FMR1, ch),
- cpc_readb(falcbase + F_REG(FMR1, ch)) | FMR1_AFR);
+ /* Automatic Force Resynchronization */
+ cpc_writeb(falcbase + F_REG(FMR1, ch),
+ cpc_readb(falcbase + F_REG(FMR1, ch)) | FMR1_AFR);
X
- /* Transmit Automatic Remote Alarm */
- cpc_writeb(falcbase + F_REG(FMR2, ch),
- cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_AXRA);
+ /* Transmit Automatic Remote Alarm */
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_AXRA);
+
+ /* Transmit Spare Bits for National Use (Y, Sn, Sa) */
+ cpc_writeb(falcbase + F_REG(XSW, ch),
+ cpc_readb(falcbase + F_REG(XSW, ch)) |
+ XSW_XY0 | XSW_XY1 | XSW_XY2 | XSW_XY3 | XSW_XY4);
+ break;
+
+ case PC300_FR_UNFRAMED:
+ pfalc->multiframe_mode = 0;
+ cpc_writeb(falcbase + F_REG(FMR1, ch),
+ cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_XFS);
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) &
+ ~(FMR2_RFS1|FMR2_RFS0));
+ cpc_writeb(falcbase + F_REG(XSP, ch),
+ cpc_readb(falcbase + F_REG(XSP, ch)) | XSP_TT0);
+ cpc_writeb(falcbase + F_REG(XSW, ch),
+ cpc_readb(falcbase + F_REG(XSW, ch)) &
+ ~(XSW_XTM|XSW_XY0|XSW_XY1|XSW_XY2|XSW_XY3|XSW_XY4));
+ cpc_writeb(falcbase + F_REG(TSWM, ch), 0xff);
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) |
+ (FMR2_RTM|FMR2_DAIS));
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_AXRA);
+ cpc_writeb(falcbase + F_REG(FMR1, ch),
+ cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_AFR);
+ pfalc->sync = 1;
+ cpc_writeb(falcbase + card->hw.cpld_reg2,
+ cpc_readb(falcbase + card->hw.cpld_reg2) |
+ (CPLD_REG2_FALC_LED2 << (2*ch)));
+ break;
+ }
X
X /* No signaling */
X cpc_writeb(falcbase + F_REG(XSP, ch),
@@ -944,11 +1068,6 @@
X /* LOS Recovery after 22 ones in the time window of PCD */
X cpc_writeb(falcbase + F_REG(PCRR, ch), 0x15);
X
- /* Transmit Spare Bits for National Use (Y-Bits, Sn-Bits, Sa-Bits) */
- cpc_writeb(falcbase + F_REG(XSW, ch),
- cpc_readb(falcbase + F_REG(XSW, ch)) |
- XSW_XY0 | XSW_XY1 | XSW_XY2 | XSW_XY3 | XSW_XY4);
-
X cpc_writeb(falcbase + F_REG(IDLE, ch), 0x7f);
X
X falc_close_all_timeslots(card, ch);
@@ -958,14 +1077,21 @@
X falc_init_hdlc(pc300_t *card, int ch)
X {
X uclong falcbase = card->hw.falcbase;
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;
X
X /* Enable transparent data transfer */
- cpc_writeb(falcbase + F_REG(MODE, ch),
- cpc_readb(falcbase + F_REG(MODE, ch)) | MODE_HRAC | MODE_MDS2);
- cpc_writeb(falcbase + F_REG(RAH2, ch), 0xff);
- cpc_writeb(falcbase + F_REG(RAH1, ch), 0xff);
- cpc_writeb(falcbase + F_REG(RAL2, ch), 0xff);
- cpc_writeb(falcbase + F_REG(RAL1, ch), 0xff);
+ if (conf->fr_mode == PC300_FR_UNFRAMED) {
+ cpc_writeb(falcbase + F_REG(MODE, ch), 0);
+ } else {
+ cpc_writeb(falcbase + F_REG(MODE, ch),
+ cpc_readb(falcbase + F_REG(MODE, ch)) |
+ (MODE_HRAC|MODE_MDS2));
+ cpc_writeb(falcbase + F_REG(RAH2, ch), 0xff);
+ cpc_writeb(falcbase + F_REG(RAH1, ch), 0xff);
+ cpc_writeb(falcbase + F_REG(RAL2, ch), 0xff);
+ cpc_writeb(falcbase + F_REG(RAL1, ch), 0xff);
+ }
X
X /* Tx/Rx reset */
X falc_issue_cmd(card, ch, CMDR_RRES | CMDR_XRES | CMDR_SRES);
@@ -1002,12 +1128,12 @@
X
X CPC_LOCK(card, flags);
X /* Reset the FALC chip */
- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) |
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) |
X (CPLD_REG1_FALC_RESET << (2*ch)));
X udelay(10000);
- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) &
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) &
X ~(CPLD_REG1_FALC_RESET << (2*ch)));
X
X if (conf->media == LINE_T1) {
@@ -1023,8 +1149,8 @@
X cpc_writeb(falcbase + F_REG(LIM0, ch),
X cpc_readb(falcbase + F_REG(LIM0, ch)) | LIM0_EQON);
X }
- cpc_writeb(card->hw.falcbase + CPLD_REG2,
- cpc_readb(card->hw.falcbase + CPLD_REG2) |
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) |
X ((CPLD_REG2_FALC_TX_CLK | CPLD_REG2_FALC_RX_CLK) << (2*ch)));
X
X /* Clear all interrupt registers */
@@ -1043,132 +1169,138 @@
X falc_t *pfalc = (falc_t *)&chan->falc;
X uclong falcbase = card->hw.falcbase;
X
- /* Verify AIS alarm */
- if (frs0 & FRS0_AIS) {
- if (!pfalc->blue_alarm) {
- pfalc->blue_alarm = 1;
- pfalc->ais++;
- // EVENT_AIS
- if (conf->media == LINE_T1) {
- /* Disable this interrupt as it may otherwise interfere with
- other working boards. */
- cpc_writeb(falcbase + F_REG(IMR0, ch),
- cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN);
- }
- falc_disable_comm(card, ch);
- // EVENT_AIS
- }
- } else {
- pfalc->blue_alarm = 0;
- }
-
- /* Verify LOS */
- if (frs0 & FRS0_LOS) {
- if (! pfalc->red_alarm) {
- pfalc->red_alarm = 1;
- pfalc->los++;
+ if (conf->fr_mode != PC300_FR_UNFRAMED) {
+ /* Verify AIS alarm */
+ if (frs0 & FRS0_AIS) {
X if (!pfalc->blue_alarm) {
- // EVENT_FALC_ABNORMAL
+ pfalc->blue_alarm = 1;
+ pfalc->ais++;
+ // EVENT_AIS
X if (conf->media == LINE_T1) {
- /* Disable this interrupt as it may otherwise interfere
- with other working boards. */
+ /* Disable this interrupt as it may otherwise interfere with
+ other working boards. */
X cpc_writeb(falcbase + F_REG(IMR0, ch),
- cpc_readb(falcbase + F_REG(IMR0, ch)) |
+ cpc_readb(falcbase + F_REG(IMR0, ch)) |
X IMR0_PDEN);
X }
X falc_disable_comm(card, ch);
- // EVENT_FALC_ABNORMAL
+ // EVENT_AIS
X }
- }
- } else {
- if (pfalc->red_alarm) {
- pfalc->red_alarm = 0;
- pfalc->losr++;
- }
- }
+ } else {
+ pfalc->blue_alarm = 0;
+ }
X
- /* Verify LFA */
- if (frs0 & FRS0_LFA) {
- if (!pfalc->loss_fa) {
- pfalc->loss_fa = 1;
- pfalc->lfa++;
- if (!pfalc->blue_alarm && !pfalc->red_alarm) {
- // EVENT_FALC_ABNORMAL
- if (conf->media == LINE_T1) {
- /* Disable this interrupt as it may otherwise interfere
- with other working boards. */
- cpc_writeb(falcbase + F_REG(IMR0, ch),
- cpc_readb(falcbase + F_REG(IMR0, ch)) |
- IMR0_PDEN);
+ /* Verify LOS */
+ if (frs0 & FRS0_LOS) {
+ if (!pfalc->red_alarm) {
+ pfalc->red_alarm = 1;
+ pfalc->los++;
+ if (!pfalc->blue_alarm) {
+ // EVENT_FALC_ABNORMAL
+ if (conf->media == LINE_T1) {
+ /* Disable this interrupt as it may otherwise interfere
+ with other working boards. */
+ cpc_writeb(falcbase + F_REG(IMR0, ch),
+ cpc_readb(falcbase + F_REG(IMR0, ch)) |
+ IMR0_PDEN);
+ }
+ falc_disable_comm(card, ch);
+ // EVENT_FALC_ABNORMAL
X }
- falc_disable_comm(card, ch);
- // EVENT_FALC_ABNORMAL
+ }
+ } else {
+ if (pfalc->red_alarm) {
+ pfalc->red_alarm = 0;
+ pfalc->losr++;
X }
X }
- } else {
- if (pfalc->loss_fa) {
- pfalc->loss_fa = 0;
- pfalc->farec++;
+
+ /* Verify LFA */
+ if (frs0 & FRS0_LFA) {
+ if (!pfalc->loss_fa) {
+ pfalc->loss_fa = 1;
+ pfalc->lfa++;
+ if (!pfalc->blue_alarm && !pfalc->red_alarm) {
+ // EVENT_FALC_ABNORMAL
+ if (conf->media == LINE_T1) {
+ /* Disable this interrupt as it may otherwise
+ interfere with other working boards. */
+ cpc_writeb(falcbase + F_REG(IMR0, ch),
+ cpc_readb(falcbase + F_REG(IMR0, ch)) |
+ IMR0_PDEN);
+ }
+ falc_disable_comm(card, ch);
+ // EVENT_FALC_ABNORMAL
+ }
+ }
+ } else {
+ if (pfalc->loss_fa) {
+ pfalc->loss_fa = 0;
+ pfalc->farec++;
+ }
X }
- }
X
- /* Verify LMFA */
- if ((pfalc->multiframe_mode) && (frs0 & FRS0_LMFA)) {
- /* D4 or CRC4 frame mode */
- if (! pfalc->loss_mfa) {
- pfalc->loss_mfa = 1;
- pfalc->lmfa++;
- if (!pfalc->blue_alarm && !pfalc->red_alarm && !pfalc->loss_fa) {
- // EVENT_FALC_ABNORMAL
- if (conf->media == LINE_T1) {
- /* Disable this interrupt as it may otherwise interfere
- with other working boards. */
- cpc_writeb(falcbase + F_REG(IMR0, ch),
- cpc_readb(falcbase + F_REG(IMR0, ch)) |
- IMR0_PDEN);
+ /* Verify LMFA */
+ if (pfalc->multiframe_mode && (frs0 & FRS0_LMFA)) {
+ /* D4 or CRC4 frame mode */
+ if (!pfalc->loss_mfa) {
+ pfalc->loss_mfa = 1;
+ pfalc->lmfa++;
+ if (!pfalc->blue_alarm && !pfalc->red_alarm &&
+ !pfalc->loss_fa) {
+ // EVENT_FALC_ABNORMAL
+ if (conf->media == LINE_T1) {
+ /* Disable this interrupt as it may otherwise
+ interfere with other working boards. */
+ cpc_writeb(falcbase + F_REG(IMR0, ch),
+ cpc_readb(falcbase + F_REG(IMR0, ch)) |
+ IMR0_PDEN);
+ }
+ falc_disable_comm(card, ch);
+ // EVENT_FALC_ABNORMAL
X }
- falc_disable_comm(card, ch);
- // EVENT_FALC_ABNORMAL
X }
+ } else {
+ pfalc->loss_mfa = 0;
X }
- } else {
- pfalc->loss_mfa = 0;
- }
X
- if (pfalc->red_alarm || pfalc->loss_fa ||
- pfalc->loss_mfa || pfalc->blue_alarm) {
- if (pfalc->sync) {
- pfalc->sync = 0;
- cpc_writeb(falcbase + CPLD_REG2,
- cpc_readb(falcbase + CPLD_REG2) &
- ~(CPLD_REG2_FALC_LED2 << (2*ch)));
- }
- } else {
- if ((!pfalc->sync)) {
- pfalc->sync = 1;
- cpc_writeb(falcbase + CPLD_REG2,
- cpc_readb(falcbase + CPLD_REG2) |
- (CPLD_REG2_FALC_LED2 << (2*ch)));
+ if (pfalc->red_alarm || pfalc->loss_fa ||
+ pfalc->loss_mfa || pfalc->blue_alarm) {
+ if (pfalc->sync) {
+ pfalc->sync = 0;
+ chan->d.line_off++;
+ cpc_writeb(falcbase + card->hw.cpld_reg2,
+ cpc_readb(falcbase + card->hw.cpld_reg2) &
+ ~(CPLD_REG2_FALC_LED2 << (2*ch)));
+ }
+ } else {
+ if (!pfalc->sync) {
+ pfalc->sync = 1;
+ chan->d.line_on++;
+ cpc_writeb(falcbase + card->hw.cpld_reg2,
+ cpc_readb(falcbase + card->hw.cpld_reg2) |
+ (CPLD_REG2_FALC_LED2 << (2*ch)));
+ }
X }
- }
X
- /* Verify Remote Alarm */
- if (frs0 & FRS0_RRA) {
- if (! pfalc->yellow_alarm) {
- pfalc->yellow_alarm = 1;
- pfalc->rai++;
- if (pfalc->sync) {
- // EVENT_RAI
- falc_disable_comm(card, ch);
- // EVENT_RAI
+ /* Verify Remote Alarm */
+ if (frs0 & FRS0_RRA) {
+ if (!pfalc->yellow_alarm) {
+ pfalc->yellow_alarm = 1;
+ pfalc->rai++;
+ if (pfalc->sync) {
+ // EVENT_RAI
+ falc_disable_comm(card, ch);
+ // EVENT_RAI
+ }
X }
+ } else {
+ pfalc->yellow_alarm = 0;
X }
- } else {
- pfalc->yellow_alarm = 0;
- }
+ } /* if !PC300_UNFRAMED */
X
- if ((pfalc->sync) && (!(pfalc->yellow_alarm))) {
- if (! pfalc->active) {
+ if (pfalc->sync && !pfalc->yellow_alarm) {
+ if (!pfalc->active) {
X // EVENT_FALC_NORMAL
X if (pfalc->loop_active) {
X return;
@@ -1214,6 +1346,7 @@
X pfalc->ebc += counter;
X
X if (cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_EPRM) {
+ mdelay (10);
X counter = cpc_readb(falcbase + F_REG(BECL, ch));
X counter |= cpc_readb(falcbase + F_REG(BECH, ch)) << 8;
X pfalc->bec += counter;
@@ -1231,6 +1364,16 @@
X }
X }
X
+/*----------------------------------------------------------------------------
+ * falc_remote_loop
+ *----------------------------------------------------------------------------
+ * Description: In the remote loopback mode the clock and data recovered
+ * from the line inputs RL1/2 or RDIP/RDIN are routed back
+ * to the line outputs XL1/2 or XDOP/XDON via the analog
+ * transmitter. As in normal mode they are processsed by
+ * the synchronizer and then sent to the system interface.
+ *----------------------------------------------------------------------------
+ */
X void
X falc_remote_loop(pc300_t *card, int ch, int loop_on)
X {
@@ -1256,8 +1399,98 @@
X cpc_writeb(falcbase + F_REG(LIM1, ch),
X cpc_readb(falcbase + F_REG(LIM1, ch)) & ~LIM1_RL);
X pfalc->sync = 0;
- cpc_writeb(falcbase + CPLD_REG2,
- cpc_readb(falcbase + CPLD_REG2) &
+ cpc_writeb(falcbase + card->hw.cpld_reg2,
+ cpc_readb(falcbase + card->hw.cpld_reg2) &
+ ~(CPLD_REG2_FALC_LED2 << (2*ch)));
+ pfalc->active = 0;
+ falc_issue_cmd(card, ch, CMDR_XRES);
+ pfalc->loop_active = 0;
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * falc_local_loop
+ *----------------------------------------------------------------------------
+ * Description: The local loopback mode disconnects the receive lines
+ * RL1/RL2 resp. RDIP/RDIN from the receiver. Instead of the
+ * signals coming from the line the data provided by system
+ * interface are routed through the analog receiver back to
+ * the system interface. The unipolar bit stream will be
+ * undisturbed transmitted on the line. Receiver and transmitter
+ * coding must be identical.
+ *----------------------------------------------------------------------------
+ */
+void
+falc_local_loop(pc300_t *card, int ch, int loop_on)
+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ falc_t *pfalc = (falc_t *)&chan->falc;
+ uclong falcbase = card->hw.falcbase;
+
+ if (loop_on) {
+ cpc_writeb(falcbase + F_REG(LIM0, ch),
+ cpc_readb(falcbase + F_REG(LIM0, ch)) | LIM0_LL);
+ pfalc->loop_active = 1;
+ }
+ else {
+ cpc_writeb(falcbase + F_REG(LIM0, ch),
+ cpc_readb(falcbase + F_REG(LIM0, ch)) & ~LIM0_LL);
+ pfalc->loop_active = 0;
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * falc_payload_loop
+ *----------------------------------------------------------------------------
+ * Description: This routine allows to enable/disable payload loopback.
+ * When the payload loop is activated, the received 192 bits
+ * of payload data will be looped back to the transmit
+ * direction. The framing bits, CRC6 and DL bits are not
+ * looped. They are originated by the FALC-LH transmitter.
+ *----------------------------------------------------------------------------
+ */
+void
+falc_payload_loop(pc300_t *card, int ch, int loop_on)
+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;
+ falc_t *pfalc = (falc_t *)&chan->falc;
+ uclong falcbase = card->hw.falcbase;
+
+ if (loop_on) {
+ // EVENT_FALC_ABNORMAL
+ if (conf->media == LINE_T1) {
+ /* Disable this interrupt as it may otherwise interfere with
+ other working boards. */
+ cpc_writeb(falcbase + F_REG(IMR0, ch),
+ cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN);
+ }
+ falc_disable_comm(card, ch);
+ // EVENT_FALC_ABNORMAL
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_PLB);
+ if (conf->media == LINE_T1) {
+ cpc_writeb(falcbase + F_REG(FMR4, ch),
+ cpc_readb(falcbase + F_REG(FMR4, ch)) | FMR4_TM);
+ } else {
+ cpc_writeb(falcbase + F_REG(FMR5, ch),
+ cpc_readb(falcbase + F_REG(FMR5, ch)) | XSP_TT0);
+ }
+ falc_open_all_timeslots(card, ch);
+ pfalc->loop_active = 2;
+ } else {
+ cpc_writeb(falcbase + F_REG(FMR2, ch),
+ cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_PLB);
+ if (conf->media == LINE_T1) {
+ cpc_writeb(falcbase + F_REG(FMR4, ch),
+ cpc_readb(falcbase + F_REG(FMR4, ch)) & ~FMR4_TM);
+ } else {
+ cpc_writeb(falcbase + F_REG(FMR5, ch),
+ cpc_readb(falcbase + F_REG(FMR5, ch)) & ~XSP_TT0);
+ }
+ pfalc->sync = 0;
+ cpc_writeb(falcbase + card->hw.cpld_reg2,
+ cpc_readb(falcbase + card->hw.cpld_reg2) &
X ~(CPLD_REG2_FALC_LED2 << (2*ch)));
X pfalc->active = 0;
X falc_issue_cmd(card, ch, CMDR_XRES);
@@ -1265,15 +1498,217 @@
X }
X }
X
+/*----------------------------------------------------------------------------
+ * turn_off_xlu
+ *----------------------------------------------------------------------------
+ * Description: Turns XLU bit off in the proper register
+ *----------------------------------------------------------------------------
+ */
+void
+turn_off_xlu(pc300_t *card, int ch)
+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;
+ uclong falcbase = card->hw.falcbase;
+
+ if (conf->media == LINE_T1) {
+ cpc_writeb(falcbase + F_REG(FMR5, ch),
+ cpc_readb(falcbase + F_REG(FMR5, ch)) & ~FMR5_XLU);
+ } else {
+ cpc_writeb(falcbase + F_REG(FMR3, ch),
+ cpc_readb(falcbase + F_REG(FMR3, ch)) & ~FMR3_XLU);
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * turn_off_xld
+ *----------------------------------------------------------------------------
+ * Description: Turns XLD bit off in the proper register
+ *----------------------------------------------------------------------------
+ */
+void
+turn_off_xld (pc300_t *card, int ch)
+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;
+ uclong falcbase = card->hw.falcbase;
+
+ if (conf->media == LINE_T1) {
+ cpc_writeb(falcbase + F_REG(FMR5, ch),
+ cpc_readb(falcbase + F_REG(FMR5, ch)) & ~FMR5_XLD);
+ } else {
+ cpc_writeb(falcbase + F_REG(FMR3, ch),
+ cpc_readb(falcbase + F_REG(FMR3, ch)) & ~FMR3_XLD);
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * falc_generate_loop_up_code
+ *----------------------------------------------------------------------------
+ * Description: This routine writes the proper FALC chip register in order
+ * to generate a LOOP activation code over a T1/E1 line.
+ *----------------------------------------------------------------------------
+ */
+void
+falc_generate_loop_up_code (pc300_t *card, int ch)
+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 23'
echo 'File patch-2.2.20 is continued in part 24'
echo "24" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:31 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part32

#!/bin/sh -x
# this is part 32 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 32; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X * the data.
+ * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
X */
X
X int SkPnmiGetStruct(
X SK_AC *pAC, /* Pointer to adapter context */
X SK_IOC IoC, /* IO context handle */
X void *pBuf, /* Buffer which will store the retrieved data */
-unsigned int *pLen) /* Length of buffer */
+unsigned int *pLen, /* Length of buffer */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X int Ret;
X unsigned int TableIndex;
@@ -1703,11 +1786,12 @@
X unsigned int InstanceCnt;
X SK_U32 Instance;
X unsigned int TmpLen;
- char KeyArr[SK_PNMI_VPD_ARR_SIZE][SK_PNMI_VPD_STR_SIZE];
+ char KeyArr[SK_PNMI_VPD_ENTRIES][SK_PNMI_VPD_KEY_SIZE];
+
X
-
X SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
- ("PNMI: SkPnmiGetStruct: Called, BufLen=%d\n", *pLen));
+ ("PNMI: SkPnmiGetStruct: Called, BufLen=%d, NetIndex=%d\n",
+ *pLen, NetIndex));
X
X if (*pLen < SK_PNMI_STRUCT_SIZE) {
X
@@ -1721,6 +1805,13 @@
X return (SK_PNMI_ERR_TOO_SHORT);
X }
X
+ /*
+ * Check NetIndex
+ */
+ if (NetIndex >= pAC->Rlmt.NumNets) {
+ return (SK_PNMI_ERR_UNKNOWN_NET);
+ }
+
X /* Update statistic */
X SK_PNMI_CHECKFLAGS("SkPnmiGetStruct: On call");
X
@@ -1732,7 +1823,7 @@
X return (Ret);
X }
X
- if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
+ if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
X
X SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
X *pLen = SK_PNMI_MIN_STRUCT_SIZE;
@@ -1774,7 +1865,6 @@
X TableIndex ++) {
X
X InstanceNo = IdTable[TableIndex].InstanceNo;
-
X for (InstanceCnt = 1; InstanceCnt <= InstanceNo;
X InstanceCnt ++) {
X
@@ -1792,8 +1882,7 @@
X IdTable[TableIndex].Id == OID_SKGE_VPD_ACCESS ||
X IdTable[TableIndex].Id == OID_SKGE_VPD_ACTION) {
X
- SK_PNMI_READ_U32(KeyArr[InstanceCnt - 1],
- Instance);
+ SK_STRNCPY((char *)&Instance, KeyArr[InstanceCnt - 1], 4);
X }
X else {
X Instance = (SK_U32)InstanceCnt;
@@ -1802,7 +1891,7 @@
X TmpLen = *pLen - DstOffset;
X Ret = IdTable[TableIndex].Func(pAC, IoC, SK_PNMI_GET,
X IdTable[TableIndex].Id, (char *)pBuf +
- DstOffset, &TmpLen, Instance, TableIndex);
+ DstOffset, &TmpLen, Instance, TableIndex, NetIndex);
X
X /*
X * An unknown instance error means that we reached
@@ -1812,7 +1901,7 @@
X */
X if (Ret == SK_PNMI_ERR_UNKNOWN_INST) {
X
- break;
+ break;
X }
X
X if (Ret != SK_PNMI_ERR_OK) {
@@ -1855,7 +1944,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -1867,12 +1956,15 @@
X SK_AC *pAC, /* Pointer to adapter context */
X SK_IOC IoC, /* IO context handle */
X void *pBuf, /* Buffer which contains the data to be set */
-unsigned int *pLen) /* Length of buffer */
+unsigned int *pLen, /* Length of buffer */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
- ("PNMI: SkPnmiPreSetStruct: Called, BufLen=%d\n", *pLen));
+ ("PNMI: SkPnmiPreSetStruct: Called, BufLen=%d, NetIndex=%d\n",
+ *pLen, NetIndex));
X
- return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf, pLen));
+ return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf,
+ pLen, NetIndex));
X }
X
X /*****************************************************************************
@@ -1891,7 +1983,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -1903,12 +1995,15 @@
X SK_AC *pAC, /* Pointer to adapter context */
X SK_IOC IoC, /* IO context handle */
X void *pBuf, /* Buffer which contains the data to be set */
-unsigned int *pLen) /* Length of buffer */
+unsigned int *pLen, /* Length of buffer */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
- ("PNMI: SkPnmiSetStruct: Called, BufLen=%d\n", *pLen));
+ ("PNMI: SkPnmiSetStruct: Called, BufLen=%d, NetIndex=%d\n",
+ *pLen, NetIndex));
X
- return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf, pLen));
+ return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf,
+ pLen, NetIndex));
X }
X
X /*****************************************************************************
@@ -1943,11 +2038,6 @@
X * SK_PNMI_EVT_RLMT_PORT_DOWN Generated by RLMT to notify that a port
X * went logically down. A trap message will
X * be stored to the trap buffer.
- * SK_PNMI_EVT_RLMT_PORT_SWITCH Generated by RLMT to notify that the
- * active port switched. PNMI will split
- * this into two message ACTIVE_DOWN and
- * ACTIVE_UP to be future compatible with
- * load balancing and card fail over.
X * SK_PNMI_EVT_RLMT_SEGMENTATION Generated by RLMT to notify that two
X * spanning tree root bridges were
X * detected. A trap message will be stored
@@ -1959,6 +2049,9 @@
X * is now an active port. PNMI will now
X * add the statistic data of this port to
X * the virtual port.
+ * SK_PNMI_EVT_RLMT_SET_NETS Notifies PNMI about the net mode. The first Parameter
+ * contains the number of nets. 1 means single net, 2 means
+ * dual net. The second Parameter is -1
X *
X * Returns:
X * Always 0
@@ -1971,6 +2064,7 @@
X SK_EVPARA Param) /* Event dependent parameter */
X {
X unsigned int PhysPortIndex;
+ unsigned int MaxNetNumber;
X int CounterIndex;
X int Ret;
X SK_U16 MacStatus;
@@ -1984,6 +2078,7 @@
X SK_U64 OldestValue;
X SK_U64 Delta;
X SK_PNMI_ESTIMATE *pEst;
+ SK_U32 NetIndex;
X
X
X #ifdef DEBUG
@@ -2082,8 +2177,13 @@
X case SK_PNMI_HRX_OCTETLOW:
X case SK_PNMI_HRX_IRLENGTH:
X case SK_PNMI_HRX_RESERVED22:
+
+ /*
+ * the following counters aren't be handled (id > 63)
+ */
X case SK_PNMI_HTX_SYNC:
X case SK_PNMI_HTX_SYNC_OCTET:
+ case SK_PNMI_HRX_LONGFRAMES:


X break;
X
X default:

@@ -2241,9 +2341,27 @@
X
X case SK_PNMI_EVT_CLEAR_COUNTER:
X /*
+ * Param.Para32[0] contains the NetIndex (0 ..1).
+ * Param.Para32[1] is reserved, contains -1.
+ */
+ NetIndex = (SK_U32)Param.Para32[0];
+
+#ifdef DEBUG
+ if (NetIndex >= pAC->Rlmt.NumNets) {
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
+ ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_CLEAR_COUNTER parameter wrong, NetIndex=%d\n",
+ NetIndex));
+
+ return (0);
+ }
+#endif
+
+ /*
X * Set all counters and timestamps to zero
X */
- ResetCounter(pAC, IoC);
+ ResetCounter(pAC, IoC, NetIndex); /* the according NetIndex is required
+ as a Parameter of the Event */
X break;
X
X case SK_PNMI_EVT_XMAC_RESET:
@@ -2278,7 +2396,7 @@
X */
X pAC->Pnmi.MacUpdatedFlag ++;
X
- for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX;
+ for (CounterIndex = 0; CounterIndex < SK_PNMI_SCNT_NOT;
X CounterIndex ++) {
X
X if (!StatAddress[CounterIndex].GetOffset) {
@@ -2308,9 +2426,8 @@
X }
X #endif
X /*
- * Store a trap message in the trap buffer and generate
- * an event for user space applications with the
- * SK_DRIVER_SENDEVENT macro.
+ * Store a trap message in the trap buffer and generate an event for
+ * user space applications with the SK_DRIVER_SENDEVENT macro.
X */
X QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_UP,
X (unsigned int)Param.Para32[0]);
@@ -2329,9 +2446,8 @@
X }
X #endif
X /*
- * Store a trap message in the trap buffer and generate
- * an event for user space applications with the
- * SK_DRIVER_SENDEVENT macro.
+ * Store a trap message in the trap buffer and generate an event for
+ * user space applications with the SK_DRIVER_SENDEVENT macro.
X */
X QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_DOWN,
X (unsigned int)Param.Para32[0]);
@@ -2340,6 +2456,7 @@
X
X case SK_PNMI_EVT_RLMT_ACTIVE_DOWN:
X PhysPortIndex = (unsigned int)Param.Para32[0];
+ NetIndex = (SK_U32)Param.Para32[1];
X #ifdef DEBUG
X if (PhysPortIndex >= SK_MAX_MACS) {
X
@@ -2347,8 +2464,23 @@
X ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_DOWN parameter too high, PhysPort=%d\n",
X PhysPortIndex));
X }
+
+ if (NetIndex >= pAC->Rlmt.NumNets) {
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
+ ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_DOWN parameter too high, NetIndex=%d\n",
+ NetIndex));
+ }
X #endif
X /*
+ * For now, ignore event if NetIndex != 0.
+ */
+ if (Param.Para32[1] != 0) {
+
+ return (0);
+ }
+
+ /*
X * Nothing to do if port is already inactive
X */
X if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
@@ -2357,9 +2489,9 @@
X }
X
X /*
- * Update statistic counters to calculate new offset
- * for the virtual port and increment semaphore to
- * indicate that an update was already done.
+ * Update statistic counters to calculate new offset for the virtual
+ * port and increment semaphore to indicate that an update was already
+ * done.
X */
X if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) !=
X SK_PNMI_ERR_OK) {
@@ -2370,13 +2502,12 @@
X pAC->Pnmi.MacUpdatedFlag ++;
X
X /*
- * Calculate new counter offset for virtual port to
- * grant continous counting on port switches. The virtual
- * port consists of all currently active ports. The port
- * down event indicates that a port is removed fromt the
- * virtual port. Therefore add the counter value of the
- * removed port to the CounterOffset for the virtual port
- * to grant the same counter value.
+ * Calculate new counter offset for virtual port to grant continous
+ * counting on port switches. The virtual port consists of all currently
+ * active ports. The port down event indicates that a port is removed
+ * from the virtual port. Therefore add the counter value of the removed
+ * port to the CounterOffset for the virtual port to grant the same
+ * counter value.
X */
X for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX;
X CounterIndex ++) {
@@ -2386,8 +2517,7 @@
X continue;
X }
X
- Value = GetPhysStatVal(pAC, IoC, PhysPortIndex,
- CounterIndex);
+ Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex);
X
X pAC->Pnmi.VirtualCounterOffset[CounterIndex] += Value;
X }


@@ -2402,6 +2532,7 @@
X

X case SK_PNMI_EVT_RLMT_ACTIVE_UP:
X PhysPortIndex = (unsigned int)Param.Para32[0];
+ NetIndex = (SK_U32)Param.Para32[1];
X #ifdef DEBUG
X if (PhysPortIndex >= SK_MAX_MACS) {
X
@@ -2409,8 +2540,23 @@
X ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_UP parameter too high, PhysPort=%d\n",
X PhysPortIndex));
X }
+
+ if (NetIndex >= pAC->Rlmt.NumNets) {
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
+ ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_UP parameter too high, NetIndex=%d\n",
+ NetIndex));
+ }
X #endif
X /*
+ * For now, ignore event if NetIndex != 0.
+ */
+ if (Param.Para32[1] != 0) {
+
+ return (0);
+ }
+
+ /*
X * Nothing to do if port is already active
X */
X if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
@@ -2419,24 +2565,22 @@
X }
X
X /*
- * Statistic maintanence
+ * Statistic maintenance
X */
X pAC->Pnmi.RlmtChangeCts ++;
- pAC->Pnmi.RlmtChangeTime =
- SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC));
+ pAC->Pnmi.RlmtChangeTime = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC));
X
X /*
- * Store a trap message in the trap buffer and generate
- * an event for user space applications with the
- * SK_DRIVER_SENDEVENT macro.
+ * Store a trap message in the trap buffer and generate an event for
+ * user space applications with the SK_DRIVER_SENDEVENT macro.
X */
X QueueRlmtNewMacTrap(pAC, PhysPortIndex);
X (void)SK_DRIVER_SENDEVENT(pAC, IoC);
X
X /*
- * Update statistic counters to calculate new offset
- * for the virtual port and increment semaphore to indicate
- * that an update was already done.
+ * Update statistic counters to calculate new offset for the virtual
+ * port and increment semaphore to indicate that an update was
+ * already done.
X */
X if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) !=
X SK_PNMI_ERR_OK) {
@@ -2447,11 +2591,10 @@
X pAC->Pnmi.MacUpdatedFlag ++;
X
X /*
- * Calculate new counter offset for virtual port to
- * grant continous counting on port switches. A new port
- * is added to the virtual port. Therefore substract the
- * counter value of the new port from the CounterOffset
- * for the virtual port to grant the same value.
+ * Calculate new counter offset for virtual port to grant continous
+ * counting on port switches. A new port is added to the virtual port.
+ * Therefore substract the counter value of the new port from the
+ * CounterOffset for the virtual port to grant the same value.
X */
X for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX;
X CounterIndex ++) {
@@ -2461,8 +2604,7 @@
X continue;
X }
X
- Value = GetPhysStatVal(pAC, IoC, PhysPortIndex,
- CounterIndex);
+ Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex);
X
X pAC->Pnmi.VirtualCounterOffset[CounterIndex] -= Value;
X }
@@ -2475,40 +2617,41 @@
X pAC->Pnmi.MacUpdatedFlag --;
X break;
X
- case SK_PNMI_EVT_RLMT_PORT_SWITCH:
+ case SK_PNMI_EVT_RLMT_SEGMENTATION:
X /*
- * This event becomes obsolete if RLMT generates directly
- * the events SK_PNMI_EVT_RLMT_ACTIVE_DOWN and
- * SK_PNMI_EVT_RLMT_ACTIVE_UP. The events are here emulated.
- * PNMI handles that multiple ports may become active.
- * Increment semaphore to indicate that an update was
- * already done.
+ * Para.Para32[0] contains the NetIndex.
X */
- if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) !=
- SK_PNMI_ERR_OK) {
-
- SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
- return (0);
- }
- pAC->Pnmi.MacUpdatedFlag ++;
-
- SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Param);
- Param.Para32[0] = Param.Para32[1];
- SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_RLMT_ACTIVE_UP, Param);
-
- pAC->Pnmi.MacUpdatedFlag --;
- break;
X
- case SK_PNMI_EVT_RLMT_SEGMENTATION:
X /*
- * Store a trap message in the trap buffer and generate
- * an event for user space applications with the
- * SK_DRIVER_SENDEVENT macro.
+ * Store a trap message in the trap buffer and generate an event for
+ * user space applications with the SK_DRIVER_SENDEVENT macro.
X */
X QueueSimpleTrap(pAC, OID_SKGE_TRAP_RLMT_SEGMENTATION);
X (void)SK_DRIVER_SENDEVENT(pAC, IoC);
X break;
X
+ case SK_PNMI_EVT_RLMT_SET_NETS:
+ /*
+ * Param.Para32[0] contains the number of Nets.
+ * Param.Para32[1] is reserved, contains -1.
+ */
+ /*
+ * Check number of nets
+ */
+ MaxNetNumber = pAC->GIni.GIMacsFound;
+ if (((unsigned int)Param.Para32[0] < 1)
+ || ((unsigned int)Param.Para32[0] > MaxNetNumber)) {
+ return (SK_PNMI_ERR_UNKNOWN_NET);
+ }
+
+ if((unsigned int)Param.Para32[0] == 1){ /* single net mode */
+ pAC->Pnmi.DualNetActiveFlag = SK_FALSE;
+ }
+ else { /* dual net mode */
+ pAC->Pnmi.DualNetActiveFlag = SK_TRUE;
+ }
+ break;
+
X default:
X break;
X }
@@ -2537,6 +2680,7 @@
X * Returns:
X * SK_PNMI_ERR_XXX. For details have a look to the description of the
X * calling functions.
+ * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
X */
X
X static int PnmiVar(
@@ -2546,7 +2690,8 @@
X SK_U32 Id, /* Object ID that is to be processed */
X char *pBuf, /* Buffer which stores the mgmt data to be set */
X unsigned int *pLen, /* Total length of mgmt data */
-SK_U32 Instance) /* Instance (1..n) that is to be set or -1 */
+SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int TableIndex;
X int Ret;
@@ -2557,11 +2702,18 @@
X *pLen = 0;
X return (SK_PNMI_ERR_UNKNOWN_OID);
X }
+
+ /*
+ * Check NetIndex
+ */
+ if (NetIndex >= pAC->Rlmt.NumNets) {
+ return (SK_PNMI_ERR_UNKNOWN_NET);
+ }
X
X SK_PNMI_CHECKFLAGS("PnmiVar: On call");
X
X Ret = IdTable[TableIndex].Func(pAC, IoC, Action, Id, pBuf, pLen,
- Instance, TableIndex);
+ Instance, TableIndex, NetIndex);
X
X SK_PNMI_CHECKFLAGS("PnmiVar: On return");
X
@@ -2584,6 +2736,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_XXX. The codes are described in the calling functions.
+ * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
X */
X
X static int PnmiStruct(
@@ -2591,7 +2744,8 @@
X SK_IOC IoC, /* IO context handle */
X int Action, /* Set action to be performed */
X char *pBuf, /* Buffer which contains the data to be set */
-unsigned int *pLen) /* Length of buffer */
+unsigned int *pLen, /* Length of buffer */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X int Ret;
X unsigned int TableIndex;
@@ -2617,13 +2771,20 @@
X return (SK_PNMI_ERR_TOO_SHORT);
X }
X
+ /*
+ * Check NetIndex
+ */
+ if (NetIndex >= pAC->Rlmt.NumNets) {
+ return (SK_PNMI_ERR_UNKNOWN_NET);
+ }
+
X SK_PNMI_CHECKFLAGS("PnmiStruct: On call");
X
X /*
X * Update the values of RLMT and SIRQ and increment semaphores to
X * indicate that an update was already done.
X */
- if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
+ if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
X
X SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
X *pLen = SK_PNMI_MIN_STRUCT_SIZE;
@@ -2673,7 +2834,7 @@
X Len = 0;
X Ret = IdTable[TableIndex].Func(pAC, IoC,
X SK_PNMI_GET, IdTable[TableIndex].Id,
- NULL, &Len, Instance, TableIndex);
+ NULL, &Len, Instance, TableIndex, NetIndex);
X
X if (Ret == SK_PNMI_ERR_UNKNOWN_INST) {
X
@@ -2711,7 +2872,7 @@
X /* Call the OID handler function */
X Ret = IdTable[TableIndex].Func(pAC, IoC, Action,
X IdTable[TableIndex].Id, pBuf + DstOffset,
- &Len, Instance, TableIndex);
+ &Len, Instance, TableIndex, NetIndex);
X
X if (Ret != SK_PNMI_ERR_OK) {
X
@@ -2773,7 +2934,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -2793,7 +2954,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X if (Id != OID_SKGE_ALL_DATA) {
X
@@ -2816,13 +2978,13 @@
X switch (Action) {
X
X case SK_PNMI_GET:
- return (SkPnmiGetStruct(pAC, IoC, pBuf, pLen));
+ return (SkPnmiGetStruct(pAC, IoC, pBuf, pLen, NetIndex));
X
X case SK_PNMI_PRESET:
- return (SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen));
+ return (SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen, NetIndex));
X
X case SK_PNMI_SET:
- return (SkPnmiSetStruct(pAC, IoC, pBuf, pLen));
+ return (SkPnmiSetStruct(pAC, IoC, pBuf, pLen, NetIndex));
X }
X
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR004, SK_PNMI_ERR004MSG);
@@ -2840,7 +3002,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -2860,7 +3022,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X int Ret;
X SK_U32 ActionOp;
@@ -2949,7 +3112,7 @@
X
X case SK_PNMI_ACT_RESETCNT:
X /* Set all counters and timestamps to zero */
- ResetCounter(pAC, IoC);
+ ResetCounter(pAC, IoC, NetIndex);


X break;
X
X default:

@@ -2974,7 +3137,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -2991,11 +3154,12 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
- int Ret;
- SK_U32 StatVal;
-
+ int Ret;
+ SK_U64 StatVal;
+ SK_BOOL Is64BitReq = SK_FALSE;
X
X /*
X * Only the active Mac is returned
@@ -3030,11 +3194,28 @@
X break;
X
X default:
- if (*pLen < 4) {
+#ifndef SK_NDIS_64BIT_CTR
+ if (*pLen < sizeof(SK_U32)) {
+ *pLen = sizeof(SK_U32);
+ return (SK_PNMI_ERR_TOO_SHORT);
+ }
X
- *pLen = 4;
+#else /* SK_NDIS_64BIT_CTR */
+
+ /*
+ * for compatibility, at least 32bit are required for oid
+ */
+ if (*pLen < sizeof(SK_U32)) {
+ /*
+ * but indicate handling for 64bit values,
+ * if insufficient space is provided
+ */
+ *pLen = sizeof(SK_U64);
X return (SK_PNMI_ERR_TOO_SHORT);
X }
+
+ Is64BitReq = (*pLen < sizeof(SK_U64)) ? SK_FALSE : SK_TRUE;
+#endif /* SK_NDIS_64BIT_CTR */
X break;
X }
X
@@ -3057,20 +3238,31 @@
X switch (Id) {
X
X case OID_802_3_PERMANENT_ADDRESS:
- CopyMac(pBuf, &pAC->Addr.PermanentMacAddress);
+ CopyMac(pBuf, &pAC->Addr.Net[NetIndex].PermanentMacAddress);
X *pLen = sizeof(SK_MAC_ADDR);
X break;
X
X case OID_802_3_CURRENT_ADDRESS:
- CopyMac(pBuf, &pAC->Addr.CurrentMacAddress);
+ CopyMac(pBuf, &pAC->Addr.Net[NetIndex].CurrentMacAddress);
X *pLen = sizeof(SK_MAC_ADDR);


X break;
X
X default:

- StatVal = (SK_U32)GetStatVal(pAC, IoC, 0,
- IdTable[TableIndex].Param);
- SK_PNMI_STORE_U32(pBuf, StatVal);
- *pLen = sizeof(SK_U32);
+ StatVal = GetStatVal(pAC, IoC, 0, IdTable[TableIndex].Param, NetIndex);
+
+ /*
+ * by default 32bit values are evaluated
+ */
+ if (!Is64BitReq) {
+ SK_U32 StatVal32;
+ StatVal32 = (SK_U32)StatVal;
+ SK_PNMI_STORE_U32(pBuf, StatVal32);
+ *pLen = sizeof(SK_U32);
+ }
+ else {
+ SK_PNMI_STORE_U64(pBuf, StatVal);
+ *pLen = sizeof(SK_U64);


+ }
X break;
X }
X

@@ -3088,7 +3280,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -3105,7 +3297,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int LogPortMax;
X unsigned int LogPortIndex;
@@ -3123,22 +3316,28 @@
X PhysPortMax = pAC->GIni.GIMacsFound;
X LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
X
- if ((Instance != (SK_U32)(-1))) {
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */
+ LogPortMax--;
+ }
X
+ if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */
+ /* Check instance range */
X if ((Instance < 1) || (Instance > LogPortMax)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_UNKNOWN_INST);
X }
-
X LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance);
X Limit = LogPortIndex + 1;
X }
- else {
+
+ else { /* Instance == (SK_U32)(-1), get all Instances of that OID */
+
X LogPortIndex = 0;
X Limit = LogPortMax;
X }
X
+
X /*
X * Check action
X */
@@ -3161,7 +3360,7 @@
X * Update XMAC statistic and increment semaphore to indicate that
X * an update was already done.
X */
- Ret = MacUpdate(pAC, IoC, 0, PhysPortMax - 1);
+ Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1);
X if (Ret != SK_PNMI_ERR_OK) {
X
X *pLen = 0;
@@ -3185,9 +3384,23 @@
X case OID_SKGE_STAT_RX_UTIL:
X return (SK_PNMI_ERR_GENERAL);
X */
+ /*
+ * Frames longer than IEEE 802.3 frame max size are counted
+ * by XMAC in frame_too_long counter even reception of long
+ * frames was enabled and the frame was correct.
+ * So correct the value by subtracting RxLongFrame counter.
+ */
+ case OID_SKGE_STAT_RX_TOO_LONG:
+ StatVal = GetStatVal(pAC, IoC, LogPortIndex,
+ IdTable[TableIndex].Param, NetIndex) -
+ GetStatVal(pAC, IoC, LogPortIndex,
+ SK_PNMI_HRX_LONGFRAMES, NetIndex);
+ SK_PNMI_STORE_U64(pBuf + Offset, StatVal);
+ break;
+
X default:
X StatVal = GetStatVal(pAC, IoC, LogPortIndex,
- IdTable[TableIndex].Param);
+ IdTable[TableIndex].Param, NetIndex);
X SK_PNMI_STORE_U64(pBuf + Offset, StatVal);
X break;
X }
@@ -3214,7 +3427,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -3234,7 +3447,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X int Ret;
X unsigned int LogPortMax;
@@ -3245,24 +3459,31 @@
X unsigned int Offset = 0;
X
X
+
X /*
- * Calculate instance if wished
+ * Calculate instance if wished. MAC index 0 is the virtual
+ * MAC.
X */
X PhysPortMax = pAC->GIni.GIMacsFound;
X LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
X
- if ((Instance != (SK_U32)(-1))) {
-
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */
+ LogPortMax--;
+ }
+
+ if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */
+ /* Check instance range */
X if ((Instance < 1) || (Instance > LogPortMax)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_UNKNOWN_INST);
X }
-
X LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance);
X Limit = LogPortIndex + 1;
X }
- else {
+
+ else { /* Instance == (SK_U32)(-1), get all Instances of that OID */
+
X LogPortIndex = 0;
X Limit = LogPortMax;
X }
@@ -3290,34 +3511,28 @@
X
X case OID_SKGE_PHYS_CUR_ADDR:
X if (LogPortIndex == 0) {
-
- CopyMac(pBuf + Offset, &pAC->Addr.
- CurrentMacAddress);
+ CopyMac(pBuf + Offset, &pAC->Addr.Net[NetIndex].CurrentMacAddress);
X }
X else {
- PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
- pAC, LogPortIndex);
+ PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex);
X
- CopyMac(pBuf + Offset, &pAC->Addr.
- Port[PhysPortIndex].
- CurrentMacAddress);
+ CopyMac(pBuf + Offset,
+ &pAC->Addr.Port[PhysPortIndex].CurrentMacAddress);
X }
X Offset += 6;
X break;
X
X case OID_SKGE_PHYS_FAC_ADDR:
X if (LogPortIndex == 0) {
-
- CopyMac(pBuf + Offset, &pAC->Addr.
- PermanentMacAddress);
+ CopyMac(pBuf + Offset,
+ &pAC->Addr.Net[NetIndex].PermanentMacAddress);
X }
X else {
X PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
X pAC, LogPortIndex);
X
- CopyMac(pBuf + Offset, &pAC->Addr.
- Port[PhysPortIndex].
- PermanentMacAddress);
+ CopyMac(pBuf + Offset,
+ &pAC->Addr.Port[PhysPortIndex].PermanentMacAddress);
X }
X Offset += 6;
X break;
@@ -3424,7 +3639,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -3441,7 +3656,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int Index;
X unsigned int Limit;
@@ -3453,15 +3669,14 @@
X * Calculate instance if wished
X */
X if (Instance != (SK_U32)(-1)) {
-
+
X if ((Instance < 1) || (Instance > SKCS_NUM_PROTOCOLS)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_UNKNOWN_INST);
X }
-
X Index = (unsigned int)Instance - 1;
- Limit = (unsigned int)Instance;
+ Limit = Index + 1;
X }
X else {
X Index = 0;
@@ -3494,23 +3709,23 @@
X switch (Id) {
X
X case OID_SKGE_CHKSM_RX_OK_CTS:
- StatVal = pAC->Csum.ProtoStats[Index].RxOkCts;
+ StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxOkCts;
X break;
X
X case OID_SKGE_CHKSM_RX_UNABLE_CTS:
- StatVal = pAC->Csum.ProtoStats[Index].RxUnableCts;
+ StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxUnableCts;
X break;
X
X case OID_SKGE_CHKSM_RX_ERR_CTS:
- StatVal = pAC->Csum.ProtoStats[Index].RxErrCts;
+ StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxErrCts;
X break;
X
X case OID_SKGE_CHKSM_TX_OK_CTS:
- StatVal = pAC->Csum.ProtoStats[Index].TxOkCts;
+ StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxOkCts;
X break;
X
X case OID_SKGE_CHKSM_TX_UNABLE_CTS:
- StatVal = pAC->Csum.ProtoStats[Index].TxUnableCts;
+ StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxUnableCts;


X break;
X
X default:

@@ -3543,7 +3758,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -3560,7 +3775,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int i;
X unsigned int Index;
@@ -3787,7 +4003,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -3807,13 +4023,14 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X SK_VPD_STATUS *pVpdStatus;
X unsigned int BufLen;
X char Buf[256];
- char KeyArr[SK_PNMI_VPD_ARR_SIZE][SK_PNMI_VPD_STR_SIZE];
- char KeyStr[SK_PNMI_VPD_STR_SIZE];
+ char KeyArr[SK_PNMI_VPD_ENTRIES][SK_PNMI_VPD_KEY_SIZE];
+ char KeyStr[SK_PNMI_VPD_KEY_SIZE];
X unsigned int KeyNo;
X unsigned int Offset;
X unsigned int Index;
@@ -3829,7 +4046,6 @@
X Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr),
X &KeyNo);
X if (Ret != SK_PNMI_ERR_OK) {
-
X *pLen = 0;
X return (Ret);
X }
@@ -3854,7 +4070,6 @@
X for (Index = 0; Index < KeyNo; Index ++) {
X
X if (SK_STRCMP(KeyStr, KeyArr[Index]) == 0) {
-
X FirstIndex = Index;
X LastIndex = Index+1;
X break;
@@ -4267,7 +4482,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -4284,7 +4499,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X int Ret;
X unsigned int Index;
@@ -4297,6 +4513,7 @@
X SK_U64 Val64;
X SK_U64 Val64RxHwErrs = 0;
X SK_U64 Val64TxHwErrs = 0;
+ SK_BOOL Is64BitReq = SK_FALSE;
X char Buf[256];
X
X
@@ -4323,13 +4540,37 @@
X */
X switch (Id) {
X
+ case OID_GEN_XMIT_ERROR:
+ case OID_GEN_RCV_ERROR:
+ case OID_GEN_RCV_NO_BUFFER:
+#ifndef SK_NDIS_64BIT_CTR
+ if (*pLen < sizeof(SK_U32)) {
+ *pLen = sizeof(SK_U32);
+ return (SK_PNMI_ERR_TOO_SHORT);
+ }
+
+#else /* SK_NDIS_64BIT_CTR */
+
+ /*
+ * for compatibility, at least 32bit are required for oid
+ */
+ if (*pLen < sizeof(SK_U32)) {
+ /*
+ * but indicate handling for 64bit values,
+ * if insufficient space is provided
+ */
+ *pLen = sizeof(SK_U64);
+ return (SK_PNMI_ERR_TOO_SHORT);
+ }
+
+ Is64BitReq = (*pLen < sizeof(SK_U64)) ? SK_FALSE : SK_TRUE;
+#endif /* SK_NDIS_64BIT_CTR */
+ break;
+
X case OID_SKGE_PORT_NUMBER:
X case OID_SKGE_DEVICE_TYPE:
X case OID_SKGE_RESULT:
X case OID_SKGE_RLMT_MONITOR_NUMBER:
- case OID_GEN_XMIT_ERROR:
- case OID_GEN_RCV_ERROR:
- case OID_GEN_RCV_NO_BUFFER:
X case OID_GEN_TRANSMIT_QUEUE_LENGTH:
X case OID_SKGE_TRAP_NUMBER:
X case OID_SKGE_MDB_VERSION:
@@ -4419,31 +4660,30 @@
X case OID_SKGE_IN_ERRORS_CTS:
X case OID_GEN_RCV_ERROR:
X Val64RxHwErrs =
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_MISSED) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FRAMING) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_OVERFLOW)+
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_JABBER) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CARRIER) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_IRLENGTH)+
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SYMBOL) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SHORTS) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_RUNT) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG)+
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT);
- break;
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_MISSED, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FRAMING, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_OVERFLOW, NetIndex)+
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_JABBER, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CARRIER, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_IRLENGTH, NetIndex)+
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SYMBOL, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SHORTS, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_RUNT, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG, NetIndex)-
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_LONGFRAMES, NetIndex)+
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT, NetIndex);
+ break;
X
X case OID_SKGE_TX_HW_ERROR_CTS:
X case OID_SKGE_OUT_ERROR_CTS:
X case OID_GEN_XMIT_ERROR:
X Val64TxHwErrs =
- GetStatVal(pAC, IoC, 0,
- SK_PNMI_HTX_EXCESS_COL) +
- GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_LATE_COL)+
- GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_UNDERRUN)+
- GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_CARRIER)+
- GetStatVal(pAC, IoC, 0,
- SK_PNMI_HTX_EXCESS_COL);
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_EXCESS_COL, NetIndex) +
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_LATE_COL, NetIndex)+
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_UNDERRUN, NetIndex)+
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_CARRIER, NetIndex)+
+ GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_EXCESS_COL, NetIndex);
X break;
X }
X }
@@ -4655,61 +4895,142 @@
X break;
X
X case OID_SKGE_TX_SW_QUEUE_LEN:
- Val64 = pAC->Pnmi.TxSwQueueLen;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueLen;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].TxSwQueueLen +
+ pAC->Pnmi.Port[1].TxSwQueueLen;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
+
X case OID_SKGE_TX_SW_QUEUE_MAX:
- Val64 = pAC->Pnmi.TxSwQueueMax;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueMax;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].TxSwQueueMax +
+ pAC->Pnmi.Port[1].TxSwQueueMax;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_TX_RETRY:
- Val64 = pAC->Pnmi.TxRetryCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].TxRetryCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].TxRetryCts +
+ pAC->Pnmi.Port[1].TxRetryCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_RX_INTR_CTS:
- Val64 = pAC->Pnmi.RxIntrCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].RxIntrCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].RxIntrCts +
+ pAC->Pnmi.Port[1].RxIntrCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_TX_INTR_CTS:
- Val64 = pAC->Pnmi.TxIntrCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].TxIntrCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].TxIntrCts +
+ pAC->Pnmi.Port[1].TxIntrCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_RX_NO_BUF_CTS:
- Val64 = pAC->Pnmi.RxNoBufCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].RxNoBufCts +
+ pAC->Pnmi.Port[1].RxNoBufCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_TX_NO_BUF_CTS:
- Val64 = pAC->Pnmi.TxNoBufCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].TxNoBufCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].TxNoBufCts +
+ pAC->Pnmi.Port[1].TxNoBufCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_TX_USED_DESCR_NO:
- Val64 = pAC->Pnmi.TxUsedDescrNo;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].TxUsedDescrNo;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].TxUsedDescrNo +
+ pAC->Pnmi.Port[1].TxUsedDescrNo;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_RX_DELIVERED_CTS:
- Val64 = pAC->Pnmi.RxDeliveredCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].RxDeliveredCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].RxDeliveredCts +
+ pAC->Pnmi.Port[1].RxDeliveredCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_RX_OCTETS_DELIV_CTS:
- Val64 = pAC->Pnmi.RxOctetsDeliveredCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].RxOctetsDeliveredCts +
+ pAC->Pnmi.Port[1].RxOctetsDeliveredCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
@@ -4725,19 +5046,45 @@
X break;
X
X case OID_SKGE_IN_ERRORS_CTS:
- Val64 = Val64RxHwErrs + pAC->Pnmi.RxNoBufCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = Val64RxHwErrs +
+ pAC->Pnmi.Port[0].RxNoBufCts +
+ pAC->Pnmi.Port[1].RxNoBufCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_OUT_ERROR_CTS:
- Val64 = Val64TxHwErrs + pAC->Pnmi.TxNoBufCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = Val64TxHwErrs +
+ pAC->Pnmi.Port[0].TxNoBufCts +
+ pAC->Pnmi.Port[1].TxNoBufCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
X
X case OID_SKGE_ERR_RECOVERY_CTS:
- Val64 = pAC->Pnmi.ErrRecoveryCts;
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ Val64 = pAC->Pnmi.Port[NetIndex].ErrRecoveryCts;
+ }
+ /* Single net mode */
+ else {
+ Val64 = pAC->Pnmi.Port[0].ErrRecoveryCts +
+ pAC->Pnmi.Port[1].ErrRecoveryCts;
+ }
X SK_PNMI_STORE_U64(pBuf, Val64);
X *pLen = sizeof(SK_U64);
X break;
@@ -4756,25 +5103,58 @@
X break;
X
X case OID_GEN_RCV_ERROR:
- Val32 = (SK_U32)(Val64RxHwErrs + pAC->Pnmi.RxNoBufCts);
- SK_PNMI_STORE_U32(pBuf, Val32);
- *pLen = sizeof(SK_U32);
+ Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts;
+
+ /*
+ * by default 32bit values are evaluated
+ */
+ if (!Is64BitReq) {
+ Val32 = (SK_U32)Val64;
+ SK_PNMI_STORE_U32(pBuf, Val32);
+ *pLen = sizeof(SK_U32);
+ }
+ else {
+ SK_PNMI_STORE_U64(pBuf, Val64);
+ *pLen = sizeof(SK_U64);
+ }
X break;
X
X case OID_GEN_XMIT_ERROR:
- Val32 = (SK_U32)(Val64TxHwErrs + pAC->Pnmi.TxNoBufCts);
- SK_PNMI_STORE_U32(pBuf, Val32);
- *pLen = sizeof(SK_U32);
+ Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts;
+
+ /*
+ * by default 32bit values are evaluated
+ */
+ if (!Is64BitReq) {
+ Val32 = (SK_U32)Val64;
+ SK_PNMI_STORE_U32(pBuf, Val32);
+ *pLen = sizeof(SK_U32);
+ }
+ else {
+ SK_PNMI_STORE_U64(pBuf, Val64);
+ *pLen = sizeof(SK_U64);
+ }
X break;
X
X case OID_GEN_RCV_NO_BUFFER:
- Val32 = (SK_U32)pAC->Pnmi.RxNoBufCts;
- SK_PNMI_STORE_U32(pBuf, Val32);
- *pLen = sizeof(SK_U32);
+ Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts;
+
+ /*
+ * by default 32bit values are evaluated
+ */
+ if (!Is64BitReq) {
+ Val32 = (SK_U32)Val64;
+ SK_PNMI_STORE_U32(pBuf, Val32);
+ *pLen = sizeof(SK_U32);
+ }
+ else {
+ SK_PNMI_STORE_U64(pBuf, Val64);
+ *pLen = sizeof(SK_U64);
+ }
X break;
X
X case OID_GEN_TRANSMIT_QUEUE_LENGTH:
- Val32 = (SK_U32)pAC->Pnmi.TxSwQueueLen;
+ Val32 = (SK_U32)pAC->Pnmi.Port[NetIndex].TxSwQueueLen;
X SK_PNMI_STORE_U32(pBuf, Val32);
X *pLen = sizeof(SK_U32);
X break;
@@ -4809,7 +5189,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -4829,7 +5209,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X int Ret;
X unsigned int PhysPortIndex;
@@ -4861,7 +5242,7 @@
X
X case OID_SKGE_RLMT_MODE:
X case OID_SKGE_RLMT_PORT_ACTIVE:
- case OID_SKGE_RLMT_PORT_PREFERED:
+ case OID_SKGE_RLMT_PORT_PREFERRED:
X if (*pLen < sizeof(SK_U8)) {
X
X *pLen = sizeof(SK_U8);
@@ -4902,7 +5283,7 @@
X * statistic always up to date some time. Then we can
X * remove this type of call.
X */
- if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
+ if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
X
X *pLen = 0;
X return (Ret);
@@ -4915,7 +5296,7 @@
X switch (Id) {
X
X case OID_SKGE_RLMT_MODE:
- *pBuf = (char)pAC->Rlmt.RlmtMode;
+ *pBuf = (char)pAC->Rlmt.Net[0].RlmtMode;
X *pLen = sizeof(char);
X break;
X
@@ -4941,17 +5322,15 @@
X
X if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
X
- *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(
- PhysPortIndex);
+ *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(PhysPortIndex);
X break;
X }
X }
X *pLen = sizeof(char);
X break;
X
- case OID_SKGE_RLMT_PORT_PREFERED:
- *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(
- pAC->Rlmt.MacPreferred);
+ case OID_SKGE_RLMT_PORT_PREFERRED:
+ *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(pAC->Rlmt.Net[NetIndex].Preference);
X *pLen = sizeof(char);
X break;
X
@@ -5018,6 +5397,7 @@
X /* Send an event to RLMT to change the mode */
X SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
X EventParam.Para32[0] |= (SK_U32)(*pBuf);
+ EventParam.Para32[1] = 0;
X if (SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE,
X EventParam) > 0) {
X
@@ -5029,7 +5409,7 @@
X }
X break;
X
- case OID_SKGE_RLMT_PORT_PREFERED:
+ case OID_SKGE_RLMT_PORT_PREFERRED:
X /* Check if the buffer length is plausible */
X if (*pLen < sizeof(char)) {
X
@@ -5057,6 +5437,7 @@
X */
X SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
X EventParam.Para32[0] = (SK_U32)(*pBuf) - 1;
+ EventParam.Para32[1] = NetIndex;
X if (SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE,
X EventParam) > 0) {
X
@@ -5117,7 +5498,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -5134,7 +5515,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int PhysPortMax;
X unsigned int PhysPortIndex;
@@ -5144,26 +5526,40 @@
X SK_U32 Val32;
X SK_U64 Val64;
X
-
X /*
X * Calculate the port indexes from the instance
X */
X PhysPortMax = pAC->GIni.GIMacsFound;
X
X if ((Instance != (SK_U32)(-1))) {
-
+ /* Check instance range */
X if ((Instance < 1) || (Instance > PhysPortMax)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_UNKNOWN_INST);
X }
X
+ /* Single net mode */
X PhysPortIndex = Instance - 1;
+
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ PhysPortIndex = NetIndex;
+ }
+
+ /* Both net modes */
X Limit = PhysPortIndex + 1;
X }
X else {
+ /* Single net mode */
X PhysPortIndex = 0;
X Limit = PhysPortMax;
+
+ /* Dual net mode */
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){
+ PhysPortIndex = NetIndex;
+ Limit = PhysPortIndex + 1;
+ }
X }
X
X /*
@@ -5213,7 +5609,7 @@
X * Update statistic and increment semaphores to indicate that
X * an update was already done.
X */
- if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
+ if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
X
X *pLen = 0;
X return (Ret);
@@ -5302,7 +5698,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -5322,7 +5718,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int PhysPortMax;
X unsigned int PhysPortIndex;
@@ -5333,6 +5730,7 @@
X char Val8;
X int Ret;
X SK_EVPARA EventParam;
+ SK_U32 Val32;
X
X
X /*
@@ -5342,18 +5740,23 @@
X PhysPortMax = pAC->GIni.GIMacsFound;
X LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
X
- if ((Instance != (SK_U32)(-1))) {
+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */
+ LogPortMax--;
+ }
X
+ if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */
+ /* Check instance range */
X if ((Instance < 1) || (Instance > LogPortMax)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_UNKNOWN_INST);
X }
-
X LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance);
X Limit = LogPortIndex + 1;
X }
- else {
+
+ else { /* Instance == (SK_U32)(-1), get all Instances of that OID */
+
X LogPortIndex = 0;
X Limit = LogPortMax;
X }
@@ -5388,10 +5791,17 @@
X }
X break;
X
+ case OID_SKGE_MTU:
+ if (*pLen < sizeof(SK_U32)) {
+
+ *pLen = sizeof(SK_U32);
+ return (SK_PNMI_ERR_TOO_SHORT);
+ }
+ break;
+
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR041,
X SK_PNMI_ERR041MSG);
-
X *pLen = 0;
X return (SK_PNMI_ERR_GENERAL);
X }
@@ -5608,6 +6018,12 @@
X Offset += sizeof(char);
X break;
X
+ case OID_SKGE_MTU:
+ Val32 = SK_DRIVER_GET_MTU(pAC, IoC, NetIndex);
+ SK_PNMI_STORE_U32(pBuf + Offset, Val32);
+ Offset += sizeof(SK_U32);
+ break;
+
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR042,
X SK_PNMI_ERR042MSG);
@@ -5643,7 +6059,20 @@
X }
X break;
X
- default:
+ case OID_SKGE_MTU:
+ if (*pLen < sizeof(SK_U32)) {
+
+ *pLen = sizeof(SK_U32);
+ return (SK_PNMI_ERR_TOO_SHORT);
+ }
+ if (*pLen != sizeof(SK_U32)) {
+
+ *pLen = 0;
+ return (SK_PNMI_ERR_BAD_VALUE);
+ }
+ break;
+
+ default:
X *pLen = 0;
X return (SK_PNMI_ERR_READ_ONLY);
X }
@@ -5665,7 +6094,8 @@
X break;
X }
X if (Val8 < SK_LMODE_HALF ||
- Val8 > SK_LMODE_AUTOSENSE) {
+ (LogPortIndex != 0 && Val8 > SK_LMODE_AUTOSENSE) ||
+ (LogPortIndex == 0 && Val8 > SK_LMODE_INDETERMINATED)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_BAD_VALUE);
@@ -5740,7 +6170,8 @@
X break;
X }
X if (Val8 < SK_FLOW_MODE_NONE ||
- Val8 > SK_FLOW_MODE_SYM_OR_REM) {
+ (LogPortIndex != 0 && Val8 > SK_FLOW_MODE_SYM_OR_REM) ||
+ (LogPortIndex == 0 && Val8 > SK_FLOW_MODE_INDETERMINATED)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_BAD_VALUE);
@@ -5816,7 +6247,8 @@
X break;
X }
X if (Val8 < SK_MS_MODE_AUTO ||
- Val8 > SK_MS_MODE_SLAVE) {
+ (LogPortIndex != 0 && Val8 > SK_MS_MODE_SLAVE) ||
+ (LogPortIndex == 0 && Val8 > SK_MS_MODE_INDETERMINATED)) {
X
X *pLen = 0;
X return (SK_PNMI_ERR_BAD_VALUE);
@@ -5879,10 +6311,35 @@
X return (SK_PNMI_ERR_GENERAL);
X }
X }
-
+
X Offset += sizeof(char);
X break;
X
+ case OID_SKGE_MTU :
+ /* Check the value range */
+ Val32 = *(SK_U32*)(pBuf + Offset);
+ if (Val32 == 0) {
+ /* mtu of this port remains unchanged */
+ Offset += sizeof(SK_U32);
+ break;
+ }
+ if (SK_DRIVER_PRESET_MTU(pAC, IoC, NetIndex, Val32) != 0) {
+ *pLen = 0;
+ return (SK_PNMI_ERR_BAD_VALUE);
+ }
+
+ /* The preset ends here */
+ if (Action == SK_PNMI_PRESET) {
+ return (SK_PNMI_ERR_OK);
+ }
+
+ if (SK_DRIVER_SET_MTU(pAC, IoC, NetIndex, Val32) != 0) {
+ return (SK_PNMI_ERR_GENERAL);
+ }
+
+ Offset += sizeof(SK_U32);
+ break;
+
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR045,
X SK_PNMI_ERR045MSG);
@@ -5905,7 +6362,7 @@
X *
X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is
X * needed, but a 16 bit value was passed).
@@ -5925,7 +6382,8 @@
X char *pBuf, /* Buffer to which to mgmt data will be retrieved */
X unsigned int *pLen, /* On call: buffer length. On return: used buffer */
X SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
-unsigned int TableIndex) /* Index to the Id table */
+unsigned int TableIndex, /* Index to the Id table */
+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {
X unsigned int Index;
X unsigned int Limit;
@@ -6419,8 +6877,8 @@
X unsigned int KeyArrLen, /* Length of array in bytes */
X unsigned int *pKeyNo) /* Number of keys */
X {
- unsigned int BufKeysLen = 128;
- char BufKeys[128];
+ unsigned int BufKeysLen = SK_PNMI_VPD_BUFSIZE;
+ char BufKeys[SK_PNMI_VPD_BUFSIZE];
X unsigned int StartOffset;
X unsigned int Offset;
X int Index;
@@ -6451,12 +6909,12 @@
X * errorlog notification. This case should not happen because
X * the maximum number of keys is limited due to RAM limitations
X */
- if (*pKeyNo > SK_PNMI_VPD_ARR_SIZE) {
+ if (*pKeyNo > SK_PNMI_VPD_ENTRIES) {
X
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR015,
X SK_PNMI_ERR015MSG);
X
- *pKeyNo = SK_PNMI_VPD_ARR_SIZE;
+ *pKeyNo = SK_PNMI_VPD_ENTRIES;
X }
X
X /*
@@ -6471,15 +6929,15 @@
X continue;
X }
X
- if (Offset - StartOffset > SK_PNMI_VPD_STR_SIZE) {
+ if (Offset - StartOffset > SK_PNMI_VPD_KEY_SIZE) {
X
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR016,
X SK_PNMI_ERR016MSG);
X return (SK_PNMI_ERR_GENERAL);
X }
X
- SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_STR_SIZE,
- &BufKeys[StartOffset], SK_PNMI_VPD_STR_SIZE);
+ SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_KEY_SIZE,
+ &BufKeys[StartOffset], SK_PNMI_VPD_KEY_SIZE);
X
X Index ++;
X StartOffset = Offset + 1;
@@ -6488,8 +6946,8 @@
X /* Last key not zero terminated? Get it anyway */
X if (StartOffset < Offset) {
X
- SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_STR_SIZE,
- &BufKeys[StartOffset], SK_PNMI_VPD_STR_SIZE);
+ SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_KEY_SIZE,
+ &BufKeys[StartOffset], SK_PNMI_VPD_KEY_SIZE);
X }
X
X return (SK_PNMI_ERR_OK);
@@ -6551,7 +7009,8 @@
X
X static int RlmtUpdate(
X SK_AC *pAC, /* Pointer to adapter context */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 32'
echo 'File patch-2.2.20 is continued in part 33'
echo "33" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:04 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part05

#!/bin/sh -x
# this is part 05 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 05; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+start subchannels
+like TR SSCH 7C08-7C09
+or the halt subchannels
+or TR HSCH 7C08-7C09
+MSCH's ,STSCH's I think you can guess the rest
+
+Ingo's favourite trick is tracing all the IO's & CCWS & spooling them into the reader of another
+VM guest so he can ftp the logfile back to his own machine.I'll do a small bit of this & give you
+ a look at the output.
+
+1) Spool stdout to VM reader
+SP PRT TO (another vm guest ) or * for the local vm guest
+2) Fill the reader with the trace
+TR IO 7c08-7c09 INST INT CCW PRT RUN
+3) Start up linux
+i 00c
+4) Finish the trace
+TR END
+5) close the reader
+C PRT
+6) list reader contents
+RDRLIST
+7) copy it to linux4's minidisk
+RECEIVE / LOG TXT A1 ( replace
+8)
+filel & press F11 to look at it
+You should see someting like.
+
+00020942' SSCH B2334000 0048813C CC 0 SCH 0000 DEV 7C08
+ CPA 000FFDF0 PARM 00E2C9C4 KEY 0 FPI C0 LPM 80
+ CCW 000FFDF0 E4200100 00487FE8 0000 E4240100 ........
+ IDAL 43D8AFE8
+ IDAL 0FB76000
+00020B0A' I/O DEV 7C08 -> 000197BC' SCH 0000 PARM 00E2C9C4
+00021628' TSCH B2354000 >> 00488164 CC 0 SCH 0000 DEV 7C08
+ CCWA 000FFDF8 DEV STS 0C SCH STS 00 CNT 00EC
+ KEY 0 FPI C0 CC 0 CTLS 4007
+00022238' STSCH B2344000 >> 00488108 CC 0 SCH 0000 DEV 7C08
+
+If you don't like messing up your readed ( because you possibly booted from it )
+you can alternatively spool it to another readers guest.
+
+
+Other common VM device related commands
+---------------------------------------------
+These commands are listed only because they have
+been of use to me in the past & may be of use to
+you too. For more complete info on each of the commands
+use type HELP <command> from CMS.
+detaching devices
+DET <devno range>
+ATT <devno range> <guest>
+attach a device to guest * for your own guest
+READY <devno> cause VM to issue a fake interrupt.
+
+The VARY command is normally only available to VM administrators.
+VARY ON PATH <path> TO <devno range>
+VARY OFF PATH <PATH> FROM <devno range>
+This is used to switch on or off channel paths to devices.
+
+Q CHPID <channel path ID>
+This displays state of devices using this channel path
+D SCHIB <subchannel>
+This displays the subchannel information SCHIB block for the device.
+this I believe is also only available to administrators.
+DEFINE CTC <devno>
+defines a virtual CTC channel to channel connection
+2 need to be defined on each guest for the CTC driver to use.
+COUPLE devno userid remote devno
+Joins a local virtual device to a remote virtual device
+( commonly used for the CTC driver ).
+
+Building a VM ramdisk under CMS which linux can use
+def vfb-<blocksize> <subchannel> <number blocks>
+blocksize is commonly 4096 for linux.
+Formatting it
+format <subchannel> <driver letter e.g. x> (blksize <blocksize>
+
+Sharing a disk between multiple guests
+LINK userid devno1 devno2 mode password
+
+
+
+GDB on S390
+===========
+N.B. if compiling for debugging gdb works better without optimisation
+( see Compiling programs for debugging )
+
+invocation
+----------
+gdb <victim program> <optional corefile>
+
+Online help
+-----------
+help: gives help on commands
+e.g.
+help
+help display
+Note gdb's online help is very good use it.
+
+
+Assembly
+--------
+info registers: displays registers other than floating point.
+info all-registers: displays floating points as well.
+disassemble: dissassembles
+e.g.
+disassemble without parameters will disassemble the current function
+disassemble $pc $pc+10
+
+Viewing & modifying variables
+-----------------------------
+print or p: displays variable or register
+e.g. p/x $sp will display the stack pointer
+
+display: prints variable or register each time program stops
+e.g.
+display/x $pc will display the program counter
+display argc
+
+undisplay : undo's display's
+
+info breakpoints: shows all current breakpoints
+
+info stack: shows stack back trace ( if this dosent work too well, I'll show you the
+stacktrace by hand below ).
+
+info locals: displays local variables.
+
+info args: display current procedure arguments.
+
+set args: will set argc & argv each time the victim program is invoked.
+
+set <variable>=value
+set argc=100
+set $pc=0
+
+
+
+Modifying execution
+-------------------
+step: steps n lines of sourcecode
+step steps 1 line.
+step 100 steps 100 lines of code.
+
+next: like step except this will not step into subroutines
+
+stepi: steps a single machine code instruction.
+e.g. stepi 100
+
+nexti: steps a single machine code instruction but will not step into subroutines.
+
+finish: will run until exit of the current routine
+
+run: (re)starts a program
+
+cont: continues a program
+
+quit: exits gdb.
+
+
+breakpoints
+------------
+
+break
+sets a breakpoint
+e.g.
+
+break main
+
+break *$pc
+
+break *0x400618
+
+heres a really useful one for large programs
+rbr
+Set a breakpoint for all functions matching REGEXP
+e.g.
+rbr 390
+will set a breakpoint with all functions with 390 in their name.
+
+info breakpoints
+lists all breakpoints
+
+delete: delete breakpoint by number or delete them all
+e.g.
+delete 1 will delete the first breakpoint
+delete will delete them all
+
+watch: This will set a watchpoint ( usually hardware assisted ),
+This will watch a variable till it changes
+e.g.
+watch cnt, will watch the variable cnt till it changes.
+As an aside unfortunately gdb's, architecture independent watchpoint code
+is inconsistent & not very good, watchpoints usually work but not always.
+
+info watchpoints: Display currently active watchpoints
+
+condition: ( another useful one )
+Specify breakpoint number N to break only if COND is true.
+Usage is `condition N COND', where N is an integer and COND is an
+expression to be evaluated whenever breakpoint N is reached.
+
+
+
+User defined functions/macros
+-----------------------------
+define: ( Note this is very very useful,simple & powerful )
+usage define <name> <list of commands> end
+
+examples which you should consider putting into .gdbinit in your home directory
+define d
+stepi
+disassemble $pc $pc+10
+end
+
+define e
+nexti
+disassemble $pc $pc+10
+end
+
+
+Other hard to classify stuff
+----------------------------
+signal n:
+sends the victim program a signal.
+e.g. signal 3 will send a SIGQUIT.
+
+info signals:
+what gdb does when the victim receives certain signals.
+
+list:
+e.g.
+list lists current function source
+list 1,10 list first 10 lines of curret file.
+list test.c:1,10
+
+
+directory:
+Adds directories to be searched for source if gdb cannot find the source.
+(note it is a bit sensititive about slashes )
+e.g. To add the root of the filesystem to the searchpath do
+directory //
+
+
+call <function>
+This calls a function in the victim program, this is pretty powerful
+e.g.
+(gdb) call printf("hello world")
+outputs:
+$1 = 11
+
+You might now be thinking that the line above didn't work, something extra had to be done.
+(gdb) call fflush(stdout)
+hello world$2 = 0
+As an aside the debugger also calls malloc & free under the hood
+to make space for the "hello world" string.
+
+
+
+hints
+-----
+1) command completion works just like bash
+( if you are a bad typist like me this really helps )
+e.g. hit br <TAB> & cursor up & down :-).
+
+2) if you have a debugging problem that takes a few steps to recreate
+put the steps into a file called .gdbinit in your current working directory
+if you have defined a few extra useful user defined commands put these in
+your home directory & they will be read each time gdb is launched.
+
+A typical .gdbinit file might be.
+break main
+run
+break runtime_exception
+cont
+
+
+stack chaining in gdb by hand
+-----------------------------
+This is done using a the same trick described for VM
+p/x (*($sp+56))&0x7fffffff get the first backchain.
+
+For z/Architecture
+Replace 56 with 112 & ignore the &0x7fffffff
+in the macros below & do nasty casts to longs like the following
+as gdb unfortunately deals with printed arguments as ints which
+messes up everything.
+i.e. here is a 3rd backchain dereference
+p/x *(long *)(***(long ***)$sp+112)
+
+
+this outputs
+$5 = 0x528f18
+on my machine.
+Now you can use
+info symbol (*($sp+56))&0x7fffffff
+you might see something like.
+rl_getc + 36 in section .text telling you what is located at address 0x528f18
+Now do.
+p/x (*(*$sp+56))&0x7fffffff
+This outputs
+$6 = 0x528ed0
+Now do.
+info symbol (*(*$sp+56))&0x7fffffff
+rl_read_key + 180 in section .text
+now do
+p/x (*(**$sp+56))&0x7fffffff
+& so on.
+
+Disassembling instructions without debug info
+---------------------------------------------
+gdb typically compains if there is a lack of debugging
+symbols in the disassemble command with
+"No function contains specified address." to get around
+this do
+x/<number lines to disassemble>xi <address>
+e.g.
+x/20xi 0x400730
+
+
+
+Note: Remember gdb has history just like bash you don't need to retype the
+whole line just use the up & down arrows.
+
+
+
+For more info
+-------------
+From your linuxbox do
+man gdb or info gdb.
+
+core dumps
+----------
+What a core dump ?,
+A core dump is a file generated by the kernel ( if allowed ) which contains the registers,
+& all active pages of the program which has crashed.
+From this file gdb will allow you to look at the registers & stack trace & memory of the
+program as if it just crashed on your system, it is usually called core & created in the
+current working directory.
+This is very useful in that a customer can mail a core dump to a technical support department
+& the technical support department can reconstruct what happened.
+Provided the have an indentical copy of this program with debugging symbols compiled in &
+the source base of this build is available.
+In short it is far more useful than something like a crash log could ever hope to be.
+
+In theory all that is missing to restart a core dumped program is a kernel patch which
+will do the following.
+1) Make a new kernel task structure
+2) Reload all the dumped pages back into the kernels memory managment structures.
+3) Do the required clock fixups
+4) Get all files & network connections for the process back into an identical state ( really difficult ).
+5) A few more difficult things I haven't thought of.
+
+
+
+Why have I never seen one ?.
+Probably because you haven't used the command
+ulimit -c unlimited in bash
+to allow core dumps, now do
+ulimit -a
+to verify that the limit was accepted.
+
+A sample core dump
+To create this I'm going to do
+ulimit -c unlimited
+gdb
+to launch gdb (my victim app. ) now be bad & do the following from another
+telnet/xterm session to the same machine
+ps -aux | grep gdb
+kill -SIGSEGV <gdb's pid>
+or alternatively use killall -SIGSEGV gdb if you have the killall command.
+Now look at the core dump.
+./gdb ./gdb core
+Displays the following
+GNU gdb 4.18
+Copyright 1998 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB. Type "show warranty" for details.
+This GDB was configured as "s390-ibm-linux"...
+Core was generated by `./gdb'.
+Program terminated with signal 11, Segmentation fault.
+Reading symbols from /usr/lib/libncurses.so.4...done.
+Reading symbols from /lib/libm.so.6...done.
+Reading symbols from /lib/libc.so.6...done.
+Reading symbols from /lib/ld-linux.so.2...done.
+#0 0x40126d1a in read () from /lib/libc.so.6
+Setting up the environment for debugging gdb.
+Breakpoint 1 at 0x4dc6f8: file utils.c, line 471.
+Breakpoint 2 at 0x4d87a4: file top.c, line 2609.
+(top-gdb) info stack
+#0 0x40126d1a in read () from /lib/libc.so.6
+#1 0x528f26 in rl_getc (stream=0x7ffffde8) at input.c:402
+#2 0x528ed0 in rl_read_key () at input.c:381
+#3 0x5167e6 in readline_internal_char () at readline.c:454
+#4 0x5168ee in readline_internal_charloop () at readline.c:507
+#5 0x51692c in readline_internal () at readline.c:521
+#6 0x5164fe in readline (prompt=0x7ffff810 "\177��x\177�¶�\177��x�")
+ at readline.c:349
+#7 0x4d7a8a in command_line_input (prrompt=0x564420 "(gdb) ", repeat=1,
+ annotation_suffix=0x4d6b44 "prompt") at top.c:2091
+#8 0x4d6cf0 in command_loop () at top.c:1345
+#9 0x4e25bc in main (argc=1, argv=0x7ffffdf4) at main.c:635
+
+
+LDD
+===
+This is a program which lists the shared libraries which a library needs,
+Note you also get the relocations of the shared library text segments which
+help when using objdump --source.
+e.g.
+ ldd ./gdb
+outputs
+libncurses.so.4 => /usr/lib/libncurses.so.4 (0x40018000)
+libm.so.6 => /lib/libm.so.6 (0x4005e000)
+libc.so.6 => /lib/libc.so.6 (0x40084000)
+/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
+
+
+Debugging shared libraries
+==========================
+Most programs use shared libraries, however it can be very painful
+when you single step instruction into a function like printf for the
+first time & you end up in functions like _dl_runtime_resolve this is
+the ld.so doing lazy binding, lazy binding is a concept in ELF where
+shared library functions are not loaded into memory unless they are
+actually used, great for saving memory but a pain to debug.
+To get around this either relink the program -static or exit gdb type
+export LD_BIND_NOW=true this will stop lazy binding & restart the gdb'ing
+the program in question.
+
+
+
+Debugging modules
+=================
+As modules are dynamically loaded into the kernel their address can be
+anywhere to get around this use the -m option with insmod to emit a load
+map which can be piped into a file if required.
+
+The proc file system
+====================
+What is it ?.
+It is a filesystem created by the kernel with files which are created on demand
+by the kernel if read, or can be used to modify kernel parameters,
+it is a powerful concept.
+
+e.g.
+
+cat /proc/sys/net/ipv4/ip_forward
+On my machine outputs
+0
+telling me ip_forwarding is not on to switch it on I can do
+echo 1 > /proc/sys/net/ipv4/ip_forward
+cat it again
+cat /proc/sys/net/ipv4/ip_forward
+On my machine now outputs
+1
+IP forwarding is on.
+There is a lot of useful info in here best found by going in & having a look around,
+so I'll take you through some entries I consider important.
+
+All the processes running on the machine have there own entry defined by
+/proc/<pid>
+So lets have a look at the init process
+cd /proc/1
+
+cat cmdline
+emits
+init [2]
+
+cd /proc/1/fd
+This contains numerical entries of all the open files,
+some of these you can cat e.g. stdout (2)
+
+cat /proc/29/maps
+on my machine emits
+
+00400000-00478000 r-xp 00000000 5f:00 4103 /bin/bash
+00478000-0047e000 rw-p 00077000 5f:00 4103 /bin/bash
+0047e000-00492000 rwxp 00000000 00:00 0
+40000000-40015000 r-xp 00000000 5f:00 14382 /lib/ld-2.1.2.so
+40015000-40016000 rw-p 00014000 5f:00 14382 /lib/ld-2.1.2.so
+40016000-40017000 rwxp 00000000 00:00 0
+40017000-40018000 rw-p 00000000 00:00 0
+40018000-4001b000 r-xp 00000000 5f:00 14435 /lib/libtermcap.so.2.0.8
+4001b000-4001c000 rw-p 00002000 5f:00 14435 /lib/libtermcap.so.2.0.8
+4001c000-4010d000 r-xp 00000000 5f:00 14387 /lib/libc-2.1.2.so
+4010d000-40111000 rw-p 000f0000 5f:00 14387 /lib/libc-2.1.2.so
+40111000-40114000 rw-p 00000000 00:00 0
+40114000-4011e000 r-xp 00000000 5f:00 14408 /lib/libnss_files-2.1.2.so
+4011e000-4011f000 rw-p 00009000 5f:00 14408 /lib/libnss_files-2.1.2.so
+7fffd000-80000000 rwxp ffffe000 00:00 0
+
+
+Showing us the shared libraries init uses where they are in memory
+& memory access permissions for each virtual memory area.
+
+/proc/1/cwd is a softlink to the current working directory.
+/proc/1/root is the root of the filesystem for this process.
+
+/proc/1/mem is the current running processes memory which you
+can read & write to like a file.
+strace uses this sometimes as it is a bit faster than the
+rather inefficent ptrace interface for peeking at DATA.
+
+
+cat status
+
+Name: init
+State: S (sleeping)
+Pid: 1
+PPid: 0
+Uid: 0 0 0 0
+Gid: 0 0 0 0
+Groups:
+VmSize: 408 kB
+VmLck: 0 kB
+VmRSS: 208 kB
+VmData: 24 kB
+VmStk: 8 kB
+VmExe: 368 kB
+VmLib: 0 kB
+SigPnd: 0000000000000000
+SigBlk: 0000000000000000
+SigIgn: 7fffffffd7f0d8fc
+SigCgt: 00000000280b2603
+CapInh: 00000000fffffeff
+CapPrm: 00000000ffffffff
+CapEff: 00000000fffffeff
+
+User PSW: 070de000 80414146
+task: 004b6000 tss: 004b62d8 ksp: 004b7ca8 pt_regs: 004b7f68
+User GPRS:
+00000400 00000000 0000000b 7ffffa90
+00000000 00000000 00000000 0045d9f4
+0045cafc 7ffffa90 7fffff18 0045cb08
+00010400 804039e8 80403af8 7ffff8b0
+User ACRS:
+00000000 00000000 00000000 00000000
+00000001 00000000 00000000 00000000
+00000000 00000000 00000000 00000000
+00000000 00000000 00000000 00000000
+Kernel BackChain CallChain BackChain CallChain
+ 004b7ca8 8002bd0c 004b7d18 8002b92c
+ 004b7db8 8005cd50 004b7e38 8005d12a
+ 004b7f08 80019114
+Showing among other things memory usage & status of some signals &
+the processes'es registers from the kernel task_structure
+as well as a backchain which may be useful if a process crashes
+in the kernel for some unknown reason.
+
+Some driver debugging techniques
+================================
+debug feature
+-------------
+Some of our drivers now support a "debug feature" in
+/proc/s390dbf see s390dbf.txt in the linux/Documentation directory
+for more info.
+e.g.
+to switch on the lcs "debug feature"
+echo 5 > /proc/s390dbf/lcs/level
+& then after the error occured.
+cat /proc/s390dbf/lcs/sprintf >/logfile
+the logfile now contains some information which may help
+tech support resolve a problem in the field.
+
+
+
+high level debugging network drivers
+------------------------------------
+ifconfig is a quite useful command
+it gives the current state of network drivers.
+
+If you suspect your network device driver is dead
+one way to check is type
+ifconfig <network device>
+e.g. tr0
+You should see something like
+tr0 Link encap:16/4 Mbps Token Ring (New) HWaddr 00:04:AC:20:8E:48
+ inet addr:9.164.185.132 Bcast:9.164.191.255 Mask:255.255.224.0
+ UP BROADCAST RUNNING MULTICAST MTU:2000 Metric:1
+ RX packets:246134 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:100
+
+if the device doesn't say up
+try
+/etc/rc.d/init.d/network start
+( this starts the network stack & hopefully calls ifconfig tr0 up ).
+ifconfig looks at the output of /proc/net/dev & presents it in a more presentable form
+Now ping the device from a machine in the same subnet.
+if the RX packets count & TX packets counts don't increment you probably
+have problems.
+next
+cat /proc/net/arp
+Do you see any hardware addresses in the cache if not you may have problems.
+Next try
+ping -c 5 <broadcast_addr> i.e. the Bcast field above in the output of
+ifconfig. Do you see any replies from machines other than the local machine
+if not you may have problems. also if the TX packets count in ifconfig
+hasn't incremented either you have serious problems in your driver
+(e.g. the txbusy field of the network device being stuck on )
+or you may have multiple network devices connected.
+
+
+chandev
+-------
+There is a new device layer for channel devices, some
+drivers e.g. lcs are registered with this layer.
+If the device uses the channel device layer you'll be
+able to find what interupts it uses & the current state
+of the device.
+See the manpage chandev.8 &type cat /proc/chandev for more info.
+
+
+


+Starting points for debugging scripting languages etc.

+======================================================
+
+bash/sh
+
+bash -x <scriptname>
+e.g. bash -x /usr/bin/bashbug
+displays the following lines as it executes them.
++ MACHINE=i586
++ OS=linux-gnu
++ CC=gcc
++ CFLAGS= -DPROGRAM='bash' -DHOSTTYPE='i586' -DOSTYPE='linux-gnu' -DMACHTYPE='i586-pc-linux-gnu' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./lib -O2 -pipe
++ RELEASE=2.01
++ PATCHLEVEL=1
++ RELSTATUS=release
++ MACHTYPE=i586-pc-linux-gnu
+
+perl -d <scriptname> runs the perlscript in a fully intercative debugger
+<like gdb>.
+Type 'h' in the debugger for help.
+
+for debugging java type
+jdb <filename> another fully interactive gdb style debugger.
+& type ? in the debugger for help.
+
+
+
+SysRq
+=====
+This is now supported by linux for s/390 & z/Architecture.
+To enable it do compile the kernel with
+Kernel Hacking -> Magic SysRq Key Enabled
+echo "1" > /proc/sys/kernel/sysrq.
+On 390 all commands are prefixed with
+^-
+e.g.
+^-t will show tasks.
+^-? or some unknown command will display help.
+The sysrq key reading is very picky ( I have to type the keys in an
+ xterm session & paste them into the x3270 console )
+& it may be wise to predefine the keys as described in the VM hints above
+
+This is particularly useful for syncing disks unmounting & rebooting
+if the machine gets partially hung.
+
+Read Documentation/sysrq.txt for more info
+
+References:
+===========
+Enterprise Systems Architecture Reference Summary
+Enterprise Systems Architecture Principles of Operation
+Hartmut Penners s390 stack frame sheet.
+IBM Mainframe Channel Attachment a technology brief from a CISCO webpage
+Various bits of man & info pages of Linux.
+Linux & GDB source.
+Various info & man pages.
+CMS Help on tracing commands.
+Linux for s/390 Elf Application Binary Interface
+Linux for z/Series Elf Application Binary Interface ( Both Highly Recommended )
+z/Architecture Principles of Operation SA22-7832-00
+Enterprise Systems Architecture/390 Reference Summary SA22-7209-01 & the
+Enterprise Systems Architecture/390 Principles of Operation SA22-7201-05
+
+Special Thanks
+==============
+Special thanks to Neale Ferguson who maintains a much
+prettier HTML version of this page at
+http://penguinvm.princeton.edu/notes.html#Debug390
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/s390/TAPE linux/Documentation/s390/TAPE
--- v2.2.19/Documentation/s390/TAPE Thu Jan 1 01:00:00 1970
+++ linux/Documentation/s390/TAPE Wed Oct 10 01:40:42 2001
@@ -0,0 +1,122 @@
+Channel attached Tape device driver
+
+-----------------------------WARNING-----------------------------------------
+This driver is considered to be EXPERIMENTAL. Do NOT use it in
+production environments. Feel free to test it and report problems back to us.
+-----------------------------------------------------------------------------
+
+The LINUX for zSeries tape device driver manages channel attached tape drives
+which are compatible to IBM 3480 or IBM 3490 magnetic tape subsystems. This
+includes various models of these devices (for example the 3490E).
+
+
+Tape driver features
+
+The device driver supports a maximum of 128 tape devices.
+No official LINUX device major number is assigned to the zSeries tape device
+driver. It allocates major numbers dynamically and reports them on system
+startup.
+Typically it will get major number 254 for both the character device front-end
+and the block device front-end.
+
+The tape device driver needs no kernel parameters. All supported devices
+present are detected on driver initialization at system startup or module load.
+The devices detected are ordered by their subchannel numbers. The device with
+the lowest subchannel number becomes device 0, the next one will be device 1
+and so on.
+
+
+Tape character device front-end
+
+The usual way to read or write to the tape device is through the character
+device front-end. The zSeries tape device driver provides two character devices
+for each physical device -- the first of these will rewind automatically when
+it is closed, the second will not rewind automatically.
+
+The character device nodes are named /dev/rtibm0 (rewinding) and /dev/ntibm0
+(non-rewinding) for the first device, /dev/rtibm1 and /dev/ntibm1 for the
+second, and so on.
+
+The character device front-end can be used as any other LINUX tape device. You
+can write to it and read from it using LINUX facilities such as GNU tar. The
+tool mt can be used to perform control operations, such as rewinding the tape
+or skipping a file.
+
+Most LINUX tape software should work with either tape character device.
+
+
+Tape block device front-end
+
+The tape device may also be accessed as a block device in read-only mode.
+This could be used for software installation in the same way as it is used with
+other operation systems on the zSeries platform (and most LINUX
+distributions are shipped on compact disk using ISO9660 filesystems).
+
+One block device node is provided for each physical device. These are named
+/dev/btibm0 for the first device, /dev/btibm1 for the second and so on.
+You should only use the ISO9660 filesystem on LINUX for zSeries tapes because
+the physical tape devices cannot perform fast seeks and the ISO9660 system is
+optimized for this situation.
+
+
+Tape block device example
+
+In this example a tape with an ISO9660 filesystem is created using the first
+tape device. ISO9660 filesystem support must be built into your system kernel
+for this.
+The mt command is used to issue tape commands and the mkisofs command to
+create an ISO9660 filesystem:
+
+- create a LINUX directory (somedir) with the contents of the filesystem
+ mkdir somedir
+ cp contents somedir
+
+- insert a tape
+
+- ensure the tape is at the beginning
+ mt -f /dev/ntibm0 rewind
+
+- set the blocksize of the character driver. The blocksize 2048 bytes
+ is commonly used on ISO9660 CD-Roms
+ mt -f /dev/ntibm0 setblk 2048
+
+- write the filesystem to the character device driver
+ mkisofs -o /dev/ntibm0 somedir
+
+- rewind the tape again
+ mt -f /dev/ntibm0 rewind
+
+- Now you can mount your new filesystem as a block device:
+ mount -t iso9660 -o ro,block=2048 /dev/btibm0 /mnt
+
+TODO List
+
+ - Driver has to be stabelized still
+
+BUGS
+
+This driver is considered BETA, which means some weaknesses may still
+be in it.
+If an error occurs which cannot be handled by the code you will get a
+sense-data dump.In that case please do the following:
+
+1. set the tape driver debug level to maximum:
+ echo 6 >/proc/s390dbf/tape/level
+
+2. re-perform the actions which produced the bug. (Hopefully the bug will
+ reappear.)
+
+3. get a snapshot from the debug-feature:
+ cat /proc/s390dbf/tape/hex_ascii >somefile
+
+4. Now put the snapshot together with a detailed description of the situation
+ that led to the bug:
+ - Which tool did you use?
+ - Which hardware do you have?
+ - Was your tape unit online?
+ - Is it a shared tape unit?
+
+5. Send an email with your bug report to:
+ mailto:Linu...@de.ibm.com
+
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/s390/cds.txt linux/Documentation/s390/cds.txt
--- v2.2.19/Documentation/s390/cds.txt Sun Mar 25 17:37:29 2001
+++ linux/Documentation/s390/cds.txt Wed Oct 10 01:40:42 2001
@@ -317,7 +317,7 @@
X 0 - successful completion
X -ENODEV - irq doesn't specify a valid subchannel number
X -EINVAL - an invalid parameter was detected
--EBUSY - an irrecoverable I/O error occured or the device is not
+-EBUSY - an irrecoverable I/O error occurred or the device is not
X operational.
X
X Usage Notes :
@@ -549,7 +549,7 @@
X
X typedef struct {
X char cmd_code; /* command code */
- char flags; /* flags, like IDA adressing, etc. */
+ char flags; /* flags, like IDA addressing, etc. */
X unsigned short count; /* byte count */
X void *cda; /* data address */
X } ccw1_t __attribute__ ((aligned(8)));
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/s390/s390dump.txt linux/Documentation/s390/s390dump.txt
--- v2.2.19/Documentation/s390/s390dump.txt Thu Jan 1 01:00:00 1970
+++ linux/Documentation/s390/s390dump.txt Wed Oct 10 01:40:42 2001
@@ -0,0 +1,177 @@
+L/390 stand alone dump tools for Linux 2.2.x
+
+-----------------------------WARNING-----------------------------------------
+This driver is considered to be EXPERIMENTAL. Do NOT use it in
+production environments. Feel free to test it and report problems back to us.
+-----------------------------------------------------------------------------
+
+1. Overview
+
+Two stand alone dump tools are provided for generating system memory dumps
+on dasd volumes and tapes: dumpeckd.boot and dumptape.boot
+respectively. The tools should be installed on the device which will
+be used for dumping the system memory; We shall refer to this device as
+dump device. A system memory dump can be initiated by the operator
+at any time. Normally this should be done after a system crash.
+In order to take a dump an ipl of the dump device is required.
+This is destructive which means that the actual running Linux Operating
+System will be killed.
+The ipl process then writes the system memory to the ipl device (either tape
+or dasd).
+
+
+2. Build the dump utilities
+
+The dump tools are compiled with the Kernel:
+> make menuconfig
+> make dep
+> make image
+
+Then under linux/arch/s390/boot the following two files are built:
+- dumpeckd.boot
+- dumptape.boot
+
+
+
+3. Install the Dump utilities
+
+Make sure that there is enough space (memory-size + 1MB) on your dump device
+to hold all your system memory.
+
+3.1 Install DASD dump utility
+
+You have to have an unused dasd partition for dumping. The dump utility is
+installed there and dumps are written afterwards to this dasd. This is how
+to install the dump tool on dasd:
+
+ 1. Format dasd with 4K blocksize:
+ > dasdfmt -f /dev/dasdx -b 4096
+
+ 2. Copy dump utility to dasd (e.g. /dev/dasdx) by issuing the following
+ two commands:
+ > dd if=dumpeckd.boot of=/dev/dasdx
+ > sync
+
+3.2 Install tape dump utility
+
+ 1. Insert empty dump cartridge into your tapedevice (e.g. /dev/ntibm0).
+ 2. Ensure the tape is rewound (e.g mt -f /dev/ntibm0 rewind)
+ 3. Copy dump utility to tape:
+ > dd if=/boot/dumptape.boot of=/dev/ntibm0 bs=4096
+
+
+
+4. Taking the dump
+
+The operator has to do the following tasks in order to take a dump:
+ - Ensure that tape is rewound (if using tapedump.boot)
+ - Stop all cpus (only under VM)
+ - Store status on ipl cpu
+ - IPL the dump tool on ipl cpu
+
+The dump process can take several minutes, depending on the devicetype you are
+using and the amount of your system memory.
+After the dump has completed, the ipl CPU should go into disabled wait.
+
+The following PSW indicates that the dump has been taken successfully:
+
+PSW: 000A0000 00000000
+
+Any other disabled wait PSW indicates an error.
+
+On VM (a three processor machine in this example) this could look like the
+following:
+
+ #cp cpu all stop
+ #cp store status
+ #cp I 193 (if 193 is the dump device)
+ 01: The virtual machine is placed in CP mode due to a SIGP stop from CPU 00.
+ 02: The virtual machine is placed in CP mode due to a SIGP stop from CPU 00.
+ "CP entered; disabled wait PSW 000A0000 00000000"
+ #cp I 192 (the linux dasd)
+
+When initiating the dump process e.g. from a service element check the
+"Store Status" checkbox of the ipl panel.
+
+For detailed information on the actual steps to be performed please consult the
+appropriate manual of your processor.
+
+
+
+5. Copying the dump to a filesystem
+
+After the dump has been created by one of the dump utilities the dump should
+normally be copied over to a filesystem in order to send it e.g.
+to a service organization for analysis.
+
+To copy the dump to a filesystem, you can use command dd as illustrated below:
+
+5.1 Dasd:
+
+Copying the dump from dasd to a filesystem is only necessary, if the dump
+cannot be analyzed locally on the system, but must be e.g. sent to the service
+organization.
+
+- Copy the dump from raw dasd to filesystem (e.g. Dump dasd is /dev/dasdx):
+
+ > dd if=/dev/dasdx1 of=/DUMPDIR/mydump bs=1M \
+ count=<memory size of the crashed system in MB + 1MB>
+
+ or if you want to compress the dump:
+
+ > dd if=/dev/dasdx1 bs=1M count=<memory size in MB + 1MB> | bzip2 \
+ > /DUMPDIR/dump.bz2
+
+5.2 Tape:
+
+ 1. Rewind the tape:
+
+ > mt -f /dev/ntibm0 rewind
+
+ 2. Skip first file on tape (first file is the dump utility itself):
+
+ > mt -f /dev/ntibm0 fsf
+
+ 3. Copy dump from tape to filesystem:
+
+ > dd if=/dev/ntibm0 of=/DUMPDIR/mydump bs=32k
+
+ or if you want to compress the dump:
+
+ > dd if=/dev/ntibm0 bs=32k | bzip2 > /DUMPDIR/mydump.bz2
+
+Note: mt is a tape utility which has be be installed first. You can use
+any other available tape tool to skip the first file.
+
+6. Analyzing the dumps
+
+The dump analysis tool 'lcrash' can be used to analyze the generated dumps.
+The required version of the lkcdutilities is 3.1.2
+(see ftp://oss.sgi.com/projects/lkcd/download/3.1.2/lkcdutils/)
+
+lcrash gets three input files:
+- System.map of the crashed kernel
+- the dump
+- Kerntypes file of the crashed kernel with Kernel type information
+ There is provided a patch for the Kerntypes file under
+ http://oss.software.ibm.com/developerworks/opensource/linux390
+
+Call lcrash:
+> lcrash System.map mydump Kerntypes
+
+Note: If you used dumpeckd.boot to take the dump it is possible to specify
+the /dev/dasdx1 dump device directly as input file to lcrash instead of
+a copy in the filesystem:
+> lcrash System.map /dev/dasdx1 Kerntypes
+
+7. Supported Devices
+
+The dump tools should work with the following devices:
+
+- ECKD Dasds:
+ + 3380
+ + 3390
+
+- Tape units:
+ + 3480
+ + 3490
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/usb/usb-serial.txt linux/Documentation/usb/usb-serial.txt
--- v2.2.19/Documentation/usb/usb-serial.txt Sun Mar 25 17:37:29 2001
+++ linux/Documentation/usb/usb-serial.txt Wed Oct 10 01:40:42 2001
@@ -73,6 +73,11 @@
X the port to use for the HotSync transfer. The "Generic" port can be used
X for other device communication, such as a PPP link.
X
+ If after pressing the sync button, nothing shows up in the system log,
+ try resetting the Visor, first a hot reset, and then a cold reset if
+ necessary. Some Visors need this before they can talk to the USB port
+ properly.
+
X There is a webpage and mailing lists for this portion of the driver at:
X http://usbvisor.sourceforge.net/
X

@@ -103,22 +108,22 @@
X

X Keyspan USA-series Serial Adapters
X
- Single and Dual port adapters - driver uses Keyspan supplied
+ Single, Dual and Quad port adapters - driver uses Keyspan supplied
X firmware and is being developed with their support.
X
- Driver isn't as far advanced as Keyspan PDA driver mentioned above.
-
X Current status:
- Things that work:
- Firmware upload for USA-18X, USA-28, USA-28X, USA-19 and USA-19W
- Simple character I/O fixed at 9600 baud on USA-19 only
-
- Things that don't:
- Everything else. (for now...)
+ The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and
+ have been pretty throughly tested at various baud rates with 8-N-1
+ character settings. Other character lengths and parity setups are
+ presently untested.
+
+ The USA-28 isn't yet supported though doing so should be pretty
+ straightforward. Contact the maintainer if you require this
+ functionality.
+

+ More information is available at:

+ http://www.linuxcare.com.au/hugh/keyspan.html
X
- Big Things on the todo list:
- Driver is in infancy, much functionality remains to be added
-
X
X FTDI Single Port Serial Driver
X
@@ -139,8 +144,8 @@
X (plus a parallel port) and 4 port USB serial converters. The driver
X does NOT yet support the Digi AccelePort USB 8.
X
- This driver works under SMP with the usb-uhci driver. It does not work
- under SMP with the uhci driver.
+ This driver works under SMP with the usb-uhci driver. It does not
+ work under SMP with the uhci driver.
X
X The driver is generally working, though we still have a few more ioctls
X to implement and final testing and debugging to do. The paralled port
@@ -157,6 +162,7 @@
X Belkin USB Serial Adapter F5U103
X
X Single port DB-9/PS-2 serial adapter from Belkin with firmware by eTEK Labs.
+ The Peracom single port serial adapter also works with this driver.
X
X Current status:
X The following have been tested and work:
@@ -190,10 +196,55 @@
X This is an experimental driver to provide connectivity support for the
X client synchronization tools for an Empeg empeg-car mp3 player.
X
+ Tips:
+
+ * Don't forget to create the device nodes for ttyUSB{0,1,2,...}
+ * modprobe empeg (modprobe is your friend)
+ * emptool --usb /dev/ttyUSB0 (or whatever you named your device node)
+
X The driver is still pretty new, so some testing 'in the wild' would be
X helpful. :)
X
X
+MCT USB Single Port Serial Adapter U232
+
+ This driver is for the MCT USB-RS232 Converter (25 pin, Model No.
+ U232-P25) from Magic Control Technology Corp. (there is also a 9 pin
+ Model No. U232-P9). More information about this device can be found
+ at the manufacture's web-site: http://www.mct.com.tw.
+
+ The driver is generally working, though it still needs some more
+ testing. It is derived from the Belkin USB Serial Adapter F5U103
+ driver and its TODO list is valid for this driver as well.
+
+ This driver has also been found to work for other products, which have
+ the same Vendor ID but different Product IDs. Sitecom's U232-P25
+ serial converter uses Product ID 0x230 and Vendor ID 0x711 and works with
+ this driver. Also, D-Link's DU-H3SP USB BAY also works with this driver.
+
+
+Inside Out Networks Edgeport Driver
+
+ This driver supports all devices made by Inside Out Networks, specifically
+ the following models:


+ Edgeport/4
+ Rapidport/4
+ Edgeport/4t
+ Edgeport/2
+ Edgeport/4i
+ Edgeport/2i
+ Edgeport/421
+ Edgeport/21
+ Edgeport/8
+ Edgeport/8 Dual
+ Edgeport/2D8
+ Edgeport/4D8
+ Edgeport/8i
+ Edgeport/2 DIN
+ Edgeport/4 DIN
+ Edgeport/16 Dual
+
+

X Generic Serial driver
X
X If your device is not one of the above listed devices, compatible with


@@ -205,7 +256,7 @@
X

X To enable the generic driver to recognize your device, build the driver
X as a module and load it by the following invocation:
- insmod usb-serial vendor=0x#### product=0x####
+ insmod usbserial vendor=0x#### product=0x####
X where the #### is replaced with the hex representation of your device's
X vendor id and product id.
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Documentation/video4linux/API.html linux/Documentation/video4linux/API.html
--- v2.2.19/Documentation/video4linux/API.html Sun Mar 25 17:31:59 2001
+++ linux/Documentation/video4linux/API.html Wed Oct 10 01:40:42 2001
@@ -362,7 +362,7 @@
X <TR><TD>First Octet</TD><TD>Least Siginificant Byte of RDS Block</TD></TR>
X <TR><TD>Second Octet</TD><TD>Most Siginificant Byte of RDS Block
X <TR><TD>Third Octet</TD><TD>Bit 7:</TD><TD>Error bit. Indicates that
-an uncorrectable error occured during reception of this block.</TD></TR>
+an uncorrectable error occurred during reception of this block.</TD></TR>
X <TR><TD>&nbsp;</TD><TD>Bit 6:</TD><TD>Corrected bit. Indicates that
X an error was corrected for this data block.</TD></TR>
X <TR><TD>&nbsp;</TD><TD>Bits 5-3:</TD><TD>Reeived Offset. Indicates the
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/MAINTAINERS linux/MAINTAINERS
--- v2.2.19/MAINTAINERS Sun Mar 25 17:37:29 2001
+++ linux/MAINTAINERS Wed Oct 31 14:08:37 2001
@@ -199,9 +199,7 @@
X S: Supported
X
X COMPUTONE INTELLIPORT MULTIPORT CARD
-P: Doug McNash
X P: Michael H. Warfield
-M: Doug McNash <dmc...@computone.com>
X M: Michael H. Warfield <m...@wittsend.com>
X W: http://www.computone.com/
X W: http://www.wittsend.com/computone.html
@@ -211,7 +209,8 @@
X CONFIGURE, MENUCONFIG, XCONFIG
X P: Michael Elizabeth Chastain
X M: m...@shout.net
-L: linux-...@torque.net
+L: kbuild...@lists.sourceforge.net
+W: http://kbuild.sourceforge.net
X S: Maintained
X
X CONFIGURE.HELP
@@ -242,8 +241,8 @@
X S: Supported
X
X CYCLADES PC300 DRIVER
-P: Ivan Passos
-M: iv...@cyclades.com
+P: Daniela Squassoni
+M: dan...@cyclades.com
X W: http://www.cyclades.com/
X S: Supported
X
@@ -532,17 +531,13 @@
X W: http://www.cs.uit.no/linux-irda/
X S: Maintained
X
-ISDN SUBSYSTEM (general)
-P: Fritz Elfert
-M: fr...@isdn4linux.de
-L: isdn4...@listserv.isdn4linux.de
-W: www.isdn4linux.de
-S: Maintained
-
-ISDN SUBSYSTEM (HiSax)
+ISDN SUBSYSTEM
X P: Karsten Keil
-M: ke...@isdn4linux.de
+M: kk...@suse.de
+P: Kai Germaschewski
+M: kai.germ...@gmx.de
X L: isdn4...@listserv.isdn4linux.de
+W: http://www.isdn4linux.de
X S: Maintained
X
X ISDN SUBSYSTEM (Eicon active card driver)
@@ -764,13 +759,13 @@
X P: Phil Blundell
X M: Philip....@pobox.com
X P: Tim Waugh
-M: t...@cyberelk.demon.co.uk
+M: t...@cyberelk.net
X P: David Campbell
X M: camp...@torque.net
X P: Andrea Arcangeli
X M: and...@e-mind.com
X L: linux-...@torque.net
-W: http://www.cyberelk.demon.co.uk/parport.html
+W: http://people.redhat.com/twaugh/parport/
X S: Maintained
X
X PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES
@@ -1173,6 +1168,13 @@
X W: http://yaina.de/jreuter
X W: http://www.qsl.net/dl1bke/
X L: linux...@vger.kernel.org
+S: Maintained
+
+ZF MACHZ WATCHDOG
+P: Fernando Fuganti
+M: fug...@conectiva.com.br
+M: fug...@netbank.com.br
+W: http://cvs.conectiva.com.br/drivers/ZFL-watchdog/
X S: Maintained
X
X THE REST
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/Makefile linux/Makefile
--- v2.2.19/Makefile Sun Mar 25 17:39:55 2001
+++ linux/Makefile Fri Nov 2 15:43:07 2001
@@ -1,7 +1,7 @@
X VERSION = 2
X PATCHLEVEL = 2
-SUBLEVEL = 19
-EXTRAVERSION =
+SUBLEVEL = 20
+EXTRAVERSION =
X
X ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
X
@@ -200,6 +200,10 @@
X
X ifeq ($(CONFIG_USB),y)
X DRIVERS := $(DRIVERS) drivers/usb/usbdrv.o
+else
+ ifdef CONFIG_INPUT_ADBHID
+ DRIVERS := $(DRIVERS) drivers/usb/usbdrv.o


+ endif
X endif
X

X ifeq ($(CONFIG_I2O),y)
@@ -423,7 +427,8 @@
X rm -rf modules
X
X distclean: mrproper
- rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
+ rm -f core `find . \( -not -type d \) -and \
+ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
X -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
X -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- v2.2.19/arch/alpha/kernel/entry.S Sun Mar 25 17:37:29 2001
+++ linux/arch/alpha/kernel/entry.S Wed Oct 10 01:40:42 2001
@@ -32,11 +32,12 @@
X #define TASK_ADDR_LIMIT 24
X #define TASK_EXEC_DOMAIN 32
X #define TASK_NEED_RESCHED 40
+#define TASK_PTRACE 48
X
X /*
X * task flags (must match include/linux/sched.h):
X */
-#define PF_PTRACED 0x00000010
+#define PT_PTRACED 0x00000001
X
X /*
X * This defines the normal kernel pt-regs layout.
@@ -558,7 +559,7 @@
X ldq $3,TASK_FLAGS($8)
X stq $17,SP_OFF+32($30)
X s8addq $0,$5,$5
- and $3,PF_PTRACED,$3
+ and $3,PT_PTRACED,$3
X stq $18,SP_OFF+40($30)
X bne $3,strace
X beq $4,1f
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/alpha/kernel/ptrace.c linux/arch/alpha/kernel/ptrace.c
--- v2.2.19/arch/alpha/kernel/ptrace.c Sun Mar 25 17:31:46 2001
+++ linux/arch/alpha/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -527,10 +527,10 @@
X ret = -EPERM;
X if (request == PTRACE_TRACEME) {


X /* are we already being traced? */

- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)

X goto out;


X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;

X ret = 0;
X goto out;


X }
@@ -553,9 +553,9 @@

X && !capable(CAP_SYS_PTRACE))
X goto out;


X /* the same process cannot be attached many times */

- if (child->flags & PF_PTRACED)


+ if (child->ptrace & PT_PTRACED)

X goto out;


- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;

X if (child->p_pptr != current) {
X REMOVE_LINKS(child);
X child->p_pptr = current;
@@ -566,7 +566,7 @@
X goto out;
X }
X ret = -ESRCH;
- if (!(child->flags & PF_PTRACED)) {
+ if (!(child->ptrace & PT_PTRACED)) {
X DBG(DBG_MEM, ("child not traced\n"));
X goto out;
X }
@@ -622,9 +622,9 @@
X if ((unsigned long) data > _NSIG)
X goto out;


X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X wake_up_process(child);
X /* make sure single-step breakpoint is gone. */
@@ -652,7 +652,7 @@
X if ((unsigned long) data > _NSIG)
X goto out;
X child->tss.bpt_nsaved = -1; /* mark single-stepping */


- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;

X wake_up_process(child);
X child->exit_code = data;

X /* give it a chance to run. */
@@ -663,7 +663,7 @@
X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;


- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
X wake_up_process(child);
X child->exit_code = data;

X REMOVE_LINKS(child);
@@ -686,8 +686,8 @@
X asmlinkage void
X syscall_trace(void)
X {


- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;

X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/alpha/kernel/signal.c linux/arch/alpha/kernel/signal.c
--- v2.2.19/arch/alpha/kernel/signal.c Sun Mar 25 17:31:46 2001
+++ linux/arch/alpha/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -621,7 +621,7 @@
X if (!signr)
X break;
X

- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {

X /* Let the debugger run. */


X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -692,12 +692,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:

- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/alpha/kernel/sys_alcor.c linux/arch/alpha/kernel/sys_alcor.c
--- v2.2.19/arch/alpha/kernel/sys_alcor.c Sun Mar 25 17:31:46 2001
+++ linux/arch/alpha/kernel/sys_alcor.c Wed Oct 10 01:40:43 2001
@@ -15,6 +15,7 @@
X #include <linux/sched.h>
X #include <linux/pci.h>
X #include <linux/init.h>
+#include <linux/reboot.h>
X
X #include <asm/ptrace.h>
X #include <asm/system.h>
@@ -186,13 +187,21 @@
X static void
X alcor_kill_arch (int mode, char *reboot_cmd)
X {
- /* Who said DEC engineer's have no sense of humor? ;-) */
- if (alpha_using_srm) {
- *(vuip) GRU_RESET = 0x0000dead;
- mb();
+ switch(mode) {
+ case LINUX_REBOOT_CMD_RESTART:
+ /* Who said DEC engineer's have no sense of humor? ;-) */
+ if (alpha_using_srm) {
+ *(vuip) GRU_RESET = 0x0000dead;
+ mb();
+ }
+ break;
+ case LINUX_REBOOT_CMD_HALT:
+ break;
+ case LINUX_REBOOT_CMD_POWER_OFF:
+ break;
X }
X
- generic_kill_arch(mode, reboot_cmd);
+ halt();
X }
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/alpha/kernel/sys_miata.c linux/arch/alpha/kernel/sys_miata.c
--- v2.2.19/arch/alpha/kernel/sys_miata.c Sun Mar 25 17:31:46 2001
+++ linux/arch/alpha/kernel/sys_miata.c Wed Oct 10 01:40:43 2001
@@ -14,6 +14,7 @@
X #include <linux/sched.h>
X #include <linux/pci.h>
X #include <linux/init.h>
+#include <linux/reboot.h>
X
X #include <asm/ptrace.h>
X #include <asm/system.h>
@@ -274,12 +275,22 @@
X static void
X miata_kill_arch (int mode, char *reboot_cmd)
X {
- /* Who said DEC engineers have no sense of humor? ;-) */
- if (alpha_using_srm) {
- *(vuip) PYXIS_RESET = 0x0000dead;
- mb();
- }
- generic_kill_arch(mode, reboot_cmd);
+ switch(mode) {
+ case LINUX_REBOOT_CMD_HALT:
+ break;
+ case LINUX_REBOOT_CMD_RESTART:
+ /* Who said DEC engineers have no sense of humor? ;-) */
+ if (alpha_using_srm) {
+ *(vuip) PYXIS_RESET = 0x0000dead;
+ mb();
+ }
+ generic_kill_arch(mode, reboot_cmd);
+ break;
+ case LINUX_REBOOT_CMD_POWER_OFF:
+ break;
+ }
+
+ halt();
X }
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/alpha/kernel/traps.c linux/arch/alpha/kernel/traps.c
--- v2.2.19/arch/alpha/kernel/traps.c Sun Mar 25 17:37:29 2001
+++ linux/arch/alpha/kernel/traps.c Wed Oct 10 01:40:43 2001
@@ -19,6 +19,8 @@
X #include <asm/uaccess.h>
X #include <asm/unaligned.h>
X #include <asm/sysinfo.h>
+#include <asm/hwrpb.h>
+#include <asm/machvec.h>
X
X #include "proto.h"
X
@@ -98,6 +100,30 @@
X
X static alist * int_name[] = {inta_name, intl_name, ints_name, intm_name};
X
+static int opDEC_testing = 0;
+static int opDEC_fix = 0;
+static unsigned long opDEC_test_pc = 0;
+
+static void
+opDEC_check(void)
+{
+ unsigned long test_pc;
+
+ lock_kernel();
+ opDEC_testing = 1;
+
+ __asm__ __volatile__(
+ " br %0,1f\n"
+ "1: addq %0,8,%0\n"
+ " stq %0,%1\n"
+ " cvttq/svm $f31,$f31\n"
+ : "=&r"(test_pc), "=m"(opDEC_test_pc)
+ : );
+
+ opDEC_testing = 0;
+ unlock_kernel();
+}
+
X static char *
X assoc(int fcode, alist * a)
X {
@@ -358,7 +384,9 @@
X unsigned long a2, unsigned long a3, unsigned long a4,
X unsigned long a5, struct pt_regs regs)
X {
- die_if_kernel("Instruction fault", &regs, type, 0);
+ if (!opDEC_testing || type != 4) {
+ die_if_kernel("Instruction fault", &regs, type, 0);
+ }
X switch (type) {
X case 0: /* breakpoint */
X if (ptrace_cancel_bpt(current)) {
@@ -414,6 +442,22 @@
X
X case 4: /* opDEC */
X if (implver() == IMPLVER_EV4) {
+ /* The some versions of SRM do not handle
+ the opDEC properly - they return the PC of the
+ opDEC fault, not the instruction after as the
+ Alpha architecture requires. Here we fix it up.
+ We do this by intentionally causing an opDEC
+ fault during the boot sequence and testing if
+ we get the correct PC. If not, we set a flag
+ to correct it every time through.
+ */
+ if (opDEC_testing && regs.pc == opDEC_test_pc) {
+ opDEC_fix = 4;
+ printk("opDEC fixup enabled.\n");
+ }
+
+ regs.pc += opDEC_fix;
+
X /* EV4 does not implement anything except normal
X rounding. Everything else will come here as
X an illegal instruction. Emulate them. */
@@ -1105,4 +1149,11 @@
X wrent(entUna, 4);
X wrent(entSys, 5);
X wrent(entDbg, 6);
+
+ /* Hack for Multia (UDB) and JENSEN: some of their SRMs have
+ * a bug in the handling of the opDEC fault. Fix it up.
+ */
+ if (implver() == IMPLVER_EV4) {
+ opDEC_check();
+ }
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/arm/kernel/ptrace.c linux/arch/arm/kernel/ptrace.c
--- v2.2.19/arch/arm/kernel/ptrace.c Sun Mar 25 17:37:29 2001
+++ linux/arch/arm/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -662,9 +662,9 @@
X if ((unsigned long) data > _NSIG)
X break;


X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;

X child->exit_code = data;
X /* make sure single-step breakpoint is gone. */
X ptrace_cancel_bpt(child);
@@ -697,7 +697,7 @@
X if ((unsigned long) data > _NSIG)
X break;
X child->tss.debug.nsaved = -1;


- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X /* give it a chance to run. */
X wake_up_process(child);
@@ -711,7 +711,7 @@
X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X break;


- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
X child->exit_code = data;

X REMOVE_LINKS(child);
X child->p_pptr = child->p_opptr;
@@ -799,10 +799,10 @@
X ret = -EPERM;
X if (request == PTRACE_TRACEME) {


X /* are we already being traced? */

- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)

X goto out;


X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;

X ret = 0;
X goto out;
X }
@@ -826,9 +826,9 @@
X (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
X goto out;


X /* the same process cannot be attached many times */

- if (child->flags & PF_PTRACED)


+ if (child->ptrace & PT_PTRACED)

X goto out;


- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X

X if (child->p_pptr != current) {
X REMOVE_LINKS(child);
@@ -841,7 +841,7 @@
X goto out;
X }
X ret = -ESRCH;
- if (!(child->flags & PF_PTRACED))
+ if (!(child->ptrace & PT_PTRACED))
X goto out;
X if (child->state != TASK_STOPPED && request != PTRACE_KILL)
X goto out;
@@ -857,8 +857,8 @@
X
X asmlinkage void syscall_trace(void)
X {


- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;

X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/arm/kernel/signal.c linux/arch/arm/kernel/signal.c
--- v2.2.19/arch/arm/kernel/signal.c Sun Mar 25 17:37:29 2001
+++ linux/arch/arm/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -474,7 +474,7 @@
X if (!signr)
X break;
X

- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {

X /* Let the debugger run. */


X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -544,12 +544,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:

- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/boot/compressed/head.S linux/arch/i386/boot/compressed/head.S
--- v2.2.19/arch/i386/boot/compressed/head.S Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/boot/compressed/head.S Wed Oct 10 01:40:43 2001
@@ -65,6 +65,7 @@
X movl %eax,0x000000 # loop forever if it isn't
X cmpl %eax,0x100000
X je 1b
+
X /*
X * Initialize eflags. Some BIOS's leave bits like NT set. This would
X * confuse the debugger if this code is traced.
@@ -86,10 +87,14 @@
X * Do the decompression, and jump to the new kernel..
X */
X subl $16,%esp # place for structure on the stack
- pushl %esp # address of structure as first arg
+ movl %esp,%eax
+ pushl %esi # real mode pointer as second arg
+ pushl %eax # address of structure as first arg
X call SYMBOL_NAME(decompress_kernel)
X orl %eax,%eax
X jnz 3f
+ popl %esi # discard address
+ popl %esi # real mode pointer
X xorl %ebx,%ebx
X ljmp $(__KERNEL_CS), $0x100000
X
@@ -104,11 +109,14 @@
X movl $0x1000,%edi
X movl $move_routine_end,%ecx
X subl %esi,%ecx
+ addl $3,%ecx
+ shrl $2,%ecx
X cld
X rep
- movsb
+ movsl
X
X popl %esi # discard the address
+ popl %ebx # real mode pointer
X popl %esi # low_buffer_start
X popl %ecx # lcount
X popl %edx # high_buffer_start
@@ -122,18 +130,21 @@
X * if we were high loaded. This _must_ PIC-code !
X */
X move_routine_start:
+ movl %ecx,%ebp
+ shrl $2,%ecx
+ rep
+ movsl
+ movl %ebp,%ecx
+ andl $3,%ecx
X rep
X movsb
X movl %edx,%esi
X movl %eax,%ecx # NOTE: rep movsb won't move if %ecx == 0
+ addl $3,%ecx
+ shrl $2,%ecx
X rep
- movsb
+ movsl
+ movl %ebx,%esi # Restore setup pointer
X xorl %ebx,%ebx
-/*
- * Well, the kernel relies on %esp pointing into low mem,
- * with the decompressor loaded high this is no longer true,
- * so we set esp here.
- */
- mov $0x90000,%esp
X ljmp $(__KERNEL_CS), $0x100000
X move_routine_end:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/boot/compressed/misc.c linux/arch/i386/boot/compressed/misc.c
--- v2.2.19/arch/i386/boot/compressed/misc.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/boot/compressed/misc.c Wed Oct 10 01:40:43 2001
@@ -74,11 +74,13 @@
X /*
X * This is set up by the setup-routine at boot-time
X */
-#define EXT_MEM_K (*(unsigned short *)0x90002)
+static unsigned char *real_mode; /* Pointer to real-mode data */
+
+#define EXT_MEM_K (*(unsigned short *)(real_mode + 0x2))
X #ifndef STANDARD_MEMORY_BIOS_CALL
-#define ALT_MEM_K (*(unsigned long *) 0x901e0)
+#define ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0))
X #endif
-#define SCREEN_INFO (*(struct screen_info *)0x90000)
+#define SCREEN_INFO (*(struct screen_info *)(real_mode+0))
X
X extern char input_data[];
X extern int input_len;
@@ -98,13 +100,13 @@


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 05'
echo 'File patch-2.2.20 is continued in part 06'
echo "06" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:23 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part24

#!/bin/sh -x
# this is part 24 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 24; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ falc_t *pfalc = (falc_t *)&chan->falc;
+ uclong falcbase = card->hw.falcbase;
+

+ if (conf->media == LINE_T1) {
+ cpc_writeb(falcbase + F_REG(FMR5, ch),

+ cpc_readb(falcbase + F_REG(FMR5, ch)) | FMR5_XLU);


+ } else {
+ cpc_writeb(falcbase + F_REG(FMR3, ch),

+ cpc_readb(falcbase + F_REG(FMR3, ch)) | FMR3_XLU);
+ }


+ // EVENT_FALC_ABNORMAL
+ if (conf->media == LINE_T1) {
+ /* Disable this interrupt as it may otherwise interfere with
+ other working boards. */
+ cpc_writeb(falcbase + F_REG(IMR0, ch),
+ cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN);
+ }
+ falc_disable_comm(card, ch);
+ // EVENT_FALC_ABNORMAL

+ pfalc->loop_gen = 1;
+}
+
+/*----------------------------------------------------------------------------
+ * falc_generate_loop_down_code


+ *----------------------------------------------------------------------------
+ * Description: This routine writes the proper FALC chip register in order

+ * to generate a LOOP deactivation code over a T1/E1 line.


+ *----------------------------------------------------------------------------
+ */
+void

+falc_generate_loop_down_code(pc300_t *card, int ch)


+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;

+ falc_t *pfalc = (falc_t *)&chan->falc;
+ uclong falcbase = card->hw.falcbase;
+

+ if (conf->media == LINE_T1) {
+ cpc_writeb(falcbase + F_REG(FMR5, ch),

+ cpc_readb(falcbase + F_REG(FMR5, ch)) | FMR5_XLD);


+ } else {
+ cpc_writeb(falcbase + F_REG(FMR3, ch),

+ cpc_readb(falcbase + F_REG(FMR3, ch)) | FMR3_XLD);


+ }
+ pfalc->sync = 0;
+ cpc_writeb(falcbase + card->hw.cpld_reg2,
+ cpc_readb(falcbase + card->hw.cpld_reg2) &

+ ~(CPLD_REG2_FALC_LED2 << (2*ch)));
+ pfalc->active = 0;

+//? falc_issue_cmd(card, ch, CMDR_XRES);
+ pfalc->loop_gen = 0;
+}
+
+/*----------------------------------------------------------------------------
+ * falc_pattern_test
+ *----------------------------------------------------------------------------
+ * Description: This routine generates a pattern code and checks
+ * it on the reception side.


+ *----------------------------------------------------------------------------
+ */
+void

+falc_pattern_test(pc300_t *card, int ch, unsigned int activate)


+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];
+ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;
+ falc_t *pfalc = (falc_t *)&chan->falc;
+ uclong falcbase = card->hw.falcbase;
+

+ if (activate) {
+ pfalc->prbs = 1;
+ pfalc->bec = 0;


+ if (conf->media == LINE_T1) {

+ /* Disable local loop activation/deactivation detect */
+ cpc_writeb(falcbase + F_REG(IMR3, ch),
+ cpc_readb(falcbase + F_REG(IMR3, ch)) | IMR3_LLBSC);
+ } else {
+ /* Disable local loop activation/deactivation detect */
+ cpc_writeb(falcbase + F_REG(IMR1, ch),
+ cpc_readb(falcbase + F_REG(IMR1, ch)) | IMR1_LLBSC);
+ }
+ /* Activates generation and monitoring of PRBS
+ * (Pseudo Random Bit Sequence) */
+ cpc_writeb(falcbase + F_REG(LCR1, ch),
+ cpc_readb(falcbase + F_REG(LCR1, ch)) | LCR1_EPRM | LCR1_XPRBS);
+ } else {
+ pfalc->prbs = 0;
+ /* Deactivates generation and monitoring of PRBS
+ * (Pseudo Random Bit Sequence) */
+ cpc_writeb(falcbase + F_REG(LCR1, ch),
+ cpc_readb(falcbase + F_REG(LCR1, ch)) & ~(LCR1_EPRM | LCR1_XPRBS));


+ if (conf->media == LINE_T1) {

+ /* Enable local loop activation/deactivation detect */
+ cpc_writeb(falcbase + F_REG(IMR3, ch),
+ cpc_readb(falcbase + F_REG(IMR3, ch)) & ~IMR3_LLBSC);
+ } else {
+ /* Enable local loop activation/deactivation detect */
+ cpc_writeb(falcbase + F_REG(IMR1, ch),
+ cpc_readb(falcbase + F_REG(IMR1, ch)) & ~IMR1_LLBSC);
+ }
+ }
+}
+
+/*----------------------------------------------------------------------------
+ * falc_pattern_test_error
+ *----------------------------------------------------------------------------
+ * Description: This routine returns the bit error counter value
+ *----------------------------------------------------------------------------
+ */
+ucshort falc_pattern_test_error(pc300_t *card, int ch)


+{
+ pc300ch_t *chan = (pc300ch_t *)&card->chan[ch];

+ falc_t *pfalc = (falc_t *)&chan->falc;
+

+ return (pfalc->bec);
+}
+
X /**********************************/
X /*** Net Interface Routines ***/
X /**********************************/
-int cpc_queue_xmit(struct sk_buff *skb, struct device *dev)
+
+static void
+cpc_trace (struct device *dev, struct sk_buff *skb_main, char rx_tx)


+{
+ struct sk_buff *skb;
+

+ if ((skb = dev_alloc_skb(10 + skb_main->len)) == NULL) {
+ printk("%s: out of memory\n", dev->name);
+ return;
+ }
+ skb_put (skb, 10 + skb_main->len);
+

+ skb->dev = dev;

+ skb->protocol = htons(ETH_P_CUST);
+ skb->mac.raw = skb->data;
+ skb->pkt_type = PACKET_HOST;
+ skb->len = 10 + skb_main->len;
+
+ memcpy(&skb->data[0], dev->name, 5);
+ skb->data[5] = '[';
+ skb->data[6] = rx_tx;
+ skb->data[7] = ']';
+ skb->data[8] = ':';
+ skb->data[9] = ' ';
+ memcpy(&skb->data[10], skb_main->data, skb_main->len);
+
+ netif_rx(skb);
+}
+
+int
+cpc_queue_xmit(struct sk_buff *skb, struct device *dev)
X {
X pc300dev_t *d = (pc300dev_t *)dev->priv;
X pc300ch_t *chan = (pc300ch_t *)d->chan;
X pc300_t *card = (pc300_t *)chan->card;
- struct enet_statistics *stats = &d->hdlc->stats;
+ struct net_device_stats *stats = &d->hdlc->stats;
X int ch = chan->channel;
X volatile pcsca_bd_t *ptdescr;
X uclong flags;
@@ -1281,6 +1716,38 @@
X int i;
X #endif
X
+ if (chan->conf.monitor) {
+ /* In monitor mode no Tx is done: ignore packet */
+ dev_kfree_skb(skb);
+ return 0;
+ } else if (!(dev->flags & IFF_RUNNING)) {
+ /* DCD must be OFF: drop packet */
+ dev_kfree_skb(skb);
+ stats->tx_errors++;
+ stats->tx_carrier_errors++;
+ return 0;
+ } else if (cpc_readb(card->hw.scabase + M_REG(ST3, ch)) & ST3_DCD) {
+ printk("%s: DCD is OFF. Going admnistrative down.\n", dev->name);
+ stats->tx_errors++;
+ stats->tx_carrier_errors++;
+ dev_kfree_skb(skb);
+ dev->flags &= ~IFF_RUNNING;
+ CPC_LOCK(card, flags);
+ if (d->tx_skb) {
+ dev_kfree_skb(d->tx_skb);
+ d->tx_skb = NULL;
+ }
+ cpc_writeb(card->hw.scabase + M_REG(CMD, ch), CMD_TX_BUF_CLR);
+ if (card->hw.type == PC300_TE) {


+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,

+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) &
+ ~(CPLD_REG2_FALC_LED1 << (2*ch)));
+ }


+ dev->tbusy = 0;

+ CPC_UNLOCK(card, flags);


+ return 0;
+ }
+

X if (dev->tbusy) {
X ucchar ilar;
X
@@ -1303,8 +1770,8 @@
X d->tx_skb = NULL;
X }
X if (card->hw.type == PC300_TE) {


- cpc_writeb(card->hw.falcbase + CPLD_REG2,

- cpc_readb(card->hw.falcbase + CPLD_REG2) &


+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,

+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) &
X ~(CPLD_REG2_FALC_LED1 << (2*ch)));
X }
X CPC_UNLOCK(card, flags);
@@ -1345,6 +1812,9 @@
X printk("\n");
X #endif
X
+ if (d->trace_on) {
+ cpc_trace (dev, skb, 'T');
+ }
X d->tx_skb = skb;


X dev->trans_start = jiffies;
X

@@ -1355,8 +1825,8 @@
X cpc_writeb(card->hw.scabase + M_REG(CMD, ch), CMD_TX_ENA);
X cpc_writeb(card->hw.scabase + DSR_TX(ch), DSR_DE);
X if (card->hw.type == PC300_TE) {


- cpc_writeb(card->hw.falcbase + CPLD_REG2,
- cpc_readb(card->hw.falcbase + CPLD_REG2) |
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) |

X (CPLD_REG2_FALC_LED1 << (2*ch)));
X }
X CPC_UNLOCK(card, flags);
@@ -1371,7 +1841,7 @@
X pc300dev_t *d = (pc300dev_t *)dev->priv;
X pc300ch_t *chan = (pc300ch_t *)d->chan;
X pc300_t *card = (pc300_t *)chan->card;
- struct enet_statistics *stats = &hdlc->stats;
+ struct net_device_stats *stats = &hdlc->stats;
X int ch = chan->channel;
X #ifdef PC300_DEBUG_RX
X int i;
@@ -1382,15 +1852,30 @@
X while (1) {
X if ((rxb = dma_get_rx_frame_size(card, ch)) == -1)
X return;
-
- skb = dev_alloc_skb(rxb);
- if (skb == NULL) {
- printk("%s: Memory squeeze!!\n", dev->name);
- return;
+
+ if (rxb > (dev->mtu + 40)) {
+ printk("%s : MTU exceeded %d\n", dev->name, rxb);
+ skb = NULL;
+ } else {
+ skb = dev_alloc_skb(rxb);
+ if (skb == NULL) {
+ printk("%s: Memory squeeze!!\n", dev->name);
+ return;
+ }


+ skb->dev = dev;

X }


- skb->dev = dev;

X
- if((rxb = dma_buf_read(card, ch, skb)) <= 0) {
+ if(((rxb = dma_buf_read(card, ch, skb)) <= 0) || (skb == NULL)) {
+#ifdef PC300_DEBUG_RX
+ printk("%s: rxb = %x\n", dev->name, rxb);
+#endif
+ if ((skb == NULL) && (rxb >= 0)) {
+ /* rxb > dev->mtu */
+ stats->rx_errors++;
+ stats->rx_length_errors++;
+ continue;
+ }
+
X if (rxb < 0) { /* Invalid frame */
X rxb = -rxb;
X if (rxb & DST_OVR) {
@@ -1406,7 +1891,9 @@
X stats->rx_frame_errors++;
X }
X }
- dev_kfree_skb(skb);
+ if (skb) {
+ dev_kfree_skb(skb);
+ }
X continue;
X }
X
@@ -1416,6 +1903,9 @@
X printk(" %02x", *(skb->data + i));
X printk("\n");
X #endif
+ if (d->trace_on) {
+ cpc_trace (dev, skb, 'R');
+ }
X
X switch(hdlc->mode & ~MODE_SOFT) {
X #ifdef CONFIG_PC300_X25
@@ -1591,6 +2081,7 @@
X hdlc_device *hdlc = d->hdlc;
X struct device *dev = hdlc_to_dev(hdlc);
X
+ spin_lock(&card->card_lock);
X dev->interrupt = 1;
X
X /**** Reception ****/
@@ -1601,32 +2092,36 @@
X cpc_writeb(scabase + DSR_RX(ch), drx_stat | DSR_DWE);
X
X #ifdef PC300_DEBUG_INTR
- printk("sca_intr: RX intr (st=0x%08lx, dsr=0x%02x)\n",
- status, drx_stat);
+ printk("sca_intr: RX intr chan[%d] (st=0x%08lx, dsr=0x%02x)\n",
+ ch, status, drx_stat);
X #endif
X if (status & IR0_DRX(IR0_DMIA, ch)) {
X if (drx_stat & DSR_BOF) {
+ if ((cpc_readb(scabase + DSR_RX(ch)) & DSR_DE)) {
+ rx_dma_stop(card, ch);
+ }
+ cpc_net_rx(hdlc);
+ /* Discard invalid frames */
+ hdlc->stats.rx_errors++;
+ hdlc->stats.rx_over_errors++;
X chan->rx_first_bd = 0;
X chan->rx_last_bd = N_DMA_RX_BUF - 1;
- cpc_writel(scabase + DRX_REG(CDAL, ch),
- RX_BD_ADDR(ch, chan->rx_first_bd));
- cpc_writel(scabase + DRX_REG(EDAL, ch),
- RX_BD_ADDR(ch, chan->rx_last_bd));
- cpc_writew(scabase + DRX_REG(BFLL, ch), BD_DEF_LEN);
- cpc_writeb(scabase + DSR_RX(ch), DSR_DE);
+ rx_dma_start(card, ch);
X }
X }
X if (status & IR0_DRX(IR0_DMIB, ch)) {
X if (drx_stat & DSR_EOM) {
X if (card->hw.type == PC300_TE) {


- cpc_writeb(card->hw.falcbase + CPLD_REG2,
- cpc_readb(card->hw.falcbase + CPLD_REG2)
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,
+ cpc_readb(card->hw.falcbase +

+ card->hw.cpld_reg2)
X | (CPLD_REG2_FALC_LED1 << (2*ch)));
X }
X cpc_net_rx(hdlc);
X if (card->hw.type == PC300_TE) {


- cpc_writeb(card->hw.falcbase + CPLD_REG2,
- cpc_readb(card->hw.falcbase + CPLD_REG2)
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,
+ cpc_readb(card->hw.falcbase +

+ card->hw.cpld_reg2)
X & ~(CPLD_REG2_FALC_LED1 << (2*ch)));
X }


X }
@@ -1641,8 +2136,8 @@

X cpc_writeb(scabase + DSR_TX(ch), dtx_stat | DSR_DWE);
X
X #ifdef PC300_DEBUG_INTR
- printk("sca_intr: TX intr (st=0x%08lx, dsr=0x%02x)\n",
- status, dtx_stat);
+ printk("sca_intr: TX intr chan[%d] (st=0x%08lx, dsr=0x%02x)\n",
+ ch, status, dtx_stat);
X #endif
X if (status & IR0_DTX(IR0_EFT, ch)) {
X if (dtx_stat & DSR_UDRF) {
@@ -1651,8 +2146,9 @@
X CMD_TX_BUF_CLR);
X }
X if (card->hw.type == PC300_TE) {


- cpc_writeb(card->hw.falcbase + CPLD_REG2,
- cpc_readb(card->hw.falcbase + CPLD_REG2)
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,
+ cpc_readb(card->hw.falcbase +

+ card->hw.cpld_reg2)
X & ~(CPLD_REG2_FALC_LED1 << (2*ch)));
X }
X if (d->tx_skb) {
@@ -1676,8 +2172,9 @@
X if (status & IR0_DTX(IR0_DMIB, ch)) {
X if (dtx_stat & DSR_EOM) {
X if (card->hw.type == PC300_TE) {


- cpc_writeb(card->hw.falcbase + CPLD_REG2,
- cpc_readb(card->hw.falcbase + CPLD_REG2)
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,
+ cpc_readb(card->hw.falcbase +

+ card->hw.cpld_reg2)
X & ~(CPLD_REG2_FALC_LED1 << (2*ch)));
X }
X if (d->tx_skb) {
@@ -1695,7 +2192,34 @@
X }
X }
X }
+
+ /**** MSCI ****/
+ if (status & IR0_M(IR0_RXINTA, ch)) {
+ ucchar st1 = cpc_readb(scabase + M_REG(ST1, ch));
+
+ /* Clear MSCI interrupts */
+ cpc_writeb(scabase + M_REG(ST1, ch), st1);
+
+#ifdef PC300_DEBUG_INTR
+ printk("sca_intr: MSCI intr chan[%d] (st=0x%08lx, st1=0x%02x)\n"
+ ,ch, status, st1);
+#endif
+ if (st1 & ST1_CDCD) { /* DCD changed */
+ if (cpc_readb(scabase + M_REG(ST3, ch)) & ST3_DCD) {
+ printk("%s: DCD is OFF. Going administrative down.\n",
+ dev->name);
+ dev->flags &= ~IFF_RUNNING;
+ card->chan[ch].d.line_off++;
+ } else { /* DCD = 1 */
+ printk("%s: DCD is ON. Going administrative up.\n",
+ dev->name);
+ dev->flags |= IFF_RUNNING;
+ card->chan[ch].d.line_on++;
+ }
+ }
+ }
X dev->interrupt = 0;
+ spin_unlock(&card->card_lock);
X }
X if (++intr_count == 10)
X /* Too much work at this board. Force exit */
@@ -1713,14 +2237,14 @@
X if (((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_XPRBS) == 0) &&
X !pfalc->loop_gen) {
X if (frs1 & FRS1_LLBDD) {
- // A Line Loop Back Deactuation signal detected
+ // A Line Loop Back Deactivation signal detected
X if (pfalc->loop_active) {
X falc_remote_loop(card, ch, 0);
X }
X } else {
X if ((frs1 & FRS1_LLBAD) &&
X ((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_EPRM) == 0)) {
- // A Line Loop Back Actuation signal detected
+ // A Line Loop Back Activation signal detected
X if (!pfalc->loop_active) {
X falc_remote_loop(card, ch, 1);
X }
@@ -1739,14 +2263,14 @@
X if (((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_XPRBS) == 0) &&
X !pfalc->loop_gen) {
X if (rsp & RSP_LLBDD) {
- // A Line Loop Back Deactuation signal detected
+ // A Line Loop Back Deactivation signal detected
X if (pfalc->loop_active) {
X falc_remote_loop(card, ch, 0);
X }
X } else {
X if ((rsp & RSP_LLBAD) &&
X ((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_EPRM) == 0)) {
- // A Line Loop Back Actuation signal detected
+ // A Line Loop Back Activation signal detected
X if (!pfalc->loop_active) {
X falc_remote_loop(card, ch, 1);
X }
@@ -1901,6 +2425,11 @@
X return; /* spurious intr */
X }
X
+ if (card->hw.rambase == 0) {
+ printk("cpc_intr: spurious intr2 %d\n", irq);
+ return; /* spurious intr */
+ }
+
X switch (card->hw.type) {
X case PC300_RSV:
X case PC300_X21:
@@ -2056,10 +2585,12 @@
X pc300dev_t *d = (pc300dev_t *)dev->priv;
X pc300ch_t *chan = (pc300ch_t *)d->chan;
X pc300_t *card = (pc300_t *)chan->card;
+ pc300conf_t conf_aux;


X pc300chconf_t *conf = (pc300chconf_t *)&chan->conf;

X int ch = chan->channel;
X int value;
X void *arg = (void *) ifr->ifr_data;


+ uclong scabase = card->hw.scabase;

X
X if(!capable(CAP_NET_ADMIN))
X return -EPERM;
@@ -2067,14 +2598,24 @@
X switch(cmd) {
X case SIOCGPC300CONF:
X conf->proto = hdlc->mode;
- if (!arg || copy_to_user(arg, conf, sizeof(pc300chconf_t)))
+ memcpy(&conf_aux.conf, conf, sizeof(pc300chconf_t));
+ memcpy(&conf_aux.hw, &card->hw, sizeof(pc300hw_t));
+ if (!arg || copy_to_user(arg, &conf_aux, sizeof(pc300conf_t)))
X return -EINVAL;
X return 0;
X case SIOCSPC300CONF:
X if (!suser())
X return -EPERM;
- if (!arg || copy_from_user(conf, arg, sizeof(pc300chconf_t)))
+ if (!arg || copy_from_user(&conf_aux.conf, arg,
+ sizeof(pc300chconf_t)))
X return -EINVAL;
+ if (card->hw.cpld_id < 0x02 &&
+ conf_aux.conf.fr_mode == PC300_FR_UNFRAMED) {
+ /* CPLD_ID < 0x02 doesn't support Unframed E1 */
+ return -EINVAL;
+ }
+ memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t));
+ hdlc->mode = conf->proto;
X return 0;
X case SIOCGPC300STATUS:
X cpc_sca_status(card, ch);
@@ -2113,7 +2654,135 @@
X conf->clkrate = value;
X return 0;
X }
-
+
+ case SIOCGPC300UTILSTATS:
+ {
+ pc300stats_t pc300stats;
+
+ memset(&pc300stats, 0, sizeof(pc300stats_t));
+ pc300stats.hw_type = card->hw.type;
+ pc300stats.line_on = card->chan[ch].d.line_on;
+ pc300stats.line_off = card->chan[ch].d.line_off;
+ memcpy(&pc300stats.gen_stats, &d->hdlc->stats,
+ sizeof(struct net_device_stats));
+ if (card->hw.type == PC300_TE)
+ memcpy(&pc300stats.te_stats, &chan->falc, sizeof(falc_t));
+ if (!arg || copy_to_user(arg, &pc300stats, sizeof(pc300stats_t)))
+ return -EINVAL;


+ return 0;
+ }
+

+ case SIOCGPC300UTILSTATUS:
+ {
+ struct pc300status pc300status;
+
+ pc300status.hw_type = card->hw.type;
+ if (card->hw.type == PC300_TE) {
+ pc300status.te_status.sync = chan->falc.sync;
+ pc300status.te_status.red_alarm = chan->falc.red_alarm;
+ pc300status.te_status.blue_alarm = chan->falc.blue_alarm;
+ pc300status.te_status.loss_fa = chan->falc.loss_fa;
+ pc300status.te_status.yellow_alarm = chan->falc.yellow_alarm;
+ pc300status.te_status.loss_mfa = chan->falc.loss_mfa;
+ pc300status.te_status.prbs = chan->falc.prbs;
+ } else {
+ pc300status.gen_status.dcd =
+ !(cpc_readb(scabase + M_REG(ST3, ch)) & ST3_DCD);
+ pc300status.gen_status.cts =
+ !(cpc_readb(scabase + M_REG(ST3, ch)) & ST3_CTS);
+ pc300status.gen_status.rts =
+ !(cpc_readb(scabase + M_REG(CTL, ch)) & CTL_RTS);
+ pc300status.gen_status.dtr =
+ !(cpc_readb(scabase + M_REG(CTL, ch)) & CTL_DTR);
+ /* There is no DSR in HD64572 */
+ }
+ if (!arg || copy_to_user(arg, &pc300status, sizeof(pc300status_t)))
+ return -EINVAL;


+ return 0;
+ }
+

+ case SIOCSPC300TRACE:
+ /* Sets/resets a trace_flag for the respective device */
+ if (!arg || copy_from_user(&d->trace_on, arg,
+ sizeof(unsigned char)))
+ return -EINVAL;
+ return 0;
+
+ case SIOCSPC300LOOPBACK:
+ {
+ struct pc300loopback pc300loop;
+
+ /* TE boards only */
+ if (card->hw.type != PC300_TE)
+ return -EINVAL;
+
+ if (!arg || copy_from_user(&pc300loop, arg,
+ sizeof(pc300loopback_t)))
+ return -EINVAL;
+ switch (pc300loop.loop_type) {
+ case PC300LOCLOOP: /* Turn the local loop on/off */
+ falc_local_loop(card, ch, pc300loop.loop_on);
+ return 0;
+
+ case PC300REMLOOP: /* Turn the remote loop on/off */
+ falc_remote_loop(card, ch, pc300loop.loop_on);
+ return 0;
+
+ case PC300PAYLOADLOOP: /* Turn the payload loop on/off */
+ falc_payload_loop(card, ch, pc300loop.loop_on);
+ return 0;
+
+ case PC300GENLOOPUP: /* Generate loop UP */
+ if (pc300loop.loop_on) {
+ falc_generate_loop_up_code(card, ch);
+ } else {
+ turn_off_xlu(card, ch);
+ }
+ return 0;
+
+ case PC300GENLOOPDOWN: /* Generate loop DOWN */
+ if (pc300loop.loop_on) {
+ falc_generate_loop_down_code(card, ch);
+ } else {
+ turn_off_xld(card, ch);
+ }
+ return 0;
+
+ default:


+ return -EINVAL;
+ }
+ }
+

+ case SIOCSPC300PATTERNTEST:
+ /* Turn the pattern test on/off and show the errors counter */
+ {
+ struct pc300patterntst pc300patrntst;
+
+ /* TE boards only */
+ if (card->hw.type != PC300_TE)
+ return -EINVAL;
+
+ if (card->hw.cpld_id < 0x02) {
+ /* CPLD_ID < 0x02 doesn't support pattern test */
+ return -EINVAL;
+ }
+ if (!arg || copy_from_user(&pc300patrntst, arg,
+ sizeof(pc300patterntst_t)))
+ return -EINVAL;
+ if (pc300patrntst.patrntst_on == 2) {
+ if (chan->falc.prbs == 0) {
+ falc_pattern_test(card, ch, 1);
+ }
+ pc300patrntst.num_errors = falc_pattern_test_error(card, ch);
+ if (!arg || copy_to_user(arg, &pc300patrntst,
+ sizeof(pc300patterntst_t)))
+ return -EINVAL;
+ } else {
+ falc_pattern_test(card, ch, pc300patrntst.patrntst_on);


+ }
+ return 0;
+ }
+

X default:
X switch(hdlc->mode & ~MODE_SOFT) {
X #ifdef CONFIG_PC300_X25
@@ -2165,17 +2834,57 @@
X uclong plxbase = card->hw.plxbase;
X int ch = chan->channel;
X uclong clkrate = chan->conf.clkrate;
+ uclong clktype = chan->conf.clktype;
X ucchar loopback = (conf->loopback ? MD2_LOOP_MIR : MD2_F_DUPLEX);
+ ucshort encoding = chan->conf.encoding;
+ ucshort parity = chan->conf.parity;
X int tmc, br;
+ ucchar md0, md2;
X
X /* Reset the channel */
X cpc_writeb(scabase + M_REG(CMD, ch), CMD_CH_RST);
X
X /* Configure the SCA registers */
- cpc_writeb(scabase + M_REG(MD0, ch),
- (MD0_CRC_CCITT|MD0_CRCC0|MD0_BIT_SYNC));
+ switch (parity) {
+ case PC300_PARITY_NONE:
+ md0 = MD0_BIT_SYNC;
+ break;
+ case PC300_PARITY_CRC16_PR0:
+ md0 = MD0_CRC16_0|MD0_CRCC0|MD0_BIT_SYNC;
+ break;
+ case PC300_PARITY_CRC16_PR1:
+ md0 = MD0_CRC16_1|MD0_CRCC0|MD0_BIT_SYNC;
+ break;
+ case PC300_PARITY_CRC32_PR1_CCITT:
+ md0 = MD0_CRC32|MD0_CRCC0|MD0_BIT_SYNC;
+ break;
+ case PC300_PARITY_CRC16_PR1_CCITT:
+ default:
+ md0 = MD0_CRC_CCITT|MD0_CRCC0|MD0_BIT_SYNC;
+ break;
+ }
+ switch (encoding) {
+ case PC300_ENCODING_NRZI:
+ md2 = loopback|MD2_ADPLL_X8|MD2_NRZI;
+ break;
+ case PC300_ENCODING_FM_MARK: /* FM1 */
+ md2 = loopback|MD2_ADPLL_X8|MD2_FM|MD2_FM1;
+ break;
+ case PC300_ENCODING_FM_SPACE: /* FM0 */
+ md2 = loopback|MD2_ADPLL_X8|MD2_FM|MD2_FM0;
+ break;
+ case PC300_ENCODING_MANCHESTER: /* It's not working... */
+ md2 = loopback|MD2_ADPLL_X8|MD2_FM|MD2_MANCH;
+ break;
+ case PC300_ENCODING_NRZ:
+ default:
+ md2 = loopback|MD2_ADPLL_X8|MD2_NRZ;
+ break;
+ }
+
+ cpc_writeb(scabase + M_REG(MD0, ch), md0);
X cpc_writeb(scabase + M_REG(MD1, ch), 0);
- cpc_writeb(scabase + M_REG(MD2, ch), (loopback|MD2_ADPLL_X8|MD2_NRZ));
+ cpc_writeb(scabase + M_REG(MD2, ch), md2);
X cpc_writeb(scabase + M_REG(IDL, ch), 0x7e);
X cpc_writeb(scabase + M_REG(CTL, ch), CTL_URSKP|CTL_IDLC);
X
@@ -2202,13 +2911,18 @@
X switch(card->hw.type) {
X case PC300_RSV:
X case PC300_X21:
- if (clkrate) {
- /* Calculate the clkrate rate parameters */
+ if (clktype == PC300_CLOCK_INT || clktype == PC300_CLOCK_TXINT) {
+ /* Calculate the clkrate parameters */
X tmc = clock_rate_calc(clkrate, card->hw.clock, &br);
X cpc_writeb(scabase + M_REG(TMCT, ch), tmc);
X cpc_writeb(scabase + M_REG(TXS, ch), (TXS_DTRXC|TXS_IBRG|br));
- cpc_writeb(scabase + M_REG(TMCR, ch), tmc);
- cpc_writeb(scabase + M_REG(RXS, ch), (RXS_IBRG|br));
+ if (clktype == PC300_CLOCK_INT) {
+ cpc_writeb(scabase + M_REG(TMCR, ch), tmc);
+ cpc_writeb(scabase + M_REG(RXS, ch), (RXS_IBRG|br));
+ } else {
+ cpc_writeb(scabase + M_REG(TMCR, ch), 1);
+ cpc_writeb(scabase + M_REG(RXS, ch), 0);
+ }
X if (card->hw.type == PC300_X21) {
X cpc_writeb(scabase + M_REG(GPO, ch), 1);
X cpc_writeb(scabase + M_REG(EXS, ch), EXS_TES1|EXS_RES1);
@@ -2217,7 +2931,11 @@
X }
X } else {
X cpc_writeb(scabase + M_REG(TMCT, ch), 1);
- cpc_writeb(scabase + M_REG(TXS, ch), TXS_DTRXC);
+ if (clktype == PC300_CLOCK_EXT) {
+ cpc_writeb(scabase + M_REG(TXS, ch), TXS_DTRXC);
+ } else {
+ cpc_writeb(scabase + M_REG(TXS, ch), TXS_DTRXC|TXS_RCLK);
+ }
X cpc_writeb(scabase + M_REG(TMCR, ch), 1);
X cpc_writeb(scabase + M_REG(RXS, ch), 0);
X if (card->hw.type == PC300_X21) {
@@ -2241,10 +2959,14 @@
X
X /* Enable Interrupts */
X cpc_writel(scabase + IER0,
- cpc_readl(scabase + IER0) |
- IR0_DRX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch) |
- IR0_DTX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch) );
-
+ cpc_readl(scabase + IER0) |
+ IR0_M(IR0_RXINTA, ch) |
+ IR0_DRX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch) |
+ IR0_DTX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch));
+ cpc_writeb(scabase + M_REG(IE0, ch),
+ cpc_readb(scabase + M_REG(IE0, ch)) | IE0_RXINTA);
+ cpc_writeb(scabase + M_REG(IE1, ch),
+ cpc_readb(scabase + M_REG(IE1, ch)) | IE1_CDCD);


X return 0;
X }
X

@@ -2275,10 +2997,7 @@
X cpc_writeb(scabase + DIR_RX(ch), (DIR_EOM | DIR_BOF));
X
X /* Start DMA */
- cpc_writel(scabase + DRX_REG(CDAL, ch), RX_BD_ADDR(ch, chan->rx_first_bd));
- cpc_writel(scabase + DRX_REG(EDAL, ch), RX_BD_ADDR(ch, chan->rx_last_bd));
- cpc_writew(scabase + DRX_REG(BFLL, ch), BD_DEF_LEN);
- cpc_writeb(scabase + DSR_RX(ch), DSR_DE);
+ rx_dma_start(card, ch);


X
X return 0;
X }

@@ -2353,19 +3072,22 @@
X int ch = chan->channel;
X
X cpc_writeb(card->hw.scabase + M_REG(CMD, ch), CMD_CH_RST);
+ rx_dma_stop(card, ch);
+ tx_dma_stop(card, ch);
+
X if (card->hw.type == PC300_TE) {
X memset(pfalc, 0, sizeof(falc_t));


- cpc_writeb(card->hw.falcbase + CPLD_REG2,

- cpc_readb(card->hw.falcbase + CPLD_REG2) &

+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2,

+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) &
X ~((CPLD_REG2_FALC_TX_CLK | CPLD_REG2_FALC_RX_CLK |
X CPLD_REG2_FALC_LED2) << (2*ch)));


X /* Reset the FALC chip */
- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) |
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) |
X (CPLD_REG1_FALC_RESET << (2*ch)));
X udelay(10000);
- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) &
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) &
X ~(CPLD_REG1_FALC_RESET << (2*ch)));
X }
X }

@@ -2377,6 +3099,10 @@
X pc300dev_t *d = (pc300dev_t *)dev->priv;
X int err = -1;
X
+#ifdef PC300_DEBUG_OTHER
+ printk("pc300: cpc_open");
+#endif
+
X err = cpc_opench(d);
X if (err)
X return err;
@@ -2414,6 +3140,7 @@


X dev->tbusy = 0;

X dev->interrupt = 0;


X dev->start = 1;

+
X MOD_INC_USE_COUNT;
X return 0;
X }
@@ -2427,6 +3154,10 @@
X pc300_t *card = (pc300_t *)chan->card;
X uclong flags;
X
+#ifdef PC300_DEBUG_OTHER
+ printk("pc300: cpc_close");
+#endif
+
X CPC_LOCK(card, flags);
X switch(hdlc->mode & ~MODE_SOFT) {
X #ifdef CONFIG_PC300_X25
@@ -2664,14 +3395,35 @@
X /* Set board type */
X switch(device_id) {
X case PCI_DEVICE_ID_PC300_TE_1:
- case PCI_DEVICE_ID_PC300_TE_2:
+ case PCI_DEVICE_ID_PC300_TE_2: {
+ ucchar reg1;
+
X card->hw.type = PC300_TE;
+
+ /* Check CPLD version */
+ reg1 = cpc_readb(card->hw.falcbase + CPLD_REG1);
+ cpc_writeb(card->hw.falcbase + CPLD_REG1, (reg1 + 0x5a));
+ if (cpc_readb(card->hw.falcbase + CPLD_REG1) == reg1) {
+ /* New CPLD */
+ card->hw.cpld_id = cpc_readb(card->hw.falcbase +
+ CPLD_ID_REG);
+ card->hw.cpld_reg1 = CPLD_V2_REG1;
+ card->hw.cpld_reg2 = CPLD_V2_REG2;
+ } else {
+ /* old CPLD */
+ card->hw.cpld_id = 0;
+ card->hw.cpld_reg1 = CPLD_REG1;
+ card->hw.cpld_reg2 = CPLD_REG2;
+ cpc_writeb(card->hw.falcbase + CPLD_REG1, reg1);
+ }
+
X /* Enable the board's global clock */


- cpc_writeb(card->hw.falcbase + CPLD_REG1,
- cpc_readb(card->hw.falcbase + CPLD_REG1) |
+ cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1,
+ cpc_readb(card->hw.falcbase +

+ card->hw.cpld_reg1) |
X CPLD_REG1_GLOBAL_CLK);
X break;
-
+ }
X case PCI_DEVICE_ID_PC300_RX_1:
X case PCI_DEVICE_ID_PC300_RX_2:
X default:
@@ -2706,8 +3458,8 @@
X tmp = strchr(rcsvers, ' '); *tmp++ = '\0';
X rcsdate = strchr(tmp, ' '); rcsdate++;
X tmp = strrchr(rcsdate, ' '); *tmp = '\0';
- printk("Cyclades-PC300 driver %s %s\n", rcsvers, rcsdate);
- printk(" built %s %s\n", __DATE__, __TIME__);
+ printk(KERN_INFO "Cyclades-PC300 driver %s %s (built %s %s)\n",
+ rcsvers, rcsdate, __DATE__, __TIME__);
X } /* show_version */
X
X __initfunc(int
@@ -2737,8 +3489,11 @@
X
X chan->card = card;
X chan->channel = j;
- chan->conf.clkrate = 64000;
+ chan->conf.clkrate = 0;
+ chan->conf.clktype = PC300_CLOCK_EXT;
X chan->conf.loopback = 0;
+ chan->conf.encoding = PC300_ENCODING_NRZ;
+ chan->conf.parity = PC300_PARITY_CRC16_PR1_CCITT;
X switch(card->hw.type) {
X case PC300_TE:
X chan->conf.media = LINE_T1;
@@ -2755,7 +3510,7 @@
X
X case PC300_RSV:
X default:
- chan->conf.media = LINE_RS232;
+ chan->conf.media = LINE_V35;
X break;
X }
X chan->tx_first_bd = 0;
@@ -2765,6 +3520,9 @@
X
X d->chan = chan;
X d->tx_skb = NULL;
+ d->trace_on = 0;
+ d->line_on = 0;
+ d->line_off = 0;
X
X d->hdlc = (hdlc_device *)
X kmalloc(sizeof(hdlc_device), GFP_KERNEL);
@@ -2791,7 +3549,7 @@
X
X if(register_hdlc_device(hdlc) == 0) {
X dev->priv = d; /* We need 'priv', hdlc doesn't */
- printk("%s: PC300/", hdlc->name);
+ printk("%s: Cyclades-PC300/", hdlc->name);
X switch(card->hw.type) {
X case PC300_TE:
X printk("TE ");
@@ -2839,6 +3597,10 @@
X pc300_t *card = &cpc_card[i];
X
X if (card->hw.rambase != 0) {
+ /* Disable interrupts on the PCI bridge */
+ cpc_writew(card->hw.plxbase+0x4c,
+ cpc_readw(card->hw.plxbase+0x4c) & ~(0x0040));
+
X for(j = 0 ; j < card->hw.nchan ; j++) {
X unregister_hdlc_device(card->chan[j].d.hdlc);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/pc300.h linux/drivers/net/pc300.h
--- v2.2.19/drivers/net/pc300.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/net/pc300.h Wed Oct 31 14:08:10 2001
@@ -0,0 +1,501 @@
+/*
+ * pc300.h Cyclades-PC300(tm) Kernel API Definitions.


+ *
+ * Author: Ivan Passos <iv...@cyclades.com>
+ *

+ * Copyright: (c) 1999-2001 Cyclades Corp.


+ *
+ * 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.
+ *

+ * $Log: pc300.h,v $
+ * Revision 3.2 to 3.6 2001/09/28 13:16:03 daniela
+ * Included kernel version.
+ * New configuration parameters (line code, CRC calculation and clock).
+ * Increased DEF_MTU and TX_QUEUE_LEN.


+ *
+ * Revision 3.1 2001/06/15 12:41:10 regina
+ * upping major version number
+ *

+ * Revision 1.1.1.1 2001/06/13 20:24:38 daniela


+ * PC300 initial CVS version (3.4.0-pre1)
+ *

+ * Revision 2.5 2001/03/02 daniela
+ * Created struct pc300conf, to provide the hardware information to pc300util.
+ *
+ * Revision 2.4 2000/12/22 daniela
+ * Structures and defines to support pc300util: statistics, status,
+ * loopback tests, trace.
+ *
+ * Revision 2.3 2000/09/28 ivan
+ * Changed location of include files.
+ *
+ * Revision 2.2 2000/06/23 ivan
+ * Inclusion of 'loopback' field on structure 'pc300chconf', to allow
+ * loopback mode operation.
+ *
+ * Revision 2.1 2000/06/09 ivan
+ * Changes to use the new generic HDLC layer in the driver.
+ *
+ * Revision 2.0 2000/03/27 ivan
+ * Added support for the PC300/TE cards.
+ *
+ * Revision 1.1 2000/01/31 ivan
+ * Replaced 'pc300[drv|sca].h' former PC300 driver include files.
+ *
+ * Revision 1.0 1999/12/16 ivan
+ * First official release.
+ * Inclusion of 'nchan' field on structure 'pc300hw', to allow variable
+ * number of ports per card.
+ * Inclusion of 'if_ptr' field on structure 'pc300dev'.
+ *
+ * Revision 0.6 1999/11/17 ivan
+ * Changed X.25-specific function names to comply with adopted convention.
+ *
+ * Revision 0.5 1999/11/16 Daniela Squassoni
+ * X.25 support.
+ *
+ * Revision 0.4 1999/11/15 ivan
+ * Inclusion of 'clock' field on structure 'pc300hw'.
+ *
+ * Revision 0.3 1999/11/10 ivan
+ * IOCTL name changing.
+ * Inclusion of driver function prototypes.
+ *
+ * Revision 0.2 1999/11/03 ivan
+ * Inclusion of 'tx_skb' and union 'ifu' on structure 'pc300dev'.
+ *
+ * Revision 0.1 1999/01/15 ivan


+ * Initial version.
+ *
+ */
+

+#ifndef _PC300_H
+#define _PC300_H
+
+#ifndef __HDLC_H
+#include <linux/hdlc.h>
+#endif
+#ifndef _HD64572_H
+#include "hd64572.h"
+#endif
+#ifndef _FALC_LH_H
+#include "falc-lh.h"
+#endif
+
+#ifndef CY_TYPES
+#define CY_TYPES
+#if defined(__alpha__)
+typedef unsigned long ucdouble; /* 64 bits, unsigned */
+typedef unsigned int uclong; /* 32 bits, unsigned */
+#else
+typedef unsigned long uclong; /* 32 bits, unsigned */
+#endif
+typedef unsigned short ucshort; /* 16 bits, unsigned */
+typedef unsigned char ucchar; /* 8 bits, unsigned */
+#endif /* CY_TYPES */
+
+#define PC300_KERNEL "2.2.x" /* Kernel supported by this driver */
+
+#define PC300_DEVNAME "hdlc" /* Dev. name base (for hdlc0, hdlc1, etc.) */
+#define PC300_MAXINDEX 100 /* Max dev. name index (the '0' in hdlc0) */
+
+#define PC300_MAXCARDS 4 /* Max number of cards per system */
+#define PC300_MAXCHAN 2 /* Number of channels per card */
+
+#define PC300_PLX_WIN 0x80 /* PLX control window size (128b) */
+#define PC300_RAMSIZE 0x80000 /* RAM window size (512Kb) */
+#define PC300_SCASIZE 0x400 /* SCA window size (1Kb) */
+#define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */
+
+#define PC300_OSC_CLOCK 24576000
+#define PC300_PCI_CLOCK 33000000
+
+#define BD_DEF_LEN 0x0800 /* DMA buffer length (2KB) */
+#define DMA_TX_MEMSZ 0x8000 /* Total DMA Tx memory size (32KB/ch) */
+#define DMA_RX_MEMSZ 0x10000 /* Total DMA Rx memory size (64KB/ch) */
+
+#define N_DMA_TX_BUF (DMA_TX_MEMSZ / BD_DEF_LEN) /* DMA Tx buffers */
+#define N_DMA_RX_BUF (DMA_RX_MEMSZ / BD_DEF_LEN) /* DMA Rx buffers */
+
+/* DMA Buffer Offsets */
+#define DMA_TX_BASE ((N_DMA_TX_BUF + N_DMA_RX_BUF) * \
+ PC300_MAXCHAN * sizeof(pcsca_bd_t))
+#define DMA_RX_BASE (DMA_TX_BASE + PC300_MAXCHAN*DMA_TX_MEMSZ)
+
+/* DMA Descriptor Offsets */
+#define DMA_TX_BD_BASE 0x0000
+#define DMA_RX_BD_BASE (DMA_TX_BD_BASE + ((PC300_MAXCHAN*DMA_TX_MEMSZ / \
+ BD_DEF_LEN) * sizeof(pcsca_bd_t)))
+
+/* DMA Descriptor Macros */
+#define TX_BD_ADDR(chan, n) (DMA_TX_BD_BASE + \
+ ((N_DMA_TX_BUF*chan) + n) * sizeof(pcsca_bd_t))
+#define RX_BD_ADDR(chan, n) (DMA_RX_BD_BASE + \
+ ((N_DMA_RX_BUF*chan) + n) * sizeof(pcsca_bd_t))
+
+/* Macro to access the FALC registers (TE only) */
+#define F_REG(reg, chan) (0x200*(chan) + ((reg)<<2))
+
+/***************************************
+ * Memory access functions/macros *
+ * (required to support Alpha systems) *
+ ***************************************/
+#ifdef __KERNEL__
+#define cpc_writeb(port,val) {writeb((ucchar)(val),(ulong)(port)); mb();}
+#define cpc_writew(port,val) {writew((ushort)(val),(ulong)(port)); mb();}
+#define cpc_writel(port,val) {writel((uclong)(val),(ulong)(port)); mb();}
+
+#define cpc_readb(port) readb(port)
+#define cpc_readw(port) readw(port)
+#define cpc_readl(port) readl(port)
+
+#else /* __KERNEL__ */
+#define cpc_writeb(port,val) (*(volatile ucchar *)(port) = (ucchar)(val))
+#define cpc_writew(port,val) (*(volatile ucshort *)(port) = (ucshort)(val))
+#define cpc_writel(port,val) (*(volatile uclong *)(port) = (uclong)(val))
+
+#define cpc_readb(port) (*(volatile ucchar *)(port))
+#define cpc_readw(port) (*(volatile ucshort *)(port))
+#define cpc_readl(port) (*(volatile uclong *)(port))
+
+#endif /* __KERNEL__ */
+
+/****** Data Structures *****************************************************/
+
+/*
+ * RUNTIME_9050 - PLX PCI9050-1 local configuration and shared runtime
+ * registers. This structure can be used to access the 9050 registers
+ * (memory mapped).
+ */
+struct RUNTIME_9050 {
+ uclong loc_addr_range[4]; /* 00-0Ch : Local Address Ranges */
+ uclong loc_rom_range; /* 10h : Local ROM Range */
+ uclong loc_addr_base[4]; /* 14-20h : Local Address Base Addrs */
+ uclong loc_rom_base; /* 24h : Local ROM Base */
+ uclong loc_bus_descr[4]; /* 28-34h : Local Bus Descriptors */
+ uclong rom_bus_descr; /* 38h : ROM Bus Descriptor */
+ uclong cs_base[4]; /* 3C-48h : Chip Select Base Addrs */
+ uclong intr_ctrl_stat; /* 4Ch : Interrupt Control/Status */
+ uclong init_ctrl; /* 50h : EEPROM ctrl, Init Ctrl, etc */
+};
+
+#define PLX_9050_LINT1_ENABLE 0x01
+#define PLX_9050_LINT1_POL 0x02
+#define PLX_9050_LINT1_STATUS 0x04
+#define PLX_9050_LINT2_ENABLE 0x08
+#define PLX_9050_LINT2_POL 0x10
+#define PLX_9050_LINT2_STATUS 0x20
+#define PLX_9050_INTR_ENABLE 0x40
+#define PLX_9050_SW_INTR 0x80
+
+/* Masks to access the init_ctrl PLX register */
+#define PC300_CLKSEL_MASK (0x00000004UL)
+#define PC300_CHMEDIA_MASK(chan) (0x00000020UL<<(chan*3))
+#define PC300_CTYPE_MASK (0x00000800UL)
+
+/* CPLD Registers (base addr = falcbase, TE only) */
+/* CPLD v. 0 */
+#define CPLD_REG1 0x140 /* Chip resets, DCD/CTS status */
+#define CPLD_REG2 0x144 /* Clock enable , LED control */
+/* CPLD v. 2 or higher */
+#define CPLD_V2_REG1 0x100 /* Chip resets, DCD/CTS status */
+#define CPLD_V2_REG2 0x104 /* Clock enable , LED control */
+#define CPLD_ID_REG 0x108 /* CPLD version */
+
+/* CPLD Register bit description: for the FALC bits, they should always be
+ set based on the channel (use (bit<<(2*ch)) to access the correct bit for
+ that channel) */
+#define CPLD_REG1_FALC_RESET 0x01
+#define CPLD_REG1_SCA_RESET 0x02
+#define CPLD_REG1_GLOBAL_CLK 0x08
+#define CPLD_REG1_FALC_DCD 0x10
+#define CPLD_REG1_FALC_CTS 0x20
+
+#define CPLD_REG2_FALC_TX_CLK 0x01
+#define CPLD_REG2_FALC_RX_CLK 0x02
+#define CPLD_REG2_FALC_LED1 0x10
+#define CPLD_REG2_FALC_LED2 0x20
+
+/* Structure with FALC-related fields (TE only) */
+#define PC300_FALC_MAXLOOP 0x0000ffff /* for falc_issue_cmd() */
+
+typedef struct falc {
+ ucchar sync; /* If true FALC is synchronized */
+ ucchar active; /* if TRUE then already active */
+ ucchar loop_active; /* if TRUE a line loopback UP was received */
+ ucchar loop_gen; /* if TRUE a line loopback UP was issued */
+
+ ucchar num_channels;
+ ucchar offset; /* 1 for T1, 0 for E1 */
+ ucchar full_bandwidth;
+
+ ucchar xmb_cause;
+ ucchar multiframe_mode;
+
+ /* Statistics */
+ ucshort pden; /* Pulse Density violation count */
+ ucshort los; /* Loss of Signal count */
+ ucshort losr; /* Loss of Signal recovery count */
+ ucshort lfa; /* Loss of frame alignment count */
+ ucshort farec; /* Frame Alignment Recovery count */
+ ucshort lmfa; /* Loss of multiframe alignment count */
+ ucshort ais; /* Remote Alarm indication Signal count */
+ ucshort sec; /* One-second timer */
+ ucshort es; /* Errored second */
+ ucshort rai; /* remote alarm received */
+ ucshort bec;
+ ucshort fec;
+ ucshort cvc;
+ ucshort cec;
+ ucshort ebc;
+
+ /* Status */
+ ucchar red_alarm;
+ ucchar blue_alarm;
+ ucchar loss_fa;
+ ucchar yellow_alarm;
+ ucchar loss_mfa;
+ ucchar prbs;
+} falc_t;
+
+typedef struct falc_status {
+ ucchar sync; /* If true FALC is synchronized */
+ ucchar red_alarm;
+ ucchar blue_alarm;
+ ucchar loss_fa;
+ ucchar yellow_alarm;
+ ucchar loss_mfa;
+ ucchar prbs;
+} falc_status_t;
+
+typedef struct rsv_x21_status {
+ ucchar dcd;
+ ucchar dsr;
+ ucchar cts;
+ ucchar rts;
+ ucchar dtr;
+} rsv_x21_status_t;
+
+typedef struct pc300stats {
+ int hw_type;
+ uclong line_on;
+ uclong line_off;
+ struct net_device_stats gen_stats;
+ falc_t te_stats;
+} pc300stats_t;
+
+typedef struct pc300status {
+ int hw_type;
+ rsv_x21_status_t gen_status;
+ falc_status_t te_status;
+} pc300status_t;
+
+typedef struct pc300loopback {
+ char loop_type;
+ char loop_on;
+} pc300loopback_t;
+
+typedef struct pc300patterntst {
+ char patrntst_on; /* 0 - off; 1 - on; 2 - read num_errors */
+ ucshort num_errors;
+} pc300patterntst_t;
+
+typedef struct pc300dev {
+ void *if_ptr; /* General purpose pointer */
+ struct pc300ch *chan;
+ ucchar trace_on;
+ uclong line_on; /* DCD(X.21, RSV) / sync(TE) change counters */
+ uclong line_off;
+#ifdef __KERNEL__
+ char name[16];
+ void *private;
+ hdlc_device *hdlc;
+ struct sk_buff *tx_skb;
+#endif /* __KERNEL__ */
+}pc300dev_t;
+
+typedef struct pc300hw {
+ int type; /* RSV, X21, etc. */
+ int nchan; /* number of channels */
+ int irq; /* interrupt request level */
+ uclong clock; /* Board clock */
+ ucchar cpld_id; /* CPLD ID (TE only) */
+ ucshort cpld_reg1; /* CPLD reg 1 (TE only) */
+ ucshort cpld_reg2; /* CPLD reg 2 (TE only) */
+ uclong plxphys; /* PLX registers MMIO base (physical) */
+ uclong plxbase; /* PLX registers MMIO base (virtual) */
+ uclong plxsize; /* PLX registers MMIO size */
+ uclong scaphys; /* SCA registers MMIO base (physical) */
+ uclong scabase; /* SCA registers MMIO base (virtual) */
+ uclong scasize; /* SCA registers MMIO size */
+ uclong ramphys; /* On-board RAM MMIO base (physical) */
+ uclong rambase; /* On-board RAM MMIO base (virtual) */
+ uclong ramsize; /* On-board RAM MMIO size */
+ uclong falcphys; /* FALC registers MMIO base (physical) */
+ uclong falcbase; /* FALC registers MMIO base (virtual) */
+ uclong falcsize; /* FALC registers MMIO size */
+} pc300hw_t;
+
+typedef struct pc300chconf {
+ ucchar media; /* HW media (RS232, V.35, etc.) */
+ uclong proto; /* Protocol (PPP, X.25, etc.) */
+ uclong clktype; /* Clock type (ext, int, txint, txfromrx) */
+ uclong clkrate; /* Clock rate (in bps, 0 = ext. clock) */
+ ucchar loopback; /* Loopback mode */
+ ucchar monitor; /* Monitor mode (0 = off, !0 = on) */
+ ucshort encoding; /* NRZ, NRZI, FM0, FM1 (FMi - only RSV/X.21) */
+ ucshort parity; /* CRC calculation */
+
+ /* TE-specific parameters */
+ ucchar lcode; /* Line Code (AMI, B8ZS, etc.) */
+ ucchar fr_mode; /* Frame Mode (ESF, D4, etc.) */
+ ucchar lbo; /* Line Build Out */
+ ucchar rx_sens; /* Rx Sensitivity (long- or short-haul) */
+ uclong tslot_bitmap; /* bit[i]=1 => timeslot _i_ is active */
+} pc300chconf_t;
+
+typedef struct pc300ch {
+ struct pc300 *card;
+ int channel;
+ pc300dev_t d;
+ pc300chconf_t conf;
+ ucchar tx_first_bd; /* First TX DMA block descr. w/ data */
+ ucchar tx_next_bd; /* Next free TX DMA block descriptor */
+ ucchar rx_first_bd; /* First free RX DMA block descriptor */
+ ucchar rx_last_bd; /* Last free RX DMA block descriptor */
+ falc_t falc; /* FALC structure (TE only) */
+} pc300ch_t;
+
+typedef struct pc300 {
+ pc300hw_t hw; /* hardware config. */
+ pc300ch_t chan[PC300_MAXCHAN];
+#ifdef __KERNEL__
+ spinlock_t card_lock;
+#endif /* __KERNEL__ */
+} pc300_t;
+
+typedef struct pc300conf {
+ pc300hw_t hw;
+ pc300chconf_t conf;
+} pc300conf_t;
+
+/* DEV ioctl() commands */
+#define N_SPPP_IOCTLS 2
+
+enum pc300_ioctl_cmds {
+ SIOCCPCRESERVED = (SIOCDEVPRIVATE + N_SPPP_IOCTLS),
+ SIOCGPC300CONF,
+ SIOCSPC300CONF,
+ SIOCGPC300STATUS,
+ SIOCGPC300FALCSTATUS,
+ SIOCGPC300UTILSTATS,
+ SIOCGPC300UTILSTATUS,
+ SIOCSPC300TRACE,
+ SIOCSPC300LOOPBACK,
+ SIOCSPC300PATTERNTEST,
+ SIOCGPC300HARDWARE,
+};
+
+/* Loopback types - PC300/TE boards */
+enum pc300_loopback_cmds {
+ PC300LOCLOOP = 1,
+ PC300REMLOOP,
+ PC300PAYLOADLOOP,
+ PC300GENLOOPUP,
+ PC300GENLOOPDOWN,
+};
+
+/* Control Constant Definitions */
+#define PC300_RSV 0x01
+#define PC300_X21 0x02
+#define PC300_TE 0x03
+
+#define PC300_CLOCK_EXT 0 /* External TX and RX clock - DTE */
+#define PC300_CLOCK_INT 1 /* Internal TX and RX clock - DCE */
+#define PC300_CLOCK_TXINT 2 /* Internal TX and external RX clock */
+#define PC300_CLOCK_TXFROMRX 3 /* TX clock derived from external RX clock */
+
+#define PC300_ENCODING_NRZ 0x0000
+#define PC300_ENCODING_NRZI 0x0001
+#define PC300_ENCODING_FM_MARK 0x0002
+#define PC300_ENCODING_FM_SPACE 0x0003
+#define PC300_ENCODING_MANCHESTER 0x0004
+
+#define PC300_PARITY_NONE 0x0000
+#define PC300_PARITY_CRC16_PR0 0x0001
+#define PC300_PARITY_CRC16_PR1 0x0002
+#define PC300_PARITY_CRC16_PR0_CCITT 0x0003
+#define PC300_PARITY_CRC16_PR1_CCITT 0x0004
+#define PC300_PARITY_CRC32_PR1_CCITT 0x0005
+
+#define PC300_LC_AMI 0x01
+#define PC300_LC_B8ZS 0x02
+#define PC300_LC_NRZ 0x03
+#define PC300_LC_HDB3 0x04
+
+/* Framing (T1) */
+#define PC300_FR_ESF 0x01
+#define PC300_FR_D4 0x02
+#define PC300_FR_ESF_JAPAN 0x03
+
+/* Framing (E1) */
+#define PC300_FR_MF_CRC4 0x04
+#define PC300_FR_MF_NON_CRC4 0x05
+#define PC300_FR_UNFRAMED 0x06
+
+#define PC300_LBO_0_DB 0x00
+#define PC300_LBO_7_5_DB 0x01
+#define PC300_LBO_15_DB 0x02
+#define PC300_LBO_22_5_DB 0x03
+
+#define PC300_RX_SENS_SH 0x01
+#define PC300_RX_SENS_LH 0x02
+
+#define PC300_TX_TIMEOUT (2*HZ)
+#define PC300_TX_QUEUE_LEN 100
+#define PC300_DEF_MTU 1600
+
+#ifdef __KERNEL__
+/* Function Prototypes */
+static void tx_dma_buf_pt_init(pc300_t *, int);
+static void tx_dma_buf_init(pc300_t *, int);
+static void rx_dma_buf_pt_init(pc300_t *, int);
+static void rx_dma_buf_init(pc300_t *, int);
+static void tx_dma_buf_check(pc300_t *, int);
+static void rx_dma_buf_check(pc300_t *, int);
+int dma_buf_write(pc300_t *, int, ucchar *, int);
+int dma_buf_read(pc300_t *, int, struct sk_buff *);
+void tx_dma_start(pc300_t *, int);
+void rx_dma_start(pc300_t *, int);
+void tx_dma_stop(pc300_t *, int);
+void rx_dma_stop(pc300_t *, int);
+int cpc_queue_xmit(struct sk_buff *, struct device *);
+void cpc_net_rx(hdlc_device *);
+#ifdef CONFIG_PC300_X25
+int cpc_x25_packetlayer_xmit(struct sk_buff *, struct device *);
+void cpc_lapb_connected(void *, int);
+void cpc_lapb_disconnected(void *, int);
+void cpc_lapb_data_indication(void *, struct sk_buff *);
+void cpc_lapb_data_transmit(void *, struct sk_buff *);
+#endif /* CONFIG_PC300_X25 */
+static void cpc_intr(int, void *, struct pt_regs *);
+void cpc_sca_status(pc300_t *, int);
+int cpc_ioctl(hdlc_device *, struct ifreq *, int);
+static int clock_rate_calc(uclong, uclong, int *);
+int ch_config(pc300dev_t *);
+int rx_config(pc300dev_t *);
+int tx_config(pc300dev_t *);
+int cpc_opench(pc300dev_t *);
+void cpc_closech(pc300dev_t *);
+int cpc_open(hdlc_device *);
+void cpc_close(hdlc_device *);
+static uclong detect_ram(pc300_t *);
+static void plx_init(pc300_t *);
+static int cpc_detect(void);
+static void cpc_trace(struct device *, struct sk_buff *, char);
+#endif /* __KERNEL__ */
+
+#endif /* _PC300_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/rtl8139.c linux/drivers/net/rtl8139.c
--- v2.2.19/drivers/net/rtl8139.c Sun Mar 25 17:31:20 2001
+++ linux/drivers/net/rtl8139.c Wed Oct 10 01:41:00 2001
@@ -1425,8 +1425,11 @@
X rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;


X mc_filter[1] = mc_filter[0] = 0;
X for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
- i++, mclist = mclist->next)

- set_bit(ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26, mc_filter);


+ i++, mclist = mclist->next) {
+ int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
+
+ mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31));
+ }

X }
X /* We can safely update without stopping the chip. */

X outb(rx_mode, ioaddr + RxConfig);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sbni.c linux/drivers/net/sbni.c
--- v2.2.19/drivers/net/sbni.c Sun Mar 25 17:31:21 2001
+++ linux/drivers/net/sbni.c Wed Oct 10 01:41:00 2001
@@ -758,7 +758,7 @@
X */
X DP( printk("%s: sbni_recv SendComplete\n",dev->name); );
X /*
- * We sucessfully sent current packet
+ * We successfully sent current packet
X */
X
X if(lp->waitack)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sdla_fr.c linux/drivers/net/sdla_fr.c
--- v2.2.19/drivers/net/sdla_fr.c Sun Mar 25 17:31:19 2001
+++ linux/drivers/net/sdla_fr.c Wed Oct 10 01:41:01 2001
@@ -77,7 +77,7 @@
X * the if clause for it(0,dev->tbusy)
X * forever.
X * The code got into this stage due to an
-* interrupt occuring within the if clause for
+* interrupt occurring within the if clause for
X * set_bit(0,dev->tbusy). Since an interrupt
X * disables furhter transmit interrupt and
X * makes dev->tbusy = 0, this effect was undone

@@ -1329,7 +1329,7 @@
X
X

X /*============================================================================
- * Setup so that a frame can be transmitted on the occurence of a transmit
+ * Setup so that a frame can be transmitted on the occurrence of a transmit
X * interrupt.
X */
X static void setup_for_delayed_transmit (struct device* dev, void* buf,
@@ -1647,7 +1647,7 @@
X ++card->statistics.isr_intr_test;
X break;
X
- case FR_INTR_DLC: /* Event interrupt occured */
+ case FR_INTR_DLC: /* Event interrupt occurred */
X mbox->cmd.command = FR_READ_STATUS;
X mbox->cmd.length = 0;
X err = sdla_exec(mbox) ? mbox->cmd.result : CMD_TIMEOUT;
@@ -1684,7 +1684,7 @@
X /*============================================================================
X * Receive interrupt handler.
X * When a receive interrupt occurs do the following:
- * 1- Find the structure for the dlci that the interrupt occured on
+ * 1- Find the structure for the dlci that the interrupt occurred on
X * 2- If it doesn't exist then print appropriate msg and goto step 8.
X * 3- If it exist then copy data to a skb.
X * 4- If skb contains Sangoma UDP data then process them
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sis900.c linux/drivers/net/sis900.c
--- v2.2.19/drivers/net/sis900.c Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/sis900.c Mon Oct 22 10:39:47 2001
@@ -1,6 +1,6 @@
X /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux.
X Copyright 1999 Silicon Integrated System Corporation
- Revision: 1.06.07 Jan. 8 2001
+ Revision: 1.06.09 Sep. 28 2001
X
X Modified from the driver which is originally written by Donald Becker.
X
@@ -18,6 +18,8 @@
X preliminary Rev. 1.0 Jan. 18, 1998
X http://www.sis.com.tw/support/databook.htm
X
+ Rev 1.06.09 Sep. 28 2001 Hui-Fen Hsu (hf...@sis.com.tw) update for 630ET & workaround for ICS1893 PHY
+ Rev 1.06.08 Mar. 2 2001 Hui-Fen Hsu (hf...@sis.com.tw) some bug fix & 635M/B support
X Rev 1.06.07 Jan. 8 2001 Lei-Chun Chang added RTL8201 PHY support
X Rev 1.06.06 Sep. 6 2000 Lei-Chun Chang added ICS1893 PHY support
X Rev 1.06.05 Aug. 22 2000 Lei-Chun Chang (lcc...@sis.com.tw) modified 630E equalier workaroung rule
@@ -53,7 +55,7 @@
X #include "sis900.h"
X
X static const char *version =
-"sis900.c: v1.06.07 01/08/01\n";
+"sis900.c: v1.06.09 09/28/2001\n";
X
X static int max_interrupt_work = 20;
X static int multicast_filter_limit = 128;
@@ -79,34 +81,36 @@
X PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE, sis900_mac_probe},
X { "SiS 7016 PCI Fast Ethernet",PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7016,
X PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE, sis900_mac_probe},
- {0,}, /* 0 terminated list. */
+ {0,}, /* 0 terminatted list. */
X };
X
-static void sis900_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex);
-static void amd79c901_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex);
-static void ics1893_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex);
-static void rtl8201_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex);
+static void sis900_read_mode(struct device *net_dev, int *speed, int *duplex);
X
X static struct mii_chip_info {
X const char * name;
X u16 phy_id0;
X u16 phy_id1;
- void (*read_mode) (struct device *net_dev, int phy_addr, int *speed, int *duplex);
+ u8 phy_types;
+#define HOME 0x0001
+#define LAN 0x0002
+#define MIX 0x0003
X } mii_chip_table[] = {
- {"SiS 900 Internal MII PHY", 0x001d, 0x8000, sis900_read_mode},
- {"SiS 7014 Physical Layer Solution", 0x0016, 0xf830,sis900_read_mode},
- {"AMD 79C901 10BASE-T PHY", 0x0000, 0x35b9, amd79c901_read_mode},
- {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, amd79c901_read_mode},
- {"ICS 1893 Integrated PHYceiver" , 0x0015, 0xf441,ics1893_read_mode},
- {"RTL 8201 10/100Mbps Phyceiver" , 0x0000, 0x8201,rtl8201_read_mode},
+ { "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN },
+ { "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN },
+ { "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN },
+ { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME},
+ { "ICS LAN PHY", 0x0015, 0xF440, LAN },
+ { "NS 83851 PHY", 0x2000, 0x5C20, MIX },
X {0,},
X };
X
X struct mii_phy {
X struct mii_phy * next;
- struct mii_chip_info * chip_info;
X int phy_addr;
+ u16 phy_id0;
+ u16 phy_id1;
X u16 status;
+ u8 phy_types;
X };
X
X typedef struct _BufferDesc {
@@ -122,9 +126,11 @@
X
X struct mac_chip_info * mac;
X struct mii_phy * mii;
+ struct mii_phy * first_mii; /* record the first mii structure */
X unsigned int cur_phy;
X
- struct timer_list timer; /* Link status detection timer. */
+ struct timer_list timer; /* Link status detection timer. */
+ u8 autong_complete; /* 1: auto-negotiate complete */
X
X unsigned int cur_rx, dirty_rx; /* producer/comsumer pointers for Tx/Rx ring */
X unsigned int cur_tx, dirty_tx;
@@ -167,10 +173,15 @@
X static int sis900_close(struct device *net_dev);
X static int mii_ioctl(struct device *net_dev, struct ifreq *rq, int cmd);
X static struct enet_statistics *sis900_get_stats(struct device *net_dev);
-static u16 sis900_compute_hashtable_index(u8 *addr);
+static u16 sis900_compute_hashtable_index(u8 *addr, u8 revision);
X static void set_rx_mode(struct device *net_dev);
X static void sis900_reset(struct device *net_dev);
-static void sis630e_set_eq(struct device *net_dev);
+static void sis630_set_eq(struct device *net_dev, u8 revision);
+static u16 sis900_default_phy(struct device * net_dev);
+static void sis900_set_capability( struct device *net_dev ,struct mii_phy *phy);
+static u16 sis900_reset_phy(struct device *net_dev, int phy_addr);
+static void sis900_auto_negotiate(struct device *net_dev, int phy_addr);
+static void sis900_set_mode (long ioaddr, int speed, int duplex);
X
X /* A list of all installed SiS900 devices, for removing the driver module. */
X static struct device *root_sis900_dev = NULL;
@@ -265,26 +276,30 @@


X return 1;
X }
X

-/* SiS630E A1, The Mac address is hardcoded in the RFCR register so it is actually not necessary to
- probe the MAC address */
-static int sis630ea1_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev)
+/* 635 model : set Mac reload bit and get mac address from rfdr */
+static int sis635_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev)
X {
- long ioaddr = pci_dev->base_address[0] & ~3;
- u32 reg;
- int i;
+ long ioaddr = net_dev->base_addr;
+ u32 rfcrSave;
+ u32 i;
X
- /* reload MAC address */
- reg = inl(ioaddr + cr);
- outl(reg | RELOAD, ioaddr + cr);
+ rfcrSave = inl(rfcr + ioaddr);
X
- reg = inl(ioaddr + cr);
- outl(reg & ~RELOAD, ioaddr + cr);
+ outl(rfcrSave | RELOAD, ioaddr + cr);
+ outl(0, ioaddr + cr);
X
- for (i = 0; i < 3; i++) {
- outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr);
- ((u16 *)(net_dev->dev_addr))[i] = inl(ioaddr + rfdr);
+ /* disable packet filtering before setting filter */
+ outl(rfcrSave & ~RFEN, rfcr + ioaddr);
+
+ /* load MAC addr to filter data register */
+ for (i = 0 ; i < 3 ; i++) {
+ outl((i << RFADDR_shift), ioaddr + rfcr);
+ *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr);
X }
X
+ /* enable packet filitering */
+ outl(rfcrSave | RFEN, rfcr + ioaddr);
+


X return 1;
X }
X

@@ -304,16 +319,31 @@
X if ((net_dev = init_etherdev(net_dev, 0)) == NULL)
X return NULL;
X
+ if ((net_dev->priv = kmalloc(sizeof(struct sis900_private), GFP_KERNEL)) == NULL) {
+ unregister_netdev(net_dev);
+ return NULL;
+ }
+
+ sis_priv = net_dev->priv;
+ memset(sis_priv, 0, sizeof(struct sis900_private));
+
+ /* We do a request_region() to register /proc/ioports info. */
+ request_region(ioaddr, mac->io_size, net_dev->name);
+ net_dev->base_addr = ioaddr;
+ net_dev->irq = irq;
+ sis_priv->pci_dev = pci_dev;
+ sis_priv->mac = mac;
+
X pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &revision);
- if (revision == SIS630E_REV || revision == SIS630EA1_REV)
- ret = sis630e_get_mac_addr(pci_dev, net_dev);
- else if (revision == SIS630S_REV)
+ if ( revision == SIS630E_900_REV )
X ret = sis630e_get_mac_addr(pci_dev, net_dev);
+ else if ((revision > 0x81) && (revision <= 0x90))
+ ret = sis635_get_mac_addr(pci_dev, net_dev);
X else
X ret = sis900_get_mac_addr(pci_dev, net_dev);
X
X if (ret == 0) {
- unregister_netdevice(net_dev);
+ unregister_netdev(net_dev);


X return NULL;
X }
X

@@ -324,22 +354,11 @@
X printk("%2.2x:", (u8)net_dev->dev_addr[i]);
X printk("%2.2x.\n", net_dev->dev_addr[i]);
X
- if ((net_dev->priv = kmalloc(sizeof(struct sis900_private), GFP_KERNEL)) == NULL) {
- unregister_netdevice(net_dev);
- return NULL;
- }
-
- sis_priv = net_dev->priv;
- memset(sis_priv, 0, sizeof(struct sis900_private));
-
- /* We do a request_region() to register /proc/ioports info. */
- request_region(ioaddr, mac->io_size, net_dev->name);
- net_dev->base_addr = ioaddr;
- net_dev->irq = irq;
- sis_priv->pci_dev = pci_dev;
- sis_priv->mac = mac;
+ /* 630ET : set the mii access mode as software-mode */
+ if (revision == SIS630ET_900_REV)
+ outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr);
X
- /* probe for mii transciver */
+ /* probe for mii transceiver */
X if (sis900_mii_probe(net_dev) == 0) {
X unregister_netdev(net_dev);
X kfree(sis_priv);
@@ -361,81 +380,176 @@
X return net_dev;
X }
X
+/* sis900_mii_probe: - Probe MII PHY for sis900 */
X static int sis900_mii_probe (struct device * net_dev)
X {
X struct sis900_private * sis_priv = (struct sis900_private *)net_dev->priv;
+ u16 poll_bit = MII_STAT_LINK, status = 0;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 24'
echo 'File patch-2.2.20 is continued in part 25'
echo "25" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:06 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part07

#!/bin/sh -x
# this is part 07 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 07; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+.Lnew_psws:
+.long 0x000a0000,0x00000058 # external new psw
+.long 0x000a0000,0x00000060 # svc new psw
+.long 0x000a0000,0x00000068 # program check new psw
+.long 0x000a0000,0x00000070 # machine check new psw
+.L4malign0:
+.long 0xffc00000
+
+################################################################################
+# store status of all cpus in their lowcores
+################################################################################
+
+
+_store_status:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13)
+ la %r7,0x0 # base register for 0 page
+
+ ######## move lowcore info (assume user has made store ########
+ ######## status) to prefix-page ########
+
+ lr %r2,%r7 # zero page (source)
+ bas %r14,_copy_lowcore-0b(%r13)
+
+ ######## stop all cpus and store status in prefix pages ########
+
+.Lstore_all:
+ la %r8,0 # first cpu
+ stap .Lcurrent_cpu+2-0b(%r13) # store current cpu address
+
+.Lstatus_loop:
+ cl %r8,.Lcurrent_cpu-0b(%r13) # is ipl cpu ?
+ be .Lnext_cpu-0b(%r13) # if yes get next cpu
+.Lstop_loop:
+ sigp %r9,%r8,0x5 # stop cpu
+ bc 8,.Lcpu_stopped-0b(%r13) # accepted
+ bc 4,.Lnext_cpu-0b(%r13) # status stored in register:
+ # next cpu
+ bc 2,.Lstop_loop-0b(%r13) # busy: try again
+ bc 1,.Lnext_cpu-0b(%r13) # not op: next cpu
+.Lcpu_stopped:
+ lr %r9,%r7
+ sigp %r9,%r8,0xe # store status of cpu
+ bc 8,.Lcpu_stored-0b(%r13) # accepted
+ bc 4,.Lnext_cpu-0b(%r13) # status stored: next cpu
+ bc 2,.Lcpu_stopped-0b(%r13) # busy: try again
+ bc 1,.Lnext_cpu-0b(%r13) # not op: next cpu
+.Lcpu_stored:
+ lr %r2,%r7 # zero page (source)
+ bas %r14,_copy_lowcore-0b(%r13)
+.Lnext_cpu:
+ la %r8,1(%r8) # next cpu (r8 +=1)
+ cl %r8,.Llast_cpu-0b(%r13) # is last possible cpu ?
+ bl .Lstatus_loop-0b(%r13) # jump if not last cpu
+.Lstore_status_exit:
+ lm %r6,%r15,120(%r15)
+ br %r14 # return to caller
+.Lcurrent_cpu:
+ .long 0x0
+.Llast_cpu:
+ .long 0x0000ffff
+
+############1###################################################################
+# copy lowcore to prefix page
+# r2: address of source lowcore (input by caller)
+################################################################################
+
+_copy_lowcore:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13)
+
+ l %r3,0x108(%r2) # get prefix page from lowcore
+
+ ###### check if lowcore address looks valid ######
+
+ cl %r3,.Llinux_start-0b(%r13) # looks valid ?
+ bl .Lcpy_locore_exit-0b(%r13) # if < linux-start addr
+ l %r6,.Lpage_align-0b(%r13) # check page alignment
+ nr %r3,%r6
+ cl %r3,0x108(%r2)
+ bnz .Lcpy_locore_exit-0b(%r13) # if not page aligned
+
+ ###### copy lowcore ######
+
+ # |-----------------------------------------------------------|
+ # | Decimal | Length | Data |
+ # | Address | in Bytes | |
+ # |_________|___________|_____________________________________|
+ # | 212 | 4 | Extended save area address |
+ # | 216 | 8 | CPU timer |
+ # | 224 | 8 | Clock comparator |
+ # | 256 | 8 | Current PSW |
+ # | 264 | 4 | Prefix register |
+ # | 288 | 64 | Access registers 0 through 15 |
+ # | 352 | 32 | Floating-point registers 0 through 6|
+ # | 384 | 64 | General registers 0 through 15 |
+ # | 448 | 64 | Control registers 0 through 15 |
+ # |_________|___________|_____________________________________|
+
+ mvc 212(20,%r3),212(%r2)
+ mvc 256(12,%r3),256(%r2)
+ mvc 288(224,%r3),288(%r2)
+
+.Lcpy_locore_exit:
+ lm %r6,%r15,120(%r15)
+ br %r14 # return to caller
+.Lpage_align:
+ .long -4096
+
+.align 4
+.Ldump_mem: .long _dump_mem # address of function
+
+.Llinux_start:
+ .long 0x10000
+.Lc96: .long 96 # for creating stackframes
+.align 8
+#
+# The Dump header
+#
+.Ldh_dumpheader:
+.Ldh_magic_number:.long S390_DUMP_MAGIC
+.Ldh_version: .long 0x00000001
+.Ldh_header_size: .long HEADER_SIZE
+.Ldh_dump_level: .long 0x00000004 # DUMP_ALL
+.Ldh_page_size: .long PAGE_SIZE
+.Ldh_mem_size: .long 0x00000000,0x00000000
+.Ldh_mem_start: .long 0x00000000,0x00000000
+.Ldh_mem_end: .long 0x00000000,0x00000000
+.Ldh_num_pages: .long 0x00000000
+.Ldh_pad: .long 0x00000000
+.Ldh_time: .long 0x00000000,0x00000000
+.Ldh_cpuid: .long 0x00000000,0x00000000
+.Ldh_arch: .long ARCH_S390
+.Ldh_free: .long 0x00000000
+#
+# Dump End Marker
+#
+.align 8
+.Ld_endmarker: .long DUMP_END_MARKER
+.Ld_end_time: .long 0x00000000,0x00000000
+
+.endm
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/boot/dumpeckd.S linux/arch/s390/boot/dumpeckd.S
--- v2.2.19/arch/s390/boot/dumpeckd.S Thu Jan 1 01:00:00 1970
+++ linux/arch/s390/boot/dumpeckd.S Wed Oct 10 01:40:43 2001
@@ -0,0 +1,548 @@
+/*
+ * Dump boot loader for 3380/3390 DASDs
+ * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Michael Holzheu <hol...@de.ibm.com>
+ * Holger Smolinski <Holger.S...@de.ibm.com>
+ *
+ * Uses extern functions:
+ * - _panik
+ * - _enable_device
+ * - _take_dump
+ *
+ * Functions:
+ * - _dump_mem
+ */
+
+#include "dumpcommon.S"
+
+/* General defines */
+
+#define IPL_BS 0x1000
+#define BLOCKS_PER_WRITE 64 /* makes 256K with 4K blksize */
+
+#ifdef ZIPL
+
+################################################################################
+# Function entry point at 0x2000 (not used for dump) is called with C linkage
+# %r2-%r3: load descriptor
+# %r3 : device subchannel id
+# %r4 : load address
+################################################################################
+
+ basr %r1,0
+ b _not_implemented-.(%r1)
+ .align 8
+
+#else
+
+#define DUMP_TOOL_START 0x2000
+
+################################################################################
+# one psw and two ccws:
+# Re-Read enough of bootsector to start
+################################################################################
+
+.psw: .long 0x00080000,0x80000000+_start
+.ccw1: .long 0x06000000 + DUMP_TOOL_START,0x00000000 + IPL_BS
+.ccw2: .long 0x00000000,0x00000000
+
+#endif /* ZIPL */
+
+################################################################################
+# Program execution of the second stage boot loader starts at 0x2008
+################################################################################
+
+ .globl _start
+_start: basr %r13,0
+0: l %r15,1f-0b(%r13) # load end of stack address
+ l %r11,IPL_SC # load ipl device subchannel id
+ lr %r2,%r11
+ l %r14,.Lenable_device-0b(%r13)
+ basr %r14,%r14
+ bas %r14,_get_device_characteristics-0b(%r13)
+ l %r5,.Ldev_end_rec-0b(%r13) # endblock (first block = nr 1)
+ st %r5,.Ldev_bpt-0b(%r13)
+ l %r5,.Ldev_blk_size-0b(%r13) # get blocksize
+ stcm %r5,3,.Lwrccw+2-0b(%r13) # store blocksize into wr template
+ stcm %r5,3,.Llodata+14-0b(%r13) # store blocksize into lodata
+ l %r14,.Ltake_dump-0b(%r13)
+ basr %r14,%r14
+1: .long 0x10000-96 # end of stack
+
+#ifdef ZIPL
+
+################################################################################
+# Get the device characteristics:
+#
+# Get device characteristics from zipl parameters (at 0x218)
+# The following parameter format is expected 2x8 byte:
+#
+# Dump Start: CCHH RBBN
+# Dump End: CCHH RBBX
+#
+# - CC: Start/End Cylinder Number
+# - HH: Start/End Head Number
+# - R : Start/End Record Number
+# - BB: Blocksize
+# - N : Number of Heads of DASD
+# - X : Unused
+#
+# Cylinder, Heads are counted starting with 0.
+# Records are counted starting with 1.
+# We assume that the End Record Number is at track boundary.
+# This allows us to determine the number of Blocks Per Track.
+################################################################################
+
+_get_device_characteristics:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+ la %r12,0 # load base register
+ mvc .Ldev_start_cyl-0b+2(2,%r13),0x218(%r12)
+ mvc .Ldev_start_hd-0b+2(2,%r13),0x21a(%r12)
+ mvc .Ldev_start_rec-0b+3(1,%r13),0x21c(%r12)
+ mvc .Ldev_blk_size-0b+2(2,%r13),0x21d(%r12)
+ mvc .Ldev_nr_hds-0b+3(1,%r13),0x21f(%r12)
+ mvc .Ldev_end_cyl-0b+2(2,%r13),0x220(%r12)
+ mvc .Ldev_end_hd-0b+2(2,%r13),0x222(%r12)
+ mvc .Ldev_end_rec-0b+3(1,%r13),0x224(%r12)
+ lm %r6,%r15,120(%r15)
+ br %r14
+
+#else
+
+################################################################################
+# Get the device characteristics:
+#
+# The following is fix:
+# - blocksize = 4K
+# - start cylinder = 0
+# - start head = 0
+# - start record = 4
+# - end cylinder = unlimited
+# - end head = nr of heads
+# - end record = blocks per track
+#
+# The following is read from the device characteristics
+#
+# - model 3380/90 ==> blocks per track
+# - nr of heads
+#
+################################################################################
+
+_get_device_characteristics:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+ la %r6,.Lrdcccw-0b(%r13)
+ st %r6,.Lorb+8-0b(%r13) # store cp-address to orb
+ l %r2,IPL_SC
+ la %r3,.Lorb-0b(%r13)
+ la %r4,.Lirb-0b(%r13)
+ la %r5,2
+ bas %r14,_ssch-0b(%r13) # start I/O: Read device characteristic
+
+ # find out blocks per track (bpt)
+
+ la %r6,9
+ clc .Lrdcdata+3-0b(2,%r13),.L9345-0b(%r13)
+ be 1f-0b(%r13)
+ la %r6,10
+ clc .Lrdcdata+3-0b(2,%r13),.L3380-0b(%r13)
+ be 1f-0b(%r13)
+ la %r6,12
+ clc .Lrdcdata+3-0b(2,%r13),.L3390-0b(%r13)
+ be 1f-0b(%r13)
+
+ # not supported device panik
+
+ la %r2,EDEV_INVAL
+ l %r14,.Lpanik-0b(%r13)
+ basr %r14,%r14
+
+1:
+ # store dev characteristic
+
+ st %r6,.Ldev_end_rec-0b(%r13)
+
+ slr %r6,%r6
+ icm %r6,3,.Lrdcdata+14-0b(%r13)
+ st %r6,.Ldev_end_hd-0b(%r13)
+ st %r6,.Ldev_nr_hds-0b(%r13)
+
+ la %r6,0
+ st %r6,.Ldev_start_cyl-0b(%r13)
+ la %r6,0
+ st %r6,.Ldev_start_hd-0b(%r13)
+ la %r6,4
+ st %r6,.Ldev_start_rec-0b(%r13)
+ l %r6,.Lblk_size-0b(%r13)
+ st %r6,.Ldev_blk_size-0b(%r13)
+ l %r6,.Lend_cyl-0b(%r13)
+ st %r6,.Ldev_end_cyl-0b(%r13)
+
+ lm %r6,%r15,120(%r15)
+ br %r14
+.L3390:
+ .word 0x3390
+.L9345:
+ .word 0x9345
+.L3380:
+ .word 0x3380
+.Lend_cyl:
+ .long 0x0000ffff
+.Lblk_size:
+ .long 0x1000
+.align 8
+
+.Lrdcdata:
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+.Lrdcccw:
+ .long 0x64000040,0x00000000+.Lrdcdata # read device characteristics
+
+#endif /* ZIPL */
+
+################################################################################
+# Dump memory
+################################################################################
+
+_dump_mem:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+
+ # calculate start and end block
+
+ la %r6,0
+ l %r7,.Ldev_start_cyl-0b(%r13)
+ la %r8,0
+ l %r9,.Ldev_start_hd-0b(%r13)
+ l %r10,.Ldev_start_rec-0b(%r13)
+ l %r11,.Ldev_nr_hds-0b(%r13)
+ l %r12,.Ldev_bpt-0b(%r13) # = blocks per track
+
+ # calculate start block
+ #######################
+
+ # cyl * nr_hds * blkptr
+
+ mr %r6,%r11
+ mr %r6,%r12
+
+ # hd * recs
+
+ mr %r8,%r12
+
+ # start block = cyl * nr_hds * bptr + hd * bptr + rec
+
+ ar %r7,%r9
+ ar %r7,%r10
+
+ bctr %r7,0 # decrement, we start counting
+ # beginning with block 0
+
+ st %r7,.Ldev_start_blk-0b(%r13)
+
+
+
+ # calculate end block
+ #######################
+
+ l %r7,.Ldev_end_cyl-0b(%r13)
+ l %r9,.Ldev_end_hd-0b(%r13)
+
+ # cyl * nr_hds * blkptr
+
+ mr %r6,%r11
+ mr %r6,%r12
+
+ # hd * recs
+
+ mr %r8,%r12
+
+ # end block = cyl * nr_hds * bptr + hd * bptr + rec
+
+ ar %r7,%r9
+ ar %r7,%r12
+
+ bctr %r7,0 # decrement, we start counting
+ # beginning with block 0
+
+ st %r7,.Ldev_end_blk-0b(%r13)
+
+ # calculate bytes per write (blksize * blwr)
+
+ l %r11,.Ldev_blk_size-0b(%r13)
+ mh %r11,.Lblocks_per_write-0b(%r13)
+ st %r11,.Lbytes_per_write-0b(%r13)
+
+# write header
+
+.Lheaders: # write dump headers
+ stck .Ldh_time-0b(%r13) # store time
+ stidp .Ldh_cpuid-0b(%r13) # store cpu id
+
+ l %r11,.Ldev_start_blk-0b(%r13) # start block
+
+ lr %r2,%r11
+ la %r3,.Ldh_dumpheader-0b(%r13) # address of dump header
+
+ l %r4,.Lheader_size-0b(%r13)
+ srda %r4,32 # shift ==> 64 bit number
+ l %r6,.Ldev_blk_size-0b(%r13) # get blocksize
+
+ dr %r4,%r6 # nr of blocks for header =
+ # HEADER_SIZE / BLOCKSIZE = r5
+ lr %r4,%r5
+ lr %r12,%r5 # save nr of blocks
+ bas %r14,_writeblock-0b(%r13) # write block to disk
+ ar %r11,%r12 # update block counter
+
+.Lmemory: # write memory
+
+# write memory
+
+ la %r10,0 # start at address 0
+
+.Lmloop:
+ la %r4,BLOCKS_PER_WRITE # write so many blocks at a time
+ lr %r2,%r11 # restore r2
+ lr %r3,%r10 # restore r3
+ bas %r14,_writeblock-0b(%r13) # write block to disk
+ l %r2,.Lbytes_per_write-0b(%r13)
+ ar %r10,%r2 # update data address
+ ah %r11,.Lblocks_per_write-0b(%r13) # skip to next block
+ l %r3,.Ldh_mem_size+4-0b(%r13) # get memsize
+ clr %r10,%r3 # enough ?
+ bl .Lmloop-0b(%r13) # branch if r10 < r3
+
+# write end marker
+
+.lendmarker: # terminate dump file
+ la %r4,1 # write endmaker with one block
+ stck .Ld_end_time-0b(%r13) # store end time
+ lr %r2,%r11 # restore r2
+ la %r3,.Ld_endmarker-0b(%r13) # address of dump end marker
+ la %r4,1 # write 4k at a time
+ bas %r14,_writeblock-0b(%r13) # write block to disk
+
+ lm %r6,%r15,120(%r15)
+ br %r14 # return to caller
+.Lbytes_per_write: .long 0x00000000
+.Lheader_size: .long HEADER_SIZE
+.Lblocks_per_write: .word BLOCKS_PER_WRITE
+
+################################################################################
+# This function writes a block number given in r2 to disk
+# r2: number of first block to write ( input by caller )
+# We start counting with Block Nr 0 !!!
+# r3: address to write data from ( input by caller )
+# r4: number of blocks to write ( input by caller )
+################################################################################
+
+_writeblock:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+
+ # check if blocks are within range:
+
+ lr %r11,%r2
+ ar %r11,%r4 # End block
+ l %r12,.Ldev_end_blk-0b(%r13)
+ clr %r11,%r12 # End block < dev_end_blk ?
+ bl 1f-0b(%r13) # no
+ la %r2,EMEM # if yes panik
+ l %r14,.Lpanik-0b(%r13)
+ basr %r14,%r14
+
+1: la %r12,.Ldeccw-0b(%r13)
+ st %r12,8+.Lorb-0b(%r13) # store cpaddr to orb
+ la %r12,.Lwrccw-0b(%r13)
+ oi 1(%r12),0x40 # set CC in wr template
+
+ # first setup the write channel program
+
+ lr %r11,%r4 # save number of blocks
+
+ l %r6,.Ldev_bpt-0b(%r13) # load bpt to r6
+ l %r7,.Ldev_nr_hds-0b(%r13) # load heads to r7
+ la %r5,.Lwrloop-0b(%r13)
+ br %r5 /* FIXME */
+
+2: # loop for number of block (nbl) time
+
+ # switch to next write CCW
+
+ l %r5,.Ldev_blk_size-0b(%r13)
+ ar %r3,%r5 # add blksize to destination addr
+ ah %r12,.Lccw_size-0b(%r13) # add sizeof(ccw) to base address
+ mvc 0(8,%r12),.Lwrccw-0b(%r13) # copy template to this ccw
+
+.Lwrloop:
+
+ # build up next write CCW
+
+ st %r3,4(%r12) # store target addr to this ccw
+ bct %r4,2b-0b(%r13) # decrement no of blks still to do
+ ni 1(%r12),0x3f # no command chaining for last ccw
+
+ # write CCWs are setup now
+
+ lr %r4,%r11 # restore number of blocks
+ stcm %r4,3,.Llodata+2-0b(%r13) # store number of blocks to lodata
+
+ # compute end block
+
+ ar %r4,%r2 # r4: ebl = blk + nbl
+ bctr %r4,0 # decrement r4 (last blk touched)
+
+ # compute start track and start block on track
+
+ srda %r2,32 # shift ==> 64 bit number
+ dr %r2,%r6 # trk = blk / bpt, bot = blk % bpt
+ # r3: trk, r2: bot
+ la %r2,1(%r2) # bot++ ( we start counting at 1 )
+ stcm %r2,1,.Llodata+12-0b(%r13) # store bot to lodata
+
+ # compute start cylinder and head
+
+ xr %r2,%r2 # clear bot
+ dr %r2,%r7 # cy=trk / heads, hd=trk % heads
+ # r3: cy, r2: hd
+ sll %r3,16 # combine to CCHH in r3
+ or %r3,%r2
+ st %r3,.Ldedata+8-0b(%r13) # store cchh to dedata
+ st %r3,.Llodata+4-0b(%r13) # store cchh to lodata
+ st %r3,.Llodata+8-0b(%r13) # store cchh to lodata
+
+ # compute end track and end block on track
+
+ lr %r11,%r5 # save r5
+ srda %r4,32 # shift ==> 64 bit number
+ dr %r4,%r6 # tr2 = ebl / bpt
+ # r5: tr2, r4: bot2
+ # compute end cylinder and head
+
+ xr %r4,%r4 # cy2=tr2/heads, hd2=hd2 % heads
+ dr %r4,%r7 # r5: cy2, r4: hd2
+ stcm %r5,3,.Ldedata+12-0b(%r13) # store cy2,hd2 to dedata
+ stcm %r4,3,.Ldedata+14-0b(%r13) # store cy2,hd2 to dedata
+ lr %r5,%r11 # restore r5
+
+ # CCWs are setup now, arent they?
+
+ l %r2,IPL_SC # subchannel id
+ la %r3,.Lorb-0b(%r13)
+ la %r4,.Lirb-0b(%r13)
+ la %r5,10 # initialize retries
+
+ bas %r14,_ssch-0b(%r13) # start I/O
+
+ lm %r6,%r15,120(%r15)
+ br %r14 # return to caller
+.Lccw_size:
+ .word 0x8
+.align 8
+.Lorb:
+ .long 0x0049504c,0x0080ff00 # intparm is " IPL"
+ .long 0x00000000,0x00000000
+.Lirb:
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0x00000000
+.Ldedata:
+ .long 0x80c00000,0x00000000
+ .long 0x00000000,0x00000000
+.Llodata:
+ .long 0x01800001,0x00000000
+ .long 0x00000000,0x03000000
+ .long 0x12345678,0x00000000
+
+################################################################################
+# read function not implemented: return EINVAL
+################################################################################
+
+_not_implemented:
+ la %r2,22 /* EINVAL */
+ lcr %r2,%r2 /* -EINVAL */
+ br %r14
+
+################################################################################
+# expand Macros
+################################################################################
+
+ dump_common_fn
+ device_fn
+ io_subroutines
+
+
+################################################################################
+# DATA
+################################################################################
+
+# extern functions
+
+.Lpanik:
+ .long _panik
+.Lenable_device:
+ .long _enable_device
+.Ltake_dump:
+ .long _take_dump
+
+# device characteristics
+.align 8
+.Ldev_start_cyl:
+ .long 0x00000000
+.Ldev_start_hd:
+ .long 0x00000000
+.Ldev_start_rec:
+ .long 0x00000000
+.Ldev_blk_size:
+ .long 0x00000000
+.Ldev_nr_hds:
+ .long 0x00000000
+.Ldev_end_cyl:
+ .long 0x00000000
+.Ldev_end_hd:
+ .long 0x00000000
+.Ldev_end_rec:
+ .long 0x00000000
+
+
+.Ldev_start_blk:
+ .long 0x00000000
+.Ldev_end_blk:
+ .long 0x00000000
+.Ldev_bpt:
+ .long 0x00000000
+
+
+#
+# CCWs
+#
+
+.align 8
+
+# channel program for one write
+
+.Ldeccw:
+ .long 0x63400010,0x00000000+.Ldedata # define extent
+.Lloccw:
+ .long 0x47400010,0x00000000+.Llodata # locate record
+.Lwrccw:
+ .long 0x8d000000,0x00000000 # update Key & data
+
+.org IPL_BS
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/boot/dumptape.S linux/arch/s390/boot/dumptape.S
--- v2.2.19/arch/s390/boot/dumptape.S Thu Jan 1 01:00:00 1970
+++ linux/arch/s390/boot/dumptape.S Wed Oct 10 01:40:43 2001
@@ -0,0 +1,183 @@
+/*
+ * Dump boot loader for 3480/3490 tape devices
+ * Copyright (C) 1999-2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Michael Holzheu (hol...@de.ibm.com),
+ * Martin Schwidefsky (schwi...@de.ibm.com)
+ *
+ * Uses extern functions:
+ * - _panik
+ * - _enable_device
+ * - _take_dump
+ *
+ * Functions:
+ * - _dump_mem
+ */
+
+#include "dumpcommon.S"
+
+#define IPL_BS 0x1000
+#define BLOCK_SIZE 0x8000 /* 32 KB */
+#define DUMP_TOOL_START 0x2000 /* tool is loaded to this address in order */
+ /* not to overwrite page 0 */
+
+################################################################################
+# The first 24 bytes are loaded by ipl to addresses 0-23. (a PSW and two CCWs)
+################################################################################
+
+ # psw
+ .long 0x00080000,0x80000000+_start
+ # rewind ccw
+ .long 0x07000000,0x60000001
+ # ccw to load dump utility to 0x1000
+ .long 0x02000000+DUMP_TOOL_START ,0x20000000+IPL_BS
+
+.globl _start
+_start: basr %r13,0
+0: l %r15,1f-0b(%r13) # load end of stack address
+ l %r11,IPL_SC # load ipl device subchannel id
+ lr %r2,%r11
+ l %r14,.Lenable_device-0b(%r13)
+ basr %r14,%r14
+ l %r14,.Ltake_dump-0b(%r13)
+ basr %r14,%r14
+1: .long 0x10000-96 # end of stack
+
+################################################################################
+# Dump memory
+################################################################################
+
+_dump_mem:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+#
+# first write a tape mark
+#
+ bas %r14,_tapemark-0b(%r13)
+#
+# write header
+#
+ stck .Ldh_time-0b(%r13) # store time
+ stidp .Ldh_cpuid-0b(%r13) # store cpu id
+ la %r2,.Ldh_dumpheader-0b(%r13) # start of header
+ l %r3,.Lheader_size-0b(%r13) # size of header
+ lr %r4,%r3 # blocksize
+ bas %r14,_writer-0b(%r13)
+
+#
+# write real storage to tape
+#
+
+ la %r2,0 # start
+ l %r3,.Ldh_mem_size+4-0b(%r13) # length
+ l %r4,.Lblock_size-0b(%r13) # blocksize
+ bas %r14,_writer-0b(%r13) # write page
+#
+# write end marker
+#
+ stck .Ld_end_time-0b(%r13) # store end time
+ la %r2,.Ld_endmarker-0b(%r13) # address of end marker
+ la %r3,END_MARKER_SIZE # size of end marker
+ la %r4,END_MARKER_SIZE # blocksize
+ bas %r14,_writer-0b(%r13)
+#
+# write another tape mark
+#
+ bas %r14,_tapemark-0b(%r13)
+
+ lm %r6,%r15,120(%r15)
+ br %r14 # return to caller
+.Lheader_size: .long HEADER_SIZE
+.Lblock_size: .long BLOCK_SIZE
+
+################################################################################
+# subroutine for writing to tape
+# Parameters:
+# -r2: start address
+# -r3: length
+# -r4: blocksize
+################################################################################
+
+_writer:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+
+ lr %r10,%r2 # save start address
+ lr %r11,%r3 # save length
+ ar %r11,%r2 # end address
+ lr %r12,%r4 # save blocksize
+
+ st %r10,.Lccwwrite+4-0b(%r13) # initialize CCW data addresses
+ sth %r12,.Lccwwrite+2-0b(%r13) # setup blocksize
+.Lldlp:
+ l %r2,IPL_SC # subchannel id
+ la %r3,.Lorbwrite-0b(%r13) # address of orb
+ la %r4,.Lirb-0b(%r13) # address of irb
+ la %r5,10 # 10 retries
+ bas %r14,_ssch-0b(%r13) # write chunk of PAGE_SIZE bytes
+
+ l %r0,.Lccwwrite+4-0b(%r13) # update CCW data addresses
+ ar %r0,%r12 # add block size
+ st %r0,.Lccwwrite+4-0b(%r13)
+ clr %r0,%r11 # enough ?
+ bl .Lldlp-0b(%r13)
+
+ lm %r6,%r15,120(%r15)
+ br %r14
+
+################################################################################
+# write tapemark
+################################################################################
+
+_tapemark:
+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame
+
+ l %r2,IPL_SC # subchannel id
+ la %r3,.Lorbmark-0b(%r13) # r12 = address of orb
+ la %r4,.Lirb-0b(%r13) # r5 = address of irb
+ la %r5,10 # retries
+ bas %r14,_ssch-0b(%r13) # write a tape mark
+
+ lm %r6,%r15,120(%r15)
+ br %r14 # return to caller
+
+################################################################################
+# expand Macros
+################################################################################
+
+dump_common_fn
+device_fn
+io_subroutines
+
+################################################################################
+# DATA
+################################################################################
+
+# extern functions
+
+.Lpanik:
+ .long _panik
+.Lenable_device:
+ .long _enable_device
+.Ltake_dump:
+ .long _take_dump
+
+# irbs, orbs etc.
+
+ .align 8
+.Lorbwrite:
+ .long 0x00000000,0x0080ff00,.Lccwwrite
+ .align 8
+.Lorbmark:
+ .long 0x00000000,0x0080ff00,.Lccwmark
+ .align 8
+.Lccwwrite:
+ .long 0x01200000,0x00000000
+.Lccwmark:
+ .long 0x1f200001,0x00000000
+
+.Lirb: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+.org IPL_BS
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/boot/ipldump.S linux/arch/s390/boot/ipldump.S
--- v2.2.19/arch/s390/boot/ipldump.S Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/boot/ipldump.S Thu Jan 1 01:00:00 1970
@@ -1,179 +0,0 @@
-/*
- * arch/s390/boot/ipldump.S
- *
- * S390 version
- * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Schwidefsky (schwi...@de.ibm.com),
- *
- * Tape dump ipl record. Put it on a tape and ipl from it and it will
- * write a dump of the real storage after the ipl record on that tape.
- */
-
-#include <linux/config.h>
-#include <asm/setup.h>
-#include <asm/lowcore.h>
-
-#define IPL_BS 1024
- .org 0
- .long 0x00080000,0x80000000+_start # The first 24 bytes are loaded
- .long 0x07000000,0x60000001 # by ipl to addresses 0-23.
- .long 0x02000000,0x20000000+IPL_BS # (a PSW and two CCWs).
- .long 0x00000000,0x00000000
- .long 0x00000000,0x00000000 # svc old psw
- .long 0x00000000,0x00000000 # program check old psw
- .long 0x00000000,0x00000000 # machine check old psw
- .long 0x00000000,0x00000000 # io old psw
- .long 0x00000000,0x00000000
- .long 0x00000000,0x00000000
- .long 0x00000000,0x00000000
- .long 0x000a0000,0x00000058 # external new psw
- .long 0x000a0000,0x00000060 # svc new psw
- .long 0x000a0000,0x00000068 # program check new psw
- .long 0x000a0000,0x00000070 # machine check new psw
- .long 0x00080000,0x80000000+.Lioint # io new psw
-
- .org 0x100
- .globl _start
-_start:
- l %r1,0xb8 # load ipl subchannel number
-#
-# find out memory size
-#
- mvc 104(8,0),.Lpcmem0 # setup program check handler
- slr %r3,%r3
- lhi %r2,1
- sll %r2,20
-.Lloop0:
- l %r0,0(%r3) # test page
- ar %r3,%r2 # add 1M
- jnm .Lloop0 # r1 < 0x80000000 -> loop
-.Lchkmem0:
- n %r3,.L4malign0 # align to multiples of 4M
- st %r3,.Lmemsize # store memory size
-.Lmemok:
-
-#
-# first write a tape mark
-#
- bras %r14,.Ltapemark
-#
-# write real storage to tape
-#
- slr %r2,%r2 # start at address 0
- bras %r14,.Lwriter # load ramdisk
-#
-# write another tape mark
-#
- bras %r14,.Ltapemark
-#
-# everything written, stop processor
-#
- lpsw .Lstopped
-#
-# subroutine for writing to tape
-# Paramters:
-# R1 = device number
-# R2 = start address
-# R3 = length
-.Lwriter:
- st %r14,.Lldret
- la %r12,.Lorbread # r12 = address of orb
- la %r5,.Lirb # r5 = address of irb
- st %r2,.Lccwwrite+4 # initialize CCW data addresses
- lctl %c6,%c6,.Lcr6
- slr %r2,%r2
-.Lldlp:
- lhi %r6,3 # 3 retries
-.Lssch:
- ssch 0(%r12) # write chunk of IPL_BS bytes
- jnz .Llderr
-.Lw4end:
- bras %r14,.Lwait4io
- tm 8(%r5),0x82 # do we have a problem ?
- jnz .Lrecov
- l %r0,.Lccwwrite+4 # update CCW data addresses
- ahi %r0,IPL_BS
- st %r0,.Lccwwrite+4
- clr %r0,%r3 # enough ?
- jl .Lldlp
-.Ldone:
- l %r14,.Lldret
- br %r14 # r2 contains the total size
-.Lrecov:
- bras %r14,.Lsense # do the sensing
- brct %r6,.Lssch # dec. retry count & branch
- j .Llderr
-.Ltapemark:
- st %r14,.Lldret
- la %r12,.Lorbmark # r12 = address of orb
- la %r5,.Lirb # r5 = address of irb
- lctl %c6,%c6,.Lcr6
- ssch 0(%r12) # write a tape mark
- jnz .Llderr
- bras %r14,.Lwait4io
- l %r14,.Lldret
- br %r14
-#
-# Sense subroutine
-#
-.Lsense:
- st %r14,.Lsnsret
- la %r7,.Lorbsense
- ssch 0(%r7) # start sense command
- jnz .Llderr
- bras %r14,.Lwait4io
- l %r14,.Lsnsret
- tm 8(%r5),0x82 # do we have a problem ?
- jnz .Llderr
- br %r14
-#
-# Wait for interrupt subroutine
-#
-.Lwait4io:
- lpsw .Lwaitpsw
-.Lioint:
- c %r1,0xb8 # compare subchannel number
- jne .Lwait4io
- tsch 0(%r5)
- slr %r0,%r0
- tm 8(%r5),0x82 # do we have a problem ?
- jnz .Lwtexit
- tm 8(%r5),0x04 # got device end ?
- jz .Lwait4io
-.Lwtexit:
- br %r14
-.Llderr:
- lpsw .Lcrash
-
- .align 8
-.Lorbread:
- .long 0x00000000,0x0080ff00,.Lccwwrite
- .align 8
-.Lorbsense:
- .long 0x00000000,0x0080ff00,.Lccwsense
- .align 8
-.Lorbmark:
- .long 0x00000000,0x0080ff00,.Lccwmark
- .align 8
-.Lccwwrite:
- .long 0x01200000+IPL_BS,0x00000000
-.Lccwsense:
- .long 0x04200001,0x00000000
-.Lccwmark:
- .long 0x1f200001,0x00000000
-.Lwaitpsw:
- .long 0x020a0000,0x80000000+.Lioint
-
-.Lirb: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-.Lcr6: .long 0xff000000
- .align 8
-.Lcrash:.long 0x000a0000,0x00000000
-.Lstopped: .long 0x000a0000,0x00001234
-.Lpcmem0:.long 0x00080000,0x80000000 + .Lchkmem0
-.L4malign0:.long 0xffc00000
-.Lmemsize:.long 0
-.Lldret:.long 0
-.Lsnsret: .long 0
-
- .org IPL_BS
-
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/defconfig linux/arch/s390/defconfig
--- v2.2.19/arch/s390/defconfig Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/defconfig Wed Oct 10 01:40:43 2001
@@ -1,5 +1,5 @@
X #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
X #
X CONFIG_ARCH_S390=y
X
@@ -7,7 +7,7 @@
X # Code maturity level options
X #
X CONFIG_EXPERIMENTAL=y
-CONFIG_PROCESS_DEBUG=n
+# CONFIG_PROCESS_DEBUG is not set
X
X #
X # Processor type and features
@@ -42,11 +42,15 @@
X # CONFIG_BLK_DEV_NBD is not set
X # CONFIG_BLK_DEV_MD is not set
X CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_SIZE=24576
X CONFIG_BLK_DEV_INITRD=y
X CONFIG_BLK_DEV_XPRAM=m
X # CONFIG_MDISK is not set
X CONFIG_DASD=y
+
+#
+# DASD disciplines
+#
X CONFIG_DASD_ECKD=y
X CONFIG_DASD_FBA=y
X CONFIG_DASD_MDSK=y
@@ -55,6 +59,10 @@
X # S/390 Network device support
X #
X CONFIG_NETDEVICES=y
+
+#
+# S390 Network devices
+#
X CONFIG_CTC=y
X CONFIG_IUCV=y
X # CONFIG_DUMMY is not set
@@ -68,6 +76,15 @@
X CONFIG_3215_CONSOLE=y
X CONFIG_HWC=y
X CONFIG_HWC_CONSOLE=y
+
+#
+# S/390 character device drivers
+#
+# CONFIG_S390_TAPE is not set
+
+#
+# Character devices
+#
X CONFIG_UNIX98_PTYS=y
X CONFIG_UNIX98_PTY_COUNT=256
X
@@ -88,16 +105,26 @@
X # CONFIG_IP_ROUTER is not set
X # CONFIG_NET_IPIP is not set
X # CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
X # CONFIG_IP_ALIAS is not set
X # CONFIG_SYN_COOKIES is not set
+
+#
+# (it is safe to leave these untouched)
+#
X # CONFIG_INET_RARP is not set
X CONFIG_SKB_LARGE=y
X # CONFIG_IPV6 is not set
+
+#
+#
+#
X # CONFIG_IPX is not set
X # CONFIG_ATALK is not set
X # CONFIG_X25 is not set
X # CONFIG_LAPB is not set
X # CONFIG_BRIDGE is not set
+# CONFIG_NET_DIVERT is not set
X # CONFIG_LLC is not set
X # CONFIG_ECONET is not set
X # CONFIG_WAN_ROUTER is not set
@@ -141,8 +168,10 @@
X #
X # CONFIG_CODA_FS is not set
X CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
X CONFIG_NFSD=y
-# CONFIG_NFSD_SUN is not set
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
X CONFIG_SUNRPC=y
X CONFIG_LOCKD=y
X # CONFIG_SMB_FS is not set
@@ -153,6 +182,7 @@
X #
X # CONFIG_BSD_DISKLABEL is not set
X # CONFIG_MAC_PARTITION is not set
+# CONFIG_MINIX_SUBPARTITION is not set
X # CONFIG_SMD_DISKLABEL is not set
X # CONFIG_SOLARIS_X86_PARTITION is not set
X # CONFIG_UNIXWARE_DISKLABEL is not set
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/entry.S linux/arch/s390/kernel/entry.S
--- v2.2.19/arch/s390/kernel/entry.S Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/kernel/entry.S Wed Oct 10 01:40:43 2001
@@ -657,11 +657,10 @@
X lh %r7,__LC_PGM_ILC # load instruction length
X pgm_no_sv:
X lh %r8,__LC_PGM_INT_CODE # N.B. saved int code used later KEEP it
- stosm 24(%r15),0x03 # reenable interrupts
X lr %r3,%r8
X la %r0,0x7f
X nr %r3,%r0 # clear per-event-bit
- be BASED(pgm_dn) # none of Martins exceptions occured bypass
+ be BASED(pgm_dn) # none of Martins exceptions occurred bypass
X l %r9,BASED(.Ljump_table)
X sll %r3,2
X l %r9,0(%r3,%r9) # load address of handler routine
@@ -672,6 +671,9 @@
X l %r5,SP_PSW+4(15) # load psw addr
X sr %r5,%r7 # substract ilc from psw
X st %r5,SP_PSW+4(15) # store corrected psw addr
+pgm_per:cl %r3,BASED(.Lc20) # pseudo page fault ?
+ be BASED(pgm_go) # if yes then don't reenable interrupts
+ stosm 24(%r15),0x03 # reenable interrupts
X pgm_go: basr %r14,%r9 # branch to interrupt-handler
X pgm_dn: la %r0,0x80
X nr %r8,%r0 # check for per exception
@@ -834,6 +836,7 @@
X .Lc_ac: .long 0,0,1
X .Lc_ENOSYS: .long -ENOSYS
X .Lc4: .long 4
+.Lc20: .long 20
X .Lc0x1202: .long 0x1202
X .Lc0x1004: .long 0x1004
X .Lc0x2401: .long 0x2401
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/process.c linux/arch/s390/kernel/process.c
--- v2.2.19/arch/s390/kernel/process.c Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/kernel/process.c Wed Oct 10 01:40:43 2001
@@ -404,7 +404,7 @@
X error = do_execve(filename, (char **) regs.gprs[3], (char **) regs.gprs[4], &regs);
X if (error == 0)
X {
- current->flags &= ~PF_DTRACE;
+ current->ptrace &= ~PT_DTRACE;
X current->tss.fp_regs.fpc=0;
X if(MACHINE_HAS_IEEE)
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/ptrace.c linux/arch/s390/kernel/ptrace.c
--- v2.2.19/arch/s390/kernel/ptrace.c Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -435,10 +435,10 @@


X if (request == PTRACE_TRACEME)

X {


X /* are we already being traced? */
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X goto out;
X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;
X ret = 0;
X goto out;
X }

@@ -459,9 +459,9 @@


X (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED)
+ if (child->ptrace & PT_PTRACED)
X goto out;
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;

X if (child->p_pptr != current)

X {
X REMOVE_LINKS(child);
@@ -478,7 +478,7 @@
X /* ieee_instruction_pointer from the user structure DJB */
X if(child!=current)
X {


- if (!(child->flags & PF_PTRACED))
+ if (!(child->ptrace & PT_PTRACED))
X goto out;

X if (child->state != TASK_STOPPED)
X {
@@ -524,9 +524,9 @@
X if ((unsigned long) data >= _NSIG)


X break;
X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X /* make sure the single step bit is not set. */
X clear_single_step(child);
@@ -553,7 +553,7 @@
X ret = -EIO;
X if ((unsigned long) data >= _NSIG)
X break;


- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X set_single_step(child);


X /* give it a chance to run. */

@@ -565,7 +565,7 @@
X ret = -EIO;
X if ((unsigned long) data >= _NSIG)


X break;
- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);

X wake_up_process(child);
X child->exit_code = data;
X REMOVE_LINKS(child);

@@ -593,8 +593,8 @@


X asmlinkage void syscall_trace(void)
X {

X lock_kernel();


- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))

X goto out;


X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/reipl.S linux/arch/s390/kernel/reipl.S
--- v2.2.19/arch/s390/kernel/reipl.S Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/kernel/reipl.S Wed Oct 10 01:40:43 2001
@@ -55,7 +55,7 @@
X .Ldispsw: .long 0x000a0000,0x00000000
X .Liplccws: .long 0x02000000,0x60000018
X .long 0x08000008,0x20000001
-.Liplorb: .long 0x0049504c,0x0000ff80
+.Liplorb: .long 0x0049504c,0x0040ff80
X .long 0x00000000+.Liplccws
X .Lschib: .long 0x00000000,0x00000000
X .long 0x00000000,0x00000000
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/s390io.c linux/arch/s390/kernel/s390io.c
--- v2.2.19/arch/s390/kernel/s390io.c Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/kernel/s390io.c Wed Oct 10 01:40:43 2001
@@ -6,6 +6,9 @@
X * Copyright (C) 1999, 2000 IBM Deutschland Entwicklung GmbH,
X * IBM Corporation
X * Author(s): Ingo Adlung (adl...@de.ibm.com)
+ *
+ * ChangeLog : 03/14/2001 Ingo Adlung Save not_oper func pointer prior
+ * to wipe it out

X */
X
X #include <linux/module.h>

@@ -121,7 +124,10 @@
X }
X }
X
-
+/*
+ * Note : internal use of irqflags SA_PROBE for NOT path grouping
+ *
+ */
X int s390_request_irq_special( int irq,
X io_handler_func_t io_handler,
X not_oper_handler_func_t not_oper_handler,
@@ -172,7 +178,8 @@
X {
X if ( !retval )
X {
- s390_DevicePathVerification( irq, 0 );
+ if ( !(irqflags & SA_PROBE))
+ s390_DevicePathVerification( irq, 0 );
X }
X else
X {
@@ -1947,6 +1954,7 @@
X int new_irq;
X #endif
X int use_irq = irq;
+ int cpu = smp_processor_id();
X
X //
X // fix me !!!
@@ -1974,6 +1982,7 @@
X
X } /* endif */
X
+ irq_enter(cpu, use_irq);
X s390irq_spin_lock(use_irq);
X
X #ifdef CONFIG_FAST_IRQ
@@ -2012,6 +2021,7 @@
X #endif /* CONFIG_FAST_IRQ */
X
X s390irq_spin_unlock(use_irq);
+ irq_exit(cpu, use_irq);
X
X return;
X }
@@ -2141,9 +2151,28 @@
X * secondary status are presented with different interrupts.
X */
X if ( ioinfo[irq]->devstat.ii.irb.scsw.stctl
- & ( SCSW_STCTL_PRIM_STATUS | SCSW_STCTL_INTER_STATUS ) )
- {
- ioinfo[irq]->devstat.rescnt = ioinfo[irq]->devstat.ii.irb.scsw.count;
+ & ( SCSW_STCTL_PRIM_STATUS | SCSW_STCTL_INTER_STATUS ) ) {
+
+ /*
+ * If the subchannel status shows status pending
+ * and we received a check condition, the count
+ * information is not meaningful.
+ */
+
+ if ( !( (dp->ii.irb.scsw.stctl & SCSW_STCTL_STATUS_PEND)
+ && ( dp->ii.irb.scsw.cstat
+ & ( SCHN_STAT_CHN_DATA_CHK
+ | SCHN_STAT_CHN_CTRL_CHK
+ | SCHN_STAT_INTF_CTRL_CHK
+ | SCHN_STAT_PROG_CHECK
+ | SCHN_STAT_PROT_CHECK
+ | SCHN_STAT_CHAIN_CHECK )))) {
+
+ dp->rescnt = dp->ii.irb.scsw.count;
+ } else {
+ dp->rescnt = SENSE_MAX_COUNT;
+ }
+
X ioinfo[irq]->devstat.cpa = ioinfo[irq]->devstat.ii.irb.scsw.cpa;
X
X #ifdef CONFIG_DEBUG_IO
@@ -3363,7 +3392,7 @@
X {
X ret = request_irq( irq,
X init_IRQ_handler,
- 0, "RDC", &devstat );
+ SA_PROBE, "RDC", &devstat );
X
X if ( !ret )
X {
@@ -3519,7 +3548,7 @@
X pdevstat = &devstat;
X ret = request_irq( irq,
X init_IRQ_handler,
- 0, "RCD", pdevstat );
+ SA_PROBE, "RCD", pdevstat );
X
X if ( !ret )
X {
@@ -3961,9 +3990,9 @@
X int irq_ret;
X devstat_t devstat;
X
- irq_ret = request_irq( irq,
+ irq_ret = request_irq( irq,
X init_IRQ_handler,
- 0,
+ SA_PROBE,
X "INIT",
X &devstat);
X

@@ -4028,8 +4057,6 @@
X

X } /* endif */
X #endif
- s390_DevicePathVerification( irq, 0 );
-
X disable_cpu_sync_isc( irq );
X
X ioinfo[irq]->ui.flags.syncio = 0; // global
@@ -4463,7 +4490,7 @@
X * requests and evaluate the devstat area on return therefore
X * we don't need a real I/O handler in place.
X */
- irq_ret = request_irq( irq, init_IRQ_handler, 0, "SID", &devstat);
+ irq_ret = request_irq( irq, init_IRQ_handler, SA_PROBE, "SID", &devstat);
X
X if ( irq_ret == 0 )
X inlreq = 1;
@@ -4972,6 +4999,7 @@
X ccw1_t spid_ccw[2]; /* ccw area for SPID command */
X devstat_t devstat; /* required by request_irq() */
X devstat_t *pdevstat = &devstat;


+ unsigned long flags;
X

X int irq_ret = 0; /* return code */
X int retry = 5; /* retry count */
@@ -5005,7 +5033,7 @@
X */
X irq_ret = request_irq( irq,
X init_IRQ_handler,
- 0,
+ SA_PROBE,
X "SPID",
X pdevstat);


X
@@ -5020,7 +5048,7 @@
X

X if ( irq_ret == 0 )
X {
- s390irq_spin_lock( irq);
+ s390irq_spin_lock_irqsave( irq, flags);
X
X spid_ccw[0].cmd_code = 0x5B; /* suspend multipath reconnect */
X spid_ccw[0].cda = 0;
@@ -5093,9 +5121,9 @@
X
X } /* endif */
X }
-#ifdef CONFIG_DEBUG_IO
X else
X {
+#ifdef CONFIG_DEBUG_IO
X printk( "SPID - device %04X,"
X " unit check,"
X " retry %d, cnt %02d,"
@@ -5112,9 +5140,10 @@
X pdevstat->ii.sense.data[5],
X pdevstat->ii.sense.data[6],
X pdevstat->ii.sense.data[7]);
-
- } /* endif */
X #endif
+ retry--;
+ } /* endif */
+
X }
X else if ( pdevstat->flag & DEVSTAT_NOT_OPER )
X {
@@ -5140,7 +5169,7 @@
X
X } while ( retry > 0 );
X
- s390irq_spin_unlock( irq);
+ s390irq_spin_unlock_irqrestore( irq, flags);
X
X /*
X * If we installed the irq action handler we have to
@@ -5170,6 +5199,7 @@
X int irq_ret = 0; /* return code */
X int retry = 5; /* retry count */
X int inlreq = 0; /* inline request_irq() */
+ unsigned long flags;
X
X if ( (irq > highest_subchannel) || (irq < 0 ) )
X {
@@ -5198,7 +5228,7 @@
X */
X irq_ret = request_irq( irq,
X init_IRQ_handler,
- 0,
+ SA_PROBE,
X "SNID",
X pdevstat);
X
@@ -5214,7 +5244,7 @@
X
X if ( irq_ret == 0 )
X {
- s390irq_spin_lock( irq);
+ s390irq_spin_lock_irqsave( irq, flags);
X
X snid_ccw.cmd_code = CCW_CMD_SENSE_PGID;
X snid_ccw.cda = (__u32)virt_to_phys( pgid );
@@ -5324,7 +5354,7 @@
X
X } while ( retry > 0 );
X
- s390irq_spin_unlock( irq);
+ s390irq_spin_unlock_irqrestore( irq, flags);
X
X /*
X * If we installed the irq action handler we have to
@@ -5372,10 +5402,10 @@
X * If the device isn't known yet
X * we can't lock it ...
X */
- if ( ioinfo[irq] != INVALID_STORAGE_AREA )
+ if ( ioinfo[irq] != INVALID_STORAGE_AREA )
X {
X s390irq_spin_lock( irq );
- lock = 1;
+ lock = 1;
X
X dev_oper = ioinfo[irq]->ui.flags.oper;
X
@@ -5417,20 +5447,21 @@
X
X if ( ioinfo[irq] != INVALID_STORAGE_AREA )
X {
+ not_oper_handler_func_t nopfunc = ioinfo[irq]->nopfunc;
+
X if ( ioinfo[irq]->ui.flags.oper == 0 )
- {
- /*
- * If the device has gone
- * call not oper handler
- */
- if ( ( dev_oper == 1 )
- && ( ioinfo[irq]->nopfunc != NULL ) )
- {
+ {
+ /*
+ * If the device has gone
+ * call not oper handler
+ */
+ if ( ( dev_oper == 1 )
+ && ( nopfunc != NULL ) ) {
X
- free_irq( irq,
+ free_irq( irq,
X ioinfo[irq]->irq_desc.action->dev_id );
- ioinfo[irq]->nopfunc( irq,
- DEVSTAT_DEVICE_GONE );
+ nopfunc( irq, DEVSTAT_DEVICE_GONE );
+
X } /* endif */
X }
X else
@@ -5466,10 +5497,10 @@
X * ... it is and was operational, but
X * the devno may have changed
X */
- else if ( ioinfo[irq]->devno != dev_no )
+ else if ( ( ioinfo[irq]->devno != dev_no )
+ && ( nopfunc != NULL ) )
X {
- ioinfo[irq]->nopfunc( irq,
- DEVSTAT_REVALIDATE );
+ nopfunc( irq, DEVSTAT_REVALIDATE );
X
X } /* endif */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/setup.c linux/arch/s390/kernel/setup.c
--- v2.2.19/arch/s390/kernel/setup.c Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/kernel/setup.c Wed Oct 10 01:40:43 2001
@@ -273,6 +273,8 @@
X break;
X if (cn == '\n')
X cn = ' '; /* replace newlines with space */
+ if (cn == 0x0d)
+ cn = ' '; /* replace 0x0d with space */
X if (cn == ' ' && c == ' ')
X continue; /* remove additional spaces */
X c = cn;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/signal.c linux/arch/s390/kernel/signal.c
--- v2.2.19/arch/s390/kernel/signal.c Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -301,6 +301,7 @@
X /* Set up registers for signal handler */
X regs->gprs[15] = (addr_t)frame;
X regs->psw.addr = FIX_PSW(ka->sa.sa_handler);
+ regs->psw.mask = _USER_PSW_MASK;
X }
X /* Set up to return from userspace. If provided, use a stub
X already in userspace. */
@@ -461,7 +462,7 @@


X if (!signr)
X break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X /* Let the debugger run. */
X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -529,12 +530,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:
- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/smp.c linux/arch/s390/kernel/smp.c
--- v2.2.19/arch/s390/kernel/smp.c Sun Mar 25 17:37:30 2001
+++ linux/arch/s390/kernel/smp.c Wed Oct 10 01:40:43 2001
@@ -426,7 +426,33 @@
X
X void smp_send_stop(void)
X {
- smp_signal_others(sigp_stop_and_store_status, 0, TRUE, NULL);
+ int i;
+ u32 dummy;
+ unsigned long low_core_addr;
+
+ /* write magic number to zero page (absolute 0) */
+
+ get_cpu_lowcore(smp_processor_id()).panic_magic = __PANIC_MAGIC;
+
+ /* stop all processors */
+
+ smp_signal_others(sigp_stop, 0, TRUE, NULL);
+
+ /* store status of all processors in their lowcores (real 0) */
+
+ for (i = 0; i < smp_num_cpus; i++) {
+ if (smp_processor_id() != i) {
+ int ccode;
+ low_core_addr = (unsigned long)&get_cpu_lowcore(i);
+ do {
+ ccode = signal_processor_ps(
+ &dummy,
+ low_core_addr,
+ i,
+ sigp_store_status_at_address);
+ } while(ccode == sigp_busy);
+ }


+ }
X }
X
X /*

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/kernel/traps.c linux/arch/s390/kernel/traps.c
--- v2.2.19/arch/s390/kernel/traps.c Sun Mar 25 17:31:55 2001
+++ linux/arch/s390/kernel/traps.c Wed Oct 10 01:40:43 2001
@@ -37,6 +37,8 @@
X #include <asm/gdb-stub.h>
X #endif
X
+#include "cpcmd.h"
+
X /* Called from entry.S only */
X extern void handle_per_exception(struct pt_regs *regs);
X
@@ -44,6 +46,7 @@
X pgm_check_handler_t *pgm_check_table[128];
X
X extern pgm_check_handler_t do_page_fault;
+extern pgm_check_handler_t do_pseudo_page_fault;
X
X static inline void console_verbose(void)
X {
@@ -94,7 +97,7 @@
X {
X if(regs->psw.mask&PSW_PROBLEM_STATE)
X {
- if(current->flags & PF_PTRACED)
+ if(current->ptrace & PT_PTRACED)
X force_sig(signal,current);
X else
X return(TRUE);
@@ -113,7 +116,7 @@
X return(FALSE);
X }
X
-DO_ERROR(SIGSEGV, "Unknown program exception", default_trap_handler);
+DO_ERROR(SIGSEGV, "Unknown program exception", default_trap_handler)
X DO_ERROR(SIGILL, "privileged operation", privileged_op)
X DO_ERROR(SIGILL, "execute exception", execute_exception)
X DO_ERROR(SIGSEGV, "addressing exception", addressing_exception)


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 07'
echo 'File patch-2.2.20 is continued in part 08'
echo "08" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:33 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part34

#!/bin/sh -x
# this is part 34 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 34; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- Done = SkXmAutoNegDone(pAC,IoC,Port);
+ Done = SkXmAutoNegDone(pAC, IoC, Port);
X if (Done != SK_AND_OK) {
- /* Get PHY parameters, for debuging only */
- PHY_READ(IoC, pPrt, Port,
- PHY_BCOM_AUNE_LP,
- &LpAb);
- PHY_READ(IoC, pPrt, Port,
- PHY_BCOM_1000T_STAT,
- &ExtStat);
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("AutoNeg FAIL Port %d (LpAb %x, "
- "1000TStat %x)\n",
- Port, LpAb, ExtStat));
- return(SK_HW_PS_RESTART) ;
-
- } else {
- /*
- * Dummy Read interrupt status to prevent
- * extra link down/ups
- */
- PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT,
- &ExtStat);
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
+#ifdef DEBUG
+ /* Get PHY parameters, for debugging only. */
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUNE_LP, &LpAb);
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ExtStat);
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
+ ("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n",
+ Port, LpAb, ExtStat));
+#endif /* DEBUG */
+ return (SK_HW_PS_RESTART);
+ }
+ else {
+#ifdef xDEBUG
+ /* Dummy read ISR to prevent extra link downs/ups. */
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, &ExtStat);
+
+ if ((ExtStat & ~0x1800) != 0) {
+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,
+ "CheckUp2 - Stat: %x",
+ (void *)ExtStat,
+ (void *)NULL);
+ }
+#endif /* DEBUG */
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
X ("AutoNeg done Port %d\n", Port));
- return(SK_HW_PS_LINK) ;
+ return (SK_HW_PS_LINK);
X }
X }
- } else {
+ }
+ else { /* !AutoNeg */
X /*
X * Link is up and we don't need more.
X */
X #ifdef DEBUG
X if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("ERROR: Lipa auto detected on port %d\n",
- Port));
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
+ ("ERROR: Lipa auto detected on port %d\n", Port));
X }
X #endif
X
-#if 0
- PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb);
- if (ResAb & (PHY_B_1000S_MSF)) {
- /* Error */
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("Master/Slave Fault port %d\n", Port));
- pPrt->PAutoNegFail = SK_TRUE;
- pPrt->PMSStatus = SK_MS_STAT_FAULT;
- return (SK_AND_OTHER);
- } else if (ResAb & PHY_B_1000S_MSR) {
- pPrt->PMSStatus = SK_MS_STAT_MASTER ;
- } else {
- pPrt->PMSStatus = SK_MS_STAT_SLAVE ;
- }


-#endif /* 0 */
-

-
- /*
- * Dummy Read interrupt status to prevent
- * extra link down/ups
- */
+#ifdef xDEBUG
+ /* Dummy read ISR to prevent extra link downs/ups. */
X PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, &ExtStat);
+
+ if ((ExtStat & ~0x1800) != 0) {
+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,
+ "CheckUp3 - Stat: %x",
+ (void *)ExtStat,
+ (void *)NULL);
+ }
+#endif /* DEBUG */
X
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
X ("Link sync(GP), Port %d\n", Port));
- SkHWLinkUp(pAC, IoC, Port) ;
- return(SK_HW_PS_LINK) ;
+ SkHWLinkUp(pAC, IoC, Port);
+ return (SK_HW_PS_LINK);
X }
X
- return(SK_HW_PS_NONE) ;
-}
+ return (SK_HW_PS_NONE);
+} /* SkGePortCheckUpBcom */
+


X
X /******************************************************************************
X *

@@ -1480,24 +1772,24 @@
X * 2 Link came up
X */
X static int SkGePortCheckUpLone(
-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* IO Context */
-int Port) /* Which port should be checked */
+int Port) /* Which port should be checked */
X {
X SK_GEPORT *pPrt; /* GIni Port struct pointer */
- SK_BOOL AutoNeg; /* Is Autonegotiation used ? */
+ int Done;
X SK_U16 Isrc; /* Interrupt source register */
X SK_U16 LpAb; /* Link Partner Ability */
- SK_U8 NextMode; /* Next AutoSensing Mode */
X SK_U16 ExtStat; /* Extended Status Register */
X SK_U16 PhyStat; /* Phy Status Register */
X SK_U16 StatSum;
- int Done;
+ SK_BOOL AutoNeg; /* Is Autonegotiation used ? */
+ SK_U8 NextMode; /* Next AutoSensing Mode */
X
X pPrt = &pAC->GIni.GP[Port];
X
X if (pPrt->PHWLinkUp) {
- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }
X
X StatSum = pPrt->PIsave;
@@ -1507,7 +1799,8 @@
X if (pPrt->PLinkMode == SK_LMODE_HALF ||
X pPrt->PLinkMode == SK_LMODE_FULL) {
X AutoNeg = SK_FALSE;


- } else {
+ }
+ else {

X AutoNeg = SK_TRUE;
X }
X
@@ -1515,7 +1808,7 @@
X * here we usually can check whether the link is in sync and
X * autonegotiation is done.
X */
- XM_IN16(IoC, Port, XM_ISRC, &Isrc) ;
+ XM_IN16(IoC, Port, XM_ISRC, &Isrc);
X PHY_READ(IoC, pPrt, Port, PHY_LONE_STAT, &PhyStat);
X StatSum |= PhyStat;
X
@@ -1524,19 +1817,19 @@
X /*
X * Save Autonegotiation Done bit
X */
- pPrt->PIsave = (SK_U16) (StatSum & PHY_ST_AN_OVER);
+ pPrt->PIsave = (SK_U16)(StatSum & PHY_ST_AN_OVER);
X #ifdef DEBUG
X if (pPrt->PIsave & PHY_ST_AN_OVER) {
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNeg done rescheduled Port %d\n", Port));
X }
X #endif
- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }
X
X if (AutoNeg) {
X if (StatSum & PHY_ST_AN_OVER) {
- SkHWLinkUp(pAC, IoC, Port) ;
+ SkHWLinkUp(pAC, IoC, Port);
X Done = SkXmAutoNegDone(pAC,IoC,Port);
X if (Done != SK_AND_OK) {
X /* Get PHY parameters, for debuging only */
@@ -1546,31 +1839,30 @@
X PHY_READ(IoC, pPrt, Port,
X PHY_LONE_1000T_STAT,
X &ExtStat);
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
X ("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n",
X Port, LpAb, ExtStat));
X
X /* Try next possible mode */
X NextMode = SkHWSenseGetNext(pAC, IoC, Port);
- SkHWLinkDown(pAC, IoC, Port) ;
+ SkHWLinkDown(pAC, IoC, Port);
X if (Done == SK_AND_DUP_CAP) {
X /* GoTo next mode */
- SkHWSenseSetNext(pAC, IoC, Port,
- NextMode);
+ SkHWSenseSetNext(pAC, IoC, Port, NextMode);
X }
X
- return(SK_HW_PS_RESTART) ;
+ return (SK_HW_PS_RESTART);


X
- } else {
+ }
+ else {

X /*
X * Dummy Read interrupt status to prevent
X * extra link down/ups
X */
- PHY_READ(IoC, pPrt, Port, PHY_LONE_INT_STAT,
- &ExtStat);
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
+ PHY_READ(IoC, pPrt, Port, PHY_LONE_INT_STAT, &ExtStat);
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
X ("AutoNeg done Port %d\n", Port));
- return(SK_HW_PS_LINK) ;
+ return (SK_HW_PS_LINK);
X }
X }
X
@@ -1580,7 +1872,7 @@
X pPrt->PAutoNegTimeOut ++;
X if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) {
X /*
- * Timeout occured.
+ * Timeout occurred.
X * What do we need now?
X */
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,
@@ -1590,7 +1882,7 @@
X if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
X pPrt->PLipaAutoNeg != SK_LIPA_AUTO) {
X /*
- * Timeout occured
+ * Timeout occurred
X * Set Link manually up.
X */
X SkHWSenseSetNext(pAC, IoC, Port,
@@ -1604,17 +1896,17 @@
X /*
X * Do the restart
X */
- return(SK_HW_PS_RESTART) ;
+ return (SK_HW_PS_RESTART);


X }
- } else {
+ }
+ else {

X /*
X * Link is up and we don't need more.
X */
X #ifdef DEBUG
X if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("ERROR: Lipa auto detected on port %d\n",
- Port));
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
+ ("ERROR: Lipa auto detected on port %d\n", Port));
X }
X #endif
X
@@ -1624,14 +1916,14 @@
X */
X PHY_READ(IoC, pPrt, Port, PHY_LONE_INT_STAT, &ExtStat);
X
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
X ("Link sync(GP), Port %d\n", Port));
- SkHWLinkUp(pAC, IoC, Port) ;
- return(SK_HW_PS_LINK) ;
+ SkHWLinkUp(pAC, IoC, Port);
+ return (SK_HW_PS_LINK);
X }
X
- return(SK_HW_PS_NONE) ;
-}
+ return (SK_HW_PS_NONE);
+} /* SkGePortCheckUpLone*/
X
X
X /******************************************************************************
@@ -1644,13 +1936,13 @@
X * 2 Link came up
X */
X static int SkGePortCheckUpNat(
-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* IO Context */
-int Port) /* Which port should be checked */
+int Port) /* Which port should be checked */
X {
X /* todo: National */
- return(SK_HW_PS_NONE) ;
-}
+ return (SK_HW_PS_NONE);
+} /* SkGePortCheckUpNat */
X
X
X /******************************************************************************
@@ -1662,17 +1954,21 @@
X * Notes:
X */
X int SkGeSirqEvent(
-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* Io Context */
X SK_U32 Event, /* Module specific Event */
X SK_EVPARA Para) /* Event specific Parameter */
X {
- SK_U32 Port;
- SK_U32 Time;
- SK_U8 Val8 ;
- int PortStat;
+ SK_U64 Octets;
+ SK_GEPORT *pPrt; /* GIni Port struct pointer */
+ SK_U32 Port;
+ SK_U32 Time;
+ unsigned Len;
+ int PortStat;
+ SK_U8 Val8;
X
X Port = Para.Para32[0];
+ pPrt = & pAC->GIni.GP[Port];
X
X switch (Event) {
X case SK_HWEV_WATIM:
@@ -1681,7 +1977,7 @@
X
X switch (PortStat) {
X case SK_HW_PS_RESTART:
- if (pAC->GIni.GP[Port].PHWLinkUp) {
+ if (pPrt->PHWLinkUp) {
X /*
X * Set Link to down.
X */
@@ -1691,16 +1987,7 @@
X * Signal directly to RLMT to ensure correct
X * sequence of SWITCH and RESET event.
X */
- Para.Para32[0] = (SK_U32) Port;
X SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para);
-
- /* Start workaround Errata #2 timer */
- SkTimerStart(pAC, IoC,
- &pAC->GIni.GP[Port].PWaTimer,
- SK_WA_INA_TIME,
- SKGE_HWAC,
- SK_HWEV_WATIM,
- Para);
X }
X
X /* Restart needed */
@@ -1713,39 +2000,38 @@
X break;
X
X }
-
+
X /* Start again the check Timer */
- if (pAC->GIni.GP[Port].PHWLinkUp) {
+ if (pPrt->PHWLinkUp) {
X Time = SK_WA_ACT_TIME;


- } else {
+ }
+ else {

X Time = SK_WA_INA_TIME;
X }
X
- /* todo: still needed for non-Xmac-PHYs ??? */
- /* Start workaround Errata #2 timer */
- SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, Time,
- SKGE_HWAC, SK_HWEV_WATIM, Para);
-
+ /* Todo: still needed for non-XMAC PHYs??? */
+ /* Start workaround Errata #2 timer. */
+ SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer,
+ Time, SKGE_HWAC, SK_HWEV_WATIM, Para);
X break;
X
X case SK_HWEV_PORT_START:
- if (pAC->GIni.GP[Port].PHWLinkUp) {
+ if (pPrt->PHWLinkUp) {
X /*
X * Signal directly to RLMT to ensure correct
X * sequence of SWITCH and RESET event.
X */
- Para.Para32[0] = (SK_U32) Port;
X SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para);
X }
X
- SkHWLinkDown(pAC, IoC, Port) ;
+ SkHWLinkDown(pAC, IoC, Port);
X
X /* Schedule Port RESET */
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Para);
X
X /* Start workaround Errata #2 timer */
- SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer,
- SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para);
+ SkTimerStart(pAC, IoC, &pPrt->PWaTimer, SK_WA_INA_TIME,
+ SKGE_HWAC, SK_HWEV_WATIM, Para);
X break;
X
X case SK_HWEV_PORT_STOP:
@@ -1754,13 +2040,13 @@
X * Signal directly to RLMT to ensure correct
X * sequence of SWITCH and RESET event.
X */
- Para.Para32[0] = (SK_U32) Port;
X SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para);
X }
+
X /* Stop Workaround Timer */
- SkTimerStop(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer) ;
+ SkTimerStop(pAC, IoC, &pPrt->PWaTimer);
X
- SkHWLinkDown(pAC, IoC, Port) ;
+ SkHWLinkDown(pAC, IoC, Port);
X break;
X
X case SK_HWEV_UPDATE_STAT:
@@ -1769,18 +2055,18 @@
X
X case SK_HWEV_CLEAR_STAT:
X /* We do NOT need to clear any statistics */
- for (Port = 0; Port < (SK_U32) pAC->GIni.GIMacsFound; Port++) {
- pAC->GIni.GP[Port].PPrevRx = 0;
- pAC->GIni.GP[Port].PPrevFcs = 0;
- pAC->GIni.GP[Port].PPrevShorts = 0;
+ for (Port = 0; Port < (SK_U32)pAC->GIni.GIMacsFound; Port++) {
+ pPrt->PPrevRx = 0;
+ pPrt->PPrevFcs = 0;
+ pPrt->PPrevShorts = 0;
X }
X break;
X
X case SK_HWEV_SET_LMODE:
- Val8 = (SK_U8) Para.Para32[1];
- if (pAC->GIni.GP[Port].PLinkModeConf != Val8) {
+ Val8 = (SK_U8)Para.Para32[1];
+ if (pPrt->PLinkModeConf != Val8) {
X /* Set New link mode */
- pAC->GIni.GP[Port].PLinkModeConf = Val8;
+ pPrt->PLinkModeConf = Val8;
X
X /* Restart Port */
X SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
@@ -1789,10 +2075,10 @@
X break;
X
X case SK_HWEV_SET_FLOWMODE:
- Val8 = (SK_U8) Para.Para32[1];
- if (pAC->GIni.GP[Port].PFlowCtrlMode != Val8) {
+ Val8 = (SK_U8)Para.Para32[1];
+ if (pPrt->PFlowCtrlMode != Val8) {
X /* Set New Flow Control mode */
- pAC->GIni.GP[Port].PFlowCtrlMode = Val8;
+ pPrt->PFlowCtrlMode = Val8;
X
X /* Restart Port */
X SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
@@ -1801,10 +2087,10 @@
X break;
X
X case SK_HWEV_SET_ROLE:
- Val8 = (SK_U8) Para.Para32[1];
- if (pAC->GIni.GP[Port].PMSMode != Val8) {
+ Val8 = (SK_U8)Para.Para32[1];
+ if (pPrt->PMSMode != Val8) {
X /* Set New link mode */
- pAC->GIni.GP[Port].PMSMode = Val8;
+ pPrt->PMSMode = Val8;
X
X /* Restart Port */
X SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
@@ -1812,14 +2098,31 @@
X }
X break;
X
+ case SK_HWEV_HALFDUP_CHK:
+ /*
+ * half duplex hangup workaround. See packet arbiter timeout
+ * interrupt for description
+ */
+ pPrt->HalfDupTimerActive = SK_FALSE;
+ if (pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
+ pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) {
+ Len = sizeof(SK_U64);
+ SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *)&Octets,
+ &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),
+ pAC->Rlmt.Port[Port].Net->NetNumber);
+ if (pPrt->LastOctets == Octets) {
+ /* TX hanging, do a FIFO flush restarts it. */
+ SkXmFlushTxFifo(pAC, IoC, Port);
+ }
+ }
+ break;
X default:
- SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_SIRQ_E001,
- SKERR_SIRQ_E001MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_SIRQ_E001, SKERR_SIRQ_E001MSG);
X break;
X }
X
- return(0) ;
-}
+ return (0);
+} /* SkGeSirqEvent */
X
X
X /******************************************************************************
@@ -1831,17 +2134,20 @@
X * Returns: N/A
X */
X static void SkPhyIsrBcom(
-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* Io Context */
-int Port, /* Port Num = PHY Num */
-SK_U16 IStatus) /* Interrupts masked with PHY-Mask */
+int Port, /* Port Num = PHY Num */
+SK_U16 IStatus) /* Interrupt Status */
X {
+ SK_GEPORT *pPrt; /* GIni Port struct pointer */
X SK_EVPARA Para;
X
+ pPrt = &pAC->GIni.GP[Port];
+
X if (IStatus & PHY_B_IS_PSE) {
- /* incorrectable pair swap error */
+ /* Incorrectable pair swap error. */
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E022,
- SKERR_SIRQ_E022MSG) ;
+ SKERR_SIRQ_E022MSG);
X }
X
X if (IStatus & PHY_B_IS_MDXI_SC) {
@@ -1857,19 +2163,19 @@
X }
X
X if (IStatus & (PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE)) {
+ Para.Para32[0] = (SK_U32)Port;
+
X SkHWLinkDown(pAC, IoC, Port);
X
X /* Signal to RLMT */
- Para.Para32[0] = (SK_U32) Port;
X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
X
X /* Start workaround Errata #2 timer */
- SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer,
- SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para);
+ SkTimerStart(pAC, IoC, &pPrt->PWaTimer,
+ SK_WA_INA_TIME, SKGE_HWAC, SK_HWEV_WATIM, Para);
X }
X
X if (IStatus & PHY_B_IS_NO_HDCL) {
- /* not used */
X }
X
X if (IStatus & PHY_B_IS_NO_HDC) {
@@ -1903,8 +2209,7 @@
X if (IStatus & PHY_B_IS_CRC_ER) {
X /* not used */
X }
-
-}
+} /* SkPhyIsrBcom */
X
X
X /******************************************************************************
@@ -1916,10 +2221,10 @@
X * Returns: N/A
X */
X static void SkPhyIsrLone(
-SK_AC *pAC, /* Adapters context */
-SK_IOC IoC, /* Io Context */
+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* Io Context */
X int Port, /* Port Num = PHY Num */
-SK_U16 IStatus) /* Interrupts masked with PHY-Mask */
+SK_U16 IStatus) /* Interrupt Status */
X {
X SK_EVPARA Para;
X
@@ -1955,19 +2260,17 @@
X SkHWLinkDown(pAC, IoC, Port);
X
X /* Signal to RLMT */
- Para.Para32[0] = (SK_U32) Port;
+ Para.Para32[0] = (SK_U32)Port;
X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
X
X /* Start workaround Errata #2 timer */
X SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer,
- SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para);
+ SK_WA_INA_TIME, SKGE_HWAC, SK_HWEV_WATIM, Para);
X }
X
X if (IStatus & PHY_L_IS_MDINT) {
X /* not used */
X }
-
-}
-
+} /* SkPhyIsrLone */
X
X /* End of File */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/ski2c.c linux/drivers/net/sk98lin/ski2c.c
--- v2.2.19/drivers/net/sk98lin/ski2c.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/ski2c.c Wed Oct 10 01:41:03 2001
@@ -2,17 +2,16 @@
X *
X * Name: ski2c.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.42 $
- * Date: $Date: 1999/11/22 13:35:12 $
- * Purpose: Funktions to access Voltage and Temperature Sensor
- * (taken from Monalisa (taken from Concentrator))
+ * Version: $Revision: 1.47 $
+ * Date: $Date: 2001/04/05 11:38:09 $
+ * Purpose: Functions to access Voltage and Temperature Sensor
+ * (taken from Monalisa (taken from Concentrator))


X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
@@ -28,6 +27,23 @@
X * History:
X *
X * $Log: ski2c.c,v $
+ * Revision 1.47 2001/04/05 11:38:09 rassmann
+ * Set SenState to idle in SkI2cWaitIrq().
+ * Changed error message in SkI2cWaitIrq().
+ *
+ * Revision 1.46 2001/04/02 14:03:35 rassmann
+ * Changed pAC to IoC in SK_IN32().
+ *
+ * Revision 1.45 2001/03/21 12:12:49 rassmann
+ * Resetting I2C_READY interrupt in SkI2cInit1().
+ *
+ * Revision 1.44 2000/08/07 15:49:03 gklug
+ * Fix: SK_INFAST only in NetWare driver.
+ *
+ * Revision 1.43 2000/08/03 14:28:17 rassmann
+ * Added function to wait for I2C being ready before resetting the board.
+ * Replaced one duplicate "out of range" message with correct one.
+ *
X * Revision 1.42 1999/11/22 13:35:12 cgoos


X * Changed license header to GPL.
X *

@@ -173,10 +189,10 @@
X
X
X /*
- i2C Protocol
-*/
+ * I2C Protocol
+ */
X static const char SysKonnectFileId[] =
- "$Id: ski2c.c,v 1.42 1999/11/22 13:35:12 cgoos Exp $" ;
+ "$Id: ski2c.c,v 1.47 2001/04/05 11:38:09 rassmann Exp $";
X
X #include "h/skdrv1st.h" /* Driver Specific Definitions */
X #include "h/lm80.h"
@@ -184,7 +200,7 @@
X
X #ifdef __C2MAN__
X /*
- I2C protocol implemetation.
+ I2C protocol implementation.
X
X General Description:
X
@@ -194,9 +210,9 @@
X This file covers functions that allow to read write and do
X some bulk requests a specified I2C address.
X
- The Genesis has 2 I2C busses. One for the EEPROM which holds
+ The Genesis has 2 I2C buses. One for the EEPROM which holds
X the VPD Data and one for temperature and voltage sensor.
- The following picture shows the I2C busses, I2C devices and
+ The following picture shows the I2C buses, I2C devices and
X there control registers.
X
X Note: The VPD functions are in skvpd.c
@@ -293,13 +309,13 @@
X * serial data line simultaneously (ASIC: last bit of a byte = '1', I2C client
X * send an 'ACK'). See also Concentrator Bugreport No. 10192.
X */
-#define I2C_DATA_HIGH(IoC) SK_I2C_SET_BIT(IoC,I2C_DATA)
-#define I2C_DATA_LOW(IoC) SK_I2C_CLR_BIT(IoC,I2C_DATA)
-#define I2C_DATA_OUT(IoC) SK_I2C_SET_BIT(IoC,I2C_DATA_DIR)
-#define I2C_DATA_IN(IoC) SK_I2C_CLR_BIT(IoC,I2C_DATA_DIR|I2C_DATA)
-#define I2C_CLK_HIGH(IoC) SK_I2C_SET_BIT(IoC,I2C_CLK)
-#define I2C_CLK_LOW(IoC) SK_I2C_CLR_BIT(IoC,I2C_CLK|I2C_DATA_DIR)
-#define I2C_START_COND(IoC) SK_I2C_CLR_BIT(IoC,I2C_CLK)
+#define I2C_DATA_HIGH(IoC) SK_I2C_SET_BIT(IoC, I2C_DATA)
+#define I2C_DATA_LOW(IoC) SK_I2C_CLR_BIT(IoC, I2C_DATA)
+#define I2C_DATA_OUT(IoC) SK_I2C_SET_BIT(IoC, I2C_DATA_DIR)
+#define I2C_DATA_IN(IoC) SK_I2C_CLR_BIT(IoC, I2C_DATA_DIR|I2C_DATA)
+#define I2C_CLK_HIGH(IoC) SK_I2C_SET_BIT(IoC, I2C_CLK)
+#define I2C_CLK_LOW(IoC) SK_I2C_CLR_BIT(IoC, I2C_CLK|I2C_DATA_DIR)
+#define I2C_START_COND(IoC) SK_I2C_CLR_BIT(IoC, I2C_CLK)
X
X #define NS2CLKT(x) ((x*125L)/10000)
X
@@ -309,25 +325,24 @@
X * sending one bit
X */
X void SkI2cSndBit(
-SK_IOC IoC, /* IoContext */
+SK_IOC IoC, /* I/O Context */
X SK_U8 Bit) /* Bit to send */
X {
- I2C_DATA_OUT(IoC) ;
+ I2C_DATA_OUT(IoC);
X if (Bit) {
X I2C_DATA_HIGH(IoC);
X } else {
X I2C_DATA_LOW(IoC);
X }
- SkDgWaitTime(IoC,NS2BCLK(T_DATA_IN_SETUP));
+ SkDgWaitTime(IoC, NS2BCLK(T_DATA_IN_SETUP));
X I2C_CLK_HIGH(IoC);
- SkDgWaitTime(IoC,NS2BCLK(T_CLK_HIGH));
+ SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH));
X I2C_CLK_LOW(IoC);
-}
-
+} /* SkI2cSndBit*/
X
X
X /*
- * Signal a start to the i2C Bus.
+ * Signal a start to the I2C Bus.
X *
X * A start is signaled when data goes to low in a high clock cycle.
X *
@@ -335,66 +350,70 @@
X *
X * Status: not tested
X */
-void SkI2cStart(SK_IOC IoC) /* I/O Context */
+void SkI2cStart(
+SK_IOC IoC) /* I/O Context */
X {
X /* Init data and Clock to output lines */
X /* Set Data high */
- I2C_DATA_OUT(IoC) ;
- I2C_DATA_HIGH(IoC) ;
+ I2C_DATA_OUT(IoC);
+ I2C_DATA_HIGH(IoC);
X /* Set Clock high */
- I2C_CLK_HIGH(IoC) ;
+ I2C_CLK_HIGH(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_START_SETUP)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_START_SETUP));
X
X /* Set Data Low */
- I2C_DATA_LOW(IoC) ;
+ I2C_DATA_LOW(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_START_HOLD)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_START_HOLD));
X
X /* Clock low without Data to Input */
- I2C_START_COND(IoC) ;
+ I2C_START_COND(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_CLK_LOW)) ;
-}
+ SkDgWaitTime(IoC, NS2BCLK(T_CLK_LOW));
+} /* SkI2cStart */
X
X
-void SkI2cStop(SK_IOC IoC) /* I/O Context */
+void SkI2cStop(
+SK_IOC IoC) /* I/O Context */
X {
X /* Init data and Clock to output lines */
X /* Set Data low */
- I2C_DATA_OUT(IoC) ;
- I2C_DATA_LOW(IoC) ;
+ I2C_DATA_OUT(IoC);
+ I2C_DATA_LOW(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_CLK_2_DATA_OUT)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_CLK_2_DATA_OUT));
X
X /* Set Clock high */
- I2C_CLK_HIGH(IoC) ;
+ I2C_CLK_HIGH(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_STOP_SETUP)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_STOP_SETUP));
X
X /*
X * Set Data High: Do it by setting the Data Line to Input.
X * Because of a pull up resistor the Data Line
X * floods to high.
X */
- I2C_DATA_IN(IoC) ;
+ I2C_DATA_IN(IoC);
X
X /*
X * When I2C activity is stopped
X * o DATA should be set to input and
X * o CLOCK should be set to high!
X */
- SkDgWaitTime(IoC,NS2BCLK(T_BUS_IDLE)) ;
-}
+ SkDgWaitTime(IoC, NS2BCLK(T_BUS_IDLE));
+} /* SkI2cStop */
+
X
X /*
- * Receive just one bit via the i2C bus.
+ * Receive just one bit via the I2C bus.
X *
X * Note: Clock must be set to LOW before calling this function.
X *
X * Returns The received bit.
X */
-int SkI2cRcvBit(SK_IOC IoC) /* I/O Context */
+int SkI2cRcvBit(
+SK_IOC IoC) /* I/O Context */
X {
X int Bit;
X SK_U8 I2cSwCtrl;
@@ -402,13 +421,13 @@
X /* Init data as input line */
X I2C_DATA_IN(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_CLK_2_DATA_OUT)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_CLK_2_DATA_OUT));
X
X I2C_CLK_HIGH(IoC);
X
- SkDgWaitTime(IoC,NS2BCLK(T_CLK_HIGH)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH));
X
- SK_I2C_GET_SW(IoC,&I2cSwCtrl) ;
+ SK_I2C_GET_SW(IoC, &I2cSwCtrl);
X if (I2cSwCtrl & I2C_DATA) {
X Bit = 1;
X } else {
@@ -416,10 +435,11 @@
X }
X
X I2C_CLK_LOW(IoC);
- SkDgWaitTime(IoC,NS2BCLK(T_CLK_LOW-T_CLK_2_DATA_OUT)) ;
+ SkDgWaitTime(IoC, NS2BCLK(T_CLK_LOW-T_CLK_2_DATA_OUT));
X
X return(Bit);
-}
+} /* SkI2cRcvBit */
+
X
X /*
X * Receive an ACK.
@@ -427,58 +447,64 @@
X * returns 0 If acknoledged
X * 1 in case of an error
X */
-int SkI2cRcvAck(SK_IOC IoC) /* I/O Context */
+int SkI2cRcvAck(
+SK_IOC IoC) /* I/O Context */
X {
X /*
X * Received bit must be zero.
X */
- return (SkI2cRcvBit(IoC) != 0) ;
-}
+ return (SkI2cRcvBit(IoC) != 0);
+} /* SkI2cRcvAck */
+
X
X /*
X * Send an NACK.
X */
-void SkI2cSndNAck(SK_IOC IoC) /* I/O Context */
+void SkI2cSndNAck(
+SK_IOC IoC) /* I/O Context */
X {
X /*
X * Received bit must be zero.
X */
- SkI2cSndBit(IoC,1) ;
-}
+ SkI2cSndBit(IoC, 1);
+} /* SkI2cSndNAck */
+
X
X /*
X * Send an ACK.
X */
-void SkI2cSndAck(SK_IOC IoC) /* I/O Context */
+void SkI2cSndAck(
+SK_IOC IoC) /* I/O Context */
X {
X /*
X * Received bit must be zero.
X *
X */
- SkI2cSndBit(IoC,0) ;
-}
+ SkI2cSndBit(IoC, 0);
+} /* SkI2cSndAck */
+
X
X /*
- * Send one byte to the i2C device and wait for ACK.
+ * Send one byte to the I2C device and wait for ACK.
X *
X * Return acknoleged status.
X */
X int SkI2cSndByte(
X SK_IOC IoC, /* I/O Context */
-int Byte) /* byte to send */
+int Byte) /* byte to send */
X {
X int i;
X
- for (i=0; i<8; i++) {
+ for (i = 0; i < 8; i++) {
X if (Byte & (1<<(7-i))) {
- SkI2cSndBit(IoC,1) ;
+ SkI2cSndBit(IoC, 1);
X } else {
- SkI2cSndBit(IoC,0) ;
+ SkI2cSndBit(IoC, 0);
X }
X }
X
- return(SkI2cRcvAck(IoC)) ;
-}
+ return(SkI2cRcvAck(IoC));
+} /* SkI2cSndByte */
X
X
X /*
@@ -488,24 +514,24 @@
X */
X int SkI2cRcvByte(
X SK_IOC IoC, /* I/O Context */
-int Last) /* Last Byte Flag */
+int Last) /* Last Byte Flag */
X {
X int i;
X int Byte = 0;
X
- for (i=0; i<8; i++) {
- Byte <<= 1 ;
- Byte |= SkI2cRcvBit(IoC) ;
+ for (i = 0; i < 8; i++) {
+ Byte <<= 1;
+ Byte |= SkI2cRcvBit(IoC);
X }
X
X if (Last) {
- SkI2cSndNAck(IoC) ;
+ SkI2cSndNAck(IoC);
X } else {
- SkI2cSndAck(IoC) ;
+ SkI2cSndAck(IoC);
X }
X
- return(Byte) ;
-}
+ return(Byte);
+} /* SkI2cRcvByte */
X
X
X /*
@@ -515,68 +541,107 @@
X */
X int SkI2cSndDev(
X SK_IOC IoC, /* I/O Context */
-int Addr, /* Device Address */
-int Rw) /* Read / Write Flag */
+int Addr, /* Device Address */
+int Rw) /* Read / Write Flag */
X {
- SkI2cStart(IoC) ;
- Rw = ~Rw ;
- Rw &= I2C_WRITE ;
- return(SkI2cSndByte(IoC, (Addr<<1) | Rw)) ;
-}
+ SkI2cStart(IoC);
+ Rw = ~Rw;
+ Rw &= I2C_WRITE;
+ return(SkI2cSndByte(IoC, (Addr<<1) | Rw));
+} /* SkI2cSndDev */
X
X #endif /* SK_DIAG */
X
X /*----------------- I2C CTRL Register Functions ----------*/
X
X /*
- * waits for a completetion of a I2C transfer
+ * waits for a completion of an I2C transfer
X *
X * returns 0: success, transfer completes
- * 1: error, transfer does not complete, I2C transfer
- * killed, wait loop terminated.
+ * 1: error, transfer does not complete, I2C transfer
+ * killed, wait loop terminated.
X */
X int SkI2cWait(
X SK_AC *pAC, /* Adapter Context */
-SK_IOC IoC, /* IoContext */
-int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */
+SK_IOC IoC, /* I/O Context */
+int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */
X {
- SK_U64 StartTime ;
- SK_U32 I2cCtrl ;
+ SK_U64 StartTime;
+ SK_U32 I2cCtrl;
X
- StartTime = SkOsGetTime(pAC) ;
+ StartTime = SkOsGetTime(pAC);
X do {
- if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC/16) {
- SK_I2C_STOP(IoC) ;
+ if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC / 8) {
+ SK_I2C_STOP(IoC);
X #ifndef SK_DIAG
- SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002,
- SKERR_I2C_E002MSG) ;
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002, SKERR_I2C_E002MSG);
X #endif /* !SK_DIAG */
- return(1) ;
+ return(1);
X }
- SK_I2C_GET_CTL(IoC,&I2cCtrl) ;
- } while((I2cCtrl & I2C_FLAG) == (SK_U32)Event << 31) ;
+ SK_I2C_GET_CTL(IoC, &I2cCtrl);
+ } while ((I2cCtrl & I2C_FLAG) == (SK_U32)Event << 31);
+
+ return(0);
+} /* SkI2cWait */
+
X
- return(0) ;
-}
+/*
+ * waits for a completion of an I2C transfer


+ *
+ * Returns

+ * Nothing
+ */
+void SkI2cWaitIrq(
+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC) /* I/O Context */
+{
+ SK_SENSOR *pSen;
+ SK_U64 StartTime;
+ SK_U32 IrqSrc;
+
+ pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
+
+ if (pSen->SenState == SK_SEN_IDLE) {
+ return;
+ }
+
+ StartTime = SkOsGetTime(pAC);
+ do {
+ if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC / 8) {
+ SK_I2C_STOP(IoC);
+#ifndef SK_DIAG
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E016, SKERR_I2C_E016MSG);
+#endif /* !SK_DIAG */
+ return;
+ }
+ SK_IN32(IoC, B0_ISRC, &IrqSrc);
+ } while ((IrqSrc & IS_I2C_READY) == 0);
+
+ pSen->SenState = SK_SEN_IDLE;
+ return;
+} /* SkI2cWaitIrq */
X
X #ifdef SK_DIAG
+
X /*
X * writes a single byte or 4 bytes into the I2C device
X *
X * returns 0: success
- * 1: error
+ * 1: error
X */
X int SkI2cWrite(
-SK_AC *pAC, /* Adapter Context */
+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */
X SK_U32 I2cData, /* I2C Data to write */
-int I2cDev, /* I2C Device Address */
-int I2cReg, /* I2C Device Register Address */
-int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */
-{
- SK_OUT32(pAC,B2_I2C_DATA,I2cData) ;
- SK_I2C_CTL(pAC,I2C_WRITE,I2cDev,I2cReg,I2cBurst);
- return(SkI2cWait(pAC,pAC,I2C_WRITE)) ;
-}
+int I2cDev, /* I2C Device Address */
+int I2cReg, /* I2C Device Register Address */
+int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */
+{
+ SK_OUT32(IoC, B2_I2C_DATA, I2cData);
+ SK_I2C_CTL(IoC, I2C_WRITE, I2cDev, I2cReg, I2cBurst);
+ return(SkI2cWait(pAC, IoC, I2C_WRITE));
+} /* SkI2cWrite*/
+
X
X /*
X * reads a single byte or 4 bytes from the I2C device
@@ -584,39 +649,43 @@
X * returns the word read
X */
X SK_U32 SkI2cRead(
-SK_AC *pAC, /* Adapter Context */
-int I2cDev, /* I2C Device Address */
-int I2cReg, /* I2C Device Register Address */
-int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */
-{
- SK_U32 Data ;
-
- SK_OUT32(pAC,B2_I2C_DATA,0) ;
- SK_I2C_CTL(pAC,I2C_READ,I2cDev,I2cReg,I2cBurst);
- if (SkI2cWait(pAC,pAC,I2C_READ)) {
- w_print("I2c Transfer Timeout!\n");
- }
- SK_IN32(pAC,B2_I2C_DATA,&Data) ;
- return(Data) ;
-}
+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */
+int I2cDev, /* I2C Device Address */
+int I2cReg, /* I2C Device Register Address */
+int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */
+{
+ SK_U32 Data;
+
+ SK_OUT32(IoC, B2_I2C_DATA, 0);
+ SK_I2C_CTL(IoC, I2C_READ, I2cDev, I2cReg, I2cBurst);
+ if (SkI2cWait(pAC, IoC, I2C_READ)) {
+ w_print("I2C Transfer Timeout!\n");
+ }
+ SK_IN32(IoC, B2_I2C_DATA, &Data);
+ return(Data);
+} /* SkI2cRead */
+
X #endif /* SK_DIAG */
X
+
X /*
- * read a sensors value
+ * read a sensor's value
X *
- * This function read a sensors value from the I2c sensor chip. The sensor
+ * This function reads a sensor's value from the I2C sensor chip. The sensor
X * is defined by its index into the sensors database in the struct pAC points
X * to.
- * Returns 1 if the read is completed
- * 0 if the read must be continued (I2c Bus still allocated)
+ * Returns
+ * 1 if the read is completed
+ * 0 if the read must be continued (I2C Bus still allocated)
X */
X int SkI2cReadSensor(
X SK_AC *pAC, /* Adapter Context */
-SK_IOC IoC, /* IoContext */
+SK_IOC IoC, /* I/O Context */
X SK_SENSOR *pSen) /* Sensor to be read */
X {
- return((*pSen->SenRead)(pAC,IoC,pSen)) ;
-}
+ return((*pSen->SenRead)(pAC, IoC, pSen));
+} /* SkI2cReadSensor*/
X
X /*
X * Do the Init state 0 initialization
@@ -637,10 +706,10 @@
X pAC->I2c.DummyReads = SK_MAX_SENSORS;
X #endif
X
- for (i=0; i < SK_MAX_SENSORS; i ++) {
+ for (i = 0; i < SK_MAX_SENSORS; i ++) {
X switch (i) {
X case 0:
- pAC->I2c.SenTable[i].SenDesc = "Temperature" ;
+ pAC->I2c.SenTable[i].SenDesc = "Temperature";
X pAC->I2c.SenTable[i].SenType = SK_SEN_TEMP;
X pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_ERRHIGH0;
X pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_ERRLOW0;
@@ -734,10 +803,11 @@
X pAC->I2c.SenTable[i].SenDev = LM80_ADDR;
X }
X
- /* Now we are INIT dataed */
+ /* Now we are "INIT data"ed */
X pAC->I2c.InitLevel = SK_INIT_DATA;
X return(0);
-}
+} /* SkI2cInit0*/
+
X
X /*
X * Do the init state 1 initialization
@@ -761,7 +831,7 @@
X */
X static int SkI2cInit1(
X SK_AC *pAC, /* Adapter Context */
-SK_IOC IoC) /* IoContext needed in level 1 */
+SK_IOC IoC) /* I/O Context */
X {
X if (pAC->I2c.InitLevel != SK_INIT_DATA) {
X /* ReInit not needed in I2C module */
@@ -770,27 +840,27 @@
X
X SK_OUT32(IoC, B2_I2C_DATA, 0);
X SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_CFG, 0);
- (void)SkI2cWait(pAC, IoC, I2C_WRITE) ;
+ (void)SkI2cWait(pAC, IoC, I2C_WRITE);
X
X SK_OUT32(IoC, B2_I2C_DATA, 0xff);
X SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_IMSK_1, 0);
- (void)SkI2cWait(pAC, IoC, I2C_WRITE) ;
+ (void)SkI2cWait(pAC, IoC, I2C_WRITE);
X
X SK_OUT32(IoC, B2_I2C_DATA, 0xff);
X SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_IMSK_2, 0);
- (void)SkI2cWait(pAC, IoC, I2C_WRITE) ;
+ (void)SkI2cWait(pAC, IoC, I2C_WRITE);
X
X SK_OUT32(IoC, B2_I2C_DATA, 0x0);
X SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_FAN_CTRL, 0);
- (void)SkI2cWait(pAC, IoC, I2C_WRITE) ;
+ (void)SkI2cWait(pAC, IoC, I2C_WRITE);
X
X SK_OUT32(IoC, B2_I2C_DATA, 0);
X SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_TEMP_CTRL, 0);
- (void)SkI2cWait(pAC, IoC, I2C_WRITE) ;
+ (void)SkI2cWait(pAC, IoC, I2C_WRITE);
X
X SK_OUT32(IoC, B2_I2C_DATA, LM80_CFG_START);
X SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_CFG, 0);
- (void)SkI2cWait(pAC, IoC, I2C_WRITE) ;
+ (void)SkI2cWait(pAC, IoC, I2C_WRITE);
X
X /*
X * MaxSens has to be initialized here, because PhyType is not
@@ -816,19 +886,23 @@
X
X #ifndef SK_DIAG
X pAC->I2c.DummyReads = pAC->I2c.MaxSens;
+
+ /* Clear the interrupt source */
+ SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ);
X #endif /* !SK_DIAG */
X
- /* Now we are IO initialized */
+ /* Now we are I/O initialized */
X pAC->I2c.InitLevel = SK_INIT_IO;
X return(0);
-}
+} /* SkI2cInit1 */
+
X
X /*
- * Init level 2: Start first sensors read
+ * Init level 2: Start first sensor read.
X */
X static int SkI2cInit2(
X SK_AC *pAC, /* Adapter Context */
-SK_IOC IoC) /* IoContext needed in level 1 */
+SK_IOC IoC) /* I/O Context */
X {
X int ReadComplete;
X SK_SENSOR *pSen;


@@ -840,18 +914,18 @@
X }

X
X pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
- ReadComplete = SkI2cReadSensor(pAC,IoC,pSen);
+ ReadComplete = SkI2cReadSensor(pAC, IoC, pSen);
X
X if (ReadComplete) {
- SK_ERR_LOG(pAC, SK_ERRCL_INIT, SKERR_I2C_E008,
- SKERR_I2C_E008MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_INIT, SKERR_I2C_E008, SKERR_I2C_E008MSG);
X }
X
X /* Now we are correctly initialized */
X pAC->I2c.InitLevel = SK_INIT_RUN;
X
X return(0);
-}
+} /* SkI2cInit2*/
+
X
X /*
X * Initialize I2C devices
@@ -863,36 +937,39 @@
X * Level 0:
X * Initialize only the data structures. Do NOT access hardware.
X * Level 1:
- * Initialize hardware through SK_IN?OUT commands. Do NOT use interrupts.
+ * Initialize hardware through SK_IN / SK_OUT commands. Do NOT use interrupts.
X * Level 2:
X * Everything is possible. Interrupts may be used from now on.
X *
- * return: 0 = success
- * other = error.
+ * return:
+ * 0 = success
+ * other = error.
X */
X int SkI2cInit(
X SK_AC *pAC, /* Adapter Context */
-SK_IOC IoC, /* IoContext needed in level 1 */
-int Level) /* Init Level */
+SK_IOC IoC, /* I/O Context needed in levels 1 and 2 */
+int Level) /* Init Level */
X {
X
X switch (Level) {
X case SK_INIT_DATA:
- return(SkI2cInit0(pAC)) ;
+ return(SkI2cInit0(pAC));
X case SK_INIT_IO:
- return(SkI2cInit1(pAC, IoC)) ;
+ return(SkI2cInit1(pAC, IoC));
X case SK_INIT_RUN:
- return(SkI2cInit2(pAC, IoC)) ;
+ return(SkI2cInit2(pAC, IoC));


X default:
X break;
X }

X
- return(0) ;
-}
+ return(0);
+} /* SkI2cInit */
+
X
X #ifndef SK_DIAG
+
X /*
- * Interrupt service function for the I2c Interface
+ * Interrupt service function for the I2C Interface
X *
X * Clears the Interrupt source
X *
@@ -901,60 +978,58 @@
X * Starts the timer if necessary.
X */
X void SkI2cIsr(
-SK_AC *pAC, /* Adapters context */
-SK_IOC IoC) /* Io Context */
+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC) /* I/O Context */
X {
X SK_EVPARA Para;
X
X /* Clear the interrupt source */
- SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ) ;
+ SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ);
X
X Para.Para64 = 0;
X SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_IRQ, Para);
-}
+} /* SkI2cIsr */
+
X
X /*
X * Check this sensors Value against the threshold and send events.
X */
X static void SkI2cCheckSensor(
-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_SENSOR *pSen)
X {
X SK_EVPARA ParaLocal;
X SK_BOOL TooHigh; /* Is sensor too high? */
X SK_BOOL TooLow; /* Is sensor too low? */
- SK_U64 CurrTime; /* current Time */
+ SK_U64 CurrTime; /* Current Time */
X SK_BOOL DoTrapSend; /* We need to send a trap */
X SK_BOOL DoErrLog; /* We need to log the error */
X SK_BOOL IsError; /* We need to log the error */
X
X /* Check Dummy Reads first */
X if (pAC->I2c.DummyReads > 0) {
- pAC->I2c.DummyReads -- ;
+ pAC->I2c.DummyReads --;
X return;
X }
X
X /* Get the current time */
- CurrTime = SkOsGetTime(pAC) ;
+ CurrTime = SkOsGetTime(pAC);
X
- /* Set para to the most usefull setting:
- * The current sensor.
- */
+ /* Set para to the most useful setting: The current sensor. */
X ParaLocal.Para64 = (SK_U64) pAC->I2c.CurrSens;
X
- /* Check the Value against the thresholds */
- /* First: Error Thresholds */
- TooHigh = (pSen->SenValue > pSen->SenThreErrHigh) ;
- TooLow = (pSen->SenValue < pSen->SenThreErrLow) ;
+ /* Check the Value against the thresholds. First: Error Thresholds */
+ TooHigh = (pSen->SenValue > pSen->SenThreErrHigh);
+ TooLow = (pSen->SenValue < pSen->SenThreErrLow);
X
- IsError = SK_FALSE ;
+ IsError = SK_FALSE;
X if (TooHigh || TooLow) {
- /* Error condition is satiesfied */
+ /* Error condition is satisfied */
X DoTrapSend = SK_TRUE;
X DoErrLog = SK_TRUE;
X
X /* Now error condition is satisfied */
- IsError = SK_TRUE ;
+ IsError = SK_TRUE;
X
X if (pSen->SenErrFlag == SK_SEN_ERR_ERR) {
X /* This state is the former one */
@@ -982,7 +1057,7 @@
X /* We came from a different state */
X /* -> Set Begin Time Stamp */
X pSen->SenBegErrTS = CurrTime;
- pSen->SenErrFlag = SK_SEN_ERR_ERR ;
+ pSen->SenErrFlag = SK_SEN_ERR_ERR;
X }
X
X if (DoTrapSend) {
@@ -994,7 +1069,7 @@
X SkEventQueue(pAC, SKGE_PNMI, (TooHigh ?
X SK_PNMI_EVT_SEN_ERR_UPP :
X SK_PNMI_EVT_SEN_ERR_LOW),
- ParaLocal) ;
+ ParaLocal);
X }
X
X if (DoErrLog) {
@@ -1017,12 +1092,12 @@
X
X /* Check the Value against the thresholds */
X /* 2nd: Warning thresholds */
- TooHigh = (pSen->SenValue > pSen->SenThreWarnHigh) ;
- TooLow = (pSen->SenValue < pSen->SenThreWarnLow) ;
+ TooHigh = (pSen->SenValue > pSen->SenThreWarnHigh);
+ TooLow = (pSen->SenValue < pSen->SenThreWarnLow);
X
X
X if (!IsError && (TooHigh || TooLow)) {
- /* Error condition is satiesfied */
+ /* Error condition is satisfied */
X DoTrapSend = SK_TRUE;
X DoErrLog = SK_TRUE;
X
@@ -1052,7 +1127,7 @@
X /* We came from a different state */
X /* -> Set Begin Time Stamp */
X pSen->SenBegWarnTS = CurrTime;
- pSen->SenErrFlag = SK_SEN_ERR_WARN ;
+ pSen->SenErrFlag = SK_SEN_ERR_WARN;
X }
X
X if (DoTrapSend) {
@@ -1064,7 +1139,7 @@
X SkEventQueue(pAC, SKGE_PNMI, (TooHigh ?
X SK_PNMI_EVT_SEN_WAR_UPP :
X SK_PNMI_EVT_SEN_WAR_LOW),
- ParaLocal) ;
+ ParaLocal);
X }
X
X if (DoErrLog) {
@@ -1075,8 +1150,8 @@
X SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E009,
X SKERR_I2C_E009MSG);
X } else if (pSen->SenType == SK_SEN_VOLT) {
- SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E009,
- SKERR_I2C_E009MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E010,
+ SKERR_I2C_E010MSG);
X } else
X {
X SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E014,
@@ -1088,7 +1163,7 @@
X /* Check for NO error at all */
X if (!IsError && !TooHigh && !TooLow) {
X /* Set o.k. Status if no error and no warning condition */
- pSen->SenErrFlag = SK_SEN_ERR_OK ;
+ pSen->SenErrFlag = SK_SEN_ERR_OK;
X }
X
X /* End of check against the thresholds */
@@ -1116,23 +1191,24 @@
X if (!pSen->SenInit) {
X SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E013, SKERR_I2C_E013MSG);
X }
-}
+} /* SkI2cCheckSensor*/
+
X
X /*
X * The only Event to be served is the timeout event
X *
X */
X int SkI2cEvent(
-SK_AC *pAC, /* Adapters context */
-SK_IOC IoC, /* Io Context */
-SK_U32 Event, /* Module specific Event */
-SK_EVPARA Para) /* Event specific Parameter */
+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */
+SK_U32 Event, /* Module specific Event */
+SK_EVPARA Para) /* Event specific Parameter */
X {
- int ReadComplete;
+ int ReadComplete;
X SK_SENSOR *pSen;
X SK_U32 Time;
X SK_EVPARA ParaLocal;
- int i;
+ int i;
X
X switch (Event) {
X case SK_I2CEV_IRQ:
@@ -1142,7 +1218,7 @@
X
X if (ReadComplete) {
X /* Check sensor against defined thresholds */
- SkI2cCheckSensor (pAC, pSen) ;
+ SkI2cCheckSensor (pAC, pSen);
X
X /* Increment Current and set appropriate Timeout */
X Time = SK_I2C_TIM_SHORT;
@@ -1156,20 +1232,20 @@
X /* Start Timer */
X ParaLocal.Para64 = (SK_U64) 0;
X SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, Time,
- SKGE_I2C, SK_I2CEV_TIM, ParaLocal) ;
+ SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
X }
X break;
X case SK_I2CEV_CLEAR:
- for (i=0; i < SK_MAX_SENSORS; i ++) {
+ for (i = 0; i < SK_MAX_SENSORS; i ++) {
X pAC->I2c.SenTable[i].SenErrFlag = SK_SEN_ERR_OK;
X pAC->I2c.SenTable[i].SenErrCts = 0;
X pAC->I2c.SenTable[i].SenWarnCts = 0;
X pAC->I2c.SenTable[i].SenBegErrTS = 0;
X pAC->I2c.SenTable[i].SenBegWarnTS = 0;
- pAC->I2c.SenTable[i].SenLastErrTrapTS = (SK_U64) 0;
- pAC->I2c.SenTable[i].SenLastErrLogTS = (SK_U64) 0;
- pAC->I2c.SenTable[i].SenLastWarnTrapTS = (SK_U64) 0;
- pAC->I2c.SenTable[i].SenLastWarnLogTS = (SK_U64) 0;
+ pAC->I2c.SenTable[i].SenLastErrTrapTS = (SK_U64)0;
+ pAC->I2c.SenTable[i].SenLastErrLogTS = (SK_U64)0;
+ pAC->I2c.SenTable[i].SenLastWarnTrapTS = (SK_U64)0;
+ pAC->I2c.SenTable[i].SenLastWarnLogTS = (SK_U64)0;
X }
X break;
X default:
@@ -1177,6 +1253,6 @@
X }
X
X return(0);
-}
-#endif /* !SK_DIAG */
-/* End of File */
+} /* SkI2cEvent*/
+
+#endif /* !SK_DIAG */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skproc.c linux/drivers/net/sk98lin/skproc.c
--- v2.2.19/drivers/net/sk98lin/skproc.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/net/sk98lin/skproc.c Wed Oct 10 01:41:03 2001
@@ -0,0 +1,441 @@
+/******************************************************************************
+ *
+ * Name: skproc.c


+ * Project: GEnesis, PCI Gigabit Ethernet Adapter

+ * Version: $Revision: 1.2 $
+ * Date: $Date: 2001/02/19 13:14:16 $
+ * Purpose: Funktions to display statictic data


+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *

+ * (C)Copyright 1998-2001 SysKonnect GmbH.
+ *


+ * 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.
+ *
+ * Created 22-Nov-2000
+ * Author: Mirko Lindner (mlin...@syskonnect.de)
+ *


+ * The information in this file is provided "AS IS" without warranty.
+ *
+ ******************************************************************************/

+/******************************************************************************
+ *
+ * History:

+ *
+ * $Log: skproc.c,v $
+ * Revision 1.2 2001/02/19 13:14:16 mlindner
+ * Changed PNMI parameter values
+ * Corrected ProcFs functionality
+ *
+ * Revision 1.1 2001/01/22 14:15:31 mlindner
+ * added ProcFs functionality
+ * Dual Net functionality integrated
+ * Rlmt networks added
+ *
+ *
+ ******************************************************************************/
+
+#include <linux/proc_fs.h>
+
+#include "h/skdrv1st.h"
+#include "h/skdrv2nd.h"
+#define ZEROPAD 1 /* pad with zero */
+#define SIGN 2 /* unsigned/signed long */
+#define PLUS 4 /* show plus */
+#define SPACE 8 /* space if plus */
+#define LEFT 16 /* left justified */
+#define SPECIAL 32 /* 0x */
+#define LARGE 64
+
+extern void proc_fill_inode(struct inode *inode, int fill);
+extern char * SkNumber(char * str, long long num, int base, int size,
+ int precision ,int type);
+int proc_read(char *buffer,
+ char **buffer_location,
+ off_t offset,
+ int buffer_length,
+ int *eof,
+ void *data);
+
+static const char SK_Root_Dir_entry[] = "sk98lin";
+extern struct device *root_dev;
+
+
+struct proc_dir_entry Our_Proc_Dir = {
+ 0,
+ sizeof(SK_Root_Dir_entry)-1,
+ SK_Root_Dir_entry,
+ S_IFDIR | S_IRUGO,
+ 2, 0, 0, 0, NULL,
+ NULL, proc_fill_inode
+};
+
+
+/*****************************************************************************
+ *
+ * proc_read - print "summaries" entry
+ *
+ * Description:
+ * This function fills the proc entry with statistic data about
+ * the ethernet device.
+ *
+ *
+ * Returns: buffer with statistic data
+ *
+ */
+int proc_read(char *buffer,
+char **buffer_location,
+off_t offset,
+int buffer_length,
+int *eof,
+void *data)
+{
+ int len = 0;
+ int t;
+ int i;
+ DEV_NET *pNet;
+ SK_AC *pAC;
+ char test_buf[100];
+ unsigned int Flags;
+ unsigned int Size;
+ struct device *next;
+ struct device *SkgeProcDev = root_dev;
+
+ SK_PNMI_STRUCT_DATA *pPnmiStruct;
+ SK_PNMI_STAT *pPnmiStat;
+ struct proc_dir_entry *file = (struct proc_dir_entry*) data;
+
+ while (SkgeProcDev) {
+ pNet = (DEV_NET*) SkgeProcDev->priv;
+ pAC = pNet->pAC;
+ next = pAC->Next;
+
+ pPnmiStruct = &pAC->PnmiStruct;
+
+ for (t=pAC->GIni.GIMacsFound; t > 0; t--) {
+ if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 1)
+ t--;
+
+ spin_lock_irqsave(&pAC->SlowPathLock, Flags);
+ Size = SK_PNMI_STRUCT_SIZE;
+ SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, t-1);
+ spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
+
+
+
+
+ if (strcmp(pAC->dev[t-1]->name, file->name) == 0) {
+ pPnmiStat = &pPnmiStruct->Stat[t-1];
+ len = sprintf(buffer,
+ "\nDetailed statistic for device %s\n",
+ pAC->dev[t-1]->name);
+ len += sprintf(buffer + len,
+ "==================================\n");
+
+ /* Board statistics */
+
+ len += sprintf(buffer + len,
+ "\nBoard statistics\n\n");
+ len += sprintf(buffer + len,
+ "Active Port %c\n",
+ 'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt.
+ Net[t-1].PrefPort]->PortNumber);
+ len += sprintf(buffer + len,
+ "Preferred Port %c\n",
+ 'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt.
+ Net[t-1].PrefPort]->PortNumber);
+
+ len += sprintf(buffer + len,
+ "Bus speed (MHz) %d\n",
+ pPnmiStruct->BusSpeed);
+
+ len += sprintf(buffer + len,
+ "Bus width (Bit) %d\n",
+ pPnmiStruct->BusWidth);
+
+
+ for (i=0; i < SK_MAX_SENSORS; i ++) {
+ if (strcmp(pAC->I2c.SenTable[i].SenDesc,
+ "Temperature") == 0 ) {
+ len += sprintf(buffer + len,
+ "Temperature (C) %d.%d\n",
+ pAC->I2c.SenTable[i].SenValue / 10,
+ pAC->I2c.SenTable[i].SenValue % 10);
+ len += sprintf(buffer + len,
+ "Temperature (F) %d.%d\n",
+ ((((pAC->I2c.SenTable[i].SenValue)
+ *10)*9)/5 + 3200)/100,
+ ((((pAC->I2c.SenTable[i].SenValue)
+ *10)*9)/5 + 3200) % 10);
+ } else if (strcmp(pAC->I2c.SenTable[i].SenDesc,
+ "Speed Fan") == 0 ) {
+ len += sprintf(buffer + len,
+ "Speed Fan %d\n",
+ pAC->I2c.SenTable[i].SenValue);
+ } else {
+ len += sprintf(buffer + len,
+ "%-20s %d.%d\n",
+ pAC->I2c.SenTable[i].SenDesc,
+ pAC->I2c.SenTable[i].SenValue / 1000,
+ pAC->I2c.SenTable[i].SenValue % 1000);
+ }
+ }
+
+ /*Receive statistics */
+
+ len += sprintf(buffer + len,
+ "\nReceive statistics\n\n");
+
+ len += sprintf(buffer + len,
+ "Received bytes %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxOctetsOkCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Received packets %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxOkCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Received errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxFcsCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Received dropped %s\n",
+ SkNumber(test_buf, pPnmiStruct->RxNoBufCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Received multicast %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxMulticastOkCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Received errors types\n");
+ len += sprintf(buffer + len,
+ " length errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxRuntCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " over errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxFifoOverflowCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " crc errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxFcsCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " frame errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxFramingCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " fifo errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxFifoOverflowCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " missed errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatRxMissedCts,
+ 10, 0, -1, 0));
+
+
+ /*Transmit statistics */
+
+ len += sprintf(buffer + len,
+ "\nTransmit statistics\n\n");
+
+ len += sprintf(buffer + len,
+ "Transmit bytes %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxOctetsOkCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Transmit packets %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxOkCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Transmit errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxSingleCollisionCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Transmit dropped %s\n",
+ SkNumber(test_buf, pPnmiStruct->TxNoBufCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Transmit collisions %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxSingleCollisionCts,
+ 10,0,-1,0));
+ len += sprintf(buffer + len,
+ "Transmited errors types\n");
+ len += sprintf(buffer + len,
+ " aborted errors %ld\n",
+ pAC->stats.tx_aborted_errors);
+ len += sprintf(buffer + len,
+ " carrier errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxCarrierCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " fifo errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxFifoUnderrunCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " heartbeat errors %s\n",
+ SkNumber(test_buf, pPnmiStat->StatTxCarrierCts,
+ 10, 0, -1, 0));
+ len += sprintf(buffer + len,
+ " window errors %ld\n",
+ pAC->stats.tx_window_errors);
+ }
+ }
+ SkgeProcDev = next;
+ }
+
+ if (offset >= len) {
+ *eof = 1;


+ return 0;
+ }
+

+ *buffer_location = buffer + offset;
+ if (buffer_length >= len - offset) {
+ *eof = 1;
+ }
+
+ return (min(buffer_length, len - offset));


+}
+
+
+
+
+

+/*****************************************************************************
+ *
+ * SkDoDiv - convert 64bit number
+ *
+ * Description:
+ * This function "converts" a long long number.
+ *
+ * Returns:
+ * remainder of division
+ */
+static long SkDoDiv (long long Dividend, int Divisor, long long *pErg)
+{
+ long Rest;
+ long long Ergebnis;
+ long Akku;
+
+
+ Akku = Dividend >> 32;
+
+ Ergebnis = ((long long) (Akku / Divisor)) << 32;
+ Rest = Akku % Divisor ;
+
+ Akku = Rest << 16;
+ Akku |= ((Dividend & 0xFFFF0000) >> 16);
+
+
+ Ergebnis += ((long long) (Akku / Divisor)) << 16;
+ Rest = Akku % Divisor ;
+
+ Akku = Rest << 16;
+ Akku |= (Dividend & 0xFFFF);
+
+ Ergebnis += (Akku / Divisor);
+ Rest = Akku % Divisor ;
+
+ *pErg = Ergebnis;
+ return (Rest);
+}
+
+
+#if 0
+#define do_div(n,base) ({ \
+long long __res; \
+__res = ((unsigned long long) n) % (unsigned) base; \
+n = ((unsigned long long) n) / (unsigned) base; \
+__res; })
+
+#endif
+
+
+/*****************************************************************************
+ *
+ * SkNumber - Print results
+ *
+ * Description:
+ * This function converts a long long number into a string.
+ *
+ * Returns:
+ * number as string
+ */
+char * SkNumber(char * str, long long num, int base, int size, int precision
+ ,int type)
+{
+ char c,sign,tmp[66], *strorg = str;
+ const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
+ int i;
+
+ if (type & LARGE)
+ digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ if (type & LEFT)
+ type &= ~ZEROPAD;
+ if (base < 2 || base > 36)
+ return 0;
+ c = (type & ZEROPAD) ? '0' : ' ';
+ sign = 0;
+ if (type & SIGN) {
+ if (num < 0) {
+ sign = '-';
+ num = -num;
+ size--;
+ } else if (type & PLUS) {
+ sign = '+';
+ size--;
+ } else if (type & SPACE) {
+ sign = ' ';
+ size--;
+ }
+ }
+ if (type & SPECIAL) {
+ if (base == 16)
+ size -= 2;
+ else if (base == 8)
+ size--;
+ }
+ i = 0;
+ if (num == 0)
+ tmp[i++]='0';
+ else while (num != 0)
+ tmp[i++] = digits[SkDoDiv(num,base, &num)];
+
+ if (i > precision)
+ precision = i;
+ size -= precision;
+ if (!(type&(ZEROPAD+LEFT)))
+ while(size-->0)
+ *str++ = ' ';
+ if (sign)
+ *str++ = sign;
+ if (type & SPECIAL) {
+ if (base==8)
+ *str++ = '0';
+ else if (base==16) {
+ *str++ = '0';
+ *str++ = digits[33];
+ }
+ }
+ if (!(type & LEFT))
+ while (size-- > 0)
+ *str++ = c;
+ while (i < precision--)
+ *str++ = '0';
+ while (i-- > 0)
+ *str++ = tmp[i];
+ while (size-- > 0)
+ *str++ = ' ';
+
+ str[0] = '\0';
+
+ return strorg;
+}
+
+
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skqueue.c linux/drivers/net/sk98lin/skqueue.c
--- v2.2.19/drivers/net/sk98lin/skqueue.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skqueue.c Wed Oct 10 01:41:03 2001
@@ -147,7 +147,7 @@
X * send command to state machine
X * end
X * return error reported by individual Event function
- * 0 if no error occured.
+ * 0 if no error occurred.
X */
X int SkEventDispatcher(
X SK_AC *pAC, /* Adapters Context */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skrlmt.c linux/drivers/net/sk98lin/skrlmt.c
--- v2.2.19/drivers/net/sk98lin/skrlmt.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skrlmt.c Wed Oct 10 01:41:03 2001
@@ -2,16 +2,15 @@
X *
X * Name: skrlmt.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.49 $
- * Date: $Date: 1999/11/22 13:38:02 $
+ * Version: $Revision: 1.61 $
+ * Date: $Date: 2001/03/14 12:52:08 $
X * Purpose: Manage links on SK-NET Adapters, esp. redundant ones.


X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
@@ -27,15 +26,53 @@
X * History:
X *
X * $Log: skrlmt.c,v $
+ * Revision 1.61 2001/03/14 12:52:08 rassmann
+ * Fixed reporting of active port up/down to PNMI.
+ *
+ * Revision 1.60 2001/02/21 16:02:25 gklug
+ * fix: when RLMT starts set Active Port for PNMI
+ *
+ * Revision 1.59 2001/02/16 14:38:19 rassmann
+ * Initializing some pointers earlier in the init phase.
+ * Rx Mbufs are freed if the net which they belong to is stopped.
+ *
+ * Revision 1.58 2001/02/14 14:06:31 rassmann
+ * Editorial changes.
+ *
+ * Revision 1.57 2001/02/05 14:25:26 rassmann
+ * Prepared RLMT for transparent operation.
+ *
+ * Revision 1.56 2001/01/30 10:29:09 rassmann
+ * Not checking switching befor RlmtStart.
+ * Editorial changes.
+ *
+ * Revision 1.55 2001/01/22 13:41:38 rassmann
+ * Supporting two nets on dual-port adapters.
+ *
+ * Revision 1.54 2000/11/30 13:25:07 rassmann
+ * Setting SK_TICK_INCR to 1 by default.
+ *
+ * Revision 1.53 2000/11/30 10:48:07 cgoos
+ * Changed definition of SK_RLMT_BC_DELTA.
+ *
+ * Revision 1.52 2000/11/27 12:50:03 rassmann
+ * Checking ports after receiving broadcasts.
+ *
+ * Revision 1.51 2000/11/17 08:58:00 rassmann
+ * Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event.
+ *
+ * Revision 1.50 2000/11/09 12:24:34 rassmann
+ * Indicating that segmentation check is not running anymore after
+ * SkRlmtCheckSeg().
+ * Restarting segmentation timer after segmentation log.
+ * Editorial changes.
+ *
X * Revision 1.49 1999/11/22 13:38:02 cgoos


X * Changed license header to GPL.

X * Added initialization to some variables to avoid compiler warnings.


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 34'
echo 'File patch-2.2.20 is continued in part 35'
echo "35" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:05 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part06

#!/bin/sh -x
# this is part 06 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 06; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X
X extern int end;
X static long free_mem_ptr = (long)&end;
-static long free_mem_end_ptr = 0x90000;
+static long free_mem_end_ptr;
X
X #define INPLACE_MOVE_ROUTINE 0x1000
X #define LOW_BUFFER_START 0x2000
-#define LOW_BUFFER_END 0x90000
-#define LOW_BUFFER_SIZE ( LOW_BUFFER_END - LOW_BUFFER_START )
+#define LOW_BUFFER_MAX 0x90000
X #define HEAP_SIZE 0x2400
+static unsigned int low_buffer_end, low_buffer_size;
X static int high_loaded =0;
X static uch *high_buffer_start /* = (uch *)(((ulg)&end) + HEAP_SIZE)*/;


X
@@ -255,7 +257,7 @@

X in = window;
X for (n = 0; n < outcnt; n++) {
X ch = *output_data++ = *in++;
- if ((ulg)output_data == LOW_BUFFER_END) output_data=high_buffer_start;
+ if ((ulg)output_data == low_buffer_end) output_data=high_buffer_start;
X c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
X }
X crc = c;
@@ -311,10 +313,13 @@
X if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory.\n");
X #endif
X mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START;
+ low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX
+ ? LOW_BUFFER_MAX : (unsigned int)real_mode) & ~0xfff;
+ low_buffer_size = low_buffer_end - LOW_BUFFER_START;
X high_loaded = 1;
X free_mem_end_ptr = (long)high_buffer_start;
- if ( (0x100000 + LOW_BUFFER_SIZE) > ((ulg)high_buffer_start)) {
- high_buffer_start = (uch *)(0x100000 + LOW_BUFFER_SIZE);
+ if ( (0x100000 + low_buffer_size) > ((ulg)high_buffer_start)) {
+ high_buffer_start = (uch *)(0x100000 + low_buffer_size);
X mv->hcount = 0; /* say: we need not to move high_buffer */
X }
X else mv->hcount = -1;
@@ -323,17 +328,21 @@
X
X void close_output_buffer_if_we_run_high(struct moveparams *mv)
X {
- mv->lcount = bytes_out;
- if (bytes_out > LOW_BUFFER_SIZE) {
- mv->lcount = LOW_BUFFER_SIZE;
- if (mv->hcount) mv->hcount = bytes_out - LOW_BUFFER_SIZE;
+ if (bytes_out > low_buffer_size) {
+ mv->lcount = low_buffer_size;
+ if (mv->hcount)
+ mv->hcount = bytes_out - low_buffer_size;
+ } else {
+ mv->lcount = bytes_out;
+ mv->hcount = 0;
X }
- else mv->hcount = 0;
X }
X
X
-int decompress_kernel(struct moveparams *mv)
+int decompress_kernel(struct moveparams *mv, void *rmode)
X {
+ real_mode = rmode;
+
X if (SCREEN_INFO.orig_video_mode == 7) {
X vidmem = (char *) 0xb0000;
X vidport = 0x3b4;
@@ -355,4 +364,3 @@
X if (high_loaded) close_output_buffer_if_we_run_high(mv);
X return high_loaded;
X }
-
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
--- v2.2.19/arch/i386/boot/setup.S Sun Mar 25 17:37:29 2001
+++ linux/arch/i386/boot/setup.S Wed Oct 10 01:40:43 2001
@@ -69,7 +69,7 @@
X ! SETUP-header, must start at CS:2 (old 0x9020:2)
X !
X .ascii "HdrS" ! Signature for SETUP-header
- .word 0x0201 ! Version number of header format
+ .word 0x0202 ! Version number of header format
X ! (must be >= 0x0105
X ! else old loadlin-1.5 will fail)
X realmode_swtch: .word 0,0 ! default_switch,SETUPSEG
@@ -120,9 +120,28 @@
X ramdisk_size: .long 0 ! its size in bytes
X bootsect_kludge:
X .word bootsect_helper,SETUPSEG
-heap_end_ptr: .word modelist+1024 ! space from here (exclusive) down to
- ! end of setup code can be used by setup
- ! for local heap purposes.
+heap_end_ptr: .word modelist+1024 ! (Header version 0x0201 or later)
+ ! space from here (exclusive) down to
+ ! end of setup code can be used by setup
+ ! for local heap purposes.
+
+pad1: .word 0 ! Reserved for future use
+
+cmd_line_ptr: .long 0 ! (Header version 0x0202 or later)
+ ! If nonzero, a 32-bit pointer
+ ! to the kernel command line.
+ ! The command line should be
+ ! located between the start of
+ ! setup and the end of low
+ ! memory (0xa0000), or it may
+ ! get overwritten before it
+ ! gets read. If this field is
+ ! used, there is no longer
+ ! anything magical about the
+ ! 0x90000 segment; the setup
+ ! can be located anywhere in
+ ! low memory 0x10000 or higher.
+
X ! ------------------------ end of header ----------------------------------
X
X start_of_setup:
@@ -534,6 +553,13 @@
X mov ax,cs ! aka #SETUPSEG ! right, forgot this at first. didn't work :-)
X mov ds,ax
X
+! Check whether we need to be downward compatible with version <= 0x0201
+ cmp dword ptr [cmd_line_ptr],#0
+ jne end_move_self
+ cmp byte ptr [type_of_loader],#0x20
+ je end_move_self
+
+! Boot loader does not support boot protocol version 2.02.
X ! If we have our code not at 0x90000, we need to move it there now.
X ! We also then need to move the parameters behind it (command line)
X ! Because we would overwrite the code on the current IP, we move
@@ -572,9 +598,14 @@
X mov ds,ax
X mov ss,dx
X ! now we are at the right place
-end_move_self:
X
+end_move_self:
X lidt idt_48 ! load idt with 0,0
+ xor eax,eax
+ mov ax,ds
+ shl eax,#4
+ add eax,#gdt
+ mov [gdt_48+2],eax
X lgdt gdt_48 ! load gdt with whatever appropriate
X
X ! that was painless, now we enable A20
@@ -679,7 +710,11 @@
X jmp flush_instr
X flush_instr:
X xor bx,bx ! Flag to indicate a boot
-
+ xor esi,esi ! Pointer to real-mode code
+ mov si,cs
+ sub si,#DELTA_INITSEG
+ shl esi,#4 ! Convert to 32-bit pointer
+
X ! NOTE: For high loaded big kernels we need a
X ! jmpi 0x100000,__KERNEL_CS
X !
@@ -873,7 +908,7 @@
X
X gdt_48:
X .word 0x800 ! gdt limit=2048, 256 GDT entries
- .word 512+gdt,0x9 ! gdt base = 0X9xxxx
+ .word 0, 0 ! gdt base (filled in later)
X
X !
X ! Include video setup & detection code
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/config.in linux/arch/i386/config.in
--- v2.2.19/arch/i386/config.in Sun Mar 25 17:37:29 2001
+++ linux/arch/i386/config.in Wed Oct 10 01:40:43 2001
@@ -4,6 +4,8 @@
X #
X mainmenu_name "Linux Kernel Configuration"
X
+define_bool CONFIG_X86 y
+
X mainmenu_option next_comment
X comment 'Code maturity level options'
X bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/bluesmoke.c linux/arch/i386/kernel/bluesmoke.c
--- v2.2.19/arch/i386/kernel/bluesmoke.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/bluesmoke.c Wed Oct 10 01:40:43 2001
@@ -46,6 +46,7 @@
X printk(" at %08x%08x",
X high, low);
X }
+ printk("\n");
X /* Clear it */
X wrmsr(0x401+i*4, 0UL, 0UL);
X /* Serialize */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- v2.2.19/arch/i386/kernel/entry.S Sun Mar 25 17:37:29 2001
+++ linux/arch/i386/kernel/entry.S Wed Oct 10 01:40:43 2001
@@ -76,6 +76,7 @@
X addr_limit = 12
X exec_domain = 16
X need_resched = 20
+ptrace = 24
X
X ENOSYS = 38


X
@@ -174,7 +175,7 @@

X GET_CURRENT(%ebx)
X cmpl $(NR_syscalls),%eax
X jae badsys
- testb $0x20,flags(%ebx) # PF_TRACESYS
+ testb $0x02,ptrace(%ebx) # PT_TRACESYS
X jne tracesys
X call *SYMBOL_NAME(sys_call_table)(,%eax,4)
X movl %eax,EAX(%esp) # save the return value
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/head.S linux/arch/i386/kernel/head.S
--- v2.2.19/arch/i386/kernel/head.S Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/head.S Wed Oct 10 01:40:43 2001
@@ -14,11 +14,11 @@
X #include <asm/page.h>
X #include <asm/pgtable.h>
X
-
-#define CL_MAGIC_ADDR 0x90020
-#define CL_MAGIC 0xA33F
-#define CL_BASE_ADDR 0x90000
-#define CL_OFFSET 0x90022
+#define OLD_CL_MAGIC_ADDR 0x90020
+#define OLD_CL_MAGIC 0xA33F
+#define OLD_CL_BASE_ADDR 0x90000
+#define OLD_CL_OFFSET 0x90022
+#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
X
X /*
X * References to members of the boot_cpu_data structure.
@@ -36,6 +36,8 @@
X
X /*
X * swapper_pg_dir is the main page directory, address 0x00101000
+ *
+ * On entry, %esi points to the real-mode code as a 32-bit pointer.
X */
X ENTRY(stext)
X ENTRY(_stext)
@@ -52,6 +54,9 @@
X #ifdef __SMP__
X orw %bx,%bx
X jz 1f
+#endif
+
+#ifdef __SMP__
X /*
X * New page tables may be in 4Mbyte page mode and may
X * be using the global pages.
@@ -89,6 +94,7 @@
X jmp checkCPUtype
X 1:
X #endif __SMP__
+
X /*
X * Clear BSS first so that there are no surprises...
X */
@@ -99,6 +105,7 @@
X cld
X rep
X stosb
+
X /*
X * start system 32-bit setup. We need to re-do some of the things done
X * in 16-bit mode for the "real" operations.
@@ -115,8 +122,9 @@
X * Copy bootup parameters out of the way. First 2kB of
X * _empty_zero_page is for boot parameters, second 2kB
X * is for the command line.
+ *
+ * Note: %esi still has the pointer to the real-mode data.
X */
- movl $0x90000,%esi
X movl $ SYMBOL_NAME(empty_zero_page),%edi
X movl $512,%ecx
X cld
@@ -126,11 +134,15 @@
X movl $512,%ecx
X rep
X stosl
- cmpw $(CL_MAGIC),CL_MAGIC_ADDR
+ movl SYMBOL_NAME(empty_zero_page)+NEW_CL_POINTER,%esi
+ andl %esi,%esi
+ jnz 2f
+ cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
X jne 1f
+ movzwl OLD_CL_OFFSET,%esi
+ addl $(OLD_CL_BASE_ADDR),%esi
+2:
X movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi
- movzwl CL_OFFSET,%esi
- addl $(CL_BASE_ADDR),%esi
X movl $2048,%ecx
X rep
X movsb
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- v2.2.19/arch/i386/kernel/io_apic.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/io_apic.c Wed Oct 10 01:40:43 2001
@@ -199,9 +199,9 @@
X /*
X * We disable IO-APIC IRQs by setting their 'destination CPU mask' to
X * zero. Trick by Ramesh Nalluri.
+ * Not anymore. This causes problems on some IO-APIC's, notably AMD 760MP's
+ * So we do it a more 2.4 kind of way now which should be safer -jerdfelt
X */
-DO_ACTION( disable, 1, &= 0x00ffffff, io_apic_sync(entry->apic))/* destination = 0x00 */
-DO_ACTION( enable, 1, |= 0xff000000, ) /* destination = 0xff */
X DO_ACTION( mask, 0, |= 0x00010000, io_apic_sync(entry->apic))/* mask = 1 */
X DO_ACTION( unmask, 0, &= 0xfffeffff, ) /* mask = 0 */
X

@@ -611,8 +611,8 @@
X

X entry.delivery_mode = dest_LowestPrio;
X entry.dest_mode = 1; /* logical delivery */
- entry.mask = 0; /* enable IRQ */
- entry.dest.logical.logical_dest = 0; /* but no route */
+ entry.mask = 1; /* disable IRQ */
+ entry.dest.logical.logical_dest = 0xff;
X
X idx = find_irq_entry(apic,pin,mp_INT);
X if (idx == -1) {
@@ -931,18 +931,60 @@
X panic("could not set ID");
X }
X
+static int __init ELCR_trigger(unsigned int irq)
+{
+ unsigned int port;
+
+ port = 0x4d0 + (irq >> 3);
+ return (inb(port) >> (irq & 7)) & 1;
+}
+
X static void __init construct_default_ISA_mptable(void)
X {
X int i, pos = 0;
+ int ELCR_fallback = 0;
X const int bus_type = (mpc_default_type == 2 || mpc_default_type == 3 ||
X mpc_default_type == 6) ? MP_BUS_EISA : MP_BUS_ISA;
X
+ /*
+ * If true, we have an ISA/PCI system with no IRQ entries
+ * in the MP table. To prevent the PCI interrupts from being set up
+ * incorrectly, we try to use the ELCR. The sanity check to see if
+ * there is good ELCR data is very simple - IRQ0, 1, 2 and 13 can
+ * never be level sensitive, so we simply see if the ELCR agrees.
+ * If it does, we assume it's valid.
+ */
+ if (mpc_default_type == 5) {
+ printk("ISA/PCI bus type with no IRQ information... falling back to ELCR\n");
+
+ if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) || ELCR_trigger(13))
+ printk("ELCR contains invalid data... not using ELCR\n");
+ else {
+ printk("Using ELCR to identify PCI interrupts\n");
+ ELCR_fallback = 1;
+ }
+ }
+
X for (i = 0; i < 16; i++) {
X if (!IO_APIC_IRQ(i))
X continue;
X
X mp_irqs[pos].mpc_irqtype = mp_INT;
- mp_irqs[pos].mpc_irqflag = 0; /* default */
+
+ if (ELCR_fallback) {
+ /*
+ * If the ELCR indicates a level-sensitive interrupt, we
+ * copy that information over to the MP table in the
+ * irqflag field (level sensitive, active high polarity).
+ */
+ if (ELCR_trigger(i))
+ mp_irqs[pos].mpc_irqflag = 13;
+ else
+ mp_irqs[pos].mpc_irqflag = 0;
+ }
+ else
+ mp_irqs[pos].mpc_irqflag = 0; /* default */
+
X mp_irqs[pos].mpc_srcbus = 0;
X mp_irqs[pos].mpc_srcbusirq = i;
X mp_irqs[pos].mpc_dstapic = 0;
@@ -1017,13 +1059,10 @@
X static void enable_edge_ioapic_irq(unsigned int irq)
X {
X self_IPI(irq);
- enable_IO_APIC_irq(irq);
+ unmask_IO_APIC_irq(irq);
X }
X
-static void disable_edge_ioapic_irq(unsigned int irq)
-{
- disable_IO_APIC_irq(irq);
-}
+static void disable_edge_ioapic_irq(unsigned int irq) { /* nothing */ }
X
X /*
X * Starting up a edge-triggered IO-APIC interrupt is


@@ -1239,7 +1278,7 @@
X

X pin1 = find_timer_pin(mp_INT);
X pin2 = find_timer_pin(mp_ExtINT);
- enable_IO_APIC_irq(0);
+ unmask_IO_APIC_irq(0);
X if (!timer_irq_works()) {
X
X if (pin1 != -1)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/irq.h linux/arch/i386/kernel/irq.h
--- v2.2.19/arch/i386/kernel/irq.h Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/irq.h Mon Oct 22 11:00:20 2001
@@ -85,6 +85,7 @@
X extern void init_IRQ_SMP(void);
X extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
X extern int setup_x86_irq(unsigned int, struct irqaction *);
+extern void release_x86_irqs(struct task_struct *);
X
X /*
X * Various low-level irq details needed by irq.c, process.c,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- v2.2.19/arch/i386/kernel/process.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/process.c Wed Oct 10 01:40:43 2001
@@ -544,6 +544,7 @@
X
X void release_thread(struct task_struct *dead_task)
X {
+ release_x86_irqs(dead_task);
X }
X
X /*
@@ -808,7 +809,7 @@
X goto out;
X error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);


X if (error == 0)

- current->flags &= ~PF_DTRACE;
+ current->ptrace &= ~PT_DTRACE;

X putname(filename);
X out:
X unlock_kernel();
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
--- v2.2.19/arch/i386/kernel/ptrace.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -394,10 +394,10 @@


X ret = -EPERM;
X if (request == PTRACE_TRACEME) {
X /* are we already being traced? */
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X goto out;
X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;
X ret = 0;
X goto out;
X }

@@ -423,9 +423,9 @@


X (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED)
+ if (child->ptrace & PT_PTRACED)
X goto out;
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X

X write_lock_irqsave(&tasklist_lock, flags);


X if (child->p_pptr != current) {

@@ -440,7 +440,7 @@


X goto out;
X }
X ret = -ESRCH;
- if (!(child->flags & PF_PTRACED))
+ if (!(child->ptrace & PT_PTRACED))
X goto out;

X if (child->state != TASK_STOPPED) {
X if (request != PTRACE_KILL)
@@ -542,9 +542,9 @@


X if ((unsigned long) data > _NSIG)
X goto out;
X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X /* make sure the single step bit is not set. */

X tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
@@ -579,10 +579,10 @@


X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;

- child->flags &= ~PF_TRACESYS;
- if ((child->flags & PF_DTRACE) == 0) {


+ child->ptrace &= ~PT_TRACESYS;

+ if ((child->ptrace & PT_DTRACE) == 0) {
X /* Spurious delayed TF traps may occur */
- child->flags |= PF_DTRACE;
+ child->ptrace |= PT_DTRACE;
X }
X tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
X put_stack_long(child, EFL_OFFSET, tmp);
@@ -599,7 +599,7 @@


X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;
- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);

X child->exit_code = data;

X write_lock_irqsave(&tasklist_lock, flags);
X REMOVE_LINKS(child);
@@ -710,8 +710,8 @@


X
X asmlinkage void syscall_trace(void)
X {
- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;
X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
--- v2.2.19/arch/i386/kernel/signal.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -629,7 +629,7 @@


X if (!signr)
X break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X /* Let the debugger run. */
X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -697,12 +697,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:
- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- v2.2.19/arch/i386/kernel/traps.c Sun Mar 25 17:37:30 2001
+++ linux/arch/i386/kernel/traps.c Wed Oct 10 01:40:43 2001
@@ -375,12 +375,12 @@
X * The TF error should be masked out only if the current
X * process is not traced and if the TRAP flag has been set
X * previously by a tracing process (condition detected by
- * the PF_DTRACE flag); remember that the i386 TRAP flag
+ * the PT_DTRACE flag); remember that the i386 TRAP flag
X * can be modified by the process itself in user mode,
X * allowing programs to debug themselves without the ptrace()
X * interface.
X */
- if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE)
+ if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE)
X goto clear_TF;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
--- v2.2.19/arch/i386/kernel/vm86.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/kernel/vm86.c Wed Oct 10 01:40:43 2001
@@ -439,7 +439,7 @@
X }
X if (trapno !=1)
X return 1; /* we let this handle by the calling routine */


- if (current->flags & PF_PTRACED) {
+ if (current->ptrace & PT_PTRACED) {

X unsigned long flags;
X spin_lock_irqsave(&current->sigmask_lock, flags);
X sigdelset(&current->blocked, SIGTRAP);
@@ -618,6 +618,14 @@
X }
X read_unlock(&tasklist_lock);
X return ret;
+}
+
+void release_x86_irqs(struct task_struct *task)
+{
+ int i;
+ for (i=3; i<16; i++)
+ if (vm86_irqs[i].tsk == task)
+ free_vm86_irq(i);
X }
X
X static inline void handle_irq_zombies(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/i386/math-emu/fpu_entry.c linux/arch/i386/math-emu/fpu_entry.c
--- v2.2.19/arch/i386/math-emu/fpu_entry.c Sun Mar 25 17:31:45 2001
+++ linux/arch/i386/math-emu/fpu_entry.c Wed Oct 10 01:40:43 2001
@@ -210,7 +210,7 @@
X }
X
X FPU_lookahead = 1;


- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)

X FPU_lookahead = 0;
X
X if ( !valid_prefix(&byte1, (u_char **)&FPU_EIP,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/m68k/kernel/ptrace.c linux/arch/m68k/kernel/ptrace.c
--- v2.2.19/arch/m68k/kernel/ptrace.c Sun Mar 25 17:31:50 2001
+++ linux/arch/m68k/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -320,10 +320,10 @@


X ret = -EPERM;
X if (request == PTRACE_TRACEME) {
X /* are we already being traced? */
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X goto out;
X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;
X ret = 0;
X goto out;
X }

@@ -349,9 +349,9 @@


X (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED)
+ if (child->ptrace & PT_PTRACED)
X goto out;
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X

X write_lock_irqsave(&tasklist_lock, flags);


X if (child->p_pptr != current) {

@@ -366,7 +366,7 @@


X goto out;
X }
X ret = -ESRCH;
- if (!(child->flags & PF_PTRACED))
+ if (!(child->ptrace & PT_PTRACED))
X goto out;

X if (child->state != TASK_STOPPED) {
X if (request != PTRACE_KILL)
@@ -473,9 +473,9 @@


X if ((unsigned long) data > _NSIG)
X goto out;
X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X /* make sure the single step bit is not set. */

X tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
@@ -510,7 +510,7 @@


X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;

- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;

X tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16);
X put_reg(child, PT_SR, tmp);
X
@@ -527,7 +527,7 @@


X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;
- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);

X child->exit_code = data;

X write_lock_irqsave(&tasklist_lock, flags);
X REMOVE_LINKS(child);
@@ -607,8 +607,8 @@


X asmlinkage void syscall_trace(void)
X {

X lock_kernel();


- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))

X goto out;


X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/m68k/kernel/signal.c linux/arch/m68k/kernel/signal.c
--- v2.2.19/arch/m68k/kernel/signal.c Sun Mar 25 17:31:50 2001
+++ linux/arch/m68k/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -1007,7 +1007,7 @@


X if (!signr)
X break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {

X current->exit_code = signr;
X current->state = TASK_STOPPED;

X regs->sr &= ~PS_T;
@@ -1093,9 +1093,7 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:

X case SIGIOT: case SIGFPE: case SIGSEGV:


- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;

X /* FALLTHRU */
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/m68k/kernel/traps.c linux/arch/m68k/kernel/traps.c
--- v2.2.19/arch/m68k/kernel/traps.c Sun Mar 25 17:31:50 2001
+++ linux/arch/m68k/kernel/traps.c Wed Oct 10 01:40:43 2001
@@ -921,7 +921,7 @@
X if (fp->ptregs.sr & PS_S) {
X if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
X /* traced a trapping instruction */
- current->flags |= PF_DTRACE;
+ current->ptrace |= PT_DTRACE;
X } else
X bad_super_trap(fp);
X return;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/baget/irq.c linux/arch/mips/baget/irq.c
--- v2.2.19/arch/mips/baget/irq.c Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/baget/irq.c Wed Oct 10 01:40:43 2001
@@ -212,7 +212,7 @@
X add_interrupt_randomness(irq);
X __cli();
X } else {
- printk("do_IRQ: Unregistered IRQ (0x%X) occured\n", irq);
+ printk("do_IRQ: Unregistered IRQ (0x%X) occurred\n", irq);
X }
X unmask_irq(irq);
X hardirq_exit(cpu);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/dec/prom/memory.c linux/arch/mips/dec/prom/memory.c
--- v2.2.19/arch/mips/dec/prom/memory.c Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/dec/prom/memory.c Wed Oct 10 01:40:43 2001


@@ -25,7 +25,7 @@
X

X extern unsigned long mips_memory_upper;
X
-volatile unsigned long mem_err = 0; /* So we know an error occured */
+volatile unsigned long mem_err = 0; /* So we know an error occurred */
X
X /*
X * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/kernel/irixelf.c linux/arch/mips/kernel/irixelf.c
--- v2.2.19/arch/mips/kernel/irixelf.c Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/kernel/irixelf.c Wed Oct 10 01:40:43 2001
@@ -43,16 +43,16 @@
X #undef DEBUG_ELF
X
X static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs);
-static int load_irix_library(int fd);
-static int irix_core_dump(long signr, struct pt_regs * regs);
+static int load_irix_library(struct file *file);
+static int irix_core_dump(long signr, struct pt_regs * regs, struct file *);
X extern int dump_fpu (elf_fpregset_t *);
X
X static struct linux_binfmt irix_format = {
-#ifndef MODULE
- NULL, NULL, load_irix_binary, load_irix_library, irix_core_dump
-#else
- NULL, &__this_module.usecount, load_irix_binary, load_irix_library, irix_core_dump
-#endif
+ module: THIS_MODULE,
+ load_binary: load_irix_binary,
+ load_shlib: load_irix_library,
+ core_dump: irix_core_dump,
+ min_coredump: PAGE_SIZE,
X };
X
X #ifndef elf_addr_t
@@ -610,8 +610,7 @@
X /* These are the functions used to load ELF style executables and shared
X * libraries. There is no binary dependent code anywhere else.
X */
-static inline int do_load_irix_binary(struct linux_binprm * bprm,
- struct pt_regs * regs)
+static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
X {
X struct elfhdr elf_ex, interp_elf_ex;
X struct dentry *interpreter_dentry;
@@ -750,16 +749,12 @@
X sys_close(elf_exec_fileno);
X current->personality = PER_IRIX32;
X
+ set_binfmt(&irix_format);
X if (current->exec_domain && current->exec_domain->module)
X __MOD_DEC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_DEC_USE_COUNT(current->binfmt->module);
X current->exec_domain = lookup_exec_domain(current->personality);
- current->binfmt = &irix_format;
X if (current->exec_domain && current->exec_domain->module)
X __MOD_INC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_INC_USE_COUNT(current->binfmt->module);
X
X compute_creds(bprm);
X current->flags &= ~PF_FORKNOEXEC;
@@ -806,7 +801,7 @@
X #endif
X
X start_thread(regs, elf_entry, bprm->p);


- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)

X send_sig(SIGTRAP, current, 0);
X return 0;
X
@@ -822,20 +817,10 @@


X return retval;
X }
X

-static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
-{


- int retval;
-
- MOD_INC_USE_COUNT;

- retval = do_load_irix_binary(bprm, regs);


- MOD_DEC_USE_COUNT;
- return retval;
-}
-

X /* This is really simpleminded and specialized - we are loading an
X * a.out library that is given an ELF header.
X */
-static inline int do_load_irix_library(struct file *file)
+static int load_irix_library(struct file *file)
X {
X struct elfhdr elf_ex;
X struct elf_phdr *elf_phdata = NULL;
@@ -931,21 +916,6 @@


X return 0;
X }
X

-static int load_irix_library(int fd)
-{
- int retval = -EACCES;
- struct file *file;
-
- MOD_INC_USE_COUNT;
- file = fget(fd);
- if (file) {
- retval = do_load_irix_library(file);
- fput(file);
- }


- MOD_DEC_USE_COUNT;
- return retval;
-}
-

X /* Called through irix_syssgi() to map an elf image given an FD,
X * a phdr ptr USER_PHDRP in userspace, and a count CNT telling how many
X * phdrs there are in the USER_PHDRP array. We return the vaddr the
@@ -1128,14 +1098,10 @@
X * and then they are actually written out. If we run out of core limit
X * we just truncate.
X */
-static int irix_core_dump(long signr, struct pt_regs * regs)
+static int irix_core_dump(long signr, struct pt_regs * regs, struct file * file)
X {
X int has_dumped = 0;
- struct file *file;
- struct dentry *dentry;
- struct inode *inode;
X mm_segment_t fs;
- char corefile[6+sizeof(current->comm)];
X int segs;
X int i;
X size_t size;
@@ -1148,14 +1114,6 @@
X struct elf_prstatus prstatus; /* NT_PRSTATUS */
X elf_fpregset_t fpu; /* NT_PRFPREG */
X struct elf_prpsinfo psinfo; /* NT_PRPSINFO */
-
- if (!current->dumpable || limit < PAGE_SIZE)
- return 0;
- current->dumpable = 0;
-
-#ifndef CONFIG_BINFMT_IRIX
- MOD_INC_USE_COUNT;
-#endif
X
X /* Count what's needed to dump, up to the limit of coredump size. */
X segs = 0;
@@ -1201,27 +1159,6 @@
X fs = get_fs();
X set_fs(KERNEL_DS);
X
- memcpy(corefile,"core.", 5);
-#if 0
- memcpy(corefile+5,current->comm,sizeof(current->comm));
-#else
- corefile[4] = '\0';
-#endif
- file = filp_open(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600);
- if (IS_ERR(file))
- goto end_coredump;
- dentry = file->f_dentry;
- inode = dentry->d_inode;
- if (inode->i_nlink > 1)
- goto close_coredump; /* multiple links - don't dump */
-
- if (!S_ISREG(inode->i_mode))
- goto close_coredump;
- if (!inode->i_op || !inode->i_op->default_file_ops)
- goto close_coredump;
- if (!file->f_op->write)
- goto close_coredump;
-
X has_dumped = 1;
X current->flags |= PF_DUMPCORE;
X
@@ -1386,13 +1323,7 @@
X }
X
X close_coredump:
- filp_close(file, NULL);
-
- end_coredump:
X set_fs(fs);
-#ifndef CONFIG_BINFMT_ELF
- MOD_DEC_USE_COUNT;
-#endif
X return has_dumped;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/kernel/irixsig.c linux/arch/mips/kernel/irixsig.c
--- v2.2.19/arch/mips/kernel/irixsig.c Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/kernel/irixsig.c Wed Oct 10 01:40:43 2001
@@ -193,7 +193,7 @@


X if (!signr)
X break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X /* Let the debugger run. */
X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -261,12 +261,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:
- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:

@@ -707,7 +703,7 @@
X if (!p->exit_code)
X continue;
X if (!(options & (W_TRAPPED|W_STOPPED)) &&
- !(p->flags & PF_PTRACED))
+ !(p->ptrace & PT_PTRACED))
X continue;
X if (ru != NULL)
X getrusage(p, RUSAGE_BOTH, ru);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c
--- v2.2.19/arch/mips/kernel/ptrace.c Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -270,12 +270,12 @@
X #endif


X if (request == PTRACE_TRACEME) {
X /* are we already being traced? */
- if (current->flags & PF_PTRACED) {
+ if (current->ptrace & PT_PTRACED) {

X res = -EPERM;
X goto out;
X }


X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;

X res = 0;
X goto out;
X }
@@ -306,9 +306,9 @@
X goto out;
X }


X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED)
+ if (child->ptrace & PT_PTRACED)
X goto out;
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X

X write_lock_irqsave(&tasklist_lock, flags);


X if (child->p_pptr != current) {

@@ -322,7 +322,7 @@
X res = 0;
X goto out;
X }


- if (!(child->flags & PF_PTRACED)) {
+ if (!(child->ptrace & PT_PTRACED)) {

X res = -ESRCH;
X goto out;
X }
@@ -473,9 +473,9 @@
X goto out;
X }


X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;
X wake_up_process(child);

X res = data;
@@ -501,7 +501,7 @@
X res = -EIO;
X goto out;
X }


- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
X child->exit_code = data;
X REMOVE_LINKS(child);
X child->p_pptr = child->p_opptr;

@@ -522,8 +522,8 @@


X
X asmlinkage void syscall_trace(void)
X {
- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;
X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/kernel/scall_o32.S linux/arch/mips/kernel/scall_o32.S
--- v2.2.19/arch/mips/kernel/scall_o32.S Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/kernel/scall_o32.S Wed Oct 10 01:40:43 2001
@@ -15,7 +15,7 @@
X #include <asm/unistd.h>
X
X /* This duplicates the definition from <linux/sched.h> */
-#define PF_TRACESYS 0x00000020 /* tracing system calls */
+#define PT_TRACESYS 0x00000002 /* tracing system calls */
X
X /* This duplicates the definition from <asm/signal.h> */
X #define SIGILL 4 /* Illegal instruction (ANSI). */
@@ -48,8 +48,8 @@
X bgez t0, stackargs
X
X stack_done:
- lw t0, TASK_FLAGS($28) # syscall tracing enabled?
- andi t0, PF_TRACESYS
+ lw t0, TASK_PTRACE($28) # syscall tracing enabled?
+ andi t0, PT_TRACESYS
X bnez t0, trace_a_syscall
X
X jalr t2 # Do The Real Thing (TM)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/mips/kernel/signal.c linux/arch/mips/kernel/signal.c
--- v2.2.19/arch/mips/kernel/signal.c Sun Mar 25 17:31:48 2001
+++ linux/arch/mips/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -424,7 +424,7 @@


X if (!signr)
X break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X /* Let the debugger run. */
X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -493,12 +493,8 @@


X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:

X case SIGBUS:


- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/config.in linux/arch/ppc/config.in
--- v2.2.19/arch/ppc/config.in Sun Mar 25 17:37:30 2001
+++ linux/arch/ppc/config.in Wed Oct 10 01:40:43 2001
@@ -179,12 +179,10 @@
X mainmenu_option next_comment
X comment 'Mac device drivers'
X
-if [ "$CONFIG_INPUT_KEYBDEV" = "y" -o "$CONFIG_INPUT_MOUSEDEV" = "y" ]; then
- bool 'Use input layer for ADB keyboard and mouse' CONFIG_INPUT_ADBHID
-fi
+bool 'Use input layer for ADB keyboard and mouse' CONFIG_INPUT_ADBHID
X if [ "$CONFIG_INPUT_ADBHID" = "y" ]; then
- define_bool CONFIG_INPUT_KEYBDEV $CONFIG_VT
- define_bool CONFIG_INPUT_MOUSEDEV y
+ define_bool CONFIG_INPUT_KEYBDEV $CONFIG_INPUT_ADBHID $CONFIG_VT
+ define_bool CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT_ADBHID
X define_bool CONFIG_MAC_HID y
X bool ' Support for ADB raw keycodes' CONFIG_MAC_ADBKEYCODES
X bool ' Support for mouse button 2+3 emulation' CONFIG_MAC_EMUMOUSEBTN
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S
--- v2.2.19/arch/ppc/kernel/head.S Sun Mar 25 17:31:48 2001
+++ linux/arch/ppc/kernel/head.S Wed Oct 10 01:40:43 2001
@@ -2129,8 +2129,8 @@
X cmpi 1,r0,0x6666 /* Special case for 'sys_rt_sigreturn' */
X beq- 10f
X beq- cr1,16f
- lwz r10,TASK_FLAGS(r2)
- andi. r10,r10,PF_TRACESYS
+ lwz r10,TASK_PTRACE(r2)
+ andi. r10,r10,PT_TRACESYS
X bne- 50f
X cmpli 0,r0,NR_syscalls
X bge- 66f
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/kernel/mk_defs.c linux/arch/ppc/kernel/mk_defs.c
--- v2.2.19/arch/ppc/kernel/mk_defs.c Sun Mar 25 17:31:48 2001
+++ linux/arch/ppc/kernel/mk_defs.c Wed Oct 10 01:40:43 2001
@@ -43,8 +43,9 @@
X DEFINE(PGD, offsetof(struct mm_struct, pgd));
X DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall));
X DEFINE(PT_REGS, offsetof(struct thread_struct, regs));
- DEFINE(PF_TRACESYS, PF_TRACESYS);
+ DEFINE(PT_TRACESYS, PT_TRACESYS);
X DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
+ DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
X DEFINE(NEED_RESCHED, offsetof(struct task_struct, need_resched));
X DEFINE(TSS_FPR0, offsetof(struct thread_struct, fpr[0]));
X DEFINE(TSS_FPSCR, offsetof(struct thread_struct, fpscr));
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/kernel/openpic.c linux/arch/ppc/kernel/openpic.c
--- v2.2.19/arch/ppc/kernel/openpic.c Sun Mar 25 17:37:30 2001
+++ linux/arch/ppc/kernel/openpic.c Wed Oct 10 01:40:43 2001
@@ -242,8 +242,8 @@
X openpic_mapirq(i, 1<<0);
X }
X } else {
- /* Prevent any interrupt from occuring during initialisation.
- * Hum... I beleive this is not necessary, Apple does that in
+ /* Prevent any interrupt from occurring during initialisation.
+ * Hum... I believe this is not necessary, Apple does that in
X * Darwin's PowerExpress code.
X */
X openpic_set_priority(0, 0xf);
@@ -635,4 +635,4 @@
X for (i=0; i<NumProcessors; i++)
X openpic_write(&OpenPIC->Processor[i].Current_Task_Priority, save_cpu_task_pri[i]);
X }
-#endif /* CONFIG_PMAC_PBOOK */
\ No newline at end of file
+#endif /* CONFIG_PMAC_PBOOK */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/kernel/pmac_pci.c linux/arch/ppc/kernel/pmac_pci.c
--- v2.2.19/arch/ppc/kernel/pmac_pci.c Sun Mar 25 17:31:49 2001
+++ linux/arch/ppc/kernel/pmac_pci.c Wed Oct 10 01:40:43 2001
@@ -109,7 +109,7 @@
X bridge_node = NULL;
X node = find_pci_device_OFnode(bus, dev_fn & 0xf8);
X if (node) {
- /* note: we don't stop on the first occurence since we need to go
+ /* note: we don't stop on the first occurrence since we need to go
X * up to the root bridge */
X do {
X if (node->type && !strcmp(node->type, "pci")
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/kernel/ptrace.c linux/arch/ppc/kernel/ptrace.c
--- v2.2.19/arch/ppc/kernel/ptrace.c Sun Mar 25 17:31:49 2001
+++ linux/arch/ppc/kernel/ptrace.c Wed Oct 10 01:40:43 2001
@@ -341,10 +341,10 @@
X lock_kernel();


X if (request == PTRACE_TRACEME) {
X /* are we already being traced? */
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X goto out;
X /* set the ptrace bit in the process flags. */
- current->flags |= PF_PTRACED;
+ current->ptrace |= PT_PTRACED;
X ret = 0;
X goto out;
X }

@@ -370,9 +370,9 @@


X (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
- if (child->flags & PF_PTRACED)
+ if (child->ptrace & PT_PTRACED)
X goto out;
- child->flags |= PF_PTRACED;
+ child->ptrace |= PT_PTRACED;
X

X write_lock_irqsave(&tasklist_lock, flags);


X if (child->p_pptr != current) {

@@ -387,7 +387,7 @@


X goto out;
X }
X ret = -ESRCH;
- if (!(child->flags & PF_PTRACED))
+ if (!(child->ptrace & PT_PTRACED))
X goto out;

X if (child->state != TASK_STOPPED) {
X if (request != PTRACE_KILL)
@@ -472,9 +472,9 @@


X if ((unsigned long) data > _NSIG)
X goto out;
X if (request == PTRACE_SYSCALL)
- child->flags |= PF_TRACESYS;
+ child->ptrace |= PT_TRACESYS;
X else
- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;
X child->exit_code = data;

X /* make sure the single step bit is not set. */
X clear_single_step(child);

@@ -503,7 +503,7 @@


X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;

- child->flags &= ~PF_TRACESYS;
+ child->ptrace &= ~PT_TRACESYS;

X set_single_step(child);


X child->exit_code = data;
X /* give it a chance to run. */

@@ -516,7 +516,7 @@


X ret = -EIO;
X if ((unsigned long) data > _NSIG)
X goto out;
- child->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);

X child->exit_code = data;

X write_lock_irqsave(&tasklist_lock, flags);
X REMOVE_LINKS(child);


@@ -541,8 +541,8 @@
X

X asmlinkage void syscall_trace(void)
X {
- if ((current->flags & (PF_PTRACED|PF_TRACESYS))
- != (PF_PTRACED|PF_TRACESYS))
+ if ((current->ptrace & (PT_PTRACED|PT_TRACESYS))
+ != (PT_PTRACED|PT_TRACESYS))
X return;
X current->exit_code = SIGTRAP;
X current->state = TASK_STOPPED;

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/ppc/kernel/signal.c linux/arch/ppc/kernel/signal.c
--- v2.2.19/arch/ppc/kernel/signal.c Sun Mar 25 17:31:49 2001
+++ linux/arch/ppc/kernel/signal.c Wed Oct 10 01:40:43 2001
@@ -558,7 +558,7 @@


X if (!signr)
X break;
X
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
X /* Let the debugger run. */
X current->exit_code = signr;
X current->state = TASK_STOPPED;

@@ -626,12 +626,8 @@


X
X case SIGQUIT: case SIGILL: case SIGTRAP:
X case SIGABRT: case SIGFPE: case SIGSEGV:
- lock_kernel();
- if (current->binfmt
- && current->binfmt->core_dump
- && current->binfmt->core_dump(signr, regs))
+ if (do_coredump(signr, regs))
X exit_code |= 0x80;
- unlock_kernel();
X /* FALLTHRU */
X
X default:

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/boot/Makefile linux/arch/s390/boot/Makefile
--- v2.2.19/arch/s390/boot/Makefile Sun Mar 25 17:31:54 2001
+++ linux/arch/s390/boot/Makefile Wed Oct 10 01:40:43 2001
@@ -24,15 +24,27 @@
X $(OBJCOPY) -O binary $< $@
X
X image: $(CONFIGURE) $(TOPDIR)/vmlinux \
- iplfba.boot ipleckd.boot ipldump.boot
+ iplfba.boot ipleckd.boot dumptape.boot dumpeckd.boot
X $(OBJCOPY) -O binary $(TOPDIR)/vmlinux image
X $(NM) $(TOPDIR)/vmlinux | grep -v '\(compiled\)\|\( [aU] \)\|\(\.\)\|\(LASH[RL]DI\)' | sort > $(TOPDIR)/System.map
X
+dumptape.lnk: dumptape.o
+ $(LD) -Ttext 0x2000 -o $@ $<
+
+dumpeckd.boot: dumpeckd.lnk
+ $(OBJCOPY) -O binary $< dumpeckd.boot2
+ dd if=dumpeckd.boot2 > dumpeckd.boot
+ dd if=dumpeckd.boot2 >> dumpeckd.boot
+ rm dumpeckd.boot2
+
+dumpeckd.lnk: dumpeckd.o
+ $(LD) -Ttext 0x2000 -o $@ $<
+
X listing: ../../../vmlinux
X $(OBJDUMP) --disassemble --disassemble-all --disassemble-zeroes --reloc $(TOPDIR)/vmlinux > listing
X
X dep:
X
X clean:
- rm -f image listing iplfba.boot ipleckd.boot ipldump.boot
+ rm -f image listing iplfba.boot ipleckd.boot dumptape.boot dumpeckd.boot *.lnk *.o
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/boot/common.S linux/arch/s390/boot/common.S
--- v2.2.19/arch/s390/boot/common.S Thu Jan 1 01:00:00 1970
+++ linux/arch/s390/boot/common.S Wed Oct 10 01:40:43 2001
@@ -0,0 +1,298 @@
+#
+# Common code for the different second stage boot loaders
+# Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
+# Author(s): Martin Schwidefsky (schwi...@de.ibm.com),
+#
+
+# some definitions from kernel land
+__LC_IPLDEV = 0xC6C
+IPL_DEVICE = 0x10404
+INITRD_START = 0x1040C
+INITRD_SIZE = 0x10414
+COMMAND_LINE = 0x10480
+
+# error codes shown as address in disabled wait psw
+
+EENABLE_DEV = 0x00000100 # enable device failed
+EDISABLE_DEV = 0x00000101 # disable device failed
+ESSCH = 0x00000102 # start subchannel failed
+
+ .macro stage2_start
+#
+# Function entry point at 0x2000 is called with C linkage


+# %r2-%r3: load descriptor
+# %r3 : device subchannel id
+# %r4 : load address
+#

+ basr %r1,0
+ b _load_blocklist-.(%r1)
+ .align 8
+
+#
+# Program execution of the second stage boot loader starts at 0x1008
+#
+ .globl _start
+_start: stm %r0,%r15,0x180 # store all registers
+ basr %r13,0
+0: l %r15,3f-0b(%r13) # load end of stack address
+ l %r11,0xb8 # load ipl device subchannel id
+ lr %r2,%r11
+ bas %r14,_enable_device-0b(%r13)
+ lm %r2,%r3,STAGE2_DESC # get block with load descriptors
+ lr %r4,%r11
+ l %r5,4f-0b(%r13)
+ la %r12,0(%r5) # FIXME: provide the correct offset
+ bas %r14,_load_direct-0b(%r13)
+1: lm %r2,%r5,0(%r12) # load 16 bytes = one load descriptor
+ cl %r4,6f-0b(%r13) # check type range
+ bh 2f
+ sll %r4,2
+ l %r1,5f-0b(%r4,%r13) # function pointer according to type
+ lr %r4,%r11 # pass subchannel id
+ bas %r14,0(%r1)
+2: la %r12,16(%r12) # next load descriptor
+ b 1b-0b(%r13)
+3: .long 0x10000-96
+4: .long 0x8000
+5: .long _load_kernel # type 0: kernel image
+ .long _load_parmfile # type 1: parameter file
+ .long _load_ramdisk # type 2: initial ramdisk
+ .long _jump_target # type 3: jump to target
+6: .long 3 # highest index in list
+
+_load_kernel:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,1f-0b(%r13) # create stack frame
+ lr %r12,%r4
+ bas %r14,_load_blocklist-0b(%r13)
+ st %r12,__LC_IPLDEV # old ipl device storage location
+ l %r6,2f-0b(%r13) # load address of IPL_DEVICE
+ st %r12,0(%r6) # new ipl device storage location
+ l %r6,3f-0b(%r13) # load address of INITRD_START
+ xc 0(4,%r6),0(%r6) # clear INITRD_START
+ l %r6,4f-0b(%r13) # load address of INITRD_SIZE
+ xc 0(4,%r6),0(%r6) # clear INITRD_SIZE


+ lm %r6,%r15,120(%r15)
+ br %r14

+1: .long 96
+2: .long IPL_DEVICE
+3: .long INITRD_START
+4: .long INITRD_SIZE
+
+_load_parmfile: # load parameter file to 0x10480


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,1f-0b(%r13) # create stack frame
+ bas %r14,_load_blocklist-0b(%r13)
+ l %r1,12(%r12)
+ l %r2,2f-0b(%r13) # load address of kernel command line
+ mvc 0x0(256,%r2),0(%r1) # move command line to 0x10480
+ mvc 0x100(256,%r2),0x100(%r1)
+ mvc 0x200(256,%r2),0x200(%r1)
+ mvc 0x300(127,%r2),0x300(%r1)
+ xc 0x37f(1,%r2),0x37f(%r2)


+ lm %r6,%r15,120(%r15)
+ br %r14

+1: .long 96
+2: .long COMMAND_LINE
+
+_load_ramdisk: # load initial ramdisk


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,1f-0b(%r13) # create stack frame
+ lr %r12,%r5 # save load address
+ bas %r14,_load_blocklist-0b(%r13)
+ l %r1,2f-0b(%r13) # ramdisk start storage location
+ st %r12,0(%r1) # store start of ramdisk
+ slr %r2,%r12
+ l %r1,3f-0b(%r13) # ramdisk size storage location
+ st %r2,0(%r1) # store size of ramdisk


+ lm %r6,%r15,120(%r15)
+ br %r14

+1: .long 96
+2: .long INITRD_START
+3: .long INITRD_SIZE
+
+_jump_target:
+ basr %r1,0
+0: lr %r2,%r11
+ lr %r14,%r5 # make branch target return address
+ b _disable_device-0b(%r1)
+
+ .endm
+
+#
+# The load descriptor is 16 bytes in length and contains 3 entries:
+# offset 0 : a blocklist descriptor (fba or eckd)
+# offset 8 : a type
+# offset 12: an address
+# The meaning of the address and the validity of the blocklst
+# depends on the type.
+# type = 0 : kernel image, blocklist valid, address = load address
+# type = 1 : parameter line, blocklist valid, address = load address
+# type = 2 : initial ramdisk, blocklist valid, address = load address
+# type = 3 : jump command, blocklist invalid, address = branch address
+#
+ .macro blocklist_traverser
+# parameter
+# %r2+%r3: blocklist head descriptor
+# %r4 : device subchannel id
+# %r5 : load address
+_load_blocklist:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,4f-0b(%r13) # create stack frame
+1: lr %r12,%r4 # save device subchannel id
+ lr %r11,%r5 # save load address
+ lr %r8,%r2 # save descriptor
+ lr %r9,%r3
+ bas %r14,_extract_length-0b(%r13) # get length from descriptor
+ lr %r10,%r2 # save returned length
+ lr %r2,%r8 # reload descriptor to %r2/%r3
+ lr %r3,%r9
+ lr %r4,%r12 # reload device id to %r4
+ l %r5,6f-0b(%r13) # get memory area for indirect block
+ bas %r14,_load_direct-0b(%r13) # load indirect block
+ lr %r5,%r11 # restore load address
+ lr %r9,%r10 # (length / 8 - 1) = # direct descr.
+ srl %r9,3
+ bctr %r9,0
+ l %r8,6f-0b(%r13)
+2: clc 0(8,%r8),5f-0b(%r13) # test block descriptor
+ be 3f-0b(%r13) # descriptor == 0 -> done
+ lm %r2,%r3,0(%r8) # pass block descriptor
+ lr %r4,%r12 # pass device subchannel id
+ bas %r14,_load_direct-0b(%r13) # load indirect block
+ lr %r5,%r2 # move updated load address
+ la %r8,8(%r8) # next descriptor
+ bct %r9,2b-0b(%r13)
+ lm %r2,%r3,0(%r8) # load continuation descriptor
+ lr %r4,%r12 # move device id for next round
+ clc 0(8,%r8),5f-0b(%r13) # test continuation descriptor
+ bne 1b-0b(%r13) # != 0 -> load next indirect block
+3: lr %r2,%r5 # return updated load address


+ lm %r6,%r15,120(%r15)
+ br %r14

+4: .long 96
+5: .long 0,0
+6: .long 0x8200 # memory address for indirect blocks
+
+ .endm
+
+ .macro device_fn
+#
+# Enable I/O on the ipl device.
+# %r2 : device subchannel id
+#
+_enable_device:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,1f-0b(%r13)
+ lr %r1,%r2
+ l %r2,4f-0b(%r13) # set panik code early
+ stsch 2f-0b(%r13)
+ oi 2f-0b+5(%r13),0x84 # enable ssch and multipath mode
+ msch 2f-0b(%r13)
+ bnz _panik-0b(%r13) # subchannel busy or in error ?
+ lctl %c6,%c6,3f-0b(%r13) # enable all interrupt classes


+ lm %r6,%r15,120(%r15)
+ br %r14

+1: .long 96
+ .align 8
+2: .fill 64,1,0
+3: .long 0xff000000 # CR6 initial value
+4: .long EENABLE_DEV
+
+#
+# Disable I/O on the ipl device.
+# %r2 : device subchannel id
+#
+_disable_device:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,1f-0b(%r13)
+ lr %r1,%r2
+ l %r2,3f-0b(%r13) # set panik code early
+ lctl %c6,%c6,2f-0b(%r13) # disable all interrupt classes
+ stsch 2f-0b(%r13)
+ ni 2f-0b+5(%r13),0x7B # disable ssch and multipath mode
+ msch 2f-0b(%r13)
+ bnz _panik-0b(%r13) # subchannel busy or in error ?


+ lm %r6,%r15,120(%r15)
+ br %r14

+1: .long 96
+ .align 8
+2: .long 0x00000000 # CR6 (all interrupts classes disabled)
+3: .long EDISABLE_DEV
+ .endm
+
+ .macro io_subroutines
+#
+# Start I/O
+# %r2 : device subchannel id
+# %r3 : address of orb
+# %r4 : address of irb
+# %r5 : retry count
+#
+_ssch:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register

+0: s %r15,6f-0b(%r13) # create stack frame
+ lr %r12,%r2 # save subchannel id
+ lr %r11,%r3 # save orb
+ lr %r10,%r4 # save irb
+ lr %r9,%r5 # save retry count
+1: lr %r1,%r12
+ ssch 0(%r11) # go
+ bnz 4f-0b(%r13) # houston, we have a problem
+2: lr %r2,%r12 # call _wait4de with subchannel id
+ lr %r3,%r10 # and irb address as parameters
+ bas %r14,_wait4de-0b(%r13) # wait until DE or error
+ tm 9(%r10),0xff # test channel status
+ bnz 4f-0b(%r13)
+ tm 8(%r10),0xf3 # test device status
+ bz 5f-0b(%r13)
+ bct %r9,1b-0b(%r13) # something went wrong, retry.
+4: l %r2,7f-0b(%r13)
+ bas %r4,_panik-0b(%r13) # won't return
+5: lm %r6,%r15,120(%r15)
+ br %r14
+6: .long 96
+7: .long ESSCH
+
+#
+# Wait for interrupt subroutine
+# %r2 : device subchannel id
+# %r3 : address of irb
+#
+_wait4de:
+ lr %r1,%r2
+ basr %r4,0
+0: mvc 0x78(8),5f-0b(%r4) # set i/o new psw
+1: lpsw 4f-0b(%r4)
+2: c %r1,0xb8 # compare subchannel id
+ bne 1b-0b(%r4) # unequal -> continue waiting
+ tsch 0(%r3)
+ tm 9(%r3),0xff # test channel status
+ bnz 3f-0b(%r4)
+ tm 8(%r3),0xf3 # got something unusual ?
+ bnz 3f-0b(%r4)
+ tm 8(%r3),0x04 # got device end ?
+ bz 1b-0b(%r4) # still busy -> continue waiting
+3: br %r14
+ .align 8
+4: .long 0x020a0000,0x80000000+1b
+5: .long 0x00080000,0x80000000+2b # io new psw
+
+#
+# Panik routine. Loads a disabled wait psw
+# %r2 : panik code
+#
+_panik:
+ basr %r1,0
+0: st %r2,1f-0b+4(%r1) # store code in address part of psw
+ lpsw 1f-0b(%r1)
+ .align 8
+1: .long 0x000a0000,0x00000000
+ .endm
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/arch/s390/boot/dumpcommon.S linux/arch/s390/boot/dumpcommon.S
--- v2.2.19/arch/s390/boot/dumpcommon.S Thu Jan 1 01:00:00 1970
+++ linux/arch/s390/boot/dumpcommon.S Wed Oct 10 01:40:43 2001
@@ -0,0 +1,220 @@
+/*
+ * dumpcommon.S
+ *
+ * Common routines for dump records


+ * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Michael Holzheu <hol...@de.ibm.com>
+ *

+ * Uses extern functions:

+ * - _dump_mem (device dependent function to write dump)


+ *
+ * Functions:

+ * - _take_dump
+ */
+
+
+.include "common.S"


+
+/* General defines */

+#define PAGE_SIZE 0x1000 /* 4096 */
+#define HEADER_SIZE 0x1000 /* 4096 */
+#define END_MARKER_SIZE 0x10
+#define DUMP_END_MARKER 0x44554d50,0x5f454e44 /* DUMP_END */
+#define IPL_SC 0xb8 /* Address of ipl subchannel */
+#define S390_DUMP_MAGIC 0xa8190173,0x618f23fd /* magic number */
+#define ARCH_S390 0x1 /* arch flag for s390 */
+
+/* Error codes */
+#define OK 0x00000000 /* Dump completed successfully */
+#define EMEM 0x00000001 /* Device too small for dump */
+#define EDEV_INVAL 0x00000002 /* Device not supported */
+
+################################################################################
+# Take the dump
+################################################################################
+
+.macro dump_common_fn:
+
+_take_dump:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0

+.Lbase: s %r15,.Lc96-.Lbase(%r13) # create stack frame
+ bas %r14,_store_status-.Lbase(%r13) # store status
+ bas %r14,_count_mem-.Lbase(%r13) # count memory
+ l %r14,.Ldump_mem-.Lbase(%r13)
+ basr %r14,%r14 # dump memory
+ la %r2,OK
+ bas %r14,_panik-.Lbase(%r13) # everything ok: stop now
+
+################################################################################
+# Find out memory size:
+# When accessing a page which is not there, we get a program check
+################################################################################
+
+_count_mem:


+ stm %r6,%r15,24(%r15)
+ basr %r13,0 # base register
+0: s %r15,.Lc96-0b(%r13) # create stack frame

+ slr %r9,%r9 # base register for zero page
+ mvc 104(8,%r9),.Lcount_mem_psw-0b(%r13) # setup program check new psw
+ slr %r10,%r10
+ la %r11,1
+ sll %r11,20 # 1 MB
+.Lloop0:
+ l %r12,0(%r10) # test page
+ ar %r10,%r11 # add 1M
+ bnm .Lloop0-0b(%r13) # r10 < 0x80000000 -> loop
+.Lchkmem0:
+ n %r10,.L4malign0-0b(%r13) # align to multiples of 4M
+ st %r10,.Ldh_mem_size+4-0b(%r13) # store memory size
+ st %r10,.Ldh_mem_end+4-0b(%r13) # store memory end
+ srl %r10,12 # calculate page count (/ 4096)
+ st %r10,.Ldh_num_pages-0b(%r13) # store page count
+ mvc 88(32,%r9),.Lnew_psws-0b(%r13) # restore disabled wait new psws


+ lm %r6,%r15,120(%r15)
+ br %r14

+.Lcount_mem_psw: .long 0x00080000,0x80000000 + .Lchkmem0


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 06'
echo 'File patch-2.2.20 is continued in part 07'
echo "07" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:24 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part25

#!/bin/sh -x
# this is part 25 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 25; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ unsigned int timeout = jiffies + 5 * HZ;
X int phy_addr;
X u8 revision;
X
X sis_priv->mii = NULL;
X
X /* search for total of 32 possible mii phy addresses */
- for (phy_addr = 0; phy_addr < 32; phy_addr++) {
+ for (phy_addr = 0; phy_addr < 32; phy_addr++) {
+ struct mii_phy * mii_phy = NULL;
X u16 mii_status;
- u16 phy_id0, phy_id1;
X int i;
X
- mii_status = mdio_read(net_dev, phy_addr, MII_STATUS);
+ for(i=0; i<2; i++)
+ mii_status = mdio_read(net_dev, phy_addr, MII_STATUS);
+
X if (mii_status == 0xffff || mii_status == 0x0000)
X /* the mii is not accessable, try next one */
X continue;
-
- phy_id0 = mdio_read(net_dev, phy_addr, MII_PHY_ID0);
- phy_id1 = mdio_read(net_dev, phy_addr, MII_PHY_ID1);
-
- /* search our mii table for the current mii */
- for (i = 0; mii_chip_table[i].phy_id1; i++)
- if (phy_id0 == mii_chip_table[i].phy_id0 &&
- phy_id1 == mii_chip_table[i].phy_id1) {
- struct mii_phy * mii_phy;
-
- printk(KERN_INFO
- "%s: %s transceiver found at address %d.\n",
- net_dev->name, mii_chip_table[i].name,
- phy_addr);;
- if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) != NULL) {
- mii_phy->chip_info = mii_chip_table+i;
- mii_phy->phy_addr = phy_addr;
- mii_phy->status = mdio_read(net_dev, phy_addr,
- MII_STATUS);
- mii_phy->next = sis_priv->mii;
- sis_priv->mii = mii_phy;
- }
- /* the current mii is on our mii_info_table,
- try next address */
+
+ if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) == NULL) {
+ printk(KERN_INFO "Cannot allocate mem for struct mii_phy\n");


+ return 0;
+ }
+

+ mii_phy->phy_id0 = mdio_read(net_dev, phy_addr, MII_PHY_ID0);
+ mii_phy->phy_id1 = mdio_read(net_dev, phy_addr, MII_PHY_ID1);
+ mii_phy->phy_addr = phy_addr;
+ mii_phy->status = mii_status;
+ mii_phy->next = sis_priv->mii;
+ sis_priv->mii = mii_phy;
+ sis_priv->first_mii = mii_phy;
+
+ for (i=0; mii_chip_table[i].phy_id1; i++)
+ if ( ( mii_phy->phy_id0 == mii_chip_table[i].phy_id0 ) &&
+ ( (mii_phy->phy_id1 & 0xFFF0) == mii_chip_table[i].phy_id1 )){
+
+ mii_phy->phy_types = mii_chip_table[i].phy_types;
+ if(mii_chip_table[i].phy_types == MIX)
+ mii_phy->phy_types =
+ (mii_status & (MII_STAT_CAN_TX_FDX | MII_STAT_CAN_TX))?LAN:HOME;
+ printk(KERN_INFO "%s: %s transceiver found at address %d.\n",
+ net_dev->name, mii_chip_table[i].name, phy_addr);
X break;
X }
- }
X
+ if( !mii_chip_table[i].phy_id1 )
+ printk(KERN_INFO "%s: Unknown PHY transceiver found at address %d.\n",
+ net_dev->name, phy_addr);
+ }
+
X if (sis_priv->mii == NULL) {
X printk(KERN_INFO "%s: No MII transceivers found!\n",
X net_dev->name);


X return 0;
X }
X

- /* arbitrary choose that last PHY as current PHY */
- sis_priv->cur_phy = sis_priv->mii->phy_addr;
- printk(KERN_INFO "%s: Using %s as default\n", net_dev->name,
- sis_priv->mii->chip_info->name);
+ /* Slect Default PHY to put in sis_priv->mii & sis_priv->cur_phy */
+ sis_priv->mii = NULL;
+ sis900_default_phy( net_dev );
+
+ /* Reset PHY if default PHY is internal sis900 */
+ if( (sis_priv->mii->phy_id0 == 0x001D) &&
+ ( (sis_priv->mii->phy_id1&0xFFF0) == 0x8000) )
+ status = sis900_reset_phy( net_dev, sis_priv->cur_phy );
+
+ /* workaround for ICS1893 PHY */
+ if ((sis_priv->mii->phy_id0 == 0x0015) &&
+ ((sis_priv->mii->phy_id1&0xFFF0) == 0xF440))
+ mdio_write(net_dev, sis_priv->cur_phy, 0x0018, 0xD200);
+
+ if( status & MII_STAT_LINK ){
+ while (poll_bit) {


+ current->state = TASK_INTERRUPTIBLE;

+ schedule_timeout(0);
+ poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS) & poll_bit);
+ if (jiffies >= timeout) {
+ printk(KERN_WARNING "%s: reset phy and link down\n", net_dev->name);
+ return -ETIME;
+ }
+ }
+ }
X
X pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
- if (revision == SIS630E_REV) {
+ if (revision == SIS630E_900_REV) {
X /* SiS 630E has some bugs on default value of PHY registers */
X mdio_write(net_dev, sis_priv->cur_phy, MII_ANADV, 0x05e1);
X mdio_write(net_dev, sis_priv->cur_phy, MII_CONFIG1, 0x22);
X mdio_write(net_dev, sis_priv->cur_phy, MII_CONFIG2, 0xff00);
X mdio_write(net_dev, sis_priv->cur_phy, MII_MASK, 0xffc0);
- mdio_write(net_dev, sis_priv->cur_phy, MII_CONTROL, 0x1000);
+ //mdio_write(net_dev, sis_priv->cur_phy, MII_CONTROL, 0x1000);
X }
X
X if (sis_priv->mii->status & MII_STAT_LINK)
X sis_priv->LinkOn = TRUE;
X else
X sis_priv->LinkOn = FALSE;
-

+
X return 1;
X }
X

+
+/* sis900_default_phy : Select one default PHY for sis900 mac */


+static u16 sis900_default_phy(struct device * net_dev)

+{
+ struct sis900_private * sis_priv = (struct sis900_private *)net_dev->priv;
+ struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL;
+ u16 status;
+
+ for( phy=sis_priv->first_mii; phy; phy=phy->next ){
+ status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
+ status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
+
+ /* Link ON & Not select deafalut PHY */
+ if ( (status & MII_STAT_LINK) && !(default_phy) )
+ default_phy = phy;
+ else{
+ status = mdio_read(net_dev, phy->phy_addr, MII_CONTROL);
+ mdio_write(net_dev, phy->phy_addr, MII_CONTROL,
+ status | MII_CNTL_AUTO | MII_CNTL_ISOLATE);
+ if( phy->phy_types == HOME )
+ phy_home = phy;
+ }
+ }
+
+ if( (!default_phy) && phy_home )
+ default_phy = phy_home;
+ else if(!default_phy)
+ default_phy = sis_priv->first_mii;
+
+ if( sis_priv->mii != default_phy ){
+ sis_priv->mii = default_phy;
+ sis_priv->cur_phy = default_phy->phy_addr;
+ printk(KERN_INFO "%s: Using transceiver found at address %d as default\n", net_dev->name,sis_priv->cur_phy);
+ }
+
+ status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL);
+ status &= (~MII_CNTL_ISOLATE);
+
+ mdio_write(net_dev, sis_priv->cur_phy, MII_CONTROL, status);
+ status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS);
+ status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS);
+
+ return status;
+}
+
+
+/* sis900_set_capability : set the media capability of network adapter */


+static void sis900_set_capability( struct device *net_dev , struct mii_phy *phy )

+{
+ u16 cap;
+ u16 status;
+
+ status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
+ status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
+
+ cap = MII_NWAY_CSMA_CD |
+ ((phy->status & MII_STAT_CAN_TX_FDX)? MII_NWAY_TX_FDX:0) |
+ ((phy->status & MII_STAT_CAN_TX) ? MII_NWAY_TX:0) |
+ ((phy->status & MII_STAT_CAN_T_FDX) ? MII_NWAY_T_FDX:0)|
+ ((phy->status & MII_STAT_CAN_T) ? MII_NWAY_T:0);
+
+ mdio_write( net_dev, phy->phy_addr, MII_ANADV, cap );
+}
+
+
X /* Delay between EEPROM clock transitions. */
X #define eeprom_delay() inl(ee_addr)
X
@@ -580,6 +694,19 @@
X return;
X }
X

+static u16 sis900_reset_phy(struct device *net_dev, int phy_addr)

+{
+ int i = 0;
+ u16 status;
+
+ while (i++ < 2)
+ status = mdio_read(net_dev, phy_addr, MII_STATUS);
+
+ mdio_write( net_dev, phy_addr, MII_CONTROL, MII_CNTL_RESET );
+
+ return status;


+}
+
X static int

X sis900_open(struct device *net_dev)
X {


@@ -592,8 +719,7 @@
X

X /* Equalizer workaroung Rule */
X pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);


- if (revision == SIS630E_REV || revision == SIS630EA1_REV)

- sis630e_set_eq(net_dev);
+ sis630_set_eq(net_dev, revision);
X
X if (request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, net_dev->name, net_dev)) {
X return -EAGAIN;
@@ -614,7 +740,7 @@
X

X /* Enable all known interrupts by setting the interrupt mask. */

X outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
- outl(RxENA, ioaddr + cr);
+ outl(RxENA | inl(ioaddr + cr), ioaddr + cr);
X outl(IE, ioaddr + ier);
X
X sis900_check_mode(net_dev, sis_priv->mii);
@@ -641,7 +767,7 @@
X rfcrSave = inl(rfcr + ioaddr);
X
X /* disable packet filtering before setting filter */
- outl(rfcrSave & ~RFEN, rfcr);


+ outl(rfcrSave & ~RFEN, rfcr + ioaddr);

X
X /* load MAC addr to filter data register */
X for (i = 0 ; i < 3 ; i++) {
@@ -734,51 +860,77 @@
X net_dev->name, inl(ioaddr + rxdp));
X }
X
-/* 630E equalizer workaroung rule(Cyrus Huang 08/15)
- PHY register 14h(Test)
- Bit 14: 0 -- Automatically dectect (default)
- 1 -- Manually set Equalizer filter
- Bit 13: 0 -- (Default)
- 1 -- Speed up convergence of equalizer setting
- Bit 9 : 0 -- (Default)
- 1 -- Disable Baseline Wander
- Bit 3~7 -- Equalizer filter setting
-
- Link ON: Set Bit 9, 13 to 1, Bit 14 to 0
- Then calculate equalizer value
- Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0
- Link Off:Set Bit 13 to 1, Bit 14 to 0
-
- Calculate Equalizer value:
- When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value.
- When the equalizer is stable, this value is not a fixed value. It will be within
- a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9)
- 0 <= max <= 4 --> set equalizer to max
- 5 <= max <= 14 --> set equalizer to max+1 or
- set equalizer to max+2 if max == min
- max >= 15 --> set equalizer to max+5 or
- set equalizer to max+6 if max == min
-*/


-static void sis630e_set_eq(struct device *net_dev)

+/**
+ * sis630_set_eq: - set phy equalizer value for 630 LAN
+ * @net_dev: the net device to set equalizer value
+ * @revision: 630 LAN revision number
+ *
+ * 630E equalizer workaround rule(Cyrus Huang 08/15)
+ * PHY register 14h(Test)
+ * Bit 14: 0 -- Automatically dectect (default)
+ * 1 -- Manually set Equalizer filter
+ * Bit 13: 0 -- (Default)
+ * 1 -- Speed up convergence of equalizer setting
+ * Bit 9 : 0 -- (Default)
+ * 1 -- Disable Baseline Wander
+ * Bit 3~7 -- Equalizer filter setting
+ * Link ON: Set Bit 9, 13 to 1, Bit 14 to 0
+ * Then calculate equalizer value
+ * Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0
+ * Link Off:Set Bit 13 to 1, Bit 14 to 0
+ * Calculate Equalizer value:
+ * When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value.
+ * When the equalizer is stable, this value is not a fixed value. It will be within
+ * a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9)
+ * 0 <= max <= 4 --> set equalizer to max
+ * 5 <= max <= 14 --> set equalizer to max+1 or set equalizer to max+2 if max == min
+ * max >= 15 --> set equalizer to max+5 or set equalizer to max+6 if max == min
+ */
+


+static void sis630_set_eq(struct device *net_dev, u8 revision)

X {
X struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv;
X u16 reg14h, eq_value, max_value=0, min_value=0;
+ u8 host_bridge_rev;
X int i, maxcount=10;
+ struct pci_dev *dev=NULL;
+
+ if ( !(revision == SIS630E_900_REV || revision == SIS630EA1_900_REV ||
+ revision == SIS630A_900_REV || revision == SIS630ET_900_REV) )
+ return;
+
+ if ((dev = pci_find_device(SIS630_VENDOR_ID, SIS630_DEVICE_ID, dev)))
+ pci_read_config_byte(dev, PCI_CLASS_REVISION, &host_bridge_rev);
X
- if (sis_priv->LinkOn == TRUE) {
+ if (sis_priv->LinkOn) {
X reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV);
X mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (0x2200 | reg14h) & 0xBFFF);
X for (i=0; i < maxcount; i++) {
X eq_value=(0x00F8 & mdio_read(net_dev, sis_priv->cur_phy, MII_RESV)) >> 3;
+ if (i == 0)
+ max_value=min_value=eq_value;
X max_value=(eq_value > max_value) ? eq_value : max_value;
X min_value=(eq_value < min_value) ? eq_value : min_value;
- }
- if (max_value < 5)
- eq_value=max_value;
- else if (max_value >= 5 && max_value < 15)
- eq_value=(max_value == min_value) ? max_value+2 : max_value+1;
- else if (max_value >= 15)
- eq_value=(max_value == min_value) ? max_value+6 : max_value+5;
+ }
+ /* 630E rule to determine the equalizer value */
+ if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV ||
+ revision == SIS630ET_900_REV) {
+ if (max_value < 5)
+ eq_value=max_value;
+ else if (max_value >= 5 && max_value < 15)
+ eq_value=(max_value == min_value) ? max_value+2 : max_value+1;
+ else if (max_value >= 15)
+ eq_value=(max_value == min_value) ? max_value+6 : max_value+5;
+ }
+ /* 630B0&B1 rule to determine the equalizer value */
+ if (revision == SIS630A_900_REV &&
+ (host_bridge_rev == SIS630B0 || host_bridge_rev == SIS630B1)) {
+ if (max_value == 0)
+ eq_value=3;
+ else
+ eq_value=(max_value+min_value+1)/2;
+ }
+ /* write equalizer value and setting */
X reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV);
X reg14h=(reg14h & 0xFF07) | ((eq_value << 3) & 0x00F8);
X reg14h=(reg14h | 0x6000) & 0xFDFF;
@@ -786,14 +938,19 @@
X }
X else {
X reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV);
- mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2000) & 0xBFFF);
+ if (revision == SIS630A_900_REV &&
+ (host_bridge_rev == SIS630B0 || host_bridge_rev == SIS630B1))
+ mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2200) & 0xBFFF);
+ else
+ mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2000) & 0xBFFF);
X }
X return;
X }
X
+
X /* on each timer ticks we check two things, Link Status (ON/OFF) and
- Link Mode (10/100/Full/Half)
- */
+ Link Mode (10/100/Full/Half)
+*/
X static void sis900_timer(unsigned long data)
X {
X struct device *net_dev = (struct device *)data;
@@ -801,77 +958,91 @@
X struct mii_phy *mii_phy = sis_priv->mii;
X static int next_tick = 5*HZ;
X u16 status;
- u8 revision;
-
- status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS);
- status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS);
+ u8 revision;
X
- /* current mii phy is failed to link, try another one */
- while (!(status & MII_STAT_LINK)) {
- if (mii_phy->next == NULL) {
- if (sis_priv->LinkOn) {
- /* link stat change from ON to OFF */
- next_tick = HZ;
- sis_priv->LinkOn = FALSE;
-
- /* Equalizer workaroung Rule */
- pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);


- if (revision == SIS630E_REV || revision == SIS630EA1_REV)

- sis630e_set_eq(net_dev);
+ if(!sis_priv->autong_complete){
+ int speed, duplex = 0;
X
- printk(KERN_INFO "%s: Media Link Off\n",
- net_dev->name);
- }
- sis_priv->timer.expires = jiffies + next_tick;
- add_timer(&sis_priv->timer);
- return;
+ sis900_read_mode(net_dev, &speed, &duplex);
+ if(duplex){
+ sis900_set_mode(net_dev->base_addr, speed, duplex);
+ pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
+ sis630_set_eq(net_dev, revision);
X }
- mii_phy = mii_phy->next;
- status = mdio_read(net_dev, mii_phy->phy_addr, MII_STATUS);
+
+ sis_priv->timer.expires = jiffies + HZ;
+ add_timer(&sis_priv->timer);
+ return;
X }
X
- if (!sis_priv->LinkOn) {
- /* link stat change forn OFF to ON, read and report link mode */
- sis_priv->LinkOn = TRUE;
- next_tick = 5*HZ;
-
- /* Equalizer workaroung Rule */
- pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);


- if (revision == SIS630E_REV || revision == SIS630EA1_REV)

- sis630e_set_eq(net_dev);
-
- /* change what cur_phy means */
- if (mii_phy->phy_addr != sis_priv->cur_phy) {
- printk(KERN_INFO "%s: Changing transceiver to %s\n",
- net_dev->name, mii_phy->chip_info->name);
- /* disable previous PHY */
- status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL);
- mdio_write(net_dev, sis_priv->cur_phy,
- MII_CONTROL, status | MII_CNTL_ISOLATE);
- /* enable next PHY */
- status = mdio_read(net_dev, mii_phy->phy_addr, MII_CONTROL);
- mdio_write(net_dev, mii_phy->phy_addr,
- MII_CONTROL, status & ~MII_CNTL_ISOLATE);
- sis_priv->cur_phy = mii_phy->phy_addr;
- }
- sis900_check_mode(net_dev, mii_phy);
+ status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS);
+ status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS);
X
+ /* Link OFF -> ON */
+ if ( !sis_priv->LinkOn ) {
+LookForLink:
+ /* Search for new PHY */
+ status = sis900_default_phy( net_dev );
+ mii_phy = sis_priv->mii;
+
+ if( status & MII_STAT_LINK ){
+ sis900_check_mode(net_dev, mii_phy);
+ sis_priv->LinkOn = TRUE;
+ }
+ }
+ /* Link ON -> OFF */
+ else{
+ if( !(status & MII_STAT_LINK) ){
+ sis_priv->LinkOn = FALSE;
+ printk(KERN_INFO "%s: Media Link Off\n", net_dev->name);
+
+ /* Change mode issue */
+ if( (mii_phy->phy_id0 == 0x001D) &&
+ ( (mii_phy->phy_id1 & 0xFFF0) == 0x8000 ))
+ sis900_reset_phy( net_dev, sis_priv->cur_phy );
+
+ pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
+ sis630_set_eq(net_dev, revision);
+
+ goto LookForLink;
+ }
X }
X
X sis_priv->timer.expires = jiffies + next_tick;
X add_timer(&sis_priv->timer);
X }
+
X static void sis900_check_mode (struct device *net_dev, struct mii_phy *mii_phy)
X {
X struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv;
X long ioaddr = net_dev->base_addr;
X int speed, duplex;
- u32 tx_flags = 0, rx_flags = 0;
X
- mii_phy->chip_info->read_mode(net_dev, sis_priv->cur_phy, &speed, &duplex);
+ if( mii_phy->phy_types == LAN ){
+ outl( ~EXD & inl( ioaddr + cfg ), ioaddr + cfg);
+ sis900_set_capability(net_dev , mii_phy);
+ sis900_auto_negotiate(net_dev, sis_priv->cur_phy);
+ }else{
+ outl(EXD | inl( ioaddr + cfg ), ioaddr + cfg);
+ speed = HW_SPEED_HOME;
+ duplex = FDX_CAPABLE_HALF_SELECTED;
+ sis900_set_mode(net_dev->base_addr, speed, duplex);
+ sis_priv->autong_complete = 1;
+ }
+}
X
- tx_flags = TxATP | (TX_DMA_BURST << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift);
- rx_flags = RX_DMA_BURST << RxMXDMA_shift;


+static void sis900_set_mode (long ioaddr, int speed, int duplex)

+{
+ u32 tx_flags = 0, rx_flags = 0;
+
+ if( inl(ioaddr + cfg) & EDB_MASTER_EN ){
+ tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift);
+ rx_flags = DMA_BURST_64 << RxMXDMA_shift;
+ }
+ else{
+ tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift);
+ rx_flags = DMA_BURST_512 << RxMXDMA_shift;
+ }
X
X if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS ) {
X rx_flags |= (RxDRNT_10 << RxDRNT_shift);
@@ -890,141 +1061,68 @@
X outl (tx_flags, ioaddr + txcfg);
X outl (rx_flags, ioaddr + rxcfg);


X }
-static void sis900_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex)

+
+


+static void sis900_auto_negotiate(struct device *net_dev, int phy_addr)

X {
+ struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv;


X int i = 0;

X u32 status;
-
- /* STSOUT register is Latched on Transition, read operation updates it */
+
X while (i++ < 2)
- status = mdio_read(net_dev, phy_addr, MII_STSOUT);
-
- if (status & MII_STSOUT_SPD)
- *speed = HW_SPEED_100_MBPS;
- else
- *speed = HW_SPEED_10_MBPS;
-
- if (status & MII_STSOUT_DPLX)
- *duplex = FDX_CAPABLE_FULL_SELECTED;
- else
- *duplex = FDX_CAPABLE_HALF_SELECTED;
+ status = mdio_read(net_dev, phy_addr, MII_STATUS);
X
- if (status & MII_STSOUT_LINK_FAIL)
+ if (!(status & MII_STAT_LINK)){
X printk(KERN_INFO "%s: Media Link Off\n", net_dev->name);
- else
- printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
- net_dev->name,
- *speed == HW_SPEED_100_MBPS ?
- "100mbps" : "10mbps",
- *duplex == FDX_CAPABLE_FULL_SELECTED ?
- "full" : "half");
-}


-static void amd79c901_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex)

-{
- int i;
- u16 status;
+ sis_priv->autong_complete = 1;
+ sis_priv->LinkOn = FALSE;
+ return;
+ }
X
- for (i = 0; i < 2; i++)
- status = mdio_read(net_dev, phy_addr, MII_STATUS);
+ /* (Re)start AutoNegotiate */
+ mdio_write(net_dev, phy_addr, MII_CONTROL,
+ MII_CNTL_AUTO | MII_CNTL_RST_AUTO);
+ sis_priv->autong_complete = 0;
+}
X
- if (status & MII_STAT_CAN_AUTO) {
- /* 10BASE-T PHY */
- for (i = 0; i < 2; i++)
- status = mdio_read(net_dev, phy_addr, MII_STATUS_SUMMARY);
- if (status & MII_STSSUM_SPD)
- *speed = HW_SPEED_100_MBPS;
- else
- *speed = HW_SPEED_10_MBPS;
- if (status & MII_STSSUM_DPLX)
- *duplex = FDX_CAPABLE_FULL_SELECTED;
- else
- *duplex = FDX_CAPABLE_HALF_SELECTED;
X
- if (status & MII_STSSUM_LINK)
- printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
- net_dev->name,
- *speed == HW_SPEED_100_MBPS ?
- "100mbps" : "10mbps",
- *duplex == FDX_CAPABLE_FULL_SELECTED ?
- "full" : "half");
- else
- printk(KERN_INFO "%s: Media Link Off\n", net_dev->name);
- }
- else {
- /* HomePNA */
- *speed = HW_SPEED_HOME;
- *duplex = FDX_CAPABLE_HALF_SELECTED;
- if (status & MII_STAT_LINK)
- printk(KERN_INFO "%s: Media Link On 1mbps half-duplex \n",
- net_dev->name);
- else
- printk(KERN_INFO "%s: Media Link Off\n", net_dev->name);
- }
-}
-/* ICS1893 PHY use Quick Poll Detailed Status Register to get its status */


-static void ics1893_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex)

+static void sis900_read_mode(struct device *net_dev, int *speed, int *duplex)

X {
- int i = 0;
+ struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv;
+ int phy_addr = sis_priv->cur_phy;
X u32 status;
+ u16 autoadv, autorec;
+ int i = 0;
+
+ while (i++ < 2)
+ status = mdio_read(net_dev, phy_addr, MII_STATUS);
X
- /* MII_QPDSTS is Latched, read twice in succession will reflect the current state */
- for (i = 0; i < 2; i++)
- status = mdio_read(net_dev, phy_addr, MII_QPDSTS);
+ if (!(status & MII_STAT_LINK)) return;
+
+ /* AutoNegotiate completed */
+ autoadv = mdio_read(net_dev, phy_addr, MII_ANADV);
+ autorec = mdio_read(net_dev, phy_addr, MII_ANLPAR);
+ status = autoadv & autorec;
X
- if (status & MII_STSICS_SPD)
+ if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX))
X *speed = HW_SPEED_100_MBPS;
X else
X *speed = HW_SPEED_10_MBPS;
-
- if (status & MII_STSICS_DPLX)
+ if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX))
X *duplex = FDX_CAPABLE_FULL_SELECTED;
X else
X *duplex = FDX_CAPABLE_HALF_SELECTED;
X
- if (status & MII_STSICS_LINKSTS)
- printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
- net_dev->name,
- *speed == HW_SPEED_100_MBPS ?
- "100mbps" : "10mbps",
- *duplex == FDX_CAPABLE_FULL_SELECTED ?
- "full" : "half");
- else
- printk(KERN_INFO "%s: Media Link Off\n", net_dev->name);
+ sis_priv->autong_complete = 1;
+
+ printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
+ net_dev->name,
+ *speed == HW_SPEED_100_MBPS ?
+ "100mbps" : "10mbps",
+ *duplex == FDX_CAPABLE_FULL_SELECTED ?
+ "full" : "half");
X }
X

-static void rtl8201_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex)

-{
- u32 status;
-
- status = mdio_read(net_dev, phy_addr, MII_STATUS);
-
- if (status & MII_STAT_CAN_TX_FDX) {
- *speed = HW_SPEED_100_MBPS;
- *duplex = FDX_CAPABLE_FULL_SELECTED;
- }
- else if (status & MII_STAT_CAN_TX) {
- *speed = HW_SPEED_100_MBPS;
- *duplex = FDX_CAPABLE_HALF_SELECTED;
- }
- else if (status & MII_STAT_CAN_T_FDX) {
- *speed = HW_SPEED_10_MBPS;
- *duplex = FDX_CAPABLE_FULL_SELECTED;
- }
- else if (status & MII_STAT_CAN_T) {
- *speed = HW_SPEED_10_MBPS;
- *duplex = FDX_CAPABLE_HALF_SELECTED;
- }
-
- if (status & MII_STAT_LINK)
- printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
- net_dev->name,
- *speed == HW_SPEED_100_MBPS ?
- "100mbps" : "10mbps",
- *duplex == FDX_CAPABLE_FULL_SELECTED ?
- "full" : "half");
- else
- printk(KERN_INFO "%s: Media Link Off\n", net_dev->name);
-}
X
X static void sis900_tx_timeout(struct device *net_dev)
X {
@@ -1054,7 +1152,7 @@
X net_dev->tbusy = sis_priv->tx_full = 0;
X
X /* FIXME: Should we restart the transmission thread here ?? */
- outl(TxENA, ioaddr + cr);
+ outl(TxENA | inl(ioaddr + cr), ioaddr + cr);
X

X /* Enable all known interrupts by setting the interrupt mask. */

X outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
@@ -1082,7 +1180,7 @@
X /* set the transmit buffer descriptor and enable Transmit State Machine */
X sis_priv->tx_ring[entry].bufptr = virt_to_bus(skb->data);
X sis_priv->tx_ring[entry].cmdsts = (OWN | skb->len);
- outl(TxENA, ioaddr + cr);
+ outl(TxENA | inl(ioaddr + cr), ioaddr + cr);
X
X if (++sis_priv->cur_tx - sis_priv->dirty_tx < NUM_TX_DESC) {
X /* Typical path, clear tbusy to indicate more
@@ -1289,7 +1387,7 @@
X }
X
X /* re-enable the potentially idle receive state matchine */
- outl(RxENA , ioaddr + cr );
+ outl(RxENA | inl(ioaddr + cr), ioaddr + cr );


X
X return 0;
X }

@@ -1308,14 +1406,14 @@
X tx_status = sis_priv->tx_ring[entry].cmdsts;
X
X if (tx_status & OWN) {
- /* The packet is not transmited yet (owned by hardware) !
+ /* The packet is not transmitted yet (owned by hardware) !
X Note: the interrupt is generated only when Tx Machine
X is idle, so this is an almost impossible case */
X break;
X }
X
X if (tx_status & (ABORT | UNDERRUN | OWCOLL)) {
- /* packet unsuccessfully transmited */
+ /* packet unsuccessfully transmitted */
X if (sis900_debug > 3)
X printk(KERN_INFO "%s: Transmit "
X "error, Tx status %8.8x.\n",
@@ -1330,7 +1428,7 @@
X if (tx_status & OWCOLL)
X sis_priv->stats.tx_window_errors++;
X } else {
- /* packet successfully transmited */
+ /* packet successfully transmitted */
X sis_priv->stats.collisions += (tx_status & COLCNT) >> 16;
X sis_priv->stats.tx_bytes += tx_status & DSIZE;
X sis_priv->stats.tx_packets++;
@@ -1367,7 +1465,7 @@
X outl(0x0000, ioaddr + ier);
X
X /* Stop the chip's Tx and Rx Status Machine */
- outl(RxDIS | TxDIS, ioaddr + cr);
+ outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr);
X
X del_timer(&sis_priv->timer);
X
@@ -1422,9 +1520,13 @@
X return &sis_priv->stats;
X }
X
-/* SiS 900 uses the most sigificant 7 bits to index a 128 bits multicast hash table, which makes
- this function a little bit different from other drivers */
-static u16 sis900_compute_hashtable_index(u8 *addr)
+
+/* SiS 900 uses the most sigificant 7 bits to index a 128 bits multicast
+ * hash table, which makes this function a little bit different from other drivers
+ * SiS 900 B0 & 635 M/B uses the most significat 8 bits to index 256 bits
+ * multicast hash table.
+ */


+static u16 sis900_compute_hashtable_index(u8 *addr, u8 revision)

X {
X
X /* what is the correct value of the POLYNOMIAL ??
@@ -1447,43 +1549,54 @@
X byte >>= 1;
X }
X }
- /* leave 7 most siginifant bits */
- return ((int)(crc >> 25));
+
+ /* leave 8 or 7 most siginifant bits */
+ if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV))
+ return ((int)(crc >> 24));
+ else
+ return ((int)(crc >> 25));
X }
X

X static void set_rx_mode(struct device *net_dev)

X {
X long ioaddr = net_dev->base_addr;
- u16 mc_filter[8]; /* 128 bits multicast hash table */
- int i;
+ struct sis900_private * sis_priv = (struct sis900_private *)net_dev->priv;
+ u16 mc_filter[16] = {0}; /* 256/128 bits multicast hash table */
+ int i, table_entries;
X u32 rx_mode;
+ u8 revision;
+
+ /* 635 Hash Table entires = 256(2^16) */
+ pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
+ if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV))
+ table_entries = 16;
+ else
+ table_entries = 8;
X
X if (net_dev->flags & IFF_PROMISC) {
X /* Accept any kinds of packets */
X rx_mode = RFPromiscuous;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < table_entries; i++)
X mc_filter[i] = 0xffff;
X } else if ((net_dev->mc_count > multicast_filter_limit) ||
X (net_dev->flags & IFF_ALLMULTI)) {
X /* too many multicast addresses or accept all multicast packets */
X rx_mode = RFAAB | RFAAM;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < table_entries; i++)
X mc_filter[i] = 0xffff;
X } else {
X /* Accept Broadcast packets, destination addresses match our MAC address,
X use Receive Filter to reject unwanted MCAST packets */
X struct dev_mc_list *mclist;
X rx_mode = RFAAB;
- for (i = 0; i < 8; i++)
- mc_filter[i]=0;
X for (i = 0, mclist = net_dev->mc_list; mclist && i < net_dev->mc_count;
X i++, mclist = mclist->next)
- set_bit(sis900_compute_hashtable_index(mclist->dmi_addr),
+ set_bit(sis900_compute_hashtable_index(mclist->dmi_addr, revision),
X mc_filter);
X }
X
X /* update Multicast Hash Table in Receive Filter */
- for (i = 0; i < 8; i++) {
+ for (i = 0; i < table_entries; i++) {
X /* why plus 0x04 ??, That makes the correct value for hash table. */
X outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr);
X outl(mc_filter[i], ioaddr + rfdr);
@@ -1510,21 +1623,27 @@


X static void sis900_reset(struct device *net_dev)

X {
X long ioaddr = net_dev->base_addr;
+ struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv;


X int i = 0;

+ u8 revision;
X u32 status = TxRCMP | RxRCMP;
X
X outl(0, ioaddr + ier);
X outl(0, ioaddr + imr);
X outl(0, ioaddr + rfcr);
X
- outl(RxRESET | TxRESET | RESET, ioaddr + cr);
+ outl(RxRESET | TxRESET | RESET | inl(ioaddr + cr), ioaddr + cr);
X
X /* Check that the chip has finished the reset. */
X while (status && (i++ < 1000)) {
X status ^= (inl(isr + ioaddr) & status);
X }
X
- outl(PESEL, ioaddr + cfg);
+ pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
+ if( (revision == SIS635A_900_REV) || (revision == SIS900B_900_REV) )
+ outl(PESEL | RND_CNT, ioaddr + cfg);
+ else
+ outl(PESEL, ioaddr + cfg);
X }
X
X #ifdef MODULE
@@ -1541,6 +1660,13 @@
X struct sis900_private *sis_priv =
X (struct sis900_private *)root_sis900_dev->priv;
X struct device *next_dev = sis_priv->next_module;
+ struct mii_phy *phy = NULL;
+
+ while(sis_priv->first_mii){
+ phy = sis_priv->first_mii;
+ sis_priv->first_mii = phy->next;
+ kfree(phy);
+ }
X
X unregister_netdev(root_sis900_dev);
X release_region(root_sis900_dev->base_addr,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sis900.h linux/drivers/net/sis900.h
--- v2.2.19/drivers/net/sis900.h Sun Mar 25 17:37:34 2001
+++ linux/drivers/net/sis900.h Mon Oct 22 10:39:47 2001
@@ -38,7 +38,7 @@
X
X /* Symbolic names for bits in various registers */
X enum sis900_command_register_bits {
- RELOAD = 0x00000400,
+ RELOAD = 0x00000400, ACCESSMODE = 0x00000200,/* ET */
X RESET = 0x00000100, SWI = 0x00000080, RxRESET = 0x00000020,
X TxRESET = 0x00000010, RxDIS = 0x00000008, RxENA = 0x00000004,
X TxDIS = 0x00000002, TxENA = 0x00000001
@@ -47,7 +47,10 @@
X enum sis900_configuration_register_bits {
X DESCRFMT = 0x00000100 /* 7016 specific */, REQALG = 0x00000080,
X SB = 0x00000040, POW = 0x00000020, EXD = 0x00000010,
- PESEL = 0x00000008, LPM = 0x00000004, BEM = 0x00000001
+ PESEL = 0x00000008, LPM = 0x00000004, BEM = 0x00000001,
+ /* 635 & 900B Specific */
+ RND_CNT = 0x00000400, FAIR_BACKOFF = 0x00000200,
+ EDB_MASTER_EN = 0x00002000
X };
X
X enum sis900_eeprom_access_reigster_bits {
@@ -74,9 +77,11 @@
X /* maximum dma burst fro transmission and receive*/
X #define MAX_DMA_RANGE 7 /* actually 0 means MAXIMUM !! */
X #define TxMXDMA_shift 20
-#define RxMXDMA_shift 20
-#define TX_DMA_BURST 0
-#define RX_DMA_BURST 0
+#define RxMXDMA_shift 20
+
+enum sis900_tx_rx_dma{
+ DMA_BURST_512 = 0, DMA_BURST_64 = 5
+};
X
X /* transmit FIFO threshholds */
X #define TX_FILL_THRESH 16 /* 1/4 FIFO size */
@@ -228,11 +233,18 @@
X MII_STSSUM_AUTO = 0x0002, MII_STSSUM_SPD = 0x0001
X };
X
-enum sis630_revision_id {
- SIS630E_REV = 0x81, SIS630EA1_REV = 0x83,
- SIS630S_REV = 0x82
+enum sis900_revision_id {
+ SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81,
+ SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83,
+ SIS630ET_900_REV = 0x84, SIS635A_900_REV = 0x90,
+ SIS900B_900_REV = 0x03
X };
X
+enum sis630_revision_id {
+ SIS630A0 = 0x00, SIS630A1 = 0x01,
+ SIS630B0 = 0x10, SIS630B1 = 0x11
+};
+
X #define FDX_CAPABLE_DUPLEX_UNKNOWN 0
X #define FDX_CAPABLE_HALF_SELECTED 1
X #define FDX_CAPABLE_FULL_SELECTED 2
@@ -258,6 +270,8 @@
X /* PCI stuff, should be move to pic.h */
X #define PCI_DEVICE_ID_SI_900 0x900
X #define PCI_DEVICE_ID_SI_7016 0x7016
+#define SIS630_VENDOR_ID 0x1039
+#define SIS630_DEVICE_ID 0x0630
X
X /* ioctl for accessing MII transveiver */
X #define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Get the PHY in use. */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/Makefile linux/drivers/net/sk98lin/Makefile
--- v2.2.19/drivers/net/sk98lin/Makefile Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/Makefile Wed Oct 10 01:41:01 2001
@@ -3,9 +3,13 @@
X # Makefile for the SysKonnect SK-98xx device driver.
X #
X
+#DEBUG = 1
+
+
X ifeq ($(CONFIG_SK98LIN),y)
X O_TARGET := sk98lin.o
- O_OBJS = skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \
+ O_OBJS = skge.o skproc.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o \
+ skgesirq.o \
X ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
X skxmac2.o skcsum.o
X else
@@ -13,19 +17,20 @@
X MOD_LIST_NAME := SK98LIN_MODULES
X M_OBJS := sk98lin.o
X O_TARGET := sk98lin.o
- O_OBJS = skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \
+ O_OBJS = skge.o skproc.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o \
+ skgesirq.o \
X ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
X skxmac2.o skcsum.o


X endif
X endif
X

-# DBGDEF = \
-# -DDEBUG
-
X ifdef DEBUG
+DBGDEF = \
+ -DDEBUG
+
X DBGDEF += \
--DSK_DEBUG_CHKMOD=0x00000000L \
--DSK_DEBUG_CHKCAT=0x00000000L
+ -DSK_DEBUG_CHKMOD=0x00000000L \
+ -DSK_DEBUG_CHKCAT=0xFFFFFFFF
X endif
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/lm80.h linux/drivers/net/sk98lin/h/lm80.h
--- v2.2.19/drivers/net/sk98lin/h/lm80.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/lm80.h Wed Oct 10 01:41:01 2001
@@ -126,7 +126,7 @@
X #define LM80_IS_BTI (1<<1) /* state of BTI# pin */
X #define LM80_IS_FAN1 (1<<2) /* count limit exceeded for Fan 1 */
X #define LM80_IS_FAN2 (1<<3) /* count limit exceeded for Fan 2 */
-#define LM80_IS_CI (1<<4) /* Chassis Intrusion occured */
+#define LM80_IS_CI (1<<4) /* Chassis Intrusion occurred */
X #define LM80_IS_OS (1<<5) /* OS temperature limit exceeded */
X /* bit 6 and 7 are reserved in LM80_ISRC_2 */
X #define LM80_IS_HT_IRQ_MD (1<<6) /* Hot temperature interrupt mode */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skaddr.h linux/drivers/net/sk98lin/h/skaddr.h
--- v2.2.19/drivers/net/sk98lin/h/skaddr.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skaddr.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skaddr.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.20 $
- * Date: $Date: 1999/11/22 13:46:14 $
- * Purpose: Header file for Address Management (MC, UC, Prom)
+ * Version: $Revision: 1.24 $
+ * Date: $Date: 2001/01/22 13:41:34 $
+ * Purpose: Header file for Address Management (MC, UC, Prom).


X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *

X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,20 @@


X * History:
X *

X * $Log: skaddr.h,v $
+ * Revision 1.24 2001/01/22 13:41:34 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.23 2000/08/10 11:27:50 rassmann
+ * Editorial changes.
+ * Preserving 32-bit alignment in structs for the adapter context.
+ *
+ * Revision 1.22 2000/08/07 11:10:40 rassmann
+ * Editorial changes.
+ *
+ * Revision 1.21 2000/05/04 09:39:59 rassmann
+ * Editorial changes.
+ * Corrected multicast address hashing.
+ *
X * Revision 1.20 1999/11/22 13:46:14 cgoos


X * Changed license header to GPL.

X * Allowing overwrite for SK_ADDR_EQUAL.
@@ -119,33 +132,36 @@
X #define __INC_SKADDR_H
X
X #ifdef __cplusplus


-xxxx /* not supported yet - force error */

+#error C++ is not yet supported.
X extern "C" {
X #endif /* cplusplus */
X
X /* defines ********************************************************************/
X
-#define SK_MAC_ADDR_LEN 6 /* Length of MAC address. */
-#define SK_MAX_ADDRS 14 /* #Addrs for exact match. */
+#define SK_MAC_ADDR_LEN 6 /* Length of MAC address. */
+#define SK_MAX_ADDRS 14 /* #Addrs for exact match. */
X
X /* ----- Common return values ----- */
X
-#define SK_ADDR_SUCCESS 0 /* Function returned successfully. */
-#define SK_ADDR_ILLEGAL_PORT 100 /* Port number too high. */
-#define SK_ADDR_TOO_EARLY 101 /* Function called too early. */
+#define SK_ADDR_SUCCESS 0 /* Function returned successfully. */
+#define SK_ADDR_ILLEGAL_PORT 100 /* Port number too high. */
+#define SK_ADDR_TOO_EARLY 101 /* Function called too early. */
X
X /* ----- Clear/Add flag bits ----- */
X
-#define SK_ADDR_PERMANENT 1 /* RLMT Address */
+#define SK_ADDR_PERMANENT 1 /* RLMT Address */
X
X /* ----- Additional Clear flag bits ----- */
X
-#define SK_MC_SW_ONLY 2 /* Do not update HW when clearing. */
+#define SK_MC_SW_ONLY 2 /* Do not update HW when clearing. */
X
X /* ----- Override flag bits ----- */
X
-#define SK_ADDR_VIRTUAL_ADDRESS 0
+#define SK_ADDR_LOGICAL_ADDRESS 0
+#define SK_ADDR_VIRTUAL_ADDRESS (SK_ADDR_LOGICAL_ADDRESS) /* old */
X #define SK_ADDR_PHYSICAL_ADDRESS 1
+#define SK_ADDR_CLEAR_LOGICAL 2
+#define SK_ADDR_SET_LOGICAL 4
X
X /* ----- Override return values ----- */
X
@@ -155,7 +171,7 @@
X
X /* ----- Partitioning of excact match table ----- */
X
-#define SK_ADDR_EXACT_MATCHES 16 /* #Exact match entries. */
+#define SK_ADDR_EXACT_MATCHES 16 /* #Exact match entries. */
X
X #define SK_ADDR_FIRST_MATCH_RLMT 1
X #define SK_ADDR_LAST_MATCH_RLMT 2
@@ -164,39 +180,43 @@
X
X /* ----- SkAddrMcAdd/SkAddrMcUpdate return values ----- */
X
-#define SK_MC_FILTERING_EXACT 0 /* Exact filtering. */
-#define SK_MC_FILTERING_INEXACT 1 /* Inexact filtering. */
+#define SK_MC_FILTERING_EXACT 0 /* Exact filtering. */
+#define SK_MC_FILTERING_INEXACT 1 /* Inexact filtering. */
X
X /* ----- Additional SkAddrMcAdd return values ----- */
X
-#define SK_MC_ILLEGAL_ADDRESS 2 /* Illegal address. */
-#define SK_MC_ILLEGAL_PORT 3 /* Illegal port (not the active one). */
-#define SK_MC_RLMT_OVERFLOW 4 /* Too many RLMT mc addresses. */
+#define SK_MC_ILLEGAL_ADDRESS 2 /* Illegal address. */
+#define SK_MC_ILLEGAL_PORT 3 /* Illegal port (not the active one). */
+#define SK_MC_RLMT_OVERFLOW 4 /* Too many RLMT mc addresses. */
X
X /* Promiscuous mode bits ----- */
X
-#define SK_PROM_MODE_NONE 0 /* Normal receive. */
-#define SK_PROM_MODE_LLC 1 /* Receive all LLC frames. */
-#define SK_PROM_MODE_ALL_MC 2 /* Receive all multicast frames. */
-/* #define SK_PROM_MODE_NON_LLC 4 */ /* Receive all non-LLC frames. */
+#define SK_PROM_MODE_NONE 0 /* Normal receive. */
+#define SK_PROM_MODE_LLC 1 /* Receive all LLC frames. */
+#define SK_PROM_MODE_ALL_MC 2 /* Receive all multicast frames. */
+/* #define SK_PROM_MODE_NON_LLC 4 */ /* Receive all non-LLC frames. */
X
X /* Macros */
X
X #ifndef SK_ADDR_EQUAL
+/*
+ * "&" instead of "&&" allows better optimization on IA-64.
+ * The replacement is safe here, as all bytes exist.
+ */
X #ifndef SK_ADDR_DWORD_COMPARE
X #define SK_ADDR_EQUAL(A1,A2) ( \
- ((SK_U8 *)(A1))[5] == ((SK_U8 *)(A2))[5] && \
- ((SK_U8 *)(A1))[4] == ((SK_U8 *)(A2))[4] && \
- ((SK_U8 *)(A1))[3] == ((SK_U8 *)(A2))[3] && \
- ((SK_U8 *)(A1))[2] == ((SK_U8 *)(A2))[2] && \
- ((SK_U8 *)(A1))[1] == ((SK_U8 *)(A2))[1] && \
- ((SK_U8 *)(A1))[0] == ((SK_U8 *)(A2))[0])
+ (((SK_U8 *)(A1))[5] == ((SK_U8 *)(A2))[5]) & \
+ (((SK_U8 *)(A1))[4] == ((SK_U8 *)(A2))[4]) & \
+ (((SK_U8 *)(A1))[3] == ((SK_U8 *)(A2))[3]) & \
+ (((SK_U8 *)(A1))[2] == ((SK_U8 *)(A2))[2]) & \
+ (((SK_U8 *)(A1))[1] == ((SK_U8 *)(A2))[1]) & \
+ (((SK_U8 *)(A1))[0] == ((SK_U8 *)(A2))[0]))
X #else /* SK_ADDR_DWORD_COMPARE */
X #define SK_ADDR_EQUAL(A1,A2) ( \
- *(SK_U32 *)&(((SK_U8 *)(A1))[2]) == *(SK_U32 *)&(((SK_U8 *)(A2))[2]) && \
- *(SK_U32 *)&(((SK_U8 *)(A1))[0]) == *(SK_U32 *)&(((SK_U8 *)(A2))[0]))
+ (*(SK_U32 *)&(((SK_U8 *)(A1))[2]) == *(SK_U32 *)&(((SK_U8 *)(A2))[2])) & \
+ (*(SK_U32 *)&(((SK_U8 *)(A1))[0]) == *(SK_U32 *)&(((SK_U8 *)(A2))[0])))
X #endif /* SK_ADDR_DWORD_COMPARE */
-#endif /* SK_ADDR_EQUAL */
+#endif /* SK_ADDR_EQUAL */


X
X /* typedefs *******************************************************************/
X

@@ -204,104 +224,120 @@
X SK_U8 a[SK_MAC_ADDR_LEN];
X } SK_MAC_ADDR;
X
+
X /* SK_FILTER is used to ensure alignment of the filter. */
X typedef union s_InexactFilter {
X SK_U8 Bytes[8];
- SK_U64 Val; /* Dummy entry for alignment only. */
+ SK_U64 Val; /* Dummy entry for alignment only. */
X } SK_FILTER64;
X
+
+typedef struct s_AddrNet SK_ADDR_NET;
+
+
X typedef struct s_AddrPort {


X
X /* ----- Public part (read-only) ----- */
X

- SK_MAC_ADDR PermanentMacAddress; /* Physical MAC Address. */
- SK_MAC_ADDR CurrentMacAddress; /* Physical MAC Address. */
- int PromMode; /* Promiscuous Mode. */
+ SK_MAC_ADDR CurrentMacAddress; /* Current physical MAC Address. */
+ SK_MAC_ADDR PermanentMacAddress; /* Permanent physical MAC Address. */
+ int PromMode; /* Promiscuous Mode. */


X
X /* ----- Private part ----- */

X
+ SK_MAC_ADDR PreviousMacAddress; /* Prev. phys. MAC Address. */
X SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */
- SK_MAC_ADDR PreviousMacAddress; /* Prev. phys. MAC Address. */
+ SK_U8 Align01;
+
X SK_U32 FirstExactMatchRlmt;
X SK_U32 NextExactMatchRlmt;
X SK_U32 FirstExactMatchDrv;
X SK_U32 NextExactMatchDrv;
X SK_MAC_ADDR Exact[SK_ADDR_EXACT_MATCHES];
- SK_FILTER64 InexactFilter; /* For 64-bit hash register. */
+ SK_FILTER64 InexactFilter; /* For 64-bit hash register. */
X } SK_ADDR_PORT;
X
+
+struct s_AddrNet {


+/* ----- Public part (read-only) ----- */
+

+ SK_MAC_ADDR CurrentMacAddress; /* Logical MAC Address. */
+ SK_MAC_ADDR PermanentMacAddress; /* Logical MAC Address. */


+
+/* ----- Private part ----- */
+

+ SK_U32 ActivePort; /* View of module ADDR. */
+ SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */


+ SK_U8 Align01;
+ SK_U16 Align02;

+};
+
+
X typedef struct s_Addr {


X
X /* ----- Public part (read-only) ----- */
X

+ SK_ADDR_NET Net[SK_MAX_NETS];
X SK_ADDR_PORT Port[SK_MAX_MACS];
- SK_MAC_ADDR PermanentMacAddress; /* Logical MAC Address. */
- SK_MAC_ADDR CurrentMacAddress; /* Logical MAC Address. */


X
X /* ----- Private part ----- */

-
-#if 0
- SK_BOOL Initialized; /* Flag: Addr module is initialized. */
-#endif /* 0 */
- SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */
- SK_U32 ActivePort; /* Vie of module ADDR. */
X } SK_ADDR;


X
X /* function prototypes ********************************************************/
X

X #ifndef SK_KR_PROTO
X
-/* Functions provided by SkRlmt */
+/* Functions provided by SkAddr */
X
X /* ANSI/C++ compliant function prototypes */
X
X extern int SkAddrInit(


X SK_AC *pAC,
X SK_IOC IoC,
- int Level);

+ int Level);
X
X extern int SkAddrMcClear(


X SK_AC *pAC,
X SK_IOC IoC,

- SK_U32 PortIdx,
- int Flags);
+ SK_U32 PortNumber,
+ int Flags);
X
X extern int SkAddrMcAdd(


X SK_AC *pAC,
X SK_IOC IoC,

- SK_U32 PortIdx,
+ SK_U32 PortNumber,
X SK_MAC_ADDR *pMc,
- int Flags);
+ int Flags);
X
X extern int SkAddrMcUpdate(


X SK_AC *pAC,
X SK_IOC IoC,

- SK_U32 PortIdx);
+ SK_U32 PortNumber);
X
X extern int SkAddrOverride(


X SK_AC *pAC,
X SK_IOC IoC,

- SK_U32 PortIdx,
+ SK_U32 PortNumber,
X SK_MAC_ADDR *pNewAddr,
- int Flags);
+ int Flags);
X
X extern int SkAddrPromiscuousChange(


X SK_AC *pAC,
X SK_IOC IoC,

- SK_U32 PortIdx,
- int NewPromMode);
+ SK_U32 PortNumber,
+ int NewPromMode);
X
X extern int SkAddrSwap(


X SK_AC *pAC,
X SK_IOC IoC,

- SK_U32 FromPortIdx,
- SK_U32 ToPortIdx);
+ SK_U32 FromPortNumber,
+ SK_U32 ToPortNumber);
X
X #else /* defined(SK_KR_PROTO)) */


X
X /* Non-ANSI/C++ compliant function prototypes */
X
-xxxx /* not supported yet - force error */

+#error KR-style prototypes are not yet provided.


X
X #endif /* defined(SK_KR_PROTO)) */

X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skcsum.h linux/drivers/net/sk98lin/h/skcsum.h
--- v2.2.19/drivers/net/sk98lin/h/skcsum.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skcsum.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skcsum.h
X * Project: GEnesis - SysKonnect SK-NET Gigabit Ethernet (SK-98xx)
- * Version: $Revision: 1.5 $
- * Date: $Date: 2000/02/21 12:10:05 $
+ * Version: $Revision: 1.9 $
+ * Date: $Date: 2001/02/06 11:21:39 $
X * Purpose: Store/verify Internet checksum in send/receive packets.


X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *

X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,19 @@


X * History:
X *

X * $Log: skcsum.h,v $
+ * Revision 1.9 2001/02/06 11:21:39 rassmann
+ * Editorial changes.
+ *
+ * Revision 1.8 2001/02/06 11:15:36 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.7 2000/06/29 13:17:05 rassmann
+ * Corrected reception of a packet with UDP checksum == 0 (which means there
+ * is no UDP checksum).
+ *
+ * Revision 1.6 2000/02/28 12:33:44 cgoos
+ * Changed C++ style comments to C style.
+ *
X * Revision 1.5 2000/02/21 12:10:05 cgoos
X * Fixed license comment.
X *
@@ -110,27 +122,32 @@
X *
X * SKCS_STATUS_UNKNOWN_IP_VERSION - Not an IP v4 frame.
X * SKCS_STATUS_IP_CSUM_ERROR - IP checksum error.
+ * SKCS_STATUS_IP_CSUM_ERROR_TCP - IP checksum error in TCP frame.
+ * SKCS_STATUS_IP_CSUM_ERROR_UDP - IP checksum error in UDP frame
X * SKCS_STATUS_IP_FRAGMENT - IP fragment (IP checksum ok).
X * SKCS_STATUS_IP_CSUM_OK - IP checksum ok (not a TCP or UDP frame).
X * SKCS_STATUS_TCP_CSUM_ERROR - TCP checksum error (IP checksum ok).
X * SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok).
X * SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok.
X * SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok.
+ * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum.
X */
X #ifndef SKCS_OVERWRITE_STATUS /* User overwrite? */
X #define SKCS_STATUS int /* Define status type. */
X
X #define SKCS_STATUS_UNKNOWN_IP_VERSION 1
-#define SKCS_STATUS_IP_CSUM_ERROR 2
-#define SKCS_STATUS_IP_FRAGMENT 3
-#define SKCS_STATUS_IP_CSUM_OK 4
-#define SKCS_STATUS_TCP_CSUM_ERROR 5
-#define SKCS_STATUS_UDP_CSUM_ERROR 6
-#define SKCS_STATUS_TCP_CSUM_OK 7
-#define SKCS_STATUS_UDP_CSUM_OK 8
-// needed for Microsoft
+#define SKCS_STATUS_IP_CSUM_ERROR 2
+#define SKCS_STATUS_IP_FRAGMENT 3
+#define SKCS_STATUS_IP_CSUM_OK 4
+#define SKCS_STATUS_TCP_CSUM_ERROR 5
+#define SKCS_STATUS_UDP_CSUM_ERROR 6
+#define SKCS_STATUS_TCP_CSUM_OK 7
+#define SKCS_STATUS_UDP_CSUM_OK 8
+/* needed for Microsoft */
X #define SKCS_STATUS_IP_CSUM_ERROR_UDP 9
X #define SKCS_STATUS_IP_CSUM_ERROR_TCP 10
+/* UDP checksum may be omitted */
+#define SKCS_STATUS_IP_CSUM_OK_NO_UDP 11
X #endif /* !SKCS_OVERWRITE_STATUS */
X
X /* Clear protocol statistics event. */
@@ -181,13 +198,13 @@
X */
X typedef struct s_Csum {
X /* Enabled receive SK_PROTO_XXX bit flags. */
- unsigned ReceiveFlags;
+ unsigned ReceiveFlags[SK_MAX_NETS];
X #ifdef TX_CSUM
- unsigned TransmitFlags;
-#endif // TX_CSUM
+ unsigned TransmitFlags[SK_MAX_NETS];
+#endif /* TX_CSUM */
X
X /* The protocol statistics structure; one per supported protocol. */
- SKCS_PROTO_STATS ProtoStats[SKCS_NUM_PROTOCOLS];
+ SKCS_PROTO_STATS ProtoStats[SK_MAX_NETS][SKCS_NUM_PROTOCOLS];
X } SK_CSUM;
X
X /*
@@ -225,17 +242,20 @@
X SK_AC *pAc,
X void *pIpHeader,
X unsigned Checksum1,
- unsigned Checksum2);
+ unsigned Checksum2,
+ int NetNumber);
X
X extern void SkCsGetSendInfo(
- SK_AC *pAc,
- void *pIpHeader,
- SKCS_PACKET_INFO *pPacketInfo);
+ SK_AC *pAc,
+ void *pIpHeader,
+ SKCS_PACKET_INFO *pPacketInfo,
+ int NetNumber);
X
X extern void SkCsSetReceiveFlags(
X SK_AC *pAc,
X unsigned ReceiveFlags,
X unsigned *pChecksum1Offset,
- unsigned *pChecksum2Offset);
+ unsigned *pChecksum2Offset,
+ int NetNumber);
X
X #endif /* __INC_SKCSUM_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skdrv1st.h linux/drivers/net/sk98lin/h/skdrv1st.h
--- v2.2.19/drivers/net/sk98lin/h/skdrv1st.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skdrv1st.h Wed Oct 10 01:41:01 2001
@@ -2,8 +2,8 @@
X *
X * Name: skdrv1st.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.8 $
- * Date: $Date: 2000/02/21 12:19:18 $
+ * Version: $Revision: 1.9 $
+ * Date: $Date: 2001/01/22 14:16:04 $
X * Purpose: First header file for driver and all other modules
X *
X ******************************************************************************/
@@ -27,6 +27,11 @@


X * History:
X *

X * $Log: skdrv1st.h,v $
+ * Revision 1.9 2001/01/22 14:16:04 mlindner


+ * added ProcFs functionality
+ * Dual Net functionality integrated
+ * Rlmt networks added
+ *

X * Revision 1.8 2000/02/21 12:19:18 cgoos
X * Added default for SK_DEBUG_CHKMOD/_CHKCAT
X *
@@ -140,6 +145,7 @@
X // #define SK_RLMT_SLOW_LOOKAHEAD
X
X #define SK_MAX_MACS 2
+#define SK_MAX_NETS 2
X
X #define SK_IOC char*
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skdrv2nd.h linux/drivers/net/sk98lin/h/skdrv2nd.h
--- v2.2.19/drivers/net/sk98lin/h/skdrv2nd.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skdrv2nd.h Wed Oct 10 01:41:01 2001
@@ -2,8 +2,8 @@
X *
X * Name: skdrv2nd.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.9 $
- * Date: $Date: 2000/02/21 10:39:55 $
+ * Version: $Revision: 1.12 $
+ * Date: $Date: 2001/03/01 12:52:15 $
X * Purpose: Second header file for driver and all other modules
X *
X ******************************************************************************/
@@ -27,6 +27,22 @@


X * History:
X *

X * $Log: skdrv2nd.h,v $
+ * Revision 1.12 2001/03/01 12:52:15 mlindner
+ * Fixed ring size
+ *
+ * Revision 1.11 2001/02/19 13:28:02 mlindner


+ * Changed PNMI parameter values

+ *
+ * Revision 1.10 2001/01/22 14:16:04 mlindner


+ * added ProcFs functionality
+ * Dual Net functionality integrated
+ * Rlmt networks added

+ *
+ * Revision 1.1 2000/10/05 19:46:50 phargrov
+ * Add directory src/vipk_devs_nonlbl/vipk_sk98lin/
+ * This is the SysKonnect SK-98xx Gigabit Ethernet driver,
+ * contributed by SysKonnect.
+ *
X * Revision 1.9 2000/02/21 10:39:55 cgoos
X * Added flag for jumbo support usage.
X *
@@ -139,7 +155,7 @@
X */
X
X #define TX_RING_SIZE (8*1024)
-#define RX_RING_SIZE (24*1024)
+#define RX_RING_SIZE (TX_RING_SIZE*3)
X
X /*
X * Buffer size for ethernet packets
@@ -167,6 +183,12 @@
X #define SK_DRIVER_RESET(pAC, IoC) 0
X #define SK_DRIVER_SENDEVENT(pAC, IoC) 0
X #define SK_DRIVER_SELFTEST(pAC, IoC) 0
+/* For get mtu you must add an own function */
+#define SK_DRIVER_GET_MTU(pAc,IoC,i) 0
+#define SK_DRIVER_SET_MTU(pAc,IoC,i,v) 0
+#define SK_DRIVER_PRESET_MTU(pAc,IoC,i,v) 0
+
+
X
X /* TX and RX descriptors *****************************************************/
X
@@ -366,6 +388,20 @@
X int PortIndex; /* index number of port (0 or 1) */
X };
X
+
+typedef struct s_DevNet DEV_NET;
+
+struct s_DevNet {
+ int PortNr;
+ int NetNr;
+ int Mtu;
+ int Up;
+ SK_AC *pAC;


+};
+
+
+
+

X typedef struct s_RxPort RX_PORT;
X
X struct s_RxPort {
@@ -382,6 +418,7 @@
X int PortIndex; /* index number of port (0 or 1) */
X };
X
+
X typedef struct s_PerStrm PER_STRM;
X
X #define SK_ALLOC_IRQ 0x00000001
@@ -404,7 +441,8 @@
X SK_RLMT Rlmt; /* for rlmt module */
X spinlock_t SlowPathLock; /* Normal IRQ lock */
X SK_PNMI_STRUCT_DATA PnmiStruct; /* structure to get all Pnmi-Data */
- int RlmtMode; /* link check mode to set */
+ int RlmtMode; /* link check mode to set */
+ int RlmtNets; /* Number of nets */
X
X SK_IOC IoBase; /* register set of adapter */
X int BoardLevel; /* level of active hw init (0-2) */
@@ -412,11 +450,11 @@
X SK_U32 AllocFlag; /* flag allocation of resources */
X struct pci_dev PciDev; /* for access to pci config space */
X SK_U32 PciDevId; /* pci device id */
- struct device *dev; /* pointer to device struct */
+ struct device *dev[2]; /* pointer to device struct */
X char Name[30]; /* driver name */
X struct device *Next; /* link all devices (for clearing) */
X int RxBufSize; /* length of receive buffers */
- struct net_device_stats stats; /* linux 'netstat -i' statistics */
+ struct net_device_stats stats; /* linux 'netstat -i' statistics */
X int Index; /* internal board index number */
X SK_BOOL JumboActivated; /* jumbo support ever activated */
X
@@ -428,10 +466,11 @@
X int PromiscCount; /* promiscuous mode counter */
X int AllMultiCount; /* allmulticast mode counter */
X int MulticCount; /* number of different MC */
- /* addresses for this board */
- /* (may be more than HW can)*/
+ /* addresses for this board */
+ /* (may be more than HW can)*/
X
- int ActivePort; /* the active XMAC port */
+ int ActivePort; /* the active XMAC port */
+ int MaxPorts; /* number of activated ports */
X int TxDescrPerRing; /* # of descriptors per tx ring */
X int RxDescrPerRing; /* # of descriptors per rx ring */
X

@@ -447,7 +486,6 @@
X

X SK_BOOL CheckQueue; /* check event queue soon */
X };
-
X
X #endif /* __INC_SKDRV2ND_H */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skgehw.h linux/drivers/net/sk98lin/h/skgehw.h
--- v2.2.19/drivers/net/sk98lin/h/skgehw.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skgehw.h Wed Oct 10 01:41:01 2001
@@ -2,8 +2,8 @@
X *
X * Name: skgehw.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.34 $
- * Date: $Date: 1999/11/22 13:53:40 $
+ * Version: $Revision: 1.36 $


+ * Date: $Date: 2000/11/09 12:32:49 $

X * Purpose: Defines and Macros for the Gigabit Ethernet Adapter Product
X * Family
X *
@@ -11,8 +11,7 @@


X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2000 SysKonnect GmbH.
X *


X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,12 @@
X *
X * History:
X * $Log: skgehw.h,v $
+ * Revision 1.36 2000/11/09 12:32:49 rassmann
+ * Renamed variables.
+ *
+ * Revision 1.35 2000/05/19 10:17:13 cgoos
+ * Added inactivity check in PHY_READ (in DEBUG mode only).
+ *
X * Revision 1.34 1999/11/22 13:53:40 cgoos


X * Changed license header to GPL.
X *

@@ -177,27 +182,27 @@
X */
X #define PCI_VENDOR_ID 0x00 /* 16 bit Vendor ID */
X #define PCI_DEVICE_ID 0x02 /* 16 bit Device ID */
-#define PCI_COMMAND 0x04 /* 16 bit Command */
-#define PCI_STATUS 0x06 /* 16 bit Status */
-#define PCI_REV_ID 0x08 /* 8 bit Revision ID */
+#define PCI_COMMAND 0x04 /* 16 bit Command */
+#define PCI_STATUS 0x06 /* 16 bit Status */
+#define PCI_REV_ID 0x08 /* 8 bit Revision ID */
X #define PCI_CLASS_CODE 0x09 /* 24 bit Class Code */
X #define PCI_CACHE_LSZ 0x0c /* 8 bit Cache Line Size */
-#define PCI_LAT_TIM 0x0d /* 8 bit Latency Timer */
+#define PCI_LAT_TIM 0x0d /* 8 bit Latency Timer */
X #define PCI_HEADER_T 0x0e /* 8 bit Header Type */
-#define PCI_BIST 0x0f /* 8 bit Built-in selftest */
+#define PCI_BIST 0x0f /* 8 bit Built-in selftest */
X #define PCI_BASE_1ST 0x10 /* 32 bit 1st Base address */
X #define PCI_BASE_2ND 0x14 /* 32 bit 2nd Base address */
X /* Byte 18..2b: reserved */
-#define PCI_SUB_VID 0x2c /* 16 bit Subsystem Vendor ID */
-#define PCI_SUB_ID 0x2e /* 16 bit Subsystem ID */
+#define PCI_SUB_VID 0x2c /* 16 bit Subsystem Vendor ID */
+#define PCI_SUB_ID 0x2e /* 16 bit Subsystem ID */
X #define PCI_BASE_ROM 0x30 /* 32 bit Expansion ROM Base Address */
X /* Byte 34..33: reserved */
-#define PCI_CAP_PTR 0x34 /* 8 bit Capabilities Ptr */
+#define PCI_CAP_PTR 0x34 /* 8 bit Capabilities Ptr */
X /* Byte 35..3b: reserved */
X #define PCI_IRQ_LINE 0x3c /* 8 bit Interrupt Line */
-#define PCI_IRQ_PIN 0x3d /* 8 bit Interrupt Pin */
-#define PCI_MIN_GNT 0x3e /* 8 bit Min_Gnt */
-#define PCI_MAX_LAT 0x3f /* 8 bit Max_Lat */
+#define PCI_IRQ_PIN 0x3d /* 8 bit Interrupt Pin */
+#define PCI_MIN_GNT 0x3e /* 8 bit Min_Gnt */
+#define PCI_MAX_LAT 0x3f /* 8 bit Max_Lat */
X /* Device Dependent Region */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 25'
echo 'File patch-2.2.20 is continued in part 26'
echo "26" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:36 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part37

#!/bin/sh -x
# this is part 37 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 37; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ ("SK_RLMT_STATS_CLEAR Event END.\n"))
+} /* SkRlmtEvtStatsClear */
+
+
+/******************************************************************************
+ *
+ * SkRlmtEvtStatsUpdate - STATS_UPDATE


+ *
+ * Description:

+ * This routine handles STATS_UPDATE events.
+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO


+ *
+ * Returns:
+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtStatsUpdate(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
+{
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STATS_UPDATE Event EMPTY.\n"))
+ return;
+ }
+
+ if (Para.Para32[0] >= pAC->Rlmt.NumNets) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad NetNumber %d.\n", Para.Para32[0]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STATS_UPDATE Event EMPTY.\n"))
+ return;
+ }
X
- case SK_RLMT_STATS_UPDATE: /* From PNMI. */
X #if 0
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_STATS_UPDATE Event (%d) BEGIN.\n", Event))
-
- /* Update statistics. */
-
- /* Currently always up-to-date. */
-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_STATS_UPDATE Event (%d) END.\n", Event))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STATS_UPDATE Event BEGIN.\n"))
+
+ /* Update statistics - currently always up-to-date. */
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STATS_UPDATE Event END.\n"))
X #endif /* 0 */
- break;
+} /* SkRlmtEvtStatsUpdate */
X
- case SK_RLMT_PREFPORT_CHANGE: /* From PNMI. */
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_PREFPORT_CHANGE to Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event))
X
- /* 0xFFFFFFFF == auto-mode. */
+/******************************************************************************
+ *
+ * SkRlmtEvtPrefportChange - PREFPORT_CHANGE


+ *
+ * Description:

+ * This routine handles PREFPORT_CHANGE events.
+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO


+ *
+ * Returns:
+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtPrefportChange(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 PortIndex; SK_U32 NetNumber */
+{
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PREFPORT_CHANGE to Port %d Event BEGIN.\n", Para.Para32[0]))
+
+ if (Para.Para32[1] >= pAC->Rlmt.NumNets) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad NetNumber %d.\n", Para.Para32[1]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PREFPORT_CHANGE Event EMPTY.\n"))
+ return;
+ }
X
- if (Para.Para32[0] == 0xFFFFFFFF) {
- pAC->Rlmt.PrefPort = SK_RLMT_DEF_PREF_PORT;
- }
- else {
- if (Para.Para32[0] >= (SK_U32)pAC->GIni.GIMacsFound) {
- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,
- SKERR_RLMT_E010,
- SKERR_RLMT_E010_MSG);
-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_PREFPORT_CHANGE Event (%d) EMPTY.\n", Event))
- break;
- }
+ /* 0xFFFFFFFF == auto-mode. */
+ if (Para.Para32[0] == 0xFFFFFFFF) {
+ pAC->Rlmt.Net[Para.Para32[1]].PrefPort = SK_RLMT_DEF_PREF_PORT;
+ }
+ else {
+ if (Para.Para32[0] >= pAC->Rlmt.Net[Para.Para32[1]].NumPorts) {
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E010, SKERR_RLMT_E010_MSG);
X
- pAC->Rlmt.PrefPort = Para.Para32[0];
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PREFPORT_CHANGE Event EMPTY.\n"))
+ return;
X }
X
- pAC->Rlmt.MacPreferred = Para.Para32[0];
+ pAC->Rlmt.Net[Para.Para32[1]].PrefPort = Para.Para32[0];
+ }
X
- SkRlmtCheckSwitch(pAC, IoC);
+ pAC->Rlmt.Net[Para.Para32[1]].Preference = Para.Para32[0];
X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_PREFPORT_CHANGE Event (%d) END.\n", Event))
- break;
+ if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) {
+ SkRlmtCheckSwitch(pAC, IoC, Para.Para32[1]);
+ }
X
- case SK_RLMT_MODE_CHANGE: /* From PNMI. */
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_MODE_CHANGE Event (%d) BEGIN.\n", Event))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PREFPORT_CHANGE Event END.\n"))
+} /* SkRlmtEvtPrefportChange */
X
- if (pAC->GIni.GIMacsFound < 2) {
- pAC->Rlmt.RlmtMode = SK_RLMT_CHECK_LINK;
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("Forced RLMT mode to CLS on single link adapter.\n"))
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_MODE_CHANGE Event (%d) EMPTY.\n",
- Event))
- break;
+
+/******************************************************************************
+ *
+ * SkRlmtEvtSetNets - SET_NETS


+ *
+ * Description:

+ * This routine handles SET_NETS events.
+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO


+ *
+ * Returns:
+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtSetNets(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NumNets; SK_U32 -1 */


+{
+ int i;
+

+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event BEGIN.\n"))
+
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event EMPTY.\n"))
+ return;
+ }
+
+ if (Para.Para32[0] == 0 || Para.Para32[0] > SK_MAX_NETS ||
+ Para.Para32[0] > (SK_U32)pAC->GIni.GIMacsFound) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad number of nets: %d.\n", Para.Para32[0]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event EMPTY.\n"))
+ return;
+ }
+
+ if (Para.Para32[0] == pAC->Rlmt.NumNets) { /* No change. */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event EMPTY.\n"))
+ return;
+ }
+
+ /* Entering and leaving dual mode only allowed while nets are stopped. */
+ if (pAC->Rlmt.NetsStarted > 0) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Changing dual mode only allowed while all nets are stopped.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event EMPTY.\n"))
+ return;
+ }
+
+ if (Para.Para32[0] == 1) {
+ if (pAC->Rlmt.NumNets > 1) {
+ /* Clear logical MAC addr from second net's active port. */
+ (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr.
+ Net[1].ActivePort]->PortNumber, NULL, SK_ADDR_CLEAR_LOGICAL);
+ pAC->Rlmt.Net[1].NumPorts = 0;
+ }
+
+ pAC->Rlmt.NumNets = Para.Para32[0];
+ for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) {
+ pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
+ pAC->Rlmt.Net[i].RootIdSet = SK_FALSE;
+ pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */
+ pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT;
+ /* Just assuming. */
+ pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort;
+ pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE;
+ pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL;
+ pAC->Rlmt.Net[i].NetNumber = i;
+ }
+
+ pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[0];
+ pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound;
+
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para);
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("RLMT: Changed to one net with two ports.\n"))
+ }
+ else if (Para.Para32[0] == 2) {
+ pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[1];
+ pAC->Rlmt.Net[1].NumPorts = pAC->GIni.GIMacsFound - 1;
+ pAC->Rlmt.Net[0].NumPorts =
+ pAC->GIni.GIMacsFound - pAC->Rlmt.Net[1].NumPorts;
+
+ pAC->Rlmt.NumNets = Para.Para32[0];
+ for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) {
+ pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
+ pAC->Rlmt.Net[i].RootIdSet = SK_FALSE;
+ pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */
+ pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT;
+ /* Just assuming. */
+ pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort;
+ pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE;
+ pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL;
+
+ pAC->Rlmt.Net[i].NetNumber = i;
+ }
+
+ /* Set logical MAC addr on second net's active port. */
+ (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr.
+ Net[1].ActivePort]->PortNumber, NULL, SK_ADDR_SET_LOGICAL);
+
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para);
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("RLMT: Changed to two nets with one port each.\n"))
+ }
+ else {
+ /* Not implemented for more than two nets. */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SetNets not implemented for more than two nets.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event EMPTY.\n"))
+ return;
+ }
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SET_NETS Event END.\n"))
+} /* SkRlmtSetNets */
+
+
+/******************************************************************************
+ *
+ * SkRlmtEvtModeChange - MODE_CHANGE


+ *
+ * Description:

+ * This routine handles MODE_CHANGE events.
+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO


+ *
+ * Returns:
+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtModeChange(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NewMode; SK_U32 NetNumber */
+{
+ SK_EVPARA Para2;
+ SK_U32 i;
+ SK_U32 PrevRlmtMode;
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_MODE_CHANGE Event BEGIN.\n"))
+
+ if (Para.Para32[1] >= pAC->Rlmt.NumNets) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad NetNumber %d.\n", Para.Para32[1]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_MODE_CHANGE Event EMPTY.\n"))
+ return;
+ }
+
+ Para.Para32[0] |= SK_RLMT_CHECK_LINK;
+
+ if (pAC->Rlmt.Net[Para.Para32[1]].NumPorts < 2 &&
+ Para.Para32[0] != SK_RLMT_MODE_CLS) {
+ pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = SK_RLMT_MODE_CLS;
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Forced RLMT mode to CLS on single port net.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_MODE_CHANGE Event EMPTY.\n"))
+ return;
+ }
+
+ /* Update RLMT mode. */
+ PrevRlmtMode = pAC->Rlmt.Net[Para.Para32[1]].RlmtMode;
+ pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = Para.Para32[0];
+
+ if ((PrevRlmtMode & SK_RLMT_CHECK_LOC_LINK) !=
+ (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
+ /* SK_RLMT_CHECK_LOC_LINK bit changed. */
+ if ((PrevRlmtMode & SK_RLMT_CHECK_OTHERS) == 0 &&
+ pAC->Rlmt.Net[Para.Para32[1]].NumPorts > 1 &&
+ pAC->Rlmt.Net[Para.Para32[1]].PortsUp >= 1) {
+ /* 20001207 RA: Was "PortsUp == 1". */
+ Para2.Para32[0] = Para.Para32[1];
+ Para2.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].LocTimer,
+ pAC->Rlmt.Net[Para.Para32[1]].TimeoutValue,
+ SKGE_RLMT, SK_RLMT_TIM, Para2);
X }
+ }
X
- /* Update RLMT mode. */
+ if ((PrevRlmtMode & SK_RLMT_CHECK_SEG) !=
+ (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG)) {
+ /* SK_RLMT_CHECK_SEG bit changed. */
+ for (i = 0; i < pAC->Rlmt.Net[Para.Para32[1]].NumPorts; i++) {
+ (void)SkAddrMcClear(pAC, IoC,
+ pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber,
+ SK_ADDR_PERMANENT | SK_MC_SW_ONLY);
X
- PrevRlmtMode = pAC->Rlmt.RlmtMode;
- pAC->Rlmt.RlmtMode = Para.Para32[0] | SK_RLMT_CHECK_LINK;
+ /* Add RLMT MC address. */
+ (void)SkAddrMcAdd(pAC, IoC,
+ pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber,
+ &SkRlmtMcAddr, SK_ADDR_PERMANENT);
X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("RLMT: Changed Mode to %X.\n", pAC->Rlmt.RlmtMode))
-
- if ((PrevRlmtMode & SK_RLMT_CHECK_LOC_LINK) !=
- (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
- if (!(PrevRlmtMode & SK_RLMT_CHECK_OTHERS) &&
- pAC->GIni.GIMacsFound > 1 &&
- pAC->Rlmt.PortsUp == 1) {
- SkTimerStart(
- pAC,
- IoC,
- &pAC->Rlmt.LocTimer,
- pAC->Rlmt.TimeoutValue,
- SKGE_RLMT,
- SK_RLMT_TIM,
- Para);
- }
- }
-
- if ((PrevRlmtMode & SK_RLMT_CHECK_SEG) !=
- (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG)) {
-
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
- (void)SkAddrMcClear(
- pAC,
- IoC,
- i,
- SK_ADDR_PERMANENT | SK_MC_SW_ONLY);
-
- /* Add RLMT MC address. */
-
- (void)SkAddrMcAdd(
- pAC,
- IoC,
- i,
- &SkRlmtMcAddr,
- SK_ADDR_PERMANENT);
-
- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) {
- /* Add BPDU MC address. */
-
- (void)SkAddrMcAdd(
- pAC,
- IoC,
- i,
- &BridgeMcAddr,
- SK_ADDR_PERMANENT);
-
- if (pAC->Rlmt.RlmtState !=
- SK_RLMT_RS_INIT) {
- if (!pAC->Rlmt.Port[i].LinkDown &&
- (Para2.pParaPtr =
- SkRlmtBuildSpanningTreePacket(
- pAC,
- IoC,
- i)
- ) != NULL) {
-
- pAC->Rlmt.Port[i
- ].RootIdSet =
- SK_FALSE;
-
- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,
- Para2);
- }
+ if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode &
+ SK_RLMT_CHECK_SEG) != 0) {
+ /* Add BPDU MC address. */
+ (void)SkAddrMcAdd(pAC, IoC,
+ pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber,
+ &BridgeMcAddr, SK_ADDR_PERMANENT);
+
+ if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) {
+ if (!pAC->Rlmt.Net[Para.Para32[1]].Port[i]->LinkDown &&
+ (Para2.pParaPtr = SkRlmtBuildSpanningTreePacket(
+ pAC, IoC, i)) != NULL) {
+ pAC->Rlmt.Net[Para.Para32[1]].Port[i]->RootIdSet =
+ SK_FALSE;
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);
X }
X }
-
- (void)SkAddrMcUpdate(pAC, IoC, i);
X }
+ (void)SkAddrMcUpdate(pAC, IoC,
+ pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber);
+ } /* for ... */
+
+ if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG) != 0) {
+ Para2.Para32[0] = Para.Para32[1];
+ Para2.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].SegTimer,
+ SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para2);
+ }
+ } /* SK_RLMT_CHECK_SEG bit changed. */
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_MODE_CHANGE Event END.\n"))
+} /* SkRlmtEvtModeChange */
X
- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) {
- SkTimerStart(
- pAC,
- IoC,
- &pAC->Rlmt.SegTimer,
- SK_RLMT_SEG_TO_VAL,
- SKGE_RLMT,
- SK_RLMT_SEG_TIM,
- Para);
- }
- }
X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
- ("SK_RLMT_MODE_CHANGE Event (%d) END.\n", Event))
+/******************************************************************************
+ *
+ * SkRlmtEvent - a PORT- or an RLMT-specific event happened


+ *
+ * Description:

+ * This routine calls subroutines to handle PORT- and RLMT-specific events.
+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO


+ *
+ * Returns:

+ * 0
+ */
+int SkRlmtEvent(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Event, /* Event code */
+SK_EVPARA Para) /* Event-specific parameter */
+{
+ switch (Event) {
+
+ /* ----- PORT events ----- */
+
+ case SK_RLMT_PORTSTART_TIM: /* From RLMT via TIME. */
+ SkRlmtEvtPortStartTim(pAC, IoC, Para);
+ break;
+ case SK_RLMT_LINK_UP: /* From SIRQ. */
+ SkRlmtEvtLinkUp(pAC, IoC, Para);
+ break;
+ case SK_RLMT_PORTUP_TIM: /* From RLMT via TIME. */
+ SkRlmtEvtPortUpTim(pAC, IoC, Para);
X break;
+ case SK_RLMT_PORTDOWN: /* From RLMT. */
+ case SK_RLMT_PORTDOWN_RX_TIM: /* From RLMT via TIME. */
+ case SK_RLMT_PORTDOWN_TX_TIM: /* From RLMT via TIME. */
+ SkRlmtEvtPortDownX(pAC, IoC, Event, Para);
+ break;
+ case SK_RLMT_LINK_DOWN: /* From SIRQ. */
+ SkRlmtEvtLinkDown(pAC, IoC, Para);
+ break;
+ case SK_RLMT_PORT_ADDR: /* From ADDR. */
+ SkRlmtEvtPortAddr(pAC, IoC, Para);
+ break;
+
+ /* ----- RLMT events ----- */
+
+ case SK_RLMT_START: /* From DRV. */
+ SkRlmtEvtStart(pAC, IoC, Para);
+ break;
+ case SK_RLMT_STOP: /* From DRV. */
+ SkRlmtEvtStop(pAC, IoC, Para);
+ break;
+ case SK_RLMT_TIM: /* From RLMT via TIME. */
+ SkRlmtEvtTim(pAC, IoC, Para);
+ break;
+ case SK_RLMT_SEG_TIM:
+ SkRlmtEvtSegTim(pAC, IoC, Para);
+ break;
+ case SK_RLMT_PACKET_RECEIVED: /* From DRV. */
+ SkRlmtEvtPacketRx(pAC, IoC, Para);
+ break;
+ case SK_RLMT_STATS_CLEAR: /* From PNMI. */
+ SkRlmtEvtStatsClear(pAC, IoC, Para);
+ break;
+ case SK_RLMT_STATS_UPDATE: /* From PNMI. */
+ SkRlmtEvtStatsUpdate(pAC, IoC, Para);
+ break;
+ case SK_RLMT_PREFPORT_CHANGE: /* From PNMI. */
+ SkRlmtEvtPrefportChange(pAC, IoC, Para);
+ break;
+ case SK_RLMT_MODE_CHANGE: /* From PNMI. */
+ SkRlmtEvtModeChange(pAC, IoC, Para);
+ break;
+ case SK_RLMT_SET_NETS: /* From DRV. */
+ SkRlmtEvtSetNets(pAC, IoC, Para);
+ break;
+
+ /* ----- Unknown events ----- */
X
X default: /* Create error log entry. */
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
X ("Unknown RLMT Event %d.\n", Event))
-
- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,
- SKERR_RLMT_E003,
- SKERR_RLMT_E003_MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E003, SKERR_RLMT_E003_MSG);
X break;
- }
+ } /* switch() */
X
X return (0);
X } /* SkRlmtEvent */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skvpd.c linux/drivers/net/sk98lin/skvpd.c
--- v2.2.19/drivers/net/sk98lin/skvpd.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skvpd.c Wed Oct 10 01:41:03 2001


@@ -2,8 +2,8 @@
X *

X * Name: skvpd.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.25 $
- * Date: $Date: 1999/11/22 13:39:32 $
+ * Version: $Revision: 1.26 $
+ * Date: $Date: 2000/06/13 08:00:01 $
X * Purpose: Shared software to read and write VPD data
X *
X ******************************************************************************/
@@ -27,6 +27,9 @@


X * History:
X *

X * $Log: skvpd.c,v $
+ * Revision 1.26 2000/06/13 08:00:01 mkarl
+ * additional cast to avoid compile problems in 64 bit environment
+ *
X * Revision 1.25 1999/11/22 13:39:32 cgoos


X * Changed license header to GPL.
X *

@@ -121,7 +124,7 @@
X Please refer skvpd.txt for infomation how to include this module
X */


X static const char SysKonnectFileId[] =

- "@(#)$Id: skvpd.c,v 1.25 1999/11/22 13:39:32 cgoos Exp $ (C) SK" ;
+ "@(#)$Id: skvpd.c,v 1.26 2000/06/13 08:00:01 mkarl Exp $ (C) SK" ;
X
X #include "h/skdrv1st.h"
X #include "h/sktypes.h"
@@ -644,7 +647,7 @@
X if (n == 0)
X return ;
X
- i = end - start + 1 ;
+ i = (int) (end - start + 1) ;
X if (n < 0) {
X p = start + n ;
X while (i != 0) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skxmac2.c linux/drivers/net/sk98lin/skxmac2.c
--- v2.2.19/drivers/net/sk98lin/skxmac2.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skxmac2.c Wed Oct 10 01:41:03 2001


@@ -2,16 +2,15 @@
X *

X * Name: skxmac2.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.50 $
- * Date: $Date: 1999/11/22 13:40:14 $
+ * Version: $Revision: 1.61 $
+ * Date: $Date: 2001/02/09 15:40:59 $
X * Purpose: Contains functions to initialize the XMAC II


X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,14 +26,47 @@


X * History:
X *

X * $Log: skxmac2.c,v $
+ * Revision 1.61 2001/02/09 15:40:59 rassmann


+ * Editorial changes.
+ *

+ * Revision 1.60 2001/02/07 15:02:01 cgoos
+ * Added workaround for Fujitsu switch link down.
+ *
+ * Revision 1.59 2001/01/10 09:38:06 cgoos
+ * Fixed Broadcom C0/A1 Id check for workaround.
+ *
+ * Revision 1.58 2000/11/29 11:30:38 cgoos
+ * Changed DEBUG sections with NW output to xDEBUG
+ *
+ * Revision 1.57 2000/11/27 12:40:40 rassmann
+ * Suppressing preamble after first access to BCom, not before (#10556).
+ *
+ * Revision 1.56 2000/11/09 12:32:48 rassmann


+ * Renamed variables.
+ *

+ * Revision 1.55 2000/11/09 11:30:10 rassmann
+ * WA: Waiting after releasing reset until BCom chip is accessible.
+ *
+ * Revision 1.54 2000/10/02 14:10:27 rassmann
+ * Reading BCOM PHY after releasing reset until it returns a valid value.
+ *
+ * Revision 1.53 2000/07/27 12:22:11 gklug
+ * fix: possible endless loop in XmHardRst.
+ *
+ * Revision 1.52 2000/05/22 08:48:31 malthoff
+ * Fix: #10523 errata valid for all BCOM PHYs.
+ *
+ * Revision 1.51 2000/05/17 12:52:18 malthoff
+ * Fixes BCom link errata (#10523).
+ *
X * Revision 1.50 1999/11/22 13:40:14 cgoos


X * Changed license header to GPL.
X *

X * Revision 1.49 1999/11/22 08:12:13 malthoff
- * Add workaround for power consumption feature of Bcom C0 chip.
+ * Add workaround for power consumption feature of BCom C0 chip.
X *
X * Revision 1.48 1999/11/16 08:39:01 malthoff
- * Fix: MDIO preamble suppression is port dependend.
+ * Fix: MDIO preamble suppression is port dependent.
X *
X * Revision 1.47 1999/08/27 08:55:35 malthoff
X * 1000BT: Optimizing MDIO transfer by oppressing MDIO preamble.
@@ -70,8 +102,7 @@
X * Changes for 1000Base-T.
X *
X * Revision 1.38 1999/04/08 14:35:10 malthoff
- * Add code for enabling signal detect. Enabling signal
- * detect is disabled.
+ * Add code for enabling signal detect. Enabling signal detect is disabled.
X *
X * Revision 1.37 1999/03/12 13:42:54 malthoff
X * Add: Jumbo Frame Support.
@@ -225,11 +256,11 @@
X /* local variables ************************************************************/
X

X static const char SysKonnectFileId[] =

- "@(#)$Id: skxmac2.c,v 1.50 1999/11/22 13:40:14 cgoos Exp $ (C) SK ";
+ "@(#)$Id: skxmac2.c,v 1.61 2001/02/09 15:40:59 rassmann Exp $ (C) SK ";
X
X /* BCOM PHY magic pattern list */
X typedef struct s_PhyHack {
- int PhyReg; /* Phy register */
+ int PhyReg; /* Phy register */
X SK_U16 PhyVal; /* Value to write */
X } BCOM_HACK;
X
@@ -284,12 +315,12 @@
X void SkXmSetRxCmd(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* The XMAC to handle with belongs to this Port */
-int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
- SK_LENERR_OK_ON/OFF, or SK_BIG_PK_OK_ON/OFF */
+int Port, /* The XMAC to handle with belongs to this Port */
+int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
+ SK_LENERR_OK_ON/OFF, or SK_BIG_PK_OK_ON/OFF */
X {
- SK_GEPORT *pPrt;
- SK_U16 OldRxMode;
+ SK_GEPORT *pPrt;
+ SK_U16 OldRxMode;


X
X pPrt = &pAC->GIni.GP[Port];

X OldRxMode = pPrt->PRxCmd;
@@ -334,7 +365,8 @@
X if (OldRxMode != pPrt->PRxCmd) {
X XM_OUT16(IoC, Port, XM_RX_CMD, pPrt->PRxCmd);
X }
-}
+} /* SkXmSetRxCmd*/
+


X
X /******************************************************************************
X *

@@ -351,12 +383,12 @@
X void SkXmClrExactAddr(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* The XMAC to handle with belongs to this Port */
-int StartNum, /* Begin with this Address Register Index (0..15) */
-int StopNum) /* Stop after finished with this Register Idx (0..15) */
+int Port, /* The XMAC to handle with belongs to this Port */
+int StartNum, /* Begin with this Address Register Index (0..15) */
+int StopNum) /* Stop after finished with this Register Idx (0..15) */
X {
- int i;
- SK_U16 ZeroAddr[3] = { 0x0000, 0x0000, 0x0000 };
+ int i;
+ SK_U16 ZeroAddr[3] = {0x0000, 0x0000, 0x0000};
X
X if ((unsigned)StartNum > 15 || (unsigned)StopNum > 15 ||
X StartNum > StopNum) {
@@ -368,7 +400,8 @@
X for (i = StartNum; i <= StopNum; i++) {
X XM_OUTADDR(IoC, Port, XM_EXM(i), &ZeroAddr[0]);
X }
-}
+} /* SkXmClrExactAddr */
+


X
X /******************************************************************************
X *

@@ -384,12 +417,13 @@
X static void SkXmClrSrcCheck(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
+int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
X {
- SK_U16 ZeroAddr[3] = { 0x0000, 0x0000, 0x0000 };
+ SK_U16 ZeroAddr[3] = {0x0000, 0x0000, 0x0000};
X
X XM_OUTHASH(IoC, Port, XM_SRC_CHK, &ZeroAddr);
-}
+} /* SkXmClrSrcCheck */
+


X
X /******************************************************************************
X *

@@ -404,12 +438,13 @@
X static void SkXmClrHashAddr(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
+int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
X {
- SK_U16 ZeroAddr[4] = { 0x0000, 0x0000, 0x0000, 0x0000 };
+ SK_U16 ZeroAddr[4] = {0x0000, 0x0000, 0x0000, 0x0000};
X
X XM_OUTHASH(IoC, Port, XM_HSM, &ZeroAddr);
-}
+} /* SkXmClrHashAddr*/
+


X
X /******************************************************************************
X *

@@ -424,14 +459,15 @@
X void SkXmFlushTxFifo(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
+int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
X {
X SK_U32 MdReg;
X
X XM_IN32(IoC, Port, XM_MODE, &MdReg);
X MdReg |= XM_MD_FTF;
X XM_OUT32(IoC, Port, XM_MODE, MdReg);
-}
+} /* SkXmFlushTxFifo */
+


X
X /******************************************************************************
X *

@@ -446,14 +482,15 @@
X void SkXmFlushRxFifo(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
+int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */
X {
X SK_U32 MdReg;
X
X XM_IN32(IoC, Port, XM_MODE, &MdReg);
X MdReg |= XM_MD_FRF;
X XM_OUT32(IoC, Port, XM_MODE, MdReg);
-}
+} /* SkXmFlushRxFifo*/
+


X
X /******************************************************************************
X *

@@ -493,10 +530,10 @@
X void SkXmSoftRst(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* port to stop (MAC_1 + n) */
+int Port) /* port to stop (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
- SK_U16 Word;
+ SK_U16 Word;


X
X pPrt = &pAC->GIni.GP[Port];
X

@@ -518,13 +555,11 @@
X
X /* disable all PHY IRQs */
X switch (pAC->GIni.GP[Port].PhyType) {
- case SK_PHY_BCOM:
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK,
- 0xffff);
+ case SK_PHY_BCOM:
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, 0xffff);
X break;
X case SK_PHY_LONE:
- PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB,
- 0x0);
+ PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, 0x0);
X break;
X case SK_PHY_NAT:
X /* todo: National
@@ -545,7 +580,8 @@
X SkXmFlushRxFifo(pAC, IoC, Port);
X
X pAC->GIni.GP[Port].PState = SK_PRT_STOP;
-}
+} /* SkXmSoftRst*/
+


X
X /******************************************************************************
X *

@@ -559,31 +595,47 @@
X * register (Timing requirements: Broadcom: 400ns, Level One:
X * none, National: 80ns).
X *
+ * ATTENTION:
+ * It is absolutely neccessary to reset the SW_RST Bit first
+ * before calling this function.
+ *
X * Returns:
X * nothing
X */
X void SkXmHardRst(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* port to stop (MAC_1 + n) */
+int Port) /* port to stop (MAC_1 + n) */
X {
- SK_U16 Word;
- int i;
X SK_U32 Reg;
+ int i;
+ int TOut;
+ SK_U16 Word;
X
- for (i=0; i<4; i++) {
+ for (i = 0; i < 4; i++) {
X /* TX_MFF_CTRL1 is a 32 bit register but only the lowest 16 */
X /* bit contains buttoms to press */
- SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1),
- (SK_U16) MFF_CLR_MAC_RST);
- SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1),
- (SK_U16) MFF_SET_MAC_RST);
+ SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), (SK_U16)MFF_CLR_MAC_RST);
+
+ TOut = 0;
X do {
+ TOut ++;
+ if (TOut > 10000) {
+ /*
+ * Adapter seems to be in RESET state.
+ * Registers cannot be written.
+ */
+ return;
+ }
+
+ SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1),
+ (SK_U16) MFF_SET_MAC_RST);
X SK_IN16(IoC,MR_ADDR(Port,TX_MFF_CTRL1), &Word);
X } while ((Word & MFF_SET_MAC_RST) == 0);
X }
- if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) {
X
+ /* For external PHYs there must be special handling */
+ if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) {
X /* reset external PHY */
X SK_IN32(IoC, B2_GP_IO, &Reg);
X if (Port == 0) {
@@ -601,7 +653,8 @@
X }
X
X pAC->GIni.GP[Port].PState = SK_PRT_RESET;
-}
+} /* SkXmHardRst */
+


X
X /******************************************************************************
X *

@@ -612,8 +665,7 @@
X * The XMAC must be reset or stopped before calling this function.
X *
X * Note:
- * The XMACs Rx and Tx state machine is still disabled when
- * returning.
+ * The XMAC's Rx and Tx state machine is still disabled when returning.
X *
X * Returns:
X * nothing
@@ -621,12 +673,13 @@
X void SkXmInitMac(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
- SK_GEPORT *pPrt;
- SK_U16 SWord;
- int i;
- SK_U32 Reg;
+ SK_GEPORT *pPrt;
+ SK_U32 Reg;
+ int i;
+ SK_U16 SWord;
+ SK_U16 PhyId;


X
X pPrt = &pAC->GIni.GP[Port];
X

@@ -634,74 +687,118 @@
X /* Port State: SK_PRT_STOP */
X /* Verify that the reset bit is cleared */
X SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &SWord);
- if (SWord & (SK_U16) MFF_SET_MAC_RST) {
+ if (SWord & (SK_U16)MFF_SET_MAC_RST) {
X /* PState does not match HW state */
- SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006,
- SKERR_HWI_E006MSG);
- /* correct it */
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006, SKERR_HWI_E006MSG);
+ /* Correct it. */
X pPrt->PState = SK_PRT_RESET;
X }
X }
+
X if (pPrt->PState == SK_PRT_RESET) {
X /*
X * clear HW reset
X * Note: The SW reset is self clearing, therefore there is
X * nothing to do here.
X */
- SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1),
- (SK_U16) MFF_CLR_MAC_RST);
-
- /*
- * clear PHY reset
- */
- if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) {
+ SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), (SK_U16)MFF_CLR_MAC_RST);
+
+ /* Ensure that XMAC reset release is done (errata from LReinbold?). */
+ SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &SWord);
X
+ /* Clear PHY reset. */
+ if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) {
X SK_IN32(IoC, B2_GP_IO, &Reg);
X if (Port == 0) {
- Reg |= GP_DIR_0; /* set to output */
+ Reg |= GP_DIR_0; /* Set to output. */
X Reg |= GP_IO_0;
X }
X else {
- Reg |= GP_DIR_2; /* set to output */
+ Reg |= GP_DIR_2; /* Set to output. */
X Reg |= GP_IO_2;
X }
X SK_OUT32(IoC, B2_GP_IO, Reg);
X
- /* enable GMII interface */
+ /* Enable GMII interface. */
X XM_OUT16(IoC, Port, XM_HW_CFG, XM_HW_GMII_MD);
X
- /* optimize MDIO transfer by oppressing preamble */
+ PHY_READ(IoC, pPrt, Port, PHY_XMAC_ID1, &PhyId);
+#ifdef xDEBUG
+ if (SWord == 0xFFFF) {
+ i = 1;
+ do {
+ PHY_READ(IoC, pPrt, Port, PHY_XMAC_ID1, &SWord);
+ i++;
+ /* Limit retries; else machine may hang. */
+ } while (SWord == 0xFFFF && i < 500000);
+


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "ID1 is %x after %d reads.",
+ (void *)SWord,
+ (void *)i);
+
+ /* Trigger PCI analyzer */
+ /* SK_IN32(IoC, 0x012c, &Reg); */


+ }
+#endif /* DEBUG */
+

+ /*
+ * Optimize MDIO transfer by suppressing preamble.
+ * Must be done AFTER first access to BCOM chip.
+ */
X XM_IN16(IoC, Port, XM_MMU_CMD, &SWord);
X XM_OUT16(IoC, Port, XM_MMU_CMD, SWord | XM_MMU_NO_PRE);
X
- /* Workaround BCOM Errata for the A1 type */
- /* Write magic patterns to reserved registers */
- PHY_READ(IoC, pPrt, Port, PHY_XMAC_ID1, &SWord);
- if (SWord == 0x6041) {
+ if (PhyId == 0x6044) {
+ /* Workaround BCOM Errata for the C0 type. */
+ /* Write magic patterns to reserved registers. */
X i = 0;
- while (BcomRegA1Hack[i].PhyReg != 0) {
- PHY_WRITE(IoC, pPrt, Port,
- BcomRegA1Hack[i].PhyReg,
- BcomRegA1Hack[i].PhyVal);
+ while (BcomRegC0Hack[i].PhyReg != 0) {
+ PHY_WRITE(IoC, pPrt, Port, BcomRegC0Hack[i].PhyReg,
+ BcomRegC0Hack[i].PhyVal);
X i++;
X }
X }
- /* Workaround BCOM Errata for the C0 type */
- /* Write magic patterns to reserved registers */
- if (SWord == 0x6044) {
+ else if (PhyId == 0x6041) {
+ /* Workaround BCOM Errata for the A1 type. */
+ /* Write magic patterns to reserved registers. */
X i = 0;
- while (BcomRegC0Hack[i].PhyReg != 0) {
- PHY_WRITE(IoC, pPrt, Port,
- BcomRegC0Hack[i].PhyReg,
- BcomRegC0Hack[i].PhyVal);
+ while (BcomRegA1Hack[i].PhyReg != 0) {
+ PHY_WRITE(IoC, pPrt, Port, BcomRegA1Hack[i].PhyReg,
+ BcomRegA1Hack[i].PhyVal);
X i++;
X }
X }
X
- /*
- * PHY LED initialization is performed in
- * SkGeXmitLED() (but not here).
- */
+ /* Workaround BCOM Errata (#10523) for all BCom PHYs. */
+ /* Disable Power Management after reset. */
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &SWord);
+#ifdef xDEBUG
+ if (SWord == 0xFFFF) {
+ i = 1;
+ do {
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &SWord);
+ i++;
+ /* Limit retries; else machine may hang. */
+ } while (SWord == 0xFFFF && i < 500000);
+


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "AUX_CTRL is %x after %d reads.",
+ (void *)SWord,
+ (void *)i);
+
+ /* Trigger PCI analyzer */
+ /* SK_IN32(IoC, 0x012c, &Reg); */


+ }
+#endif /* DEBUG */

+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL,
+ SWord | PHY_B_AC_DIS_PM);
+
+ /* PHY LED initialization is done in SkGeXmitLED(), not here. */
X }
X
X /* Dummy read the Interrupt source register */
@@ -709,7 +806,7 @@
X
X /*
X * The autonegotiation process starts immediately after
- * clearing the reset. Autonegotiation process should be
+ * clearing the reset. The autonegotiation process should be
X * started by the SIRQ, therefore stop it here immediately.
X */
X SkXmInitPhy(pAC, IoC, Port, SK_FALSE);
@@ -817,7 +914,8 @@
X * This should be done after the autonegotiation process
X * has been completed successfully.
X */
-}
+} /* SkXmInitMac*/
+


X
X /******************************************************************************
X *

@@ -834,7 +932,7 @@
X void SkXmInitDupMd(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X switch (pAC->GIni.GP[Port].PLinkModeStatus) {
X case SK_LMODE_STAT_AUTOHALF:
@@ -863,7 +961,8 @@
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E007, SKERR_HWI_E007MSG);
X break;
X }
-}
+} /* SkXmInitDupMd */
+


X
X /******************************************************************************
X *

@@ -881,11 +980,11 @@
X void SkXmInitPauseMd(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
- SK_U16 Word;
X SK_U32 DWord;
+ SK_U16 Word;


X
X pPrt = &pAC->GIni.GP[Port];
X

@@ -944,8 +1043,7 @@
X /* Disable Pause Mode in MAC Rx FIFO */
X SK_OUT16(IoC, MR_ADDR(Port,RX_MFF_CTRL1), MFF_DIS_PAUSE);
X }
-
-}
+} /* SkXmInitPauseMd*/
X
X
X /******************************************************************************
@@ -963,7 +1061,7 @@
X void SkXmInitPhy(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */
X {
X SK_GEPORT *pPrt;
@@ -983,7 +1081,8 @@
X SkXmInitPhyNat(pAC, IoC, Port, DoLoop);
X break;
X }
-}
+} /* SkXmInitPhy*/
+


X
X /******************************************************************************
X *

@@ -1000,11 +1099,11 @@
X static void SkXmInitPhyXmac(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */
X {
X SK_GEPORT *pPrt;
- SK_U16 Crtl;
+ SK_U16 Ctrl;


X
X pPrt = &pAC->GIni.GP[Port];
X

@@ -1015,67 +1114,69 @@
X ("InitPhyXmac: no autonegotiation Port %d\n", Port));
X /* No Autonegiotiation */
X /* Set DuplexMode in Config register */
- Crtl = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0);
+ Ctrl = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0);
X
X /*
X * Do NOT enable Autonegotiation here. This would hold
X * the link down because no IDLES are transmitted
X */


- } else {
+ }
+ else {

X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("InitPhyXmac: with autonegotiation Port %d\n", Port));
X /* Set Autonegotiation advertisement */
- Crtl = 0;
+ Ctrl = 0;
X
X /* Set Full/half duplex capabilities */
X switch (pPrt->PLinkMode) {
X case SK_LMODE_AUTOHALF:
- Crtl |= PHY_X_AN_HD;
+ Ctrl |= PHY_X_AN_HD;
X break;
X case SK_LMODE_AUTOFULL:
- Crtl |= PHY_X_AN_FD;
+ Ctrl |= PHY_X_AN_FD;
X break;
X case SK_LMODE_AUTOBOTH:
- Crtl |= PHY_X_AN_FD | PHY_X_AN_HD;
+ Ctrl |= PHY_X_AN_FD | PHY_X_AN_HD;
X break;
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT,
- SKERR_HWI_E015, SKERR_HWI_E015MSG) ;
+ SKERR_HWI_E015, SKERR_HWI_E015MSG);
X }
X
X switch (pPrt->PFlowCtrlMode) {
X case SK_FLOW_MODE_NONE:
- Crtl |= PHY_X_P_NO_PAUSE;
+ Ctrl |= PHY_X_P_NO_PAUSE;
X break;
X case SK_FLOW_MODE_LOC_SEND:
- Crtl |= PHY_X_P_ASYM_MD;
+ Ctrl |= PHY_X_P_ASYM_MD;
X break;
X case SK_FLOW_MODE_SYMMETRIC:
- Crtl |= PHY_X_P_SYM_MD;
+ Ctrl |= PHY_X_P_SYM_MD;
X break;
X case SK_FLOW_MODE_SYM_OR_REM:
- Crtl |= PHY_X_P_BOTH_MD;
+ Ctrl |= PHY_X_P_BOTH_MD;
X break;
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT,
- SKERR_HWI_E016, SKERR_HWI_E016MSG) ;
+ SKERR_HWI_E016, SKERR_HWI_E016MSG);
X }
X
X /* Write AutoNeg Advertisement Register */
- PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_AUNE_ADV, Crtl) ;
+ PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_AUNE_ADV, Ctrl);
X
X /* Restart Autonegotiation */
- Crtl = PHY_CT_ANE | PHY_CT_RE_CFG;
+ Ctrl = PHY_CT_ANE | PHY_CT_RE_CFG;
X }
X
X if (DoLoop) {
X /* Set the Phy Loopback bit, too */
- Crtl |= PHY_CT_LOOP;
+ Ctrl |= PHY_CT_LOOP;
X }
X
X /* Write to the Phy control register */
- PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_CTRL, Crtl) ;
-}
+ PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_CTRL, Ctrl);
+} /* SkXmInitPhyXmac*/
+


X
X /******************************************************************************
X *

@@ -1092,23 +1193,29 @@
X static void SkXmInitPhyBcom(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */
X {
X SK_GEPORT *pPrt;
- SK_U16 Crtl1 = PHY_B_CT_SP1000;
- SK_U16 Crtl2 = 0;
- SK_U16 Crtl3 = PHY_SEL_TYPE;
- SK_U16 Crtl4 = PHY_B_PEC_EN_LTR;
- SK_U16 Crtl5 = PHY_B_AC_TX_TST;
+ SK_U16 Ctrl1;
+ SK_U16 Ctrl2;
+ SK_U16 Ctrl3;
+ SK_U16 Ctrl4;
+ SK_U16 Ctrl5;
+
+ Ctrl1 = PHY_B_CT_SP1000;
+ Ctrl2 = 0;
+ Ctrl3 = PHY_SEL_TYPE;
+ Ctrl4 = PHY_B_PEC_EN_LTR;
+ Ctrl5 = PHY_B_AC_TX_TST;


X
X pPrt = &pAC->GIni.GP[Port];
X

- /* manuell Master/Slave ? */
+ /* manually Master/Slave ? */
X if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
- Crtl2 |= PHY_B_1000C_MSE;
+ Ctrl2 |= PHY_B_1000C_MSE;
X if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
- Crtl2 |= PHY_B_1000C_MSC;
+ Ctrl2 |= PHY_B_1000C_MSC;
X }
X }
X /* Autonegotiation ? */
@@ -1118,18 +1225,19 @@
X ("InitPhyBcom: no autonegotiation Port %d\n", Port));
X /* No Autonegiotiation */
X /* Set DuplexMode in Config register */
- Crtl1 |= (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0);
+ Ctrl1 |= (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0);
X
- /* Determine Master/Slave manuell if not already done */
+ /* Determine Master/Slave manually if not already done. */
X if (pPrt->PMSMode == SK_MS_MODE_AUTO) {
- Crtl2 |= PHY_B_1000C_MSE; /* set it to Slave */
+ Ctrl2 |= PHY_B_1000C_MSE; /* set it to Slave */
X }
X
X /*
X * Do NOT enable Autonegotiation here. This would hold
X * the link down because no IDLES are transmitted
X */


- } else {
+ }
+ else {

X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("InitPhyBcom: with autonegotiation Port %d\n", Port));
X /* Set Autonegotiation advertisement */
@@ -1137,31 +1245,31 @@
X /* Set Full/half duplex capabilities */
X switch (pPrt->PLinkMode) {
X case SK_LMODE_AUTOHALF:
- Crtl2 |= PHY_B_1000C_AHD;
+ Ctrl2 |= PHY_B_1000C_AHD;
X break;
X case SK_LMODE_AUTOFULL:
- Crtl2 |= PHY_B_1000C_AFD;
+ Ctrl2 |= PHY_B_1000C_AFD;
X break;
X case SK_LMODE_AUTOBOTH:
- Crtl2 |= PHY_B_1000C_AFD | PHY_B_1000C_AHD;
+ Ctrl2 |= PHY_B_1000C_AFD | PHY_B_1000C_AHD;
X break;
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT,
- SKERR_HWI_E015, SKERR_HWI_E015MSG) ;
+ SKERR_HWI_E015, SKERR_HWI_E015MSG);
X }
X
X switch (pPrt->PFlowCtrlMode) {
X case SK_FLOW_MODE_NONE:
- Crtl3 |= PHY_B_P_NO_PAUSE;
+ Ctrl3 |= PHY_B_P_NO_PAUSE;
X break;
X case SK_FLOW_MODE_LOC_SEND:
- Crtl3 |= PHY_B_P_ASYM_MD;
+ Ctrl3 |= PHY_B_P_ASYM_MD;
X break;
X case SK_FLOW_MODE_SYMMETRIC:
- Crtl3 |= PHY_B_P_SYM_MD;
+ Ctrl3 |= PHY_B_P_SYM_MD;
X break;
X case SK_FLOW_MODE_SYM_OR_REM:
- Crtl3 |= PHY_B_P_BOTH_MD;
+ Ctrl3 |= PHY_B_P_BOTH_MD;
X break;
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT,
@@ -1169,7 +1277,7 @@
X }
X
X /* Restart Autonegotiation */
- Crtl1 |= PHY_CT_ANE | PHY_CT_RE_CFG;
+ Ctrl1 |= PHY_CT_ANE | PHY_CT_RE_CFG;
X
X }
X
@@ -1178,39 +1286,40 @@
X init order of LEDs and XMAC. (MAl) */
X
X /* Write 1000Base-T Control Register */
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_1000T_CTRL, Crtl2);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_1000T_CTRL, Ctrl2);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("1000Base-T Control Reg = %x\n", Crtl2));
+ ("1000Base-T Control Reg = %x\n", Ctrl2));
X
X /* Write AutoNeg Advertisement Register */
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUNE_ADV, Crtl3);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUNE_ADV, Ctrl3);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("AutoNeg Advertisment Reg = %x\n", Crtl3));
+ ("AutoNeg Advertisment Reg = %x\n", Ctrl3));
X
X
X if (DoLoop) {
X /* Set the Phy Loopback bit, too */
- Crtl1 |= PHY_CT_LOOP;
+ Ctrl1 |= PHY_CT_LOOP;
X }
X
X if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
X /* configure fifo to high latency for xmission of ext. packets*/
- Crtl4 |= PHY_B_PEC_HIGH_LA;
+ Ctrl4 |= PHY_B_PEC_HIGH_LA;
X
X /* configure reception of extended packets */
- Crtl5 |= PHY_B_AC_LONG_PACK;
+ Ctrl5 |= PHY_B_AC_LONG_PACK;
X
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, Crtl5);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, Ctrl5);
X }
X
X /* Configure LED Traffic Mode and Jumbo Frame usage if specified */
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, Crtl4);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, Ctrl4);
X
X /* Write to the Phy control register */
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Crtl1);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Ctrl1);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("PHY Control Reg = %x\n", Crtl1));
-}
+ ("PHY Control Reg = %x\n", Ctrl1));
+} /* SkXmInitPhyBcom */
+


X
X /******************************************************************************
X *

@@ -1227,21 +1336,25 @@
X static void SkXmInitPhyLone(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */
X {
X SK_GEPORT *pPrt;
- SK_U16 Crtl1 = PHY_L_CT_SP1000;
- SK_U16 Crtl2 = 0;
- SK_U16 Crtl3 = PHY_SEL_TYPE;
+ SK_U16 Ctrl1;
+ SK_U16 Ctrl2;
+ SK_U16 Ctrl3;
+
+ Ctrl1 = PHY_L_CT_SP1000;
+ Ctrl2 = 0;
+ Ctrl3 = PHY_SEL_TYPE;


X
X pPrt = &pAC->GIni.GP[Port];
X

- /* manuell Master/Slave ? */
+ /* manually Master/Slave ? */
X if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
- Crtl2 |= PHY_L_1000C_MSE;
+ Ctrl2 |= PHY_L_1000C_MSE;
X if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
- Crtl2 |= PHY_L_1000C_MSC;
+ Ctrl2 |= PHY_L_1000C_MSC;
X }
X }
X /* Autonegotiation ? */
@@ -1257,18 +1370,19 @@
X ("InitPhyLone: no autonegotiation Port %d\n", Port));
X /* No Autonegiotiation */
X /* Set DuplexMode in Config register */
- Crtl1 = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0);
+ Ctrl1 = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0);
X
- /* Determine Master/Slave manuell if not already done */
+ /* Determine Master/Slave manually if not already done. */
X if (pPrt->PMSMode == SK_MS_MODE_AUTO) {
- Crtl2 |= PHY_L_1000C_MSE; /* set it to Slave */
+ Ctrl2 |= PHY_L_1000C_MSE; /* set it to Slave */
X }
X
X /*
X * Do NOT enable Autonegotiation here. This would hold
X * the link down because no IDLES are transmitted
X */


- } else {
+ }
+ else {

X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("InitPhyLone: with autonegotiation Port %d\n", Port));
X /* Set Autonegotiation advertisement */
@@ -1276,31 +1390,31 @@
X /* Set Full/half duplex capabilities */
X switch (pPrt->PLinkMode) {
X case SK_LMODE_AUTOHALF:
- Crtl2 |= PHY_L_1000C_AHD;
+ Ctrl2 |= PHY_L_1000C_AHD;
X break;
X case SK_LMODE_AUTOFULL:
- Crtl2 |= PHY_L_1000C_AFD;
+ Ctrl2 |= PHY_L_1000C_AFD;
X break;
X case SK_LMODE_AUTOBOTH:
- Crtl2 |= PHY_L_1000C_AFD | PHY_L_1000C_AHD;
+ Ctrl2 |= PHY_L_1000C_AFD | PHY_L_1000C_AHD;
X break;
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT,
- SKERR_HWI_E015, SKERR_HWI_E015MSG) ;
+ SKERR_HWI_E015, SKERR_HWI_E015MSG);
X }
X
X switch (pPrt->PFlowCtrlMode) {
X case SK_FLOW_MODE_NONE:
- Crtl3 |= PHY_L_P_NO_PAUSE;
+ Ctrl3 |= PHY_L_P_NO_PAUSE;
X break;
X case SK_FLOW_MODE_LOC_SEND:
- Crtl3 |= PHY_L_P_ASYM_MD;
+ Ctrl3 |= PHY_L_P_ASYM_MD;
X break;
X case SK_FLOW_MODE_SYMMETRIC:
- Crtl3 |= PHY_L_P_SYM_MD;
+ Ctrl3 |= PHY_L_P_SYM_MD;
X break;
X case SK_FLOW_MODE_SYM_OR_REM:
- Crtl3 |= PHY_L_P_BOTH_MD;
+ Ctrl3 |= PHY_L_P_BOTH_MD;
X break;
X default:
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT,
@@ -1308,7 +1422,7 @@
X }
X
X /* Restart Autonegotiation */
- Crtl1 = PHY_CT_ANE | PHY_CT_RE_CFG;
+ Ctrl1 = PHY_CT_ANE | PHY_CT_RE_CFG;
X
X }
X
@@ -1317,19 +1431,19 @@
X init order of LEDs and XMAC. (MAl) */
X
X /* Write 1000Base-T Control Register */
- PHY_WRITE(IoC, pPrt, Port, PHY_LONE_1000T_CTRL, Crtl2);
+ PHY_WRITE(IoC, pPrt, Port, PHY_LONE_1000T_CTRL, Ctrl2);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("1000Base-T Control Reg = %x\n", Crtl2));
+ ("1000Base-T Control Reg = %x\n", Ctrl2));
X
X /* Write AutoNeg Advertisement Register */
- PHY_WRITE(IoC, pPrt, Port, PHY_LONE_AUNE_ADV, Crtl3);
+ PHY_WRITE(IoC, pPrt, Port, PHY_LONE_AUNE_ADV, Ctrl3);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("AutoNeg Advertisment Reg = %x\n", Crtl3));
+ ("AutoNeg Advertisment Reg = %x\n", Ctrl3));
X
X
X if (DoLoop) {
X /* Set the Phy Loopback bit, too */
- Crtl1 |= PHY_CT_LOOP;
+ Ctrl1 |= PHY_CT_LOOP;
X }
X
X if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
@@ -1340,10 +1454,11 @@
X }
X
X /* Write to the Phy control register */
- PHY_WRITE(IoC, pPrt, Port, PHY_LONE_CTRL, Crtl1);
+ PHY_WRITE(IoC, pPrt, Port, PHY_LONE_CTRL, Ctrl1);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("PHY Control Reg = %x\n", Crtl1));
-}
+ ("PHY Control Reg = %x\n", Ctrl1));
+} /* SkXmInitPhyLone*/
+


X
X /******************************************************************************
X *

@@ -1360,11 +1475,12 @@
X static void SkXmInitPhyNat(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */


X {
X /* todo: National */
-}

+} /* SkXmInitPhyNat*/
+


X
X /******************************************************************************
X *

@@ -1377,7 +1493,7 @@
X void SkXmAutoNegLipaXmac(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_U16 IStatus) /* Interrupt Status word to analyse */
X {
X SK_GEPORT *pPrt;
@@ -1391,7 +1507,8 @@
X ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, IStatus));
X pPrt->PLipaAutoNeg = SK_LIPA_AUTO;
X }
-}
+} /* SkXmAutoNegLipaXmac*/
+


X
X /******************************************************************************
X *

@@ -1404,21 +1521,20 @@
X void SkXmAutoNegLipaBcom(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_U16 PhyStat) /* PHY Status word to analyse */
X {
X SK_GEPORT *pPrt;


X
X pPrt = &pAC->GIni.GP[Port];
X

- if (pPrt->PLipaAutoNeg != SK_LIPA_AUTO &&
- (PhyStat & (PHY_ST_AN_OVER))) {
-
+ if (pPrt->PLipaAutoNeg != SK_LIPA_AUTO && (PhyStat & PHY_ST_AN_OVER)) {
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, PhyStat));
X pPrt->PLipaAutoNeg = SK_LIPA_AUTO;
X }
-}
+} /* SkXmAutoNegLipaBcom*/
+


X
X /******************************************************************************
X *

@@ -1445,7 +1561,8 @@
X ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, PhyStat));
X pPrt->PLipaAutoNeg = SK_LIPA_AUTO;
X }
-}
+} /* SkXmAutoNegLipaLone*/
+


X
X /******************************************************************************
X *

@@ -1458,7 +1575,7 @@
X void SkXmAutoNegLipaNat(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */
X SK_U16 PhyStat) /* PHY Status word to analyse */
X {
X SK_GEPORT *pPrt;
@@ -1472,7 +1589,9 @@
X ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, PhyStat));
X pPrt->PLipaAutoNeg = SK_LIPA_AUTO;
X }
-}
+} /* SkXmAutoNegLipaNat*/
+
+
X /******************************************************************************
X *
X * SkXmAutoNegDone() - Auto negotiation handling
@@ -1493,13 +1612,9 @@
X int SkXmAutoNegDone(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
- SK_GEPORT *pPrt;
-
- pPrt = &pAC->GIni.GP[Port];
-
- switch (pPrt->PhyType) {
+ switch (pAC->GIni.GP[Port].PhyType) {
X case SK_PHY_XMAC:
X return (SkXmAutoNegDoneXmac(pAC, IoC, Port));
X case SK_PHY_BCOM:
@@ -1509,8 +1624,9 @@
X case SK_PHY_NAT:
X return (SkXmAutoNegDoneNat(pAC, IoC, Port));
X }
- return(SK_AND_OTHER);
-}
+ return (SK_AND_OTHER);
+} /* SkXmAutoNegDone*/
+


X
X /******************************************************************************
X *

@@ -1530,11 +1646,11 @@
X static int SkXmAutoNegDoneXmac(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
- SK_U16 ResAb ; /* Resolved Ability */
- SK_U16 LPAb ; /* Link Partner Ability */
+ SK_U16 ResAb; /* Resolved Ability */
+ SK_U16 LPAb; /* Link Partner Ability */
X
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegDoneXmac"
X "Port %d\n",Port));
@@ -1550,21 +1666,23 @@
X /* Error */
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNegFail: Remote fault bit set Port %d\n", Port));


- pPrt->PAutoNegFail = SK_TRUE ;

- return (SK_AND_OTHER) ;
+ pPrt->PAutoNegFail = SK_TRUE;
+ return (SK_AND_OTHER);
X }
X
X /* Check Duplex mismatch */
X if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_FD) {
- pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL ;
- } else if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_HD) {
- pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF ;
- } else {
+ pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL;
+ }
+ else if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_HD) {
+ pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF;
+ }
+ else {
X /* Error */
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNegFail: Duplex mode mismatch port %d\n", Port));


- pPrt->PAutoNegFail = SK_TRUE ;

- return (SK_AND_DUP_CAP) ;
+ pPrt->PAutoNegFail = SK_TRUE;
+ return (SK_AND_DUP_CAP);
X }
X
X /* Check PAUSE mismatch */
@@ -1575,25 +1693,29 @@
X (LPAb & PHY_X_P_SYM_MD)) {
X /* Symmetric PAUSE */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
- } else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM &&
+ }
+ else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM &&
X (LPAb & PHY_X_RS_PAUSE) == PHY_X_P_ASYM_MD) {
X /* Enable PAUSE receive, disable PAUSE transmit */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND;
- } else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND &&
+ }
+ else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND &&
X (LPAb & PHY_X_RS_PAUSE) == PHY_X_P_BOTH_MD) {
X /* Disable PAUSE receive, enable PAUSE transmit */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND;


- } else {
+ }
+ else {

X /* PAUSE mismatch -> no PAUSE */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
X }
X
X /* We checked everything and may now enable the link */
- pPrt->PAutoNegFail = SK_FALSE ;
+ pPrt->PAutoNegFail = SK_FALSE;
X
X SkXmRxTxEnable(pAC, IoC, Port);
- return(SK_AND_OK) ;
-}
+ return (SK_AND_OK);
+} /* SkXmAutoNegDoneXmac*/
+


X
X /******************************************************************************
X *

@@ -1613,82 +1735,99 @@
X static int SkXmAutoNegDoneBcom(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
- SK_U16 ResAb ; /* Resolved Ability */
- SK_U16 LPAb ; /* Link Partner Ability */
+ SK_U16 LPAb; /* Link Partner Ability */
X SK_U16 AuxStat; /* Auxiliary Status */
X
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegDoneBcom,"
- " Port %d\n",Port));
+#if 0
+01-Sep-2000 RA;:;:
+ SK_U16 ResAb; /* Resolved Ability */
+#endif /* 0 */
+
+ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
+ ("AutoNegDoneBcom, Port %d\n", Port));


X pPrt = &pAC->GIni.GP[Port];
X

- /* Get PHY parameters */
+ /* Get PHY parameters. */
X PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUNE_LP, &LPAb);
+#if 0
+01-Sep-2000 RA;:;:
X PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb);
+#endif /* 0 */
X PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_STAT, &AuxStat);
X
X if (LPAb & PHY_B_AN_RF) {
- /* Remote fault bit is set */


- /* Error */
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,

+ /* Remote fault bit is set: Error. */
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
X ("AutoNegFail: Remote fault bit set Port %d\n", Port));


- pPrt->PAutoNegFail = SK_TRUE ;

- return (SK_AND_OTHER) ;
+ pPrt->PAutoNegFail = SK_TRUE;
+ return (SK_AND_OTHER);
X }
X
- /* Check Duplex mismatch */
+ /* Check Duplex mismatch. */
X if ((AuxStat & PHY_B_AS_AN_RES) == PHY_B_RES_1000FD) {
- pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL ;
- } else if ((AuxStat & PHY_B_AS_AN_RES) == PHY_B_RES_1000HD) {
- pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF ;
- } else {
- /* Error */
+ pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL;
+ }
+ else if ((AuxStat & PHY_B_AS_AN_RES) == PHY_B_RES_1000HD) {
+ pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF;
+ }
+ else {
+ /* Error. */
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNegFail: Duplex mode mismatch port %d\n", Port));


- pPrt->PAutoNegFail = SK_TRUE ;

- return (SK_AND_DUP_CAP) ;
+ pPrt->PAutoNegFail = SK_TRUE;
+ return (SK_AND_DUP_CAP);
X }
X
- /* Check Master/Slave resolution */


- if (ResAb & (PHY_B_1000S_MSF)) {
- /* Error */
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,

+#if 0
+01-Sep-2000 RA;:;:
+ /* Check Master/Slave resolution. */
+ if (ResAb & PHY_B_1000S_MSF) {
+ /* Error. */
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
X ("Master/Slave Fault port %d\n", Port));
X pPrt->PAutoNegFail = SK_TRUE;
X pPrt->PMSStatus = SK_MS_STAT_FAULT;
X return (SK_AND_OTHER);


- } else if (ResAb & PHY_B_1000S_MSR) {
- pPrt->PMSStatus = SK_MS_STAT_MASTER ;
- } else {
- pPrt->PMSStatus = SK_MS_STAT_SLAVE ;

X }
+ else if (ResAb & PHY_B_1000S_MSR) {
+ pPrt->PMSStatus = SK_MS_STAT_MASTER;
+ }
+ else {
+ pPrt->PMSStatus = SK_MS_STAT_SLAVE;
+ }
+#endif /* 0 */
X
- /* Check PAUSE mismatch */
- /* We are NOT using chapter 4.23 of the Xaqti manual */
- /* We are using IEEE 802.3z/D5.0 Table 37-4 */
+ /* Check PAUSE mismatch. */
+ /* We are NOT using chapter 4.23 of the Xaqti manual. */
+ /* We are using IEEE 802.3z/D5.0 Table 37-4. */
X if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) ==
X (PHY_B_AS_PRR | PHY_B_AS_PRT)) {
- /* Symmetric PAUSE */
+ /* Symmetric PAUSE. */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
- } else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRR) {
- /* Enable PAUSE receive, disable PAUSE transmit */
+ }
+ else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRR) {
+ /* Enable PAUSE receive, disable PAUSE transmit. */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 37'
echo 'File patch-2.2.20 is continued in part 38'
echo "38" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:25 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part26

#!/bin/sh -x
# this is part 26 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 26; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X #define PCI_OUR_REG_1 0x40 /* 32 bit Our Register 1 */
X #define PCI_OUR_REG_2 0x44 /* 32 bit Our Register 2 */
@@ -230,34 +235,34 @@
X /* PCI_DEVICE_ID 16 bit Device ID */
X /* Values for Vendor ID and Device ID shall be patched into the code */
X /* PCI_COMMAND 16 bit Command */


- /* Bit 15..10: reserved */

-#define PCI_FBTEN (1<<9) /* Bit 9: Fast Back-To-Back enable */
-#define PCI_SERREN (1<<8) /* Bit 8: SERR enable */
-#define PCI_ADSTEP (1<<7) /* Bit 7: Address Stepping */
-#define PCI_PERREN (1<<6) /* Bit 6: Parity Report Response enable */


+ /* Bit 15..10: reserved */

+#define PCI_FBTEN (1<<9) /* Bit 9: Fast Back-To-Back enable */
+#define PCI_SERREN (1<<8) /* Bit 8: SERR enable */
+#define PCI_ADSTEP (1<<7) /* Bit 7: Address Stepping */
+#define PCI_PERREN (1<<6) /* Bit 6: Parity Report Response enable */
X #define PCI_VGA_SNOOP (1<<5) /* Bit 5: VGA palette snoop */
-#define PCI_MWIEN (1<<4) /* Bit 4: Memory write an inv cycl ena */
-#define PCI_SCYCEN (1<<3) /* Bit 3: Special Cycle enable */
-#define PCI_BMEN (1<<2) /* Bit 2: Bus Master enable */
-#define PCI_MEMEN (1<<1) /* Bit 1: Memory Space Access enable */
-#define PCI_IOEN (1<<0) /* Bit 0: IO Space Access enable */
+#define PCI_MWIEN (1<<4) /* Bit 4: Memory write an inv cycl ena */
+#define PCI_SCYCEN (1<<3) /* Bit 3: Special Cycle enable */
+#define PCI_BMEN (1<<2) /* Bit 2: Bus Master enable */
+#define PCI_MEMEN (1<<1) /* Bit 1: Memory Space Access enable */
+#define PCI_IOEN (1<<0) /* Bit 0: IO Space Access enable */
X
X /* PCI_STATUS 16 bit Status */
-#define PCI_PERR (1<<15) /* Bit 15: Parity Error */
-#define PCI_SERR (1<<14) /* Bit 14: Signaled SERR */
-#define PCI_RMABORT (1<<13) /* Bit 13: Received Master Abort */
-#define PCI_RTABORT (1<<12) /* Bit 12: Received Target Abort */


- /* Bit 11: reserved */

-#define PCI_DEVSEL (3<<9) /* Bit 10..9: DEVSEL Timing */
+#define PCI_PERR (1<<15) /* Bit 15: Parity Error */
+#define PCI_SERR (1<<14) /* Bit 14: Signaled SERR */
+#define PCI_RMABORT (1<<13) /* Bit 13: Received Master Abort */
+#define PCI_RTABORT (1<<12) /* Bit 12: Received Target Abort */


+ /* Bit 11: reserved */

+#define PCI_DEVSEL (3<<9) /* Bit 10..9: DEVSEL Timing */
X #define PCI_DEV_FAST (0<<9) /* fast */
X #define PCI_DEV_MEDIUM (1<<9) /* medium */
X #define PCI_DEV_SLOW (2<<9) /* slow */
X #define PCI_DATAPERR (1<<8) /* Bit 8: DATA Parity error detected */
-#define PCI_FB2BCAP (1<<7) /* Bit 7: Fast Back-to-Back Capability */
-#define PCI_UDF (1<<6) /* Bit 6: User Defined Features */
+#define PCI_FB2BCAP (1<<7) /* Bit 7: Fast Back-to-Back Capability */
+#define PCI_UDF (1<<6) /* Bit 6: User Defined Features */
X #define PCI_66MHZCAP (1<<5) /* Bit 5: 66 MHz PCI bus clock capable */
-#define PCI_NEWCAP (1<<4) /* Bit 4: New cap. list implemented */
- /* Bit 3..0: reserved */
+#define PCI_NEWCAP (1<<4) /* Bit 4: New cap. list implemented */
+ /* Bit 3..0: reserved */
X
X #define PCI_ERRBITS (PCI_PERR | PCI_SERR | PCI_RMABORT | PCI_RTABORT |\
X PCI_DATAPERR)
@@ -272,59 +277,59 @@
X
X /* PCI_HEADER_T 8 bit Header Type */
X #define PCI_HD_MF_DEV (1<<7) /* Bit 7: 0= single, 1= multi-func dev */
-#define PCI_HD_TYPE 0x7f /* Bit 6..0: Header Layout 0= normal */
+#define PCI_HD_TYPE 0x7f /* Bit 6..0: Header Layout 0= normal */
X
X /* PCI_BIST 8 bit Built-in selftest */
X /* Built-in Self test not supported (optional) */
X
X /* PCI_BASE_1ST 32 bit 1st Base address */
-#define PCI_MEMSIZE 0x4000L /* use 16 kB Memory Base */
+#define PCI_MEMSIZE 0x4000L /* use 16 kB Memory Base */
X #define PCI_MEMBASE_MSK 0xffffc000L /* Bit 31..14: Memory Base Address */
X #define PCI_MEMSIZE_MSK 0x00003ff0L /* Bit 13.. 4: Memory Size Req. */
-#define PCI_PREFEN (1L<<3) /* Bit 3: Prefetchable */
-#define PCI_MEM_TYP (3L<<2) /* Bit 2.. 1: Memory Type */
+#define PCI_PREFEN (1L<<3) /* Bit 3: Prefetchable */
+#define PCI_MEM_TYP (3L<<2) /* Bit 2.. 1: Memory Type */
X #define PCI_MEM32BIT (0L<<1) /* Base addr anywhere in 32 Bit range */
-#define PCI_MEM1M (1L<<1) /* Base addr below 1 MegaByte */
+#define PCI_MEM1M (1L<<1) /* Base addr below 1 MegaByte */
X #define PCI_MEM64BIT (2L<<1) /* Base addr anywhere in 64 Bit range */
X #define PCI_MEMSPACE (1L<<0) /* Bit 0: Memory Space Indic. */
X
X /* PCI_BASE_2ND 32 bit 2nd Base address */
-#define PCI_IOBASE 0xffffff00L /* Bit 31..8: I/O Base address */
-#define PCI_IOSIZE 0x000000fcL /* Bit 7..2: I/O Size Requirements */


- /* Bit 1: reserved */

-#define PCI_IOSPACE (1L<<0) /* Bit 0: I/O Space Indicator */
+#define PCI_IOBASE 0xffffff00L /* Bit 31..8: I/O Base address */
+#define PCI_IOSIZE 0x000000fcL /* Bit 7..2: I/O Size Requirements */


+ /* Bit 1: reserved */

+#define PCI_IOSPACE (1L<<0) /* Bit 0: I/O Space Indicator */
X
X /* PCI_BASE_ROM 32 bit Expansion ROM Base Address */
-#define PCI_ROMBASE (0xfffeL<<17) /* Bit 31..17: ROM BASE address (1st)*/
-#define PCI_ROMBASZ (0x1cL<<14) /* Bit 16..14: Treat as BASE or SIZE */
-#define PCI_ROMSIZE (0x38L<<11) /* Bit 13..11: ROM Size Requirements */
- /* Bit 10.. 1: reserved */
-#define PCI_ROMEN (0x1L<<0) /* Bit 0: Address Decode enable */
+#define PCI_ROMBASE (0xfffeL<<17) /* Bit 31..17: ROM BASE address (1st)*/
+#define PCI_ROMBASZ (0x1cL<<14) /* Bit 16..14: Treat as BASE or SIZE */
+#define PCI_ROMSIZE (0x38L<<11) /* Bit 13..11: ROM Size Requirements */
+ /* Bit 10.. 1: reserved */
+#define PCI_ROMEN (0x1L<<0) /* Bit 0: Address Decode enable */
X

X /* Device Dependent Region */

X /* PCI_OUR_REG_1 32 bit Our Register 1 */
- /* Bit 31..26: reserved */
-#define PCI_VIO (1L<<25) /* Bit 25: PCI IO Voltage, */
- /* 0 = 3.3V / 1 = 5V */
-#define PCI_EN_BOOT (1L<<24) /* Bit 24: Enable BOOT via ROM */
- /* 1 = Don't boot wth ROM*/
- /* 0 = Boot with ROM */
-#define PCI_EN_IO (1L<<23) /* Bit 23: Mapping to IO space */


+ /* Bit 31..26: reserved */

+#define PCI_VIO (1L<<25) /* Bit 25: PCI IO Voltage, */
+ /* 0 = 3.3V / 1 = 5V */
+#define PCI_EN_BOOT (1L<<24) /* Bit 24: Enable BOOT via ROM */
+ /* 1 = Don't boot wth ROM*/
+ /* 0 = Boot with ROM */
+#define PCI_EN_IO (1L<<23) /* Bit 23: Mapping to IO space */
X #define PCI_EN_FPROM (1L<<22) /* Bit 22: FLASH mapped to mem? */
- /* 1 = Map Flash to Mem */
- /* 0 = Disable addr. dec*/
+ /* 1 = Map Flash to Mem */
+ /* 0 = Disable addr. dec*/
X #define PCI_PAGESIZE (3L<<20) /* Bit 21..20: FLASH Page Size */
-#define PCI_PAGE_16 (0L<<20) /* 16 k pages */
+#define PCI_PAGE_16 (0L<<20) /* 16 k pages */
X #define PCI_PAGE_32K (1L<<20) /* 32 k pages */
X #define PCI_PAGE_64K (2L<<20) /* 64 k pages */
X #define PCI_PAGE_128K (3L<<20) /* 128 k pages */
- /* Bit 19: reserved */
-#define PCI_PAGEREG (7L<<16) /* Bit 18..16: Page Register */
-#define PCI_NOTAR (1L<<15) /* Bit 15: No turnaround cycle */
+ /* Bit 19: reserved */
+#define PCI_PAGEREG (7L<<16) /* Bit 18..16: Page Register */
+#define PCI_NOTAR (1L<<15) /* Bit 15: No turnaround cycle */
X #define PCI_FORCE_BE (1L<<14) /* Bit 14: Assert all BEs on MR */
-#define PCI_DIS_MRL (1L<<13) /* Bit 13: Disable Mem R Line */
-#define PCI_DIS_MRM (1L<<12) /* Bit 12: Disable Mem R multip */
-#define PCI_DIS_MWI (1L<<11) /* Bit 11: Disable Mem W & inv */
+#define PCI_DIS_MRL (1L<<13) /* Bit 13: Disable Mem R Line */
+#define PCI_DIS_MRM (1L<<12) /* Bit 12: Disable Mem R multip */
+#define PCI_DIS_MWI (1L<<11) /* Bit 11: Disable Mem W & inv */
X #define PCI_DISC_CLS (1L<<10) /* Bit 10: Disc: cacheLsz bound */
X #define PCI_BURST_DIS (1L<<9) /* Bit 9: Burst Disable */
X #define PCI_DIS_PCI_CLK (1L<<8) /* Bit 8: Disable PCI clock driv*/
@@ -334,9 +339,9 @@
X
X /* PCI_OUR_REG_2 32 bit Our Register 2 */
X #define PCI_VPD_WR_THR (0xffL<<24) /* Bit 31..24: VPD Write Threshold */
-#define PCI_DEV_SEL (0x7fL<<17) /* Bit 23..17: EEPROM Device Select */
+#define PCI_DEV_SEL (0x7fL<<17) /* Bit 23..17: EEPROM Device Select */
X #define PCI_VPD_ROM_SZ (7L<<14) /* Bit 16..14: VPD ROM Size */
- /* Bit 13..12: reserved */
+ /* Bit 13..12: reserved */
X #define PCI_PATCH_DIR (0xfL<<8) /* Bit 11.. 8: Ext Patchs dir 3..0 */
X #define PCI_PATCH_DIR_0 (1L<<8)
X #define PCI_PATCH_DIR_1 (1L<<9)
@@ -349,27 +354,27 @@
X #define PCI_EXT_PATCH_3 (1L<<7)
X #define PCI_EN_DUMMY_RD (1L<<3) /* Bit 3: Enable Dummy Read */
X #define PCI_REV_DESC (1L<<2) /* Bit 2: Reverse Desc. Bytes */


- /* Bit 1: reserved */
+ /* Bit 1: reserved */

X #define PCI_USEDATA64 (1L<<0) /* Bit 0: Use 64Bit Data bus ext*/
X
X
X /* Power Management Region */
X /* PCI_PM_CAP_REG 16 bit Power Management Capabilities */
-#define PCI_PME_SUP (0x1f<<11) /* Bit 15..11: PM Manag. Event Sup */
+#define PCI_PME_SUP (0x1f<<11) /* Bit 15..11: PM Manag. Event Sup */
X #define PCI_PM_D2_SUB (1<<10) /* Bit 10: D2 Support Bit */
X #define PCI_PM_D1_SUB (1<<9) /* Bit 9: D1 Support Bit */
- /* Bit 8..6: reserved */
-#define PCI_PM_DSI (1<<5) /* Bit 5: Device Specific Init.*/
-#define PCI_PM_APS (1<<4) /* Bit 4: Auxialiary Power Src */
+ /* Bit 8..6: reserved */
+#define PCI_PM_DSI (1<<5) /* Bit 5: Device Specific Init.*/
+#define PCI_PM_APS (1<<4) /* Bit 4: Auxialiary Power Src */
X #define PCI_PME_CLOCK (1<<3) /* Bit 3: PM Event Clock */
-#define PCI_PM_VER (7<<0) /* Bit 2..0: PM PCI Spec. version */
+#define PCI_PM_VER (7<<0) /* Bit 2..0: PM PCI Spec. version */
X
X /* PCI_PM_CTL_STS 16 bit Power Manag. Control/Status */
X #define PCI_PME_STATUS (1<<15) /* Bit 15: PGA doesn't sup. PME# */
X #define PCI_PM_DAT_SCL (3<<13) /* Bit 14..13: dat reg Scaling factor*/
X #define PCI_PM_DAT_SEL (0xf<<9) /* Bit 12.. 9: PM data selector field*/
-#define PCI_PME_EN (1<<8) /* Bit 8: PGA doesn't sup. PME# */
- /* Bit 7.. 2: reserved */
+#define PCI_PME_EN (1<<8) /* Bit 8: PGA doesn't sup. PME# */
+ /* Bit 7.. 2: reserved */
X #define PCI_PM_STATE (3<<0) /* Bit 1.. 0: Power Management State*/
X #define PCI_PM_STATE_D0 (0<<0) /* D0: Operational (default) */
X #define PCI_PM_STATE_D1 (1<<0) /* D1: not supported */
@@ -385,22 +390,22 @@
X * Control Register File:
X * Bank 0
X */
-#define B0_RAP 0x0000 /* 8 bit Register Address Port */
+#define B0_RAP 0x0000 /* 8 bit Register Address Port */
X /* 0x0001 - 0x0003: reserved */
-#define B0_CTST 0x0004 /* 16 bit Control/Status register */
-#define B0_LED 0x0006 /* 8 Bit LED register */
+#define B0_CTST 0x0004 /* 16 bit Control/Status register */
+#define B0_LED 0x0006 /* 8 Bit LED register */
X /* 0x0007: reserved */
-#define B0_ISRC 0x0008 /* 32 bit Interrupt Source Register */
-#define B0_IMSK 0x000c /* 32 bit Interrupt Mask Register */
-#define B0_HWE_ISRC 0x0010 /* 32 bit HW Error Interrupt Src Reg */
-#define B0_HWE_IMSK 0x0014 /* 32 bit HW Error Interrupt Mask Reg */
-#define B0_SP_ISRC 0x0018 /* 32 bit Special Interrupt Source Reg */
+#define B0_ISRC 0x0008 /* 32 bit Interrupt Source Register */
+#define B0_IMSK 0x000c /* 32 bit Interrupt Mask Register */
+#define B0_HWE_ISRC 0x0010 /* 32 bit HW Error Interrupt Src Reg */
+#define B0_HWE_IMSK 0x0014 /* 32 bit HW Error Interrupt Mask Reg */
+#define B0_SP_ISRC 0x0018 /* 32 bit Special Interrupt Source Reg */
X /* 0x001c: reserved */
X
X /* B0 XMAC 1 registers */
-#define B0_XM1_IMSK 0x0020 /* 16 bit r/w XMAC 1 Interrupt Mask Register*/
+#define B0_XM1_IMSK 0x0020 /* 16 bit r/w XMAC 1 Interrupt Mask Register*/
X /* 0x0022 - 0x0027 reserved */
-#define B0_XM1_ISRC 0x0028 /* 16 bit ro XMAC 1 Interrupt Status Reg */
+#define B0_XM1_ISRC 0x0028 /* 16 bit ro XMAC 1 Interrupt Status Reg */
X /* 0x002a - 0x002f reserved */
X #define B0_XM1_PHY_ADDR 0x0030 /* 16 bit r/w XMAC 1 PHY Address Register */
X /* 0x0032 - 0x0033 reserved */
@@ -408,9 +413,9 @@
X /* 0x0036 - 0x003f reserved */
X
X /* B0 XMAC 2 registers */
-#define B0_XM2_IMSK 0x0040 /* 16 bit r/w XMAC 2 Interrupt Mask Register*/
+#define B0_XM2_IMSK 0x0040 /* 16 bit r/w XMAC 2 Interrupt Mask Register*/
X /* 0x0042 - 0x0047 reserved */
-#define B0_XM2_ISRC 0x0048 /* 16 bit ro XMAC 2 Interrupt Status Reg */
+#define B0_XM2_ISRC 0x0048 /* 16 bit ro XMAC 2 Interrupt Status Reg */
X /* 0x004a - 0x004f reserved */
X #define B0_XM2_PHY_ADDR 0x0050 /* 16 bit r/w XMAC 2 PHY Address Register */
X /* 0x0052 - 0x0053 reserved */
@@ -418,12 +423,12 @@
X /* 0x0056 - 0x005f reserved */
X
X /* BMU Control Status Registers */
-#define B0_R1_CSR 0x0060 /* 32 bit BMU Ctrl/Stat Rx Queue 1 */
-#define B0_R2_CSR 0x0064 /* 32 bit BMU Ctrl/Stat Rx Queue 2 */
-#define B0_XS1_CSR 0x0068 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 1 */
-#define B0_XA1_CSR 0x006c /* 32 bit BMU Ctrl/Stat Async Tx Queue 1*/
-#define B0_XS2_CSR 0x0070 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */
-#define B0_XA2_CSR 0x0074 /* 32 bit BMU Ctrl/Stat Async Tx Queue 2*/
+#define B0_R1_CSR 0x0060 /* 32 bit BMU Ctrl/Stat Rx Queue 1 */
+#define B0_R2_CSR 0x0064 /* 32 bit BMU Ctrl/Stat Rx Queue 2 */
+#define B0_XS1_CSR 0x0068 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 1 */
+#define B0_XA1_CSR 0x006c /* 32 bit BMU Ctrl/Stat Async Tx Queue 1*/
+#define B0_XS2_CSR 0x0070 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */
+#define B0_XA2_CSR 0x0074 /* 32 bit BMU Ctrl/Stat Async Tx Queue 2*/
X /* x0078 - 0x007f reserved */
X
X /*
@@ -437,34 +442,34 @@
X */
X /* NA reg = 48 bit Network Address Register, 3x16 or 8x8 bit readable */
X
-#define B2_MAC_1 0x0100 /* NA reg MAC Address 1 */
+#define B2_MAC_1 0x0100 /* NA reg MAC Address 1 */
X /* 0x0106 - 0x0107 reserved */
-#define B2_MAC_2 0x0108 /* NA reg MAC Address 2 */
+#define B2_MAC_2 0x0108 /* NA reg MAC Address 2 */
X /* 0x010e - 0x010f reserved */
-#define B2_MAC_3 0x0110 /* NA reg MAC Address 3 */
+#define B2_MAC_3 0x0110 /* NA reg MAC Address 3 */
X /* 0x0116 - 0x0117 reserved */
-#define B2_CONN_TYP 0x0118 /* 8 bit Connector type */
-#define B2_PMD_TYP 0x0119 /* 8 bit PMD type */
-#define B2_MAC_CFG 0x011a /* 8 bit MAC Configuration */
-#define B2_CHIP_REV 0x011b /* 8 bit Queen Chip Revision Number */
+#define B2_CONN_TYP 0x0118 /* 8 bit Connector type */
+#define B2_PMD_TYP 0x0119 /* 8 bit PMD type */
+#define B2_MAC_CFG 0x011a /* 8 bit MAC Configuration */
+#define B2_CHIP_REV 0x011b /* 8 bit Queen Chip Revision Number */
X /* Eprom registers are currently of no use */
-#define B2_E_0 0x011c /* 8 bit EPROM Byte 0 */
-#define B2_E_1 0x011d /* 8 bit EPROM Byte 1 */
-#define B2_E_2 0x011e /* 8 bit EPROM Byte 2 */
-#define B2_E_3 0x011f /* 8 bit EPROM Byte 3 */
-#define B2_FAR 0x0120 /* 32 bit Flash-Prom Addr Reg/Cnt */
-#define B2_FDP 0x0124 /* 8 bit Flash-Prom Data Port */
+#define B2_E_0 0x011c /* 8 bit EPROM Byte 0 */
+#define B2_E_1 0x011d /* 8 bit EPROM Byte 1 */
+#define B2_E_2 0x011e /* 8 bit EPROM Byte 2 */
+#define B2_E_3 0x011f /* 8 bit EPROM Byte 3 */
+#define B2_FAR 0x0120 /* 32 bit Flash-Prom Addr Reg/Cnt */
+#define B2_FDP 0x0124 /* 8 bit Flash-Prom Data Port */
X /* 0x0125 - 0x0127: reserved */
-#define B2_LD_CRTL 0x0128 /* 8 bit EPROM loader control register */
-#define B2_LD_TEST 0x0129 /* 8 bit EPROM loader test register */
+#define B2_LD_CRTL 0x0128 /* 8 bit EPROM loader control register */
+#define B2_LD_TEST 0x0129 /* 8 bit EPROM loader test register */
X /* 0x012a - 0x012f: reserved */
-#define B2_TI_INI 0x0130 /* 32 bit Timer init value */
-#define B2_TI_VAL 0x0134 /* 32 bit Timer value */
-#define B2_TI_CRTL 0x0138 /* 8 bit Timer control */
-#define B2_TI_TEST 0x0139 /* 8 Bit Timer Test */
+#define B2_TI_INI 0x0130 /* 32 bit Timer init value */
+#define B2_TI_VAL 0x0134 /* 32 bit Timer value */
+#define B2_TI_CRTL 0x0138 /* 8 bit Timer control */
+#define B2_TI_TEST 0x0139 /* 8 Bit Timer Test */
X /* 0x013a - 0x013f: reserved */
-#define B2_IRQM_INI 0x0140 /* 32 bit IRQ Moderation Timer Init Reg.*/
-#define B2_IRQM_VAL 0x0144 /* 32 bit IRQ Moderation Timer Value */
+#define B2_IRQM_INI 0x0140 /* 32 bit IRQ Moderation Timer Init Reg.*/
+#define B2_IRQM_VAL 0x0144 /* 32 bit IRQ Moderation Timer Value */
X #define B2_IRQM_CTRL 0x0148 /* 8 bit IRQ Moderation Timer Control */
X #define B2_IRQM_TEST 0x0149 /* 8 bit IRQ Moderation Timer Test */
X #define B2_IRQM_MSK 0x014c /* 32 bit IRQ Moderation Mask */
@@ -473,22 +478,22 @@
X #define B2_TST_CTRL1 0x0158 /* 8 bit Test Control Register 1 */
X #define B2_TST_CTRL2 0x0159 /* 8 bit Test Control Register 2 */
X /* 0x015a - 0x015b: reserved */
-#define B2_GP_IO 0x015c /* 32 bit General Purpose IO Register */
-#define B2_I2C_CTRL 0x0160 /* 32 bit I2C HW Control Register */
-#define B2_I2C_DATA 0x0164 /* 32 bit I2C HW Data Register */
-#define B2_I2C_IRQ 0x0168 /* 32 bit I2C HW IRQ Register */
-#define B2_I2C_SW 0x016c /* 32 bit I2C SW Port Register */
-#define B2_BSC_INI 0x0170 /* 32 bit Blink Source Counter Init Val */
-#define B2_BSC_VAL 0x0174 /* 32 bit Blink Source Counter Value */
-#define B2_BSC_CTRL 0x0178 /* 8 bit Blink Source Counter Control */
-#define B2_BSC_STAT 0x0179 /* 8 bit Blink Source Counter Status */
-#define B2_BSC_TST 0x017a /* 16 bit Blink Source Counter Test Reg */
+#define B2_GP_IO 0x015c /* 32 bit General Purpose IO Register */
+#define B2_I2C_CTRL 0x0160 /* 32 bit I2C HW Control Register */
+#define B2_I2C_DATA 0x0164 /* 32 bit I2C HW Data Register */
+#define B2_I2C_IRQ 0x0168 /* 32 bit I2C HW IRQ Register */
+#define B2_I2C_SW 0x016c /* 32 bit I2C SW Port Register */
+#define B2_BSC_INI 0x0170 /* 32 bit Blink Source Counter Init Val */
+#define B2_BSC_VAL 0x0174 /* 32 bit Blink Source Counter Value */
+#define B2_BSC_CTRL 0x0178 /* 8 bit Blink Source Counter Control */
+#define B2_BSC_STAT 0x0179 /* 8 bit Blink Source Counter Status */
+#define B2_BSC_TST 0x017a /* 16 bit Blink Source Counter Test Reg */
X /* 0x017c - 0x017f: reserved */
X
X /*
X * Bank 3
X */
-#define B3_RAM_ADDR 0x0180 /* 32 bit RAM Address, to read or write */
+#define B3_RAM_ADDR 0x0180 /* 32 bit RAM Address, to read or write */
X #define B3_RAM_DATA_LO 0x0184 /* 32 bit RAM Data Word (low dWord) */
X #define B3_RAM_DATA_HI 0x0188 /* 32 bit RAM Data Word (high dWord) */
X /* 0x018c - 0x018f: reserved */
@@ -512,8 +517,8 @@
X #define B3_RI_RTO_XS2 0x019b /* 8 bit RAM Iface RD Timeout Queue XS2 (TO11)*/
X #define B3_RI_TO_VAL 0x019c /* 8 bit RAM Iface Current Timeout Count Val */
X /* 0x019d - 0x019f reserved */
-#define B3_RI_CTRL 0x01a0 /* 16 bit RAM Iface Control Register */
-#define B3_RI_TEST 0x01a2 /* 8 bit RAM Iface Test Register */
+#define B3_RI_CTRL 0x01a0 /* 16 bit RAM Iface Control Register */
+#define B3_RI_TEST 0x01a2 /* 8 bit RAM Iface Test Register */
X /* 0x01a3 - 0x01af reserved */
X /* MAC Arbiter Registers */
X /* Please notice these are the number of qWord tranfered continously and */
@@ -566,42 +571,42 @@
X */
X
X /* Transmit Arbiter Registers MAC 1 and 2, user MR_ADDR() to address */
-#define TXA_ITI_INI 0x0200 /* 32 bit Tx Arb Interval Timer Init Val*/
-#define TXA_ITI_VAL 0x0204 /* 32 bit Tx Arb Interval Timer Value */
-#define TXA_LIM_INI 0x0208 /* 32 bit Tx Arb Limit Counter Init Val */
-#define TXA_LIM_VAL 0x020c /* 32 bit Tx Arb Limit Counter Value */
-#define TXA_CTRL 0x0210 /* 8 bit Tx Arbiter Control Register */
-#define TXA_TEST 0x0211 /* 8 bit Tx Arbiter Test Register */
-#define TXA_STAT 0x0212 /* 8 bit Tx Arbiter Status Register */
+#define TXA_ITI_INI 0x0200 /* 32 bit Tx Arb Interval Timer Init Val*/
+#define TXA_ITI_VAL 0x0204 /* 32 bit Tx Arb Interval Timer Value */
+#define TXA_LIM_INI 0x0208 /* 32 bit Tx Arb Limit Counter Init Val */
+#define TXA_LIM_VAL 0x020c /* 32 bit Tx Arb Limit Counter Value */
+#define TXA_CTRL 0x0210 /* 8 bit Tx Arbiter Control Register */
+#define TXA_TEST 0x0211 /* 8 bit Tx Arbiter Test Register */
+#define TXA_STAT 0x0212 /* 8 bit Tx Arbiter Status Register */
X /* 0x0213 - 0x027f: reserved */
X
X /*
X * Bank 6
X */
X /* External registers */
-#define B6_EXT_REG 0x0300
+#define B6_EXT_REG 0x0300
X
X /*
X * Bank 7
X */
X /* This is a copy of the Configuration register file (lower half) */
-#define B7_CFG_SPC 0x0380
+#define B7_CFG_SPC 0x0380
X
X /*
X * Bank 8 - 15
X */
X /* Receive and Transmit Queue Registers, use Q_ADDR() to access */
-#define B8_Q_REGS 0x0400
+#define B8_Q_REGS 0x0400
X
X /* Queue Register Offsets, use Q_ADDR() to access */
-#define Q_D 0x00 /* 8*32 bit Current Descriptor */
+#define Q_D 0x00 /* 8*32 bit Current Descriptor */
X #define Q_DA_L 0x20 /* 32 bit Current Descriptor Address Low dWord */
X #define Q_DA_H 0x24 /* 32 bit Current Descriptor Address High dWord */
X #define Q_AC_L 0x28 /* 32 bit Current Address Counter Low dWord */
X #define Q_AC_H 0x2c /* 32 bit Current Address Counter High dWord */
X #define Q_BC 0x30 /* 32 bit Current Byte Counter */
X #define Q_CSR 0x34 /* 32 bit BMU Control/Status Register */
-#define Q_F 0x38 /* 32 bit Flag Register */
+#define Q_F 0x38 /* 32 bit Flag Register */
X #define Q_T1 0x3c /* 32 bit Test Register 1 */
X #define Q_T1_TR 0x3c /* 8 bit Test Register 1 Transfer SM */
X #define Q_T1_WR 0x3d /* 8 bit Test Register 1 Write Descriptor SM */
@@ -639,64 +644,64 @@
X * Bank 24 - 25
X */
X /* Receive MAC FIFO, Receive LED, and Link Sync regs, use MR_ADDR() to address*/
-#define RX_MFF_EA 0x0c00 /* 32 bit Receive MAC FIFO End Address */
-#define RX_MFF_WP 0x0c04 /* 32 bit Receive MAC FIFO Write Pointer*/
+#define RX_MFF_EA 0x0c00 /* 32 bit Receive MAC FIFO End Address */
+#define RX_MFF_WP 0x0c04 /* 32 bit Receive MAC FIFO Write Pointer*/
X /* 0x0c08 - 0x0c0b reserved */
-#define RX_MFF_RP 0x0c0c /* 32 bit Receive MAC FIFO Read Pointer */
-#define RX_MFF_PC 0x0c10 /* 32 bit Receive MAC FIFO Packet Cnt */
-#define RX_MFF_LEV 0x0c14 /* 32 bit Receive MAC FIFO Level */
+#define RX_MFF_RP 0x0c0c /* 32 bit Receive MAC FIFO Read Pointer */
+#define RX_MFF_PC 0x0c10 /* 32 bit Receive MAC FIFO Packet Cnt */
+#define RX_MFF_LEV 0x0c14 /* 32 bit Receive MAC FIFO Level */
X #define RX_MFF_CTRL1 0x0c18 /* 16 bit Receive MAC FIFO Control Reg 1*/
X #define RX_MFF_STAT_TO 0x0c1a /* 8 bit Receive MAC Status Timeout */
X #define RX_MFF_TIST_TO 0x0c1b /* 8 bit Receive MAC Timestamp Timeout */
X #define RX_MFF_CTRL2 0x0c1c /* 8 bit Receive MAC FIFO Control Reg 2*/
-#define RX_MFF_TST1 0x0c1d /* 8 bit Receive MAC FIFO Test Reg 1 */
-#define RX_MFF_TST2 0x0c1e /* 8 bit Receive MAC FIFO Test Reg 2 */
+#define RX_MFF_TST1 0x0c1d /* 8 bit Receive MAC FIFO Test Reg 1 */
+#define RX_MFF_TST2 0x0c1e /* 8 bit Receive MAC FIFO Test Reg 2 */
X /* 0x0c1f reserved */
-#define RX_LED_INI 0x0c20 /* 32 bit Receive LED Cnt Init Value */
-#define RX_LED_VAL 0x0c24 /* 32 bit Receive LED Cnt Current Value */
-#define RX_LED_CTRL 0x0c28 /* 8 bit Receive LED Cnt Control Reg */
-#define RX_LED_TST 0x0c29 /* 8 bit Receive LED Cnt Test Register */
+#define RX_LED_INI 0x0c20 /* 32 bit Receive LED Cnt Init Value */
+#define RX_LED_VAL 0x0c24 /* 32 bit Receive LED Cnt Current Value */
+#define RX_LED_CTRL 0x0c28 /* 8 bit Receive LED Cnt Control Reg */
+#define RX_LED_TST 0x0c29 /* 8 bit Receive LED Cnt Test Register */
X /* 0x0c2a - 0x0c2f reserved */
X #define LNK_SYNC_INI 0x0c30 /* 32 bit Link Sync Cnt Init Value */
X #define LNK_SYNC_VAL 0x0c34 /* 32 bit Link Sync Cnt Current Value */
X #define LNK_SYNC_CTRL 0x0c38 /* 8 bit Link Sync Cnt Control Register*/
X #define LNK_SYNC_TST 0x0c39 /* 8 bit Link Sync Cnt Test Register */
X /* 0x0c3a - 0x0c3b reserved */
-#define LNK_LED_REG 0x0c3c /* 8 bit Link LED Register */
+#define LNK_LED_REG 0x0c3c /* 8 bit Link LED Register */
X /* 0x0c3d - 0x0c7f reserved */
X
X /*
X * Bank 26 - 27
X */
X /* Transmit MAC FIFO and Transmit LED Registers, use MR_ADDR() to address */
-#define TX_MFF_EA 0x0d00 /* 32 bit Transmit MAC FIFO End Address */
-#define TX_MFF_WP 0x0d04 /* 32 bit Transmit MAC FIFO WR Pointer */
-#define TX_MFF_WSP 0x0d08 /* 32 bit Transmit MAC FIFO WR Shadow Pt*/
-#define TX_MFF_RP 0x0d0c /* 32 bit Transmit MAC FIFO RD Pointer */
-#define TX_MFF_PC 0x0d10 /* 32 bit Transmit MAC FIFO Packet Cnt */
-#define TX_MFF_LEV 0x0d14 /* 32 bit Transmit MAC FIFO Level */
+#define TX_MFF_EA 0x0d00 /* 32 bit Transmit MAC FIFO End Address */
+#define TX_MFF_WP 0x0d04 /* 32 bit Transmit MAC FIFO WR Pointer */
+#define TX_MFF_WSP 0x0d08 /* 32 bit Transmit MAC FIFO WR Shadow Pt*/
+#define TX_MFF_RP 0x0d0c /* 32 bit Transmit MAC FIFO RD Pointer */
+#define TX_MFF_PC 0x0d10 /* 32 bit Transmit MAC FIFO Packet Cnt */
+#define TX_MFF_LEV 0x0d14 /* 32 bit Transmit MAC FIFO Level */
X #define TX_MFF_CTRL1 0x0d18 /* 16 bit Transmit MAC FIFO Ctrl Reg 1 */
-#define TX_MFF_WAF 0x0d1a /* 8 bit Transmit MAC Wait after flush*/
+#define TX_MFF_WAF 0x0d1a /* 8 bit Transmit MAC Wait after flush*/
X /* 0x0c1b reserved */
X #define TX_MFF_CTRL2 0x0d1c /* 8 bit Transmit MAC FIFO Ctrl Reg 2 */
-#define TX_MFF_TST1 0x0d1d /* 8 bit Transmit MAC FIFO Test Reg 1 */
-#define TX_MFF_TST2 0x0d1e /* 8 bit Transmit MAC FIFO Test Reg 2 */
+#define TX_MFF_TST1 0x0d1d /* 8 bit Transmit MAC FIFO Test Reg 1 */
+#define TX_MFF_TST2 0x0d1e /* 8 bit Transmit MAC FIFO Test Reg 2 */
X /* 0x0d1f reserved */
-#define TX_LED_INI 0x0d20 /* 32 bit Transmit LED Cnt Init Value */
-#define TX_LED_VAL 0x0d24 /* 32 bit Transmit LED Cnt Current Val */
-#define TX_LED_CTRL 0x0d28 /* 8 bit Transmit LED Cnt Control Reg */
-#define TX_LED_TST 0x0d29 /* 8 bit Transmit LED Cnt Test Register*/
+#define TX_LED_INI 0x0d20 /* 32 bit Transmit LED Cnt Init Value */
+#define TX_LED_VAL 0x0d24 /* 32 bit Transmit LED Cnt Current Val */
+#define TX_LED_CTRL 0x0d28 /* 8 bit Transmit LED Cnt Control Reg */
+#define TX_LED_TST 0x0d29 /* 8 bit Transmit LED Cnt Test Register*/
X /* 0x0d2a - 0x0d7f reserved */
X
X /*
X * Bank 28
X */
X /* Descriptor Poll Timer Registers */
-#define B28_DPT_INI 0x0e00 /* 32 bit Descriptor Poll Timer Init Val*/
-#define B28_DPT_VAL 0x0e04 /* 32 bit Descriptor Poll Timer Curr Val*/
+#define B28_DPT_INI 0x0e00 /* 32 bit Descriptor Poll Timer Init Val*/
+#define B28_DPT_VAL 0x0e04 /* 32 bit Descriptor Poll Timer Curr Val*/
X #define B28_DPT_CTRL 0x0e08 /* 8 bit Descriptor Poll Timer Ctrl Reg*/
X /* 0x0e09: reserved */
-#define B28_DPT_TST 0x0e0a /* 8 bit Descriptor Poll Timer Test Reg*/
+#define B28_DPT_TST 0x0e0a /* 8 bit Descriptor Poll Timer Test Reg*/
X /* 0x0e0b - 0x0e8f: reserved */
X
X /*
@@ -736,7 +741,7 @@
X */
X /* B0_RAP 8 bit Register Address Port */
X /* Bit 7: reserved */
-#define RAP_RAP 0x3f /* Bit 6..0: 0 = block 0, .., 6f = block 6f*/
+#define RAP_RAP 0x3f /* Bit 6..0: 0 = block 0, .., 6f = block 6f*/
X
X /* B0_CTST 16 bit Control/Status register */
X /* Bit 15..10: reserved */
@@ -746,70 +751,70 @@
X #define CS_CL_SW_IRQ (1<<6) /* Bit 6: Clear IRQ SW Request */
X #define CS_STOP_DONE (1<<5) /* Bit 5: Stop Master is finished */
X #define CS_STOP_MAST (1<<4) /* Bit 4: Command Bit to stop the master*/
-#define CS_MRST_CLR (1<<3) /* Bit 3: Clear Master reset */
-#define CS_MRST_SET (1<<2) /* Bit 2: Set Master reset */
-#define CS_RST_CLR (1<<1) /* Bit 1: Clear Software reset */
-#define CS_RST_SET (1<<0) /* Bit 0: Set Software reset */
+#define CS_MRST_CLR (1<<3) /* Bit 3: Clear Master reset */
+#define CS_MRST_SET (1<<2) /* Bit 2: Set Master reset */
+#define CS_RST_CLR (1<<1) /* Bit 1: Clear Software reset */
+#define CS_RST_SET (1<<0) /* Bit 0: Set Software reset */
X
X /* B0_LED 8 Bit LED register */
X /* Bit 7..2: reserved */
-#define LED_STAT_ON (1<<1) /* Bit 1: Status LED on */
+#define LED_STAT_ON (1<<1) /* Bit 1: Status LED on */
X #define LED_STAT_OFF (1<<0) /* Bit 0: Status LED off */
X
X /* B0_ISRC 32 bit Interrupt Source Register */
X /* B0_IMSK 32 bit Interrupt Mask Register */
X /* B0_SP_ISRC 32 bit Special Interrupt Source Reg */
X /* B2_IRQM_MSK 32 bit IRQ Moderation Mask */
-#define IS_ALL_MSK 0xbfffffffL /* All Interrupt bits */
-#define IS_HW_ERR (1UL<<31) /* Bit 31: Interrupt HW Error */
- /* Bit 30: reserved */
+#define IS_ALL_MSK 0xbfffffffL /* All Interrupt bits */
+#define IS_HW_ERR (1UL<<31) /* Bit 31: Interrupt HW Error */
+ /* Bit 30: reserved */
X #define IS_PA_TO_RX1 (1L<<29) /* Bit 29: Packet Arb Timeout Rx1*/
X #define IS_PA_TO_RX2 (1L<<28) /* Bit 28: Packet Arb Timeout Rx2*/
X #define IS_PA_TO_TX1 (1L<<27) /* Bit 27: Packet Arb Timeout Tx1*/
X #define IS_PA_TO_TX2 (1L<<26) /* Bit 26: Packet Arb Timeout Tx2*/
X #define IS_I2C_READY (1L<<25) /* Bit 25: IRQ on end of I2C tx */
-#define IS_IRQ_SW (1L<<24) /* Bit 24: SW forced IRQ */
-#define IS_EXT_REG (1L<<23) /* Bit 23: IRQ from external reg */
-#define IS_TIMINT (1L<<22) /* Bit 22: IRQ from Timer */
-#define IS_MAC1 (1L<<21) /* Bit 21: IRQ from MAC 1 */
+#define IS_IRQ_SW (1L<<24) /* Bit 24: SW forced IRQ */
+#define IS_EXT_REG (1L<<23) /* Bit 23: IRQ from external reg */
+#define IS_TIMINT (1L<<22) /* Bit 22: IRQ from Timer */
+#define IS_MAC1 (1L<<21) /* Bit 21: IRQ from MAC 1 */
X #define IS_LNK_SYNC_M1 (1L<<20) /* Bit 20: Link Sync Cnt wrap M1 */
-#define IS_MAC2 (1L<<19) /* Bit 19: IRQ from MAC 2 */
+#define IS_MAC2 (1L<<19) /* Bit 19: IRQ from MAC 2 */
X #define IS_LNK_SYNC_M2 (1L<<18) /* Bit 18: Link Sync Cnt wrap M2 */
X /* Receive Queue 1 */
-#define IS_R1_B (1L<<17) /* Bit 17: Q_R1 End of Buffer */
-#define IS_R1_F (1L<<16) /* Bit 16: Q_R1 End of Frame */
-#define IS_R1_C (1L<<15) /* Bit 15: Q_R1 Encoding Error */
+#define IS_R1_B (1L<<17) /* Bit 17: Q_R1 End of Buffer */
+#define IS_R1_F (1L<<16) /* Bit 16: Q_R1 End of Frame */
+#define IS_R1_C (1L<<15) /* Bit 15: Q_R1 Encoding Error */
X /* Receive Queue 2 */
-#define IS_R2_B (1L<<14) /* Bit 14: Q_R2 End of Buffer */
-#define IS_R2_F (1L<<13) /* Bit 13: Q_R2 End of Frame */
-#define IS_R2_C (1L<<12) /* Bit 12: Q_R2 Encoding Error */
+#define IS_R2_B (1L<<14) /* Bit 14: Q_R2 End of Buffer */
+#define IS_R2_F (1L<<13) /* Bit 13: Q_R2 End of Frame */
+#define IS_R2_C (1L<<12) /* Bit 12: Q_R2 Encoding Error */
X /* Synchronous Transmit Queue 1 */
-#define IS_XS1_B (1L<<11) /* Bit 11: Q_XS1 End of Buffer */
-#define IS_XS1_F (1L<<10) /* Bit 10: Q_XS1 End of Frame */
-#define IS_XS1_C (1L<<9) /* Bit 9: Q_XS1 Encoding Error */
+#define IS_XS1_B (1L<<11) /* Bit 11: Q_XS1 End of Buffer */
+#define IS_XS1_F (1L<<10) /* Bit 10: Q_XS1 End of Frame */
+#define IS_XS1_C (1L<<9) /* Bit 9: Q_XS1 Encoding Error */
X /* Asynchronous Transmit Queue 1 */
-#define IS_XA1_B (1L<<8) /* Bit 8: Q_XA1 End of Buffer */
-#define IS_XA1_F (1L<<7) /* Bit 7: Q_XA1 End of Frame */
-#define IS_XA1_C (1L<<6) /* Bit 6: Q_XA1 Encoding Error */
+#define IS_XA1_B (1L<<8) /* Bit 8: Q_XA1 End of Buffer */
+#define IS_XA1_F (1L<<7) /* Bit 7: Q_XA1 End of Frame */
+#define IS_XA1_C (1L<<6) /* Bit 6: Q_XA1 Encoding Error */
X /* Synchronous Transmit Queue 2 */
-#define IS_XS2_B (1L<<5) /* Bit 5: Q_XS2 End of Buffer */
-#define IS_XS2_F (1L<<4) /* Bit 4: Q_XS2 End of Frame */
-#define IS_XS2_C (1L<<3) /* Bit 3: Q_XS2 Encoding Error */
+#define IS_XS2_B (1L<<5) /* Bit 5: Q_XS2 End of Buffer */
+#define IS_XS2_F (1L<<4) /* Bit 4: Q_XS2 End of Frame */
+#define IS_XS2_C (1L<<3) /* Bit 3: Q_XS2 Encoding Error */
X /* Asynchronous Transmit Queue 2 */
-#define IS_XA2_B (1L<<2) /* Bit 2: Q_XA2 End of Buffer */
-#define IS_XA2_F (1L<<1) /* Bit 1: Q_XA2 End of Frame */
-#define IS_XA2_C (1L<<0) /* Bit 0: Q_XA2 Encoding Error */
+#define IS_XA2_B (1L<<2) /* Bit 2: Q_XA2 End of Buffer */
+#define IS_XA2_F (1L<<1) /* Bit 1: Q_XA2 End of Frame */
+#define IS_XA2_C (1L<<0) /* Bit 0: Q_XA2 Encoding Error */
X
X
X /* B0_HWE_ISRC 32 bit HW Error Interrupt Src Reg */
X /* B0_HWE_IMSK 32 bit HW Error Interrupt Mask Reg */
X /* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */
-#define IS_ERR_MSK 0x00000fffL /* All Error bits */
- /* Bit 31..12: reserved */
+#define IS_ERR_MSK 0x00000fffL /* All Error bits */
+ /* Bit 31..12: reserved */
X #define IS_IRQ_MST_ERR (1L<<11) /* Bit 11: IRQ master error */
- /* PERR,RMABORT,RTABORT,DATAPERR */
-#define IS_IRQ_STAT (1L<<10) /* Bit 10: IRQ status execption */
- /* RMABORT, RTABORT, DATAPERR */
+ /* PERR,RMABORT,RTABORT,DATAPERR */
+#define IS_IRQ_STAT (1L<<10) /* Bit 10: IRQ status execption */
+ /* RMABORT, RTABORT, DATAPERR */
X #define IS_NO_STAT_M1 (1L<<9) /* Bit 9: No Rx Status from MAC1*/
X #define IS_NO_STAT_M2 (1L<<8) /* Bit 8: No Rx Status from MAC2*/
X #define IS_NO_TIST_M1 (1L<<7) /* Bit 7: No Timestamp from MAC1*/
@@ -826,53 +831,53 @@
X /* Values of connector and PMD type comply to SysKonnect internal std */
X
X /* B2_MAC_CFG 8 bit MAC Configuration */
- /* Bit 7..2: reserved */
+ /* Bit 7..2: reserved */
X #define CFG_DIS_M2_CLK (1<<1) /* Bit 1: Disable Clock for 2nd MAC */
-#define CFG_SNG_MAC (1<<0) /* Bit 0: MAC Config: 1=2 MACs / 0=1 MAC*/
+#define CFG_SNG_MAC (1<<0) /* Bit 0: MAC Config: 1=2 MACs / 0=1 MAC*/
X
X /* B2_CHIP_REV 8 bit Queen Chip Revision Number */
X #define FIRST_CHIP_REV 0x0a /* Initial Revision Value */
X
X /* B2_FAR 32 bit Flash-Prom Addr Reg/Cnt */
-#define FAR_ADDR 0x1ffffL /* Bit 16..0: FPROM Address mask */
+#define FAR_ADDR 0x1ffffL /* Bit 16..0: FPROM Address mask */
X
X /* B2_LD_CRTL 8 bit EPROM loader control register */
X /* Bits are currently reserved */
X
X /* B2_LD_TEST 8 bit EPROM loader test register */
- /* Bit 7..4: reserved */
-#define LD_T_ON (1<<3) /* Bit 3: Loader Testmode on */
-#define LD_T_OFF (1<<2) /* Bit 2: Loader Testmode off */
-#define LD_T_STEP (1<<1) /* Bit 1: Decrement FPROM addr. Counter */
-#define LD_START (1<<0) /* Bit 0: Start loading FPROM */
+ /* Bit 7..4: reserved */
+#define LD_T_ON (1<<3) /* Bit 3: Loader Testmode on */
+#define LD_T_OFF (1<<2) /* Bit 2: Loader Testmode off */
+#define LD_T_STEP (1<<1) /* Bit 1: Decrement FPROM addr. Counter */
+#define LD_START (1<<0) /* Bit 0: Start loading FPROM */
X
X /*
X * Timer Section
X */
X /* B2_TI_CRTL 8 bit Timer control */
X /* B2_IRQM_CTRL 8 bit IRQ Moderation Timer Control */
- /* Bit 7..3: reserved */
-#define TIM_START (1<<2) /* Bit 2: Start Timer */
-#define TIM_STOP (1<<1) /* Bit 1: Stop Timer */
-#define TIM_CLR_IRQ (1<<0) /* Bit 0: Clear Timer IRQ, (!IRQM) */
+ /* Bit 7..3: reserved */
+#define TIM_START (1<<2) /* Bit 2: Start Timer */
+#define TIM_STOP (1<<1) /* Bit 1: Stop Timer */
+#define TIM_CLR_IRQ (1<<0) /* Bit 0: Clear Timer IRQ, (!IRQM) */
X
X /* B2_TI_TEST 8 Bit Timer Test */
X /* B2_IRQM_TEST 8 bit IRQ Moderation Timer Test */
X /* B28_DPT_TST 8 bit Descriptor Poll Timer Test Reg */
- /* Bit 7..3: reserved */
-#define TIM_T_ON (1<<2) /* Bit 2: Test mode on */
-#define TIM_T_OFF (1<<1) /* Bit 1: Test mode off */
-#define TIM_T_STEP (1<<0) /* Bit 0: Test step */
+ /* Bit 7..3: reserved */
+#define TIM_T_ON (1<<2) /* Bit 2: Test mode on */
+#define TIM_T_OFF (1<<1) /* Bit 1: Test mode off */
+#define TIM_T_STEP (1<<0) /* Bit 0: Test step */
X
X /* B28_DPT_INI 32 bit Descriptor Poll Timer Init Val */
X /* B28_DPT_VAL 32 bit Descriptor Poll Timer Curr Val */
- /* Bit 31..24: reserved */
-#define DPT_MSK 0x00ffffffL /* Bit 23.. 0: Desc Poll Timer Bits */
+ /* Bit 31..24: reserved */
+#define DPT_MSK 0x00ffffffL /* Bit 23.. 0: Desc Poll Timer Bits */
X
X /* B28_DPT_CTRL 8 bit Descriptor Poll Timer Ctrl Reg */
- /* Bit 7..2: reserved */
-#define DPT_START (1<<1) /* Bit 1: Start Desciptor Poll Timer */
-#define DPT_STOP (1<<0) /* Bit 0: Stop Desciptor Poll Timer */
+ /* Bit 7..2: reserved */
+#define DPT_START (1<<1) /* Bit 1: Start Desciptor Poll Timer */
+#define DPT_STOP (1<<0) /* Bit 0: Stop Desciptor Poll Timer */
X
X
X /* B2_TST_CTRL1 8 bit Test Control Register 1 */
@@ -886,7 +891,7 @@
X #define TST_CFG_WRITE_OFF (1<<0) /* Bit 0: Disable Config Reg WR */
X
X /* B2_TST_CTRL2 8 bit Test Control Register 2 */
- /* Bit 7..4: reserved */
+ /* Bit 7..4: reserved */
X /* force the following error on */
X /* the next master read/write */
X #define TST_FRC_DPERR_MR64 (1<<3) /* Bit 3: DataPERR RD 64 */
@@ -895,7 +900,7 @@
X #define TST_FRC_APERR_2M64 (1<<0) /* Bit 0: AddrPERR on 2. phase */
X
X /* B2_GP_IO 32 bit General Purpose IO Register */


- /* Bit 31..26: reserved */
+ /* Bit 31..26: reserved */

X #define GP_DIR_9 (1L<<25) /* Bit 25: IO_9 direct, 0=I/1=O */
X #define GP_DIR_8 (1L<<24) /* Bit 24: IO_8 direct, 0=I/1=O */
X #define GP_DIR_7 (1L<<23) /* Bit 23: IO_7 direct, 0=I/1=O */
@@ -906,7 +911,7 @@
X #define GP_DIR_2 (1L<<18) /* Bit 18: IO_2 direct, 0=I/1=O */
X #define GP_DIR_1 (1L<<17) /* Bit 17: IO_1 direct, 0=I/1=O */
X #define GP_DIR_0 (1L<<16) /* Bit 16: IO_0 direct, 0=I/1=O */


- /* Bit 15..10: reserved */
+ /* Bit 15..10: reserved */

X #define GP_IO_9 (1L<<9) /* Bit 9: IO_9 pin */
X #define GP_IO_8 (1L<<8) /* Bit 8: IO_8 pin */
X #define GP_IO_7 (1L<<7) /* Bit 7: IO_7 pin */
@@ -919,31 +924,31 @@
X #define GP_IO_0 (1L<<0) /* Bit 0: IO_0 pin */
X
X /* B2_I2C_CTRL 32 bit I2C HW Control Register */
-#define I2C_FLAG (1UL<<31) /* Bit 31: Start read/write if WR*/
+#define I2C_FLAG (1UL<<31) /* Bit 31: Start read/write if WR*/
X #define I2C_ADDR (0x7fffL<<16) /* Bit 30..16: Addr to be RD/WR */
-#define I2C_DEV_SEL (0x7fL<<9) /* Bit 15.. 9: I2C Device Select */
- /* Bit 8.. 5: reserved */
+#define I2C_DEV_SEL (0x7fL<<9) /* Bit 15.. 9: I2C Device Select */
+ /* Bit 8.. 5: reserved */
X #define I2C_BURST_LEN (1L<<4) /* Bit 4: Burst Len, 1/4 bytes */
X #define I2C_DEV_SIZE (7L<<1) /* Bit 3.. 1: I2C Device Size */
X #define I2C_025K_DEV (0L<<1) /* 0: 256 Bytes or smal. */
-#define I2C_05K_DEV (1L<<1) /* 1: 512 Bytes */
-#define I2C_1K_DEV (2L<<1) /* 2: 1024 Bytes */
-#define I2C_2K_DEV (3L<<1) /* 3: 2048 Bytes */
-#define I2C_4K_DEV (4L<<1) /* 4: 4096 Bytes */
-#define I2C_8K_DEV (5L<<1) /* 5: 8192 Bytes */
-#define I2C_16K_DEV (6L<<1) /* 6: 16384 Bytes */
-#define I2C_32K_DEV (7L<<1) /* 7: 32768 Bytes */
-#define I2C_STOP (1L<<0) /* Bit 0: Interrupt I2C transfer*/
+#define I2C_05K_DEV (1L<<1) /* 1: 512 Bytes */
+#define I2C_1K_DEV (2L<<1) /* 2: 1024 Bytes */
+#define I2C_2K_DEV (3L<<1) /* 3: 2048 Bytes */
+#define I2C_4K_DEV (4L<<1) /* 4: 4096 Bytes */
+#define I2C_8K_DEV (5L<<1) /* 5: 8192 Bytes */
+#define I2C_16K_DEV (6L<<1) /* 6: 16384 Bytes */
+#define I2C_32K_DEV (7L<<1) /* 7: 32768 Bytes */
+#define I2C_STOP (1L<<0) /* Bit 0: Interrupt I2C transfer*/
X
X /* B2_I2C_IRQ 32 bit I2C HW IRQ Register */
- /* Bit 31..1 reserved */
-#define I2C_CLR_IRQ (1<<0) /* Bit 0: Clear I2C IRQ */
+ /* Bit 31..1 reserved */
+#define I2C_CLR_IRQ (1<<0) /* Bit 0: Clear I2C IRQ */
X
X /* B2_I2C_SW 32 bit I2C HW SW Port Register */
- /* Bit 7..3: reserved */
+ /* Bit 7..3: reserved */
X #define I2C_DATA_DIR (1<<2) /* Bit 2: direction of I2C_DATA */
-#define I2C_DATA (1<<1) /* Bit 1: I2C Data Port */
-#define I2C_CLK (1<<0) /* Bit 0: I2C Clock Port */
+#define I2C_DATA (1<<1) /* Bit 1: I2C Data Port */
+#define I2C_CLK (1<<0) /* Bit 0: I2C Clock Port */
X
X /*
X * I2C Address
@@ -952,12 +957,12 @@
X
X
X /* B2_BSC_CTRL 8 bit Blink Source Counter Control */
- /* Bit 7..2: reserved */
+ /* Bit 7..2: reserved */
X #define BSC_START (1<<1) /* Bit 1: Start Blink Source Counter */
X #define BSC_STOP (1<<0) /* Bit 0: Stop Blink Source Counter */
X
X /* B2_BSC_STAT 8 bit Blink Source Counter Status */
- /* Bit 7..1: reserved */
+ /* Bit 7..1: reserved */
X #define BSC_SRC (1<<0) /* Bit 0: Blink Source, 0=Off / 1=On */
X
X /* B2_BSC_TST 16 bit Blink Source Counter Test Reg */
@@ -972,30 +977,30 @@
X
X /* RAM Interface Registers */
X /* B3_RI_CTRL 16 bit RAM Iface Control Register */


- /* Bit 15..10: reserved */
+ /* Bit 15..10: reserved */

X #define RI_CLR_RD_PERR (1<<9) /* Bit 9: Clear IRQ RAM Read Parity Err */
X #define RI_CLR_WR_PERR (1<<8) /* Bit 8: Clear IRQ RAM Write Parity Err*/
- /* Bit 7..2: reserved */
-#define RI_RST_CLR (1<<1) /* Bit 1: Clear RAM Interface Reset */
-#define RI_RST_SET (1<<0) /* Bit 0: Set RAM Interface Reset */
+ /* Bit 7..2: reserved */
+#define RI_RST_CLR (1<<1) /* Bit 1: Clear RAM Interface Reset */
+#define RI_RST_SET (1<<0) /* Bit 0: Set RAM Interface Reset */
X
X /* B3_RI_TEST 8 bit RAM Iface Test Register */
- /* Bit 15..4: reserved */
-#define RI_T_EV (1<<3) /* Bit 3: Timeout Event occured */
-#define RI_T_ON (1<<2) /* Bit 2: Timeout Timer Test On */
-#define RI_T_OFF (1<<1) /* Bit 1: Timeout Timer Test Off */
-#define RI_T_STEP (1<<0) /* Bit 0: Timeout Timer Step */
+ /* Bit 15..4: reserved */
+#define RI_T_EV (1<<3) /* Bit 3: Timeout Event occurred */
+#define RI_T_ON (1<<2) /* Bit 2: Timeout Timer Test On */
+#define RI_T_OFF (1<<1) /* Bit 1: Timeout Timer Test Off */
+#define RI_T_STEP (1<<0) /* Bit 0: Timeout Timer Step */
X
X /* MAC Arbiter Registers */
X /* B3_MA_TO_CTRL 16 bit MAC Arbiter Timeout Ctrl Reg */
- /* Bit 15..4: reserved */
-#define MA_FOE_ON (1<<3) /* Bit 3: XMAC Fast Output Enable ON */
-#define MA_FOE_OFF (1<<2) /* Bit 2: XMAC Fast Output Enable OFF */
-#define MA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */
-#define MA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */
+ /* Bit 15..4: reserved */
+#define MA_FOE_ON (1<<3) /* Bit 3: XMAC Fast Output Enable ON */
+#define MA_FOE_OFF (1<<2) /* Bit 2: XMAC Fast Output Enable OFF */
+#define MA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */
+#define MA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */
X
X /* B3_MA_RC_CTRL 16 bit MAC Arbiter Recovery Ctrl Reg */


- /* Bit 15..8: reserved */

+ /* Bit 15..8: reserved */

X #define MA_ENA_REC_TX2 (1<<7) /* Bit 7: Enable Recovery Timer TX2 */
X #define MA_DIS_REC_TX2 (1<<6) /* Bit 6: Disable Recovery Timer TX2 */
X #define MA_ENA_REC_TX1 (1<<5) /* Bit 5: Enable Recovery Timer TX1 */
@@ -1007,7 +1012,7 @@
X
X /* Packet Arbiter Registers */
X /* B3_PA_CTRL 16 bit Packet Arbiter Ctrl Register */


- /* Bit 15..14: reserved */
+ /* Bit 15..14: reserved */

X #define PA_CLR_TO_TX2 (1<<13) /* Bit 13: Clear IRQ Packet Timeout TX2 */
X #define PA_CLR_TO_TX1 (1<<12) /* Bit 12: Clear IRQ Packet Timeout TX1 */
X #define PA_CLR_TO_RX2 (1<<11) /* Bit 11: Clear IRQ Packet Timeout RX2 */
@@ -1020,30 +1025,30 @@
X #define PA_DIS_TO_RX2 (1<<4) /* Bit 4: Disable Timeout Timer RX2 */
X #define PA_ENA_TO_RX1 (1<<3) /* Bit 3: Enable Timeout Timer RX1 */
X #define PA_DIS_TO_RX1 (1<<2) /* Bit 2: Disable Timeout Timer RX1 */
-#define PA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */
-#define PA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */
+#define PA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */
+#define PA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */
X
X #define PA_ENA_TO_ALL (PA_ENA_TO_RX1 | PA_ENA_TO_RX2 |\
- PA_ENA_TO_TX1 | PA_ENA_TO_TX2)
+ PA_ENA_TO_TX1 | PA_ENA_TO_TX2)
X
X /* Rx/Tx Path related Arbiter Test Registers */
X /* B3_MA_TO_TEST 16 bit MAC Arbiter Timeout Test Reg */
X /* B3_MA_RC_TEST 16 bit MAC Arbiter Recovery Test Reg */
X /* B3_PA_TEST 16 bit Packet Arbiter Test Register */
X /* Bit 15, 11, 7, and 3 are reserved in B3_PA_TEST */
-#define TX2_T_EV (1<<15) /* Bit 15: TX2 Timeout/Recv Event occured*/
+#define TX2_T_EV (1<<15) /* Bit 15: TX2 Timeout/Recv Event occurred*/
X #define TX2_T_ON (1<<14) /* Bit 14: TX2 Timeout/Recv Timer Test On*/
X #define TX2_T_OFF (1<<13) /* Bit 13: TX2 Timeout/Recv Timer Tst Off*/
X #define TX2_T_STEP (1<<12) /* Bit 12: TX2 Timeout/Recv Timer Step */
-#define TX1_T_EV (1<<11) /* Bit 11: TX1 Timeout/Recv Event occured*/
+#define TX1_T_EV (1<<11) /* Bit 11: TX1 Timeout/Recv Event occurred*/
X #define TX1_T_ON (1<<10) /* Bit 10: TX1 Timeout/Recv Timer Test On*/
X #define TX1_T_OFF (1<<9) /* Bit 9: TX1 Timeout/Recv Timer Tst Off*/
X #define TX1_T_STEP (1<<8) /* Bit 8: TX1 Timeout/Recv Timer Step */
-#define RX2_T_EV (1<<7) /* Bit 7: RX2 Timeout/Recv Event occured*/
+#define RX2_T_EV (1<<7) /* Bit 7: RX2 Timeout/Recv Event occurred*/
X #define RX2_T_ON (1<<6) /* Bit 6: RX2 Timeout/Recv Timer Test On*/
X #define RX2_T_OFF (1<<5) /* Bit 5: RX2 Timeout/Recv Timer Tst Off*/
X #define RX2_T_STEP (1<<4) /* Bit 4: RX2 Timeout/Recv Timer Step */
-#define RX1_T_EV (1<<3) /* Bit 3: RX1 Timeout/Recv Event occured*/
+#define RX1_T_EV (1<<3) /* Bit 3: RX1 Timeout/Recv Event occurred*/
X #define RX1_T_ON (1<<2) /* Bit 2: RX1 Timeout/Recv Timer Test On*/
X #define RX1_T_OFF (1<<1) /* Bit 1: RX1 Timeout/Recv Timer Tst Off*/
X #define RX1_T_STEP (1<<0) /* Bit 0: RX1 Timeout/Recv Timer Step */
@@ -1054,7 +1059,7 @@
X /* TXA_ITI_VAL 32 bit Tx Arb Interval Timer Value */
X /* TXA_LIM_INI 32 bit Tx Arb Limit Counter Init Val */
X /* TXA_LIM_VAL 32 bit Tx Arb Limit Counter Value */
- /* Bit 31..24: reserved */
+ /* Bit 31..24: reserved */
X #define TXA_MAX_VAL 0x00ffffffL /* Bit 23.. 0: Max TXA Timer/Cnt Val */
X
X /* TXA_CTRL 8 bit Tx Arbiter Control Register */
@@ -1063,9 +1068,9 @@
X #define TXA_ENA_ALLOC (1<<5) /* Bit 5: Enable alloc of free bandwidth*/
X #define TXA_DIS_ALLOC (1<<4) /* Bit 4: Disabl alloc of free bandwidth*/
X #define TXA_START_RC (1<<3) /* Bit 3: Start sync Rate Control */
-#define TXA_STOP_RC (1<<2) /* Bit 2: Stop sync Rate Control */
-#define TXA_ENA_ARB (1<<1) /* Bit 1: Enable Tx Arbiter */
-#define TXA_DIS_ARB (1<<0) /* Bit 0: Disable Tx Arbiter */
+#define TXA_STOP_RC (1<<2) /* Bit 2: Stop sync Rate Control */
+#define TXA_ENA_ARB (1<<1) /* Bit 1: Enable Tx Arbiter */
+#define TXA_DIS_ARB (1<<0) /* Bit 0: Disable Tx Arbiter */
X
X /* TXA_TEST 8 bit Tx Arbiter Test Register */
X /* Bit 7..6: reserved */
@@ -1077,12 +1082,12 @@
X #define TXA_LIM_T_STEP (1<<0) /* Bit 0: Tx Arb Limit Timer Step */
X
X /* TXA_STAT 8 bit Tx Arbiter Status Register */
- /* Bit 7..1: reserved */
-#define TXA_PRIO_XS (1<<0) /* Bit 0: sync queue has prio to send */
+ /* Bit 7..1: reserved */
+#define TXA_PRIO_XS (1<<0) /* Bit 0: sync queue has prio to send */
X
X /* Q_BC 32 bit Current Byte Counter */
X /* Bit 31..16: reserved */
-#define BC_MAX 0xffff /* Bit 15.. 0: Byte counter */
+#define BC_MAX 0xffff /* Bit 15.. 0: Byte counter */
X
X /* BMU Control Status Registers */
X /* B0_R1_CSR 32 bit BMU Ctrl/Stat Rx Queue 1 */
@@ -1092,47 +1097,47 @@
X /* B0_XA2_CSR 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */
X /* B0_XS2_CSR 32 bit BMU Ctrl/Stat Async Tx Queue 2 */
X /* Q_CSR 32 bit BMU Control/Status Register */
- /* Bit 31..25: reserved */
-#define CSR_SV_IDLE (1L<<24) /* Bit 24: BMU SM Idle */
- /* Bit 23..22: reserved */
+ /* Bit 31..25: reserved */
+#define CSR_SV_IDLE (1L<<24) /* Bit 24: BMU SM Idle */
+ /* Bit 23..22: reserved */
X #define CSR_DESC_CLR (1L<<21) /* Bit 21: Clear Reset for Descr */
X #define CSR_DESC_SET (1L<<20) /* Bit 20: Set Reset for Descr */
X #define CSR_FIFO_CLR (1L<<19) /* Bit 19: Clear Reset for FIFO */
X #define CSR_FIFO_SET (1L<<18) /* Bit 18: Set Reset for FIFO */
-#define CSR_HPI_RUN (1L<<17) /* Bit 17: Release HPI SM */
-#define CSR_HPI_RST (1L<<16) /* Bit 16: Reset HPI SM to Idle */
-#define CSR_SV_RUN (1L<<15) /* Bit 15: Release Supervisor SM */
-#define CSR_SV_RST (1L<<14) /* Bit 14: Reset Supervisor SM */
+#define CSR_HPI_RUN (1L<<17) /* Bit 17: Release HPI SM */
+#define CSR_HPI_RST (1L<<16) /* Bit 16: Reset HPI SM to Idle */
+#define CSR_SV_RUN (1L<<15) /* Bit 15: Release Supervisor SM */
+#define CSR_SV_RST (1L<<14) /* Bit 14: Reset Supervisor SM */
X #define CSR_DREAD_RUN (1L<<13) /* Bit 13: Release Descr Read SM */
X #define CSR_DREAD_RST (1L<<12) /* Bit 12: Reset Descr Read SM */
X #define CSR_DWRITE_RUN (1L<<11) /* Bit 11: Rel. Descr Write SM */
X #define CSR_DWRITE_RST (1L<<10) /* Bit 10: Reset Descr Write SM */
X #define CSR_TRANS_RUN (1L<<9) /* Bit 9: Release Transfer SM */
X #define CSR_TRANS_RST (1L<<8) /* Bit 8: Reset Transfer SM */
-#define CSR_ENA_POL (1L<<7) /* Bit 7: Enable Descr Polling */
-#define CSR_DIS_POL (1L<<6) /* Bit 6: Disable Descr Polling */
-#define CSR_STOP (1L<<5) /* Bit 5: Stop Rx/Tx Queue */
-#define CSR_START (1L<<4) /* Bit 4: Start Rx/Tx Queue */
+#define CSR_ENA_POL (1L<<7) /* Bit 7: Enable Descr Polling */
+#define CSR_DIS_POL (1L<<6) /* Bit 6: Disable Descr Polling */
+#define CSR_STOP (1L<<5) /* Bit 5: Stop Rx/Tx Queue */
+#define CSR_START (1L<<4) /* Bit 4: Start Rx/Tx Queue */
X #define CSR_IRQ_CL_P (1L<<3) /* Bit 3: (Rx) Clear Parity IRQ */
X #define CSR_IRQ_CL_B (1L<<2) /* Bit 2: Clear EOB IRQ */
X #define CSR_IRQ_CL_F (1L<<1) /* Bit 1: Clear EOF IRQ */
X #define CSR_IRQ_CL_C (1L<<0) /* Bit 0: Clear ERR IRQ */
X
X #define CSR_SET_RESET (CSR_DESC_SET|CSR_FIFO_SET|CSR_HPI_RST|CSR_SV_RST|\
- CSR_DREAD_RST|CSR_DWRITE_RST|CSR_TRANS_RST)
+ CSR_DREAD_RST|CSR_DWRITE_RST|CSR_TRANS_RST)
X #define CSR_CLR_RESET (CSR_DESC_CLR|CSR_FIFO_CLR|CSR_HPI_RUN|CSR_SV_RUN|\
- CSR_DREAD_RUN|CSR_DWRITE_RUN|CSR_TRANS_RUN)
+ CSR_DREAD_RUN|CSR_DWRITE_RUN|CSR_TRANS_RUN)
X
X
X /* Q_F 32 bit Flag Register */
X /* Bit 28..31: reserved */
-#define F_ALM_FULL (1L<<27) (Rx) /* Bit 27: (Rx) FIFO almost full */
-#define F_EMPTY (1L<<27) (Tx) /* Bit 27: (Tx) FIFO empty flag */
-#define F_FIFO_EOF (1L<<26) /* Bit 26: Fag bit in FIFO */
+#define F_ALM_FULL (1L<<27) (Rx) /* Bit 27: (Rx) FIFO almost full */
+#define F_EMPTY (1L<<27) (Tx) /* Bit 27: (Tx) FIFO empty flag */
+#define F_FIFO_EOF (1L<<26) /* Bit 26: Fag bit in FIFO */
X #define F_WM_REACHED (1L<<25) /* Bit 25: Watermark reached */
- /* Bit 24: reserved */
+ /* Bit 24: reserved */
X #define F_FIFO_LEVEL (0x1fL<<16) /* Bit 23..16: # of Qwords in FIFO */


- /* Bit 15..11: reserved */

+ /* Bit 15..11: reserved */

X #define F_WATER_MARK 0x0007ffL /* Bit 10.. 0: Watermark */
X
X /* Q_T1 32 bit Test Register 1 */
@@ -1166,9 +1171,9 @@
X #define T2_STEP01 (1<<0) /* Bit 0: Inc AC/Dec BC by 1 */
X
X /* Q_T3 32 bit Test Register 3 */


- /* Bit 31..7: reserved */

+ /* Bit 31..7: reserved */

X #define T3_MUX (7<<4) /* Bit 6.. 4: Mux Position */
- /* Bit 3: reserved */
+ /* Bit 3: reserved */
X #define T3_VRAM (7<<0) /* Bit 2.. 0: Virtual RAM Buffer Address */
X
X /* RAM Buffer Register Offsets */
@@ -1187,7 +1192,7 @@
X #define RB_MSK 0x0007ffff /* Bit 18.. 0: RAM Buffer Pointer Bits */
X
X /* RB_TST2 8 bit RAM Buffer Test Register 2 */
- /* Bit 4..7: reserved */
+ /* Bit 4..7: reserved */
X #define RB_PC_DEC (1<<3) /* Bit 3: Packet Counter Decrem */
X #define RB_PC_T_ON (1<<2) /* Bit 2: Packet Counter Test On */
X #define RB_PC_T_OFF (1<<1) /* Bit 1: Packet Counter Tst Off */
@@ -1198,19 +1203,19 @@
X #define RB_WP_T_ON (1<<6) /* Bit 6: Write Pointer Test On */
X #define RB_WP_T_OFF (1<<5) /* Bit 5: Write Pointer Test Off */
X #define RB_WP_INC (1<<4) /* Bit 4: Write Pointer Increm */
- /* Bit 3: reserved */
+ /* Bit 3: reserved */
X #define RB_RP_T_ON (1<<2) /* Bit 2: Read Pointer Test On */
X #define RB_RP_T_OFF (1<<1) /* Bit 1: Read Pointer Test Off */
X #define RB_RP_DEC (1<<0) /* Bit 0: Read Pointer Decrement */
X
X /* RB_CTRL 8 bit RAM Buffer Control Register */
- /* Bit 7..6: reserved */
+ /* Bit 7..6: reserved */
X #define RB_ENA_STFWD (1<<5) /* Bit 5: Enable Store & Forward */
X #define RB_DIS_STFWD (1<<4) /* Bit 4: Disab. Store & Forward */
X #define RB_ENA_OP_MD (1<<3) /* Bit 3: Enable Operation Mode */
X #define RB_DIS_OP_MD (1<<2) /* Bit 2: Disab. Operation Mode */
-#define RB_RST_CLR (1<<1) /* Bit 1: Clr RAM Buf STM Reset */
-#define RB_RST_SET (1<<0) /* Bit 0: Set RAM Buf STM Reset */
+#define RB_RST_CLR (1<<1) /* Bit 1: Clr RAM Buf STM Reset */
+#define RB_RST_SET (1<<0) /* Bit 0: Set RAM Buf STM Reset */
X
X
X /* Receive and Transmit MAC FIFO Registers, use MR_ADDR() to address */
@@ -1225,11 +1230,11 @@
X /* TX_MFF_RP 32 bit Transmit MAC FIFO Read Pointer */
X /* TX_MFF_PC 32 bit Transmit MAC FIFO Packet Cnt */
X /* TX_MFF_LEV 32 bit Transmit MAC FIFO Level */
- /* Bit 31..6: reserved */
+ /* Bit 31..6: reserved */
X #define MFF_MSK 0x007fL /* Bit 5..0: MAC FIFO Address/Pointer Bits */
X
X /* RX_MFF_CTRL1 16 bit Receive MAC FIFO Control Reg 1 */


- /* Bit 15..14: reserved */
+ /* Bit 15..14: reserved */

X #define MFF_ENA_RDY_PAT (1<<13) /* Bit 13: Enable Ready Patch */
X #define MFF_DIS_RDY_PAT (1<<12) /* Bit 12: Disable Ready Patch */
X #define MFF_ENA_TIM_PAT (1<<11) /* Bit 11: Enable Timing Patch */
@@ -1249,15 +1254,15 @@
X
X /* TX_MFF_CTRL1 16 bit Transmit MAC FIFO Control Reg 1 */
X #define MFF_CLR_PERR (1<<15) /* Bit 15: Clear Parity Error IRQ*/


- /* Bit 14: reserved */

+ /* Bit 14: reserved */

X #define MFF_ENA_PKT_REC (1<<13) /* Bit 13: Enable Packet Recovery*/
X #define MFF_DIS_PKT_REC (1<<12) /* Bit 12: Disable Packet Recov. */
X /* MFF_ENA_TIM_PAT (see RX_MFF_CTRL1)Bit 11: Enable Timing Patch */
X /* MFF_DIS_TIM_PAT (see RX_MFF_CTRL1)Bit 10: Disable Timing Patch */
X /* MFF_ENA_ALM_FUL (see RX_MFF_CTRL1)Bit 9: Enable AlmostFull Sign*/
X /* MFF_DIS_ALM_FUL (see RX_MFF_CTRL1)Bit 8: Disab. AlmostFull Sign*/
-#define MFF_ENA_W4E (1<<7) /* Bit 7: Enable Wait for Empty */
-#define MFF_DIS_W4E (1<<6) /* Bit 6: Disab. Wait for Empty */
+#define MFF_ENA_W4E (1<<7) /* Bit 7: Enable Wait for Empty */
+#define MFF_DIS_W4E (1<<6) /* Bit 6: Disab. Wait for Empty */
X /* MFF_ENA_FLUSH (see RX_MFF_CTRL1)Bit 5: Enable Frame Flushing */
X /* MFF_DIS_FLUSH (see RX_MFF_CTRL1)Bit 4: Disab. Frame Flushing */
X #define MFF_ENA_LOOPB (1<<3) /* Bit 3: Enable Loopback */
@@ -1269,61 +1274,61 @@
X
X /* RX_MFF_TST2 8 bit Receive MAC FIFO Test Register 2 */
X /* TX_MFF_TST2 8 bit Transmit MAC FIFO Test Register 2 */


- /* Bit 7: reserved */

+ /* Bit 7: reserved */
X #define MFF_WSP_T_ON (1<<6) /* Bit 6: (Tx) Write Shadow Pt TestOn */
X #define MFF_WSP_T_OFF (1<<5) /* Bit 5: (Tx) Write Shadow Pt TstOff */
-#define MFF_WSP_INC (1<<4) /* Bit 4: (Tx) Write Shadow Pt Increm */
-#define MFF_PC_DEC (1<<3) /* Bit 3: Packet Counter Decrem */
-#define MFF_PC_T_ON (1<<2) /* Bit 2: Packet Counter Test On */
+#define MFF_WSP_INC (1<<4) /* Bit 4: (Tx) Write Shadow Pt Increm */
+#define MFF_PC_DEC (1<<3) /* Bit 3: Packet Counter Decrem */
+#define MFF_PC_T_ON (1<<2) /* Bit 2: Packet Counter Test On */
X #define MFF_PC_T_OFF (1<<1) /* Bit 1: Packet Counter Tst Off */
-#define MFF_PC_INC (1<<0) /* Bit 0: Packet Counter Increm */
+#define MFF_PC_INC (1<<0) /* Bit 0: Packet Counter Increm */
X
X /* RX_MFF_TST1 8 bit Receive MAC FIFO Test Register 1 */
X /* TX_MFF_TST1 8 bit Transmit MAC FIFO Test Register 1 */
- /* Bit 7: reserved */
-#define MFF_WP_T_ON (1<<6) /* Bit 6: Write Pointer Test On */


+ /* Bit 7: reserved */

+#define MFF_WP_T_ON (1<<6) /* Bit 6: Write Pointer Test On */
X #define MFF_WP_T_OFF (1<<5) /* Bit 5: Write Pointer Test Off */
-#define MFF_WP_INC (1<<4) /* Bit 4: Write Pointer Increm */
- /* Bit 3: reserved */
-#define MFF_RP_T_ON (1<<2) /* Bit 2: Read Pointer Test On */
+#define MFF_WP_INC (1<<4) /* Bit 4: Write Pointer Increm */
+ /* Bit 3: reserved */
+#define MFF_RP_T_ON (1<<2) /* Bit 2: Read Pointer Test On */
X #define MFF_RP_T_OFF (1<<1) /* Bit 1: Read Pointer Test Off */
-#define MFF_RP_DEC (1<<0) /* Bit 0: Read Pointer Decrement */
+#define MFF_RP_DEC (1<<0) /* Bit 0: Read Pointer Decrement */
X
X /* RX_MFF_CTRL2 8 bit Receive MAC FIFO Control Reg 2 */
X /* TX_MFF_CTRL2 8 bit Transmit MAC FIFO Control Reg 2 */
- /* Bit 7..4: reserved */
+ /* Bit 7..4: reserved */
X #define MFF_ENA_OP_MD (1<<3) /* Bit 3: Enable Operation Mode */
X #define MFF_DIS_OP_MD (1<<2) /* Bit 2: Disab. Operation Mode */
-#define MFF_RST_CLR (1<<1) /* Bit 1: Clear MAC FIFO Reset */
-#define MFF_RST_SET (1<<0) /* Bit 0: Set MAC FIFO Reset */
+#define MFF_RST_CLR (1<<1) /* Bit 1: Clear MAC FIFO Reset */
+#define MFF_RST_SET (1<<0) /* Bit 0: Set MAC FIFO Reset */
X
X
X /* Receive, Transmit, and Link LED Counter Registers */
-/* RX_LED_CTRL 8 bit Receive LED Cnt Control Reg */
-/* TX_LED_CTRL 8 bit Transmit LED Cnt Control Reg */
-/* LNK_SYNC_CTRL 8 bit Link Sync Cnt Control Register */
- /* Bit 7..3: reserved */
+/* RX_LED_CTRL 8 bit Receive LED Cnt Control Reg */
+/* TX_LED_CTRL 8 bit Transmit LED Cnt Control Reg */
+/* LNK_SYNC_CTRL 8 bit Link Sync Cnt Control Register */
+ /* Bit 7..3: reserved */
X #define LED_START (1<<2) /* Bit 2: Start Timer */
X #define LED_STOP (1<<1) /* Bit 1: Stop Timer */
X #define LED_STATE (1<<0) /* Bit 0:(Rx/Tx)LED State, 1=LED on */
X #define LED_CLR_IRQ (1<<0) /* Bit 0:(Lnk) Clear Link IRQ */
X
-/* RX_LED_TST 8 bit Receive LED Cnt Test Register */
-/* TX_LED_TST 8 bit Transmit LED Cnt Test Register */
-/* LNK_SYNC_TST 8 bit Link Sync Cnt Test Register */
- /* Bit 7..3: reserved */
+/* RX_LED_TST 8 bit Receive LED Cnt Test Register */
+/* TX_LED_TST 8 bit Transmit LED Cnt Test Register */
+/* LNK_SYNC_TST 8 bit Link Sync Cnt Test Register */
+ /* Bit 7..3: reserved */
X #define LED_T_ON (1<<2) /* Bit 2: LED Counter Testmode On */
X #define LED_T_OFF (1<<1) /* Bit 1: LED Counter Testmode Off */
X #define LED_T_STEP (1<<0) /* Bit 0: LED Counter Step */
X
X /* LNK_LED_REG 8 bit Link LED Register */
- /* Bit 7..6: reserved */
-#define LED_BLK_ON (1<<5) /* Bit 5: Link LED Blinking On */
-#define LED_BLK_OFF (1<<4) /* Bit 4: Link LED Blinking Off */
-#define LED_SYNC_ON (1<<3) /* Bit 3: Use Sync Wire to switch LED */
+ /* Bit 7..6: reserved */
+#define LED_BLK_ON (1<<5) /* Bit 5: Link LED Blinking On */
+#define LED_BLK_OFF (1<<4) /* Bit 4: Link LED Blinking Off */
+#define LED_SYNC_ON (1<<3) /* Bit 3: Use Sync Wire to switch LED */
X #define LED_SYNC_OFF (1<<2) /* Bit 2: Disable Sync Wire Input */
-#define LED_ON (1<<1) /* Bit 1: switch LED on */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 26'
echo 'File patch-2.2.20 is continued in part 27'
echo "27" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:37 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part38

#!/bin/sh -x
# this is part 38 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 38; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- } else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRT) {
- /* Disable PAUSE receive, enable PAUSE transmit */
+ }
+ else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRT) {
+ /* Disable PAUSE receive, enable PAUSE transmit. */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND;
- } else {
- /* PAUSE mismatch -> no PAUSE */
+ }
+ else {
+ /* PAUSE mismatch -> no PAUSE. */
X pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
X }
X
- /* We checked everything and may now enable the link */


- pPrt->PAutoNegFail = SK_FALSE ;

+ /* We checked everything and may now enable the link. */


+ pPrt->PAutoNegFail = SK_FALSE;
X
X SkXmRxTxEnable(pAC, IoC, Port);
- return(SK_AND_OK) ;
-}
+ return (SK_AND_OK);

+} /* SkXmAutoNegDoneBcom*/


+
X
X /******************************************************************************
X *

@@ -1708,11 +1847,11 @@
X static int SkXmAutoNegDoneLone(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
- SK_U16 ResAb ; /* Resolved Ability */
- SK_U16 LPAb ; /* Link Partner Ability */
+ SK_U16 ResAb; /* Resolved Ability */
+ SK_U16 LPAb; /* Link Partner Ability */

X SK_U16 QuickStat; /* Auxiliary Status */
X
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegDoneLone"
@@ -1729,15 +1868,16 @@


X /* Error */
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNegFail: Remote fault bit set Port %d\n", Port));
- pPrt->PAutoNegFail = SK_TRUE ;
- return (SK_AND_OTHER) ;
+ pPrt->PAutoNegFail = SK_TRUE;
+ return (SK_AND_OTHER);
X }
X
X /* Check Duplex mismatch */

X if (QuickStat & PHY_L_QS_DUP_MOD) {


- pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL ;

- } else {


- pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF ;

+ pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL;
+ }

+ else {


+ pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF;

X }
X
X /* Check Master/Slave resolution */
@@ -1746,12 +1886,14 @@
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,


X ("Master/Slave Fault port %d\n", Port));
X pPrt->PAutoNegFail = SK_TRUE;

- pPrt->PMSStatus = SK_MS_STAT_FAULT ;

+ pPrt->PMSStatus = SK_MS_STAT_FAULT;
X return (SK_AND_OTHER);
- } else if (ResAb & PHY_L_1000S_MSR) {


- pPrt->PMSStatus = SK_MS_STAT_MASTER ;
- } else {
- pPrt->PMSStatus = SK_MS_STAT_SLAVE ;

+ }
+ else if (ResAb & PHY_L_1000S_MSR) {


+ pPrt->PMSStatus = SK_MS_STAT_MASTER;
+ }
+ else {
+ pPrt->PMSStatus = SK_MS_STAT_SLAVE;

X }
X
X /* Check PAUSE mismatch */

@@ -1793,11 +1935,12 @@
X }
X

X /* We checked everything and may now enable the link */
- pPrt->PAutoNegFail = SK_FALSE ;
+ pPrt->PAutoNegFail = SK_FALSE;
X
X SkXmRxTxEnable(pAC, IoC, Port);
- return(SK_AND_OK);
-}
+ return (SK_AND_OK);

+} /* SkXmAutoNegDoneLone */


+
X
X /******************************************************************************
X *

@@ -1819,11 +1962,12 @@
X static int SkXmAutoNegDoneNat(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {

X /* todo: National */

- return(SK_AND_OK);
-}
+ return (SK_AND_OK);

+} /* SkXmAutoNegDoneNat*/


+
X
X /******************************************************************************
X *

@@ -1841,17 +1985,18 @@
X int SkXmRxTxEnable(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;

- SK_U16 Reg ; /* 16bit register value */
+ SK_U16 Reg; /* 16bit register value */
X SK_U16 IntMask; /* XMac interrupt mask */
+ SK_U16 SWord;


X
X pPrt = &pAC->GIni.GP[Port];
X

X if (!pPrt->PHWLinkUp) {
X /* The Hardware link is NOT up */
- return(0) ;


+ return (0);
X }
X

X if ((pPrt->PLinkMode == SK_LMODE_AUTOHALF ||
@@ -1859,7 +2004,7 @@
X pPrt->PLinkMode == SK_LMODE_AUTOBOTH) &&
X pPrt->PAutoNegFail) {
X /* Autonegotiation is not done or failed */
- return(0) ;


+ return (0);
X }
X

X /* Set Dup Mode and Pause Mode */
@@ -1893,12 +2038,14 @@
X }
X switch (pPrt->PhyType) {
X case SK_PHY_BCOM:


- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK,

- PHY_B_DEF_MSK);
+ /* Workaround BCOM Errata (#10523) for all BCom Phys */
+ /* Enable Power Management after link up */


+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &SWord);

+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, SWord & ~PHY_B_AC_DIS_PM);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, PHY_B_DEF_MSK);


X break;
X case SK_PHY_LONE:
- PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB,

- PHY_L_DEF_MSK);
+ PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, PHY_L_DEF_MSK);


X break;
X case SK_PHY_NAT:
X /* todo National:

@@ -1910,9 +2057,10 @@
X XM_OUT16(IoC, Port, XM_MMU_CMD, Reg | XM_MMU_ENA_RX | XM_MMU_ENA_TX);
X
X return (0);
-}
+} /* SkXmRxTxEnable*/
X
X #ifndef SK_DIAG


+
X /******************************************************************************
X *

X * SkXmIrq() - Interrupt service routine
@@ -1938,11 +2086,12 @@
X void SkXmIrq(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */

X SK_U16 IStatus) /* Interrupt status read from the XMAC */
X {
X SK_GEPORT *pPrt;
X SK_EVPARA Para;
+ SK_U16 IStatus2;


X
X pPrt = &pAC->GIni.GP[Port];
X

@@ -1954,7 +2103,7 @@
X }
X
X /*
- * LinkPartner Autonegable ?
+ * LinkPartner Autonegable?
X */
X if (pPrt->PhyType == SK_PHY_XMAC) {
X SkXmAutoNegLipaXmac(pAC, IoC, Port, IStatus);
@@ -1966,11 +2115,22 @@
X if (!pPrt->PHWLinkUp) {
X /* Spurious XMAC interrupt */
X SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
- ("SkXmIrq: spurious interrupt on port %d\n",
- Port));
+ ("SkXmIrq: spurious interrupt on port %d\n", Port));
X return;
X }
X
+ if (IStatus & XM_IS_INP_ASS) {
+ /* Reread ISR Register if link is not in sync */
+ XM_IN16(IoC, Port, XM_ISRC, &IStatus2);
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
+ ("SkXmIrq: Link async. Double check port %d %x %x\n",
+ Port, IStatus, IStatus2));
+ IStatus &= ~XM_IS_INP_ASS;
+ IStatus |= IStatus2;
+
+ }
+
X if (IStatus & XM_IS_LNK_AE) {
X /* not used GP0 is used instead */
X }
@@ -1992,7 +2152,7 @@


X
X /* Start workaround Errata #2 timer */
X SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer,
- SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para);
+ SK_WA_INA_TIME, SKGE_HWAC, SK_HWEV_WATIM, Para);
X }
X

X if (IStatus & XM_IS_RX_PAGE) {
@@ -2031,7 +2191,7 @@
X if (IStatus & XM_IS_TXF_UR) {
X /* may NOT happen -> error log */
X SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E020,
- SKERR_SIRQ_E020MSG) ;
+ SKERR_SIRQ_E020MSG);
X }
X
X if (IStatus & XM_IS_TX_COMP) {
@@ -2042,7 +2202,8 @@
X /* not served here */
X }
X
-}
+} /* SkXmIrq*/
+


X #endif /* !SK_DIAG */
X

X /* End of file */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/skfp/drvfbi.c linux/drivers/net/skfp/drvfbi.c
--- v2.2.19/drivers/net/skfp/drvfbi.c Sun Mar 25 17:31:23 2001
+++ linux/drivers/net/skfp/drvfbi.c Wed Oct 10 01:41:04 2001
@@ -849,7 +849,7 @@
X
X #ifdef EISA
X
-/*arrays with io adresses of dma controller length and adress registers*/
+/*arrays with io addresses of dma controller length and address registers*/
X static const int cntr[8] = { 0x001,0x003,0x005,0x007,0,0x0c6,0x0ca,0x0ce } ;
X static const int base[8] = { 0x000,0x002,0x004,0x006,0,0x0c4,0x0c8,0x0cc } ;
X static const int page[8] = { 0x087,0x083,0x081,0x082,0,0x08b,0x089,0x08a } ;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/skfp/h/smc.h linux/drivers/net/skfp/h/smc.h
--- v2.2.19/drivers/net/skfp/h/smc.h Sun Mar 25 17:31:23 2001
+++ linux/drivers/net/skfp/h/smc.h Wed Oct 10 01:41:04 2001
@@ -297,7 +297,7 @@
X #define RS_NORINGOP (1<< 5) /* no ring op */
X #define RS_VERSION (1<< 4) /* SMT version mismatch */
X #define RS_STUCKBYPASSS (1<< 3) /* stuck bypass */
-#define RS_EVENT (1<< 2) /* FDDI event occured */
+#define RS_EVENT (1<< 2) /* FDDI event occurred */
X #define RS_RINGOPCHANGE (1<< 1) /* ring op changed */
X #define RS_RES0 (1<< 0) /* reserved */
X
@@ -320,7 +320,7 @@
X u_char evc_rep_required ; /* report required */
X u_short evc_para ; /* SMT Para Number */
X u_char *evc_cond_state ; /* condition state */
- u_char *evc_multiple ; /* multiple occurence */
+ u_char *evc_multiple ; /* multiple occurrence */
X } ;
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/skfp/pcmplc.c linux/drivers/net/skfp/pcmplc.c
--- v2.2.19/drivers/net/skfp/pcmplc.c Sun Mar 25 17:31:23 2001
+++ linux/drivers/net/skfp/pcmplc.c Wed Oct 10 01:41:04 2001
@@ -1722,7 +1722,7 @@
X }
X if (cmd & PL_EBUF_ERR) { /* elastic buff. det. over-|underflow*/
X /*
- * Check whether the SRF Condition occured.
+ * Check whether the SRF Condition occurred.
X */
X if (!plc->ebuf_cont && phy->mib->fddiPORTPCMState == PC8_ACTIVE){
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/skfp/srf.c linux/drivers/net/skfp/srf.c
--- v2.2.19/drivers/net/skfp/srf.c Sun Mar 25 17:31:23 2001
+++ linux/drivers/net/skfp/srf.c Wed Oct 10 01:41:04 2001
@@ -197,7 +197,7 @@
X struct s_srf_evc *evc ;
X int cond_asserted = 0 ;
X int cond_deasserted = 0 ;
- int event_occured = 0 ;
+ int event_occurred = 0 ;
X int tsr ;
X int T_Limit = 2*TICKS_PER_SECOND ;
X
@@ -246,7 +246,7 @@
X *evc->evc_multiple = FALSE ;
X }
X smc->srf.any_report = TRUE ;
- event_occured = TRUE ;
+ event_occurred = TRUE ;
X }
X #ifdef FDDI_MIB
X snmp_srf_event(smc,evc) ;
@@ -268,7 +268,7 @@
X break ;
X }
X /* SR01c */
- if (event_occured && tsr < T_Limit) {
+ if (event_occurred && tsr < T_Limit) {
X smc->srf.sr_state = SR1_HOLDOFF ;
X break ;


X }
@@ -286,7 +286,7 @@

X break ;
X }
X /* SR00d */
- if (event_occured && tsr >= T_Limit) {
+ if (event_occurred && tsr >= T_Limit) {
X smc->srf.TSR = smt_get_time() ;
X smt_send_srf(smc) ;
X break ;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/slip.h linux/drivers/net/slip.h
--- v2.2.19/drivers/net/slip.h Sun Mar 25 17:31:15 2001
+++ linux/drivers/net/slip.h Wed Oct 10 01:41:04 2001
@@ -89,7 +89,7 @@
X int xdata, xbits; /* 6 bit slip controls */
X #endif
X
- unsigned int flags; /* Flag values/ mode etc */
+ unsigned long flags; /* Flag values/ mode etc */
X #define SLF_INUSE 0 /* Channel in use */
X #define SLF_ESCAPE 1 /* ESC received */
X #define SLF_ERROR 2 /* Parity, etc. error */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/starfire-kcomp22.h linux/drivers/net/starfire-kcomp22.h
--- v2.2.19/drivers/net/starfire-kcomp22.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/net/starfire-kcomp22.h Fri Nov 2 15:45:54 2001
@@ -0,0 +1,343 @@
+#ifndef __STARFIRE_KCOMP22_H
+#define __STARFIRE_KCOMP22_H
+
+#include <linux/kcomp.h>
+#include <asm/io.h>
+
+/* MII constants */
+#define MII_BMCR 0x00 /* Basic mode control register */
+#define MII_BMSR 0x01 /* Basic mode status register */
+#define MII_ADVERTISE 0x04 /* Advertisement control reg */
+#define MII_LPA 0x05 /* Link partner ability reg */
+
+#define BMCR_FULLDPLX 0x0100 /* Full duplex */
+#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */
+#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */
+#define BMCR_SPEED100 0x2000 /* Select 100Mbps */
+#define BMCR_RESET 0x8000 /* Reset the DP83840 */
+
+#define BMSR_LSTATUS 0x0004 /* Link status */
+
+#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */
+#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */
+#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */
+#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */
+#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */
+
+#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */
+#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */
+#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */
+#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */
+
+/* MII ioctls */


+#define SIOCGMIIPHY 0x8947 /* Get address of MII PHY in use. */
+#define SIOCGMIIREG 0x8948 /* Read MII PHY register. */
+#define SIOCSMIIREG 0x8949 /* Write MII PHY register. */

+
+/* This structure is used in all SIOCxMIIxxx ioctl calls */
+struct mii_ioctl_data {
+ u16 phy_id;
+ u16 reg_num;
+ u16 val_in;
+ u16 val_out;
+};

+
+/* ethtool stuff */


+#define SIOCETHTOOL 0x8946 /* Ethtool interface */
+

+/* This should work for both 32 and 64 bit userland. */
+struct ethtool_cmd {
+ u32 cmd;
+ u32 supported; /* Features this interface supports */
+ u32 advertising; /* Features this interface advertises */
+ u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */
+ u8 duplex; /* Duplex, half or full */
+ u8 port; /* Which connector port */
+ u8 phy_address;
+ u8 transceiver; /* Which tranceiver to use */
+ u8 autoneg; /* Enable or disable autonegotiation */
+ u32 maxtxpkt; /* Tx pkts before generating tx int */
+ u32 maxrxpkt; /* Rx pkts before generating rx int */
+ u32 reserved[4];
+};


+
+/* these strings are set to whatever the driver author decides... */
+struct ethtool_drvinfo {
+ u32 cmd;
+ char driver[32]; /* driver short name, "tulip", "eepro100" */
+ char version[32]; /* driver version string */
+ char fw_version[32]; /* firmware version string, if applicable */
+ char bus_info[32]; /* Bus info for this interface. For PCI
+ * devices, use pci_dev->slot_name. */
+ char reserved1[32];
+ char reserved2[32];
+};
+

+/* CMDs currently supported */


+#define ETHTOOL_GSET 0x00000001 /* Get settings. */
+#define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */
+#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
+

+/* Indicates what features are supported by the interface. */
+#define SUPPORTED_10baseT_Half (1 << 0)
+#define SUPPORTED_10baseT_Full (1 << 1)
+#define SUPPORTED_100baseT_Half (1 << 2)
+#define SUPPORTED_100baseT_Full (1 << 3)
+#define SUPPORTED_1000baseT_Half (1 << 4)
+#define SUPPORTED_1000baseT_Full (1 << 5)
+#define SUPPORTED_Autoneg (1 << 6)
+#define SUPPORTED_TP (1 << 7)
+#define SUPPORTED_AUI (1 << 8)
+#define SUPPORTED_MII (1 << 9)
+#define SUPPORTED_FIBRE (1 << 10)
+
+/* Indicates what features are advertised by the interface. */
+#define ADVERTISED_10baseT_Half (1 << 0)
+#define ADVERTISED_10baseT_Full (1 << 1)
+#define ADVERTISED_100baseT_Half (1 << 2)
+#define ADVERTISED_100baseT_Full (1 << 3)
+#define ADVERTISED_1000baseT_Half (1 << 4)
+#define ADVERTISED_1000baseT_Full (1 << 5)
+#define ADVERTISED_Autoneg (1 << 6)
+#define ADVERTISED_TP (1 << 7)
+#define ADVERTISED_AUI (1 << 8)
+#define ADVERTISED_MII (1 << 9)
+#define ADVERTISED_FIBRE (1 << 10)
+
+/* The forced speed, 10Mb, 100Mb, gigabit. */
+#define SPEED_10 10
+#define SPEED_100 100
+#define SPEED_1000 1000
+
+/* Duplex, half or full. */
+#define DUPLEX_HALF 0x00
+#define DUPLEX_FULL 0x01
+
+/* Which connector port. */
+#define PORT_TP 0x00
+#define PORT_AUI 0x01
+#define PORT_MII 0x02
+#define PORT_FIBRE 0x03
+#define PORT_BNC 0x04
+
+/* Which tranceiver to use. */
+#define XCVR_INTERNAL 0x00
+#define XCVR_EXTERNAL 0x01
+
+/* Enable or disable autonegotiation. If this is set to enable,
+ * the forced link modes above are completely ignored.
+ */
+#define AUTONEG_DISABLE 0x00
+#define AUTONEG_ENABLE 0x01
+
+
+static LIST_HEAD(pci_drivers);
+
+struct pci_driver_mapping {
+ struct pci_dev *dev;
+ struct pci_driver *drv;
+ void *driver_data;
+};
+
+struct pci_device_id {
+ unsigned int vendor, device;
+ unsigned int subvendor, subdevice;
+ unsigned int class, class_mask;
+ unsigned long driver_data;
+};
+
+struct pci_driver {
+ struct list_head node;
+ struct pci_dev *dev;
+ char *name;
+ const struct pci_device_id *id_table; /* NULL if wants all devices */
+ int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
+ void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
+ void (*suspend)(struct pci_dev *dev); /* Device suspended */
+ void (*resume)(struct pci_dev *dev); /* Device woken up */
+};
+
+#define PCI_MAX_MAPPINGS 16
+static struct pci_driver_mapping drvmap [PCI_MAX_MAPPINGS] = { { NULL, } , };
+
+#define __devinit __init
+#define __devinitdata __initdata
+#define __devexit
+#define MODULE_DEVICE_TABLE(foo,bar)
+#define SET_MODULE_OWNER(dev)
+#define COMPAT_MOD_INC_USE_COUNT MOD_INC_USE_COUNT
+#define COMPAT_MOD_DEC_USE_COUNT MOD_DEC_USE_COUNT
+#define PCI_ANY_ID (~0)
+#define IORESOURCE_MEM 2
+#define PCI_DMA_FROMDEVICE 0
+#define PCI_DMA_TODEVICE 0
+#define PCI_SLOT_NAME(pci_dev) ""
+
+#define pci_request_regions(pdev, name) 0
+#define pci_release_regions(pdev) do {} while(0)
+#define del_timer_sync(timer) del_timer(timer)
+#define alloc_etherdev(size) init_etherdev(NULL, size)
+#define register_netdev(dev) 0
+
+static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
+ dma_addr_t *dma_handle)
+{
+ void *virt_ptr;
+
+ virt_ptr = kmalloc(size, GFP_KERNEL);
+ *dma_handle = virt_to_bus(virt_ptr);
+ return virt_ptr;
+}
+#define pci_free_consistent(cookie, size, ptr, dma_ptr) kfree(ptr)
+#define pci_map_single(cookie, address, size, dir) virt_to_bus(address)
+#define pci_unmap_single(cookie, address, size, dir)
+#define pci_dma_sync_single(cookie, address, size, dir)
+#undef pci_resource_flags
+#define pci_resource_flags(dev, i) \
+ ((dev->base_address[i] & IORESOURCE_IO) ? IORESOURCE_IO : IORESOURCE_MEM)
+
+static void * pci_get_drvdata (struct pci_dev *dev)


+{
+ int i;
+

+ for (i = 0; i < PCI_MAX_MAPPINGS; i++)
+ if (drvmap[i].dev == dev)
+ return drvmap[i].driver_data;
+


+ return NULL;
+}
+

+static void pci_set_drvdata (struct pci_dev *dev, void *driver_data)


+{
+ int i;
+

+ for (i = 0; i < PCI_MAX_MAPPINGS; i++)
+ if (drvmap[i].dev == dev) {
+ drvmap[i].driver_data = driver_data;


+ return;
+ }
+}
+

+static const struct pci_device_id * __init
+pci_compat_match_device(const struct pci_device_id *ids, struct pci_dev *dev)
+{
+ u16 subsystem_vendor, subsystem_device;
+
+ pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
+ pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &subsystem_device);
+
+ while (ids->vendor || ids->subvendor || ids->class_mask) {
+ if ((ids->vendor == PCI_ANY_ID || ids->vendor == dev->vendor) &&
+ (ids->device == PCI_ANY_ID || ids->device == dev->device) &&
+ (ids->subvendor == PCI_ANY_ID || ids->subvendor == subsystem_vendor) &&
+ (ids->subdevice == PCI_ANY_ID || ids->subdevice == subsystem_device) &&
+ !((ids->class ^ dev->class) & ids->class_mask))
+ return ids;
+ ids++;
+ }


+ return NULL;
+}
+

+static int __init
+pci_announce_device(struct pci_driver *drv, struct pci_dev *dev)
+{
+ const struct pci_device_id *id;
+ int found, i;
+
+ if (drv->id_table) {
+ id = pci_compat_match_device(drv->id_table, dev);
+ if (!id)


+ return 0;
+ } else

+ id = NULL;
+
+ found = 0;
+ for (i = 0; i < PCI_MAX_MAPPINGS; i++)
+ if (!drvmap[i].dev) {
+ drvmap[i].dev = dev;
+ drvmap[i].drv = drv;
+ found = 1;
+ break;
+ }
+
+ if (!found)
+ return 0;
+
+ if (drv->probe(dev, id) >= 0)
+ return 1;
+
+ /* clean up */
+ drvmap[i].dev = NULL;


+ return 0;
+}
+

+static int __init
+pci_register_driver(struct pci_driver *drv)
+{
+ struct pci_dev *dev;
+ int count = 0, found, i;
+ list_add_tail(&drv->node, &pci_drivers);
+ for (dev = pci_devices; dev; dev = dev->next) {
+ found = 0;
+ for (i = 0; i < PCI_MAX_MAPPINGS && !found; i++)
+ if (drvmap[i].dev == dev)
+ found = 1;
+ if (!found)
+ count += pci_announce_device(drv, dev);
+ }
+ return count;
+}
+
+static void
+pci_unregister_driver(struct pci_driver *drv)
+{
+ struct pci_dev *dev;
+ int i, found;
+ list_del(&drv->node);
+ for (dev = pci_devices; dev; dev = dev->next) {
+ found = 0;
+ for (i = 0; i < PCI_MAX_MAPPINGS; i++)
+ if (drvmap[i].dev == dev) {
+ found = 1;
+ break;
+ }
+ if (found) {
+ if (drv->remove)
+ drv->remove(dev);
+ drvmap[i].dev = NULL;
+ }
+ }
+}
+
+static inline int pci_module_init(struct pci_driver *drv)
+{
+ if (pci_register_driver(drv))
+ return 0;


+ return -ENODEV;
+}
+

+static struct pci_driver starfire_driver;
+
+int __init starfire_probe(struct net_device *dev)
+{
+ static int __initdata probed = 0;
+
+ if (probed)
+ return -ENODEV;
+ probed++;
+
+ return pci_module_init(&starfire_driver);
+}
+
+#define init_tx_timer(dev, func, timeout)
+#define kick_tx_timer(dev, func, timeout) \
+ if (netif_queue_stopped(dev)) { \
+ /* If this happens network layer tells us we're broken. */ \
+ if (jiffies - dev->trans_start > timeout) \
+ func(dev); \
+ }
+
+#define netif_start_if(dev) dev->start = 1
+#define netif_stop_if(dev) dev->start = 0
+
+#endif /* __STARFIRE_KCOMP22_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/starfire.c linux/drivers/net/starfire.c
--- v2.2.19/drivers/net/starfire.c Sun Mar 25 18:45:41 2001
+++ linux/drivers/net/starfire.c Wed Oct 10 01:41:04 2001
@@ -2,6 +2,10 @@
X /*
X Written 1998-2000 by Donald Becker.
X
+ Current maintainer is Ion Badulescu <io...@cs.columbia.edu>. Please
+ send all bug reports to me, and not to Donald Becker, as this code
+ has been modified quite a bit from Donald's original version.
+
X This software may be used and distributed according to the terms of
X the GNU General Public License (GPL), incorporated herein by reference.
X Drivers based on or derived from this code fall under the GPL and must
@@ -63,31 +67,60 @@
X - Quell bogus error messages, inform about the Tx threshold
X - Removed #ifdef CONFIG_PCI, this driver is PCI only
X
+ LK1.2.9 (Ion Badulescu)
+ - Merged Jeff Garzik's changes from 2.4.4-pre5
+ - Added 2.2.x compatibility stuff required by the above changes
+
+ LK1.2.9a (Ion Badulescu)
+ - More updates from Jeff Garzik
+
+ LK1.3.0 (Ion Badulescu)
+ - Merged zerocopy support
+
+ LK1.3.1 (Ion Badulescu)
+ - Added ethtool support
+ - Added GPIO (media change) interrupt support
+
+ LK1.3.2 (Ion Badulescu)
+ - Fixed 2.2.x compatibility issues introduced in 1.3.1
+ - Fixed ethtool ioctl returning uninitialized memory
+
+ LK1.3.3 (Ion Badulescu)
+ - Initialize the TxMode register properly
+ - Don't dereference dev->priv after freeing it
+
+ LK1.3.4 (Ion Badulescu)
+ - Fixed initialization timing problems
+ - Fixed interrupt mask definitions
+
X TODO:
X - implement tx_timeout() properly
- - support ethtool
X */
X
-/* These identify the driver base version and may not be removed. */
-static const char version1[] =
-"starfire.c:v1.03 7/26/2000 Written by Donald Becker <bec...@scyld.com>\n";
-static const char version2[] =
-" Updates and info at http://www.scyld.com/network/starfire.html\n";
+#define DRV_NAME "starfire"
+#define DRV_VERSION "1.03+LK1.3.4"
+#define DRV_RELDATE "August 14, 2001"
X
-static const char version3[] =
-" (unofficial 2.2.x kernel port, version 1.2.8, March 7, 2001)\n";
-
-/* The user-configurable values.
- These may be modified when a driver module is loaded.*/
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <asm/processor.h> /* Processor type for cache alignment. */
+#include <asm/uaccess.h>
+#include <asm/io.h>
X
X /*
X * Adaptec's license for their Novell drivers (which is where I got the
- * firmware files) does not allow to redistribute them. Thus, we can't
- * include them with this driver.
+ * firmware files) does not allow one to redistribute them. Thus, we can't
+ * include the firmware with this driver.
X *
- * However, an end-user is allowed to download and use them, after
- * converting them to C header files using starfire_firmware.pl.
- * Once that's done, the #undef must be changed into a #define
+ * However, an end-user is allowed to download and use it, after
+ * converting it to C header files using starfire_firmware.pl.
+ * Once that's done, the #undef below must be changed into a #define
X * for this driver to really use the firmware. Note that Rx/Tx
X * hardware TCP checksumming is not possible without the firmware.
X *
@@ -100,16 +133,29 @@
X * of length 1. If and when this is fixed, the #define below can be removed.
X */
X #define HAS_BROKEN_FIRMWARE
+/*
+ * Define this if using the driver with the zero-copy patch
+ */
+#if defined(HAS_FIRMWARE) && defined(MAX_SKB_FRAGS)
+#define ZEROCOPY
+#endif
+
+#ifdef HAS_FIRMWARE
+#include "starfire_firmware.h"
+#endif /* HAS_FIRMWARE */
+
+/* The user-configurable values.
+ These may be modified when a driver module is loaded.*/
X
X /* Used for tuning interrupt latency vs. overhead. */
-static int interrupt_mitigation = 0x0;
+static int interrupt_mitigation;
X
X static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */


X static int max_interrupt_work = 20;

-static int mtu = 0;
+static int mtu;
X /* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
X The Starfire has a 512 element hash table based on the Ethernet CRC. */
-static int multicast_filter_limit = 32;
+static int multicast_filter_limit = 512;
X
X #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/
X /*
@@ -122,12 +168,12 @@
X * packets as the starfire doesn't allow for misaligned DMAs ;-(
X * 23/10/2000 - Jes
X *
- * Neither does the Alpha. -Ion
+ * The Alpha and the Sparc don't allow unaligned loads, either. -Ion
X */
-#if defined(__ia64__) || defined(__alpha__)
+#if defined(__ia64__) || defined(__alpha__) || defined(__sparc__)
X static int rx_copybreak = PKT_BUF_SZ;
X #else
-static int rx_copybreak = 0;
+static int rx_copybreak /* = 0 */;
X #endif
X
X /* Used to pass the media type, etc.
@@ -135,8 +181,8 @@
X The media type is usually passed in 'options[]'.
X */
X #define MAX_UNITS 8 /* More are supported, limit only on options */
-static int options[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
+static int options[MAX_UNITS] = {0, };
+static int full_duplex[MAX_UNITS] = {0, };
X
X /* Operational parameters that are set at compile time. */
X
@@ -152,38 +198,55 @@


X
X /* Operational parameters that usually are not changed. */
X /* Time in jiffies before concluding the transmitter is hung. */

-#define TX_TIMEOUT (2*HZ)
+#define TX_TIMEOUT (2 * HZ)
X
+#ifdef ZEROCOPY
+#if MAX_SKB_FRAGS <= 6
+#define MAX_STARFIRE_FRAGS 6
+#else /* MAX_STARFIRE_FRAGS > 6 */
+#warning This driver will not work with more than 6 skb fragments.
+#warning Turning off zerocopy support.
+#undef ZEROCOPY
+#endif /* MAX_STARFIRE_FRAGS > 6 */
+#endif /* ZEROCOPY */
+
+#ifdef ZEROCOPY
+#define skb_first_frag_len(skb) skb_headlen(skb)
+#else /* not ZEROCOPY */
X #define skb_first_frag_len(skb) (skb->len)
+#endif /* not ZEROCOPY */
X
-#if !defined(__OPTIMIZE__)
-#warning You must compile this file with the correct options!
-#warning See the last lines of the source file.
-#error You must compile this driver with "-O".
-#endif
+/* 2.2.x compatibility code */
+#if LINUX_VERSION_CODE < 0x20300
X
-#include <linux/version.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/interrupt.h>
-#include <linux/pci.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <asm/processor.h> /* Processor type for cache alignment. */
-#include <asm/bitops.h>
-#include <asm/io.h>
+#include "starfire-kcomp22.h"
X
-#ifdef HAS_FIRMWARE
-#include "starfire_firmware.h"
-#endif /* HAS_FIRMWARE */
+#else /* LINUX_VERSION_CODE > 0x20300 */
+
+#include <linux/ethtool.h>
+#include <linux/mii.h>
+
+#define COMPAT_MOD_INC_USE_COUNT
+#define COMPAT_MOD_DEC_USE_COUNT
+
+#define init_tx_timer(dev, func, timeout) \
+ dev->tx_timeout = func; \
+ dev->watchdog_timeo = timeout;
+#define kick_tx_timer(dev, func, timeout)
+
+#define netif_start_if(dev)
+#define netif_stop_if(dev)
+
+#define PCI_SLOT_NAME(pci_dev) (pci_dev)->slot_name
+
+#endif /* LINUX_VERSION_CODE > 0x20300 */
+/* end of compatibility code */
+
+
+/* These identify the driver base version and may not be removed. */
+static char version[] __devinitdata =
+KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <bec...@scyld.com>\n"
+KERN_INFO " (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n";
X
X MODULE_AUTHOR("Donald Becker <bec...@scyld.com>");
X MODULE_DESCRIPTION("Adaptec Starfire Ethernet driver");
@@ -194,6 +257,12 @@
X MODULE_PARM(interrupt_mitigation, "i");
X MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
X MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM_DESC(max_interrupt_work, "Starfire maximum events handled per interrupt");
+MODULE_PARM_DESC(mtu, "Starfire MTU (all boards)");
+MODULE_PARM_DESC(debug, "Starfire debug level (0-6)");
+MODULE_PARM_DESC(rx_copybreak, "Starfire copy breakpoint for copy-only-tiny-frames");
+MODULE_PARM_DESC(options, "Starfire: Bits 0-3: media type, bit 17: full duplex");
+MODULE_PARM_DESC(full_duplex, "Starfire full duplex setting(s) (1)");
X
X /*
X Theory of Operation
@@ -225,7 +294,7 @@
X each structure. There are far too many to document here.
X
X For transmit this driver uses type 0/1 transmit descriptors (depending
-on the presence of the zerocopy patches), and relies on automatic
+on the presence of the zerocopy infrastructure), and relies on automatic
X minimum-length padding. It does not use the completion queue
X consumer index, but instead checks for non-zero status entries.
X
@@ -241,7 +310,7 @@
X phase of receive.
X
X A notable aspect of operation is that unaligned buffers are not permitted by
-the Starfire hardware. The IP header at offset 14 in an ethernet frame thus
+the Starfire hardware. Thus the IP header at offset 14 in an ethernet frame
X isn't longword aligned, which may cause problems on some machine
X e.g. Alphas and IA64. For these architectures, the driver is forced to copy
X the frame into a new skbuff unconditionally. Copied frames are put into the
@@ -278,236 +347,8 @@
X
X
X
-/* 2.2.x compatibility code */
-#if LINUX_VERSION_CODE < 0x20300
-#include <linux/kcomp.h>
-
-static LIST_HEAD(pci_drivers);
-
-struct pci_driver_mapping {
- struct pci_dev *dev;
- struct pci_driver *drv;
- void *driver_data;
-};
-
-struct pci_device_id {
- unsigned int vendor, device;
- unsigned int subvendor, subdevice;
- unsigned int class, class_mask;
- unsigned long driver_data;
-};
-
-struct pci_driver {
- struct list_head node;
- struct pci_dev *dev;
- char *name;
- const struct pci_device_id *id_table; /* NULL if wants all devices */
- int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
- void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
- void (*suspend)(struct pci_dev *dev); /* Device suspended */
- void (*resume)(struct pci_dev *dev); /* Device woken up */
-};
-
-#define PCI_MAX_MAPPINGS 16
-static struct pci_driver_mapping drvmap [PCI_MAX_MAPPINGS] = { { NULL, } , };
-
-#define __devinit __init
-#define __devinitdata __initdata
-#define __devexit
-#define MODULE_DEVICE_TABLE(foo,bar)
-#define SET_MODULE_OWNER(dev)
-#define COMPAT_MOD_INC_USE_COUNT MOD_INC_USE_COUNT
-#define COMPAT_MOD_DEC_USE_COUNT MOD_DEC_USE_COUNT
-#define PCI_ANY_ID (~0)
-#define IORESOURCE_MEM 2
-#define PCI_DMA_FROMDEVICE 0
-#define PCI_DMA_TODEVICE 0
-
-#define request_mem_region(addr, size, name) ((void *)1)
-#define release_mem_region(addr, size)
-#define del_timer_sync(timer) del_timer(timer)
-
-static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
- dma_addr_t *dma_handle)
-{
- void *virt_ptr;
-
- virt_ptr = kmalloc(size, GFP_KERNEL);
- *dma_handle = virt_to_bus(virt_ptr);
- return virt_ptr;
-}
-#define pci_free_consistent(cookie, size, ptr, dma_ptr) kfree(ptr)
-#define pci_map_single(cookie, address, size, dir) virt_to_bus(address)
-#define pci_unmap_single(cookie, address, size, dir)
-#define pci_dma_sync_single(cookie, address, size, dir)
-#undef pci_resource_flags
-#define pci_resource_flags(dev, i) \
- ((dev->base_address[i] & IORESOURCE_IO) ? IORESOURCE_IO : IORESOURCE_MEM)
-
-static void * pci_get_drvdata (struct pci_dev *dev)
-{
- int i;
-
- for (i = 0; i < PCI_MAX_MAPPINGS; i++)
- if (drvmap[i].dev == dev)
- return drvmap[i].driver_data;
-


- return NULL;
-}
-

-static void pci_set_drvdata (struct pci_dev *dev, void *driver_data)
-{
- int i;
-
- for (i = 0; i < PCI_MAX_MAPPINGS; i++)
- if (drvmap[i].dev == dev) {
- drvmap[i].driver_data = driver_data;
- return;
- }
-}
-
-static const struct pci_device_id * __init
-pci_compat_match_device(const struct pci_device_id *ids, struct pci_dev *dev)
-{
- u16 subsystem_vendor, subsystem_device;
-
- pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
- pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &subsystem_device);
-
- while (ids->vendor || ids->subvendor || ids->class_mask) {
- if ((ids->vendor == PCI_ANY_ID || ids->vendor == dev->vendor) &&
- (ids->device == PCI_ANY_ID || ids->device == dev->device) &&
- (ids->subvendor == PCI_ANY_ID || ids->subvendor == subsystem_vendor) &&
- (ids->subdevice == PCI_ANY_ID || ids->subdevice == subsystem_device) &&
- !((ids->class ^ dev->class) & ids->class_mask))
- return ids;
- ids++;
- }


- return NULL;
-}
-

-static int __init
-pci_announce_device(struct pci_driver *drv, struct pci_dev *dev)
-{
- const struct pci_device_id *id;
- int found, i;
-
- if (drv->id_table) {
- id = pci_compat_match_device(drv->id_table, dev);
- if (!id)
- return 0;
- } else
- id = NULL;
-
- found = 0;
- for (i = 0; i < PCI_MAX_MAPPINGS; i++)
- if (!drvmap[i].dev) {
- drvmap[i].dev = dev;
- drvmap[i].drv = drv;
- found = 1;
- break;
- }
-
- if (!found)
- return 0;
-
- if (drv->probe(dev, id) >= 0)
- return 1;
-
- /* clean up */
- drvmap[i].dev = NULL;


- return 0;
-}
-

-static int __init
-pci_register_driver(struct pci_driver *drv)
-{
- struct pci_dev *dev;
- int count = 0, found, i;
- list_add_tail(&drv->node, &pci_drivers);
- for (dev = pci_devices; dev; dev = dev->next) {
- found = 0;
- for (i = 0; i < PCI_MAX_MAPPINGS && !found; i++)
- if (drvmap[i].dev == dev)
- found = 1;
- if (!found)
- count += pci_announce_device(drv, dev);
- }
- return count;
-}
-
-static void
-pci_unregister_driver(struct pci_driver *drv)
-{
- struct pci_dev *dev;
- int i, found;
- list_del(&drv->node);
- for (dev = pci_devices; dev; dev = dev->next) {
- found = 0;
- for (i = 0; i < PCI_MAX_MAPPINGS; i++)
- if (drvmap[i].dev == dev) {
- found = 1;
- break;
- }
- if (found) {
- if (drv->remove)
- drv->remove(dev);
- drvmap[i].dev = NULL;
- }
- }
-}
-
-static inline int pci_module_init(struct pci_driver *drv)
-{
- if (pci_register_driver(drv))
- return 0;


- return -ENODEV;
-}
-

-static struct pci_driver starfire_driver;
-
-int __init starfire_probe(struct net_device *dev)
-{
- static int __initdata probed = 0;
-
- if (probed)
- return -ENODEV;
- probed++;
-
- return pci_module_init(&starfire_driver);
-}
-
-#define init_tx_timer(dev, func, timeout)
-#define kick_tx_timer(dev, func, timeout) \
- if (netif_queue_stopped(dev)) { \
- /* If this happens network layer tells us we're broken. */ \
- if (jiffies - dev->trans_start > timeout) \
- func(dev); \
- }
-
-#define netif_start_if(dev) dev->start = 1
-#define netif_stop_if(dev) dev->start = 0
-
-#else /* LINUX_VERSION_CODE > 0x20300 */
-
-#define COMPAT_MOD_INC_USE_COUNT
-#define COMPAT_MOD_DEC_USE_COUNT
-
-#define init_tx_timer(dev, func, timeout) \
- dev->tx_timeout = func; \
- dev->watchdog_timeo = timeout;
-#define kick_tx_timer(dev, func, timeout)
-
-#define netif_start_if(dev)
-#define netif_stop_if(dev)
-
-#endif /* LINUX_VERSION_CODE > 0x20300 */
-/* end of compatibility code */
-
-
X enum chip_capability_flags {CanHaveMII=1, };
X #define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR0)
-#define MEM_ADDR_SZ 0x80000 /* And maps in 0.5MB(!). */
X
X #if 0
X #define ADDR_64BITS 1 /* This chip uses 64 bit addresses. */
@@ -528,10 +369,9 @@
X /* A chip capabilities table, matching the CH_xxx entries in xxx_pci_tbl[] above. */
X static struct chip_info {
X const char *name;
- int io_size;
X int drv_flags;
X } netdrv_tbl[] __devinitdata = {
- { "Adaptec Starfire 6915", MEM_ADDR_SZ, CanHaveMII },
+ { "Adaptec Starfire 6915", CanHaveMII },
X };
X
X
@@ -547,7 +387,7 @@
X PCIDeviceConfig=0x50040, GenCtrl=0x50070, IntrTimerCtrl=0x50074,
X IntrClear=0x50080, IntrStatus=0x50084, IntrEnable=0x50088,
X MIICtrl=0x52000, StationAddr=0x50120, EEPROMCtrl=0x51000,
- TxDescCtrl=0x50090,
+ GPIOCtrl=0x5008C, TxDescCtrl=0x50090,
X TxRingPtr=0x50098, HiPriTxRingPtr=0x50094, /* Low and High priority. */
X TxRingHiAddr=0x5009C, /* 64 bit address extension. */
X TxProducerIdx=0x500A0, TxConsumerIdx=0x500A4,
@@ -557,7 +397,8 @@
X CompletionQConsumerIdx=0x500C4, RxDMACtrl=0x500D0,
X RxDescQCtrl=0x500D4, RxDescQHiAddr=0x500DC, RxDescQAddr=0x500E0,
X RxDescQIdx=0x500E8, RxDMAStatus=0x500F0, RxFilterMode=0x500F4,
- TxMode=0x55000, TxGfpMem=0x58000, RxGfpMem=0x5a000,
+ TxMode=0x55000, PerfFilterTable=0x56000, HashTable=0x56100,
+ TxGfpMem=0x58000, RxGfpMem=0x5a000,
X };
X
X /* Bits in the interrupt status/mask registers. */
@@ -579,7 +420,7 @@
X /* not quite bits */
X IntrRxDone=IntrRxQ2Done | IntrRxQ1Done,
X IntrRxEmpty=IntrRxDescQ1Low | IntrRxDescQ2Low,
- IntrNormalMask=0xf0, IntrAbnormalMask=0x3f0e,
+ IntrNormalMask=0xff00, IntrAbnormalMask=0x3ff00fe,
X };
X
X /* Bits in the RxFilterMode register. */
@@ -649,11 +490,28 @@
X RxOK=0x20000000, RxFIFOErr=0x10000000, RxBufQ2=0x08000000,
X };
X
+#ifdef ZEROCOPY
+/* Type 0 Tx descriptor. */
+/* If more fragments are needed, don't forget to change the
+ descriptor spacing as well! */
+struct starfire_tx_desc {
+ u32 status;
+ u32 nbufs;
+ u32 first_addr;
+ u16 first_len;
+ u16 total_len;
+ struct {
+ u32 addr;
+ u32 len;
+ } frag[MAX_STARFIRE_FRAGS];
+};
+#else /* not ZEROCOPY */
X /* Type 1 Tx descriptor. */
X struct starfire_tx_desc {
X u32 status; /* Upper bits are status, lower 16 length. */
X u32 first_addr;
X };
+#endif /* not ZEROCOPY */
X enum tx_desc_bits {
X TxDescID=0xB0000000,
X TxCRCEn=0x01000000, TxDescIntr=0x08000000,
@@ -673,9 +531,12 @@
X struct tx_ring_info {
X struct sk_buff *skb;
X dma_addr_t first_mapping;
+#ifdef ZEROCOPY
+ dma_addr_t frag_mapping[MAX_STARFIRE_FRAGS];
+#endif /* ZEROCOPY */
X };
X
-#define MII_CNT 2
+#define PHY_CNT 2
X struct netdev_private {
X /* Descriptor rings first for alignment. */
X struct starfire_rx_desc *rx_ring;
@@ -685,41 +546,38 @@
X /* The addresses of rx/tx-in-place skbuffs. */
X struct rx_ring_info rx_info[RX_RING_SIZE];
X struct tx_ring_info tx_info[TX_RING_SIZE];
- /* Pointers to completion queues (full pages). I should cache line pad..*/
- u8 pad0[100];
+ /* Pointers to completion queues (full pages). */
X struct rx_done_desc *rx_done_q;
X dma_addr_t rx_done_q_dma;
X unsigned int rx_done;
X struct tx_done_report *tx_done_q;
- unsigned int tx_done;
X dma_addr_t tx_done_q_dma;
+ unsigned int tx_done;
X struct net_device_stats stats;
- struct timer_list timer; /* Media monitoring timer. */
X struct pci_dev *pci_dev;
X /* Frequently used values: keep some adjacent for cache effect. */
X unsigned int cur_rx, dirty_rx; /* Producer/consumer ring indices */


X unsigned int cur_tx, dirty_tx;

X unsigned int rx_buf_sz; /* Based on MTU+slack. */
- unsigned int tx_full:1; /* The Tx queue is full. */
- /* These values are keep track of the transceiver/media in use. */
- unsigned int full_duplex:1, /* Full-duplex operation requested. */
- medialock:1, /* Xcvr set to fixed speed/duplex. */
- rx_flowctrl:1,
- tx_flowctrl:1; /* Use 802.3x flow control. */
- unsigned int default_port:4; /* Last dev->if_port value. */
+ unsigned int tx_full:1, /* The Tx queue is full. */
+ /* These values keep track of the transceiver/media in use. */
+ autoneg:1, /* Autonegotiation allowed. */
+ full_duplex:1, /* Full-duplex operation. */
+ speed100:1; /* Set if speed == 100MBit. */
+ unsigned int intr_mitigation;
X u32 tx_mode;
X u8 tx_threshold;
X /* MII transceiver section. */
- int mii_cnt; /* MII device addresses. */


X u16 advertising; /* NWay media advertisement */

- unsigned char phys[MII_CNT]; /* MII device addresses. */
+ int phy_cnt; /* MII device addresses. */
+ unsigned char phys[PHY_CNT]; /* MII device addresses. */
X };
X
+
X static int mdio_read(struct net_device *dev, int phy_id, int location);
X static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
X static int netdev_open(struct net_device *dev);
-static void check_duplex(struct net_device *dev, int startup);
-static void netdev_timer(unsigned long data);
+static void check_duplex(struct net_device *dev);
X static void tx_timeout(struct net_device *dev);
X static void init_ring(struct net_device *dev);
X static int start_tx(struct sk_buff *skb, struct net_device *dev);
@@ -729,10 +587,11 @@
X static void netdev_error(struct net_device *dev, int intr_status);
X static void set_rx_mode(struct net_device *dev);
X static struct net_device_stats *get_stats(struct net_device *dev);
-static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
+static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
X static int netdev_close(struct net_device *dev);
+static void netdev_media_change(struct net_device *dev);
+
X
-
X
X static int __devinit starfire_init_one(struct pci_dev *pdev,
X const struct pci_device_id *ent)
@@ -741,61 +600,71 @@
X int i, irq, option, chip_idx = ent->driver_data;
X struct net_device *dev;
X static int card_idx = -1;
- static int printed_version = 0;
X long ioaddr;
X int drv_flags, io_size;
X int boguscnt;
+ u8 cache;
X
- card_idx++;
- option = card_idx < MAX_UNITS ? options[card_idx] : 0;
-
+/* when built into the kernel, we only print version if device is found */
+#ifndef MODULE
+ static int printed_version;
X if (!printed_version++)
- printk(KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
- version1, version2, version3);
+ printk(version);
+#endif
+
+ card_idx++;
X
X if (pci_enable_device (pdev))
X return -EIO;
X
- ioaddr = pci_resource_start (pdev, 0);
- io_size = pci_resource_len (pdev, 0);
- if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_MEM) == 0)) {
- printk (KERN_ERR "starfire %d: no PCI MEM resources, aborting\n", card_idx);
+ ioaddr = pci_resource_start(pdev, 0);
+ io_size = pci_resource_len(pdev, 0);
+ if (!ioaddr || ((pci_resource_flags(pdev, 0) & IORESOURCE_MEM) == 0)) {
+ printk (KERN_ERR DRV_NAME " %d: no PCI MEM resources, aborting\n", card_idx);


X return -ENODEV;
X }
X

- dev = init_etherdev(NULL, sizeof(*np));
+ dev = alloc_etherdev(sizeof(*np));
X if (!dev) {
- printk (KERN_ERR "starfire %d: cannot alloc etherdev, aborting\n", card_idx);
+ printk (KERN_ERR DRV_NAME " %d: cannot alloc etherdev, aborting\n", card_idx);
X return -ENOMEM;
X }
X SET_MODULE_OWNER(dev);
X
X irq = pdev->irq;
X
- if (request_mem_region (ioaddr, io_size, dev->name) == NULL) {
- printk (KERN_ERR "starfire %d: resource 0x%x @ 0x%lx busy, aborting\n",
- card_idx, io_size, ioaddr);
+ if (pci_request_regions (pdev, dev->name)) {
+ printk (KERN_ERR DRV_NAME " %d: cannot reserve PCI resources, aborting\n", card_idx);
X goto err_out_free_netdev;
X }
X
X ioaddr = (long) ioremap (ioaddr, io_size);
X if (!ioaddr) {
- printk (KERN_ERR "starfire %d: cannot remap 0x%x @ 0x%lx, aborting\n",
+ printk (KERN_ERR DRV_NAME " %d: cannot remap 0x%x @ 0x%lx, aborting\n",
X card_idx, io_size, ioaddr);
X goto err_out_free_res;
X }


X
X pci_set_master (pdev);
X

- printk(KERN_INFO "%s: %s at 0x%lx, ",
- dev->name, netdrv_tbl[chip_idx].name, ioaddr);
+ /* set PCI cache size */
+ pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &cache);
+ if ((cache << 2) != SMP_CACHE_BYTES) {
+ printk(KERN_INFO " PCI cache line size set incorrectly "
+ "(%i bytes) by BIOS/FW, correcting to %i\n",
+ (cache << 2), SMP_CACHE_BYTES);
+ pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE,
+ SMP_CACHE_BYTES >> 2);
+ }
+
+#ifdef ZEROCOPY
+ /* Starfire can do SG and TCP/UDP checksumming */
+ dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
+#endif /* ZEROCOPY */
X
X /* Serial EEPROM reads are hidden by the hardware. */
X for (i = 0; i < 6; i++)
X dev->dev_addr[i] = readb(ioaddr + EEPROMCtrl + 20-i);
- for (i = 0; i < 5; i++)
- printk("%2.2x:", dev->dev_addr[i]);
- printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
X
X #if ! defined(final_version) /* Dump the EEPROM contents during development. */
X if (debug > 4)
@@ -832,22 +701,22 @@
X np->pci_dev = pdev;
X drv_flags = netdrv_tbl[chip_idx].drv_flags;
X
+ option = card_idx < MAX_UNITS ? options[card_idx] : 0;
X if (dev->mem_start)
X option = dev->mem_start;
X

X /* The lower four bits are the media type. */

- if (option > 0) {
- if (option & 0x200)
- np->full_duplex = 1;
- np->default_port = option & 15;
- if (np->default_port)
- np->medialock = 1;
- }
+ if (option & 0x200)
+ np->full_duplex = 1;
+
X if (card_idx < MAX_UNITS && full_duplex[card_idx] > 0)
X np->full_duplex = 1;
X
X if (np->full_duplex)
- np->medialock = 1;
+ np->autoneg = 0;
+ else
+ np->autoneg = 1;
+ np->speed100 = 1;
X
X /* The chip-specific entries in the device structure. */
X dev->open = &netdev_open;
@@ -856,29 +725,39 @@
X dev->stop = &netdev_close;
X dev->get_stats = &get_stats;
X dev->set_multicast_list = &set_rx_mode;
- dev->do_ioctl = &mii_ioctl;
+ dev->do_ioctl = &netdev_ioctl;
X
X if (mtu)
X dev->mtu = mtu;
X
+ i = register_netdev(dev);
+ if (i)
+ goto err_out_cleardev;
+
+ printk(KERN_INFO "%s: %s at 0x%lx, ",
+ dev->name, netdrv_tbl[chip_idx].name, ioaddr);
+ for (i = 0; i < 5; i++)
+ printk("%2.2x:", dev->dev_addr[i]);
+ printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
+
X if (drv_flags & CanHaveMII) {


X int phy, phy_idx = 0;

X int mii_status;
- for (phy = 0; phy < 32 && phy_idx < MII_CNT; phy++) {
- mdio_write(dev, phy, 0, 0x8000);
- udelay(500);
+ for (phy = 0; phy < 32 && phy_idx < PHY_CNT; phy++) {
+ mdio_write(dev, phy, MII_BMCR, BMCR_RESET);
+ mdelay(100);
X boguscnt = 1000;
X while (--boguscnt > 0)
- if ((mdio_read(dev, phy, 0) & 0x8000) == 0)
+ if ((mdio_read(dev, phy, MII_BMCR) & BMCR_RESET) == 0)
X break;
X if (boguscnt == 0) {
X printk("%s: PHY reset never completed!\n", dev->name);
X continue;
X }
- mii_status = mdio_read(dev, phy, 1);
- if (mii_status != 0x0000) {
+ mii_status = mdio_read(dev, phy, MII_BMSR);
+ if (mii_status != 0) {
X np->phys[phy_idx++] = phy;
- np->advertising = mdio_read(dev, phy, 4);
+ np->advertising = mdio_read(dev, phy, MII_ADVERTISE);
X printk(KERN_INFO "%s: MII PHY found at address %d, status "
X "0x%4.4x advertising %4.4x.\n",
X dev->name, phy, mii_status, np->advertising);
@@ -886,22 +765,32 @@
X break;
X }
X }
- np->mii_cnt = phy_idx;
+ np->phy_cnt = phy_idx;
X }
X
+#ifdef ZEROCOPY
+ printk(KERN_INFO "%s: scatter-gather and hardware TCP cksumming enabled.\n",
+ dev->name,
+#else /* not ZEROCOPY */
+ printk(KERN_INFO "%s: scatter-gather and hardware TCP cksumming disabled.\n",
+ dev->name);
+#endif /* not ZEROCOPY */


+
X return 0;
X

+err_out_cleardev:
+ pci_set_drvdata(pdev, NULL);
+ iounmap((void *)ioaddr);
X err_out_free_res:
- release_mem_region (ioaddr, io_size);
+ pci_release_regions (pdev);
X err_out_free_netdev:


- unregister_netdev (dev);
- kfree (dev);

+ unregister_netdev(dev);
+ kfree(dev);


X return -ENODEV;
X }
X

-
-/* Read the MII Management Data I/O (MDIO) interfaces. */
X
+/* Read the MII Management Data I/O (MDIO) interfaces. */
X static int mdio_read(struct net_device *dev, int phy_id, int location)
X {
X long mdio_addr = dev->base_addr + MIICtrl + (phy_id<<7) + (location<<2);
@@ -917,6 +806,7 @@
X return result & 0xffff;
X }
X
+
X static void mdio_write(struct net_device *dev, int phy_id, int location, int value)
X {
X long mdio_addr = dev->base_addr + MIICtrl + (phy_id<<7) + (location<<2);
@@ -925,7 +815,7 @@
X return;
X }
X
-
+
X static int netdev_open(struct net_device *dev)
X {
X struct netdev_private *np = dev->priv;
@@ -983,12 +873,21 @@
X RxDescSpace4,
X ioaddr + RxDescQCtrl);
X
+#ifdef ZEROCOPY
+ /* Set Tx descriptor to type 0 and spacing to 64 bytes. */
+ writel((2 << TxHiPriFIFOThreshShift) |
+ (0 << TxPadLenShift) |
+ (4 << TxDMABurstSizeShift) |
+ TxDescSpace64 | TxDescType0,
+ ioaddr + TxDescCtrl);
+#else /* not ZEROCOPY */
X /* Set Tx descriptor to type 1 and padding to 0 bytes. */
X writel((2 << TxHiPriFIFOThreshShift) |
X (0 << TxPadLenShift) |
X (4 << TxDMABurstSizeShift) |
X TxDescSpaceUnlim | TxDescType1,
X ioaddr + TxDescCtrl);
+#endif /* not ZEROCOPY */
X
X #if defined(ADDR_64BITS) && defined(__alpha__)
X /* XXX We really need a 64-bit PCI dma interfaces too... -DaveM */
@@ -1030,7 +929,7 @@
X writeb(dev->dev_addr[i], ioaddr + StationAddr + 5-i);
X for (i = 0; i < 16; i++) {
X u16 *eaddrs = (u16 *)dev->dev_addr;
- long setup_frm = ioaddr + 0x56000 + i*16;
+ long setup_frm = ioaddr + PerfFilterTable + i * 16;
X writew(cpu_to_be16(eaddrs[2]), setup_frm); setup_frm += 4;
X writew(cpu_to_be16(eaddrs[1]), setup_frm); setup_frm += 4;
X writew(cpu_to_be16(eaddrs[0]), setup_frm); setup_frm += 8;
@@ -1038,13 +937,16 @@
X
X /* Initialize other registers. */
X /* Configure the PCI bus bursts and FIFO thresholds. */
- np->tx_mode = 0; /* Initialized when TxMode set. */
+ np->tx_mode = 0x0C04; /* modified when link is up. */
+ writel(0x8000 | np->tx_mode, ioaddr + TxMode);
+ udelay(1000);
+ writel(np->tx_mode, ioaddr + TxMode);
X np->tx_threshold = 4;
X writel(np->tx_threshold, ioaddr + TxThreshold);
- writel(interrupt_mitigation, ioaddr + IntrTimerCtrl);
X
- if (dev->if_port == 0)
- dev->if_port = np->default_port;
+ interrupt_mitigation &= 0x1f;
+ np->intr_mitigation = interrupt_mitigation;
+ writel(np->intr_mitigation, ioaddr + IntrTimerCtrl);
X
X netif_start_if(dev);
X netif_start_queue(dev);
@@ -1053,8 +955,11 @@
X printk(KERN_DEBUG "%s: Setting the Rx and Tx modes.\n", dev->name);
X set_rx_mode(dev);
X
- np->advertising = mdio_read(dev, np->phys[0], 4);
- check_duplex(dev, 1);
+ np->advertising = mdio_read(dev, np->phys[0], MII_ADVERTISE);
+ check_duplex(dev);
+
+ /* Enable GPIO interrupts on link change */
+ writel(0x0f00ff00, ioaddr + GPIOCtrl);
X
X /* Set the interrupt mask and enable PCI interrupts. */
X writel(IntrRxDone | IntrRxEmpty | IntrDMAErr |
@@ -1082,77 +987,39 @@
X printk(KERN_DEBUG "%s: Done netdev_open().\n",
X dev->name);
X
- /* Set the timer to check for link beat. */
- init_timer(&np->timer);
- np->timer.expires = jiffies + 3*HZ;
- np->timer.data = (unsigned long)dev;
- np->timer.function = &netdev_timer; /* timer handler */
- add_timer(&np->timer);
-


X return 0;
X }
X

-static void check_duplex(struct net_device *dev, int startup)
+
+static void check_duplex(struct net_device *dev)
X {
X struct netdev_private *np = dev->priv;
- long ioaddr = dev->base_addr;
- int new_tx_mode ;
+ u16 reg0;
X
- new_tx_mode = 0x0C04 | (np->tx_flowctrl ? 0x0800:0)
- | (np->rx_flowctrl ? 0x0400:0);
- if (np->medialock) {
- if (np->full_duplex)
- new_tx_mode |= 2;
- } else {
- int mii_reg5 = mdio_read(dev, np->phys[0], 5);
- int negotiated = mii_reg5 & np->advertising;
- int duplex = (negotiated & 0x0100) || (negotiated & 0x01C0) == 0x0040;
- if (duplex)
- new_tx_mode |= 2;
- if (np->full_duplex != duplex) {
- np->full_duplex = duplex;
- if (debug > 1)
- printk(KERN_INFO "%s: Setting %s-duplex based on MII #%d"
- " negotiated capability %4.4x.\n", dev->name,
- duplex ? "full" : "half", np->phys[0], negotiated);
- }
- }
- if (new_tx_mode != np->tx_mode) {
- np->tx_mode = new_tx_mode;
- writel(np->tx_mode | 0x8000, ioaddr + TxMode);
- writel(np->tx_mode, ioaddr + TxMode);
- }
-}
+ mdio_write(dev, np->phys[0], MII_ADVERTISE, np->advertising);
+ mdio_write(dev, np->phys[0], MII_BMCR, BMCR_RESET);
+ udelay(500);
+ while (mdio_read(dev, np->phys[0], MII_BMCR) & BMCR_RESET);
X
-static void netdev_timer(unsigned long data)
-{
- struct net_device *dev = (struct net_device *)data;
- struct netdev_private *np = dev->priv;
- long ioaddr = dev->base_addr;
- int next_tick = 60*HZ; /* Check before driver release. */
+ reg0 = mdio_read(dev, np->phys[0], MII_BMCR);
X
- if (debug > 3) {
- printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x.\n",
- dev->name, (int)readl(ioaddr + IntrStatus));
- }
- check_duplex(dev, 0);
-#if ! defined(final_version)
- /* This is often falsely triggered. */
- if (readl(ioaddr + IntrStatus) & 1) {
- int new_status = readl(ioaddr + IntrStatus);
- /* Bogus hardware IRQ: Fake an interrupt handler call. */
- if (new_status & 1) {
- printk(KERN_ERR "%s: Interrupt blocked, status %8.8x/%8.8x.\n",
- dev->name, new_status, (int)readl(ioaddr + IntrStatus));
- intr_handler(dev->irq, dev, 0);
- }
+ if (np->autoneg) {
+ reg0 |= BMCR_ANENABLE | BMCR_ANRESTART;
+ } else {
+ reg0 &= ~(BMCR_ANENABLE | BMCR_ANRESTART);
+ if (np->speed100)
+ reg0 |= BMCR_SPEED100;
+ if (np->full_duplex)
+ reg0 |= BMCR_FULLDPLX;
+ printk(KERN_DEBUG "%s: Link forced to %sMbit %s-duplex\n",
+ dev->name,
+ np->speed100 ? "100" : "10",
+ np->full_duplex ? "full" : "half");
X }
-#endif
-
- np->timer.expires = jiffies + next_tick;
- add_timer(&np->timer);
+ mdio_write(dev, np->phys[0], MII_BMCR, reg0);
X }
X
+
X static void tx_timeout(struct net_device *dev)
X {
X struct netdev_private *np = dev->priv;
@@ -1175,7 +1042,6 @@
X #endif
X
X /* Perhaps we should reinitialize the hardware here. */
- dev->if_port = 0;
X /* Stop and restart the chip's Tx processes . */
X
X /* Trigger an immediate transmit demand. */
@@ -1230,15 +1096,26 @@
X for (i = 0; i < TX_RING_SIZE; i++) {
X np->tx_info[i].skb = NULL;
X np->tx_info[i].first_mapping = 0;
+#ifdef ZEROCOPY
+ {
+ int j;
+ for (j = 0; j < MAX_STARFIRE_FRAGS; j++)
+ np->tx_info[i].frag_mapping[j] = 0;
+ }
+#endif /* ZEROCOPY */
X np->tx_ring[i].status = 0;


X }
X return;
X }
X
+

X static int start_tx(struct sk_buff *skb, struct net_device *dev)
X {
X struct netdev_private *np = dev->priv;
X unsigned int entry;
+#ifdef ZEROCOPY
+ int i;
+#endif
X
X kick_tx_timer(dev, tx_timeout, TX_TIMEOUT);
X
@@ -1248,22 +1125,81 @@


X /* Calculate the next Tx descriptor entry. */

X entry = np->cur_tx % TX_RING_SIZE;
X
+#if defined(ZEROCOPY) && defined(HAS_FIRMWARE) && defined(HAS_BROKEN_FIRMWARE)
+ {
+ int has_bad_length = 0;
+
+ if (skb_first_frag_len(skb) == 1)
+ has_bad_length = 1;
+ else {
+ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
+ if (skb_shinfo(skb)->frags[i].size == 1) {
+ has_bad_length = 1;
+ break;
+ }
+ }
+
+ if (has_bad_length)
+ skb_checksum_help(skb);
+ }
+#endif /* ZEROCOPY && HAS_FIRMWARE && HAS_BROKEN_FIRMWARE */
+
X np->tx_info[entry].skb = skb;
X np->tx_info[entry].first_mapping =
X pci_map_single(np->pci_dev, skb->data, skb_first_frag_len(skb), PCI_DMA_TODEVICE);
X
X np->tx_ring[entry].first_addr = cpu_to_le32(np->tx_info[entry].first_mapping);
+#ifdef ZEROCOPY
+ np->tx_ring[entry].first_len = cpu_to_le32(skb_first_frag_len(skb));
+ np->tx_ring[entry].total_len = cpu_to_le32(skb->len);
+ /* Add "| TxDescIntr" to generate Tx-done interrupts. */
+ np->tx_ring[entry].status = cpu_to_le32(TxDescID | TxCRCEn);
+ np->tx_ring[entry].nbufs = cpu_to_le32(skb_shinfo(skb)->nr_frags + 1);
+#else /* not ZEROCOPY */
X /* Add "| TxDescIntr" to generate Tx-done interrupts. */
X np->tx_ring[entry].status = cpu_to_le32(skb->len | TxDescID | TxCRCEn | 1 << 16);
+#endif /* not ZEROCOPY */
X
X if (entry >= TX_RING_SIZE-1) /* Wrap ring */
X np->tx_ring[entry].status |= cpu_to_le32(TxRingWrap | TxDescIntr);
X
+#ifdef ZEROCOPY
+ if (skb->ip_summed == CHECKSUM_HW)
+ np->tx_ring[entry].status |= cpu_to_le32(TxCalTCP);
+#endif /* ZEROCOPY */
+
X if (debug > 5) {
+#ifdef ZEROCOPY
+ printk(KERN_DEBUG "%s: Tx #%d slot %d status %8.8x nbufs %d len %4.4x/%4.4x.\n",
+ dev->name, np->cur_tx, entry,
+ le32_to_cpu(np->tx_ring[entry].status),
+ le32_to_cpu(np->tx_ring[entry].nbufs),
+ le32_to_cpu(np->tx_ring[entry].first_len),
+ le32_to_cpu(np->tx_ring[entry].total_len));
+#else /* not ZEROCOPY */
X printk(KERN_DEBUG "%s: Tx #%d slot %d status %8.8x.\n",
X dev->name, np->cur_tx, entry,
X le32_to_cpu(np->tx_ring[entry].status));
+#endif /* not ZEROCOPY */
+ }
+
+#ifdef ZEROCOPY
+ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+ skb_frag_t *this_frag = &skb_shinfo(skb)->frags[i];
+
+ /* we already have the proper value in entry */
+ np->tx_info[entry].frag_mapping[i] =


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 38'
echo 'File patch-2.2.20 is continued in part 39'
echo "39" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:26 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part27

#!/bin/sh -x
# this is part 27 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 27; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-#define LED_OFF (1<<0) /* Bit 0: switch LED off */
+#define LED_ON (1<<1) /* Bit 1: switch LED on */
+#define LED_OFF (1<<0) /* Bit 0: switch LED off */
X
X
X /* Receive and Transmit Descriptors ******************************************/
@@ -1331,42 +1336,42 @@
X /* Transmit Descriptor struct */
X typedef struct s_HwTxd {
X SK_U32 volatile TxCtrl; /* Transmit Buffer Control Field */
- SK_U32 TxNext ; /* Physical Address Pointer to the next TxD */
- SK_U32 TxAdrLo ; /* Physical Tx Buffer Address lower dword */
- SK_U32 TxAdrHi ; /* Physical Tx Buffer Address upper dword */
- SK_U32 TxStat ; /* Transmit Frame Status Word */
+ SK_U32 TxNext; /* Physical Address Pointer to the next TxD */
+ SK_U32 TxAdrLo; /* Physical Tx Buffer Address lower dword */
+ SK_U32 TxAdrHi; /* Physical Tx Buffer Address upper dword */
+ SK_U32 TxStat; /* Transmit Frame Status Word */
X #ifndef SK_USE_REV_DESC
- SK_U16 TxTcpOffs ; /* TCP Checksum Calculation Start Value */
- SK_U16 TxRes1 ; /* 16 bit reserved field */
- SK_U16 TxTcpWp ; /* TCP Checksum Write Position */
- SK_U16 TxTcpSp ; /* TCP Checksum Calculation Start Position */
+ SK_U16 TxTcpOffs; /* TCP Checksum Calculation Start Value */
+ SK_U16 TxRes1; /* 16 bit reserved field */
+ SK_U16 TxTcpWp; /* TCP Checksum Write Position */
+ SK_U16 TxTcpSp; /* TCP Checksum Calculation Start Position */
X #else /* SK_USE_REV_DESC */
- SK_U16 TxRes1 ; /* 16 bit reserved field */
- SK_U16 TxTcpOffs ; /* TCP Checksum Calculation Start Value */
- SK_U16 TxTcpSp ; /* TCP Checksum Calculation Start Position */
- SK_U16 TxTcpWp ; /* TCP Checksum Write Position */
+ SK_U16 TxRes1; /* 16 bit reserved field */
+ SK_U16 TxTcpOffs; /* TCP Checksum Calculation Start Value */
+ SK_U16 TxTcpSp; /* TCP Checksum Calculation Start Position */
+ SK_U16 TxTcpWp; /* TCP Checksum Write Position */
X #endif /* SK_USE_REV_DESC */
- SK_U32 TxRes2; /* 32 bit reserved field */
+ SK_U32 TxRes2; /* 32 bit reserved field */
X } SK_HWTXD;
X
X /* Receive Descriptor struct */
X typedef struct s_HwRxd {
X SK_U32 volatile RxCtrl; /* Receive Buffer Control Field */
- SK_U32 RxNext ; /* Physical Address Pointer to the next TxD */
- SK_U32 RxAdrLo ; /* Physical Receive Buffer Address lower dword*/
- SK_U32 RxAdrHi ; /* Physical Receive Buffer Address upper dword*/
- SK_U32 RxStat ; /* Receive Frame Status Word */
- SK_U32 RxTiSt ; /* Receive Timestamp provided by the XMAC */
+ SK_U32 RxNext; /* Physical Address Pointer to the next TxD */
+ SK_U32 RxAdrLo; /* Physical Receive Buffer Address lower dword*/
+ SK_U32 RxAdrHi; /* Physical Receive Buffer Address upper dword*/
+ SK_U32 RxStat; /* Receive Frame Status Word */
+ SK_U32 RxTiSt; /* Receive Timestamp provided by the XMAC */
X #ifndef SK_USE_REV_DESC
- SK_U16 RxTcpSum1 ; /* TCP Checksum 1 */
- SK_U16 RxTcpSum2 ; /* TCP Checksum 2 */
- SK_U16 RxTcpSp1 ; /* TCP Checksum Calculation Start Position 1 */
- SK_U16 RxTcpSp2 ; /* TCP Checksum Calculation Start Position 2 */
+ SK_U16 RxTcpSum1; /* TCP Checksum 1 */
+ SK_U16 RxTcpSum2; /* TCP Checksum 2 */
+ SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */
+ SK_U16 RxTcpSp2; /* TCP Checksum Calculation Start Position 2 */
X #else /* SK_USE_REV_DESC */
- SK_U16 RxTcpSum2 ; /* TCP Checksum 2 */
- SK_U16 RxTcpSum1 ; /* TCP Checksum 1 */
- SK_U16 RxTcpSp2 ; /* TCP Checksum Calculation Start Position 2 */
- SK_U16 RxTcpSp1 ; /* TCP Checksum Calculation Start Position 1 */
+ SK_U16 RxTcpSum2; /* TCP Checksum 2 */
+ SK_U16 RxTcpSum1; /* TCP Checksum 1 */
+ SK_U16 RxTcpSp2; /* TCP Checksum Calculation Start Position 2 */
+ SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */
X #endif /* SK_USE_REV_DESC */
X } SK_HWRXD;
X
@@ -1384,23 +1389,23 @@
X /* Descriptor Bit Definition */
X /* TxCtrl Transmit Buffer Control Field */
X /* RxCtrl Receive Buffer Control Field */
-#define BMU_OWN (1UL<<31) /* Bit 31: OWN bit: 0=host/1=BMU */
-#define BMU_STF (1L<<30) /* Bit 30: Start of Frame ? */
-#define BMU_EOF (1L<<29) /* Bit 29: End of Frame ? */
-#define BMU_IRQ_EOB (1L<<28) /* Bit 28: Req "End of Buff" IRQ */
-#define BMU_IRQ_EOF (1L<<27) /* Bit 27: Req "End of Frame" IRQ*/
+#define BMU_OWN (1UL<<31) /* Bit 31: OWN bit: 0=host/1=BMU */
+#define BMU_STF (1L<<30) /* Bit 30: Start of Frame ? */
+#define BMU_EOF (1L<<29) /* Bit 29: End of Frame ? */
+#define BMU_IRQ_EOB (1L<<28) /* Bit 28: Req "End of Buff" IRQ */
+#define BMU_IRQ_EOF (1L<<27) /* Bit 27: Req "End of Frame" IRQ*/
X /* TxCtrl specific bits */
-#define BMU_STFWD (1L<<26) /* Bit 26: (Tx) Store&Forward Frame */
-#define BMU_NO_FCS (1L<<25) /* Bit 25: (Tx) disable XMAC FCS gener*/
-#define BMU_SW (1L<<24) /* Bit 24: (Tx) 1 bit res. for SW use */
+#define BMU_STFWD (1L<<26) /* Bit 26: (Tx) Store&Forward Frame */
+#define BMU_NO_FCS (1L<<25) /* Bit 25: (Tx) disable XMAC FCS gener*/
+#define BMU_SW (1L<<24) /* Bit 24: (Tx) 1 bit res. for SW use */
X /* RxCtrl specific bits */
-#define BMU_DEV_0 (1L<<26) /* Bit 26: (Rx) transfer data to Dev0 */
+#define BMU_DEV_0 (1L<<26) /* Bit 26: (Rx) transfer data to Dev0 */
X #define BMU_STAT_VAL (1L<<25) /* Bit 25: (Rx) RxStat Valid */
X #define BMU_TIST_VAL (1L<<24) /* Bit 24: (Rx) RxTiSt Valid */
- /* Bit 23..16: BMU Check Opcodes */
-#define BMU_CHECK 0x00550000L /* Default BMU check */
+ /* Bit 23..16: BMU Check Opcodes */
+#define BMU_CHECK 0x00550000L /* Default BMU check */
X #define BMU_TCP_CHECK 0x00560000L /* Descr with TCP ext */
-#define BMU_BBC 0x0000FFFFL /* Bit 15..0: Buffer Byte Counter */
+#define BMU_BBC 0x0000FFFFL /* Bit 15..0: Buffer Byte Counter */
X
X /* TxStat Transmit Frame Status Word */
X /* RxStat Receive Frame Status Word */
@@ -1417,8 +1422,8 @@
X * FlashProm specification
X */
X #define MAX_PAGES 0x20000L /* Every byte has a single page */
-#define MAX_FADDR 1 /* 1 byte per page */
-#define SKFDDI_PSZ 8 /* address PROM size */
+#define MAX_FADDR 1 /* 1 byte per page */
+#define SKFDDI_PSZ 8 /* address PROM size */
X
X /* macros ********************************************************************/
X
@@ -1504,7 +1509,7 @@
X * (p)Val Value or pointer to the value which should be read or
X * written.
X *
- * usage: XM_OUT16(IoC, MAC_1, XM_MMU_CMD, Value) ;
+ * usage: XM_OUT16(IoC, MAC_1, XM_MMU_CMD, Value);
X */
X
X #ifdef SK_LITTLE_ENDIAN
@@ -1517,19 +1522,19 @@
X
X #define XMA(Mac,Reg) (((0x1000 << (Mac)) + 0x1000) | ((Reg) << 1))
X
-#define XM_IN16(IoC,Mac,Reg,pVal) SK_IN16((IoC),XMA((Mac),(Reg)),(pVal))
-#define XM_OUT16(IoC,Mac,Reg,Val) SK_OUT16((IoC),XMA((Mac),(Reg)),(Val))
+#define XM_IN16(IoC,Mac,Reg,pVal) SK_IN16((IoC), XMA((Mac), (Reg)), (pVal))
+#define XM_OUT16(IoC,Mac,Reg,Val) SK_OUT16((IoC), XMA((Mac), (Reg)), (Val))
X
-#define XM_IN32(IoC,Mac,Reg,pVal) { \
- SK_IN16((IoC),XMA((Mac),(Reg)), \
+#define XM_IN32(IoC,Mac,Reg,pVal) { \
+ SK_IN16((IoC), XMA((Mac), (Reg)), \
X (SK_U16 *)&((SK_U16 *)(pVal))[XM_WORD_LO]); \
- SK_IN16((IoC),XMA((Mac),(Reg+2)), \
+ SK_IN16((IoC), XMA((Mac), (Reg+2)), \
X (SK_U16 *)&((SK_U16 *)(pVal))[XM_WORD_HI]); \
X }
X
-#define XM_OUT32(IoC,Mac,Reg,Val) { \
- SK_OUT16((IoC),XMA((Mac),(Reg)), (SK_U16)((Val) & 0x0000ffffL));\
- SK_OUT16((IoC),XMA((Mac),(Reg+2)),(SK_U16)(((Val)>>16) & 0x0000ffffL));\
+#define XM_OUT32(IoC,Mac,Reg,Val) { \
+ SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16)((Val) & 0x0000ffffL)); \
+ SK_OUT16((IoC), XMA((Mac), (Reg+2)),(SK_U16)(((Val)>>16) & 0x0000ffffL)); \
X }
X
X /*
@@ -1537,67 +1542,67 @@
X */
X
X #define XM_INADDR(IoC, Mac, Reg, pVal) { \
- SK_U16 Word; \
- SK_U8 *pByte; \
+ SK_U16 Word; \
+ SK_U8 *pByte; \
X pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
X SK_IN16((IoC), XMA((Mac), (Reg)), &Word); \
- pByte[0] = (SK_U8) (Word & 0x00ff); \
- pByte[1] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[0] = (SK_U8)(Word & 0x00ff); \
+ pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \
X SK_IN16((IoC), XMA((Mac), (Reg+2)), &Word); \
- pByte[2] = (SK_U8) (Word & 0x00ff); \
- pByte[3] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[2] = (SK_U8)(Word & 0x00ff); \
+ pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \
X SK_IN16((IoC), XMA((Mac), (Reg+4)), &Word); \
- pByte[4] = (SK_U8) (Word & 0x00ff); \
- pByte[5] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[4] = (SK_U8)(Word & 0x00ff); \
+ pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \
X }
X
X #define XM_OUTADDR(IoC, Mac, Reg, pVal) { \
- SK_U8 *pByte; \
+ SK_U8 *pByte; \
X pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
X SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16) \
- (((SK_U16)(pByte[0]) & 0x00ff)| \
- (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
- SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \
- (((SK_U16)(pByte[2]) & 0x00ff)| \
- (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
- SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \
- (((SK_U16)(pByte[4]) & 0x00ff)| \
- (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
+ (((SK_U16)(pByte[0]) & 0x00ff) | \
+ (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
+ SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \
+ (((SK_U16)(pByte[2]) & 0x00ff) | \
+ (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
+ SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \
+ (((SK_U16)(pByte[4]) & 0x00ff) | \
+ (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
X }
X
X #define XM_INHASH(IoC, Mac, Reg, pVal) { \
- SK_U16 Word; \
- SK_U8 *pByte; \
+ SK_U16 Word; \
+ SK_U8 *pByte; \
X pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
X SK_IN16((IoC), XMA((Mac), (Reg)), &Word); \
- pByte[0] = (SK_U8) (Word & 0x00ff); \
- pByte[1] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[0] = (SK_U8)(Word & 0x00ff); \
+ pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \
X SK_IN16((IoC), XMA((Mac), (Reg+2)), &Word); \
- pByte[2] = (SK_U8) (Word & 0x00ff); \
- pByte[3] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[2] = (SK_U8)(Word & 0x00ff); \
+ pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \
X SK_IN16((IoC), XMA((Mac), (Reg+4)), &Word); \
- pByte[4] = (SK_U8) (Word & 0x00ff); \
- pByte[5] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[4] = (SK_U8)(Word & 0x00ff); \
+ pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \
X SK_IN16((IoC), XMA((Mac), (Reg+6)), &Word); \
- pByte[6] = (SK_U8) (Word & 0x00ff); \
- pByte[7] = (SK_U8) ((Word >> 8) & 0x00ff); \
+ pByte[6] = (SK_U8)(Word & 0x00ff); \
+ pByte[7] = (SK_U8)((Word >> 8) & 0x00ff); \
X }
X
X #define XM_OUTHASH(IoC, Mac, Reg, pVal) { \
- SK_U8 *pByte; \
+ SK_U8 *pByte; \
X pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
X SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16) \
- (((SK_U16)(pByte[0]) & 0x00ff)| \
- (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
- SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \
- (((SK_U16)(pByte[2]) & 0x00ff)| \
- (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
- SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \
- (((SK_U16)(pByte[4]) & 0x00ff)| \
- (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
- SK_OUT16((IoC), XMA((Mac), (Reg+6)), (SK_U16) \
- (((SK_U16)(pByte[6]) & 0x00ff)| \
- (((SK_U16)(pByte[7]) << 8) & 0xff00))); \
+ (((SK_U16)(pByte[0]) & 0x00ff)| \
+ (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
+ SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \
+ (((SK_U16)(pByte[2]) & 0x00ff)| \
+ (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
+ SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \
+ (((SK_U16)(pByte[4]) & 0x00ff)| \
+ (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
+ SK_OUT16((IoC), XMA((Mac), (Reg+6)), (SK_U16) \
+ (((SK_U16)(pByte[6]) & 0x00ff)| \
+ (((SK_U16)(pByte[7]) << 8) & 0xff00))); \
X }
X
X /*
@@ -1630,35 +1635,60 @@
X * written.
X *
X * usage: PHY_READ(IoC, pPort, MAC_1, PHY_CTRL, Value);
+ * Warning: a PHY_READ on an uninitialized PHY (PHY still in reset) never
+ * comes back. This is checked in DEBUG mode.
X */
-#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \
- SK_U16 Mmu; \
- \
- XM_OUT16((IoC),(Mac), XM_PHY_ADDR, (PhyReg)|(pPort)->PhyAddr); \
- XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
- if ((pPort)->PhyType != SK_PHY_XMAC) { \
- do { \
- XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
- } while ((Mmu & XM_MMU_PHY_RDY) == 0); \
- XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
- } \
+#ifndef DEBUG
+#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \
+ SK_U16 Mmu; \
+ \
+ XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \
+ XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
+ if ((pPort)->PhyType != SK_PHY_XMAC) { \
+ do { \
+ XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
+ } while ((Mmu & XM_MMU_PHY_RDY) == 0); \
+ XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
+ } \
+}
+#else
+#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \
+ SK_U16 Mmu; \
+ int __i = 0; \
+ \
+ XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \
+ XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
+ if ((pPort)->PhyType != SK_PHY_XMAC) { \
+ do { \
+ XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
+ __i++; \
+ if (__i > 100000) { \
+ SK_DBG_PRINTF("*****************************\n"); \
+ SK_DBG_PRINTF("PHY_READ on uninitialized PHY\n"); \
+ SK_DBG_PRINTF("*****************************\n"); \
+ break; \
+ } \
+ } while ((Mmu & XM_MMU_PHY_RDY) == 0); \
+ XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
+ } \
X }
+#endif
X
-#define PHY_WRITE(IoC, pPort, Mac, PhyReg, Val) { \
- SK_U16 Mmu; \
- \
- if ((pPort)->PhyType != SK_PHY_XMAC) { \
- do { \
- XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
- } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \
- } \
- XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg)|(pPort)->PhyAddr); \
- XM_OUT16((IoC), (Mac), XM_PHY_DATA, (Val)); \
- if ((pPort)->PhyType != SK_PHY_XMAC) { \
- do { \
- XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
- } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \
- } \
+#define PHY_WRITE(IoC, pPort, Mac, PhyReg, Val) { \
+ SK_U16 Mmu; \
+ \
+ if ((pPort)->PhyType != SK_PHY_XMAC) { \
+ do { \
+ XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
+ } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \
+ } \
+ XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \
+ XM_OUT16((IoC), (Mac), XM_PHY_DATA, (Val)); \
+ if ((pPort)->PhyType != SK_PHY_XMAC) { \
+ do { \
+ XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
+ } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \
+ } \
X }
X
X /*
@@ -1703,7 +1733,7 @@
X * Mode Mode to set for this LED
X */
X #define SK_HWAC_LINK_LED(pAC, IoC, Port, Mode) \
-SK_OUT8(IoC, MR_ADDR(Port,LNK_LED_REG), Mode);
+ SK_OUT8(IoC, MR_ADDR(Port,LNK_LED_REG), Mode);
X

X
X /* typedefs *******************************************************************/

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skgeinit.h linux/drivers/net/sk98lin/h/skgeinit.h
--- v2.2.19/drivers/net/sk98lin/h/skgeinit.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skgeinit.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skgeinit.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.45 $
- * Date: $Date: 1999/11/22 13:56:19 $
+ * Version: $Revision: 1.51 $
+ * Date: $Date: 2001/02/09 12:26:38 $
X * Purpose: Structures and prototypes for the GE Init Module
X *
X ******************************************************************************/


X
X /******************************************************************************
X *

- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify

X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,26 @@


X * History:
X *

X * $Log: skgeinit.h,v $
+ * Revision 1.51 2001/02/09 12:26:38 cgoos
+ * Inserted #ifdef DIAG for half duplex workaround timer.
+ *
+ * Revision 1.50 2001/02/07 07:56:40 rassmann
+ * Corrected copyright.
+ *
+ * Revision 1.49 2001/01/31 15:32:18 gklug
+ * fix: problem with autosensing an SR8800 switch
+ * add: counter for autoneg timeouts
+ *
+ * Revision 1.48 2000/11/09 11:30:10 rassmann


+ * WA: Waiting after releasing reset until BCom chip is accessible.
+ *

+ * Revision 1.47 2000/10/18 12:22:40 cgoos
+ * Added workaround for half duplex hangup.
+ *
+ * Revision 1.46 2000/08/10 11:28:00 rassmann
+ * Editorial changes.


+ * Preserving 32-bit alignment in structs for the adapter context.

+ *
X * Revision 1.45 1999/11/22 13:56:19 cgoos


X * Changed license header to GPL.
X *

@@ -436,6 +455,12 @@
X */
X #define SK_MAX_LRESTART 3 /* Max. 3 times the link is restarted */
X
+/*
+ * define max. autonegotiation timeouts before link detection in sense mode is
+ * reset.
+ */
+#define SK_MAX_ANEG_TO 10 /* Max. 10 times the sense mode is reset */
+
X /* structures *****************************************************************/
X
X /*
@@ -446,61 +471,71 @@
X SK_TIMER PWaTimer; /* Workaround Timer */
X #endif
X SK_U64 PPrevShorts; /* Previous short Counter checking */
- SK_U64 PPrevRx; /* Previous RxOk Counter checking */
- SK_U64 PPrevFcs; /* Previous FCS Error Counter checking */
- SK_U64 PRxLim; /* Previous RxOk Counter checking */
- int PLinkResCt; /* Link Restart Counter */
- int PAutoNegTimeOut;/* AutoNegotiation timeout current value */
- int PRxQSize; /* Port Rx Queue Size in kB */
- int PXSQSize; /* Port Synchronous Transmit Queue Size in kB */
- int PXAQSize; /* Port Asynchronous Transmit Queue Size in kB*/
+ SK_U64 PPrevRx; /* Previous RxOk Counter checking */
+ SK_U64 PPrevFcs; /* Previous FCS Error Counter checking */
+ SK_U64 PRxLim; /* Previous RxOk Counter checking */
+ SK_U64 LastOctets; /* For half duplex hang check */
+#ifndef SK_DIAG
+ SK_TIMER HalfDupChkTimer;
+#endif
+ int PLinkResCt; /* Link Restart Counter */
+ int PAutoNegTimeOut;/* AutoNegotiation timeout current value */
+ int PAutoNegTOCt; /* AutoNeg Timeout Counter */
+ int PRxQSize; /* Port Rx Queue Size in kB */
+ int PXSQSize; /* Port Synchronous Transmit Queue Size in kB */
+ int PXAQSize; /* Port Asynchronous Transmit Queue Size in kB*/
X SK_U32 PRxQRamStart; /* Receive Queue RAM Buffer Start Address */
- SK_U32 PRxQRamEnd; /* Receive Queue RAM Buffer End Address */
+ SK_U32 PRxQRamEnd; /* Receive Queue RAM Buffer End Address */
X SK_U32 PXsQRamStart; /* Sync Tx Queue RAM Buffer Start Address */
- SK_U32 PXsQRamEnd; /* Sync Tx Queue RAM Buffer End Address */
+ SK_U32 PXsQRamEnd; /* Sync Tx Queue RAM Buffer End Address */
X SK_U32 PXaQRamStart; /* Async Tx Queue RAM Buffer Start Address */
- SK_U32 PXaQRamEnd; /* Async Tx Queue RAM Buffer End Address */
- int PRxQOff; /* Rx Queue Address Offset */
- int PXsQOff; /* Synchronous Tx Queue Address Offset */
- int PXaQOff; /* Asynchronous Tx Queue Address Offset */
- SK_U16 PRxCmd; /* Port Receive Command Configuration Value */
- SK_U16 PIsave; /* Saved Interrupt status word */
- SK_U16 PSsave; /* Saved PHY status word */
- SK_BOOL PHWLinkUp; /* The hardware Link is up (wireing) */
- SK_BOOL PState; /* Is port initialized ? */
+ SK_U32 PXaQRamEnd; /* Async Tx Queue RAM Buffer End Address */
+ int PRxQOff; /* Rx Queue Address Offset */
+ int PXsQOff; /* Synchronous Tx Queue Address Offset */
+ int PXaQOff; /* Asynchronous Tx Queue Address Offset */
+ int PhyType; /* PHY used on this port */
+ SK_U16 PhyAddr; /* MDIO/MDC PHY address */
+ SK_U16 PRxCmd; /* Port Receive Command Configuration Value */
+ SK_U16 PIsave; /* Saved Interrupt status word */
+ SK_U16 PSsave; /* Saved PHY status word */
+ SK_U16 Align01;
+ SK_BOOL PHWLinkUp; /* The hardware Link is up (wireing) */
+ SK_BOOL PState; /* Is port initialized ? */
X SK_BOOL PLinkBroken; /* Is Link broken ? */
- SK_BOOL PCheckPar; /* Do we check for parity errors ? */
- SK_U8 PLinkCap; /* Link Capabilities */
+ SK_BOOL PCheckPar; /* Do we check for parity errors ? */
+ SK_BOOL HalfDupTimerActive;
+ SK_U8 PLinkCap; /* Link Capabilities */
X SK_U8 PLinkModeConf; /* Link Mode configured */
- SK_U8 PLinkMode; /* Link Mode currently used */
- SK_U8 PLinkModeStatus; /* Link Mode Status */
+ SK_U8 PLinkMode; /* Link Mode currently used */
+ SK_U8 PLinkModeStatus;/* Link Mode Status */
X SK_U8 PFlowCtrlCap; /* Flow Control Capabilities */
X SK_U8 PFlowCtrlMode; /* Flow Control Mode */
- SK_U8 PFlowCtrlStatus; /* Flow Control Status */
- SK_U8 PMSCap; /* Master/Slave Capabilities */
- SK_U8 PMSMode; /* Master/Slave Mode */
- SK_U8 PMSStatus; /* Master/Slave Status */
+ SK_U8 PFlowCtrlStatus;/* Flow Control Status */
+ SK_U8 PMSCap; /* Master/Slave Capabilities */
+ SK_U8 PMSMode; /* Master/Slave Mode */
+ SK_U8 PMSStatus; /* Master/Slave Status */
X SK_U8 PAutoNegFail; /* Autonegotiation fail flag */
X SK_U8 PLipaAutoNeg; /* Autonegotiation possible with Link Partner */
- int PhyType; /* PHY used on this port */
- SK_U16 PhyAddr; /* MDIO/MDC PHY address */
+ SK_U8 Align02;
X } SK_GEPORT;
X
X /*
X * Gigabit Ethernet Initalization Struct
- * (has to be included in the adapter context
+ * (has to be included in the adapter context)
X */
X typedef struct s_GeInit {
- int GIMacsFound; /* Number of MACs found on this adapter */
- int GIPciHwRev; /* PCI HW Revision Number */
- SK_U32 GIRamOffs; /* RAM Address Offset for addr calculation */
- int GIRamSize; /* The RAM size of the adapter in kB */
- int GIHstClkFact; /* Host Clock Factor (62.5 / HstClk * 100) */
- int GIPortUsage; /* driver port usage: SK_RED_LINK/SK_MUL_LINK */
- SK_U32 GIPollTimerVal; /* Descriptor Poll Timer Init Val in clk ticks*/
- int GILevel; /* Initialization Level Completed */
- SK_BOOL GIAnyPortAct; /* Is True if one or more port is initialized */
- SK_GEPORT GP[SK_MAX_MACS]; /* Port Dependent Information */
+ int GIMacsFound; /* Number of MACs found on this adapter */
+ int GIPciHwRev; /* PCI HW Revision Number */
+ SK_U32 GIRamOffs; /* RAM Address Offset for addr calculation */
+ int GIRamSize; /* The RAM size of the adapter in kB */
+ int GIHstClkFact; /* Host Clock Factor (62.5 / HstClk * 100) */
+ int GIPortUsage; /* driver port usage: SK_RED_LINK/SK_MUL_LINK */
+ SK_U32 GIPollTimerVal; /* Descriptor Poll Timer Init Val in clk ticks*/
+ int GILevel; /* Initialization Level Completed */
+ SK_GEPORT GP[SK_MAX_MACS];/* Port Dependent Information */
+ SK_BOOL GIAnyPortAct; /* Is True if one or more port is initialized */


+ SK_U8 Align01;
+ SK_U16 Align02;

X } SK_GEINIT;
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skgepnm2.h linux/drivers/net/sk98lin/h/skgepnm2.h
--- v2.2.19/drivers/net/sk98lin/h/skgepnm2.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skgepnm2.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skgepnm2.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter
- * Version: $Revision: 1.25 $

- * Date: $Date: 1999/11/22 13:57:41 $
+ * Version: $Revision: 1.30 $
+ * Date: $Date: 2001/02/06 10:03:41 $
X * Purpose: Defines for Private Network Management Interface
X *
X ****************************************************************************/


X
X /******************************************************************************
X *

- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify

X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,24 @@


X * History:
X *

X * $Log: skgepnm2.h,v $
+ * Revision 1.30 2001/02/06 10:03:41 mkunz
+ * - Pnmi V4 dual net support added. Interface functions and macros extended
+ * - Vpd bug fixed
+ * - OID_SKGE_MTU added
+ *
+ * Revision 1.29 2001/01/22 13:41:37 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.28 2000/08/03 15:12:48 rwahl
+ * - Additional comment for MAC statistic data structure.
+ *
+ * Revision 1.27 2000/08/01 16:10:18 rwahl
+ * - Added mac statistic data structure for StatRxLongFrame counter.
+ *
+ * Revision 1.26 2000/03/31 13:51:34 rwahl
+ * Added SK_UPTR cast to offset calculation for PNMI struct fields;
+ * missing cast caused compiler warnings by Win64 compiler.
+ *
X * Revision 1.25 1999/11/22 13:57:41 cgoos


X * Changed license header to GPL.

X * Allowing overwrite for SK_PNMI_STORE/_READ defines.
@@ -149,8 +166,6 @@
X /*
X * VPD releated defines
X */
-#define SK_PNMI_VPD_ARR_SIZE 40
-#define SK_PNMI_VPD_STR_SIZE 5
X
X #define SK_PNMI_VPD_RW 1
X #define SK_PNMI_VPD_RO 2
@@ -191,7 +206,8 @@
X int Access;
X int (* Func)(SK_AC *pAc, SK_IOC pIo, int action,
X SK_U32 Id, char* pBuf, unsigned int* pLen,
- SK_U32 Instance, unsigned int TableIndex);
+ SK_U32 Instance, unsigned int TableIndex,
+ SK_U32 NetNumber);
X SK_U16 Param;
X } SK_PNMI_TAB_ENTRY;
X
@@ -207,6 +223,8 @@
X
X /*
X * MAC statistic data structures
+ * Only for the first 64 counters: the number relates to the bit in the
+ * XMAC overflow status register
X */
X #define SK_PNMI_HTX 0
X #define SK_PNMI_HTX_OCTET 1
@@ -278,6 +296,8 @@
X #define SK_PNMI_HTX_SYNC 64
X #define SK_PNMI_HTX_SYNC_OCTET 65
X
+#define SK_PNMI_HRX_LONGFRAMES 66
+
X #define SK_PNMI_MAX_IDX (SK_PNMI_CNT_NO)
X
X /*
@@ -292,25 +312,25 @@
X /*
X * SK_PNMI_STRUCT_DATA copy offset evaluation macros
X */
-#define SK_PNMI_OFF(e) ((SK_U32)&(((SK_PNMI_STRUCT_DATA *)0)->e))
-#define SK_PNMI_MAI_OFF(e) ((SK_U32)&(((SK_PNMI_STRUCT_DATA *)0)->e))
-#define SK_PNMI_VPD_OFF(e) ((SK_U32)&(((SK_PNMI_VPD *)0)->e))
-#define SK_PNMI_SEN_OFF(e) ((SK_U32)&(((SK_PNMI_SENSOR *)0)->e))
-#define SK_PNMI_CHK_OFF(e) ((SK_U32)&(((SK_PNMI_CHECKSUM *)0)->e))
-#define SK_PNMI_STA_OFF(e) ((SK_U32)&(((SK_PNMI_STAT *)0)->e))
-#define SK_PNMI_CNF_OFF(e) ((SK_U32)&(((SK_PNMI_CONF *)0)->e))
-#define SK_PNMI_RLM_OFF(e) ((SK_U32)&(((SK_PNMI_RLMT *)0)->e))
-#define SK_PNMI_MON_OFF(e) ((SK_U32)&(((SK_PNMI_RLMT_MONITOR *)0)->e))
-#define SK_PNMI_TRP_OFF(e) ((SK_U32)&(((SK_PNMI_TRAP *)0)->e))
+#define SK_PNMI_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STRUCT_DATA *)0)->e))
+#define SK_PNMI_MAI_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STRUCT_DATA *)0)->e))
+#define SK_PNMI_VPD_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_VPD *)0)->e))
+#define SK_PNMI_SEN_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_SENSOR *)0)->e))
+#define SK_PNMI_CHK_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_CHECKSUM *)0)->e))
+#define SK_PNMI_STA_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STAT *)0)->e))
+#define SK_PNMI_CNF_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_CONF *)0)->e))
+#define SK_PNMI_RLM_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_RLMT *)0)->e))
+#define SK_PNMI_MON_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_RLMT_MONITOR *)0)->e))
+#define SK_PNMI_TRP_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_TRAP *)0)->e))
X
X #define SK_PNMI_SET_STAT(b,s,o) {SK_U32 Val32; char *pVal; \
X Val32 = (s); \
- pVal = (char *)(b) + ((SK_U32) \
+ pVal = (char *)(b) + ((SK_U32)(SK_UPTR) \
X &(((SK_PNMI_STRUCT_DATA *)0)-> \
X ReturnStatus.ErrorStatus)); \
X SK_PNMI_STORE_U32(pVal, Val32); \
X Val32 = (o); \
- pVal = (char *)(b) + ((SK_U32) \
+ pVal = (char *)(b) + ((SK_U32)(SK_UPTR) \
X &(((SK_PNMI_STRUCT_DATA *)0)-> \
X ReturnStatus.ErrorOffset)); \
X SK_PNMI_STORE_U32(pVal, Val32);}
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skgepnmi.h linux/drivers/net/sk98lin/h/skgepnmi.h
--- v2.2.19/drivers/net/sk98lin/h/skgepnmi.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skgepnmi.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skgepnmi.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.39 $
- * Date: $Date: 1999/12/06 10:09:47 $
+ * Version: $Revision: 1.48 $
+ * Date: $Date: 2001/02/23 14:34:24 $
X * Purpose: Defines for Private Network Management Interface
X *
X ****************************************************************************/


X
X /******************************************************************************
X *

- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify

X * it under the terms of the GNU General Public License as published by
@@ -27,12 +26,53 @@


X * History:
X *

X * $Log: skgepnmi.h,v $
+ * Revision 1.48 2001/02/23 14:34:24 mkunz
+ * Changed macro PHYS2INST. Added pAC to Interface
+ *
+ * Revision 1.47 2001/02/07 08:28:23 mkunz
+ * - Added Oids: OID_SKGE_DIAG_ACTION
+ * OID_SKGE_DIAG_RESULT
+ * OID_SKGE_MULTICAST_LIST
+ * OID_SKGE_CURRENT_PACKET_FILTER
+ * OID_SKGE_INTERMEDIATE_SUPPORT
+ * - Changed value of OID_SKGE_MTU
+ *
+ * Revision 1.46 2001/02/06 10:01:41 mkunz
+ * - Pnmi V4 dual net support added. Interface functions and macros extended
+ * - Vpd bug fixed
+ * - OID_SKGE_MTU added
+ *
+ * Revision 1.45 2001/01/22 13:41:37 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.44 2000/09/07 07:35:27 rwahl
+ * - removed NDIS counter specific data type.
+ * - fixed spelling for OID_SKGE_RLMT_PORT_PREFERRED.
+ *
+ * Revision 1.43 2000/08/04 11:41:08 rwahl
+ * - Fixed compiler warning (port is always >= 0) for macros
+ * SK_PNMI_CNT_RX_LONGFRAMES & SK_PNMI_CNT_SYNC_OCTETS
+ *
+ * Revision 1.42 2000/08/03 15:14:07 rwahl
+ * - Corrected error in driver macros addressing a physical port.
+ *
+ * Revision 1.41 2000/08/01 16:22:29 rwahl
+ * - Changed MDB version to 3.1.
+ * - Added definitions for StatRxLongFrames counter.
+ * - Added macro to be used by driver to count long frames received.
+ * - Added directive to control width (default = 32bit) of NDIS statistic
+ * counters (SK_NDIS_64BIT_CTR).
+ *
+ * Revision 1.40 2000/03/31 13:51:34 rwahl
+ * Added SK_UPTR cast to offset calculation for PNMI struct fields;
+ * missing cast caused compiler warnings by Win64 compiler.
+ *
X * Revision 1.39 1999/12/06 10:09:47 rwahl
X * Added new error log message.
X *
X * Revision 1.38 1999/11/22 13:57:55 cgoos


X * Changed license header to GPL.

- *
+ *
X * Revision 1.37 1999/09/14 14:25:32 rwahl
X * Set MDB version for 1000Base-T (sensors, Master/Slave) changes.
X *
@@ -90,7 +130,7 @@
X *
X * Revision 1.22 1998/11/03 12:05:51 mhaveman
X * Added pAC parameter to counter macors.
- *
+ *
X * Revision 1.21 1998/11/02 10:47:36 mhaveman
X * Added syslog messages for internal errors.
X *
@@ -165,33 +205,34 @@
X #include "h/ski2c.h"
X #include "h/skaddr.h"
X #include "h/skrlmt.h"
-
+#include "h/skvpd.h"
X
X /*
X * Management Database Version
X */
-#define SK_PNMI_MDB_VERSION 0x00030000 /* 3.0 */
+#define SK_PNMI_MDB_VERSION 0x00030001 /* 3.1 */
X
X
X /*
X * Event definitions
X */
-#define SK_PNMI_EVT_SIRQ_OVERFLOW 1 /* Counter overflow */
-#define SK_PNMI_EVT_SEN_WAR_LOW 2 /* Lower war thres exceeded */
-#define SK_PNMI_EVT_SEN_WAR_UPP 3 /* Upper war thres exceeded */
-#define SK_PNMI_EVT_SEN_ERR_LOW 4 /* Lower err thres exceeded */
-#define SK_PNMI_EVT_SEN_ERR_UPP 5 /* Upper err thres exceeded */
-#define SK_PNMI_EVT_CHG_EST_TIMER 6 /* Timer event for RLMT Chg */
+#define SK_PNMI_EVT_SIRQ_OVERFLOW 1 /* Counter overflow */
+#define SK_PNMI_EVT_SEN_WAR_LOW 2 /* Lower war thres exceeded */
+#define SK_PNMI_EVT_SEN_WAR_UPP 3 /* Upper war thres exceeded */
+#define SK_PNMI_EVT_SEN_ERR_LOW 4 /* Lower err thres exceeded */
+#define SK_PNMI_EVT_SEN_ERR_UPP 5 /* Upper err thres exceeded */
+#define SK_PNMI_EVT_CHG_EST_TIMER 6 /* Timer event for RLMT Chg */
X #define SK_PNMI_EVT_UTILIZATION_TIMER 7 /* Timer event for Utiliza. */
-#define SK_PNMI_EVT_CLEAR_COUNTER 8 /* Clear statistic counters */
-#define SK_PNMI_EVT_XMAC_RESET 9 /* XMAC will be reset */
+#define SK_PNMI_EVT_CLEAR_COUNTER 8 /* Clear statistic counters */
+#define SK_PNMI_EVT_XMAC_RESET 9 /* XMAC will be reset */
X
-#define SK_PNMI_EVT_RLMT_PORT_UP 10 /* Port came logically up */
-#define SK_PNMI_EVT_RLMT_PORT_DOWN 11 /* Port went logically down */
-#define SK_PNMI_EVT_RLMT_PORT_SWITCH 12 /* Switched active port */
+#define SK_PNMI_EVT_RLMT_PORT_UP 10 /* Port came logically up */
+#define SK_PNMI_EVT_RLMT_PORT_DOWN 11 /* Port went logically down */
X #define SK_PNMI_EVT_RLMT_SEGMENTATION 13 /* Two SP root bridges found */
X #define SK_PNMI_EVT_RLMT_ACTIVE_DOWN 14 /* Port went logically down */
-#define SK_PNMI_EVT_RLMT_ACTIVE_UP 15 /* Port came logically up */
+#define SK_PNMI_EVT_RLMT_ACTIVE_UP 15 /* Port came logically up */
+#define SK_PNMI_EVT_RLMT_SET_NETS 16 /* 1. Parameter is number of nets
+ 1 = single net; 2 = dual net */
X
X /*
X * Return values
@@ -203,6 +244,7 @@
X #define SK_PNMI_ERR_READ_ONLY 4
X #define SK_PNMI_ERR_UNKNOWN_OID 5
X #define SK_PNMI_ERR_UNKNOWN_INST 6
+#define SK_PNMI_ERR_UNKNOWN_NET 7
X
X
X /*
@@ -333,7 +375,7 @@
X #define OID_SKGE_CHKSM_RX_ERR_CTS 0xFF020113
X #define OID_SKGE_CHKSM_TX_OK_CTS 0xFF020114
X #define OID_SKGE_CHKSM_TX_UNABLE_CTS 0xFF020115
-
+
X #define OID_SKGE_STAT_TX 0xFF020120
X #define OID_SKGE_STAT_TX_OCTETS 0xFF020121
X #define OID_SKGE_STAT_TX_BROADCAST 0xFF020122
@@ -389,7 +431,11 @@
X #define OID_SKGE_STAT_RX_511 0xFF020154
X #define OID_SKGE_STAT_RX_1023 0xFF020155
X #define OID_SKGE_STAT_RX_MAX 0xFF020156
-
+#define OID_SKGE_STAT_RX_LONGFRAMES 0xFF020157
+
+#define OID_SKGE_DIAG_ACTION 0xFF01011D
+#define OID_SKGE_DIAG_RESULT 0xFF01011E
+#define OID_SKGE_MTU 0xFF01011F
X #define OID_SKGE_PHYS_CUR_ADDR 0xFF010120
X #define OID_SKGE_PHYS_FAC_ADDR 0xFF010121
X #define OID_SKGE_PMD 0xFF010122
@@ -404,19 +450,22 @@
X #define OID_SKGE_PHY_OPERATION_CAP 0xFF01012B
X #define OID_SKGE_PHY_OPERATION_MODE 0xFF01012C
X #define OID_SKGE_PHY_OPERATION_STATUS 0xFF01012D
-
+#define OID_SKGE_MULTICAST_LIST 0xFF01012E
+#define OID_SKGE_CURRENT_PACKET_FILTER 0xFF01012F
+
X #define OID_SKGE_TRAP 0xFF010130
X #define OID_SKGE_TRAP_NUMBER 0xFF010131
X
X #define OID_SKGE_RLMT_MODE 0xFF010140
X #define OID_SKGE_RLMT_PORT_NUMBER 0xFF010141
X #define OID_SKGE_RLMT_PORT_ACTIVE 0xFF010142
-#define OID_SKGE_RLMT_PORT_PREFERED 0xFF010143
+#define OID_SKGE_RLMT_PORT_PREFERRED 0xFF010143
+#define OID_SKGE_INTERMEDIATE_SUPPORT 0xFF010160
X #define OID_SKGE_RLMT_CHANGE_CTS 0xFF020160
X #define OID_SKGE_RLMT_CHANGE_TIME 0xFF020161
X #define OID_SKGE_RLMT_CHANGE_ESTIM 0xFF020162
X #define OID_SKGE_RLMT_CHANGE_THRES 0xFF020163
-
+
X #define OID_SKGE_RLMT_PORT_INDEX 0xFF020164
X #define OID_SKGE_RLMT_STATUS 0xFF020165
X #define OID_SKGE_RLMT_TX_HELLO_CTS 0xFF020166
@@ -424,7 +473,7 @@
X #define OID_SKGE_RLMT_TX_SP_REQ_CTS 0xFF020168
X #define OID_SKGE_RLMT_RX_SP_CTS 0xFF020169
X
-#define OID_SKGE_RLMT_MONITOR_NUMBER 0xFF010150
+#define OID_SKGE_RLMT_MONITOR_NUMBER 0xFF010150
X #define OID_SKGE_RLMT_MONITOR_INDEX 0xFF010151
X #define OID_SKGE_RLMT_MONITOR_ADDR 0xFF010152
X #define OID_SKGE_RLMT_MONITOR_ERRS 0xFF010153
@@ -448,7 +497,7 @@
X #define OID_SKGE_ERR_RECOVERY_CTS 0xFF02017E
X #define OID_SKGE_SYSUPTIME 0xFF02017F
X
-#define OID_SKGE_ALL_DATA 0xFF020190
+#define OID_SKGE_ALL_DATA 0xFF020190
X
X
X #define OID_SKGE_TRAP_SEN_WAR_LOW 500
@@ -577,32 +626,40 @@
X #define SK_PNMI_SET_DRIVER_VER(pAC,v) ((pAC)->Pnmi.pDriverVersion = \
X (char *)(v))
X
-#define SK_PNMI_CNT_TX_QUEUE_LEN(pAC,v) \
+
+#define SK_PNMI_CNT_TX_QUEUE_LEN(pAC,v,p) \
X { \
- (pAC)->Pnmi.TxSwQueueLen = (SK_U64)(v); \
- if ((pAC)->Pnmi.TxSwQueueLen > (pAC)->Pnmi.TxSwQueueMax) { \
- (pAC)->Pnmi.TxSwQueueMax = (pAC)->Pnmi.TxSwQueueLen; \
+ (pAC)->Pnmi.Port[p].TxSwQueueLen = (SK_U64)(v); \
+ if ((pAC)->Pnmi.Port[p].TxSwQueueLen > (pAC)->Pnmi.Port[p].TxSwQueueMax) { \
+ (pAC)->Pnmi.Port[p].TxSwQueueMax = (pAC)->Pnmi.Port[p].TxSwQueueLen; \
X } \
X }
-#define SK_PNMI_CNT_TX_RETRY(pAC) (((pAC)->Pnmi.TxRetryCts)++)
-#define SK_PNMI_CNT_RX_INTR(pAC) (((pAC)->Pnmi.RxIntrCts)++)
-#define SK_PNMI_CNT_TX_INTR(pAC) (((pAC)->Pnmi.TxIntrCts)++)
-#define SK_PNMI_CNT_NO_RX_BUF(pAC) (((pAC)->Pnmi.RxNoBufCts)++)
-#define SK_PNMI_CNT_NO_TX_BUF(pAC) (((pAC)->Pnmi.TxNoBufCts)++)
-#define SK_PNMI_CNT_USED_TX_DESCR(pAC,v) \
- ((pAC)->Pnmi.TxUsedDescrNo=(SK_U64)(v));
-#define SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,v) \
+#define SK_PNMI_CNT_TX_RETRY(pAC,p) (((pAC)->Pnmi.Port[p].TxRetryCts)++)
+#define SK_PNMI_CNT_RX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].RxIntrCts)++)
+#define SK_PNMI_CNT_TX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].TxIntrCts)++)
+#define SK_PNMI_CNT_NO_RX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].RxNoBufCts)++)
+#define SK_PNMI_CNT_NO_TX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].TxNoBufCts)++)
+#define SK_PNMI_CNT_USED_TX_DESCR(pAC,v,p) \
+ ((pAC)->Pnmi.Port[p].TxUsedDescrNo=(SK_U64)(v));
+#define SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,v,p) \
X { \
- ((pAC)->Pnmi.RxDeliveredCts)++; \
- (pAC)->Pnmi.RxOctetsDeliveredCts += (SK_U64)(v); \
+ ((pAC)->Pnmi.Port[p].RxDeliveredCts)++; \
+ (pAC)->Pnmi.Port[p].RxOctetsDeliveredCts += (SK_U64)(v); \
X }
-#define SK_PNMI_CNT_ERR_RECOVERY(pAC) (((pAC)->Pnmi.ErrRecoveryCts)++);
+#define SK_PNMI_CNT_ERR_RECOVERY(pAC,p) (((pAC)->Pnmi.Port[p].ErrRecoveryCts)++);
X
X #define SK_PNMI_CNT_SYNC_OCTETS(pAC,p,v) \
X { \
- if (((p) >= 0) && ((p) < SK_MAX_MACS)) { \
- ((pAC)->Pnmi.StatSyncCts[p])++; \
- (pAC)->Pnmi.StatSyncOctetsCts[p] += (SK_U64)(v); \
+ if ((p) < SK_MAX_MACS) { \
+ ((pAC)->Pnmi.Port[p].StatSyncCts)++; \
+ (pAC)->Pnmi.Port[p].StatSyncOctetsCts += (SK_U64)(v); \
+ } \
+ }
+
+#define SK_PNMI_CNT_RX_LONGFRAMES(pAC,p) \
+ { \
+ if ((p) < SK_MAX_MACS) { \
+ ((pAC)->Pnmi.Port[p].StatRxLongFrameCts)++; \
X } \
X }
X
@@ -613,14 +670,18 @@
X #define SK_PNMI_PORT_LOG2INST(l) ((unsigned int)(l) + 1)
X #define SK_PNMI_PORT_PHYS2LOG(p) ((unsigned int)(p) + 1)
X #define SK_PNMI_PORT_LOG2PHYS(pAC,l) ((unsigned int)(l) - 1)
-#define SK_PNMI_PORT_PHYS2INST(p) ((unsigned int)(p) + 2)
+#define SK_PNMI_PORT_PHYS2INST(pAC,p) \
+ (pAC->Pnmi.DualNetActiveFlag ? 2 : ((unsigned int)(p) + 2))
X #define SK_PNMI_PORT_INST2PHYS(pAC,i) ((unsigned int)(i) - 2)
X
X /*
X * Structure definition for SkPnmiGetStruct and SkPnmiSetStruct
X */
-#define SK_PNMI_VPD_ENTRIES 20
-#define SK_PNMI_VPD_DATALEN 128
+#define SK_PNMI_VPD_KEY_SIZE 5
+#define SK_PNMI_VPD_BUFSIZE (VPD_SIZE)
+#define SK_PNMI_VPD_ENTRIES (VPD_SIZE / 4)
+#define SK_PNMI_VPD_DATALEN 128 /* Number of data bytes */
+
X #define SK_PNMI_MULTICAST_LISTLEN 64
X #define SK_PNMI_SENSOR_ENTRIES (SK_MAX_SENSORS)
X #define SK_PNMI_CHECKSUM_ENTRIES 3
@@ -633,7 +694,7 @@
X #define SK_PNMI_TRAP_QUEUE_LEN 512
X
X typedef struct s_PnmiVpd {
- char VpdKey[5];
+ char VpdKey[SK_PNMI_VPD_KEY_SIZE];
X char VpdValue[SK_PNMI_VPD_DATALEN];
X SK_U8 VpdAccess;
X SK_U8 VpdAction;
@@ -695,6 +756,7 @@
X SK_U64 StatRxBroadcastOkCts;
X SK_U64 StatRxMulticastOkCts;
X SK_U64 StatRxUnicastOkCts;
+ SK_U64 StatRxLongFramesCts;
X SK_U64 StatRxPauseMacCtrlCts;
X SK_U64 StatRxMacCtrlCts;
X SK_U64 StatRxPauseMacCtrlErrorCts;
@@ -764,7 +826,7 @@
X SK_U32 MgmtDBVersion;
X SK_PNMI_REQUEST_STATUS ReturnStatus;
X SK_U32 VpdFreeBytes;
- char VpdEntriesList[SK_PNMI_VPD_DATALEN];
+ char VpdEntriesList[SK_PNMI_VPD_ENTRIES * SK_PNMI_VPD_KEY_SIZE];
X SK_U32 VpdEntriesNumber;
X SK_PNMI_VPD Vpd[SK_PNMI_VPD_ENTRIES];
X SK_U32 PortNumber;
@@ -774,6 +836,7 @@
X char HwDescr[SK_PNMI_STRINGLEN1];
X char HwVersion[SK_PNMI_STRINGLEN2];
X SK_U16 Chipset;
+ SK_U32 MtuSize;
X SK_U32 Action;
X SK_U32 TestResult;
X SK_U8 BusType;
@@ -817,8 +880,9 @@
X } SK_PNMI_STRUCT_DATA;
X
X #define SK_PNMI_STRUCT_SIZE (sizeof(SK_PNMI_STRUCT_DATA))
-#define SK_PNMI_MIN_STRUCT_SIZE ((unsigned int)&(((SK_PNMI_STRUCT_DATA *)0)->\
- VpdFreeBytes)) /*
+#define SK_PNMI_MIN_STRUCT_SIZE ((unsigned int)(SK_UPTR)\
+ &(((SK_PNMI_STRUCT_DATA *)0)->VpdFreeBytes))
+ /*
X * ReturnStatus field
X * must be located
X * before VpdFreeBytes
@@ -830,7 +894,7 @@
X #define SK_PNMI_MAX_PROTOS 3
X
X #define SK_PNMI_SCNT_NOT 64
-#define SK_PNMI_CNT_NO 66
+#define SK_PNMI_CNT_NO 67
X
X /*
X * Estimate data structure
@@ -851,9 +915,26 @@
X SK_U64 CounterOffset[SK_PNMI_CNT_NO];
X SK_U64 StatSyncCts;
X SK_U64 StatSyncOctetsCts;
+ SK_U64 StatRxLongFrameCts;
X SK_BOOL ActiveFlag;
+ SK_U64 TxSwQueueLen;
+ SK_U64 TxSwQueueMax;
+ SK_U64 TxRetryCts;
+ SK_U64 RxIntrCts;
+ SK_U64 TxIntrCts;
+ SK_U64 RxNoBufCts;
+ SK_U64 TxNoBufCts;
+ SK_U64 TxUsedDescrNo;
+ SK_U64 RxDeliveredCts;
+ SK_U64 RxOctetsDeliveredCts;
+ SK_U64 RxHwErrorsCts;
+ SK_U64 TxHwErrorsCts;
+ SK_U64 InErrorsCts;
+ SK_U64 OutErrorsCts;
+ SK_U64 ErrRecoveryCts;
X } SK_PNMI_PORT;
X
+
X typedef struct s_PnmiData {
X SK_PNMI_PORT Port[SK_MAX_MACS];
X SK_U64 VirtualCounterOffset[SK_PNMI_CNT_NO];
@@ -884,19 +965,8 @@
X char PciBusWidth;
X char PMD;
X char Connector;
-
- SK_U64 TxSwQueueLen;
- SK_U64 TxSwQueueMax;
- SK_U64 TxRetryCts;
- SK_U64 RxIntrCts;
- SK_U64 TxIntrCts;
- SK_U64 RxNoBufCts;
- SK_U64 TxNoBufCts;
- SK_U64 TxUsedDescrNo;
- SK_U64 RxDeliveredCts;
- SK_U64 RxOctetsDeliveredCts;
- SK_U64 ErrRecoveryCts;
X SK_U64 StartUpTime;
+ SK_BOOL DualNetActiveFlag;
X } SK_PNMI;
X
X
@@ -905,17 +975,17 @@
X */
X extern int SkPnmiInit(SK_AC *pAc, SK_IOC IoC, int level);
X extern int SkPnmiGetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, void* pBuf,
- unsigned int* pLen, SK_U32 Instance);
+ unsigned int* pLen, SK_U32 Instance, SK_U32 NetIndex);
X extern int SkPnmiPreSetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id,
- void* pBuf, unsigned int *pLen, SK_U32 Instance);
+ void* pBuf, unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
X extern int SkPnmiSetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, void* pBuf,
- unsigned int *pLen, SK_U32 Instance);
+ unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
X extern int SkPnmiGetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf,
- unsigned int *pLen);
+ unsigned int *pLen, SK_U32 NetIndex);
X extern int SkPnmiPreSetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf,
- unsigned int *pLen);
+ unsigned int *pLen, SK_U32 NetIndex);
X extern int SkPnmiSetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf,
- unsigned int *pLen);
+ unsigned int *pLen, SK_U32 NetIndex);
X extern int SkPnmiEvent(SK_AC *pAc, SK_IOC IoC, SK_U32 Event,
X SK_EVPARA Param);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skgesirq.h linux/drivers/net/sk98lin/h/skgesirq.h
--- v2.2.19/drivers/net/sk98lin/h/skgesirq.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skgesirq.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skgesirq.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.20 $
- * Date: $Date: 1999/12/06 10:00:44 $
+ * Version: $Revision: 1.22 $
+ * Date: $Date: 2000/11/09 11:30:10 $
X * Purpose: SK specific Gigabit Ethernet special IRQ functions
X *
X ******************************************************************************/


X
X /******************************************************************************
X *

- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2000 SysKonnect GmbH.


X *
X * This program is free software; you can redistribute it and/or modify

X * it under the terms of the GNU General Public License as published by
@@ -26,6 +25,12 @@
X *
X * History:
X * $Log: skgesirq.h,v $
+ * Revision 1.22 2000/11/09 11:30:10 rassmann


+ * WA: Waiting after releasing reset until BCom chip is accessible.
+ *

+ * Revision 1.21 2000/10/18 12:22:40 cgoos
+ * Added workaround for half duplex hangup.
+ *
X * Revision 1.20 1999/12/06 10:00:44 cgoos
X * Added SET event for role.
X *
@@ -106,9 +111,12 @@
X #define SK_HWEV_SET_LMODE 6 /* Set Link Mode by PNMI */
X #define SK_HWEV_SET_FLOWMODE 7 /* Set Flow Control Mode by PNMI */
X #define SK_HWEV_SET_ROLE 8 /* Set Master/Slave (Role) by PNMI */
+#define SK_HWEV_HALFDUP_CHK 9 /* Set Master/Slave (Role) by PNMI */
X
X #define SK_WA_ACT_TIME (5000000L) /* 5 sec */
X #define SK_WA_INA_TIME (100000L) /* 100 msec */
+
+#define SK_HALFDUP_CHK_TIME (10000L) /* 10 msec */
X
X /*
X * Define the error numbers and messages
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/ski2c.h linux/drivers/net/sk98lin/h/ski2c.h
--- v2.2.19/drivers/net/sk98lin/h/ski2c.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/ski2c.h Wed Oct 10 01:41:01 2001


@@ -2,8 +2,8 @@
X *

X * Name: ski2c.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.28 $
- * Date: $Date: 1999/11/22 13:55:46 $
+ * Version: $Revision: 1.30 $
+ * Date: $Date: 2001/04/05 11:38:09 $
X * Purpose: Defines to access Voltage and Temperature Sensor
X * (taken from Monalisa (taken from Concentrator))
X *
@@ -28,6 +28,14 @@


X * History:
X *

X * $Log: ski2c.h,v $
+ * Revision 1.30 2001/04/05 11:38:09 rassmann


+ * Set SenState to idle in SkI2cWaitIrq().
+ * Changed error message in SkI2cWaitIrq().

+ *
+ * Revision 1.29 2000/08/03 14:28:17 rassmann
+ * - Added function to wait for I2C being ready before resetting the board.
+ * - Replaced one duplicate "out of range" message with correct one.
+ *
X * Revision 1.28 1999/11/22 13:55:46 cgoos


X * Changed license header to GPL.
X *

@@ -178,24 +186,26 @@
X #define SKERR_I2C_E014MSG "WARNING: fan sensor out of range"
X #define SKERR_I2C_E015 (SKERR_I2C_E014+1)
X #define SKERR_I2C_E015MSG "ERROR: fan sensor out of range"
+#define SKERR_I2C_E016 (SKERR_I2C_E015+1)
+#define SKERR_I2C_E016MSG "I2C: active transfer does not complete.\n"
X
X /*
X * Define Timeout values
X */
-#define SK_I2C_TIM_LONG 2000000L /* 2 second */
-#define SK_I2C_TIM_SHORT 100000L /* 100 milli second */
+#define SK_I2C_TIM_LONG 2000000L /* 2 seconds */
+#define SK_I2C_TIM_SHORT 100000L /* 100 milliseconds */
X
X /*
X * Define trap and error log hold times
X */
X #ifndef SK_SEN_ERR_TR_HOLD
-#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC)
+#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC)
X #endif
X #ifndef SK_SEN_ERR_LOG_HOLD
-#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC)
+#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC)
X #endif
X #ifndef SK_SEN_WARN_TR_HOLD
-#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC)
+#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC)
X #endif
X #ifndef SK_SEN_WARN_LOG_HOLD
X #define SK_SEN_WARN_LOG_HOLD (15*60*SK_TICKS_PER_SEC)
@@ -257,10 +267,11 @@
X
X extern int SkI2cReadSensor(SK_AC *pAC, SK_IOC IoC, SK_SENSOR *pSen);
X #ifndef SK_DIAG
-extern int SkI2cEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event,
- SK_EVPARA Para);
+extern int SkI2cEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Para);
X extern int SkI2cInit(SK_AC *pAC, SK_IOC IoC, int Level);
+extern void SkI2cWaitIrq(SK_AC *pAC, SK_IOC IoC);
X extern void SkI2cIsr(SK_AC *pAC, SK_IOC IoC);
X
X #endif
X #endif /* n_SKI2C_H */
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/h/skrlmt.h linux/drivers/net/sk98lin/h/skrlmt.h
--- v2.2.19/drivers/net/sk98lin/h/skrlmt.h Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/h/skrlmt.h Wed Oct 10 01:41:01 2001


@@ -2,16 +2,15 @@
X *

X * Name: skrlmt.h


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.27 $
- * Date: $Date: 1999/11/22 13:59:56 $
+ * Version: $Revision: 1.32 $
+ * Date: $Date: 2001/02/14 14:06:31 $
X * Purpose: Header file for Redundant Link ManagemenT.
X *
X ******************************************************************************/


X
X /******************************************************************************
X *

- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,14 +26,26 @@


X * History:
X *

X * $Log: skrlmt.h,v $
+ * Revision 1.32 2001/02/14 14:06:31 rassmann


+ * Editorial changes.
+ *

+ * Revision 1.31 2001/02/05 14:25:26 rassmann


+ * Prepared RLMT for transparent operation.

+ *
+ * Revision 1.30 2001/01/22 13:41:39 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.29 2000/11/17 08:58:00 rassmann


+ * Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event.

+ *
+ * Revision 1.28 2000/11/09 12:24:34 rassmann


+ * Editorial changes.
+ *

X * Revision 1.27 1999/11/22 13:59:56 cgoos


X * Changed license header to GPL.
X *

X * Revision 1.26 1999/10/04 14:01:19 rassmann
- * Corrected reaction to reception of BPDU frames.
- * Added parameter descriptions to "For Readme" section skrlmt.txt.
- * Clarified usage of lookahead result *pForRlmt.
- * Requested driver to present RLMT packets as soon as poosible.
+ * Corrected reaction to reception of BPDU frames (#10441).
X *
X * Revision 1.25 1999/07/20 12:53:39 rassmann
X * Fixed documentation errors for lookahead macros.
@@ -149,7 +160,7 @@
X #define __INC_SKRLMT_H


X
X #ifdef __cplusplus
-xxxx /* not supported yet - force error */
+#error C++ is not yet supported.
X extern "C" {
X #endif /* cplusplus */
X

@@ -169,128 +180,140 @@
X
X /* ----- PORT states ----- */
X
-#define SK_RLMT_PS_INIT 0 /* Port state: Init. */
+#define SK_RLMT_PS_INIT 0 /* Port state: Init. */
X #define SK_RLMT_PS_LINK_DOWN 1 /* Port state: Link down. */
-#define SK_RLMT_PS_DOWN 2 /* Port state: Port down. */
-#define SK_RLMT_PS_GOING_UP 3 /* Port state: Going up. */
-#define SK_RLMT_PS_UP 4 /* Port state: Up. */
+#define SK_RLMT_PS_DOWN 2 /* Port state: Port down. */
+#define SK_RLMT_PS_GOING_UP 3 /* Port state: Going up. */
+#define SK_RLMT_PS_UP 4 /* Port state: Up. */
X
X /* ----- RLMT states ----- */
X
-#define SK_RLMT_RS_INIT 0 /* RLMT state: Init. */
-#define SK_RLMT_RS_NET_DOWN 1 /* RLMT state: Net down. */
-#define SK_RLMT_RS_NET_UP 2 /* RLMT state: Net up. */
+#define SK_RLMT_RS_INIT 0 /* RLMT state: Init. */
+#define SK_RLMT_RS_NET_DOWN 1 /* RLMT state: Net down. */
+#define SK_RLMT_RS_NET_UP 2 /* RLMT state: Net up. */
X
X /* ----- PORT events ----- */
X
-#define SK_RLMT_LINK_UP 1001 /* Link came up. */
-#define SK_RLMT_LINK_DOWN 1002 /* Link went down. */
-#define SK_RLMT_PORT_ADDR 1003 /* Port address changed. */
+#define SK_RLMT_LINK_UP 1001 /* Link came up. */
+#define SK_RLMT_LINK_DOWN 1002 /* Link went down. */
+#define SK_RLMT_PORT_ADDR 1003 /* Port address changed. */
X
X /* ----- RLMT events ----- */
X
-#define SK_RLMT_START 2001 /* Start RLMT. */
-#define SK_RLMT_STOP 2002 /* Stop RLMT. */
+#define SK_RLMT_START 2001 /* Start RLMT. */
+#define SK_RLMT_STOP 2002 /* Stop RLMT. */
X #define SK_RLMT_PACKET_RECEIVED 2003 /* Packet was received for RLMT. */
-#define SK_RLMT_STATS_CLEAR 2004 /* Clear statistics. */
+#define SK_RLMT_STATS_CLEAR 2004 /* Clear statistics. */
X #define SK_RLMT_STATS_UPDATE 2005 /* Update statistics. */
X #define SK_RLMT_PREFPORT_CHANGE 2006 /* Change preferred port. */
-#define SK_RLMT_MODE_CHANGE 2007 /* New RlmtMode. */
+#define SK_RLMT_MODE_CHANGE 2007 /* New RlmtMode. */
+#define SK_RLMT_SET_NETS 2008 /* Number of Nets (1 or 2). */
X
X /* ----- RLMT mode bits ----- */
X
-#define SK_RLMT_CHECK_LINK 1 /* Check Link. */
-#define SK_RLMT_CHECK_LOC_LINK 2 /* Check other link on same adapter. */
-#define SK_RLMT_CHECK_SEG 4 /* Check segmentation. */
+/*
+ * CAUTION: These defines are private to RLMT.
+ * Please use the RLMT mode defines below.
+ */
+
+#define SK_RLMT_CHECK_LINK 1 /* Check Link. */
+#define SK_RLMT_CHECK_LOC_LINK 2 /* Check other link on same adapter. */
+#define SK_RLMT_CHECK_SEG 4 /* Check segmentation. */
X
X #ifndef RLMT_CHECK_REMOTE
X #define SK_RLMT_CHECK_OTHERS SK_RLMT_CHECK_LOC_LINK
X #else /* RLMT_CHECK_REMOTE */
-#define SK_RLMT_CHECK_REM_LINK 8 /* Check link(s) on other adapter(s). */
+#define SK_RLMT_CHECK_REM_LINK 8 /* Check link(s) on other adapter(s). */
X #define SK_RLMT_MAX_REMOTE_PORTS_CHECKED 3
-#define SK_RLMT_CHECK_OTHERS (SK_RLMT_CHECK_LOC_LINK | \
- SK_RLMT_CHECK_REM_LINK)
+#define SK_RLMT_CHECK_OTHERS \
+ (SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK)
X #endif /* RLMT_CHECK_REMOTE */
X
+#ifndef SK_RLMT_ENABLE_TRANSPARENT
+#define SK_RLMT_TRANSPARENT 0 /* RLMT transparent - inactive. */
+#else /* SK_RLMT_ENABLE_TRANSPARENT */
+#define SK_RLMT_TRANSPARENT 128 /* RLMT transparent. */
+#endif /* SK_RLMT_ENABLE_TRANSPARENT */
+
X /* ----- RLMT modes ----- */
X
X /* Check Link State. */
X #define SK_RLMT_MODE_CLS (SK_RLMT_CHECK_LINK)
X
X /* Check Local Ports: check other links on the same adapter. */
-#define SK_RLMT_MODE_CLP (SK_RLMT_CHECK_LINK | \
- SK_RLMT_CHECK_LOC_LINK)
+#define SK_RLMT_MODE_CLP (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK)
X
X /* Check Local Ports and Segmentation Status. */
-#define SK_RLMT_MODE_CLPSS (SK_RLMT_CHECK_LINK | \
- SK_RLMT_CHECK_LOC_LINK | \
- SK_RLMT_CHECK_SEG)
+#define SK_RLMT_MODE_CLPSS \
+ (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_SEG)
X
X #ifdef RLMT_CHECK_REMOTE
X /* Check Local and Remote Ports: check links (local or remote). */
X Name of define TBD!
-#define SK_RLMT_MODE_CRP (SK_RLMT_CHECK_LINK | \
- SK_RLMT_CHECK_LOC_LINK | \
- SK_RLMT_CHECK_REM_LINK)
+#define SK_RLMT_MODE_CRP \
+ (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK)
X
X /* Check Local and Remote Ports and Segmentation Status. */
X Name of define TBD!
-#define SK_RLMT_MODE_CRPSS (SK_RLMT_CHECK_LINK | \
- SK_RLMT_CHECK_LOC_LINK | \
- SK_RLMT_CHECK_REM_LINK | \
- SK_RLMT_CHECK_SEG)
+#define SK_RLMT_MODE_CRPSS \
+ (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | \
+ SK_RLMT_CHECK_REM_LINK | SK_RLMT_CHECK_SEG)
X #endif /* RLMT_CHECK_REMOTE */
X
X /* ----- RLMT lookahead result bits ----- */
X
-#define SK_RLMT_RX_RLMT 1 /* Give packet to RLMT. */
-#define SK_RLMT_RX_PROTOCOL 2 /* Give packet to protocol. */
+#define SK_RLMT_RX_RLMT 1 /* Give packet to RLMT. */
+#define SK_RLMT_RX_PROTOCOL 2 /* Give packet to protocol. */
X
X /* Macros */
X
X #if 0
X SK_AC *pAC /* adapter context */
-SK_U32 PortIdx /* receiving port */
-unsigned PacketLength /* received packet's length */
-SK_BOOL IsBc /* Flag: broadcast received */
-unsigned *pOffset /* Result: offset of bytes to present
- to SK_RLMT_LOOKAHEAD */
-unsigned *pNumBytes /* Result: #Bytes to present
- to SK_RLMT_LOOKAHEAD */
+SK_U32 PortNum /* receiving port */
+unsigned PktLen /* received packet's length */
+SK_BOOL IsBc /* Flag: packet is broadcast */
+unsigned *pOffset /* offs. of bytes to present to SK_RLMT_LOOKAHEAD */
+unsigned *pNumBytes /* #Bytes to present to SK_RLMT_LOOKAHEAD */


X #endif /* 0 */

X
-
-#define SK_RLMT_PRE_LOOKAHEAD(pAC,PortIdx,PacketLength,IsBc,pOffset,pNumBytes) { \
+#define SK_RLMT_PRE_LOOKAHEAD(pAC,PortNum,PktLen,IsBc,pOffset,pNumBytes) { \
X SK_AC *_pAC; \
- SK_U32 _PortIdx; \
+ SK_U32 _PortNum; \


X _pAC = (pAC); \
- _PortIdx = (SK_U32)(PortIdx); \

- _pAC->Rlmt.Port[_PortIdx].PacketsRx++; \
- _pAC->Rlmt.Port[_PortIdx].PacketsPerTimeSlot++; \
- if ((IsBc) && _pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS) { \
- *(pOffset) = 6; \
- *(pNumBytes) = 6; \
+ _PortNum = (SK_U32)(PortNum); \
+ /* _pAC->Rlmt.Port[_PortNum].PacketsRx++; */ \
+ _pAC->Rlmt.Port[_PortNum].PacketsPerTimeSlot++; \
+ if ((_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_TRANSPARENT) != 0) { \
+ *(pNumBytes) = 0; \
+ } \
+ else if (IsBc) { \
+ if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode != SK_RLMT_MODE_CLS) { \
+ *(pNumBytes) = 6; \
+ *(pOffset) = 6; \
+ } \
+ else { \
+ *(pNumBytes) = 0; \
+ } \
X } \
X else { \
- *(pOffset) = 0; \
- if ((PacketLength) > SK_RLMT_MAX_TX_BUF_SIZE) { \


- _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \

+ if ((PktLen) > SK_RLMT_MAX_TX_BUF_SIZE) { \


+ /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \

X *(pNumBytes) = 0; \
X } \
X else { \
X *(pNumBytes) = 6; \
+ *(pOffset) = 0; \
X } \
X } \
X }
X
X #if 0
X SK_AC *pAC /* adapter context */
-SK_U32 PortIdx /* receiving port */
+SK_U32 PortNum /* receiving port */
X SK_U8 *pLaPacket, /* received packet's data (points to pOffset) */
-SK_BOOL IsBc /* Flag: broadcast received */
-SK_BOOL IsMc /* Flag: multicast received */
-unsigned *pForRlmt /* Result: bits SK_RLMT_RX_RLMT,
- SK_RLMT_RX_PROTOCOL */
+SK_BOOL IsBc /* Flag: packet is broadcast */
+SK_BOOL IsMc /* Flag: packet is multicast */
+unsigned *pForRlmt /* Result: bits SK_RLMT_RX_RLMT, SK_RLMT_RX_PROTOCOL */
X SK_RLMT_LOOKAHEAD() expects *pNumBytes from
X packet offset *pOffset (s.a.) at *pLaPacket.
X
@@ -298,29 +321,28 @@
X BC, MC, or UC, you should use constants for IsBc and IsMc, so that your compiler
X can trash unneeded parts of the if construction.


X #endif /* 0 */

-#define SK_RLMT_LOOKAHEAD(pAC,PortIdx,pLaPacket,IsBc,IsMc,pForRlmt) { \
+
+#define SK_RLMT_LOOKAHEAD(pAC,PortNum,pLaPacket,IsBc,IsMc,pForRlmt) { \
X SK_AC *_pAC; \
- SK_U32 _PortIdx; \
+ SK_U32 _PortNum; \
X SK_U8 *_pLaPacket; \


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 27'
echo 'File patch-2.2.20 is continued in part 28'
echo "28" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:34 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part35

#!/bin/sh -x
# this is part 35 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 35; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X *
X * Revision 1.48 1999/10/04 14:01:17 rassmann


- * Corrected reaction to reception of BPDU frames.
- * Added parameter descriptions to "For Readme" section skrlmt.txt.
- * Clarified usage of lookahead result *pForRlmt.
- * Requested driver to present RLMT packets as soon as poosible.
+ * Corrected reaction to reception of BPDU frames (#10441).
X *

X * Revision 1.47 1999/07/20 12:53:36 rassmann


X * Fixed documentation errors for lookahead macros.

@@ -66,7 +103,7 @@
X *
X * Revision 1.40 1999/01/22 13:17:30 rassmann
X * Informing PNMI of NET_UP.
- * Clearing RLMT multicast addresses before first setting them.
+ * Clearing RLMT multicast addresses before setting them for the first time.
X * Reporting segmentation earlier, setting a "quiet time"
X * after a report.
X *
@@ -218,13 +255,13 @@
X
X #ifndef lint


X static const char SysKonnectFileId[] =

- "@(#) $Id: skrlmt.c,v 1.49 1999/11/22 13:38:02 cgoos Exp $ (C) SysKonnect.";
+ "@(#) $Id: skrlmt.c,v 1.61 2001/03/14 12:52:08 rassmann Exp $ (C) SysKonnect.";
X #endif /* !defined(lint) */
X
X #define __SKRLMT_C


X
X #ifdef __cplusplus
-xxxx /* not supported yet - force error */
+#error C++ is not yet supported.
X extern "C" {
X #endif /* cplusplus */
X

@@ -245,11 +282,13 @@
X #ifndef SK_LITTLE_ENDIAN
X /* First 32 bits */
X #define OFFS_LO32 1
+
X /* Second 32 bits */
X #define OFFS_HI32 0
X #else /* SK_LITTLE_ENDIAN */
X /* First 32 bits */
X #define OFFS_LO32 0
+
X /* Second 32 bits */
X #define OFFS_HI32 1
X #endif /* SK_LITTLE_ENDIAN */
@@ -258,58 +297,60 @@
X
X /* ----- Private timeout values ----- */
X
-#define SK_RLMT_MIN_TO_VAL 125000 /* 1/8 sec. */
-#define SK_RLMT_DEF_TO_VAL 1000000 /* 1 sec. */
+#define SK_RLMT_MIN_TO_VAL 125000 /* 1/8 sec. */
+#define SK_RLMT_DEF_TO_VAL 1000000 /* 1 sec. */
X #define SK_RLMT_PORTDOWN_TIM_VAL 900000 /* another 0.9 sec. */
X #define SK_RLMT_PORTSTART_TIM_VAL 100000 /* 0.1 sec. */
X #define SK_RLMT_PORTUP_TIM_VAL 2500000 /* 2.5 sec. */
-#define SK_RLMT_SEG_TO_VAL 900000000 /* 15 min. */
+#define SK_RLMT_SEG_TO_VAL 900000000 /* 15 min. */
+
+/* Assume tick counter increment is 1 - may be set OS-dependent. */
+#ifndef SK_TICK_INCR
+#define SK_TICK_INCR SK_CONSTU64(1)
+#endif /* !defined(SK_TICK_INCR) */
X
X /*
X * Amount that a time stamp must be later to be recognized as "substantially
- * later". This is about 1/128 sec.
+ * later". This is about 1/128 sec, but above 1 tick counter increment.
X */
-
-#define SK_RLMT_BC_DELTA ((SK_TICKS_PER_SEC >> 7) + 1)
+#define SK_RLMT_BC_DELTA (1 + ((SK_TICKS_PER_SEC >> 7) > SK_TICK_INCR ? \
+ (SK_TICKS_PER_SEC >> 7) : SK_TICK_INCR))
X
X /* ----- Private RLMT defaults ----- */
X
-#define SK_RLMT_DEF_PREF_PORT 0 /* "Lower" port. */
-#define SK_RLMT_DEF_MODE SK_RLMT_CHECK_LINK /* Default RLMT Mode. */
+#define SK_RLMT_DEF_PREF_PORT 0 /* "Lower" port. */
+#define SK_RLMT_DEF_MODE SK_RLMT_CHECK_LINK /* Default RLMT Mode. */
X
X /* ----- Private RLMT checking states ----- */
X
-#define SK_RLMT_RCS_SEG 1 /* RLMT Check State: check seg. */
-#define SK_RLMT_RCS_START_SEG 2 /* RLMT Check State: start check seg. */
-#define SK_RLMT_RCS_SEND_SEG 4 /* RLMT Check State: send BPDU packet */
-#define SK_RLMT_RCS_REPORT_SEG 8 /* RLMT Check State: report seg. */
+#define SK_RLMT_RCS_SEG 1 /* RLMT Check State: check seg. */
+#define SK_RLMT_RCS_START_SEG 2 /* RLMT Check State: start check seg. */
+#define SK_RLMT_RCS_SEND_SEG 4 /* RLMT Check State: send BPDU packet */
+#define SK_RLMT_RCS_REPORT_SEG 8 /* RLMT Check State: report seg. */
X
X /* ----- Private PORT checking states ----- */
X
-#define SK_RLMT_PCS_TX 1 /* Port Check State: check tx. */
-#define SK_RLMT_PCS_RX 2 /* Port Check State: check rx. */
+#define SK_RLMT_PCS_TX 1 /* Port Check State: check tx. */
+#define SK_RLMT_PCS_RX 2 /* Port Check State: check rx. */
X
X /* ----- Private PORT events ----- */
X
X /* Note: Update simulation when changing these. */
-
X #define SK_RLMT_PORTSTART_TIM 1100 /* Port start timeout. */
-#define SK_RLMT_PORTUP_TIM 1101 /* Port can now go up. */
+#define SK_RLMT_PORTUP_TIM 1101 /* Port can now go up. */
X #define SK_RLMT_PORTDOWN_RX_TIM 1102 /* Port did not receive once ... */
-#define SK_RLMT_PORTDOWN 1103 /* Port went down. */
+#define SK_RLMT_PORTDOWN 1103 /* Port went down. */
X #define SK_RLMT_PORTDOWN_TX_TIM 1104 /* Partner did not receive ... */
X
X /* ----- Private RLMT events ----- */
X
X /* Note: Update simulation when changing these. */
-
-#define SK_RLMT_TIM 2100 /* RLMT timeout. */
-#define SK_RLMT_SEG_TIM 2101 /* RLMT segmentation check timeout. */
+#define SK_RLMT_TIM 2100 /* RLMT timeout. */
+#define SK_RLMT_SEG_TIM 2101 /* RLMT segmentation check timeout. */
X
X #define TO_SHORTEN(tim) ((tim) / 2)
X
X /* Error numbers and messages. */
-
X #define SKERR_RLMT_E001 (SK_ERRBASE_RLMT + 0)
X #define SKERR_RLMT_E001_MSG "No Packet."
X #define SKERR_RLMT_E002 (SKERR_RLMT_E001 + 1)
@@ -333,78 +374,70 @@
X #define SKERR_RLMT_E010_MSG "Ignored illegal Preferred Port."
X
X /* LLC field values. */
-
-#define LLC_COMMAND_RESPONSE_BIT 1
-#define LLC_TEST_COMMAND 0xE3
-#define LLC_UI 0x03
+#define LLC_COMMAND_RESPONSE_BIT 1
+#define LLC_TEST_COMMAND 0xE3
+#define LLC_UI 0x03
X
X /* RLMT Packet fields. */
-
-#define SK_RLMT_DSAP 0
-#define SK_RLMT_SSAP 0
-#define SK_RLMT_CTRL (LLC_TEST_COMMAND)
-#define SK_RLMT_INDICATOR0 0x53 /* S */
-#define SK_RLMT_INDICATOR1 0x4B /* K */
-#define SK_RLMT_INDICATOR2 0x2D /* - */
-#define SK_RLMT_INDICATOR3 0x52 /* R */
-#define SK_RLMT_INDICATOR4 0x4C /* L */
-#define SK_RLMT_INDICATOR5 0x4D /* M */
-#define SK_RLMT_INDICATOR6 0x54 /* T */
-#define SK_RLMT_PACKET_VERSION 0
+#define SK_RLMT_DSAP 0
+#define SK_RLMT_SSAP 0
+#define SK_RLMT_CTRL (LLC_TEST_COMMAND)
+#define SK_RLMT_INDICATOR0 0x53 /* S */
+#define SK_RLMT_INDICATOR1 0x4B /* K */
+#define SK_RLMT_INDICATOR2 0x2D /* - */
+#define SK_RLMT_INDICATOR3 0x52 /* R */
+#define SK_RLMT_INDICATOR4 0x4C /* L */
+#define SK_RLMT_INDICATOR5 0x4D /* M */
+#define SK_RLMT_INDICATOR6 0x54 /* T */
+#define SK_RLMT_PACKET_VERSION 0
X
X /* RLMT SPT Flag values. */
-
-#define SK_RLMT_SPT_FLAG_CHANGE 0x01
-#define SK_RLMT_SPT_FLAG_CHANGE_ACK 0x80
+#define SK_RLMT_SPT_FLAG_CHANGE 0x01
+#define SK_RLMT_SPT_FLAG_CHANGE_ACK 0x80
X
X /* RLMT SPT Packet fields. */
-
-#define SK_RLMT_SPT_DSAP 0x42
-#define SK_RLMT_SPT_SSAP 0x42
-#define SK_RLMT_SPT_CTRL (LLC_UI)
-#define SK_RLMT_SPT_PROTOCOL_ID0 0x00
-#define SK_RLMT_SPT_PROTOCOL_ID1 0x00
+#define SK_RLMT_SPT_DSAP 0x42
+#define SK_RLMT_SPT_SSAP 0x42
+#define SK_RLMT_SPT_CTRL (LLC_UI)
+#define SK_RLMT_SPT_PROTOCOL_ID0 0x00
+#define SK_RLMT_SPT_PROTOCOL_ID1 0x00
X #define SK_RLMT_SPT_PROTOCOL_VERSION_ID 0x00
-#define SK_RLMT_SPT_BPDU_TYPE 0x00
-#define SK_RLMT_SPT_FLAGS 0x00 /* ?? */
-#define SK_RLMT_SPT_ROOT_ID0 0xFF /* Lowest possible priority. */
-#define SK_RLMT_SPT_ROOT_ID1 0xFF /* Lowest possible priority. */
+#define SK_RLMT_SPT_BPDU_TYPE 0x00
+#define SK_RLMT_SPT_FLAGS 0x00 /* ?? */
+#define SK_RLMT_SPT_ROOT_ID0 0xFF /* Lowest possible priority. */
+#define SK_RLMT_SPT_ROOT_ID1 0xFF /* Lowest possible priority. */
X
X /* Remaining 6 bytes will be the current port address. */
-
-#define SK_RLMT_SPT_ROOT_PATH_COST0 0x00
-#define SK_RLMT_SPT_ROOT_PATH_COST1 0x00
-#define SK_RLMT_SPT_ROOT_PATH_COST2 0x00
-#define SK_RLMT_SPT_ROOT_PATH_COST3 0x00
-#define SK_RLMT_SPT_BRIDGE_ID0 0xFF /* Lowest possible priority. */
-#define SK_RLMT_SPT_BRIDGE_ID1 0xFF /* Lowest possible priority. */
+#define SK_RLMT_SPT_ROOT_PATH_COST0 0x00
+#define SK_RLMT_SPT_ROOT_PATH_COST1 0x00
+#define SK_RLMT_SPT_ROOT_PATH_COST2 0x00
+#define SK_RLMT_SPT_ROOT_PATH_COST3 0x00
+#define SK_RLMT_SPT_BRIDGE_ID0 0xFF /* Lowest possible priority. */
+#define SK_RLMT_SPT_BRIDGE_ID1 0xFF /* Lowest possible priority. */
X
X /* Remaining 6 bytes will be the current port address. */
-
-#define SK_RLMT_SPT_PORT_ID0 0xFF /* Lowest possible priority. */
-#define SK_RLMT_SPT_PORT_ID1 0xFF /* Lowest possible priority. */
-#define SK_RLMT_SPT_MSG_AGE0 0x00
-#define SK_RLMT_SPT_MSG_AGE1 0x00
-#define SK_RLMT_SPT_MAX_AGE0 0x00
-#define SK_RLMT_SPT_MAX_AGE1 0xFF
-#define SK_RLMT_SPT_HELLO_TIME0 0x00
-#define SK_RLMT_SPT_HELLO_TIME1 0xFF
-#define SK_RLMT_SPT_FWD_DELAY0 0x00
-#define SK_RLMT_SPT_FWD_DELAY1 0x40
+#define SK_RLMT_SPT_PORT_ID0 0xFF /* Lowest possible priority. */
+#define SK_RLMT_SPT_PORT_ID1 0xFF /* Lowest possible priority. */
+#define SK_RLMT_SPT_MSG_AGE0 0x00
+#define SK_RLMT_SPT_MSG_AGE1 0x00
+#define SK_RLMT_SPT_MAX_AGE0 0x00
+#define SK_RLMT_SPT_MAX_AGE1 0xFF
+#define SK_RLMT_SPT_HELLO_TIME0 0x00
+#define SK_RLMT_SPT_HELLO_TIME1 0xFF
+#define SK_RLMT_SPT_FWD_DELAY0 0x00
+#define SK_RLMT_SPT_FWD_DELAY1 0x40
X
X /* Size defines. */
-
-#define SK_RLMT_MIN_PACKET_SIZE 34
-#define SK_RLMT_MAX_PACKET_SIZE (SK_RLMT_MAX_TX_BUF_SIZE)
-#define SK_PACKET_DATA_LEN (SK_RLMT_MAX_PACKET_SIZE - \
- SK_RLMT_MIN_PACKET_SIZE)
+#define SK_RLMT_MIN_PACKET_SIZE 34
+#define SK_RLMT_MAX_PACKET_SIZE (SK_RLMT_MAX_TX_BUF_SIZE)
+#define SK_PACKET_DATA_LEN (SK_RLMT_MAX_PACKET_SIZE - \
+ SK_RLMT_MIN_PACKET_SIZE)
X
X /* ----- RLMT packet types ----- */
-
-#define SK_PACKET_ANNOUNCE 1 /* Port announcement. */
-#define SK_PACKET_ALIVE 2 /* Alive packet to port. */
-#define SK_PACKET_ADDR_CHANGED 3 /* Port address changed. */
-#define SK_PACKET_CHECK_TX 4 /* Check your tx line. */
+#define SK_PACKET_ANNOUNCE 1 /* Port announcement. */
+#define SK_PACKET_ALIVE 2 /* Alive packet to port. */
+#define SK_PACKET_ADDR_CHANGED 3 /* Port address changed. */
+#define SK_PACKET_CHECK_TX 4 /* Check your tx line. */
X
X #ifdef SK_LITTLE_ENDIAN
X #define SK_U16_TO_NETWORK_ORDER(Val,Addr) { \
@@ -426,7 +459,6 @@


X /* typedefs *******************************************************************/
X

X /* RLMT packet. Length: SK_RLMT_MAX_PACKET_SIZE (60) bytes. */
-
X typedef struct s_RlmtPacket {
X SK_U8 DstAddr[SK_MAC_ADDR_LEN];
X SK_U8 SrcAddr[SK_MAC_ADDR_LEN];
@@ -437,8 +469,8 @@
X SK_U8 Indicator[7];
X SK_U8 RlmtPacketType[2];
X SK_U8 Align1[2];
- SK_U8 Random[4]; /* Random value of requesting(!) station. */
- SK_U8 RlmtPacketVersion[2]; /* RLMT Packet version */
+ SK_U8 Random[4]; /* Random value of requesting(!) station. */
+ SK_U8 RlmtPacketVersion[2]; /* RLMT Packet version. */
X SK_U8 Data[SK_PACKET_DATA_LEN];
X } SK_RLMT_PACKET;
X
@@ -465,9 +497,9 @@
X
X /* global variables ***********************************************************/
X
-SK_MAC_ADDR SkRlmtMcAddr = {{0x01, 0x00, 0x5A, 0x52, 0x4C, 0x4D}};
-SK_MAC_ADDR BridgeMcAddr = {{0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}};
-SK_MAC_ADDR BcAddr = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}};
+SK_MAC_ADDR SkRlmtMcAddr = {{0x01, 0x00, 0x5A, 0x52, 0x4C, 0x4D}};
+SK_MAC_ADDR BridgeMcAddr = {{0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}};
+SK_MAC_ADDR BcAddr = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}};
X

X /* local variables ************************************************************/
X

@@ -477,10 +509,16 @@
X
X RLMT_STATIC void SkRlmtCheckSwitch(
X SK_AC *pAC,
- SK_IOC IoC);
+ SK_IOC IoC,
+ SK_U32 NetIdx);
X RLMT_STATIC void SkRlmtCheckSeg(
X SK_AC *pAC,
- SK_IOC IoC);
+ SK_IOC IoC,
+ SK_U32 NetIdx);
+RLMT_STATIC void SkRlmtEvtSetNets(
+ SK_AC *pAC,
+ SK_IOC IoC,
+ SK_EVPARA Para);


X
X /******************************************************************************
X *

@@ -506,7 +544,7 @@
X * ===========
X *
X * Determine the adapter's random value.
- * Set the hw registers, the "logical adapter address", the
+ * Set the hw registers, the "logical MAC address", the
X * RLMT multicast address, and eventually the BPDU multicast address.
X *
X * Context:
@@ -516,18 +554,15 @@
X * Nothing.
X */
X void SkRlmtInit(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-int Level) /* initialization level */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+int Level) /* Initialization Level */
X {
X SK_U32 i, j;
X SK_U64 Random;
X SK_EVPARA Para;


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_INIT,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT,
X ("RLMT Init level %d.\n", Level))
X
X switch (Level) {
@@ -541,68 +576,70 @@
X pAC->Rlmt.Port[i].PortStarted = SK_FALSE;
X pAC->Rlmt.Port[i].PortNoRx = SK_FALSE;
X pAC->Rlmt.Port[i].RootIdSet = SK_FALSE;
- }
-
- pAC->Rlmt.RlmtState = SK_RLMT_RS_INIT;
- pAC->Rlmt.RootIdSet = SK_FALSE;
- pAC->Rlmt.MacPreferred = 0xFFFFFFFF; /* Automatic. */


- pAC->Rlmt.PrefPort = SK_RLMT_DEF_PREF_PORT;

- pAC->Rlmt.MacActive = pAC->Rlmt.PrefPort; /* Just assuming. */
- pAC->Rlmt.RlmtMode = SK_RLMT_DEF_MODE;
- pAC->Rlmt.TimeoutValue = SK_RLMT_DEF_TO_VAL;
+ pAC->Rlmt.Port[i].PortNumber = i;
+ pAC->Rlmt.Port[i].Net = &pAC->Rlmt.Net[0];
+ pAC->Rlmt.Port[i].AddrPort = &pAC->Addr.Port[i];
+ }
+
+ pAC->Rlmt.NumNets = 1;
+ for (i = 0; i < SK_MAX_NETS; i++) {


+ pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
+ pAC->Rlmt.Net[i].RootIdSet = SK_FALSE;

+ pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* Automatic. */


+ pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT;
+ /* Just assuming. */
+ pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort;
+ pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE;
+ pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL;
+ pAC->Rlmt.Net[i].NetNumber = i;
+ }
+

+ pAC->Rlmt.Net[0].Port[0] = &pAC->Rlmt.Port[0];
+ pAC->Rlmt.Net[0].Port[1] = &pAC->Rlmt.Port[1];
+#if SK_MAX_NETS > 1
+ pAC->Rlmt.Net[1].Port[0] = &pAC->Rlmt.Port[1];
+#endif /* SK_MAX_NETS > 1 */
X break;
X
X case SK_INIT_IO: /* GIMacsFound first available here. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_INIT,
- ("RLMT: %d MACs were detected.\n",
- pAC->GIni.GIMacsFound))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT,
+ ("RLMT: %d MACs were detected.\n", pAC->GIni.GIMacsFound))
X
- /* Initialize HW registers? */


+ pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound;

X
+ /* Initialize HW registers? */
X if (pAC->GIni.GIMacsFound < 2) {
- Para.Para32[0] = SK_RLMT_CHECK_LINK;
+ Para.Para32[0] = SK_RLMT_MODE_CLS;
+ Para.Para32[1] = 0;
X (void)SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE, Para);
X }
X break;
X
X case SK_INIT_RUN:
+ /* Ensure RLMT is set to one net. */


+ if (pAC->Rlmt.NumNets > 1) {

+ Para.Para32[0] = 1;
+ Para.Para32[1] = -1;


+ SkRlmtEvtSetNets(pAC, IoC, Para);
+ }

+
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
X Random = SkOsGetTime(pAC);
X *(SK_U32*)&pAC->Rlmt.Port[i].Random = *(SK_U32*)&Random;
X
X for (j = 0; j < 4; j++) {
- pAC->Rlmt.Port[i].Random[j] ^= pAC->Addr.Port[i
- ].CurrentMacAddress.a[SK_MAC_ADDR_LEN -
- 1 - j];
+ pAC->Rlmt.Port[i].Random[j] ^= pAC->Rlmt.Port[i].AddrPort->
+ CurrentMacAddress.a[SK_MAC_ADDR_LEN - 1 - j];
X }
X

- (void)SkAddrMcClear(
- pAC,
- IoC,
- i,
- SK_ADDR_PERMANENT | SK_MC_SW_ONLY);

+ (void)SkAddrMcClear(pAC, IoC, i, SK_ADDR_PERMANENT | SK_MC_SW_ONLY);
X
X /* Add RLMT MC address. */
+ (void)SkAddrMcAdd(pAC, IoC, i, &SkRlmtMcAddr, SK_ADDR_PERMANENT);
X

- (void)SkAddrMcAdd(
- pAC,
- IoC,
- i,
- &SkRlmtMcAddr,
- SK_ADDR_PERMANENT);
-
- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) {

+ if (pAC->Rlmt.Net[0].RlmtMode & SK_RLMT_CHECK_SEG) {
X /* Add BPDU MC address. */


-
- (void)SkAddrMcAdd(
- pAC,
- IoC,
- i,
- &BridgeMcAddr,
- SK_ADDR_PERMANENT);

+ (void)SkAddrMcAdd(pAC, IoC, i, &BridgeMcAddr, SK_ADDR_PERMANENT);
X }
X
X (void)SkAddrMcUpdate(pAC, IoC, i);
@@ -612,9 +649,7 @@
X default: /* error */
X break;
X }
-
X return;
-
X } /* SkRlmtInit */
X
X
@@ -639,32 +674,33 @@
X * Nothing
X */
X RLMT_STATIC void SkRlmtBuildCheckChain(
-SK_AC *pAC) /* adapter context */


+SK_AC *pAC, /* Adapter Context */

+SK_U32 NetIdx) /* Net Number */
X {
- SK_U32 i;
- SK_U32 NumMacsUp;
- SK_U32 FirstMacUp=0;
- SK_U32 PrevMacUp=0;
+ SK_U32 i;
+ SK_U32 NumMacsUp;
+ SK_RLMT_PORT * FirstMacUp;
+ SK_RLMT_PORT * PrevMacUp;
X
- if (!(pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
- pAC->Rlmt.Port[i].PortsChecked = 0;
+ FirstMacUp = NULL;
+ PrevMacUp = NULL;
+
+ if (!(pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
+ for (i = 0; i < pAC->Rlmt.Net[i].NumPorts; i++) {
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0;
X }
- return; /* Nothing to build. */
+ return; /* Done. */
X }


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

X ("SkRlmtBuildCheckChain.\n"))
X
X NumMacsUp = 0;
X

- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- pAC->Rlmt.Port[i].PortsChecked = 0;
- pAC->Rlmt.Port[i].PortsSuspect = 0;
- pAC->Rlmt.Port[i].CheckingState &=
+ for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) {
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0;
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortsSuspect = 0;
+ pAC->Rlmt.Net[NetIdx].Port[i]->CheckingState &=
X ~(SK_RLMT_PCS_RX | SK_RLMT_PCS_TX);
X
X /*
@@ -673,156 +709,43 @@
X * 1. the next port that is not LinkDown and
X * 2. the next port that is not PortDown.
X */
-
- if (!pAC->Rlmt.Port[i].LinkDown) {
+ if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) {
X if (NumMacsUp == 0) {
- FirstMacUp = i;
+ FirstMacUp = pAC->Rlmt.Net[NetIdx].Port[i];
X }
X else {
- pAC->Rlmt.Port[PrevMacUp].PortCheck[
- pAC->Rlmt.Port[
- PrevMacUp].PortsChecked].CheckAddr =
- pAC->Addr.Port[i].CurrentMacAddress;
- pAC->Rlmt.Port[PrevMacUp].PortCheck[
- pAC->Rlmt.Port[
- PrevMacUp].PortsChecked].SuspectTx =
- SK_FALSE;
- pAC->Rlmt.Port[PrevMacUp].PortsChecked++;
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortCheck[
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked].CheckAddr =
+ pAC->Rlmt.Net[NetIdx].Port[i]->AddrPort->CurrentMacAddress;
+ PrevMacUp->PortCheck[
+ PrevMacUp->PortsChecked].SuspectTx = SK_FALSE;
+ PrevMacUp->PortsChecked++;
X }
- PrevMacUp = i;
+ PrevMacUp = pAC->Rlmt.Net[NetIdx].Port[i];
X NumMacsUp++;
X }
X }
X
X if (NumMacsUp > 1) {
- pAC->Rlmt.Port[PrevMacUp].PortCheck[pAC->Rlmt.Port[
- PrevMacUp].PortsChecked].CheckAddr =
- pAC->Addr.Port[FirstMacUp].CurrentMacAddress;
- pAC->Rlmt.Port[PrevMacUp].PortCheck[pAC->Rlmt.Port[
- PrevMacUp].PortsChecked].SuspectTx = SK_FALSE;
- pAC->Rlmt.Port[PrevMacUp].PortsChecked++;
+ PrevMacUp->PortCheck[PrevMacUp->PortsChecked].CheckAddr =
+ FirstMacUp->AddrPort->CurrentMacAddress;
+ PrevMacUp->PortCheck[PrevMacUp->PortsChecked].SuspectTx =
+ SK_FALSE;
+ PrevMacUp->PortsChecked++;


X }
X
X #ifdef DEBUG

- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("Port %d checks %d other ports: %2X.\n",
- i,
- pAC->Rlmt.Port[i].PortsChecked,
- pAC->Rlmt.Port[i].PortCheck[0].CheckAddr.a[5]))
+ for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Port %d checks %d other ports: %2X.\n", NetIdx,
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked,
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortCheck[0].CheckAddr.a[5]))
X }
X #endif /* DEBUG */
X
X return;
X } /* SkRlmtBuildCheckChain */
X
-#ifdef SK_RLMT_SLOW_LOOKAHEAD
-
-/******************************************************************************
- *
- * SkRlmtLookaheadPacket - examine received packet shortly, count s-th
- *
- * Description:
- * This routine examines each received packet fast and short and
- * increments some counters.
- * The received packet has to be stored virtually contiguous.
- * This function does the following:
- * - Increment some counters.
- * - Ensure length is sufficient.
- * - Ensure that destination address is physical port address,
- * RLMT multicast, or BPDU multicast address.
- *
- * Notes:
- * This function is fully reentrant while the fast path is not blocked.
- *
- * Context:
- * isr/dpr, not pageable
- *
- * Returns:
- * SK_FALSE packet for upper layers
- * SK_TRUE packet for RLMT
- */
-SK_BOOL SkRlmtLookaheadPacket(
-SK_AC *pAC, /* adapter context */
-SK_U32 PortIdx, /* receiving port */
-SK_U8 *pLaPacket, /* received packet's data */
-unsigned PacketLength, /* received packet's length */ /* Necessary? */
-unsigned LaLength) /* lookahead length */
-{
- int i;
- SK_BOOL IsBc; /* Broadcast address? */
- int RxDest; /* Receive destination? */
- int Offset; /* Offset of data to present to LOOKAHEAD. */
- int NumBytes; /* #Bytes to present to LOOKAHEAD. */
- SK_RLMT_PACKET *pRPacket;
- SK_ADDR_PORT *pAPort;
-
-#ifdef DEBUG
- PacketLength = PacketLength;
-#endif /* DEBUG */
-
- pRPacket = (SK_RLMT_PACKET*)pLaPacket;
- pAPort = &pAC->Addr.Port[PortIdx];
-
-#ifdef DEBUG
- if (pLaPacket == NULL) {
-
- /* Create error log entry. */
-


- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,

- SKERR_RLMT_E001,
- SKERR_RLMT_E001_MSG);


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
- ("SkRlmtLookaheadPacket: NULL pointer.\n"))
-
- return (SK_FALSE);
- }
-#endif /* DEBUG */
-
- /* Drivers should get IsBc from the descriptor. */
-
- IsBc = SK_TRUE;
- for (i = 0; IsBc && i < SK_MAC_ADDR_LEN; i++) {
- IsBc = IsBc && (pLaPacket[i] == 0xFF);
- }
-
- SK_RLMT_PRE_LOOKAHEAD(
- pAC,
- PortIdx,
- PacketLength,
- IsBc,
- &Offset,
- &NumBytes)
-
- if (NumBytes == 0) {
- return (SK_FALSE);
- }
-
- SK_RLMT_LOOKAHEAD(
- pAC,
- PortIdx,
- &pLaPacket[Offset],
- IsBc,
- pLaPacket[0] & 1, /* Drivers: Get info from descriptor. */
- &RxDest)
-
- if (RxDest & SK_RLMT_RX_RLMT) {
- return (SK_TRUE);
- }
-
- return (SK_FALSE);
-} /* SkRlmtLookaheadPacket */
-
-#endif /* SK_RLMT_SLOW_LOOKAHEAD */


X
X /******************************************************************************
X *

@@ -838,20 +761,19 @@
X * NULL or pointer to RLMT mbuf
X */
X RLMT_STATIC SK_MBUF *SkRlmtBuildPacket(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx, /* sending port */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 PortNumber, /* Sending port */
X SK_U16 PacketType, /* RLMT packet type */
-SK_MAC_ADDR *SrcAddr, /* source address */
-SK_MAC_ADDR *DestAddr) /* destination address */
+SK_MAC_ADDR *SrcAddr, /* Source address */
+SK_MAC_ADDR *DestAddr) /* Destination address */
X {
X int i;
X SK_U16 Length;
X SK_MBUF *pMb;
X SK_RLMT_PACKET *pPacket;
X
- if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) !=
- NULL) {
+ if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != NULL) {
X pPacket = (SK_RLMT_PACKET*)pMb->pData;
X for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
X pPacket->DstAddr[i] = DestAddr->a[i];
@@ -868,17 +790,14 @@
X pPacket->Indicator[5] = SK_RLMT_INDICATOR5;
X pPacket->Indicator[6] = SK_RLMT_INDICATOR6;
X
- SK_U16_TO_NETWORK_ORDER(
- PacketType,
- &pPacket->RlmtPacketType[0]);
+ SK_U16_TO_NETWORK_ORDER(PacketType, &pPacket->RlmtPacketType[0]);
X
X for (i = 0; i < 4; i++) {
- pPacket->Random[i] = pAC->Rlmt.Port[PortIdx].Random[i];
+ pPacket->Random[i] = pAC->Rlmt.Port[PortNumber].Random[i];
X }
X
X SK_U16_TO_NETWORK_ORDER(
- SK_RLMT_PACKET_VERSION,
- &pPacket->RlmtPacketVersion[0]);
+ SK_RLMT_PACKET_VERSION, &pPacket->RlmtPacketVersion[0]);
X
X for (i = 0; i < SK_PACKET_DATA_LEN; i++) {
X pPacket->Data[i] = 0x00;
@@ -886,12 +805,12 @@
X
X Length = SK_RLMT_MAX_PACKET_SIZE; /* Or smaller. */
X pMb->Length = Length;
- pMb->PortIdx = PortIdx;
+ pMb->PortIdx = PortNumber;
X Length -= 14;
X SK_U16_TO_NETWORK_ORDER(Length, &pPacket->TypeLen[0]);
X
X if (PacketType == SK_PACKET_ALIVE) {
- pAC->Rlmt.Port[PortIdx].TxHelloCts++;
+ pAC->Rlmt.Port[PortNumber].TxHelloCts++;
X }
X }
X
@@ -913,13 +832,13 @@
X * NULL or pointer to RLMT mbuf
X */
X RLMT_STATIC SK_MBUF *SkRlmtBuildSpanningTreePacket(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx) /* sending port */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 PortNumber) /* Sending port */
X {
- unsigned i;
- SK_U16 Length;
- SK_MBUF *pMb;
+ unsigned i;
+ SK_U16 Length;
+ SK_MBUF *pMb;
X SK_SPTREE_PACKET *pSPacket;
X
X if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) !=
@@ -928,7 +847,7 @@
X for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
X pSPacket->DstAddr[i] = BridgeMcAddr.a[i];
X pSPacket->SrcAddr[i] =
- pAC->Addr.Port[PortIdx].CurrentMacAddress.a[i];
+ pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i];
X }
X pSPacket->DSap = SK_RLMT_SPT_DSAP;
X pSPacket->SSap = SK_RLMT_SPT_SSAP;
@@ -949,13 +868,13 @@
X pSPacket->BridgeId[1] = SK_RLMT_SPT_BRIDGE_ID1;
X
X /*
- * Use virtual address as bridge ID and filter these packets
+ * Use logical MAC address as bridge ID and filter these packets
X * on receive.
X */
-
X for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
X pSPacket->BridgeId[i + 2] = pSPacket->RootId[i + 2] =
- pAC->Addr.CurrentMacAddress.a[i];
+ pAC->Addr.Net[pAC->Rlmt.Port[PortNumber].Net->NetNumber].
+ CurrentMacAddress.a[i];
X }
X pSPacket->PortId[0] = SK_RLMT_SPT_PORT_ID0;
X pSPacket->PortId[1] = SK_RLMT_SPT_PORT_ID1;
@@ -970,11 +889,11 @@
X
X Length = SK_RLMT_MAX_PACKET_SIZE; /* Or smaller. */
X pMb->Length = Length;
- pMb->PortIdx = PortIdx;
+ pMb->PortIdx = PortNumber;
X Length -= 14;
X SK_U16_TO_NETWORK_ORDER(Length, &pSPacket->TypeLen[0]);
X
- pAC->Rlmt.Port[PortIdx].TxSpHelloReqCts++;
+ pAC->Rlmt.Port[PortNumber].TxSpHelloReqCts++;
X }
X
X return (pMb);
@@ -996,36 +915,22 @@
X * Nothing.
X */
X RLMT_STATIC void SkRlmtSend(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx)


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 PortNumber) /* Sending port */
X {
X unsigned j;
X SK_EVPARA Para;
X SK_RLMT_PORT *pRPort;
X
- pRPort = &pAC->Rlmt.Port[PortIdx];
- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) {
- if (pRPort->CheckingState &
- (SK_RLMT_PCS_TX | SK_RLMT_PCS_RX)) {
-
- /*
- * Port is suspicious. Send the RLMT packet to the
- * RLMT multicast address.
- */
-
- if ((Para.pParaPtr = SkRlmtBuildPacket(
- pAC,
- IoC,
- PortIdx,
- SK_PACKET_ALIVE,
- &pAC->Addr.Port[PortIdx].CurrentMacAddress,
+ pRPort = &pAC->Rlmt.Port[PortNumber];
+ if (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) {
+ if (pRPort->CheckingState & (SK_RLMT_PCS_TX | SK_RLMT_PCS_RX)) {
+ /* Port is suspicious. Send the RLMT packet to the RLMT mc addr. */
+ if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber,
+ SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress,
X &SkRlmtMcAddr)) != NULL) {


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para);
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
X }
X }
X else {
@@ -1033,61 +938,33 @@
X * Send a directed RLMT packet to all ports that are
X * checked by the indicated port.
X */
-
X for (j = 0; j < pRPort->PortsChecked; j++) {
- if ((Para.pParaPtr =
- SkRlmtBuildPacket(
- pAC,
- IoC,
- PortIdx,
- SK_PACKET_ALIVE,
- &pAC->Addr.Port[PortIdx].CurrentMacAddress,
- &pRPort->PortCheck[j].CheckAddr)
- ) != NULL) {


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para);
+ if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber,
+ SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress,
+ &pRPort->PortCheck[j].CheckAddr)) != NULL) {
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);


X }
X }
X }
X }
X

- if ((pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) &&
- (pAC->Rlmt.CheckingState & SK_RLMT_RCS_SEND_SEG)) {
-
+ if ((pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) &&
+ (pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEND_SEG)) {
X /*
X * Send a BPDU packet to make a connected switch tell us
X * the correct root bridge.
X */
-
X if ((Para.pParaPtr =


- SkRlmtBuildSpanningTreePacket(
- pAC,
- IoC,

- PortIdx)


- ) != NULL) {
-

- pAC->Rlmt.CheckingState &= ~SK_RLMT_RCS_SEND_SEG;
+ SkRlmtBuildSpanningTreePacket(pAC, IoC, PortNumber)) != NULL) {
+ pAC->Rlmt.Port[PortNumber].Net->CheckingState &= ~SK_RLMT_RCS_SEND_SEG;
X pRPort->RootIdSet = SK_FALSE;
X

- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para);


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_TX,
- ("SkRlmtSend: BPDU Packet on Port %u.\n",
- PortIdx))
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_TX,
+ ("SkRlmtSend: BPDU Packet on Port %u.\n", PortNumber))
X }
- }
-
- return;
-
+ }
+ return;
X } /* SkRlmtSend */
X
X
@@ -1099,61 +976,51 @@
X * This routine checks if a port who received a non-BPDU packet
X * needs to go up or needs to be stopped going down.
X *
-* Context:
+ * Context:
X * runtime, pageable?
X *
X * Returns:
X * Nothing.
X */
X RLMT_STATIC void SkRlmtPortReceives(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx) /* port to check */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 PortNumber) /* Port to check */
X {
X SK_RLMT_PORT *pRPort;
- SK_EVPARA Para;
+ SK_EVPARA Para;
X
- pRPort = &pAC->Rlmt.Port[PortIdx];
+ pRPort = &pAC->Rlmt.Port[PortNumber];
X pRPort->PortNoRx = SK_FALSE;
X
X if ((pRPort->PortState == SK_RLMT_PS_DOWN) &&
X !(pRPort->CheckingState & SK_RLMT_PCS_TX)) {
-
X /*
X * Port is marked down (rx), but received a non-BPDU packet.
X * Bring it up.
X */


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Received on PortDown.\n"))
X
X pRPort->PortState = SK_RLMT_PS_GOING_UP;
X pRPort->GuTimeStamp = SkOsGetTime(pAC);
- Para.Para32[0] = PortIdx;


- SkTimerStart(
- pAC,
- IoC,

- &pRPort->UpTimer,
- SK_RLMT_PORTUP_TIM_VAL,
- SKGE_RLMT,
- SK_RLMT_PORTUP_TIM,
- Para);
- SkRlmtCheckSwitch(pAC, IoC);
- }
+ Para.Para32[0] = PortNumber;
+ Para.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL,
+ SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para);
+ pRPort->CheckingState &= ~SK_RLMT_PCS_RX;
+ /* pAC->Rlmt.CheckSwitch = SK_TRUE; */
+ SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
+ } /* PortDown && !SuspectTx */
X else if (pRPort->CheckingState & SK_RLMT_PCS_RX) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Stop bringing port down.\n"))
X SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
- SkRlmtCheckSwitch(pAC, IoC);
- }
+ pRPort->CheckingState &= ~SK_RLMT_PCS_RX;
+ /* pAC->Rlmt.CheckSwitch = SK_TRUE; */
+ SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
+ } /* PortGoingDown */
X
- pRPort->CheckingState &= ~SK_RLMT_PCS_RX;
X return;
X } /* SkRlmtPortReceives */
X
@@ -1163,7 +1030,7 @@
X * SkRlmtPacketReceive - receive a packet for closer examination
X *
X * Description:
- * This routine examines a packet more closely than SkRlmtLookahead*().
+ * This routine examines a packet more closely than SK_RLMT_LOOKAHEAD.
X *
X * Context:
X * runtime, pageable?
@@ -1172,32 +1039,29 @@
X * Nothing.
X */
X RLMT_STATIC void SkRlmtPacketReceive(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_MBUF *pMb) /* received packet */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_MBUF *pMb) /* Received packet */
X {
X #ifdef xDEBUG
X extern void DumpData(char *p, int size);
X #endif /* DEBUG */
- int i;
- unsigned j;
- SK_U16 PacketType;
- SK_U32 PortIdx;
+ int i;
+ unsigned j;
+ SK_U16 PacketType;
+ SK_U32 PortNumber;
X SK_ADDR_PORT *pAPort;
X SK_RLMT_PORT *pRPort;
X SK_RLMT_PACKET *pRPacket;
X SK_SPTREE_PACKET *pSPacket;
- SK_EVPARA Para;
+ SK_EVPARA Para;
+
+ PortNumber = pMb->PortIdx;
+ pAPort = &pAC->Addr.Port[PortNumber];
+ pRPort = &pAC->Rlmt.Port[PortNumber];
X
- PortIdx = pMb->PortIdx;
- pAPort = &pAC->Addr.Port[PortIdx];
- pRPort = &pAC->Rlmt.Port[PortIdx];


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
- ("SkRlmtPacketReceive: PortIdx == %d.\n", PortIdx))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
+ ("SkRlmtPacketReceive: PortNumber == %d.\n", PortNumber))
X
X pRPacket = (SK_RLMT_PACKET*)pMb->pData;
X pSPacket = (SK_SPTREE_PACKET*)pRPacket;
@@ -1207,7 +1071,7 @@
X #endif /* DEBUG */
X
X if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) != 0) {
- SkRlmtPortReceives(pAC, IoC, PortIdx);
+ SkRlmtPortReceives(pAC, IoC, PortNumber);
X }
X
X /* Check destination address. */
@@ -1216,15 +1080,8 @@
X !SK_ADDR_EQUAL(SkRlmtMcAddr.a, pRPacket->DstAddr) &&
X !SK_ADDR_EQUAL(BridgeMcAddr.a, pRPacket->DstAddr)) {
X
- /*
- * Not sent to current MAC or registered MC address
- * => Trash it.
- */


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ /* Not sent to current MAC or registered MC address => Trash it. */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Not for me.\n"))
X
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
@@ -1241,19 +1098,17 @@
X * Check for duplicate address here:
X * If Packet.Random != My.Random => DupAddr.
X */
-
X for (i = 3; i >= 0; i--) {
- if (pRPort->Random[i] !=
- pRPacket->Random[i]) {
+ if (pRPort->Random[i] != pRPacket->Random[i]) {
X break;
X }
X }
X
X /*
- * CAUTION: Do not check for duplicate MAC
- * address in RLMT Alive Reply packets.
+ * CAUTION: Do not check for duplicate MAC address in RLMT Alive Reply
+ * packets (they have the LLC_COMMAND_RESPONSE_BIT set in
+ * pRPacket->SSap).
X */
-
X if (i >= 0 && pRPacket->DSap == SK_RLMT_DSAP &&
X pRPacket->Ctrl == SK_RLMT_CTRL &&
X pRPacket->SSap == SK_RLMT_SSAP &&
@@ -1264,43 +1119,28 @@
X pRPacket->Indicator[4] == SK_RLMT_INDICATOR4 &&
X pRPacket->Indicator[5] == SK_RLMT_INDICATOR5 &&
X pRPacket->Indicator[6] == SK_RLMT_INDICATOR6) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Duplicate MAC Address.\n"))
X
X /* Error Log entry. */


-
- SK_ERR_LOG(
- pAC,

- SK_ERRCL_COMM,
- SKERR_RLMT_E006,
- SKERR_RLMT_E006_MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E006, SKERR_RLMT_E006_MSG);
X }
X else {
X /* Simply trash it. */


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Sent by me.\n"))
X }
X
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
-
X return;
X }
X
X /* Check SuspectTx entries. */
-
X if (pRPort->PortsSuspect > 0) {
X for (j = 0; j < pRPort->PortsChecked; j++) {
X if (pRPort->PortCheck[j].SuspectTx &&
X SK_ADDR_EQUAL(
- pRPacket->SrcAddr,
- pRPort->PortCheck[j].CheckAddr.a)) {
+ pRPacket->SrcAddr, pRPort->PortCheck[j].CheckAddr.a)) {
X pRPort->PortCheck[j].SuspectTx = SK_FALSE;
X pRPort->PortsSuspect--;
X break;
@@ -1309,7 +1149,6 @@
X }
X
X /* Determine type of packet. */
-
X if (pRPacket->DSap == SK_RLMT_DSAP &&
X pRPacket->Ctrl == SK_RLMT_CTRL &&
X (pRPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == SK_RLMT_SSAP &&
@@ -1322,7 +1161,6 @@
X pRPacket->Indicator[6] == SK_RLMT_INDICATOR6) {
X
X /* It's an RLMT packet. */
-
X PacketType = (SK_U16)((pRPacket->RlmtPacketType[0] << 8) |
X pRPacket->RlmtPacketType[1]);
X
@@ -1330,14 +1168,10 @@
X case SK_PACKET_ANNOUNCE: /* Not yet used. */
X #if 0
X /* Build the check chain. */
-
X SkRlmtBuildCheckChain(pAC);


X #endif /* 0 */
X

- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Announce.\n"))
X
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
@@ -1345,221 +1179,145 @@
X
X case SK_PACKET_ALIVE:
X if (pRPacket->SSap & LLC_COMMAND_RESPONSE_BIT) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Alive Reply.\n"))
X
- /* Alive Reply Packet. */
-
-#if 0
- pRPort->RlmtAcksPerTimeSlot++;


-#endif /* 0 */
-

- if (!(pAC->Addr.Port[PortIdx].PromMode &
- SK_PROM_MODE_LLC) ||
+ if (!(pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_LLC) ||
X SK_ADDR_EQUAL(
- pRPacket->DstAddr,
- pAPort->CurrentMacAddress.a)) {
-
+ pRPacket->DstAddr, pAPort->CurrentMacAddress.a)) {
X /* Obviously we could send something. */
-
- if (pRPort->CheckingState &
- SK_RLMT_PCS_TX) {
- pRPort->CheckingState &=
- ~SK_RLMT_PCS_TX;
- SkTimerStop(
- pAC,
- IoC,
- &pRPort->DownTxTimer);
+ if (pRPort->CheckingState & SK_RLMT_PCS_TX) {
+ pRPort->CheckingState &= ~SK_RLMT_PCS_TX;
+ SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
X }
X
- if ((pRPort->PortState ==
- SK_RLMT_PS_DOWN) &&
- !(pRPort->CheckingState &
- SK_RLMT_PCS_RX)) {
- pRPort->PortState =
- SK_RLMT_PS_GOING_UP;
- pRPort->GuTimeStamp =
- SkOsGetTime(pAC);
-
- SkTimerStop(
- pAC,
- IoC,
- &pRPort->DownTxTimer);
-
- Para.Para32[0] = PortIdx;


- SkTimerStart(
- pAC,
- IoC,

- &pRPort->UpTimer,
- SK_RLMT_PORTUP_TIM_VAL,
- SKGE_RLMT,
- SK_RLMT_PORTUP_TIM,
- Para);
+ if ((pRPort->PortState == SK_RLMT_PS_DOWN) &&
+ !(pRPort->CheckingState & SK_RLMT_PCS_RX)) {
+ pRPort->PortState = SK_RLMT_PS_GOING_UP;
+ pRPort->GuTimeStamp = SkOsGetTime(pAC);
+
+ SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
+
+ Para.Para32[0] = PortNumber;
+ Para.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pRPort->UpTimer,
+ SK_RLMT_PORTUP_TIM_VAL, SKGE_RLMT,
+ SK_RLMT_PORTUP_TIM, Para);
X }
X }
X
X /* Mark sending port as alive? */
-
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
X }
X else { /* Alive Request Packet. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Alive Request.\n"))
X
X pRPort->RxHelloCts++;
-#if 0
- pRPort->RlmtChksPerTimeSlot++;
-#endif /* 0 */
X
X /* Answer. */
-
X for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
- pRPacket->DstAddr[i] =
- pRPacket->SrcAddr[i];
- pRPacket->SrcAddr[i] = pAC->Addr.Port[
- PortIdx].CurrentMacAddress.a[i];
+ pRPacket->DstAddr[i] = pRPacket->SrcAddr[i];
+ pRPacket->SrcAddr[i] =
+ pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i];
X }
X pRPacket->SSap |= LLC_COMMAND_RESPONSE_BIT;
X
X Para.pParaPtr = pMb;


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para);
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
X }
X break;
X
X case SK_PACKET_CHECK_TX:


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Check your tx line.\n"))
X
- /*
- * A port checking us requests us to check our tx line.
- */
-
+ /* A port checking us requests us to check our tx line. */
X pRPort->CheckingState |= SK_RLMT_PCS_TX;
X
X /* Start PortDownTx timer. */
-
- Para.Para32[0] = PortIdx;


- SkTimerStart(
- pAC,
- IoC,

- &pRPort->DownTxTimer,
- SK_RLMT_PORTDOWN_TIM_VAL,
- SKGE_RLMT,
- SK_RLMT_PORTDOWN_TX_TIM,
- Para);
+ Para.Para32[0] = PortNumber;
+ Para.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pRPort->DownTxTimer,
+ SK_RLMT_PORTDOWN_TIM_VAL, SKGE_RLMT,
+ SK_RLMT_PORTDOWN_TX_TIM, Para);
X
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
X
- if ((Para.pParaPtr = SkRlmtBuildPacket(
- pAC,
- IoC,
- PortIdx,
- SK_PACKET_ALIVE,
- &pAC->Addr.Port[PortIdx].CurrentMacAddress,
+ if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber,
+ SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress,
X &SkRlmtMcAddr)) != NULL) {


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para);
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
X }
X break;
X
X case SK_PACKET_ADDR_CHANGED:


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Address Change.\n"))
X
X /* Build the check chain. */
-
- SkRlmtBuildCheckChain(pAC);
+ SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber);
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);


X break;
X
X default:

- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Unknown RLMT packet.\n"))
X
X /* RA;:;: ??? */
-
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
X }
X }
X else if (pSPacket->DSap == SK_RLMT_SPT_DSAP &&
X pSPacket->Ctrl == SK_RLMT_SPT_CTRL &&
- (pSPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) ==
- SK_RLMT_SPT_SSAP) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ (pSPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == SK_RLMT_SPT_SSAP) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: BPDU Packet.\n"))
X
X /* Spanning Tree packet. */
-
X pRPort->RxSpHelloCts++;
X
- if (!SK_ADDR_EQUAL(
- &pSPacket->RootId[2],
- &pAC->Addr.CurrentMacAddress.a[0])) {
-
+ if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pAC->Addr.Net[pAC->Rlmt.
+ Port[PortNumber].Net->NetNumber].CurrentMacAddress.a[0])) {
X /*
X * Check segmentation if a new root bridge is set and
X * the segmentation check is not currently running.
X */
-
- if (!SK_ADDR_EQUAL(
- &pSPacket->RootId[2],
- &pRPort->Root.Id[2]) &&
- (pAC->Rlmt.LinksUp > 1) &&
- (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) &&
- !(pAC->Rlmt.CheckingState & SK_RLMT_RCS_SEG)) {
- pAC->Rlmt.CheckingState |=
- SK_RLMT_RCS_START_SEG |
- SK_RLMT_RCS_SEND_SEG;
+ if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pRPort->Root.Id[2]) &&
+ (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) &&
+ (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG)
+ != 0 && (pAC->Rlmt.Port[PortNumber].Net->CheckingState &
+ SK_RLMT_RCS_SEG) == 0) {
+ pAC->Rlmt.Port[PortNumber].Net->CheckingState |=
+ SK_RLMT_RCS_START_SEG | SK_RLMT_RCS_SEND_SEG;
X }
X
X /* Store tree view of this port. */
-
X for (i = 0; i < 8; i++) {
X pRPort->Root.Id[i] = pSPacket->RootId[i];
X }
X pRPort->RootIdSet = SK_TRUE;
+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP,
+ ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n",
+ PortNumber,
+ pRPort->Root.Id[0], pRPort->Root.Id[1],
+ pRPort->Root.Id[2], pRPort->Root.Id[3],
+ pRPort->Root.Id[4], pRPort->Root.Id[5],
+ pRPort->Root.Id[6], pRPort->Root.Id[7]))
X }
X
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
-
- if (pAC->Rlmt.CheckingState & SK_RLMT_RCS_REPORT_SEG) {
- SkRlmtCheckSeg(pAC, IoC);
+ if ((pAC->Rlmt.Port[PortNumber].Net->CheckingState &
+ SK_RLMT_RCS_REPORT_SEG) != 0) {
+ SkRlmtCheckSeg(pAC, IoC, pAC->Rlmt.Port[PortNumber].Net->NetNumber);
X }
X }
X else {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_RX,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
X ("SkRlmtPacketReceive: Unknown Packet Type.\n"))
X
X /* Unknown packet. */
-
X SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
X }
X return;
@@ -1625,25 +1383,21 @@
X * New timeout value.
X */
X RLMT_STATIC SK_U32 SkRlmtCheckPort(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx) /* port to check */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 PortNumber) /* Port to check */
X {
- unsigned i;
- SK_U32 NewTimeout;
+ unsigned i;
+ SK_U32 NewTimeout;
X SK_RLMT_PORT *pRPort;
- SK_EVPARA Para;
+ SK_EVPARA Para;
X
- pRPort = &pAC->Rlmt.Port[PortIdx];
+ pRPort = &pAC->Rlmt.Port[PortNumber];
X
X if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) == 0) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

X ("SkRlmtCheckPort %d: No (%d) receives in last time slot.\n",
- PortIdx,
- pRPort->PacketsPerTimeSlot))
+ PortNumber, pRPort->PacketsPerTimeSlot))
X
X /*
X * Check segmentation if there was no receive at least twice
@@ -1651,46 +1405,35 @@
X * check is not currently running.
X */
X
- if (pRPort->PortNoRx && (pAC->Rlmt.LinksUp > 1) &&
- (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) &&
- !(pAC->Rlmt.CheckingState & SK_RLMT_RCS_SEG)) {
- pAC->Rlmt.CheckingState |=
+ if (pRPort->PortNoRx && (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) &&
+ (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) &&
+ !(pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEG)) {
+ pAC->Rlmt.Port[PortNumber].Net->CheckingState |=
X SK_RLMT_RCS_START_SEG | SK_RLMT_RCS_SEND_SEG;
X }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
X ("SkRlmtCheckPort: PortsSuspect %d, PcsRx %d.\n",
- pRPort->PortsSuspect,
- pRPort->CheckingState & SK_RLMT_PCS_RX))
+ pRPort->PortsSuspect, pRPort->CheckingState & SK_RLMT_PCS_RX))
X
X if (pRPort->PortState != SK_RLMT_PS_DOWN) {
- NewTimeout = TO_SHORTEN(pAC->Rlmt.TimeoutValue);
+ NewTimeout = TO_SHORTEN(pAC->Rlmt.Port[PortNumber].Net->TimeoutValue);
X if (NewTimeout < SK_RLMT_MIN_TO_VAL) {
X NewTimeout = SK_RLMT_MIN_TO_VAL;
X }
X
X if (!(pRPort->CheckingState & SK_RLMT_PCS_RX)) {
- Para.Para32[0] = PortIdx;
+ Para.Para32[0] = PortNumber;
X pRPort->CheckingState |= SK_RLMT_PCS_RX;
X
X /*
- * What shall we do if the port checked
- * by this one receives our request
- * frames? What's bad - our rx line
- * or his tx line?
+ * What shall we do if the port checked by this one receives
+ * our request frames? What's bad - our rx line or his tx line?
X */
-


- SkTimerStart(
- pAC,
- IoC,

- &pRPort->DownRxTimer,
- SK_RLMT_PORTDOWN_TIM_VAL,
- SKGE_RLMT,
- SK_RLMT_PORTDOWN_RX_TIM,
- Para);
+ Para.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pRPort->DownRxTimer,
+ SK_RLMT_PORTDOWN_TIM_VAL, SKGE_RLMT,
+ SK_RLMT_PORTDOWN_RX_TIM, Para);
X
X for (i = 0; i < pRPort->PortsChecked; i++) {
X if (pRPort->PortCheck[i].SuspectTx) {
@@ -1699,19 +1442,10 @@
X pRPort->PortCheck[i].SuspectTx = SK_TRUE;
X pRPort->PortsSuspect++;
X if ((Para.pParaPtr =
- SkRlmtBuildPacket(
- pAC,
- IoC,
- PortIdx,
- SK_PACKET_CHECK_TX,
- &pAC->Addr.Port[PortIdx].CurrentMacAddress,
- &pRPort->PortCheck[i].CheckAddr)
- ) != NULL) {


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para);
+ SkRlmtBuildPacket(pAC, IoC, PortNumber, SK_PACKET_CHECK_TX,
+ &pAC->Addr.Port[PortNumber].CurrentMacAddress,
+ &pRPort->PortCheck[i].CheckAddr)) != NULL) {
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
X }
X }
X }
@@ -1722,17 +1456,17 @@
X pRPort->PortNoRx = SK_TRUE;
X }
X else { /* A non-BPDU packet was received. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

X ("SkRlmtCheckPort %d: %d (%d) receives in last time slot.\n",
- PortIdx,
- pRPort->PacketsPerTimeSlot -
- pRPort->BpduPacketsPerTimeSlot,
+ PortNumber,
+ pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot,
X pRPort->PacketsPerTimeSlot))
X
- SkRlmtPortReceives(pAC, IoC, PortIdx);
+ SkRlmtPortReceives(pAC, IoC, PortNumber);
+ if (pAC->Rlmt.CheckSwitch) {
+ SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
+ }
+
X NewTimeout = SK_RLMT_DEF_TO_VAL;
X }
X
@@ -1755,82 +1489,69 @@
X * SK_BOOL
X */
X RLMT_STATIC SK_BOOL SkRlmtSelectBcRx(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 A, /* active port */
-SK_U32 P, /* preferred port */
-SK_U32 *N) /* new active port */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Active, /* Active port */
+SK_U32 PrefPort, /* Preferred port */
+SK_U32 *pSelect) /* New active port */
X {
X SK_U64 BcTimeStamp;
X SK_U32 i;
X SK_BOOL PortFound;
X
- BcTimeStamp = 0; /* Not totally necessary, but feeling better. */
+ BcTimeStamp = 0; /* Not totally necessary, but feeling better. */
X PortFound = SK_FALSE;
X
X /* Select port with the latest TimeStamp. */
-
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("TimeStamp Port %d: %.08x%.08x.\n",
- i,
- *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32),
- *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32)))
- if (!pAC->Rlmt.Port[i].PortDown &&
- !pAC->Rlmt.Port[i].PortNoRx) {
- if (!PortFound ||
- pAC->Rlmt.Port[i].BcTimeStamp > BcTimeStamp) {
+#ifdef xDEBUG
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("TimeStamp Port %d: %08x %08x.\n",
+ i,
+ *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32),
+ *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32)))
+#endif /* DEBUG */
+ if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx) {
+ if (!PortFound || pAC->Rlmt.Port[i].BcTimeStamp > BcTimeStamp) {
X BcTimeStamp = pAC->Rlmt.Port[i].BcTimeStamp;
- *N = i;
+ *pSelect = i;
X PortFound = SK_TRUE;
X }
X }
X }
X
X if (PortFound) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("Port %d received the last broadcast.\n", *N))
+#if 0
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Port %d received the last broadcast.\n", *pSelect))
+#endif /* 0 */
X
X /* Look if another port's time stamp is similar. */
-
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
- if (i == *N) {
+ if (i == *pSelect) {
X continue;
X }
- if (!pAC->Rlmt.Port[i].PortDown &&
- !pAC->Rlmt.Port[i].PortNoRx &&
+ if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx &&
X (pAC->Rlmt.Port[i].BcTimeStamp >
- BcTimeStamp - SK_RLMT_BC_DELTA ||
- pAC->Rlmt.Port[i].BcTimeStamp
- + SK_RLMT_BC_DELTA > BcTimeStamp)) {
+ BcTimeStamp - SK_RLMT_BC_DELTA ||
+ pAC->Rlmt.Port[i].BcTimeStamp +
+ SK_RLMT_BC_DELTA > BcTimeStamp)) {
X PortFound = SK_FALSE;


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("Port %d received a broadcast %s.\n",
- i,
- "at a similar time"))
+#ifdef xDEBUG
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Port %d received a broadcast at a similar time.\n", i))
+#endif /* DEBUG */
X break;
X }
X }
X }
X
-#ifdef DEBUG
+#ifdef xDEBUG
X if (PortFound) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_CHECK_SWITCH found Port %d receiving %s.\n",
- *N,
- "the substantially latest broadcast"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_CHECK_SWITCH found Port %d receiving the substantially latest broadcast (%d).\n",
+ *pSelect,
+ BcTimeStamp - pAC->Rlmt.Port[1 - *pSelect].BcTimeStamp))
X }
X #endif /* DEBUG */
X
@@ -1852,11 +1573,11 @@
X * SK_BOOL
X */
X RLMT_STATIC SK_BOOL SkRlmtSelectNotSuspect(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 A, /* active port */
-SK_U32 P, /* preferred port */
-SK_U32 *N) /* new active port */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Active, /* Active port */
+SK_U32 PrefPort, /* Preferred port */
+SK_U32 *pSelect) /* New active port */
X {
X SK_U32 i;
X SK_BOOL PortFound;
@@ -1864,32 +1585,25 @@
X PortFound = SK_FALSE;
X
X /* Select first port that is PortUp && !SuspectRx. */
-
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
X if (!pAC->Rlmt.Port[i].PortDown &&
X !(pAC->Rlmt.Port[i].CheckingState & SK_RLMT_PCS_RX)) {
- *N = i;
- if (!pAC->Rlmt.Port[A].PortDown &&
- !(pAC->Rlmt.Port[A].CheckingState &
- SK_RLMT_PCS_RX)) {
- *N = A;
- }
- if (!pAC->Rlmt.Port[P].PortDown &&
- !(pAC->Rlmt.Port[P].CheckingState &
- SK_RLMT_PCS_RX)) {
- *N = P;
+ *pSelect = i;
+ if (!pAC->Rlmt.Port[Active].PortDown &&
+ !(pAC->Rlmt.Port[Active].CheckingState & SK_RLMT_PCS_RX)) {
+ *pSelect = Active;
+ }
+ if (!pAC->Rlmt.Port[PrefPort].PortDown &&
+ !(pAC->Rlmt.Port[PrefPort].CheckingState & SK_RLMT_PCS_RX)) {
+ *pSelect = PrefPort;
X }
X PortFound = SK_TRUE;


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

X ("SK_RLMT_CHECK_SWITCH found Port %d up and not check RX.\n",
- *N))
+ *pSelect))


X break;
X }
X }
-

X return (PortFound);
X } /* SkRlmtSelectNotSuspect */
X
@@ -1908,12 +1622,12 @@
X * SK_BOOL
X */
X RLMT_STATIC SK_BOOL SkRlmtSelectUp(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 A, /* active port */
-SK_U32 P, /* preferred port */
-SK_U32 *N, /* new active port */
-SK_BOOL AutoNegDone) /* successfully auto-negotiated? */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Active, /* Active port */
+SK_U32 PrefPort, /* Preferred port */
+SK_U32 *pSelect, /* New active port */
+SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */
X {
X SK_U32 i;
X SK_BOOL PortFound;
@@ -1921,30 +1635,24 @@
X PortFound = SK_FALSE;
X
X /* Select first port that is PortUp. */
-
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
X if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_UP &&
X pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
- *N = i;
- if (pAC->Rlmt.Port[A].PortState == SK_RLMT_PS_UP &&
- pAC->GIni.GP[A].PAutoNegFail != AutoNegDone) {
- *N = A;
- }
- if (pAC->Rlmt.Port[P].PortState == SK_RLMT_PS_UP &&
- pAC->GIni.GP[P].PAutoNegFail != AutoNegDone) {
- *N = P;
+ *pSelect = i;
+ if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_UP &&
+ pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) {
+ *pSelect = Active;
+ }
+ if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_UP &&
+ pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) {
+ *pSelect = PrefPort;
X }
X PortFound = SK_TRUE;


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_CHECK_SWITCH found Port %d up.\n",
- *N))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_CHECK_SWITCH found Port %d up.\n", *pSelect))


X break;
X }
X }
-

X return (PortFound);
X } /* SkRlmtSelectUp */
X
@@ -1963,26 +1671,26 @@
X * SK_BOOL
X */
X RLMT_STATIC SK_BOOL SkRlmtSelectGoingUp(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 A, /* active port */
-SK_U32 P, /* preferred port */
-SK_U32 *N, /* new active port */
-SK_BOOL AutoNegDone) /* successfully auto-negotiated? */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Active, /* Active port */
+SK_U32 PrefPort, /* Preferred port */
+SK_U32 *pSelect, /* New active port */
+SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */
X {
- SK_U64 GuTimeStamp=0;
+ SK_U64 GuTimeStamp;
X SK_U32 i;
X SK_BOOL PortFound;
X
+ GuTimeStamp = 0;
X PortFound = SK_FALSE;
X
X /* Select port that is PortGoingUp for the longest time. */
-
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
X if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP &&
X pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
- GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp;
- *N = i;
+ GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp;
+ *pSelect = i;
X PortFound = SK_TRUE;
X break;
X }
@@ -1992,22 +1700,17 @@
X return (SK_FALSE);
X }
X
- for (i = *N + 1; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
+ for (i = *pSelect + 1; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
X if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP &&
- pAC->Rlmt.Port[i].GuTimeStamp < GuTimeStamp &&
+ pAC->Rlmt.Port[i].GuTimeStamp < GuTimeStamp &&
X pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
-
- GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp;
- *N = i;
+ GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp;
+ *pSelect = i;
X }
X }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_CHECK_SWITCH found Port %d going up.\n", *N))
-
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_CHECK_SWITCH found Port %d going up.\n", *pSelect))
X return (SK_TRUE);
X } /* SkRlmtSelectGoingUp */
X
@@ -2026,12 +1729,12 @@
X * SK_BOOL
X */
X RLMT_STATIC SK_BOOL SkRlmtSelectDown(
-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */
-SK_U32 A, /* active port */
-SK_U32 P, /* preferred port */
-SK_U32 *N, /* new active port */
-SK_BOOL AutoNegDone) /* successfully auto-negotiated? */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Active, /* Active port */
+SK_U32 PrefPort, /* Preferred port */
+SK_U32 *pSelect, /* New active port */
+SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */
X {
X SK_U32 i;
X SK_BOOL PortFound;
@@ -2039,30 +1742,24 @@
X PortFound = SK_FALSE;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 35'
echo 'File patch-2.2.20 is continued in part 36'
echo "36" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:28 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part29

#!/bin/sh -x
# this is part 29 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 29; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-#define PHY_B_IS_LST_CHANGE (1<<1) /* Bit 1: Link Status Changed */
-#define PHY_B_IS_CRC_ER (1<<0) /* Bit 0: CRC Error */
+#define PHY_B_IS_NO_HDCL (1<<9) /* Bit 9: No HCD Link */
+#define PHY_B_IS_NO_HDC (1<<8) /* Bit 8: No HCD */
+#define PHY_B_IS_NEG_USHDC (1<<7) /* Bit 7: Negotiated Unsup. HCD */
+#define PHY_B_IS_SCR_S_ER (1<<6) /* Bit 6: Scrambler Sync Error */
+#define PHY_B_IS_RRS_CHANGE (1<<5) /* Bit 5: Remote Rx Stat Change */
+#define PHY_B_IS_LRS_CHANGE (1<<4) /* Bit 4: Local Rx Stat Change */
+#define PHY_B_IS_DUP_CHANGE (1<<3) /* Bit 3: Duplex Mode Change */
+#define PHY_B_IS_LSP_CHANGE (1<<2) /* Bit 2: Link Speed Change */
+#define PHY_B_IS_LST_CHANGE (1<<1) /* Bit 1: Link Status Changed */
+#define PHY_B_IS_CRC_ER (1<<0) /* Bit 0: CRC Error */
X
X #define PHY_B_DEF_MSK (~(PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE))
X
-
X /*
X * Pause Bits (PHY_B_AN_ASP and PHY_B_AN_PC) encoding
X */
@@ -1000,7 +1004,7 @@
X #define PHY_L_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */
X #define PHY_L_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
X #define PHY_L_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */


- /* Bit 7..0: reserved */
+ /* Bit 7..0: reserved */
X

X /***** PHY_LONE_1000T_STAT 16 bit ro 1000Base-T Status Reg *****/
X #define PHY_L_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */
@@ -1009,7 +1013,7 @@
X #define PHY_L_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status*/
X #define PHY_L_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */
X #define PHY_L_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */


- /* Bit 9..8: reserved */
+ /* Bit 9..8: reserved */
X #define PHY_B_1000S_IEC (255<<0)/* Bit 7..0: Idle Error Count */
X

X /***** PHY_LONE_EXT_STAT 16 bit ro Extended Status Register *****/
@@ -1017,11 +1021,11 @@
X #define PHY_L_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */
X #define PHY_L_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */
X #define PHY_L_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */


- /* Bit 11..0: reserved */
+ /* Bit 11..0: reserved */
X

X /***** PHY_LONE_PORT_CFG 16 bit r/w Port Configuration Reg *****/
X #define PHY_L_PC_REP_MODE (1<<15) /* Bit 15: Repeater Mode */


- /* Bit 14: reserved */
+ /* Bit 14: reserved */

X #define PHY_L_PC_TX_DIS (1<<13) /* Bit 13: Tx output Disabled */
X #define PHY_L_PC_BY_SCR (1<<12) /* Bit 12: Bypass Scrambler */
X #define PHY_L_PC_BY_45 (1<<11) /* Bit 11: Bypass 4B5B-Decoder */
@@ -1044,7 +1048,7 @@
X #define PHY_L_QS_COL_STAT (1<<11) /* Bit 11: Collision */
X #define PHY_L_QS_L_STAT (1<<10) /* Bit 10: Link is up */
X #define PHY_L_QS_DUP_MOD (1<<9) /* Bit 9: Full/Half Duplex */
-#define PHY_L_QS_AN (1<<8) /* Bit 8: AutoNeg is On */
+#define PHY_L_QS_AN (1<<8) /* Bit 8: AutoNeg is On */
X #define PHY_L_QS_AN_C (1<<7) /* Bit 7: AN is Complete */
X #define PHY_L_QS_LLE (7<<4) /* Bit 6: Line Length Estim. */
X #define PHY_L_QS_PAUSE (1<<3) /* Bit 3: LP advertised Pause */
@@ -1054,24 +1058,24 @@
X
X /***** PHY_LONE_INT_ENAB 16 bit r/w Interrupt Enable Reg *****/
X /***** PHY_LONE_INT_STAT 16 bit ro Interrupt Status Reg *****/


- /* Bit 15..14: reserved */
+ /* Bit 15..14: reserved */

X #define PHY_L_IS_AN_F (1<<13) /* Bit 13: Autoneg fault */
- /* Bit 12: not described */
+ /* Bit 12: not described */
X #define PHY_L_IS_CROSS (1<<11) /* Bit 11: Crossover used */
X #define PHY_L_IS_POL (1<<10) /* Bit 10: Polarity correct. used*/
-#define PHY_L_IS_SS (1<<9) /* Bit 9: Smart Speed Downgrade*/
+#define PHY_L_IS_SS (1<<9) /* Bit 9: Smart Speed Downgrade*/
X #define PHY_L_IS_CFULL (1<<8) /* Bit 8: Counter Full */
X #define PHY_L_IS_AN_C (1<<7) /* Bit 7: AutoNeg Complete */
X #define PHY_L_IS_SPEED (1<<6) /* Bit 6: Speed Changed */
X #define PHY_L_IS_DUP (1<<5) /* Bit 5: Duplex Changed */
-#define PHY_L_IS_LS (1<<4) /* Bit 4: Link Status Changed */
+#define PHY_L_IS_LS (1<<4) /* Bit 4: Link Status Changed */
X #define PHY_L_IS_ISOL (1<<3) /* Bit 3: Isolate Occured */
X #define PHY_L_IS_MDINT (1<<2) /* Bit 2: (ro) STAT: MII Int Pending */
X #define PHY_L_IS_INTEN (1<<1) /* Bit 1: ENAB: Enable IRQs */
X #define PHY_L_IS_FORCE (1<<0) /* Bit 0: ENAB: Force Interrupt */
X
-#define PHY_L_DEF_MSK (PHY_L_IS_LS | PHY_L_IS_ISOL | \
- PHY_L_IS_INTEN) /* int. mask */
+/* int. mask */
+#define PHY_L_DEF_MSK (PHY_L_IS_LS | PHY_L_IS_ISOL | PHY_L_IS_INTEN)
X
X /***** PHY_LONE_LED_CFG 16 bit r/w LED Configuration Reg *****/
X #define PHY_L_LC_LEDC (3<<14) /* Bit 15..14: Col/Blink/On/Off */
@@ -1086,12 +1090,12 @@
X
X /***** PHY_LONE_PORT_CTRL 16 bit r/w Port Control Reg *****/
X #define PHY_L_PC_TX_TCLK (1<<15) /* Bit 15: Enable TX_TCLK */


- /* Bit 14: reserved */

+ /* Bit 14: reserved */

X #define PHY_L_PC_ALT_NP (1<<13) /* Bit 14: Alternate Next Page */
X #define PHY_L_PC_GMII_ALT (1<<12) /* Bit 13: Alternate GMII driver */


- /* Bit 11: reserved */
+ /* Bit 11: reserved */

X #define PHY_L_PC_TEN_CRS (1<<10) /* Bit 10: Extend CRS*/
- /* Bit 9..0: not described */
+ /* Bit 9..0: not described */
X
X /***** PHY_LONE_CIM 16 bit ro CIM Reg *****/
X #define PHY_L_CIM_ISOL (255<<8)/* Bit 15..8: Isolate Count */
@@ -1118,7 +1122,7 @@
X #define PHY_N_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
X #define PHY_N_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */
X #define PHY_N_1000C_APC (1<<7) /* Bit 7: Asymetric Pause Cap. */
- /* Bit 6..0: reserved */
+ /* Bit 6..0: reserved */
X
X /***** PHY_NAT_1000T_STAT 16 bit ro 1000Base-T Status Reg *****/
X #define PHY_N_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */
@@ -1128,7 +1132,7 @@
X #define PHY_N_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */
X #define PHY_N_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */
X #define PHY_N_1000C_LP_APC (1<<9) /* Bit 9: LP Asym. Pause Cap. */


- /* Bit 8: reserved */
+ /* Bit 8: reserved */

X #define PHY_N_1000S_IEC (255<<0)/* Bit 7..0: Idle Error Count */
X
X /***** PHY_NAT_EXT_STAT 16 bit ro Extended Status Register *****/
@@ -1136,7 +1140,7 @@
X #define PHY_N_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */
X #define PHY_N_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */
X #define PHY_N_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */


- /* Bit 11..0: reserved */
+ /* Bit 11..0: reserved */
X

X /* todo: those are still missing */
X /***** PHY_NAT_EXT_CTRL1 16 bit ro Extended Control Reg1 *****/
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skaddr.c linux/drivers/net/sk98lin/skaddr.c
--- v2.2.19/drivers/net/sk98lin/skaddr.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skaddr.c Wed Oct 10 01:41:02 2001


@@ -2,16 +2,15 @@
X *

X * Name: skaddr.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.34 $
- * Date: $Date: 1999/11/22 13:23:44 $
- * Purpose: Manage Addresses (Multicast and Unicast) and Promiscuous Mode
+ * Version: $Revision: 1.40 $
+ * Date: $Date: 2001/02/14 14:04:59 $
+ * Purpose: Manage Addresses (Multicast and Unicast) and Promiscuous Mode.


X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2001 SysKonnect GmbH.


X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,25 @@


X * History:
X *

X * $Log: skaddr.c,v $
+ * Revision 1.40 2001/02/14 14:04:59 rassmann
+ * Editorial changes.
+ *
+ * Revision 1.39 2001/01/30 10:30:04 rassmann
+ * Editorial changes.
+ *
+ * Revision 1.38 2001/01/25 16:26:52 rassmann
+ * Ensured that logical address overrides are done on net's active port.
+ *
+ * Revision 1.37 2001/01/22 13:41:34 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.36 2000/08/07 11:10:39 rassmann
+ * Editorial changes.
+ *
+ * Revision 1.35 2000/05/04 09:38:41 rassmann
+ * Editorial changes.
+ * Corrected multicast address hashing.
+ *
X * Revision 1.34 1999/11/22 13:23:44 cgoos


X * Changed license header to GPL.
X *

@@ -165,13 +183,13 @@


X
X #ifndef lint
X static const char SysKonnectFileId[] =

- "@(#) $Id: skaddr.c,v 1.34 1999/11/22 13:23:44 cgoos Exp $ (C) SysKonnect.";
+ "@(#) $Id: skaddr.c,v 1.40 2001/02/14 14:04:59 rassmann Exp $ (C) SysKonnect.";


X #endif /* !defined(lint) */
X

X #define __SKADDR_C
X
X #ifdef __cplusplus


-xxxx /* not supported yet - force error */

+#error C++ is not yet supported.
X extern "C" {
X #endif /* cplusplus */
X

@@ -180,19 +198,9 @@


X
X /* defines ********************************************************************/
X

-#define SK_ADDR_CHEAT YES /* Cheat. */
-
-/*
- * G32:
- * POLY equ 04C11DB6h ; CRC polynominal term
- * bit-reversed: 6DB88320
- */
X
X #define CRC32_POLY 0xEDB88320UL /* CRC32-Poly - XMAC: Little Endian */
-#if 0
-#define CRC32_POLY 0x6DB88320UL /* CRC32-Poly - XMAC: Little Endian */
-#endif /* 0 */
-#define HASH_BITS 6 /* #bits in hash */
+#define HASH_BITS 6 /* #bits in hash */
X #define SK_MC_BIT 0x01


X
X /* Error numbers and messages. */

@@ -220,13 +228,6 @@
X
X /* functions ******************************************************************/
X
-#if 0
-void SkAddrDummy(void)
-{
- SkAddrInit(NULL, NULL, 0);
-} /* SkAddrDummy */


-#endif /* 0 */
-

X /******************************************************************************
X *
X * SkAddrInit - initialize data, set state to init
@@ -237,7 +238,7 @@
X * ============
X *
X * This routine clears the multicast tables and resets promiscuous mode.
- * Some entries are reserved for the "logical board address", the
+ * Some entries are reserved for the "logical MAC address", the
X * SK-RLMT multicast address, and the BPDU multicast address.
X *
X *
@@ -264,12 +265,12 @@
X int SkAddrInit(
X SK_AC *pAC, /* the adapter context */
X SK_IOC IoC, /* I/O context */


-int Level) /* initialization level */

+int Level) /* initialization level */
X {
- int j;
- SK_U32 i;
- SK_U8 *InAddr;
- SK_U16 *OutAddr;
+ int j;
+ SK_U32 i;
+ SK_U8 *InAddr;
+ SK_U16 *OutAddr;
X SK_ADDR_PORT *pAPort;
X
X switch (Level) {
@@ -280,20 +281,15 @@
X pAPort = &pAC->Addr.Port[i];
X pAPort->PromMode = SK_PROM_MODE_NONE;
X
- pAPort->FirstExactMatchRlmt =
- SK_ADDR_FIRST_MATCH_RLMT;
- pAPort->FirstExactMatchDrv =
- SK_ADDR_FIRST_MATCH_DRV;
- pAPort->NextExactMatchRlmt =
- SK_ADDR_FIRST_MATCH_RLMT;
- pAPort->NextExactMatchDrv =
- SK_ADDR_FIRST_MATCH_DRV;
+ pAPort->FirstExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
+ pAPort->FirstExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
+ pAPort->NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
+ pAPort->NextExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
X
X #if 0
- /* Not here ... */
+ /* Don't do this here ... */
X
X /* Reset Promiscuous mode. */
-
X (void)SkAddrPromiscuousChange(
X pAC,
X IoC,
@@ -315,7 +311,9 @@


X break;
X
X case SK_INIT_IO:

- pAC->Addr.ActivePort = pAC->Rlmt.MacActive;


+ for (i = 0; i < SK_MAX_NETS; i++) {

+ pAC->Addr.Net[i].ActivePort = pAC->Rlmt.Net[i].ActivePort;
+ }
X
X #ifdef DEBUG
X for (i = 0; i < SK_MAX_MACS; i++) {
@@ -326,28 +324,35 @@


X }
X #endif /* DEBUG */
X

- /* Read permanent virtual address from Control Register File. */
-
+ /* Read permanent logical MAC address from Control Register File. */
X for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
- InAddr = (SK_U8 *)&pAC->Addr.PermanentMacAddress.a[j];
+ InAddr = (SK_U8 *)&pAC->Addr.Net[0].PermanentMacAddress.a[j];
X SK_IN8(IoC, B2_MAC_1 + j, InAddr);
X }
X
- if (!pAC->Addr.CurrentMacAddressSet) {
- /*
- * Set the current virtual MAC address
- * to the permanent one.
- */
-
- pAC->Addr.CurrentMacAddress =
- pAC->Addr.PermanentMacAddress;
- pAC->Addr.CurrentMacAddressSet = SK_TRUE;
+ if (!pAC->Addr.Net[0].CurrentMacAddressSet) {
+ /* Set the current logical MAC address to the permanent one. */
+ pAC->Addr.Net[0].CurrentMacAddress =
+ pAC->Addr.Net[0].PermanentMacAddress;
+ pAC->Addr.Net[0].CurrentMacAddressSet = SK_TRUE;
+ }
+
+ /* Set the current logical MAC address. */
+ pAC->Addr.Port[pAC->Addr.Net[0].ActivePort].Exact[0] =
+ pAC->Addr.Net[0].CurrentMacAddress;
+
+#if SK_MAX_NETS > 1
+ /* Set logical MAC address for net 2 to (log | 3). */
+ if (!pAC->Addr.Net[1].CurrentMacAddressSet) {
+ pAC->Addr.Net[1].PermanentMacAddress =
+ pAC->Addr.Net[0].PermanentMacAddress;
+ pAC->Addr.Net[1].PermanentMacAddress.a[5] |= 3;
+ /* Set the current logical MAC address to the permanent one. */
+ pAC->Addr.Net[1].CurrentMacAddress =
+ pAC->Addr.Net[1].PermanentMacAddress;
+ pAC->Addr.Net[1].CurrentMacAddressSet = SK_TRUE;
X }
-
- /* Set the current virtual MAC address. */
-
- pAC->Addr.Port[pAC->Addr.ActivePort].Exact[0] =
- pAC->Addr.CurrentMacAddress;


+#endif /* SK_MAX_NETS > 1 */
X

X #ifdef xDEBUG
X SK_DBG_MSG(
@@ -355,27 +360,27 @@
X SK_DBGMOD_ADDR,
X SK_DBGCAT_INIT,
X ("Permanent MAC Address: %02X %02X %02X %02X %02X %02X\n",
- pAC->Addr.PermanentMacAddress.a[0],
- pAC->Addr.PermanentMacAddress.a[1],
- pAC->Addr.PermanentMacAddress.a[2],
- pAC->Addr.PermanentMacAddress.a[3],
- pAC->Addr.PermanentMacAddress.a[4],
- pAC->Addr.PermanentMacAddress.a[5]))
+ pAC->Addr.PermanentMacAddress.a[0],
+ pAC->Addr.PermanentMacAddress.a[1],
+ pAC->Addr.PermanentMacAddress.a[2],
+ pAC->Addr.PermanentMacAddress.a[3],
+ pAC->Addr.PermanentMacAddress.a[4],
+ pAC->Addr.PermanentMacAddress.a[5]))
X SK_DBG_MSG(
X pAC,
X SK_DBGMOD_ADDR,
X SK_DBGCAT_INIT,
- ("Virtual MAC Address: %02X %02X %02X %02X %02X %02X\n",
- pAC->Addr.CurrentMacAddress.a[0],
- pAC->Addr.CurrentMacAddress.a[1],
- pAC->Addr.CurrentMacAddress.a[2],
- pAC->Addr.CurrentMacAddress.a[3],
- pAC->Addr.CurrentMacAddress.a[4],
- pAC->Addr.CurrentMacAddress.a[5]))
+ ("Logical MAC Address: %02X %02X %02X %02X %02X %02X\n",
+ pAC->Addr.CurrentMacAddress.a[0],
+ pAC->Addr.CurrentMacAddress.a[1],
+ pAC->Addr.CurrentMacAddress.a[2],
+ pAC->Addr.CurrentMacAddress.a[3],
+ pAC->Addr.CurrentMacAddress.a[4],
+ pAC->Addr.CurrentMacAddress.a[5]))


X #endif /* DEBUG */
X

X #if 0
- /* Not here ... */
+ /* Don't do this here ... */
X
X (void)SkAddrMcUpdate(pAC, IoC, pAC->Addr.ActivePort);


X #endif /* 0 */

@@ -383,33 +388,23 @@
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
X pAPort = &pAC->Addr.Port[i];
X
- /*
- * Read permanent port addresses from
- * Control Register File.
- */
-
+ /* Read permanent port addresses from Control Register File. */
X for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
- InAddr = (SK_U8 *)
- &pAPort->PermanentMacAddress.a[j];
+ InAddr = (SK_U8 *)&pAPort->PermanentMacAddress.a[j];
X SK_IN8(IoC, B2_MAC_2 + 8 * i + j, InAddr);
X }
X
X if (!pAPort->CurrentMacAddressSet) {
X /*
- * Set the current and previous physical
- * MAC address of this port to its permanent
- * MAC address.
+ * Set the current and previous physical MAC address
+ * of this port to its permanent MAC address.
X */
-
- pAPort->CurrentMacAddress =
- pAPort->PermanentMacAddress;
- pAPort->PreviousMacAddress =
- pAPort->PermanentMacAddress;
+ pAPort->CurrentMacAddress = pAPort->PermanentMacAddress;
+ pAPort->PreviousMacAddress = pAPort->PermanentMacAddress;
X pAPort->CurrentMacAddressSet = SK_TRUE;
X }
X
X /* Set port's current MAC addresses. */
-
X OutAddr = (SK_U16 *)&pAPort->CurrentMacAddress.a[0];
X XM_OUTADDR(IoC, i, XM_SA, OutAddr);


X
@@ -484,45 +479,42 @@

X int SkAddrMcClear(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx, /* Index of affected port */
-int Flags) /* permanent/non-perm, sw-only */
+SK_U32 PortNumber, /* Index of affected port */
+int Flags) /* permanent/non-perm, sw-only */


X {
X int i;
X

- if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
X if (Flags & SK_ADDR_PERMANENT) {
X
X /* Clear RLMT multicast addresses. */
-
- pAC->Addr.Port[PortIdx].NextExactMatchRlmt =
- SK_ADDR_FIRST_MATCH_RLMT;
+ pAC->Addr.Port[PortNumber].NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
X }
X else { /* not permanent => DRV */
X
X /* Clear InexactFilter. */
X
X for (i = 0; i < 8; i++) {
- pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i] = 0;
+ pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0;
X }
X
X /* Clear DRV multicast addresses. */
X
- pAC->Addr.Port[PortIdx].NextExactMatchDrv =
- SK_ADDR_FIRST_MATCH_DRV;
+ pAC->Addr.Port[PortNumber].NextExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
X }
X
X if (!(Flags & SK_MC_SW_ONLY)) {
- (void)SkAddrMcUpdate(pAC, IoC, PortIdx);
+ (void)SkAddrMcUpdate(pAC, IoC, PortNumber);
X }
X
X return (SK_ADDR_SUCCESS);
X } /* SkAddrMcClear */
X
X #ifndef SK_ADDR_CHEAT
-// RA;:;:


+
X /******************************************************************************
X *

X * SkCrc32McHash - hash multicast address
@@ -549,15 +541,13 @@
X
X Crc = 0xFFFFFFFFUL;
X for (Idx = 0; Idx < SK_MAC_ADDR_LEN; Idx++) {
- Data = *pMc++;
+ Data = *pMc++;
X for (Bit = 0; Bit < 8; Bit++, Data >>= 1) {
- Crc = (Crc >> 1) ^
- (((Crc ^ Data) & 1) ? CRC32_POLY : 0);
+ Crc = (Crc >> 1) ^ (((Crc ^ Data) & 1) ? CRC32_POLY : 0);
X }
X }
X
X return (Crc & ((1 << HASH_BITS) - 1));
-
X } /* SkCrc32McHash */
X
X #endif /* not SK_ADDR_CHEAT */
@@ -592,9 +582,9 @@
X int SkAddrMcAdd(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx, /* Port Index */
+SK_U32 PortNumber, /* Port Number */
X SK_MAC_ADDR *pMc, /* multicast address to be added */
-int Flags) /* permanent/non-permanent */
+int Flags) /* permanent/non-permanent */
X {
X int i;
X SK_U8 Inexact;
@@ -602,98 +592,87 @@
X unsigned HashBit;
X #endif /* !defined(SK_ADDR_CHEAT) */
X
- if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
X if (Flags & SK_ADDR_PERMANENT) {
X #ifdef DEBUG
- if (pAC->Addr.Port[PortIdx].NextExactMatchRlmt <
+ if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt <
X SK_ADDR_FIRST_MATCH_RLMT) {
- Next0[PortIdx] |= 1;
+ Next0[PortNumber] |= 1;
X return (SK_MC_RLMT_OVERFLOW);


X }
X #endif /* DEBUG */
X

- if (pAC->Addr.Port[PortIdx].NextExactMatchRlmt >
+ if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt >
X SK_ADDR_LAST_MATCH_RLMT) {
X return (SK_MC_RLMT_OVERFLOW);
X }
X
X /* Set an RLMT multicast address. */
X
- pAC->Addr.Port[PortIdx].Exact[
- pAC->Addr.Port[PortIdx].NextExactMatchRlmt++] = *pMc;
+ pAC->Addr.Port[PortNumber].Exact[
+ pAC->Addr.Port[PortNumber].NextExactMatchRlmt++] = *pMc;
X
X return (SK_MC_FILTERING_EXACT);
X }
X
+#if 0
X /* Not PERMANENT => DRV */
-
- if (PortIdx != pAC->Addr.ActivePort) {
-
+ if (PortNumber != pAC->Addr.ActivePort) {
X /* Only RLMT is allowed to do this. */
-
X return (SK_MC_ILLEGAL_PORT);
X }


+#endif /* 0 */
X

X #ifdef DEBUG
- if (pAC->Addr.Port[PortIdx].NextExactMatchDrv <
+ if (pAC->Addr.Port[PortNumber].NextExactMatchDrv <
X SK_ADDR_FIRST_MATCH_DRV) {
- Next0[PortIdx] |= 2;
+ Next0[PortNumber] |= 2;
X return (SK_MC_RLMT_OVERFLOW);


X }
X #endif /* DEBUG */
X

- if (pAC->Addr.Port[PortIdx].NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
+ if (pAC->Addr.Port[PortNumber].NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
X
X /* Set exact match entry. */
-
- pAC->Addr.Port[PortIdx].Exact[
- pAC->Addr.Port[PortIdx].NextExactMatchDrv++] = *pMc;
+ pAC->Addr.Port[PortNumber].Exact[
+ pAC->Addr.Port[PortNumber].NextExactMatchDrv++] = *pMc;
X
X /* Clear InexactFilter. */


-
X for (i = 0; i < 8; i++) {

- pAC->Addr.Port[PortIdx
- ].InexactFilter.Bytes[i] = 0;
+ pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0;
X }
X }
X else {
X if (!(pMc->a[0] & SK_MC_BIT)) {
-
X /*
X * Hashing only possible with
X * multicast addresses.
X */
-
X return (SK_MC_ILLEGAL_ADDRESS);
X }
X #ifndef SK_ADDR_CHEAT
X /* Compute hash value of address. */
-RA;:;: untested
- HashBit = SkCrc32McHash(&pMc->a[0]);
+ HashBit = 63 - SkCrc32McHash(&pMc->a[0]);
X
X /* Add bit to InexactFilter. */
-
- pAC->Addr.Port[PortIdx].InexactFilter.Bytes[HashBit / 8] |=
+ pAC->Addr.Port[PortNumber].InexactFilter.Bytes[HashBit / 8] |=
X 1 << (HashBit % 8);
-
X #else /* SK_ADDR_CHEAT */
-
X /* Set all bits in InexactFilter. */


-
X for (i = 0; i < 8; i++) {

- pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i] = 0xFF;
+ pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0xFF;
X }
X #endif /* SK_ADDR_CHEAT */
X }
X
X for (Inexact = 0, i = 0; i < 8; i++) {
- Inexact |= pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i];
+ Inexact |= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
X }
X
- if (Inexact == 0 && pAC->Addr.Port[PortIdx].PromMode == 0) {
+ if (Inexact == 0 && pAC->Addr.Port[PortNumber].PromMode == 0) {
X return (SK_MC_FILTERING_EXACT);
X }
X else {
@@ -726,15 +705,15 @@
X int SkAddrMcUpdate(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx) /* Port Index */
+SK_U32 PortNumber) /* Port Number */
X {
- SK_U32 i;
- SK_U8 Inexact;
- SK_U16 *OutAddr;
- SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Reg. */
+ SK_U32 i;
+ SK_U8 Inexact;
+ SK_U16 *OutAddr;
+ SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Reg. */
X SK_ADDR_PORT *pAPort;
X
- if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
@@ -742,129 +721,102 @@
X pAC,
X SK_DBGMOD_ADDR,
X SK_DBGCAT_CTRL,
- ("SkAddrMcUpdate on Port %u.\n", PortIdx))
+ ("SkAddrMcUpdate on Port %u.\n", PortNumber))
X

- pAPort = &pAC->Addr.Port[PortIdx];

+ pAPort = &pAC->Addr.Port[PortNumber];

X
X #ifdef DEBUG
X SK_DBG_MSG(
X pAC,
X SK_DBGMOD_ADDR,
X SK_DBGCAT_CTRL,
- ("Next0 on Port %d: %d\n", PortIdx, Next0[PortIdx]))
+ ("Next0 on Port %d: %d\n", PortNumber, Next0[PortNumber]))


X #endif /* DEBUG */
X

- for (i = 0; /* Also program the virtual address. */
- i < pAPort->NextExactMatchRlmt;
- i++) {
-
+ /* Start with 0 to also program the logical MAC address. */
+ for (i = 0; i < pAPort->NextExactMatchRlmt; i++) {
X /* Set exact match address i on HW. */
-
X OutAddr = (SK_U16 *)&pAPort->Exact[i].a[0];
- XM_OUTADDR(IoC, PortIdx, XM_EXM(i), OutAddr);
+ XM_OUTADDR(IoC, PortNumber, XM_EXM(i), OutAddr);
X }
X
X /* Clear other permanent exact match addresses on HW. */
-
X if (pAPort->NextExactMatchRlmt <= SK_ADDR_LAST_MATCH_RLMT) {
X SkXmClrExactAddr(
X pAC,
X IoC,
- PortIdx,
+ PortNumber,
X pAPort->NextExactMatchRlmt,
X SK_ADDR_LAST_MATCH_RLMT);
X }
X
- for (i = pAPort->FirstExactMatchDrv;
- i < pAPort->NextExactMatchDrv;
- i++) {
-
+ for (i = pAPort->FirstExactMatchDrv; i < pAPort->NextExactMatchDrv; i++) {
X OutAddr = (SK_U16 *)&pAPort->Exact[i].a[0];
- XM_OUTADDR(IoC, PortIdx, XM_EXM(i), OutAddr);
-
+ XM_OUTADDR(IoC, PortNumber, XM_EXM(i), OutAddr);
X }
X
X /* Clear other non-permanent exact match addresses on HW. */
-
X if (pAPort->NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
X SkXmClrExactAddr(
X pAC,
X IoC,
- PortIdx,
+ PortNumber,
X pAPort->NextExactMatchDrv,
X SK_ADDR_LAST_MATCH_DRV);
X }
X
- for (Inexact = 0xFF, i = 0; i < 8; i++) {
- Inexact &= pAPort->InexactFilter.Bytes[i];
+ for (Inexact = 0, i = 0; i < 8; i++) {
+ Inexact |= pAPort->InexactFilter.Bytes[i];
X }
- if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
X
+ if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
X /* Set all bits in 64-bit hash register. */
-
- XM_OUTHASH(IoC, PortIdx, XM_HSM, &OnesHash);
+ XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash);
X
X /* Set bit 15 in mode register. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X LoMode |= XM_MD_ENA_HSH;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
- else if (Inexact != 0xFF) {
-
- /* Clear bit 15 in mode register. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
- LoMode &= ~XM_MD_ENA_HSH;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
- }
- else {
+ else if (Inexact != 0) {
X /* Set 64-bit hash register to InexactFilter. */
-
- XM_OUTHASH(
- IoC,
- PortIdx,
- XM_HSM,
- &pAPort->InexactFilter.Bytes[0]);
+ XM_OUTHASH(IoC, PortNumber, XM_HSM, &pAPort->InexactFilter.Bytes[0]);
X
X /* Set bit 15 in mode register. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X LoMode |= XM_MD_ENA_HSH;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
+ }
+ else {
+ /* Clear bit 15 in mode register. */
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
+ LoMode &= ~XM_MD_ENA_HSH;
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
X
X if (pAPort->PromMode != SK_PROM_MODE_NONE) {
- (void)SkAddrPromiscuousChange(


- pAC,
- IoC,
- PortIdx,

- pAPort->PromMode);
+ (void)SkAddrPromiscuousChange(pAC, IoC, PortNumber, pAPort->PromMode);
X }
X
X /* Set port's current MAC address. */
-
X OutAddr = (SK_U16 *)&pAPort->CurrentMacAddress.a[0];
- XM_OUTADDR(IoC, PortIdx, XM_SA, OutAddr);
+ XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr);
X
-#ifdef DEBUG
- for (i = 0; /* Also program the virtual address. */
- i < pAPort->NextExactMatchRlmt;
- i++) {
+#ifdef xDEBUG
+ for (i = 0; i < pAPort->NextExactMatchRlmt; i++) {
X SK_U8 InAddr8[6];
X SK_U16 *InAddr;
X
- /* Get exact match address i from port PortIdx. */
-
+ /* Get exact match address i from port PortNumber. */
X InAddr = (SK_U16 *)&InAddr8[0];
- XM_INADDR(IoC, PortIdx, XM_EXM(i), InAddr);
+ XM_INADDR(IoC, PortNumber, XM_EXM(i), InAddr);
X SK_DBG_MSG(
X pAC,
- SK_DBGMOD_RLMT,
+ SK_DBGMOD_ADDR,
X SK_DBGCAT_CTRL,
X ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n",
X i,
- PortIdx,
+ PortNumber,
X InAddr8[0],
X InAddr8[1],
X InAddr8[2],
@@ -881,10 +833,6 @@


X #endif /* DEBUG */
X

X /* Determine return value. */
-
- for (Inexact = 0, i = 0; i < 8; i++) {
- Inexact |= pAPort->InexactFilter.Bytes[i];
- }
X if (Inexact == 0 && pAPort->PromMode == 0) {
X return (SK_MC_FILTERING_EXACT);
X }
@@ -914,52 +862,70 @@
X int SkAddrOverride(
X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* I/O context */
-SK_U32 PortIdx, /* Port Index */
+SK_U32 PortNumber, /* Port Number */
X SK_MAC_ADDR *pNewAddr, /* new MAC address */
-int Flags) /* logical/physical address */
+int Flags) /* logical/physical MAC address */
X {
+ SK_EVPARA Para;
+ SK_U32 NetNumber;
X SK_U32 i;
X SK_U16 *OutAddr;
- SK_EVPARA Para;
-#if 0
- SK_MAC_ADDR NewAddr; /* new MAC address */
- SK_U8 AddrBits;


-#endif /* 0 */
X

- if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ NetNumber = pAC->Rlmt.Port[PortNumber].Net->NetNumber;
+
+ if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
- if (pNewAddr->a[0] & SK_MC_BIT) {
+ if (pNewAddr != NULL && (pNewAddr->a[0] & SK_MC_BIT) != 0) {
X return (SK_ADDR_MULTICAST_ADDRESS);
X }
X
-#if 0
-DANGEROUS!
- if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical address. */
- if (!pAC->Addr.Port[PortIdx].CurrentMacAddressSet) {
- pAC->Addr.Port[PortIdx].PreviousMacAddress = *pNewAddr;
- pAC->Addr.Port[PortIdx].CurrentMacAddress = *pNewAddr;
- pAC->Addr.Port[PortIdx].CurrentMacAddressSet = SK_TRUE;
- return (SK_ADDR_SUCCESS);
- }
+ if (!pAC->Addr.Net[NetNumber].CurrentMacAddressSet) {
+ return (SK_ADDR_TOO_EARLY);
X }
- else {
- if (!pAC->Addr.CurrentMacAddressSet) {
- pAC->Addr.CurrentMacAddress = *pNewAddr;
- pAC->Addr.CurrentMacAddressSet = SK_TRUE;
- return (SK_ADDR_SUCCESS);
+
+ if (Flags & SK_ADDR_SET_LOGICAL) { /* Activate logical MAC address. */
+ /* Parameter *pNewAddr is ignored. */
+ for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
+ if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
+ return (SK_ADDR_TOO_EARLY);
+ }
X }
- }
-DANGEROUS!
-#endif /* 0 */
X
- if (!pAC->Addr.CurrentMacAddressSet) {
- return (SK_ADDR_TOO_EARLY);
+ /* Set PortNumber to number of net's active port. */
+ PortNumber = pAC->Rlmt.Net[NetNumber].
+ Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
+
+ pAC->Addr.Port[PortNumber].Exact[0] =
+ pAC->Addr.Net[NetNumber].CurrentMacAddress;
+
+ /* Write address to first exact match entry of active port. */
+ (void)SkAddrMcUpdate(pAC, IoC, PortNumber);
X }
+ else if (Flags & SK_ADDR_CLEAR_LOGICAL) {
+ /* Deactivate logical MAC address. */
+ /* Parameter *pNewAddr is ignored. */
+ for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
+ if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
+ return (SK_ADDR_TOO_EARLY);
+ }
+ }
X
- if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical address. */
- if (SK_ADDR_EQUAL(pNewAddr->a, pAC->Addr.CurrentMacAddress.a)) {
+ /* Set PortNumber to number of net's active port. */
+ PortNumber = pAC->Rlmt.Net[NetNumber].
+ Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
+
+ for (i = 0; i < SK_MAC_ADDR_LEN; i++ ) {
+ pAC->Addr.Port[PortNumber].Exact[0].a[i] = 0;
+ }
+
+ /* Write address to first exact match entry of active port. */
+ (void)SkAddrMcUpdate(pAC, IoC, PortNumber);
+ }
+ else if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical MAC address. */
+ if (SK_ADDR_EQUAL(pNewAddr->a,
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) {
X return (SK_ADDR_DUPLICATE_ADDRESS);
X }
X
@@ -968,10 +934,9 @@
X return (SK_ADDR_TOO_EARLY);
X }
X
- if (SK_ADDR_EQUAL(
- pNewAddr->a,
+ if (SK_ADDR_EQUAL(pNewAddr->a,
X pAC->Addr.Port[i].CurrentMacAddress.a)) {
- if (i == PortIdx) {
+ if (i == PortNumber) {
X return (SK_ADDR_SUCCESS);
X }
X else {
@@ -980,22 +945,22 @@
X }
X }
X
- pAC->Addr.Port[PortIdx].PreviousMacAddress =
- pAC->Addr.Port[PortIdx].CurrentMacAddress;
- pAC->Addr.Port[PortIdx].CurrentMacAddress = *pNewAddr;
+ pAC->Addr.Port[PortNumber].PreviousMacAddress =
+ pAC->Addr.Port[PortNumber].CurrentMacAddress;
+ pAC->Addr.Port[PortNumber].CurrentMacAddress = *pNewAddr;
X
X /* Change port's address. */
-
X OutAddr = (SK_U16 *)pNewAddr;
- XM_OUTADDR(IoC, PortIdx, XM_SA, OutAddr);
+ XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr);
X
X /* Report address change to RLMT. */


-
- Para.Para32[0] = PortIdx;

+ Para.Para32[0] = PortNumber;

+ Para.Para32[0] = -1;
X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_PORT_ADDR, Para);
X }
- else { /* Logical Address. */
- if (SK_ADDR_EQUAL(pNewAddr->a, pAC->Addr.CurrentMacAddress.a)) {
+ else { /* Logical MAC address. */
+ if (SK_ADDR_EQUAL(pNewAddr->a,
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) {
X return (SK_ADDR_SUCCESS);
X }
X
@@ -1004,15 +969,18 @@
X return (SK_ADDR_TOO_EARLY);
X }
X
- if (SK_ADDR_EQUAL(
- pNewAddr->a,
+ if (SK_ADDR_EQUAL(pNewAddr->a,
X pAC->Addr.Port[i].CurrentMacAddress.a)) {
X return (SK_ADDR_DUPLICATE_ADDRESS);
X }
X }
X
- pAC->Addr.CurrentMacAddress = *pNewAddr;
- pAC->Addr.Port[PortIdx].Exact[0] = *pNewAddr;
+ /* Set PortNumber to number of net's active port. */
+ PortNumber = pAC->Rlmt.Net[NetNumber].
+ Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
+
+ pAC->Addr.Net[NetNumber].CurrentMacAddress = *pNewAddr;
+ pAC->Addr.Port[PortNumber].Exact[0] = *pNewAddr;
X
X #ifdef DEBUG
X SK_DBG_MSG(
@@ -1020,28 +988,27 @@
X SK_DBGMOD_ADDR,
X SK_DBGCAT_CTRL,
X ("Permanent MAC Address: %02X %02X %02X %02X %02X %02X\n",
- pAC->Addr.PermanentMacAddress.a[0],
- pAC->Addr.PermanentMacAddress.a[1],
- pAC->Addr.PermanentMacAddress.a[2],
- pAC->Addr.PermanentMacAddress.a[3],
- pAC->Addr.PermanentMacAddress.a[4],
- pAC->Addr.PermanentMacAddress.a[5]))
+ pAC->Addr.Net[NetNumber].PermanentMacAddress.a[0],
+ pAC->Addr.Net[NetNumber].PermanentMacAddress.a[1],
+ pAC->Addr.Net[NetNumber].PermanentMacAddress.a[2],
+ pAC->Addr.Net[NetNumber].PermanentMacAddress.a[3],
+ pAC->Addr.Net[NetNumber].PermanentMacAddress.a[4],
+ pAC->Addr.Net[NetNumber].PermanentMacAddress.a[5]))
X SK_DBG_MSG(
X pAC,
X SK_DBGMOD_ADDR,
X SK_DBGCAT_CTRL,
- ("New Virtual MAC Address: %02X %02X %02X %02X %02X %02X\n",
- pAC->Addr.CurrentMacAddress.a[0],
- pAC->Addr.CurrentMacAddress.a[1],
- pAC->Addr.CurrentMacAddress.a[2],
- pAC->Addr.CurrentMacAddress.a[3],
- pAC->Addr.CurrentMacAddress.a[4],
- pAC->Addr.CurrentMacAddress.a[5]))
+ ("New logical MAC Address: %02X %02X %02X %02X %02X %02X\n",
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a[0],
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a[1],
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a[2],
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a[3],
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a[4],
+ pAC->Addr.Net[NetNumber].CurrentMacAddress.a[5]))


X #endif /* DEBUG */
X

X /* Write address to first exact match entry of active port. */
-
- (void)SkAddrMcUpdate(pAC, IoC, PortIdx);
+ (void)SkAddrMcUpdate(pAC, IoC, PortNumber);
X }
X
X return (SK_ADDR_SUCCESS);
@@ -1067,48 +1034,44 @@
X * SK_ADDR_ILLEGAL_PORT
X */
X int SkAddrPromiscuousChange(


-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */

-SK_U32 PortIdx, /* port whose promiscuous mode changes */
-int NewPromMode) /* new promiscuous mode */
+SK_AC *pAC, /* adapter context */
+SK_IOC IoC, /* I/O context */
+SK_U32 PortNumber, /* port whose promiscuous mode changes */
+int NewPromMode) /* new promiscuous mode */
X {
- int i;
+ int i;
X SK_BOOL InexactModeBit;
X SK_U8 Inexact;
X SK_U8 HwInexact;
X SK_FILTER64 HwInexactFilter;
X SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Register. */
- int CurPromMode = SK_PROM_MODE_NONE;
+ int CurPromMode = SK_PROM_MODE_NONE;
X
- if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
X /* Read CurPromMode from Hardware. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X
X if (LoMode & XM_MD_ENA_PROM) {
X CurPromMode |= SK_PROM_MODE_LLC;
X }
X
X for (Inexact = 0xFF, i = 0; i < 8; i++) {
- Inexact &= pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i];
+ Inexact &= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
X }
X if (Inexact == 0xFF) {
- CurPromMode |= (pAC->Addr.Port[PortIdx].PromMode &
- SK_PROM_MODE_ALL_MC);
+ CurPromMode |= (pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_ALL_MC);
X }
X else {
X /* Read InexactModeBit (bit 15 in mode register). */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
-
- InexactModeBit = (LoMode & XM_MD_ENA_HSH) != 0;
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
+
+ InexactModeBit = (LoMode & XM_MD_ENA_HSH) != 0;
X
X /* Read 64-bit hash register from HW. */
-
- XM_INHASH(IoC, PortIdx, XM_HSM, &HwInexactFilter.Bytes[0]);
+ XM_INHASH(IoC, PortNumber, XM_HSM, &HwInexactFilter.Bytes[0]);
X
X for (HwInexact = 0xFF, i = 0; i < 8; i++) {
X HwInexact &= HwInexactFilter.Bytes[i];
@@ -1119,7 +1082,7 @@
X }
X }
X
- pAC->Addr.Port[PortIdx].PromMode = NewPromMode;
+ pAC->Addr.Port[PortNumber].PromMode = NewPromMode;
X
X if (NewPromMode == CurPromMode) {
X return (SK_ADDR_SUCCESS);
@@ -1127,76 +1090,65 @@
X
X if ((NewPromMode & SK_PROM_MODE_ALL_MC) &&
X !(CurPromMode & SK_PROM_MODE_ALL_MC)) { /* All MC. */
-
X /* Set all bits in 64-bit hash register. */
-
- XM_OUTHASH(IoC, PortIdx, XM_HSM, &OnesHash);
+ XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash);
X
X /* Set bit 15 in mode register. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X LoMode |= XM_MD_ENA_HSH;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
X else if ((CurPromMode & SK_PROM_MODE_ALL_MC) &&
X !(NewPromMode & SK_PROM_MODE_ALL_MC)) { /* Norm MC. */
-
X for (Inexact = 0, i = 0; i < 8; i++) {
- Inexact |=
- pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i];
+ Inexact |= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
X }
X if (Inexact == 0) {
X /* Clear bit 15 in mode register. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X LoMode &= ~XM_MD_ENA_HSH;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
X else {
X /* Set 64-bit hash register to InexactFilter. */
-
X XM_OUTHASH(
X IoC,
- PortIdx,
+ PortNumber,
X XM_HSM,
- &pAC->Addr.Port[PortIdx
- ].InexactFilter.Bytes[0]);
+ &pAC->Addr.Port[PortNumber].InexactFilter.Bytes[0]);
X
X /* Set bit 15 in mode register. */
-
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X LoMode |= XM_MD_ENA_HSH;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
X }
X
X if ((NewPromMode & SK_PROM_MODE_LLC) &&
X !(CurPromMode & SK_PROM_MODE_LLC)) { /* Prom. LLC */
-
X /* Set promiscuous bit in mode register. */
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
X #if 0
X /* Receive MAC frames. */
-
X LoMode |= XM_MD_RX_MCTRL;


X #endif /* 0 */

+
X LoMode |= XM_MD_ENA_PROM;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
X else if ((CurPromMode & SK_PROM_MODE_LLC) &&
X !(NewPromMode & SK_PROM_MODE_LLC)) { /* Norm. LLC. */
-
X /* Clear promiscuous bit in mode register. */
+ XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
X
- XM_IN16(IoC, PortIdx, XM_MODE, &LoMode);
X #if 0
X /* Don't receive MAC frames. */
-
X LoMode &= ~XM_MD_RX_MCTRL;


X #endif /* 0 */

+
X LoMode &= ~XM_MD_ENA_PROM;
- XM_OUT16(IoC, PortIdx, XM_MODE, LoMode);
+ XM_OUT16(IoC, PortNumber, XM_MODE, LoMode);
X }
X
X return (SK_ADDR_SUCCESS);
@@ -1219,21 +1171,25 @@
X * SK_ADDR_ILLEGAL_PORT
X */
X int SkAddrSwap(


-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */

-SK_U32 FromPortIdx, /* Port1 Index */
-SK_U32 ToPortIdx) /* Port2 Index */
+SK_AC *pAC, /* adapter context */
+SK_IOC IoC, /* I/O context */
+SK_U32 FromPortNumber, /* Port1 Index */
+SK_U32 ToPortNumber) /* Port2 Index */
X {
- int i;
+ int i;
X SK_U8 Byte;
X SK_MAC_ADDR MacAddr;
X SK_U32 DWord;
X
- if (FromPortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ if (FromPortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
+ return (SK_ADDR_ILLEGAL_PORT);
+ }
+
+ if (ToPortNumber >= (SK_U32)pAC->GIni.GIMacsFound) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
- if (ToPortIdx >= (SK_U32)pAC->GIni.GIMacsFound) {
+ if (pAC->Rlmt.Port[FromPortNumber].Net != pAC->Rlmt.Port[ToPortNumber].Net) {
X return (SK_ADDR_ILLEGAL_PORT);
X }
X
@@ -1250,48 +1206,56 @@
X */
X
X for (i = 0; i < SK_ADDR_EXACT_MATCHES; i++) {
- MacAddr = pAC->Addr.Port[FromPortIdx].Exact[i];
- pAC->Addr.Port[FromPortIdx].Exact[i] =
- pAC->Addr.Port[ToPortIdx].Exact[i];
- pAC->Addr.Port[ToPortIdx].Exact[i] = MacAddr;
+ MacAddr = pAC->Addr.Port[FromPortNumber].Exact[i];
+ pAC->Addr.Port[FromPortNumber].Exact[i] =
+ pAC->Addr.Port[ToPortNumber].Exact[i];
+ pAC->Addr.Port[ToPortNumber].Exact[i] = MacAddr;
X }
X
X for (i = 0; i < 8; i++) {
- Byte = pAC->Addr.Port[FromPortIdx].InexactFilter.Bytes[i];
- pAC->Addr.Port[FromPortIdx].InexactFilter.Bytes[i] =
- pAC->Addr.Port[ToPortIdx].InexactFilter.Bytes[i];
- pAC->Addr.Port[ToPortIdx].InexactFilter.Bytes[i] = Byte;
- }
-
- i = pAC->Addr.Port[FromPortIdx].PromMode;
- pAC->Addr.Port[FromPortIdx].PromMode =
- pAC->Addr.Port[ToPortIdx].PromMode;
- pAC->Addr.Port[ToPortIdx].PromMode = i;
-
- DWord = pAC->Addr.Port[FromPortIdx].FirstExactMatchRlmt;
- pAC->Addr.Port[FromPortIdx].FirstExactMatchRlmt =
- pAC->Addr.Port[ToPortIdx].FirstExactMatchRlmt;
- pAC->Addr.Port[ToPortIdx].FirstExactMatchRlmt = DWord;
-
- DWord = pAC->Addr.Port[FromPortIdx].NextExactMatchRlmt;
- pAC->Addr.Port[FromPortIdx].NextExactMatchRlmt =
- pAC->Addr.Port[ToPortIdx].NextExactMatchRlmt;
- pAC->Addr.Port[ToPortIdx].NextExactMatchRlmt = DWord;
-
- DWord = pAC->Addr.Port[FromPortIdx].FirstExactMatchDrv;
- pAC->Addr.Port[FromPortIdx].FirstExactMatchDrv =
- pAC->Addr.Port[ToPortIdx].FirstExactMatchDrv;
- pAC->Addr.Port[ToPortIdx].FirstExactMatchDrv = DWord;
-
- DWord = pAC->Addr.Port[FromPortIdx].NextExactMatchDrv;
- pAC->Addr.Port[FromPortIdx].NextExactMatchDrv =
- pAC->Addr.Port[ToPortIdx].NextExactMatchDrv;
- pAC->Addr.Port[ToPortIdx].NextExactMatchDrv = DWord;
+ Byte = pAC->Addr.Port[FromPortNumber].InexactFilter.Bytes[i];
+ pAC->Addr.Port[FromPortNumber].InexactFilter.Bytes[i] =
+ pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i];
+ pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i] = Byte;
+ }
+
+ i = pAC->Addr.Port[FromPortNumber].PromMode;
+ pAC->Addr.Port[FromPortNumber].PromMode = pAC->Addr.Port[ToPortNumber].PromMode;
+ pAC->Addr.Port[ToPortNumber].PromMode = i;
+
+ DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt;
+ pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt =
+ pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt;
+ pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt = DWord;
+
+ DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt;
+ pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt =
+ pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt;
+ pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt = DWord;
+
+ DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv;
+ pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv =
+ pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv;
+ pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv = DWord;
+
+ DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchDrv;
+ pAC->Addr.Port[FromPortNumber].NextExactMatchDrv =
+ pAC->Addr.Port[ToPortNumber].NextExactMatchDrv;
+ pAC->Addr.Port[ToPortNumber].NextExactMatchDrv = DWord;
+
+ /* CAUTION: Solution works if only ports of one adapter are in use. */
+ for (i = 0; (SK_U32)i < pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber].
+ Net->NetNumber].NumPorts; i++) {
+ if (pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber].Net->NetNumber].
+ Port[i]->PortNumber == ToPortNumber) {
+ pAC->Addr.Net[pAC->Rlmt.Port[ToPortNumber].Net->NetNumber].
+ ActivePort = i;
+ /* 20001207 RA: Was "ToPortNumber;". */
X
- pAC->Addr.ActivePort = ToPortIdx;
-
- (void)SkAddrMcUpdate(pAC, IoC, FromPortIdx);
- (void)SkAddrMcUpdate(pAC, IoC, ToPortIdx);
+ }
+ }
+ (void)SkAddrMcUpdate(pAC, IoC, FromPortNumber);
+ (void)SkAddrMcUpdate(pAC, IoC, ToPortNumber);
X
X return (SK_ADDR_SUCCESS);
X } /* SkAddrSwap */
@@ -1299,3 +1263,4 @@
X #ifdef __cplusplus
X }
X #endif /* __cplusplus */
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skcsum.c linux/drivers/net/sk98lin/skcsum.c
--- v2.2.19/drivers/net/sk98lin/skcsum.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skcsum.c Wed Oct 10 01:41:02 2001


@@ -2,16 +2,15 @@
X *

X * Name: skcsum.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.6 $
- * Date: $Date: 2000/02/21 12:35:10 $
+ * Version: $Revision: 1.8 $
+ * Date: $Date: 2001/02/06 11:15:36 $


X * Purpose: Store/verify Internet checksum in send/receive packets.

X *
X ******************************************************************************/
X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2001 SysKonnect GmbH.


X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,13 @@


X * History:
X *

X * $Log: skcsum.c,v $
+ * Revision 1.8 2001/02/06 11:15:36 rassmann


+ * Supporting two nets on dual-port adapters.

+ *

+ * Revision 1.7 2000/06/29 13:17:05 rassmann
+ * Corrected reception of a packet with UDP checksum == 0 (which means there
+ * is no UDP checksum).

+ *
X * Revision 1.6 2000/02/21 12:35:10 cgoos
X * Fixed license header comment.
X *
@@ -59,7 +65,7 @@
X
X #ifndef lint
X static const char SysKonnectFileId[] = "@(#)"
- "$Id: skcsum.c,v 1.6 2000/02/21 12:35:10 cgoos Exp $"
+ "$Id: skcsum.c,v 1.8 2001/02/06 11:15:36 rassmann Exp $"
X " (C) SysKonnect.";
X #endif /* !lint */
X
@@ -105,13 +111,13 @@


X /* defines ********************************************************************/
X

X /* The size of an Ethernet MAC header. */
-#define SKCS_ETHERNET_MAC_HEADER_SIZE (6+6+2)
+#define SKCS_ETHERNET_MAC_HEADER_SIZE (6+6+2)
X
X /* The size of the used topology's MAC header. */
X #define SKCS_MAC_HEADER_SIZE SKCS_ETHERNET_MAC_HEADER_SIZE
X
X /* The size of the IP header without any option fields. */
-#define SKCS_IP_HEADER_SIZE 20
+#define SKCS_IP_HEADER_SIZE 20
X
X /*
X * Field offsets within the IP header.
@@ -121,23 +127,31 @@
X #define SKCS_OFS_IP_HEADER_VERSION_AND_LENGTH 0
X
X /* "Total Length". */
-#define SKCS_OFS_IP_TOTAL_LENGTH 2
+#define SKCS_OFS_IP_TOTAL_LENGTH 2
X
X /* "Flags" "Fragment Offset". */
X #define SKCS_OFS_IP_FLAGS_AND_FRAGMENT_OFFSET 6
X
X /* "Next Level Protocol" identifier. */
-#define SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL 9
+#define SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL 9
X
X /* Source IP address. */
-#define SKCS_OFS_IP_SOURCE_ADDRESS 12
+#define SKCS_OFS_IP_SOURCE_ADDRESS 12
X
X /* Destination IP address. */
-#define SKCS_OFS_IP_DESTINATION_ADDRESS 16
+#define SKCS_OFS_IP_DESTINATION_ADDRESS 16
+
+
+/*
+ * Field offsets within the UDP header.
+ */
+
+/* UDP checksum. */
+#define SKCS_OFS_UDP_CHECKSUM 6
X
X /* IP "Next Level Protocol" identifiers (see RFC 790). */
-#define SKCS_PROTO_ID_TCP 6 /* Transport Control Protocol */
-#define SKCS_PROTO_ID_UDP 17 /* User Datagram Protocol */
+#define SKCS_PROTO_ID_TCP 6 /* Transport Control Protocol */
+#define SKCS_PROTO_ID_UDP 17 /* User Datagram Protocol */
X
X /* IP "Don't Fragment" bit. */
X #define SKCS_IP_DONT_FRAGMENT SKCS_HTON16(0x4000)
@@ -235,9 +249,10 @@
X * of the TCP or UDP pseudo header is returned here.
X */
X void SkCsGetSendInfo(
-SK_AC *pAc, /* Adapter context struct. */
-void *pIpHeader, /* IP header. */
-SKCS_PACKET_INFO *pPacketInfo) /* Packet information struct. */
+SK_AC *pAc, /* Adapter context struct. */
+void *pIpHeader, /* IP header. */
+SKCS_PACKET_INFO *pPacketInfo, /* Packet information struct. */
+int NetNumber) /* Net number */
X {
X /* Internet Header Version found in IP header. */
X unsigned InternetHeaderVersion;
@@ -279,7 +294,7 @@
X ("Tx: Unknown Internet Header Version %u.\n",
X InternetHeaderVersion));
X pPacketInfo->ProtocolFlags = 0;
- pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].TxUnableCts++;
+ pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxUnableCts++;
X return;
X }
X
@@ -300,13 +315,13 @@
X SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_TX,
X ("Tx: Invalid IP Header Length %u.\n", IpHeaderLength));
X pPacketInfo->ProtocolFlags = 0;
- pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].TxUnableCts++;
+ pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxUnableCts++;
X return;
X }
X
X /* This is an IPv4 frame with a header of valid length. */
X
- pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].TxOkCts++;
+ pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxOkCts++;
X
X /* Check if we should calculate the IP header checksum. */
X
@@ -335,14 +350,14 @@
X /* TCP/IP frame. */
X ProtocolFlags &= SKCS_PROTO_TCP | SKCS_PROTO_IP;
X NextLevelProtoStats =
- &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_TCP];
+ &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_TCP];
X }
X else if ((ProtocolFlags & SKCS_PROTO_UDP) != 0 &&
X NextLevelProtocol == SKCS_PROTO_ID_UDP) {
X /* UDP/IP frame. */
X ProtocolFlags &= SKCS_PROTO_UDP | SKCS_PROTO_IP;
X NextLevelProtoStats =
- &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_UDP];
+ &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_UDP];


X }
X else {
X /*

@@ -408,7 +423,8 @@
X SKCS_OC_ADD(pPacketInfo->PseudoHeaderChecksum, PseudoHeaderChecksum, 0);
X
X NextLevelProtoStats->TxOkCts++; /* Success. */
-}
+} /* SkCsGetSendInfo */
+


X
X /******************************************************************************
X *

@@ -426,7 +442,8 @@
X * pAc - Pointer to adapter context struct.
X *
X * pIpHeader - Pointer to IP header. Must be at least the length in bytes
- * of the received IP header including any option fields.
+ * of the received IP header including any option fields. For UDP packets,
+ * 8 additional bytes are needed to access the UDP checksum.
X *
X * Note: The actual length of the IP header is stored in the lower four
X * bits of the first octet of the IP header as the number of 4-byte words,
@@ -442,24 +459,27 @@
X * Returns:


X * SKCS_STATUS_UNKNOWN_IP_VERSION - Not an IP v4 frame.
X * SKCS_STATUS_IP_CSUM_ERROR - IP checksum error.
+ * SKCS_STATUS_IP_CSUM_ERROR_TCP - IP checksum error in TCP frame.
+ * SKCS_STATUS_IP_CSUM_ERROR_UDP - IP checksum error in UDP frame
X * SKCS_STATUS_IP_FRAGMENT - IP fragment (IP checksum ok).
X * SKCS_STATUS_IP_CSUM_OK - IP checksum ok (not a TCP or UDP frame).
X * SKCS_STATUS_TCP_CSUM_ERROR - TCP checksum error (IP checksum ok).
X * SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok).
X * SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok.
X * SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok.
+ * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum.
X *

- * Note: The SKCS_STATUS_XXX values returned here are *not* defined by
- * the CSUM module but must be defined in some header file by the module
- * using CSUM. In this way, the calling module can assign return values
- * for its own needs, e.g. by assigning bit flags to the individual
- * protocols.
+ * Note: If SKCS_OVERWRITE_STATUS is defined, the SKCS_STATUS_XXX values
+ * returned here can be defined in some header file by the module using CSUM.
+ * In this way, the calling module can assign return values for its own needs,
+ * e.g. by assigning bit flags to the individual protocols.
X */
X SKCS_STATUS SkCsGetReceiveInfo(
X SK_AC *pAc, /* Adapter context struct. */
X void *pIpHeader, /* IP header. */
X unsigned Checksum1, /* Hardware checksum 1. */
-unsigned Checksum2) /* Hardware checksum 2. */
+unsigned Checksum2, /* Hardware checksum 2. */
+int NetNumber) /* Net number */
X {
X /* Internet Header Version found in IP header. */
X unsigned InternetHeaderVersion;
@@ -506,7 +526,7 @@
X SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_RX,
X ("Rx: Unknown Internet Header Version %u.\n",
X InternetHeaderVersion));
- pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].RxUnableCts++;
+ pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxUnableCts++;
X return (SKCS_STATUS_UNKNOWN_IP_VERSION);
X }
X
@@ -525,7 +545,7 @@
X if (IpHeaderLength < 5*4) {
X SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_RX,
X ("Rx: Invalid IP Header Length %u.\n", IpHeaderLength));
- pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].RxErrCts++;
+ pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxErrCts++;
X return (SKCS_STATUS_IP_CSUM_ERROR);
X }
X
@@ -555,18 +575,17 @@
X
X /* Adjust the IP header and IP data checksums. */
X
- SKCS_OC_ADD(IpHeaderChecksum,
- IpHeaderChecksum, IpOptionsChecksum);
+ SKCS_OC_ADD(IpHeaderChecksum, IpHeaderChecksum, IpOptionsChecksum);
X
- SKCS_OC_SUB(IpDataChecksum,
- IpDataChecksum, IpOptionsChecksum);
+ SKCS_OC_SUB(IpDataChecksum, IpDataChecksum, IpOptionsChecksum);
X }
X
- /* Check if the IP header checksum is ok. */
X /*
- * NOTE: We must check the IP header checksum even if the caller does
- * not want us to do so because we cannot do any further processing of
- * the packet without a valid IP checksum.
+ * Check if the IP header checksum is ok.
+ *
+ * NOTE: We must check the IP header checksum even if the caller just wants
+ * us to check upper-layer checksums, because we cannot do any further
+ * processing of the packet without a valid IP checksum.
X */
X
X /* Get the next level protocol identifier. */
@@ -575,7 +594,7 @@
X SKCS_IDX(pIpHeader, SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL);
X
X if (IpHeaderChecksum != 0xFFFF) {
- pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].RxErrCts++;
+ pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxErrCts++;
X /* the NDIS tester wants to know the upper level protocol too */
X if (NextLevelProtocol == SKCS_PROTO_ID_TCP) {
X return(SKCS_STATUS_IP_CSUM_ERROR_TCP);
@@ -586,7 +605,6 @@
X return (SKCS_STATUS_IP_CSUM_ERROR);
X }
X
-
X /*
X * Check if this is a TCP or UDP frame and if we should calculate the
X * TCP/UDP pseudo header checksum.
@@ -595,17 +613,17 @@
X * frame.
X */
X
- if ((pAc->Csum.ReceiveFlags & SKCS_PROTO_TCP) != 0 &&
+ if ((pAc->Csum.ReceiveFlags[NetNumber] & SKCS_PROTO_TCP) != 0 &&
X NextLevelProtocol == SKCS_PROTO_ID_TCP) {
X /* TCP/IP frame. */
X NextLevelProtoStats =
- &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_TCP];
+ &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_TCP];
X }
- else if ((pAc->Csum.ReceiveFlags & SKCS_PROTO_UDP) != 0 &&
+ else if ((pAc->Csum.ReceiveFlags[NetNumber] & SKCS_PROTO_UDP) != 0 &&
X NextLevelProtocol == SKCS_PROTO_ID_UDP) {
X /* UDP/IP frame. */
X NextLevelProtoStats =
- &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_UDP];
+ &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_UDP];


X }
X else {
X /*

@@ -634,6 +652,24 @@
X }
X
X /*
+ * 08-May-2000 ra
+ *
+ * From RFC 768 (UDP)
+ * If the computed checksum is zero, it is transmitted as all ones (the
+ * equivalent in one's complement arithmetic). An all zero transmitted
+ * checksum value means that the transmitter generated no checksum (for
+ * debugging or for higher level protocols that don't care).
+ */
+
+ if (NextLevelProtocol == SKCS_PROTO_ID_UDP &&
+ *(SK_U16*)SKCS_IDX(pIpHeader, IpHeaderLength + 6) == 0x0000) {
+
+ NextLevelProtoStats->RxOkCts++;
+
+ return (SKCS_STATUS_IP_CSUM_OK_NO_UDP);
+ }
+
+ /*
X * Calculate the TCP/UDP checksum.
X */
X
@@ -691,7 +727,8 @@
X
X return (NextLevelProtocol == SKCS_PROTO_ID_TCP ?
X SKCS_STATUS_TCP_CSUM_ERROR : SKCS_STATUS_UDP_CSUM_ERROR);
-}
+} /* SkCsGetReceiveInfo */
+


X
X /******************************************************************************
X *

@@ -721,14 +758,15 @@
X * Returns the two hardware checksum start offsets.
X */
X void SkCsSetReceiveFlags(
-SK_AC *pAc, /* Adapter context struct. */
+SK_AC *pAc, /* Adapter context struct. */
X unsigned ReceiveFlags, /* New receive flags. */
X unsigned *pChecksum1Offset, /* Offset for hardware checksum 1. */
-unsigned *pChecksum2Offset) /* Offset for hardware checksum 2. */
+unsigned *pChecksum2Offset, /* Offset for hardware checksum 2. */
+int NetNumber)
X {
X /* Save the receive flags. */
X
- pAc->Csum.ReceiveFlags = ReceiveFlags;
+ pAc->Csum.ReceiveFlags[NetNumber] = ReceiveFlags;
X
X /* First checksum start offset is the IP header. */
X *pChecksum1Offset = SKCS_MAC_HEADER_SIZE;
@@ -738,9 +776,10 @@
X * if there are any IP header options in the actual packet.
X */
X *pChecksum2Offset = SKCS_MAC_HEADER_SIZE + SKCS_IP_HEADER_SIZE;
-}
+} /* SkCsSetReceiveFlags */
X
X #ifndef SkCsCalculateChecksum


+
X /******************************************************************************
X *

X * SkCsCalculateChecksum - calculate checksum for specified data
@@ -802,7 +841,8 @@
X /* Note: All bits beyond the 16-bit limit are now zero. */
X
X return ((unsigned) Checksum);
-}
+} /* SkCsCalculateChecksum */
+
X #endif /* SkCsCalculateChecksum */
X
X /******************************************************************************
@@ -838,29 +878,32 @@
X SK_EVPARA Param) /* Event dependent parameter. */
X {
X int ProtoIndex;
+ int NetNumber;
X
X switch (Event) {
X /*
X * Clear protocol statistics.
X *
X * Param - Protocol index, or -1 for all protocols.
+ * - Net number.
X */
X case SK_CSUM_EVENT_CLEAR_PROTO_STATS:
X
- ProtoIndex = (int) Param.Para32[0];
+ ProtoIndex = (int)Param.Para32[0];
+ NetNumber = (int)Param.Para32[1];
X if (ProtoIndex < 0) { /* Clear for all protocols. */
- memset(&pAc->Csum.ProtoStats[0], 0,
- sizeof(pAc->Csum.ProtoStats));
+ memset(&pAc->Csum.ProtoStats[NetNumber][0], 0,
+ sizeof(pAc->Csum.ProtoStats[NetNumber]));
X }
- else { /* Clear for individual protocol. */
- memset(&pAc->Csum.ProtoStats[ProtoIndex], 0,
- sizeof(pAc->Csum.ProtoStats[ProtoIndex]));
+ else { /* Clear for individual protocol. */
+ memset(&pAc->Csum.ProtoStats[NetNumber][ProtoIndex], 0,
+ sizeof(pAc->Csum.ProtoStats[NetNumber][ProtoIndex]));


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 29'
echo 'File patch-2.2.20 is continued in part 30'
echo "30" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:38 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part39

#!/bin/sh -x
# this is part 39 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 39; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ pci_map_single(np->pci_dev, page_address(this_frag->page) + this_frag->page_offset, this_frag->size, PCI_DMA_TODEVICE);
+
+ np->tx_ring[entry].frag[i].addr = cpu_to_le32(np->tx_info[entry].frag_mapping[i]);
+ np->tx_ring[entry].frag[i].len = cpu_to_le32(this_frag->size);
+ if (debug > 5) {
+ printk(KERN_DEBUG "%s: Tx #%d frag %d len %4.4x.\n",
+ dev->name, np->cur_tx, i,
+ le32_to_cpu(np->tx_ring[entry].frag[i].len));
+ }
X }


+#endif /* ZEROCOPY */
X

X np->cur_tx++;
X
@@ -1289,6 +1225,7 @@


X return 0;
X }
X

+
X /* The interrupt handler does all of the Rx thread work and cleans up
X after the Tx thread. */
X static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
@@ -1347,6 +1284,9 @@
X np->stats.tx_packets++;
X } else if ((tx_status & 0xe0000000) == 0x80000000) {
X struct sk_buff *skb;


+#ifdef ZEROCOPY
+ int i;

+#endif /* ZEROCOPY */
X u16 entry = tx_status; /* Implicit truncate */
X entry /= sizeof(struct starfire_tx_desc);
X
@@ -1358,6 +1298,16 @@
X PCI_DMA_TODEVICE);
X np->tx_info[entry].first_mapping = 0;
X

+#ifdef ZEROCOPY
+ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {

+ pci_unmap_single(np->pci_dev,
+ np->tx_info[entry].frag_mapping[i],
+ skb_shinfo(skb)->frags[i].size,
+ PCI_DMA_TODEVICE);
+ np->tx_info[entry].frag_mapping[i] = 0;


+ }
+#endif /* ZEROCOPY */

+
X /* Scavenge the descriptor. */
X dev_kfree_skb_irq(skb);
X
@@ -1374,6 +1324,15 @@
X netif_wake_queue(dev);
X }
X
+ /* Stats overflow */
+ if (intr_status & IntrStatsMax) {
+ get_stats(dev);
+ }
+
+ /* Media change interrupt. */
+ if (intr_status & IntrLinkChange)
+ netdev_media_change(dev);
+
X /* Abnormal error summary/uncommon events handlers. */
X if (intr_status & IntrAbnormalSummary)
X netdev_error(dev, intr_status);
@@ -1403,6 +1362,7 @@
X #endif
X }
X
+
X /* This routine is logically part of the interrupt handler, but separated
X for clarity and better register allocation. */
X static int netdev_rx(struct net_device *dev)
@@ -1460,11 +1420,9 @@
X memcpy(skb_put(skb, pkt_len), np->rx_info[entry].skb->tail, pkt_len);
X #endif
X } else {
- char *temp;
-
X pci_unmap_single(np->pci_dev, np->rx_info[entry].mapping, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
X skb = np->rx_info[entry].skb;
- temp = skb_put(skb, pkt_len);
+ skb_put(skb, pkt_len);
X np->rx_info[entry].skb = NULL;
X np->rx_info[entry].mapping = 0;
X }
@@ -1533,30 +1491,83 @@
X writew(entry, dev->base_addr + RxDescQIdx);
X }
X
- if (debug > 5
- || memcmp(np->pad0, np->pad0 + 1, sizeof(np->pad0) -1))
- printk(KERN_DEBUG " exiting netdev_rx() status of %d was %8.8x %d.\n",
- np->rx_done, desc_status,
- memcmp(np->pad0, np->pad0 + 1, sizeof(np->pad0) -1));
+ if (debug > 5)
+ printk(KERN_DEBUG " exiting netdev_rx() status of %d was %8.8x.\n",
+ np->rx_done, desc_status);
X
X /* Restart Rx engine if stopped. */


X return 0;
X }
X

-static void netdev_error(struct net_device *dev, int intr_status)
+


+static void netdev_media_change(struct net_device *dev)

X {
X struct netdev_private *np = dev->priv;

+ long ioaddr = dev->base_addr;
+ u16 reg0, reg1, reg4, reg5;
+ u32 new_tx_mode;
X
- if (intr_status & IntrLinkChange) {
- printk(KERN_NOTICE "%s: Link changed: Autonegotiation advertising"
- " %4.4x, partner %4.4x.\n", dev->name,
- mdio_read(dev, np->phys[0], 4),
- mdio_read(dev, np->phys[0], 5));
- check_duplex(dev, 0);
- }
- if (intr_status & IntrStatsMax) {
- get_stats(dev);
+ /* reset status first */
+ mdio_read(dev, np->phys[0], MII_BMCR);
+ mdio_read(dev, np->phys[0], MII_BMSR);
+


+ reg0 = mdio_read(dev, np->phys[0], MII_BMCR);

+ reg1 = mdio_read(dev, np->phys[0], MII_BMSR);
+
+ if (reg1 & BMSR_LSTATUS) {
+ /* link is up */
+ if (reg0 & BMCR_ANENABLE) {
+ /* autonegotiation is enabled */
+ reg4 = mdio_read(dev, np->phys[0], MII_ADVERTISE);
+ reg5 = mdio_read(dev, np->phys[0], MII_LPA);
+ if (reg4 & ADVERTISE_100FULL && reg5 & LPA_100FULL) {


+ np->speed100 = 1;

+ np->full_duplex = 1;

+ } else if (reg4 & ADVERTISE_100HALF && reg5 & LPA_100HALF) {


+ np->speed100 = 1;

+ np->full_duplex = 0;
+ } else if (reg4 & ADVERTISE_10FULL && reg5 & LPA_10FULL) {
+ np->speed100 = 0;


+ np->full_duplex = 1;

+ } else {
+ np->speed100 = 0;
+ np->full_duplex = 0;
+ }
+ } else {
+ /* autonegotiation is disabled */
+ if (reg0 & BMCR_SPEED100)


+ np->speed100 = 1;

+ else
+ np->speed100 = 0;
+ if (reg0 & BMCR_FULLDPLX)


+ np->full_duplex = 1;

+ else
+ np->full_duplex = 0;
+ }
+ printk(KERN_DEBUG "%s: Link is up, running at %sMbit %s-duplex\n",


+ dev->name,
+ np->speed100 ? "100" : "10",
+ np->full_duplex ? "full" : "half");

+
+ new_tx_mode = np->tx_mode & ~0x2; /* duplex setting */
+ if (np->full_duplex)
+ new_tx_mode |= 2;
+ if (np->tx_mode != new_tx_mode) {
+ np->tx_mode = new_tx_mode;
+ writel(np->tx_mode | 0x8000, ioaddr + TxMode);


+ udelay(1000);
+ writel(np->tx_mode, ioaddr + TxMode);

+ }
+ } else {
+ printk(KERN_DEBUG "%s: Link is down\n", dev->name);
X }
+}
+
+
+static void netdev_error(struct net_device *dev, int intr_status)
+{
+ struct netdev_private *np = dev->priv;
+
X /* Came close to underrunning the Tx FIFO, increase threshold. */
X if (intr_status & IntrTxDataLow) {
X writel(++np->tx_threshold, dev->base_addr + TxThreshold);
@@ -1571,6 +1582,7 @@
X np->stats.tx_fifo_errors++;
X }
X
+


X static struct net_device_stats *get_stats(struct net_device *dev)

X {
X long ioaddr = dev->base_addr;
@@ -1597,6 +1609,7 @@
X return &np->stats;
X }
X
+
X /* The little-endian AUTODIN II ethernet CRC calculations.
X A big-endian version is also available.
X This is slow but compact code. Do not use this routine for bulk data,
@@ -1623,6 +1636,7 @@
X return crc;
X }
X
+
X static void set_rx_mode(struct net_device *dev)
X {
X long ioaddr = dev->base_addr;
@@ -1631,16 +1645,14 @@
X int i;
X
X if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
- /* Unconditionally log net taps. */
- printk(KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name);
X rx_mode = AcceptBroadcast|AcceptAllMulticast|AcceptAll|AcceptMyPhys;
X } else if ((dev->mc_count > multicast_filter_limit)
X || (dev->flags & IFF_ALLMULTI)) {
X /* Too many to match, or accept all multicasts. */
X rx_mode = AcceptBroadcast|AcceptAllMulticast|AcceptMyPhys;
X } else if (dev->mc_count <= 15) {
- /* Use the 16 element perfect filter. */
- long filter_addr = ioaddr + 0x56000 + 1*16;
+ /* Use the 16 element perfect filter, skip first entry. */
+ long filter_addr = ioaddr + PerfFilterTable + 1 * 16;
X for (i = 1, mclist = dev->mc_list; mclist && i <= dev->mc_count;
X i++, mclist = mclist->next) {
X u16 *eaddrs = (u16 *)mclist->dmi_addr;
@@ -1662,53 +1674,168 @@
X memset(mc_filter, 0, sizeof(mc_filter));
X for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;


X i++, mclist = mclist->next) {

- set_bit(ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 23, mc_filter);
+ int bit_nr = ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 23;
+ __u32 *fptr = (__u32 *) &mc_filter[(bit_nr >> 4) & ~1];
+
+ *fptr |= cpu_to_le32(1 << (bit_nr & 31));
X }
- /* Clear the perfect filter list. */
- filter_addr = ioaddr + 0x56000 + 1*16;
+ /* Clear the perfect filter list, skip first entry. */
+ filter_addr = ioaddr + PerfFilterTable + 1 * 16;
X for (i = 1; i < 16; i++) {
X writew(0xffff, filter_addr); filter_addr += 4;
X writew(0xffff, filter_addr); filter_addr += 4;
X writew(0xffff, filter_addr); filter_addr += 8;
X }
- for (filter_addr=ioaddr + 0x56100, i=0; i < 32; filter_addr+= 16, i++)
+ for (filter_addr = ioaddr + HashTable, i=0; i < 32; filter_addr+= 16, i++)
X writew(mc_filter[i], filter_addr);


X rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
X }

X writel(rx_mode, ioaddr + RxFilterMode);
X }
X

-static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)

+
+static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
X {
+ struct ethtool_cmd ecmd;


X struct netdev_private *np = dev->priv;

- u16 *data = (u16 *)&rq->ifr_data;
+
+ if (copy_from_user(&ecmd, useraddr, sizeof(ecmd)))
+ return -EFAULT;
+
+ switch (ecmd.cmd) {
+ case ETHTOOL_GSET:
+ ecmd.supported =
+ SUPPORTED_10baseT_Half |
+ SUPPORTED_10baseT_Full |
+ SUPPORTED_100baseT_Half |
+ SUPPORTED_100baseT_Full |
+ SUPPORTED_Autoneg |
+ SUPPORTED_MII;
+
+ ecmd.advertising = ADVERTISED_MII;
+ if (np->advertising & ADVERTISE_10HALF)
+ ecmd.advertising |= ADVERTISED_10baseT_Half;
+ if (np->advertising & ADVERTISE_10FULL)
+ ecmd.advertising |= ADVERTISED_10baseT_Full;
+ if (np->advertising & ADVERTISE_100HALF)
+ ecmd.advertising |= ADVERTISED_100baseT_Half;
+ if (np->advertising & ADVERTISE_100FULL)
+ ecmd.advertising |= ADVERTISED_100baseT_Full;
+ if (np->autoneg) {
+ ecmd.advertising |= ADVERTISED_Autoneg;
+ ecmd.autoneg = AUTONEG_ENABLE;
+ } else
+ ecmd.autoneg = AUTONEG_DISABLE;
+
+ ecmd.port = PORT_MII;
+ ecmd.transceiver = XCVR_INTERNAL;
+ ecmd.phy_address = np->phys[0];
+ ecmd.speed = np->speed100 ? SPEED_100 : SPEED_10;
+ ecmd.duplex = np->full_duplex ? DUPLEX_FULL : DUPLEX_HALF;
+ ecmd.maxtxpkt = TX_RING_SIZE;
+ ecmd.maxrxpkt = np->intr_mitigation; /* not 100% accurate */
+
+
+ if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
+ return -EFAULT;
+ return 0;
+
+ case ETHTOOL_SSET: {
+ u16 autoneg, speed100, full_duplex;
+
+ autoneg = (ecmd.autoneg == AUTONEG_ENABLE);
+ speed100 = (ecmd.speed == SPEED_100);
+ full_duplex = (ecmd.duplex == DUPLEX_FULL);
+
+ np->autoneg = autoneg;
+ if (speed100 != np->speed100 ||
+ full_duplex != np->full_duplex) {
+ np->speed100 = speed100;
+ np->full_duplex = full_duplex;
+ /* change advertising bits */
+ np->advertising &= ~(ADVERTISE_10HALF |
+ ADVERTISE_10FULL |
+ ADVERTISE_100HALF |
+ ADVERTISE_100FULL |
+ ADVERTISE_100BASE4);
+ if (speed100) {
+ if (full_duplex)
+ np->advertising |= ADVERTISE_100FULL;
+ else
+ np->advertising |= ADVERTISE_100HALF;
+ } else {
+ if (full_duplex)
+ np->advertising |= ADVERTISE_10FULL;
+ else
+ np->advertising |= ADVERTISE_10HALF;
+ }
+ }
+ check_duplex(dev);


+ return 0;
+ }
+

+ case ETHTOOL_GDRVINFO: {
+ struct ethtool_drvinfo info;
+ memset(&info, 0, sizeof(info));
+ info.cmd = ecmd.cmd;
+ strcpy(info.driver, DRV_NAME);
+ strcpy(info.version, DRV_VERSION);
+ *info.fw_version = 0;
+ strcpy(info.bus_info, PCI_SLOT_NAME(np->pci_dev));
+ if (copy_to_user(useraddr, &info, sizeof(info)))
+ return -EFAULT;


+ return 0;
+ }
+

+ default:
+ return -EOPNOTSUPP;
+ }
+}
+
+


+static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)

+{
+ struct netdev_private *np = dev->priv;


+ struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;
X

X switch(cmd) {
- case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */
- data[0] = np->phys[0] & 0x1f;


+ case SIOCETHTOOL:
+ return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+

+ /* Legacy mii-diag interface */
+ case SIOCGMIIPHY: /* Get address of MII PHY in use. */
+ case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */
+ data->phy_id = np->phys[0] & 0x1f;


X /* Fall Through */

- case SIOCDEVPRIVATE+1: /* Read the specified MII register. */
- data[3] = mdio_read(dev, data[0] & 0x1f, data[1] & 0x1f);
+
+ case SIOCGMIIREG: /* Read MII PHY register. */
+ case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */
+ data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f);
X return 0;
- case SIOCDEVPRIVATE+2: /* Write the specified MII register */
+
+ case SIOCSMIIREG: /* Write MII PHY register. */
+ case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */
X if (!capable(CAP_NET_ADMIN))
X return -EPERM;
- if (data[0] == np->phys[0]) {


- u16 value = data[2];
- switch (data[1]) {

+ if (data->phy_id == np->phys[0]) {


+ u16 value = data->val_in;
+ switch (data->reg_num) {
X case 0:

- if (value & 0x9000) /* Autonegotiation. */
- np->medialock = 0;
+ if (value & (BMCR_RESET | BMCR_ANENABLE))
+ /* Autonegotiation. */


+ np->autoneg = 1;

X else {
- np->full_duplex = (value & 0x0100) ? 1 : 0;


- np->medialock = 1;

+ np->full_duplex = (value & BMCR_FULLDPLX) ? 1 : 0;


+ np->autoneg = 0;

X }
X break;
- case 4: np->advertising = value; break;
+ case 4:
+ np->advertising = value;
+ break;
X }
- check_duplex(dev, 0);
+ check_duplex(dev);
X }
- mdio_write(dev, data[0] & 0x1f, data[1] & 0x1f, data[2]);
+ mdio_write(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in);
X return 0;
X default:
X return -EOPNOTSUPP;
@@ -1724,8 +1851,6 @@
X netif_stop_queue(dev);
X netif_stop_if(dev);
X
- del_timer_sync(&np->timer);
-
X if (debug > 1) {
X printk(KERN_DEBUG "%s: Shutting down ethercard, Intr status %4.4x.\n",
X dev->name, (int)readl(ioaddr + IntrStatus));
@@ -1771,6 +1896,9 @@
X }


X for (i = 0; i < TX_RING_SIZE; i++) {

X struct sk_buff *skb = np->tx_info[i].skb;
+#ifdef ZEROCOPY
+ int j;
+#endif /* ZEROCOPY */
X if (skb == NULL)
X continue;
X pci_unmap_single(np->pci_dev,
@@ -1779,6 +1907,17 @@


X np->tx_info[i].first_mapping = 0;

X dev_kfree_skb(skb);


X np->tx_info[i].skb = NULL;

+#ifdef ZEROCOPY


+ for (j = 0; j < MAX_STARFIRE_FRAGS; j++)

+ if (np->tx_info[i].frag_mapping[j]) {
+ pci_unmap_single(np->pci_dev,
+ np->tx_info[i].frag_mapping[j],
+ skb_shinfo(skb)->frags[j].size,
+ PCI_DMA_TODEVICE);


+ np->tx_info[i].frag_mapping[j] = 0;

+ } else
+ break;


+#endif /* ZEROCOPY */
X }
X

X COMPAT_MOD_DEC_USE_COUNT;
@@ -1796,32 +1935,31 @@
X BUG();
X
X np = dev->priv;
-
- unregister_netdev(dev);
- iounmap((char *)dev->base_addr);
-
- release_mem_region(pci_resource_start (pdev, 0),
- pci_resource_len (pdev, 0));
-
X if (np->tx_done_q)
- pci_free_consistent(np->pci_dev, PAGE_SIZE,
+ pci_free_consistent(pdev, PAGE_SIZE,
X np->tx_done_q, np->tx_done_q_dma);
X if (np->rx_done_q)
- pci_free_consistent(np->pci_dev, PAGE_SIZE,
+ pci_free_consistent(pdev,
+ sizeof(struct rx_done_desc) * DONE_Q_SIZE,
X np->rx_done_q, np->rx_done_q_dma);
X if (np->tx_ring)
- pci_free_consistent(np->pci_dev, PAGE_SIZE,
+ pci_free_consistent(pdev, PAGE_SIZE,
X np->tx_ring, np->tx_ring_dma);
X if (np->rx_ring)
- pci_free_consistent(np->pci_dev, PAGE_SIZE,
+ pci_free_consistent(pdev, PAGE_SIZE,
X np->rx_ring, np->rx_ring_dma);
X
- kfree(dev);
+ unregister_netdev(dev);
+ iounmap((char *)dev->base_addr);
+ pci_release_regions(pdev);
+
+ pci_set_drvdata(pdev, NULL);
+ kfree(dev); /* Will also free np!! */
X }
X
X
X static struct pci_driver starfire_driver = {
- name: "starfire",
+ name: DRV_NAME,
X probe: starfire_init_one,
X remove: starfire_remove_one,
X id_table: starfire_pci_tbl,
@@ -1830,6 +1968,10 @@
X
X static int __init starfire_init (void)
X {
+/* when a module, this is printed whether or not devices are found in probe */
+#ifdef MODULE
+ printk(version);
+#endif
X return pci_module_init (&starfire_driver);
X }
X
@@ -1846,8 +1988,8 @@
X
X /*
X * Local variables:
- * compile-command: "gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c starfire.c"
- * simple-compile-command: "gcc -DMODULE -O6 -c starfire.c"
+ * compile-command: "gcc -DMODULE -Wall -Wstrict-prototypes -O2 -c starfire.c"
+ * simple-compile-command: "gcc -DMODULE -O2 -c starfire.c"
X * c-basic-offset: 8
X * tab-width: 8
X * End:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sunhme.c linux/drivers/net/sunhme.c
--- v2.2.19/drivers/net/sunhme.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/net/sunhme.c Wed Oct 10 01:41:04 2001
@@ -3019,27 +3019,23 @@
X struct linux_sbus *sbus;
X struct linux_sbus_device *sdev;
X struct quattro *qp;
+ int i;
X
X if(qfe_sbus_list == NULL)
X goto found;
X
X for(qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
- for(sdev = qp->quattro_sbus_dev;
- sdev != NULL;
- sdev = sdev->next) {
+ for(i = 0, sdev = qp->quattro_sbus_dev;
+ (sdev != NULL) && (i < 4);
+ sdev = sdev->next, i++) {
X if(sdev == goal_sdev)
X return qp;
X }
X }
X for_each_sbus(sbus) {
X for_each_sbusdev(sdev, sbus) {
- if(sdev->child != NULL) {
- struct linux_sbus_device *p;
-
- for(p = sdev->child; p != NULL; p = p->next)
- if(p == goal_sdev)
- goto found;
- }
+ if (sdev == goal_sdev)
+ goto found;
X }
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/syncppp.c linux/drivers/net/syncppp.c
--- v2.2.19/drivers/net/syncppp.c Sun Mar 25 17:31:20 2001
+++ linux/drivers/net/syncppp.c Wed Oct 10 01:41:04 2001
@@ -505,8 +505,10 @@
X }
X /* Send Configure-Ack packet. */
X sp->pp_loopcnt = 0;
- sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK,
- h->ident, len-4, h+1);
+ if (sp->lcp.state != LCP_STATE_OPENED) {
+ sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK,
+ h->ident, len-4, h+1);
+ }
X /* Change the state. */
X switch (sp->lcp.state) {
X case LCP_STATE_CLOSED:
@@ -522,7 +524,9 @@
X sp->ipcp.state = IPCP_STATE_CLOSED;
X /* Initiate renegotiation. */
X sppp_lcp_open (sp);
- /* An ACK has already been sent. */
+ /* Send ACK after our REQ in attempt to break loop */
+ sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK,
+ h->ident, len-4, h+1);
X sp->lcp.state = LCP_STATE_ACK_SENT;
X break;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/tulip.c linux/drivers/net/tulip.c
--- v2.2.19/drivers/net/tulip.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/net/tulip.c Wed Oct 10 01:41:04 2001
@@ -2742,7 +2742,8 @@
X (tp->link_change)(dev, csr5);
X }
X if (csr5 & SytemError) {
- printk(KERN_ERR "%s: (%lu) System Error occured\n", dev->name, tp->nir);
+ printk(KERN_ERR "%s: (%lu) System Error occurred\n",
+ dev->name, tp->nir);
X }
X /* Clear all error sources, included undocumented ones! */
X outl(0x0800f7ba, ioaddr + CSR5);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/via-rhine.c linux/drivers/net/via-rhine.c
--- v2.2.19/drivers/net/via-rhine.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/net/via-rhine.c Wed Oct 10 01:41:04 2001
@@ -25,11 +25,15 @@
X
X LK1.0.0:
X - Urban Widmark: merges from Beckers 1.08b version and 2.4.0 (VT6102)
+
+ LK1.0.1
+ - Dennis Björklund: backport tx_timeout from 2.4.x to reset on timeout
+ instead of stop working...
X */
X
X /* These identify the driver base version and may not be removed. */
X static const char version1[] =
-"via-rhine.c:v1.08b-LK1.0.0 12/14/2000 Written by Donald Becker\n";
+"via-rhine.c:v1.08b-LK1.0.1 12/14/2000 Written by Donald Becker\n";
X static const char version2[] =
X " http://www.scyld.com/network/via-rhine.html\n";
X
@@ -95,9 +99,11 @@
X #include <linux/etherdevice.h>
X #include <linux/skbuff.h>
X #include <linux/init.h>
+#include <linux/delay.h>
X #include <asm/processor.h> /* Processor type for cache alignment. */
X #include <asm/bitops.h>
X #include <asm/io.h>
+#include <asm/irq.h>
X
X /* Condensed bus+endian portability operations. */
X #define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
@@ -133,6 +139,8 @@


X MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
X MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");

X
+#define NETSTATS_VER2
+


X /*
X Theory of Operation

X
@@ -254,6 +262,13 @@
X struct device *dev, long ioaddr, int irq,
X int chp_idx, int fnd_cnt);
X
+enum via_rhine_chips {
+ VT86C100A = 0,
+ VT6102,
+ VT3043,
+};
+
+/* directly indexed by enum via_rhine_chips, above */
X static struct pci_id_info pci_tbl[] __initdata = {
X { "VIA VT86C100A Rhine-II", 0x1106, 0x6100, 0xffff,
X RHINE_IOTYPE, 128, via_probe1},
@@ -377,7 +392,6 @@
X static void check_duplex(struct device *dev);
X static void netdev_timer(unsigned long data);
X static void tx_timeout(struct device *dev);
-static void init_ring(struct device *dev);
X static int start_tx(struct sk_buff *skb, struct device *dev);
X static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs);
X static int netdev_rx(struct device *dev);
@@ -393,6 +407,31 @@
X /* A list of our installed devices, for removing the driver module. */
X static struct device *root_net_dev = NULL;
X
+static void wait_for_reset(struct device *dev, char *name)
+{
+ struct netdev_private *np = dev->priv;
+ long ioaddr = dev->base_addr;
+ int chip_id = np->chip_id;
+ int i;
+
+ /* 3043 may need long delay after reset (dlink) */
+ if (chip_id == VT3043 || chip_id == VT86C100A)
+ udelay(100);


+
+ i = 0;

+ do {
+ udelay(5);
+ i++;
+ if(i > 2000) {
+ printk(KERN_ERR "%s: reset did not complete in 10 ms.\n", name);
+ break;
+ }
+ } while(readw(ioaddr + ChipCmd) & CmdReset);
+ if (debug > 1)
+ printk(KERN_INFO "%s: reset finished after %d microseconds.\n",
+ name, 5*i);
+}
+
X /* Ideally we would detect all network cards in slot order. That would
X be best done a central PCI probe dispatch, which wouldn't work
X well when dynamically adding drivers. So instead we detect just the
@@ -592,6 +631,141 @@
X return dev;
X }
X
+static void alloc_rbufs(struct device *dev)
+{
+ struct netdev_private *np = (struct netdev_private *)dev->priv;
+ int i;
+
+ np->cur_rx = 0;
+ np->dirty_rx = 0;
+
+ np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32);
+ np->rx_head_desc = &np->rx_ring[0];
+
+ for (i = 0; i < RX_RING_SIZE; i++) {
+ np->rx_ring[i].rx_status = 0;
+ np->rx_ring[i].desc_length = cpu_to_le32(np->rx_buf_sz);
+ np->rx_ring[i].next_desc = virt_to_le32desc(&np->rx_ring[i+1]);
+ np->rx_skbuff[i] = 0;
+ }
+ /* Mark the last entry as wrapping the ring. */
+ np->rx_ring[i-1].next_desc = virt_to_le32desc(&np->rx_ring[0]);
+
+ /* Fill in the Rx buffers. Handle allocation failure gracefully. */
+ for (i = 0; i < RX_RING_SIZE; i++) {
+ struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz);
+ np->rx_skbuff[i] = skb;


+ if (skb == NULL)

+ break;
+ skb->dev = dev; /* Mark as being used by this device. */
+ np->rx_ring[i].addr = virt_to_le32desc(skb->tail);
+ np->rx_ring[i].rx_status = cpu_to_le32(DescOwn);
+ }
+ np->dirty_rx = (unsigned int)(i - RX_RING_SIZE);
+}
+
+static void free_rbufs(struct device* dev)
+{
+ struct netdev_private *np = (struct netdev_private *)dev->priv;
+ int i;
+
+ /* Free all the skbuffs in the Rx queue. */
+ for (i = 0; i < RX_RING_SIZE; i++) {
+ np->rx_ring[i].rx_status = 0;
+ np->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */
+ if (np->rx_skbuff[i]) {
+#if LINUX_VERSION_CODE < 0x20100
+ np->rx_skbuff[i]->free = 1;
+#endif
+ dev_kfree_skb(np->rx_skbuff[i]);
+ }
+ np->rx_skbuff[i] = 0;
+ }
+}
+
+static void alloc_tbufs(struct device* dev)
+{
+ struct netdev_private *np = (struct netdev_private *)dev->priv;
+ int i;
+
+ np->tx_full = 0;
+ np->cur_tx = 0;
+ np->dirty_tx = 0;
+
+ for (i = 0; i < TX_RING_SIZE; i++) {
+ np->tx_skbuff[i] = 0;
+ np->tx_ring[i].tx_status = 0;
+ np->tx_ring[i].desc_length = cpu_to_le32(0x00e08000);
+ np->tx_ring[i].next_desc = virt_to_le32desc(&np->tx_ring[i+1]);
+ np->tx_buf[i] = kmalloc(PKT_BUF_SZ, GFP_KERNEL);
+ }
+ np->tx_ring[i-1].next_desc = virt_to_le32desc(&np->tx_ring[0]);
+}
+
+static void free_tbufs(struct device *dev)
+{
+ struct netdev_private *np = (struct netdev_private *)dev->priv;
+ int i;
+
+ for (i = 0; i < TX_RING_SIZE; i++) {
+ if (np->tx_skbuff[i])
+ dev_kfree_skb(np->tx_skbuff[i]);
+ np->tx_skbuff[i] = 0;
+ if (np->tx_buf[i]) {
+ kfree(np->tx_buf[i]);
+ np->tx_buf[i] = 0;
+ }
+ }
+}
+
+static void init_registers(struct device *dev)
+{
+ struct netdev_private *np = (struct netdev_private *)dev->priv;
+ long ioaddr = dev->base_addr;
+ int i;
+
+ for (i = 0; i < 6; i++)
+ writeb(dev->dev_addr[i], ioaddr + StationAddr + i);
+
+ /* Initialize other registers. */
+ writew(0x0006, ioaddr + PCIBusConfig); /* Tune configuration??? */
+ /* Configure the FIFO thresholds. */
+ writeb(0x20, ioaddr + TxConfig); /* Initial threshold 32 bytes */
+ np->tx_thresh = 0x20;
+ np->rx_thresh = 0x60; /* Written in set_rx_mode(). */
+
+ if (dev->if_port == 0)
+ dev->if_port = np->default_port;
+


+ dev->tbusy = 0;

+ dev->interrupt = 0;
+
+ writel(virt_to_bus(np->rx_ring), ioaddr + RxRingPtr);
+ writel(virt_to_bus(np->tx_ring), ioaddr + TxRingPtr);
+
+ set_rx_mode(dev);
+
+ dev->start = 1;
+
+ /* Enable interrupts by setting the interrupt mask. */
+ writew(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow| IntrRxDropped|
+ IntrTxDone | IntrTxAbort | IntrTxUnderrun |
+ IntrPCIErr | IntrStatsMax | IntrLinkChange | IntrMIIChange,
+ ioaddr + IntrEnable);
+
+ np->chip_cmd = CmdStart|CmdTxOn|CmdRxOn|CmdNoTxPoll;
+ if (np->duplex_lock)
+ np->chip_cmd |= CmdFDuplex;
+ writew(np->chip_cmd, ioaddr + ChipCmd);
+
+ check_duplex(dev);
+ /* The LED outputs of various MII xcvrs should be configured. */
+ /* For NS or Mison phys, turn on bit 1 in register 0x17 */
+ /* For ESI phys, turn on bit 7 in register 0x17. */
+ mdio_write(dev, np->phys[0], 0x17, mdio_read(dev, np->phys[0], 0x17) |
+ (np->drv_flags & HasESIPhy) ? 0x0080 : 0x0001);
+}
+
X
X /* Read and write over the MII Management Data I/O (MDIO) interface. */
X
@@ -648,7 +822,6 @@
X {
X struct netdev_private *np = (struct netdev_private *)dev->priv;
X long ioaddr = dev->base_addr;
- int i;
X
X /* Reset the chip. */
X writew(CmdReset, ioaddr + ChipCmd);
@@ -664,48 +837,10 @@
X printk(KERN_DEBUG "%s: netdev_open() irq %d.\n",
X dev->name, dev->irq);
X
- init_ring(dev);
-
- writel(virt_to_bus(np->rx_ring), ioaddr + RxRingPtr);
- writel(virt_to_bus(np->tx_ring), ioaddr + TxRingPtr);
-
- for (i = 0; i < 6; i++)
- writeb(dev->dev_addr[i], ioaddr + StationAddr + i);
-
- /* Initialize other registers. */
- writew(0x0006, ioaddr + PCIBusConfig); /* Tune configuration??? */
- /* Configure the FIFO thresholds. */
- writeb(0x20, ioaddr + TxConfig); /* Initial threshold 32 bytes */
- np->tx_thresh = 0x20;
- np->rx_thresh = 0x60; /* Written in set_rx_mode(). */
-


- if (dev->if_port == 0)
- dev->if_port = np->default_port;

-


- dev->tbusy = 0;

- dev->interrupt = 0;

-
- set_rx_mode(dev);
-
- dev->start = 1;
+ alloc_rbufs(dev);
+ alloc_tbufs(dev);
X
- /* Enable interrupts by setting the interrupt mask. */
- writew(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow| IntrRxDropped|
- IntrTxDone | IntrTxAbort | IntrTxUnderrun |
- IntrPCIErr | IntrStatsMax | IntrLinkChange | IntrMIIChange,
- ioaddr + IntrEnable);
-
- np->chip_cmd = CmdStart|CmdTxOn|CmdRxOn|CmdNoTxPoll;
- if (np->duplex_lock)
- np->chip_cmd |= CmdFDuplex;
- writew(np->chip_cmd, ioaddr + ChipCmd);
-
- check_duplex(dev);
- /* The LED outputs of various MII xcvrs should be configured. */
- /* For NS or Mison phys, turn on bit 1 in register 0x17 */
- /* For ESI phys, turn on bit 7 in register 0x17. */
- mdio_write(dev, np->phys[0], 0x17, mdio_read(dev, np->phys[0], 0x17) |
- (np->drv_flags & HasESIPhy) ? 0x0080 : 0x0001);
+ init_registers(dev);
X
X if (debug > 2)
X printk(KERN_DEBUG "%s: Done netdev_open(), status %4.4x "
@@ -773,6 +908,7 @@
X static void tx_timeout(struct device *dev)
X {
X struct netdev_private *np = (struct netdev_private *)dev->priv;
+ struct pci_dev *pdev = pci_find_slot(np->pci_bus, np->pci_devfn);
X long ioaddr = dev->base_addr;
X
X printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status "
@@ -780,60 +916,32 @@
X dev->name, readw(ioaddr + IntrStatus),
X mdio_read(dev, np->phys[0], 1));
X
- /* Perhaps we should reinitialize the hardware here. */
X dev->if_port = 0;
- /* Stop and restart the chip's Tx processes . */
-
- /* Trigger an immediate transmit demand. */
-


- dev->trans_start = jiffies;

- np->stats.tx_errors++;
- return;
-}
X
+ /* protect against concurrent rx interrupts */
+ disable_irq(pdev->irq);
X
-/* Initialize the Rx and Tx rings, along with various 'dev' bits. */
-static void init_ring(struct device *dev)
-{
- struct netdev_private *np = (struct netdev_private *)dev->priv;
- int i;
+ /* Reset the chip. */
+ writew(CmdReset, ioaddr + ChipCmd);
X
- np->tx_full = 0;
- np->cur_rx = np->cur_tx = 0;
- np->dirty_rx = np->dirty_tx = 0;
+ /* clear all descriptors */
+ free_tbufs(dev);
+ free_rbufs(dev);
+ alloc_tbufs(dev);
+ alloc_rbufs(dev);
+
+ /* Reinitialize the hardware. */
+ wait_for_reset(dev, dev->name);
+ init_registers(dev);
X
- np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32);
- np->rx_head_desc = &np->rx_ring[0];
+ enable_irq(pdev->irq);
X
- for (i = 0; i < RX_RING_SIZE; i++) {
- np->rx_ring[i].rx_status = 0;
- np->rx_ring[i].desc_length = cpu_to_le32(np->rx_buf_sz);
- np->rx_ring[i].next_desc = virt_to_le32desc(&np->rx_ring[i+1]);
- np->rx_skbuff[i] = 0;
- }
- /* Mark the last entry as wrapping the ring. */
- np->rx_ring[i-1].next_desc = virt_to_le32desc(&np->rx_ring[0]);
-
- /* Fill in the Rx buffers. Handle allocation failure gracefully. */
- for (i = 0; i < RX_RING_SIZE; i++) {
- struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz);
- np->rx_skbuff[i] = skb;


- if (skb == NULL)

- break;
- skb->dev = dev; /* Mark as being used by this device. */
- np->rx_ring[i].addr = virt_to_le32desc(skb->tail);
- np->rx_ring[i].rx_status = cpu_to_le32(DescOwn);
- }
- np->dirty_rx = (unsigned int)(i - RX_RING_SIZE);


+ dev->trans_start = jiffies;

+ np->stats.tx_errors++;
X
- for (i = 0; i < TX_RING_SIZE; i++) {
- np->tx_skbuff[i] = 0;
- np->tx_ring[i].tx_status = 0;
- np->tx_ring[i].desc_length = cpu_to_le32(0x00e08000);
- np->tx_ring[i].next_desc = virt_to_le32desc(&np->tx_ring[i+1]);
- np->tx_buf[i] = kmalloc(PKT_BUF_SZ, GFP_KERNEL);
- }
- np->tx_ring[i-1].next_desc = virt_to_le32desc(&np->tx_ring[0]);
+ /* wake queue */
+ clear_bit(0, (void*)&dev->tbusy);
+ mark_bh(NET_BH);
X
X return;
X }
@@ -1231,7 +1339,6 @@
X {
X long ioaddr = dev->base_addr;
X struct netdev_private *np = (struct netdev_private *)dev->priv;
- int i;
X

X dev->start = 0;

X dev->tbusy = 1;

@@ -1253,27 +1360,8 @@
X

X free_irq(dev->irq, dev);
X

- /* Free all the skbuffs in the Rx queue. */
- for (i = 0; i < RX_RING_SIZE; i++) {
- np->rx_ring[i].rx_status = 0;
- np->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */
- if (np->rx_skbuff[i]) {
-#if LINUX_VERSION_CODE < 0x20100
- np->rx_skbuff[i]->free = 1;
-#endif
- dev_kfree_skb(np->rx_skbuff[i]);
- }
- np->rx_skbuff[i] = 0;
- }
- for (i = 0; i < TX_RING_SIZE; i++) {
- if (np->tx_skbuff[i])
- dev_kfree_skb(np->tx_skbuff[i]);
- np->tx_skbuff[i] = 0;
- if (np->tx_buf[i]) {
- kfree(np->tx_buf[i]);
- np->tx_buf[i] = 0;
- }
- }
+ free_rbufs(dev);
+ free_tbufs(dev);
X
X MOD_DEC_USE_COUNT;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/pci/oldproc.c linux/drivers/pci/oldproc.c
--- v2.2.19/drivers/pci/oldproc.c Sun Mar 25 17:31:36 2001
+++ linux/drivers/pci/oldproc.c Wed Oct 10 01:41:05 2001
@@ -1034,14 +1034,7 @@
X {
X int nprinted, len, size;
X struct pci_dev *dev;
- static int complained = 0;
X # define MSG "\nwarning: page-size limit reached!\n"
-
- if (!complained) {
- complained++;
- printk(KERN_INFO "%s uses obsolete /proc/pci interface\n",
- current->comm);
- }
X
X /* reserve same for truncation warning message: */
X size = PAGE_SIZE - (strlen(MSG) + 1);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/pci/proc.c linux/drivers/pci/proc.c
--- v2.2.19/drivers/pci/proc.c Sun Mar 25 17:31:36 2001
+++ linux/drivers/pci/proc.c Wed Oct 10 01:41:05 2001
@@ -195,18 +195,117 @@
X return nbytes;
X }
X
+struct pci_filp_private {
+ enum pci_mmap_state mmap_state;
+ int write_combine;
+};
+
+static int proc_bus_pci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ const struct proc_dir_entry *dp = inode->u.generic_ip;
+ struct pci_dev *dev = dp->data;
+#ifdef HAVE_PCI_MMAP
+ struct pci_filp_private *fpriv = file->private_data;
+#endif /* HAVE_PCI_MMAP */


+ int ret = 0;

+
+ switch (cmd) {
+ case PCIIOC_CONTROLLER:
+ ret = pci_controller_num(dev);
+ break;
+
+#ifdef HAVE_PCI_MMAP
+ case PCIIOC_MMAP_IS_IO:
+ fpriv->mmap_state = pci_mmap_io;
+ break;
+
+ case PCIIOC_MMAP_IS_MEM:
+ fpriv->mmap_state = pci_mmap_mem;
+ break;
+
+ case PCIIOC_WRITE_COMBINE:
+ if (arg)
+ fpriv->write_combine = 1;
+ else
+ fpriv->write_combine = 0;
+ break;
+
+#endif /* HAVE_PCI_MMAP */
+
+ default:
+ ret = -EINVAL;
+ break;
+ };
+
+ return ret;
+}
+
+#ifdef HAVE_PCI_MMAP
+static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ struct inode *inode = file->f_dentry->d_inode;
+ const struct proc_dir_entry *dp = inode->u.generic_ip;
+ struct pci_dev *dev = dp->data;
+ struct pci_filp_private *fpriv = file->private_data;
+ int ret;
+
+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
+
+ ret = pci_mmap_page_range(dev, vma,
+ fpriv->mmap_state,
+ fpriv->write_combine);
+ if (ret < 0)
+ return ret;
+


+ return 0;
+}
+

+static int proc_bus_pci_open(struct inode *inode, struct file *file)
+{
+ struct pci_filp_private *fpriv = kmalloc(sizeof(*fpriv), GFP_KERNEL);
+
+ if (!fpriv)
+ return -ENOMEM;
+
+ fpriv->mmap_state = pci_mmap_io;
+ fpriv->write_combine = 0;
+
+ file->private_data = fpriv;
+


+ return 0;
+}
+

+static int proc_bus_pci_release(struct inode *inode, struct file *file)
+{
+ kfree(file->private_data);
+ file->private_data = NULL;


+
+ return 0;
+}

+#endif /* HAVE_PCI_MMAP */
+
X static struct file_operations proc_bus_pci_operations = {
X proc_bus_pci_lseek,
X proc_bus_pci_read,
X proc_bus_pci_write,
- NULL, /* readdir */
- NULL, /* poll */
- NULL, /* ioctl */
- NULL, /* mmap */
- NULL, /* no special open code */
- NULL, /* flush */
- NULL, /* no special release code */
- NULL /* can't fsync */
+ NULL, /* readdir */
+ NULL, /* poll */
+ proc_bus_pci_ioctl, /* ioctl */
+#ifdef HAVE_PCI_MMAP
+ proc_bus_pci_mmap, /* mmap */
+ proc_bus_pci_open, /* open code */
+#else
+ NULL, /* mmap */
+ NULL, /* no special open code */
+#endif
+ NULL, /* flush */
+#ifdef HAVE_PCI_MMAP
+ proc_bus_pci_release, /* release code */
+#else
+ NULL, /* no special release code */
+#endif
+ NULL /* can't fsync */
X };
X
X static struct inode_operations proc_bus_pci_inode_operations = {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/pnp/parport_probe.c linux/drivers/pnp/parport_probe.c
--- v2.2.19/drivers/pnp/parport_probe.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/pnp/parport_probe.c Wed Oct 10 01:41:05 2001
@@ -55,7 +55,7 @@
X unsigned int count = 0;
X unsigned char z=0;
X unsigned char Byte=0;
- unsigned long igiveupat=jiffies+5*HZ;
+ unsigned long igiveupat=jiffies+9*HZ;
X
X for (i=0; time_before(jiffies, igiveupat); i++) {
X /* if(current->need_resched) schedule(); */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/Config.in linux/drivers/s390/Config.in
--- v2.2.19/drivers/s390/Config.in Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/Config.in Wed Oct 10 01:41:05 2001
@@ -75,3 +75,16 @@
X fi
X endmenu
X
+mainmenu_option next_comment
+comment 'S/390 character device drivers'
+
+tristate 'S/390 tape device support' CONFIG_S390_TAPE
+if [ "$CONFIG_S390_TAPE" != "n" ]; then
+ comment 'S/390 tape interface support'
+ bool ' Support for tape character devices' CONFIG_S390_TAPE_CHAR
+ bool ' Support for tape block devices' CONFIG_S390_TAPE_BLOCK
+ comment 'S/390 tape hardware support'
+ bool ' Support for 3490 tape hardware' CONFIG_S390_TAPE_3490
+ bool ' Support for 3480 tape hardware' CONFIG_S390_TAPE_3480
+fi
+endmenu
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/block/dasd_3990_erp.c linux/drivers/s390/block/dasd_3990_erp.c
--- v2.2.19/drivers/s390/block/dasd_3990_erp.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/block/dasd_3990_erp.c Wed Oct 10 01:41:05 2001
@@ -986,7 +986,7 @@
X *
X * RETURN VALUES
X * erp erp-pointer to the already defined error recovery procedure OR
- * NULL if a 'new' error occured.
+ * NULL if a 'new' error occurred.
X */
X ccw_req_t *
X dasd_3990_erp_in_erp (ccw_req_t * cqr)
@@ -1068,7 +1068,7 @@
X * DASD_3990_ERP_HANDLE_MATCH_ERP
X *
X * DESCRIPTION
- * An error occured again and an ERP has been detected which is already
+ * An error occurred again and an ERP has been detected which is already
X * used to handle this error (e.g. retries).
X * All prior ERP's are set to status DONE and the retry counter is
X * decremented.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/Makefile linux/drivers/s390/char/Makefile
--- v2.2.19/drivers/s390/char/Makefile Sun Mar 25 17:31:44 2001
+++ linux/drivers/s390/char/Makefile Wed Oct 10 01:41:05 2001
@@ -13,4 +13,31 @@
X O_OBJS += hwc_con.o hwc_rw.o hwc_tty.o
X endif
X
+# stuff for building tape390.o
+T390_OBJS = tape.o
+ifeq ($(CONFIG_S390_TAPE_CHAR),y)
+ T390_OBJS += tapechar.o
+endif
+ifeq ($(CONFIG_S390_TAPE_BLOCK),y)
+ T390_OBJS += tapeblock.o
+endif
+ifeq ($(CONFIG_S390_TAPE_3480),y)
+ T390_OBJS += tape3480.o
+ CONFIG_S390_TAPE_NEED_34xx = y
+endif
+ifeq ($(CONFIG_S390_TAPE_3490),y)
+ T390_OBJS += tape3490.o
+ CONFIG_S390_TAPE_NEED_34xx = y
+endif
+ifeq ($(CONFIG_S390_TAPE_NEED_34xx),y)
+ T390_OBJS += tape34xx.o
+endif
+ifeq ($(CONFIG_S390_TAPE),y)
+ O_OBJS += tape390.o
+endif
+ifeq ($(CONFIG_S390_TAPE),m)
+ M_OBJS += tape390.o
+endif
+tape390.o: $(T390_OBJS)
+ $(LD) -r -o $@ $(T390_OBJS)
X include $(TOPDIR)/Rules.make
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/con3215.c linux/drivers/s390/char/con3215.c
--- v2.2.19/drivers/s390/char/con3215.c Sun Mar 25 17:31:44 2001
+++ linux/drivers/s390/char/con3215.c Wed Oct 10 01:41:05 2001
@@ -834,7 +834,7 @@
X
X kdev_t con3215_device(struct console *c)
X {
- return MKDEV(TTY_MAJOR, c->index);
+ return MKDEV(TTY_MAJOR, c->index + 64);
X }
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/hwc.h linux/drivers/s390/char/hwc.h
--- v2.2.19/drivers/s390/char/hwc.h Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/char/hwc.h Wed Oct 10 01:41:05 2001
@@ -4,7 +4,7 @@
X *
X * S390 version
X * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Peschke <pes...@fh-brandenburg.de>
+ * Author(s): Martin Peschke <mpes...@de.ibm.com>
X *
X *
X *
@@ -12,6 +12,9 @@
X
X #ifndef __HWC_H__
X #define __HWC_H__
+
+#define HWC_EXT_INT_PARAM_ADDR 0xFFFFFFF8
+#define HWC_EXT_INT_PARAM_PEND 0x00000001
X
X #define ET_OpCmd 0x01
X #define ET_Msg 0x02
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/hwc_con.c linux/drivers/s390/char/hwc_con.c
--- v2.2.19/drivers/s390/char/hwc_con.c Sun Mar 25 17:31:44 2001
+++ linux/drivers/s390/char/hwc_con.c Wed Oct 10 01:41:05 2001
@@ -4,7 +4,7 @@
X *
X * S390 version
X * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Peschke <pes...@fh-brandenburg.de>
+ * Author(s): Martin Peschke <mpes...@de.ibm.com>
X */
X
X #include <linux/kernel.h>
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/hwc_rw.c linux/drivers/s390/char/hwc_rw.c
--- v2.2.19/drivers/s390/char/hwc_rw.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/char/hwc_rw.c Wed Oct 10 01:41:05 2001
@@ -4,7 +4,7 @@
X *
X * S390 version
X * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Peschke <pes...@fh-brandenburg.de>
+ * Author(s): Martin Peschke <mpes...@de.ibm.com>
X *
X *
X *
@@ -27,6 +27,7 @@
X #include <asm/setup.h>
X #include <asm/page.h>
X #include <asm/s390_ext.h>
+#include <asm/irq.h>
X
X #ifndef MIN
X #define MIN(a,b) (((a<b) ? a : b))
@@ -194,7 +195,7 @@
X 0,
X 80,
X 1,
- 50,
+ MAX_KMEM_PAGES,
X MAX_KMEM_PAGES,
X
X 0,
@@ -331,15 +332,15 @@
X return condition_code;
X }
X
-static inline unsigned char *
-ext_int_param (void)
+static inline unsigned long
+hwc_ext_int_param (void)
X {
X u32 param;
X
X __asm__ __volatile__ ("L %0,128\n\t"
X :"=r" (param));
X
- return ((unsigned char *) param);
+ return (unsigned long) param;


X }
X
X static int

@@ -421,11 +422,11 @@
X internal_print (
X DELAYED_WRITE,
X HWC_RW_PRINT_HEADER
- "found invalid HWCB at address 0x%x. List corrupted. "
+ "found invalid HWCB at address 0x%lx. List corrupted. "
X "Lost %i HWCBs with %i characters within up to %i "
X "messages. Saved %i HWCB with last %i characters i"
X "within up to %i messages.\n",
- (unsigned int) bad_addr,
+ (unsigned long) bad_addr,
X lost_hwcb, lost_char, lost_msg,
X hwc_data.hwcb_count,
X ALL_HWCB_CHAR, ALL_HWCB_MTO);
@@ -760,24 +761,22 @@


X }
X
X static int

-write_event_data_2 (void)
+write_event_data_2 (u32 ext_int_param)
X {
X write_hwcb_t *hwcb;
X int retval = 0;
X
X #ifdef DUMP_HWC_WRITE_ERROR
- unsigned char *param;
-
- param = ext_int_param ();
- if (param != hwc_data.current_hwcb) {
+ if ((ext_int_param & HWC_EXT_INT_PARAM_ADDR)
+ != (unsigned long) hwc_data.current_hwcb) {
X internal_print (
X DELAYED_WRITE,
X HWC_RW_PRINT_HEADER
X "write_event_data_2 : "
X "HWCB address does not fit "
- "(expected: 0x%x, got: 0x%x).\n",
- hwc_data.current_hwcb,
- param);
+ "(expected: 0x%lx, got: 0x%lx).\n",
+ (unsigned long) hwc_data.current_hwcb,
+ ext_int_param);
X return -EINVAL;
X }
X #endif
@@ -1720,7 +1719,7 @@


X }
X
X static int

-unconditional_read_2 (void)
+unconditional_read_2 (u32 ext_int_param)
X {
X read_hwcb_t *hwcb = (read_hwcb_t *) hwc_data.page;
X
@@ -1857,7 +1856,7 @@


X }
X
X static int

-write_event_mask_2 (void)
+write_event_mask_2 (u32 ext_int_param)
X {
X init_hwcb_t *hwcb = (init_hwcb_t *) hwc_data.page;


X int retval = 0;

@@ -2009,7 +2008,7 @@


X return retval;
X }
X

-void do_hwc_interrupt (struct pt_regs *regs, __u16 code);
+void hwc_interrupt_handler (struct pt_regs *regs, __u16 code);
X
X int
X hwc_init (unsigned long *kmem_start)
@@ -2023,7 +2022,7 @@
X
X #endif
X
- if (register_external_interrupt (0x2401, do_hwc_interrupt) != 0)
+ if (register_external_interrupt (0x2401, hwc_interrupt_handler) != 0)
X panic ("Couldn't request external interrupts 0x2401");
X
X spin_lock_init (&hwc_data.lock);
@@ -2102,59 +2101,102 @@
X }
X
X void
-do_hwc_interrupt (struct pt_regs *regs, __u16 code)
+hwc_do_interrupt (u32 ext_int_param)
X {
+ u32 finished_hwcb = ext_int_param & HWC_EXT_INT_PARAM_ADDR;
+ u32 evbuf_pending = ext_int_param & HWC_EXT_INT_PARAM_PEND;
X
- if (hwc_data.flags & HWC_INIT) {
-
- hwc_data.flags |= HWC_INTERRUPT;
- } else if (hwc_data.flags & HWC_BROKEN) {
-
- if (!do_hwc_init ()) {
- hwc_data.flags &= ~HWC_BROKEN;
- internal_print (DELAYED_WRITE,
- HWC_RW_PRINT_HEADER
- "delayed HWC setup after"
- " temporary breakdown\n");
- }
- } else {
- spin_lock (&hwc_data.lock);
-
- if (hwc_data.flags & HWC_PTIMER_RUNS) {
- del_timer (&hwc_data.poll_timer);
- hwc_data.flags &= ~HWC_PTIMER_RUNS;
- }
- if (!hwc_data.current_servc) {
-
- unconditional_read_1 ();
+ if (hwc_data.flags & HWC_PTIMER_RUNS) {
+ del_timer (&hwc_data.poll_timer);
+ hwc_data.flags &= ~HWC_PTIMER_RUNS;
+ }
+ if (finished_hwcb) {
X
+ if ((unsigned long) hwc_data.current_hwcb != finished_hwcb) {
+ internal_print (
+ DELAYED_WRITE,
+ HWC_RW_PRINT_HEADER
+ "interrupt: mismatch: "
+ "ext. int param. (0x%x) vs. "
+ "current HWCB (0x%x)\n",
+ ext_int_param,
+ hwc_data.current_hwcb);
X } else {
X
X switch (hwc_data.current_servc) {
X
X case HWC_CMDW_WRITEMASK:
X
- write_event_mask_2 ();
+ write_event_mask_2 (ext_int_param);
X break;
X
X case HWC_CMDW_WRITEDATA:
X
- write_event_data_2 ();
+ write_event_data_2 (ext_int_param);
X break;
X
X case HWC_CMDW_READDATA:
X
- unconditional_read_2 ();
+ unconditional_read_2 (ext_int_param);
X break;
+ default:
X }
+ }
+ } else {
X
- write_event_data_1 ();
+ if (hwc_data.current_hwcb) {
+ internal_print (
+ DELAYED_WRITE,
+ HWC_RW_PRINT_HEADER
+ "interrupt: mismatch: "
+ "ext. int. param. (0x%x) vs. "
+ "current HWCB (0x%x)\n",
+ ext_int_param,
+ hwc_data.current_hwcb);
X }
- if (hwc_data.calls != NULL)
- if (hwc_data.calls->wake_up != NULL)
- (hwc_data.calls->wake_up) ();
+ }
+
+ if (evbuf_pending) {
+
+ unconditional_read_1 ();
+ } else {
+
+ write_event_data_1 ();
+ }
+
+ if (!hwc_data.calls || !hwc_data.calls->wake_up)
+ return;
+ (hwc_data.calls->wake_up) ();
+}
+
+void
+hwc_interrupt_handler (struct pt_regs *regs, __u16 code)
+{
+ u32 ext_int_param = hwc_ext_int_param ();
+ int cpu = smp_processor_id ();
+
+ irq_enter (cpu, 0x2401);
+
+ if (hwc_data.flags & HWC_INIT) {
+
+ hwc_data.flags |= HWC_INTERRUPT;
+ } else if (hwc_data.flags & HWC_BROKEN) {
+
+ if (!do_hwc_init ()) {
+ hwc_data.flags &= ~HWC_BROKEN;
+ internal_print (DELAYED_WRITE,
+ HWC_RW_PRINT_HEADER
+ "delayed HWC setup after"
+ " temporary breakdown"
+ " (ext. int. parameter=0x%x)\n",
+ ext_int_param);
+ }
+ } else {
+ spin_lock (&hwc_data.lock);
+ hwc_do_interrupt (ext_int_param);
X spin_unlock (&hwc_data.lock);
X }
+ irq_exit (cpu, 0x2401);
X }
X
X void
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/hwc_rw.h linux/drivers/s390/char/hwc_rw.h
--- v2.2.19/drivers/s390/char/hwc_rw.h Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/char/hwc_rw.h Wed Oct 10 01:41:05 2001
@@ -4,7 +4,7 @@
X *
X * S390 version
X * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Peschke <pes...@fh-brandenburg.de>
+ * Author(s): Martin Peschke <mpes...@de.ibm.com>
X */
X
X #ifndef __HWC_RW_H__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/hwc_tty.c linux/drivers/s390/char/hwc_tty.c
--- v2.2.19/drivers/s390/char/hwc_tty.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/char/hwc_tty.c Wed Oct 10 01:41:05 2001
@@ -4,7 +4,7 @@
X *
X * S390 version
X * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Peschke <pes...@fh-brandenburg.de>
+ * Author(s): Martin Peschke <mpes...@de.ibm.com>
X *
X * Thanks to Martin Schwidefsky.
X */


@@ -171,9 +171,7 @@
X

X switch (cmd) {
X case TIOCHWCTTYSINTRC:
- count = strnlen_user((const char *)arg, HWC_TTY_MAX_CNTL_SIZE);
- if (!count)
- return -EFAULT;
+ count = strlen_user ((const char *) arg);
X if (count > HWC_TTY_MAX_CNTL_SIZE)
X return -EINVAL;
X strncpy_from_user (hwc_tty_data.ioctl.intr_char,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/hwc_tty.h linux/drivers/s390/char/hwc_tty.h
--- v2.2.19/drivers/s390/char/hwc_tty.h Sun Mar 25 17:31:44 2001
+++ linux/drivers/s390/char/hwc_tty.h Wed Oct 10 01:41:05 2001
@@ -4,7 +4,7 @@
X *
X * S390 version
X * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Martin Peschke <pes...@fh-brandenburg.de>
+ * Author(s): Martin Peschke <mpes...@de.ibm.com>
X */
X
X #ifndef __HWC_TTY_H__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape.c linux/drivers/s390/char/tape.c
--- v2.2.19/drivers/s390/char/tape.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape.c Wed Oct 10 01:41:05 2001
@@ -0,0 +1,1120 @@
+
+/***********************************************************************
+ * drivers/s390/char/tape.c
+ * tape device driver for S/390 and zSeries tapes.
+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *
+ ***********************************************************************
+ */
+
+#include "tapedefs.h"
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/version.h>
+#include <linux/proc_fs.h>
+#include <linux/init.h>
+#include <asm/types.h>
+#include <asm/ccwcache.h>
+#include <asm/idals.h>
+#include <asm/ebcdic.h>
+#include <linux/compatmac.h>
+#ifdef MODULE
+#include <linux/module.h>
+#endif
+#include <asm/debug.h>
+#ifdef CONFIG_S390_TAPE_DYNAMIC
+#include <asm/s390dyn.h>
+#endif
+#include "tape.h"
+#ifdef CONFIG_S390_TAPE_3490
+#include "tape3490.h"
+#endif
+#ifdef CONFIG_S390_TAPE_3480
+#include "tape3480.h"
+#endif
+#ifdef CONFIG_S390_TAPE_BLOCK
+#include "tapeblock.h"
+#endif
+#ifdef CONFIG_S390_TAPE_CHAR
+#include "tapechar.h"
+#endif
+#ifdef CONFIG_PROC_FS
+#include <linux/vmalloc.h>
+#endif
+#define PRINTK_HEADER "T390:"
+
+
+/* state handling routines */
+inline void tapestate_set (tape_info_t * ti, int newstate);
+inline int tapestate_get (tape_info_t * ti);
+void tapestate_event (tape_info_t * ti, int event);
+
+/* our globals */
+tape_info_t *first_tape_info = NULL;
+tape_discipline_t *first_discipline = NULL;
+tape_frontend_t *first_frontend = NULL;
+devreg_t* tape_devreg[128];
+int devregct=0;
+
+#ifdef TAPE_DEBUG
+debug_info_t *tape_debug_area = NULL;
+#endif
+
+char* state_verbose[TS_SIZE]={
+ "TS_UNUSED", "TS_IDLE", "TS_DONE", "TS_FAILED",
+ "TS_BLOCK_INIT",
+ "TS_BSB_INIT",
+ "TS_BSF_INIT",
+ "TS_DSE_INIT",
+ "TS_EGA_INIT",
+ "TS_FSB_INIT",
+ "TS_FSF_INIT",
+ "TS_LDI_INIT",
+ "TS_LBL_INIT",
+ "TS_MSE_INIT",
+ "TS_NOP_INIT",
+ "TS_RBA_INIT",
+ "TS_RBI_INIT",
+ "TS_RBU_INIT",
+ "TS_RBL_INIT",
+ "TS_RDC_INIT",
+ "TS_RFO_INIT",
+ "TS_RSD_INIT",
+ "TS_REW_INIT",
+ "TS_REW_RELEASE_INIT",
+ "TS_RUN_INIT",
+ "TS_SEN_INIT",
+ "TS_SID_INIT",
+ "TS_SNP_INIT",
+ "TS_SPG_INIT",
+ "TS_SWI_INIT",
+ "TS_SMR_INIT",
+ "TS_SYN_INIT",
+ "TS_TIO_INIT",
+ "TS_UNA_INIT",
+ "TS_WRI_INIT",
+ "TS_WTM_INIT",
+ "TS_NOT_OPER"};
+
+char* event_verbose[TE_SIZE]= {
+ "TE_START", "TE_DONE", "TE_FAILED", "TE_ERROR", "TE_OTHER"};
+
+/* our root devfs handle */
+#ifdef CONFIG_DEVFS_FS
+devfs_handle_t tape_devfs_root_entry;
+
+inline void
+tape_mkdevfsroots (tape_info_t* ti)
+{
+ char devno [5];
+ sprintf (devno,"%04X",ti->devinfo.devno);
+ ti->devfs_dir=devfs_mk_dir (tape_devfs_root_entry, devno, ti);
+}
+
+inline void
+tape_rmdevfsroots (tape_info_t* ti)
+{
+ devfs_unregister (ti->devfs_dir);
+}
+#endif
+
+#ifdef CONFIG_PROC_FS
+/* our proc tapedevices entry */
+static struct proc_dir_entry *tape_devices_entry;
+
+typedef struct {
+ char *data;
+ int len;
+} tempinfo_t;
+
+
+static int
+tape_devices_open (struct inode *inode, struct file *file)
+{
+ int size=80;
+ tape_info_t* ti;
+ tempinfo_t* tempinfo;
+ char* data;
+ int pos=0;
+ tempinfo = kmalloc (sizeof(tempinfo_t),GFP_KERNEL);
+ if (!tempinfo)
+ return -ENOMEM;
+ for (ti=first_tape_info;ti!=NULL;ti=ti->next)
+ size+=80; // FIXME: Guess better!
+ data=vmalloc(size);
+ if (!data) {
+ kfree (tempinfo);
+ return -ENOMEM;
+ }
+ pos+=sprintf(data+pos,"TapeNo\tDevNo\tCuType\tCuModel\tDevType\tDevModel\tState\n");
+ for (ti=first_tape_info;ti!=NULL;ti=ti->next) {
+ pos+=sprintf(data+pos,"%d\t%04X\t%04X\t%02X\t%04X\t%02X\t\t%s\n",ti->rew_minor/2,
+ ti->devinfo.devno,ti->devinfo.sid_data.cu_type,
+ ti->devinfo.sid_data.cu_model,ti->devinfo.sid_data.dev_type,
+ ti->devinfo.sid_data.dev_model,((tapestate_get(ti) >= 0) &&
+ (tapestate_get(ti) < TS_SIZE)) ?
+ state_verbose[tapestate_get (ti)] : "TS UNKNOWN");
+ }
+ tempinfo->len=pos;
+ tempinfo->data=data;
+ file->private_data= (void*) tempinfo;
+#ifdef MODULE
+ MOD_INC_USE_COUNT;
+#endif


+ return 0;
+}
+

+static ssize_t
+tape_devices_read (struct file *file, char *user_buf, size_t user_len, loff_t * offset)
+{
+ loff_t len;
+ tempinfo_t *p_info = (tempinfo_t *) file->private_data;
+
+ if (*offset >= p_info->len) {
+ return 0; /* EOF */
+ } else {
+ len = user_len<(p_info->len - *offset)?user_len:(p_info->len - *offset);
+ if (copy_to_user (user_buf, &(p_info->data[*offset]), len))
+ return -EFAULT;
+ (*offset) += len;
+ return len; /* number of bytes "read" */


+ }
+}
+
+static int

+tape_devices_release (struct inode *inode, struct file *file)
+{


+ int rc = 0;

+ tempinfo_t *p_info = (tempinfo_t *) file->private_data;
+ if (p_info) {
+ if (p_info->data)
+ vfree (p_info->data);
+ kfree (p_info);
+ }
+#ifdef MODULE
+ MOD_DEC_USE_COUNT;
+#endif
+ return rc;
+}
+
+static struct file_operations tape_devices_file_ops =
+{
+ read:tape_devices_read, /* read */
+ open:tape_devices_open, /* open */
+ release:tape_devices_release, /* close */
+};
+
+static struct inode_operations tape_devices_inode_ops =
+{
+#if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+ default_file_ops:&tape_devices_file_ops /* file ops */
+#endif /* LINUX_IS_24 */
+};
+#endif /* CONFIG_PROC_FS */
+
+/* SECTION: Parameters for tape */
+char *tape[256] = { NULL, };
+
+#ifndef MODULE
+static char tape_parm_string[1024] __initdata = { 0, };
+static void
+tape_split_parm_string (char *str)
+{
+ char *tmp = str;
+ int count = 0;
+ while (tmp != NULL && *tmp != '\0') {
+ char *end;
+ int len;
+ end = strchr (tmp, ',');
+ if (end == NULL) {
+ len = strlen (tmp) + 1;
+ } else {
+ len = (long) end - (long) tmp + 1;
+ *end = '\0';
+ end++;
+ }
+ tape[count] = kmalloc (len * sizeof (char), GFP_ATOMIC);
+ if (tape[count] == NULL) {
+ printk (KERN_WARNING PRINTK_HEADER
+ "can't store tape= parameter no %d\n",
+ count + 1);
+ break;
+ }
+ memset (tape[count], 0, len * sizeof (char));
+ memcpy (tape[count], tmp, len * sizeof (char));
+ count++;
+ tmp = end;
+ };
+}
+
+void __init
+tape_parm_setup (char *str, int *ints)
+{
+ int len = strlen (tape_parm_string);
+ if (len != 0) {
+ strcat (tape_parm_string, ",");
+ }
+ strcat (tape_parm_string, str);
+}
+
+int __init
+tape_parm_call_setup (char *str)
+{
+ int dummy;
+ tape_parm_setup (str, &dummy);


+ return 1;
+}
+

+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,2,16))
+__setup("tape=", tape_parm_call_setup);
+#endif /* kernel <2.2.19 */
+#endif /* not defined MODULE */
+
+static inline int
+tape_parm_strtoul (char *str, char **stra)
+{
+ char *temp = str;
+ int val;
+ if (*temp == '0') {
+ temp++; /* strip leading zero */
+ if (*temp == 'x')
+ temp++; /* strip leading x */
+ }
+ val = simple_strtoul (temp, &temp, 16); /* interpret anything as hex */
+ *stra = temp;
+ return val;
+}
+
+static inline devreg_t *
+tape_create_devreg (int devno)
+{
+ devreg_t *devreg = kmalloc (sizeof (devreg_t), GFP_KERNEL);
+ if (devreg != NULL) {
+ memset (devreg, 0, sizeof (devreg_t));
+ devreg->ci.devno = devno;
+ devreg->flag = DEVREG_TYPE_DEVNO;
+ devreg->oper_func = tape_oper_handler;
+ }
+ return devreg;
+}
+
+static inline void
+tape_parm_parse (char **str)
+{
+ char *temp;
+ int from, to,i,irq=0,rc,retries=0,tape_num=0;
+ s390_dev_info_t dinfo;
+ tape_info_t* ti,*tempti;
+ tape_discipline_t* disc;
+ long lockflags;
+ if (*str==NULL) {
+ /* no params present -> leave */
+ return;
+ }
+ while (*str) {
+ temp = *str;
+ from = 0;
+ to = 0;
+
+ /* turn off autodetect mode, if any range is present */
+ from = tape_parm_strtoul (temp, &temp);
+ to = from;
+ if (*temp == '-') {
+ temp++;
+ to = tape_parm_strtoul (temp, &temp);
+ }
+ for (i=from;i<=to;i++) {
+ retries=0;
+ // register for attch/detach of a devno
+ tape_devreg[devregct]=tape_create_devreg(i);
+ if (tape_devreg[devregct]==NULL) {
+ PRINT_WARN ("Could not create devreg for devno %04x, dyn. attach for this devno deactivated.\n",i);
+ } else {
+ s390_device_register (tape_devreg[devregct++]);
+ }
+ // we are activating a device if it is present
+ for (irq = get_irq_first(); irq!=-ENODEV; irq=get_irq_next(irq)) {
+ rc = get_dev_info_by_irq (irq, &dinfo);
+
+ disc = first_discipline;
+ while ((dinfo.devno == i) && (disc != NULL) && (disc->cu_type != dinfo.sid_data.cu_type))
+ disc = (tape_discipline_t *) (disc->next);
+ if ((disc == NULL) || (rc == -ENODEV) || (i!=dinfo.devno)) {
+ continue;
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"det irq: ");
+ debug_int_event (tape_debug_area,3,irq);
+ debug_text_event (tape_debug_area,3,"cu: ");
+ debug_int_event (tape_debug_area,3,disc->cu_type);
+#endif /* TAPE_DEBUG */
+ PRINT_INFO ("using devno %04x with discipline %04x on irq %d as tape device %d\n",dinfo.devno,dinfo.sid_data.cu_type,irq,tape_num/2);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 39'
echo 'File patch-2.2.20 is continued in part 40'
echo "40" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:39 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part40

#!/bin/sh -x
# this is part 40 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 40; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ /* Allocate tape structure */
+ ti = kmalloc (sizeof (tape_info_t), GFP_ATOMIC);
+ if (ti == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,3,"ti:no mem ");
+#endif /* TAPE_DEBUG */
+ PRINT_INFO ("tape: can't allocate memory for "
+ "tape info structure\n");
+ continue;
+ }
+ memset(ti,0,sizeof(tape_info_t));
+ ti->discipline = disc;
+ disc->tape = ti;
+ rc = tape_setup (ti, irq, tape_num);
+ if (rc) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"tsetup err");
+ debug_int_exception (tape_debug_area,3,rc);
+#endif /* TAPE_DEBUG */
+ kfree (ti);
+ } else {
+ s390irq_spin_lock_irqsave (irq, lockflags);
+ if (first_tape_info == NULL) {
+ first_tape_info = ti;
+ } else {
+ tempti = first_tape_info;
+ while (tempti->next != NULL)
+ tempti = tempti->next;
+ tempti->next = ti;
+ }
+ s390irq_spin_unlock_irqrestore (irq, lockflags);
+ }
+ }
+ tape_num+=2;
+ }
+ str++;
+ }
+}
+
+
+/* SECTION: Managing wrappers for ccwcache */
+
+#define TAPE_EMERGENCY_REQUESTS 16
+
+static ccw_req_t *tape_emergency_req[TAPE_EMERGENCY_REQUESTS] =
+{NULL,};
+static spinlock_t tape_emergency_req_lock = SPIN_LOCK_UNLOCKED;
+
+static void
+tape_init_emergency_req (void)
+{
+ int i;
+ for (i = 0; i < TAPE_EMERGENCY_REQUESTS; i++) {
+ tape_emergency_req[i] = (ccw_req_t *) get_free_page (GFP_KERNEL);
+ }
+}
+
+#ifdef MODULE // We only cleanup the emergency requests on module unload.
+static void
+tape_cleanup_emergency_req (void)
+{
+ int i;
+ for (i = 0; i < TAPE_EMERGENCY_REQUESTS; i++) {
+ if (tape_emergency_req[i])
+ free_page ((long) (tape_emergency_req[i]));
+ else
+ printk (KERN_WARNING PRINTK_HEADER "losing one page for 'in-use' emergency request\n");
+ }
+}
+#endif
+
+ccw_req_t *
+tape_alloc_request (char *magic, int cplength, int datasize)
+{
+ ccw_req_t *rv = NULL;
+ int i;
+ if ((rv = ccw_alloc_request (magic, cplength, datasize)) != NULL) {
+ return rv;
+ }
+ if (cplength * sizeof (ccw1_t) + datasize + sizeof (ccw_req_t) > PAGE_SIZE) {
+ return NULL;
+ }
+ spin_lock (&tape_emergency_req_lock);
+ for (i = 0; i < TAPE_EMERGENCY_REQUESTS; i++) {
+ if (tape_emergency_req[i] != NULL) {
+ rv = tape_emergency_req[i];
+ tape_emergency_req[i] = NULL;
+ }
+ }
+ spin_unlock (&tape_emergency_req_lock);
+ if (rv) {
+ memset (rv, 0, PAGE_SIZE);
+ rv->cache = (kmem_cache_t *) (tape_emergency_req + i);
+ strncpy ((char *) (&rv->magic), magic, 4);
+ ASCEBC ((char *) (&rv->magic), 4);
+ rv->cplength = cplength;
+ rv->datasize = datasize;
+ rv->data = (void *) ((long) rv + PAGE_SIZE - datasize);
+ rv->cpaddr = (ccw1_t *) ((long) rv + sizeof (ccw_req_t));
+ }
+ return rv;
+}
+
+void
+tape_free_request (ccw_req_t * request)
+{
+ if (request->cache >= (kmem_cache_t *) tape_emergency_req &&
+ request->cache <= (kmem_cache_t *) (tape_emergency_req + TAPE_EMERGENCY_REQUESTS)) {
+ *((ccw_req_t **) (request->cache)) = request;
+ } else {
+ clear_normalized_cda ((ccw1_t *) (request->cpaddr)); // avoid memory leak caused by modeset_byte
+ ccw_free_request (request);
+ }
+}
+
+/*
+ * Allocate a ccw request and reserve it for tape driver
+ */
+inline
+ ccw_req_t *
+tape_alloc_ccw_req (tape_info_t * ti, int cplength, int datasize)
+{
+ char tape_magic_id[] = "tape";
+ ccw_req_t *cqr = NULL;
+
+ if (!ti)
+ return NULL;
+ cqr = tape_alloc_request (tape_magic_id, cplength, datasize);
+
+ if (!cqr) {
+#ifdef TAPE_DEBUG
+ PRINT_WARN ("empty CQR generated\n");
+#endif
+ }
+ cqr->magic = TAPE_MAGIC; /* sets an identifier for tape driver */
+ cqr->device = ti; /* save pointer to tape info */
+ return cqr;
+}
+
+/*
+ * Find the tape_info_t structure associated with irq
+ */
+static inline tape_info_t *
+tapedev_find_info (int irq)
+{
+ tape_info_t *ti;
+
+ ti = first_tape_info;
+ if (ti != NULL)
+ do {
+ if (ti->devinfo.irq == irq)
+ break;
+ } while ((ti = (tape_info_t *) ti->next) != NULL);
+ return ti;
+}
+
+#define QUEUE_THRESHOLD 5
+
+/*
+ * Tape interrupt routine, called from Ingo's I/O layer
+ */
+void
+tape_irq (int irq, void *int_parm, struct pt_regs *regs)
+{
+ tape_info_t *ti = tapedev_find_info (irq);
+
+ /* analyse devstat and fire event */
+ if (ti->devstat.dstat & DEV_STAT_UNIT_CHECK) {
+ tapestate_event (ti, TE_ERROR);
+ } else if (ti->devstat.dstat & (DEV_STAT_DEV_END)) {
+ tapestate_event (ti, TE_DONE);
+ } else
+ tapestate_event (ti, TE_OTHER);
+}
+
+int
+tape_oper_handler ( int irq, struct _devreg *dreg) {
+ tape_info_t* ti=first_tape_info;
+ tape_info_t* newtape;
+ int rc,tape_num,retries=0,i;
+ s390_dev_info_t dinfo;
+ tape_discipline_t* disc;
+#ifdef CONFIG_DEVFS_FS
+ tape_frontend_t* frontend;
+#endif
+ long lockflags;
+ while ((ti!=NULL) && (ti->devinfo.irq!=irq))
+ ti=ti->next;
+ if (ti!=NULL) {
+ // irq is (still) used by tape. tell ingo to try again later
+ PRINT_WARN ("Oper handler for irq %d called while irq still (internaly?) used.\n",irq);
+ return -EAGAIN;
+ }
+ // irq is not used by tape


+ rc = get_dev_info_by_irq (irq, &dinfo);

+ if (rc == -ENODEV) {
+ retries++;


+ rc = get_dev_info_by_irq (irq, &dinfo);

+ if (retries > 5) {
+ PRINT_WARN ("No device information for new dev. could be retrieved.\n");
+ return -ENODEV;
+ }


+ }
+ disc = first_discipline;

+ while ((disc != NULL) && (disc->cu_type != dinfo.sid_data.cu_type))


+ disc = (tape_discipline_t *) (disc->next);

+ if (disc == NULL)
+ PRINT_WARN ("No matching discipline for cu_type %x found, ignoring device %04x.\n",dinfo.sid_data.cu_type,dinfo.devno);
+ if (rc == -ENODEV)
+ PRINT_WARN ("No device information for new dev. could be retrieved.\n");
+ if ((disc == NULL) || (rc == -ENODEV))
+ return -ENODEV;
+
+ /* Allocate tape structure */
+ ti = kmalloc (sizeof (tape_info_t), GFP_ATOMIC);
+ if (ti == NULL) {
+ PRINT_INFO ( "tape: can't allocate memory for "
+ "tape info structure\n");
+ return -ENOBUFS;
+ }
+ memset(ti,0,sizeof(tape_info_t));
+ ti->discipline = disc;
+ disc->tape = ti;
+ tape_num=0;
+ if (*tape) {
+ // we have static device ranges, so fingure out the tape_num of the attached tape
+ for (i=0;i<devregct;i++)
+ if (tape_devreg[i]->ci.devno==dinfo.devno) {
+ tape_num=2*i;


+ break;
+ }
+ } else {

+ // we are running in autoprobe mode, find a free tape_num
+ newtape=first_tape_info;
+ while (newtape!=NULL) {
+ if (newtape->rew_minor==tape_num) {
+ // tape num in use. try next one
+ tape_num+=2;
+ newtape=first_tape_info;
+ } else {
+ // tape num not used by newtape. look at next tape info
+ newtape=newtape->next;
+ }
+ }
+ }
+ rc = tape_setup (ti, irq, tape_num);
+ if (rc) {
+ kfree (ti);
+ return -ENOBUFS;
+ }
+#ifdef CONFIG_DEVFS_FS
+ for (frontend=first_frontend;frontend!=NULL;frontend=frontend->next)
+ frontend->mkdevfstree(ti);
+#endif
+ s390irq_spin_lock_irqsave (irq,lockflags);
+ if (first_tape_info == NULL) {
+ first_tape_info = ti;
+ } else {
+ newtape = first_tape_info;
+ while (newtape->next != NULL)
+ newtape = newtape->next;
+ newtape->next = ti;
+ }
+ s390irq_spin_unlock_irqrestore (irq, lockflags);


+ return 0;
+}
+
+

+static void
+tape_noper_handler ( int irq, int status ) {
+ tape_info_t *ti=first_tape_info;
+ tape_info_t *lastti;
+#ifdef CONFIG_DEVFS_FS
+ tape_frontend_t *frontend;
+#endif
+ long lockflags;
+ s390irq_spin_lock_irqsave(irq,lockflags);
+ while (ti!=NULL && ti->devinfo.irq!=irq) ti=ti->next;
+ if (ti==NULL) return;
+ if (tapestate_get(ti)!=TS_UNUSED) {
+ // device is in use!
+ PRINT_WARN ("Tape #%d was detached while it was busy. Expect errors!",ti->blk_minor/2);
+ tapestate_set(ti,TS_NOT_OPER);
+ ti->rc=-ENODEV;
+ ti->wanna_wakeup=1;
+ switch (tapestate_get(ti)) {
+ case TS_REW_RELEASE_INIT:
+ tapestate_set(ti,TS_NOT_OPER);
+ wake_up (&ti->wq);
+ break;
+#ifdef CONFIG_S390_TAPE_BLOCK
+ case TS_BLOCK_INIT:
+ tapestate_set(ti,TS_NOT_OPER);
+ schedule_tapeblock_exec_IO(ti);
+ break;
+#endif
+ default:
+ tapestate_set(ti,TS_NOT_OPER);
+ wake_up_interruptible (&ti->wq);
+ }
+ } else {
+ // device is unused!
+ PRINT_WARN ("Tape #%d was detached.\n",ti->blk_minor/2);
+ if (ti==first_tape_info) {
+ first_tape_info=ti->next;
+ } else {
+ lastti=first_tape_info;
+ while (lastti->next!=ti) lastti=lastti->next;
+ lastti->next=ti->next;
+ }
+#ifdef CONFIG_DEVFS_FS
+ for (frontend=first_frontend;frontend!=NULL;frontend=frontend->next)
+ frontend->rmdevfstree(ti);
+ tape_rmdevfsroots(ti);
+#endif
+ kfree(ti);
+ }
+ s390irq_spin_unlock_irqrestore(irq,lockflags);


+ return;
+}
+
+

+void
+tape_dump_sense (devstat_t * stat)
+{
+#ifdef TAPE_DEBUG
+ int sl;
+#endif
+#if 0
+
+ PRINT_WARN ("------------I/O resulted in unit check:-----------\n");
+ for (sl = 0; sl < 4; sl++) {
+ PRINT_WARN ("Sense:");
+ for (sct = 0; sct < 8; sct++) {
+ PRINT_WARN (" %2d:0x%02X", 8 * sl + sct,
+ stat->ii.sense.data[8 * sl + sct]);
+ }
+ PRINT_WARN ("\n");
+ }
+ PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
+ " %02X%02X%02X%02X %02X%02X%02X%02X \n",
+ stat->ii.sense.data[0], stat->ii.sense.data[1],
+ stat->ii.sense.data[2], stat->ii.sense.data[3],
+ stat->ii.sense.data[4], stat->ii.sense.data[5],
+ stat->ii.sense.data[6], stat->ii.sense.data[7],
+ stat->ii.sense.data[8], stat->ii.sense.data[9],
+ stat->ii.sense.data[10], stat->ii.sense.data[11],
+ stat->ii.sense.data[12], stat->ii.sense.data[13],
+ stat->ii.sense.data[14], stat->ii.sense.data[15]);
+ PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
+ " %02X%02X%02X%02X %02X%02X%02X%02X \n",
+ stat->ii.sense.data[16], stat->ii.sense.data[17],
+ stat->ii.sense.data[18], stat->ii.sense.data[19],
+ stat->ii.sense.data[20], stat->ii.sense.data[21],
+ stat->ii.sense.data[22], stat->ii.sense.data[23],
+ stat->ii.sense.data[24], stat->ii.sense.data[25],
+ stat->ii.sense.data[26], stat->ii.sense.data[27],
+ stat->ii.sense.data[28], stat->ii.sense.data[29],
+ stat->ii.sense.data[30], stat->ii.sense.data[31]);
+#endif
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"SENSE:");
+ for (sl=0;sl<31;sl++) {
+ debug_int_event (tape_debug_area,3,stat->ii.sense.data[sl]);
+ }
+ debug_int_exception (tape_debug_area,3,stat->ii.sense.data[31]);
+#endif
+}
+
+/*
+ * Setup tape_info_t structure of a tape device
+ */
+int
+tape_setup (tape_info_t * ti, int irq, int minor)
+{
+ long lockflags;


+ int rc = 0;
+

+ if (minor>254) {
+ PRINT_WARN ("Device id %d on irq %d will not be accessible since this driver is restricted to 128 devices.\n",minor/2,irq);
+ return -EINVAL;
+ }
+ rc = get_dev_info_by_irq (irq, &(ti->devinfo));
+ if (rc == -ENODEV) { /* end of device list */
+ return rc;
+ }
+ ti->rew_minor = minor;
+ ti->nor_minor = minor + 1;
+ ti->blk_minor = minor;
+#ifdef CONFIG_DEVFS_FS
+ tape_mkdevfsroots(ti);
+#endif
+ /* Register IRQ */
+#ifdef CONFIG_S390_TAPE_DYNAMIC
+ rc = s390_request_irq_special (irq, tape_irq, tape_noper_handler,0, "tape", &(ti->devstat));
+#else
+ rc = s390_request_irq (irq, tape_irq, 0, "tape", &(ti->devstat));
+#endif
+ s390irq_spin_lock_irqsave (irq, lockflags);
+ ti->next = NULL;
+ if (rc)
+ PRINT_WARN ("Cannot register irq %d, rc=%d\n", irq, rc);
+ init_waitqueue_head (&ti->wq);
+ ti->kernbuf = ti->userbuf = ti->discdata = NULL;
+ tapestate_set (ti, TS_UNUSED);
+ ti->discdata=NULL;
+ ti->discipline->setup_assist (ti);
+ ti->wanna_wakeup=0;
+ s390irq_spin_unlock_irqrestore (irq, lockflags);


+ return rc;
+}
+

+/*
+ * tape_init will register the driver for each tape.
+ */
+int
+tape_init (void)
+{
+ long lockflags;
+ s390_dev_info_t dinfo;
+ tape_discipline_t *disc;
+ tape_info_t *ti = NULL, *tempti = NULL;
+ char *opt_char,*opt_block,*opt_3490,*opt_3480;
+ int irq = 0, rc, retries = 0, tape_num = 0;
+ static int initialized=0;
+
+ if (initialized) // Only init the devices once
+ return 0;
+ initialized=1;
+
+#ifdef TAPE_DEBUG
+ tape_debug_area = debug_register ( "tape", 3, 2, 10);
+ debug_register_view(tape_debug_area,&debug_hex_ascii_view);
+ debug_text_event (tape_debug_area,3,"begin init");


+#endif /* TAPE_DEBUG */
+

+ /* print banner */
+ PRINT_WARN ("IBM S/390 Tape Device Driver (v1.01).\n");
+ PRINT_WARN ("(C) IBM Deutschland Entwicklung GmbH, 2000\n");
+ opt_char=opt_block=opt_3480=opt_3490="not present";
+#ifdef CONFIG_S390_TAPE_CHAR
+ opt_char="built in";
+#endif
+#ifdef CONFIG_S390_TAPE_BLOCK
+ opt_block="built in";
+#endif
+#ifdef CONFIG_S390_TAPE_3480
+ opt_3480="built in";
+#endif
+#ifdef CONFIG_S390_TAPE_3490
+ opt_3490="built in";
+#endif
+ /* print feature info */
+ PRINT_WARN ("character device frontend : %s\n",opt_char);
+ PRINT_WARN ("block device frontend : %s\n",opt_block);
+ PRINT_WARN ("support for 3480 compatible : %s\n",opt_3480);
+ PRINT_WARN ("support for 3490 compatible : %s\n",opt_3490);
+
+#ifndef MODULE
+ tape_split_parm_string(tape_parm_string);
+#endif
+ if (*tape)
+ PRINT_INFO ("Using ranges supplied in parameters, disabling autoprobe mode.\n");
+ else
+ PRINT_INFO ("No parameters supplied, enabling autoprobe mode for all supported devices.\n");
+#ifdef CONFIG_S390_TAPE_3490
+ if (*tape)
+ first_discipline = tape3490_init (0); // no autoprobe for devices
+ else
+ first_discipline = tape3490_init (1); // do autoprobe since no parm specified
+ first_discipline->next = NULL;
+#endif
+
+#ifdef CONFIG_S390_TAPE_3480
+ if (first_discipline == NULL) {
+ if (*tape)
+ first_discipline = tape3480_init (0); // no autoprobe for devices
+ else
+ first_discipline = tape3480_init (1); // do autoprobe since no parm specified
+ first_discipline->next = NULL;
+ } else {
+ if (*tape)
+ first_discipline->next = tape3480_init (0); // no autoprobe for devices
+ else
+ first_discipline->next = tape3480_init (1); // do autoprobe since no parm specified
+ ((tape_discipline_t*) (first_discipline->next))->next=NULL;
+ }
+#endif
+#ifdef CONFIG_DEVFS_FS
+ tape_devfs_root_entry=devfs_mk_dir (NULL, "tape", NULL);
+#endif CONFIG_DEVFS_FS
+
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"dev detect");
+#endif /* TAPE_DEBUG */
+ /* Allocate the tape structures */
+ if (*tape!=NULL) {
+ // we have parameters, continue with parsing the parameters and set the devices online
+ tape_parm_parse (tape);
+ } else {
+ // we are running in autodetect mode, search all devices for compatibles


+ for (irq = get_irq_first(); irq!=-ENODEV; irq=get_irq_next(irq)) {
+ rc = get_dev_info_by_irq (irq, &dinfo);
+ disc = first_discipline;

+ while ((disc != NULL) && (disc->cu_type != dinfo.sid_data.cu_type))


+ disc = (tape_discipline_t *) (disc->next);

+ if ((disc == NULL) || (rc == -ENODEV))
+ continue;


+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"det irq: ");
+ debug_int_event (tape_debug_area,3,irq);
+ debug_text_event (tape_debug_area,3,"cu: ");
+ debug_int_event (tape_debug_area,3,disc->cu_type);
+#endif /* TAPE_DEBUG */
+ PRINT_INFO ("using devno %04x with discipline %04x on irq %d as tape device %d\n",dinfo.devno,dinfo.sid_data.cu_type,irq,tape_num/2);

+ /* Allocate tape structure */
+ ti = kmalloc (sizeof (tape_info_t), GFP_ATOMIC);
+ if (ti == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,3,"ti:no mem ");
+#endif /* TAPE_DEBUG */
+ PRINT_INFO ("tape: can't allocate memory for "
+ "tape info structure\n");
+ continue;
+ }
+ memset(ti,0,sizeof(tape_info_t));
+ ti->discipline = disc;
+ disc->tape = ti;
+ rc = tape_setup (ti, irq, tape_num);
+ if (rc) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"tsetup err");
+ debug_int_exception (tape_debug_area,3,rc);
+#endif /* TAPE_DEBUG */
+ kfree (ti);
+ } else {
+ s390irq_spin_lock_irqsave (irq, lockflags);
+ if (first_tape_info == NULL) {
+ first_tape_info = ti;
+ } else {
+ tempti = first_tape_info;
+ while (tempti->next != NULL)
+ tempti = tempti->next;
+ tempti->next = ti;
+ }
+ tape_num += 2;
+ s390irq_spin_unlock_irqrestore (irq, lockflags);
+ }
+ }
+ }
+
+ /* Allocate local buffer for the ccwcache */
+ tape_init_emergency_req ();
+#ifdef CONFIG_PROC_FS
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+ tape_devices_entry = create_proc_entry ("tapedevices",
+ S_IFREG | S_IRUGO | S_IWUSR,
+ &proc_root);
+ tape_devices_entry->proc_fops = &tape_devices_file_ops;
+ tape_devices_entry->proc_iops = &tape_devices_inode_ops;
+#else
+ tape_devices_entry = (struct proc_dir_entry *) kmalloc
+ (sizeof (struct proc_dir_entry), GFP_ATOMIC);
+ if (tape_devices_entry) {
+ memset (tape_devices_entry, 0, sizeof (struct proc_dir_entry));
+ tape_devices_entry->name = "tapedevices";
+ tape_devices_entry->namelen = strlen ("tapedevices");
+ tape_devices_entry->low_ino = 0;
+ tape_devices_entry->mode = (S_IFREG | S_IRUGO | S_IWUSR);
+ tape_devices_entry->nlink = 1;
+ tape_devices_entry->uid = 0;
+ tape_devices_entry->gid = 0;
+ tape_devices_entry->size = 0;
+ tape_devices_entry->get_info = NULL;
+ tape_devices_entry->ops = &tape_devices_inode_ops;
+ proc_register (&proc_root, tape_devices_entry);
+ }
+#endif


+#endif /* CONFIG_PROC_FS */
+

+ return 0;
+}
+

+#ifdef MODULE
+MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte (co...@de.ibm.com)");
+MODULE_DESCRIPTION("Linux for S/390 channel attached tape device driver");
+MODULE_PARM (tape, "1-" __MODULE_STRING (256) "s");
+
+int
+init_module (void)
+{
+#ifdef CONFIG_S390_TAPE_CHAR
+ tapechar_init ();
+#endif
+#ifdef CONFIG_S390_TAPE_BLOCK
+ tapeblock_init ();


+#endif
+ return 0;
+}
+

+void
+cleanup_module (void)
+{
+ tape_info_t *ti ,*temp;
+ tape_frontend_t* frontend, *tempfe;
+ tape_discipline_t* disc ,*tempdi;
+ int i;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"cleaup mod");


+#endif /* TAPE_DEBUG */
+

+ if (*tape) {
+ // we are running with parameters. we'll now deregister from our devno's
+ for (i=0;i<devregct;i++) {
+ s390_device_unregister(tape_devreg[devregct]);
+ }
+ }
+ ti = first_tape_info;
+ while (ti != NULL) {
+ temp = ti;
+ ti = ti->next;
+ //cleanup a device
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"free irq:");
+ debug_int_event (tape_debug_area,6,temp->devinfo.irq);
+#endif /* TAPE_DEBUG */
+ free_irq (temp->devinfo.irq, &(temp->devstat));
+ if (temp->discdata) kfree (temp->discdata);
+ if (temp->kernbuf) kfree (temp->kernbuf);
+ if (temp->cqr) tape_free_request(temp->cqr);
+#ifdef CONFIG_DEVFS_FS
+ for (frontend=first_frontend;frontend!=NULL;frontend=frontend->next)
+ frontend->rmdevfstree(temp);
+ tape_rmdevfsroots(temp);
+#endif
+ kfree (temp);
+ }
+#ifdef CONFIG_DEVFS_FS
+ devfs_unregister (tape_devfs_root_entry);
+#endif CONFIG_DEVFS_FS
+#ifdef CONFIG_PROC_FS
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+ remove_proc_entry ("tapedevices", &proc_root);
+#else
+ proc_unregister (&proc_root, tape_devices_entry->low_ino);
+ kfree (tape_devices_entry);
+#endif /* LINUX_IS_24 */
+#endif
+#ifdef CONFIG_S390_TAPE_CHAR
+ tapechar_uninit();
+#endif
+#ifdef CONFIG_S390_TAPE_BLOCK
+ tapeblock_uninit();
+#endif
+ frontend=first_frontend;
+ while (frontend != NULL) {
+ tempfe = frontend;
+ frontend = frontend->next;
+ kfree (tempfe);
+ }
+ disc=first_discipline;
+ while (disc != NULL) {
+ if (*tape)
+ disc->shutdown(0);
+ else
+ disc->shutdown(1);
+ tempdi = disc;
+ disc = disc->next;
+ kfree (tempdi);
+ }
+ /* Deallocate the local buffer for the ccwcache */
+ tape_cleanup_emergency_req ();
+#ifdef TAPE_DEBUG
+ debug_unregister (tape_debug_area);


+#endif /* TAPE_DEBUG */
+}

+#endif /* MODULE */
+
+inline void
+tapestate_set (tape_info_t * ti, int newstate)
+{
+ if (ti->tape_state == TS_NOT_OPER) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"ts_set err");
+ debug_text_exception (tape_debug_area,3,"dev n.oper");
+#endif /* TAPE_DEBUG */
+ } else {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,4,"ts. dev: ");
+ debug_int_event (tape_debug_area,4,ti->blk_minor);
+ debug_text_event (tape_debug_area,4,"old ts: ");
+ debug_text_event (tape_debug_area,4,(((tapestate_get (ti) < TS_SIZE) &&
+ (tapestate_get (ti) >=0 )) ?
+ state_verbose[tapestate_get (ti)] :
+ "UNKNOWN TS"));
+ debug_text_event (tape_debug_area,4,"new ts: ");
+ debug_text_event (tape_debug_area,4,(((newstate < TS_SIZE) &&
+ (newstate >= 0)) ?
+ state_verbose[newstate] :
+ "UNKNOWN TS"));
+#endif /* TAPE_DEBUG */
+ ti->tape_state = newstate;
+ }
+}
+
+inline int
+tapestate_get (tape_info_t * ti)
+{
+ return (ti->tape_state);
+}
+
+void
+tapestate_event (tape_info_t * ti, int event)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"te! dev: ");
+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+ debug_text_event (tape_debug_area,6,"event:");
+ debug_text_event (tape_debug_area,6,((event >=0) &&
+ (event < TE_SIZE)) ?
+ event_verbose[event] : "TE UNKNOWN");
+ debug_text_event (tape_debug_area,6,"state:");
+ debug_text_event (tape_debug_area,6,((tapestate_get(ti) >= 0) &&


+ (tapestate_get(ti) < TS_SIZE)) ?
+ state_verbose[tapestate_get (ti)] :

+ "TS UNKNOWN");
+#endif /* TAPE_DEBUG */
+ if (event == TE_ERROR) {
+ ti->discipline->error_recovery(ti);
+ } else {
+ if ((event >= 0) &&
+ (event < TE_SIZE) &&
+ (tapestate_get (ti) >= 0) &&
+ (tapestate_get (ti) < TS_SIZE) &&
+ ((*(ti->discipline->event_table))[tapestate_get (ti)][event] != NULL))
+ ((*(ti->discipline->event_table))[tapestate_get (ti)][event]) (ti);
+ else {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,3,"TE UNEXPEC");
+#endif /* TAPE_DEBUG */
+ ti->discipline->default_handler (ti);
+ }
+ }
+}
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only. This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-indent-level: 4
+ * c-brace-imaginary-offset: 0
+ * c-brace-offset: -4
+ * c-argdecl-indent: 4
+ * c-label-offset: -4
+ * c-continued-statement-offset: 4
+ * c-continued-brace-offset: 0
+ * indent-tabs-mode: nil
+ * tab-width: 8
+ * End:
+ */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape.h linux/drivers/s390/char/tape.h
--- v2.2.19/drivers/s390/char/tape.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape.h Wed Oct 10 01:41:05 2001
@@ -0,0 +1,203 @@
+/***************************************************************************
+ *
+ * drivers/s390/char/tape.h
+ * tape device driver for 3480/3490E tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************
+ */
+
+#ifndef _TAPE_H
+
+#define _TAPE_H
+#include <linux/config.h>
+#include <linux/blkdev.h>
+
+#define MAX_TAPES 7 /* Max tapes supported is 7*/
+#define TAPE_MAGIC 0xE3C1D7C5 /* is ebcdic-"TAPE" */
+
+typedef enum {
+ TS_UNUSED=0, TS_IDLE, TS_DONE, TS_FAILED,
+ TS_BLOCK_INIT,
+ TS_BSB_INIT,
+ TS_BSF_INIT,
+ TS_DSE_INIT,
+ TS_EGA_INIT,
+ TS_FSB_INIT,
+ TS_FSF_INIT,
+ TS_LDI_INIT,
+ TS_LBL_INIT,
+ TS_MSE_INIT,
+ TS_NOP_INIT,
+ TS_RBA_INIT,
+ TS_RBI_INIT,
+ TS_RBU_INIT,
+ TS_RBL_INIT,
+ TS_RDC_INIT,
+ TS_RFO_INIT,
+ TS_RSD_INIT,
+ TS_REW_INIT,
+ TS_REW_RELEASE_INIT,
+ TS_RUN_INIT,
+ TS_SEN_INIT,
+ TS_SID_INIT,
+ TS_SNP_INIT,
+ TS_SPG_INIT,
+ TS_SWI_INIT,
+ TS_SMR_INIT,
+ TS_SYN_INIT,
+ TS_TIO_INIT,
+ TS_UNA_INIT,
+ TS_WRI_INIT,
+ TS_WTM_INIT,
+ TS_NOT_OPER,
+ TS_SIZE } tape_stat;
+
+struct _tape_info_t; //Forward declaration
+
+typedef enum {
+ TE_START=0, TE_DONE, TE_FAILED, TE_ERROR, TE_OTHER,
+ TE_SIZE } tape_events;
+
+typedef void (*tape_disc_shutdown_t) (int);
+typedef void (*tape_event_handler_t) (struct _tape_info_t*);
+typedef ccw_req_t* (*tape_ccwgen_t)(struct _tape_info_t* ti,int count);
+typedef ccw_req_t* (*tape_reqgen_t)(struct request* req,struct _tape_info_t* ti,int tapeblock_major);
+typedef ccw_req_t* (*tape_rwblock_t)(const char* data,size_t count,struct _tape_info_t* ti);
+typedef void (*tape_freeblock_t)(ccw_req_t* cqr,struct _tape_info_t* ti);
+typedef void (*tape_setup_assist_t) (struct _tape_info_t*);
+#ifdef CONFIG_DEVFS_FS
+typedef void (*tape_devfs_handler_t) (struct _tape_info_t*);
+#endif
+typedef tape_event_handler_t tape_event_table_t[TS_SIZE][TE_SIZE];
+typedef struct _tape_discipline_t {
+ unsigned int cu_type;
+ tape_setup_assist_t setup_assist;
+ tape_event_handler_t error_recovery;
+ tape_reqgen_t bread;
+ tape_freeblock_t free_bread;
+ tape_rwblock_t write_block;
+ tape_freeblock_t free_write_block;
+ tape_rwblock_t read_block;
+ tape_freeblock_t free_read_block;
+ tape_ccwgen_t mtfsf;
+ tape_ccwgen_t mtbsf;
+ tape_ccwgen_t mtfsr;
+ tape_ccwgen_t mtbsr;
+ tape_ccwgen_t mtweof;
+ tape_ccwgen_t mtrew;
+ tape_ccwgen_t mtoffl;
+ tape_ccwgen_t mtnop;
+ tape_ccwgen_t mtbsfm;
+ tape_ccwgen_t mtfsfm;
+ tape_ccwgen_t mteom;
+ tape_ccwgen_t mterase;
+ tape_ccwgen_t mtsetdensity;
+ tape_ccwgen_t mtseek;
+ tape_ccwgen_t mttell;
+ tape_ccwgen_t mtsetdrvbuffer;
+ tape_ccwgen_t mtlock;
+ tape_ccwgen_t mtunlock;
+ tape_ccwgen_t mtload;
+ tape_ccwgen_t mtunload;
+ tape_ccwgen_t mtcompression;
+ tape_ccwgen_t mtsetpart;
+ tape_ccwgen_t mtmkpart;
+ tape_ccwgen_t mtiocget;
+ tape_ccwgen_t mtiocpos;
+ tape_disc_shutdown_t shutdown;
+ int (*discipline_ioctl_overload)(struct inode *,struct file*, unsigned int,unsigned long);
+ tape_event_table_t* event_table;
+ tape_event_handler_t default_handler;
+ struct _tape_info_t* tape; /* pointer for backreference */
+ void* next;
+} tape_discipline_t __attribute__ ((aligned(8)));
+
+typedef struct _tape_frontend_t {
+ tape_setup_assist_t device_setup;
+#ifdef CONFIG_DEVFS_FS
+ tape_devfs_handler_t mkdevfstree;
+ tape_devfs_handler_t rmdevfstree;
+#endif
+ void* next;
+} tape_frontend_t __attribute__ ((aligned(8)));
+
+
+typedef struct _tape_info_t {
+ wait_queue_head_t wq;
+ s390_dev_info_t devinfo; /* device info from Common I/O */
+ int wanna_wakeup;
+ int rew_minor; /* minor number for the rewinding tape */
+ int nor_minor; /* minor number for the nonrewinding tape */
+ int blk_minor; /* minor number for the block device */
+ devstat_t devstat; /* contains irq, devno, status */
+ size_t block_size; /* block size of tape */
+ int drive_type; /* Code indicating type of drive */
+ struct file *rew_filp; /* backpointer to file structure */
+ struct file *nor_filp;
+ struct file *blk_filp;
+ int tape_state; /* State of the device. See tape_stat */
+ int rc; /* Return code. */
+ tape_discipline_t* discipline;
+ request_queue_t request_queue;
+ struct request* current_request;
+ int blk_retries;
+ long position;
+ int medium_is_unloaded; // Becomes true when a unload-type operation was issued, false again when medium-insert was detected
+ ccw_req_t* cqr;
+ atomic_t bh_scheduled;
+ struct tq_struct bh_tq;
+#ifdef CONFIG_DEVFS_FS
+ devfs_handle_t devfs_dir; /* devfs handle for tape/DEVNO directory */
+ devfs_handle_t devfs_char_dir; /* devfs handle for tape/DEVNO/char directory */
+ devfs_handle_t devfs_block_dir; /* devfs handle for tape/DEVNO/block directory */
+ devfs_handle_t devfs_nonrewinding; /* devfs handle for tape/DEVNO/char/nonrewinding device */
+ devfs_handle_t devfs_rewinding; /* devfs handle for tape/DEVNO/char/rewinding device */
+ devfs_handle_t devfs_disc; /* devfs handle for tape/DEVNO/block/disc device */
+#endif
+ void* discdata;
+ void* kernbuf;
+ void* userbuf;
+ void* next;
+} tape_info_t __attribute__ ((aligned(8)));
+
+/* tape initialisation functions */
+int tape_init(void);
+int tape_setup (tape_info_t * ti, int irq, int minor);
+
+/* functoins for alloc'ing ccw stuff */
+inline ccw_req_t * tape_alloc_ccw_req (tape_info_t* ti, int cplength, int datasize);
+void tape_free_request (ccw_req_t * request);
+
+/* a function for dumping device sense info */
+void tape_dump_sense (devstat_t * stat);
+
+#ifdef CONFIG_S390_TAPE_DYNAMIC
+/* functions for dyn. dev. attach/detach */
+int tape_oper_handler ( int irq, struct _devreg *dreg);
+#endif
+
+/* functions for handling the status of a device */


+inline void tapestate_set (tape_info_t * ti, int newstate);
+inline int tapestate_get (tape_info_t * ti);
+void tapestate_event (tape_info_t * ti, int event);

+extern char* state_verbose[TS_SIZE];
+extern char* event_verbose[TE_SIZE];
+
+/****************************************************************************/
+
+/* Some linked lists for storing plugins and devices */
+extern tape_info_t *first_tape_info;
+extern tape_discipline_t *first_discipline;
+extern tape_frontend_t *first_frontend;
+
+/* The debug area */
+#ifdef TAPE_DEBUG
+extern debug_info_t *tape_debug_area;
+#endif
+
+#endif /* for ifdef tape.h */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape3480.c linux/drivers/s390/char/tape3480.c
--- v2.2.19/drivers/s390/char/tape3480.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape3480.c Wed Oct 10 01:41:05 2001
@@ -0,0 +1,156 @@
+/***************************************************************************
+ *
+ * drivers/s390/char/tape3480.c
+ * tape device discipline for 3480 tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************


+ */
+
+#include "tapedefs.h"

+#include <linux/version.h>
+#include <asm/ccwcache.h> /* CCW allocations */
+#include <asm/s390dyn.h>
+#include <asm/debug.h>
+#include <linux/compatmac.h>
+#include "tape.h"
+#include "tape34xx.h"
+#include "tape3480.h"
+
+tape_event_handler_t tape3480_event_handler_table[TS_SIZE][TE_SIZE] =
+{
+ /* {START , DONE, FAILED, ERROR, OTHER } */
+ {NULL, tape34xx_unused_done, NULL, NULL, NULL}, /* TS_UNUSED */
+ {NULL, tape34xx_idle_done, NULL, NULL, NULL}, /* TS_IDLE */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_DONE */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_FAILED */
+ {NULL, tape34xx_block_done, NULL, NULL, NULL}, /* TS_BLOCK_INIT */
+ {NULL, tape34xx_bsb_init_done, NULL, NULL, NULL}, /* TS_BSB_INIT */
+ {NULL, tape34xx_bsf_init_done, NULL, NULL, NULL}, /* TS_BSF_INIT */
+ {NULL, tape34xx_dse_init_done, NULL, NULL, NULL}, /* TS_DSE_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_EGA_INIT */
+ {NULL, tape34xx_fsb_init_done, NULL, NULL, NULL}, /* TS_FSB_INIT */
+ {NULL, tape34xx_fsf_init_done, NULL, NULL, NULL}, /* TS_FSF_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_LDI_INIT */
+ {NULL, tape34xx_lbl_init_done, NULL, NULL, NULL}, /* TS_LBL_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_MSE_INIT */
+ {NULL, tape34xx_nop_init_done, NULL, NULL, NULL}, /* TS_NOP_INIT */
+ {NULL, tape34xx_rfo_init_done, NULL, NULL, NULL}, /* TS_RBA_INIT */
+ {NULL, tape34xx_rbi_init_done, NULL, NULL, NULL}, /* TS_RBI_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBU_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBL_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RDC_INIT */
+ {NULL, tape34xx_rfo_init_done, NULL, NULL, NULL}, /* TS_RFO_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RSD_INIT */
+ {NULL, tape34xx_rew_init_done, NULL, NULL, NULL}, /* TS_REW_INIT */
+ {NULL, tape34xx_rew_release_init_done, NULL, NULL, NULL}, /* TS_REW_RELEASE_IMIT */
+ {NULL, tape34xx_run_init_done, NULL, NULL, NULL}, /* TS_RUN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SEN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SID_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SNP_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SPG_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SWI_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SMR_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SYN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_TIO_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_UNA_INIT */
+ {NULL, tape34xx_wri_init_done, NULL, NULL, NULL}, /* TS_WRI_INIT */
+ {NULL, tape34xx_wtm_init_done, NULL, NULL, NULL}, /* TS_WTM_INIT */
+ {NULL, NULL, NULL, NULL, NULL}}; /* TS_NOT_OPER */
+
+devreg_t tape3480_devreg = {
+ ci:
+ {hc:
+ {ctype:0x3480}},
+ flag:DEVREG_MATCH_CU_TYPE | DEVREG_TYPE_DEVCHARS,
+ oper_func:tape_oper_handler
+};
+
+
+void
+tape3480_setup_assist (tape_info_t * ti)
+{
+ tape3480_disc_data_t *data = NULL;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"3480 dsetu");
+ debug_text_event (tape_debug_area,6,"dev:");
+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif /* TAPE_DEBUG */
+ while (data == NULL)
+ data = kmalloc (sizeof (tape3480_disc_data_t), GFP_KERNEL);
+ data->modeset_byte = 0x00;
+ ti->discdata = (void *) data;
+}
+
+
+void
+tape3480_shutdown (int autoprobe) {
+ if (autoprobe)
+ s390_device_unregister(&tape3480_devreg);
+}
+
+tape_discipline_t *
+tape3480_init (int autoprobe)
+{
+ tape_discipline_t *disc;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"3480 init");
+#endif /* TAPE_DEBUG */
+ disc = kmalloc (sizeof (tape_discipline_t), GFP_KERNEL);
+ if (disc == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,3,"disc:nomem");
+#endif /* TAPE_DEBUG */
+ return disc;
+ }
+ disc->cu_type = 0x3480;
+ disc->setup_assist = tape3480_setup_assist;
+ disc->error_recovery = tape34xx_error_recovery;
+ disc->write_block = tape34xx_write_block;
+ disc->free_write_block = tape34xx_free_write_block;
+ disc->read_block = tape34xx_read_block;
+ disc->free_read_block = tape34xx_free_read_block;
+ disc->mtfsf = tape34xx_mtfsf;
+ disc->mtbsf = tape34xx_mtbsf;
+ disc->mtfsr = tape34xx_mtfsr;
+ disc->mtbsr = tape34xx_mtbsr;
+ disc->mtweof = tape34xx_mtweof;
+ disc->mtrew = tape34xx_mtrew;
+ disc->mtoffl = tape34xx_mtoffl;
+ disc->mtnop = tape34xx_mtnop;
+ disc->mtbsfm = tape34xx_mtbsfm;
+ disc->mtfsfm = tape34xx_mtfsfm;
+ disc->mteom = tape34xx_mteom;
+ disc->mterase = tape34xx_mterase;
+ disc->mtsetdensity = tape34xx_mtsetdensity;
+ disc->mtseek = tape34xx_mtseek;
+ disc->mttell = tape34xx_mttell;
+ disc->mtsetdrvbuffer = tape34xx_mtsetdrvbuffer;
+ disc->mtlock = tape34xx_mtlock;
+ disc->mtunlock = tape34xx_mtunlock;
+ disc->mtload = tape34xx_mtload;
+ disc->mtunload = tape34xx_mtunload;
+ disc->mtcompression = tape34xx_mtcompression;
+ disc->mtsetpart = tape34xx_mtsetpart;
+ disc->mtmkpart = tape34xx_mtmkpart;
+ disc->mtiocget = tape34xx_mtiocget;
+ disc->mtiocpos = tape34xx_mtiocpos;
+ disc->shutdown = tape3480_shutdown;
+ disc->discipline_ioctl_overload = tape34xx_ioctl_overload;
+ disc->event_table = &tape3480_event_handler_table;
+ disc->default_handler = tape34xx_default_handler;
+ disc->bread = tape34xx_bread;
+ disc->free_bread = tape34xx_free_bread;
+ disc->tape = NULL; /* pointer for backreference */
+ disc->next = NULL;
+ if (autoprobe)
+ s390_device_register(&tape3480_devreg);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"3480 regis");
+#endif /* TAPE_DEBUG */
+ return disc;
+}
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape3480.h linux/drivers/s390/char/tape3480.h
--- v2.2.19/drivers/s390/char/tape3480.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape3480.h Wed Oct 10 01:41:05 2001
@@ -0,0 +1,23 @@
+/***************************************************************************
+ *
+ * drivers/s390/char/tape3480.h
+ * tape device discipline for 3480 tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************
+ */
+
+#ifndef _TAPE3480_H
+
+#define _TAPE3480_H
+
+
+typedef struct _tape3480_disc_data_t {
+ __u8 modeset_byte;
+} tape3480_disc_data_t __attribute__ ((packed, aligned(8)));
+tape_discipline_t * tape3480_init (int);
+#endif // _TAPE3480_H
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape3490.c linux/drivers/s390/char/tape3490.c
--- v2.2.19/drivers/s390/char/tape3490.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape3490.c Wed Oct 10 01:41:05 2001
@@ -0,0 +1,156 @@
+/***************************************************************************
+ *
+ * drivers/s390/char/tape3490.c
+ * tape device discipline for 3490E tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************


+ */
+
+#include "tapedefs.h"

+#include <linux/version.h>
+#include <asm/ccwcache.h> /* CCW allocations */
+#include <asm/s390dyn.h>
+#include <asm/debug.h>
+#include <linux/compatmac.h>
+#include "tape.h"
+#include "tape34xx.h"
+#include "tape3490.h"
+
+tape_event_handler_t tape3490_event_handler_table[TS_SIZE][TE_SIZE] =
+{
+ /* {START , DONE, FAILED, ERROR, OTHER } */
+ {NULL, tape34xx_unused_done, NULL, NULL, NULL}, /* TS_UNUSED */
+ {NULL, tape34xx_idle_done, NULL, NULL, NULL}, /* TS_IDLE */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_DONE */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_FAILED */
+ {NULL, tape34xx_block_done, NULL, NULL, NULL}, /* TS_BLOCK_INIT */
+ {NULL, tape34xx_bsb_init_done, NULL, NULL, NULL}, /* TS_BSB_INIT */
+ {NULL, tape34xx_bsf_init_done, NULL, NULL, NULL}, /* TS_BSF_INIT */
+ {NULL, tape34xx_dse_init_done, NULL, NULL, NULL}, /* TS_DSE_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_EGA_INIT */
+ {NULL, tape34xx_fsb_init_done, NULL, NULL, NULL}, /* TS_FSB_INIT */
+ {NULL, tape34xx_fsf_init_done, NULL, NULL, NULL}, /* TS_FSF_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_LDI_INIT */
+ {NULL, tape34xx_lbl_init_done, NULL, NULL, NULL}, /* TS_LBL_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_MSE_INIT */
+ {NULL, tape34xx_nop_init_done, NULL, NULL, NULL}, /* TS_NOP_INIT */
+ {NULL, tape34xx_rfo_init_done, NULL, NULL, NULL}, /* TS_RBA_INIT */
+ {NULL, tape34xx_rbi_init_done, NULL, NULL, NULL}, /* TS_RBI_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBU_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBL_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RDC_INIT */
+ {NULL, tape34xx_rfo_init_done, NULL, NULL, NULL}, /* TS_RFO_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RSD_INIT */
+ {NULL, tape34xx_rew_init_done, NULL, NULL, NULL}, /* TS_REW_INIT */
+ {NULL, tape34xx_rew_release_init_done, NULL, NULL, NULL}, /* TS_REW_RELEASE_IMIT */
+ {NULL, tape34xx_run_init_done, NULL, NULL, NULL}, /* TS_RUN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SEN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SID_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SNP_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SPG_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SWI_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SMR_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SYN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_TIO_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_UNA_INIT */
+ {NULL, tape34xx_wri_init_done, NULL, NULL, NULL}, /* TS_WRI_INIT */
+ {NULL, tape34xx_wtm_init_done, NULL, NULL, NULL}, /* TS_WTM_INIT */
+ {NULL, NULL, NULL, NULL, NULL}}; /* TS_NOT_OPER */
+
+devreg_t tape3490_devreg = {
+ ci:
+ {hc:
+ {ctype:0x3490}},
+ flag:DEVREG_MATCH_CU_TYPE | DEVREG_TYPE_DEVCHARS,
+ oper_func:tape_oper_handler
+};
+
+void
+tape3490_setup_assist (tape_info_t * ti)
+{
+ tape3490_disc_data_t *data = NULL;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"3490 dsetu");
+ debug_text_event (tape_debug_area,6,"dev:");
+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif /* TAPE_DEBUG */
+ while (data == NULL)
+ data = kmalloc (sizeof (tape3490_disc_data_t), GFP_KERNEL);
+ data->modeset_byte = 0x00;
+ ti->discdata = (void *) data;
+}
+
+
+void
+tape3490_shutdown (int autoprobe) {
+ if (autoprobe)
+ s390_device_unregister(&tape3490_devreg);
+}
+
+
+tape_discipline_t *
+tape3490_init (int autoprobe)
+{
+ tape_discipline_t *disc;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"3490 init");
+#endif /* TAPE_DEBUG */
+ disc = kmalloc (sizeof (tape_discipline_t), GFP_KERNEL);
+ if (disc == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,3,"disc:nomem");
+#endif /* TAPE_DEBUG */
+ return disc;
+ }
+ disc->cu_type = 0x3490;
+ disc->setup_assist = tape3490_setup_assist;
+ disc->error_recovery = tape34xx_error_recovery;
+ disc->write_block = tape34xx_write_block;
+ disc->free_write_block = tape34xx_free_write_block;
+ disc->read_block = tape34xx_read_block;
+ disc->free_read_block = tape34xx_free_read_block;
+ disc->mtfsf = tape34xx_mtfsf;
+ disc->mtbsf = tape34xx_mtbsf;
+ disc->mtfsr = tape34xx_mtfsr;
+ disc->mtbsr = tape34xx_mtbsr;
+ disc->mtweof = tape34xx_mtweof;
+ disc->mtrew = tape34xx_mtrew;
+ disc->mtoffl = tape34xx_mtoffl;
+ disc->mtnop = tape34xx_mtnop;
+ disc->mtbsfm = tape34xx_mtbsfm;
+ disc->mtfsfm = tape34xx_mtfsfm;
+ disc->mteom = tape34xx_mteom;
+ disc->mterase = tape34xx_mterase;
+ disc->mtsetdensity = tape34xx_mtsetdensity;
+ disc->mtseek = tape34xx_mtseek;
+ disc->mttell = tape34xx_mttell;
+ disc->mtsetdrvbuffer = tape34xx_mtsetdrvbuffer;
+ disc->mtlock = tape34xx_mtlock;
+ disc->mtunlock = tape34xx_mtunlock;
+ disc->mtload = tape34xx_mtload;
+ disc->mtunload = tape34xx_mtunload;
+ disc->mtcompression = tape34xx_mtcompression;
+ disc->mtsetpart = tape34xx_mtsetpart;
+ disc->mtmkpart = tape34xx_mtmkpart;
+ disc->mtiocget = tape34xx_mtiocget;
+ disc->mtiocpos = tape34xx_mtiocpos;
+ disc->shutdown = tape3490_shutdown;
+ disc->discipline_ioctl_overload = tape34xx_ioctl_overload;
+ disc->event_table = &tape3490_event_handler_table;
+ disc->default_handler = tape34xx_default_handler;
+ disc->bread = tape34xx_bread;
+ disc->free_bread = tape34xx_free_bread;
+ disc->tape = NULL; /* pointer for backreference */
+ disc->next = NULL;
+ if (autoprobe)
+ s390_device_register(&tape3490_devreg);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"3490 regis");
+#endif /* TAPE_DEBUG */
+ return disc;
+}
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape3490.h linux/drivers/s390/char/tape3490.h
--- v2.2.19/drivers/s390/char/tape3490.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape3490.h Wed Oct 10 01:41:05 2001
@@ -0,0 +1,24 @@
+
+/***************************************************************************
+ *
+ * drivers/s390/char/tape3490.h
+ * tape device discipline for 3490E tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************
+ */
+
+#ifndef _TAPE3490_H
+
+#define _TAPE3490_H
+
+
+typedef struct _tape3490_disc_data_t {
+ __u8 modeset_byte;
+} tape3490_disc_data_t __attribute__ ((packed, aligned(8)));
+tape_discipline_t * tape3490_init (int);
+#endif // _TAPE3490_H
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape34xx.c linux/drivers/s390/char/tape34xx.c
--- v2.2.19/drivers/s390/char/tape34xx.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape34xx.c Wed Oct 10 01:41:05 2001
@@ -0,0 +1,2382 @@
+/***************************************************************************
+ *
+ * drivers/s390/char/tape34xx.c
+ * common tape device discipline for 34xx tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************


+ */
+
+#include "tapedefs.h"

+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <asm/types.h>
+#include <asm/uaccess.h>
+#include <linux/stat.h>
+#include <linux/proc_fs.h>
+#include <asm/ccwcache.h>
+#include <asm/idals.h>

+#ifdef CONFIG_S390_TAPE_DYNAMIC
+#include <asm/s390dyn.h>
+#endif

+#include <asm/debug.h>
+#include <linux/compatmac.h>
+#include "tape.h"
+#include "tape34xx.h"
+
+#define PRINTK_HEADER "T34xx:"
+
+tape_event_handler_t tape34xx_event_handler_table[TS_SIZE][TE_SIZE] =
+{
+ /* {START , DONE, FAILED, ERROR, OTHER } */
+ {NULL, tape34xx_unused_done, NULL, NULL, NULL}, /* TS_UNUSED */
+ {NULL, tape34xx_idle_done, NULL, NULL, NULL}, /* TS_IDLE */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_DONE */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_FAILED */
+ {NULL, tape34xx_block_done, NULL, NULL, NULL}, /* TS_BLOCK_INIT */
+ {NULL, tape34xx_bsb_init_done, NULL, NULL, NULL}, /* TS_BSB_INIT */
+ {NULL, tape34xx_bsf_init_done, NULL, NULL, NULL}, /* TS_BSF_INIT */
+ {NULL, tape34xx_dse_init_done, NULL, NULL, NULL}, /* TS_DSE_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_EGA_INIT */
+ {NULL, tape34xx_fsb_init_done, NULL, NULL, NULL}, /* TS_FSB_INIT */
+ {NULL, tape34xx_fsf_init_done, NULL, NULL, NULL}, /* TS_FSF_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_LDI_INIT */
+ {NULL, tape34xx_lbl_init_done, NULL, NULL, NULL}, /* TS_LBL_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_MSE_INIT */
+ {NULL, tape34xx_nop_init_done, NULL, NULL, NULL}, /* TS_NOP_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBA_INIT */
+ {NULL, tape34xx_rbi_init_done, NULL, NULL, NULL}, /* TS_RBI_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBU_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RBL_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RDC_INIT */
+ {NULL, tape34xx_rfo_init_done, NULL, NULL, NULL}, /* TS_RFO_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_RSD_INIT */
+ {NULL, tape34xx_rew_init_done, NULL, NULL, NULL}, /* TS_REW_INIT */
+ {NULL, tape34xx_rew_release_init_done, NULL, NULL, NULL}, /* TS_REW_RELEASE_IMIT */
+ {NULL, tape34xx_run_init_done, NULL, NULL, NULL}, /* TS_RUN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SEN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SID_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SNP_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SPG_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SWI_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SMR_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_SYN_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_TIO_INIT */
+ {NULL, NULL, NULL, NULL, NULL}, /* TS_UNA_INIT */
+ {NULL, tape34xx_wri_init_done, NULL, NULL, NULL}, /* TS_WRI_INIT */
+ {NULL, tape34xx_wtm_init_done, NULL, NULL, NULL}, /* TS_WTM_INIT */
+ {NULL, NULL, NULL, NULL, NULL}}; /* TS_NOT_OPER */
+
+
+int
+tape34xx_ioctl_overload (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ return -EINVAL; // no additional ioctls
+
+}
+
+ccw_req_t *
+tape34xx_write_block (const char *data, size_t count, tape_info_t * ti)
+{
+ long lockflags;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ void *mem;
+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xwbl nomem");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ mem = kmalloc (count, GFP_KERNEL);
+ if (!mem) {
+ tape_free_request (cqr);
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xwbl nomem");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ if (copy_from_user (mem, data, count)) {
+ kfree (mem);
+ tape_free_request (cqr);
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xwbl segf.");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+
+ ccw->cmd_code = WRITE_CMD;
+ ccw->flags = 0;
+ ccw->count = count;
+ set_normalized_cda (ccw, (unsigned long) mem);
+ if ((ccw->cda) == 0) {
+ kfree (mem);
+ tape_free_request (cqr);
+ return NULL;
+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = mem;
+ ti->userbuf = (void *) data;
+ tapestate_set (ti, TS_WRI_INIT);
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xwbl ccwg");
+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+
+void
+tape34xx_free_write_block (ccw_req_t * cqr, tape_info_t * ti)
+{
+ unsigned long lockflags;
+ ccw1_t *ccw;
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ccw = cqr->cpaddr;
+ ccw++;
+ clear_normalized_cda (ccw);
+ kfree (ti->kernbuf);
+ tape_free_request (cqr);
+ ti->kernbuf = ti->userbuf = NULL;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xfwb free");


+#endif /* TAPE_DEBUG */
+}

+
+ccw_req_t *
+tape34xx_read_block (const char *data, size_t count, tape_info_t * ti)
+{
+ long lockflags;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ void *mem;
+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xrbl nomem");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ mem = kmalloc (count, GFP_KERNEL);
+ if (!mem) {
+ tape_free_request (cqr);
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xrbl nomem");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+
+ ccw->cmd_code = READ_FORWARD;
+ ccw->flags = 0;
+ ccw->count = count;
+ set_normalized_cda (ccw, (unsigned long) mem);
+ if ((ccw->cda) == 0) {
+ kfree (mem);
+ tape_free_request (cqr);
+ return NULL;
+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = mem;
+ ti->userbuf = (void *) data;
+ tapestate_set (ti, TS_RFO_INIT);
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xrbl ccwg");
+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+
+ccw_req_t *
+tape34xx_read_opposite (tape_info_t * ti,int novalue)
+{
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ size_t count;
+ // first, retrieve the count from the old cqr.
+ cqr = ti->cqr;
+ ccw = cqr->cpaddr;
+ ccw++;
+ count=ccw->count;
+ // free old cqr.
+ clear_normalized_cda (ccw);
+ tape_free_request (cqr);
+ // build new cqr
+ cqr = tape_alloc_ccw_req (ti, 3, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xrop nomem");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+
+ ccw->cmd_code = READ_BACKWARD;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = count;
+ set_normalized_cda (ccw, (unsigned long) ti->kernbuf);
+ if ((ccw->cda) == 0) {
+ tape_free_request (cqr);
+ return NULL;
+ }
+ ccw++;
+ ccw->cmd_code = FORSPACEBLOCK;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ ccw->cda = (unsigned long)ccw;
+ ccw++;
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 1;
+ ccw->cda = (unsigned long)ccw;
+ tapestate_set (ti, TS_RBA_INIT);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xrop ccwg");
+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+
+void
+tape34xx_free_read_block (ccw_req_t * cqr, tape_info_t * ti)
+{
+ unsigned long lockflags;
+ size_t cpysize;
+ ccw1_t *ccw;
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ccw = cqr->cpaddr;
+ ccw++;
+ cpysize = ccw->count - ti->devstat.rescnt;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+ if (copy_to_user (ti->userbuf, ti->kernbuf, cpysize)) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xfrb segf.");


+#endif /* TAPE_DEBUG */
+ }

+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ clear_normalized_cda (ccw);
+ kfree (ti->kernbuf);
+ tape_free_request (cqr);
+ ti->kernbuf = ti->userbuf = NULL;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xfrb free");


+#endif /* TAPE_DEBUG */
+}

+
+/*
+ * The IOCTL interface is implemented in the following section,
+ * excepted the MTRESET, MTSETBLK which are handled by tapechar.c
+ */
+/*
+ * MTFSF: Forward space over 'count' file marks. The tape is positioned
+ * at the EOT (End of Tape) side of the file mark.
+ */
+ccw_req_t *
+tape34xx_mtfsf (tape_info_t * ti, int count)
+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xfsf parm");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xfsf nomem");
+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+ for (i = 0; i < count; i++) {
+ ccw->cmd_code = FORSPACEFILE;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ }
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;
+ tapestate_set (ti, TS_FSF_INIT);
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xfsf ccwg");


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 40'
echo 'File patch-2.2.20 is continued in part 41'
echo "41" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:42 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part43

#!/bin/sh -x
# this is part 43 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 43; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ *
+ * drivers/s390/char/tapechar.h
+ * character device frontend for tape device driver


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *
+ *
+ ****************************************************************************
+ */
+

+#ifndef TAPECHAR_H
+#define TAPECHAR_H
+#include <linux/config.h>
+#define TAPECHAR_DEFAULTMODE 0020644
+#define TAPE_MAJOR 0 /* get dynamic major since no major officialy defined for tape */
+/*
+ * Prototypes for tape_fops
+ */
+ssize_t tape_read(struct file *, char *, size_t, loff_t *);
+ssize_t tape_write(struct file *, const char *, size_t, loff_t *);
+int tape_ioctl(struct inode *,struct file *,unsigned int,unsigned long);
+int tape_open (struct inode *,struct file *);
+int tape_release (struct inode *,struct file *);
+#ifdef CONFIG_DEVFS_FS
+void tapechar_mkdevfstree (tape_info_t* ti);
+#endif
+void tapechar_init (void);
+void tapechar_uninit (void);
+#endif /* TAPECHAR_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tapedefs.h linux/drivers/s390/char/tapedefs.h
--- v2.2.19/drivers/s390/char/tapedefs.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tapedefs.h Wed Oct 10 01:41:06 2001
@@ -0,0 +1,76 @@
+/***********************************************************************
+ * drivers/s390/char/tapedefs.h
+ * tape device driver for S/390 and zSeries tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ *
+ ***********************************************************************
+ */
+

+/* Kernel Version Compatibility section */
+#include <linux/version.h>
+#include <linux/blkdev.h>
+#include <linux/blk.h>
+#include <asm/irq.h>
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,2,17))
+#define TAPE_DEBUG // use s390 debug feature
+#else
+#undef TAPE_DEBUG // debug feature not supported by our 2.2.16 code
+static inline void set_normalized_cda ( ccw1_t * cp, unsigned long address ) {
+ cp -> cda = address;
+}
+static inline void clear_normalized_cda ( ccw1_t * ccw ) {
+ ccw -> cda = 0;
+}
+#define BUG() PRINT_FATAL("tape390: CRITICAL INTERNAL ERROR OCCURED. REPORT THIS BACK TO LINU...@DE.IBM.COM\n")
+#endif
+#define CONFIG_S390_TAPE_DYNAMIC // allow devices to be attached or detached on the fly
+#define TAPEBLOCK_RETRIES 20 // number of retries, when a block-dev request fails.
+
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+#define INIT_BLK_DEV(d_major,d_request_fn,d_queue_fn,d_current) \
+do { \
+ blk_dev[d_major].queue = d_queue_fn; \
+} while(0)
+static inline struct request *
+tape_next_request( request_queue_t *queue )
+{
+ return blkdev_entry_next_request(&queue->queue_head);
+}
+static inline void
+tape_dequeue_request( request_queue_t * q, struct request *req )
+{
+ blkdev_dequeue_request (req);
+}
+#else
+#define s390_dev_info_t dev_info_t
+typedef struct request *request_queue_t;
+#ifndef init_waitqueue_head
+#define init_waitqueue_head(x) do { *x = NULL; } while(0)
+#endif
+#define blk_init_queue(x,y) do {} while(0)
+#define blk_queue_headactive(x,y) do {} while(0)
+#define INIT_BLK_DEV(d_major,d_request_fn,d_queue_fn,d_current) \
+do { \
+ blk_dev[d_major].request_fn = d_request_fn; \
+ blk_dev[d_major].queue = d_queue_fn; \
+ blk_dev[d_major].current_request = d_current; \
+} while(0)
+static inline struct request *
+tape_next_request( request_queue_t *queue )
+{
+ return *queue;
+}
+static inline void
+tape_dequeue_request( request_queue_t * q, struct request *req )
+{
+ *q = req->next;
+ req->next = NULL;
+}
+#endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/net/ctc.c linux/drivers/s390/net/ctc.c
--- v2.2.19/drivers/s390/net/ctc.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/net/ctc.c Wed Oct 10 01:41:06 2001
@@ -1109,7 +1109,7 @@
X if (sense & 0x01)
X printk(KERN_DEBUG "%s: %s: Interface disconnect or Selective reset occurred (remote side)\n", dev->name, caller);
X else
- printk(KERN_DEBUG "%s: %s: System reset occured (remote side)\n", dev->name, caller);
+ printk(KERN_DEBUG "%s: %s: System reset occurred (remote side)\n", dev->name, caller);
X #endif
X } else if (sense & 0x20) {
X if (sense & 0x04)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/net/iucv.c linux/drivers/s390/net/iucv.c
--- v2.2.19/drivers/s390/net/iucv.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/s390/net/iucv.c Wed Oct 10 01:41:06 2001
@@ -20,6 +20,7 @@
X #include <asm/atomic.h>
X #include "iucv.h"


X #include <asm/io.h>
+#include <asm/irq.h>

X #include <asm/s390_ext.h>
X #include <asm/spinlock.h>
X #include <asm/ebcdic.h>
@@ -1531,11 +1532,16 @@
X inline void
X top_half_interrupt (struct pt_regs *regs, __u16 code)
X {


+ int cpu = smp_processor_id();

X iucv_packet *pkt;
+
+ irq_enter(cpu, 0x4000);
+
X pkt = (iucv_packet *) kmalloc
X (sizeof (iucv_packet), GFP_ATOMIC);
X if (pkt == NULL) {
X printk (KERN_DEBUG "out of memory\n");
+ irq_exit(cpu, 0x4000);
X return;
X }
X memcpy (pkt->data, iucv_external_int_buffer, 40);
@@ -1560,6 +1566,7 @@
X queue_task (&short_task, &tq_immediate);
X mark_bh (IMMEDIATE_BH);
X }
+ irq_exit(cpu, 0x4000);
X return;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/audio/cs4215.h linux/drivers/sbus/audio/cs4215.h
--- v2.2.19/drivers/sbus/audio/cs4215.h Sun Mar 25 17:37:35 2001
+++ linux/drivers/sbus/audio/cs4215.h Mon Oct 22 10:34:26 2001
@@ -31,6 +31,7 @@
X #define CS4215_MLB (1<<4) /* 1: Microphone: 20dB gain disabled */
X #define CS4215_RSRVD_1 (1<<5)
X
+#define CS4215_STATUS_MASK 0xe4 /* Status bits */
X
X /* Time Slot 2, Data Format Register */
X #define CS4215_DFR_LINEAR16 0
@@ -45,7 +46,7 @@
X } CS4215_FREQ[] = {
X { 8000, (1<<4), (0<<3) },
X { 16000, (1<<4), (1<<3) },
- { 27429, (1<<4), (2<<3) }, /* Actually 24428.57 */
+ { 27429, (1<<4), (2<<3) }, /* Actually 27428.57 */
X { 32000, (1<<4), (3<<3) },
X /* { NA, (1<<4), (4<<3) }, */
X /* { NA, (1<<4), (5<<3) }, */
@@ -63,7 +64,8 @@
X };
X #define CS4215_HPF (1<<7) /* High Pass Filter, 1: Enabled */
X
-#define CS4215_12_MASK 0xfcbf /* Mask off reserved bits in slot 1 & 2 */
+#define CS4215_FREQ_MASK 0x38 /* Frequency selection bits */
+#define CS4215_12_MASK 0xfcbf /* Mask off reserved bits in slot 1 & 2 */
X
X /* Time Slot 3, Serial Port Control register */
X #define CS4215_XEN (1<<0) /* 0: Enable serial output */
@@ -76,6 +78,8 @@
X #define CS4215_MCK_XTL2 (2<<4) /* 16.9344 MHz clock source */
X #define CS4215_MCK_CLK1 (3<<4) /* Clockin, 256 x Fs */
X #define CS4215_MCK_CLK2 (4<<4) /* Clockin, see DFR */
+
+#define CS4215_CLOCK_MASK 0x70 /* Clock source selection bits */
X
X /* Time Slot 4, Test Register */
X #define CS4215_DAD (1<<0) /* 0:Digital-Dig loop, 1:Dig-Analog-Dig loop */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/audio/dbri.c linux/drivers/sbus/audio/dbri.c
--- v2.2.19/drivers/sbus/audio/dbri.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/sbus/audio/dbri.c Mon Oct 22 10:34:26 2001
@@ -1490,7 +1490,7 @@
X */
X
X i = 64;
- while (((dbri->mm.status & 0xe4) != 0x20) && --i) udelay(125);
+ while (((dbri->mm.status & CS4215_STATUS_MASK) != CS4215_RSRVD_1) && --i) udelay(125);
X if (i == 0) {
X return 0;
X }
@@ -1914,9 +1914,9 @@


X return -1;
X }
X

- dbri->mm.ctrl[1] &= ~ 0x38;
+ dbri->mm.ctrl[1] &= ~ CS4215_FREQ_MASK;
X dbri->mm.ctrl[1] |= CS4215_FREQ[i].csval;
- dbri->mm.ctrl[2] &= ~ 0x70;
+ dbri->mm.ctrl[2] &= ~ CS4215_CLOCK_MASK;
X dbri->mm.ctrl[2] |= CS4215_FREQ[i].xtal;
X
X dbri->perchip_info.play.sample_rate = rate;
@@ -2443,7 +2443,7 @@
X
X printk(KERN_INFO "audio%d at 0x%lx (irq %d) is DBRI(%c)+CS4215(%d)\n",
X num_drivers, (unsigned long)dbri->regs,
- dbri->irq, dbri->dbri_version, dbri->mm.version);
+ dbri->irq, dbri->dbri_version, dbri->mm.version & CS4215_VERSION_MASK);


X
X return 0;
X }

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/aurora.c linux/drivers/sbus/char/aurora.c
--- v2.2.19/drivers/sbus/char/aurora.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/sbus/char/aurora.c Wed Oct 10 01:41:06 2001
@@ -1,7 +1,7 @@
X /*
X * linux/drivers/sbus/char/aurora.c -- Aurora multiport driver
X *
- * Copyright (c) 1999 by Oliver Aldulea (o...@bv.ro)
+ * Copyright (c) 1999 by Oliver Aldulea (oli at bv.ro)
X *
X * This code is based on the RISCom/8 multiport serial driver written
X * by Dmitry Gorodchanin (pgm...@ibi.com), based on the Linux serial
@@ -1556,33 +1556,58 @@
X if (!tty || !port->xmit_buf || !tmp_buf)
X return 0;
X
- if (from_user)
+ save_flags(flags);
+ if (from_user) {
X down(&tmp_buf_sem);
+ while (1) {
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
+ if (c <= 0)
+ break;
X
- save_flags(flags);
- while (1) {
- cli();
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
- if (c <= 0)
- break;
+ c -= copy_from_user(tmp_buf, buf, c);
+ if (!c) {
+ if (!total)
+ total = -EFAULT;
+ break;
+ }
X
- if (from_user) {
- copy_from_user(tmp_buf, buf, c);
+ cli();
X c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
X SERIAL_XMIT_SIZE - port->xmit_head));
X memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c);
- } else
+ port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ port->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
+ up(&tmp_buf_sem);
+ } else {
+ while (1) {
+ cli();
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
+ if (c <= 0) {
+ restore_flags(flags);
+ break;
+ }
+
X memcpy(port->xmit_buf + port->xmit_head, buf, c);
- port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
- port->xmit_cnt += c;
- restore_flags(flags);
- buf += c;
- count -= c;
- total += c;
+ port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ port->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
X }
- if (from_user)
- up(&tmp_buf_sem);
+
+
+ cli();
X if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped &&
X !(port->SRER & SRER_TXRDY)) {
X port->SRER |= SRER_TXRDY;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/aurora.h linux/drivers/sbus/char/aurora.h
--- v2.2.19/drivers/sbus/char/aurora.h Sun Mar 25 17:31:39 2001
+++ linux/drivers/sbus/char/aurora.h Wed Oct 10 01:41:06 2001
@@ -243,7 +243,7 @@
X struct tty_struct * tty;
X int count;
X int blocked_open;
- int event;
+ long event;
X int timeout;
X int close_delay;
X long session;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/envctrl.c linux/drivers/sbus/char/envctrl.c
--- v2.2.19/drivers/sbus/char/envctrl.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/sbus/char/envctrl.c Wed Oct 10 01:41:06 2001
@@ -1,4 +1,4 @@
-/* $Id: envctrl.c,v 1.9.2.2 2000/11/08 09:43:04 davem Exp $
+/* $Id: envctrl.c,v 1.9.2.3 2001/06/19 16:49:44 davem Exp $
X * envctrl.c: Temperature and Fan monitoring on Machines providing it.
X *
X * Copyright (C) 1998 Eddie C. Dost (e...@skynet.be)
@@ -239,7 +239,7 @@
X printk(KERN_INFO "envctrl: Busy bit will not clear.\n");
X }
X
-/* Function Description: Send the adress for a read access.
+/* Function Description: Send the address for a read access.
X * Return : 0 if not acknowledged, otherwise acknowledged.
X */
X static int envctrl_i2c_read_addr(unsigned char addr)


@@ -265,7 +265,7 @@
X }

X }
X
-/* Function Description: Send the adress for write mode.
+/* Function Description: Send the address for write mode.
X * Return : None.
X */
X static void envctrl_i2c_write_addr(unsigned char addr)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/pcikbd.c linux/drivers/sbus/char/pcikbd.c
--- v2.2.19/drivers/sbus/char/pcikbd.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/sbus/char/pcikbd.c Wed Oct 10 01:41:06 2001
@@ -1,4 +1,4 @@
-/* $Id: pcikbd.c,v 1.27.2.2 2000/01/21 01:05:45 davem Exp $
+/* $Id: pcikbd.c,v 1.27.2.4 2001/06/03 13:41:48 ecd Exp $
X * pcikbd.c: Ultra/AX PC keyboard support.
X *
X * Copyright (C) 1997 Eddie C. Dost (e...@skynet.be)
@@ -48,6 +48,7 @@
X static int pcikbd_mrcoffee = 0;
X #else
X #define pcikbd_mrcoffee 0
+extern void (*prom_keyboard)(void);
X #endif
X
X static unsigned long pcikbd_iobase = 0;
@@ -58,6 +59,9 @@
X static volatile unsigned char acknowledge = 0;
X static volatile unsigned char resend = 0;
X
+static void pcikbd_write(int address, int data);
+static int pcikbd_wait_for_input(void);
+
X unsigned char pckbd_read_mask = KBD_STAT_OBF;
X
X extern int pcikbd_init(void);
@@ -250,7 +254,7 @@
X e0_keys[scancode - 128];
X }
X
-int do_acknowledge(unsigned char scancode)
+static int do_acknowledge(unsigned char scancode)
X {
X if(reply_expected) {
X if(scancode == KBD_REPLY_ACK) {
@@ -266,10 +270,87 @@


X return 1;
X }
X

+#ifdef __sparc_v9__
+static void pcikbd_enter_prom(void)
+{
+ pcikbd_write(KBD_DATA_REG, KBD_CMD_DISABLE);
+ if(pcikbd_wait_for_input() != KBD_REPLY_ACK)
+ printk("Prom Enter: Disable keyboard: no ACK\n");
+
+ /* Disable PC scancode translation */
+ pcikbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE);
+ pcikbd_write(KBD_DATA_REG, KBD_MODE_SYS);
+ pcikbd_write(KBD_DATA_REG, KBD_CMD_ENABLE);
+ if (pcikbd_wait_for_input() != KBD_REPLY_ACK)
+ printk("Prom Enter: Enable Keyboard: no ACK\n");
+}
+#endif
+
+static void ctrl_break(void)
+{
+ extern int stop_a_enabled;
+ unsigned long timeout;
+ int status, data;
+ int mode;
+
+ if (!stop_a_enabled)
+ return;
+
+ pcikbd_write(KBD_DATA_REG, KBD_CMD_DISABLE);
+ if(pcikbd_wait_for_input() != KBD_REPLY_ACK)
+ printk("Prom Enter: Disable keyboard: no ACK\n");
+
+ /* Save current mode register settings */
+ pcikbd_write(KBD_CNTL_REG, KBD_CCMD_READ_MODE);
+ if ((mode = pcikbd_wait_for_input()) == -1)
+ printk("Prom Enter: Read Mode: no ACK\n");
+
+ /* Disable PC scancode translation */
+ pcikbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE);
+ pcikbd_write(KBD_DATA_REG, mode & ~(KBD_MODE_KCC));
+ pcikbd_write(KBD_DATA_REG, KBD_CMD_ENABLE);
+ if (pcikbd_wait_for_input() != KBD_REPLY_ACK)
+ printk("Prom Enter: Enable Keyboard: no ACK\n");
+
+ /* Drop into OBP.
+ * Note that we must flush the user windows
+ * first before giving up control.
+ */
+ flush_user_windows();
+ prom_cmdline();
+
+ /* Read prom's key up event (use short timeout) */
+ do {
+ timeout = 10;
+ do {
+ mdelay(1);
+ status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG);
+ if (!(status & KBD_STAT_OBF))
+ continue;
+ data = pcikbd_inb(pcikbd_iobase + KBD_DATA_REG);
+ if (status & (KBD_STAT_GTO | KBD_STAT_PERR))
+ continue;
+ break;
+ } while (--timeout > 0);
+ } while (timeout > 0);
+
+ /* Reenable PC scancode translation */
+ pcikbd_write(KBD_DATA_REG, KBD_CMD_DISABLE);
+ if(pcikbd_wait_for_input() != KBD_REPLY_ACK)
+ printk("Prom Leave: Disable keyboard: no ACK\n");
+
+ pcikbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE);
+ pcikbd_write(KBD_DATA_REG, mode);
+ pcikbd_write(KBD_DATA_REG, KBD_CMD_ENABLE);
+ if (pcikbd_wait_for_input() != KBD_REPLY_ACK)
+ printk("Prom Enter: Enable Keyboard: no ACK\n");
+}
+
X int pcikbd_translate(unsigned char scancode, unsigned char *keycode,
X char raw_mode)
X {
X static int prev_scancode = 0;
+ int down = scancode & 0x80 ? 0 : 1;
X
X if (scancode == 0xe0 || scancode == 0xe1) {
X prev_scancode = scancode;
@@ -308,6 +389,18 @@
X
X } else
X *keycode = scancode;
+
+ if (*keycode == E0_BREAK) {
+ if (down)
+ return 0;
+
+ /* Handle ctrl-break event */
+ ctrl_break();
+
+ /* Send ctrl up event to the keyboard driver */
+ *keycode = 0x1d;
+ }


+
X return 1;
X }
X

@@ -367,7 +460,7 @@
X
X }
X
-__initfunc(static int pcikbd_wait_for_input(void))
+static int pcikbd_wait_for_input(void)
X {
X int status, data;
X unsigned long start = jiffies;
@@ -384,7 +477,7 @@


X return -1;
X }
X

-__initfunc(static void pcikbd_write(int address, int data))
+static void pcikbd_write(int address, int data)
X {
X int status;
X
@@ -570,6 +663,8 @@
X printk("8042(speaker): iobase[%016lx]%s\n", pcibeep_iobase,
X edev ? "" : " (forced)");
X }
+
+ prom_keyboard = pcikbd_enter_prom;
X #endif
X
X disable_irq(pcikbd_irq);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/sab82532.c linux/drivers/sbus/char/sab82532.c
--- v2.2.19/drivers/sbus/char/sab82532.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/sbus/char/sab82532.c Wed Oct 10 01:41:06 2001
@@ -1,4 +1,4 @@
-/* $Id: sab82532.c,v 1.30.2.4 2000/05/27 04:46:34 davem Exp $
+/* $Id: sab82532.c,v 1.30.2.7 2001/05/29 06:17:24 ecd Exp $
X * sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC.
X *
X * Copyright (C) 1997 Eddie C. Dost (e...@skynet.be)
@@ -54,9 +54,12 @@
X /* Set of debugging defines */
X #undef SERIAL_DEBUG_OPEN
X #undef SERIAL_DEBUG_FLOW
+#undef SERIAL_DEBUG_MODEM
X #undef SERIAL_DEBUG_WAIT_UNTIL_SENT
X #undef SERIAL_DEBUG_SEND_BREAK
X #undef SERIAL_DEBUG_INTR
+#undef SERIAL_DEBUG_FIFO
+#define SERIAL_DEBUG_OVERFLOW 1
X
X /* Trace things on serial device, useful for console debugging: */
X #undef SERIAL_LOG_DEVICE
@@ -194,10 +197,14 @@
X if (info->xmit_cnt <= 0)
X goto out;
X
- if (!(info->regs->r.star & SAB82532_STAR_XFW))
+ if (!test_bit(SAB82532_XPR, &info->irqflags))
X goto out;
X
- info->all_sent = 0;
+ info->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS);
+ info->regs->w.imr1 = info->interrupt_mask1;
+ clear_bit(SAB82532_ALLS, &info->irqflags);
+
+ clear_bit(SAB82532_XPR, &info->irqflags);
X for (i = 0; i < info->xmit_fifo_size; i++) {
X info->regs->w.xfifo[i] = info->xmit_buf[info->xmit_tail++];
X info->xmit_tail &= (SERIAL_XMIT_SIZE - 1);
@@ -318,15 +325,15 @@
X * This routine is used by the interrupt handler to schedule
X * processing in the software interrupt portion of the driver.
X */
-static inline void sab82532_sched_event(struct sab82532 *info, int event)
+static void sab82532_sched_event(struct sab82532 *info, int event)
X {
X info->event |= 1 << event;
X queue_task(&info->tqueue, &tq_serial);
X mark_bh(SERIAL_BH);
X }
X
-static inline void receive_chars(struct sab82532 *info,
- union sab82532_irq_status *stat)
+static void receive_chars(struct sab82532 *info,
+ union sab82532_irq_status *stat)
X {


X struct tty_struct *tty = info->tty;

X unsigned char buf[32];
@@ -353,7 +360,7 @@
X }
X
X if (stat->sreg.isr0 & SAB82532_ISR0_RFO) {
-#if 1
+#ifdef SERIAL_DEBUG_OVERFLOW
X printk("sab82532: receive_chars: RFO");
X #endif
X free_fifo++;
@@ -377,7 +384,7 @@
X
X for (i = 0; i < count; ) {
X if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
-#if 1
+#ifdef SERIAL_DEBUG_OVERFLOW
X printk("sab82532: receive_chars: tty overrun\n");
X #endif
X info->icount.buf_overrun++;
@@ -411,16 +418,29 @@
X queue_task(&tty->flip.tqueue, &tq_timer);
X }
X
-static inline void transmit_chars(struct sab82532 *info,
- union sab82532_irq_status *stat)
+static void transmit_chars(struct sab82532 *info,
+ union sab82532_irq_status *stat)


X {
X int i;
X

- if (stat->sreg.isr1 & SAB82532_ISR1_ALLS)
- info->all_sent = 1;
- if (!(info->regs->r.star & SAB82532_STAR_XFW))
+ if (stat->sreg.isr1 & SAB82532_ISR1_ALLS) {
+ info->interrupt_mask1 |= SAB82532_IMR1_ALLS;
+ info->regs->w.imr1 = info->interrupt_mask1;
+ set_bit(SAB82532_ALLS, &info->irqflags);
+ }
+
+ if (!(stat->sreg.isr1 & SAB82532_ISR1_XPR))
X return;
X
+ if (!(info->regs->r.star & SAB82532_STAR_XFW)) {
+#ifdef SERIAL_DEBUG_FIFO
+ printk("%s: XPR, but no XFW (???)\n", __FUNCTION__);
+#endif
+ return;
+ }
+
+ set_bit(SAB82532_XPR, &info->irqflags);
+
X if (!info->tty) {
X info->interrupt_mask1 |= SAB82532_IMR1_XPR;
X info->regs->w.imr1 = info->interrupt_mask1;
@@ -434,8 +454,12 @@
X return;
X }
X
+ info->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS);
+ info->regs->w.imr1 = info->interrupt_mask1;
+ clear_bit(SAB82532_ALLS, &info->irqflags);
+
X /* Stuff 32 bytes into Transmit FIFO. */
- info->all_sent = 0;
+ clear_bit(SAB82532_XPR, &info->irqflags);
X for (i = 0; i < info->xmit_fifo_size; i++) {
X info->regs->w.xfifo[i] = info->xmit_buf[info->xmit_tail++];
X info->xmit_tail &= (SERIAL_XMIT_SIZE - 1);
@@ -455,14 +479,10 @@
X #ifdef SERIAL_DEBUG_INTR
X printk("THRE...");
X #endif
- if (info->xmit_cnt <= 0) {
- info->interrupt_mask1 |= SAB82532_IMR1_XPR;
- info->regs->w.imr1 = info->interrupt_mask1;
- }
X }
X
-static inline void check_status(struct sab82532 *info,
- union sab82532_irq_status *stat)
+static void check_status(struct sab82532 *info,
+ union sab82532_irq_status *stat)
X {


X struct tty_struct *tty = info->tty;

X int modem_change = 0;
@@ -501,7 +521,7 @@
X info->dcd = (info->regs->r.vstr & SAB82532_VSTR_CD) ? 0 : 1;
X info->icount.dcd++;
X modem_change++;
-#if 0
+#ifdef SERIAL_DEBUG_MODEM
X printk("DCD change: %d\n", info->icount.dcd);
X #endif
X }
@@ -509,7 +529,7 @@
X info->cts = info->regs->r.star & SAB82532_STAR_CTS;
X info->icount.cts++;
X modem_change++;
-#if 0
+#ifdef SERIAL_DEBUG_MODEM
X printk("CTS change: %d, CTS %s\n", info->icount.cts, info->cts ? "on" : "off");
X #endif
X }
@@ -517,7 +537,7 @@
X info->dsr = (info->regs->r.pvr & info->pvr_dsr_bit) ? 0 : 1;
X info->icount.dsr++;
X modem_change++;
-#if 0
+#ifdef SERIAL_DEBUG_MODEM
X printk("DSR change: %d\n", info->icount.dsr);
X #endif
X }
@@ -808,15 +828,19 @@
X info->interrupt_mask0 = SAB82532_IMR0_PERR | SAB82532_IMR0_FERR |
X SAB82532_IMR0_PLLA;
X info->regs->w.imr0 = info->interrupt_mask0;
- info->interrupt_mask1 = SAB82532_IMR1_BRKT | SAB82532_IMR1_XOFF |
- SAB82532_IMR1_TIN | SAB82532_IMR1_XON |
+ info->interrupt_mask1 = SAB82532_IMR1_BRKT | SAB82532_IMR1_ALLS |
+ SAB82532_IMR1_XOFF | SAB82532_IMR1_TIN |
+ SAB82532_IMR1_CSC | SAB82532_IMR1_XON |
X SAB82532_IMR1_XPR;
X info->regs->w.imr1 = info->interrupt_mask1;
+ set_bit(SAB82532_ALLS, &info->irqflags);
X
X if (info->tty)
X clear_bit(TTY_IO_ERROR, &info->tty->flags);
X info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
X
+ set_bit(SAB82532_XPR, &info->irqflags);
+
X /*
X * and set the speed of the serial port
X */
@@ -1019,10 +1043,14 @@
X info->regs->rw.mode &= ~(SAB82532_MODE_RTS);
X info->regs->rw.mode |= SAB82532_MODE_FRTS;
X info->regs->rw.mode &= ~(SAB82532_MODE_FCTS);
+ info->interrupt_mask1 &= ~(SAB82532_IMR1_CSC);
+ info->regs->w.imr1 = info->interrupt_mask1;
X } else {
X info->regs->rw.mode |= SAB82532_MODE_RTS;
X info->regs->rw.mode &= ~(SAB82532_MODE_FRTS);
X info->regs->rw.mode |= SAB82532_MODE_FCTS;
+ info->interrupt_mask1 |= SAB82532_IMR1_CSC;
+ info->regs->w.imr1 = info->interrupt_mask1;
X }
X info->regs->rw.mode |= SAB82532_MODE_RAC;
X restore_flags(flags);
@@ -1204,10 +1232,11 @@
X
X if (I_IXOFF(tty))
X sab82532_send_xchar(tty, STOP_CHAR(tty));
-#if 0
- if (tty->termios->c_cflag & CRTSCTS)
- info->regs->rw.mode |= SAB82532_MODE_RTS;
-#endif
+
+ if (tty->termios->c_cflag & CRTSCTS) {
+ info->regs->rw.mode &= ~(SAB82532_MODE_FRTS |
+ SAB82532_MODE_RTS);
+ }
X }
X
X static void sab82532_unthrottle(struct tty_struct * tty)
@@ -1230,10 +1259,12 @@
X sab82532_send_xchar(tty, START_CHAR(tty));
X }
X
-#if 0
- if (tty->termios->c_cflag & CRTSCTS)
- info->regs->rw.mode &= ~(SAB82532_MODE_RTS);
-#endif
+ if (tty->termios->c_cflag & CRTSCTS) {
+ u8 mode = info->regs->r.mode;
+ mode &= ~(SAB82532_MODE_RTS);
+ mode |= SAB82532_MODE_FRTS;
+ info->regs->w.mode = mode;


+ }
X }
X
X /*

@@ -1287,7 +1318,8 @@
X {
X unsigned int result;
X
- result = (!info->xmit_buf && info->all_sent) ? TIOCSER_TEMT : 0;
+ result = (!info->xmit_buf && test_bit(SAB82532_ALLS, &info->irqflags))
+ ? TIOCSER_TEMT : 0;
X return put_user(result, value);
X }
X
@@ -1515,10 +1547,19 @@
X if (!(old_termios->c_cflag & CBAUD) &&
X (tty->termios->c_cflag & CBAUD)) {
X info->regs->w.pvr &= ~(info->pvr_dtr_bit);
- if (!tty->hw_stopped ||
- !(tty->termios->c_cflag & CRTSCTS)) {
- info->regs->w.mode &= ~(SAB82532_MODE_FRTS);
- info->regs->w.mode |= SAB82532_MODE_RTS;
+ if (!tty->hw_stopped) {
+ u8 mode = info->regs->r.mode;
+ if (tty->termios->c_cflag & CRTSCTS) {
+ mode &= ~(SAB82532_MODE_RTS);
+ mode |= SAB82532_MODE_FRTS;
+ } else if (test_bit(TTY_THROTTLED, &tty->flags)) {
+ mode &= ~(SAB82532_MODE_FRTS |
+ SAB82532_MODE_RTS);
+ } else {
+ mode &= ~(SAB82532_MODE_FRTS);
+ mode |= SAB82532_MODE_RTS;
+ }
+ info->regs->w.mode = mode;
X }
X }
X
@@ -1528,18 +1569,6 @@
X tty->hw_stopped = 0;
X sab82532_start(tty);
X }
-
-#if 0
- /*
- * No need to wake up processes in open wait, since they
- * sample the CLOCAL flag once, and don't recheck it.
- * XXX It's not clear whether the current behavior is correct
- * or not. Hence, this may change.....
- */
- if (!(old_termios->c_cflag & CLOCAL) &&
- (tty->termios->c_cflag & CLOCAL))
- wake_up_interruptible(&info->open_wait);
-#endif
X }
X
X /*
@@ -1617,9 +1646,6 @@
X */
X info->interrupt_mask0 |= SAB82532_IMR0_TCD;
X info->regs->w.imr0 = info->interrupt_mask0;
-#if 0
- info->regs->rw.mode &= ~(SAB82532_MODE_RAC);
-#endif
X if (info->flags & ASYNC_INITIALIZED) {
X /*
X * Before we drop DTR, make sure the UART transmitter
@@ -1661,7 +1687,6 @@
X if (serial_paranoia_check(info,tty->device,"sab82532_wait_until_sent"))
X return;
X
- orig_jiffies = jiffies;
X /*
X * Set the check interval to be 1/5 of the estimated time to
X * send a single character, and make it at least 1. The check
@@ -1677,10 +1702,14 @@


X if (timeout)
X char_time = MIN(char_time, timeout);

X #ifdef SERIAL_DEBUG_WAIT_UNTIL_SENT
- printk("In sab82532_wait_until_sent(%d) check=%lu...", timeout, char_time);
- printk("jiff=%lu...", jiffies);
+ printk("In sab82532_wait_until_sent(%d) check=%lu "
+ "xmit_cnt = %ld, alls = %d (jiff=%lu)...\n",
+ timeout, char_time, info->xmit_cnt,
+ test_bit(SAB82532_ALLS, &info->irqflags), jiffies);
X #endif
- while (info->xmit_cnt || !info->all_sent) {
+ orig_jiffies = jiffies;
+ while (info->xmit_cnt ||
+ !test_bit(SAB82532_ALLS, &info->irqflags)) {
X current->state = TASK_INTERRUPTIBLE;
X current->counter = 0;
X schedule_timeout(char_time);
@@ -1691,7 +1720,9 @@
X }
X current->state = TASK_RUNNING;
X #ifdef SERIAL_DEBUG_WAIT_UNTIL_SENT
- printk("xmit_cnt = %d, alls = %d (jiff=%lu)...done\n", info->xmit_cnt, info->all_sent, jiffies);
+ printk("xmit_cnt = %d, alls = %d (jiff=%lu)...done\n",
+ info->xmit_cnt, test_bit(SAB82532_ALLS, &info->irqflags),
+ jiffies);
X #endif
X }


X
@@ -2146,7 +2177,7 @@
X

X __initfunc(static inline void show_serial_version(void))
X {
- char *revision = "$Revision: 1.30.2.4 $";
+ char *revision = "$Revision: 1.30.2.7 $";
X char *version, *p;
X
X version = strchr(revision, ' ');
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/su.c linux/drivers/sbus/char/su.c
--- v2.2.19/drivers/sbus/char/su.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/sbus/char/su.c Wed Oct 10 01:41:07 2001
@@ -1,4 +1,4 @@
-/* $Id: su.c,v 1.18.2.7 2000/05/27 04:46:34 davem Exp $
+/* $Id: su.c,v 1.18.2.8 2001/05/16 08:37:26 davem Exp $
X * su.c: Small serial driver for keyboard/mouse interface on sparc32/PCI
X *
X * Copyright (C) 1997 Eddie C. Dost (e...@skynet.be)
@@ -1411,6 +1411,41 @@


X */
X
X /*

+ * get_serial_info - handle TIOCGSERIAL ioctl()
+ *
+ * Purpose: Return standard serial struct information about
+ * a serial port handled by this driver.
+ *
+ * Added: 11-May-2001 Lars Kellogg-Stedman <la...@larsshack.org>
+ */
+static int get_serial_info(struct su_struct * info,
+ struct serial_struct * retinfo)
+{
+ struct serial_struct tmp;
+
+ if (!retinfo)
+ return -EFAULT;
+ memset(&tmp, 0, sizeof(tmp));
+
+ tmp.type = info->type;
+ tmp.line = info->line;
+ tmp.port = info->port;
+ tmp.irq = info->irq;
+ tmp.flags = info->flags;
+ tmp.xmit_fifo_size = info->xmit_fifo_size;
+ tmp.baud_base = info->baud_base;
+ tmp.close_delay = info->close_delay;
+ tmp.closing_wait = info->closing_wait;
+ tmp.custom_divisor = info->custom_divisor;
+ tmp.hub6 = 0;
+
+ if (copy_to_user(retinfo,&tmp,sizeof(*retinfo)))
+ return -EFAULT;


+
+ return 0;
+}
+

+/*
X * get_lsr_info - get line status register info
X *
X * Purpose: Let user call ioctl() to get info when the UART physically
@@ -1568,6 +1603,9 @@
X case TIOCMSET:
X return set_modem_info(info, cmd, (unsigned int *) arg);
X
+ case TIOCGSERIAL:
+ return get_serial_info(info, (struct serial_struct *)arg);
+
X case TIOCSERGETLSR: /* Get line status register */
X return get_lsr_info(info, (unsigned int *) arg);
X
@@ -2226,7 +2264,7 @@
X */
X __initfunc(static __inline__ void show_su_version(void))
X {
- char *revision = "$Revision: 1.18.2.7 $";
+ char *revision = "$Revision: 1.18.2.8 $";
X char *version, *p;
X
X version = strchr(revision, ' ');
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sbus/char/zs.c linux/drivers/sbus/char/zs.c
--- v2.2.19/drivers/sbus/char/zs.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/sbus/char/zs.c Wed Oct 10 01:41:07 2001
@@ -1,4 +1,4 @@
-/* $Id: zs.c,v 1.41.2.7 2001/01/03 08:07:04 ecd Exp $
+/* $Id: zs.c,v 1.41.2.9 2001/05/09 07:47:10 davem Exp $
X * zs.c: Zilog serial port driver for the Sparc.
X *
X * Copyright (C) 1995 David S. Miller (da...@caip.rutgers.edu)
@@ -173,7 +173,7 @@
X * buffer across all the serial ports, since it significantly saves
X * memory if large numbers of serial ports are open.
X */
-static unsigned char tmp_buf[4096]; /* This is cheating */
+static unsigned char tmp_buf[SERIAL_XMIT_SIZE]; /* This is cheating */
X static struct semaphore tmp_buf_sem = MUTEX;
X
X static inline int serial_paranoia_check(struct sun_serial *info,
@@ -1109,28 +1109,53 @@
X return 0;
X
X save_flags(flags);
- while (1) {
- cli();
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - info->xmit_head));
- if (c <= 0)
- break;
+ if (from_user) {
+ down(&tmp_buf_sem);
+ while (1) {
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - info->xmit_head));
+ if (c <= 0)
+ break;
+
+ c -= copy_from_user(tmp_buf, buf, c);
+ if (!c) {
+ if (!total)
+ total = -EFAULT;
+ break;
+ }
X
- if (from_user) {
- down(&tmp_buf_sem);
- copy_from_user(tmp_buf, buf, c);
+ cli();
X c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
X SERIAL_XMIT_SIZE - info->xmit_head));
X memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
- up(&tmp_buf_sem);
- } else
+ info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ info->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
+ up(&tmp_buf_sem);
+ } else {
+ while (1) {
+ cli();
+ c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - info->xmit_head));
+ if (c <= 0) {
+ restore_flags(flags);
+ break;
+ }
+
X memcpy(info->xmit_buf + info->xmit_head, buf, c);
- info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
- info->xmit_cnt += c;
- restore_flags(flags);
- buf += c;
- count -= c;
- total += c;
+ info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
+ info->xmit_cnt += c;
+ restore_flags(flags);
+
+ buf += c;
+ count -= c;
+ total += c;
+ }
X }
X
X cli();

@@ -1856,7 +1881,7 @@
X

X static void show_serial_version(void)
X {
- char *revision = "$Revision: 1.41.2.7 $";
+ char *revision = "$Revision: 1.41.2.9 $";
X char *version, *p;
X
X version = strchr(revision, ' ');
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/3w-xxxx.c linux/drivers/scsi/3w-xxxx.c
--- v2.2.19/drivers/scsi/3w-xxxx.c Sun Mar 25 17:37:35 2001
+++ linux/drivers/scsi/3w-xxxx.c Wed Oct 10 01:41:08 2001
@@ -5,7 +5,6 @@
X Modifications By: Joel Jacobson <li...@3ware.com>
X Arnaldo Carvalho de Melo <ac...@conectiva.com.br>
X
-
X Copyright (C) 1999-2001 3ware Inc.
X
X Kernel compatablity By: Andre Hedrick <an...@suse.com>
@@ -77,6 +76,28 @@
X Make tw_setfeature() call with interrupts disabled.
X Register interrupt handler before enabling interrupts.
X Clear attention interrupt before draining aen queue.
+ 1.02.00.005 - Allocate bounce buffers and custom queue depth for raid5 for
+ 6000 and 5000 series controllers.
+ Reduce polling mdelays causing problems on some systems.
+ Fix use_sg = 1 calculation bug.
+ Check for scsi_register returning NULL.
+ Add aen count to /proc/scsi/3w-xxxx.
+ Remove aen code unit masking in tw_aen_complete().
+ 1.02.00.006 - Remove unit from printk in tw_scsi_eh_abort(), causing
+ possible oops.
+ Fix possible null pointer dereference in tw_scsi_queue()
+ if done function pointer was invalid.
+ 1.02.00.007 - Fix possible null pointer dereferences in tw_ioctl().
+ Remove check for invalid done function pointer from
+ tw_scsi_queue().
+ 1.02.00.008 - Add tw_decode_error() for printing readable error messages.
+ Print some useful information on certain aen codes.
+ Add tw_decode_bits() for interpreting status register output.
+ Fix bug where aen's could be lost before a reset.
+ Re-add spinlocks in tw_scsi_detect().
+ Fix possible null pointer dereference in tw_aen_drain_queue()
+ during initialization.
+ Clear pci parity errors during initialization and during io.
X */
X
X #include <linux/module.h>
@@ -128,7 +149,7 @@
X };
X
X /* Globals */
-char *tw_driver_version="1.02.00.004";
+char *tw_driver_version="1.02.00.008";
X TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT];
X int tw_device_extension_count = 0;
X
@@ -138,7 +159,7 @@
X int tw_aen_complete(TW_Device_Extension *tw_dev, int request_id)
X {
X TW_Param *param;
- unsigned short aen, aen_code;
+ unsigned short aen;
X
X if (tw_dev->alignment_virtual_address[request_id] == NULL) {
X printk(KERN_WARNING "3w-xxxx: tw_aen_complete(): Bad alignment virtual address.\n");
@@ -146,10 +167,30 @@
X }
X param = (TW_Param *)tw_dev->alignment_virtual_address[request_id];
X aen = *(unsigned short *)(param->data);
- aen_code = (aen & 0x0ff);
- dprintk(KERN_NOTICE "3w-xxxx: tw_aen_complete(): Queue'd code 0x%x\n", aen_code);
+ dprintk(KERN_NOTICE "3w-xxxx: tw_aen_complete(): Queue'd code 0x%x\n", aen);
+
+ /* Print some useful info when certain aen codes come out */
+ switch (aen & 0x0ff) {
+ case TW_AEN_APORT_TIMEOUT:
+ printk(KERN_WARNING "3w-xxxx: scsi%d: Received drive timeout AEN on port %d, check drive and drive cables.\n", tw_dev->host->host_no, aen >> 8);
+ break;
+ case TW_AEN_DRIVE_ERROR:
+ printk(KERN_WARNING "3w-xxxx: scsi%d: Received drive error AEN on port %d, check/replace cabling, or possible bad drive.\n", tw_dev->host->host_no, aen >> 8);
+ break;
+ case TW_AEN_SMART_FAIL:
+ printk(KERN_WARNING "3w-xxxx: scsi%d: Received S.M.A.R.T. threshold AEN on port %d, check drive/cooling, or possible bad drive.\n", tw_dev->host->host_no, aen >> 8);
+ break;
+ case TW_AEN_SBUF_FAIL:
+ printk(KERN_WARNING "3w-xxxx: scsi%d: Received SBUF integrity check failure AEN, reseat card or bad card.\n", tw_dev->host->host_no);
+ break;
+ default:
+ printk(KERN_WARNING "3w-xxxx: Received AEN 0x%x\n", aen);
+ }
+
+ tw_dev->aen_count++;
+
X /* Now queue the code */
- tw_dev->aen_queue[tw_dev->aen_tail] = aen_code;
+ tw_dev->aen_queue[tw_dev->aen_tail] = aen;
X if (tw_dev->aen_tail == TW_Q_LENGTH - 1) {
X tw_dev->aen_tail = TW_Q_START;
X } else {
@@ -195,7 +236,7 @@
X response_que_addr = tw_dev->registers.response_que_addr;
X
X if (tw_poll_status(tw_dev, TW_STATUS_ATTENTION_INTERRUPT, 15)) {
- printk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): No attention interrupt for card %d\n", tw_dev->host->host_no);
+ printk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): No attention interrupt for card %d\n", tw_device_extension_count);


X return 1;
X }
X

@@ -248,10 +289,11 @@
X

X /* Now poll for completion */
X for (i=0;i<imax;i++) {
- mdelay(10);
+ mdelay(5);
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
X return 1;
X }
X if ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {
@@ -316,6 +358,22 @@
X dprintk(KERN_NOTICE "3w-xxxx: tw_aen_drain_queue(): Found TW_AEN_QUEUE_FULL.\n");
X queue = 1;
X break;
+ case TW_AEN_APORT_TIMEOUT:
+ printk(KERN_WARNING "3w-xxxx: Received drive timeout AEN on port %d, check drive and drive cables.\n", aen >> 8);
+ queue = 1;
+ break;
+ case TW_AEN_DRIVE_ERROR:
+ printk(KERN_WARNING "3w-xxxx: Received drive error AEN on port %d, check/replace cabling, or possible bad drive.\n", aen >> 8);
+ queue = 1;
+ break;
+ case TW_AEN_SMART_FAIL:
+ printk(KERN_WARNING "3w-xxxx: Received S.M.A.R.T. threshold AEN on port %d, check drive/cooling, or possible bad drive.\n", aen >> 8);
+ queue = 1;
+ break;
+ case TW_AEN_SBUF_FAIL:
+ printk(KERN_WARNING "3w-xxxx: Received SBUF integrity check failure AEN, reseat card or bad card.\n");
+ queue = 1;
+ break;
X default:
X dprintk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): Unknown AEN code 0x%x.\n", aen_code);
X queue = 1;
@@ -372,6 +430,7 @@
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_aen_read_queue(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
X return 1;
X }
X if (tw_dev->command_packet_virtual_address[request_id] == NULL) {
@@ -443,15 +502,23 @@
X printk(KERN_WARNING "3w-xxxx: tw_allocate_memory(): Found unaligned address.\n");
X return 1;
X }
-
- if (which == 0) {
- tw_dev->command_packet_virtual_address[request_id] = virt_addr;
- tw_dev->command_packet_physical_address[request_id] =
- virt_to_bus(virt_addr);
- } else {
- tw_dev->alignment_virtual_address[request_id] = virt_addr;
- tw_dev->alignment_physical_address[request_id] =
- virt_to_bus(virt_addr);
+ switch(which) {
+ case 0:
+ tw_dev->command_packet_virtual_address[request_id] = virt_addr;
+ tw_dev->command_packet_physical_address[request_id] =
+ virt_to_bus(virt_addr);


+ break;
+ case 1:

+ tw_dev->alignment_virtual_address[request_id] = virt_addr;
+ tw_dev->alignment_physical_address[request_id] =
+ virt_to_bus(virt_addr);


+ break;
+ case 2:

+ tw_dev->bounce_buffer[request_id] = virt_addr;
+ break;
+ default:
+ printk(KERN_WARNING "3w-xxxx: tw_allocate_memory(): case slip in tw_allocate_memory()\n");
+ return 1;
X }
X return 0;
X } /* End tw_allocate_memory() */
@@ -539,6 +606,40 @@
X }
X } /* End tw_copy_mem_info() */
X
+/* This function will print readable messages from statsu register errors */
+void tw_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value)
+{
+ dprintk(KERN_WARNING "3w-xxxx: tw_decode_bits()\n");
+ switch (status_reg_value & TW_STATUS_UNEXPECTED_BITS) {
+ case TW_STATUS_PCI_PARITY_ERROR:
+ printk(KERN_WARNING "3w-xxxx: PCI Parity Error: Reseat card, or move card to another slot.\n");
+ outl(TW_CONTROL_CLEAR_PARITY_ERROR, tw_dev->registers.control_reg_addr);
+ pci_write_config_word(tw_dev->tw_pci_dev, PCI_STATUS, TW_PCI_CLEAR_PARITY_ERRORS);
+ break;
+ case TW_STATUS_MICROCONTROLLER_ERROR:
+ printk(KERN_WARNING "3w-xxxx: Microcontroller Error.\n");
+ break;
+ }
+} /* End tw_decode_bits() */
+
+/* This function will print readable messages from flags and status values */
+void tw_decode_error(TW_Device_Extension *tw_dev, unsigned char status, unsigned char flags, unsigned char unit)
+{
+ dprintk(KERN_WARNING "3w-xxxx: tw_decode_error()\n");
+ switch (status) {
+ case 0xc7:
+ switch (flags) {
+ case 0x1b:
+ printk(KERN_WARNING "3w-xxxx: scsi%d: Drive timeout on unit %d, check drive and drive cables.\n", tw_dev->host->host_no, unit);
+ break;
+ case 0x51:
+ printk(KERN_WARNING "3w-xxxx: scsi%d: Unrecoverable drive error on unit %d, check/replace cabling, or possible bad drive.\n", tw_dev->host->host_no, unit);
+ break;
+ }
+ break;
+ }
+} /* End tw_decode_error() */
+
X /* This function will disable interrupts on the controller */
X void tw_disable_interrupts(TW_Device_Extension *tw_dev)
X {
@@ -562,6 +663,7 @@
X
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_empty_response_queue(): Unexpected bits 1.\n");
+ tw_decode_bits(tw_dev, status_reg_value);


X return 1;
X }
X

@@ -570,6 +672,7 @@
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_empty_response_queue(): Unexpected bits 2.\n");
+ tw_decode_bits(tw_dev, status_reg_value);


X return 1;
X }
X }

@@ -630,6 +733,11 @@
X /* Save pci_dev struct to device extension */
X tw_dev->tw_pci_dev = tw_pci_dev;
X
+ /* Check for errors and clear them */
+ status_reg_value = inl(tw_dev->registers.status_reg_addr);
+ if (TW_STATUS_ERRORS(status_reg_value))
+ tw_decode_bits(tw_dev, status_reg_value);
+
X /* Poll status register for 60 secs for 'Controller Ready' flag */
X if (tw_poll_status(tw_dev, TW_STATUS_MICROCONTROLLER_READY, 60)) {
X printk(KERN_WARNING "3w-xxxx: tw_findcards(): Microcontroller not ready for card %d.\n", numcards);
@@ -708,7 +816,7 @@
X kfree(tw_dev);
X continue;
X }
-
+
X /* Calculate max cmds per lun */
X if (tw_dev->num_units > 0)
X tw_host->cmd_per_lun = (TW_Q_LENGTH-2)/tw_dev->num_units;
@@ -716,11 +824,17 @@
X /* Register the card with the kernel SCSI layer */
X host = scsi_register(tw_host, sizeof(TW_Device_Extension));
X
- /* FIXME - check for NULL */
+ if (host == NULL) {
+ printk(KERN_WARNING "3w-xxxx: tw_findcards(): scsi_register() failed for card %d.\n", numcards-1);
+ release_region((tw_dev->tw_pci_dev->base_address[0]), TW_IO_ADDRESS_RANGE);
+ tw_free_device_extension(tw_dev);
+ kfree(tw_dev);
+ continue;
+ }
X
X status_reg_value = inl(tw_dev->registers.status_reg_addr);
X
- dprintk(KERN_NOTICE "scsi%d : Found a 3ware Storage Controller at 0x%x, IRQ: %d P-chip: %d.%d\n", host->host_no,
+ printk(KERN_NOTICE "scsi%d : Found a 3ware Storage Controller at 0x%x, IRQ: %d, P-chip: %d.%d\n", host->host_no,
X (u32)(tw_pci_dev->base_address[0]), tw_pci_dev->irq,
X (status_reg_value & TW_STATUS_MAJOR_VERSION_MASK) >> 28,
X (status_reg_value & TW_STATUS_MINOR_VERSION_MASK) >> 24);
@@ -787,6 +901,9 @@
X
X if (tw_dev->alignment_virtual_address[i])
X kfree(tw_dev->alignment_virtual_address[i]);
+
+ if (tw_dev->bounce_buffer[i])
+ kfree(tw_dev->bounce_buffer[i]);
X }
X } /* End tw_free_device_extension() */
X
@@ -852,10 +969,11 @@
X /* Poll for completion */
X imax = TW_POLL_MAX_RETRIES;
X for (i=0;i<imax;i++) {
- mdelay(10);
+ mdelay(5);
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_initconnection(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
X return 1;
X }
X if ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {
@@ -908,8 +1026,10 @@
X tw_dev->aen_queue[i] = 0;
X }
X
- for (i=0;i<TW_MAX_UNITS;i++)
+ for (i=0;i<TW_MAX_UNITS;i++) {
X tw_dev->is_unit_present[i] = 0;
+ tw_dev->is_raid_five[i] = 0;
+ }
X
X tw_dev->num_units = 0;
X tw_dev->num_aborts = 0;
@@ -927,6 +1047,8 @@
X tw_dev->aen_tail = 0;
X tw_dev->sector_count = 0;
X tw_dev->max_sector_count = 0;
+ tw_dev->aen_count = 0;
+ tw_dev->num_raid_five = 0;
X spin_lock_init(&tw_dev->tw_lock);
X return 0;
X } /* End tw_initialize_device_extension() */
@@ -938,13 +1060,14 @@
X unsigned char request_id = 0;
X TW_Command *command_packet;
X TW_Param *param;
- int i, imax, num_units = 0;
+ int i, j, imax, num_units = 0, num_raid_five = 0;
X u32 status_reg_addr, status_reg_value;
X u32 command_que_addr, command_que_value;
X u32 response_que_addr;
X TW_Response_Queue response_queue;
X u32 param_value;
X unsigned char *is_unit_present;
+ unsigned char *raid_level;
X
X dprintk(KERN_NOTICE "3w-xxxx: tw_initialize_units()\n");
X
@@ -999,10 +1122,11 @@
X /* Poll for completion */
X imax = TW_POLL_MAX_RETRIES;
X for(i=0; i<imax; i++) {
- mdelay(10);
+ mdelay(5);
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
X return 1;
X }
X if ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {
@@ -1050,6 +1174,108 @@
X printk(KERN_NOTICE "3w-xxxx: tw_initialize_units(): No units found.\n");
X return 1;
X }
+
+ /* Find raid 5 arrays */
+ for (j=0;j<TW_MAX_UNITS;j++) {
+ if (tw_dev->is_unit_present[j] == 0)
+ continue;
+ command_packet = (TW_Command *)tw_dev->command_packet_virtual_address[request_id];
+ if (command_packet == NULL) {
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad command packet virtual address.\n");
+ return 1;
+ }
+ memset(command_packet, 0, sizeof(TW_Sector));
+ command_packet->byte0.opcode = TW_OP_GET_PARAM;
+ command_packet->byte0.sgl_offset = 2;
+ command_packet->size = 4;
+ command_packet->request_id = request_id;
+ command_packet->byte3.unit = 0;
+ command_packet->byte3.host_id = 0;
+ command_packet->status = 0;
+ command_packet->flags = 0;
+ command_packet->byte6.block_count = 1;
+
+ /* Now setup the param */
+ if (tw_dev->alignment_virtual_address[request_id] == NULL) {
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad alignment virtual address.\n");
+ return 1;
+ }
+ param = (TW_Param *)tw_dev->alignment_virtual_address[request_id];
+ memset(param, 0, sizeof(TW_Sector));
+ param->table_id = 0x300+j; /* unit summary table */
+ param->parameter_id = 0x6; /* unit descriptor */
+ param->parameter_size_bytes = 0xc;
+ param_value = tw_dev->alignment_physical_address[request_id];
+ if (param_value == 0) {
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad alignment physical address.\n");


+ return 1;
+ }
+

+ command_packet->byte8.param.sgl[0].address = param_value;
+ command_packet->byte8.param.sgl[0].length = sizeof(TW_Sector);
+
+ /* Post the command packet to the board */
+ command_que_value = tw_dev->command_packet_physical_address[request_id];
+ if (command_que_value == 0) {
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad command packet physical address.\n");
+ return 1;
+ }
+ outl(command_que_value, command_que_addr);
+
+ /* Poll for completion */
+ imax = TW_POLL_MAX_RETRIES;
+ for(i=0; i<imax; i++) {
+ mdelay(5);
+ status_reg_value = inl(status_reg_addr);
+ if (tw_check_bits(status_reg_value)) {
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
+ return 1;
+ }
+ if ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {
+ response_queue.value = inl(response_que_addr);
+ request_id = (unsigned char)response_queue.u.response_id;
+ if (request_id != 0) {
+ /* unexpected request id */
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected request id.\n");
+ return 1;
+ }
+ if (command_packet->status != 0) {
+ /* bad response */
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+ return 1;
+ }
+ found = 1;
+ break;
+ }
+ }
+ if (found == 0) {
+ /* response never received */
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): No response.\n");


+ return 1;
+ }
+

+ param = (TW_Param *)tw_dev->alignment_virtual_address[request_id];
+ raid_level = (unsigned char *)&(param->data[1]);
+ if (*raid_level == 5) {
+ dprintk(KERN_WARNING "3w-xxxx: Found unit %d to be a raid5 unit.\n", j);
+ tw_dev->is_raid_five[j] = 1;
+ num_raid_five++;
+ }
+ }
+ tw_dev->num_raid_five = num_raid_five;
+
+ /* Now allocate raid5 bounce buffers */
+ if ((num_raid_five != 0) && (tw_dev->tw_pci_dev->device == TW_DEVICE_ID)) {
+ for (i=0;i<TW_Q_LENGTH;i++) {
+ tw_allocate_memory(tw_dev, i, sizeof(TW_Sector)*128, 2);
+ if (tw_dev->bounce_buffer[i] == NULL) {
+ printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bounce buffer allocation failed.\n");
+ return 1;
+ }
+ memset(tw_dev->bounce_buffer[i], 0, sizeof(TW_Sector)*128);
+ }
+ }
X
X return 0;
X } /* End tw_initialize_units() */
@@ -1067,13 +1293,12 @@
X int do_attention_interrupt=0;
X int do_host_interrupt=0;
X int do_command_interrupt=0;
- int flags = 0;
- int flags2 = 0;
+ unsigned long flags = 0;
X TW_Command *command_packet;
X spin_lock_irqsave(&io_request_lock, flags);
X
X if (tw_dev->tw_pci_dev->irq == irq) {
- spin_lock_irqsave(&tw_dev->tw_lock, flags2);
+ spin_lock(&tw_dev->tw_lock);
X dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt()\n");
X
X /* Read the registers */
@@ -1146,12 +1371,17 @@
X error = 0;
X if (command_packet->status != 0) {
X printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Bad response, status = 0x%x, flags = 0x%x, unit = 0x%x.\n", command_packet->status, command_packet->flags, command_packet->byte3.unit);
+ tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
X error = 1;
X }
X if (tw_dev->state[request_id] != TW_S_POSTED) {
X printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Received a request id (%d) (opcode = 0x%x) that wasn't posted.\n", request_id, command_packet->byte0.opcode);
X error = 1;
X }
+ if (TW_STATUS_ERRORS(status_reg_value)) {
+ tw_decode_bits(tw_dev, status_reg_value);
+ error = 1;
+ }
X dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Response queue request id: %d.\n", request_id);
X /* Check for internal command */
X if (tw_dev->srb[request_id] == 0) {
@@ -1163,6 +1393,7 @@
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
X }
X } else {
X switch (tw_dev->srb[request_id]->cmnd[0]) {
@@ -1208,11 +1439,12 @@
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
X }
X }
X }
X }
- spin_unlock_irqrestore(&tw_dev->tw_lock, flags2);
+ spin_unlock(&tw_dev->tw_lock);
X }
X spin_unlock_irqrestore(&io_request_lock, flags);
X } /* End tw_interrupt() */
@@ -1263,7 +1495,7 @@
X param = (TW_Param *)tw_dev->alignment_virtual_address[request_id];
X memset(param, 0, sizeof(TW_Sector));
X
- dprintk(KERN_NOTICE "opcode = %d table_id = %d parameter_id = %d parameter_size_bytes = %d\n", ioctl->opcode, ioctl->table_id, ioctl->parameter_id,, ioctl->parameter_size_bytes);
+ dprintk(KERN_NOTICE "opcode = %d table_id = %d parameter_id = %d parameter_size_bytes = %d\n", ioctl->opcode, ioctl->table_id, ioctl->parameter_id, ioctl->parameter_size_bytes);
X opcode = ioctl->opcode;
X
X switch (opcode) {
@@ -1283,12 +1515,17 @@
X case TW_OP_SET_PARAM:
X dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl(): caught TW_OP_SET_PARAM: table_id = %d, parameter_id = %d, parameter_size_bytes = %d.\n",
X ioctl->table_id, ioctl->parameter_id, ioctl->parameter_size_bytes);
- command_packet->byte0.opcode = TW_OP_SET_PARAM;
- param->table_id = ioctl->table_id;
- param->parameter_id = ioctl->parameter_id;
- param->parameter_size_bytes = ioctl->parameter_size_bytes;
- memcpy(param->data, ioctl->data, ioctl->parameter_size_bytes);
- break;
+ if (ioctl->data != NULL) {
+ command_packet->byte0.opcode = TW_OP_SET_PARAM;
+ param->table_id = ioctl->table_id;
+ param->parameter_id = ioctl->parameter_id;
+ param->parameter_size_bytes = ioctl->parameter_size_bytes;
+ memcpy(param->data, ioctl->data, ioctl->parameter_size_bytes);
+ break;
+ } else {
+ printk(KERN_WARNING "3w-xxxx: tw_ioctl(): ioctl->data NULL.\n");
+ return 1;
+ }
X case TW_OP_AEN_LISTEN:
X dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl(): caught TW_OP_AEN_LISTEN.\n");
X if (tw_dev->aen_head == tw_dev->aen_tail) {
@@ -1313,11 +1550,15 @@
X tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
X return 0;
X case TW_CMD_PACKET:
- memcpy(command_packet, ioctl->data, sizeof(TW_Command));
- command_packet->request_id = request_id;
- tw_post_command_packet(tw_dev, request_id);
-
- return 0;
+ if (ioctl->data != NULL) {
+ memcpy(command_packet, ioctl->data, sizeof(TW_Command));
+ command_packet->request_id = request_id;
+ tw_post_command_packet(tw_dev, request_id);


+ return 0;
+ } else {

+ printk(KERN_WARNING "3w-xxxx: tw_ioctl(): ioctl->data NULL.\n");
+ return 1;
+ }
X default:
X printk(KERN_WARNING "3w-xxxx: Unknown ioctl 0x%x.\n", opcode);
X tw_dev->state[request_id] = TW_S_COMPLETED;
@@ -1425,8 +1666,10 @@
X status_reg_addr = tw_dev->registers.status_reg_addr;
X status_reg_value = inl(status_reg_addr);
X
- if (tw_check_bits(status_reg_value))
+ if (tw_check_bits(status_reg_value)) {
X printk(KERN_WARNING "3w-xxxx: tw_post_command_packet(): Unexpected bits.\n");
+ tw_decode_bits(tw_dev, status_reg_value);
+ }
X
X if ((status_reg_value & TW_STATUS_COMMAND_QUEUE_FULL) == 0) {
X /* We successfully posted the command packet */
@@ -1586,15 +1829,23 @@
X /* This function will find and initialize any cards */
X int tw_scsi_detect(Scsi_Host_Template *tw_host)
X {
+ int ret;
+
X dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_detect()\n");
X
+ printk(KERN_WARNING "3ware Storage Controller device driver for Linux v%s.\n", tw_driver_version);
+
X /* Check if the kernel has PCI interface compiled in */
X if (!pci_present()) {
X printk(KERN_WARNING "3w-xxxx: tw_scsi_detect(): No pci interface present.\n");


X return 0;
X }
X

- return(tw_findcards(tw_host));
+ spin_unlock_irq(&io_request_lock);
+ ret = tw_findcards(tw_host);
+ spin_lock_irq(&io_request_lock);
+
+ return ret;
X } /* End tw_scsi_detect() */
X
X /* This is the new scsi eh abort function */
@@ -1615,6 +1866,11 @@
X printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_abort(): Invalid device extension.\n");
X return (FAILED);
X }
+
+ /* We have to let AEN requests through before the reset */
+ spin_unlock_irq(&io_request_lock);
+ mdelay(TW_AEN_WAIT_TIME);
+ spin_lock_irq(&io_request_lock);
X
X spin_lock(&tw_dev->tw_lock);
X tw_dev->num_aborts++;
@@ -1677,6 +1933,11 @@
X return (FAILED);
X }
X
+ /* We have to let AEN requests through before the reset */
+ spin_unlock_irq(&io_request_lock);
+ mdelay(TW_AEN_WAIT_TIME);
+ spin_lock_irq(&io_request_lock);
+
X spin_lock_irqsave(&tw_dev->tw_lock, flags);
X tw_dev->num_resets++;
X
@@ -1752,6 +2013,7 @@
X tw_copy_info(&info, "Max sector count: %3d\n", tw_dev->max_sector_count);
X tw_copy_info(&info, "Resets: %3d\n", tw_dev->num_resets);
X tw_copy_info(&info, "Aborts: %3d\n", tw_dev->num_aborts);
+ tw_copy_info(&info, "AEN's: %3d\n", tw_dev->aen_count);
X }
X if (info.position > info.offset) {
X return (info.position - info.offset);
@@ -1766,9 +2028,16 @@
X unsigned char *command = SCpnt->cmnd;
X int request_id = 0;
X int error = 0;
- int flags = 0;
+ unsigned long flags = 0;
X TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->host->hostdata;
X
+ if (tw_dev == NULL) {
+ printk(KERN_WARNING "3w-xxxx: tw_scsi_queue(): Invalid device extension.\n");
+ SCpnt->result = (DID_ERROR << 16);
+ done(SCpnt);


+ return 0;
+ }
+

X spin_lock_irqsave(&tw_dev->tw_lock, flags);
X dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue()\n");
X
@@ -1779,20 +2048,6 @@
X spin_unlock_irqrestore(&tw_dev->tw_lock, flags);
X return 0;
X }
- if (done == NULL) {
- printk(KERN_WARNING "3w-xxxx: tw_scsi_queue(): Invalid done function.\n");
- SCpnt->result = (DID_ERROR << 16);
- done(SCpnt);
- spin_unlock_irqrestore(&tw_dev->tw_lock, flags);
- return 0;
- }
- if (tw_dev == NULL) {
- printk(KERN_WARNING "3w-xxxx: tw_scsi_queue(): Invalid device extension.\n");
- SCpnt->result = (DID_ERROR << 16);
- done(SCpnt);
- spin_unlock_irqrestore(&tw_dev->tw_lock, flags);
- return 0;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 43'
echo 'File patch-2.2.20 is continued in part 44'
echo "44" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:41 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part42

#!/bin/sh -x
# this is part 42 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 42; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"xerp fail");
+ debug_text_event (tape_debug_area,3,(((tapestate_get (ti) < TS_SIZE) &&

+ (tapestate_get (ti) >= 0)) ?

+ state_verbose[tapestate_get (ti)] : "UNKNOWN"));
+#endif
+ if ((tapestate_get(ti)!=TS_UNUSED) && (tapestate_get(ti)!=TS_IDLE)) {
+ tape_dump_sense(&ti->devstat);
+ ti->rc = -error_id;


+ ti->wanna_wakeup=1;
+ switch (tapestate_get(ti)) {
+ case TS_REW_RELEASE_INIT:

+ tapestate_set(ti,TS_FAILED);


+ wake_up (&ti->wq);
+ break;

+ case TS_BLOCK_INIT:
+ tapestate_set(ti,TS_FAILED);
+ schedule_tapeblock_exec_IO(ti);
+ break;
+ default:
+ tapestate_set(ti,TS_FAILED);


+ wake_up_interruptible (&ti->wq);
+ }
+ } else {

+ PRINT_WARN("Recieved an unsolicited IRQ.\n");
+ tape_dump_sense(&ti->devstat);
+ }
+}
+
+void tape34xx_error_recovery_succeded(tape_info_t* ti) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"xerp done");
+ debug_text_event (tape_debug_area,3,(((tapestate_get (ti) < TS_SIZE) &&

+ (tapestate_get (ti) >= 0)) ?

+ state_verbose[tapestate_get (ti)] : "UNKNOWN"));
+#endif
+ if ((tapestate_get(ti)!=TS_UNUSED) && (tapestate_get(ti)!=TS_DONE)) {


+ tapestate_event (ti, TE_DONE);
+ } else {

+ PRINT_WARN("Recieved an unsolicited IRQ.\n");
+ tape_dump_sense(&ti->devstat);
+ }
+}
+
+void tape34xx_error_recovery_do_retry(tape_info_t* ti) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"xerp retr");
+ debug_text_event (tape_debug_area,3,(((tapestate_get (ti) < TS_SIZE) &&

+ (tapestate_get (ti) >= 0)) ?

+ state_verbose[tapestate_get (ti)] : "UNKNOWN"));
+#endif
+ if ((tapestate_get(ti)!=TS_UNUSED) && (tapestate_get(ti)!=TS_IDLE)) {
+ tape_dump_sense(&ti->devstat);
+ while (do_IO (ti->devinfo.irq, ti->cqr->cpaddr, (unsigned long) ti->cqr, 0x00, ti->cqr->options));
+ } else {
+ PRINT_WARN("Recieved an unsolicited IRQ.\n");
+ tape_dump_sense(&ti->devstat);
+ }
+}
+
+void
+tape34xx_error_recovery_read_opposite (tape_info_t* ti) {
+ switch (tapestate_get(ti)) {
+ case TS_RFO_INIT:
+ // We did read forward, but the data could not be read *correctly*.
+ // We will read backward and then skip forward again.
+ ti->cqr=tape34xx_read_opposite(ti,0);
+ if (ti->cqr==NULL)
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ else
+ tape34xx_error_recovery_do_retry(ti);
+ break;
+ case TS_RBA_INIT:
+ // We tried to read forward and backward, but hat no success -> failed.
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ break;
+ case TS_BLOCK_INIT:
+ tape34xx_error_recovery_do_retry(ti);
+ break;
+ default:
+ PRINT_WARN("read_opposite_recovery_called_with_state:%s\n",
+ (((tapestate_get (ti) < TS_SIZE) &&

+ (tapestate_get (ti) >= 0)) ?

+ state_verbose[tapestate_get (ti)] : "UNKNOWN"));
+ }
+}
+
+void
+tape34xx_error_recovery_HWBUG (tape_info_t* ti,int condno) {
+ devstat_t* stat=&ti->devstat;
+ PRINT_WARN("An unexpected condition #%d was caught in tape error recovery.\n",condno);
+ PRINT_WARN("Please report this incident.\n");
+ PRINT_WARN("State of the tape:%s\n",
+ (((tapestate_get (ti) < TS_SIZE) &&

+ (tapestate_get (ti) >= 0)) ?

+ state_verbose[tapestate_get (ti)] : "UNKNOWN"));


+ PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
+ " %02X%02X%02X%02X %02X%02X%02X%02X \n",
+ stat->ii.sense.data[0], stat->ii.sense.data[1],
+ stat->ii.sense.data[2], stat->ii.sense.data[3],
+ stat->ii.sense.data[4], stat->ii.sense.data[5],
+ stat->ii.sense.data[6], stat->ii.sense.data[7],
+ stat->ii.sense.data[8], stat->ii.sense.data[9],
+ stat->ii.sense.data[10], stat->ii.sense.data[11],
+ stat->ii.sense.data[12], stat->ii.sense.data[13],
+ stat->ii.sense.data[14], stat->ii.sense.data[15]);
+ PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
+ " %02X%02X%02X%02X %02X%02X%02X%02X \n",
+ stat->ii.sense.data[16], stat->ii.sense.data[17],
+ stat->ii.sense.data[18], stat->ii.sense.data[19],
+ stat->ii.sense.data[20], stat->ii.sense.data[21],
+ stat->ii.sense.data[22], stat->ii.sense.data[23],
+ stat->ii.sense.data[24], stat->ii.sense.data[25],
+ stat->ii.sense.data[26], stat->ii.sense.data[27],
+ stat->ii.sense.data[28], stat->ii.sense.data[29],
+ stat->ii.sense.data[30], stat->ii.sense.data[31]);

+ tape34xx_error_recovery_has_failed(ti,EIO);
+}
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tape34xx.h linux/drivers/s390/char/tape34xx.h
--- v2.2.19/drivers/s390/char/tape34xx.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tape34xx.h Wed Oct 10 01:41:05 2001
@@ -0,0 +1,183 @@
+
+/***************************************************************************
+ *
+ * drivers/s390/char/tape34xx.h
+ * common tape device discipline for 34xx tapes.


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *

+ ****************************************************************************
+ */
+

+#ifndef _TAPE34XX_H
+
+#define _TAPE34XX_H
+
+/*
+ * The CCW commands for the Tape type of command.
+ */
+
+#define INVALID_00 0x00 /* Invalid cmd */
+#define BACKSPACEBLOCK 0x27 /* Back Space block */
+#define BACKSPACEFILE 0x2f /* Back Space file */
+#define DATA_SEC_ERASE 0x97 /* Data security erase */
+#define ERASE_GAP 0x17 /* Erase Gap */
+#define FORSPACEBLOCK 0x37 /* Forward space block */
+#define FORSPACEFILE 0x3F /* Forward Space file */
+#define FORCE_STREAM_CNT 0xEB /* Forced streaming count # */
+#define NOP 0x03 /* No operation */
+#define READ_FORWARD 0x02 /* Read forward */
+#define REWIND 0x07 /* Rewind */
+#define REWIND_UNLOAD 0x0F /* Rewind and Unload */
+#define SENSE 0x04 /* Sense */
+#define NEW_MODE_SET 0xEB /* Guess it is Mode set */
+#define WRITE_CMD 0x01 /* Write */
+#define WRITETAPEMARK 0x1F /* Write Tape Mark */
+
+#define ASSIGN 0xB7 /* 3420 REJECT,3480 OK */
+#define CONTROL_ACCESS 0xE3 /* Set high speed */
+#define DIAG_MODE_SET 0x0B /* 3420 NOP, 3480 REJECT*/
+#define LOAD_DISPLAY 0x9F /* 3420 REJECT,3480 OK */
+#define LOCATE 0x4F /* 3420 REJ, 3480 NOP */
+#define LOOP_WRITE_TO_READ 0x8B /* 3480 REJECT */
+#define MODE_SET_DB 0xDB /* 3420 REJECT,3480 OK */
+#define MODE_SET_C3 0xC3 /* for 3420 */
+#define MODE_SET_CB 0xCB /* for 3420 */
+#define MODE_SET_D3 0xD3 /* for 3420 */
+#define READ_BACKWARD 0x0C /* */
+#define READ_BLOCK_ID 0x22 /* 3420 REJECT,3480 OK */
+#define READ_BUFFER 0x12 /* 3420 REJECT,3480 OK */
+#define READ_BUFF_LOG 0x24 /* 3420 REJECT,3480 OK */
+#define RELEASE 0xD4 /* 3420 NOP, 3480 REJECT*/
+#define REQ_TRK_IN_ERROR 0x1B /* 3420 NOP, 3480 REJECT*/
+#define RESERVE 0xF4 /* 3420 NOP, 3480 REJECT*/
+#define SENSE_GROUP_ID 0x34 /* 3420 REJECT,3480 OK */
+#define SENSE_ID 0xE4 /* 3420 REJECT,3480 OK */
+#define READ_DEV_CHAR 0x64 /* Read device characteristics */
+#define SET_DIAGNOSE 0x4B /* 3420 NOP, 3480 REJECT*/
+#define SET_GROUP_ID 0xAF /* 3420 REJECT,3480 OK */
+#define SET_TAPE_WRITE_IMMED 0xC3 /* for 3480 */
+#define SUSPEND 0x5B /* 3420 REJ, 3480 NOP */
+#define SYNC 0x43 /* Synchronize (flush buffer) */
+#define UNASSIGN 0xC7 /* 3420 REJECT,3480 OK */
+#define PERF_SUBSYS_FUNC 0x77 /* 3490 CMD */
+#define READ_CONFIG_DATA 0xFA /* 3490 CMD */
+#define READ_MESSAGE_ID 0x4E /* 3490 CMD */
+#define READ_SUBSYS_DATA 0x3E /* 3490 CMD */
+#define SET_INTERFACE_ID 0x73 /* 3490 CMD */
+
+#ifndef MIN
+#define MIN(a,b) ( (a) < (b) ? (a) : (b) )
+#endif
+
+
+#define BLOCKSIZE 4096 /* size of the tape rcds */
+
+#define COMMAND_CHAIN CCW_FLAG_CC /* redefine from irq.h */
+#define CHANNEL_END DEV_STAT_CHN_END /* redefine from irq.h */
+#define DEVICE_END DEV_STAT_DEV_END /* redefine from irq.h */
+#define UNIT_CHECK DEV_STAT_UNIT_CHECK /* redefine from irq.h */
+#define UNIT_EXCEPTION DEV_STAT_UNIT_EXCEP /* redefine from irq.h */
+#define CONTROL_UNIT_END DEV_STAT_CU_END /* redefine from irq.h */
+#define INCORR_LEN SCHN_STAT_INCORR_LEN /* redefine from irq.h */
+
+#define SENSE_COMMAND_REJECT 0x80
+#define SENSE_INTERVENTION_REQUIRED 0x40
+#define SENSE_BUS_OUT_CHECK 0x20
+#define SENSE_EQUIPMENT_CHECK 0x10
+#define SENSE_DATA_CHECK 0x08
+#define SENSE_OVERRUN 0x04
+#define SENSE_DEFERRED_UNIT_CHECK 0x02
+#define SENSE_ASSIGNED_ELSEWHERE 0x01
+
+#define SENSE_LOCATE_FAILURE 0x80
+#define SENSE_DRIVE_ONLINE 0x40
+#define SENSE_RESERVED 0x20
+#define SENSE_RECORD_SEQUENCE_ERR 0x10
+#define SENSE_BEGINNING_OF_TAPE 0x08
+#define SENSE_WRITE_MODE 0x04
+#define SENSE_WRITE_PROTECT 0x02
+#define SENSE_NOT_CAPABLE 0x01
+
+#define SENSE_CHANNEL_ADAPTER_CODE 0xE0
+#define SENSE_CHANNEL_ADAPTER_LOC 0x10
+#define SENSE_REPORTING_CU 0x08
+#define SENSE_AUTOMATIC_LOADER 0x04
+#define SENSE_TAPE_SYNC_MODE 0x02
+#define SENSE_TAPE_POSITIONING 0x01
+
+typedef struct _tape34xx_disc_data_t {
+ __u8 modeset_byte;
+} tape34xx_disc_data_t __attribute__ ((packed, aligned(8)));
+
+/* discipline functions */
+int tape34xx_ioctl_overload (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
+ccw_req_t * tape34xx_write_block (const char *data, size_t count, tape_info_t * ti);
+void tape34xx_free_write_block (ccw_req_t * cqr, tape_info_t * ti);
+ccw_req_t * tape34xx_read_block (const char *data, size_t count, tape_info_t * ti);
+void tape34xx_free_read_block (ccw_req_t * cqr, tape_info_t * ti);
+void tape34xx_clear_read_block (ccw_req_t * cqr, tape_info_t * ti);
+ccw_req_t * tape34xx_mtfsf (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtbsf (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtfsr (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtbsr (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtweof (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtrew (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtoffl (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtnop (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtbsfm (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtfsfm (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mteom (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mterase (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtsetdensity (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtseek (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mttell (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtsetdrvbuffer (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtlock (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtunlock (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtload (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtunload (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtcompression (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtsetpart (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtmkpart (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtiocget (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_mtiocpos (tape_info_t * ti, int count);
+ccw_req_t * tape34xx_bread (struct request *req, tape_info_t* ti,int tapeblock_major);
+ccw_req_t * tape34xx_bwrite (struct request *req, tape_info_t* ti,int tapeblock_major);
+void tape34xx_free_bread (ccw_req_t*,struct _tape_info_t*);
+void tape34xx_free_bwrite (ccw_req_t*,struct _tape_info_t*);
+
+/* Event handlers */
+void tape34xx_default_handler (tape_info_t * ti);
+void tape34xx_unexpect_uchk_handler (tape_info_t * ti);
+void tape34xx_unused_done(tape_info_t* ti);
+void tape34xx_idle_done(tape_info_t* ti);
+void tape34xx_block_done(tape_info_t* ti);
+void tape34xx_bsf_init_done(tape_info_t* ti);
+void tape34xx_dse_init_done(tape_info_t* ti);
+void tape34xx_fsf_init_done(tape_info_t* ti);
+void tape34xx_bsb_init_done(tape_info_t* ti);
+void tape34xx_fsb_init_done(tape_info_t* ti);
+void tape34xx_lbl_init_done(tape_info_t* ti);
+void tape34xx_nop_init_done(tape_info_t* ti);
+void tape34xx_rfo_init_done(tape_info_t* ti);
+void tape34xx_rbi_init_done(tape_info_t* ti);
+void tape34xx_rew_init_done(tape_info_t* ti);
+void tape34xx_rew_release_init_done(tape_info_t* ti);
+void tape34xx_run_init_done(tape_info_t* ti);
+void tape34xx_wri_init_done(tape_info_t* ti);
+void tape34xx_wtm_init_done(tape_info_t* ti);
+
+extern void schedule_tapeblock_exec_IO (tape_info_t *ti);
+
+// the error recovery stuff:
+void tape34xx_error_recovery (tape_info_t* ti);
+void tape34xx_error_recovery_has_failed (tape_info_t* ti,int error_id);
+void tape34xx_error_recovery_succeded(tape_info_t* ti);
+void tape34xx_error_recovery_do_retry(tape_info_t* ti);
+void tape34xx_error_recovery_read_opposite (tape_info_t* ti);
+void tape34xx_error_recovery_HWBUG (tape_info_t* ti,int condno);
+#endif // _TAPE34XX_H
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tapeblock.c linux/drivers/s390/char/tapeblock.c
--- v2.2.19/drivers/s390/char/tapeblock.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tapeblock.c Wed Oct 10 01:41:06 2001
@@ -0,0 +1,598 @@
+
+/***************************************************************************
+ *
+ * drivers/s390/char/tapeblock.c
+ * block device frontend for tape device driver


+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *
+ *
+ ****************************************************************************
+ */
+

+#include "tapedefs.h"
+#include <linux/config.h>
+#include <linux/blkdev.h>
+#include <linux/blk.h>
+#include <linux/version.h>
+#include <linux/interrupt.h>


+#include <asm/ccwcache.h> /* CCW allocations */

+#include <asm/debug.h>
+#include <asm/s390dyn.h>
+#include <linux/compatmac.h>
+#ifdef MODULE
+#define __NO_VERSION__
+#include <linux/module.h>
+#endif
+#include "tape.h"
+#include "tapeblock.h"
+
+#define PRINTK_HEADER "TBLOCK:"
+
+/*
+ * file operation structure for tape devices
+ */
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+static struct block_device_operations tapeblock_fops = {
+#else
+static struct file_operations tapeblock_fops = {
+#endif
+ open : tapeblock_open, /* open */
+ release : tapeblock_release, /* release */
+ };
+
+int tapeblock_major = 0;
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+static void tape_request_fn (request_queue_t * queue);
+#else
+static void tape_request_fn (void);
+#endif
+
+static request_queue_t* tapeblock_getqueue (kdev_t kdev);
+
+#ifdef CONFIG_DEVFS_FS
+void
+tapeblock_mkdevfstree (tape_info_t* ti) {
+ ti->devfs_block_dir=devfs_mk_dir (ti->devfs_dir, "block", ti);
+ ti->devfs_disc=devfs_register(ti->devfs_block_dir, "disc",DEVFS_FL_DEFAULT,
+ tapeblock_major, ti->blk_minor,
+ TAPEBLOCK_DEFAULTMODE, &tapeblock_fops, ti);
+}
+
+void
+tapeblock_rmdevfstree (tape_info_t* ti) {
+ devfs_unregister(ti->devfs_disc);
+ devfs_unregister(ti->devfs_block_dir);
+}
+#endif
+
+void
+tapeblock_setup(tape_info_t* ti) {
+ blk_size[tapeblock_major][ti->blk_minor]=0; // this will be detected
+ blksize_size[tapeblock_major][ti->blk_minor]=2048; // blocks are 2k by default.
+ hardsect_size[tapeblock_major][ti->blk_minor]=512;
+ blk_init_queue (&ti->request_queue, tape_request_fn);
+ blk_queue_headactive (&ti->request_queue, 0);
+#ifdef CONFIG_DEVFS_FS
+ tapeblock_mkdevfstree(ti);
+#endif
+}
+
+int
+tapeblock_init(void) {
+ int result;
+ tape_frontend_t* blkfront,*temp;
+ tape_info_t* ti;
+
+ tape_init();
+ /* Register the tape major number to the kernel */
+#ifdef CONFIG_DEVFS_FS
+ result = devfs_register_blkdev(tapeblock_major, "tBLK", &tapeblock_fops);
+#else
+ result = register_blkdev(tapeblock_major, "tBLK", &tapeblock_fops);
+#endif
+ if (result < 0) {
+ PRINT_WARN(KERN_ERR "tape: can't get major %d for block device\n", tapeblock_major);
+ panic ("cannot get major number for tape block device");
+ }
+ if (tapeblock_major == 0) tapeblock_major = result; /* accept dynamic major number*/
+ INIT_BLK_DEV(tapeblock_major,tape_request_fn,tapeblock_getqueue,NULL);
+ read_ahead[tapeblock_major]=TAPEBLOCK_READAHEAD;
+ PRINT_WARN(KERN_ERR " tape gets major %d for block device\n", result);
+ blk_size[tapeblock_major] = (int*) kmalloc (256*sizeof(int),GFP_ATOMIC);
+ memset(blk_size[tapeblock_major],0,256*sizeof(int));
+ blksize_size[tapeblock_major] = (int*) kmalloc (256*sizeof(int),GFP_ATOMIC);
+ memset(blksize_size[tapeblock_major],0,256*sizeof(int));
+ hardsect_size[tapeblock_major] = (int*) kmalloc (256*sizeof(int),GFP_ATOMIC);
+ memset(hardsect_size[tapeblock_major],0,256*sizeof(int));
+ max_sectors[tapeblock_major] = (int*) kmalloc (256*sizeof(int),GFP_ATOMIC);
+ memset(max_sectors[tapeblock_major],0,256*sizeof(int));
+ blkfront = kmalloc(sizeof(tape_frontend_t),GFP_KERNEL);
+ if (blkfront==NULL) panic ("no mem for tape block device structure");
+ blkfront->device_setup=tapeblock_setup;
+#ifdef CONFIG_DEVFS_FS
+ blkfront->mkdevfstree = tapeblock_mkdevfstree;
+ blkfront->rmdevfstree = tapeblock_rmdevfstree;
+#endif
+ blkfront->next=NULL;
+ if (first_frontend==NULL) {
+ first_frontend=blkfront;
+ } else {
+ temp=first_frontend;
+ while (temp->next!=NULL)
+ temp=temp->next;
+ temp->next=blkfront;
+ }
+ ti=first_tape_info;
+ while (ti!=NULL) {
+ tapeblock_setup(ti);
+ ti=ti->next;


+ }
+ return 0;
+}
+
+

+void
+tapeblock_uninit(void) {
+ unregister_blkdev(tapeblock_major, "tBLK");
+}
+
+int
+tapeblock_open(struct inode *inode, struct file *filp) {
+ tape_info_t *ti;
+ kdev_t dev;
+ int rc;
+ long lockflags;
+
+ inode = filp->f_dentry->d_inode;
+ ti = first_tape_info;
+ while ((ti != NULL) && (ti->blk_minor != MINOR (inode->i_rdev)))
+ ti = (tape_info_t *) ti->next;


+ if (ti == NULL)

+ return -ENODEV;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:open:");


+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif

+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) != TS_UNUSED) {


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"b:dbusy");
+#endif
+ return -EBUSY;
+ }
+ tapestate_set (ti, TS_IDLE);
+ ti->position=-1;
+

+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ rc=tapeblock_mediumdetect(ti);
+ if (rc) {


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ tapestate_set (ti, TS_UNUSED);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return rc; // in case of errors, we don't have a size of the medium
+ }
+ dev = MKDEV (tapeblock_major, MINOR (inode->i_rdev)); /* Get the device */


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->blk_filp = filp;
+ filp->private_data = ti; /* save the dev.info for later reference */
+ ti->cqr=NULL;


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+

+#ifdef MODULE
+ MOD_INC_USE_COUNT;
+#endif /* MODULE */


+ return 0;
+}
+

+int
+tapeblock_release(struct inode *inode, struct file *filp) {
+ long lockflags;
+ tape_info_t *ti,*lastti;
+ ti = first_tape_info;
+ while ((ti != NULL) && (ti->blk_minor != MINOR (inode->i_rdev)))
+ ti = (tape_info_t *) ti->next;
+ if ((ti != NULL) && (tapestate_get (ti) == TS_NOT_OPER)) {


+ if (ti==first_tape_info) {
+ first_tape_info=ti->next;
+ } else {
+ lastti=first_tape_info;
+ while (lastti->next!=ti) lastti=lastti->next;
+ lastti->next=ti->next;
+ }

+ kfree(ti);
+ return 0;
+ }
+ if ((ti == NULL) || (tapestate_get (ti) != TS_IDLE)) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"b:notidle!");
+#endif
+ return -ENXIO; /* error in tape_release */
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:release:");


+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif

+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ tapestate_set (ti, TS_UNUSED);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+#ifdef MODULE
+ MOD_DEC_USE_COUNT;
+#endif /* MODULE */
+ invalidate_buffers(inode->i_rdev);


+ return 0;
+}
+

+static void
+tapeblock_end_request(tape_info_t* ti) {
+ struct buffer_head *bh;
+ int uptodate;
+ if ((tapestate_get(ti)!=TS_FAILED) &&
+ (tapestate_get(ti)!=TS_DONE))
+ BUG(); // A request has to be completed to end it
+ uptodate=(tapestate_get(ti)==TS_DONE); // is the buffer up to date?
+#ifdef TAPE_DEBUG
+ if (uptodate) {
+ debug_text_event (tape_debug_area,6,"b:done:");
+ debug_int_event (tape_debug_area,6,(long)ti->cqr);
+ } else {
+ debug_text_event (tape_debug_area,3,"b:failed:");
+ debug_int_event (tape_debug_area,3,(long)ti->cqr);
+ }
+#endif
+ // now inform ll_rw_block about a request status
+ while ((bh = ti->current_request->bh) != NULL) {
+ ti->current_request->bh = bh->b_reqnext;
+ bh->b_reqnext = NULL;
+ bh->b_end_io (bh, uptodate);
+ }
+ if (!end_that_request_first (ti->current_request, uptodate, "tBLK")) {
+#ifndef DEVICE_NO_RANDOM
+ add_blkdev_randomness (MAJOR (ti->current_request->rq_dev));
+#endif
+ end_that_request_last (ti->current_request);
+ }
+ ti->discipline->free_bread(ti->cqr,ti);
+ ti->cqr=NULL;
+ ti->current_request=NULL;
+ if (tapestate_get(ti)!=TS_NOT_OPER) tapestate_set(ti,TS_IDLE);
+ return;
+}
+
+static void
+tapeblock_exec_IO (tape_info_t* ti) {
+ int rc;
+ struct request* req;
+ if (ti->cqr) { // process done/failed request
+ while ((tapestate_get(ti)==TS_FAILED) &&
+ ti->blk_retries>0) {
+ ti->blk_retries--;
+ ti->position=-1;
+ tapestate_set(ti,TS_BLOCK_INIT);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"b:retryreq:");
+ debug_int_event (tape_debug_area,3,(long)ti->cqr);
+#endif
+ rc = do_IO (ti->devinfo.irq, ti->cqr->cpaddr, (unsigned long) ti->cqr,
+ 0x00, ti->cqr->options);


+ if (rc) {
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,3,"b:doIOfail:");
+ debug_int_event (tape_debug_area,3,(long)ti->cqr);
+#endif
+ continue; // one retry lost 'cause doIO failed
+ }
+ return;
+ }
+ tapeblock_end_request (ti); // check state, inform user, free mem, dev=idl
+ }
+ if (ti->cqr!=NULL) BUG(); // tape should be idle now, request should be freed!
+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ return;
+ }
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+ if (list_empty (&ti->request_queue.queue_head)) {
+#else
+ if (ti->request_queue==NULL) {
+#endif
+ // nothing more to do or device has dissapeared;)
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:Qempty");
+#endif
+ tapestate_set(ti,TS_IDLE);
+ return;
+ }
+ // queue is not empty, fetch a request and start IO!
+ req=ti->current_request=tape_next_request(&ti->request_queue);
+ if (req==NULL) {
+ BUG(); // Yo. The queue was not reported empy, but no request found. This is _bad_.
+ }
+ if (req->cmd!=READ) { // we only support reading
+ tapestate_set(ti,TS_FAILED);
+ tapeblock_end_request (ti); // check state, inform user, free mem, dev=idl
+ tapestate_set(ti,TS_BLOCK_INIT);
+ schedule_tapeblock_exec_IO(ti);
+ return;
+ }
+ ti->cqr=ti->discipline->bread(req,ti,tapeblock_major); //build channel program from request
+ if (!ti->cqr) {
+ // ccw generation failed. we try again later.
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"b:cqrNULL");
+#endif
+ schedule_tapeblock_exec_IO(ti);
+ ti->current_request=NULL;
+ return;
+ }
+ ti->blk_retries = TAPEBLOCK_RETRIES;
+ rc= do_IO (ti->devinfo.irq, ti->cqr->cpaddr,
+ (unsigned long) ti->cqr, 0x00, ti->cqr->options);
+ if (rc) {
+ // okay. ssch failed. we try later.
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"b:doIOfail");
+#endif
+ ti->discipline->free_bread(ti->cqr,ti);
+ ti->cqr=NULL;
+ ti->current_request=NULL;
+ schedule_tapeblock_exec_IO(ti);
+ return;
+ }
+ // our request is in IO. we remove it from the queue and exit
+ tape_dequeue_request (&ti->request_queue,req);
+}
+
+static void
+do_tape_request (request_queue_t * queue) {
+ tape_info_t* ti;
+ long lockflags;
+ for (ti=first_tape_info;
+ ((ti!=NULL) && ((&ti->request_queue)!=queue));
+ ti=ti->next);
+ if (ti==NULL) BUG();


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get(ti)!=TS_IDLE) {
+ s390irq_spin_unlock_irqrestore(ti->devinfo.irq,lockflags);
+ return;
+ }
+ if (tapestate_get(ti)!=TS_IDLE) BUG();
+ tapestate_set(ti,TS_BLOCK_INIT);
+ tapeblock_exec_IO(ti);
+ s390irq_spin_unlock_irqrestore(ti->devinfo.irq,lockflags);
+}
+
+static void
+run_tapeblock_exec_IO (tape_info_t* ti) {
+ long flags_390irq,flags_ior;
+ spin_lock_irqsave (&io_request_lock, flags_ior);
+ s390irq_spin_lock_irqsave(ti->devinfo.irq,flags_390irq);
+ atomic_set(&ti->bh_scheduled,0);
+ tapeblock_exec_IO(ti);
+ s390irq_spin_unlock_irqrestore(ti->devinfo.irq,flags_390irq);
+ spin_unlock_irqrestore (&io_request_lock, flags_ior);
+}
+
+void
+schedule_tapeblock_exec_IO (tape_info_t *ti)
+{
+ /* Protect against rescheduling, when already running */
+ if (atomic_compare_and_swap(0,1,&ti->bh_scheduled)) {
+ return;
+ }
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,3,98))
+ INIT_LIST_HEAD(&ti->bh_tq.list);
+#endif
+ ti->bh_tq.sync = 0;
+ ti->bh_tq.routine = (void *) (void *) run_tapeblock_exec_IO;
+ ti->bh_tq.data = ti;
+
+ queue_task (&ti->bh_tq, &tq_immediate);
+ mark_bh (IMMEDIATE_BH);
+ return;
+}
+
+/* wrappers around do_tape_request for different kernel versions */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,98))
+static void tape_request_fn (void) {
+ tape_info_t* ti=first_tape_info;
+ while (ti!=NULL) {
+ do_tape_request(&ti->request_queue);
+ ti=ti->next;
+ }
+}
+#else
+static void tape_request_fn (request_queue_t* queue) {
+ do_tape_request(queue);
+}
+#endif
+
+static request_queue_t* tapeblock_getqueue (kdev_t kdev) {
+ tape_info_t* ti=first_tape_info;
+ while ((ti!=NULL) && (MINOR(kdev)!=ti->blk_minor))
+ ti=ti->next;
+ if (ti!=NULL) return &ti->request_queue;


+ return NULL;
+}
+

+int tapeblock_mediumdetect(tape_info_t* ti) {
+ ccw_req_t* cqr;
+ int losize=1,hisize=1,rc;
+ long lockflags;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"b:medDet");
+#endif
+ PRINT_WARN("Detecting media size. This will take _long_, so get yourself a coffee...\n");
+ while (1) { //is interruped by break
+ hisize=hisize << 1; // try twice the size tested before
+ cqr=ti->discipline->mtseek (ti, hisize);
+ if (cqr == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:ccwg fail");
+#endif
+ return -ENOSPC;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ if (rc) return -EIO;
+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ tape_free_request (cqr);
+ if (ti->kernbuf) {
+ kfree (ti->kernbuf);
+ ti->kernbuf=NULL;
+ }
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ break;
+ }
+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq,lockflags);
+ return -ENODEV;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ losize=hisize;
+ }
+ cqr = ti->discipline->mtrew (ti, 1);
+ if (cqr == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:ccwg fail");
+#endif
+ return -ENOSPC;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ tape_free_request (cqr);
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq,lockflags);
+ return -ENODEV;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ while (losize!=hisize) {
+ cqr=ti->discipline->mtseek (ti, (hisize+losize)/2+1);
+ if (cqr == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:ccwg fail");
+#endif
+ return -ENOSPC;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ if (rc) return -EIO;
+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ tape_free_request (cqr);
+ if (ti->kernbuf) {
+ kfree (ti->kernbuf);
+ ti->kernbuf=NULL;
+ }
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq,lockflags);
+ return -ENODEV;
+ }
+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ hisize=(hisize+losize)/2;
+ cqr = ti->discipline->mtrew (ti, 1);
+ if (cqr == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"b:ccwg fail");
+#endif
+ return -ENOSPC;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ tape_free_request (cqr);
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ continue;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ losize=(hisize+losize)/2+1;
+ }
+ blk_size[tapeblock_major][ti->blk_minor]=(losize)*(blksize_size[tapeblock_major][ti->blk_minor]/1024);
+ return 0;
+}
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tapeblock.h linux/drivers/s390/char/tapeblock.h
--- v2.2.19/drivers/s390/char/tapeblock.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tapeblock.h Wed Oct 10 01:41:06 2001
@@ -0,0 +1,36 @@
+
+/***************************************************************************


+ *
+ * drivers/s390/char/tapechar.h
+ * character device frontend for tape device driver
+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *
+ *
+ ****************************************************************************
+ */
+

+#ifndef TAPEBLOCK_H
+#define TAPEBLOCK_H
+#include <linux/config.h>
+#define PARTN_BITS 0
+
+#define TAPEBLOCK_READAHEAD 30
+#define TAPEBLOCK_MAJOR 0
+
+#define TAPEBLOCK_DEFAULTMODE 0060644
+
+int tapeblock_open(struct inode *, struct file *);
+int tapeblock_release(struct inode *, struct file *);
+void tapeblock_setup(tape_info_t* ti);
+void schedule_tapeblock_exec_IO (tape_info_t *ti);
+int tapeblock_mediumdetect(tape_info_t* ti);
+#ifdef CONFIG_DEVFS_FS
+void tapeblock_mkdevfstree (tape_info_t* ti);
+#endif
+int tapeblock_init (void);
+void tapeblock_uninit (void);
+#endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tapechar.c linux/drivers/s390/char/tapechar.c
--- v2.2.19/drivers/s390/char/tapechar.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tapechar.c Wed Oct 10 01:41:06 2001
@@ -0,0 +1,761 @@
+
+/***************************************************************************
+ *
+ * drivers/s390/char/tapechar.c


+ * character device frontend for tape device driver
+ *
+ * S390 and zSeries version
+ * Copyright (C) 2001 IBM Corporation
+ * Author(s): Carsten Otte <co...@de.ibm.com>
+ * Tuan Ngo-Anh <ngo...@de.ibm.com>
+ *
+ *
+ ****************************************************************************
+ */
+

+#include "tapedefs.h"
+#include <linux/config.h>
+#include <linux/version.h>

+#include <linux/types.h>
+#include <linux/proc_fs.h>


+#include <asm/ccwcache.h> /* CCW allocations */
+#include <asm/s390dyn.h>
+#include <asm/debug.h>

+#include <linux/mtio.h>
+#include <asm/uaccess.h>
+#include <linux/compatmac.h>
+#ifdef MODULE
+#define __NO_VERSION__
+#include <linux/module.h>
+#endif
+#include "tape.h"
+#include "tapechar.h"
+
+#define PRINTK_HEADER "TCHAR:"
+
+/*
+ * file operation structure for tape devices
+ */
+static struct file_operations tape_fops =
+{
+ // owner : THIS_MODULE,
+ llseek:NULL, /* lseek - default */
+ read:tape_read, /* read */
+ write:tape_write, /* write */
+ readdir:NULL, /* readdir - bad */
+ poll:NULL, /* poll */
+ ioctl:tape_ioctl, /* ioctl */
+ mmap:NULL, /* mmap */
+ open:tape_open, /* open */
+ flush:NULL, /* flush */
+ release:tape_release, /* release */
+ fsync:NULL, /* fsync */
+ fasync:NULL, /* fasync */
+ lock:NULL,
+};
+
+int tape_major = TAPE_MAJOR;
+
+#ifdef CONFIG_DEVFS_FS
+void
+tapechar_mkdevfstree (tape_info_t* ti) {
+ ti->devfs_char_dir=devfs_mk_dir (ti->devfs_dir, "char", ti);
+ ti->devfs_nonrewinding=devfs_register(ti->devfs_char_dir, "nonrewinding",
+ DEVFS_FL_DEFAULT,tape_major,
+ ti->nor_minor, TAPECHAR_DEFAULTMODE,
+ &tape_fops, ti);
+ ti->devfs_rewinding=devfs_register(ti->devfs_char_dir, "rewinding",
+ DEVFS_FL_DEFAULT, tape_major, ti->rew_minor,
+ TAPECHAR_DEFAULTMODE, &tape_fops, ti);
+}
+
+void
+tapechar_rmdevfstree (tape_info_t* ti) {
+ devfs_unregister(ti->devfs_nonrewinding);
+ devfs_unregister(ti->devfs_rewinding);
+ devfs_unregister(ti->devfs_char_dir);
+}
+#endif
+
+void
+tapechar_setup (tape_info_t * ti)
+{
+#ifdef CONFIG_DEVFS_FS
+ tapechar_mkdevfstree(ti);
+#endif
+}
+
+void
+tapechar_init (void)
+{
+ int result;
+ tape_frontend_t *charfront,*temp;
+ tape_info_t* ti;
+
+ tape_init();
+
+ /* Register the tape major number to the kernel */
+#ifdef CONFIG_DEVFS_FS
+ result = devfs_register_chrdev (tape_major, "tape", &tape_fops);
+#else
+ result = register_chrdev (tape_major, "tape", &tape_fops);
+#endif
+
+ if (result < 0) {
+ PRINT_WARN (KERN_ERR "tape: can't get major %d\n", tape_major);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"c:initfail");
+ debug_text_event (tape_debug_area,3,"regchrfail");
+#endif /* TAPE_DEBUG */
+ panic ("no major number available for tape char device");
+ }
+ if (tape_major == 0)
+ tape_major = result; /* accept dynamic major number */
+ PRINT_WARN (KERN_ERR " tape gets major %d for character device\n", result);
+ charfront = kmalloc (sizeof (tape_frontend_t), GFP_KERNEL);
+ if (charfront == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"c:initfail");
+ debug_text_event (tape_debug_area,3,"no mem");
+#endif /* TAPE_DEBUG */
+ panic ("no major number available for tape char device");
+ }
+ charfront->device_setup = tapechar_setup;
+#ifdef CONFIG_DEVFS_FS
+ charfront->mkdevfstree = tapechar_mkdevfstree;
+ charfront->rmdevfstree = tapechar_rmdevfstree;
+#endif
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"c:init ok");
+#endif /* TAPE_DEBUG */
+ charfront->next=NULL;
+ if (first_frontend==NULL) {
+ first_frontend=charfront;
+ } else {
+ temp=first_frontend;
+ while (temp->next!=NULL)
+ temp=temp->next;
+ temp->next=charfront;
+ }
+ ti=first_tape_info;
+ while (ti!=NULL) {
+ tapechar_setup(ti);
+ ti=ti->next;
+ }
+}
+
+void
+tapechar_uninit (void)
+{
+ unregister_chrdev (tape_major, "tape");
+}
+
+/*
+ * Tape device read function
+ */
+ssize_t
+tape_read (struct file *filp, char *data, size_t count, loff_t * ppos)
+{
+ long lockflags;
+ tape_info_t *ti;
+ size_t block_size;
+ ccw_req_t *cqr;
+ int rc;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:read");
+#endif /* TAPE_DEBUG */
+ ti = first_tape_info;
+ while ((ti != NULL) && (ti->rew_filp != filp) && (ti->nor_filp != filp))
+ ti = (tape_info_t *) ti->next;


+ if (ti == NULL) {
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:nodev");
+#endif /* TAPE_DEBUG */
+ return -ENODEV;
+ }
+ if (ppos != &filp->f_pos) {
+ /* "A request was outside the capabilities of the device." */
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:ppos wrong");
+#endif /* TAPE_DEBUG */
+ return -EOVERFLOW; /* errno=75 Value too large for def. data type */
+ }
+ if (ti->block_size == 0) {
+ block_size = count;
+ } else {
+ block_size = ti->block_size;
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:nbytes:");
+ debug_int_event (tape_debug_area,6,block_size);
+#endif
+ cqr = ti->discipline->read_block (data, block_size, ti);
+ if (!cqr) {
+ return -ENOBUFS;
+ }


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);
+ if (rc) {
+ tapestate_set(ti,TS_IDLE);
+ kfree (cqr);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return rc;
+ }


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ ti->discipline->free_read_block (cqr, ti);
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return ti->rc;
+ }
+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq,lockflags);
+ return -ENODEV;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:rbytes:");
+ debug_int_event (tape_debug_area,6,block_size - ti->devstat.rescnt);
+#endif /* TAPE_DEBUG */
+ filp->f_pos += block_size - ti->devstat.rescnt;
+ return block_size - ti->devstat.rescnt;
+}
+
+/*
+ * Tape device write function
+ */
+ssize_t
+tape_write (struct file *filp, const char *data, size_t count, loff_t * ppos)
+{
+ long lockflags;
+ tape_info_t *ti;
+ size_t block_size;
+ ccw_req_t *cqr;
+ int nblocks, i, rc;
+ size_t written = 0;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:write");
+#endif
+ ti = first_tape_info;
+ while ((ti != NULL) && (ti->nor_filp != filp) && (ti->rew_filp != filp))
+ ti = (tape_info_t *) ti->next;


+ if (ti == NULL)

+ return -ENODEV;
+ if (ppos != &filp->f_pos) {
+ /* "A request was outside the capabilities of the device." */
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:ppos wrong");
+#endif
+ return -EOVERFLOW; /* errno=75 Value too large for def. data type */
+ }
+ if ((ti->block_size != 0) && (count % ti->block_size != 0))
+ return -EIO;
+ if (ti->block_size == 0) {
+ block_size = count;
+ nblocks = 1;
+ } else {
+ block_size = ti->block_size;
+ nblocks = count / (ti->block_size);
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:nbytes:");
+ debug_int_event (tape_debug_area,6,block_size);
+ debug_text_event (tape_debug_area,6,"c:nblocks:");
+ debug_int_event (tape_debug_area,6,nblocks);
+#endif
+ for (i = 0; i < nblocks; i++) {
+ cqr = ti->discipline->write_block (data + i * block_size, block_size, ti);
+ if (!cqr) {
+ return -ENOBUFS;
+ }


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ ti->discipline->free_write_block (cqr, ti);
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ if ((ti->rc==-ENOSPC) && (i!=0))
+ return i*block_size;
+ return ti->rc;
+ }
+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq,lockflags);
+ return -ENODEV;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:wbytes:");
+ debug_int_event (tape_debug_area,6,block_size - ti->devstat.rescnt);
+#endif
+ filp->f_pos += block_size - ti->devstat.rescnt;
+ written += block_size - ti->devstat.rescnt;
+ if (ti->devstat.rescnt > 0)
+ return written;
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:wtotal:");
+ debug_int_event (tape_debug_area,6,written);
+#endif
+ return written;
+}
+
+static int
+tape_mtioctop (struct file *filp, short mt_op, int mt_count)
+{
+ tape_info_t *ti;


+ ccw_req_t *cqr = NULL;

+ int rc;
+ long lockflags;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:mtio");
+ debug_text_event (tape_debug_area,6,"c:ioop:");
+ debug_int_event (tape_debug_area,6,mt_op);
+ debug_text_event (tape_debug_area,6,"c:arg:");
+ debug_int_event (tape_debug_area,6,mt_count);
+#endif
+ ti = first_tape_info;
+ while ((ti != NULL) && (ti->rew_filp != filp) && (ti->nor_filp != filp))
+ ti = (tape_info_t *) ti->next;


+ if (ti == NULL)

+ return -ENODEV;
+ switch (mt_op) {
+ case MTREW: // rewind
+
+ cqr = ti->discipline->mtrew (ti, mt_count);
+ break;
+ case MTOFFL: // put drive offline
+
+ cqr = ti->discipline->mtoffl (ti, mt_count);
+ break;
+ case MTUNLOAD: // unload the tape
+
+ cqr = ti->discipline->mtunload (ti, mt_count);
+ break;
+ case MTWEOF: // write tapemark
+
+ cqr = ti->discipline->mtweof (ti, mt_count);
+ break;
+ case MTFSF: // forward space file
+
+ cqr = ti->discipline->mtfsf (ti, mt_count);
+ break;
+ case MTBSF: // backward space file
+
+ cqr = ti->discipline->mtbsf (ti, mt_count);
+ break;
+ case MTFSFM: // forward space file, stop at BOT side
+
+ cqr = ti->discipline->mtfsfm (ti, mt_count);
+ break;
+ case MTBSFM: // backward space file, stop at BOT side
+
+ cqr = ti->discipline->mtbsfm (ti, mt_count);
+ break;
+ case MTFSR: // forward space file
+
+ cqr = ti->discipline->mtfsr (ti, mt_count);
+ break;
+ case MTBSR: // backward space file
+
+ cqr = ti->discipline->mtbsr (ti, mt_count);
+ break;
+ case MTNOP:
+ cqr = ti->discipline->mtnop (ti, mt_count);
+ break;
+ case MTEOM: // postion at the end of portion
+
+ case MTRETEN: // retension the tape
+
+ cqr = ti->discipline->mteom (ti, mt_count);
+ break;
+ case MTERASE:
+ cqr = ti->discipline->mterase (ti, mt_count);
+ break;
+ case MTSETDENSITY:
+ cqr = ti->discipline->mtsetdensity (ti, mt_count);
+ break;
+ case MTSEEK:
+ cqr = ti->discipline->mtseek (ti, mt_count);
+ break;
+ case MTSETDRVBUFFER:
+ cqr = ti->discipline->mtsetdrvbuffer (ti, mt_count);
+ break;
+ case MTLOCK:
+ cqr = ti->discipline->mtsetdrvbuffer (ti, mt_count);
+ break;
+ case MTUNLOCK:
+ cqr = ti->discipline->mtsetdrvbuffer (ti, mt_count);
+ break;
+ case MTLOAD:
+ cqr = ti->discipline->mtload (ti, mt_count);
+ if (cqr!=NULL) break; // if backend driver has an load function ->use it
+ // if no medium is in, wait until it gets inserted
+ if (ti->medium_is_unloaded) {
+ wait_event_interruptible (ti->wq,ti->medium_is_unloaded==0);
+ }
+ return 0;
+ case MTCOMPRESSION:
+ cqr = ti->discipline->mtcompression (ti, mt_count);
+ break;
+ case MTSETPART:
+ cqr = ti->discipline->mtsetpart (ti, mt_count);
+ break;
+ case MTMKPART:
+ cqr = ti->discipline->mtmkpart (ti, mt_count);
+ break;
+ case MTTELL: // return number of block relative to current file
+
+ cqr = ti->discipline->mttell (ti, mt_count);
+ break;
+ case MTSETBLK:


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->block_size = mt_count;


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:setblk:");
+ debug_int_event (tape_debug_area,6,mt_count);
+#endif
+ return 0;
+ case MTRESET:


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->kernbuf = ti->userbuf = NULL;
+ tapestate_set (ti, TS_IDLE);
+ ti->block_size = 0;


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:devreset:");


+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif

+ return 0;
+ default:
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:inv.mtio");
+#endif
+ return -EINVAL;
+ }
+ if (cqr == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:ccwg fail");
+#endif
+ return -ENOSPC;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ if (ti->kernbuf != NULL) {
+ kfree (ti->kernbuf);


+ ti->kernbuf = NULL;
+ }

+ tape_free_request (cqr);
+ // if medium was unloaded, update the corresponding variable.
+ switch (mt_op) {
+ case MTOFFL:
+ case MTUNLOAD:
+ ti->medium_is_unloaded=1;
+ }
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (((mt_op == MTEOM) || (mt_op == MTRETEN)) && (tapestate_get (ti) == TS_FAILED))
+ tapestate_set (ti, TS_DONE);
+ if (tapestate_get (ti) == TS_FAILED) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return ti->rc;
+ }
+ if (tapestate_get (ti) == TS_NOT_OPER) {
+ ti->blk_minor=ti->rew_minor=ti->nor_minor=-1;
+ ti->devinfo.irq=-1;
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq,lockflags);
+ return -ENODEV;
+ }
+ if (tapestate_get (ti) != TS_DONE) {
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ return -EIO;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ switch (mt_op) {
+ case MTRETEN: //need to rewind the tape after moving to eom
+
+ return tape_mtioctop (filp, MTREW, 1);
+ case MTFSFM: //need to skip back over the filemark
+
+ return tape_mtioctop (filp, MTBSFM, 1);
+ case MTBSF: //need to skip forward over the filemark
+
+ return tape_mtioctop (filp, MTFSF, 1);
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:mtio done");
+#endif


+ return 0;
+}
+
+/*

+ * Tape device io controls.
+ */
+int
+tape_ioctl (struct inode *inode, struct file *filp,
+ unsigned int cmd, unsigned long arg)
+{
+ long lockflags;
+ tape_info_t *ti;
+ ccw_req_t *cqr;
+ struct mtop op; /* structure for MTIOCTOP */
+ struct mtpos pos; /* structure for MTIOCPOS */
+ struct mtget get;
+
+ int rc;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:ioct");
+#endif
+ ti = first_tape_info;
+ while ((ti != NULL) &&
+ (ti->rew_minor != MINOR (inode->i_rdev)) &&
+ (ti->nor_minor != MINOR (inode->i_rdev)))
+ ti = (tape_info_t *) ti->next;


+ if (ti == NULL) {
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:nodev");
+#endif
+ return -ENODEV;
+ }
+ // check for discipline ioctl overloading
+ if ((rc = ti->discipline->discipline_ioctl_overload (inode, filp, cmd, arg))
+ != -EINVAL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:ioverloa");
+#endif


+ return rc;
+ }
+

+ switch (cmd) {
+ case MTIOCTOP: /* tape op command */
+ if (copy_from_user (&op, (char *) arg, sizeof (struct mtop))) {
+ return -EFAULT;
+ }
+ return (tape_mtioctop (filp, op.mt_op, op.mt_count));
+ case MTIOCPOS: /* query tape position */
+ cqr = ti->discipline->mttell (ti, 0);


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ pos.mt_blkno = ti->rc;
+ ti->cqr = NULL;
+ if (ti->kernbuf != NULL) {
+ kfree (ti->kernbuf);


+ ti->kernbuf = NULL;
+ }

+ tape_free_request (cqr);
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ if (copy_to_user ((char *) arg, &pos, sizeof (struct mtpos)))


+ return -EFAULT;
+ return 0;

+ case MTIOCGET:
+ get.mt_erreg = ti->rc;
+ cqr = ti->discipline->mttell (ti, 0);


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event_interruptible (ti->wq,ti->wanna_wakeup);
+ get.mt_blkno = ti->rc;
+ get.mt_fileno = 0;
+ get.mt_type = MT_ISUNKNOWN;
+ get.mt_resid = ti->devstat.rescnt;
+ get.mt_dsreg = ti->devstat.ii.sense.data[3];
+ get.mt_gstat = 0;
+ if (ti->devstat.ii.sense.data[1] & 0x08)
+ get.mt_gstat &= GMT_BOT (1); // BOT
+
+ if (ti->devstat.ii.sense.data[1] & 0x02)
+ get.mt_gstat &= GMT_WR_PROT (1); // write protected
+
+ if (ti->devstat.ii.sense.data[1] & 0x40)
+ get.mt_gstat &= GMT_ONLINE (1); //drive online
+
+ ti->cqr = NULL;
+ if (ti->kernbuf != NULL) {
+ kfree (ti->kernbuf);


+ ti->kernbuf = NULL;
+ }

+ tape_free_request (cqr);
+ if (signal_pending (current)) {
+ tapestate_set (ti, TS_IDLE);
+ return -ERESTARTSYS;


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ if (copy_to_user ((char *) arg, &get, sizeof (struct mtget)))


+ return -EFAULT;
+ return 0;

+ default:
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"c:ioct inv");
+#endif

+ return -EINVAL;
+ }
+}

+
+/*
+ * Tape device open function.
+ */
+int
+tape_open (struct inode *inode, struct file *filp)
+{
+ tape_info_t *ti;
+ kdev_t dev;
+ long lockflags;
+
+ inode = filp->f_dentry->d_inode;
+ ti = first_tape_info;
+ while ((ti != NULL) &&
+ (ti->rew_minor != MINOR (inode->i_rdev)) &&
+ (ti->nor_minor != MINOR (inode->i_rdev)))
+ ti = (tape_info_t *) ti->next;


+ if (ti == NULL)

+ return -ENODEV;
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:open:");


+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif

+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (tapestate_get (ti) != TS_UNUSED) {


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"c:dbusy");
+#endif
+ return -EBUSY;
+ }
+ tapestate_set (ti, TS_IDLE);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+

+ dev = MKDEV (tape_major, MINOR (inode->i_rdev)); /* Get the device */


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ if (ti->rew_minor == MINOR (inode->i_rdev))
+ ti->rew_filp = filp; /* save for later reference */
+ else
+ ti->nor_filp = filp;
+ filp->private_data = ti; /* save the dev.info for later reference */


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+

+#ifdef MODULE
+ MOD_INC_USE_COUNT;
+#endif /* MODULE */


+ return 0;
+}
+
+/*

+ * Tape device release function.
+ */
+int
+tape_release (struct inode *inode, struct file *filp)
+{
+ long lockflags;
+ tape_info_t *ti,*lastti;


+ ccw_req_t *cqr = NULL;

+ int rc;


+
+ ti = first_tape_info;

+ while ((ti != NULL) && (ti->rew_minor != MINOR (inode->i_rdev)) && (ti->nor_minor != MINOR (inode->i_rdev)))
+ ti = (tape_info_t *) ti->next;
+ if ((ti != NULL) && (tapestate_get (ti) == TS_NOT_OPER)) {


+ if (ti==first_tape_info) {
+ first_tape_info=ti->next;
+ } else {
+ lastti=first_tape_info;
+ while (lastti->next!=ti) lastti=lastti->next;
+ lastti->next=ti->next;
+ }

+ kfree(ti);
+ return 0;
+ }
+ if ((ti == NULL) || (tapestate_get (ti) != TS_IDLE)) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:notidle!");
+#endif
+ return -ENXIO; /* error in tape_release */
+ }
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:release:");


+ debug_int_event (tape_debug_area,6,ti->blk_minor);
+#endif

+ if (ti->rew_minor == MINOR (inode->i_rdev)) {
+ cqr = ti->discipline->mtrew (ti, 1);
+ if (cqr != NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"c:rewrelea");
+#endif


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ tapestate_set (ti, TS_REW_RELEASE_INIT);
+ ti->cqr = cqr;
+ ti->wanna_wakeup=0;
+ rc = do_IO (ti->devinfo.irq, cqr->cpaddr, (unsigned long) cqr, 0x00, cqr->options);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+ wait_event (ti->wq,ti->wanna_wakeup);
+ ti->cqr = NULL;
+ tape_free_request (cqr);
+ }


+ }
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ tapestate_set (ti, TS_UNUSED);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);

+#ifdef MODULE
+ MOD_DEC_USE_COUNT;
+#endif /* MODULE */
+ return 0;
+}
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/s390/char/tapechar.h linux/drivers/s390/char/tapechar.h
--- v2.2.19/drivers/s390/char/tapechar.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/s390/char/tapechar.h Wed Oct 10 01:41:06 2001
@@ -0,0 +1,34 @@
+
+/***************************************************************************


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 42'
echo 'File patch-2.2.20 is continued in part 43'
echo "43" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:29 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part30

#!/bin/sh -x
# this is part 30 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 30; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X }
X break;
X default:
X break;
X }
X return (0); /* Success. */
-}
+} /* SkCsEvent */
X
X #endif /* SK_USE_CSUM */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skge.c linux/drivers/net/sk98lin/skge.c
--- v2.2.19/drivers/net/sk98lin/skge.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skge.c Wed Oct 10 01:41:02 2001
@@ -1,20 +1,22 @@
X /******************************************************************************
X *
- * Name: skge.c
+ * Name: skge.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.29 $
- * Date: $Date: 2000/02/21 13:31:56 $
+ * Version: $Revision: 1.37 $
+ * Date: $Date: 2001/05/08 11:25:40 $
X * Purpose: The main driver source module
X *
X ******************************************************************************/


+
X
X /******************************************************************************
X *

- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *

X * Driver for SysKonnect Gigabit Ethernet Server Adapters:
X *
+ * SK-9861 (single link 1000Base-SX, VF45 Volition Plug)
+ * SK-9862 (dual link 1000Base-SX, VF45 Volition Plug)
X * SK-9841 (single link 1000Base-LX)
X * SK-9842 (dual link 1000Base-LX)
X * SK-9843 (single link 1000Base-SX)
@@ -25,6 +27,7 @@
X * Created 10-Feb-1999, based on Linux' acenic.c, 3c59x.c and
X * SysKonnects GEnesis Solaris driver
X * Author: Christoph Goos (cg...@syskonnect.de)
+ * Mirko Lindner (mlin...@syskonnect.de)
X *
X * Address all question to: li...@syskonnect.de
X *
@@ -41,11 +44,40 @@


X *
X ******************************************************************************/
X

+
X /******************************************************************************
X *

X * History:
X *

X * $Log: skge.c,v $
+ * Revision 1.37 2001/05/08 11:25:40 mlindner
+ * fix: removed VLAN error message
+ *
+ * Revision 1.36 2001/05/04 12:02:25 gklug
+ * fix: compilation bug
+ *
+ * Revision 1.35 2001/05/04 11:42:12 gklug
+ * fix: receive IRQ can now handle invalid frames correctly
+ *
+ * Revision 1.34 2001/05/04 11:13:49 gklug
+ * fix: do not free meassage if ring is full on entry.
+ *
+ * Revision 1.33 2001/03/20 12:26:08 mlindner
+ * Fix: Memory problem
+ * Fix: proc_unregister fixed
+ *
+ * Revision 1.32 2001/03/01 12:50:52 mlindner


+ * Fixed ring size

+ *
+ * Revision 1.31 2001/02/19 13:14:16 mlindner


+ * Changed PNMI parameter values

+ * Corrected ProcFs functionality
+ *
+ * Revision 1.30 2001/01/22 14:15:29 mlindner


+ * added ProcFs functionality
+ * Dual Net functionality integrated
+ * Rlmt networks added

+ *
X * Revision 1.29 2000/02/21 13:31:56 cgoos
X * Fixed "unused" warning for UltraSPARC change.
X *
@@ -233,23 +265,16 @@


X *
X ******************************************************************************/
X

-static const char SysKonnectFileId[] = "@(#)" __FILE__ " (C) SysKonnect.";
-static const char SysKonnectBuildNumber[] =
- "@(#)SK-BUILD: 3.04 (19991111) PL: 01";
+#include "h/skversion.h"
X
X #include <linux/module.h>
+#include <linux/proc_fs.h>
X
X #include "h/skdrv1st.h"
X #include "h/skdrv2nd.h"
X
X /* defines ******************************************************************/
X
-#define BOOT_STRING "sk98lin: Network Device Driver v3.04\n" \
- "Copyright (C) 1999 SysKonnect"
-
-#define VER_STRING "3.04"
-
-
X /* for debuging on x86 only */
X /* #define BREAKPOINT() asm(" int $3"); */
X
@@ -269,6 +294,7 @@
X /* number of adapters that can be configured via command line params */
X #define SK_MAX_CARD_PARAM 16
X
+
X /*
X * use those defines for a compile-in version of the driver instead
X * of command line parameters
@@ -282,7 +308,8 @@
X // #define ROLE_A {"Auto", }
X // #define ROLE_B {"Auto", }
X // #define PREF_PORT {"A", }
-// #define RLMT_MODE {"CheckLink", }
+// #define RLMT_MODE {"CheckLinkState", }
+
X
X
X #define DEV_KFREE_SKB(skb) dev_kfree_skb(skb);
@@ -314,14 +341,23 @@
X static void FillRxRing(SK_AC*, RX_PORT*);
X static SK_BOOL FillRxDescriptor(SK_AC*, RX_PORT*);
X static void ReceiveIrq(SK_AC*, RX_PORT*);
-static void ClearAndStartRx(SK_AC*, int);
+void ClearAndStartRx(SK_AC*, int);
X static void ClearTxIrq(SK_AC*, int, int);
X static void ClearRxRing(SK_AC*, RX_PORT*);
X static void ClearTxRing(SK_AC*, TX_PORT*);
X static void SetQueueSizes(SK_AC *pAC);
X static int SkGeChangeMtu(struct device *dev, int new_mtu);
X static void PortReInitBmu(SK_AC*, int);
-static int SkGeIocMib(SK_AC*, unsigned int, int);
+static int SkGeIocMib(DEV_NET*, unsigned int, int);
+static struct dentry *SkgeProcLookup(struct inode *dir, struct dentry *dentry);
+static int SkgeProcFileOpen(struct inode *inode, struct file *file);
+static int SkgeProcFileRelease(struct inode *inode, struct file *file);
+
+/*Extern */
+extern struct proc_dir_entry Our_Proc_Dir;
+extern int proc_read(char *buffer, char **buffer_location,
+ off_t offset, int buffer_length, int *eof, void *data);
+
X #ifdef DEBUG
X static void DumpMsg(struct sk_buff*, char*);
X static void DumpData(char*, int);
@@ -331,13 +367,27 @@
X
X /* global variables *********************************************************/
X static const char *BootString = BOOT_STRING;
-static struct device *root_dev = NULL;
+struct device *root_dev = NULL;
X static int probed __initdata = 0;
+struct inode_operations SkInodeOps;
+static struct file_operations SkFileOps; /* with open/relase */
X
X /* local variables **********************************************************/
X static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
X static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480};
X
+
+
+void proc_fill_inode(struct inode *inode, int fill)
+{
+ if (fill)
+ MOD_INC_USE_COUNT;
+ else
+ MOD_DEC_USE_COUNT;
+}
+
+
+
X /*****************************************************************************
X *
X * skge_probe - find all SK-98xx adapters
@@ -353,11 +403,13 @@
X */
X __initfunc(int skge_probe (struct device *dev))
X {
-int boards_found = 0;
-int version_disp = 0;
-SK_AC *pAC;
-struct pci_dev *pdev = NULL;
-unsigned long base_address;
+int boards_found = 0;
+int DeviceFound = SK_FALSE;
+SK_AC *pAC;
+DEV_NET *pNet = NULL;
+struct pci_dev *pdev = NULL;
+unsigned long base_address;
+struct proc_dir_entry *pProcFile;
X #ifdef __sparc_v9__
X unsigned short tmp;
X #endif
@@ -366,52 +418,76 @@
X return -ENODEV;
X probed++;
X
- /* display driver info */
- if (!version_disp)
- {
- /* set display flag to TRUE so that */
- /* we only display this string ONCE */
- version_disp = 1;
- printk("%s\n", BootString);
- }
-
X if (!pci_present()) /* is PCI support present? */
X return -ENODEV;
X
X while((pdev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8, pdev)))
X {
X dev = NULL;
+ pNet = NULL;
X
X if (pdev->vendor != PCI_VENDOR_ID_SYSKONNECT ||
X pdev->device != PCI_DEVICE_ID_SYSKONNECT_GE) {
X continue;
+ }
+
+ if ((dev = init_etherdev(dev, sizeof(DEV_NET))) == 0) {
+ printk(KERN_ERR "Unable to allocate etherdev "
+ "structure!\n");
+ break;
X }
- dev = init_etherdev(dev, sizeof(SK_AC));
X
- if (dev == NULL){
- printk(KERN_ERR "Unable to allocate etherdev "
+ if (dev->priv == NULL)
+ dev->priv = kmalloc(sizeof(DEV_NET), GFP_KERNEL);
+
+ if (dev->priv == NULL) {
+ printk(KERN_ERR "Unable to allocate adapter "
X "structure!\n");
X break;
X }
X
- if (!dev->priv)
- dev->priv = kmalloc(sizeof(SK_AC), GFP_KERNEL);
- if (dev->priv == NULL){
+ pNet = dev->priv;
+ pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL);
+ if (pNet->pAC == NULL){
+ kfree(dev->priv);
X printk(KERN_ERR "Unable to allocate adapter "
X "structure!\n");
X break;
X }
X
+ if (!DeviceFound) {
+ /* set display flag to TRUE so that */
+ /* we only display this string ONCE */
+ printk("%s\n", BootString);
+
+ DeviceFound = SK_TRUE;
+
+ /*Create proc (directory)*/
+ proc_register(proc_net, &Our_Proc_Dir);
+
+ memcpy(&SkInodeOps, &proc_dir_inode_operations,
+ sizeof(struct inode_operations));
+ SkInodeOps.lookup = &SkgeProcLookup;
+ SkInodeOps.default_file_ops = &SkFileOps;
+
+ memcpy(&SkFileOps, proc_net_inode_operations.default_file_ops,
+ sizeof(struct file_operations));
+ SkFileOps.open = &SkgeProcFileOpen;
+ SkFileOps.release = &SkgeProcFileRelease;
+ }
X
- memset(dev->priv, 0, sizeof(SK_AC));
-
- pAC = dev->priv;
+ memset(pNet->pAC, 0, sizeof(SK_AC));


+ pAC = pNet->pAC;

X pAC->PciDev = *pdev;
X pAC->PciDevId = pdev->device;
- pAC->dev = dev;
+ pAC->dev[0] = dev;
+ pAC->dev[1] = dev;
X sprintf(pAC->Name, "SysKonnect SK-98xx");
X pAC->CheckQueue = SK_FALSE;
X
+
+ pNet->Mtu = 1500;
+ pNet->Up = 0;
X dev->irq = pdev->irq;
X
X dev->open = &SkGeOpen;
@@ -422,7 +498,16 @@
X dev->set_mac_address = &SkGeSetMacAddr;
X dev->do_ioctl = &SkGeIoctl;
X dev->change_mtu = &SkGeChangeMtu;
-
+
+ pProcFile = create_proc_entry(dev->name,
+ S_IFREG | 0444, &Our_Proc_Dir);
+ pProcFile->ops = &SkInodeOps;
+ pProcFile->read_proc = proc_read;
+ pProcFile->write_proc = NULL;
+ pProcFile->nlink = 1;
+ pProcFile->size = sizeof(dev->name+1);
+ pProcFile->data = (void*)pProcFile;
+
X /*
X * Dummy value.
X */
@@ -433,8 +518,9 @@
X base_address = pdev->base_address[0];
X base_address &= PCI_BASE_ADDRESS_MEM_MASK;
X
+
X #ifdef __sparc_v9__
- /* SPARC machines do not initialize the chache line size */
+ /* SPARC machines do not initialize the cache line size */
X pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 64);
X /* SPARC machines do not set "Memory write and invalidate" */
X pci_read_config_word(pdev, PCI_COMMAND, &tmp);
@@ -473,17 +559,76 @@
X break;
X }
X pAC->Index = boards_found;
-
X if (SkGeBoardInit(dev, pAC)) {
X FreeResources(dev);
X continue;
X }
X
- memcpy((caddr_t) &dev->dev_addr,
- (caddr_t) &pAC->Addr.CurrentMacAddress, 6);
-
+ memcpy((caddr_t) &dev->dev_addr,
+ (caddr_t) &pAC->Addr.Net[0].CurrentMacAddress, 6);
+
+ pNet->PortNr = 0;
+ pNet->NetNr = 0;
+
X boards_found++;
X
+ /* More then one port found */
+ if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
+ if ((dev = init_etherdev(NULL, sizeof(DEV_NET))) == 0) {
+ printk(KERN_ERR "Unable to allocate etherdev "
+ "structure!\n");
+ break;
+ }
+
+ if (dev->priv == NULL)
+ dev->priv = kmalloc(sizeof(DEV_NET), GFP_KERNEL);
+
+ if (dev->priv == NULL) {
+ printk(KERN_ERR "Unable to allocate adapter "
+ "structure!\n");
+ break;
+ }
+
+ pAC->dev[1] = dev;
+ pNet = dev->priv;
+ pNet->PortNr = 1;
+ pNet->NetNr = 1;
+ pNet->pAC = pAC;
+ pNet->Mtu = 1500;
+ pNet->Up = 0;
+
+ dev->open = &SkGeOpen;
+ dev->stop = &SkGeClose;
+ dev->hard_start_xmit = &SkGeXmit;
+ dev->get_stats = &SkGeStats;
+ dev->set_multicast_list = &SkGeSetRxMode;
+ dev->set_mac_address = &SkGeSetMacAddr;
+ dev->do_ioctl = &SkGeIoctl;
+ dev->change_mtu = &SkGeChangeMtu;
+
+
+ pProcFile = create_proc_entry(dev->name,
+ S_IFREG | 0444, &Our_Proc_Dir);
+ pProcFile->ops = &SkInodeOps;
+ pProcFile->read_proc = proc_read;
+ pProcFile->write_proc = NULL;
+ pProcFile->nlink = 1;
+ pProcFile->size = sizeof(dev->name);
+ pProcFile->data = (void*)pProcFile;
+
+ memcpy((caddr_t) &dev->dev_addr,
+ (caddr_t) &pAC->Addr.Net[1].CurrentMacAddress, 6);
+
+ printk("%s: %s\n", dev->name, pAC->DeviceStr);
+ printk(" PrefPort:B RlmtMode:Dual Check Link State\n");
+
+ SkCsSetReceiveFlags(pAC,
+ SKCS_PROTO_IP | SKCS_PROTO_TCP | SKCS_PROTO_UDP,
+ &pAC->CsOfs1, &pAC->CsOfs2, 1);
+
+ }
+
+
X /*
X * This is bollocks, but we need to tell the net-init
X * code that it shall go for the next device.
@@ -493,6 +638,9 @@


X #endif
X }
X
+

+
+
X /*
X * If we're at this point we're going through skge_probe() for
X * the first time. Return success (0) if we've initialized 1
@@ -524,10 +672,13 @@
X static void FreeResources(struct device *dev)
X {
X SK_U32 AllocFlag;
-SK_AC *pAC;
+
+DEV_NET *pNet;
+SK_AC *pAC;
X
X if (dev->priv) {
- pAC = (SK_AC*) dev->priv;
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

X AllocFlag = pAC->AllocFlag;
X if (AllocFlag & SK_ALLOC_IRQ) {
X free_irq(dev->irq, dev);
@@ -542,6 +693,24 @@
X
X } /* FreeResources */
X
+static struct dentry *SkgeProcLookup(struct inode *dir, struct dentry *dentry)
+{


+ return NULL;
+}
+

+static int SkgeProcFileOpen(struct inode *inode, struct file *file)
+{
+ MOD_INC_USE_COUNT;


+ return 0;
+}
+

+static int SkgeProcFileRelease(struct inode *inode, struct file *file)
+{
+ MOD_DEC_USE_COUNT;


+ return 0;
+}
+
+

X
X #ifdef MODULE
X

@@ -630,7 +799,6 @@
X static int debug = 0; /* not used */
X static int options[SK_MAX_CARD_PARAM] = {0, }; /* not used */
X
-
X /*****************************************************************************
X *
X * init_module - module initialization function
@@ -645,7 +813,6 @@
X int init_module(void)
X {
X int cards;
-
X root_dev = NULL;
X
X /* just to avoid warnings ... */
@@ -653,9 +820,6 @@
X options[0] = 0;
X
X cards = skge_probe(NULL);
- if (cards == 0) {
- printk("No adapter found\n");
- }
X return cards ? 0 : -ENODEV;
X } /* init_module */
X
@@ -672,21 +836,29 @@
X */
X void cleanup_module(void)
X {
-SK_AC *pAC;
+DEV_NET *pNet;
+SK_AC *pAC;
X struct device *next;
X unsigned long Flags;
X SK_EVPARA EvPara;
X
X while (root_dev) {
- pAC = (SK_AC*)root_dev->priv;
+ pNet = (DEV_NET*) root_dev->priv;


+ pAC = pNet->pAC;

X next = pAC->Next;
X
X root_dev->tbusy = 1;
X SkGeYellowLED(pAC, pAC->IoBase, 0);
+ remove_proc_entry(pAC->dev[0]->name, &Our_Proc_Dir);
X
X if(pAC->BoardLevel == 2) {
X /* board is still alive */
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
+ EvPara.Para32[0] = 0;
+ EvPara.Para32[1] = -1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+ EvPara.Para32[0] = 1;
+ EvPara.Para32[1] = -1;
X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
X SkEventDispatcher(pAC, pAC->IoBase);
X /* disable interrupts */
@@ -696,25 +868,36 @@
X pAC->BoardLevel = 0;
X /* We do NOT check here, if IRQ was pending, of course*/
X }
-
+
X if(pAC->BoardLevel == 1) {
X /* board is still alive */
X SkGeDeInit(pAC, pAC->IoBase);
X pAC->BoardLevel = 0;
X }
-
+
+ if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 2){
+ remove_proc_entry(pAC->dev[1]->name, &Our_Proc_Dir);
+ unregister_netdev(pAC->dev[1]);
+ kfree(pAC->dev[1]);
+ }
+
X FreeResources(root_dev);
-
+
X root_dev->get_stats = NULL;
X /*
X * otherwise unregister_netdev calls get_stats with
X * invalid IO ... :-(
X */
+
X unregister_netdev(root_dev);
X kfree(root_dev);
-
+ kfree(pAC);
X root_dev = next;
X }
+
+ /* clear proc-dir */
+ proc_unregister(proc_net, Our_Proc_Dir.low_ino);
+
X }
X #endif /* cleanup_module */
X
@@ -781,8 +964,6 @@
X
X spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
X
- GetConfiguration(pAC);
-
X /* level 1 init common modules here (HW init) */
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
X if (SkGeInit(pAC, pAC->IoBase, 1) != 0) {
@@ -800,6 +981,12 @@
X pAC->BoardLevel = 1;
X spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
X
+ GetConfiguration(pAC);
+ if (pAC->RlmtNets == 2) {
+ pAC->GIni.GIPortUsage = SK_MUL_LINK;
+ }
+
+
X if (pAC->GIni.GIMacsFound == 2) {
X Ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, pAC->Name, dev);
X } else if (pAC->GIni.GIMacsFound == 1) {
@@ -825,7 +1012,7 @@
X
X SkCsSetReceiveFlags(pAC,
X SKCS_PROTO_IP | SKCS_PROTO_TCP | SKCS_PROTO_UDP,
- &pAC->CsOfs1, &pAC->CsOfs2);
+ &pAC->CsOfs1, &pAC->CsOfs2, 0);
X pAC->CsOfs = (pAC->CsOfs2 << 16) | pAC->CsOfs1;
X
X BoardInitMem(pAC);
@@ -838,13 +1025,15 @@
X
X /* Print configuration settings */
X printk(" PrefPort:%c RlmtMode:%s\n",
- 'A' + pAC->Rlmt.PrefPort,
- (pAC->RlmtMode==0) ? "ChkLink" :
- ((pAC->RlmtMode==1) ? "ChkLink" :
- ((pAC->RlmtMode==3) ? "ChkOth" :
- ((pAC->RlmtMode==7) ? "ChkSeg" : "Error"))));
+ 'A' + pAC->Rlmt.Net[0].Port[pAC->Rlmt.Net[0].PrefPort]->PortNumber,
+ (pAC->RlmtMode==0) ? "Check Link State" :
+ ((pAC->RlmtMode==1) ? "Check Link State" :
+ ((pAC->RlmtMode==3) ? "Check Local Port" :
+ ((pAC->RlmtMode==7) ? "Check Segmentation" :
+ ((pAC->RlmtMode==17) ? "Dual Check Link State" :"Error")))));
X
- SkGeYellowLED(pAC, pAC->IoBase, 1);
+ SkGeYellowLED(pAC, pAC->IoBase, 1);
+
X
X /*
X * Register the device here
@@ -1028,8 +1217,7 @@
X DescrSize = (((sizeof(TXD) - 1) / DESCR_ALIGN) + 1) *
X DESCR_ALIGN;
X DescrNum = TX_RING_SIZE / DescrSize;
- }
- else {
+ } else {
X DescrSize = (((sizeof(RXD) - 1) / DESCR_ALIGN) + 1) *
X DESCR_ALIGN;
X DescrNum = RX_RING_SIZE / DescrSize;
@@ -1048,7 +1236,8 @@
X pDescr->VNextRxd = VNextDescr & 0xffffffffULL;
X pDescr->pNextRxd = pNextDescr;
X pDescr->TcpSumStarts = pAC->CsOfs;
- /* advance on step */
+
+ /* advance one step */
X pPrevDescr = pDescr;
X pDescr = pNextDescr;
X pNextDescr = (RXD*) (((char*)pDescr) + DescrSize);
@@ -1123,10 +1312,12 @@
X static void SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs)
X {
X struct device *dev = (struct device *)dev_id;
+DEV_NET *pNet;
X SK_AC *pAC;
X SK_U32 IntSrc; /* interrupts source register contents */
X
- pAC = (SK_AC*) dev->priv;
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

X
X /*
X * Check and process if its our interrupt
@@ -1149,21 +1340,21 @@
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF RX1 IRQ\n"));
X ReceiveIrq(pAC, &pAC->RxPort[0]);
- SK_PNMI_CNT_RX_INTR(pAC);
+ SK_PNMI_CNT_RX_INTR(pAC, 0);
X }
X if (IntSrc & IRQ_EOF_RX2) {
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF RX2 IRQ\n"));
X ReceiveIrq(pAC, &pAC->RxPort[1]);
- SK_PNMI_CNT_RX_INTR(pAC);
+ SK_PNMI_CNT_RX_INTR(pAC, 1);
X }
X #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
X if (IntSrc & IRQ_EOF_AS_TX1) {
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF AS TX1 IRQ\n"));
- SK_PNMI_CNT_TX_INTR(pAC);
+ SK_PNMI_CNT_TX_INTR(pAC, 0);
X spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
X FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]);
X spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
@@ -1172,7 +1363,7 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF AS TX2 IRQ\n"));
- SK_PNMI_CNT_TX_INTR(pAC);
+ SK_PNMI_CNT_TX_INTR(pAC, 1);
X spin_lock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock);
X FreeTxDescriptors(pAC, &pAC->TxPort[1][TX_PRIO_LOW]);
X spin_unlock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock);
@@ -1182,7 +1373,7 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF SY TX1 IRQ\n"));
- SK_PNMI_CNT_TX_INTR(pAC);
+ SK_PNMI_CNT_TX_INTR(pAC, 1);
X spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
X FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH);
X spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
@@ -1192,7 +1383,7 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF SY TX2 IRQ\n"));
- SK_PNMI_CNT_TX_INTR(pAC);
+ SK_PNMI_CNT_TX_INTR(pAC, 1);
X spin_lock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock);
X FreeTxDescriptors(pAC, 1, TX_PRIO_HIGH);
X spin_unlock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock);
@@ -1217,11 +1408,12 @@
X
X if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) {
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC,
- ("SPECIAL IRQ\n"));
+ ("SPECIAL IRQ DP-Cards => %x\n", IntSrc));
X pAC->CheckQueue = SK_FALSE;
X spin_lock(&pAC->SlowPathLock);
- if (IntSrc & SPECIAL_IRQS)
+ if (IntSrc & SPECIAL_IRQS)
X SkGeSirqIsr(pAC, pAC->IoBase, IntSrc);
+
X SkEventDispatcher(pAC, pAC->IoBase);
X spin_unlock(&pAC->SlowPathLock);
X }
@@ -1230,29 +1422,10 @@
X * came in after handling the ring (OUTs may be delayed
X * in hardware buffers, but are through after IN)
X */
- ReceiveIrq(pAC, &pAC->RxPort[pAC->ActivePort]);
-// ReceiveIrq(pAC, &pAC->RxPort[1]);
+// ReceiveIrq(pAC, &pAC->RxPort[pAC->ActivePort]);
+ ReceiveIrq(pAC, &pAC->RxPort[0]);
+ ReceiveIrq(pAC, &pAC->RxPort[1]);
X
-#if 0
-// #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
- spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
- FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]);
- spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
-
- spin_lock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock);
- FreeTxDescriptors(pAC, &pAC->TxPort[1][TX_PRIO_LOW]);
- spin_unlock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock);
-
-#if 0 /* only if sync. queues used */
- spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
- FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH);
- spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
-
- spin_lock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock);
- FreeTxDescriptors(pAC, 1, TX_PRIO_HIGH);
- spin_unlock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock);
-#endif /* 0 */
-#endif /* USE_TX_COMPLETE */
X
X /* IRQ is processed - Enable IRQs again*/
X SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK);
@@ -1277,10 +1450,12 @@
X static void SkGeIsrOnePort(int irq, void *dev_id, struct pt_regs *ptregs)
X {
X struct device *dev = (struct device *)dev_id;
+DEV_NET *pNet;
X SK_AC *pAC;
X SK_U32 IntSrc; /* interrupts source register contents */
X
- pAC = (SK_AC*) dev->priv;
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

X
X /*
X * Check and process if its our interrupt
@@ -1303,14 +1478,14 @@
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF RX1 IRQ\n"));
X ReceiveIrq(pAC, &pAC->RxPort[0]);
- SK_PNMI_CNT_RX_INTR(pAC);
+ SK_PNMI_CNT_RX_INTR(pAC, 0);
X }
X #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
X if (IntSrc & IRQ_EOF_AS_TX1) {
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF AS TX1 IRQ\n"));
- SK_PNMI_CNT_TX_INTR(pAC);
+ SK_PNMI_CNT_TX_INTR(pAC, 0);
X spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
X FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]);
X spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
@@ -1320,7 +1495,7 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_INT_SRC,
X ("EOF SY TX1 IRQ\n"));
- SK_PNMI_CNT_TX_INTR(pAC);
+ SK_PNMI_CNT_TX_INTR(pAC, 0);
X spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
X FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH);
X spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
@@ -1341,11 +1516,12 @@
X
X if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) {
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC,
- ("SPECIAL IRQ\n"));
+ ("SPECIAL IRQ SP-Cards => %x\n", IntSrc));
X pAC->CheckQueue = SK_FALSE;
X spin_lock(&pAC->SlowPathLock);
- if (IntSrc & SPECIAL_IRQS)
+ if (IntSrc & SPECIAL_IRQS)
X SkGeSirqIsr(pAC, pAC->IoBase, IntSrc);
+
X SkEventDispatcher(pAC, pAC->IoBase);
X spin_unlock(&pAC->SlowPathLock);
X }
@@ -1356,20 +1532,6 @@
X */
X ReceiveIrq(pAC, &pAC->RxPort[0]);
X
-#if 0
-// #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
- spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
- FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]);
- spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
-
-#if 0 /* only if sync. queues used */
- spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
- FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH);
- spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);


-
-#endif /* 0 */

-#endif /* USE_TX_COMPLETE */
-
X /* IRQ is processed - Enable IRQs again*/
X SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK);
X
@@ -1396,12 +1558,14 @@
X static int SkGeOpen(
X struct device *dev)
X {
-SK_AC *pAC; /* pointer to adapter context struct */
+DEV_NET *pNet;
+SK_AC *pAC;
X unsigned int Flags; /* for spin lock */
X int i;
-SK_EVPARA EvPara; /* an event parameter union */
+SK_EVPARA EvPara; /* an event parameter union */
X
- pAC = (SK_AC*) dev->priv;
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeOpen: pAC=0x%lX:\n", (unsigned long)pAC));
@@ -1409,7 +1573,7 @@
X if (pAC->BoardLevel == 0) {
X /* level 1 init common modules here */
X if (SkGeInit(pAC, pAC->IoBase, 1) != 0) {
- printk("%s: HWInit(1) failed\n", pAC->dev->name);
+ printk("%s: HWInit(1) failed\n", pAC->dev[pNet->PortNr]->name);
X return (-1);
X }
X SkI2cInit (pAC, pAC->IoBase, 1);
@@ -1420,26 +1584,30 @@
X SkTimerInit (pAC, pAC->IoBase, 1);
X pAC->BoardLevel = 1;
X }
-
- /* level 2 init modules here */
- SkGeInit (pAC, pAC->IoBase, 2);
- SkI2cInit (pAC, pAC->IoBase, 2);
- SkEventInit (pAC, pAC->IoBase, 2);
- SkPnmiInit (pAC, pAC->IoBase, 2);
- SkAddrInit (pAC, pAC->IoBase, 2);
- SkRlmtInit (pAC, pAC->IoBase, 2);
- SkTimerInit (pAC, pAC->IoBase, 2);
- pAC->BoardLevel = 2;
+
+ if (pAC->BoardLevel != 2) {
+ /* level 2 init modules here */
+ SkGeInit (pAC, pAC->IoBase, 2);
+ SkI2cInit (pAC, pAC->IoBase, 2);
+ SkEventInit (pAC, pAC->IoBase, 2);
+ SkPnmiInit (pAC, pAC->IoBase, 2);
+ SkAddrInit (pAC, pAC->IoBase, 2);
+ SkRlmtInit (pAC, pAC->IoBase, 2);
+ SkTimerInit (pAC, pAC->IoBase, 2);
+ pAC->BoardLevel = 2;
+ }
X
X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
- // Enable transmit descriptor polling.
+ /* Enable transmit descriptor polling. */
X SkGePollTxD(pAC, pAC->IoBase, i, SK_TRUE);
X FillRxRing(pAC, &pAC->RxPort[i]);
+ // Enable rx pad byte stripping
+ SkXmSetRxCmd(pAC, pAC->IoBase, i, SK_STRIP_PAD_ON);
X }
X SkGeYellowLED(pAC, pAC->IoBase, 1);
X
X #ifdef USE_INT_MOD
-// moderate only TX complete interrupts (these are not time critical)
+/* moderate only TX complete interrupts (these are not time critical) */
X #define IRQ_MOD_MASK (IRQ_EOF_AS_TX1 | IRQ_EOF_AS_TX2)
X {
X unsigned long ModBase;
@@ -1455,21 +1623,32 @@
X SK_OUT32(pAC->IoBase, B0_HWE_IMSK, IRQ_HWE_MASK);
X
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
- SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
- if (pAC->RlmtMode != 0) {
+
+ if ((pAC->RlmtMode != 0) && (pAC->MaxPorts == 0)) {
+ EvPara.Para32[0] = pAC->RlmtNets;
+ EvPara.Para32[1] = -1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS,
+ EvPara);
X EvPara.Para32[0] = pAC->RlmtMode;
+ EvPara.Para32[1] = 0;
X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_MODE_CHANGE,
X EvPara);
X }
+
+ EvPara.Para32[0] = pNet->NetNr;
+ EvPara.Para32[1] = -1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
X SkEventDispatcher(pAC, pAC->IoBase);
X spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
X
+ pAC->MaxPorts++;
+ pNet->Up = 1;


X dev->tbusy = 0;
X dev->interrupt = 0;
X dev->start = 1;

X
X MOD_INC_USE_COUNT;
-
+
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeOpen suceeded\n"));
X
@@ -1491,54 +1670,91 @@
X static int SkGeClose(
X struct device *dev)
X {
+DEV_NET *pNet;
X SK_AC *pAC;
+
X unsigned int Flags; /* for spin lock */
X int i;
X SK_EVPARA EvPara;
+int PortIdx;


X
X dev->start = 0;

X set_bit(0, (void*)&dev->tbusy);
X
- pAC = (SK_AC*) dev->priv;
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeClose: pAC=0x%lX ", (unsigned long)pAC));
X
+ if (pAC->RlmtNets == 1) {
+ PortIdx = pAC->ActivePort;
+ }
+ else {
+ PortIdx = pNet->NetNr;
+ }
X /*
X * Clear multicast table, promiscuous mode ....
X */
- SkAddrMcClear(pAC, pAC->IoBase, pAC->ActivePort, 0);
- SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort,
+ SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0);
+ SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
X SK_PROM_MODE_NONE);
X
+ if (pAC->MaxPorts == 1) {
+ spin_lock_irqsave(&pAC->SlowPathLock, Flags);
+ /* disable interrupts */
+ SK_OUT32(pAC->IoBase, B0_IMSK, 0);
+ EvPara.Para32[0] = pNet->NetNr;
+ EvPara.Para32[1] = -1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+ SkEventDispatcher(pAC, pAC->IoBase);
+ SK_OUT32(pAC->IoBase, B0_IMSK, 0);
+ /* stop the hardware */
+ SkGeDeInit(pAC, pAC->IoBase);
+ pAC->BoardLevel = 0;
+ spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
+ } else {
X
- spin_lock_irqsave(&pAC->SlowPathLock, Flags);
- /* disable interrupts */
- SK_OUT32(pAC->IoBase, B0_IMSK, 0);
- SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
- SkEventDispatcher(pAC, pAC->IoBase);
- SK_OUT32(pAC->IoBase, B0_IMSK, 0);
- /* stop the hardware */
- SkGeDeInit(pAC, pAC->IoBase);
- pAC->BoardLevel = 0;
-
- spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
+ spin_lock_irqsave(&pAC->SlowPathLock, Flags);
+ EvPara.Para32[0] = pNet->NetNr;
+ EvPara.Para32[1] = -1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+ SkEventDispatcher(pAC, pAC->IoBase);


+ spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
+

+ /* Stop port */
+ spin_lock_irqsave(&pAC->TxPort[pNet->PortNr]
+ [TX_PRIO_LOW].TxDesRingLock, Flags);
+ SkGeStopPort(pAC, pAC->IoBase, pNet->PortNr,
+ SK_STOP_ALL, SK_HARD_RST);
+ spin_unlock_irqrestore(&pAC->TxPort[pNet->PortNr]
+ [TX_PRIO_LOW].TxDesRingLock, Flags);
+ }
X
- for (i=0; i<pAC->GIni.GIMacsFound; i++) {
+ if (pAC->RlmtNets == 1) {
X /* clear all descriptor rings */
- ReceiveIrq(pAC, &pAC->RxPort[i]);
- ClearRxRing(pAC, &pAC->RxPort[i]);
- ClearTxRing(pAC, &pAC->TxPort[i][TX_PRIO_LOW]);
+ for (i=0; i<pAC->GIni.GIMacsFound; i++) {
+ ReceiveIrq(pAC, &pAC->RxPort[i]);
+ ClearRxRing(pAC, &pAC->RxPort[i]);
+ ClearTxRing(pAC, &pAC->TxPort[i][TX_PRIO_LOW]);
+ }
+ } else {
+ /* clear port descriptor rings */
+ ReceiveIrq(pAC, &pAC->RxPort[pNet->PortNr]);
+ ClearRxRing(pAC, &pAC->RxPort[pNet->PortNr]);
+ ClearTxRing(pAC, &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW]);
X }
X
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
- ("SkGeClose: done "));
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,("SkGeClose: done "));
X
+ pAC->MaxPorts--;
+ pNet->Up = 0;
X MOD_DEC_USE_COUNT;
X
X return (0);
X } /* SkGeClose */
X
+
X /*****************************************************************************
X *
X * SkGeXmit - Linux frame transmit function
@@ -1556,12 +1772,18 @@
X */
X static int SkGeXmit(struct sk_buff *skb, struct device *dev)
X {
+DEV_NET *pNet;
X SK_AC *pAC;
-int Rc; /* return code of XmitFrame */
-
- pAC = (SK_AC*) dev->priv;
+int Rc; /* return code of XmitFrame */
X
- Rc = XmitFrame(pAC, &pAC->TxPort[pAC->ActivePort][TX_PRIO_LOW], skb);
+
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;
+

+ if (pAC->RlmtNets == 2)
+ Rc = XmitFrame(pAC, &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW], skb);
+ else
+ Rc = XmitFrame(pAC, &pAC->TxPort[pAC->ActivePort][TX_PRIO_LOW], skb);
X
X if (Rc <= 0) {
X /* transmitter out of resources */
@@ -1618,12 +1840,13 @@
X FreeTxDescriptors(pAC, pTxPort);
X if (pTxPort->TxdRingFree == 0) {
X spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
- SK_PNMI_CNT_NO_TX_BUF(pAC);
+ SK_PNMI_CNT_NO_TX_BUF(pAC, pTxPort->PortIndex);
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_TX_PROGRESS,
X ("XmitFrame failed\n"));
X /* this message can not be sent now */
- DEV_KFREE_SKB(pMessage);
+ /* Because tbusy seems to be set, the message should not be freed here */
+ /* It will be used by the scheduler of the ethernet handler */
X return (-1);
X }
X }
@@ -1701,9 +1924,11 @@
X TXD *pTxd; /* pointer to the checked descriptor */
X TXD *pNewTail; /* pointer to 'end' of the ring */
X SK_U32 Control; /* TBControl field of descriptor */
+DEV_NET *pNet;
X
X pNewTail = pTxPort->pTxdRingTail;
X pTxd = pNewTail;
+ pNet = (DEV_NET*) pAC->dev[pTxPort->PortIndex]->priv;
X
X /*
X * loop forever; exits if TX_CTRL_SOFTWARE bit not set in start frame
@@ -1719,20 +1944,21 @@
X * freed ( -> ring completely free now).
X */
X pTxPort->pTxdRingTail = pTxd;
- pAC->dev->tbusy = 0;
+ pAC->dev[pTxPort->PortIndex]->tbusy = 0;
X return;
X }
X if (Control & TX_CTRL_OWN_BMU) {
X pTxPort->pTxdRingTail = pTxd;
X if (pTxPort->TxdRingFree > 0) {
- pAC->dev->tbusy = 0;
+ pAC->dev[pTxPort->PortIndex]->tbusy = 0;
X }
X return;
X }
-
+
X DEV_KFREE_SKB(pTxd->pMBuf); /* free message */
+
X pTxPort->TxdRingFree++;
- pTxd->TBControl &= ~TX_CTRL_SOFTWARE;
+ pTxd->TBControl = 0; /* reset TX_CTRL_SOFTWARE */
X pTxd = pTxd->pNextTxd; /* point behind fragment with EOF */
X } /* while(forever) */
X } /* FreeTxDescriptors */
@@ -1796,8 +2022,8 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
X SK_DBGCAT_DRV_ENTRY,
X ("%s: Allocation of rx buffer failed !\n",
- pAC->dev->name));
- SK_PNMI_CNT_NO_RX_BUF(pAC);
+ pAC->dev[pRxPort->PortIndex]->name));
+ SK_PNMI_CNT_NO_RX_BUF(pAC, pRxPort->PortIndex);
X return(SK_FALSE);
X }
X skb_reserve(pMsgBlock, 2); /* to align IP frames */
@@ -1887,31 +2113,71 @@
X
X rx_start:
X /* do forever; exit if RX_CTRL_OWN_BMU found */
- while (pRxPort->RxdRingFree < pAC->RxDescrPerRing) {
- pRxd = pRxPort->pRxdRingHead;
-
+ for ( pRxd = pRxPort->pRxdRingHead ;
+ pRxPort->RxdRingFree < pAC->RxDescrPerRing ;
+ pRxd = pRxd->pNextRxd,
+ pRxPort->pRxdRingHead = pRxd,
+ pRxPort->RxdRingFree ++) {
+
+ /*
+ * For a better understanding of this loop
+ * Go through every descriptor beginning at the head
+ * Please note: the ring might be completely received so the OWN bit
+ * set is not a good crirteria to leave that loop.
+ * Therefore the RingFree counter is used.
+ * On entry of this loop pRxd is a pointer to the Rxd that needs
+ * to be checked next.
+ */
+
X Control = pRxd->RBControl;
-
+
X /* check if this descriptor is ready */
X if ((Control & RX_CTRL_OWN_BMU) != 0) {
X /* this descriptor is not yet ready */
+ /* This is the usual end of the loop */
+ /* We don't need to start the ring again */
X FillRxRing(pAC, pRxPort);
X return;
X }
-
+
X /* get length of frame and check it */
X FrameLength = Control & RX_CTRL_LEN_MASK;
- if (FrameLength > pAC->RxBufSize)
+ if (FrameLength > pAC->RxBufSize) {
X goto rx_failed;
+ }
X
X /* check for STF and EOF */
X if ((Control & (RX_CTRL_STF | RX_CTRL_EOF)) !=
- (RX_CTRL_STF | RX_CTRL_EOF))
+ (RX_CTRL_STF | RX_CTRL_EOF)) {
X goto rx_failed;
+ }
X
X /* here we have a complete frame in the ring */
X pMsg = pRxd->pMBuf;
+
+ FrameStat = pRxd->FrameStat;
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0,
+ ("Received frame of length %d on port %d\n",
+ FrameLength, PortIndex));
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0,
+ ("Number of free rx descriptors: %d\n",
+ pRxPort->RxdRingFree));
+/*DumpMsg(pMsg, "Rx"); */
X
+ if ((Control & RX_CTRL_STAT_VALID) != RX_CTRL_STAT_VALID ||
+ (FrameStat & (XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) != 0) {
+ /* there is a receive error in this frame */
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
+ SK_DBGCAT_DRV_RX_PROGRESS,
+ ("skge: Error in received frame, dropped!\n"
+ "Control: %x\nRxStat: %x\n",
+ Control, FrameStat));
+ ReQueueRxBuffer(pAC, pRxPort, pMsg,
+ pRxd->VDataHigh, pRxd->VDataLow);
+
+ continue;
+ }
+
X /*
X * if short frame then copy data to reduce memory waste
X */
@@ -1946,7 +2212,7 @@
X if ((Csum1 & 0xfffe) && (Csum2 & 0xfffe)) {
X Result = SkCsGetReceiveInfo(pAC,
X &pMsg->data[14],
- Csum1, Csum2);
+ Csum1, Csum2, pRxPort->PortIndex);
X if (Result ==
X SKCS_STATUS_IP_FRAGMENT ||
X Result ==
@@ -1962,119 +2228,85 @@
X } /* IP frame */
X } /* frame > SK_COPY_TRESHOLD */
X
- FrameStat = pRxd->FrameStat;
- pRxd = pRxd->pNextRxd;
- pRxPort->pRxdRingHead = pRxd;
- pRxPort->RxdRingFree ++;
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_RX_PROGRESS,
- ("Received frame of length %d on port %d\n",
- FrameLength, PortIndex));
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_RX_PROGRESS,
- ("Number of free rx descriptors: %d\n",
- pRxPort->RxdRingFree));
-
- if ((Control & RX_CTRL_STAT_VALID) == RX_CTRL_STAT_VALID &&
- (FrameStat &
- (XMR_FS_ANY_ERR | XMR_FS_1L_VLAN | XMR_FS_2L_VLAN))
- == 0) {
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
- SK_DBGCAT_DRV_RX_PROGRESS,("V"));
- ForRlmt = SK_RLMT_RX_PROTOCOL;
- IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC;
- SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength,
- IsBc, &Offset, &NumBytes);
- if (NumBytes != 0) {
- IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC;
- SK_RLMT_LOOKAHEAD(pAC, PortIndex,
- &pMsg->data[Offset],
- IsBc, IsMc, &ForRlmt);
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V"));
+ ForRlmt = SK_RLMT_RX_PROTOCOL;
+ IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC;
+ SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength,
+ IsBc, &Offset, &NumBytes);
+ if (NumBytes != 0) {
+ IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC;
+ SK_RLMT_LOOKAHEAD(pAC, PortIndex,
+ &pMsg->data[Offset],
+ IsBc, IsMc, &ForRlmt);
+ }
+ if (ForRlmt == SK_RLMT_RX_PROTOCOL) {
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("W"));
+/* send up only frames from active port */
+ if ((PortIndex == pAC->ActivePort) ||
+ (pAC->RlmtNets == 2)) {
+ /* frame for upper layer */
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("U"));
+#ifdef xDEBUG
+ DumpMsg(pMsg, "Rx");
+#endif
+ SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,
+ FrameLength, pRxPort->PortIndex);
+
+ pMsg->dev = pAC->dev[pRxPort->PortIndex];
+ pMsg->protocol = eth_type_trans(pMsg,
+ pAC->dev[pRxPort->PortIndex]);
+ netif_rx(pMsg);
+ pAC->dev[pRxPort->PortIndex]->last_rx = jiffies;
X }
- if (ForRlmt == SK_RLMT_RX_PROTOCOL) {
- /* send up only frames from active port */
- if (PortIndex == pAC->ActivePort) {
- /* frame for upper layer */
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
- SK_DBGCAT_DRV_RX_PROGRESS,
- ("U"));
-#ifdef DUMP_RX
- DumpMsg(pMsg, "Rx");
-#endif
- pMsg->dev = pAC->dev;
- pMsg->protocol = eth_type_trans(pMsg,
- pAC->dev);
- SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,
- FrameLength);
- netif_rx(pMsg);
- pAC->dev->last_rx = jiffies;
- }
- else {
- /* drop frame */
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
- SK_DBGCAT_DRV_RX_PROGRESS,
- ("D"));
- DEV_KFREE_SKB(pMsg);
- }
- } /* if not for rlmt */
X else {
- /* packet for rlmt */
+ /* drop frame */
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
- SK_DBGCAT_DRV_RX_PROGRESS, ("R"));
- pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC,
- pAC->IoBase, FrameLength);
- if (pRlmtMbuf != NULL) {
- pRlmtMbuf->pNext = NULL;
- pRlmtMbuf->Length = FrameLength;
- pRlmtMbuf->PortIdx = PortIndex;
- EvPara.pParaPtr = pRlmtMbuf;
- memcpy((char*)(pRlmtMbuf->pData),
- (char*)(pMsg->data),
- FrameLength);
- SkEventQueue(pAC, SKGE_RLMT,
- SK_RLMT_PACKET_RECEIVED,
- EvPara);
- pAC->CheckQueue = SK_TRUE;
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
- SK_DBGCAT_DRV_RX_PROGRESS,
- ("Q"));
- }
- if ((pAC->dev->flags &
- (IFF_PROMISC | IFF_ALLMULTI)) != 0 ||
- (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
- SK_RLMT_RX_PROTOCOL) {
- pMsg->dev = pAC->dev;
- pMsg->protocol = eth_type_trans(pMsg,
- pAC->dev);
- netif_rx(pMsg);
- pAC->dev->last_rx = jiffies;
- }
- else {
- DEV_KFREE_SKB(pMsg);
- }
-
- } /* if packet for rlmt */
- } /* if valid frame */
+ SK_DBGCAT_DRV_RX_PROGRESS,
+ ("D"));
+ DEV_KFREE_SKB(pMsg);
+ }
+
+ } /* if not for rlmt */
X else {
- /* there is a receive error in this frame */
- if ((FrameStat & XMR_FS_1L_VLAN) != 0) {
- printk("%s: Received frame"
- " with VLAN Level 1 header, check"
- " switch configuration\n",
- pAC->dev->name);
+ /* packet for rlmt */
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
+ SK_DBGCAT_DRV_RX_PROGRESS, ("R"));
+ pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC,
+ pAC->IoBase, FrameLength);
+ if (pRlmtMbuf != NULL) {
+ pRlmtMbuf->pNext = NULL;
+ pRlmtMbuf->Length = FrameLength;
+ pRlmtMbuf->PortIdx = PortIndex;
+ EvPara.pParaPtr = pRlmtMbuf;
+ memcpy((char*)(pRlmtMbuf->pData),
+ (char*)(pMsg->data),
+ FrameLength);
+ SkEventQueue(pAC, SKGE_RLMT,
+ SK_RLMT_PACKET_RECEIVED,
+ EvPara);
+ pAC->CheckQueue = SK_TRUE;
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
+ SK_DBGCAT_DRV_RX_PROGRESS,
+ ("Q"));
X }
- if ((FrameStat & XMR_FS_2L_VLAN) != 0) {
- printk("%s: Received frame"
- " with VLAN Level 2 header, check"
- " switch configuration\n",
- pAC->dev->name);
+ if ((pAC->dev[pRxPort->PortIndex]->flags &
+ (IFF_PROMISC | IFF_ALLMULTI)) != 0 ||
+ (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
+ SK_RLMT_RX_PROTOCOL) {
+ pMsg->dev = pAC->dev[pRxPort->PortIndex];
+ pMsg->protocol = eth_type_trans(pMsg,
+ pAC->dev[pRxPort->PortIndex]);
+ netif_rx(pMsg);
+ pAC->dev[pRxPort->PortIndex]->last_rx = jiffies;
X }
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
- SK_DBGCAT_DRV_RX_PROGRESS,
- ("skge: Error in received frame, dropped!\n"
- "Control: %x\nRxStat: %x\n",
- Control, FrameStat));
- DEV_KFREE_SKB(pMsg);
- }
- } /* while */
+ else {
+ DEV_KFREE_SKB(pMsg);
+ }
+
+ } /* if packet for rlmt */
+ } /* for ... scanning the RXD ring */
+
+ /* RXD ring is empty -> fill and restart */
X FillRxRing(pAC, pRxPort);
X /* do not start if called from Close */
X if (pAC->BoardLevel > 0) {
@@ -2106,7 +2338,7 @@
X * Returns: N/A
X * none
X */
-static void ClearAndStartRx(
+void ClearAndStartRx(
X SK_AC *pAC, /* pointer to the adapter context */
X int PortIndex) /* index of the receive port (XMAC) */
X {
@@ -2227,6 +2459,7 @@
X int RxRam; /* RAM used for the active port receive queue */
X int i; /* loop counter */
X
+if (pAC->RlmtNets == 1) {
X StandbyRam = SK_RLMT_STANDBY_QRXSIZE + SK_RLMT_STANDBY_QXASIZE +
X SK_RLMT_STANDBY_QXSSIZE;
X RemainingRam = pAC->GIni.GIRamSize -
@@ -2247,21 +2480,40 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("queue sizes settings - rx:%d txA:%d txS:%d\n",
X pAC->RxQueueSize,pAC->TxAQueueSize, pAC->TxSQueueSize));
+} else {
+ RemainingRam = pAC->GIni.GIRamSize/pAC->GIni.GIMacsFound;
+ RxRam = (RemainingRam * 8 / 10) & ~7;
+ for (i=0; i<pAC->GIni.GIMacsFound; i++) {
+ pAC->GIni.GP[i].PRxQSize = RxRam;
+ pAC->GIni.GP[i].PXSQSize = 0;
+ pAC->GIni.GP[i].PXAQSize = (RemainingRam - RxRam) & ~7;
+ }
X
+ pAC->RxQueueSize = RxRam;
+ pAC->TxSQueueSize = 0;
+ pAC->TxAQueueSize = (RemainingRam - RxRam) & ~7;
+}
X for (i=0; i<SK_MAX_MACS; i++) {
X pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing;
X }
- for (i=0; i<pAC->GIni.GIMacsFound; i++) {
- pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing - 100;
+ if (pAC->RlmtNets == 2) {
+ for (i=0; i<pAC->GIni.GIMacsFound; i++) {
+ pAC->RxPort[i].RxFillLimit = 1;
+ }
+ } else {
+ for (i=0; i<pAC->GIni.GIMacsFound; i++) {
+ pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing - 100;
+ }
+ /*
+ * Do not set the Limit to 0, because this could cause
+ * wrap around with ReQueue'ed buffers (a buffer could
+ * be requeued in the same position, made accessable to
+ * the hardware, and the hardware could change its
+ * contents!
+ */
+ pAC->RxPort[pAC->ActivePort].RxFillLimit = 1;
X }
- /*
- * Do not set the Limit to 0, because this could cause
- * wrap around with ReQueue'ed buffers (a buffer could
- * be requeued in the same position, made accessable to
- * the hardware, and the hardware could change its
- * contents!
- */
- pAC->RxPort[pAC->ActivePort].RxFillLimit = 1;


+
X
X #ifdef DEBUG

X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
@@ -2289,19 +2541,31 @@
X */
X static int SkGeSetMacAddr(struct device *dev, void *p)
X {
-SK_AC *pAC = (SK_AC*) dev->priv;
+
+DEV_NET *pNet = (DEV_NET*) dev->priv;
+SK_AC *pAC = pNet->pAC;
+
X struct sockaddr *addr = p;
X unsigned int Flags;
+int PortIdx;
X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeSetMacAddr starts now...\n"));
X if(dev->start) {
X return -EBUSY;
X }
+
+ if (pAC->RlmtNets == 1) {
+ PortIdx = pAC->ActivePort;
+ }
+ else {
+ PortIdx = pNet->NetNr;
+ }
+
X memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
X
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
- SkAddrOverride(pAC, pAC->IoBase, pAC->ActivePort,
+ SkAddrOverride(pAC, pAC->IoBase, PortIdx,
X (SK_MAC_ADDR*)dev->dev_addr, SK_ADDR_VIRTUAL_ADDRESS);
X
X spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
@@ -2325,37 +2589,49 @@
X */
X static void SkGeSetRxMode(struct device *dev)
X {
-SK_AC *pAC;
+
+DEV_NET *pNet;
+SK_AC *pAC;
+
X struct dev_mc_list *pMcList;
X int i;
X unsigned int Flags;
+int PortIdx;
X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeSetRxMode starts now... "));
- pAC = (SK_AC*) dev->priv;
+
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

+ if (pAC->RlmtNets == 1) {
+ PortIdx = pAC->ActivePort;
+ }
+ else {
+ PortIdx = pNet->NetNr;
+ }
X
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);


X if (dev->flags & IFF_PROMISC) {

X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("PROMISCUOUS mode\n"));
- SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort,
+ SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
X SK_PROM_MODE_LLC);
X } else if (dev->flags & IFF_ALLMULTI) {
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("ALLMULTI mode\n"));
- SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort,
+ SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
X SK_PROM_MODE_ALL_MC);
X } else {
- SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort,
+ SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
X SK_PROM_MODE_NONE);
- SkAddrMcClear(pAC, pAC->IoBase, pAC->ActivePort, 0);
+ SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0);
X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("Number of MC entries: %d ", dev->mc_count));
X
X pMcList = dev->mc_list;
X for (i=0; i<dev->mc_count; i++, pMcList = pMcList->next) {
- SkAddrMcAdd(pAC, pAC->IoBase, pAC->ActivePort,
+ SkAddrMcAdd(pAC, pAC->IoBase, PortIdx,
X (SK_MAC_ADDR*)pMcList->dmi_addr, 0);
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_MCA,
X ("%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -2366,8 +2642,7 @@
X pMcList->dmi_addr[4],
X pMcList->dmi_addr[5]));
X }
- SkAddrMcUpdate(pAC, pAC->IoBase, pAC->ActivePort);
-
+ SkAddrMcUpdate(pAC, pAC->IoBase, PortIdx);
X }
X spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
X
@@ -2390,6 +2665,8 @@
X */
X static int SkGeChangeMtu(struct device *dev, int NewMtu)
X {
+DEV_NET *pNet;
+DEV_NET *pOtherNet;
X SK_AC *pAC;
X unsigned int Flags;
X int i;
@@ -2398,11 +2675,22 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeChangeMtu starts now...\n"));
X
- pAC = (SK_AC*) dev->priv;
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;
+

X if ((NewMtu < 68) || (NewMtu > SK_JUMBO_MTU)) {


X return -EINVAL;
X }
X

+ pNet->Mtu = NewMtu;
+ pOtherNet = (DEV_NET*)pAC->dev[1 - pNet->NetNr]->priv;
+ if ((pOtherNet->Mtu > 1500) && (NewMtu <= 1500) && (pOtherNet->Up==1)) {
+ return(0);
+ }
+
+ EvPara.Para32[0] = pNet->NetNr;
+ EvPara.Para32[1] = -1;
+
X pAC->RxBufSize = NewMtu + 32;
X dev->mtu = NewMtu;


X
@@ -2414,14 +2702,27 @@

X /* disable interrupts */
X SK_OUT32(pAC->IoBase, B0_IMSK, 0);
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
- SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+
+ /* Found more than one port */
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
+ (pAC->RlmtNets == 2)) {
+ /* Stop both ports */
+ EvPara.Para32[0] = 0;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+ EvPara.Para32[0] = 1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+ } else {
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
+ }
+
X SkEventDispatcher(pAC, pAC->IoBase);
X
X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
X spin_lock_irqsave(
X &pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock, Flags);
+ pAC->dev[i]->tbusy = 1;
X }
- pAC->dev->tbusy = 1;
+
X
X /*
X * adjust number of rx buffers allocated
@@ -2429,23 +2730,35 @@
X if (NewMtu > 1500) {
X /* use less rx buffers */
X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
- if (i == pAC->ActivePort)
- pAC->RxPort[i].RxFillLimit =
- pAC->RxDescrPerRing - 100;
- else
- pAC->RxPort[i].RxFillLimit =
- pAC->RxDescrPerRing - 10;
-
+ /* Found more than one port */
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
+ (pAC->RlmtNets == 2)) {
+ pAC->RxPort[i].RxFillLimit =
+ pAC->RxDescrPerRing - 100;
+ } else {
+ if (i == pAC->ActivePort)
+ pAC->RxPort[i].RxFillLimit =
+ pAC->RxDescrPerRing - 100;
+ else
+ pAC->RxPort[i].RxFillLimit =
+ pAC->RxDescrPerRing - 10;
+ }
X }
X }
X else {
X /* use normal anoumt of rx buffers */
X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
- if (i == pAC->ActivePort)
- pAC->RxPort[i].RxFillLimit = 1;
- else
- pAC->RxPort[i].RxFillLimit =
- pAC->RxDescrPerRing - 100;
+ /* Found more than one port */
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
+ (pAC->RlmtNets == 2)) {
+ pAC->RxPort[i].RxFillLimit = 1;
+ } else {
+ if (i == pAC->ActivePort)
+ pAC->RxPort[i].RxFillLimit = 1;
+ else
+ pAC->RxPort[i].RxFillLimit =
+ pAC->RxDescrPerRing - 100;
+ }
X }
X }
X
@@ -2455,7 +2768,7 @@
X * enable/disable hardware support for long frames
X */
X if (NewMtu > 1500) {
- pAC->JumboActivated = SK_TRUE; // is never set back !!!
+ pAC->JumboActivated = SK_TRUE; /* is never set back !!! */
X pAC->GIni.GIPortUsage = SK_JUMBO_LINK;
X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
X pAC->GIni.GP[i].PRxCmd =
@@ -2463,10 +2776,14 @@
X }
X }
X else {
- pAC->GIni.GIPortUsage = SK_RED_LINK;
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
+ (pAC->RlmtNets == 2)) {
+ pAC->GIni.GIPortUsage = SK_MUL_LINK;
+ } else {
+ pAC->GIni.GIPortUsage = SK_RED_LINK;
+ }
X for (i=0; i<pAC->GIni.GIMacsFound; i++) {
- pAC->GIni.GP[i].PRxCmd =
- XM_RX_STRIP_FCS | XM_RX_LENERR_OK;
+ pAC->GIni.GP[i].PRxCmd = XM_RX_STRIP_FCS;
X }
X }
X
@@ -2494,9 +2811,8 @@
X ClearRxRing(pAC, &pAC->RxPort[i]);
X FillRxRing(pAC, &pAC->RxPort[i]);
X
- // Enable transmit descriptor polling.
+ /* Enable transmit descriptor polling. */
X SkGePollTxD(pAC, pAC->IoBase, i, SK_TRUE);
- FillRxRing(pAC, &pAC->RxPort[i]);
X };
X
X SkGeYellowLED(pAC, pAC->IoBase, 1);
@@ -2511,7 +2827,7 @@
X }
X #endif
X
- pAC->dev->tbusy = 0;
+ pAC->dev[pNet->PortNr]->tbusy = 0;
X for (i=pAC->GIni.GIMacsFound-1; i>=0; i--) {
X spin_unlock_irqrestore(
X &pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock, Flags);
@@ -2521,7 +2837,31 @@
X SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK);
X SK_OUT32(pAC->IoBase, B0_HWE_IMSK, IRQ_HWE_MASK);
X
- SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
+/*++++++++++++++++++++++++++++++++++++*/
+
+ /* Found more than one port */
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
+ (pAC->RlmtNets == 2)) {
+ /* Start both ports */
+ EvPara.Para32[0] = pAC->RlmtNets;
+ EvPara.Para32[1] = -1;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS,
+ EvPara);
+
+
+ EvPara.Para32[1] = -1;
+ EvPara.Para32[0] = pNet->PortNr;
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
+
+ if (pOtherNet->Up) {
+ EvPara.Para32[0] = pOtherNet->PortNr;
+ SkEventQueue(pAC, SKGE_RLMT,
+ SK_RLMT_START, EvPara);
+ }
+ } else {
+ SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
+ }
+
X SkEventDispatcher(pAC, pAC->IoBase);
X
X
@@ -2544,9 +2884,11 @@
X */
X static struct net_device_stats *SkGeStats(struct device *dev)
X {
-SK_AC *pAC = (SK_AC*) dev->priv;
+DEV_NET *pNet = (DEV_NET*) dev->priv;
+SK_AC *pAC = pNet->pAC;
X SK_PNMI_STRUCT_DATA *pPnmiStruct; /* structure for all Pnmi-Data */
-SK_PNMI_STAT *pPnmiStat; /* pointer to virtual XMAC stat. data */SK_PNMI_CONF *pPnmiConf; /* pointer to virtual link config. */
+SK_PNMI_STAT *pPnmiStat; /* pointer to virtual XMAC stat. data */
+SK_PNMI_CONF *pPnmiConf; /* pointer to virtual link config. */
X unsigned int Size; /* size of pnmi struct */
X unsigned int Flags; /* for spin lock */
X
@@ -2556,14 +2898,14 @@
X memset(pPnmiStruct, 0, sizeof(SK_PNMI_STRUCT_DATA));
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
X Size = SK_PNMI_STRUCT_SIZE;
- SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size);
+ SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, pNet->NetNr);
X spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
X pPnmiStat = &pPnmiStruct->Stat[0];
X pPnmiConf = &pPnmiStruct->Conf[0];
X
- pAC->stats.rx_packets = (SK_U32) pPnmiStruct->RxDeliveredCts & 0xFFFFFFFF;
+ pAC->stats.rx_packets = (SK_U32) pPnmiStat->StatRxOkCts & 0xFFFFFFFF;
X pAC->stats.tx_packets = (SK_U32) pPnmiStat->StatTxOkCts & 0xFFFFFFFF;
- pAC->stats.rx_bytes = (SK_U32) pPnmiStruct->RxOctetsDeliveredCts;
+ pAC->stats.rx_bytes = (SK_U32) pPnmiStat->StatRxOctetsOkCts;
X pAC->stats.tx_bytes = (SK_U32) pPnmiStat->StatTxOctetsOkCts;
X if (!pAC->JumboActivated) {
X pAC->stats.rx_errors = (SK_U32) pPnmiStruct->InErrorsCts & 0xFFFFFFFF;
@@ -2612,14 +2954,18 @@
X */
X static int SkGeIoctl(struct device *dev, struct ifreq *rq, int cmd)
X {
+DEV_NET *pNet;
X SK_AC *pAC;
+
X SK_GE_IOCTL Ioctl;
X unsigned int Err = 0;
X int Size;
X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeIoctl starts now...\n"));
- pAC = (SK_AC*) dev->priv;
+
+ pNet = (DEV_NET*) dev->priv;


+ pAC = pNet->pAC;

X
X if(copy_from_user(&Ioctl, rq->ifr_data, sizeof(SK_GE_IOCTL))) {
X return -EFAULT;
@@ -2635,7 +2981,7 @@
X Ioctl.Len : sizeof(pAC->PnmiStruct))) {
X return -EFAULT;
X }
- Size = SkGeIocMib(pAC, Ioctl.Len, cmd);
+ Size = SkGeIocMib(pNet, Ioctl.Len, cmd);
X if(copy_to_user(Ioctl.pData, &pAC->PnmiStruct,
X Ioctl.Len<Size? Ioctl.Len : Size)) {
X return -EFAULT;
@@ -2670,25 +3016,27 @@
X * returned size from PNMI call
X */
X static int SkGeIocMib(
-SK_AC *pAC, /* pointer to the adapter context */
+DEV_NET *pNet, /* pointer to the adapter context */
X unsigned int Size, /* length of ioctl data */
X int mode) /* flag for set/preset */
X {
X unsigned int Flags; /* for spin lock */
+SK_AC *pAC;
X
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
X ("SkGeIocMib starts now...\n"));


+ pAC = pNet->pAC;

X /* access MIB */
X spin_lock_irqsave(&pAC->SlowPathLock, Flags);
X switch(mode) {
X case SK_IOCTL_GETMIB:
- SkPnmiGetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size);
+ SkPnmiGetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size, pNet->NetNr);
X break;
X case SK_IOCTL_PRESETMIB:
- SkPnmiPreSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size);
+ SkPnmiPreSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size, pNet->NetNr);
X break;
X case SK_IOCTL_SETMIB:
- SkPnmiSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size);
+ SkPnmiSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size, pNet->NetNr);
X break;
X default:
X break;
@@ -2762,7 +3110,7 @@
X AutoNeg = AN_SENS;
X }
X else printk("%s: Illegal value for AutoNeg_A\n",
- pAC->dev->name);
+ pAC->dev[0]->name);
X }
X
X DuplexCap = DC_BOTH;
@@ -2783,18 +3131,18 @@
X DuplexCap = DC_HALF;
X }
X else printk("%s: Illegal value for DupCap_A\n",
- pAC->dev->name);
+ pAC->dev[0]->name);
X }
X
X /* check for illegal combinations */
X if (AutoSet && AutoNeg==AN_SENS && DupSet) {
X printk("%s, Port A: DuplexCapabilities"
- " ignored using Sense mode\n", pAC->dev->name);
+ " ignored using Sense mode\n", pAC->dev[0]->name);
X }
X if (AutoSet && AutoNeg==AN_OFF && DupSet && DuplexCap==DC_BOTH){
X printk("%s, Port A: Illegal combination"
X " of values AutoNeg. and DuplexCap.\n Using "
- "Full Duplex\n", pAC->dev->name);
+ "Full Duplex\n", pAC->dev[0]->name);
X
X DuplexCap = DC_FULL;
X }
@@ -2806,7 +3154,7 @@
X printk("%s, Port A: Duplex setting not"
X " possible in\n default AutoNegotiation mode"
X " (Sense).\n Using AutoNegotiation On\n",
- pAC->dev->name);
+ pAC->dev[0]->name);
X AutoNeg = AN_ON;
X }
X
@@ -2841,7 +3189,7 @@
X SK_FLOW_MODE_NONE) {
X printk("%s, Port A: FlowControl"
X " impossible without AutoNegotiation,"
- " disabled\n", pAC->dev->name);
+ " disabled\n", pAC->dev[0]->name);
X pAC->GIni.GP[0].PFlowCtrlMode = SK_FLOW_MODE_NONE;
X }
X
@@ -2860,7 +3208,7 @@
X MSMode = SK_MS_MODE_SLAVE;
X }
X else printk("%s: Illegal value for Role_A\n",
- pAC->dev->name);
+ pAC->dev[0]->name);
X }
X pAC->GIni.GP[0].PMSMode = MSMode;
X
@@ -2909,12 +3257,12 @@
X /* check for illegal combinations */
X if (AutoSet && AutoNeg==AN_SENS && DupSet) {
X printk("%s, Port B: DuplexCapabilities"
- " ignored using Sense mode\n", pAC->dev->name);
+ " ignored using Sense mode\n", pAC->dev[1]->name);
X }
X if (AutoSet && AutoNeg==AN_OFF && DupSet && DuplexCap==DC_BOTH){
X printk("%s, Port B: Illegal combination"
X " of values AutoNeg. and DuplexCap.\n Using "
- "Full Duplex\n", pAC->dev->name);
+ "Full Duplex\n", pAC->dev[1]->name);
X
X DuplexCap = DC_FULL;
X }
@@ -2926,14 +3274,14 @@
X printk("%s, Port B: Duplex setting not"
X " possible in\n default AutoNegotiation mode"
X " (Sense).\n Using AutoNegotiation On\n",
- pAC->dev->name);
+ pAC->dev[1]->name);
X AutoNeg = AN_ON;
X }
-
+
X /* set the desired mode */
X pAC->GIni.GP[1].PLinkModeConf =
X Capabilities[AutoNeg][DuplexCap];
-
+
X pAC->GIni.GP[1].PFlowCtrlMode = SK_FLOW_MODE_SYM_OR_REM;
X if (FlowCtrl_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
X FlowCtrl_B[pAC->Index] != NULL) {
@@ -2961,7 +3309,7 @@
X SK_FLOW_MODE_NONE) {
X printk("%s, Port B: FlowControl"
X " impossible without AutoNegotiation,"
- " disabled\n", pAC->dev->name);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 30'
echo 'File patch-2.2.20 is continued in part 31'
echo "31" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:47 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part48

#!/bin/sh -x
# this is part 48 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 48; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
X offset, byte_data);
+#else /* CONFIG_PCI */
+ return 0;


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */
X }
X
X /*
@@ -11093,21 +9297,16 @@
X len = asc_prt_line(cp, leftlen,
X "\nLinux Driver Statistics for AdvanSys SCSI Host %d:\n", shp->host_no);
X ASC_PRT_NEXT();
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- len = asc_prt_line(cp, leftlen,
-" command %lu, queuecommand %lu, abort %lu, reset %lu, biosparam %lu\n",
- s->command, s->queuecommand, s->abort, s->reset, s->biosparam);
-#else /* version >= v2.3.28 */
+
X len = asc_prt_line(cp, leftlen,
-" queuecommand %lu, eh_bus_reset %lu, biosparam %lu\n",
- s->queuecommand, s->eh_bus_reset, s->biosparam);
-#endif /* version >= v2.3.28 */
+" queuecommand %lu, reset %lu, biosparam %lu, interrupt %lu\n",
+ s->queuecommand, s->reset, s->biosparam, s->interrupt);
X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,
-" interrupt %lu, callback %lu, done %lu\n",
- s->interrupt, s->callback, s->done);
+" callback %lu, done %lu, build_error %lu, build_noreq %lu, build_nosg %lu\n",
+ s->callback, s->done, s->build_error, s->adv_build_noreq,
+ s->adv_build_nosg);
X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,
@@ -11115,17 +9314,6 @@
X s->exe_noerror, s->exe_busy, s->exe_error, s->exe_unknown);
X ASC_PRT_NEXT();
X
- if (ASC_NARROW_BOARD(boardp)) {
- len = asc_prt_line(cp, leftlen,
-" build_error %lu\n",
- s->build_error);
- } else {
- len = asc_prt_line(cp, leftlen,
-" build_error %lu, build_noreq %lu, build_nosg %lu\n",
- s->build_error, s->adv_build_noreq, s->adv_build_nosg);
- }
- ASC_PRT_NEXT();
-
X /*
X * Display data transfer statistics.
X */
@@ -11184,7 +9372,6 @@
X return totlen;


X }
X
-
X /*

X * asc_prt_target_stats()
X *
@@ -11230,31 +9417,33 @@
X }
X
X do {
- if (active->q_tot_cnt[tgt_id] > 0 || waiting->q_tot_cnt[tgt_id] > 0) {
- len = asc_prt_line(cp, leftlen, " target %d\n", tgt_id);
- ASC_PRT_NEXT();
+ if (active->q_tot_cnt[tgt_id] > 0 || waiting->q_tot_cnt[tgt_id] > 0) {
+ len = asc_prt_line(cp, leftlen, " target %d\n", tgt_id);
+ ASC_PRT_NEXT();
X
- len = asc_prt_line(cp, leftlen,
+ len = asc_prt_line(cp, leftlen,
X " active: cnt [cur %d, max %d, tot %u], time [min %d, max %d, avg %lu.%01lu]\n",
- active->q_cur_cnt[tgt_id], active->q_max_cnt[tgt_id],
- active->q_tot_cnt[tgt_id],
- active->q_min_tim[tgt_id], active->q_max_tim[tgt_id],
- (active->q_tot_cnt[tgt_id] == 0) ? 0 :
- (active->q_tot_tim[tgt_id]/active->q_tot_cnt[tgt_id]),
- (active->q_tot_cnt[tgt_id] == 0) ? 0 :
- ASC_TENTHS(active->q_tot_tim[tgt_id], active->q_tot_cnt[tgt_id]));
- ASC_PRT_NEXT();
+ active->q_cur_cnt[tgt_id], active->q_max_cnt[tgt_id],
+ active->q_tot_cnt[tgt_id],
+ active->q_min_tim[tgt_id], active->q_max_tim[tgt_id],
+ (active->q_tot_cnt[tgt_id] == 0) ? 0 :
+ (active->q_tot_tim[tgt_id]/active->q_tot_cnt[tgt_id]),
+ (active->q_tot_cnt[tgt_id] == 0) ? 0 :
+ ASC_TENTHS(active->q_tot_tim[tgt_id],
+ active->q_tot_cnt[tgt_id]));
+ ASC_PRT_NEXT();
X
- len = asc_prt_line(cp, leftlen,
+ len = asc_prt_line(cp, leftlen,
X " waiting: cnt [cur %d, max %d, tot %u], time [min %u, max %u, avg %lu.%01lu]\n",
- waiting->q_cur_cnt[tgt_id], waiting->q_max_cnt[tgt_id],
- waiting->q_tot_cnt[tgt_id],
- waiting->q_min_tim[tgt_id], waiting->q_max_tim[tgt_id],
- (waiting->q_tot_cnt[tgt_id] == 0) ? 0 :
- (waiting->q_tot_tim[tgt_id]/waiting->q_tot_cnt[tgt_id]),
- (waiting->q_tot_cnt[tgt_id] == 0) ? 0 :
- ASC_TENTHS(waiting->q_tot_tim[tgt_id], waiting->q_tot_cnt[tgt_id]));
- ASC_PRT_NEXT();
+ waiting->q_cur_cnt[tgt_id], waiting->q_max_cnt[tgt_id],
+ waiting->q_tot_cnt[tgt_id],
+ waiting->q_min_tim[tgt_id], waiting->q_max_tim[tgt_id],
+ (waiting->q_tot_cnt[tgt_id] == 0) ? 0 :
+ (waiting->q_tot_tim[tgt_id]/waiting->q_tot_cnt[tgt_id]),
+ (waiting->q_tot_cnt[tgt_id] == 0) ? 0 :
+ ASC_TENTHS(waiting->q_tot_tim[tgt_id],
+ waiting->q_tot_cnt[tgt_id]));
+ ASC_PRT_NEXT();
X }
X } while (0);
X
@@ -11267,25 +9456,31 @@
X /*
X * asc_prt_scsi_host()
X */
-STATIC void
+STATIC void
X asc_prt_scsi_host(struct Scsi_Host *s)
X {
X asc_board_t *boardp;
X
X boardp = ASC_BOARDP(s);
X
- printk("Scsi_Host at addr %lx\n", (ulong) s);
+ printk("Scsi_Host at addr 0x%lx\n", (ulong) s);
X printk(
-" next %lx, extra_bytes %u, host_busy %u, host_no %d, last_reset %d,\n",
+" next 0x%lx, extra_bytes %u, host_busy %u, host_no %d, last_reset %d,\n",
X (ulong) s->next, s->extra_bytes, s->host_busy, s->host_no,
X (unsigned) s->last_reset);
X
+#if ASC_LINUX_KERNEL24
X printk(
-" host_queue %lx, hostt %lx, block %lx,\n",
+" host_queue 0x%lx, hostt 0x%lx\n",
+ (ulong) s->host_queue, (ulong) s->hostt);
+#elif ASC_LINUX_KERNEL22
+ printk(
+" host_queue 0x%lx, hostt 0x%lx, block 0x%lx,\n",
X (ulong) s->host_queue, (ulong) s->hostt, (ulong) s->block);
+#endif
X
X printk(
-" base %lu, io_port %lu, n_io_port %u, irq %d,\n",
+" base 0x%lx, io_port 0x%lx, n_io_port %u, irq 0x%x,\n",
X (ulong) s->base, (ulong) s->io_port, s->n_io_port, s->irq);
X
X printk(
@@ -11309,49 +9504,49 @@
X /*
X * asc_prt_scsi_cmnd()
X */
-STATIC void
+STATIC void
X asc_prt_scsi_cmnd(Scsi_Cmnd *s)
X {
- printk("Scsi_Cmnd at addr %lx\n", (ulong) s);
+ printk("Scsi_Cmnd at addr 0x%lx\n", (ulong) s);
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
- printk(
-" host %x, device %x, target %u, lun %u\n",
- (unsigned) s->host, (unsigned) s->device, s->target, s->lun);
-#else /* version >= v1.3.0 */
X printk(
-" host %lx, device %lx, target %u, lun %u, channel %u,\n",
+" host 0x%lx, device 0x%lx, target %u, lun %u, channel %u,\n",
X (ulong) s->host, (ulong) s->device, s->target, s->lun,
X s->channel);
-#endif /* version >= v1.3.0 */
X
X asc_prt_hex(" CDB", s->cmnd, s->cmd_len);
X
+#if ASC_LINUX_KERNEL24
+ printk (
+"sc_data_direction %u, resid %d\n",
+ s->sc_data_direction, s->resid);
+#endif
+
X printk(
-" use_sg %u, sglist_len %u, abort_reason %x\n",
+" use_sg %u, sglist_len %u, abort_reason 0x%x\n",
X s->use_sg, s->sglist_len, s->abort_reason);
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
X printk(
-" retries %d, allowed %d\n",
- s->retries, s->allowed);
-#else /* version >= v1.3.89 */
- printk(
-" serial_number %x, serial_number_at_timeout %x, retries %d, allowed %d\n",
+" serial_number 0x%x, serial_number_at_timeout 0x%x, retries %d, allowed %d\n",
X (unsigned) s->serial_number, (unsigned) s->serial_number_at_timeout,
X s->retries, s->allowed);
-#endif /* version >= v1.3.89 */
X
X printk(
X " timeout_per_command %d, timeout_total %d, timeout %d\n",
X s->timeout_per_command, s->timeout_total, s->timeout);
X
+#if ASC_LINUX_KERNEL24
+ printk(
+" internal_timeout %u, flags %u\n",
+ s->internal_timeout, s->flags);
+#elif ASC_LINUX_KERNEL22
X printk(
X " internal_timeout %u, flags %u, this_count %d\n",
- s->internal_timeout, s->flags, s->this_count);
+ s->internal_timeout, s->flags,s->this_count);
+#endif
X
X printk(
-" scsi_done %lx, done %lx, host_scribble %lx, result %x\n",
+" scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n",
X (ulong) s->scsi_done, (ulong) s->done,
X (ulong) s->host_scribble, s->result);
X
@@ -11363,57 +9558,59 @@
X /*
X * asc_prt_asc_dvc_var()
X */
-STATIC void
+STATIC void
X asc_prt_asc_dvc_var(ASC_DVC_VAR *h)
X {
- printk("ASC_DVC_VAR at addr %lx\n", (ulong) h);
+ printk("ASC_DVC_VAR at addr 0x%lx\n", (ulong) h);
X
X printk(
-" iop_base %x, err_code %x, dvc_cntl %x, bug_fix_cntl %d,\n",
+" iop_base 0x%x, err_code 0x%x, dvc_cntl 0x%x, bug_fix_cntl %d,\n",
X h->iop_base, h->err_code, h->dvc_cntl, h->bug_fix_cntl);
X
X printk(
-" bus_type %d, isr_callback %lx, exe_callback %lx, init_sdtr %x,\n",
+" bus_type %d, isr_callback 0x%lx, exe_callback 0x%lx, init_sdtr 0x%x,\n",
X h->bus_type, (ulong) h->isr_callback, (ulong) h->exe_callback,
X (unsigned) h->init_sdtr);
X
X printk(
-" sdtr_done %x, use_tagged_qng %x, unit_not_ready %x, chip_no %x,\n",
+" sdtr_done 0x%x, use_tagged_qng 0x%x, unit_not_ready 0x%x, chip_no 0x%x,\n",
X (unsigned) h->sdtr_done, (unsigned) h->use_tagged_qng,
X (unsigned) h->unit_not_ready, (unsigned) h->chip_no);
-
+
X printk(
-" queue_full_or_busy %x, start_motor %x, scsi_reset_wait %x, irq_no %x,\n",
+" queue_full_or_busy 0x%x, start_motor 0x%x, scsi_reset_wait %u,\n",
X (unsigned) h->queue_full_or_busy, (unsigned) h->start_motor,
- (unsigned) h->scsi_reset_wait, (unsigned) h->irq_no);
+ (unsigned) h->scsi_reset_wait);
X
X printk(
-" is_in_int %x, max_total_qng %x, cur_total_qng %x, in_critical_cnt %x,\n",
+" is_in_int %u, max_total_qng %u, cur_total_qng %u, in_critical_cnt %u,\n",
X (unsigned) h->is_in_int, (unsigned) h->max_total_qng,
X (unsigned) h->cur_total_qng, (unsigned) h->in_critical_cnt);
X
X printk(
-" last_q_shortage %x, init_state %x, no_scam %x, pci_fix_asyn_xfer %x,\n",
+" last_q_shortage %u, init_state 0x%x, no_scam 0x%x, pci_fix_asyn_xfer 0x%x,\n",
X (unsigned) h->last_q_shortage, (unsigned) h->init_state,
X (unsigned) h->no_scam, (unsigned) h->pci_fix_asyn_xfer);
X
X printk(
-" cfg %lx\n",
- (ulong) h->cfg);
+" cfg 0x%lx, irq_no 0x%x\n",
+ (ulong) h->cfg, (unsigned) h->irq_no);
X }
X
X /*
X * asc_prt_asc_dvc_cfg()
X */
-STATIC void
+STATIC void
X asc_prt_asc_dvc_cfg(ASC_DVC_CFG *h)
X {
- printk("ASC_DVC_CFG at addr %lx\n", (ulong) h);
+ printk("ASC_DVC_CFG at addr 0x%lx\n", (ulong) h);
X
X printk(
-" can_tagged_qng %x, cmd_qng_enabled %x, disc_enable %x, sdtr_enable %x,\n",
- h->can_tagged_qng, h->cmd_qng_enabled, h->disc_enable,
- h->sdtr_enable);
+" can_tagged_qng 0x%x, cmd_qng_enabled 0x%x,\n",
+ h->can_tagged_qng, h->cmd_qng_enabled);
+ printk(
+" disc_enable 0x%x, sdtr_enable 0x%x,\n",
+ h->disc_enable, h->sdtr_enable);
X
X printk(
X " chip_scsi_id %d, isa_dma_speed %d, isa_dma_channel %d, chip_version %d,\n",
@@ -11421,48 +9618,49 @@
X h->chip_version);
X
X printk(
-" pci_device_id %d, lib_serial_no %x, lib_version %x, mcode_date %x,\n",
+" pci_device_id %d, lib_serial_no %u, lib_version %u, mcode_date 0x%x,\n",
X h->pci_device_id, h->lib_serial_no, h->lib_version, h->mcode_date);
X
X printk(
-" mcode_version %d, overrun_buf %lx\n",
+" mcode_version %d, overrun_buf 0x%lx\n",
X h->mcode_version, (ulong) h->overrun_buf);
X }
X
X /*
X * asc_prt_asc_scsi_q()
X */
-STATIC void
+STATIC void
X asc_prt_asc_scsi_q(ASC_SCSI_Q *q)
X {
X ASC_SG_HEAD *sgp;
X int i;
X
- printk("ASC_SCSI_Q at addr %lx\n", (ulong) q);
+ printk("ASC_SCSI_Q at addr 0x%lx\n", (ulong) q);
X
X printk(
-" target_ix %u, target_lun %u, srb_ptr %x, tag_code %u,\n",
+" target_ix 0x%x, target_lun %u, srb_ptr 0x%lx, tag_code 0x%x,\n",
X q->q2.target_ix, q->q1.target_lun,
- (unsigned) q->q2.srb_ptr, q->q2.tag_code);
+ (ulong) q->q2.srb_ptr, q->q2.tag_code);
X
X printk(
-" data_addr %lx, data_cnt %lu, sense_addr %lx, sense_len %u,\n",
- (ulong) q->q1.data_addr, (ulong) q->q1.data_cnt,
- (ulong) q->q1.sense_addr, q->q1.sense_len);
+" data_addr 0x%lx, data_cnt %lu, sense_addr 0x%lx, sense_len %u,\n",
+ (ulong) le32_to_cpu(q->q1.data_addr),
+ (ulong) le32_to_cpu(q->q1.data_cnt),
+ (ulong) le32_to_cpu(q->q1.sense_addr), q->q1.sense_len);
X
X printk(
-" cdbptr %lx, cdb_len %u, sg_head %lx, sg_queue_cnt %u\n",
+" cdbptr 0x%lx, cdb_len %u, sg_head 0x%lx, sg_queue_cnt %u\n",
X (ulong) q->cdbptr, q->q2.cdb_len,
X (ulong) q->sg_head, q->q1.sg_queue_cnt);
X
X if (q->sg_head) {
X sgp = q->sg_head;
- printk("ASC_SG_HEAD at addr %lx\n", (ulong) sgp);
+ printk("ASC_SG_HEAD at addr 0x%lx\n", (ulong) sgp);
X printk(" entry_cnt %u, queue_cnt %u\n", sgp->entry_cnt, sgp->queue_cnt);
X for (i = 0; i < sgp->entry_cnt; i++) {
- printk(" [%u]: addr %lx, bytes %lu\n",
- i, (ulong) sgp->sg_list[i].addr,
- (ulong) sgp->sg_list[i].bytes);
+ printk(" [%u]: addr 0x%lx, bytes %lu\n",
+ i, (ulong) le32_to_cpu(sgp->sg_list[i].addr),
+ (ulong) le32_to_cpu(sgp->sg_list[i].bytes));
X }
X
X }
@@ -11471,17 +9669,17 @@
X /*
X * asc_prt_asc_qdone_info()
X */
-STATIC void
+STATIC void
X asc_prt_asc_qdone_info(ASC_QDONE_INFO *q)
X {
- printk("ASC_QDONE_INFO at addr %lx\n", (ulong) q);
+ printk("ASC_QDONE_INFO at addr 0x%lx\n", (ulong) q);
X printk(
-" srb_ptr %x, target_ix %u, cdb_len %u, tag_code %u, done_stat %x\n",
- (unsigned) q->d2.srb_ptr, q->d2.target_ix, q->d2.cdb_len,
- q->d2.tag_code, q->d3.done_stat);
+" srb_ptr 0x%lx, target_ix %u, cdb_len %u, tag_code %u,\n",
+ (ulong) q->d2.srb_ptr, q->d2.target_ix, q->d2.cdb_len,
+ q->d2.tag_code);
X printk(
-" host_stat %x, scsi_stat %x, scsi_msg %x\n",
- q->d3.host_stat, q->d3.scsi_stat, q->d3.scsi_msg);
+" done_stat 0x%x, host_stat 0x%x, scsi_stat 0x%x, scsi_msg 0x%x\n",
+ q->d3.done_stat, q->d3.host_stat, q->d3.scsi_stat, q->d3.scsi_msg);
X }
X
X /*
@@ -11489,7 +9687,7 @@
X *
X * Display an ADV_DVC_VAR structure.
X */
-STATIC void
+STATIC void
X asc_prt_adv_dvc_var(ADV_DVC_VAR *h)
X {
X printk(" ADV_DVC_VAR at addr 0x%lx\n", (ulong) h);
@@ -11509,12 +9707,12 @@
X (unsigned) h->scsi_reset_wait, (unsigned) h->irq_no);
X
X printk(
-" max_host_qng %x, max_dvc_qng %x, carr_freelist %lxn\n",
+" max_host_qng %u, max_dvc_qng %u, carr_freelist 0x%lxn\n",
X (unsigned) h->max_host_qng, (unsigned) h->max_dvc_qng,
X (ulong) h->carr_freelist);
X
X printk(
-" icq_sp %lx, irq_sp %lx\n",
+" icq_sp 0x%lx, irq_sp 0x%lx\n",
X (ulong) h->icq_sp, (ulong) h->irq_sp);
X
X printk(
@@ -11522,7 +9720,7 @@
X (unsigned) h->no_scam, (unsigned) h->tagqng_able);
X
X printk(
-" chip_scsi_id 0x%x, cfg %lx\n",
+" chip_scsi_id 0x%x, cfg 0x%lx\n",
X (unsigned) h->chip_scsi_id, (ulong) h->cfg);
X }
X
@@ -11531,7 +9729,7 @@
X *
X * Display an ADV_DVC_CFG structure.
X */
-STATIC void
+STATIC void
X asc_prt_adv_dvc_cfg(ADV_DVC_CFG *h)
X {
X printk(" ADV_DVC_CFG at addr 0x%lx\n", (ulong) h);
@@ -11545,7 +9743,7 @@
X h->chip_version, h->mcode_date);
X
X printk(
-" mcode_version 0x%x, pci_device_id 0x%x, lib_version 0x%x\n",
+" mcode_version 0x%x, pci_device_id 0x%x, lib_version %u\n",
X h->mcode_version, h->pci_device_id, h->lib_version);
X
X printk(
@@ -11558,38 +9756,38 @@
X *
X * Display an ADV_SCSI_REQ_Q structure.
X */
-STATIC void
+STATIC void
X asc_prt_adv_scsi_req_q(ADV_SCSI_REQ_Q *q)
X {
X int sg_blk_cnt;
X struct asc_sg_block *sg_ptr;
X
- printk("ADV_SCSI_REQ_Q at addr %lx\n", (ulong) q);
+ printk("ADV_SCSI_REQ_Q at addr 0x%lx\n", (ulong) q);
X
X printk(
X " target_id %u, target_lun %u, srb_ptr 0x%lx, a_flag 0x%x\n",
X q->target_id, q->target_lun, (ulong) q->srb_ptr, q->a_flag);
X
X printk(" cntl 0x%x, data_addr 0x%lx, vdata_addr 0x%lx\n",
- q->cntl, (ulong)le32_to_cpu(q->data_addr), (ulong) q->vdata_addr);
+ q->cntl, (ulong) le32_to_cpu(q->data_addr), (ulong) q->vdata_addr);
X
X printk(
X " data_cnt %lu, sense_addr 0x%lx, sense_len %u,\n",
- (ulong) le32_to_cpu(q->data_cnt), (ulong) le32_to_cpu(q->sense_addr),
- q->sense_len);
+ (ulong) le32_to_cpu(q->data_cnt),
+ (ulong) le32_to_cpu(q->sense_addr), q->sense_len);
X
X printk(
X " cdb_len %u, done_status 0x%x, host_status 0x%x, scsi_status 0x%x\n",
X q->cdb_len, q->done_status, q->host_status, q->scsi_status);
X
X printk(
-" sg_working_ix %x, target_cmd %u\n",
+" sg_working_ix 0x%x, target_cmd %u\n",
X q->sg_working_ix, q->target_cmd);
X
X printk(
-" scsiq_rptr %lx, sg_real_addr %lx, sg_list_ptr %lx\n",
- (ulong) le32_to_cpu(q->scsiq_rptr), (ulong) le32_to_cpu(q->sg_real_addr),
- (ulong) q->sg_list_ptr);
+" scsiq_rptr 0x%lx, sg_real_addr 0x%lx, sg_list_ptr 0x%lx\n",
+ (ulong) le32_to_cpu(q->scsiq_rptr),
+ (ulong) le32_to_cpu(q->sg_real_addr), (ulong) q->sg_list_ptr);
X
X /* Display the request's ADV_SG_BLOCK structures. */
X if (q->sg_list_ptr != NULL)
@@ -11624,9 +9822,9 @@


X {
X int i;
X

- printk(" ASC_SG_BLOCK at addr %lx (sgblockno %d)\n",
+ printk(" ASC_SG_BLOCK at addr 0x%lx (sgblockno %d)\n",
X (ulong) b, sgblockno);
- printk(" sg_cnt %u, sg_ptr %lx\n",
+ printk(" sg_cnt %u, sg_ptr 0x%lx\n",
X b->sg_cnt, (ulong) le32_to_cpu(b->sg_ptr));
X ASC_ASSERT(b->sg_cnt <= NO_OF_SG_PER_BLOCK);
X if (b->sg_ptr != 0)
@@ -11634,7 +9832,7 @@
X ASC_ASSERT(b->sg_cnt == NO_OF_SG_PER_BLOCK);
X }
X for (i = 0; i < b->sg_cnt; i++) {
- printk(" [%u]: sg_addr %lx, sg_count %lx\n",
+ printk(" [%u]: sg_addr 0x%lx, sg_count 0x%lx\n",
X i, (ulong) b->sg_list[i].sg_addr, (ulong) b->sg_list[i].sg_count);
X }
X }
@@ -11642,10 +9840,10 @@
X /*
X * asc_prt_hex()
X *
- * Print hexadecimal output in 4 byte groupings 32 bytes
+ * Print hexadecimal output in 4 byte groupings 32 bytes
X * or 8 double-words per line.
X */
-STATIC void
+STATIC void
X asc_prt_hex(char *f, uchar *s, int l)
X {
X int i;
@@ -11656,7 +9854,7 @@
X printk("%s: (%d bytes)\n", f, l);
X
X for (i = 0; i < l; i += 32) {
-
+
X /* Display a maximum of 8 double-words per line. */
X if ((k = (l - i) / 4) >= 8) {
X k = 8;
@@ -11697,27 +9895,6 @@
X }
X #endif /* ADVANSYS_DEBUG */
X
-#ifdef ADVANSYS_ASSERT
-/*
- * advansys_interrupts_enabled()
- *
- * Return 1 if interrupts are enabled, otherwise return 0.
- */
-STATIC int
-advansys_interrupts_enabled(void)
-{
- int flags;
-
- save_flags(flags);
- if (flags & 0x0200) {
- return ASC_TRUE;
- } else {
- return ASC_FALSE;
- }
-}
-#endif /* ADVANSYS_ASSERT */
-
-
X /*
X * --- Asc Library Functions
X */
@@ -11825,42 +10002,47 @@
X return (0);
X }
X
-ASC_INITFUNC(
-STATIC ASC_DCNT,
+STATIC ASC_DCNT
X AscLoadMicroCode(
X PortAddr iop_base,
X ushort s_addr,
- ushort *mcode_buf,
+ uchar *mcode_buf,
X ushort mcode_size
X )
-)
X {
X ASC_DCNT chksum;
X ushort mcode_word_size;
X ushort mcode_chksum;
X
+ /* Write the microcode buffer starting at LRAM address 0. */
X mcode_word_size = (ushort) (mcode_size >> 1);
X AscMemWordSetLram(iop_base, s_addr, 0, mcode_word_size);
- AscMemWordCopyToLram(iop_base, s_addr, mcode_buf, mcode_word_size);
+ AscMemWordCopyPtrToLram(iop_base, s_addr, mcode_buf, mcode_word_size);
+
X chksum = AscMemSumLramWord(iop_base, s_addr, mcode_word_size);
+ ASC_DBG1(1, "AscLoadMicroCode: chksum 0x%lx\n", (ulong) chksum);
X mcode_chksum = (ushort) AscMemSumLramWord(iop_base,
- (ushort) ASC_CODE_SEC_BEG,
+ (ushort) ASC_CODE_SEC_BEG,
X (ushort) ((mcode_size - s_addr - (ushort) ASC_CODE_SEC_BEG) / 2));
+ ASC_DBG1(1, "AscLoadMicroCode: mcode_chksum 0x%lx\n",
+ (ulong) mcode_chksum);
X AscWriteLramWord(iop_base, ASCV_MCODE_CHKSUM_W, mcode_chksum);
X AscWriteLramWord(iop_base, ASCV_MCODE_SIZE_W, mcode_size);
X return (chksum);
X }
X
-ASC_INITFUNC(
-STATIC int,
+STATIC int
X AscFindSignature(
X PortAddr iop_base
X )
-)
X {
X ushort sig_word;
X
+ ASC_DBG2(1, "AscFindSignature: AscGetChipSignatureByte(0x%x) 0x%x\n",
+ iop_base, AscGetChipSignatureByte(iop_base));
X if (AscGetChipSignatureByte(iop_base) == (uchar) ASC_1000_ID1B) {
+ ASC_DBG2(1, "AscFindSignature: AscGetChipSignatureWord(0x%x) 0x%x\n",
+ iop_base, AscGetChipSignatureWord(iop_base));
X sig_word = AscGetChipSignatureWord(iop_base);
X if ((sig_word == (ushort) ASC_1000_ID0W) ||
X (sig_word == (ushort) ASC_1000_ID0W_FIX)) {
@@ -11935,11 +10117,11 @@
X iop_base = _asc_def_iop_base[i];
X if (check_region(iop_base, ASC_IOADR_GAP) != 0) {
X ASC_DBG1(1,
- "AscSearchIOPortAddr11: check_region() failed I/O port %x\n",
+ "AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n",
X iop_base);
X continue;
X }
- ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port %x\n", iop_base);
+ ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port 0x%x\n", iop_base);
X if (AscFindSignature(iop_base)) {
X return (iop_base);
X }
@@ -12067,7 +10249,7 @@
X }
X #endif /* CONFIG_ISA */
X
-STATIC int
+STATIC int
X AscIsrChipHalted(
X ASC_DVC_VAR *asc_dvc
X )
@@ -12126,10 +10308,10 @@
X return (0);
X } else if (int_halt_code == ASC_HALT_EXTMSG_IN) {
X
- AscMemWordCopyFromLram(iop_base,
+ AscMemWordCopyPtrFromLram(iop_base,
X ASCV_MSGIN_BEG,
- (ushort *) & ext_msg,
- (ushort) (sizeof (EXT_MSG) >> 1));
+ (uchar *) &ext_msg,
+ sizeof(EXT_MSG) >> 1);
X
X if (ext_msg.msg_type == MS_EXTEND &&
X ext_msg.msg_req == MS_SDTR_CODE &&
@@ -12203,10 +10385,10 @@
X ext_msg.msg_len == MS_WDTR_LEN) {
X
X ext_msg.wdtr_width = 0;
- AscMemWordCopyToLram(iop_base,
+ AscMemWordCopyPtrToLram(iop_base,
X ASCV_MSGOUT_BEG,
- (ushort *) & ext_msg,
- (ushort) (sizeof (EXT_MSG) >> 1));
+ (uchar *) &ext_msg,
+ sizeof(EXT_MSG) >> 1);
X q_cntl |= QC_MSG_OUT;
X AscWriteLramByte(iop_base,
X (ushort) (halt_q_addr + (ushort) ASC_SCSIQ_B_CNTL),
@@ -12216,10 +10398,10 @@
X } else {
X
X ext_msg.msg_type = M1_MSG_REJECT;
- AscMemWordCopyToLram(iop_base,
+ AscMemWordCopyPtrToLram(iop_base,
X ASCV_MSGOUT_BEG,
- (ushort *) & ext_msg,
- (ushort) (sizeof (EXT_MSG) >> 1));
+ (uchar *) &ext_msg,
+ sizeof(EXT_MSG) >> 1);
X q_cntl |= QC_MSG_OUT;
X AscWriteLramByte(iop_base,
X (ushort) (halt_q_addr + (ushort) ASC_SCSIQ_B_CNTL),
@@ -12279,10 +10461,10 @@
X return (0);
X } else if (int_halt_code == ASC_HALT_SDTR_REJECTED) {
X
- AscMemWordCopyFromLram(iop_base,
+ AscMemWordCopyPtrFromLram(iop_base,
X ASCV_MSGOUT_BEG,
- (ushort *) & out_msg,
- (ushort) (sizeof (EXT_MSG) >> 1));
+ (uchar *) &out_msg,
+ sizeof(EXT_MSG) >> 1);
X
X if ((out_msg.msg_type == MS_EXTEND) &&
X (out_msg.msg_len == MS_SDTR_LEN) &&
@@ -12337,7 +10519,9 @@
X }
X AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
X return (0);
- } else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC)
+ }
+#if CC_VERY_LONG_SG_LIST
+ else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC)
X {
X uchar q_no;
X ushort q_addr;
@@ -12461,16 +10645,15 @@
X }
X
X scsi_sg_q.q_no = next_qp;
- AscMemWordCopyToLram(iop_base,
- (ushort) (q_addr+ASC_SCSIQ_SGHD_CPY_BEG),
- (ushort *) &scsi_sg_q,
- (ushort) (sizeof(ASC_SG_LIST_Q) >> 1));
-
- AscMemDWordCopyToLram( iop_base,
- (ushort) (q_addr+ASC_SGQ_LIST_BEG ),
- (ADV_PADDR *)
- &sg_head->sg_list[scsiq->next_sg_index],
- (ushort) sg_list_dwords);
+ AscMemWordCopyPtrToLram(iop_base,
+ q_addr + ASC_SCSIQ_SGHD_CPY_BEG,
+ (uchar *) &scsi_sg_q,
+ sizeof(ASC_SG_LIST_Q) >> 1);
+
+ AscMemDWordCopyPtrToLram(iop_base,
+ q_addr + ASC_SGQ_LIST_BEG,
+ (uchar *) &sg_head->sg_list[scsiq->next_sg_index],
+ sg_list_dwords);
X
X scsiq->next_sg_index += ASC_SG_LIST_PER_Q;
X
@@ -12496,6 +10679,7 @@
X AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
X return(0);
X }
+#endif /* CC_VERY_LONG_SG_LIST */
X return (0);
X }
X
@@ -12511,9 +10695,10 @@
X uchar sg_queue_cnt;
X
X DvcGetQinfo(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_DONE_INFO_BEG),
- (ushort *) scsiq,
- (ushort) ((sizeof (ASC_SCSIQ_2) + sizeof (ASC_SCSIQ_3)) / 2));
+ q_addr + ASC_SCSIQ_DONE_INFO_BEG,
+ (uchar *) scsiq,
+ (sizeof (ASC_SCSIQ_2) + sizeof (ASC_SCSIQ_3)) / 2);
+
X _val = AscReadLramWord(iop_base,
X (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS));
X scsiq->q_status = (uchar) _val;
@@ -12777,7 +10962,8 @@
X return (int_pending);
X }
X
-STATIC uchar _asc_mcode_buf[] ASC_INITDATA =
+/* Microcode buffer is kept after initialization for error recovery. */
+STATIC uchar _asc_mcode_buf[] =
X {
X 0x01, 0x03, 0x01, 0x19, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12925,8 +11111,8 @@
X 0xF1, 0xC7, 0x41, 0x23, 0xF8, 0x88, 0x11, 0x23, 0xA1, 0x01, 0x04, 0x23, 0xA0, 0x01, 0xE6, 0x84,
X };
X
-STATIC ushort _asc_mcode_size ASC_INITDATA = sizeof(_asc_mcode_buf);
-STATIC ADV_DCNT _asc_mcode_chksum ASC_INITDATA = 0x012C453FUL;
+STATIC ushort _asc_mcode_size = sizeof(_asc_mcode_buf);
+STATIC ADV_DCNT _asc_mcode_chksum = 0x012C453FUL;
X
X #define ASC_SYN_OFFSET_ONE_DISABLE_LIST 16
X STATIC uchar _syn_offset_one_disable_cmd[ASC_SYN_OFFSET_ONE_DISABLE_LIST] =
@@ -12956,7 +11142,7 @@
X )
X {
X PortAddr iop_base;
- int last_int_level;
+ ulong last_int_level;
X int sta;
X int n_q_required;
X int disable_syn_offset_one_fix;
@@ -13019,6 +11205,7 @@
X if (sg_entry_cnt > ASC_MAX_SG_LIST)
X {
X asc_dvc->in_critical_cnt--;
+ DvcLeaveCritical(last_int_level);
X return(ERR);
X }
X #endif /* !CC_VERY_LONG_SG_LIST */
@@ -13036,10 +11223,10 @@
X if (scsiq->q1.cntl & QC_SG_HEAD) {
X data_cnt = 0;
X for (i = 0; i < sg_entry_cnt; i++) {
- data_cnt += (ADV_DCNT) sg_head->sg_list[i].bytes;
+ data_cnt += (ADV_DCNT) le32_to_cpu(sg_head->sg_list[i].bytes);
X }
X } else {
- data_cnt = scsiq->q1.data_cnt;
+ data_cnt = le32_to_cpu(scsiq->q1.data_cnt);
X }
X if (data_cnt != 0UL) {
X if (data_cnt < 512UL) {
@@ -13071,23 +11258,27 @@
X if ((scsi_cmd == SCSICMD_Read6) ||
X (scsi_cmd == SCSICMD_Read10)) {
X addr =
- (ADV_PADDR)
- sg_head->sg_list[sg_entry_cnt_minus_one].addr +
- (ADV_DCNT)
- sg_head->sg_list[sg_entry_cnt_minus_one].bytes;
+ (ADV_PADDR) le32_to_cpu(
+ sg_head->sg_list[sg_entry_cnt_minus_one].addr) +
+ (ADV_DCNT) le32_to_cpu(
+ sg_head->sg_list[sg_entry_cnt_minus_one].bytes);
X extra_bytes = (uchar) ((ushort) addr & 0x0003);
X if ((extra_bytes != 0) &&
X ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES)
X == 0)) {
X scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES;
X scsiq->q1.extra_bytes = extra_bytes;
- sg_head->sg_list[sg_entry_cnt_minus_one].bytes -=
- (ASC_DCNT) extra_bytes;
+ data_cnt = le32_to_cpu(
+ sg_head->sg_list[sg_entry_cnt_minus_one].bytes);
+ data_cnt -= (ASC_DCNT) extra_bytes;
+ sg_head->sg_list[sg_entry_cnt_minus_one].bytes =
+ cpu_to_le32(data_cnt);
X }
X }
X }
X }
X sg_head->entry_to_copy = sg_head->entry_cnt;
+#if CC_VERY_LONG_SG_LIST
X /*
X * Set the sg_entry_cnt to the maximum possible. The rest of
X * the SG elements will be copied when the RISC completes the
@@ -13097,6 +11288,7 @@
X {
X sg_entry_cnt = ASC_MAX_SG_LIST;
X }
+#endif /* CC_VERY_LONG_SG_LIST */
X n_q_required = AscSgListToQueue(sg_entry_cnt);
X if ((AscGetNumOfFreeQueue(asc_dvc, target_ix, n_q_required) >=
X (uint) n_q_required) || ((scsiq->q1.cntl & QC_URGENT) != 0)) {
@@ -13115,14 +11307,17 @@
X if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_IF_NOT_DWB) {
X if ((scsi_cmd == SCSICMD_Read6) ||
X (scsi_cmd == SCSICMD_Read10)) {
- addr = scsiq->q1.data_addr + scsiq->q1.data_cnt;
+ addr = le32_to_cpu(scsiq->q1.data_addr) +
+ le32_to_cpu(scsiq->q1.data_cnt);
X extra_bytes = (uchar) ((ushort) addr & 0x0003);
X if ((extra_bytes != 0) &&
X ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES)
X == 0)) {
- if (((ushort) scsiq->q1.data_cnt & 0x01FF) == 0) {
+ data_cnt = le32_to_cpu(scsiq->q1.data_cnt);
+ if (((ushort) data_cnt & 0x01FF) == 0) {
X scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES;
- scsiq->q1.data_cnt -= (ASC_DCNT) extra_bytes;
+ data_cnt -= (ASC_DCNT) extra_bytes;
+ scsiq->q1.data_cnt = cpu_to_le32(data_cnt);
X scsiq->q1.extra_bytes = extra_bytes;
X }
X }
@@ -13285,14 +11480,15 @@
X scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE;
X }
X scsiq->q1.status = QS_FREE;
- AscMemWordCopyToLram(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_CDB_BEG),
- (ushort *) scsiq->cdbptr,
- (ushort) ((ushort) scsiq->q2.cdb_len >> 1));
+ AscMemWordCopyPtrToLram(iop_base,
+ q_addr + ASC_SCSIQ_CDB_BEG,
+ (uchar *) scsiq->cdbptr,
+ scsiq->q2.cdb_len >> 1);
+
X DvcPutScsiQ(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_CPY_BEG),
- (ushort *) & scsiq->q1.cntl,
- (ushort) ((((sizeof (ASC_SCSIQ_1) + sizeof (ASC_SCSIQ_2)) / 2) - 1)));
+ q_addr + ASC_SCSIQ_CPY_BEG,
+ (uchar *) &scsiq->q1.cntl,
+ ((sizeof(ASC_SCSIQ_1) + sizeof(ASC_SCSIQ_2)) / 2) - 1);
X AscWriteLramWord(iop_base,
X (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
X (ushort) (((ushort) scsiq->q1.q_no << 8) | (ushort) QS_READY));
@@ -13325,6 +11521,7 @@
X saved_data_cnt = scsiq->q1.data_cnt;
X scsiq->q1.data_addr = (ASC_PADDR) sg_head->sg_list[0].addr;
X scsiq->q1.data_cnt = (ASC_DCNT) sg_head->sg_list[0].bytes;
+#if CC_VERY_LONG_SG_LIST
X /*
X * If sg_head->entry_cnt is greater than ASC_MAX_SG_LIST
X * then not all SG elements will fit in the allocated queues.
@@ -13335,10 +11532,10 @@
X {
X /*
X * Set sg_entry_cnt to be the number of SG elements that
- * will fit in the allocated SG queues. It is minus 1 because
- * first SG element handled above. ASC_MAX_SG_LIST is already
- * inflated by 1 to account for this. For example it may
- * be 50 which is 1 + 7 queues * 7 SG elements.
+ * will fit in the allocated SG queues. It is minus 1, because
+ * the first SG element is handled above. ASC_MAX_SG_LIST is
+ * already inflated by 1 to account for this. For example it
+ * may be 50 which is 1 + 7 queues * 7 SG elements.
X */
X sg_entry_cnt = ASC_MAX_SG_LIST - 1;
X
@@ -13349,13 +11546,16 @@
X scsiq->remain_sg_entry_cnt = sg_head->entry_cnt - ASC_MAX_SG_LIST;
X } else
X {
+#endif /* CC_VERY_LONG_SG_LIST */
X /*
X * Set sg_entry_cnt to be the number of SG elements that
- * will fit in the allocated SG queues. Refer to comment
- * above regarding why it is - 1.
+ * will fit in the allocated SG queues. It is minus 1, because
+ * the first SG element is handled above.
X */
X sg_entry_cnt = sg_head->entry_cnt - 1;
+#if CC_VERY_LONG_SG_LIST
X }
+#endif /* CC_VERY_LONG_SG_LIST */
X if (sg_entry_cnt != 0) {
X scsiq->q1.cntl |= QC_SG_HEAD;
X q_addr = ASC_QNO_TO_QADDR(q_no);
@@ -13376,6 +11576,7 @@
X scsi_sg_q.sg_cur_list_cnt = ASC_SG_LIST_PER_Q - 1;
X }
X } else {
+#if CC_VERY_LONG_SG_LIST
X /*
X * This is the last SG queue in the list of
X * allocated SG queues. If there are more
@@ -13387,8 +11588,11 @@
X scsi_sg_q.cntl |= QCSG_SG_XFER_MORE;
X } else
X {
+#endif /* CC_VERY_LONG_SG_LIST */
X scsi_sg_q.cntl |= QCSG_SG_XFER_END;
+#if CC_VERY_LONG_SG_LIST
X }
+#endif /* CC_VERY_LONG_SG_LIST */
X sg_list_dwords = sg_entry_cnt << 1;


X if (i == 0) {

X scsi_sg_q.sg_list_cnt = sg_entry_cnt;
@@ -13403,14 +11607,14 @@
X (ushort) (q_addr + ASC_SCSIQ_B_FWD));
X scsi_sg_q.q_no = next_qp;
X q_addr = ASC_QNO_TO_QADDR(next_qp);
- AscMemWordCopyToLram(iop_base,
- (ushort) (q_addr + ASC_SCSIQ_SGHD_CPY_BEG),
- (ushort *) & scsi_sg_q,
- (ushort) (sizeof (ASC_SG_LIST_Q) >> 1));
- AscMemDWordCopyToLram(iop_base,
- (ushort) (q_addr + ASC_SGQ_LIST_BEG),
- (ADV_PADDR *) &sg_head->sg_list[sg_index],
- (ushort) sg_list_dwords);
+ AscMemWordCopyPtrToLram(iop_base,
+ q_addr + ASC_SCSIQ_SGHD_CPY_BEG,
+ (uchar *) &scsi_sg_q,
+ sizeof(ASC_SG_LIST_Q) >> 1);
+ AscMemDWordCopyPtrToLram(iop_base,
+ q_addr + ASC_SGQ_LIST_BEG,
+ (uchar *) &sg_head->sg_list[sg_index],
+ sg_list_dwords);
X sg_index += ASC_SG_LIST_PER_Q;
X scsiq->next_sg_index = sg_index;
X }
@@ -13423,150 +11627,6 @@
X return (sta);
X }
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int
-AscAbortSRB(
- ASC_DVC_VAR *asc_dvc,
- ADV_VADDR srb_ptr
-)
-{
- int sta;
- ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready;
- PortAddr iop_base;
-
- iop_base = asc_dvc->iop_base;
- sta = ERR;
- saved_unit_not_ready = asc_dvc->unit_not_ready;
- asc_dvc->unit_not_ready = 0xFF;
- AscWaitISRDone(asc_dvc);
- if (AscStopQueueExe(iop_base) == 1) {
- if (AscRiscHaltedAbortSRB(asc_dvc, srb_ptr) == 1) {
- sta = 1;
- AscCleanUpBusyQueue(iop_base);
- AscStartQueueExe(iop_base);
- } else {
- sta = 0;
- AscStartQueueExe(iop_base);
- }
- }
- asc_dvc->unit_not_ready = saved_unit_not_ready;
- return (sta);
-}
-#endif /* version < v2.3.28 */
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \
- LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int
-AscResetDevice(
- ASC_DVC_VAR *asc_dvc,
- uchar target_ix
-)
-{
- PortAddr iop_base;
- int sta;
- uchar tid_no;
-
- ASC_SCSI_BIT_ID_TYPE target_id;
- int i;
- ASC_SCSI_REQ_Q scsiq_buf;
- ASC_SCSI_REQ_Q *scsiq;
- uchar *buf;
- ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready;
- iop_base = asc_dvc->iop_base;
- tid_no = ASC_TIX_TO_TID(target_ix);
- target_id = ASC_TID_TO_TARGET_ID(tid_no);
- saved_unit_not_ready = asc_dvc->unit_not_ready;
- asc_dvc->unit_not_ready = target_id;
- sta = ERR;
- AscWaitTixISRDone(asc_dvc, target_ix);
- if (AscStopQueueExe(iop_base) == 1) {
- if (AscRiscHaltedAbortTIX(asc_dvc, target_ix) == 1) {
- AscCleanUpBusyQueue(iop_base);
- AscStartQueueExe(iop_base);
- AscWaitTixISRDone(asc_dvc, target_ix);
- sta = TRUE;
- scsiq = (ASC_SCSI_REQ_Q *) & scsiq_buf;
- buf = (uchar *) & scsiq_buf;
- for (i = 0; i < sizeof (ASC_SCSI_REQ_Q); i++) {
- *buf++ = 0x00;
- }
- scsiq->r1.status = (uchar) QS_READY;
- scsiq->r2.cdb_len = 6;
- scsiq->r2.tag_code = M2_QTAG_MSG_SIMPLE;
- scsiq->r1.target_id = target_id;
- scsiq->r2.target_ix = ASC_TIDLUN_TO_IX(tid_no, 0);
- scsiq->cdbptr = (uchar *) scsiq->cdb;
- scsiq->r1.cntl = QC_NO_CALLBACK | QC_MSG_OUT | QC_URGENT;
- AscWriteLramByte(asc_dvc->iop_base, ASCV_MSGOUT_BEG,
- M1_BUS_DVC_RESET);
- asc_dvc->unit_not_ready &= ~target_id;
- asc_dvc->sdtr_done |= target_id;
- if (AscExeScsiQueue(asc_dvc, (ASC_SCSI_Q *) scsiq)
- == 1) {
- asc_dvc->unit_not_ready = target_id;
- DvcSleepMilliSecond(1000);
- _AscWaitQDone(iop_base, (ASC_SCSI_Q *) scsiq);
- if (AscStopQueueExe(iop_base) == 1) {
- AscCleanUpDiscQueue(iop_base);
- AscStartQueueExe(iop_base);
- if (asc_dvc->pci_fix_asyn_xfer & target_id) {
- AscSetRunChipSynRegAtID(iop_base, tid_no,
- ASYN_SDTR_DATA_FIX_PCI_REV_AB);
- }
- AscWaitTixISRDone(asc_dvc, target_ix);
- }
- } else {
- sta = 0;
- }
- asc_dvc->sdtr_done &= ~target_id;
- } else {
- sta = ERR;
- AscStartQueueExe(iop_base);
- }
- }
- asc_dvc->unit_not_ready = saved_unit_not_ready;
- return (sta);
-}
-#endif /* version >= v1.3.89 && version <= v2.3.28 */
-
-STATIC int
-AscResetSB(
- ASC_DVC_VAR *asc_dvc
-)
-{
- int sta;
- int i;
- PortAddr iop_base;
-
- iop_base = asc_dvc->iop_base;
- asc_dvc->unit_not_ready = 0xFF;
- sta = TRUE;
- AscWaitISRDone(asc_dvc);
- AscStopQueueExe(iop_base);
- asc_dvc->sdtr_done = 0;
- AscResetChipAndScsiBus(asc_dvc);
- DvcSleepMilliSecond((ASC_DCNT) ((ushort) asc_dvc->scsi_reset_wait * 1000));
- AscReInitLram(asc_dvc);
- for (i = 0; i <= ASC_MAX_TID; i++) {
- asc_dvc->cur_dvc_qng[i] = 0;
- if (asc_dvc->pci_fix_asyn_xfer & (ASC_SCSI_BIT_ID_TYPE) (0x01 << i)) {
- AscSetChipSynRegAtID(iop_base, i, ASYN_SDTR_DATA_FIX_PCI_REV_AB);
- }
- }
- asc_dvc->err_code = 0;
- AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR);
- if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) {
- sta = ERR;
- }
- if (AscStartChip(iop_base) == 0) {
- sta = ERR;
- }
- AscStartQueueExe(iop_base);
- asc_dvc->unit_not_ready = 0;
- asc_dvc->queue_full_or_busy = 0;
- return (sta);
-}
-
X STATIC int
X AscSetRunChipSynRegAtID(
X PortAddr iop_base,
@@ -13618,16 +11678,6 @@
X return (sta);
X }
X
-STATIC int
-AscReInitLram(
- ASC_DVC_VAR *asc_dvc
-)
-{
- AscInitLram(asc_dvc);
- AscInitQLinkVar(asc_dvc);


- return (0);
-}
-

X STATIC ushort
X AscInitLram(
X ASC_DVC_VAR *asc_dvc
@@ -13722,39 +11772,14 @@
X {
X if (asc_dvc->err_code == 0) {
X asc_dvc->err_code = err_code;
- AscWriteLramWord(asc_dvc->iop_base, ASCV_ASCDVC_ERR_CODE_W,
- err_code);
- }
- return (err_code);
-}
-
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \
- LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int
-_AscWaitQDone(
- PortAddr iop_base,
- ASC_SCSI_Q * scsiq
-)
-{
- ushort q_addr;
- uchar q_status;
- int count = 0;
-
- while (scsiq->q1.q_no == 0);
- q_addr = ASC_QNO_TO_QADDR(scsiq->q1.q_no);
- do {
- q_status = AscReadLramByte(iop_base, q_addr + ASC_SCSIQ_B_STATUS);
- DvcSleepMilliSecond(100L);
- if (count++ > 30) {
- return (0);
- }
- } while ((q_status & QS_READY) != 0);
- return (1);
+ AscWriteLramWord(asc_dvc->iop_base, ASCV_ASCDVC_ERR_CODE_W,
+ err_code);
+ }
+ return (err_code);
X }
-#endif /* version >= v1.3.89 && version < v2.3.28 */
X
-STATIC uchar
+
+STATIC uchar
X AscMsgOutSDTR(
X ASC_DVC_VAR *asc_dvc,
X uchar sdtr_period,
@@ -13775,18 +11800,18 @@
X if ((sdtr_period_index =
X AscGetSynPeriodIndex(asc_dvc, sdtr_period)) <=
X asc_dvc->max_sdtr_index) {
- AscMemWordCopyToLram(iop_base,
+ AscMemWordCopyPtrToLram(iop_base,
X ASCV_MSGOUT_BEG,
- (ushort *) & sdtr_buf,
- (ushort) (sizeof (EXT_MSG) >> 1));
+ (uchar *) &sdtr_buf,
+ sizeof (EXT_MSG) >> 1);
X return ((sdtr_period_index << 4) | sdtr_offset);
X } else {
X
X sdtr_buf.req_ack_offset = 0;
- AscMemWordCopyToLram(iop_base,
+ AscMemWordCopyPtrToLram(iop_base,
X ASCV_MSGOUT_BEG,
- (ushort *) & sdtr_buf,
- (ushort) (sizeof (EXT_MSG) >> 1));
+ (uchar *) &sdtr_buf,
+ sizeof (EXT_MSG) >> 1);
X return (0);
X }
X }
@@ -13888,98 +11913,6 @@
X return (free_q_head);
X }
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int
-AscRiscHaltedAbortSRB(
- ASC_DVC_VAR *asc_dvc,
- ASC_VADDR srb_ptr
-)
-{
- PortAddr iop_base;
- ushort q_addr;
- uchar q_no;
- ASC_QDONE_INFO scsiq_buf;
- ASC_QDONE_INFO *scsiq;
- ASC_ISR_CALLBACK asc_isr_callback;
- int last_int_level;
-
- iop_base = asc_dvc->iop_base;
- asc_isr_callback = asc_dvc->isr_callback;
- last_int_level = DvcEnterCritical();
- scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
- for (q_no = ASC_MIN_ACTIVE_QNO; q_no <= asc_dvc->max_total_qng;
- q_no++) {
- q_addr = ASC_QNO_TO_QADDR(q_no);
- scsiq->d2.srb_ptr = AscReadLramDWord(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR));
- if (scsiq->d2.srb_ptr == srb_ptr) {
- _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, asc_dvc->max_dma_count);
- if (((scsiq->q_status & QS_READY) != 0)
- && ((scsiq->q_status & QS_ABORTED) == 0)
- && ((scsiq->cntl & QCSG_SG_XFER_LIST) == 0)) {
- scsiq->q_status |= QS_ABORTED;
- scsiq->d3.done_stat = QD_ABORTED_BY_HOST;
- AscWriteLramDWord(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR),
- 0L);
- AscWriteLramByte(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
- scsiq->q_status);
- (*asc_isr_callback) (asc_dvc, scsiq);
- return (1);
- }
- }
- }
- DvcLeaveCritical(last_int_level);
- return (0);
-}
-#endif /* version < v2.3.28 */
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \
- LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int
-AscRiscHaltedAbortTIX(
- ASC_DVC_VAR *asc_dvc,
- uchar target_ix
-)
-{
- PortAddr iop_base;
- ushort q_addr;
- uchar q_no;
- ASC_QDONE_INFO scsiq_buf;
- ASC_QDONE_INFO *scsiq;
- ASC_ISR_CALLBACK asc_isr_callback;
- int last_int_level;
-
- iop_base = asc_dvc->iop_base;
- asc_isr_callback = asc_dvc->isr_callback;
- last_int_level = DvcEnterCritical();
- scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
- for (q_no = ASC_MIN_ACTIVE_QNO; q_no <= asc_dvc->max_total_qng;
- q_no++) {
- q_addr = ASC_QNO_TO_QADDR(q_no);
- _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, asc_dvc->max_dma_count);
- if (((scsiq->q_status & QS_READY) != 0) &&
- ((scsiq->q_status & QS_ABORTED) == 0) &&
- ((scsiq->cntl & QCSG_SG_XFER_LIST) == 0)) {
- if (scsiq->d2.target_ix == target_ix) {
- scsiq->q_status |= QS_ABORTED;
- scsiq->d3.done_stat = QD_ABORTED_BY_HOST;
- AscWriteLramDWord(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR),
- 0L);
- AscWriteLramByte(iop_base,
- (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
- scsiq->q_status);
- (*asc_isr_callback) (asc_dvc, scsiq);
- }
- }
- }
- DvcLeaveCritical(last_int_level);
- return (1);
-}
-#endif /* version >= v1.3.89 && version < v2.3.28 */
-
X STATIC int
X AscHostReqRiscHalt(
X PortAddr iop_base
@@ -14028,121 +11961,6 @@
X return (0);
X }
X
-STATIC int
-AscStartQueueExe(
- PortAddr iop_base
-)
-{
- if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) {
- AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, 0);
- }
- return (1);
-}
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int
-AscCleanUpBusyQueue(
- PortAddr iop_base
-)
-{
- int count;
- uchar stop_code;
-
- count = 0;
- if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) {
- AscWriteLramByte(iop_base, ASCV_STOP_CODE_B,
- ASC_STOP_CLEAN_UP_BUSY_Q);
- do {
- stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B);
- if ((stop_code & ASC_STOP_CLEAN_UP_BUSY_Q) == 0)
- break;
- DvcSleepMilliSecond(100);
- } while (count++ < 20);
- }
- return (1);
-}
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int
-AscCleanUpDiscQueue(
- PortAddr iop_base
-)
-{
- int count;
- uchar stop_code;
-
- count = 0;
- if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) {
- AscWriteLramByte(iop_base, ASCV_STOP_CODE_B,
- ASC_STOP_CLEAN_UP_DISC_Q);
- do {
- stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B);
- if ((stop_code & ASC_STOP_CLEAN_UP_DISC_Q) == 0)
- break;
- DvcSleepMilliSecond(100);
- } while (count++ < 20);
- }
- return (1);
-}
-#endif /* version >= v1.3.89 */
-#endif /* version < v2.3.28 */
-
-STATIC int
-AscWaitTixISRDone(
- ASC_DVC_VAR *asc_dvc,
- uchar target_ix
-)
-{
- uchar cur_req;
- uchar tid_no;
- int i = 0;
-
- tid_no = ASC_TIX_TO_TID(target_ix);
- while (i++ < 10) {
- if ((cur_req = asc_dvc->cur_dvc_qng[tid_no]) == 0) {
- break;
- }
- DvcSleepMilliSecond(1000L);
- if (asc_dvc->cur_dvc_qng[tid_no] == cur_req) {
- break;
- }
- }
- return (1);
-}
-
-STATIC int
-AscWaitISRDone(
- ASC_DVC_VAR *asc_dvc
-)
-{
- int tid;
-
- for (tid = 0; tid <= ASC_MAX_TID; tid++) {
- AscWaitTixISRDone(asc_dvc, ASC_TID_TO_TIX(tid));
- }
- return (1);
-}
-
-STATIC ASC_PADDR
-AscGetOnePhyAddr(
- ASC_DVC_VAR *asc_dvc,
- uchar * buf_addr,
- ASC_DCNT buf_size
-)
-{
- ASC_MIN_SG_HEAD sg_head;
-
- sg_head.entry_cnt = ASC_MIN_SG_LIST;
- if (DvcGetSGList(asc_dvc, (uchar *) buf_addr,
- buf_size, (ASC_SG_HEAD *) &sg_head) != buf_size) {
- return (0L);
- }
- if (sg_head.entry_cnt > 1) {
- return (0L);
- }
- return ((ASC_PADDR) sg_head.sg_list[0].addr);
-}
-
X STATIC void
X DvcDelayMicroSecond(ADV_DVC_VAR *asc_dvc, ushort micro_sec)
X {
@@ -14647,12 +12465,10 @@
X return (warn_code);
X }
X
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort
X AscInitAsc1000Driver(
X ASC_DVC_VAR *asc_dvc
X )
-)
X {
X ushort warn_code;
X PortAddr iop_base;
@@ -14676,7 +12492,9 @@
X warn_code |= AscInitLram(asc_dvc);
X if (asc_dvc->err_code != 0)
X return (UW_ERR);
- if (AscLoadMicroCode(iop_base, 0, (ushort *) _asc_mcode_buf,
+ ASC_DBG1(1, "AscInitAsc1000Driver: _asc_mcode_chksum 0x%lx\n",
+ (ulong) _asc_mcode_chksum);
+ if (AscLoadMicroCode(iop_base, 0, _asc_mcode_buf,
X _asc_mcode_size) != _asc_mcode_chksum) {
X asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
X return (warn_code);
@@ -14838,7 +12656,7 @@
X asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR;
X return (warn_code);
X }
- eep_config = (ASCEEP_CONFIG *) & eep_config_buf;
+ eep_config = (ASCEEP_CONFIG *) &eep_config_buf;
X cfg_msw = AscGetChipCfgMsw(iop_base);
X cfg_lsw = AscGetChipCfgLsw(iop_base);
X if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) {
@@ -14847,6 +12665,7 @@
X AscSetChipCfgMsw(iop_base, cfg_msw);
X }
X chksum = AscGetEEPConfig(iop_base, eep_config, asc_dvc->bus_type);
+ ASC_DBG1(1, "AscInitFromEEP: chksum 0x%x\n", chksum);
X if (chksum == 0) {
X chksum = 0xaa55;
X }
@@ -14865,10 +12684,14 @@
X }
X eep_config->cfg_msw &= ~ASC_CFG_MSW_CLR_MASK;
X eep_config->cfg_lsw |= ASC_CFG0_HOST_INT_ON;
+ ASC_DBG1(1, "AscInitFromEEP: eep_config->chksum 0x%x\n",
+ eep_config->chksum);
X if (chksum != eep_config->chksum) {
X if (AscGetChipVersion(iop_base, asc_dvc->bus_type) ==
X ASC_CHIP_VER_PCI_ULTRA_3050 )
X {
+ ASC_DBG(1,
+"AscInitFromEEP: chksum error ignored; EEPROM-less board\n");
X eep_config->init_sdtr = 0xFF;
X eep_config->disc_enable = 0xFF;
X eep_config->start_motor = 0xFF;
@@ -14886,6 +12709,8 @@
X /* Indicate EEPROM-less board. */
X eep_config->adapter_info[5] = 0xBB;
X } else {
+ ASC_PRINT(
+"AscInitFromEEP: EEPROM checksum error; Will try to re-write EEPROM.\n");
X write_eep = 1;
X warn_code |= ASC_WARN_EEPROM_CHKSUM;
X }
@@ -14953,22 +12778,27 @@
X }
X eep_config->cfg_msw = AscGetChipCfgMsw(iop_base);
X if (write_eep) {
- (void) AscSetEEPConfig(iop_base, eep_config, asc_dvc->bus_type);
+ if ((i = AscSetEEPConfig(iop_base, eep_config, asc_dvc->bus_type)) !=
+ 0) {
+ ASC_PRINT1(
+"AscInitFromEEP: Failed to re-write EEPROM with %d errors.\n", i);
+ } else {
+ ASC_PRINT("AscInitFromEEP: Succesfully re-wrote EEPROM.");
+ }
X }
X return (warn_code);
X }
X
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort
X AscInitMicroCodeVar(
X ASC_DVC_VAR *asc_dvc
X )
-)
X {
X int i;
X ushort warn_code;
X PortAddr iop_base;
X ASC_PADDR phy_addr;
+ ASC_DCNT phy_size;
X
X iop_base = asc_dvc->iop_base;
X warn_code = 0;
@@ -14977,26 +12807,27 @@
X asc_dvc->cfg->sdtr_period_offset[i]
X );
X }
+
X AscInitQLinkVar(asc_dvc);
X AscWriteLramByte(iop_base, ASCV_DISC_ENABLE_B,
X asc_dvc->cfg->disc_enable);
X AscWriteLramByte(iop_base, ASCV_HOSTSCSI_ID_B,
X ASC_TID_TO_TARGET_ID(asc_dvc->cfg->chip_scsi_id));
- if ((phy_addr = AscGetOnePhyAddr(asc_dvc,
- (uchar *) asc_dvc->cfg->overrun_buf,
- ASC_OVERRUN_BSIZE)) == 0L) {
- asc_dvc->err_code |= ASC_IERR_GET_PHY_ADDR;
- } else {
- /* Align on an 8 byte boundary. */
- phy_addr = /*cpu_to_le32*/((phy_addr + 7) & ~0x7);
- AscWriteLramDWord(iop_base, ASCV_OVERRUN_PADDR_D, phy_addr);
- AscWriteLramDWord(iop_base, ASCV_OVERRUN_BSIZE_D,
- ASC_OVERRUN_BSIZE - 8);
- }
- asc_dvc->cfg->mcode_date = AscReadLramWord(iop_base,
- (ushort) ASCV_MC_DATE_W);
- asc_dvc->cfg->mcode_version = AscReadLramWord(iop_base,
- (ushort) ASCV_MC_VER_W);
+
+ /* Align overrun buffer on an 8 byte boundary. */
+ phy_addr = virt_to_bus(asc_dvc->cfg->overrun_buf);
+ phy_addr = cpu_to_le32((phy_addr + 7) & ~0x7);
+ AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_PADDR_D,
+ (uchar *) &phy_addr, 1);
+ phy_size = cpu_to_le32(ASC_OVERRUN_BSIZE - 8);
+ AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_BSIZE_D,
+ (uchar *) &phy_size, 1);
+
+ asc_dvc->cfg->mcode_date =
+ AscReadLramWord(iop_base, (ushort) ASCV_MC_DATE_W);
+ asc_dvc->cfg->mcode_version =
+ AscReadLramWord(iop_base, (ushort) ASCV_MC_VER_W);
+
X AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR);
X if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) {
X asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR;
@@ -15006,6 +12837,7 @@
X asc_dvc->err_code |= ASC_IERR_START_STOP_CHIP;
X return (warn_code);
X }
+
X return (warn_code);
X }
X
@@ -15167,24 +12999,17 @@
X ushort wval;
X ushort sum;
X ushort *wbuf;
- ushort *charfields;
X int cfg_beg;
X int cfg_end;
+ int uchar_end_in_config = ASC_EEP_MAX_DVC_ADDR - 2;
X int s_addr;
- int isa_pnp_wsize;
X
X wbuf = (ushort *) cfg_buf;
- charfields = (ushort *) &ASCEEP_Config_Field_IsChar;
X sum = 0;
- isa_pnp_wsize = 0;
- for (s_addr = 0; s_addr < (2 + isa_pnp_wsize); s_addr++, wbuf++) {
- wval = AscReadEEPWord(iop_base, (uchar) s_addr);
- sum += wval;
- /* Swap to native as needed */
- if (*charfields++)
- *wbuf = cpu_to_le16(wval);
- else
- *wbuf = wval;
+ /* Read two config words; Byte-swapping done by AscReadEEPWord(). */
+ for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) {
+ *wbuf = AscReadEEPWord(iop_base, (uchar) s_addr);
+ sum += *wbuf;
X }
X if (bus_type & ASC_IS_VL) {
X cfg_beg = ASC_EEP_DVC_CFG_BEG_VL;
@@ -15193,20 +13018,25 @@
X cfg_beg = ASC_EEP_DVC_CFG_BEG;
X cfg_end = ASC_EEP_MAX_DVC_ADDR;
X }
- for (s_addr = cfg_beg; s_addr <= (cfg_end - 1);
- s_addr++, wbuf++) {
- wval = AscReadEEPWord(iop_base, (uchar) s_addr);
- sum += wval;
- *wbuf = wval;
- /* Swap to native as needed */
- if (*charfields++)
- *wbuf = cpu_to_le16(wval);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 48'
echo 'File patch-2.2.20 is continued in part 49'
echo "49" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:32 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part33

#!/bin/sh -x
# this is part 33 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 33; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-SK_IOC IoC) /* IO context handle */
+SK_IOC IoC, /* IO context handle */


+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {

X SK_EVPARA EventParam;
X
@@ -6564,6 +7023,8 @@
X
X /* Send an synchronuous update event to the module */


X SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));

+ EventParam.Para32[0] = NetIndex;
+ EventParam.Para32[1] = (SK_U32)-1;
X if (SkRlmtEvent(pAC, IoC, SK_RLMT_STATS_UPDATE, EventParam) > 0) {
X
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR048,
@@ -6660,40 +7121,49 @@
X */
X
X static SK_U64 GetStatVal(
-SK_AC *pAC, /* Pointer to adapter context */
-SK_IOC IoC, /* IO context handle */
+SK_AC *pAC, /* Pointer to adapter context */
+SK_IOC IoC, /* IO context handle */
X unsigned int LogPortIndex, /* Index of the logical Port to be processed */
-unsigned int StatIndex) /* Index to statistic value */
+unsigned int StatIndex, /* Index to statistic value */


+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {

X unsigned int PhysPortIndex;
X unsigned int PhysPortMax;
X SK_U64 Val = 0;
X
X
- if (LogPortIndex == 0) {


+ if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */

X
- PhysPortMax = pAC->GIni.GIMacsFound;
+ PhysPortIndex = NetIndex;
+ Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex);
+ } /* end of dual net mode */
X
- /* Add counter of all active ports */
- for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax;
- PhysPortIndex ++) {
+ else { /* single net mode */
X
- if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
+ if (LogPortIndex == 0) {
X
- Val += GetPhysStatVal(pAC, IoC, PhysPortIndex,
- StatIndex);
- }
- }
+ PhysPortMax = pAC->GIni.GIMacsFound;
X
- /* Correct value because of port switches */
- Val += pAC->Pnmi.VirtualCounterOffset[StatIndex];
- }
- else {
- /* Get counter value of physical port */
- PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex);
- Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex);
- }
+ /* Add counter of all active ports */
+ for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax;
+ PhysPortIndex ++) {
+
+ if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
+
+ Val += GetPhysStatVal(pAC, IoC, PhysPortIndex,
+ StatIndex);
+ }
+ }
X
+ /* Correct value because of port switches */
+ Val += pAC->Pnmi.VirtualCounterOffset[StatIndex];
+ }
+ else {
+ /* Get counter value of physical port */


+ PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex);

+ Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex);
+ }
+ } /* end of single net mode */
X return (Val);
X }
X
@@ -6715,8 +7185,8 @@
X */
X
X static SK_U64 GetPhysStatVal(
-SK_AC *pAC, /* Pointer to adapter context */
-SK_IOC IoC, /* IO context handle */
+SK_AC *pAC, /* Pointer to adapter context */
+SK_IOC IoC, /* IO context handle */
X unsigned int PhysPortIndex, /* Index of the logical Port to be processed */
X unsigned int StatIndex) /* Index to statistic value */
X {
@@ -6755,6 +7225,12 @@
X 32);
X break;
X
+ case SK_PNMI_HRX_LONGFRAMES:
+ LowVal = (SK_U32)pAC->Pnmi.Port[PhysPortIndex].StatRxLongFrameCts;
+ HighVal = (SK_U32)
+ (pAC->Pnmi.Port[PhysPortIndex].StatRxLongFrameCts >> 32);
+ break;
+
X case SK_PNMI_HRX_FCS:
X /*
X * Broadcom filters fcs errors and counts it in
@@ -6806,7 +7282,8 @@
X
X static void ResetCounter(


X SK_AC *pAC, /* Pointer to adapter context */

-SK_IOC IoC) /* IO context handle */
+SK_IOC IoC, /* IO context handle */
+SK_U32 NetIndex)


X {
X unsigned int PhysPortIndex;

X SK_EVPARA EventParam;
@@ -6818,7 +7295,10 @@
X SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_CLEAR, EventParam);
X
X /* Notify RLMT module */
+ EventParam.Para32[0] = NetIndex;
+ EventParam.Para32[1] = (SK_U32)-1;
X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STATS_CLEAR, EventParam);


+ EventParam.Para32[1] = 0;
X

X /* Notify SIRQ module */
X SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_CLEAR_STAT, EventParam);
@@ -6850,27 +7330,32 @@
X SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
X StatSyncOctetsCts, 0, sizeof(pAC->Pnmi.Port[
X PhysPortIndex].StatSyncOctetsCts));
+ SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
+ StatRxLongFrameCts, 0, sizeof(pAC->Pnmi.Port[
+ PhysPortIndex].StatRxLongFrameCts));
X }
X
X /*
X * Clear local statistics
X */
+ SK_MEMSET((char *)&pAC->Pnmi.VirtualCounterOffset, 0,
+ sizeof(pAC->Pnmi.VirtualCounterOffset));
X pAC->Pnmi.RlmtChangeCts = 0;
X pAC->Pnmi.RlmtChangeTime = 0;
X SK_MEMSET((char *)&pAC->Pnmi.RlmtChangeEstimate.EstValue[0], 0,
X sizeof(pAC->Pnmi.RlmtChangeEstimate.EstValue));
X pAC->Pnmi.RlmtChangeEstimate.EstValueIndex = 0;
X pAC->Pnmi.RlmtChangeEstimate.Estimate = 0;
- pAC->Pnmi.TxSwQueueMax = 0;
- pAC->Pnmi.TxRetryCts = 0;
- pAC->Pnmi.RxIntrCts = 0;
- pAC->Pnmi.TxIntrCts = 0;
- pAC->Pnmi.RxNoBufCts = 0;
- pAC->Pnmi.TxNoBufCts = 0;
- pAC->Pnmi.TxUsedDescrNo = 0;
- pAC->Pnmi.RxDeliveredCts = 0;
- pAC->Pnmi.RxOctetsDeliveredCts = 0;
- pAC->Pnmi.ErrRecoveryCts = 0;
+ pAC->Pnmi.Port[NetIndex].TxSwQueueMax = 0;
+ pAC->Pnmi.Port[NetIndex].TxRetryCts = 0;
+ pAC->Pnmi.Port[NetIndex].RxIntrCts = 0;
+ pAC->Pnmi.Port[NetIndex].TxIntrCts = 0;
+ pAC->Pnmi.Port[NetIndex].RxNoBufCts = 0;
+ pAC->Pnmi.Port[NetIndex].TxNoBufCts = 0;
+ pAC->Pnmi.Port[NetIndex].TxUsedDescrNo = 0;
+ pAC->Pnmi.Port[NetIndex].RxDeliveredCts = 0;
+ pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts = 0;
+ pAC->Pnmi.Port[NetIndex].ErrRecoveryCts = 0;
X }
X
X /*****************************************************************************
@@ -6879,7 +7364,7 @@
X *
X * Description:
X * The trap buffer stores various events. A user application somehow
- * gets notified that an event occured and retrieves the trap buffer
+ * gets notified that an event occurred and retrieves the trap buffer
X * contens (or simply polls the buffer). The buffer is organized as
X * a ring which stores the newest traps at the beginning. The oldest
X * traps are overwritten by the newest ones. Each trap entry has a
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skgesirq.c linux/drivers/net/sk98lin/skgesirq.c
--- v2.2.19/drivers/net/sk98lin/skgesirq.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skgesirq.c Wed Oct 10 01:41:03 2001
@@ -2,16 +2,15 @@
X *
X * Name: skgesirq.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.49 $
- * Date: $Date: 1999/12/17 11:02:50 $
+ * Version: $Revision: 1.65 $
+ * Date: $Date: 2001/02/23 13:41:51 $
X * Purpose: Special IRQ module
X *
X ******************************************************************************/


X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.

+ * (C)Copyright 1998-2000 SysKonnect GmbH.
X *


X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,56 @@


X * History:
X *

X * $Log: skgesirq.c,v $
+ * Revision 1.65 2001/02/23 13:41:51 gklug
+ * fix: PHYS2INST should be used correctly for Dual Net operation
+ * chg: do no longer work with older PNMI
+ *
+ * Revision 1.64 2001/02/15 11:27:04 rassmann
+ * Working with RLMT v1 if SK_MAX_NETS undefined.
+ *
+ * Revision 1.63 2001/02/06 10:44:23 mkunz
+ * - NetIndex added to interface functions of pnmi V4 with dual net support
+ *
+ * Revision 1.62 2001/01/31 15:31:41 gklug


+ * fix: problem with autosensing an SR8800 switch

+ *
+ * Revision 1.61 2000/11/09 11:30:09 rassmann
+ * WA: Waiting after releasing reset until BCom chip is accessible.
+ *
+ * Revision 1.60 2000/10/18 12:37:48 cgoos
+ * Reinserted the comment for version 1.56.
+ *
+ * Revision 1.59 2000/10/18 12:22:20 cgoos


+ * Added workaround for half duplex hangup.

+ *
+ * Revision 1.58 2000/09/28 13:06:04 gklug
+ * fix: BCOM may NOT be touched if XMAC is in RESET state
+ *
+ * Revision 1.57 2000/09/08 12:38:39 cgoos
+ * Added forgotten variable declaration.
+ *
+ * Revision 1.56 2000/09/08 08:12:13 cgoos
+ * Changed handling of parity errors in SkGeHwErr (correct reset of error).
+ *
+ * Revision 1.55 2000/06/19 08:36:25 cgoos
+ * Changed comment.
+ *
+ * Revision 1.54 2000/05/22 08:45:57 malthoff
+ * Fix: #10523 is valid for all BCom PHYs.
+ *
+ * Revision 1.53 2000/05/19 10:20:30 cgoos
+ * Removed Solaris debug output code.
+ *
+ * Revision 1.52 2000/05/19 10:19:37 cgoos
+ * Added PHY state check in HWLinkDown.
+ * Move PHY interrupt code to IS_EXT_REG case in SkGeSirqIsr.
+ *
+ * Revision 1.51 2000/05/18 05:56:20 cgoos
+ * Fixed typo.
+ *
+ * Revision 1.50 2000/05/17 12:49:49 malthoff
+ * Fixes BCom link bugs (#10523).
+ *
X * Revision 1.49 1999/12/17 11:02:50 gklug
X * fix: read PHY_STAT of Broadcom chip more often to assure good status
X *
@@ -197,39 +246,38 @@


X *
X ******************************************************************************/
X

-
X /*
- Special Interrupt handler
-
- The following abstract should show how this module is included
- in the driver path:
-
- In the ISR of the driver the bits for frame transmission complete and
- for receive complete are checked and handled by the driver itself.
- The bits of the slow path mask are checked after this and then the
- entry into the so-called "slow path" is prepared. It is an implemetors
- decision whether this is executed directly or just scheduled by
- disabling the mask. In the interrupt service routine events may be
- generated, so it would be a good idea to call the EventDispatcher
- right after this ISR.
-
- The Interrupt service register of the adapter is NOT read by this
- module. SO if the drivers implemetor needs a while loop around the
- slow data paths Interrupt bits, he needs to call the SkGeIsr() for
- each loop entered.
-
- However, the XMAC Interrupt status registers are read in a while loop.
-
-*/
+ * Special Interrupt handler
+ *
+ * The following abstract should show how this module is included
+ * in the driver path:
+ *
+ * In the ISR of the driver the bits for frame transmission complete and
+ * for receive complete are checked and handled by the driver itself.
+ * The bits of the slow path mask are checked after this and then the
+ * entry into the so-called "slow path" is prepared. It is an implemetors
+ * decision whether this is executed directly or just scheduled by
+ * disabling the mask. In the interrupt service routine events may be
+ * generated, so it would be a good idea to call the EventDispatcher
+ * right after this ISR.
+ *
+ * The Interrupt service register of the adapter is NOT read by this
+ * module. SO if the drivers implemetor needs a while loop around the
+ * slow data paths Interrupt bits, he needs to call the SkGeIsr() for
+ * each loop entered.
+ *
+ * However, the XMAC Interrupt status registers are read in a while loop.


+ *
+ */
+

X static const char SysKonnectFileId[] =

- "$Id: skgesirq.c,v 1.49 1999/12/17 11:02:50 gklug Exp $" ;
+ "$Id: skgesirq.c,v 1.65 2001/02/23 13:41:51 gklug Exp $" ;


X
X #include "h/skdrv1st.h" /* Driver Specific Definitions */

X #include "h/skgepnmi.h" /* PNMI Definitions */
X #include "h/skrlmt.h" /* RLMT Definitions */
X #include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */
X
-
X /* local function prototypes */
X static int SkGePortCheckUpXmac(SK_AC*, SK_IOC, int);
X static int SkGePortCheckUpBcom(SK_AC*, SK_IOC, int);
@@ -238,21 +286,31 @@
X static void SkPhyIsrBcom(SK_AC*, SK_IOC, int, SK_U16);
X static void SkPhyIsrLone(SK_AC*, SK_IOC, int, SK_U16);
X
+/*
+ * Define an array of RX counter which are checked
+ * in AutoSense mode to check whether a link is not able to autonegotiate.
+ */
+static const SK_U32 SkGeRxOids[]= {
+ OID_SKGE_STAT_RX_64,
+ OID_SKGE_STAT_RX_127,
+ OID_SKGE_STAT_RX_255,
+ OID_SKGE_STAT_RX_511,
+ OID_SKGE_STAT_RX_1023,
+ OID_SKGE_STAT_RX_MAX,
+} ;


X
X #ifdef __C2MAN__
X /*

- Special IRQ function
-
- General Description:
-
+ * Special IRQ function
+ *
+ * General Description:
+ *
X */
X intro()
X {}
X #endif
X
-/*
- * Define return codes of SkGePortCheckUp and CheckShort
- */
+/* Define return codes of SkGePortCheckUp and CheckShort. */
X #define SK_HW_PS_NONE 0 /* No action needed */
X #define SK_HW_PS_RESTART 1 /* Restart needed */
X #define SK_HW_PS_LINK 2 /* Link Up actions needed */
@@ -268,13 +326,13 @@
X *
X */
X void SkHWInitDefSense(


-SK_AC *pAC, /* adapter context */

-SK_IOC IoC, /* IO context */


+SK_AC *pAC, /* adapter context */

+SK_IOC IoC, /* IO context */
X int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
X
- pPrt = &pAC->GIni.GP[Port] ;
+ pPrt = &pAC->GIni.GP[Port];
X
X pPrt->PAutoNegTimeOut = 0;
X
@@ -283,15 +341,16 @@
X return;
X }
X

- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,

X ("AutoSensing: First mode %d on Port %d\n",
- (int) SK_LMODE_AUTOFULL,
+ (int)SK_LMODE_AUTOFULL,
X Port));
X
X pPrt->PLinkMode = SK_LMODE_AUTOFULL;
X
X return;
-}
+} /* SkHWInitDefSense */


+
X
X /******************************************************************************
X *

@@ -304,29 +363,30 @@
X *
X */
X SK_U8 SkHWSenseGetNext(


-SK_AC *pAC, /* adapter context */

-SK_IOC IoC, /* IO context */


+SK_AC *pAC, /* adapter context */

+SK_IOC IoC, /* IO context */
X int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
X
- pPrt = &pAC->GIni.GP[Port] ;
+ pPrt = &pAC->GIni.GP[Port];
X
X pPrt->PAutoNegTimeOut = 0;
X
X if (pPrt->PLinkModeConf != SK_LMODE_AUTOSENSE) {
X /* Leave all as configured */
- return(pPrt->PLinkModeConf);
+ return (pPrt->PLinkModeConf);
X }
X
X if (pPrt->PLinkMode == SK_LMODE_AUTOFULL) {
X /* Return next mode AUTOBOTH */
- return(SK_LMODE_AUTOBOTH);
+ return (SK_LMODE_AUTOBOTH);
X }
X
X /* Return default autofull */
- return(SK_LMODE_AUTOFULL);
-}
+ return (SK_LMODE_AUTOFULL);
+} /* SkHWSenseGetNext */


+
X
X /******************************************************************************
X *

@@ -341,12 +401,12 @@
X void SkHWSenseSetNext(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */

X SK_U8 NewMode) /* New Mode to be written in sense mode */


X {
X SK_GEPORT *pPrt;
X

- pPrt = &pAC->GIni.GP[Port] ;
+ pPrt = &pAC->GIni.GP[Port];
X
X pPrt->PAutoNegTimeOut = 0;
X
@@ -354,13 +414,13 @@
X return;
X }
X
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
- ("AutoSensing: next mode %d on Port %d\n", (int) NewMode,
- Port));
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
+ ("AutoSensing: next mode %d on Port %d\n", (int)NewMode, Port));
X pPrt->PLinkMode = NewMode;
X
X return;
-}
+} /* SkHWSenseSetNext */


+
X
X /******************************************************************************
X *

@@ -375,38 +435,44 @@
X void SkHWLinkDown(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;

X SK_U16 Word;
X
- pPrt = &pAC->GIni.GP[Port] ;
+ pPrt = &pAC->GIni.GP[Port];
X
- /* Disable all XMAC interrupts */
+ /* Disable all XMAC interrupts. */
X XM_OUT16(IoC, Port, XM_IMSK, 0xffff);
X
- /* Disable Receive and Transmitter */
+ /* Disable Receiver and Transmitter. */
X XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
- XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX|XM_MMU_ENA_TX));
+ XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX));
X
- /* disable all PHY interrupts */
- switch (pAC->GIni.GP[Port].PhyType) {
+ /* Disable all PHY interrupts. */
+ switch (pPrt->PhyType) {


X case SK_PHY_BCOM:
- PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK,

- 0xffff);
+ /* Make sure that PHY is initialized. */
+ if (pAC->GIni.GP[Port].PState) {
+ /* NOT allowed if BCOM is in RESET state */
+ /* Workaround BCOM Errata (#10523) all BCom. */
+ /* Disable Power Management if link is down. */
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &Word);


+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL,

+ Word | PHY_B_AC_DIS_PM);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, 0xffff);
+ }


X break;
X case SK_PHY_LONE:
- PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB,

- 0x0);
+ PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, 0x0);


X break;
X case SK_PHY_NAT:
X /* todo: National

- PHY_WRITE(IoC, pPrt, Port, PHY_NAT_INT_MASK,
- 0xffff); */
+ PHY_WRITE(IoC, pPrt, Port, PHY_NAT_INT_MASK, 0xffff); */
X break;
X }
X
- /* Init default sense mode */
+ /* Init default sense mode. */
X SkHWInitDefSense(pAC, IoC, Port);


X
X if (!pPrt->PHWLinkUp) {

@@ -416,27 +482,25 @@
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
X ("Link down Port %d\n", Port));
X
- /* Set Link to DOWN */
+ /* Set Link to DOWN. */
X pPrt->PHWLinkUp = SK_FALSE;
X
X /* Reset Port stati */
X pPrt->PLinkModeStatus = SK_LMODE_STAT_UNKNOWN;
- pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE ;
+ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
X
X /*
- * Reinit Phy especially when the AutoSense default is set now
+ * Reinit Phy especially when the AutoSense default is set now.


X */
X SkXmInitPhy(pAC, IoC, Port, SK_FALSE);

X
- /*
- * GP0: used for workaround of Rev. C
- * Errata 2
- */
+ /* GP0: used for workaround of Rev. C Errata 2. */
+
+ /* Do NOT signal to RLMT. */
X
- /* Do NOT signal to RLMT */
+ /* Do NOT start the timer here. */
+} /* SkHWLinkDown */
X
- /* Do NOT start the timer here */
-}


X
X /******************************************************************************
X *

@@ -449,21 +513,21 @@
X *
X */
X void SkHWLinkUp(


-SK_AC *pAC, /* adapter context */

-SK_IOC IoC, /* IO context */


+SK_AC *pAC, /* adapter context */

+SK_IOC IoC, /* IO context */
X int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
X
- pPrt = &pAC->GIni.GP[Port] ;
+ pPrt = &pAC->GIni.GP[Port];
X
X if (pPrt->PHWLinkUp) {
X /* We do NOT need to proceed on active link */
X return;
X }
X
- pPrt->PHWLinkUp = SK_TRUE ;


- pPrt->PAutoNegFail = SK_FALSE ;

+ pPrt->PHWLinkUp = SK_TRUE;


+ pPrt->PAutoNegFail = SK_FALSE;

X pPrt->PLinkModeStatus = SK_LMODE_STAT_UNKNOWN;
X
X if (pPrt->PLinkMode != SK_LMODE_AUTOHALF &&
@@ -476,17 +540,19 @@
X /* Set Link Mode */
X if (pPrt->PLinkMode == SK_LMODE_FULL) {
X pPrt->PLinkModeStatus = SK_LMODE_STAT_FULL;


- } else {
+ }
+ else {

X pPrt->PLinkModeStatus = SK_LMODE_STAT_HALF;
X }
X
X /* No flow control without autonegotiation */
- pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE ;
+ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
X
X /* RX/TX enable */
X SkXmRxTxEnable(pAC, IoC, Port);
X }
-}
+} /* SkHWLinkUp */


+
X
X /******************************************************************************
X *

@@ -494,27 +560,28 @@
X *
X */
X static void SkMacParity(


-SK_AC *pAC, /* adapter context */

-SK_IOC IoC, /* IO context */


+SK_AC *pAC, /* adapter context */

+SK_IOC IoC, /* IO context */
X int Port) /* Port Index of the port failed */
X {
X SK_EVPARA Para;
X SK_GEPORT *pPrt; /* GIni Port struct pointer */
X SK_U64 TxMax; /* TxMax Counter */
- unsigned int Len;
+ unsigned Len;


X
X pPrt = &pAC->GIni.GP[Port];
X

X /* Clear IRQ */
- SK_OUT16(IoC, MR_ADDR(Port,TX_MFF_CTRL1), MFF_CLR_PERR) ;
+ SK_OUT16(IoC, MR_ADDR(Port,TX_MFF_CTRL1), MFF_CLR_PERR);
X
X if (pPrt->PCheckPar) {
X if (Port == MAC_1) {
X SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E016,
- SKERR_SIRQ_E016MSG) ;
- } else {
+ SKERR_SIRQ_E016MSG);
+ }
+ else {
X SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E017,
- SKERR_SIRQ_E017MSG) ;
+ SKERR_SIRQ_E017MSG);
X }
X Para.Para64 = Port;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
@@ -524,17 +591,18 @@
X return;
X }
X
-
X /* Check whether frames with a size of 1k were sent */
X Len = sizeof(SK_U64);
- SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_MAX, (char *) &TxMax,
- &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(Port));
+ SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_MAX, (char *)&TxMax,


+ &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),
+ pAC->Rlmt.Port[Port].Net->NetNumber);

X
X if (TxMax > 0) {
X /* From now on check the parity */
X pPrt->PCheckPar = SK_TRUE;
X }
-}
+} /* SkMacParity */


+
X
X /******************************************************************************
X *

@@ -550,17 +618,22 @@
X SK_U32 HwStatus) /* Interrupt status word */
X {
X SK_EVPARA Para;
+ SK_U16 Word;
X
- if (HwStatus & IS_IRQ_STAT) {
- SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E013,
- SKERR_SIRQ_E013MSG) ;
- Para.Para64 = 0;
- SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
- }
+ if ((HwStatus & IS_IRQ_MST_ERR) || (HwStatus & IS_IRQ_STAT)) {
+ if (HwStatus & IS_IRQ_STAT) {
+ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E013, SKERR_SIRQ_E013MSG);
+ }
+ else {
+ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E012, SKERR_SIRQ_E012MSG);
+ }
+
+ /* Reset all bits in the PCI STATUS register */
+ SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
+ SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
+ SK_OUT16(IoC, PCI_C(PCI_STATUS), Word | PCI_ERRBITS);
+ SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
X
- if (HwStatus & IS_IRQ_MST_ERR) {
- SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E012,
- SKERR_SIRQ_E012MSG) ;
X Para.Para64 = 0;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
X }
@@ -568,57 +641,54 @@
X if (HwStatus & IS_NO_STAT_M1) {
X /* Ignore it */
X /* This situation is also indicated in the descriptor */
- SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INSTAT) ;
+ SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INSTAT);
X }
X
X if (HwStatus & IS_NO_STAT_M2) {
X /* Ignore it */
X /* This situation is also indicated in the descriptor */
- SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INSTAT) ;
+ SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INSTAT);
X }
X
X if (HwStatus & IS_NO_TIST_M1) {
X /* Ignore it */
X /* This situation is also indicated in the descriptor */
- SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INTIST) ;
+ SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INTIST);
X }
X
X if (HwStatus & IS_NO_TIST_M2) {
X /* Ignore it */
X /* This situation is also indicated in the descriptor */
- SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INTIST) ;
+ SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INTIST);
X }
X
X if (HwStatus & IS_RAM_RD_PAR) {
- SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_RD_PERR) ;
- SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E014,
- SKERR_SIRQ_E014MSG) ;
+ SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_RD_PERR);
+ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E014, SKERR_SIRQ_E014MSG);
X Para.Para64 = 0;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
X }
X
X if (HwStatus & IS_RAM_WR_PAR) {
- SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_WR_PERR) ;
- SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E015,
- SKERR_SIRQ_E015MSG) ;
+ SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_WR_PERR);
+ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E015, SKERR_SIRQ_E015MSG);
X Para.Para64 = 0;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
X }
X
X if (HwStatus & IS_M1_PAR_ERR) {
- SkMacParity(pAC, IoC, MAC_1) ;
+ SkMacParity(pAC, IoC, MAC_1);
X }
X
X if (HwStatus & IS_M2_PAR_ERR) {
- SkMacParity(pAC, IoC, MAC_2) ;
+ SkMacParity(pAC, IoC, MAC_2);
X }
X
X if (HwStatus & IS_R1_PAR_ERR) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_P) ;
+ SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_P);
X
- SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E018,
- SKERR_SIRQ_E018MSG) ;
+ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E018, SKERR_SIRQ_E018MSG);
X Para.Para64 = MAC_1;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_1;
@@ -627,17 +697,16 @@
X
X if (HwStatus & IS_R2_PAR_ERR) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_P) ;
+ SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_P);
X
- SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E019,
- SKERR_SIRQ_E019MSG) ;
+ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E019, SKERR_SIRQ_E019MSG);
X Para.Para64 = MAC_2;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_2;


X SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
X }

+} /* SkGeHwErr */
X
-}


X
X /******************************************************************************
X *

@@ -652,13 +721,13 @@
X SK_IOC IoC, /* IO context */
X SK_U32 Istatus) /* Interrupt status word */
X {
- SK_U32 RegVal32; /* Read register Value */
X SK_EVPARA Para;
+ SK_U32 RegVal32; /* Read register Value */
X SK_U16 XmIsr;
X
X if (Istatus & IS_HW_ERR) {
- SK_IN32(IoC, B0_HWE_ISRC, &RegVal32) ;
- SkGeHwErr(pAC, IoC, RegVal32) ;
+ SK_IN32(IoC, B0_HWE_ISRC, &RegVal32);
+ SkGeHwErr(pAC, IoC, RegVal32);
X }
X
X /*
@@ -666,41 +735,101 @@
X */
X /* Check whether XMACs are correctly initialized */
X if ((Istatus & (IS_PA_TO_RX1 | IS_PA_TO_TX1)) &&
- !pAC->GIni.GP[MAC_1].PState) {
- /* XMAC was not initialized but Packet timeout occured */
+ !pAC->GIni.GP[MAC_1].PState) {
+ /* XMAC was not initialized but Packet timeout occurred */
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E004,
- SKERR_SIRQ_E004MSG) ;
+ SKERR_SIRQ_E004MSG);
X }
X
X if ((Istatus & (IS_PA_TO_RX2 | IS_PA_TO_TX2)) &&
X !pAC->GIni.GP[MAC_2].PState) {
- /* XMAC was not initialized but Packet timeout occured */
+ /* XMAC was not initialized but Packet timeout occurred */
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E005,
- SKERR_SIRQ_E005MSG) ;
+ SKERR_SIRQ_E005MSG);
X }
X
X if (Istatus & IS_PA_TO_RX1) {
X /* Means network is filling us up */
X SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E002,
- SKERR_SIRQ_E002MSG) ;
- SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX1) ;
+ SKERR_SIRQ_E002MSG);
+ SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX1);
X }
X
X if (Istatus & IS_PA_TO_RX2) {
X /* Means network is filling us up */
X SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E003,
- SKERR_SIRQ_E003MSG) ;
- SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX2) ;
+ SKERR_SIRQ_E003MSG);
+ SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX2);
X }
X
X if (Istatus & IS_PA_TO_TX1) {
+ unsigned int Len;
+ SK_U64 Octets;
+ SK_GEPORT *pPrt = &pAC->GIni.GP[0];
+
X /* May be a normal situation in a server with a slow network */
- SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX1) ;
+ SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX1);
+
+ /*
+ * workaround: if in half duplex mode, check for tx hangup.
+ * Read number of TX'ed bytes, wait for 10 ms, then compare
+ * the number with current value. If nothing changed, we
+ * assume that tx is hanging and do a FIFO flush (see event
+ * routine).
+ */
+ if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
+ pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) &&
+ !pPrt->HalfDupTimerActive) {
+ /*
+ * many more pack. arb. timeouts may come in between,
+ * we ignore those
+ */
+ pPrt->HalfDupTimerActive = SK_TRUE;
+


+ Len = sizeof(SK_U64);
+ SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *) &Octets,

+ &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(pAC, 0),
+ pAC->Rlmt.Port[0].Net->NetNumber);
+ pPrt->LastOctets = Octets;
+ Para.Para32[0] = 0;
+ SkTimerStart(pAC, IoC,
+ &pPrt->HalfDupChkTimer,
+ SK_HALFDUP_CHK_TIME,
+ SKGE_HWAC,
+ SK_HWEV_HALFDUP_CHK,
+ Para);
+ }
X }
X
X if (Istatus & IS_PA_TO_TX2) {
+ unsigned int Len;
+ SK_U64 Octets;
+ SK_GEPORT *pPrt = &pAC->GIni.GP[1];
+
X /* May be a normal situation in a server with a slow network */
- SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX2) ;
+ SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX2);
+
+ /*
+ * workaround: see above
+ */
+ if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
+ pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) &&
+ !pPrt->HalfDupTimerActive) {
+ pPrt->HalfDupTimerActive = SK_TRUE;
+


+ Len = sizeof(SK_U64);
+ SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *) &Octets,

+ &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(pAC, 1),
+ pAC->Rlmt.Port[1].Net->NetNumber);
+ pPrt->LastOctets = Octets;


+ Para.Para32[0] = 1;

+ SkTimerStart(pAC, IoC,
+ &pPrt->HalfDupChkTimer,
+ SK_HALFDUP_CHK_TIME,
+ SKGE_HWAC,
+ SK_HWEV_HALFDUP_CHK,
+ Para);


+ }
X }
X
X /*

@@ -708,9 +837,9 @@
X */
X if (Istatus & IS_R1_C) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_C) ;
+ SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_C);
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E006,
- SKERR_SIRQ_E006MSG) ;
+ SKERR_SIRQ_E006MSG);
X Para.Para64 = MAC_1;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_1;
@@ -719,9 +848,9 @@
X
X if (Istatus & IS_R2_C) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_C) ;
+ SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_C);
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E007,
- SKERR_SIRQ_E007MSG) ;
+ SKERR_SIRQ_E007MSG);
X Para.Para64 = MAC_2;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_2;
@@ -730,9 +859,9 @@
X
X if (Istatus & IS_XS1_C) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_XS1_CSR, CSR_IRQ_CL_C) ;
+ SK_OUT32(IoC, B0_XS1_CSR, CSR_IRQ_CL_C);
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E008,
- SKERR_SIRQ_E008MSG) ;
+ SKERR_SIRQ_E008MSG);
X Para.Para64 = MAC_1;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_1;
@@ -741,9 +870,9 @@
X
X if (Istatus & IS_XA1_C) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_XA1_CSR, CSR_IRQ_CL_C) ;
+ SK_OUT32(IoC, B0_XA1_CSR, CSR_IRQ_CL_C);
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E009,
- SKERR_SIRQ_E009MSG) ;
+ SKERR_SIRQ_E009MSG);
X Para.Para64 = MAC_1;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_1;
@@ -752,9 +881,9 @@
X
X if (Istatus & IS_XS2_C) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_XS2_CSR, CSR_IRQ_CL_C) ;
+ SK_OUT32(IoC, B0_XS2_CSR, CSR_IRQ_CL_C);
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E010,
- SKERR_SIRQ_E010MSG) ;
+ SKERR_SIRQ_E010MSG);
X Para.Para64 = MAC_2;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_2;
@@ -763,9 +892,9 @@
X
X if (Istatus & IS_XA2_C) {
X /* Clear IRQ */
- SK_OUT32(IoC, B0_XA2_CSR, CSR_IRQ_CL_C) ;
+ SK_OUT32(IoC, B0_XA2_CSR, CSR_IRQ_CL_C);
X SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E011,
- SKERR_SIRQ_E011MSG) ;
+ SKERR_SIRQ_E011MSG);
X Para.Para64 = MAC_2;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X Para.Para32[0] = MAC_2;
@@ -773,55 +902,59 @@
X }
X
X /*
- * I2C Ready interrupt
+ * External reg interrupt.
X */
- if (Istatus & IS_I2C_READY) {
+ if (Istatus & IS_EXT_REG) {
X SK_U16 PhyInt;
X SK_U16 PhyIMsk;
- SK_BOOL IsPhyInt = SK_FALSE;
- int i;
- /* test IRQs from PHY */


- for (i=0; i<pAC->GIni.GIMacsFound; i++) {

- switch (pAC->GIni.GP[i].PhyType) {
+ int i;


+ SK_GEPORT *pPrt; /* GIni Port struct pointer */
+

+ /* Test IRQs from PHY. */
+ for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
+ pPrt = &pAC->GIni.GP[i];
+ switch (pPrt->PhyType) {
X case SK_PHY_XMAC:
X break;
X case SK_PHY_BCOM:
- if(pAC->GIni.GP[i].PState) {
- PHY_READ(IoC, &pAC->GIni.GP[i], i,
- PHY_BCOM_INT_STAT, &PhyInt);
- PHY_READ(IoC, &pAC->GIni.GP[i], i,
- PHY_BCOM_INT_MASK, &PhyIMsk);
+ if (pPrt->PState) {
+ PHY_READ(IoC, pPrt, i, PHY_BCOM_INT_STAT, &PhyInt);
+ PHY_READ(IoC, pPrt, i, PHY_BCOM_INT_MASK, &PhyIMsk);
+
+#ifdef xDEBUG
+ if (PhyInt & PhyIMsk) {


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "SirqIsr - Stat: %x",
+ (void *)PhyInt,
+ (void *)NULL);
+ }
+#endif /* DEBUG */
X
- if (PhyInt & (~PhyIMsk)) {
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,
+ if (PhyInt & ~PhyIMsk) {
+ SK_DBG_MSG(
+ pAC,
+ SK_DBGMOD_HWM,
X SK_DBGCAT_IRQ,
- ("Port %d Bcom Int: %x "
- " Mask: %x\n",
- i, PhyInt, PhyIMsk));
- SkPhyIsrBcom(pAC, IoC, i,
- (SK_U16)
- (PhyInt & (~PhyIMsk)));
- IsPhyInt = SK_TRUE;
+ ("Port %d Bcom Int: %x Mask: %x\n",
+ i, PhyInt, PhyIMsk));
+ SkPhyIsrBcom(pAC, IoC, i, PhyInt);


X }
X }
- else {
- }

X break;
X case SK_PHY_LONE:

- PHY_READ(IoC, &pAC->GIni.GP[i], i,
- PHY_LONE_INT_STAT, &PhyInt);
- PHY_READ(IoC, &pAC->GIni.GP[i], i,
- PHY_LONE_INT_ENAB, &PhyIMsk);
+ PHY_READ(IoC, pPrt, i, PHY_LONE_INT_STAT, &PhyInt);
+ PHY_READ(IoC, pPrt, i, PHY_LONE_INT_ENAB, &PhyIMsk);
X
X if (PhyInt & PhyIMsk) {
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,
+ SK_DBG_MSG(
+ pAC,
+ SK_DBGMOD_HWM,
X SK_DBGCAT_IRQ,
- ("Port %d Lone Int: %x "
- " Mask: %x\n",
+ ("Port %d Lone Int: %x Mask: %x\n",
X i, PhyInt, PhyIMsk));
- SkPhyIsrLone(pAC, IoC, i,
- (SK_U16) (PhyInt & PhyIMsk));
- IsPhyInt = SK_TRUE;
+ SkPhyIsrLone(pAC, IoC, i, PhyInt);
X }


X break;
X case SK_PHY_NAT:

@@ -829,9 +962,13 @@
X break;
X }
X }
- if (!IsPhyInt) {
- SkI2cIsr(pAC, IoC);
- }
+ }
+
+ /*
+ * I2C Ready interrupt
+ */
+ if (Istatus & IS_I2C_READY) {
+ SkI2cIsr(pAC, IoC);
X }
X
X if (Istatus & IS_LNK_SYNC_M1) {
@@ -840,12 +977,12 @@
X * us only a link going down.
X */
X /* clear interrupt */
- SK_OUT8(IoC, MR_ADDR(MAC_1,LNK_SYNC_CTRL), LED_CLR_IRQ);
+ SK_OUT8(IoC, MR_ADDR(MAC_1, LNK_SYNC_CTRL), LED_CLR_IRQ);
X }
X
X /* Check MAC after link sync counter */
X if (Istatus & IS_MAC1) {
- XM_IN16(IoC, MAC_1, XM_ISRC, &XmIsr) ;
+ XM_IN16(IoC, MAC_1, XM_ISRC, &XmIsr);
X SkXmIrq(pAC, IoC, MAC_1, XmIsr);
X }
X
@@ -860,7 +997,7 @@
X
X /* Check MAC after link sync counter */
X if (Istatus & IS_MAC2) {
- XM_IN16(IoC, MAC_2, XM_ISRC, &XmIsr) ;
+ XM_IN16(IoC, MAC_2, XM_ISRC, &XmIsr);
X SkXmIrq(pAC, IoC, MAC_2, XmIsr);
X }
X
@@ -871,20 +1008,9 @@
X if (Istatus & IS_TIMINT) {
X SkHwtIsr(pAC, IoC);
X }
-}
+} /* SkGeSirqIsr */
+
X
-/*
- * Define an array of RX counter which are checked
- * in AutoSense mode to check whether a link is not able to autonegotiate.
- */
-static const SK_U32 SkGeRxOids[]= {
- OID_SKGE_STAT_RX_64,
- OID_SKGE_STAT_RX_127,
- OID_SKGE_STAT_RX_255,
- OID_SKGE_STAT_RX_511,
- OID_SKGE_STAT_RX_1023,
- OID_SKGE_STAT_RX_MAX,
-} ;
X /******************************************************************************
X *
X * SkGePortCheckShorts - Implementing of the Workaround Errata # 2
@@ -894,19 +1020,19 @@
X * 1 Restart needed on this port
X */
X int SkGePortCheckShorts(


-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* IO Context */
-int Port) /* Which port should be checked */
+int Port) /* Which port should be checked */
X {

- SK_U64 Shorts; /* Short Event Counter */
+ SK_U64 Shorts; /* Short Event Counter */
X SK_U64 CheckShorts; /* Check value for Short Event Counter */
- SK_U64 RxCts; /* RX Counter (packets on network) */
- SK_U64 RxTmp; /* RX temp. Counter */
- SK_U64 FcsErrCts; /* FCS Error Counter */
- SK_GEPORT *pPrt; /* GIni Port struct pointer */
- unsigned int Len;
- int Rtv; /* Return value */
- int i;
+ SK_U64 RxCts; /* RX Counter (packets on network) */
+ SK_U64 RxTmp; /* RX temp. Counter */
+ SK_U64 FcsErrCts; /* FCS Error Counter */


+ SK_GEPORT *pPrt; /* GIni Port struct pointer */

+ unsigned Len;
+ int Rtv; /* Return value */
+ int i;
X

X pPrt = &pAC->GIni.GP[Port];
X

@@ -917,8 +1043,9 @@
X * Extra precaution: check for short Event counter
X */
X Len = sizeof(SK_U64);
- SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_SHORTS, (char *) &Shorts,
- &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(Port));
+ SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_SHORTS, (char *)&Shorts,


+ &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),
+ pAC->Rlmt.Port[Port].Net->NetNumber);

X
X /*
X * Read RX counter (packets seen on the network and not neccesarily
@@ -927,9 +1054,10 @@
X Len = sizeof(SK_U64);
X RxCts = 0;
X
- for (i = 0; i < sizeof(SkGeRxOids)/sizeof(SK_U32) ; i++) {
- SkPnmiGetVar(pAC, IoC, SkGeRxOids[i], (char *) &RxTmp,
- &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(Port));
+ for (i = 0; i < sizeof(SkGeRxOids)/sizeof(SK_U32); i++) {
+ SkPnmiGetVar(pAC, IoC, SkGeRxOids[i], (char *)&RxTmp,


+ &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),
+ pAC->Rlmt.Port[Port].Net->NetNumber);

X RxCts += RxTmp;
X }
X
@@ -944,19 +1072,20 @@
X * Reset Link Restart counter
X */
X pPrt->PLinkResCt = 0;
+ pPrt->PAutoNegTOCt = 0;
X
X /* If link is up check for 2 */
X CheckShorts = 2;
X
X Len = sizeof(SK_U64);
X SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_FCS,
- (char *) &FcsErrCts, &Len,
- (SK_U32) SK_PNMI_PORT_PHYS2INST(Port));
+ (char *)&FcsErrCts, &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),


+ pAC->Rlmt.Port[Port].Net->NetNumber);

X

X if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&

X pPrt->PLipaAutoNeg == SK_LIPA_UNKNOWN &&
X (pPrt->PLinkMode == SK_LMODE_HALF ||
- pPrt->PLinkMode == SK_LMODE_FULL)) {
+ pPrt->PLinkMode == SK_LMODE_FULL)) {
X /*
X * This is autosensing and we are in the fallback
X * manual full/half duplex mode.
@@ -968,8 +1097,9 @@
X */
X pPrt->PPrevFcs = FcsErrCts;
X pPrt->PPrevShorts = Shorts;
- return(SK_HW_PS_RESTART);
- } else {


+ return (SK_HW_PS_RESTART);
+ }
+ else {

X pPrt->PLipaAutoNeg = SK_LIPA_MANUAL;
X }
X }
@@ -977,20 +1107,18 @@
X if (((RxCts - pPrt->PPrevRx) > pPrt->PRxLim) ||
X (!(FcsErrCts - pPrt->PPrevFcs))) {
X /*
- * Note: The compare with zero above has to be done
- * the way shown, otherwise the Linux driver will
- * have a problem.
+ * Note: The compare with zero above has to be done the way shown,
+ * otherwise the Linux driver will have a problem.
X */
X /*
- * we received a bunch of frames or no
- * CRC error occured on the network ->
- * ok.
+ * We received a bunch of frames or no CRC error occurred on the
+ * network -> ok.
X */
X pPrt->PPrevRx = RxCts;
X pPrt->PPrevFcs = FcsErrCts;
X pPrt->PPrevShorts = Shorts;
X

- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }
X

X pPrt->PPrevFcs = FcsErrCts;
@@ -998,7 +1126,7 @@
X
X
X if ((Shorts - pPrt->PPrevShorts) > CheckShorts) {


- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,

X ("Short Event Count Restart Port %d \n", Port));
X Rtv = SK_HW_PS_RESTART;
X }
@@ -1006,13 +1134,13 @@
X pPrt->PPrevShorts = Shorts;
X pPrt->PPrevRx = RxCts;
X
- return(Rtv);
-}
+ return (Rtv);
+} /* SkGePortCheckShorts*/
X

X
X /******************************************************************************
X *

- * SkGePortCheckUp - Implementing of the Workaround Errata # 2
+ * SkGePortCheckUp - Implementation of the Workaround for Errata #2
X *
X * return:
X * 0 o.k. nothing needed
@@ -1020,15 +1148,11 @@


X * 2 Link came up
X */

X int SkGePortCheckUp(


-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* IO Context */
-int Port) /* Which port should be checked */

+int Port) /* Which port should be checked */
X {
- SK_GEPORT *pPrt; /* GIni Port struct pointer */
-


- pPrt = &pAC->GIni.GP[Port];
-
- switch (pPrt->PhyType) {
+ switch (pAC->GIni.GP[Port].PhyType) {
X case SK_PHY_XMAC:

X return (SkGePortCheckUpXmac(pAC, IoC, Port));
X case SK_PHY_BCOM:
@@ -1038,9 +1162,8 @@
X case SK_PHY_NAT:
X return (SkGePortCheckUpNat(pAC, IoC, Port));
X }
-

- return(SK_HW_PS_NONE) ;
-}
+ return (SK_HW_PS_NONE);

+} /* SkGePortCheckUp */
X
X
X /******************************************************************************
@@ -1053,75 +1176,69 @@


X * 2 Link came up

X */
X static int SkGePortCheckUpXmac(


-SK_AC *pAC, /* Adapters context */
+SK_AC *pAC, /* Adapter Context */
X SK_IOC IoC, /* IO Context */
-int Port) /* Which port should be checked */
+int Port) /* Which port should be checked */
X {

+ SK_U64 Shorts; /* Short Event Counter */


X SK_GEPORT *pPrt; /* GIni Port struct pointer */
- SK_BOOL AutoNeg; /* Is Autonegotiation used ? */

- SK_U16 Isrc; /* Interrupt source register */
+ unsigned Len;
+ int Done;
X SK_U32 GpReg; /* General Purpose register value */
+ SK_U16 Isrc; /* Interrupt source register */
X SK_U16 IsrcSum; /* Interrupt source register sum */
X SK_U16 LpAb; /* Link Partner Ability */
X SK_U16 ResAb; /* Resolved Ability */
- SK_U64 Shorts; /* Short Event Counter */
- unsigned int Len;


- SK_U8 NextMode; /* Next AutoSensing Mode */
X SK_U16 ExtStat; /* Extended Status Register */

- int Done;
+ SK_BOOL AutoNeg; /* Is Autonegotiation used ? */
+ SK_U8 NextMode; /* Next AutoSensing Mode */

X
X pPrt = &pAC->GIni.GP[Port];
X

X if (pPrt->PHWLinkUp) {
X if (pPrt->PhyType != SK_PHY_XMAC) {


- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }

X else {
- return(SkGePortCheckShorts(pAC, IoC, Port)) ;
+ return (SkGePortCheckShorts(pAC, IoC, Port));
X }
X }
X
X IsrcSum = pPrt->PIsave;
X pPrt->PIsave = 0;
X
- /* Now wait for each ports link */
+ /* Now wait for each port's link. */


X if (pPrt->PLinkMode == SK_LMODE_HALF ||
X pPrt->PLinkMode == SK_LMODE_FULL) {
X AutoNeg = SK_FALSE;

- } else {
+ }
+ else {

X AutoNeg = SK_TRUE;
X }
X
X if (pPrt->PLinkBroken) {
X /* Link was broken */
- XM_IN32(IoC,Port,XM_GP_PORT, &GpReg) ;
+ XM_IN32(IoC,Port,XM_GP_PORT, &GpReg);
X
X if ((GpReg & XM_GP_INP_ASS) == 0) {
X /* The Link is in sync */
- XM_IN16(IoC,Port,XM_ISRC, &Isrc) ;
+ XM_IN16(IoC,Port,XM_ISRC, &Isrc);
X IsrcSum |= Isrc;
X SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum);
X if ((Isrc & XM_IS_INP_ASS) == 0) {
X /* It has been in sync since last Time */
X /* Restart the PORT */
-
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,
- ("Link in sync Restart Port %d\n",
- Port));
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
+ ("Link in sync Restart Port %d\n", Port));
X
- /*
- * We now need to reinitialize the PrevSHorts
- * counter.
- */
+ /* We now need to reinitialize the PrevShorts counter. */
X Len = sizeof(SK_U64);
- SkPnmiGetVar(pAC, IoC,
- OID_SKGE_STAT_RX_SHORTS,
- (char *) &Shorts,
- &Len,
- (SK_U32) SK_PNMI_PORT_PHYS2INST(Port));
+ SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_SHORTS, (char *)&Shorts,


+ &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),
+ pAC->Rlmt.Port[Port].Net->NetNumber);

X pPrt->PPrevShorts = Shorts;
X
- pAC->GIni.GP[Port].PLinkBroken = SK_FALSE ;
+ pAC->GIni.GP[Port].PLinkBroken = SK_FALSE;
X
X /*
X * Link Restart Workaround:
@@ -1136,61 +1253,60 @@
X pAC->GIni.GP[Port].PLinkResCt ++;
X pPrt->PAutoNegTimeOut = 0;
X
- if (pAC->GIni.GP[Port].PLinkResCt <
- SK_MAX_LRESTART) {
- return(SK_HW_PS_RESTART) ;
+ if (pAC->GIni.GP[Port].PLinkResCt < SK_MAX_LRESTART) {
+ return (SK_HW_PS_RESTART);
X }
X
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("Do NOT restart on Port %d %x %x\n",
- Port, Isrc, IsrcSum));
+ ("Do NOT restart on Port %d %x %x\n", Port, Isrc, IsrcSum));
X pAC->GIni.GP[Port].PLinkResCt = 0;
- } else {
- pPrt->PIsave = (SK_U16) (IsrcSum & (XM_IS_AND));
+ }
+ else {
+ pPrt->PIsave = (SK_U16)(IsrcSum & (XM_IS_AND));
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("Save Sync/nosync Port %d %x %x\n",
- Port, Isrc, IsrcSum));
+ ("Save Sync/nosync Port %d %x %x\n", Port, Isrc, IsrcSum));
+
X /* Do nothing more if link is broken */


- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);

X }
- } else {
+ }
+ else {

X /* Do nothing more if link is broken */


- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }

X
- } else {
+ }
+ else {

X /* Link was not broken, check if it is */
- XM_IN16(IoC,Port,XM_ISRC, &Isrc) ;


+ XM_IN16(IoC, Port, XM_ISRC, &Isrc);

X IsrcSum |= Isrc;
X if ((Isrc & XM_IS_INP_ASS) == XM_IS_INP_ASS) {
- XM_IN16(IoC,Port,XM_ISRC, &Isrc) ;


+ XM_IN16(IoC, Port, XM_ISRC, &Isrc);

X IsrcSum |= Isrc;
X if ((Isrc & XM_IS_INP_ASS) == XM_IS_INP_ASS) {
- XM_IN16(IoC,Port,XM_ISRC, &Isrc) ;


+ XM_IN16(IoC, Port, XM_ISRC, &Isrc);

X IsrcSum |= Isrc;
X if ((Isrc & XM_IS_INP_ASS) == XM_IS_INP_ASS) {
- pPrt->PLinkBroken = SK_TRUE ;
+ pPrt->PLinkBroken = SK_TRUE;
X /*
X * Re-Init Link partner Autoneg flag
X */
X pPrt->PLipaAutoNeg = SK_LIPA_UNKNOWN;
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,
- SK_DBGCAT_IRQ,
- ("Link broken Port %d\n",
- Port));
+ SK_DBG_MSG(pAC,SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
+ ("Link broken Port %d\n", Port));
X
- /* cable removed-> reinit Sensemode */
- /* Init default sense mode */
+ /* Cable removed-> reinit sense mode. */
+ /* Init default sense mode. */
X SkHWInitDefSense(pAC, IoC, Port);


X
- return(SK_HW_PS_RESTART) ;
+ return (SK_HW_PS_RESTART);
X }

X }
- } else {
+ }
+ else {

X SkXmAutoNegLipaXmac(pAC, IoC, Port, Isrc);
- if (SkGePortCheckShorts(pAC, IoC, Port) ==
- SK_HW_PS_RESTART) {
- return(SK_HW_PS_RESTART) ;
+ if (SkGePortCheckShorts(pAC, IoC, Port) == SK_HW_PS_RESTART) {
+ return (SK_HW_PS_RESTART);
X }
X }
X }
@@ -1199,18 +1315,15 @@


X * here we usually can check whether the link is in sync and
X * autonegotiation is done.
X */

- XM_IN32(IoC,Port,XM_GP_PORT, &GpReg) ;
- XM_IN16(IoC,Port,XM_ISRC, &Isrc) ;
+ XM_IN32(IoC, Port, XM_GP_PORT, &GpReg);


+ XM_IN16(IoC, Port, XM_ISRC, &Isrc);

X IsrcSum |= Isrc;
X
X SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum);
X if ((GpReg & XM_GP_INP_ASS) != 0 || (IsrcSum & XM_IS_INP_ASS) != 0) {
X if ((GpReg & XM_GP_INP_ASS) == 0) {
- /*
- * Save Autonegotiation Done interrupt only if link
- * is in sync
- */
- pPrt->PIsave = (SK_U16) (IsrcSum & (XM_IS_AND));
+ /* Save Autonegotiation Done interrupt only if link is in sync. */
+ pPrt->PIsave = (SK_U16)(IsrcSum & (XM_IS_AND));
X }
X #ifdef DEBUG
X if (pPrt->PIsave & (XM_IS_AND)) {
@@ -1218,44 +1331,40 @@


X ("AutoNeg done rescheduled Port %d\n", Port));
X }
X #endif
- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }
X
X if (AutoNeg) {

X if (IsrcSum & XM_IS_AND) {


- SkHWLinkUp(pAC, IoC, Port) ;
+ SkHWLinkUp(pAC, IoC, Port);
X Done = SkXmAutoNegDone(pAC,IoC,Port);
X if (Done != SK_AND_OK) {

X /* Get PHY parameters, for debuging only */
- PHY_READ(IoC, pPrt, Port, PHY_XMAC_AUNE_LP,
- &LpAb);
- PHY_READ(IoC, pPrt, Port, PHY_XMAC_RES_ABI,
- &ResAb);
+ PHY_READ(IoC, pPrt, Port, PHY_XMAC_AUNE_LP, &LpAb);
+ PHY_READ(IoC, pPrt, Port, PHY_XMAC_RES_ABI, &ResAb);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
X ("AutoNeg FAIL Port %d (LpAb %x, ResAb %x)\n",
X Port, LpAb, ResAb));


X
X /* Try next possible mode */
X NextMode = SkHWSenseGetNext(pAC, IoC, Port);
- SkHWLinkDown(pAC, IoC, Port) ;
+ SkHWLinkDown(pAC, IoC, Port);
X if (Done == SK_AND_DUP_CAP) {
X /* GoTo next mode */
- SkHWSenseSetNext(pAC, IoC, Port,
- NextMode);
+ SkHWSenseSetNext(pAC, IoC, Port, NextMode);
X }
X
- return(SK_HW_PS_RESTART) ;

-
- } else {
+ return (SK_HW_PS_RESTART);


+ }
+ else {
X /*

- * Dummy Read extended status to prevent


- * extra link down/ups

+ * Dummy Read extended status to prevent extra link down/ups
X * (clear Page Received bit if set)
X */
X PHY_READ(IoC, pPrt, Port, PHY_XMAC_AUNE_EXP, &ExtStat);
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,


X ("AutoNeg done Port %d\n", Port));
- return(SK_HW_PS_LINK) ;
+ return (SK_HW_PS_LINK);
X }
X }
X

@@ -1265,7 +1374,12 @@


X pPrt->PAutoNegTimeOut ++;
X if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) {
X /*
- * Timeout occured.

+ * Increase the Timeout counter.
+ */
+ pPrt->PAutoNegTOCt ++;
+
+ /*


+ * Timeout occurred.
X * What do we need now?
X */
X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,

@@ -1275,42 +1389,57 @@


X if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
X pPrt->PLipaAutoNeg != SK_LIPA_AUTO) {
X /*
- * Timeout occured
+ * Timeout occurred
X * Set Link manually up.
X */

- SkHWSenseSetNext(pAC, IoC, Port,
- SK_LMODE_FULL);
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,
- SK_DBGCAT_IRQ,
- ("Set manual full duplex Port %d\n",
- Port));
+ SkHWSenseSetNext(pAC, IoC, Port, SK_LMODE_FULL);
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
+ ("Set manual full duplex Port %d\n", Port));
+ }
+
+ if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
+ pPrt->PLipaAutoNeg == SK_LIPA_AUTO &&
+ pPrt->PAutoNegTOCt >= SK_MAX_ANEG_TO) {
+ /*
+ * This is rather complicated.
+ * we need to check here whether the LIPA_AUTO
+ * we saw before is false alert. We saw at one
+ * switch ( SR8800) that on boot time it sends
+ * just one autoneg packet and does no further
+ * autonegotiation.
+ * Solution: we restart the autosensing after
+ * a few timeouts.
+ */
+ pPrt->PAutoNegTOCt = 0;
+ pPrt->PLipaAutoNeg = SK_LIPA_UNKNOWN;
+ SkHWInitDefSense(pAC, IoC, Port);
X }
X
X /*


X * Do the restart
X */
- return(SK_HW_PS_RESTART) ;
+ return (SK_HW_PS_RESTART);

X }
- } else {
+ }
+ else {

X /*
X * Link is up and we don't need more.
X */

X #ifdef DEBUG


X if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
- ("ERROR: Lipa auto detected on port %d\n",
- Port));
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
+ ("ERROR: Lipa auto detected on port %d\n", Port));
X }
X #endif
X

X SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ,


X ("Link sync(GP), Port %d\n", Port));
- SkHWLinkUp(pAC, IoC, Port) ;
- return(SK_HW_PS_LINK) ;
+ SkHWLinkUp(pAC, IoC, Port);
+ return (SK_HW_PS_LINK);
X }
X
- return(SK_HW_PS_NONE) ;
-}
+ return (SK_HW_PS_NONE);

+} /* SkGePortCheckUpXmac */
X
X
X /******************************************************************************
@@ -1323,44 +1452,216 @@


X * 2 Link came up

X */
X static int SkGePortCheckUpBcom(
-SK_AC *pAC, /* Adapters context */
-SK_IOC IoC, /* IO Context */
-int Port) /* Which port should be checked */


+SK_AC *pAC, /* Adapter Context */

+SK_IOC IoC, /* IO Context */
+int Port) /* Which port should be checked */
X {


X SK_GEPORT *pPrt; /* GIni Port struct pointer */
- SK_BOOL AutoNeg; /* Is Autonegotiation used ? */
+ int Done;
X SK_U16 Isrc; /* Interrupt source register */

- SK_U16 LpAb; /* Link Partner Ability */
- SK_U16 ExtStat; /* Extended Status Register */


X SK_U16 PhyStat; /* Phy Status Register */

- int Done;
- SK_U16 ResAb;
+ SK_U16 ResAb; /* Master/Slave resolution */
+ SK_U16 Ctrl; /* Broadcom control flags */
+#ifdef DEBUG
+ SK_U16 LpAb;
+ SK_U16 ExtStat;
+#endif /* DEBUG */
+ SK_BOOL AutoNeg; /* Is Autonegotiation used ? */


X
X pPrt = &pAC->GIni.GP[Port];

+
+ /* Check for No HCD Link events (#10523) */
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, &Isrc);
+
+#ifdef xDEBUG
+ if ((Isrc & ~0x1800) == 0x70) {
+ SK_U32 Stat1, Stat2, Stat3;
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_INT_MASK, &Stat1);


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "CheckUp1 - Stat: %x, Mask: %x",
+ (void *)Isrc,
+ (void *)Stat1);
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_CTRL, &Stat1);
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_STAT, &Stat2);
+ Stat1 = Stat1 << 16 | Stat2;
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_ADV, &Stat2);
+ Stat3 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_LP, &Stat3);
+ Stat2 = Stat2 << 16 | Stat3;


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "Ctrl/Stat: %x, AN Adv/LP: %x",
+ (void *)Stat1,
+ (void *)Stat2);
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_EXP, &Stat1);
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_EXT_STAT, &Stat2);
+ Stat1 = Stat1 << 16 | Stat2;
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_CTRL, &Stat2);
+ Stat3 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_STAT, &Stat3);
+ Stat2 = Stat2 << 16 | Stat3;


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "AN Exp/IEEE Ext: %x, 1000T Ctrl/Stat: %x",
+ (void *)Stat1,
+ (void *)Stat2);
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, &Stat1);
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_STAT, &Stat2);
+ Stat1 = Stat1 << 16 | Stat2;
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_CTRL, &Stat2);
+ Stat3 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_STAT, &Stat3);
+ Stat2 = Stat2 << 16 | Stat3;


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "PHY Ext Ctrl/Stat: %x, Aux Ctrl/Stat: %x",
+ (void *)Stat1,
+ (void *)Stat2);
+ }


+#endif /* DEBUG */
+

+ if ((Isrc & (PHY_B_IS_NO_HDCL /* | PHY_B_IS_NO_HDC */)) != 0) {
+ /*
+ * Workaround BCOM Errata:
+ * enable and disable loopback mode if "NO HCD" occurs.
+ */
+ PHY_READ(IoC, pPrt, Port, PHY_BCOM_CTRL, &Ctrl);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Ctrl | PHY_CT_LOOP);
+ PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Ctrl & ~PHY_CT_LOOP);
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
+ ("No HCD Link event, Port %d\n", Port));
+#ifdef xDEBUG


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "No HCD link event, port %d.",
+ (void *)Port,
+ (void *)NULL);
+#endif /* DEBUG */
+ }
+
+ /* Not obsolete: link status bit is latched to 0 and autoclearing! */
X PHY_READ(IoC, pPrt, Port, PHY_BCOM_STAT, &PhyStat);


X
X if (pPrt->PHWLinkUp) {
- return(SK_HW_PS_NONE) ;
+ return (SK_HW_PS_NONE);
X }
X

- pPrt->PIsave = 0;
+#ifdef xDEBUG
+ {
+ SK_U32 Stat1, Stat2, Stat3;
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_INT_MASK, &Stat1);


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "CheckUp1a - Stat: %x, Mask: %x",
+ (void *)Isrc,
+ (void *)Stat1);
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_CTRL, &Stat1);
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_STAT, &PhyStat);
+ Stat1 = Stat1 << 16 | PhyStat;
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_ADV, &Stat2);
+ Stat3 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_LP, &Stat3);
+ Stat2 = Stat2 << 16 | Stat3;


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "Ctrl/Stat: %x, AN Adv/LP: %x",
+ (void *)Stat1,
+ (void *)Stat2);
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_EXP, &Stat1);
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_EXT_STAT, &Stat2);
+ Stat1 = Stat1 << 16 | Stat2;
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_CTRL, &Stat2);
+ Stat3 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb);
+ Stat2 = Stat2 << 16 | ResAb;


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "AN Exp/IEEE Ext: %x, 1000T Ctrl/Stat: %x",
+ (void *)Stat1,
+ (void *)Stat2);
+
+ Stat1 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, &Stat1);
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_STAT, &Stat2);
+ Stat1 = Stat1 << 16 | Stat2;
+ Stat2 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_CTRL, &Stat2);
+ Stat3 = 0;
+ PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_STAT, &Stat3);
+ Stat2 = Stat2 << 16 | Stat3;


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "PHY Ext Ctrl/Stat: %x, Aux Ctrl/Stat: %x",
+ (void *)Stat1,
+ (void *)Stat2);
+ }
+#endif /* DEBUG */
X
- /* Now wait for each port's link */
- if (pPrt->PLinkMode == SK_LMODE_HALF ||
- pPrt->PLinkMode == SK_LMODE_FULL) {
+ /* Now wait for each port's link. */
+ if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
X AutoNeg = SK_FALSE;


- } else {
+ }
+ else {

X AutoNeg = SK_TRUE;
X }
X
X /*
- * here we usually can check whether the link is in sync and
+ * Here we usually can check whether the link is in sync and


X * autonegotiation is done.
X */
- XM_IN16(IoC, Port, XM_ISRC, &Isrc) ;

+#if 0
+/* RA;:;: obsolete */
+ XM_IN16(IoC, Port, XM_ISRC, &Isrc);


+#endif /* 0 */
X

X PHY_READ(IoC, pPrt, Port, PHY_BCOM_STAT, &PhyStat);
X
+#ifdef xDEBUG
+ if ((PhyStat & PHY_ST_LSYNC) >> 2 != (ExtStat & PHY_B_PES_LS) >> 8) {


+ CMSMPrintString(
+ pAC->pConfigTable,
+ MSG_TYPE_RUNTIME_INFO,

+ "PhyStat != ExtStat: %x %x",
+ (void *)PhyStat,
+ (void *)ExtStat);
+ }


+#endif /* DEBUG */
+

X SkXmAutoNegLipaBcom(pAC, IoC, Port, PhyStat);
X
X SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -1368,28 +1669,22 @@
X

X PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb);

X
- if ((PhyStat & PHY_ST_LSYNC) == 0) {


- if (ResAb & (PHY_B_1000S_MSF)) {
- /* Error */
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,

- ("Master/Slave Fault port %d\n", Port));


- pPrt->PAutoNegFail = SK_TRUE;

- pPrt->PMSStatus = SK_MS_STAT_FAULT;
- return (SK_AND_OTHER);
- }

- return (SK_HW_PS_NONE);
- }
-

- if (ResAb & (PHY_B_1000S_MSF)) {

+ if (ResAb & PHY_B_1000S_MSF) {

X /* Error */
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,


X ("Master/Slave Fault port %d\n", Port));
X pPrt->PAutoNegFail = SK_TRUE;

X pPrt->PMSStatus = SK_MS_STAT_FAULT;

- return (SK_AND_OTHER);
- } else if (ResAb & PHY_B_1000S_MSR) {


+ return (SK_HW_PS_RESTART);
+ }
+

+ if ((PhyStat & PHY_ST_LSYNC) == 0) {
+ return (SK_HW_PS_NONE);
+ }
+ else if (ResAb & PHY_B_1000S_MSR) {
X pPrt->PMSStatus = SK_MS_STAT_MASTER;


- } else {
+ }
+ else {

X pPrt->PMSStatus = SK_MS_STAT_SLAVE;
X }
X
@@ -1399,76 +1694,73 @@
X if (AutoNeg) {
X if (PhyStat & PHY_ST_AN_OVER) {
X SkHWLinkUp(pAC, IoC, Port);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 33'
echo 'File patch-2.2.20 is continued in part 34'
echo "34" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:43 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part44

#!/bin/sh -x
# this is part 44 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 44; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- }
X
X /* Save done function into Scsi_Cmnd struct */
X SCpnt->scsi_done = done;
@@ -2093,7 +2348,7 @@
X TW_Command *command_packet;
X u32 command_que_addr, command_que_value = 0;
X u32 lba = 0x0, num_sectors = 0x0;
- int i;
+ int i, count = 0;
X Scsi_Cmnd *srb;
X struct scatterlist *sglist;
X
@@ -2151,29 +2406,52 @@
X command_packet->byte8.io.lba = lba;
X command_packet->byte6.block_count = num_sectors;
X
- /* Do this if there are no sg list entries */
- if (tw_dev->srb[request_id]->use_sg == 0) {
- dprintk(KERN_NOTICE "3w-xxxx: tw_scsiop_read_write(): SG = 0\n");
- command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->srb[request_id]->request_buffer);
- command_packet->byte8.io.sgl[0].length = tw_dev->srb[request_id]->request_bufflen;
- }
-
- /* Do this if we have multiple sg list entries */
- if (tw_dev->srb[request_id]->use_sg > 0) {
- for (i=0;i<tw_dev->srb[request_id]->use_sg; i++) {
- command_packet->byte8.io.sgl[i].address = virt_to_bus(sglist[i].address);
- command_packet->byte8.io.sgl[i].length = sglist[i].length;
- command_packet->size+=2;
+ if ((tw_dev->is_raid_five[tw_dev->srb[request_id]->target] == 0) || (srb->cmnd[0] == READ_6) || (srb->cmnd[0] == READ_10) || (tw_dev->tw_pci_dev->device == TW_DEVICE_ID2)) {
+ /* Do this if there are no sg list entries */
+ if (tw_dev->srb[request_id]->use_sg == 0) {
+ dprintk(KERN_NOTICE "3w-xxxx: tw_scsiop_read_write(): SG = 0\n");
+ command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->srb[request_id]->request_buffer);
+ command_packet->byte8.io.sgl[0].length = tw_dev->srb[request_id]->request_bufflen;
+ }
+
+ /* Do this if we have multiple sg list entries */
+ if (tw_dev->srb[request_id]->use_sg > 0) {
+ for (i=0;i<tw_dev->srb[request_id]->use_sg; i++) {
+ command_packet->byte8.io.sgl[i].address = virt_to_bus(sglist[i].address);
+ command_packet->byte8.io.sgl[i].length = sglist[i].length;
+ command_packet->size+=2;
+ }
+ if (tw_dev->srb[request_id]->use_sg >= 1)
+ command_packet->size-=2;
+ }
+ } else {
+ /* Do this if there are no sg list entries for raid 5 */
+ if (tw_dev->srb[request_id]->use_sg == 0) {
+ dprintk(KERN_WARNING "doing raid 5 write use_sg = 0, bounce_buffer[%d] = 0x%p\n", request_id, tw_dev->bounce_buffer[request_id]);
+ memcpy(tw_dev->bounce_buffer[request_id], tw_dev->srb[request_id]->request_buffer, tw_dev->srb[request_id]->request_bufflen);
+ command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->bounce_buffer[request_id]);
+ command_packet->byte8.io.sgl[0].length = tw_dev->srb[request_id]->request_bufflen;
+ }
+
+ /* Do this if we have multiple sg list entries for raid 5 */
+ if (tw_dev->srb[request_id]->use_sg > 0) {
+ dprintk(KERN_WARNING "doing raid 5 write use_sg = %d, sglist[0].length = %d\n",
+ tw_dev->srb[request_id]->use_sg, sglist[0].length);
+ for (i=0;i<tw_dev->srb[request_id]->use_sg; i++) {
+ memcpy((char *)(tw_dev->bounce_buffer[request_id])+count, sglist[i].address, sglist[i].length);
+ count+=sglist[i].length;
+ }
+ command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->bounce_buffer[request_id]);
+ command_packet->byte8.io.sgl[0].length = count;
+ command_packet->size = 5; /* single sgl */
X }
- if (tw_dev->srb[request_id]->use_sg > 1)
- command_packet->size-=2;
X }
-
+
X /* Update SG statistics */
X tw_dev->sgl_entries = tw_dev->srb[request_id]->use_sg;
X if (tw_dev->sgl_entries > tw_dev->max_sgl_entries)
X tw_dev->max_sgl_entries = tw_dev->sgl_entries;
-
+
X command_que_value = tw_dev->command_packet_physical_address[request_id];
X if (command_que_value == 0) {
X dprintk(KERN_WARNING "3w-xxxx: tw_scsiop_read_write(): Bad command packet physical address.\n");
@@ -2277,10 +2555,11 @@


X /* Poll for completion */
X imax = TW_POLL_MAX_RETRIES;
X for (i=0;i<imax;i++) {
- mdelay(10);
+ mdelay(5);
X status_reg_value = inl(status_reg_addr);
X if (tw_check_bits(status_reg_value)) {

X printk(KERN_WARNING "3w-xxxx: tw_setfeature(): Unexpected bits.\n");


+ tw_decode_bits(tw_dev, status_reg_value);
X return 1;
X }
X if ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/3w-xxxx.h linux/drivers/scsi/3w-xxxx.h
--- v2.2.19/drivers/scsi/3w-xxxx.h Sun Mar 25 17:37:35 2001
+++ linux/drivers/scsi/3w-xxxx.h Fri Nov 2 15:44:31 2001
@@ -69,6 +69,7 @@
X #define TW_CONTROL_ENABLE_INTERRUPTS 0x00000080
X #define TW_CONTROL_DISABLE_INTERRUPTS 0x00000040
X #define TW_CONTROL_ISSUE_HOST_INTERRUPT 0x00000020
+#define TW_CONTROL_CLEAR_PARITY_ERROR 0x00800000
X
X /* Status register bit definitions */
X #define TW_STATUS_MAJOR_VERSION_MASK 0xF0000000
@@ -100,6 +101,7 @@
X #define TW_DEVICE_ID (0x1000) /* Storage Controller */
X #define TW_DEVICE_ID2 (0x1001) /* 7000 series controller */
X #define TW_NUMDEVICES 2
+#define TW_PCI_CLEAR_PARITY_ERRORS 0xc100
X
X /* Command packet opcodes */
X #define TW_OP_NOP 0x0
@@ -122,6 +124,10 @@
X #define TW_AEN_REBUILD_DONE 0x0005
X #define TW_AEN_QUEUE_FULL 0x00ff
X #define TW_AEN_TABLE_UNDEFINED 0x15
+#define TW_AEN_APORT_TIMEOUT 0x0009
+#define TW_AEN_DRIVE_ERROR 0x000A
+#define TW_AEN_SMART_FAIL 0x000F
+#define TW_AEN_SBUF_FAIL 0x0024
X
X /* Misc defines */
X #define TW_ALIGNMENT 0x200 /* 16 D-WORDS */
@@ -129,9 +135,9 @@
X #define TW_COMMAND_ALIGNMENT_MASK 0x1ff
X #define TW_INIT_MESSAGE_CREDITS 0x100
X #define TW_INIT_COMMAND_PACKET_SIZE 0x3
-#define TW_POLL_MAX_RETRIES 10000
+#define TW_POLL_MAX_RETRIES 20000
X #define TW_MAX_SGL_LENGTH 62
-#define TW_Q_LENGTH 256
+#define TW_Q_LENGTH 16
X #define TW_Q_START 0
X #define TW_MAX_SLOT 32
X #define TW_MAX_PCI_BUSES 255
@@ -143,6 +149,7 @@
X #define TW_MAX_AEN_TRIES 100
X #define TW_UNIT_ONLINE 1
X #define TW_IN_INTR 1
+#define TW_AEN_WAIT_TIME 1000


X
X /* Macros */

X #define TW_STATUS_ERRORS(x) \
@@ -264,8 +271,11 @@
X TW_Registers registers;
X u32 *alignment_virtual_address[TW_Q_LENGTH];
X u32 alignment_physical_address[TW_Q_LENGTH];
+ u32 *bounce_buffer[TW_Q_LENGTH];
X int is_unit_present[TW_MAX_UNITS];
+ int is_raid_five[TW_MAX_UNITS];
X int num_units;
+ int num_raid_five;
X u32 *command_packet_virtual_address[TW_Q_LENGTH];
X u32 command_packet_physical_address[TW_Q_LENGTH];
X struct pci_dev *tw_pci_dev;
@@ -288,6 +298,7 @@
X u32 num_resets;
X u32 sector_count;
X u32 max_sector_count;
+ u32 aen_count;
X struct Scsi_Host *host;
X spinlock_t tw_lock;
X unsigned char ioctl_size[TW_Q_LENGTH];
@@ -306,6 +317,8 @@
X int tw_check_errors(TW_Device_Extension *tw_dev);
X void tw_clear_attention_interrupt(TW_Device_Extension *tw_dev);
X void tw_clear_host_interrupt(TW_Device_Extension *tw_dev);
+void tw_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value);
+void tw_decode_error(TW_Device_Extension *tw_dev, unsigned char status, unsigned char flags, unsigned char unit);
X void tw_disable_interrupts(TW_Device_Extension *tw_dev);
X int tw_empty_response_que(TW_Device_Extension *tw_dev);
X void tw_enable_interrupts(TW_Device_Extension *tw_dev);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/NCR53C9x.c linux/drivers/scsi/NCR53C9x.c
--- v2.2.19/drivers/scsi/NCR53C9x.c Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/NCR53C9x.c Wed Oct 10 01:41:09 2001
@@ -2813,7 +2813,7 @@
X /* Target negotiates for synchronous transfers before we do, this
X * is legal although very strange. What is even funnier is that
X * the SCSI2 standard specifically recommends against targets doing
- * this because so many initiators cannot cope with this occuring.
+ * this because so many initiators cannot cope with this occurring.
X */
X static inline int target_with_ants_in_pants(struct NCR_ESP *esp,
X Scsi_Cmnd *SCptr,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/README.ibmmca linux/drivers/scsi/README.ibmmca
--- v2.2.19/drivers/scsi/README.ibmmca Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/README.ibmmca Wed Oct 10 01:41:09 2001
@@ -797,9 +797,9 @@
X commandline parameter is added, called 'activity'.
X 2) Added the READ_CONTROL bit for test_unit_ready SCSI-command.
X 3) Added some suppress_exception bits to read_device_capacity and
- all device_inquiry occurences in the driver code.
+ all device_inquiry occurrences in the driver code.
X 4) Complaints about the various KERNEL_VERSION implementations are
- taken into account. Every local_LinuxKernelVersion occurence is
+ taken into account. Every local_LinuxKernelVersion occurrence is
X now replaced by KERNEL_VERSION, defined in linux/version.h.
X Corresponding changes were applied to ibmmca.h, too. This was a
X contribution to all kernel-parts by Philipp Hahn.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/README.ncr53c8xx linux/drivers/scsi/README.ncr53c8xx
--- v2.2.19/drivers/scsi/README.ncr53c8xx Sun Mar 25 17:31:32 2001
+++ linux/drivers/scsi/README.ncr53c8xx Wed Oct 10 01:41:09 2001
@@ -1350,7 +1350,7 @@
X Bit 0x04 : UDC Undexpected Disconnection
X Indicates that the device released the SCSI BUS when the chip
X was not expecting this to happen. A device may behave so to
- indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occured.
+ indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred.
X Bit 0x02 : RST SCSI BUS Reset
X Generally SCSI targets donnot reset the SCSI BUS, although any
X device on the BUS can reset it at any time.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/README.osst linux/drivers/scsi/README.osst
--- v2.2.19/drivers/scsi/README.osst Sun Mar 25 17:37:35 2001
+++ linux/drivers/scsi/README.osst Wed Oct 10 01:41:10 2001
@@ -1,6 +1,6 @@
X README file for the osst driver
X ===============================
-(w) Kurt Garloff <gar...@suse.de> 11/2000
+(w) Kurt Garloff <gar...@suse.de> 04/2001
X
X This file describes the osst driver as of version 0.8.x/0.9.x, the released
X version of the osst driver.
@@ -45,7 +45,7 @@
X So you could only have either of them being present in the kernel. This has
X been fixed by registering an own device, now.
X st and osst can coexist, each only accessing the devices it can support by
-their own device.
+themselves.
X
X
X Installation
@@ -87,10 +87,11 @@
X supported and you may try the mt (or mt_st) program to jump between
X filemarks, eject the tape, ...
X
-There's one limitation: You need to use a block size of 32kB.
-
-(This limitation is worked on and will be fixed in version 0.8.7 of
- this driver.)
+There's one limitation: You need to use a block size of 512 bytes, 1kB, 2kB,
+4kB, 8kB, 16kB or 32kB. The default block size is 512 bytes. However, your
+backup software can transfer any multiple of the current block size. The
+blocksize can be changed with:
+mt -f /dev/nosst0 defblksize 1024
X
X If you just want to get started with standard software, here is an example
X for creating and restoring a full backup:
@@ -112,13 +113,42 @@
X tar).
X
X
+Interpreting log output
+-----------------------
+Log output of different severity is created by osst. Every message starts
+with "osstX:S:" where X is the tape device (minor number modulo 32), or a
+blank if not applicable, and S is the severity:
+
+:A: Assert, an error that "should not happen". If you get one of these and
+ have not changed anything in osst_options.h, report it to the mail list.
+
+:E: Error, your backup is toast (sorry).
+
+:W: Warning, something happened that endangers your data. Look for other
+ information to see if osst was able to recover.
+
+:I: Information which osst wants you to know. This could be follow-on info
+ on a previously issued warning or error.
+
+:D: Debug output, created when you compile with "#define DEBUG 1".
+
+This output is sent to klogd with corresponding priority. If you don't see
+it in your system log (typically /var/log/messages), check your syslog.conf.
+
+
X USB and IDE
X -----------
X Via the SCSI emulation layers usb-storage and ide-scsi, you can also use the
X osst driver to drive the USB-30 and the DI-30 drives. (Unfortunately, there
X is no such layer for the parallel port, otherwise the DP-30 would work as
-well.) For the USB support, you need the latest 2.4.0-test kernels and the
-latest usb-storage driver from
+well.)
+
+For the DI-30, compile the SCSI layer and ide-scsi into the kernel and pass
+hdX=scsi as boot parameter to your kernel, with hdX corresponding to your
+OnStream device.
+
+For the USB support, you need the usb-sotrage driver of 2.4.0 kernel or
+newer and you have to enable the Freecom support. For news, check
X http://www.linux-usb.org/
X http://sourceforge.net/cvs/?group_id=3581
X
@@ -158,6 +188,11 @@
X have been sent, but mostly reported success or only minor trouble.
X All the issues have been addressed.
X Check the web pages for more info about the current developments.
+0.9.x is the tree for the 2.3/2.4 kernel.
+
+0.8.6.x and 0.9.4.x have been integrated into the mainstream kernels 2.2.19
+and 2.4.0 repsectively. Newer versions with variable block size support will
+be submitted soon.
X
X
X Acknowledgments
@@ -188,7 +223,7 @@
X #!/bin/sh
X # Script to create OnStream SC-x0 device nodes (major 206)
X # Usage: Makedevs.sh [nos [path to dev]]
-# $Id: README.osst.kernel,v 1.1.2.2 2000/12/20 14:08:38 garloff Exp $
+# $Id: README.osst.kernel,v 1.3.2.3 2001/06/02 23:49:03 riede Exp $
X major=206
X nrs=4
X dir=/dev
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/advansys.c linux/drivers/scsi/advansys.c
--- v2.2.19/drivers/scsi/advansys.c Sun Mar 25 17:31:29 2001
+++ linux/drivers/scsi/advansys.c Wed Oct 10 01:41:10 2001
@@ -1,10 +1,10 @@
-#define ASC_VERSION "3.3D" /* AdvanSys Driver Version */
+#define ASC_VERSION "3.3G" /* AdvanSys Driver Version */
X
X /*
X * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters
- *
+ *
X * Copyright (c) 1995-2000 Advanced System Products, Inc.
- * Copyright (c) 2000 ConnectCom Solutions, Inc.
+ * Copyright (c) 2000-2001 ConnectCom Solutions, Inc.
X * All Rights Reserved.
X *
X * Redistribution and use in source and binary forms, with or without
@@ -13,7 +13,7 @@
X * modification.
X *
X * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys)
- * changed its name to name to ConnectCom Solutions, Inc.
+ * changed its name to ConnectCom Solutions, Inc.
X *
X * There is an AdvanSys Linux WWW page at:
X * http://www.connectcom.net/downloads/software/os/linux.html
@@ -24,43 +24,39 @@
X * ftp://ftp.connectcom.net/pub/linux/linux.tgz
X *
X * Please send questions, comments, bug reports to:
- * li...@connectcom.net or bf...@turbolinux.com.cn
+ * sup...@connectcom.net


X */
X
X /*

X
X Documentation for the AdvanSys Driver
X
- A. Linux Kernel Testing
+ A. Linux Kernels Supported by this Driver
X B. Adapters Supported by this Driver
- C. Linux v1.2.X - Directions for Adding the AdvanSys Driver
- D. Linux v1.3.1 - v1.3.57 - Directions for Adding the AdvanSys Driver
- E. Linux v1.3.58 and Newer - Upgrading the AdvanSys Driver
- F. Source Comments
- G. Driver Compile Time Options and Debugging
- H. Driver LILO Option
- I. Release History
- J. Known Problems/Fix List
- K. Credits
- L. ConnectCom (AdvanSys) Contact Information
-
- A. Linux Kernel Testing
-
- This driver has been tested in the following Linux kernels: v2.2.17
- v2.4.0-test9. The driver should also work in earlier versions of the
- Linux kernel. Beginning with v1.3.58 the AdvanSys driver was included
- with all Linux kernels. Please refer to sections C, D, and E for
- instructions on adding or upgrading the AdvanSys driver. The driver is
- supported for x86 and alpha systems.
+ C. Linux source files modified by AdvanSys Driver
+ D. Source Comments
+ E. Driver Compile Time Options and Debugging
+ F. Driver LILO Option
+ G. Tests to run before releasing new driver
+ H. Release History
+ I. Known Problems/Fix List
+ J. Credits (Chronological Order)
+ K. ConnectCom (AdvanSys) Contact Information
+
+ A. Linux Kernels Supported by this Driver
+
+ This driver has been tested in the following Linux kernels: v2.2.18
+ v2.4.0. The driver is supported on v2.2 and v2.4 kernels and on x86,
+ alpha, and PowerPC platforms.
X
X B. Adapters Supported by this Driver
-
+
X AdvanSys (Advanced System Products, Inc.) manufactures the following
X RISC-based, Bus-Mastering, Fast (10 Mhz) and Ultra (20 Mhz) Narrow
X (8-bit transfer) SCSI Host Adapters for the ISA, EISA, VL, and PCI
X buses and RISC-based, Bus-Mastering, Ultra (20 Mhz) Wide (16-bit
X transfer) SCSI Host Adapters for the PCI bus.
-
+
X The CDB counts below indicate the number of SCSI CDB (Command
X Descriptor Block) requests that can be stored in the RISC chip
X cache and board LRAM. A CDB is a single SCSI command. The driver
@@ -86,7 +82,7 @@
X ABP930UA - Bus-Master PCI Ultra (16 CDB)
X ABP960 - Bus-Master PCI MAC/PC (16 CDB)
X ABP960U - Bus-Master PCI MAC/PC Ultra (16 CDB)
-
+
X Single Channel Products:
X ABP542 - Bus-Master ISA with floppy (240 CDB)
X ABP742 - Bus-Master EISA (240 CDB)
@@ -100,7 +96,7 @@
X ABP940UW/3940UW - Bus-Master PCI Ultra-Wide (253 CDB)
X ABP970UW - Bus-Master PCI MAC/PC Ultra-Wide (253 CDB)
X ABP3940U2W - Bus-Master PCI LVD/Ultra2-Wide (253 CDB)
-
+
X Multi-Channel Products:
X ABP752 - Dual Channel Bus-Master EISA (240 CDB Per Channel)
X ABP852 - Dual Channel Bus-Master VL (240 CDB Per Channel)
@@ -111,37 +107,32 @@
X ABP980UA/3980UA - Four Channel Bus-Master PCI Ultra (16 CDB Per Chan.)
X ABP3950U2W - Bus-Master PCI LVD/Ultra2-Wide and Ultra-Wide (253 CDB)
X ABP3950U3W - Bus-Master PCI Dual LVD2/Ultra3-Wide (253 CDB)
-
- C. Linux v1.2.X - Directions for Adding the AdvanSys Driver
X
- These directions apply to v1.2.13. For versions that follow v1.2.13.
- but precede v1.3.57 some of the changes for Linux v1.3.X listed
- below may need to be modified or included. A patch is available
- for v1.2.13 from the AdvanSys WWW and FTP sites.
-
- There are two source files: advansys.h and advansys.c. Copy
- both of these files to the directory /usr/src/linux/drivers/scsi.
-
- 1. Add the following line to /usr/src/linux/arch/i386/config.in
- after "comment 'SCSI low-level drivers'":
-
+ C. Linux source files modified by AdvanSys Driver
+
+ This section for historical purposes documents the changes
+ originally made to the Linux kernel source to add the advansys
+ driver. As Linux has changed some of these files have also
+ been modified.
+
+ 1. linux/arch/i386/config.in:
+
X bool 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS y
-
- 2. Add the following lines to /usr/src/linux/drivers/scsi/hosts.c
- after "#include "hosts.h"":
-
+
+ 2. linux/drivers/scsi/hosts.c:
+
X #ifdef CONFIG_SCSI_ADVANSYS
X #include "advansys.h"
X #endif
-
+
X and after "static Scsi_Host_Template builtin_scsi_hosts[] =":
-
+
X #ifdef CONFIG_SCSI_ADVANSYS
X ADVANSYS,
X #endif
-
- 3. Add the following lines to /usr/src/linux/drivers/scsi/Makefile:
-
+
+ 3. linux/drivers/scsi/Makefile:
+
X ifdef CONFIG_SCSI_ADVANSYS
X SCSI_SRCS := $(SCSI_SRCS) advansys.c
X SCSI_OBJS := $(SCSI_OBJS) advansys.o
@@ -149,12 +140,7 @@
X SCSI_MODULE_OBJS := $(SCSI_MODULE_OBJS) advansys.o
X endif
X
- 4. (Optional) If you would like to enable the LILO command line
- and /etc/lilo.conf 'advansys' option, make the following changes.
- This option can be used to disable I/O port scanning or to limit
- I/O port scanning to specific addresses. Refer to the 'Driver
- LILO Option' section below. Add the following lines to
- /usr/src/linux/init/main.c in the prototype section:
+ 4. linux/init/main.c:
X
X extern void advansys_setup(char *str, int *ints);
X
@@ -164,118 +150,19 @@
X { "advansys=", advansys_setup },
X #endif
X
- 5. If you have the HP 4020i CD-R driver and Linux v1.2.X you should
- add a fix to the CD-ROM target driver. This fix will allow
- you to mount CDs with the iso9660 file system. Linux v1.3.X
- already has this fix. In the file /usr/src/linux/drivers/scsi/sr.c
- and function get_sectorsize() after the line:
-
- if(scsi_CDs[i].sector_size == 0) scsi_CDs[i].sector_size = 2048;
-
- add the following line:
-
- if(scsi_CDs[i].sector_size == 2340) scsi_CDs[i].sector_size = 2048;
-
- 6. In the directory /usr/src/linux run 'make config' to configure
- the AdvanSys driver, then run 'make vmlinux' or 'make zlilo' to
- make the kernel. If the AdvanSys driver is not configured, then
- a loadable module can be built by running 'make modules' and
- 'make modules_install'. Use 'insmod' and 'rmmod' to install
- and remove advansys.o.
-
- D. Linux v1.3.1 - v1.3.57 - Directions for Adding the AdvanSys Driver
-
- These directions apply to v1.3.57. For versions that precede v1.3.57
- some of these changes may need to be modified or eliminated. A patch
- is available for v1.3.57 from the AdvanSys WWW and FTP sites.
- Beginning with v1.3.58 this driver is included with the Linux
- distribution eliminating the need for making any changes.
-
- There are two source files: advansys.h and advansys.c. Copy
- both of these files to the directory /usr/src/linux/drivers/scsi.
-
- 1. Add the following line to /usr/src/linux/drivers/scsi/Config.in
- after "comment 'SCSI low-level drivers'":
-
- dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
-
- 2. Add the following lines to /usr/src/linux/drivers/scsi/hosts.c
- after "#include "hosts.h"":
-
- #ifdef CONFIG_SCSI_ADVANSYS
- #include "advansys.h"
- #endif
-
- and after "static Scsi_Host_Template builtin_scsi_hosts[] =":
-
- #ifdef CONFIG_SCSI_ADVANSYS
- ADVANSYS,
- #endif
-
- 3. Add the following lines to /usr/src/linux/drivers/scsi/Makefile:
-
- ifeq ($(CONFIG_SCSI_ADVANSYS),y)
- L_OBJS += advansys.o
- else
- ifeq ($(CONFIG_SCSI_ADVANSYS),m)
- M_OBJS += advansys.o
- endif
- endif
-
- 4. Add the following line to /usr/src/linux/include/linux/proc_fs.h
- in the enum scsi_directory_inos array:
-
- PROC_SCSI_ADVANSYS,
-
- 5. (Optional) If you would like to enable the LILO command line
- and /etc/lilo.conf 'advansys' option, make the following changes.
- This option can be used to disable I/O port scanning or to limit
- I/O port scanning to specific addresses. Refer to the 'Driver
- LILO Option' section below. Add the following lines to
- /usr/src/linux/init/main.c in the prototype section:
-
- extern void advansys_setup(char *str, int *ints);
-
- and add the following lines to the bootsetups[] array.
-
- #ifdef CONFIG_SCSI_ADVANSYS
- { "advansys=", advansys_setup },
- #endif
-
- 6. In the directory /usr/src/linux run 'make config' to configure
- the AdvanSys driver, then run 'make vmlinux' or 'make zlilo' to
- make the kernel. If the AdvanSys driver is not configured, then
- a loadable module can be built by running 'make modules' and
- 'make modules_install'. Use 'insmod' and 'rmmod' to install
- and remove advansys.o.
-
- E. Linux v1.3.58 and Newer - Upgrading the AdvanSys Driver
-
- To upgrade the AdvanSys driver in a Linux v1.3.58 and newer
- kernel, first check the version of the current driver. The
- version is defined by the manifest constant ASC_VERSION at
- the beginning of advansys.c. The new driver should have a
- ASC_VERSION value greater than the current version. To install
- the new driver rename advansys.c and advansys.h in the Linux
- kernel source tree drivers/scsi directory to different names
- or save them to a different directory in case you want to revert
- to the old version of the driver. After the old driver is saved
- copy the new advansys.c and advansys.h to drivers/scsi, rebuild
- the kernel, and install the new kernel. No other changes are needed.
+ D. Source Comments
X
- F. Source Comments
-
X 1. Use tab stops set to 4 for the source files. For vi use 'se tabstops=4'.
-
+
X 2. This driver should be maintained in multiple files. But to make
X it easier to include with Linux and to follow Linux conventions,
X the whole driver is maintained in the source files advansys.h and
X advansys.c. In this file logical sections of the driver begin with
X a comment that contains '---'. The following are the logical sections
X of the driver below.
-
+
X --- Linux Version
- --- Linux Include Files
+ --- Linux Include File
X --- Driver Options
X --- Debugging Header
X --- Asc Library Constants and Macros
@@ -292,27 +179,27 @@
X --- Tracing and Debugging Functions
X --- Asc Library Functions
X --- Adv Library Functions
-
+
X 3. The string 'XXX' is used to flag code that needs to be re-written
X or that contains a problem that needs to be addressed.
-
+
X 4. I have stripped comments from and reformatted the source for the
X Asc Library and Adv Library to reduce the size of this file. This
X source can be found under the following headings. The Asc Library
X is used to support Narrow Boards. The Adv Library is used to
X support Wide Boards.
-
+
X --- Asc Library Constants and Macros
X --- Adv Library Constants and Macros
X --- Asc Library Functions
X --- Adv Library Functions
-
- G. Driver Compile Time Options and Debugging
-
+
+ E. Driver Compile Time Options and Debugging
+
X In this source file the following constants can be defined. They are
X defined in the source below. Both of these options are enabled by
X default.
-
+
X 1. ADVANSYS_ASSERT - Enable driver assertions (Def: Enabled)
X
X Enabling this option adds assertion logic statements to the
@@ -332,11 +219,11 @@
X the kernel name space. This option is very useful for debugging
X the driver, but it will add to the size of the driver execution
X image and add overhead to the execution of the driver.
-
+
X The amount of debugging output can be controlled with the global
X variable 'asc_dbglvl'. The higher the number the more output. By
X default the debug level is 0.
-
+
X If the driver is loaded at boot time and the LILO Driver Option
X is included in the system, the debug level can be changed by
X specifying a 5th (ASC_NUM_IOPORT_PROBE + 1) I/O Port. The
@@ -350,28 +237,44 @@
X If the driver is built as a loadable module this variable can be
X defined when the driver is loaded. The following insmod command
X will set the debug level to one.
-
+
X insmod advansys.o asc_dbglvl=1
-
+
X Debugging Message Levels:
X 0: Errors Only
X 1: High-Level Tracing
X 2-N: Verbose Tracing
-
- I don't know the approved way for turning on printk()s to the
- console. Here's a program I use to do this. Debug output is
- logged in /var/adm/messages.
-
+
+ To enable debug output to console, please make sure that:
+
+ a. System and kernel logging is enabled (syslogd, klogd running).
+ b. Kernel messages are routed to console output. Check
+ /etc/syslog.conf for an entry similar to this:
+
+ kern.* /dev/console
+
+ c. klogd is started with the appropriate -c parameter
+ (e.g. klogd -c 8)
+
+ This will cause printk() messages to be be displayed on the
+ current console. Refer to the klogd(8) and syslogd(8) man pages
+ for details.
+
+ Alternatively you can enable printk() to console with this
+ program. However, this is not the 'official' way to do this.
+ Debug output is logged in /var/log/messages.
+
X main()
X {
X syscall(103, 7, 0, 0);
X }
-
- I found that increasing LOG_BUF_LEN to 40960 in kernel/printk.c
- prevents most level 1 debug messages from being lost.
+
+ Increasing LOG_BUF_LEN in kernel/printk.c to something like
+ 40960 allows more debug messages to be buffered in the kernel
+ and written to the console or log file.
X
X 3. ADVANSYS_STATS - Enable statistics (Def: Enabled >= v1.3.0)
-
+
X Enabling this option adds statistics collection and display
X through /proc to the driver. The information is useful for
X monitoring driver and device performance. It will add to the
@@ -394,8 +297,8 @@
X When ADVANSYS_STATS is not defined the AdvanSys /proc files only
X contain adapter and device configuration information.
X
- H. Driver LILO Option
-
+ F. Driver LILO Option
+
X If init/main.c is modified as described in the 'Directions for Adding
X the AdvanSys Driver to Linux' section (B.4.) above, the driver will
X recognize the 'advansys' LILO command line and /etc/lilo.conf option.
@@ -425,9 +328,24 @@
X the 'Driver Compile Time Options and Debugging' section above for
X more information.
X
- I. Release History
+ G. Tests to run before releasing new driver
+
+ 1. In the supported kernels verify there are no warning or compile
+ errors when the kernel is built as both a driver and as a module
+ and with the following options:
+
+ ADVANSYS_DEBUG - enabled and disabled
+ CONFIG_SMP - enabled and disabled
+ CONFIG_PROC_FS - enabled and disabled
X
- BETA-1.0 (12/23/95):
+ 2. Run tests on an x86, alpha, and PowerPC with at least one narrow
+ card and one wide card attached to a hard disk and CD-ROM drive:
+ fdisk, mkfs, fsck, bonnie, copy/compare test from the
+ CD-ROM to the hard drive.
+
+ H. Release History
+
+ BETA-1.0 (12/23/95):
X First Release
X
X BETA-1.1 (12/28/95):
@@ -461,7 +379,7 @@
X 4. Remove reset request loop problem from the "Known Problems or
X Issues" section. This problem was isolated and fixed in the
X mid-level SCSI driver.
-
+
X 1.5 (8/8/96):
X 1. Add support for ABP-940U (PCI Ultra) adapter.
X 2. Add support for IRQ sharing by setting the SA_SHIRQ flag for
@@ -690,7 +608,7 @@
X 3. For >= v2.3.28 use new SCSI error handling with new function
X advansys_eh_bus_reset(). Don't include an abort function
X because of base library limitations.
- 4. For >= v2.3.28 use per board asc_lock instead of io_request_lock.
+ 4. For >= v2.3.28 use per board lock instead of io_request_lock.
X 5. For >= v2.3.28 eliminate advansys_command() and
X advansys_command_done().
X 6. Add some changes for PowerPC (Big Endian) support, but it isn't
@@ -708,8 +626,8 @@
X 3.3B (5/1/00):
X 1. Support for PowerPC (Big Endian) wide cards. Narrow cards
X still need work.
- 2. Change bitfields to shift and mask access for endian
- portability.
+ 2. Change bitfields to shift and mask access for endian
+ portability.
X
X 3.3C (10/13/00):
X 1. Update for latest 2.4 kernel.
@@ -721,7 +639,38 @@
X 1. Update for latest 2.4 kernel.
X 2. Create patches for 2.2 and 2.4 kernels.
X
- J. Known Problems/Fix List (XXX)
+ 3.3E (1/9/01):
+ 1. Now that 2.4 is released remove ifdef code for kernel versions
+ less than 2.2. The driver is now only supported in kernels 2.2,
+ 2.4, and greater.
+ 2. Add code to release and acquire the io_request_lock in
+ the driver entrypoint functions: advansys_detect and
+ advansys_queuecommand. In kernel 2.4 the SCSI mid-level driver
+ still holds the io_request_lock on entry to SCSI low-level drivers.
+ This was supposed to be removed before 2.4 was released but never
+ happened. When the mid-level SCSI driver is changed all references
+ to the io_request_lock should be removed from the driver.
+ 3. Simplify error handling by removing advansys_abort(),
+ AscAbortSRB(), AscResetDevice(). SCSI bus reset requests are
+ now handled by resetting the SCSI bus and fully re-initializing
+ the chip. This simple method of error recovery has proven to work
+ most reliably after attempts at different methods. Also now only
+ support the "new" error handling method and remove the obsolete
+ error handling interface.
+ 4. Fix debug build errors.
+
+ 3.3F (1/24/01):
+ 1. Merge with ConnectCom version from Andy Kellner which
+ updates Adv Library to 5.14.
+ 2. Make PowerPC (Big Endian) work for narrow cards and
+ fix problems writing EEPROM for wide cards.
+ 3. Remove interrupts_enabled assertion function.
+
+ 3.3G (2/16/01):
+ 1. Return an error from narrow boards if passed a 16 byte
+ CDB. The wide board can already handle 16 byte CDBs.
+
+ I. Known Problems/Fix List (XXX)
X
X 1. Need to add memory mapping workaround. Test the memory mapping.
X If it doesn't work revert to I/O port access. Can a test be done
@@ -731,13 +680,12 @@
X has not occurred then print a message and run in polled mode.
X 3. Allow bus type scanning order to be changed.
X 4. Need to add support for target mode commands, cf. CAM XPT.
- 5. Add PowerPC (Big Endian) support for narrow cards.
X
- K. Credits
+ J. Credits (Chronological Order)
X
- Bob Frey <bf...@turbolinux.com.cn> wrote the AdvanSys SCSI driver.
- I no longer work for AdvanSys, but continue to maintain and support
- the driver.
+ Bob Frey <bf...@turbolinux.com.cn> wrote the AdvanSys SCSI driver
+ and maintained it up to 3.3F. He continues to answer questions
+ and help maintain the driver.
X
X Nathan Hartwell <ma...@cdc3.cdc.net> provided the directions and
X basis for the Linux v1.3.X changes which were included in the
@@ -763,7 +711,7 @@
X in 3.2K.
X
X Tom Rini <tr...@kernel.crashing.org> provided the CONFIG_ISA
- patch and helped with PowerPC support.
+ patch and helped with PowerPC wide and narrow board support.
X
X Philip Blundell <philip....@pobox.com> provided an
X advansys_interrupts_enabled patch.
@@ -775,15 +723,27 @@
X Jerry Quinn <jlq...@us.ibm.com> fixed PowerPC support (endian
X problems) for wide cards.
X
- L. ConnectCom (AdvanSys) Contact Information
-
+ Bryan Henderson <bry...@giraffe-data.com> helped debug narrow
+ card error handling.
+
+ Manuel Veloso <vel...@pobox.com> worked hard on PowerPC narrow
+ board support and fixed a bug in AscGetEEPConfig().
+
+ Arnaldo Carvalho de Melo <ac...@conectiva.com.br> made
+ save_flags/restore_flags changes.
+
+ Andy Kellner <AKel...@connectcom.net> continues the Advansys SCSI
+ driver development for ConnectCom (Version > 3.3F).
+
+ K. ConnectCom (AdvanSys) Contact Information
+
X Mail: ConnectCom Solutions, Inc.
X 1150 Ringwood Court
X San Jose, CA 95131
X Operator/Sales: 1-408-383-9400
X FAX: 1-408-383-9612
X Tech Support: 1-408-467-2930
- Tech Support E-Mail: sup...@connectcom.net
+ Tech Support E-Mail: li...@connectcom.net
X FTP Site: ftp.connectcom.net (login: anonymous)
X Web Site: http://www.connectcom.net
X
@@ -794,87 +754,62 @@
X * --- Linux Version
X */
X
-/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
-#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S))
-
X #ifndef LINUX_VERSION_CODE
X #include <linux/version.h>
X #endif /* LINUX_VERSION_CODE */
X
+/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
+#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S))
+#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
+#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0))
+
+/* Driver supported only in version 2.2 and version >= 2.4. */
+#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \
+ (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \
+ LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
+#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels."
+#endif
X
X /*
- * --- Linux Include Files
+ * --- Linux Include Files
X */
X
X #include <linux/config.h>
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X #ifdef MODULE
X #include <linux/module.h>
X #endif /* MODULE */
-#endif /* version >= v1.3.0 */
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,2,0)
X #if defined(CONFIG_X86) && !defined(CONFIG_ISA)
X #define CONFIG_ISA
X #endif /* CONFIG_X86 && !CONFIG_ISA */
-#else /* version < 2.2.0 */
-#define CONFIG_ISA
-#endif /* version < 2.2.0 */
X
X #include <linux/string.h>
X #include <linux/sched.h>
X #include <linux/kernel.h>
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-#include <linux/head.h>
-#endif /* verions < v2.1.0 */
X #include <linux/types.h>
X #include <linux/ioport.h>
X #include <linux/delay.h>
X #include <linux/malloc.h>
X #include <linux/mm.h>
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X #include <linux/proc_fs.h>


-#endif /* version >= v1.3.0 */

-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,23)
X #include <linux/init.h>
-#endif /* version >= v2.1.23 */
X #include <asm/io.h>
X #include <asm/system.h>
X #include <asm/dma.h>
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-#include "../block/blk.h"


-#else /* version >= v1.3.0 */

X #include <linux/blk.h>
X #include <linux/stat.h>


-#endif /* version >= v1.3.0 */

-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,18)
+#if ASC_LINUX_KERNEL24
X #include <linux/spinlock.h>
-#elif LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,95)
+#elif ASC_LINUX_KERNEL22
X #include <asm/spinlock.h>
-#endif /* version >= 2.1.95 */
+#endif
X #include "scsi.h"
X #include "hosts.h"
X #include "sd.h"
X #include "advansys.h"
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,93)
X #ifdef CONFIG_PCI
X #include <linux/pci.h>


X #endif /* CONFIG_PCI */

-#else /* version < v2.1.93 */
-/*
- * For earlier than v2.1.93 the driver has its own PCI configuration.
- * If PCI is not needed in a kernel before v2.1.93 this define can be
- * turned-off to make the driver object smaller.
- */
-#define ASC_CONFIG_PCI
-#endif /* version < v2.1.93 */
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-#define cpu_to_le16(word) (word)
-#define le16_to_cpu(word) (word)
-#define cpu_to_le32(dword) (dword)
-#define le32_to_cpu(dword) (dword)
-#endif /* version < v2.1.0 */
X
X
X /*
@@ -884,19 +819,12 @@
X /* Enable driver assertions. */
X #define ADVANSYS_ASSERT
X
+/* Enable driver /proc statistics. */
+#define ADVANSYS_STATS
+
X /* Enable driver tracing. */
X /* #define ADVANSYS_DEBUG */
X
-/*
- * Because of no /proc to display them, statistics are disabled
- * for versions prior to v1.3.0.
- */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-#undef ADVANSYS_STATS /* Disable statistics */


-#else /* version >= v1.3.0 */

-#define ADVANSYS_STATS /* Enable statistics. */
-#endif /* version >= v1.3.0 */
-
X
X /*
X * --- Debugging Header
@@ -925,7 +853,7 @@
X * types must be used. In Linux the char, short, and int types
X * are all consistent at 8, 16, and 32 bits respectively. Pointers
X * and long types are 64 bits on Alpha and UltraSPARC.
- */
+ */
X #define ASC_PADDR __u32 /* Physical/Bus address data type. */
X #define ASC_VADDR __u32 /* Virtual address data type. */
X #define ASC_DCNT __u32 /* Unsigned Data count type. */
@@ -974,7 +902,7 @@
X #define ASC_PCI_VENDORID 0x10CD
X #define ASC_PCI_DEVICEID_1200A 0x1100
X #define ASC_PCI_DEVICEID_1200B 0x1200
-#define ASC_PCI_DEVICEID_ULTRA 0x1300
+#define ASC_PCI_DEVICEID_ULTRA 0x1300
X #define ASC_PCI_REVISION_3150 0x02
X #define ASC_PCI_REVISION_3050 0x03
X
@@ -991,13 +919,13 @@
X #define CC_VERY_LONG_SG_LIST 0
X #define ASC_SRB2SCSIQ(srb_ptr) (srb_ptr)
X
-#define PortAddr unsigned short /* port address size */
-#define inp(port) inb(port)
-#define inpw(port) inw(port)
-#define inpl(port) inl(port)
-#define outp(port, byte) outb((byte), (port))
-#define outpw(port, word) outw((word), (port))
-#define outpl(port, dword) outl((dword), (port))
+#define PortAddr unsigned short /* port address size */
+#define inp(port) inb(port)
+#define outp(port, byte) outb((byte), (port))
+
+#define inpw(port) inw(port)
+#define outpw(port, word) outw((word), (port))
+
X #define ASC_MAX_SG_QUEUE 7
X #define ASC_MAX_SG_LIST 255
X
@@ -1044,12 +972,7 @@
X #define ASC_MAX_ISA_DMA_COUNT (0x00FFFFFFL)
X #define ASC_MAX_EISA_DMA_ADDR (0x07FFFFFFL)
X #define ASC_MAX_EISA_DMA_COUNT (0x07FFFFFFL)
-#ifndef inpw_noswap
-#define inpw_noswap(port) inpw(port)
-#endif
-#ifndef outpw_noswap
-#define outpw_noswap(port, data) outpw(port, data)
-#endif
+
X #define ASC_SCSI_ID_BITS 3
X #define ASC_SCSI_TIX_TYPE uchar
X #define ASC_ALL_DEVICE_BIT_SET 0xFF
@@ -1091,6 +1014,8 @@
X #define SCSICMD_ReadHeader 0x44
X #define SCSICMD_ModeSelect10 0x55
X #define SCSICMD_ModeSense10 0x5A
+
+/* Inquiry Data Peripheral Device Types */
X #define SCSI_TYPE_DASD 0x00
X #define SCSI_TYPE_SASD 0x01
X #define SCSI_TYPE_PRN 0x02
@@ -1102,10 +1027,20 @@
X #define SCSI_TYPE_MED_CHG 0x08
X #define SCSI_TYPE_COMM 0x09
X #define SCSI_TYPE_UNKNOWN 0x1F
-#define SCSI_TYPE_NO_DVC 0xFF
-#define INQ_CLOCKING_ST_ONLY 0x0
-#define INQ_CLOCKING_DT_ONLY 0x1
-#define INQ_CLOCKING_ST_AND_DT 0x3
+
+#define ADV_INQ_CLOCKING_ST_ONLY 0x0
+#define ADV_INQ_CLOCKING_DT_ONLY 0x1
+#define ADV_INQ_CLOCKING_ST_AND_DT 0x3
+
+/*
+ * Inquiry SPC-2 SPI Byte 1 EVPD (Enable Vital Product Data)
+ * and CmdDt (Command Support Data) field bit definitions.
+ */
+#define ADV_INQ_RTN_VPD_AND_CMDDT 0x3
+#define ADV_INQ_RTN_CMDDT_FOR_OP_CODE 0x2
+#define ADV_INQ_RTN_VPD_FOR_PG_CODE 0x1
+#define ADV_INQ_RTN_STD_INQUIRY_DATA 0x0
+
X #define ASC_SCSIDIR_NOCHK 0x00
X #define ASC_SCSIDIR_T2H 0x08
X #define ASC_SCSIDIR_H2T 0x10
@@ -1169,77 +1104,49 @@
X #define M2_QTAG_MSG_ORDERED 0x22
X #define M2_IGNORE_WIDE_RESIDUE 0x23
X
-typedef struct {
- uchar peri_dvc_type:5;
- uchar peri_qualifier:3;
-} ASC_SCSI_INQ0;
-
-typedef struct {
- uchar dvc_type_modifier:7;
- uchar rmb:1;
-} ASC_SCSI_INQ1;
-
-typedef struct {
- uchar ansi_apr_ver:3;
- uchar ecma_ver:3;
- uchar iso_ver:2;
-} ASC_SCSI_INQ2;
-
-typedef struct {
- uchar rsp_data_fmt:4;
- uchar res:2;
- uchar TemIOP:1;
- uchar aenc:1;
-} ASC_SCSI_INQ3;
-
-typedef struct {
- uchar StfRe:1;
- uchar CmdQue:1;
- uchar Reserved:1;
- uchar Linked:1;
- uchar Sync:1;
- uchar WBus16:1;
- uchar WBus32:1;
- uchar RelAdr:1;
-} ASC_SCSI_INQ7;
+/*
+ * Inquiry data structure and bitfield macros
+ *
+ * Only quantities of more than 1 bit are shifted, since the others are
+ * just tested for true or false. C bitfields aren't portable between big
+ * and little-endian platforms so they are not used.
+ */
+
+#define ASC_INQ_DVC_TYPE(inq) ((inq)->periph & 0x1f)
+#define ASC_INQ_QUALIFIER(inq) (((inq)->periph & 0xe0) >> 5)
+#define ASC_INQ_DVC_TYPE_MOD(inq) ((inq)->devtype & 0x7f)
+#define ASC_INQ_REMOVABLE(inq) ((inq)->devtype & 0x80)
+#define ASC_INQ_ANSI_VER(inq) ((inq)->ver & 0x07)
+#define ASC_INQ_ECMA_VER(inq) (((inq)->ver & 0x38) >> 3)
+#define ASC_INQ_ISO_VER(inq) (((inq)->ver & 0xc0) >> 6)
+#define ASC_INQ_RESPONSE_FMT(inq) ((inq)->byte3 & 0x0f)
+#define ASC_INQ_TERM_IO(inq) ((inq)->byte3 & 0x40)
+#define ASC_INQ_ASYNC_NOTIF(inq) ((inq)->byte3 & 0x80)
+#define ASC_INQ_SOFT_RESET(inq) ((inq)->flags & 0x01)
+#define ASC_INQ_CMD_QUEUE(inq) ((inq)->flags & 0x02)
+#define ASC_INQ_LINK_CMD(inq) ((inq)->flags & 0x08)
+#define ASC_INQ_SYNC(inq) ((inq)->flags & 0x10)
+#define ASC_INQ_WIDE16(inq) ((inq)->flags & 0x20)
+#define ASC_INQ_WIDE32(inq) ((inq)->flags & 0x40)
+#define ASC_INQ_REL_ADDR(inq) ((inq)->flags & 0x80)
+#define ASC_INQ_INFO_UNIT(inq) ((inq)->info & 0x01)
+#define ASC_INQ_QUICK_ARB(inq) ((inq)->info & 0x02)
+#define ASC_INQ_CLOCKING(inq) (((inq)->info & 0x0c) >> 2)
X
X typedef struct {
- ASC_SCSI_INQ0 byte0;
- ASC_SCSI_INQ1 byte1;
- ASC_SCSI_INQ2 byte2;
- ASC_SCSI_INQ3 byte3;
+ uchar periph;
+ uchar devtype;
+ uchar ver;
+ uchar byte3;
X uchar add_len;
X uchar res1;
X uchar res2;
- ASC_SCSI_INQ7 byte7;
+ uchar flags;
X uchar vendor_id[8];
X uchar product_id[16];
X uchar product_rev_level[4];
X } ASC_SCSI_INQUIRY;
X
-typedef struct asc_req_sense {
- uchar err_code:7;
- uchar info_valid:1;
- uchar segment_no;
- uchar sense_key:4;
- uchar reserved_bit:1;
- uchar sense_ILI:1;
- uchar sense_EOM:1;
- uchar file_mark:1;
- uchar info1[4];
- uchar add_sense_len;
- uchar cmd_sp_info[4];
- uchar asc;
- uchar ascq;
- uchar fruc;
- uchar sks_byte0:7;
- uchar sks_valid:1;
- uchar sks_bytes[2];
- uchar notused[2];
- uchar ex_sense_code;
- uchar info2[4];
-} ASC_REQ_SENSE;
-
X #define ASC_SG_LIST_PER_Q 7
X #define QS_FREE 0x00
X #define QS_READY 0x01
@@ -1353,7 +1260,7 @@
X #define ASC_TIX_TO_LUN(tix) (((tix) >> ASC_SCSI_ID_BITS) & ASC_MAX_LUN)
X #define ASC_QNO_TO_QADDR(q_no) ((ASC_QADR_BEG)+((int)(q_no) << 6))
X
-typedef struct asc_scisq_1 {
+typedef struct asc_scsiq_1 {
X uchar status;
X uchar q_no;
X uchar cntl;
@@ -1367,7 +1274,7 @@
X uchar extra_bytes;
X } ASC_SCSIQ_1;
X
-typedef struct asc_scisq_2 {
+typedef struct asc_scsiq_2 {
X ASC_VADDR srb_ptr;
X uchar target_ix;
X uchar flag;
@@ -1445,8 +1352,8 @@
X typedef struct asc_scsi_req_q {
X ASC_SCSIQ_1 r1;
X ASC_SCSIQ_2 r2;
- uchar *cdbptr;
- ASC_SG_HEAD *sg_head;
+ uchar *cdbptr;
+ ASC_SG_HEAD *sg_head;
X uchar *sense_ptr;
X ASC_SCSIQ_3 r3;
X uchar cdb[ASC_MAX_CDB_LEN];
@@ -1528,6 +1435,10 @@
X #define ASCQ_ERR_SEND_SCSI_Q 0x22
X #define ASCQ_ERR_HOST_REQ_RISC_HALT 0x23
X #define ASCQ_ERR_RESET_SDTR 0x24
+
+/*
+ * Warning code values are set in ASC_DVC_VAR 'warn_code'.
+ */
X #define ASC_WARN_NO_ERROR 0x0000
X #define ASC_WARN_IO_PORT_ROTATE 0x0001
X #define ASC_WARN_EEPROM_CHKSUM 0x0002
@@ -1537,6 +1448,10 @@
X #define ASC_WARN_EEPROM_RECOVER 0x0020
X #define ASC_WARN_CFG_MSW_RECOVER 0x0040
X #define ASC_WARN_SET_PCI_CONFIG_SPACE 0x0080
+
+/*
+ * Error code values are set in ASC_DVC_VAR 'err_code'.
+ */
X #define ASC_IERR_WRITE_EEPROM 0x0001
X #define ASC_IERR_MCODE_CHKSUM 0x0002
X #define ASC_IERR_SET_PC_ADDR 0x0004
@@ -1551,6 +1466,7 @@
X #define ASC_IERR_SCAM 0x0800
X #define ASC_IERR_SET_SDTR 0x1000
X #define ASC_IERR_RW_LRAM 0x8000
+
X #define ASC_DEF_IRQ_NO 10
X #define ASC_MAX_IRQ_NO 15
X #define ASC_MIN_IRQ_NO 10
@@ -1771,19 +1687,10 @@
X #define ASC_EEP_ISA_PNP_WSIZE 16
X
X /*
- * This struct is filled in by reading ushorts from the board in
- * order. Therefore, order of fields matters.
- * ASCEEP_Config_Field_IsChar indicates when a ushort actually
- * contains two chars. On big_endian machines, the byte-swap needs to
- * be undone to put the chars in order. When an entry in
- * ASCEEP_Config_Field_IsChar is 1, it indicates that the swap is
- * needed.
- */
-
-/*
- * These macros allow us to keep the chip scsi id and isa dma speed
- * bitfields in board order. C bitfields aren't portable across
- * endianness.
+ * These macros keep the chip SCSI id and ISA DMA speed
+ * bitfields in board order. C bitfields aren't portable
+ * between big and little-endian platforms so they are
+ * not used.
X */
X
X #define ASC_EEP_GET_CHIP_ID(cfg) ((cfg)->id_speed & 0x0f)
@@ -1806,32 +1713,13 @@
X uchar power_up_wait;
X uchar no_scam;
X uchar id_speed; /* low order 4 bits is chip scsi id */
- /* high order 4 bits is isa dma speed */
+ /* high order 4 bits is isa dma speed */
X uchar dos_int13_table[ASC_MAX_TID + 1];
X uchar adapter_info[6];
X ushort cntl;
X ushort chksum;
X } ASCEEP_CONFIG;
X
-STATIC ASCEEP_CONFIG ASCEEP_Config_Field_IsChar = {
- 0, /* cfg_lsw */
- 0, /* cfg_msw */
- 1, /* init_sdtr */
- 1, /* disc_enable */
- 1, /* use_cmd_qng */
- 1, /* start_motor */
- 1, /* max_total_qng */
- 1, /* max_tag_qng */
- 1, /* bios_scan */
- 1, /* power_up_wait */
- 1, /* no_scam */
- 1, /* id_speed */
- { 1,1,1,1,1,1,1,1 }, /* dos_int13_table[ASC_MAX_TID + 1] */
- { 1,1,1,1,1,1 }, /* adapter_info[6] */
- 0, /* cntl */
- 0, /* chksum */
-};
-
X #define ASC_PCI_CFG_LSW_SCSI_PARITY 0x0800
X #define ASC_PCI_CFG_LSW_BURST_MODE 0x0080
X #define ASC_PCI_CFG_LSW_INTR_ABLE 0x0020
@@ -2071,8 +1959,6 @@
X #define AscSetChipLramAddr(port, addr) outpw((PortAddr)((port)+IOP_RAM_ADDR), addr)
X #define AscGetChipLramData(port) (ushort)inpw((port)+IOP_RAM_DATA)
X #define AscSetChipLramData(port, data) outpw((port)+IOP_RAM_DATA, data)
-#define AscGetChipLramDataNoSwap(port) (ushort)inpw_noswap((port)+IOP_RAM_DATA)
-#define AscSetChipLramDataNoSwap(port, data) outpw_noswap((port)+IOP_RAM_DATA, data)
X #define AscGetChipIFC(port) (uchar)inp((port)+IOP_REG_IFC)
X #define AscSetChipIFC(port, data) outp((port)+IOP_REG_IFC, data)
X #define AscGetChipStatus(port) (ASC_CS_TYPE)inpw((port)+IOP_STATUS)
@@ -2138,15 +2024,16 @@


X #endif /* CONFIG_ISA */

X STATIC uchar AscReadLramByte(PortAddr, ushort);
X STATIC ushort AscReadLramWord(PortAddr, ushort);
+#if CC_VERY_LONG_SG_LIST
X STATIC ASC_DCNT AscReadLramDWord(PortAddr, ushort);
+#endif /* CC_VERY_LONG_SG_LIST */
X STATIC void AscWriteLramWord(PortAddr, ushort, ushort);
-STATIC void AscWriteLramDWord(PortAddr, ushort, ASC_DCNT);
X STATIC void AscWriteLramByte(PortAddr, ushort, uchar);
X STATIC ASC_DCNT AscMemSumLramWord(PortAddr, ushort, int);
X STATIC void AscMemWordSetLram(PortAddr, ushort, ushort, int);
-STATIC void AscMemWordCopyToLram(PortAddr, ushort, ushort *, int);
-STATIC void AscMemDWordCopyToLram(PortAddr, ushort, ASC_DCNT *, int);
-STATIC void AscMemWordCopyFromLram(PortAddr, ushort, ushort *, int);
+STATIC void AscMemWordCopyPtrToLram(PortAddr, ushort, uchar *, int);
+STATIC void AscMemDWordCopyPtrToLram(PortAddr, ushort, uchar *, int);
+STATIC void AscMemWordCopyPtrFromLram(PortAddr, ushort, uchar *, int);
X STATIC ushort AscInitAscDvcVar(ASC_DVC_VAR *);
X STATIC ushort AscInitFromEEP(ASC_DVC_VAR *);
X STATIC ushort AscInitFromAscDvcVar(ASC_DVC_VAR *);
@@ -2158,25 +2045,8 @@
X STATIC uchar AscGetSynPeriodIndex(ASC_DVC_VAR *, uchar);
X STATIC uchar AscAllocFreeQueue(PortAddr, uchar);
X STATIC uchar AscAllocMultipleFreeQueue(PortAddr, uchar, uchar);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int AscRiscHaltedAbortSRB(ASC_DVC_VAR *, ASC_DCNT);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int AscRiscHaltedAbortTIX(ASC_DVC_VAR *, uchar);


-#endif /* version >= v1.3.89 */
-#endif /* version < v2.3.28 */

X STATIC int AscHostReqRiscHalt(PortAddr);
X STATIC int AscStopQueueExe(PortAddr);
-STATIC int AscStartQueueExe(PortAddr);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int AscCleanUpDiscQueue(PortAddr);


-#endif /* version >= v1.3.89 */

-STATIC int AscCleanUpBusyQueue(PortAddr);


-#endif /* version < v2.3.28 */

-STATIC int AscWaitTixISRDone(ASC_DVC_VAR *, uchar);
-STATIC int AscWaitISRDone(ASC_DVC_VAR *);
-STATIC ASC_PADDR AscGetOnePhyAddr(ASC_DVC_VAR *, uchar *,
- ASC_DCNT);
X STATIC int AscSendScsiQueue(ASC_DVC_VAR *,
X ASC_SCSI_Q * scsiq,
X uchar n_q_required);
@@ -2187,13 +2057,8 @@
X STATIC int AscSetChipSynRegAtID(PortAddr, uchar, uchar);
X STATIC int AscSetRunChipSynRegAtID(PortAddr, uchar, uchar);
X STATIC ushort AscInitLram(ASC_DVC_VAR *);
-STATIC int AscReInitLram(ASC_DVC_VAR *);
X STATIC ushort AscInitQLinkVar(ASC_DVC_VAR *);
X STATIC int AscSetLibErrorCode(ASC_DVC_VAR *, ushort);


-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \
- LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)

-STATIC int _AscWaitQDone(PortAddr, ASC_SCSI_Q *);


-#endif /* version >= v1.3.89 && version < v2.3.28 */

X STATIC int AscIsrChipHalted(ASC_DVC_VAR *);
X STATIC uchar _AscCopyLramScsiDoneQ(PortAddr, ushort,
X ASC_QDONE_INFO *, ASC_DCNT);
@@ -2211,27 +2076,24 @@
X STATIC uchar AscSetChipScsiID(PortAddr, uchar);
X STATIC uchar AscGetChipVersion(PortAddr, ushort);
X STATIC ushort AscGetChipBusType(PortAddr);
-STATIC ASC_DCNT AscLoadMicroCode(PortAddr, ushort, ushort *, ushort);
+STATIC ASC_DCNT AscLoadMicroCode(PortAddr, ushort, uchar *, ushort);
X STATIC int AscFindSignature(PortAddr);
X STATIC void AscToggleIRQAct(PortAddr);
X STATIC uchar AscGetChipIRQ(PortAddr, ushort);
X STATIC uchar AscSetChipIRQ(PortAddr, uchar, ushort);
X STATIC ushort AscGetChipBiosAddress(PortAddr, ushort);
-STATIC int DvcEnterCritical(void);
-STATIC void DvcLeaveCritical(int);
-STATIC void DvcInPortWords(PortAddr, ushort *, int);
-STATIC void DvcOutPortWords(PortAddr, ushort *, int);
-STATIC void DvcOutPortDWords(PortAddr, ASC_DCNT *, int);
+STATIC inline ulong DvcEnterCritical(void);
+STATIC inline void DvcLeaveCritical(ulong);
+#ifdef CONFIG_PCI
X STATIC uchar DvcReadPCIConfigByte(ASC_DVC_VAR *, ushort);
X STATIC void DvcWritePCIConfigByte(ASC_DVC_VAR *,
X ushort, uchar);
+#endif /* CONFIG_PCI */
X STATIC ushort AscGetChipBiosAddress(PortAddr, ushort);
X STATIC void DvcSleepMilliSecond(ASC_DCNT);
X STATIC void DvcDelayNanoSecond(ASC_DVC_VAR *, ASC_DCNT);
-STATIC ASC_DCNT DvcGetSGList(ASC_DVC_VAR *, uchar *,
- ASC_DCNT, ASC_SG_HEAD *);
-STATIC void DvcPutScsiQ(PortAddr, ushort, ushort *, int);
-STATIC void DvcGetQinfo(PortAddr, ushort, ushort *, int);
+STATIC void DvcPutScsiQ(PortAddr, ushort, uchar *, int);
+STATIC void DvcGetQinfo(PortAddr, ushort, uchar *, int);
X STATIC ushort AscInitGetConfig(ASC_DVC_VAR *);
X STATIC ushort AscInitSetConfig(ASC_DVC_VAR *);
X STATIC ushort AscInitAsc1000Driver(ASC_DVC_VAR *);
@@ -2245,13 +2107,6 @@
X STATIC uint AscGetNumOfFreeQueue(ASC_DVC_VAR *, uchar,
X uchar);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 44'
echo 'File patch-2.2.20 is continued in part 45'
echo "45" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:30 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part31

#!/bin/sh -x
# this is part 31 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 31; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ " disabled\n", pAC->dev[1]->name);
X pAC->GIni.GP[1].PFlowCtrlMode = SK_FLOW_MODE_NONE;
X }
X
@@ -2980,7 +3328,7 @@


X MSMode = SK_MS_MODE_SLAVE;
X }

X else printk("%s: Illegal value for Role_B\n",


- pAC->dev->name);
+ pAC->dev[1]->name);
X }

X pAC->GIni.GP[1].PMSMode = MSMode;
X
@@ -2991,8 +3339,8 @@
X PrefPort[pAC->Index] != NULL) {
X if (strcmp(PrefPort[pAC->Index],"") == 0) { /* Auto */
X pAC->ActivePort = 0;
- pAC->Rlmt.MacPreferred = -1; /* auto */
- pAC->Rlmt.PrefPort = 0;
+ pAC->Rlmt.Net[0].Preference = -1; /* auto */
+ pAC->Rlmt.Net[0].PrefPort = 0;
X }
X else if (strcmp(PrefPort[pAC->Index],"A") == 0) {
X /*
@@ -3000,8 +3348,8 @@
X * switch is issued after net up.
X */
X Port = 0;
- pAC->Rlmt.MacPreferred = Port;
- pAC->Rlmt.PrefPort = Port;
+ pAC->Rlmt.Net[0].Preference = Port;
+ pAC->Rlmt.Net[0].PrefPort = Port;
X }
X else if (strcmp(PrefPort[pAC->Index],"B") == 0) {
X /*
@@ -3009,13 +3357,16 @@
X * switch is issued after net up.
X */
X Port = 1;
- pAC->Rlmt.MacPreferred = Port;
- pAC->Rlmt.PrefPort = Port;
+ pAC->Rlmt.Net[0].Preference = Port;
+ pAC->Rlmt.Net[0].PrefPort = Port;
X }
X else printk("%s: Illegal value for PrefPort\n",


- pAC->dev->name);
+ pAC->dev[0]->name);
X }

-
+
+
+ pAC->RlmtNets = 1;
+
X if (RlmtMode != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
X RlmtMode[pAC->Index] != NULL) {
X if (strcmp(RlmtMode[pAC->Index], "") == 0) {
@@ -3033,9 +3384,14 @@
X SK_RLMT_CHECK_LOC_LINK |
X SK_RLMT_CHECK_SEG;
X }
+ else if ((strcmp(RlmtMode[pAC->Index], "DualNet") == 0) &&
+ (pAC->GIni.GIMacsFound == 2)) {
+ pAC->RlmtMode = SK_RLMT_CHECK_LINK;
+ pAC->RlmtNets = 2;
+ }
X else {
X printk("%s: Illegal value for"
- " RlmtMode, using default\n", pAC->dev->name);
+ " RlmtMode, using default\n", pAC->dev[0]->name);
X pAC->RlmtMode = 0;
X }
X }
@@ -3337,7 +3693,7 @@
X case SK_DRV_ADAP_FAIL:
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("ADAPTER FAIL EVENT\n"));
- printk("%s: Adapter failed.\n", pAC->dev->name);
+ printk("%s: Adapter failed.\n", pAC->dev[0]->name);


X /* disable interrupts */
X SK_OUT32(pAC->IoBase, B0_IMSK, 0);

X /* cgoos */
@@ -3347,9 +3703,9 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("PORT FAIL EVENT, Port: %d\n", FromPort));
X if (FromPort == 0) {
- printk("%s: Port A failed.\n", pAC->dev->name);
+ printk("%s: Port A failed.\n", pAC->dev[0]->name);
X } else {
- printk("%s: Port B failed.\n", pAC->dev->name);
+ printk("%s: Port B failed.\n", pAC->dev[1]->name);
X }
X /* cgoos */
X break;
@@ -3390,7 +3746,7 @@
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("NET UP EVENT, Port: %d ", Param.Para32[0]));
X printk("%s: network connection up using"
- " port %c\n", pAC->dev->name, 'A'+Param.Para32[0]);
+ " port %c\n", pAC->dev[Param.Para32[0]]->name, 'A'+Param.Para32[0]);
X printk(" speed: 1000\n");
X Stat = pAC->GIni.GP[FromPort].PLinkModeStatus;
X if (Stat == SK_LMODE_STAT_AUTOHALF ||
@@ -3433,7 +3789,8 @@
X }
X }
X
- if (Param.Para32[0] != pAC->ActivePort) {
+ if ((Param.Para32[0] != pAC->ActivePort) &&
+ (pAC->RlmtNets == 1)) {
X NewPara.Para32[0] = pAC->ActivePort;
X NewPara.Para32[1] = Param.Para32[0];
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_INTERN,
@@ -3444,21 +3801,21 @@
X /* action list 7 */
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("NET DOWN EVENT "));
- printk("%s: network connection down\n", pAC->dev->name);
+ printk("%s: network connection down\n", pAC->dev[Param.Para32[1]]->name);
X break;
X case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("PORT SWITCH HARD "));
X case SK_DRV_SWITCH_SOFT: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
X /* action list 6 */
- printk("%s: switching to port %c\n", pAC->dev->name,
+ printk("%s: switching to port %c\n", pAC->dev[0]->name,
X 'A'+Param.Para32[1]);
X case SK_DRV_SWITCH_INTERN: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
X FromPort = Param.Para32[0];
X ToPort = Param.Para32[1];
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("PORT SWITCH EVENT, From: %d To: %d (Pref %d) ",
- FromPort, ToPort, pAC->Rlmt.PrefPort));
+ FromPort, ToPort, pAC->Rlmt.Net[0].PrefPort));
X NewPara.Para64 = FromPort;
X SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_XMAC_RESET, NewPara);
X NewPara.Para64 = ToPort;
@@ -3510,6 +3867,7 @@
X Flags);
X break;
X case SK_DRV_RLMT_SEND: /* SK_MBUF *pMb */
+
X SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
X ("RLS "));
X pRlmtMbuf = (SK_MBUF*) Param.pParaPtr;
@@ -3574,7 +3932,7 @@
X break;
X }
X printk(KERN_INFO "%s: -- ERROR --\n Class: %s\n"
- " Nr: 0x%x\n Msg: %s\n", pAC->dev->name,
+ " Nr: 0x%x\n Msg: %s\n", pAC->dev[0]->name,
X ClassStr, ErrNum, pErrorMsg);
X
X } /* SkErrorLog */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skgeinit.c linux/drivers/net/sk98lin/skgeinit.c
--- v2.2.19/drivers/net/sk98lin/skgeinit.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skgeinit.c Wed Oct 10 01:41:03 2001


@@ -2,16 +2,15 @@
X *

X * Name: skgeinit.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.55 $
- * Date: $Date: 1999/11/22 13:32:26 $
+ * Version: $Revision: 1.63 $
+ * Date: $Date: 2001/04/05 11:02:09 $
X * Purpose: Contains functions to initialize the GE HW


X *
X ******************************************************************************/
X

X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *

X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,31 @@


X * History:
X *

X * $Log: skgeinit.c,v $
+ * Revision 1.63 2001/04/05 11:02:09 rassmann
+ * Stop Port check of the STOP bit did not take 2/18 sec as wanted.
+ *
+ * Revision 1.62 2001/02/07 07:54:21 rassmann
+ * Corrected copyright.
+ *
+ * Revision 1.61 2001/01/31 15:31:40 gklug


+ * fix: problem with autosensing an SR8800 switch

+ *
+ * Revision 1.60 2000/10/18 12:22:21 cgoos


+ * Added workaround for half duplex hangup.

+ *
+ * Revision 1.59 2000/10/10 11:22:06 gklug
+ * add: in manual half duplex mode ignore carrier extension errors
+ *
+ * Revision 1.58 2000/10/02 14:10:27 rassmann


+ * Reading BCOM PHY after releasing reset until it returns a valid value.

+ *
+ * Revision 1.57 2000/08/03 14:55:28 rassmann
+ * Waiting for I2C to be ready before de-initializing adapter
+ * (prevents sensors from hanging up).
+ *
+ * Revision 1.56 2000/07/27 12:16:48 gklug
+ * fix: Stop Port check of the STOP bit does now take 2/18 sec as wanted
+ *
X * Revision 1.55 1999/11/22 13:32:26 cgoos


X * Changed license header to GPL.
X *

@@ -200,7 +224,7 @@
X * DoInitRamQueue(), and SkGeCfgSync().
X * Add coding for SkGeInitMacArb(), SkGeInitPktArb(),
X * SkGeInitMacFifo(), SkGeInitRamBufs(),
- * SkGeInitRamIface(), and SkGeInitBmu().
+ * SkGeInitRamIface(), and SkGeInitBmu().
X *
X * Revision 1.11 1998/09/29 08:26:29 malthoff
X * bug fix: SkGeInit0() 'i' should be increment.
@@ -276,7 +300,7 @@


X /* local variables ************************************************************/
X

X static const char SysKonnectFileId[] =

- "@(#)$Id: skgeinit.c,v 1.55 1999/11/22 13:32:26 cgoos Exp $ (C) SK ";
+ "@(#)$Id: skgeinit.c,v 1.63 2001/04/05 11:02:09 rassmann Exp $ (C) SK ";
X
X struct s_QOffTab {
X int RxQOff; /* Receive Queue Address Offset */
@@ -284,7 +308,7 @@
X int XaQOff; /* Async Tx Queue Address Offset */
X };
X static struct s_QOffTab QOffTab[] = {
- { Q_R1, Q_XS1, Q_XA1 }, { Q_R2, Q_XS2, Q_XA2 }
+ {Q_R1, Q_XS1, Q_XA1}, {Q_R2, Q_XS2, Q_XA2}
X };
X
X
@@ -304,7 +328,7 @@
X void SkGePollRxD(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */

X SK_BOOL PollRxD) /* SK_TRUE (enable pol.), SK_FALSE (disable pol.) */
X {
X SK_GEPORT *pPrt;
@@ -312,12 +336,13 @@


X pPrt = &pAC->GIni.GP[Port];
X

X if (PollRxD) {
- SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_ENA_POL);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_ENA_POL);
X }
X else {
- SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_DIS_POL);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_DIS_POL);
X }
-}
+} /* SkGePollRxD */


+
X
X /******************************************************************************
X *

@@ -335,7 +360,7 @@
X void SkGePollTxD(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */

X SK_BOOL PollTxD) /* SK_TRUE (enable pol.), SK_FALSE (disable pol.) */
X {
X SK_GEPORT *pPrt;
@@ -351,12 +376,12 @@
X }
X
X if (pPrt->PXSQSize != 0) {
- SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), DWord);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), DWord);
X }
X if (pPrt->PXAQSize != 0) {
- SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), DWord);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), DWord);
X }
-}
+} /* SkGePollTxD */
X
X
X /******************************************************************************
@@ -375,17 +400,18 @@
X void SkGeYellowLED(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */

-int State) /* yellow LED state, 0 = OFF, 0 != ON */
+int State) /* yellow LED state, 0 = OFF, 0 != ON */
X {
X if (State == 0) {
X /* Switch yellow LED OFF */
- SK_OUT8(IoC, B0_LED, LED_STAT_OFF) ;
+ SK_OUT8(IoC, B0_LED, LED_STAT_OFF);
X }
X else {
X /* Switch yellow LED ON */
- SK_OUT8(IoC, B0_LED, LED_STAT_ON) ;
+ SK_OUT8(IoC, B0_LED, LED_STAT_ON);
X }
-}
+} /* SkGeYellowLED */


+
X
X /******************************************************************************
X *

@@ -399,7 +425,7 @@
X * 'Led' must contain the address offset of the LEDs INI register.
X *
X * Usage:
- * SkGeXmitLED(pAC, IoC, MR_ADDR(Port,TX_LED_INI), SK_LED_ENA);
+ * SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA);
X *
X * Returns:
X * nothing
@@ -407,31 +433,31 @@
X void SkGeXmitLED(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */

-int Led, /* offset to the LED Init Value register */
-int Mode) /* Mode may be SK_LED_DIS, SK_LED_ENA, SK_LED_TST */
+int Led, /* offset to the LED Init Value register */
+int Mode) /* Mode may be SK_LED_DIS, SK_LED_ENA, SK_LED_TST */
X {
X SK_U32 LedIni;
X
X switch (Mode) {
X case SK_LED_ENA:
X LedIni = SK_XMIT_DUR * (SK_U32)pAC->GIni.GIHstClkFact / 100;
- SK_OUT32(IoC, Led+XMIT_LED_INI, LedIni);
- SK_OUT8(IoC, Led+XMIT_LED_CTRL, LED_START);
- break ;
+ SK_OUT32(IoC, Led + XMIT_LED_INI, LedIni);
+ SK_OUT8(IoC, Led + XMIT_LED_CTRL, LED_START);
+ break;
X case SK_LED_TST:
- SK_OUT8(IoC, Led+XMIT_LED_TST, LED_T_ON);
- SK_OUT32(IoC, Led+XMIT_LED_CNT, 100);
- SK_OUT8(IoC, Led+XMIT_LED_CTRL, LED_START);
- break ;
+ SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_ON);
+ SK_OUT32(IoC, Led + XMIT_LED_CNT, 100);
+ SK_OUT8(IoC, Led + XMIT_LED_CTRL, LED_START);
+ break;
X case SK_LED_DIS:
X default:
X /*
X * Do NOT stop the LED Timer here. The LED might be
X * in on state. But it needs to go off.
X */
- SK_OUT32(IoC, Led+XMIT_LED_CNT, 0);
- SK_OUT8(IoC, Led+XMIT_LED_TST, LED_T_OFF);
- break ;
+ SK_OUT32(IoC, Led + XMIT_LED_CNT, 0);
+ SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_OFF);
+ break;
X }
X
X /*
@@ -441,7 +467,8 @@
X * (Broadcom: It may be that PHY_B_PEC_EN_LTR has to be set.)
X * (In this case it has to be added here. But we will see. XXX)
X */
-}
+} /* SkGeXmitLED */


+
X
X /******************************************************************************
X *

@@ -462,12 +489,12 @@
X * 1: configuration error
X */
X static int DoCalcAddr(


-SK_AC *pAC, /* adapter context */

-SK_GEPORT *pPrt, /* port index */
-int QuSize, /* size of the queue to configure in kB */
-SK_U32 *StartVal, /* start value for address calculation */
-SK_U32 *QuStartAddr, /* start addr to calculate */
-SK_U32 *QuEndAddr) /* end address to calculate */


+SK_AC *pAC, /* adapter context */

+SK_GEPORT *pPrt, /* port index */
+int QuSize, /* size of the queue to configure in kB */
+SK_U32 *StartVal, /* start value for address calculation */
+SK_U32 *QuStartAddr, /* start addr to calculate */
+SK_U32 *QuEndAddr) /* end address to calculate */
X {
X SK_U32 EndVal;
X SK_U32 NextStart;
@@ -495,7 +522,7 @@
X
X *StartVal = NextStart;
X return (Rtv);
-}
+} /* DoCalcAddr */
X
X
X /******************************************************************************
@@ -522,8 +549,8 @@
X * 1: Queue Size Configuration invalid
X */
X static int SkGeCheckQSize(


-SK_AC *pAC, /* adapter context */

-int Port) /* port index */


+SK_AC *pAC, /* adapter context */

+int Port) /* port index */
X {
X SK_GEPORT *pPrt;
X int UsedMem;
@@ -541,9 +568,7 @@
X (pPrt->PXSQSize & QZ_UNITS) ||
X (pPrt->PXAQSize & QZ_UNITS)) {
X
- SK_ERR_LOG(pAC, SK_ERRCL_SW,
- SKERR_HWI_E012,
- SKERR_HWI_E012MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG);
X Rtv = 1;
X goto CheckQSizeEnd;
X }
@@ -551,9 +576,7 @@
X UsedMem += pPrt->PRxQSize + pPrt->PXSQSize + pPrt->PXAQSize;
X
X if (i == Port && pPrt->PRxQSize < SK_MIN_RXQ_SIZE) {
- SK_ERR_LOG(pAC, SK_ERRCL_SW,
- SKERR_HWI_E011,
- SKERR_HWI_E011MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E011, SKERR_HWI_E011MSG);
X Rtv = 1;
X goto CheckQSizeEnd;


X }
@@ -585,17 +608,15 @@

X Rtv |= Rtv2;
X
X if (Rtv) {
- SK_ERR_LOG(pAC, SK_ERRCL_SW,
- SKERR_HWI_E013,
- SKERR_HWI_E013MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E013, SKERR_HWI_E013MSG);


X break;
X }
X }
X

-
X CheckQSizeEnd:
X return (Rtv);
-}
+} /* SkGeCheckQSize */


+
X
X /******************************************************************************
X *

@@ -634,7 +655,8 @@
X * There is not start or enable buttom to push, therefore
X * the MAC arbiter is configured and enabled now.
X */
-}
+} /* SkGeInitMacArb */


+
X
X /******************************************************************************
X *

@@ -661,16 +683,21 @@
X SK_OUT16(IoC, B3_PA_TOINI_TX1, SK_PKT_TO_MAX);
X SK_OUT16(IoC, B3_PA_TOINI_TX2, SK_PKT_TO_MAX);
X
- /* enable timeout timers if jumbo frames not used */
+ /*
+ * enable timeout timers if jumbo frames not used
+ * NOTE: the packet arbiter timeout interrupt is needed for


+ * half duplex hangup workaround

+ */
X if (pAC->GIni.GIPortUsage != SK_JUMBO_LINK) {
X if (pAC->GIni.GIMacsFound == 1) {
X SK_OUT16(IoC, B3_PA_CTRL, PA_ENA_TO_TX1);
X }
X else {
- SK_OUT16(IoC, B3_PA_CTRL,(PA_ENA_TO_TX1|PA_ENA_TO_TX2));
+ SK_OUT16(IoC, B3_PA_CTRL,(PA_ENA_TO_TX1 | PA_ENA_TO_TX2));
X }
X }
-}
+} /* SkGeInitPktArb */


+
X
X /******************************************************************************
X *

@@ -685,7 +712,7 @@
X static void SkGeInitMacFifo(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */

X {
X /*
X * For each FIFO:
@@ -708,7 +735,8 @@


X if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {

X SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_ENA_FLUSH);
X }
-}
+} /* SkGeInitMacFifo */


+
X
X /******************************************************************************
X *

@@ -732,7 +760,7 @@
X void SkGeLoadLnkSyncCnt(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */

X SK_U32 CntVal) /* Counter value */
X {
X SK_U32 OrgIMsk;
@@ -741,7 +769,7 @@
X SK_BOOL IrqPend;
X
X /* stop counter */
- SK_OUT8(IoC, MR_ADDR(Port,LNK_SYNC_CTRL), LED_STOP);
+ SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_STOP);
X
X /*
X * ASIC problem:
@@ -771,17 +799,18 @@
X }
X
X /* load counter */
- SK_OUT32(IoC, MR_ADDR(Port,LNK_SYNC_INI), CntVal);
+ SK_OUT32(IoC, MR_ADDR(Port, LNK_SYNC_INI), CntVal);
X
X /* start counter */
- SK_OUT8(IoC, MR_ADDR(Port,LNK_SYNC_CTRL), LED_START);
+ SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_START);
X
X if (!IrqPend) {
X /* clear the unexpected IRQ, and restore the interrupt mask */
- SK_OUT8(IoC, MR_ADDR(Port,LNK_SYNC_CTRL), LED_CLR_IRQ);
+ SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_CLR_IRQ);
X SK_OUT32(IoC, B0_IMSK, OrgIMsk);
X }
-}
+} /* SkGeLoadLnkSyncCnt*/


+
X
X /******************************************************************************
X *

@@ -814,10 +843,10 @@
X int SkGeCfgSync(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port, /* Port Index (MAC_1 + n) */
+int Port, /* Port Index (MAC_1 + n) */

X SK_U32 IntTime, /* Interval Timer Value in units of 8ns */
X SK_U32 LimCount, /* Number of bytes to transfer during IntTime */
-int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */
+int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */
X {
X int Rtv;
X
@@ -837,8 +866,7 @@
X IntTime = (IntTime / 2) * pAC->GIni.GIHstClkFact / 100;
X LimCount = LimCount / 8;
X if (IntTime > TXA_MAX_VAL || LimCount > TXA_MAX_VAL) {
- SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010,
- SKERR_HWI_E010MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG);
X Rtv = 1;
X goto CfgSyncEnd;
X }
@@ -853,14 +881,14 @@
X * - start 'Rate Control' and disable 'Force Sync'
X * if Interval Timer or Limit Counter not zero.
X */
- SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL),
+ SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
X TXA_ENA_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
- SK_OUT32(IoC, MR_ADDR(Port,TXA_ITI_INI), IntTime);
- SK_OUT32(IoC, MR_ADDR(Port,TXA_LIM_INI), LimCount);
- SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL),
+ SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), IntTime);
+ SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), LimCount);
+ SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
X (SyncMode & (TXA_ENA_ALLOC|TXA_DIS_ALLOC)));
X if (IntTime != 0 || LimCount != 0) {
- SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL),
+ SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
X TXA_DIS_FSYNC|TXA_START_RC);
X }
X }
@@ -871,7 +899,8 @@
X
X CfgSyncEnd:
X return (Rtv);
-}
+} /* SkGeCfgSync */


+
X
X /******************************************************************************
X *

@@ -885,12 +914,12 @@
X * nothing
X */
X static void DoInitRamQueue(


-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* IO context */

-int QuIoOffs, /* Queue IO Address Offset */


+SK_AC *pAC, /* adapter context */
+SK_IOC IoC, /* IO context */

+int QuIoOffs, /* Queue IO Address Offset */
X SK_U32 QuStartAddr, /* Queue Start Address */
-SK_U32 QuEndAddr, /* Queue End Address */
-int QuType) /* Queue Type (SK_RX_SRAM_Q|SK_RX_BRAM_Q|SK_TX_RAM_Q) */
+SK_U32 QuEndAddr, /* Queue End Address */
+int QuType) /* Queue Type (SK_RX_SRAM_Q|SK_RX_BRAM_Q|SK_TX_RAM_Q) */
X {
X SK_U32 RxUpThresVal;
X SK_U32 RxLoThresVal;
@@ -905,13 +934,13 @@
X QuEndAddr = QuEndAddr / 8;
X
X /* release local reset */
- SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), RB_RST_CLR);
+ SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_RST_CLR);
X
X /* configure addresses */
- SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_START), QuStartAddr);
- SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_END), QuEndAddr);
- SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_WP), QuStartAddr);
- SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RP), QuStartAddr);
+ SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_START), QuStartAddr);
+ SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_END), QuEndAddr);
+ SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_WP), QuStartAddr);
+ SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RP), QuStartAddr);
X
X switch (QuType) {
X case SK_RX_SRAM_Q:
@@ -922,10 +951,9 @@
X case SK_RX_BRAM_Q:
X /* write threshold for Rx Queue */
X
- SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RX_UTPP),
- RxUpThresVal);
- SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RX_LTPP),
- RxLoThresVal);
+ SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RX_UTPP), RxUpThresVal);
+ SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RX_LTPP), RxLoThresVal);
+
X /* the high priority threshold not used */
X break;
X case SK_TX_RAM_Q:
@@ -940,20 +968,20 @@
X * enable Store & Forward Mode for the
X * Tx Side
X */
- SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL),
- RB_ENA_STFWD);
+ SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_ENA_STFWD);


X }
X break;
X }
X

X /* set queue operational */
- SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), RB_ENA_OP_MD);
+ SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_ENA_OP_MD);
X }
X else {
X /* ensure the queue is still disabled */
- SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), RB_RST_SET);
+ SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_RST_SET);
X }
-}
+} /* DoInitRamQueue*/


+
X
X /******************************************************************************
X *

@@ -968,7 +996,7 @@
X static void SkGeInitRamBufs(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;

X int RxQType;
@@ -988,7 +1016,8 @@
X pPrt->PXsQRamEnd, SK_TX_RAM_Q);
X DoInitRamQueue(pAC, IoC, pPrt->PXaQOff, pPrt->PXaQRamStart,
X pPrt->PXaQRamEnd, SK_TX_RAM_Q);
-}
+} /* SkGeInitRamBufs */


+
X
X /******************************************************************************
X *

@@ -1023,7 +1052,8 @@
X SK_OUT8(IoC, B3_RI_RTO_R2, SK_RI_TO_53);
X SK_OUT8(IoC, B3_RI_RTO_XA2, SK_RI_TO_53);
X SK_OUT8(IoC, B3_RI_RTO_XS2, SK_RI_TO_53);
-}
+} /* SkGeInitRamIface */


+
X
X /******************************************************************************
X *

@@ -1038,33 +1068,34 @@
X static void SkGeInitBmu(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */
-int Port) /* Port Index (MAC_1 + n) */
+int Port) /* Port Index (MAC_1 + n) */
X {
X SK_GEPORT *pPrt;
X

X pPrt = &pAC->GIni.GP[Port];
X

X /* Rx Queue: Release all local resets and set the watermark */
- SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_CLR_RESET);
- SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_F), SK_BMU_RX_WM);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_CLR_RESET);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_F), SK_BMU_RX_WM);
X
X /*
X * Tx Queue: Release all local resets if the queue is used!
X * set watermark
X */
X if (pPrt->PXSQSize != 0) {
- SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), CSR_CLR_RESET);
- SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_F), SK_BMU_TX_WM);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_CLR_RESET);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_F), SK_BMU_TX_WM);
X }
X if (pPrt->PXAQSize != 0) {
- SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), CSR_CLR_RESET);
- SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_F), SK_BMU_TX_WM);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_CLR_RESET);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_F), SK_BMU_TX_WM);
X }
X /*
X * Do NOT enable the descriptor poll timers here, because
X * the descriptor addresses are not specified yet.
X */
-}
+} /* SkGeInitBmu */


+
X
X /******************************************************************************
X *

@@ -1082,17 +1113,18 @@
X static SK_U32 TestStopBit(
X SK_AC *pAC, /* Adapter Context */


X SK_IOC IoC, /* IO Context */

-int QuIoOffs) /* Queue IO Address Offset */
+int QuIoOffs) /* Queue IO Address Offset */
X {
X SK_U32 QuCsr; /* CSR contents */
X
- SK_IN32(IoC, Q_ADDR(QuIoOffs,Q_CSR), &QuCsr);
+ SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr);
X if ((QuCsr & (CSR_STOP|CSR_SV_IDLE)) == 0) {
- SK_OUT32(IoC, Q_ADDR(QuIoOffs,Q_CSR), CSR_STOP);
- SK_IN32(IoC, Q_ADDR(QuIoOffs,Q_CSR), &QuCsr);
+ SK_OUT32(IoC, Q_ADDR(QuIoOffs, Q_CSR), CSR_STOP);
+ SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr);
X }
X return (QuCsr);
-}
+} /* TestStopBit*/


+
X
X /******************************************************************************
X *

@@ -1174,10 +1206,10 @@
X */
X void SkGeStopPort(


X SK_AC *pAC, /* adapter context */

-SK_IOC IoC, /* IO context */

-int Port, /* port to stop (MAC_1 + n) */
-int Dir, /* Direction to Stop (SK_STOP_RX, SK_STOP_TX, SK_STOP_ALL) */
-int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */


+SK_IOC IoC, /* I/O context */

+int Port, /* port to stop (MAC_1 + n) */
+int Dir, /* Direction to Stop (SK_STOP_RX, SK_STOP_TX, SK_STOP_ALL) */
+int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
X {
X #ifndef SK_DIAG
X SK_EVPARA Para;
@@ -1187,18 +1219,17 @@
X SK_U16 Word;
X SK_U32 XsCsr;
X SK_U32 XaCsr;
- int i;
+ int i;
X SK_BOOL AllPortsDis;
X SK_U64 ToutStart;
- int ToutCnt;
+ int ToutCnt;


X
X pPrt = &pAC->GIni.GP[Port];
X

X if (Dir & SK_STOP_TX) {
X /* disable the XMACs receiver and transmitter */


X XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
- XM_OUT16(IoC, Port, XM_MMU_CMD,

- Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX));


+ XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX));
X

X /* dummy read to ensure writing */


X XM_IN16(IoC, Port, XM_MMU_CMD, &Word);

@@ -1208,15 +1239,15 @@
X * If the BMU is in the reset state CSR_STOP will terminate
X * immediately.
X */
- SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), CSR_STOP);
- SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), CSR_STOP);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_STOP);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_STOP);
X
X ToutStart = SkOsGetTime(pAC);
X ToutCnt = 0;
X do {
X /*
X * Clear packet arbiter timeout to make sure
- * this loop will terminate
+ * this loop will terminate.
X */


X if (Port == MAC_1) {

X Word = PA_CLR_TO_TX1;
@@ -1227,65 +1258,64 @@
X SK_OUT16(IoC, B3_PA_CTRL, Word);
X
X /*
- * If the transfer stucks at the XMAC the STOP command
- * will not terminate if we don't flush the XMACs
- * transmit FIFO !
+ * If the transfer stucks at the XMAC the STOP command will not
+ * terminate if we don't flush the XMAC's transmit FIFO!
X */
X XM_IN32(IoC, Port, XM_MODE, &DWord);
- DWord |= XM_MD_FTF ;
+ DWord |= XM_MD_FTF;
X XM_OUT32(IoC, Port, XM_MODE, DWord);
X
X XsCsr = TestStopBit(pAC, IoC, pPrt->PXsQOff);
X XaCsr = TestStopBit(pAC, IoC, pPrt->PXaQOff);
X
- if (ToutStart + (SK_TICKS_PER_SEC / 18) <
- SkOsGetTime(pAC)) {
-
+ if (SkOsGetTime(pAC) - ToutStart > (SK_TICKS_PER_SEC / 18)) {
X /*
X * Timeout of 1/18 second reached.
+ * This needs to be checked at 1/18 sec only.
X */
X ToutCnt++;
X switch (ToutCnt) {
X case 1:
X /*
- * Cache Incoherency workaround:
- * Assume a start command has been
- * lost while sending the frame.
+ * Cache Incoherency workaround: Assume a start command
+ * has been lost while sending the frame.
X */
X ToutStart = SkOsGetTime(pAC);
X if (XsCsr & CSR_STOP) {
- SK_OUT32(IoC,
- Q_ADDR(pPrt->PXsQOff,
- Q_CSR), CSR_START);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_START);
X }
X if (XaCsr & CSR_STOP) {
- SK_OUT32(IoC,
- Q_ADDR(pPrt->PXaQOff,
- Q_CSR), CSR_START);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_START);
X }
X break;
X case 2:
- default: /* Fatal Error, Loop aborted */
+ default:
+ /* Might be a problem when the driver event handler
+ * calls StopPort again.
+ * XXX.
+ */
+
+ /* Fatal Error, Loop aborted */
X /* Create an Error Log Entry */
- SK_ERR_LOG(pAC, SK_ERRCL_HW,
+ SK_ERR_LOG(
+ pAC,
+ SK_ERRCL_HW,
X SKERR_HWI_E018,
X SKERR_HWI_E018MSG);
X #ifndef SK_DIAG
X Para.Para64 = Port;
- SkEventQueue(pAC, SKGE_DRV,
- SK_DRV_PORT_FAIL, Para);
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
X #endif /* !SK_DIAG */
X return;
X }
X }
X
- /*
- * because of the ASIC problem report entry from 21.08.98
- * it is required to wait until CSR_STOP is reset and
- * CSR_SV_IDLE is set.
- */
- } while ((XsCsr & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE ||
- (XaCsr & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE);
+ /*
+ * Because of the ASIC problem report entry from 21.08.1998 it is
+ * required to wait until CSR_STOP is reset and CSR_SV_IDLE is set.
+ */
+ } while ((XsCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE ||
+ (XaCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE);
X
X /* reset the XMAC depending on the RstMode */
X if (RstMode == SK_SOFT_RST) {
@@ -1299,10 +1329,10 @@
X * Stop Interval Timer and Limit Counter of Tx Arbiter,
X * also disable Force Sync bit and Enable Alloc bit.
X */
- SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL),
+ SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
X TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
- SK_OUT32(IoC, MR_ADDR(Port,TXA_ITI_INI), 0x00000000L);
- SK_OUT32(IoC, MR_ADDR(Port,TXA_LIM_INI), 0x00000000L);
+ SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), 0x00000000L);
+ SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), 0x00000000L);
X
X /*
X * perform a local reset of the port's tx path
@@ -1312,16 +1342,16 @@
X * - reset the RAM Butter sync tx queue
X * - reset the MAC Tx FIFO
X */
- SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), CSR_SET_RESET);
- SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), CSR_SET_RESET);
- SK_OUT8(IoC, RB_ADDR(pPrt->PXaQOff,RB_CTRL), RB_RST_SET);
- SK_OUT8(IoC, RB_ADDR(pPrt->PXsQOff,RB_CTRL), RB_RST_SET);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_SET_RESET);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_SET_RESET);
+ SK_OUT8(IoC, RB_ADDR(pPrt->PXaQOff, RB_CTRL), RB_RST_SET);
+ SK_OUT8(IoC, RB_ADDR(pPrt->PXsQOff, RB_CTRL), RB_RST_SET);
X /* Note: MFF_RST_SET does NOT reset the XMAC! */
X SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_RST_SET);
X
X /* switch Link and Tx LED off, stop the LED counters */
X /* Link LED is switched off by the RLMT and the Diag itself */
- SkGeXmitLED(pAC, IoC, MR_ADDR(Port,TX_LED_INI), SK_LED_DIS);
+ SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_DIS);
X }
X
X if (Dir & SK_STOP_RX) {
@@ -1332,7 +1362,7 @@
X * stop the transfer of received packets.
X */
X /* stop the port's receive queue */
- SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_STOP);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_STOP);
X i = 100;
X do {
X /*
@@ -1352,13 +1382,13 @@
X i--;
X }
X
- /* finish if CSR_STOP is done or CSR_SV_IDLE is true and i==0 */
- /*
- * because of the ASIC problem report entry from 21.08.98
- * it is required to wait until CSR_STOP is reset and
- * CSR_SV_IDLE is set.
- */
- } while ((DWord & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE &&
+ /* finish if CSR_STOP is done or CSR_SV_IDLE is true and i==0 */
+ /*
+ * because of the ASIC problem report entry from 21.08.98
+ * it is required to wait until CSR_STOP is reset and
+ * CSR_SV_IDLE is set.
+ */
+ } while ((DWord & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE &&
X ((DWord & CSR_SV_IDLE) == 0 || i != 0));
X
X /* The path data transfer activity is fully stopped now. */
@@ -1369,12 +1399,12 @@
X * - reset the RAM Buffer receive queue
X * - reset the MAC Rx FIFO
X */
- SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_SET_RESET);
- SK_OUT8(IoC, RB_ADDR(pPrt->PRxQOff,RB_CTRL), RB_RST_SET);
+ SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_SET_RESET);
+ SK_OUT8(IoC, RB_ADDR(pPrt->PRxQOff, RB_CTRL), RB_RST_SET);
X SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_RST_SET);
X
X /* switch Rx LED off, stop the LED counter */
- SkGeXmitLED(pAC, IoC, MR_ADDR(Port,RX_LED_INI), SK_LED_DIS);
+ SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_DIS);
X
X }
X
@@ -1392,7 +1422,8 @@
X if (AllPortsDis) {
X pAC->GIni.GIAnyPortAct = SK_FALSE;
X }
-}
+} /* SkGeStopPort */


+
X
X /******************************************************************************
X *

@@ -1422,6 +1453,7 @@


X pPrt->PIsave = 0;

X pPrt->PPrevShorts = 0;


X pPrt->PLinkResCt = 0;
+ pPrt->PAutoNegTOCt = 0;

X pPrt->PPrevRx = 0;
X pPrt->PPrevFcs = 0;
X pPrt->PRxLim = SK_DEF_RX_WA_LIM;
@@ -1445,7 +1477,88 @@
X
X pAC->GIni.GIPortUsage = SK_RED_LINK;
X pAC->GIni.GIAnyPortAct = SK_FALSE;
-}
+} /* SkGeInit0*/
+
+#ifdef SK_PCI_RESET
+
+/******************************************************************************
+ *
+ * SkGePciReset() - Reset PCI interface


+ *
+ * Description:

+ * o Read PCI configuration.
+ * o Change power state to 3.
+ * o Change power state to 0.
+ * o Restore PCI configuration.


+ *
+ * Returns:

+ * 0: Success.
+ * 1: Power state could not be changed to 3.
+ */
+static int SkGePciReset(


+SK_AC *pAC, /* adapter context */

+SK_IOC IoC) /* IO context */
+{
+ int i;
+ SK_U16 PmCtlSts;
+ SK_U32 Bp1;
+ SK_U32 Bp2;
+ SK_U16 PciCmd;
+ SK_U8 Cls;
+ SK_U8 Lat;
+ SK_U8 ConfigSpace[PCI_CFG_SIZE];
+
+ /*
+ * Note: Switching to D3 state is like a software reset.
+ * Switching from D3 to D0 is a hardware reset.
+ * We have to save and restore the configuration space.
+ */
+ for (i = 0; i < PCI_CFG_SIZE; i++) {
+ SkPciReadCfgDWord(pAC, i*4, &ConfigSpace[i]);
+ }
+
+ /* We know the RAM Interface Arbiter is enabled. */
+ SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D3);
+ SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts);
+ if ((PmCtlSts & PCI_PM_STATE) != PCI_PM_STATE_D3) {
+ return (1);
+ }
+
+ /*
+ * Return to D0 state.
+ */
+ SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D0);
+
+ /* Check for D0 state. */
+ SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts);
+ if ((PmCtlSts & PCI_PM_STATE) != PCI_PM_STATE_D0) {
+ return (1);
+ }
+
+ /*
+ * Check PCI Config Registers.
+ */
+ SkPciReadCfgWord(pAC, PCI_COMMAND, &PciCmd);
+ SkPciReadCfgByte(pAC, PCI_CACHE_LSZ, &Cls);
+ SkPciReadCfgDWord(pAC, PCI_BASE_1ST, &Bp1);
+ SkPciReadCfgDWord(pAC, PCI_BASE_2ND, &Bp2);
+ SkPciReadCfgByte(pAC, PCI_LAT_TIM, &lat);
+ if (PciCmd != 0 || Cls != 0 || (Bp1 & 0xfffffff0L) != 0 || Bp2 != 1 ||
+ Lat != 0 ) {
+ return (0);
+ }
+
+ /*
+ * Restore Config Space.
+ */
+ for (i = 0; i < PCI_CFG_SIZE; i++) {
+ SkPciWriteCfgDWord(pAC, i*4, ConfigSpace[i]);
+ }
+
+ return (0);
+} /* SkGePciReset */
+
+#endif /* SK_PCI_RESET */


X
X /******************************************************************************
X *

@@ -1478,6 +1591,10 @@
X
X RetVal = 0;
X
+#ifdef SK_PCI_RESET
+ (void)SkGePciReset(pAC, IoC);
+#endif /* SK_PCI_RESET */
+
X /* Do the reset */
X SK_OUT8(IoC, B0_CTST, CS_RST_SET);
X
@@ -1487,7 +1604,7 @@
X /* Reset all error bits in the PCI STATUS register */
X /*
X * Note: Cfg cycles cannot be used, because they are not
- * available on some platforms after 'boot time'.
+ * available on some platforms after 'boot time'.
X */
X SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
X SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
@@ -1548,12 +1665,13 @@
X break;
X }
X }
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_INIT,
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
X ("PHY type: %d PHY addr: %x\n", pAC->GIni.GP[i].PhyType,
- pAC->GIni.GP[i].PhyAddr)) ;
+ pAC->GIni.GP[i].PhyAddr));
X
X return (RetVal);
-}
+} /* SkGeInit1*/


+
X
X /******************************************************************************
X *

@@ -1589,8 +1707,7 @@
X pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX;
X
X /* Create an Error Log Entry */
- SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E017,
- SKERR_HWI_E017MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E017, SKERR_HWI_E017MSG);
X }
X SK_OUT32(IoC, B28_DPT_INI, pAC->GIni.GIPollTimerVal);
X SK_OUT8(IoC, B28_DPT_CTRL, DPT_START);
@@ -1608,9 +1725,9 @@
X SkGeInitPktArb(pAC, IoC);
X
X /* enable the Tx Arbiters */
- SK_OUT8(IoC, MR_ADDR(MAC_1,TXA_CTRL), TXA_ENA_ARB);
+ SK_OUT8(IoC, MR_ADDR(MAC_1, TXA_CTRL), TXA_ENA_ARB);
X if (pAC->GIni.GIMacsFound > 1) {
- SK_OUT8(IoC, MR_ADDR(MAC_2,TXA_CTRL), TXA_ENA_ARB);
+ SK_OUT8(IoC, MR_ADDR(MAC_2, TXA_CTRL), TXA_ENA_ARB);
X }
X
X /* enable the RAM Interface Arbiter */
@@ -1621,8 +1738,19 @@


X if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {

X pPrt->PRxCmd |= XM_RX_BIG_PK_OK;
X }
+
+ if (pPrt->PLinkModeConf == SK_LMODE_HALF) {
+ /*
+ * If in manual half duplex mode
+ * the other side might be in full duplex mode
+ * so ignore if a carrier extension is not seen on
+ * frames received
+ */
+ pPrt->PRxCmd |= XM_RX_DIS_CEXT;
+ }
+
X }
-}
+} /* SkGeInit2 */


X
X /******************************************************************************
X *

@@ -1661,24 +1789,24 @@
X int SkGeInit(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */

-int Level) /* initialization level */
+int Level) /* initialization level */
X {

X int RetVal; /* return value */
X SK_U32 DWord;
X
X RetVal = 0;
- SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_INIT,
- ("SkGeInit(Level %d)\n",Level)) ;
+ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
+ ("SkGeInit(Level %d)\n", Level));
X
X switch (Level) {
X case SK_INIT_DATA:
X /* Initialization Level 0 */
- SkGeInit0(pAC,IoC) ;
+ SkGeInit0(pAC, IoC);
X pAC->GIni.GILevel = SK_INIT_DATA;
X break;
X case SK_INIT_IO:
X /* Initialization Level 1 */
- RetVal = SkGeInit1(pAC,IoC) ;
+ RetVal = SkGeInit1(pAC, IoC);
X
X /* Check if the adapter seems to be accessable */
X SK_OUT32(IoC, B2_IRQM_INI, 0x11335577L);
@@ -1702,13 +1830,12 @@
X /* Initialization Level 2 */
X if (pAC->GIni.GILevel != SK_INIT_IO) {
X #ifndef SK_DIAG
- SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E002,
- SKERR_HWI_E002MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E002, SKERR_HWI_E002MSG);
X #endif
X RetVal = 4;
X break;
X }
- SkGeInit2(pAC,IoC) ;
+ SkGeInit2(pAC, IoC);
X
X /* Level 2 successfully passed */
X pAC->GIni.GILevel = SK_INIT_RUN;
@@ -1716,12 +1843,13 @@
X default:
X /* Create an Error Log Entry */
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E003, SKERR_HWI_E003MSG);
- RetVal = 3 ;
+ RetVal = 3;
X break;
X }
X
X return (RetVal);
-}
+} /* SkGeInit*/


+
X
X /******************************************************************************
X *

@@ -1741,6 +1869,9 @@
X int i;
X SK_U16 Word;
X
+ /* Ensure I2C is ready. */
+ SkI2cWaitIrq(pAC, IoC);
+
X /* Stop all current transfer activity */
X for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
X if (pAC->GIni.GP[i].PState != SK_PRT_STOP &&
@@ -1762,7 +1893,8 @@
X
X /* Do the reset, all LEDs are switched off now */
X SK_OUT8(IoC, B0_CTST, CS_RST_SET);
-}
+} /* SkGeDeInit*/


+
X
X /******************************************************************************
X *

@@ -1791,18 +1923,18 @@
X * for PRxQSize, PXSQSize, or PXAQSize are invalid for one
X * or more queues. The specified port was NOT initialized.
X * An error log entry was generated.
- * 2: The port has to be stopped before it can be initilaized again.
+ * 2: The port has to be stopped before it can be initialized again.
X */
X int SkGeInitPort(


X SK_AC *pAC, /* adapter context */
X SK_IOC IoC, /* IO context */

-int Port) /* Port to configure */
+int Port) /* Port to configure */


X {
X SK_GEPORT *pPrt;
X

X pPrt = &pAC->GIni.GP[Port];
X

- if (SkGeCheckQSize(pAC,Port) != 0) {
+ if (SkGeCheckQSize(pAC, Port) != 0) {
X SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E004, SKERR_HWI_E004MSG);
X return (1);
X }
@@ -1818,8 +1950,8 @@
X * If 1000BT Phy needs LED initialization than swap
X * LED and XMAC initialization order
X */
- SkGeXmitLED(pAC, IoC, MR_ADDR(Port,TX_LED_INI), SK_LED_ENA);
- SkGeXmitLED(pAC, IoC, MR_ADDR(Port,RX_LED_INI), SK_LED_ENA);
+ SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA);
+ SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_ENA);
X /* The Link LED is initialized by RLMT or Diagnostics itself */
X
X /* Do NOT initialize the Link Sync Counter */
@@ -1845,4 +1977,4 @@
X pAC->GIni.GIAnyPortAct = SK_TRUE;


X
X return (0);
-}

+} /* SkGeInitPort */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/net/sk98lin/skgepnmi.c linux/drivers/net/sk98lin/skgepnmi.c
--- v2.2.19/drivers/net/sk98lin/skgepnmi.c Sun Mar 25 17:31:22 2001
+++ linux/drivers/net/sk98lin/skgepnmi.c Wed Oct 10 01:41:03 2001


@@ -2,16 +2,15 @@
X *

X * Name: skgepnmi.c


X * Project: GEnesis, PCI Gigabit Ethernet Adapter

- * Version: $Revision: 1.72 $
- * Date: $Date: 1999/12/06 16:15:53 $
+ * Version: $Revision: 1.87 $
+ * Date: $Date: 2001/04/06 13:35:09 $
X * Purpose: Private Network Management Interface
X *
X ****************************************************************************/


X
X /******************************************************************************
X *
- * (C)Copyright 1998,1999 SysKonnect,
- * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
+ * (C)Copyright 1998-2001 SysKonnect GmbH.
X *

X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by

@@ -27,6 +26,65 @@


X * History:
X *

X * $Log: skgepnmi.c,v $
+ * Revision 1.87 2001/04/06 13:35:09 mkunz
+ * -Bugs fixed in handling of OID_SKGE_MTU and the VPD OID's
+ *
+ * Revision 1.86 2001/03/09 09:18:03 mkunz
+ * Changes in SK_DBG_MSG
+ *
+ * Revision 1.85 2001/03/08 09:37:31 mkunz
+ * Bugfix in ResetCounter for Pnmi.Port structure
+ *
+ * Revision 1.84 2001/03/06 09:04:55 mkunz
+ * Made some changes in instance calculation
+ * C ^VS:
+ *
+ * Revision 1.83 2001/02/15 09:15:32 mkunz
+ * Necessary changes for dual net mode added
+ *
+ * Revision 1.82 2001/02/07 08:24:19 mkunz
+ * -Made changes in handling of OID_SKGE_MTU
+ *
+ * Revision 1.81 2001/02/06 09:58:00 mkunz
+ * -Vpd bug fixed
+ * -OID_SKGE_MTU added
+ * -pnmi support for dual net mode. Interface function and macros extended
+ *
+ * Revision 1.80 2001/01/22 13:41:35 rassmann


+ * Supporting two nets on dual-port adapters.

+ *
+ * Revision 1.79 2000/12/05 14:57:40 cgoos
+ * SetStruct failed before first Link Up (link mode of virtual
+ * port "INDETERMINATED").
+ *
+ * Revision 1.78 2000/09/12 10:44:58 cgoos
+ * Fixed SK_PNMI_STORE_U32 calls with typecasted argument.
+ *
+ * Revision 1.77 2000/09/07 08:10:19 rwahl
+ * - Modified algorithm for 64bit NDIS statistic counters;
+ * returns 64bit or 32bit value depending on passed buffer
+ * size. Indicate capability for 64bit NDIS counter, if passed
+ * buffer size is zero. OID_GEN_XMIT_ERROR, OID_GEN_RCV_ERROR,
+ * and OID_GEN_RCV_NO_BUFFER handled as 64bit counter, too.
+ * - corrected OID_SKGE_RLMT_PORT_PREFERRED.
+ *
+ * Revision 1.76 2000/08/03 15:23:39 rwahl
+ * - Correction for FrameTooLong counter has to be moved to OID handling
+ * routines (instead of statistic counter routine).
+ * - Fix in XMAC Reset Event handling: Only offset counter for hardware
+ * statistic registers are updated.
+ *
+ * Revision 1.75 2000/08/01 16:46:05 rwahl
+ * - Added StatRxLongFrames counter and correction of FrameTooLong counter.


+ * - Added directive to control width (default = 32bit) of NDIS statistic
+ * counters (SK_NDIS_64BIT_CTR).

+ *
+ * Revision 1.74 2000/07/04 11:41:53 rwahl
+ * - Added volition connector type.
+ *
+ * Revision 1.73 2000/03/15 16:33:10 rwahl
+ * Fixed bug 10510; wrong reset of virtual port statistic counters.
+ *
X * Revision 1.72 1999/12/06 16:15:53 rwahl
X * Fixed problem of instance range for current and factory MAC address.
X *
@@ -44,7 +102,7 @@
X *
X * Revision 1.67 1999/09/22 09:53:20 rwahl
X * - Read Broadcom register for updating fcs error counter (1000Base-T).
- *
+ *
X * Revision 1.66 1999/08/26 13:47:56 rwahl
X * Added SK_DRIVER_SENDEVENT when queueing RLMT_CHANGE_THRES trap.
X *
@@ -53,7 +111,7 @@
X *
X * Revision 1.64 1999/05/20 09:24:12 cgoos
X * Changes for 1000Base-T (sensors, Master/Slave).
- *
+ *
X * Revision 1.63 1999/04/13 15:11:58 mhaveman
X * Moved include of rlmt.h to header skgepnmi.h because some macros
X * are needed there.
@@ -157,7 +215,7 @@
X * Revision 1.43 1998/12/03 14:18:10 mhaveman
X * -Fixed problem in PnmiSetStruct. It was impossible to set any value.
X * -Removed VPD key evaluation for VPD_FREE_BYTES and VPD_ACTION.
- *
+ *
X * Revision 1.42 1998/12/03 11:31:47 mhaveman
X * Inserted cast to satisfy lint.
X *
@@ -192,7 +250,7 @@
X *
X * Revision 1.35 1998/11/16 07:45:34 mhaveman
X * SkAddrOverride now returns value and will be checked.
- *
+ *
X * Revision 1.34 1998/11/10 13:40:37 mhaveman
X * Needed to change interface, because NT driver needs a return value
X * of needed buffer space on TOO_SHORT errors. Therefore all
@@ -212,7 +270,7 @@
X * Revision 1.30 1998/11/03 12:04:46 mhaveman
X * Fixed problem in SENSOR_VALUE, which wrote beyond the buffer end
X * Fixed alignment problem with CHIPSET.
- *
+ *
X * Revision 1.29 1998/11/02 11:23:54 mhaveman
X * Corrected SK_ERROR_LOG to SK_ERR_LOG. Sorry.
X *
@@ -242,14 +300,14 @@
X * -Fixed sequence of error return code (INSTANCE -> ACCESS -> SHORT)
X * -Changed type of parameter Instance back to SK_U32 because of VPD
X * -Updated new VPD function calls
- *
+ *
X * Revision 1.23 1998/10/23 10:16:37 mhaveman
X * Fixed bugs after buffer test simulation.
X *
X * Revision 1.22 1998/10/21 13:23:52 mhaveman
X * -Call syntax of SkOsGetTime() changed to SkOsGetTime(pAc).
X * -Changed calculation of hundrets of seconds.
- *
+ *
X * Revision 1.20 1998/10/20 07:30:45 mhaveman
X * Made type changes to unsigned integer where possible.
X *
@@ -263,12 +321,12 @@
X * to HWACCESS.
X * -Provided all MEMCPY/MEMSET macros with (char *) pointers, because
X * Solaris throwed warnings when mapping to bcopy/bset.
- *
+ *
X * Revision 1.17 1998/10/13 07:42:01 mhaveman
X * -Added OIDs OID_SKGE_TRAP_NUMBER and OID_SKGE_ALL_DATA
X * -Removed old cvs history entries
X * -Renamed MacNumber to PortNumber
- *
+ *
X * Revision 1.16 1998/10/07 10:52:49 mhaveman
X * -Inserted handling of some OID_GEN_ Ids for windows
X * -Fixed problem with 803.2 statistic.


@@ -304,7 +362,7 @@
X

X

X static const char SysKonnectFileId[] =

- "@(#) $Id: skgepnmi.c,v 1.72 1999/12/06 16:15:53 rwahl Exp $"
+ "@(#) $Id: skgepnmi.c,v 1.87 2001/04/06 13:35:09 mkunz Exp $"
X " (C) SysKonnect.";
X
X #include "h/skdrv1st.h"
@@ -328,14 +386,17 @@
X */
X int SkPnmiInit(SK_AC *pAC, SK_IOC IoC, int level);
X int SkPnmiGetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,


- unsigned int *pLen, SK_U32 Instance);
+ unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);

X int SkPnmiPreSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,


- unsigned int *pLen, SK_U32 Instance);
+ unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);

X int SkPnmiSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,


- unsigned int *pLen, SK_U32 Instance);

-int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, unsigned int *pLen);
-int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, unsigned int *pLen);
-int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, unsigned int *pLen);
+ unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
+int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,


+ unsigned int *pLen, SK_U32 NetIndex);

+int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,

+ unsigned int *pLen, SK_U32 NetIndex);

+int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,

+ unsigned int *pLen, SK_U32 NetIndex);

X int SkPnmiEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Param);
X
X
@@ -344,7 +405,7 @@
X */
X static int Addr(SK_AC *pAC, SK_IOC IoC, int action,
X SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static SK_U8 CalculateLinkModeStatus(SK_AC *pAC, SK_IOC IoC, unsigned int
X PhysPortIndex);
X static SK_U8 CalculateLinkStatus(SK_AC *pAC, SK_IOC IoC, unsigned int
@@ -353,14 +414,14 @@
X static void CopyTrapQueue(SK_AC *pAC, char *pDstBuf);
X static int CsumStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int General(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static SK_U64 GetPhysStatVal(SK_AC *pAC, SK_IOC IoC,
X unsigned int PhysPortIndex, unsigned int StatIndex);
X static SK_U64 GetStatVal(SK_AC *pAC, SK_IOC IoC, unsigned int LogPortIndex,
- unsigned int StatIndex);
+ unsigned int StatIndex, SK_U32 NetIndex);
X static char* GetTrapEntry(SK_AC *pAC, SK_U32 TrapId, unsigned int Size);
X static void GetTrapQueueLen(SK_AC *pAC, unsigned int *pLen,
X unsigned int *pEntries);
@@ -369,50 +430,50 @@
X static int LookupId(SK_U32 Id);
X static int Mac8023Stat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int MacPrivateConf(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int MacPrivateStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int MacUpdate(SK_AC *pAC, SK_IOC IoC, unsigned int FirstMac,
X unsigned int LastMac);
X static int Monitor(SK_AC *pAC, SK_IOC IoC, int action,
X SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int OidStruct(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int Perform(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int* pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int PnmiStruct(SK_AC *pAC, SK_IOC IoC, int Action, char *pBuf,


- unsigned int *pLen);
+ unsigned int *pLen, SK_U32 NetIndex);

X static int PnmiVar(SK_AC *pAC, SK_IOC IoC, int Action, SK_U32 Id,
- char *pBuf, unsigned int *pLen, SK_U32 Instance);
+ char *pBuf, unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
X static void QueueRlmtNewMacTrap(SK_AC *pAC, unsigned int ActiveMac);
X static void QueueRlmtPortTrap(SK_AC *pAC, SK_U32 TrapId,
X unsigned int PortIndex);
X static void QueueSensorTrap(SK_AC *pAC, SK_U32 TrapId,
X unsigned int SensorIndex);
X static void QueueSimpleTrap(SK_AC *pAC, SK_U32 TrapId);
-static void ResetCounter(SK_AC *pAC, SK_IOC IoC);
+static void ResetCounter(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex);
X static int Rlmt(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int RlmtStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
-static int RlmtUpdate(SK_AC *pAC, SK_IOC IoC);
+ unsigned int TableIndex, SK_U32 NetIndex);
+static int RlmtUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex);
X static int SensorStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X static int SirqUpdate(SK_AC *pAC, SK_IOC IoC);
X static void VirtualConf(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, char *pBuf);
X static int Vpd(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
X char *pBuf, unsigned int *pLen, SK_U32 Instance,
- unsigned int TableIndex);
+ unsigned int TableIndex, SK_U32 NetIndex);
X
X
X /******************************************************************************
@@ -990,6 +1051,11 @@
X sizeof(SK_PNMI_STAT),
X SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxUnicastOkCts),
X SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_UNICAST},
+ {OID_SKGE_STAT_RX_LONGFRAMES,
+ SK_PNMI_MAC_ENTRIES,
+ sizeof(SK_PNMI_STAT),
+ SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxLongFramesCts),
+ SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_LONGFRAMES},
X {OID_SKGE_STAT_RX_PFLOWC,
X SK_PNMI_MAC_ENTRIES,
X sizeof(SK_PNMI_STAT),
@@ -1205,7 +1271,7 @@
X 0,
X SK_PNMI_MAI_OFF(RlmtPortActive),
X SK_PNMI_RO, Rlmt, 0},
- {OID_SKGE_RLMT_PORT_PREFERED,
+ {OID_SKGE_RLMT_PORT_PREFERRED,
X 1,
X 0,
X SK_PNMI_MAI_OFF(RlmtPortPreferred),
@@ -1290,11 +1356,16 @@
X sizeof(SK_PNMI_RLMT_MONITOR),
X SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorAdmin),
X SK_PNMI_RW, Monitor, 0},
+ {OID_SKGE_MTU,
+ 1,
+ 0,
+ SK_PNMI_MAI_OFF(MtuSize),
+ SK_PNMI_RW, MacPrivateConf, 0},
X };
X
X /*
X * Table for hardware register saving on resets and port switches
-*/
+ */
X static const SK_PNMI_STATADDR StatAddress[SK_PNMI_MAX_IDX] = {
X /* 0 */ {TRUE, XM_TXF_OK},
X /* 1 */ {TRUE, 0},
@@ -1361,7 +1432,8 @@
X /* 62 */ {TRUE, XM_RXF_1023B},
X /* 63 */ {TRUE, XM_RXF_MAX_SZ},
X /* 64 */ {FALSE, 0},
- /* 65 */ {FALSE, 0}
+ /* 65 */ {FALSE, 0},
+ /* 66 */ {TRUE, 0}
X };
X
X
@@ -1411,6 +1483,7 @@
X for (PortIndex = 0; PortIndex < SK_MAX_MACS; PortIndex ++) {
X
X pAC->Pnmi.Port[PortIndex].ActiveFlag = SK_FALSE;


+ pAC->Pnmi.DualNetActiveFlag = SK_FALSE;

X }
X break;
X
@@ -1528,6 +1601,10 @@
X pAC->Pnmi.Connector = 5;
X break;
X
+ case 'V':
+ pAC->Pnmi.Connector = 6;


+ break;
+
X default:

X pAC->Pnmi.Connector = 1;
X break;
@@ -1562,7 +1639,7 @@
X *


X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed

- * SK_PNMI_ERR_GENERAL A general severe internal error occured

+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred

X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take
X * the data.
X * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown
@@ -1577,14 +1654,15 @@
X SK_U32 Id, /* Object ID that is to be processed */
X void *pBuf, /* Buffer to which to mgmt data will be retrieved */


X unsigned int *pLen, /* On call: buffer length. On return: used buffer */

-SK_U32 Instance) /* Instance (1..n) that is to be queried or -1 */
+SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */


+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {

X SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
- ("PNMI: SkPnmiGetVar: Called, Id=0x%x, BufLen=%d\n", Id,
- *pLen));
+ ("PNMI: SkPnmiGetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n",
+ Id, *pLen, Instance, NetIndex));
X
X return (PnmiVar(pAC, IoC, SK_PNMI_GET, Id, (char *)pBuf, pLen,
- Instance));
+ Instance, NetIndex));
X }
X
X /*****************************************************************************
@@ -1600,7 +1678,7 @@
X *


X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is

X * needed, but a 16 bit value was passed).
@@ -1619,14 +1697,16 @@
X SK_U32 Id, /* Object ID that is to be processed */
X void *pBuf, /* Buffer which stores the mgmt data to be set */


X unsigned int *pLen, /* Total length of mgmt data */
-SK_U32 Instance) /* Instance (1..n) that is to be set or -1 */

+SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */


+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {

X SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
- ("PNMI: SkPnmiPreSetVar: Called, Id=0x%x, BufLen=%d\n",
- Id, *pLen));
+ ("PNMI: SkPnmiPreSetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n",
+ Id, *pLen, Instance, NetIndex));
+
X
X return (PnmiVar(pAC, IoC, SK_PNMI_PRESET, Id, (char *)pBuf, pLen,
- Instance));
+ Instance, NetIndex));
X }
X
X /*****************************************************************************
@@ -1642,7 +1722,7 @@
X *


X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed.
- * SK_PNMI_ERR_GENERAL A general severe internal error occured.
+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred.
X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
X * the correct data (e.g. a 32bit value is

X * needed, but a 16 bit value was passed).
@@ -1661,14 +1741,15 @@
X SK_U32 Id, /* Object ID that is to be processed */
X void *pBuf, /* Buffer which stores the mgmt data to be set */


X unsigned int *pLen, /* Total length of mgmt data */
-SK_U32 Instance) /* Instance (1..n) that is to be set or -1 */

+SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */


+SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
X {

X SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
- ("PNMI: SkPnmiSetVar: Called, Id=0x%x, BufLen=%d\n", Id,
- *pLen));
+ ("PNMI: SkPnmiSetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n",
+ Id, *pLen, Instance, NetIndex));
X
X return (PnmiVar(pAC, IoC, SK_PNMI_SET, Id, (char *)pBuf, pLen,
- Instance));
+ Instance, NetIndex));
X }
X
X /*****************************************************************************
@@ -1685,16 +1766,18 @@
X *


X * Returns:
X * SK_PNMI_ERR_OK The request was successfully performed

- * SK_PNMI_ERR_GENERAL A general severe internal error occured

+ * SK_PNMI_ERR_GENERAL A general severe internal error occurred

X * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 31'
echo 'File patch-2.2.20 is continued in part 32'
echo "32" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:48 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part49

#!/bin/sh -x
# this is part 49 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 49; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- else
- *wbuf = wval;

+ for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
+ wval = AscReadEEPWord( iop_base, ( uchar )s_addr ) ;
+ if (s_addr <= uchar_end_in_config) {
+ /*
+ * Swap all char fields - must unswap bytes already swapped
+ * by AscReadEEPWord().
+ */
+ *wbuf = le16_to_cpu(wval);
+ } else {
+ /* Don't swap word field at the end - cntl field. */
+ *wbuf = wval;
+ }
+ sum += wval; /* Checksum treats all EEPROM data as words. */
X }
+ /*
+ * Read the checksum word which will be compared against 'sum'
+ * by the caller. Word field already swapped.
+ */
X *wbuf = AscReadEEPWord(iop_base, (uchar) s_addr);
- if (charfields)
- *wbuf = cpu_to_le16(*wbuf);
X return (sum);
X }
X
@@ -15219,15 +13049,19 @@
X )
X {
X int n_error;
- ushort *wbuf;
+ ushort *wbuf;
+ ushort word;
X ushort sum;
X int s_addr;


X int cfg_beg;
X int cfg_end;
+ int uchar_end_in_config = ASC_EEP_MAX_DVC_ADDR - 2;

+


X
X wbuf = (ushort *) cfg_buf;

X n_error = 0;
X sum = 0;
+ /* Write two config words; AscWriteEEPWord() will swap bytes. */
X for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) {
X sum += *wbuf;
X if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) {
@@ -15241,29 +13075,66 @@


X cfg_beg = ASC_EEP_DVC_CFG_BEG;
X cfg_end = ASC_EEP_MAX_DVC_ADDR;
X }
- for (s_addr = cfg_beg; s_addr <= (cfg_end - 1);
- s_addr++, wbuf++) {

- sum += *wbuf;
- if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) {
- n_error++;
+ for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
+ if (s_addr <= uchar_end_in_config) {
+ /*
+ * This is a char field. Swap char fields before they are
+ * swapped again by AscWriteEEPWord().
+ */
+ word = cpu_to_le16(*wbuf);
+ if (word != AscWriteEEPWord( iop_base, (uchar) s_addr, word)) {
+ n_error++;
+ }
+ } else {
+ /* Don't swap word field at the end - cntl field. */
+ if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) {
+ n_error++;
+ }
X }
+ sum += *wbuf; /* Checksum calculated from word values. */
X }
+ /* Write checksum word. It will be swapped by AscWriteEEPWord(). */
X *wbuf = sum;
X if (sum != AscWriteEEPWord(iop_base, (uchar) s_addr, sum)) {
X n_error++;
X }
+
+ /* Read EEPROM back again. */


X wbuf = (ushort *) cfg_buf;

+ /*
+ * Read two config words; Byte-swapping done by AscReadEEPWord().
+ */
X for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) {
X if (*wbuf != AscReadEEPWord(iop_base, (uchar) s_addr)) {
X n_error++;
X }
X }
- for (s_addr = cfg_beg; s_addr <= cfg_end;
- s_addr++, wbuf++) {
- if (*wbuf != AscReadEEPWord(iop_base, (uchar) s_addr)) {
+ if (bus_type & ASC_IS_VL) {
+ cfg_beg = ASC_EEP_DVC_CFG_BEG_VL;
+ cfg_end = ASC_EEP_MAX_DVC_ADDR_VL;
+ } else {
+ cfg_beg = ASC_EEP_DVC_CFG_BEG;
+ cfg_end = ASC_EEP_MAX_DVC_ADDR;
+ }
+ for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
+ if (s_addr <= uchar_end_in_config) {
+ /*
+ * Swap all char fields. Must unswap bytes already swapped
+ * by AscReadEEPWord().
+ */
+ word = le16_to_cpu(AscReadEEPWord(iop_base, (uchar) s_addr));
+ } else {
+ /* Don't swap word field at the end - cntl field. */
+ word = AscReadEEPWord(iop_base, (uchar) s_addr);
+ }
+ if (*wbuf != word) {
X n_error++;
X }
X }
+ /* Read checksum; Byte swapping not needed. */
+ if (AscReadEEPWord(iop_base, (uchar) s_addr) != sum) {
+ n_error++;
+ }
X return (n_error);
X }
X
@@ -15300,7 +13171,7 @@
X uchar dvc_type;
X ASC_SCSI_BIT_ID_TYPE tid_bits;
X
- dvc_type = inq->byte0.peri_dvc_type;
+ dvc_type = ASC_INQ_DVC_TYPE(inq);
X tid_bits = ASC_TIX_TO_TARGET_ID(tid_no);
X
X if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_ASYN_USE_SYN)
@@ -15360,11 +13231,12 @@
X asc_dvc->cfg->can_tagged_qng &= ~tid_bit;
X asc_dvc->use_tagged_qng &= ~tid_bit;
X
- if (inq->byte3.rsp_data_fmt >= 2 || inq->byte2.ansi_apr_ver >= 2) {
- if ((asc_dvc->cfg->sdtr_enable & tid_bit) && inq->byte7.Sync) {
+ if (ASC_INQ_RESPONSE_FMT(inq) >= 2 || ASC_INQ_ANSI_VER(inq) >= 2) {
+ if ((asc_dvc->cfg->sdtr_enable & tid_bit) && ASC_INQ_SYNC(inq)) {
X asc_dvc->init_sdtr |= tid_bit;
X }
- if ((asc_dvc->cfg->cmd_qng_enabled & tid_bit) && inq->byte7.CmdQue) {
+ if ((asc_dvc->cfg->cmd_qng_enabled & tid_bit) &&
+ ASC_INQ_CMD_QUEUE(inq)) {
X if (AscTagQueuingSafe(inq)) {
X asc_dvc->use_tagged_qng |= tid_bit;
X asc_dvc->cfg->can_tagged_qng |= tid_bit;
@@ -15429,7 +13301,6 @@
X }
X return (byte_data);
X }
-
X STATIC ushort
X AscReadLramWord(
X PortAddr iop_base,
@@ -15443,6 +13314,7 @@
X return (word_data);
X }
X

+#if CC_VERY_LONG_SG_LIST
X STATIC ASC_DCNT

X AscReadLramDWord(
X PortAddr iop_base,
@@ -15458,6 +13330,7 @@
X dword_data = ((ASC_DCNT) val_high << 16) | (ASC_DCNT) val_low;
X return (dword_data);


X }
+#endif /* CC_VERY_LONG_SG_LIST */
X

X STATIC void
X AscWriteLramWord(
@@ -15472,23 +13345,6 @@
X }
X
X STATIC void
-AscWriteLramDWord(
- PortAddr iop_base,
- ushort addr,
- ASC_DCNT dword_val
-)
-{
- ushort word_val;
-
- AscSetChipLramAddr(iop_base, addr);
- word_val = (ushort) dword_val;
- AscSetChipLramData(iop_base, word_val);
- word_val = (ushort) (dword_val >> 16);
- AscSetChipLramData(iop_base, word_val);
- return;
-}
-
-STATIC void
X AscWriteLramByte(
X PortAddr iop_base,
X ushort addr,
@@ -15511,42 +13367,87 @@
X return;
X }
X
+/*
+ * Copy 2 bytes to LRAM.
+ *
+ * The source data is assumed to be in little-endian order in memory
+ * and is maintained in little-endian order when written to LRAM.
+ */
X STATIC void
-AscMemWordCopyToLram(
+AscMemWordCopyPtrToLram(


X PortAddr iop_base,
X ushort s_addr,

- ushort * s_buffer,
+ uchar *s_buffer,
X int words
X )
X {
+ int i;
+
X AscSetChipLramAddr(iop_base, s_addr);
- DvcOutPortWords(iop_base + IOP_RAM_DATA, s_buffer, words);
+ for (i = 0; i < 2 * words; i += 2) {
+ /*
+ * On a little-endian system the second argument below
+ * produces a little-endian ushort which is written to
+ * LRAM in little-endian order. On a big-endian system
+ * the second argument produces a big-endian ushort which
+ * is "transparently" byte-swapped by outpw() and written
+ * in little-endian order to LRAM.
+ */
+ outpw(iop_base + IOP_RAM_DATA,
+ ((ushort) s_buffer[i + 1] << 8) | s_buffer[i]);
+ }
X return;
X }
X
+/*
+ * Copy 4 bytes to LRAM.
+ *
+ * The source data is assumed to be in little-endian order in memory
+ * and is maintained in little-endian order when writen to LRAM.
+ */
X STATIC void
-AscMemDWordCopyToLram(
+AscMemDWordCopyPtrToLram(


X PortAddr iop_base,
X ushort s_addr,

- ASC_DCNT *s_buffer,
+ uchar *s_buffer,
X int dwords
X )
X {
+ int i;
+
X AscSetChipLramAddr(iop_base, s_addr);
- DvcOutPortDWords(iop_base + IOP_RAM_DATA, s_buffer, dwords);
+ for (i = 0; i < 4 * dwords; i += 4) {
+ outpw(iop_base + IOP_RAM_DATA,
+ ((ushort) s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */
+ outpw(iop_base + IOP_RAM_DATA,
+ ((ushort) s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */
+ }
X return;
X }
X
+/*
+ * Copy 2 bytes from LRAM.
+ *
+ * The source data is assumed to be in little-endian order in LRAM
+ * and is maintained in little-endian order when written to memory.
+ */
X STATIC void
-AscMemWordCopyFromLram(
+AscMemWordCopyPtrFromLram(


X PortAddr iop_base,
X ushort s_addr,

- ushort * d_buffer,
+ uchar *d_buffer,
X int words
X )
X {
+ int i;
+ ushort word;
+
X AscSetChipLramAddr(iop_base, s_addr);
- DvcInPortWords(iop_base + IOP_RAM_DATA, d_buffer, words);
+ for (i = 0; i < 2 * words; i += 2) {
+ word = inpw(iop_base + IOP_RAM_DATA);
+ d_buffer[i] = word & 0xff;
+ d_buffer[i + 1] = (word >> 8) & 0xff;
+ }
X return;
X }
X
@@ -15591,1034 +13492,1077 @@
X
X /* a_mcode.h */
X

+/* Microcode buffer is kept after initialization for error recovery. */

X STATIC unsigned char _adv_asc3550_buf[] = {
- 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0x16, 0x00, 0xfc, 0x01, 0x00, 0x48, 0xe4, 0x98, 0x18,
- 0x03, 0xf6, 0x18, 0xe4, 0x02, 0x00, 0x18, 0x80, 0x00, 0xfa, 0xff, 0xff, 0x0c, 0x0e, 0x9e, 0xe7,
- 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x00, 0xf6, 0x01, 0xe6, 0x09, 0xe7, 0x01, 0xf6, 0x08, 0x00,
- 0x55, 0xf0, 0x01, 0xfa, 0x03, 0x00, 0x04, 0x00, 0x18, 0xf4, 0x00, 0xec, 0x85, 0xf0, 0xbc, 0x00,
- 0xd5, 0xf0, 0x7c, 0x0c, 0x38, 0x54, 0x00, 0xe6, 0x1e, 0xf0, 0x86, 0xf0, 0xb4, 0x00, 0x98, 0x57,
- 0xd0, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x0c, 0x00, 0x10, 0x00, 0xbb, 0x00, 0x00, 0x10, 0x84, 0x18,
- 0x02, 0x80, 0x32, 0xf0, 0x01, 0xfc, 0x76, 0x0c, 0x0a, 0x10, 0x0c, 0x10, 0xa4, 0x12, 0x02, 0x13,
- 0x18, 0x40, 0x00, 0x57, 0x01, 0xea, 0x3c, 0x00, 0xc0, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x04, 0x12,
- 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, 0x01, 0x01, 0x3e, 0x01, 0xb8, 0x0f, 0x06, 0x13, 0xb9, 0x54,
- 0x3e, 0x57, 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x20, 0x00, 0x32, 0x00, 0x3e, 0x00,
- 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, 0x72, 0x01, 0x74, 0x01,
- 0x76, 0x01, 0x78, 0x01, 0x62, 0x0a, 0x80, 0x0c, 0x08, 0x12, 0x1e, 0x13, 0x4c, 0x1c, 0x02, 0x4a,
- 0xbb, 0x55, 0x3c, 0x56, 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0xb1, 0xf0, 0x03, 0xf7, 0x06, 0xf7,
- 0x03, 0xfc, 0x0f, 0x00, 0x40, 0x00, 0xbe, 0x00, 0x00, 0x01, 0xa0, 0x08, 0x42, 0x15, 0x32, 0x1c,
- 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, 0x02, 0x48, 0x00, 0x4c, 0x04, 0x80, 0x04, 0xea, 0x5d, 0xf0,
+ 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0x16, 0x18, 0xe4, 0x00, 0xfc, 0x01, 0x00, 0x48, 0xe4,
+ 0xbe, 0x18, 0x18, 0x80, 0x03, 0xf6, 0x02, 0x00, 0x00, 0xfa, 0xff, 0xff, 0x28, 0x0e, 0x9e, 0xe7,
+ 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x00, 0xf6, 0x01, 0xe6, 0x09, 0xe7, 0x55, 0xf0, 0x01, 0xf6,
+ 0x01, 0xfa, 0x08, 0x00, 0x03, 0x00, 0x04, 0x00, 0x18, 0xf4, 0x10, 0x00, 0x00, 0xec, 0x85, 0xf0,
+ 0xbc, 0x00, 0xd5, 0xf0, 0x8e, 0x0c, 0x38, 0x54, 0x00, 0xe6, 0x1e, 0xf0, 0x86, 0xf0, 0xb4, 0x00,
+ 0x98, 0x57, 0xd0, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x0c, 0x00, 0xbb, 0x00, 0xaa, 0x18, 0x02, 0x80,
+ 0x32, 0xf0, 0x01, 0xfc, 0x88, 0x0c, 0xc6, 0x12, 0x02, 0x13, 0x18, 0x40, 0x00, 0x57, 0x01, 0xea,
+ 0x3c, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x04, 0x12, 0x3e, 0x57, 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00,
+ 0xc0, 0x00, 0x01, 0x01, 0x3e, 0x01, 0xda, 0x0f, 0x22, 0x10, 0x08, 0x12, 0x02, 0x4a, 0xb9, 0x54,
+ 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x20, 0x00, 0x32, 0x00, 0x3e, 0x00, 0x80, 0x00,
+ 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, 0x72, 0x01, 0x74, 0x01, 0x76, 0x01,
+ 0x78, 0x01, 0x62, 0x0a, 0x92, 0x0c, 0x2c, 0x10, 0x2e, 0x10, 0x06, 0x13, 0x4c, 0x1c, 0xbb, 0x55,
+ 0x3c, 0x56, 0x04, 0x80, 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0xb1, 0xf0, 0x03, 0xf7, 0x06, 0xf7,
+ 0x03, 0xfc, 0x0f, 0x00, 0x40, 0x00, 0xbe, 0x00, 0x00, 0x01, 0xb0, 0x08, 0x30, 0x13, 0x64, 0x15,
+ 0x32, 0x1c, 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, 0x02, 0x48, 0x00, 0x4c, 0x04, 0xea, 0x5d, 0xf0,
X 0x04, 0xf6, 0x02, 0xfc, 0x05, 0x00, 0x34, 0x00, 0x36, 0x00, 0x98, 0x00, 0xcc, 0x00, 0x20, 0x01,
- 0x4e, 0x01, 0x3e, 0x0b, 0x02, 0x0e, 0x0a, 0x12, 0x04, 0x13, 0x0e, 0x13, 0x30, 0x13, 0x60, 0x13,
- 0xee, 0x14, 0x30, 0x1c, 0x00, 0x4e, 0xbd, 0x56, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0,
- 0xa7, 0xf0, 0xb8, 0xf0, 0x0e, 0xf7, 0x06, 0x00, 0x19, 0x00, 0x33, 0x00, 0x9b, 0x00, 0xa4, 0x00,
- 0xb5, 0x00, 0xba, 0x00, 0xd0, 0x00, 0xe1, 0x00, 0xe7, 0x00, 0xde, 0x03, 0x46, 0x0a, 0xf8, 0x0d,
- 0x02, 0x10, 0x04, 0x10, 0x0a, 0x13, 0x12, 0x13, 0xf2, 0x14, 0x8a, 0x16, 0x20, 0x1c, 0x34, 0x1c,
- 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x01, 0x48, 0x68, 0x54,
- 0x83, 0x55, 0xb0, 0x57, 0x01, 0x58, 0x83, 0x59, 0x06, 0x83, 0x05, 0xe6, 0x0b, 0xf0, 0x0c, 0xf0,
- 0x5c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, 0x05, 0xf8, 0x02, 0xfa, 0x03, 0xfa, 0x04, 0xfc, 0x05, 0xfc,
- 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x1c, 0x00, 0x9e, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xb9, 0x00,
- 0xe0, 0x00, 0x22, 0x01, 0x26, 0x01, 0x79, 0x01, 0x7a, 0x01, 0xc0, 0x01, 0xc2, 0x01, 0x7c, 0x02,
- 0x62, 0x03, 0xda, 0x04, 0xd8, 0x07, 0x68, 0x08, 0x69, 0x08, 0xaa, 0x08, 0xe9, 0x09, 0xf6, 0x0a,
- 0x1e, 0x0e, 0x0e, 0x10, 0x14, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, 0x06, 0x12, 0x16, 0x13,
- 0x20, 0x14, 0xb4, 0x14, 0xb6, 0x14, 0x68, 0x15, 0xa0, 0x17, 0xac, 0x17, 0x6b, 0x18, 0x12, 0x1c,
- 0x46, 0x1c, 0x9c, 0x32, 0x00, 0x40, 0x0e, 0x47, 0x48, 0x47, 0x41, 0x48, 0x89, 0x48, 0x80, 0x4c,
- 0x00, 0x54, 0x44, 0x55, 0xe5, 0x55, 0x14, 0x56, 0x77, 0x57, 0xbf, 0x57, 0x40, 0x5c, 0x06, 0x80,
- 0x08, 0x90, 0x03, 0xa1, 0x00, 0xcc, 0x19, 0xe4, 0x4e, 0xe4, 0xfe, 0x9c, 0xf0, 0x28, 0x02, 0xfe,
- 0xa6, 0x0c, 0xff, 0x10, 0x00, 0x00, 0xce, 0xfe, 0xa6, 0x18, 0x00, 0xcd, 0xfe, 0x80, 0x01, 0xff,
- 0x03, 0x00, 0x00, 0xfe, 0x02, 0x15, 0xfe, 0x0c, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24,
- 0x00, 0xfe, 0x48, 0x00, 0x50, 0xff, 0x04, 0x00, 0x00, 0x10, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08,
+ 0x4e, 0x01, 0x4e, 0x0b, 0x1e, 0x0e, 0x0c, 0x10, 0x0a, 0x12, 0x04, 0x13, 0x40, 0x13, 0x30, 0x1c,
+ 0x00, 0x4e, 0xbd, 0x56, 0x06, 0x83, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, 0xa7, 0xf0,
+ 0xb8, 0xf0, 0x0e, 0xf7, 0x06, 0x00, 0x19, 0x00, 0x33, 0x00, 0x9b, 0x00, 0xa4, 0x00, 0xb5, 0x00,
+ 0xba, 0x00, 0xd0, 0x00, 0xe1, 0x00, 0xe7, 0x00, 0xde, 0x03, 0x56, 0x0a, 0x14, 0x0e, 0x02, 0x10,
+ 0x04, 0x10, 0x0a, 0x10, 0x36, 0x10, 0x0a, 0x13, 0x12, 0x13, 0x52, 0x13, 0x10, 0x15, 0x14, 0x15,
+ 0xac, 0x16, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45,
+ 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, 0x83, 0x55, 0xb0, 0x57, 0x01, 0x58, 0x83, 0x59, 0x05, 0xe6,
+ 0x0b, 0xf0, 0x0c, 0xf0, 0x5c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, 0x05, 0xf8, 0x02, 0xfa, 0x03, 0xfa,
+ 0x04, 0xfc, 0x05, 0xfc, 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x1c, 0x00, 0x9e, 0x00, 0xa8, 0x00,
+ 0xaa, 0x00, 0xb9, 0x00, 0xe0, 0x00, 0x22, 0x01, 0x26, 0x01, 0x79, 0x01, 0x7a, 0x01, 0xc0, 0x01,
+ 0xc2, 0x01, 0x7c, 0x02, 0x5a, 0x03, 0xea, 0x04, 0xe8, 0x07, 0x68, 0x08, 0x69, 0x08, 0xba, 0x08,
+ 0xe9, 0x09, 0x06, 0x0b, 0x3a, 0x0e, 0x00, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, 0x06, 0x12,
+ 0x0c, 0x13, 0x16, 0x13, 0x1e, 0x13, 0x82, 0x13, 0x42, 0x14, 0xd6, 0x14, 0x8a, 0x15, 0xc6, 0x17,
+ 0xd2, 0x17, 0x6b, 0x18, 0x12, 0x1c, 0x46, 0x1c, 0x9c, 0x32, 0x00, 0x40, 0x0e, 0x47, 0x48, 0x47,
+ 0x41, 0x48, 0x89, 0x48, 0x80, 0x4c, 0x00, 0x54, 0x44, 0x55, 0xe5, 0x55, 0x14, 0x56, 0x77, 0x57,
+ 0xbf, 0x57, 0x40, 0x5c, 0x06, 0x80, 0x08, 0x90, 0x03, 0xa1, 0xfe, 0x9c, 0xf0, 0x29, 0x02, 0xfe,
+ 0xb8, 0x0c, 0xff, 0x10, 0x00, 0x00, 0xd0, 0xfe, 0xcc, 0x18, 0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0xfe, 0x52, 0x13, 0x30, 0x06, 0x7e, 0xfe, 0x4a, 0x13, 0xfe, 0x18, 0x10, 0x13, 0x2b,
- 0xfe, 0x4c, 0x54, 0x64, 0xd1, 0xf7, 0xec, 0xfe, 0x38, 0x13, 0x30, 0x06, 0x7e, 0x86, 0x0b, 0x09,
- 0x2c, 0xfe, 0x1c, 0x12, 0x14, 0x93, 0x0b, 0x09, 0x05, 0x3f, 0x14, 0xc2, 0x01, 0x36, 0x90, 0xfe,
- 0x5e, 0x0c, 0x02, 0x21, 0x2a, 0x11, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xf6, 0x03, 0x14, 0x93,
- 0x01, 0x36, 0x02, 0x28, 0xfe, 0x42, 0x5b, 0x67, 0x1a, 0xfe, 0x46, 0x59, 0xf5, 0xf4, 0xfe, 0x87,
- 0x80, 0xfe, 0x31, 0xe4, 0x50, 0x0b, 0x09, 0x0a, 0xfe, 0x78, 0x13, 0xfe, 0x20, 0x80, 0x06, 0x1a,
- 0xfe, 0x70, 0x12, 0x4a, 0x09, 0x05, 0x87, 0x04, 0xfe, 0xa2, 0x00, 0x27, 0x18, 0xfe, 0x70, 0x05,
- 0xfe, 0x31, 0xe4, 0x6a, 0x4a, 0x09, 0x0a, 0xfe, 0x4a, 0x13, 0x04, 0xfe, 0xa0, 0x00, 0x27, 0xfe,
- 0x42, 0x12, 0x5e, 0x01, 0x07, 0x24, 0x33, 0xee, 0x01, 0x07, 0x25, 0xfe, 0x88, 0x05, 0x11, 0xfe,
- 0xe3, 0x00, 0x22, 0x4a, 0xfe, 0x4a, 0xf0, 0xfe, 0x5a, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x54, 0x05,
- 0x35, 0x23, 0xfe, 0x21, 0x00, 0x34, 0x23, 0xfe, 0x22, 0x00, 0xa1, 0x23, 0x4d, 0xfe, 0x09, 0x48,
- 0x01, 0x07, 0x25, 0xfe, 0x88, 0x05, 0xfe, 0xe2, 0x08, 0x4a, 0x09, 0xc3, 0x3f, 0x01, 0x5d, 0x23,
- 0x05, 0x12, 0xca, 0x3a, 0xfe, 0x27, 0x01, 0x0b, 0x09, 0x2c, 0xfe, 0x22, 0x12, 0x47, 0x01, 0xa4,
- 0x14, 0x93, 0x0b, 0x09, 0x05, 0x3f, 0x14, 0xc2, 0x01, 0x36, 0x90, 0xfe, 0x5e, 0x0c, 0x02, 0x21,
- 0x04, 0xfe, 0x9c, 0x00, 0x27, 0xfe, 0x3e, 0x12, 0x04, 0x51, 0x27, 0xfe, 0x36, 0x13, 0x47, 0x01,
- 0xa4, 0x25, 0xfe, 0xf8, 0x05, 0x08, 0x05, 0x4a, 0x09, 0x17, 0xfe, 0x02, 0x12, 0x60, 0x01, 0xfe,
- 0x88, 0x14, 0x1e, 0xfe, 0xee, 0x05, 0x11, 0x9b, 0x01, 0x45, 0x11, 0xfe, 0xe5, 0x00, 0x04, 0x51,
- 0xb1, 0x0c, 0x51, 0x04, 0xc4, 0x27, 0xfe, 0x62, 0x12, 0x04, 0x42, 0x27, 0xfe, 0x5a, 0x13, 0x01,
- 0xfe, 0xee, 0x17, 0x01, 0xfe, 0x40, 0x18, 0xfe, 0x43, 0x48, 0xb5, 0x17, 0x13, 0x6c, 0xff, 0x02,
- 0x00, 0x57, 0x49, 0x8c, 0x1c, 0x40, 0x84, 0xb5, 0x69, 0x47, 0x01, 0xa4, 0x25, 0xfe, 0x62, 0x06,
- 0x4a, 0x09, 0x1b, 0xde, 0x8b, 0x08, 0x4e, 0x01, 0xe2, 0x1e, 0xfe, 0x58, 0x06, 0x11, 0x9b, 0x01,
- 0x45, 0x11, 0xfe, 0xe5, 0x00, 0x04, 0x42, 0xb1, 0x0c, 0x42, 0x16, 0x05, 0x01, 0xa4, 0xe9, 0x71,
- 0x6f, 0x01, 0x85, 0x89, 0x11, 0xfe, 0xe2, 0x00, 0x01, 0x07, 0x24, 0x33, 0xfe, 0x0a, 0xf0, 0xfe,
- 0x96, 0x06, 0x8d, 0xfe, 0x4c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, 0x54, 0x07, 0x8e, 0x81, 0x02, 0x21,
- 0x0b, 0x09, 0x0a, 0xfe, 0x2e, 0x12, 0x15, 0x1a, 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x00,
- 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0xfe, 0x99, 0xa4, 0x01, 0x07, 0x15, 0x00, 0x02, 0xfe, 0x22,
- 0x08, 0x75, 0x09, 0x1b, 0xfe, 0x38, 0x12, 0x0b, 0x09, 0x1b, 0x86, 0x15, 0xfe, 0x1b, 0x00, 0x01,
- 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x05, 0x01,
- 0x07, 0x15, 0x00, 0x02, 0xd7, 0x66, 0x4d, 0xfe, 0x3a, 0x55, 0x60, 0xfe, 0x9a, 0x81, 0x4c, 0x2c,
- 0xb8, 0xfe, 0x22, 0x07, 0x08, 0x2c, 0xfe, 0x09, 0x6f, 0xac, 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12,
- 0x62, 0x2b, 0x84, 0x66, 0x7b, 0x01, 0x07, 0x24, 0x33, 0xfe, 0x0a, 0xf0, 0xfe, 0x22, 0x07, 0x8e,
- 0x81, 0x8d, 0xfe, 0x4c, 0x07, 0x02, 0x21, 0x01, 0x45, 0x02, 0xfe, 0x7a, 0x06, 0x15, 0x17, 0x02,
- 0xfe, 0x7a, 0x06, 0xfe, 0x9c, 0xf7, 0xd2, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x77, 0xfe, 0xba,
- 0x07, 0x0c, 0x55, 0x19, 0x56, 0x0b, 0x4b, 0x6a, 0x38, 0x1d, 0x1f, 0x06, 0x10, 0xfe, 0x0e, 0x12,
- 0x73, 0xfe, 0x80, 0x80, 0x3a, 0x1f, 0x63, 0x26, 0xfe, 0x06, 0x10, 0xfe, 0x83, 0xe7, 0xc2,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, 0xfe, 0x00, 0x56, 0xfe, 0xa1, 0x56, 0x0c, 0x53, 0x19, 0x54,
- 0x0b, 0x09, 0x6a, 0xfe, 0x1e, 0x12, 0x1d, 0x59, 0xfe, 0x1f, 0x40, 0x04, 0x55, 0x32, 0x56, 0xfe,
- 0x2c, 0x50, 0xfe, 0xae, 0x50, 0x04, 0x57, 0x32, 0x58, 0xfe, 0x44, 0x50, 0xfe, 0xc6, 0x50, 0x04,
- 0x53, 0x32, 0x54, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0x04, 0x3d, 0x32, 0x3e, 0xfe, 0x40, 0x50,
- 0xfe, 0xc2, 0x50, 0x02, 0x35, 0x23, 0x05, 0x12, 0xcb, 0x02, 0x34, 0x2a, 0x01, 0x07, 0x1e, 0x2e,
- 0x31, 0x2f, 0xd3, 0x06, 0x05, 0x20, 0x2e, 0x30, 0x06, 0x9c, 0x20, 0x34, 0x01, 0x85, 0x1c, 0x40,
- 0x18, 0x2e, 0x0b, 0x09, 0x0a, 0x5d, 0x79, 0x3d, 0x68, 0x3e, 0xfe, 0x0a, 0x55, 0x37, 0xfe, 0x8b,
- 0x55, 0xbc, 0x3d, 0xbd, 0x3e, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x02, 0x34, 0xfe, 0x19, 0x81,
- 0xac, 0xfe, 0x19, 0x41, 0x02, 0x34, 0x2a, 0x01, 0x07, 0x24, 0x33, 0x1e, 0xda, 0x31, 0x2f, 0xd6,
- 0x4c, 0x1a, 0xfe, 0xa6, 0x12, 0x4c, 0x0a, 0x3f, 0x02, 0x2e, 0x01, 0x07, 0x24, 0x33, 0x1e, 0xda,
- 0x31, 0x2f, 0xd4, 0x06, 0x1a, 0x20, 0x2e, 0x01, 0x07, 0x1e, 0xda, 0x31, 0x2f, 0xfe, 0xe8, 0x09,
- 0xfe, 0xc2, 0x49, 0x61, 0x04, 0xfe, 0x9c, 0x00, 0x27, 0x83, 0x4a, 0x09, 0x17, 0x37, 0xa0, 0xfe,
- 0xbb, 0x45, 0x4c, 0x00, 0x5c, 0x41, 0x05, 0x78, 0x40, 0xfe, 0xda, 0x14, 0x01, 0x85, 0x89, 0xfe,
- 0x4b, 0x45, 0x5d, 0x30, 0x06, 0x9b, 0xdf, 0x04, 0xc4, 0x27, 0x83, 0x04, 0x42, 0x27, 0x37, 0x5e,
- 0x02, 0x34, 0xfe, 0xc0, 0x5d, 0xfe, 0xf8, 0x14, 0xfe, 0x03, 0x17, 0x04, 0x51, 0xb1, 0x0c, 0x51,
- 0x5e, 0x2a, 0x01, 0x07, 0x25, 0x35, 0x01, 0xfe, 0x88, 0x14, 0x02, 0x35, 0x01, 0x07, 0x24, 0x33,
- 0x1e, 0x2e, 0x31, 0x2f, 0xd4, 0x06, 0x05, 0x20, 0x2e, 0x01, 0xfe, 0x6c, 0x13, 0xfe, 0x42, 0x58,
- 0xfe, 0x82, 0x14, 0xfe, 0xa4, 0x14, 0x89, 0xfe, 0x4a, 0xf4, 0x0a, 0x18, 0x2e, 0xfe, 0x4a, 0xf4,
- 0x05, 0xfe, 0x0c, 0x12, 0x30, 0x06, 0x9b, 0x84, 0x02, 0x34, 0x04, 0x42, 0xb1, 0x0c, 0x42, 0x5e,
- 0x2a, 0x01, 0x07, 0x25, 0x35, 0x01, 0xe2, 0x02, 0x35, 0x13, 0x05, 0x65, 0xfe, 0xa8, 0x12, 0x25,
- 0xfe, 0xbe, 0x12, 0x71, 0xee, 0x01, 0x07, 0x22, 0x71, 0x03, 0x90, 0xfe, 0xba, 0x12, 0x24, 0xfe,
- 0xba, 0x12, 0x1e, 0xfe, 0xa8, 0x12, 0x5e, 0x2a, 0x01, 0x07, 0xfe, 0xd5, 0x10, 0x13, 0x6c, 0xff,
- 0x02, 0x00, 0x57, 0x49, 0x8c, 0x1c, 0xfe, 0xff, 0x7f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x03,
- 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x49, 0x8c, 0x1c, 0x40, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c,
- 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x49, 0x8c, 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57,
- 0x49, 0x8c, 0xfe, 0x0b, 0x58, 0x03, 0x08, 0x51, 0x01, 0x82, 0x08, 0x42, 0x01, 0x82, 0x03, 0xf9,
- 0x1c, 0x10, 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, 0xf4, 0x17, 0x49, 0xfe, 0x00, 0x7d, 0xfe, 0x01,
- 0x7d, 0xfe, 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x63, 0x26, 0x0c, 0x53, 0x19, 0x54, 0xbc, 0x57, 0xbd,
- 0x58, 0x03, 0xfe, 0x62, 0x08, 0xfe, 0x82, 0x4a, 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x73, 0x03,
- 0x01, 0xfe, 0xee, 0x17, 0xfe, 0x42, 0x48, 0x60, 0x61, 0x8b, 0x01, 0x07, 0x1e, 0xfe, 0x80, 0x14,
- 0x31, 0x2f, 0xd6, 0x01, 0x07, 0x1e, 0xfe, 0x80, 0x14, 0x31, 0x2f, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1,
- 0x59, 0x04, 0xc4, 0x27, 0xfe, 0xcc, 0x12, 0x4a, 0x09, 0x1b, 0xfe, 0xc4, 0x13, 0x22, 0x62, 0x1b,
- 0x5d, 0x4c, 0xc1, 0x64, 0xfe, 0xc6, 0x13, 0x3f, 0x13, 0x05, 0x16, 0xc1, 0x78, 0x2e, 0xfe, 0x78,
- 0x10, 0xff, 0x02, 0x83, 0x55, 0x34, 0xff, 0x02, 0x83, 0x55, 0x62, 0x1a, 0xa3, 0xb9, 0xfe, 0x30,
- 0x00, 0x8f, 0xe0, 0x16, 0x2b, 0x13, 0x05, 0xfe, 0x56, 0x10, 0x62, 0x0a, 0xdf, 0xb9, 0xfe, 0x64,
- 0x00, 0x8f, 0xe0, 0x08, 0xfe, 0x64, 0x00, 0x16, 0x94, 0x13, 0x05, 0xfe, 0x28, 0x10, 0x62, 0x05,
- 0x87, 0xb9, 0xfe, 0xc8, 0x00, 0x8f, 0xe0, 0x08, 0xfe, 0xc8, 0x00, 0x16, 0x4e, 0x13, 0x05, 0x35,
- 0xb9, 0xfe, 0x90, 0x01, 0xb8, 0xfe, 0x2c, 0x14, 0x8b, 0xfe, 0x12, 0x10, 0xfe, 0x43, 0xf4, 0x95,
- 0xfe, 0x56, 0xf0, 0xfe, 0x3e, 0x14, 0xfe, 0x04, 0xf4, 0x6c, 0xfe, 0x43, 0xf4, 0x94, 0xfe, 0xf3,
- 0x10, 0xf6, 0x01, 0xfe, 0x00, 0x13, 0x1c, 0x40, 0xfe, 0x10, 0x13, 0xfe, 0x00, 0x17, 0xfe, 0x4d,
- 0xe4, 0x69, 0xb8, 0xfe, 0x7a, 0x14, 0xb5, 0x69, 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0xfe, 0x4d,
- 0xe4, 0x17, 0xb8, 0xfe, 0x7a, 0x14, 0xb5, 0x17, 0x35, 0x61, 0x22, 0xfe, 0x4d, 0xf4, 0x00, 0xde,
- 0x8b, 0x13, 0x05, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x03, 0x61, 0x13, 0x0a, 0x03, 0x15, 0x05,
- 0x01, 0x07, 0x25, 0xe1, 0x15, 0x0a, 0x01, 0x07, 0x25, 0xe1, 0x15, 0x1a, 0x01, 0x07, 0x25, 0xe1,
- 0x71, 0xfe, 0x89, 0x49, 0x01, 0x07, 0x03, 0x15, 0x05, 0x01, 0x07, 0x25, 0x88, 0x15, 0x1a, 0x01,
- 0x07, 0x25, 0x88, 0x15, 0x05, 0x01, 0x07, 0x25, 0x88, 0xfe, 0x89, 0x49, 0x01, 0x07, 0x25, 0x88,
- 0x71, 0xfe, 0x89, 0x4a, 0x01, 0x07, 0x03, 0x61, 0x03, 0x1d, 0xca, 0x06, 0x05, 0xfe, 0x44, 0x13,
- 0xaa, 0x12, 0xca, 0xfe, 0x49, 0xf4, 0x00, 0x3f, 0x71, 0xa0, 0x5e, 0xfe, 0x01, 0xec, 0xfe, 0x27,
- 0x01, 0xee, 0x01, 0x07, 0x30, 0x06, 0xfe, 0xe3, 0x00, 0xfe, 0x20, 0x13, 0x1e, 0xfe, 0x38, 0x15,
- 0x22, 0x12, 0xcb, 0x01, 0x45, 0x1d, 0xcb, 0x06, 0x05, 0x5c, 0x0b, 0x4b, 0x05, 0x38, 0x03, 0x08,
- 0x44, 0x01, 0x0e, 0xea, 0x8a, 0x06, 0x10, 0xa3, 0x08, 0x80, 0x01, 0x0e, 0x8a, 0x08, 0x52, 0x01,
- 0x9f, 0x03, 0x08, 0x80, 0x01, 0x0e, 0x8a, 0xfe, 0x80, 0xe7, 0x10, 0x06, 0x10, 0x83, 0xfe, 0x45,
- 0x58, 0x01, 0x87, 0x8a, 0x03, 0x08, 0x44, 0x01, 0x0e, 0x8a, 0x08, 0x52, 0x01, 0x9f, 0x03, 0x08,
- 0x44, 0x01, 0x0e, 0xfe, 0x80, 0x80, 0xef, 0xfe, 0x49, 0xe4, 0x10, 0xa3, 0x08, 0x80, 0x01, 0x0e,
- 0xef, 0x08, 0x52, 0x01, 0x82, 0x03, 0x16, 0x10, 0x70, 0x66, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf,
- 0xfe, 0x19, 0xde, 0xfe, 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x2c, 0x91, 0xfe, 0xd4, 0x15, 0x01, 0xfe,
- 0xda, 0x16, 0xfe, 0x0c, 0x13, 0x92, 0x2c, 0x66, 0xfe, 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x03, 0xab,
- 0x20, 0xfe, 0xc4, 0x15, 0xfe, 0xda, 0x10, 0x16, 0x10, 0x70, 0x04, 0xfe, 0x64, 0x01, 0xfe, 0x00,
- 0xf4, 0x17, 0xfe, 0x18,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fe, 0x12, 0x45, 0x20, 0xfe,
- 0x8e, 0x16, 0x14, 0x05, 0x3a, 0x96, 0xa6, 0x02, 0x28, 0xfe, 0x39, 0xf0, 0xfe, 0xe2, 0x16, 0x22,
- 0x03, 0xfe, 0x7e, 0x18, 0x1c, 0x1a, 0x46, 0x13, 0x0d, 0x03, 0x70, 0x04, 0xc9, 0x1c, 0x05, 0xfe,
- 0xef, 0x12, 0xfe, 0xe1, 0x10, 0x78, 0x2b, 0x5f, 0x30, 0x06, 0x2d, 0xfe, 0x3c, 0x13, 0xfe, 0x7e,
- 0x14, 0xfe, 0x42, 0x13, 0x48, 0xb4, 0x08, 0x44, 0x01, 0x0e, 0xad, 0xfe, 0x3e, 0x12, 0xed, 0xfe,
- 0x45, 0x48, 0x01, 0x87, 0xfa, 0xad, 0xfe, 0xf3, 0x13, 0x40, 0x74, 0x06, 0x10, 0xa2, 0x08, 0x80,
- 0x01, 0x0e, 0xef, 0x01, 0x6e, 0xfe, 0x16, 0x10, 0x06, 0x7e, 0x84, 0xfe, 0x3c, 0x14, 0xfe, 0x24,
- 0x12, 0xf3, 0xfe, 0xd6, 0xf0, 0xfe, 0x02, 0x17, 0x16, 0x0a, 0x03, 0xfe, 0x9c, 0xe7, 0x0a, 0x0f,
- 0xfe, 0x15, 0x00, 0x5a, 0x76, 0x26, 0x01, 0xd8, 0x16, 0x05, 0x03, 0x0b, 0x4b, 0x2c, 0x38, 0x11,
- 0x2d, 0x01, 0x6e, 0x16, 0x05, 0x03, 0xfe, 0x38, 0x90, 0xfe, 0xba, 0x90, 0x79, 0xc5, 0x68, 0xc6,
- 0xfe, 0x48, 0x55, 0x37, 0xfe, 0xc9, 0x55, 0x03, 0x1d, 0x99, 0x72, 0x12, 0x99, 0x03, 0x08, 0x9a,
- 0x01, 0x0e, 0xed, 0x08, 0x3c, 0x01, 0x0e, 0xfe, 0x49, 0x44, 0x18, 0xfe, 0xca, 0x17, 0x72, 0x74,
- 0x03, 0x08, 0x44, 0x01, 0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49,
+ 0x04, 0x06, 0xfe, 0x60, 0x13, 0x05, 0xfe, 0xa2, 0x00, 0x28, 0x16, 0xfe, 0x80, 0x05, 0xfe, 0x31,
+ 0xe4, 0x6a, 0x49, 0x04, 0x0b, 0xfe, 0x4a, 0x13, 0x05, 0xfe, 0xa0, 0x00, 0x28, 0xfe, 0x42, 0x12,
+ 0x5e, 0x01, 0x08, 0x25, 0x32, 0xf1, 0x01, 0x08, 0x26, 0xfe, 0x98, 0x05, 0x11, 0xfe, 0xe3, 0x00,
+ 0x23, 0x49, 0xfe, 0x4a, 0xf0, 0xfe, 0x6a, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x64, 0x05, 0x83, 0x24,
+ 0xfe, 0x21, 0x00, 0xa1, 0x24, 0xfe, 0x22, 0x00, 0xa0, 0x24, 0x4c, 0xfe, 0x09, 0x48, 0x01, 0x08,
+ 0x26, 0xfe, 0x98, 0x05, 0xfe, 0xe2, 0x08, 0x49, 0x04, 0xc5, 0x3b, 0x01, 0x86, 0x24, 0x06, 0x12,
+ 0xcc, 0x37, 0xfe, 0x27, 0x01, 0x09, 0x04, 0x1d, 0xfe, 0x22, 0x12, 0x47, 0x01, 0xa7, 0x14, 0x92,
+ 0x09, 0x04, 0x06, 0x3b, 0x14, 0xc4, 0x01, 0x33, 0x8f, 0xfe, 0x70, 0x0c, 0x02, 0x22, 0x05, 0xfe,
+ 0x9c, 0x00, 0x28, 0xfe, 0x3e, 0x12, 0x05, 0x50, 0x28, 0xfe, 0x36, 0x13, 0x47, 0x01, 0xa7, 0x26,
+ 0xfe, 0x08, 0x06, 0x0a, 0x06, 0x49, 0x04, 0x19, 0xfe, 0x02, 0x12, 0x5f, 0x01, 0xfe, 0xaa, 0x14,
+ 0x1f, 0xfe, 0xfe, 0x05, 0x11, 0x9a, 0x01, 0x43, 0x11, 0xfe, 0xe5, 0x00, 0x05, 0x50, 0xb4, 0x0c,
+ 0x50, 0x05, 0xc6, 0x28, 0xfe, 0x62, 0x12, 0x05, 0x3f, 0x28, 0xfe, 0x5a, 0x13, 0x01, 0xfe, 0x14,
+ 0x18, 0x01, 0xfe, 0x66, 0x18, 0xfe, 0x43, 0x48, 0xb7, 0x19, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57,
+ 0x48, 0x8b, 0x1c, 0x3d, 0x85, 0xb7, 0x69, 0x47, 0x01, 0xa7, 0x26, 0xfe, 0x72, 0x06, 0x49, 0x04,
+ 0x1b, 0xdf, 0x89, 0x0a, 0x4d, 0x01, 0xfe, 0xd8, 0x14, 0x1f, 0xfe, 0x68, 0x06, 0x11, 0x9a, 0x01,
+ 0x43, 0x11, 0xfe, 0xe5, 0x00, 0x05, 0x3f, 0xb4, 0x0c, 0x3f, 0x17, 0x06, 0x01, 0xa7, 0xec, 0x72,
+ 0x70, 0x01, 0x6e, 0x87, 0x11, 0xfe, 0xe2, 0x00, 0x01, 0x08, 0x25, 0x32, 0xfe, 0x0a, 0xf0, 0xfe,
+ 0xa6, 0x06, 0x8c, 0xfe, 0x5c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, 0x64, 0x07, 0x8d, 0x81, 0x02, 0x22,
+ 0x09, 0x04, 0x0b, 0xfe, 0x2e, 0x12, 0x15, 0x1a, 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x00,
+ 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0xfe, 0x99, 0xa4, 0x01, 0x08, 0x15, 0x00, 0x02, 0xfe, 0x32,
+ 0x08, 0x61, 0x04, 0x1b, 0xfe, 0x38, 0x12, 0x09, 0x04, 0x1b, 0x6e, 0x15, 0xfe, 0x1b, 0x00, 0x01,
+ 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x06, 0x01,
+ 0x08, 0x15, 0x00, 0x02, 0xd9, 0x66, 0x4c, 0xfe, 0x3a, 0x55, 0x5f, 0xfe, 0x9a, 0x81, 0x4b, 0x1d,
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x44, 0x90, 0xfe, 0xc6, 0x90, 0x0c, 0x56, 0x18, 0x57, 0xfb, 0xfe,
+ 0x8a, 0x90, 0x0c, 0x52, 0x18, 0x53, 0xfe, 0x40, 0x90, 0xfe, 0xc2, 0x90, 0x0c, 0x39, 0x18, 0x3a,
+ 0x0c, 0x38, 0x18, 0x4e, 0x09, 0x4a, 0x19, 0x35, 0x2a, 0x13, 0xfe, 0x4e, 0x11, 0x65, 0xfe, 0x48,
+ 0x08, 0xfe, 0x9e, 0xf0, 0xfe, 0x5c, 0x08, 0xb1, 0x16, 0x32, 0x2a, 0x73, 0xdd, 0xb8, 0xfe, 0x80,
+ 0x08, 0xb9, 0xfe, 0x9e, 0x08, 0x8c, 0xfe, 0x74, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x7a, 0x08, 0x8d,
+ 0x81, 0x02, 0x22, 0x01, 0x43, 0xfe, 0xc9, 0x10, 0x15, 0x19, 0xfe, 0xc9, 0x10, 0x61, 0x04, 0x06,


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 49'
echo 'File patch-2.2.20 is continued in part 50'
echo "50" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:51 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part52

#!/bin/sh -x
# this is part 52 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 52; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- 0x1f, 0x46, 0x0c, 0x5c, 0x1f, 0x2f, 0x0b, 0x59, 0x20, 0x3d, 0x32, 0x0f, 0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
- 0x15, 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, 0x69, 0x15, 0x91, 0x04, 0x69, 0xfe, 0x74, 0x18, 0x1e,
- 0xfe, 0x00, 0xf8, 0x17, 0x54, 0x74, 0x0e, 0x01, 0xfe, 0x18, 0x0e, 0x48, 0x01, 0xfe, 0x9e, 0x18,
- 0x1d, 0x2b, 0x81, 0x74, 0x19, 0x04, 0x54, 0xfe, 0x98, 0x80, 0xfe, 0x19, 0xe4, 0x0a, 0x26, 0xfe,
- 0xda, 0x0a, 0x0b, 0x08, 0x4e, 0xfe, 0x82, 0x12, 0x0b, 0x08, 0x20, 0xfe, 0x66, 0x13, 0x1d, 0x66,
- 0xc2, 0xfe, 0x03, 0xa1, 0xfe, 0x83, 0x80, 0xfe, 0xc8, 0x44, 0xfe, 0x2e, 0x13, 0xfe, 0x04, 0x91,
- 0xfe, 0x86, 0x91, 0x71, 0x2b, 0xfe, 0x40, 0x59, 0xfe, 0xc1, 0x59, 0x87, 0xed, 0x02, 0x62, 0x37,
- 0x63, 0x0c, 0x90, 0x1f, 0x91, 0xd7, 0x62, 0xd8, 0x63, 0x01, 0xbd, 0xc3, 0x71, 0x2b, 0x1c, 0x66,
- 0xd9, 0x5c, 0xda, 0x2f, 0x8a, 0x64, 0x75, 0x65, 0xfe, 0x44, 0x55, 0xfe, 0xe5, 0x55, 0xfe, 0x04,
- 0xfa, 0x5c, 0xfe, 0x05, 0xfa, 0x2f, 0x01, 0xbb, 0xfe, 0x36, 0x10, 0x22, 0x0c, 0x90, 0x0c, 0x91,
- 0x8a, 0x64, 0x75, 0x65, 0x9c, 0x0b, 0x08, 0x20, 0x17, 0xed, 0x8a, 0x45, 0x75, 0x46, 0x0b, 0x08,
- 0xfe, 0xf7, 0x00, 0x3d, 0x02, 0x60, 0x37, 0x61, 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, 0xfe, 0x14,
- 0x59, 0xfe, 0x95, 0x59, 0x04, 0x54, 0x0b, 0x08, 0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e, 0xd6, 0xf0, 0xfe, 0xf0, 0x0f,
- 0xfe, 0x12, 0x1c, 0x7e, 0xfe, 0x14, 0x1c, 0xfe, 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x03, 0x58, 0xfe,
- 0x0c, 0x14, 0xfe, 0x0e, 0x47, 0xfe, 0x07, 0xe6, 0x38, 0xfe, 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x03,
- 0x01, 0xa0, 0x89, 0x2f, 0x6f, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x42, 0x13, 0x35, 0x07,
- 0x50, 0xfe, 0x34, 0x13, 0x09, 0x53, 0x01, 0x14, 0xc6, 0xfe, 0x36, 0x12, 0xfe, 0x41, 0x48, 0xfe,
- 0x45, 0x48, 0x01, 0xfb, 0xfe, 0x00, 0xcc, 0xc6, 0xfe, 0xf3, 0x13, 0x34, 0x82, 0x07, 0x16, 0x9e,
- 0x09, 0x96, 0x01, 0x14, 0xfe, 0x80, 0x5c, 0x01, 0x7c, 0xb9, 0x07, 0x94, 0x55, 0xfe, 0x14, 0x56,
- 0xfe, 0xd6, 0xf0, 0xfe, 0x2a, 0x10, 0x03, 0xfe, 0x44, 0x58, 0x81, 0xfe, 0x01, 0xec, 0xaf, 0xfe,
- 0x9e, 0x40, 0xfe, 0x9d, 0xe7, 0x00, 0xfe, 0x9c, 0xe7, 0x0e, 0x86, 0x2b, 0x01, 0xef, 0xfe, 0xdd,
- 0x10, 0x32, 0xd5, 0x92, 0xd6, 0x95, 0x23, 0x21, 0xec, 0x07, 0x0e, 0xfe, 0x48, 0x12, 0x07, 0x0a,
- 0xfe, 0x56, 0x12, 0x07, 0x19, 0xfe, 0x30, 0x12, 0x07, 0xdb, 0x17, 0xfe, 0xfc, 0x11, 0x07, 0xfe,
- 0x23, 0x00, 0x17, 0x55, 0x07, 0x05, 0x17, 0xfe, 0x66, 0x12, 0x07, 0x20, 0xfe, 0x12, 0x12, 0x07,
- 0x00, 0x17, 0x24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60, 0x37, 0x61, 0xfe, 0x08, 0x50,
- 0xfe, 0x8a, 0x50, 0x02, 0x45, 0x37, 0x46, 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x04, 0x6c, 0x29,
- 0x05, 0x1c, 0x97, 0x04, 0x6b, 0x2e, 0x01, 0x06, 0x12, 0x3a, 0x23, 0x21, 0xec, 0x07, 0x05, 0x26,
- 0x3a, 0x35, 0x07, 0xb2, 0x26, 0x6b, 0x01, 0x9f, 0x1e, 0x34, 0x17, 0x3a, 0x0b, 0x08, 0x0a, 0xfa,
- 0x8a, 0x45, 0x75, 0x46, 0xfe, 0x0a, 0x55, 0x2c, 0xfe, 0x8b, 0x55, 0xd7, 0x45, 0xd8, 0x46, 0xfe,
- 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x04, 0x6b, 0xfe, 0x19, 0x81, 0xc5, 0xfe, 0x19, 0x41, 0x04, 0x6b,
- 0x2e, 0x01, 0x06, 0x25, 0x39, 0x12, 0xf5, 0x23, 0x21, 0xb5, 0x28, 0x19, 0xfe, 0xb2, 0x12, 0x28,
- 0x0a, 0x9d, 0x28, 0x76, 0x17, 0xfe, 0x92, 0x13, 0x04, 0x3a, 0x01, 0x06, 0x25, 0x39, 0x12, 0xf5,
- 0x23, 0x21, 0xb4, 0x07, 0x19, 0x26, 0x3a, 0x01, 0x06, 0x12, 0xf5, 0x23, 0x21, 0xfe, 0xe8, 0x09,
- 0xfe, 0xc2, 0x49, 0x4b, 0x02, 0xad, 0x1a, 0x56, 0x36, 0x08, 0x20, 0x2c, 0x9a, 0xfe, 0xbb, 0x45,
- 0x28, 0x00, 0x55, 0x3f, 0x05, 0x89, 0x34, 0x01, 0xfe, 0x22, 0x14, 0x01, 0x9f, 0x7d, 0xfe, 0x4b,
- 0x45, 0xfa, 0x35, 0x07, 0x79, 0xf9, 0x02, 0x93, 0x1a, 0x56, 0x02, 0x4f, 0x1a, 0x2c, 0x57, 0x04,
- 0x6b, 0xfe, 0xc0, 0x5d, 0x01, 0xa0, 0xfe, 0x03, 0x17, 0x02, 0x5e, 0x83, 0x0c, 0x5e, 0x57, 0x2e,
- 0x01, 0x06, 0x13, 0x6c, 0x01, 0xfe, 0x62, 0x17, 0x04, 0x6c, 0x01, 0x06, 0x25, 0x39, 0x12, 0x3a,
- 0x23, 0x21, 0xb4, 0x07, 0x05, 0x26, 0x3a, 0x01, 0xfe, 0xd0, 0x14, 0xfe, 0x42, 0x58, 0xfe, 0xe4,
- 0x14, 0x01, 0x9f, 0x7d, 0xfe, 0x4a, 0xf4, 0x0a, 0x17, 0x3a, 0xfe, 0x4a, 0xf4, 0x05, 0x9d, 0x35,
- 0x07, 0x79, 0x49, 0x04, 0x6b, 0x02, 0x4f, 0x83, 0x0c, 0x4f, 0x57, 0x2e, 0x01, 0x06, 0x13, 0x6c,
- 0x01, 0xfe, 0x90, 0x17, 0x04, 0x6c, 0x01, 0x06, 0x25, 0x39, 0x12, 0x3a, 0x23, 0x21, 0xb4, 0x07,
- 0x0e, 0x26, 0x3a, 0x01, 0xfe, 0xf8, 0x15, 0xcc, 0xfe, 0xa8, 0x14, 0xfe, 0xb4, 0x14, 0x7d, 0xfe,
- 0x00, 0x17, 0xa9, 0x0a, 0x17, 0x3a, 0xa9, 0x05, 0x9d, 0x35, 0x07, 0x79, 0x49, 0x04, 0x6b, 0x02,
- 0x67, 0x83, 0x0c, 0x67, 0x57, 0x2e, 0x01, 0x06, 0x13, 0x6c, 0x01, 0xfe, 0xcc, 0x17, 0x04, 0x6c,
- 0x0f, 0x05, 0x2a, 0xfe, 0xf6, 0x13, 0x13, 0xfe, 0x0c, 0x14, 0x6e, 0xc7, 0x01, 0x06, 0x22, 0x6e,
- 0x03, 0x88, 0xfe, 0x08, 0x14, 0x25, 0xfe, 0x08, 0x14, 0x12, 0xfe, 0xf6, 0x13, 0x57, 0x2e, 0x01,
- 0x06, 0xfe, 0xd5, 0x10, 0x0f, 0x51, 0xff, 0x02, 0x00, 0x57, 0x4c, 0xa4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
- 0xf4, 0x34, 0x9c, 0xfe, 0x40, 0xf4, 0x8f, 0xfe, 0x56, 0xf0, 0xfe, 0x18, 0x17, 0xfe, 0x04, 0xf4,
- 0x51, 0xfe, 0x40, 0xf4, 0x8d, 0xf4, 0x3b, 0x28, 0x8c, 0x49, 0xce, 0x0a, 0x1d, 0xfe, 0x7f, 0x01,
- 0xfe, 0xc8, 0x46, 0xfe, 0x24, 0x13, 0x85, 0x00, 0x56, 0x22, 0x1d, 0xfe, 0x7e, 0x01, 0xfe, 0xc8,
- 0x45, 0xfe, 0x14, 0x13, 0x1d, 0xfe, 0x80, 0x01, 0xfe, 0x48, 0x45, 0xfe, 0x0c, 0x13, 0x1d, 0xfe,
- 0x81, 0x01, 0xfe, 0xc8, 0x44, 0x49, 0x22, 0x03, 0x0f, 0x05, 0x03, 0x70, 0x3e, 0x4b, 0x0f, 0x0a,
- 0x03, 0x10, 0x05, 0x01, 0x06, 0x13, 0xfe, 0x8e, 0x17, 0x10, 0x0a, 0x01, 0x06, 0x13, 0xfe, 0x8e,
- 0x17, 0x10, 0x19, 0x01, 0x06, 0x13, 0xfe, 0x8e, 0x17, 0x6e, 0xfe, 0x89, 0x49, 0x01, 0x06, 0x03,
- 0x10, 0x05, 0x01, 0x06, 0x13, 0xbc, 0x10, 0x19, 0x01, 0x06, 0x13, 0xbc, 0x10, 0x05, 0x01, 0x06,
- 0x13, 0xbc, 0xfe, 0x89, 0x49, 0x01, 0x06, 0x13, 0xbc, 0x6e, 0xfe, 0x89, 0x4a, 0x01, 0x06, 0x03,
- 0x4b, 0x03, 0x10, 0x05, 0x01, 0x06, 0x13, 0x6d, 0x10, 0x76, 0x01, 0x06, 0x13, 0x6d, 0x10, 0x0e,
- 0x01, 0x06, 0x13, 0x6d, 0xfe, 0x89, 0x49, 0x01, 0x06, 0x13, 0x6d, 0x10, 0x00, 0x01, 0x06, 0x13,
- 0x6d, 0xfe, 0x89, 0x4a, 0x01, 0x06, 0x13, 0x6d, 0xfe, 0x09, 0x49, 0x01, 0x06, 0x13, 0x6d, 0x6e,
- 0xc7, 0x01, 0x06, 0x03, 0x1d, 0xe2, 0x07, 0x05, 0xfe, 0x48, 0x13, 0xc3, 0x1c, 0xe2, 0xfe, 0x49,
- 0xf4, 0x00, 0x48, 0x6e, 0x9a, 0x57, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, 0xc7, 0xff, 0x02, 0x00,
- 0x10, 0x2a, 0xfe, 0x4a, 0x18, 0x35, 0x07, 0xfe, 0xe3, 0x00, 0xfe, 0x20, 0x13, 0x12, 0xfe, 0x6e,
- 0x18, 0x22, 0x1c, 0x97, 0x01, 0x47, 0x1d, 0x97, 0x07, 0x05, 0x55, 0x0b, 0x59, 0x05, 0x3d, 0x03,
- 0x09, 0x53, 0x01, 0x14, 0xfe, 0x00, 0x40, 0xa2, 0x07, 0x16, 0xba, 0x09, 0x96, 0x01, 0x14, 0xa2,
- 0x09, 0x5f, 0x01, 0xb7, 0x03, 0x09, 0x96, 0x01, 0x14, 0xa2, 0xfe, 0x80, 0xe7, 0x16, 0x07, 0x16,
- 0x56, 0xfe, 0x45, 0x58, 0x01, 0xfb, 0xa2, 0x03, 0x09, 0x53, 0x01, 0x14, 0xa2, 0x09, 0x5f, 0x01,
- 0xb7, 0x03, 0x09, 0x53, 0x01, 0x14, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x4c, 0xfe, 0x49, 0xe4, 0x16,
- 0xba, 0x09, 0x96, 0x01, 0x14, 0xfe, 0x80, 0x4c, 0x09, 0x5f, 0x01, 0x7a, 0x03, 0x18, 0x16, 0x7f,
- 0x73, 0xe3, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x38, 0xa8,
- 0xfe, 0x0a, 0x19, 0x01, 0xfe, 0x10, 0x1a, 0xfe, 0x0c, 0x13, 0xaa, 0x38, 0x73, 0xfe, 0x2c, 0x01,
- 0xfe, 0x2f, 0x19,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0xfe, 0xba, 0x05, 0x71, 0x2e, 0xfe, 0x21, 0x00, 0xf1, 0x2e,
+ 0xfe, 0x22, 0x00, 0xa2, 0x2e, 0x4a, 0xfe, 0x09, 0x48, 0xff, 0x02, 0x00, 0x10, 0x2f, 0xfe, 0xd0,
+ 0x05, 0x17, 0xfe, 0xf4, 0x05, 0xfe, 0xe2, 0x08, 0x01, 0x38, 0x06, 0xfe, 0x1c, 0x00, 0x4d, 0x01,
+ 0xa7, 0x2e, 0x07, 0x20, 0xe4, 0x47, 0xfe, 0x27, 0x01, 0x01, 0x0c, 0x06, 0x28, 0xfe, 0x24, 0x12,
+ 0x3e, 0x01, 0x84, 0x1f, 0x7f, 0x01, 0x0c, 0x06, 0x07, 0x4d, 0x1f, 0xfe, 0x0d, 0x00, 0x01, 0x42,
+ 0x8f, 0xfe, 0xa4, 0x0e, 0x05, 0x29, 0x03, 0xe6, 0x1e, 0xfe, 0xca, 0x13, 0x03, 0xb6, 0x1e, 0xfe,
+ 0x40, 0x12, 0x03, 0x66, 0x1e, 0xfe, 0x38, 0x13, 0x3e, 0x01, 0x84, 0x17, 0xfe, 0x72, 0x06, 0x0a,
+ 0x07, 0x01, 0x38, 0x06, 0x24, 0xfe, 0x02, 0x12, 0x4f, 0x01, 0xfe, 0x56, 0x19, 0x16, 0xfe, 0x68,
+ 0x06, 0x15, 0x82, 0x01, 0x41, 0x15, 0xe2, 0x03, 0x66, 0x8a, 0x10, 0x66, 0x03, 0x9a, 0x1e, 0xfe,
+ 0x70, 0x12, 0x03, 0x55, 0x1e, 0xfe, 0x68, 0x13, 0x01, 0xc6, 0x09, 0x12, 0x48, 0xfe, 0x92, 0x06,
+ 0x2e, 0x12, 0x01, 0xfe, 0xac, 0x1d, 0xfe, 0x43, 0x48, 0x62, 0x80, 0x13, 0x58, 0xff, 0x02, 0x00,
+ 0x57, 0x52, 0xad, 0x23, 0x3f, 0x4e, 0x62, 0x49, 0x3e, 0x01, 0x84, 0x17, 0xfe, 0xea, 0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, 0x3f, 0xfc, 0xa8, 0x8c, 0x49, 0x48, 0xfe, 0xda, 0x17, 0x62, 0x49,
+ 0xfe, 0x1c, 0x10, 0xa8, 0x8c, 0x80, 0x48, 0xfe, 0xda, 0x17, 0x62, 0x80, 0x71, 0x50, 0x26, 0xfe,
+ 0x4d, 0xf4, 0x00, 0xf7, 0x45, 0x13, 0x07, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x02, 0x50, 0x13,
+ 0x0d, 0x02, 0x50, 0x3e, 0x78, 0x4f, 0x45, 0x01, 0x08, 0x16, 0xa9, 0x27, 0x25, 0xbe, 0xfe, 0x03,
+ 0xea, 0xfe, 0x7e, 0x01, 0x01, 0x08, 0x16, 0xa9, 0x27, 0x25, 0xfe, 0xe9, 0x0a, 0x01, 0x08, 0x16,
+ 0xa9, 0x27, 0x25, 0xfe, 0xe9, 0x0a, 0xfe, 0x05, 0xea, 0xfe, 0x7f, 0x01, 0x01, 0x08, 0x16, 0xa9,
+ 0x27, 0x25, 0xfe, 0x69, 0x09, 0xfe, 0x02, 0xea, 0xfe, 0x80, 0x01, 0x01, 0x08, 0x16, 0xa9, 0x27,
+ 0x25, 0xfe, 0xe8, 0x08, 0x47, 0xfe, 0x81, 0x01, 0x03, 0xb6, 0x1e, 0x83, 0x01, 0x38, 0x06, 0x24,
+ 0x31, 0xa2, 0x78, 0xf2, 0x53, 0x07, 0x36, 0xfe, 0x34, 0xf4, 0x3f, 0xa1, 0x78, 0x03, 0x9a, 0x1e,


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 52'
echo 'File patch-2.2.20 is continued in part 53'
echo "53" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:44 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part45

#!/bin/sh -x
# this is part 45 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 45; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X STATIC int AscSgListToQueue(int);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int AscAbortSRB(ASC_DVC_VAR *, ASC_VADDR);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int AscResetDevice(ASC_DVC_VAR *, uchar);


-#endif /* version >= v1.3.89 */
-#endif /* version < v2.3.28 */

-STATIC int AscResetSB(ASC_DVC_VAR *);
X #ifdef CONFIG_ISA
X STATIC void AscEnableIsaDma(uchar);


X #endif /* CONFIG_ISA */

@@ -2263,7 +2118,7 @@
X */
X
X #define ADV_LIB_VERSION_MAJOR 5
-#define ADV_LIB_VERSION_MINOR 12
+#define ADV_LIB_VERSION_MINOR 14
X
X /* d_os_dep.h */
X #define ADV_OS_LINUX
@@ -2280,7 +2135,7 @@


X * types must be used. In Linux the char, short, and int types
X * are all consistent at 8, 16, and 32 bits respectively. Pointers
X * and long types are 64 bits on Alpha and UltraSPARC.
- */
+ */

X #define ADV_PADDR __u32 /* Physical address data type. */
X #define ADV_VADDR __u32 /* Virtual address data type. */
X #define ADV_DCNT __u32 /* Unsigned Data count type. */
@@ -2297,11 +2152,7 @@
X #define ADV_VADDR_TO_U32 virt_to_bus
X #define ADV_U32_TO_VADDR bus_to_virt
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-#define AdvPortAddr unsigned short /* I/O Port address size */
-#else /* version >= v1,3,0 */
X #define AdvPortAddr ulong /* Virtual memory address size */
-#endif /* version >= v1,3,0 */
X
X /*
X * Define Adv Library required memory access macros.
@@ -2312,14 +2163,6 @@
X #define ADV_MEM_WRITEW(addr, word) writew(word, addr)
X #define ADV_MEM_WRITEDW(addr, dword) writel(dword, addr)
X
-/*
- * The I/O memory mapping function names changed in 2.1.X.
- */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-#define ioremap vremap
-#define iounmap vfree


-#endif /* version < v2.1.0 */

-
X #define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15)
X
X /*
@@ -2336,7 +2179,7 @@
X * elements. Allow each command to have at least one ADV_SG_BLOCK structure.
X * This allows about 15 commands to have the maximum 17 ADV_SG_BLOCK
X * structures or 255 scatter-gather elements.
- *
+ *
X */
X #define ADV_TOT_SG_BLOCK ASC_DEF_MAX_HOST_QNG
X
@@ -2354,10 +2197,10 @@
X #define ADV_SG_TOTAL_MEM_SIZE \
X (sizeof(ADV_SG_BLOCK) * ADV_NUM_SG_BLOCK)
X
-#define ASC_PAGE_SIZE PAGE_SIZE
+#define ADV_PAGE_SIZE PAGE_SIZE
X
X #define ADV_NUM_PAGE_CROSSING \
- ((ADV_SG_TOTAL_MEM_SIZE + (ASC_PAGE_SIZE - 1))/ASC_PAGE_SIZE)
+ ((ADV_SG_TOTAL_MEM_SIZE + (ADV_PAGE_SIZE - 1))/ADV_PAGE_SIZE)
X
X /* a_condor.h */
X #define ADV_PCI_VENDOR_ID 0x10CD
@@ -2365,12 +2208,12 @@
X #define ADV_PCI_DEVID_38C0800_REV1 0x2500
X #define ADV_PCI_DEVID_38C1600_REV1 0x2700
X
-#define ASC_EEP_DVC_CFG_BEGIN (0x00)
-#define ASC_EEP_DVC_CFG_END (0x15)
-#define ASC_EEP_DVC_CTL_BEGIN (0x16) /* location of OEM name */
-#define ASC_EEP_MAX_WORD_ADDR (0x1E)
+#define ADV_EEP_DVC_CFG_BEGIN (0x00)
+#define ADV_EEP_DVC_CFG_END (0x15)
+#define ADV_EEP_DVC_CTL_BEGIN (0x16) /* location of OEM name */
+#define ADV_EEP_MAX_WORD_ADDR (0x1E)
X
-#define ASC_EEP_DELAY_MS 100
+#define ADV_EEP_DELAY_MS 100
X
X #define ADV_EEPROM_BIG_ENDIAN 0x8000 /* EEPROM Bit 15 */
X #define ADV_EEPROM_BIOS_ENABLE 0x4000 /* EEPROM Bit 14 */
@@ -2403,20 +2246,20 @@
X /* bit 14 set - BIOS Enable */
X /* bit 15 set - Big Endian Mode */
X ushort cfg_msw; /* 01 unused */
- ushort disc_enable; /* 02 disconnect enable */
+ ushort disc_enable; /* 02 disconnect enable */
X ushort wdtr_able; /* 03 Wide DTR able */
X ushort sdtr_able; /* 04 Synchronous DTR able */
- ushort start_motor; /* 05 send start up motor */
+ ushort start_motor; /* 05 send start up motor */
X ushort tagqng_able; /* 06 tag queuing able */
- ushort bios_scan; /* 07 BIOS device control */
- ushort scam_tolerant; /* 08 no scam */
-
+ ushort bios_scan; /* 07 BIOS device control */
+ ushort scam_tolerant; /* 08 no scam */
+
X uchar adapter_scsi_id; /* 09 Host Adapter ID */
X uchar bios_boot_delay; /* power up wait */
-
+
X uchar scsi_reset_delay; /* 10 reset delay */
X uchar bios_id_lun; /* first boot device scsi id & lun */
- /* high nibble is lun */
+ /* high nibble is lun */
X /* low nibble is scsi id */
X
X uchar termination; /* 11 0 - automatic */
@@ -2425,7 +2268,7 @@
X /* 3 - low on / high on */
X /* There is no low on / high off */
X
- uchar reserved1; /* reserved byte (not used) */
+ uchar reserved1; /* reserved byte (not used) */
X
X ushort bios_ctrl; /* 12 BIOS control bits */
X /* bit 0 BIOS don't act as initiator. */
@@ -2444,14 +2287,14 @@
X /* bit 13 */
X /* bit 14 */
X /* bit 15 */
- ushort ultra_able; /* 13 ULTRA speed able */
+ ushort ultra_able; /* 13 ULTRA speed able */
X ushort reserved2; /* 14 reserved */
X uchar max_host_qng; /* 15 maximum host queuing */
X uchar max_dvc_qng; /* maximum per device queuing */
X ushort dvc_cntl; /* 16 control bit for driver */
X ushort bug_fix; /* 17 control bit for bug fix */
- ushort serial_number_word1; /* 18 Board serial number word 1 */
- ushort serial_number_word2; /* 19 Board serial number word 2 */
+ ushort serial_number_word1; /* 18 Board serial number word 1 */
+ ushort serial_number_word2; /* 19 Board serial number word 2 */
X ushort serial_number_word3; /* 20 Board serial number word 3 */
X ushort check_sum; /* 21 EEP check sum */
X uchar oem_name[16]; /* 22 OEM name */
@@ -2460,9 +2303,9 @@
X ushort adv_err_addr; /* 32 last uc error address */
X ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */
X ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */
- ushort saved_adv_err_addr; /* 35 saved last uc error address */
+ ushort saved_adv_err_addr; /* 35 saved last uc error address */
X ushort num_of_err; /* 36 number of error */
-} ADVEEP_3550_CONFIG;
+} ADVEEP_3550_CONFIG;
X
X typedef struct adveep_38C0800_config
X {
@@ -2698,11 +2541,9 @@
X #define ADV_38C0800_IOLEN 0x100 /* I/O Port Range in bytes */


X
X /*
- *

- * XXX - Since ASC38C1600 Rev.3 has a Local RAM failure issue, we come out
- * a special 16K Adv Library and Microcode version. After the issue resolved,
- * we should turn back to the 32K support. Both a_init.c and mcode.sas files
- * also need to be updated.
+ * XXX - Since ASC38C1600 Rev.3 has a local RAM failure issue, there is
+ * a special 16K Adv Library and Microcode version. After the issue is
+ * resolved, should restore 32K support.
X *
X * #define ADV_38C1600_MEMSIZE 0x8000L * 32 KB Internal Memory *
X */
@@ -2907,8 +2748,8 @@
X #define SLEW_RATE 0x1000 /* SCSI output buffer slew rate */
X #define FILTER_SEL 0x0C00 /* Filter Period Selection */
X #define FLTR_DISABLE 0x0000 /* Input Filtering Disabled */
-#define FLTR_11_TO_20NS 0x0800 /* Input Filtering 11ns to 20ns */
-#define FLTR_21_TO_39NS 0x0C00 /* Input Filtering 21ns to 39ns */
+#define FLTR_11_TO_20NS 0x0800 /* Input Filtering 11ns to 20ns */
+#define FLTR_21_TO_39NS 0x0C00 /* Input Filtering 21ns to 39ns */
X #define ACTIVE_DBL 0x0200 /* Disable Active Negation */
X #define DIFF_MODE 0x0100 /* SCSI differential Mode (Read-Only) */
X #define DIFF_SENSE 0x0080 /* 1: No SE cables, 0: SE cable (Read-Only) */
@@ -3048,7 +2889,7 @@
X
X
X /*
- * ASC_DVC_VAR 'warn_code' values
+ * ADV_DVC_VAR 'warn_code' values
X */
X #define ASC_WARN_BUSRESET_ERROR 0x0001 /* SCSI Bus Reset error */
X #define ASC_WARN_EEPROM_CHKSUM 0x0002 /* EEP check sum error */
@@ -3059,11 +2900,8 @@
X #define ADV_MAX_TID 15 /* max. target identifier */
X #define ADV_MAX_LUN 7 /* max. logical unit number */
X
-
X /*
- * AscInitGetConfig() and AscInitAsc1000Driver() Definitions
- *
- * Error code values are set in ASC_DVC_VAR 'err_code'.
+ * Error code values are set in ADV_DVC_VAR 'err_code'.
X */
X #define ASC_IERR_WRITE_EEPROM 0x0001 /* write EEPROM error */
X #define ASC_IERR_MCODE_CHKSUM 0x0002 /* micro code check sum error */
@@ -3196,8 +3034,6 @@
X
X #define ASC_GET_CARRP(carrp) ((carrp) & ASC_NEXT_VPA_MASK)
X
-#define ADV_PAGE_SIZE 4096 /* Assume 4KB page size. */
-
X #define ADV_CARRIER_NUM_PAGE_CROSSING \
X (((ADV_CARRIER_COUNT * sizeof(ADV_CARR_T)) + \
X (ADV_PAGE_SIZE - 1))/ADV_PAGE_SIZE)
@@ -3225,7 +3061,7 @@
X * This structure can be discarded after initialization. Don't add
X * fields here needed after initialization.
X *
- * Field naming convention:
+ * Field naming convention:
X *
X * *_enable indicates the field enables or disables a feature. The
X * value of the field is never reset.
@@ -3245,7 +3081,7 @@
X ushort serial1; /* EEPROM serial number word 1 */
X ushort serial2; /* EEPROM serial number word 2 */
X ushort serial3; /* EEPROM serial number word 3 */
-} ADV_DVC_CFG;
+} ADV_DVC_CFG;
X
X struct adv_dvc_var;
X struct adv_scsi_req_q;
@@ -3261,7 +3097,7 @@
X *
X * One structure is required per host adapter.
X *
- * Field naming convention:
+ * Field naming convention:
X *
X * *_able indicates both whether a feature should be enabled or disabled
X * and whether a device isi capable of the feature. At initialization
@@ -3304,13 +3140,13 @@
X * driver may discard the buffer after initialization is done.
X */
X ADV_DVC_CFG *cfg; /* temporary configuration structure */
-} ADV_DVC_VAR;
+} ADV_DVC_VAR;
X
X #define NO_OF_SG_PER_BLOCK 15
X
X typedef struct asc_sg_block {
- uchar reserved1;
- uchar reserved2;
+ uchar reserved1;
+ uchar reserved2;
X uchar reserved3;
X uchar sg_cnt; /* Valid entries in block. */
X ADV_PADDR sg_ptr; /* Pointer to next sg block. */
@@ -3362,7 +3198,7 @@
X ADV_SG_BLOCK *sg_list_ptr; /* SG list virtual address. */
X char *vdata_addr; /* Data buffer virtual address. */
X uchar a_flag;
- uchar pad[2]; /* Pad out to a word boundary. */
+ uchar pad[2]; /* Pad out to a word boundary. */
X } ADV_SCSI_REQ_Q;
X
X /*
@@ -3406,8 +3242,8 @@
X /*
X * Device drivers must define the following functions.
X */


-STATIC int DvcEnterCritical(void);
-STATIC void DvcLeaveCritical(int);

+STATIC inline ulong DvcEnterCritical(void);
+STATIC inline void DvcLeaveCritical(ulong);

X STATIC void DvcSleepMilliSecond(ADV_DCNT);
X STATIC uchar DvcAdvReadPCIConfigByte(ADV_DVC_VAR *, ushort);
X STATIC void DvcAdvWritePCIConfigByte(ADV_DVC_VAR *, ushort, uchar);
@@ -3450,68 +3286,6 @@
X #define AscPCICmdRegBits_BusMastering 0x0007
X #define AscPCICmdRegBits_ParErrRespCtrl 0x0040


X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-

-/* Read byte from a register. */
-#define AdvReadByteRegister(iop_base, reg_off) \
- (inp((iop_base) + (reg_off)))
-
-/* Write byte to a register. */
-#define AdvWriteByteRegister(iop_base, reg_off, byte) \
- (outp((iop_base) + (reg_off), (byte)))
-
-/* Read word (2 bytes) from a register. */
-#define AdvReadWordRegister(iop_base, reg_off) \
- (le16_to_cpu(inpw((iop_base) + (reg_off))))
-
-/* Write word (2 bytes) to a register. */
-#define AdvWriteWordRegister(iop_base, reg_off, word) \
- (outpw((iop_base) + (reg_off), cpu_to_le16(word)))
-
-/* Read byte from LRAM. */
-#define AdvReadByteLram(iop_base, addr, byte) \
-do { \
- outpw((iop_base) + IOPW_RAM_ADDR, (addr)); \
- (byte) = inp((iop_base) + IOPB_RAM_DATA); \
-} while (0)
-
-/* Write byte to LRAM. */
-#define AdvWriteByteLram(iop_base, addr, byte) \
- (outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \
- outp((iop_base) + IOPB_RAM_DATA, (byte)))
-
-/* Read word (2 bytes) from LRAM. */
-#define AdvReadWordLram(iop_base, addr, word) \
-do { \
- outpw((iop_base) + IOPW_RAM_ADDR, (addr)); \
- (word) = le16_to_cpu(inpw((iop_base) + IOPW_RAM_DATA)); \
-} while (0)
-
-/* Write word (2 bytes) to LRAM. */
-#define AdvWriteWordLram(iop_base, addr, word) \
- (outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \
- outpw((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word)))
-
-/* Write double word (4 bytes) to LRAM */
-/* Because of unspecified C language ordering don't use auto-increment. */
-#define AdvWriteDWordLram(iop_base, addr, dword) \
- ((outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \
- outpw((iop_base) + IOPW_RAM_DATA, \
- cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
- (outpw((iop_base) + IOPW_RAM_ADDR, (addr) + 2), \
- outpw((iop_base) + IOPW_RAM_DATA, \
- cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
-
-/* Read word (2 bytes) from LRAM assuming that the address is already set. */
-#define AdvReadWordAutoIncLram(iop_base) \
- (le16_to_cpu(inpw((iop_base) + IOPW_RAM_DATA)))
-
-/* Write word (2 bytes) to LRAM assuming that the address is already set. */
-#define AdvWriteWordAutoIncLram(iop_base, word) \
- (outpw((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word)))
-
-#else /* version >= v1,3,0 */
-
X /* Read byte from a register. */
X #define AdvReadByteRegister(iop_base, reg_off) \
X (ADV_MEM_READB((iop_base) + (reg_off)))
@@ -3556,15 +3330,15 @@
X (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
X ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word)))
X
-/* Write double word (4 bytes) to LRAM */
+/* Write little-endian double word (4 bytes) to LRAM */
X /* Because of unspecified C language ordering don't use auto-increment. */
-#define AdvWriteDWordLram(iop_base, addr, dword) \
+#define AdvWriteDWordLramNoSwap(iop_base, addr, dword) \
X ((ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
X ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \
- ((ushort) ((dword) & 0xFFFF)))), \
+ cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
X (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr) + 2), \
X ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \
- ((ushort) ((dword >> 16) & 0xFFFF)))))
+ cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
X
X /* Read word (2 bytes) from LRAM assuming that the address is already set. */
X #define AdvReadWordAutoIncLram(iop_base) \
@@ -3574,7 +3348,6 @@
X #define AdvWriteWordAutoIncLram(iop_base, word) \
X (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word)))
X
-#endif /* version >= v1,3,0 */
X
X /*
X * Define macro to check for Condor signature.
@@ -3599,7 +3372,7 @@
X /*
X * Abort an SRB in the chip's RISC Memory. The 'srb_ptr' argument must
X * match the ASC_SCSI_REQ_Q 'srb_ptr' field.
- *
+ *
X * If the request has not yet been sent to the device it will simply be
X * aborted from RISC memory. If the request is disconnected it will be
X * aborted on reselection by sending an Abort Message to the target ID.
@@ -3702,6 +3475,7 @@
X /* Return the address that is aligned at the next doubleword >= to 'addr'. */
X #define ADV_8BALIGN(addr) (((ulong) (addr) + 0x7) & ~0x7)
X #define ADV_16BALIGN(addr) (((ulong) (addr) + 0xF) & ~0xF)
+#define ADV_32BALIGN(addr) (((ulong) (addr) + 0x1F) & ~0x1F)
X
X /*
X * Total contiguous memory needed for driver SG blocks.
@@ -3711,80 +3485,76 @@
X * single request.
X */
X
-#ifndef ADV_MAX_SG_LIST
-Forced Error: Driver must define ADV_MAX_SG_LIST.
-#endif /* ADV_MAX_SG_LIST */
-
X #define ADV_SG_LIST_MAX_BYTE_SIZE \
X (sizeof(ADV_SG_BLOCK) * \
X ((ADV_MAX_SG_LIST + (NO_OF_SG_PER_BLOCK - 1))/NO_OF_SG_PER_BLOCK))
X
-/*
- * Inquiry data structure and bitfield accessor macros


+/*
+ * Inquiry data structure and bitfield macros

X *
X * Using bitfields to access the subchar data isn't portable across
- * endianness, so instead mask and shift. Only quantities of more
+ * endianness, so instead mask and shift. Only quantities of more
X * than 1 bit are shifted, since the others are just tested for true
X * or false.
X */
X
-#define INQ_DVC_TYPE(inq) ((inq).periph & 0x1f)
-#define INQ_QUALIFIER(inq) (((inq).periph & 0xe0) >> 5)
-#define INQ_DVC_TYPE_MOD(inq) ((inq).devtype & 0x7f)
-#define INQ_REMOVABLE(inq) ((inq).devtype & 0x80)
-#define INQ_ANSI_VER(inq) ((inq).ver & 0x07)
-#define INQ_ECMA_VER(inq) (((inq).ver & 0x38) >> 3)
-#define INQ_ISO_VER(inq) (((inq).ver & 0xc0) >> 6)
-#define INQ_RESPONSE_FMT(inq) ((inq).byte3 & 0x0f)
-#define INQ_TERM_IO(inq) ((inq).byte3 & 0x40)
-#define INQ_ASYNC_NOTIF(inq) ((inq).byte3 & 0x80)
-#define INQ_SOFT_RESET(inq) ((inq).flags & 0x01)
-#define INQ_CMD_QUEUE(inq) ((inq).flags & 0x02)
-#define INQ_LINK_CMD(inq) ((inq).flags & 0x08)
-#define INQ_SYNC(inq) ((inq).flags & 0x10)
-#define INQ_WIDE16(inq) ((inq).flags & 0x20)
-#define INQ_WIDE32(inq) ((inq).flags & 0x40)
-#define INQ_REL_ADDR(inq) ((inq).flags & 0x80)
-#define INQ_INFO_UNIT(inq) ((inq).info & 0x01)
-#define INQ_QUICK_ARB(inq) ((inq).info & 0x02)
-#define INQ_CLOCKING(inq) (((inq).info & 0x0c) >> 2)
+#define ADV_INQ_DVC_TYPE(inq) ((inq)->periph & 0x1f)
+#define ADV_INQ_QUALIFIER(inq) (((inq)->periph & 0xe0) >> 5)
+#define ADV_INQ_DVC_TYPE_MOD(inq) ((inq)->devtype & 0x7f)
+#define ADV_INQ_REMOVABLE(inq) ((inq)->devtype & 0x80)
+#define ADV_INQ_ANSI_VER(inq) ((inq)->ver & 0x07)
+#define ADV_INQ_ECMA_VER(inq) (((inq)->ver & 0x38) >> 3)
+#define ADV_INQ_ISO_VER(inq) (((inq)->ver & 0xc0) >> 6)
+#define ADV_INQ_RESPONSE_FMT(inq) ((inq)->byte3 & 0x0f)
+#define ADV_INQ_TERM_IO(inq) ((inq)->byte3 & 0x40)
+#define ADV_INQ_ASYNC_NOTIF(inq) ((inq)->byte3 & 0x80)
+#define ADV_INQ_SOFT_RESET(inq) ((inq)->flags & 0x01)
+#define ADV_INQ_CMD_QUEUE(inq) ((inq)->flags & 0x02)
+#define ADV_INQ_LINK_CMD(inq) ((inq)->flags & 0x08)
+#define ADV_INQ_SYNC(inq) ((inq)->flags & 0x10)
+#define ADV_INQ_WIDE16(inq) ((inq)->flags & 0x20)
+#define ADV_INQ_WIDE32(inq) ((inq)->flags & 0x40)
+#define ADV_INQ_REL_ADDR(inq) ((inq)->flags & 0x80)
+#define ADV_INQ_INFO_UNIT(inq) ((inq)->info & 0x01)
+#define ADV_INQ_QUICK_ARB(inq) ((inq)->info & 0x02)
+#define ADV_INQ_CLOCKING(inq) (((inq)->info & 0x0c) >> 2)
X
X typedef struct {
- uchar periph; /* peripheral device type [0:4] */
- /* peripheral qualifier [5:7] */
- uchar devtype; /* device type modifier (for SCSI I) [0:6] */
- /* RMB - removable medium bit [7] */
- uchar ver; /* ANSI approved version [0:2] */
- /* ECMA version [3:5] */
- /* ISO version [6:7] */
- uchar byte3; /* response data format [0:3] */
+ uchar periph; /* peripheral device type [0:4] */
+ /* peripheral qualifier [5:7] */
+ uchar devtype; /* device type modifier (for SCSI I) [0:6] */
+ /* RMB - removable medium bit [7] */
+ uchar ver; /* ANSI approved version [0:2] */
+ /* ECMA version [3:5] */
+ /* ISO version [6:7] */
+ uchar byte3; /* response data format [0:3] */
X /* 0 SCSI 1 */
X /* 1 CCS */
X /* 2 SCSI-2 */
X /* 3-F reserved */
- /* reserved [4:5] */
- /* terminate I/O process bit (see 5.6.22) [6] */
- /* asynch. event notification (processor) [7] */
+ /* reserved [4:5] */
+ /* terminate I/O process bit (see 5.6.22) [6] */
+ /* asynch. event notification (processor) [7] */
X uchar add_len; /* additional length */
+ uchar res1; /* reserved */
X uchar res2; /* reserved */
- uchar res3; /* reserved */
- uchar flags; /* soft reset implemented [0] */
- /* command queuing [1] */
- /* reserved [2] */
- /* linked command for this logical unit [3] */
- /* synchronous data transfer [4] */
- /* wide bus 16 bit data transfer [5] */
- /* wide bus 32 bit data transfer [6] */
- /* relative addressing mode [7] */
+ uchar flags; /* soft reset implemented [0] */
+ /* command queuing [1] */
+ /* reserved [2] */
+ /* linked command for this logical unit [3] */
+ /* synchronous data transfer [4] */
+ /* wide bus 16 bit data transfer [5] */
+ /* wide bus 32 bit data transfer [6] */
+ /* relative addressing mode [7] */
X uchar vendor_id[8]; /* vendor identification */
X uchar product_id[16]; /* product identification */
X uchar product_rev_level[4]; /* product revision level */
X uchar vendor_specific[20]; /* vendor specific */
- uchar info; /* information unit supported [0] */
- /* quick arbitrate supported [1] */
- /* clocking field [2:3] */
- /* reserved [4:7] */
- uchar res6; /* reserved */
+ uchar info; /* information unit supported [0] */
+ /* quick arbitrate supported [1] */
+ /* clocking field [2:3] */
+ /* reserved [4:7] */
+ uchar res3; /* reserved */
X } ADV_SCSI_INQUIRY; /* 58 bytes */
X
X
@@ -3801,7 +3571,6 @@
X
X /* asc_board_t flags */
X #define ASC_HOST_IN_RESET 0x01
-#define ASC_HOST_IN_ABORT 0x02
X #define ASC_IS_WIDE_BOARD 0x04 /* AdvanSys Wide Board */
X #define ASC_SELECT_QUEUE_DEPTHS 0x08
X
@@ -3815,22 +3584,17 @@
X * and data after loading, define macros for this purpose. These macros
X * are not used when the driver is built as a module, cf. linux/init.h.
X */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,23)
-#define ASC_INITFUNC(type, func) type func
-#define ASC_INITDATA
-#define ASC_INIT
-#else /* version >= v2.1.23 */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,16)
-#define ASC_INITFUNC(type, func) __initfunc(type func)
-#else /* version >= v2.3.16 */
+#if ASC_LINUX_KERNEL24
X #define ASC_INITFUNC(type, func) type __init func
-#endif /* version >= v2.3.16 */
+#elif ASC_LINUX_KERNEL22
+#define ASC_INITFUNC(type, func) __initfunc(type func)
+#endif
X #define ASC_INITDATA __initdata
X #define ASC_INIT __init


-#endif /* version >= v2.1.23 */
X

X #define ASC_INFO_SIZE 128 /* advansys_info() line size */
X
+#ifdef CONFIG_PROC_FS
X /* /proc/scsi/advansys/[0...] related definitions */
X #define ASC_PRTBUF_SIZE 2048
X #define ASC_PRTLINE_SIZE 160
@@ -3846,6 +3610,37 @@
X }
X
X #define ASC_MIN(a, b) (((a) < (b)) ? (a) : (b))


+#endif /* CONFIG_PROC_FS */
+

+/*
+ * XXX - Release and acquire the io_request_lock. These macros are needed
+ * because the 2.4 kernel SCSI mid-level driver holds the 'io_request_lock'
+ * on entry to SCSI low-level drivers.
+ *
+ * These definitions and all code that uses code should be removed when the
+ * SCSI mid-level driver no longer holds the 'io_request_lock' on entry to
+ * SCSI low-level driver detect, queuecommand, and reset entrypoints.
+ *
+ * The interrupt flags values doesn't matter in the macros because the
+ * SCSI mid-level will save and restore the flags values before and after
+ * calling advansys_detect, advansys_queuecommand, and advansys_reset where
+ * these macros are used. We do want interrupts enabled after the lock is
+ * released so an explicit sti() is done. The driver only needs interrupts
+ * disabled when it acquires the per board lock.
+ */
+#define ASC_UNLOCK_IO_REQUEST_LOCK \
+ { \
+ ulong flags; /* flags value not needed, cf. comment above. */ \
+ save_flags(flags); \
+ spin_unlock_irqrestore(&io_request_lock, flags); \
+ sti(); /* enable interrupts */ \
+ }
+
+#define ASC_LOCK_IO_REQUEST_LOCK \
+ { \
+ ulong flags; /* flags value not needed, cf. comment above. */ \
+ spin_lock_irqsave(&io_request_lock, flags); \
+ }
X
X /* Asc Library return codes */
X #define ASC_TRUE 1
@@ -4186,16 +3981,8 @@
X /* Per board statistics structure */
X struct asc_stats {
X /* Driver Entrypoint Statistics */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- ADV_DCNT command; /* # calls to advansys_command() */


-#endif /* version < v2.3.28 */

X ADV_DCNT queuecommand; /* # calls to advansys_queuecommand() */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- ADV_DCNT abort; /* # calls to advansys_abort() */
- ADV_DCNT reset; /* # calls to advansys_reset() */
-#else /* version >= v2.3.28 */
- ADV_DCNT eh_bus_reset; /* # calls to advansys_eh_bus_reset() */
-#endif /* version >= v2.3.28 */
+ ADV_DCNT reset; /* # calls to advansys_eh_bus_reset() */
X ADV_DCNT biosparam; /* # calls to advansys_biosparam() */
X ADV_DCNT interrupt; /* # advansys_interrupt() calls */
X ADV_DCNT callback; /* # calls to asc/adv_isr_callback() */
@@ -4249,17 +4036,17 @@
X * up to 255 scatter-gather elements may be used per request or
X * ADV_SCSI_REQ_Q.
X *
- * Both structures must be 8 byte aligned.
+ * Both structures must be 32 byte aligned.
X */
X typedef struct adv_sgblk {
X ADV_SG_BLOCK sg_block; /* Sgblock structure. */
- uchar align[8]; /* Sgblock structure padding. */
+ uchar align[32]; /* Sgblock structure padding. */
X struct adv_sgblk *next_sgblkp; /* Next scatter-gather structure. */
X } adv_sgblk_t;
X
X typedef struct adv_req {
X ADV_SCSI_REQ_Q scsi_req_q; /* Adv Library request structure. */
- uchar align[8]; /* Request structure padding. */
+ uchar align[32]; /* Request structure padding. */
X Scsi_Cmnd *cmndp; /* Mid-Level SCSI command pointer. */
X adv_sgblk_t *sgblkp; /* Adv Library scatter-gather pointer. */
X struct adv_req *next_reqp; /* Next Request Structure. */
@@ -4299,13 +4086,11 @@
X ADVEEP_38C1600_CONFIG adv_38C1600_eep; /* 38C1600 EEPROM config. */
X } eep_config;
X ulong last_reset; /* Saved last reset time */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28)
X spinlock_t lock; /* Board spinlock */
-#endif /* version >= v2.3.28 */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
X /* /proc/scsi/advansys/[0...] */
- char *prtbuf; /* Statistics Print Buffer */


-#endif /* version >= v1.3.0 */

+ char *prtbuf; /* /proc print buffer */
+#endif /* CONFIG_PROC_FS */
X #ifdef ADVANSYS_STATS
X struct asc_stats asc_stats; /* Board statistics */
X #endif /* ADVANSYS_STATS */
@@ -4388,8 +4173,8 @@
X
X /* Note: All driver global data should be initialized. */
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) && \
- LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#if ASC_LINUX_KERNEL22
+#ifdef CONFIG_PROC_FS
X struct proc_dir_entry proc_scsi_advansys =
X {
X PROC_SCSI_ADVANSYS, /* unsigned short low_ino */
@@ -4398,13 +4183,14 @@
X S_IFDIR | S_IRUGO | S_IXUGO, /* mode_t mode */
X 2 /* nlink_t nlink */
X };
-#endif /* v2.3.28 > version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
+#endif /* ASC_LINUX_KERNEL22 */
X
X /* Number of boards detected in system. */
X STATIC int asc_board_count = 0;
X STATIC struct Scsi_Host *asc_host[ASC_NUM_BOARD_SUPPORTED] = { 0 };
X
-/* Overrun buffer shared between all boards. */
+/* Overrun buffer used by all narrow boards. */
X STATIC uchar overrun_buf[ASC_OVERRUN_BSIZE] = { 0 };
X
X /*
@@ -4421,12 +4207,6 @@
X ASC_IS_PCI,
X };
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-STATIC int pci_scan_method ASC_INITDATA = -1;
-#endif /* ASC_CONFIG_PCI */


-#endif /* version < v2.1.93 */
-

X /*
X * Used with the LILO 'advansys' option to eliminate or
X * limit I/O port probing at boot time, cf. advansys_setup().
@@ -4434,19 +4214,6 @@
X STATIC int asc_iopflag = ASC_FALSE;
X STATIC int asc_ioport[ASC_NUM_IOPORT_PROBE] = { 0, 0, 0, 0 };
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-/*
- * In kernels earlier than v1.3.0, kmalloc() does not work
- * during driver initialization. Therefore statically declare
- * 16 elements of each structure. v1.3.0 kernels will probably
- * not need any more than this number.
- */
-uchar adv_carr_buf[20 * sizeof(ADV_CARR_T)] = { 0 };
-uchar adv_req_buf[16 * sizeof(adv_req_t)] = { 0 };
-#define ADV_SGBLK_BUF_CNT 32
-uchar adv_sgblk_buf[ADV_SGBLK_BUF_CNT * sizeof(adv_sgblk_t)] = { 0 };
-#endif /* version >= v1,3,0 */
-
X #ifdef ADVANSYS_DEBUG
X STATIC char *
X asc_bus_name[ASC_NUM_BUS] = {
@@ -4469,23 +4236,9 @@
X * advansys.h contains function prototypes for functions global to Linux.
X */
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
-#ifdef CONFIG_PROC_FS
-STATIC int asc_proc_copy(off_t, off_t, char *, int , char *, int);
-#endif /* CONFIG_PROC_FS */


-#endif /* version >= v1.3.0 */

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-STATIC void advansys_interrupt(int, struct pt_regs *);
-#else /* version >= v1.3.70 */
-STATIC void advansys_interrupt(int, void *, struct pt_regs *);
-#endif /* version >= v1.3.70 */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC void advansys_select_queue_depths(struct Scsi_Host *,
- Scsi_Device *);
-#endif /* version >= v1.3.89 */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC void advansys_command_done(Scsi_Cmnd *);


-#endif /* version < v2.3.28 */

+STATIC void advansys_interrupt(int, void *, struct pt_regs *);
+STATIC void advansys_select_queue_depths(struct Scsi_Host *,
+ Scsi_Device *);
X STATIC void asc_scsi_done_list(Scsi_Cmnd *);
X STATIC int asc_execute_scsi_cmnd(Scsi_Cmnd *);
X STATIC int asc_build_req(asc_board_t *, Scsi_Cmnd *);
@@ -4494,27 +4247,13 @@
X STATIC void asc_isr_callback(ASC_DVC_VAR *, ASC_QDONE_INFO *);
X STATIC void adv_isr_callback(ADV_DVC_VAR *, ADV_SCSI_REQ_Q *);
X STATIC void adv_async_callback(ADV_DVC_VAR *, uchar);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-STATIC int asc_srch_pci_dev(PCI_DEVICE *);
-STATIC uchar asc_scan_method(void);
-STATIC int asc_pci_find_dev(PCI_DEVICE *);
-STATIC void asc_get_pci_cfg(PCI_DEVICE *, PCI_CONFIG_SPACE *);
-STATIC ushort asc_get_cfg_word(PCI_DATA *);
-STATIC uchar asc_get_cfg_byte(PCI_DATA *);
-STATIC void asc_put_cfg_byte(PCI_DATA *, uchar);
-#endif /* ASC_CONFIG_PCI */


-#endif /* version < v2.1.93 */

X STATIC void asc_enqueue(asc_queue_t *, REQP, int);
X STATIC REQP asc_dequeue(asc_queue_t *, int);
X STATIC REQP asc_dequeue_list(asc_queue_t *, REQP *, int);
X STATIC int asc_rmqueue(asc_queue_t *, REQP);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-STATIC int asc_isqueued(asc_queue_t *, REQP);


-#endif /* version < v2.3.28 */

X STATIC void asc_execute_queue(asc_queue_t *);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X #ifdef CONFIG_PROC_FS
+STATIC int asc_proc_copy(off_t, off_t, char *, int , char *, int);
X STATIC int asc_prt_board_devices(struct Scsi_Host *, char *, int);
X STATIC int asc_prt_adv_bios(struct Scsi_Host *, char *, int);
X STATIC int asc_get_eeprom_string(ushort *serialnum, uchar *cp);
@@ -4525,12 +4264,12 @@
X STATIC int asc_prt_adv_board_info(struct Scsi_Host *, char *, int);
X STATIC int asc_prt_line(char *, int, char *fmt, ...);
X #endif /* CONFIG_PROC_FS */


-#endif /* version >= v1.3.0 */
X

X /* Declaration for Asc Library internal functions referenced by driver. */
X STATIC int AscFindSignature(PortAddr);
X STATIC ushort AscGetEEPConfig(PortAddr, ASCEEP_CONFIG *, ushort);
X
+/* Statistics function prototypes. */
X #ifdef ADVANSYS_STATS
X #ifdef CONFIG_PROC_FS
X STATIC int asc_prt_board_stats(struct Scsi_Host *, char *, int);
@@ -4538,6 +4277,7 @@
X #endif /* CONFIG_PROC_FS */
X #endif /* ADVANSYS_STATS */
X
+/* Debug function prototypes. */
X #ifdef ADVANSYS_DEBUG
X STATIC void asc_prt_scsi_host(struct Scsi_Host *);
X STATIC void asc_prt_scsi_cmnd(Scsi_Cmnd *);
@@ -4552,16 +4292,12 @@
X STATIC void asc_prt_hex(char *f, uchar *, int);


X #endif /* ADVANSYS_DEBUG */
X
-#ifdef ADVANSYS_ASSERT

-STATIC int advansys_interrupts_enabled(void);
-#endif /* ADVANSYS_ASSERT */
-
X
X /*
X * --- Linux 'Scsi_Host_Template' and advansys_setup() Functions
X */
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
X /*
X * advansys_proc_info() - /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)]
X *
@@ -4583,10 +4319,9 @@
X * user just won't get all the available statistics.
X */
X int
-advansys_proc_info(char *buffer, char **start, off_t offset, int length,
+advansys_proc_info(char *buffer, char **start, off_t offset, int length,
X int hostno, int inout)
X {
-#ifdef CONFIG_PROC_FS
X struct Scsi_Host *shp;
X asc_board_t *boardp;
X int i;
@@ -4598,7 +4333,9 @@
X char *curbuf;
X off_t advoffset;
X Scsi_Device *scd;
+#ifdef ADVANSYS_STATS
X int tgt_id;
+#endif /* ADVANSYS_STATS */
X
X ASC_DBG(1, "advansys_proc_info: begin\n");
X
@@ -4690,11 +4427,7 @@
X * Display target driver information for each device attached
X * to the board.
X */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,75)
- for (scd = scsi_devices; scd; scd = scd->next)
-#else /* version >= v2.1.75 */
X for (scd = shp->host_queue; scd; scd = scd->next)
-#endif /* version >= v2.1.75 */
X {
X if (scd->host == shp) {
X cp = boardp->prtbuf;
@@ -4715,7 +4448,7 @@
X curbuf += cnt;
X }


X }
-
+
X /*

X * Display EEPROM configuration for the board.
X */
@@ -4812,11 +4545,8 @@
X ASC_DBG1(1, "advansys_proc_info: totcnt %d\n", totcnt);
X
X return totcnt;
-#else /* CONFIG_PROC_FS */
- return 0;
-#endif /* CONFIG_PROC_FS */
X }


-#endif /* version >= v1.3.0 */

+#endif /* CONFIG_PROC_FS */
X
X /*
X * advansys_detect()
@@ -4847,19 +4577,6 @@
X int ioport = 0;
X int share_irq = FALSE;
X int iolen = 0;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- int pci_init_search = 0;
- PCI_DEVICE pci_device[ASC_NUM_BOARD_SUPPORTED];
- int pci_card_cnt_max = 0;
- int pci_card_cnt = 0;
- PCI_DEVICE pciDevice;
- PCI_CONFIG_SPACE pciConfig;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
- ADV_PADDR pci_memory_address;
-#endif /* version >= v1,3,0 */
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
X int pci_init_search = 0;
X struct pci_dev *pci_devicep[ASC_NUM_BOARD_SUPPORTED];
@@ -4877,7 +4594,6 @@
X };
X ADV_PADDR pci_memory_address;


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */

X int warn_code, err_code;
X int ret;
X
@@ -4890,11 +4606,18 @@
X
X ASC_DBG(1, "advansys_detect: begin\n");
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28)
+ /*
+ * XXX - Remove this comment and the next line when SCSI mid-level
+ * no longer acquires 'io_request_lock' before calling the SCSI
+ * low-level detect entrypoint.
+ */
+ ASC_UNLOCK_IO_REQUEST_LOCK
+
+#if ASC_LINUX_KERNEL24
X tpnt->proc_name = "advansys";
-#elif LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#elif ASC_LINUX_KERNEL22
X tpnt->proc_dir = &proc_scsi_advansys;


-#endif /* version >= v1.3.0 */

+#endif
X
X asc_board_count = 0;
X
@@ -4904,7 +4627,7 @@
X */
X if (asc_iopflag == ASC_TRUE) {
X for (ioport = 0; ioport < ASC_NUM_IOPORT_PROBE; ioport++) {
- ASC_DBG2(1, "advansys_detect: asc_ioport[%d] %x\n",
+ ASC_DBG2(1, "advansys_detect: asc_ioport[%d] 0x%x\n",
X ioport, asc_ioport[ioport]);
X if (asc_ioport[ioport] != 0) {
X for (iop = 0; iop < ASC_IOADR_TABLE_MAX_IX; iop++) {
@@ -4923,15 +4646,6 @@
X ioport = 0;
X }
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- memset(&pciDevice, 0, sizeof(PCI_DEVICE));
- memset(&pciConfig, 0, sizeof(PCI_CONFIG_SPACE));
- pciDevice.maxBusNumber = PCI_MAX_BUS;
- pciDevice.endSlot = PCI_MAX_SLOT;
-#endif /* ASC_CONFIG_PCI */


-#endif /* version < v2.1.93 */
-

X for (bus = 0; bus < ASC_NUM_BUS; bus++) {
X
X ASC_DBG2(1, "advansys_detect: bus search type %d (%s)\n",
@@ -4965,7 +4679,8 @@
X }
X }
X if (iop) {
- ASC_DBG1(1, "advansys_detect: probing I/O port %x...\n",
+ ASC_DBG1(1,
+ "advansys_detect: probing I/O port 0x%x...\n",
X iop);
X if (check_region(iop, ASC_IOADR_GAP) != 0) {
X printk(
@@ -5016,67 +4731,6 @@
X break;
X
X case ASC_IS_PCI:
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- if (pci_init_search == 0) {
- int i, j;
-
- pci_init_search = 1;
-
- /* Find all PCI cards. */
- while (asc_srch_pci_dev(&pciDevice) == PCI_DEVICE_FOUND) {
- pci_device[pci_card_cnt_max++] = pciDevice;
- }
-
- /*
- * Sort PCI cards in ascending order by PCI Bus, Slot,
- * and Device Number.
- */
- for (i = 0; i < pci_card_cnt_max - 1; i++)
- {
- for (j = i + 1; j < pci_card_cnt_max; j++) {
- if ((pci_device[j].busNumber <
- pci_device[i].busNumber) ||
- ((pci_device[j].busNumber ==
- pci_device[i].busNumber) &&
- (pci_device[j].slotNumber <
- pci_device[i].slotNumber)) ||
- ((pci_device[j].busNumber ==
- pci_device[i].busNumber) &&
- (pci_device[j].slotNumber ==
- pci_device[i].slotNumber) &&
- (pci_device[j].devFunc <
- pci_device[i].devFunc))) {
- pciDevice = pci_device[i];
- pci_device[i] = pci_device[j];
- pci_device[j] = pciDevice;
- }
- }
- }
-
- pci_card_cnt = 0;
- } else {
- pci_card_cnt++;
- }
-
- if (pci_card_cnt == pci_card_cnt_max) {
- iop = 0;
- } else {
- pciDevice = pci_device[pci_card_cnt];
- ASC_DBG2(2,
- "advansys_detect: slotFound %d, busNumber %d\n",
- pciDevice.slotFound, pciDevice.busNumber);
- asc_get_pci_cfg(&pciDevice, &pciConfig);
- iop = pciConfig.baseAddress[0] & PCI_IOADDRESS_MASK;
- ASC_DBG2(1,
- "advansys_detect: vendorID %X, deviceID %X\n",
- pciConfig.vendorID, pciConfig.deviceID);
- ASC_DBG2(2, "advansys_detect: iop %X, irqLine %d\n",
- iop, pciConfig.irqLine);
- }
- break;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
X if (pci_init_search == 0) {
X int i, j;
@@ -5090,13 +4744,13 @@
X NULL) {
X pci_device_id_cnt++;
X } else {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)
- pci_devicep[pci_card_cnt_max++] = pci_devp;
-#else /* version >= v2.4.0 */
+#if ASC_LINUX_KERNEL24
X if (pci_enable_device(pci_devp) == 0) {
X pci_devicep[pci_card_cnt_max++] = pci_devp;
X }
-#endif /* version >= v2.4.0 */
+#elif ASC_LINUX_KERNEL22
+ pci_devicep[pci_card_cnt_max++] = pci_devp;
+#endif
X }
X }
X
@@ -5133,21 +4787,18 @@
X ASC_DBG2(2,
X "advansys_detect: devfn %d, bus number %d\n",
X pci_devp->devfn, pci_devp->bus->number);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13)
- iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK;
-#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)
- iop = pci_devp->resource[0].start & PCI_IOADDRESS_MASK;
-#else /* version >= v2.4.0 */
+#if ASC_LINUX_KERNEL24
X iop = pci_resource_start(pci_devp, 0);
-#endif /* version >= v2.4.0 */
- ASC_DBG2(1,
+#elif ASC_LINUX_KERNEL22
+ iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK;
+#endif
+ ASC_DBG2(1,
X "advansys_detect: vendorID %X, deviceID %X\n",
X pci_devp->vendor, pci_devp->device);
X ASC_DBG2(2, "advansys_detect: iop %X, irqLine %d\n",
X iop, pci_devp->irq);
X }


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */
X break;
X
X default:
@@ -5155,7 +4806,7 @@
X asc_bus[bus]);
X break;
X }
- ASC_DBG1(1, "advansys_detect: iop %x\n", iop);
+ ASC_DBG1(1, "advansys_detect: iop 0x%x\n", iop);
X
X /*
X * Adapter not found, try next bus type.
@@ -5172,9 +4823,9 @@
X */
X ASC_DBG(2, "advansys_detect: scsi_register()\n");
X shp = scsi_register(tpnt, sizeof(asc_board_t));
-
- if(shp == NULL) {
- continue;
+
+ if (shp == NULL) {
+ continue;
X }
X
X /* Save a pointer to the Scsi_host of each board found. */
@@ -5185,10 +4836,8 @@
X memset(boardp, 0, sizeof(asc_board_t));
X boardp->id = asc_board_count - 1;
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28)
X /* Initialize spinlock. */
- boardp->lock = SPIN_LOCK_UNLOCKED;


-#endif /* version >= v2.3.28 */

+ boardp->lock = SPIN_LOCK_UNLOCKED;
X
X /*
X * Handle both narrow and wide boards.
@@ -5197,17 +4846,6 @@
X * wide board flag. Set-up the board structure based on
X * the board type.
X */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- if (asc_bus[bus] == ASC_IS_PCI &&
- (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2300 ||
- pciConfig.deviceID == ASC_PCI_DEVICE_ID_2500 ||
- pciConfig.deviceID == ASC_PCI_DEVICE_ID_2700))
- {
- boardp->flags |= ASC_IS_WIDE_BOARD;
- }
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
X if (asc_bus[bus] == ASC_IS_PCI &&
X (pci_devp->device == ASC_PCI_DEVICE_ID_2300 ||
@@ -5217,7 +4855,6 @@
X boardp->flags |= ASC_IS_WIDE_BOARD;
X }


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */
X

X if (ASC_NARROW_BOARD(boardp)) {
X ASC_DBG(1, "advansys_detect: narrow board\n");
@@ -5235,24 +4872,6 @@
X adv_dvc_varp->cfg = &boardp->dvc_cfg.adv_dvc_cfg;
X adv_dvc_varp->isr_callback = adv_isr_callback;
X adv_dvc_varp->async_callback = adv_async_callback;
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- if (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2300)
- {
- ASC_DBG(1, "advansys_detect: ASC-3550\n");
- adv_dvc_varp->chip_type = ADV_CHIP_ASC3550;
- } else if (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2500)
- {
- ASC_DBG(1, "advansys_detect: ASC-38C0800\n");
- adv_dvc_varp->chip_type = ADV_CHIP_ASC38C0800;
- } else
- {
- ASC_DBG(1, "advansys_detect: ASC-38C1600\n");
- adv_dvc_varp->chip_type = ADV_CHIP_ASC38C1600;
- }
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
X if (pci_devp->device == ASC_PCI_DEVICE_ID_2300)
X {
@@ -5268,11 +4887,7 @@
X adv_dvc_varp->chip_type = ADV_CHIP_ASC38C1600;
X }


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */
X

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
- adv_dvc_varp->iop_base = iop;
-#else /* version >= v1,3,0 */
X /*
X * Map the board's registers into virtual memory for
X * PCI slave access. Only memory accesses are used to
@@ -5294,75 +4909,46 @@
X {
X iolen = ADV_38C1600_IOLEN;
X }
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- pci_memory_address = pciConfig.baseAddress[1];
- ASC_DBG1(1, "advansys_detect: pci_memory_address: %lu\n",
- (ulong) pci_memory_address);
- if ((boardp->ioremap_addr =
- ioremap(pci_memory_address & PAGE_MASK,
- PAGE_SIZE)) == 0) {
- ASC_PRINT3(
-"advansys_detect: board %d: ioremap(%lu, %x) returned NULL\n",
- boardp->id, (ulong) pci_memory_address, iolen);
- scsi_unregister(shp);
- asc_board_count--;
- continue;
- }
- ASC_DBG1(1, "advansys_detect: ioremap_addr: %lx\n",
- (ulong) boardp->ioremap_addr);
- adv_dvc_varp->iop_base = (AdvPortAddr)
- (boardp->ioremap_addr +
- (pci_memory_address - (pci_memory_address & PAGE_MASK)));
- ASC_DBG1(1, "advansys_detect: iop_base: %lx\n",
- adv_dvc_varp->iop_base);
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13)
- pci_memory_address = pci_devp->base_address[1];
-#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)
- pci_memory_address = pci_devp->resource[1].start;
-#else /* version >= v2.4.0 */
+#if ASC_LINUX_KERNEL24
X pci_memory_address = pci_resource_start(pci_devp, 1);
-#endif /* version >= v2.4.0 */
- ASC_DBG1(1, "advansys_detect: pci_memory_address: %x\n",
- pci_memory_address);
+#elif ASC_LINUX_KERNEL22
+ pci_memory_address = pci_devp->base_address[1];
+#endif
+ ASC_DBG1(1, "advansys_detect: pci_memory_address: 0x%lx\n",
+ (ulong) pci_memory_address);
X if ((boardp->ioremap_addr =
X ioremap(pci_memory_address & PAGE_MASK,
X PAGE_SIZE)) == 0) {
X ASC_PRINT3(
X "advansys_detect: board %d: ioremap(%x, %d) returned NULL\n",
- boardp->id, pci_memory_address, iolen);
+ boardp->id, pci_memory_address, iolen);
X scsi_unregister(shp);
X asc_board_count--;
X continue;
X }
- ASC_DBG1(1, "advansys_detect: ioremap_addr: %lx\n",
+ ASC_DBG1(1, "advansys_detect: ioremap_addr: 0x%lx\n",
X (ulong) boardp->ioremap_addr);
X adv_dvc_varp->iop_base = (AdvPortAddr)
X (boardp->ioremap_addr +
X (pci_memory_address - (pci_memory_address & PAGE_MASK)));
- ASC_DBG1(1, "advansys_detect: iop_base: %lx\n",
+ ASC_DBG1(1, "advansys_detect: iop_base: 0x%lx\n",
X adv_dvc_varp->iop_base);


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */
-#endif /* version >= v1,3,0 */
X
X /*
- * Even though it isn't used to access the board in
- * kernels greater than or equal to v1.3.0, save
- * the I/O Port address so that it can be reported and
- * displayed.
+ * Even though it isn't used to access wide boards, other
+ * than for the debug line below, save I/O Port address so
+ * that it can be reported.
X */
X boardp->ioport = iop;
X
X ASC_DBG2(1,
- "advansys_detect: iopb_chip_id_1 %x, iopw_chip_id_0 %x\n",
+"advansys_detect: iopb_chip_id_1 0x%x, iopw_chip_id_0 0x%x\n",
X (ushort) inp(iop + 1), (ushort) inpw(iop));
X }
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
X /*
X * Allocate buffer for printing information from
X * /proc/scsi/advansys/[0...].
@@ -5376,7 +4962,7 @@
X asc_board_count--;
X continue;
X }


-#endif /* version >= v1.3.0 */

+#endif /* CONFIG_PROC_FS */
X
X if (ASC_NARROW_BOARD(boardp)) {
X /*
@@ -5398,20 +4984,6 @@
X share_irq = TRUE;
X break;


X #endif /* CONFIG_ISA */

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- case ASC_IS_PCI:
- shp->irq = asc_dvc_varp->irq_no = pciConfig.irqLine;
- asc_dvc_varp->cfg->pci_device_id = pciConfig.deviceID;
- asc_dvc_varp->cfg->pci_slot_info =
- ASC_PCI_MKID(pciDevice.busNumber,
- pciDevice.slotFound,
- pciDevice.devFunc);
- shp->unchecked_isa_dma = FALSE;
- share_irq = TRUE;
- break;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
X case ASC_IS_PCI:
X shp->irq = asc_dvc_varp->irq_no = pci_devp->irq;
@@ -5424,7 +4996,6 @@
X share_irq = TRUE;
X break;


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */

X default:
X ASC_PRINT2(
X "advansys_detect: board %d: unknown adapter type: %d\n",
@@ -5438,18 +5009,6 @@
X * For Wide boards set PCI information before calling
X * AdvInitGetConfig().
X */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
- shp->irq = adv_dvc_varp->irq_no = pciConfig.irqLine;
- adv_dvc_varp->cfg->pci_device_id = pciConfig.deviceID;
- adv_dvc_varp->cfg->pci_slot_info =
- ASC_PCI_MKID(pciDevice.busNumber,
- pciDevice.slotFound,
- pciDevice.devFunc);
- shp->unchecked_isa_dma = FALSE;
- share_irq = TRUE;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI
X shp->irq = adv_dvc_varp->irq_no = pci_devp->irq;
X adv_dvc_varp->cfg->pci_device_id = pci_devp->device;
@@ -5460,7 +5019,6 @@
X shp->unchecked_isa_dma = FALSE;
X share_irq = TRUE;


X #endif /* CONFIG_PCI */

-#endif /* version >= v2.1.93 */
X }
X
X /*
@@ -5504,33 +5062,33 @@
X break;
X default:
X ASC_PRINT2(
-"AscInitGetConfig: board %d: unknown warning: %x\n",
+"AscInitGetConfig: board %d: unknown warning: 0x%x\n",
X boardp->id, ret);
X break;
X }
X if ((err_code = asc_dvc_varp->err_code) != 0) {
X ASC_PRINT3(
-"AscInitGetConfig: board %d error: init_state %x, err_code %x\n",
+"AscInitGetConfig: board %d error: init_state 0x%x, err_code 0x%x\n",
X boardp->id, asc_dvc_varp->init_state,
X asc_dvc_varp->err_code);
X }
X } else {
X ASC_DBG(2, "advansys_detect: AdvInitGetConfig()\n");
X if ((ret = AdvInitGetConfig(adv_dvc_varp)) != 0) {
- ASC_PRINT2("AdvInitGetConfig: board %d: warning: %x\n",
+ ASC_PRINT2("AdvInitGetConfig: board %d: warning: 0x%x\n",
X boardp->id, ret);
X }
X if ((err_code = adv_dvc_varp->err_code) != 0) {
X ASC_PRINT2(
-"AdvInitGetConfig: board %d error: err_code %x\n",
+"AdvInitGetConfig: board %d error: err_code 0x%x\n",
X boardp->id, adv_dvc_varp->err_code);
X }
X }
-
+
X if (err_code != 0) {
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
X kfree(boardp->prtbuf);


-#endif /* version >= v1.3.0 */

+#endif /* CONFIG_PROC_FS */
X scsi_unregister(shp);
X asc_board_count--;
X continue;
@@ -5608,18 +5166,18 @@
X break;
X default:
X ASC_PRINT2(
-"AscInitSetConfig: board %d: unknown warning: %x\n",
+"AscInitSetConfig: board %d: unknown warning: 0x%x\n",
X boardp->id, ret);
X break;
X }
X if (asc_dvc_varp->err_code != 0) {
X ASC_PRINT3(
-"AscInitSetConfig: board %d error: init_state %x, err_code %x\n",
+"AscInitSetConfig: board %d error: init_state 0x%x, err_code 0x%x\n",
X boardp->id, asc_dvc_varp->init_state,
X asc_dvc_varp->err_code);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
X kfree(boardp->prtbuf);


-#endif /* version >= v1.3.0 */

+#endif /* CONFIG_PROC_FS */
X scsi_unregister(shp);
X asc_board_count--;
X continue;
@@ -5730,14 +5288,12 @@
X shp->irq = adv_dvc_varp->irq_no;
X }
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
X /*
X * Channels are numbered beginning with 0. For AdvanSys one host
X * structure supports one channel. Multi-channel boards have a
- * separate host structure for each channel.
+ * separate host structure for each channel.
X */
X shp->max_channel = 0;


-#endif /* version >= v1.3.89 */

X if (ASC_NARROW_BOARD(boardp)) {
X shp->max_id = ASC_MAX_TID + 1;
X shp->max_lun = ASC_MAX_LUN + 1;
@@ -5753,10 +5309,10 @@
X shp->max_lun = ADV_MAX_LUN + 1;
X
X /*
- * Save the I/O Port address and length even though the
- * in v1.3.0 and greater kernels the region is not used
- * by a Wide board. Instead the board is accessed with
- * Memory Mapped I/O.
+ * Save the I/O Port address and length even though
+ * I/O ports are not used to access Wide boards.
+ * Instead the Wide boards are accessed with
+ * PCI Memory Mapped I/O.
X */
X shp->io_port = iop;
X boardp->asc_n_io_port = iolen;
@@ -5767,22 +5323,15 @@
X shp->can_queue = adv_dvc_varp->max_host_qng;


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 45'
echo 'File patch-2.2.20 is continued in part 46'
echo "46" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:53 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part54

#!/bin/sh -x
# this is part 54 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 54; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ eh_bus_reset_handler: advansys_reset, \
X bios_param: advansys_biosparam, \
X /* \
X * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
@@ -209,5 +120,5 @@
X */ \
X use_clustering: ENABLE_CLUSTERING, \
X }
-#endif /* version >= v2.3.28 */
+#endif
X #endif /* _ADVANSYS_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/cpqfcTScontrol.c linux/drivers/scsi/cpqfcTScontrol.c
--- v2.2.19/drivers/scsi/cpqfcTScontrol.c Sun Mar 25 17:31:34 2001
+++ linux/drivers/scsi/cpqfcTScontrol.c Wed Oct 10 01:41:11 2001


@@ -553,7 +553,7 @@
X

X
X
-// This "look ahead" function examines the IMQ for occurence of
+// This "look ahead" function examines the IMQ for occurrence of
X // "type". Returns 1 if found, 0 if not.
X static int PeekIMQEntry( PTACHYON fcChip, ULONG type)
X {
@@ -1204,7 +1204,7 @@
X // open Login exchanges, in case the LinkDown happened in the
X // middle of logins. It's possible that some ports already
X // ACCepted login commands which we have not processed before
- // another LinkDown occured. Any accepted Login exhanges are
+ // another LinkDown occurred. Any accepted Login exhanges are
X // invalidated by LinkDown, even before they are acknowledged.
X // It's also possible for a port to have a Queued Reply or Request
X // for login which was interrupted by LinkDown; it may come later,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/cpqfcTSworker.c linux/drivers/scsi/cpqfcTSworker.c
--- v2.2.19/drivers/scsi/cpqfcTSworker.c Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/cpqfcTSworker.c Wed Oct 10 01:41:13 2001
@@ -421,7 +421,7 @@
X
X // printk(" *ELS %Xh* ", fcLQ->Qitem[QconsumerNdx].Type);
X // if PortDiscDone is not set, it means the SendLogins routine
- // failed to complete -- assume that LDn occured, so login frames
+ // failed to complete -- assume that LDn occurred, so login frames
X // are invalid
X if( !cpqfcHBAdata->PortDiscDone) // cleared by LDn
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/eata_dma.c linux/drivers/scsi/eata_dma.c
--- v2.2.19/drivers/scsi/eata_dma.c Sun Mar 25 17:31:31 2001
+++ linux/drivers/scsi/eata_dma.c Wed Oct 10 01:41:13 2001
@@ -503,6 +503,7 @@
X DBG(DBG_REQSENSE, printk(KERN_DEBUG "Tried to REQUEST SENSE\n"));
X cmd->result = DID_OK << 16;
X done(cmd);
+ restore_flags(flags);
X
X return(0);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/esp.c linux/drivers/scsi/esp.c
--- v2.2.19/drivers/scsi/esp.c Sun Mar 25 17:31:32 2001
+++ linux/drivers/scsi/esp.c Wed Oct 10 01:41:13 2001
@@ -3465,7 +3465,7 @@


X /* Target negotiates for synchronous transfers before we do, this
X * is legal although very strange. What is even funnier is that
X * the SCSI2 standard specifically recommends against targets doing
- * this because so many initiators cannot cope with this occuring.
+ * this because so many initiators cannot cope with this occurring.

X */
X static int target_with_ants_in_pants(struct Sparc_ESP *esp,
X Scsi_Cmnd *SCptr,
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/fdomain.c linux/drivers/scsi/fdomain.c
--- v2.2.19/drivers/scsi/fdomain.c Sun Mar 25 17:31:30 2001
+++ linux/drivers/scsi/fdomain.c Wed Oct 10 01:41:13 2001
@@ -3,6 +3,7 @@
X * Revised: Mon Dec 28 21:59:02 1998 by fa...@acm.org
X * Author: Rickard E. Faith, fa...@cs.unc.edu
X * Copyright 1992-1996, 1998 Rickard E. Faith (fa...@acm.org)
+ * Shared IRQ supported added 7/7/2001 Alan Cox <al...@redhat.com>
X
X * This program is free software; you can redistribute it and/or modify it
X * under the terms of the GNU General Public License as published by the
@@ -983,7 +984,7 @@
X /* Register the IRQ with the kernel */
X
X retcode = request_irq( interrupt_level,
- do_fdomain_16x0_intr, 0, "fdomain", NULL);
+ do_fdomain_16x0_intr, PCI_bus?SA_SHIRQ:0, "fdomain", NULL);
X
X if (retcode < 0) {
X if (retcode == -EINVAL) {
@@ -1230,8 +1231,11 @@
X interruptions while this routine is
X running. */
X
- /* sti(); Yes, we really want sti() here if we want to lock up our machine */
-
+ /* Check for other IRQ sources */
+ if((inb(TMC_Status_port)&0x01)==0)
+ return;
+
+ /* It is our IRQ */
X outb( 0x00, Interrupt_Cntl_port );
X
X /* We usually have one spurious interrupt after each command. Ignore it. */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/gdth.c linux/drivers/scsi/gdth.c
--- v2.2.19/drivers/scsi/gdth.c Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/gdth.c Wed Oct 10 01:41:14 2001
@@ -1,8 +1,10 @@
X /************************************************************************
- * GDT ISA/EISA/PCI Disk Array Controller driver for Linux *
+ * Linux driver for *
+ * ICP vortex GmbH: GDT ISA/EISA/PCI Disk Array Controllers *
+ * Intel Corporation: Storage RAID Controllers *
X * *
X * gdth.c *
- * Copyright (C) 1995-99 ICP vortex Computersysteme GmbH, Achim Leubner *
+ * Copyright (C) 1995-01 ICP vortex, an Intel company, Achim Leubner *
X * *
X * <ac...@vortex.de> *
X * *
@@ -20,9 +22,49 @@
X * along with this kernel; if not, write to the Free Software *
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
X * *
- * Tested with Linux 1.2.13, ..., 2.2.16, ..., 2.4.0-test10 *
+ * Tested with Linux 1.2.13, ..., 2.2.19, ..., 2.4.7 *
X * *
X * $Log: gdth.c,v $
+ * Revision 1.57 2001/08/21 11:16:35 achim
+ * Bugfix free_irq()
+ *
+ * Revision 1.56 2001/08/09 11:19:39 achim
+ * Scsi_Host_Template changes
+ *
+ * Revision 1.55 2001/08/09 10:11:28 achim
+ * Command HOST_UNFREEZE_IO before cache service init.
+ *
+ * Revision 1.54 2001/07/20 13:48:12 achim
+ * Expand: gdth_analyse_hdrive() removed
+ *
+ * Revision 1.53 2001/07/17 09:52:49 achim
+ * Small OEM related change
+ *
+ * Revision 1.52 2001/06/19 15:06:20 achim
+ * New host command GDT_UNFREEZE_IO added
+ *
+ * Revision 1.51 2001/05/22 06:42:37 achim
+ * PCI: Subdevice ID added
+ *
+ * Revision 1.50 2001/05/17 13:42:16 achim
+ * Support for Intel Storage RAID Controllers added
+ *
+ * Revision 1.50 2001/05/17 12:12:34 achim
+ * Support for Intel Storage RAID Controllers added
+ *
+ * Revision 1.49 2001/03/15 15:07:17 achim
+ * New __setup interface for boot command line options added
+ *
+ * Revision 1.48 2001/02/06 12:36:28 achim
+ * Bugfix Cluster protocol
+ *
+ * Revision 1.47 2001/01/10 14:42:06 achim
+ * New switch shared_access added
+ *
+ * Revision 1.46 2001/01/09 08:11:35 achim
+ * gdth_command() removed
+ * meaning of Scsi_Pointer members changed
+ *
X * Revision 1.45 2000/11/16 12:02:24 achim
X * Changes for kernel 2.4
X *
@@ -190,7 +232,7 @@
X * Initial revision
X *
X ************************************************************************/
-#ident "$Id: gdth.c,v 1.45 2000/11/16 12:02:24 achim Exp $"
+#ident "$Id: gdth.c,v 1.57 2001/08/21 11:16:35 achim Exp $"
X
X /* All GDT Disk Array Controllers are fully supported by this driver.
X * This includes the PCI/EISA/ISA SCSI Disk Array Controllers and the
@@ -220,9 +262,14 @@
X * virt_ctr:Y map every channel to a virtual controller
X * virt_ctr:N use multi channel support
X * hdr_channel:x x - number of virtual bus for host drives
+ * shared_access:Y disable driver reserve/release protocol to
+ * access a shared resource from several nodes,
+ * appropiate controller firmware required
+ * shared_access:N enable driver reserve/release protocol
X *
X * The default values are: "gdth=disable:N,reserve_mode:1,reverse_scan:N,
- * max_ids:127,rescan:N,virt_ctr:N,hdr_channel:0".
+ * max_ids:127,rescan:N,virt_ctr:N,hdr_channel:0,
+ * shared_access:N".
X * Here is another example: "gdth=reserve_list:0,1,2,0,0,1,3,0,rescan:Y".
X *
X * When loading the gdth driver as a module, the same options are available.
@@ -232,10 +279,22 @@
X * '1' in place of 'Y' and '0' in place of 'N'.
X *
X * Default: "modprobe gdth disable=0 reserve_mode=1 reverse_scan=0
- * max_ids=127 rescan=0 virt_ctr=0 hdr_channel=0"
+ * max_ids=127 rescan=0 virt_ctr=0 hdr_channel=0 shared_access=0"
X * The other example: "modprobe gdth reserve_list=0,1,2,0,0,1,3,0 rescan=1".
X */
X
+/* The meaning of the Scsi_Pointer members in this driver is as follows:
+ * ptr: Chaining
+ * this_residual: Command priority
+ * buffer: Unused
+ * buffers_residual: Timeout value
+ * Status: Command status (gdth_do_cmd())
+ * Message: Additional info (gdth_do_cmd())
+ * have_data_in: Flag for gdth_wait_completion()
+ * sent_command: Opcode special command
+ * phase: Service/parameter/return code special command
+ */
+


X #ifdef MODULE
X #include <linux/module.h>
X #endif

@@ -311,6 +370,8 @@
X static int gdth_search_eisa(ushort eisa_adr);
X static int gdth_search_isa(ulong32 bios_adr);
X static int gdth_search_pci(gdth_pci_str *pcistr);
+static void gdth_search_dev(gdth_pci_str *pcistr, ushort *cnt,
+ ushort vendor, ushort dev);
X static void gdth_sort_pci(gdth_pci_str *pcistr, int cnt);
X static int gdth_init_eisa(ushort eisa_adr,gdth_ha_str *ha);
X static int gdth_init_isa(ulong32 bios_adr,gdth_ha_str *ha);
@@ -609,6 +670,8 @@
X static int rescan = 0;
X /* map channels to virtual controllers */
X static int virt_ctr = 0;
+/* shared access */
+static int shared_access = 0;
X
X #ifdef MODULE
X #if LINUX_VERSION_CODE >= 0x02011A
@@ -622,6 +685,7 @@
X MODULE_PARM(max_ids, "i");
X MODULE_PARM(rescan, "i");
X MODULE_PARM(virt_ctr, "i");
+MODULE_PARM(shared_access, "i");
X MODULE_AUTHOR("Achim Leubner");
X #endif
X #endif
@@ -719,8 +783,28 @@
X
X GDTH_INITFUNC(static int, gdth_search_pci(gdth_pci_str *pcistr))
X {
+ ushort device, cnt;
+
+ TRACE(("gdth_search_pci()\n"));
+
+ cnt = 0;
+ for (device = 0; device <= PCI_DEVICE_ID_VORTEX_GDT6555; ++device)
+ gdth_search_dev(pcistr, &cnt, PCI_VENDOR_ID_VORTEX, device);
+ for (device = PCI_DEVICE_ID_VORTEX_GDT6x17RP;
+ device <= PCI_DEVICE_ID_VORTEX_GDTMAXRP; ++device)
+ gdth_search_dev(pcistr, &cnt, PCI_VENDOR_ID_VORTEX, device);
+ gdth_search_dev(pcistr, &cnt, PCI_VENDOR_ID_VORTEX,
+ PCI_DEVICE_ID_VORTEX_GDTNEWRX);
+ gdth_search_dev(pcistr, &cnt, PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_SRC);
+ return cnt;
+}
+
+
+GDTH_INITFUNC(static void, gdth_search_dev(gdth_pci_str *pcistr, ushort *cnt,
+ ushort vendor, ushort device))
+{
X ulong base0, base1, base2;
- ushort device_id, cnt;
X #if LINUX_VERSION_CODE >= 0x2015C
X struct pci_dev *pdev;
X #else
@@ -728,147 +812,150 @@
X ushort idx;
X #endif
X
- TRACE(("gdth_search_pci()\n"));
+ TRACE(("gdth_search_dev() cnt %d vendor %x device %x\n",
+ *cnt, vendor, device));
X
- cnt = 0;
- for (device_id = 0; device_id <= PCI_DEVICE_ID_VORTEX_GDTMAXRP;
- ++device_id) {
- if (device_id > PCI_DEVICE_ID_VORTEX_GDT6555 &&
- device_id < PCI_DEVICE_ID_VORTEX_GDT6x17RP)
- continue;
X #if LINUX_VERSION_CODE >= 0x20363
- pdev = NULL;
- while ((pdev = pci_find_device(PCI_VENDOR_ID_VORTEX,device_id,pdev))
- != NULL) {
- if (pci_enable_device(pdev))
+ pdev = NULL;
+ while ((pdev = pci_find_device(vendor, device, pdev))
+ != NULL) {
+ if (pci_enable_device(pdev))
+ continue;
+ if (*cnt >= MAXHA)
+ return;
+ /* GDT PCI controller found, resources are already in pdev */
+ pcistr[*cnt].pdev = pdev;
+ pcistr[*cnt].vendor_id = vendor;
+ pcistr[*cnt].device_id = device;
+ pcistr[*cnt].subdevice_id = pdev->subsystem_device;
+ pcistr[*cnt].bus = pdev->bus->number;
+ pcistr[*cnt].device_fn = pdev->devfn;
+ pcistr[*cnt].irq = pdev->irq;
+ base0 = pci_resource_flags(pdev, 0);
+ base1 = pci_resource_flags(pdev, 1);
+ base2 = pci_resource_flags(pdev, 2);
+ if (device <= PCI_DEVICE_ID_VORTEX_GDT6000B || /* GDT6000/B */
+ device >= PCI_DEVICE_ID_VORTEX_GDT6x17RP) { /* MPR */
+ if (!(base0 & IORESOURCE_MEM))
X continue;
- if (cnt >= MAXHA)
- return cnt;
- /* GDT PCI controller found, resources are already in pdev */
- pcistr[cnt].pdev = pdev;
- pcistr[cnt].device_id = device_id;
- pcistr[cnt].bus = pdev->bus->number;
- pcistr[cnt].device_fn = pdev->devfn;
- pcistr[cnt].irq = pdev->irq;
- base0 = pci_resource_flags(pdev, 0);
- base1 = pci_resource_flags(pdev, 1);
- base2 = pci_resource_flags(pdev, 2);
- if (device_id <= PCI_DEVICE_ID_VORTEX_GDT6000B || /* GDT6000/B */
- device_id >= PCI_DEVICE_ID_VORTEX_GDT6x17RP) { /* MPR */
- if (!(base0 & IORESOURCE_MEM))
- continue;
- pcistr[cnt].dpmem = pci_resource_start(pdev, 0);
- } else { /* GDT6110, GDT6120, .. */
- if (!(base0 & IORESOURCE_MEM) ||
- !(base2 & IORESOURCE_MEM) ||
- !(base1 & IORESOURCE_IO))
- continue;
- pcistr[cnt].dpmem = pci_resource_start(pdev, 2);
- pcistr[cnt].io_mm = pci_resource_start(pdev, 0);
- pcistr[cnt].io = pci_resource_start(pdev, 1);
- }
- TRACE2(("Controller found at %d/%d, irq %d, dpmem 0x%lx\n",
- pcistr[cnt].bus, PCI_SLOT(pcistr[cnt].device_fn),
- pcistr[cnt].irq, pcistr[cnt].dpmem));
- cnt++;
- }
+ pcistr[*cnt].dpmem = pci_resource_start(pdev, 0);
+ } else { /* GDT6110, GDT6120, .. */
+ if (!(base0 & IORESOURCE_MEM) ||
+ !(base2 & IORESOURCE_MEM) ||
+ !(base1 & IORESOURCE_IO))
+ continue;
+ pcistr[*cnt].dpmem = pci_resource_start(pdev, 2);
+ pcistr[*cnt].io_mm = pci_resource_start(pdev, 0);
+ pcistr[*cnt].io = pci_resource_start(pdev, 1);
+ }
+ TRACE2(("Controller found at %d/%d, irq %d, dpmem 0x%lx\n",
+ pcistr[*cnt].bus, PCI_SLOT(pcistr[*cnt].device_fn),
+ pcistr[*cnt].irq, pcistr[*cnt].dpmem));
+ (*cnt)++;
+ }
X #elif LINUX_VERSION_CODE >= 0x2015C
- pdev = NULL;
- while ((pdev = pci_find_device(PCI_VENDOR_ID_VORTEX,device_id,pdev))
- != NULL) {
- if (cnt >= MAXHA)
- return cnt;
- /* GDT PCI controller found, resources are already in pdev */
- pcistr[cnt].pdev = pdev;
- pcistr[cnt].device_id = device_id;
- pcistr[cnt].bus = pdev->bus->number;
- pcistr[cnt].device_fn = pdev->devfn;
- pcistr[cnt].irq = pdev->irq;
- base0 = pdev->base_address[0];
- base1 = pdev->base_address[1];
- base2 = pdev->base_address[2];
- if (device_id <= PCI_DEVICE_ID_VORTEX_GDT6000B || /* GDT6000/B */
- device_id >= PCI_DEVICE_ID_VORTEX_GDT6x17RP) { /* MPR */
- if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_MEMORY)
- continue;
- pcistr[cnt].dpmem = base0 & PCI_BASE_ADDRESS_MEM_MASK;
- } else { /* GDT6110, GDT6120, .. */
- if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_MEMORY ||
- (base2 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_MEMORY ||
- (base1 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_IO)
- continue;
- pcistr[cnt].dpmem = base2 & PCI_BASE_ADDRESS_MEM_MASK;
- pcistr[cnt].io_mm = base0 & PCI_BASE_ADDRESS_MEM_MASK;
- pcistr[cnt].io = base1 & PCI_BASE_ADDRESS_IO_MASK;
- }
- TRACE2(("Controller found at %d/%d, irq %d, dpmem 0x%lx\n",
- pcistr[cnt].bus, PCI_SLOT(pcistr[cnt].device_fn),
- pcistr[cnt].irq, pcistr[cnt].dpmem));
- cnt++;
- }
+ pdev = NULL;
+ while ((pdev = pci_find_device(vendor, device, pdev))
+ != NULL) {
+ if (*cnt >= MAXHA)
+ return;
+ /* GDT PCI controller found, resources are already in pdev */
+ pcistr[*cnt].pdev = pdev;
+ pcistr[*cnt].vendor_id = vendor;
+ pcistr[*cnt].device_id = device;
+ pcistr[*cnt].bus = pdev->bus->number;
+ pcistr[*cnt].device_fn = pdev->devfn;
+ pcibios_read_config_word(pcistr[*cnt].bus, pcistr[*cnt].device_fn,
+ PCI_SUBSYSTEM_ID, &pcistr[*cnt].subdevice_id);
+ pcistr[*cnt].irq = pdev->irq;
+ base0 = pdev->base_address[0];
+ base1 = pdev->base_address[1];
+ base2 = pdev->base_address[2];
+ if (device <= PCI_DEVICE_ID_VORTEX_GDT6000B || /* GDT6000/B */
+ device >= PCI_DEVICE_ID_VORTEX_GDT6x17RP) { /* MPR */
+ if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY)
+ continue;
+ pcistr[*cnt].dpmem = base0 & PCI_BASE_ADDRESS_MEM_MASK;
+ } else { /* GDT6110, GDT6120, .. */
+ if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY ||
+ (base2 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY ||
+ (base1 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_IO)
+ continue;
+ pcistr[*cnt].dpmem = base2 & PCI_BASE_ADDRESS_MEM_MASK;
+ pcistr[*cnt].io_mm = base0 & PCI_BASE_ADDRESS_MEM_MASK;
+ pcistr[*cnt].io = base1 & PCI_BASE_ADDRESS_IO_MASK;
+ }
+ TRACE2(("Controller found at %d/%d, irq %d, dpmem 0x%lx\n",
+ pcistr[*cnt].bus, PCI_SLOT(pcistr[*cnt].device_fn),
+ pcistr[*cnt].irq, pcistr[*cnt].dpmem));
+ (*cnt)++;
+ }
X #else
- idx = 0;
- while (!pcibios_find_device(PCI_VENDOR_ID_VORTEX,device_id,idx++,
- &pcistr[cnt].bus,&pcistr[cnt].device_fn)) {
- if (cnt >= MAXHA)
- return cnt;
- /* GDT PCI ctr. found, now read resources from config space */
+ idx = 0;
+ while (!pcibios_find_device(vendor, device, idx++,
+ &pcistr[*cnt].bus,&pcistr[*cnt].device_fn)) {
+ if (*cnt >= MAXHA)
+ return;
+ /* GDT PCI ctr. found, now read resources from config space */
X #if LINUX_VERSION_CODE >= 0x010300
X #define GDTH_BASEP (int *)
X #else
X #define GDTH_BASEP
X #endif
- if ((error = pcibios_read_config_dword(pcistr[cnt].bus,
- pcistr[cnt].device_fn,
- PCI_BASE_ADDRESS_0,
- GDTH_BASEP&base0)) ||
- (error = pcibios_read_config_dword(pcistr[cnt].bus,
- pcistr[cnt].device_fn,
- PCI_BASE_ADDRESS_1,
- GDTH_BASEP&base1)) ||
- (error = pcibios_read_config_dword(pcistr[cnt].bus,
- pcistr[cnt].device_fn,
- PCI_BASE_ADDRESS_2,
- GDTH_BASEP&base2)) ||
- (error = pcibios_read_config_byte(pcistr[cnt].bus,
- pcistr[cnt].device_fn,
- PCI_INTERRUPT_LINE,
- &pcistr[cnt].irq))) {
- printk("GDT-PCI: error %d reading configuration space", error);
+ if ((error = pcibios_read_config_dword(pcistr[*cnt].bus,
+ pcistr[*cnt].device_fn,
+ PCI_BASE_ADDRESS_0,
+ GDTH_BASEP&base0)) ||
+ (error = pcibios_read_config_dword(pcistr[*cnt].bus,
+ pcistr[*cnt].device_fn,
+ PCI_BASE_ADDRESS_1,
+ GDTH_BASEP&base1)) ||
+ (error = pcibios_read_config_dword(pcistr[*cnt].bus,
+ pcistr[*cnt].device_fn,
+ PCI_BASE_ADDRESS_2,
+ GDTH_BASEP&base2)) ||
+ (error = pcibios_read_config_word(pcistr[*cnt].bus,
+ pcistr[*cnt].device_fn,
+ PCI_SUBSYSTEM_ID,
+ &pcistr[*cnt].subdevice_id)) ||
+ (error = pcibios_read_config_byte(pcistr[*cnt].bus,
+ pcistr[*cnt].device_fn,
+ PCI_INTERRUPT_LINE,
+ &pcistr[*cnt].irq))) {
+ printk("GDT-PCI: error %d reading configuration space", error);
+ continue;
+ }
+ pcistr[*cnt].vendor_id = vendor;
+ pcistr[*cnt].device_id = device;
+ if (device <= PCI_DEVICE_ID_VORTEX_GDT6000B || /* GDT6000/B */
+ device >= PCI_DEVICE_ID_VORTEX_GDT6x17RP) { /* MPR */
+ if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY)
X continue;
- }
- pcistr[cnt].device_id = device_id;
- if (device_id <= PCI_DEVICE_ID_VORTEX_GDT6000B || /* GDT6000/B */
- device_id >= PCI_DEVICE_ID_VORTEX_GDT6x17RP) { /* MPR */
- if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_MEMORY)
- continue;
- pcistr[cnt].dpmem = base0 & PCI_BASE_ADDRESS_MEM_MASK;
- } else { /* GDT6110, GDT6120, .. */
- if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_MEMORY ||
- (base2 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_MEMORY ||
- (base1 & PCI_BASE_ADDRESS_SPACE) !=
- PCI_BASE_ADDRESS_SPACE_IO)
- continue;
- pcistr[cnt].dpmem = base2 & PCI_BASE_ADDRESS_MEM_MASK;
- pcistr[cnt].io_mm = base0 & PCI_BASE_ADDRESS_MEM_MASK;
- pcistr[cnt].io = base1 & PCI_BASE_ADDRESS_IO_MASK;
- }
- TRACE2(("Controller found at %d/%d, irq %d, dpmem 0x%lx\n",
- pcistr[cnt].bus, PCI_SLOT(pcistr[cnt].device_fn),
- pcistr[cnt].irq, pcistr[cnt].dpmem));
- cnt++;
+ pcistr[*cnt].dpmem = base0 & PCI_BASE_ADDRESS_MEM_MASK;
+ } else { /* GDT6110, GDT6120, .. */
+ if ((base0 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY ||
+ (base2 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY ||
+ (base1 & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_IO)
+ continue;
+ pcistr[*cnt].dpmem = base2 & PCI_BASE_ADDRESS_MEM_MASK;
+ pcistr[*cnt].io_mm = base0 & PCI_BASE_ADDRESS_MEM_MASK;
+ pcistr[*cnt].io = base1 & PCI_BASE_ADDRESS_IO_MASK;
X }
+ TRACE2(("Controller found at %d/%d, irq %d, dpmem 0x%lx\n",
+ pcistr[*cnt].bus, PCI_SLOT(pcistr[*cnt].device_fn),
+ pcistr[*cnt].irq, pcistr[*cnt].dpmem));
+ (*cnt)++;
+ }
X #endif
- }
- return cnt;
-}
+}
X
X
X GDTH_INITFUNC(static void, gdth_sort_pci(gdth_pci_str *pcistr, int cnt))
@@ -948,6 +1035,7 @@
X
X /* detect IRQ */
X if ((id = inl(eisa_adr+ID0REG)) == GDT3_ID) {
+ ha->oem_id = OEM_ID_ICP;
X ha->type = GDT_EISA;
X ha->stype = id;
X outl(1,eisa_adr+MAILBOXREG+8);
@@ -991,6 +1079,7 @@
X if (eisacf > 4) /* level triggered */
X eisacf -= 4;
X ha->irq = gdth_irq_tab[eisacf];
+ ha->oem_id = OEM_ID_ICP;
X ha->type = GDT_EISA;
X ha->stype = id;


X }
@@ -1067,6 +1156,7 @@

X return 0;
X }
X

+ ha->oem_id = OEM_ID_ICP;
X ha->type = GDT_ISA;
X ha->ic_all_size = sizeof(dp2_ptr->u);
X ha->stype= GDT2_ID;
@@ -1110,9 +1200,14 @@
X
X TRACE(("gdth_init_pci()\n"));
X
+ if (pcistr->vendor_id == PCI_VENDOR_ID_INTEL)
+ ha->oem_id = OEM_ID_INTEL;
+ else
+ ha->oem_id = OEM_ID_ICP;
X ha->brd_phys = (pcistr->bus << 8) | (pcistr->device_fn & 0xf8);
- ha->stype = (ulong32)pcistr->device_id;
- ha->irq = pcistr->irq;
+ ha->stype = (ulong32)pcistr->device_id;
+ ha->subdevice_id = pcistr->subdevice_id;
+ ha->irq = pcistr->irq;
X
X if (ha->stype <= PCI_DEVICE_ID_VORTEX_GDT6000B) { /* GDT6000/B */
X TRACE2(("init_pci() dpmem %lx irq %d\n",pcistr->dpmem,ha->irq));
@@ -1837,7 +1932,6 @@
X register gdth_ha_str *ha;
X ushort cdev_cnt, i;
X ulong32 bus_no, drv_cnt, drv_no, j;
- unsigned long flags;
X gdth_getch_str *chn;
X gdth_drlist_str *drl;
X gdth_iochan_str *ioc;
@@ -1846,6 +1940,7 @@
X gdth_alist_str *alst2;
X #ifdef GDTH_RTC
X unchar rtc[12];
+ ulong flags;
X #endif
X
X TRACE(("gdth_search_drives() hanum %d\n",hanum));
@@ -1862,7 +1957,7 @@
X #ifdef GDTH_RTC
X /* read realtime clock info, send to controller */
X /* 1. wait for the falling edge of update flag */
- spin_lock_irqsave(&rtc_lock, flags)
+ spin_lock_irqsave(&rtc_lock, flags);
X for (j = 0; j < 1000000; ++j)
X if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)
X break;
@@ -1874,13 +1969,16 @@
X for (j = 0; j < 12; ++j)
X rtc[j] = CMOS_READ(j);
X } while (rtc[0] != CMOS_READ(0));
- spin_unlock_irqrestore(&rtc_lock, flags);
+ spin_lock_irqrestore(&rtc_lock, flags);
X TRACE2(("gdth_search_drives(): RTC: %x/%x/%x\n",*(ulong32 *)&rtc[0],
X *(ulong32 *)&rtc[4], *(ulong32 *)&rtc[8]));
X /* 3. send to controller firmware */
X gdth_internal_cmd(hanum,SCREENSERVICE,GDT_REALTIME, *(ulong32 *)&rtc[0],
X *(ulong32 *)&rtc[4], *(ulong32 *)&rtc[8]);
-#endif
+#endif
+
+ /* unfreeze all IOs */
+ gdth_internal_cmd(hanum,CACHESERVICE,GDT_UNFREEZE_IO,0,0,0);
X
X /* initialize cache service */
X if (!gdth_internal_cmd(hanum,CACHESERVICE,GDT_INIT,LINUX_OS,0,0)) {
@@ -2158,7 +2256,8 @@
X if (gdth_internal_cmd(hanum,CACHESERVICE,GDT_CLUST_INFO,hdrive,0,0)) {
X TRACE2(("gdth_search_dr() cache drive %d cluster info %d\n",
X hdrive,ha->info));
- ha->hdr[hdrive].cluster_type = (unchar)ha->info;
+ if (!shared_access)
+ ha->hdr[hdrive].cluster_type = (unchar)ha->info;
X }
X
X /* R/W attributes */
@@ -2287,7 +2386,7 @@
X } else if ((ha->scan_mode & 0x0f) == 1) {
X if (b == 0 && ((t == 0 && nscp->lun == 1) ||
X (t == 1 && nscp->lun == 0))) {
- nscp->SCp.Status = GDT_SCAN_START;
+ nscp->SCp.sent_command = GDT_SCAN_START;
X nscp->SCp.phase = ((ha->scan_mode & 0x10 ? 1:0) << 8)
X | SCSIRAWSERVICE;
X ha->scan_mode = 0x12;
@@ -2300,7 +2399,7 @@
X } else if (ha->scan_mode == 0x12) {
X if (b == ha->bus_cnt && t == ha->tid_cnt-1) {
X nscp->SCp.phase = SCSIRAWSERVICE;
- nscp->SCp.Status = GDT_SCAN_END;
+ nscp->SCp.sent_command = GDT_SCAN_END;
X ha->scan_mode &= 0x10;
X TRACE2(("Scan mode: 0x%x (SCAN_END)\n",
X ha->scan_mode));
@@ -2311,12 +2410,12 @@
X nscp->cmnd[0] != READ_CAPACITY && nscp->cmnd[0] != MODE_SENSE &&
X (ha->hdr[t].cluster_type & CLUSTER_DRIVE)) {
X /* always GDT_CLUST_INFO! */
- nscp->SCp.Status = GDT_CLUST_INFO;
+ nscp->SCp.sent_command = GDT_CLUST_INFO;
X }
X }
X }
X
- if (nscp->SCp.Status != -1) {
+ if (nscp->SCp.sent_command != -1) {
X if ((nscp->SCp.phase & 0xff) == CACHESERVICE) {
X if (!(cmd_index=gdth_fill_cache_cmd(hanum,nscp,t)))
X this_cmd = FALSE;
@@ -2358,14 +2457,14 @@
X TRACE2(("Command 0x%x to bus %d id %d lun %d -> IGNORE\n",
X nscp->cmnd[0], b, t, nscp->lun));
X nscp->result = DID_BAD_TARGET << 16;
- if (!nscp->SCp.have_data_in)
- nscp->SCp.have_data_in++;
- else {
- GDTH_UNLOCK_HA(ha,flags);
- /* io_request_lock already active ! */
- nscp->scsi_done(nscp);
- GDTH_LOCK_HA(ha,flags);
- }
+ if (!nscp->SCp.have_data_in)
+ nscp->SCp.have_data_in++;
+ else {
+ GDTH_UNLOCK_HA(ha,flags);
+ /* io_request_lock already active ! */
+ nscp->scsi_done(nscp);
+ GDTH_LOCK_HA(ha,flags);
+ }
X } else {
X switch (nscp->cmnd[0]) {
X case TEST_UNIT_READY:
@@ -2395,7 +2494,7 @@
X nscp->scsi_done(nscp);
X GDTH_LOCK_HA(ha,flags);
X }
- } else if (gdth_internal_cache_cmd(hanum,nscp)) {
+ } else if (gdth_internal_cache_cmd(hanum,nscp)) {
X GDTH_UNLOCK_HA(ha,flags);
X /* io_request_lock already active ! */
X nscp->scsi_done(nscp);
@@ -2457,7 +2556,7 @@
X nscp->scsi_done(nscp);
X GDTH_LOCK_HA(ha,flags);
X }
- } else if (!(cmd_index=gdth_fill_cache_cmd(hanum,nscp,t)))
+ } else if (!(cmd_index=gdth_fill_cache_cmd(hanum,nscp,t)))
X this_cmd = FALSE;
X break;
X
@@ -2564,7 +2663,10 @@
X inq.version = 2;
X inq.resp_aenc = 2;
X inq.add_length= 32;
- strcpy(inq.vendor,"ICP ");
+ if (ha->oem_id == OEM_ID_INTEL)
+ strcpy(inq.vendor,"Intel ");
+ else
+ strcpy(inq.vendor,"ICP ");
X sprintf(inq.product,"Host Drive #%02d",t);
X strcpy(inq.revision," ");
X gdth_copy_internal_data(scp,(char*)&inq,sizeof(gdth_inq_data));
@@ -2645,8 +2747,8 @@
X
X /* fill command */
X read_write = FALSE;
- if (scp->SCp.Status != -1)
- cmdp->OpCode = scp->SCp.Status; /* special cache cmd. */
+ if (scp->SCp.sent_command != -1)
+ cmdp->OpCode = scp->SCp.sent_command; /* special cache cmd. */
X else if (scp->cmnd[0] == RESERVE)
X cmdp->OpCode = GDT_RESERVE_DRV;
X else if (scp->cmnd[0] == RELEASE)
@@ -2776,8 +2878,8 @@
X gdth_set_sema0(hanum);
X
X /* fill command */
- if (scp->SCp.Status != -1) {
- cmdp->OpCode = scp->SCp.Status; /* special raw cmd. */
+ if (scp->SCp.sent_command != -1) {
+ cmdp->OpCode = scp->SCp.sent_command; /* special raw cmd. */
X cmdp->BoardNode = LOCALBOARD;
X cmdp->u.raw.direction = (scp->SCp.phase >> 8);
X TRACE2(("special raw cmd 0x%x param 0x%x\n",
@@ -3317,39 +3419,40 @@
X
X } else {
X b = virt_ctr ? NUMDATA(scp->host)->busnum : scp->channel;
- if (scp->SCp.Status == -1 && b != ha->virt_bus) {
+ if (scp->SCp.sent_command == -1 && b != ha->virt_bus) {
X ha->raw[BUS_L2P(ha,b)].io_cnt[scp->target]--;
X }
X /* cache or raw service */
X if (ha->status == S_OK) {
- scp->SCp.Message = (int)(ha->info<<16|S_OK);
- if (scp->SCp.Status != -1) {
+ scp->SCp.Status = S_OK;
+ scp->SCp.Message = ha->info;
+ if (scp->SCp.sent_command != -1) {
X TRACE2(("gdth_sync_event(): special cmd 0x%x OK\n",
- scp->SCp.Status));
+ scp->SCp.sent_command));
X /* special commands GDT_CLUST_INFO/GDT_MOUNT ? */
- if (scp->SCp.Status == GDT_CLUST_INFO) {
+ if (scp->SCp.sent_command == GDT_CLUST_INFO) {
X ha->hdr[scp->target].cluster_type = (unchar)ha->info;
X if (!(ha->hdr[scp->target].cluster_type &
X CLUSTER_MOUNTED)) {
X /* NOT MOUNTED -> MOUNT */
- scp->SCp.Status = GDT_MOUNT;
+ scp->SCp.sent_command = GDT_MOUNT;
X if (ha->hdr[scp->target].cluster_type &
X CLUSTER_RESERVED) {
X /* cluster drive RESERVED (on the other node) */
X scp->SCp.phase = -2; /* reservation conflict */
X }
X } else {
- scp->SCp.Status = -1;
+ scp->SCp.sent_command = -1;
X }
- } else {
- if (scp->SCp.Status == GDT_MOUNT) {
+ } else {
+ if (scp->SCp.sent_command == GDT_MOUNT) {
X ha->hdr[scp->target].cluster_type |= CLUSTER_MOUNTED;
X ha->hdr[scp->target].media_changed = TRUE;
- } else if (scp->SCp.Status == GDT_UNMOUNT) {
+ } else if (scp->SCp.sent_command == GDT_UNMOUNT) {
X ha->hdr[scp->target].cluster_type &= ~CLUSTER_MOUNTED;
X ha->hdr[scp->target].media_changed = TRUE;
X }
- scp->SCp.Status = -1;
+ scp->SCp.sent_command = -1;
X }
X /* retry */
X scp->SCp.this_residual = HIGH_PRI;


@@ -3366,20 +3469,22 @@
X }

X } else if (ha->status == S_BSY) {
X TRACE2(("Controller busy -> retry !\n"));
- scp->SCp.Message = (int)(ha->info<<16|S_BSY);
- if (scp->SCp.Status == GDT_MOUNT)
- scp->SCp.Status = GDT_CLUST_INFO;
+ scp->SCp.Status = S_BSY;
+ scp->SCp.Message = ha->info;
+ if (scp->SCp.sent_command == GDT_MOUNT)
+ scp->SCp.sent_command = GDT_CLUST_INFO;
X /* retry */
X return 2;
X } else {
- scp->SCp.Message = (int)((ha->info<<16)|ha->status);
+ scp->SCp.Status = ha->status;
+ scp->SCp.Message = ha->info;
X
- if (scp->SCp.Status != -1) {
+ if (scp->SCp.sent_command != -1) {
X TRACE2(("gdth_sync_event(): special cmd 0x%x error 0x%x\n",
- scp->SCp.Status, ha->status));
- if (scp->SCp.Status == GDT_SCAN_START ||
- scp->SCp.Status == GDT_SCAN_END) {
- scp->SCp.Status = -1;
+ scp->SCp.sent_command, ha->status));
+ if (scp->SCp.sent_command == GDT_SCAN_START ||
+ scp->SCp.sent_command == GDT_SCAN_END) {
+ scp->SCp.sent_command = -1;
X /* retry */
X scp->SCp.this_residual = HIGH_PRI;
X return 2;
@@ -3652,7 +3757,7 @@
X if (ha->service == CACHESERVICE && ha->status == 56) {
X TRACE2(("gdth_async_event(): new host drive %d created\n",
X (ushort)ha->info));
- gdth_analyse_hdrive(hanum, (ushort)ha->info);
+ /* gdth_analyse_hdrive(hanum, (ushort)ha->info); */
X }
X }
X return 1;
@@ -3743,6 +3848,94 @@
X }
X #endif
X
+GDTH_INITFUNC(void, internal_setup(char *str,int *ints))
+{
+ int i, argc;
+ char *cur_str, *argv;
+
+ TRACE2(("internal_setup() str %s ints[0] %d\n",
+ str ? str:"NULL", ints ? ints[0]:0));
+
+ /* read irq[] from ints[] */
+ if (ints) {
+ argc = ints[0];
+ if (argc > 0) {
+ if (argc > MAXHA)
+ argc = MAXHA;
+ for (i = 0; i < argc; ++i)
+ irq[i] = ints[i+1];
+ }
+ }
+
+ /* analyse string */
+ argv = str;
+ while (argv && (cur_str = strchr(argv, ':'))) {
+ int val = 0, c = *++cur_str;
+
+ if (c == 'n' || c == 'N')
+ val = 0;
+ else if (c == 'y' || c == 'Y')
+ val = 1;
+ else
+ val = (int)simple_strtoul(cur_str, NULL, 0);
+
+ if (!strncmp(argv, "disable:", 8))
+ disable = val;
+ else if (!strncmp(argv, "reserve_mode:", 13))
+ reserve_mode = val;
+ else if (!strncmp(argv, "reverse_scan:", 13))
+ reverse_scan = val;
+ else if (!strncmp(argv, "hdr_channel:", 12))
+ hdr_channel = val;
+ else if (!strncmp(argv, "max_ids:", 8))
+ max_ids = val;
+ else if (!strncmp(argv, "rescan:", 7))
+ rescan = val;
+ else if (!strncmp(argv, "virt_ctr:", 9))
+ virt_ctr = val;
+ else if (!strncmp(argv, "shared_access:", 14))
+ shared_access = val;
+ else if (!strncmp(argv, "reserve_list:", 13)) {
+ reserve_list[0] = val;
+ for (i = 1; i < MAX_RES_ARGS; i++) {
+ cur_str = strchr(cur_str, ',');
+ if (!cur_str)
+ break;
+ if (!isdigit((int)*++cur_str)) {
+ --cur_str;
+ break;
+ }
+ reserve_list[i] =
+ (int)simple_strtoul(cur_str, NULL, 0);
+ }
+ if (!cur_str)
+ break;
+ argv = ++cur_str;
+ continue;
+ }
+
+ if ((argv = strchr(argv, ',')))
+ ++argv;
+ }
+}
+
+GDTH_INITFUNC(int, option_setup(char *str))
+{
+ int ints[MAXHA];
+ char *cur = str;
+ int i = 1;
+
+ TRACE2(("option_setup() str %s\n", str ? str:"NULL"));
+
+ while (cur && isdigit(*cur) && i <= MAXHA) {
+ ints[i++] = simple_strtoul(cur, NULL, 0);
+ if ((cur = strchr(cur, ',')) != NULL) cur++;
+ }
+
+ ints[0] = i - 1;
+ internal_setup(cur, ints);


+ return 1;
+}
X

X GDTH_INITFUNC(int, gdth_detect(Scsi_Host_Template *shtp))
X {
@@ -3812,7 +4005,7 @@
X if (request_dma(ha->drq,"gdth")) {
X printk("GDT-ISA: Unable to allocate DMA channel\n");
X #if LINUX_VERSION_CODE >= 0x010346
- free_irq(ha->irq,NULL);
+ free_irq(ha->irq,ha);
X #else
X free_irq(ha->irq);
X #endif
@@ -3858,7 +4051,7 @@
X scsi_init_free((void *)ha->pscratch, GDTH_SCRATCH);
X #endif
X #if LINUX_VERSION_CODE >= 0x010346
- free_irq(ha->irq,NULL);
+ free_irq(ha->irq,ha);
X #else
X free_irq(ha->irq);
X #endif
@@ -3959,7 +4152,7 @@
X scsi_init_free((void *)ha->pscratch, GDTH_SCRATCH);
X #endif
X #if LINUX_VERSION_CODE >= 0x010346
- free_irq(ha->irq,NULL);
+ free_irq(ha->irq,ha);
X #else
X free_irq(ha->irq);
X #endif
@@ -4068,7 +4261,7 @@
X scsi_init_free((void *)ha->pscratch, GDTH_SCRATCH);
X #endif
X #if LINUX_VERSION_CODE >= 0x010346
- free_irq(ha->irq,NULL);
+ free_irq(ha->irq,ha);
X #else
X free_irq(ha->irq);
X #endif
@@ -4138,7 +4331,7 @@
X
X if (shp->irq) {
X #if LINUX_VERSION_CODE >= 0x010346
- free_irq(shp->irq,NULL);
+ free_irq(shp->irq,ha);
X #else
X free_irq(shp->irq);
X #endif
@@ -4339,24 +4532,6 @@
X }
X
X
-static void internal_done(Scsi_Cmnd *scp)
-{
- scp->SCp.sent_command++;
-}
-
-int gdth_command(Scsi_Cmnd *scp)
-{
- TRACE2(("gdth_command()\n"));
-
- scp->SCp.sent_command = 0;
- gdth_queuecommand(scp,internal_done);
-
- while (!scp->SCp.sent_command)
- barrier();
- return scp->result;
-}
-
-
X int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *))
X {
X int hanum;
@@ -4368,7 +4543,7 @@
X scp->scsi_done = (void *)done;
X scp->SCp.have_data_in = 1;
X scp->SCp.phase = -1;
- scp->SCp.Status = -1;
+ scp->SCp.sent_command = -1;
X hanum = NUMDATA(scp->host)->hanum;
X #ifdef GDTH_STATISTICS
X ++act_ios;
@@ -4520,82 +4695,21 @@
X #endif
X
X
-/* called from init/main.c */
-GDTH_INITFUNC(void, gdth_setup(char *str,int *ints))
-{
- int i, argc;
- char *cur_str, *argv;
+#if LINUX_VERSION_CODE < 0x020400 && !defined(MODULE)
X
+GDTH_INITFUNC(void, gdth_setup(char *str,int *ints))
+{
X TRACE2(("gdth_setup() str %s ints[0] %d\n",
X str ? str:"NULL", ints ? ints[0]:0));
-
- /* read irq[] from ints[] */
- if (ints) {
- argc = ints[0];
- if (argc > 0) {
- if (argc > MAXHA)
- argc = MAXHA;
- for (i = 0; i < argc; ++i)
- irq[i] = ints[i+1];
- }
- }
-
- /* analyse string */
- argv = str;
- while (argv && (cur_str = strchr(argv, ':'))) {
- int val = 0, c = *++cur_str;
-
- if (c == 'n' || c == 'N')
- val = 0;
- else if (c == 'y' || c == 'Y')
- val = 1;
- else
- val = (int)simple_strtoul(cur_str, NULL, 0);
-
- if (!strncmp(argv, "disable:", 8))
- disable = val;
- else if (!strncmp(argv, "reserve_mode:", 13))
- reserve_mode = val;
- else if (!strncmp(argv, "reverse_scan:", 13))
- reverse_scan = val;
- else if (!strncmp(argv, "hdr_channel:", 12))
- hdr_channel = val;
- else if (!strncmp(argv, "max_ids:", 8))
- max_ids = val;
- else if (!strncmp(argv, "rescan:", 7))
- rescan = val;
- else if (!strncmp(argv, "virt_ctr:", 9))
- virt_ctr = val;
- else if (!strncmp(argv, "reserve_list:", 13)) {
- reserve_list[0] = val;
- for (i = 1; i < MAX_RES_ARGS; i++) {
- cur_str = strchr(cur_str, ',');
- if (!cur_str)
- break;
- if (!isdigit((int)*++cur_str)) {
- --cur_str;
- break;
- }
- reserve_list[i] =
- (int)simple_strtoul(cur_str, NULL, 0);
- }
- if (!cur_str)
- break;
- argv = ++cur_str;
- continue;
- }
-
- if ((argv = strchr(argv, ',')))
- ++argv;
- }
+ internal_setup(str, ints);
X }
X
-#if LINUX_VERSION_CODE < 0x020400
-#ifdef MODULE
-Scsi_Host_Template driver_template = GDTH;
-#include "scsi_module.c"
-#endif
X #else
-Scsi_Host_Template driver_template = GDTH;
+
+static Scsi_Host_Template driver_template = GDTH;
X #include "scsi_module.c"
+#ifndef MODULE
+__setup("gdth=", option_setup);
+#endif
+
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/gdth.h linux/drivers/scsi/gdth.h
--- v2.2.19/drivers/scsi/gdth.h Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/gdth.h Fri Nov 2 15:44:31 2001
@@ -4,13 +4,13 @@
X /*
X * Header file for the GDT ISA/EISA/PCI Disk Array Controller driver for Linux
X *
- * gdth.h Copyright (C) 1995-99 ICP vortex Computersysteme GmbH, Achim Leubner
+ * gdth.h Copyright (C) 1995-01 ICP vortex Computersysteme GmbH, Achim Leubner
X * See gdth.c for further informations and
X * below for supported controller types
X *
X * <ac...@vortex.de>
X *
- * $Id: gdth.h,v 1.35 2000/10/11 08:42:38 achim Exp $
+ * $Id: gdth.h,v 1.44 2001/08/21 11:19:05 achim Exp $
X */
X
X #include <linux/version.h>
@@ -29,13 +29,17 @@
X /* defines, macros */
X
X /* driver version */
-#define GDTH_VERSION_STR "1.25"
-#define GDTH_VERSION 1
-#define GDTH_SUBVERSION 25
+#define GDTH_VERSION_STR "2.03"
+#define GDTH_VERSION 2
+#define GDTH_SUBVERSION 3
X
X /* protocol version */
X #define PROTOCOL_VERSION 1
X
+/* OEM IDs */
+#define OEM_ID_ICP 0x941c
+#define OEM_ID_INTEL 0x8000
+
X /* controller classes */
X #define GDT_ISA 0x01 /* ISA controller */
X #define GDT_EISA 0x02 /* EISA controller */
@@ -54,6 +58,9 @@
X #ifndef PCI_VENDOR_ID_VORTEX
X #define PCI_VENDOR_ID_VORTEX 0x1119 /* PCI controller vendor ID */
X #endif
+#ifndef PCI_VENDOR_ID_INTEL
+#define PCI_VENDOR_ID_INTEL 0x8086
+#endif
X
X #ifndef PCI_DEVICE_ID_VORTEX_GDT60x0
X /* GDT_PCI */
@@ -125,6 +132,16 @@
X #define PCI_DEVICE_ID_VORTEX_GDTMAXRP 0x2ff
X #endif
X
+#ifndef PCI_DEVICE_ID_VORTEX_GDTNEWRX
+/* new GDT Rx Controller */
+#define PCI_DEVICE_ID_VORTEX_GDTNEWRX 0x300
+#endif
+
+#ifndef PCI_DEVICE_ID_INTEL_SRC
+/* Intel Storage RAID Controller */
+#define PCI_DEVICE_ID_INTEL_SRC 0x600
+#endif
+
X /* limits */
X #define GDTH_SCRATCH PAGE_SIZE /* 4KB scratch buffer */
X #define GDTH_SCRATCH_ORD 0 /* order 0 means 1 page */
@@ -202,6 +219,8 @@
X #define GDT_CLUST_INFO 22 /* cluster info */
X #define GDT_RW_ATTRIBS 23 /* R/W attribs (write thru,..)*/
X #define GDT_CLUST_RESET 24 /* releases the cluster drives*/
+#define GDT_FREEZE_IO 25 /* freezes all IOs */
+#define GDT_UNFREEZE_IO 26 /* unfreezes all IOs */
X
X /* raw service commands */
X #define GDT_RESERVE 14 /* reserve dev. to raw serv. */
@@ -843,7 +862,9 @@
X #if LINUX_VERSION_CODE >= 0x02015C
X struct pci_dev *pdev;
X #endif
+ ushort vendor_id; /* vendor (ICP, Intel, ..) */
X ushort device_id; /* device ID (0,..,9) */
+ ushort subdevice_id; /* sub device ID */
X unchar bus; /* PCI bus */
X unchar device_fn; /* PCI device/function no. */
X ulong dpmem; /* DPRAM address */
@@ -855,9 +876,11 @@
X
X /* controller information structure */
X typedef struct {
+ ushort oem_id; /* OEM */
X ushort type; /* controller class */
X ushort raw_feat; /* feat. raw service (s/g,..) */
- ulong32 stype; /* controller subtype */
+ ulong32 stype; /* subtype (PCI: device ID) */
+ ushort subdevice_id; /* sub device ID (PCI) */
X ushort fw_vers; /* firmware version */
X ushort cache_feat; /* feat. cache serv. (s/g,..) */
X ushort bmic; /* BMIC address (EISA) */
@@ -999,7 +1022,6 @@
X
X int gdth_detect(Scsi_Host_Template *);
X int gdth_release(struct Scsi_Host *);
-int gdth_command(Scsi_Cmnd *);
X int gdth_queuecommand(Scsi_Cmnd *,void (*done)(Scsi_Cmnd *));
X int gdth_abort(Scsi_Cmnd *);
X #if LINUX_VERSION_CODE >= 0x010346
@@ -1022,7 +1044,7 @@
X detect: gdth_detect, \
X release: gdth_release, \
X info: gdth_info, \
- command: gdth_command, \
+ command: NULL, \
X queuecommand: gdth_queuecommand, \
X eh_abort_handler: gdth_eh_abort, \
X eh_device_reset_handler: gdth_eh_device_reset, \
@@ -1054,7 +1076,7 @@
X detect: gdth_detect, \
X release: gdth_release, \
X info: gdth_info, \
- command: gdth_command, \
+ command: NULL, \
X queuecommand: gdth_queuecommand, \
X eh_abort_handler: gdth_eh_abort, \
X eh_device_reset_handler: gdth_eh_device_reset, \
@@ -1083,7 +1105,7 @@
X gdth_detect, \
X gdth_release, \
X gdth_info, \
- gdth_command, \
+ NULL, \
X gdth_queuecommand, \
X gdth_abort, \
X gdth_reset, \
@@ -1104,7 +1126,7 @@
X gdth_detect, \
X gdth_release, \
X gdth_info, \
- gdth_command, \
+ NULL, \
X gdth_queuecommand, \
X gdth_abort, \
X gdth_reset, \
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/gdth_ioctl.h linux/drivers/scsi/gdth_ioctl.h
--- v2.2.19/drivers/scsi/gdth_ioctl.h Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/gdth_ioctl.h Wed Oct 10 01:41:14 2001
@@ -2,7 +2,7 @@
X #define _GDTH_IOCTL_H
X
X /* gdth_ioctl.h
- * $Id: gdth_ioctl.h,v 1.7 2000/10/11 08:43:35 achim Exp $
+ * $Id: gdth_ioctl.h,v 1.10 2001/05/22 06:28:59 achim Exp $
X */
X
X /* IOCTLs */
@@ -21,9 +21,9 @@
X #define GDTIOCTL_RESCAN (GDTIOCTL_MASK |11) /* rescan host drives */
X #define GDTIOCTL_RESET_DRV (GDTIOCTL_MASK |12) /* reset (remote) drv. res. */
X
-#define GDTIOCTL_MAGIC 0xaffe0003UL
+#define GDTIOCTL_MAGIC 0xaffe0004
X #define EVENT_SIZE 294
-
+#define MAX_HDRIVES 100
X
X /* IOCTL structure (write) */
X typedef struct {
@@ -40,7 +40,7 @@
X struct {
X unchar lock; /* lock/unlock */
X unchar drive_cnt; /* drive count */
- ushort drives[35]; /* drives */
+ ushort drives[MAX_HDRIVES];/* drives */
X } lockdrv;
X struct {
X unchar lock; /* lock/unlock */
@@ -58,6 +58,10 @@
X unchar cmd_len; /* command length */
X unchar cmd[12]; /* SCSI command */
X } scsi;
+ struct {
+ ushort hdr_no; /* host drive number */
+ unchar flag; /* old meth./add/remove */
+ } rescan;
X } iu;
X } gdth_iowr_str;
X
@@ -79,6 +83,8 @@
X ushort bios_ver; /* not used */
X ushort access; /* not used */
X ushort ext_type; /* extended type */
+ ushort device_id; /* device ID */
+ ushort sub_device_id; /* sub device ID */
X } ctrtype;
X struct {
X unchar version; /* OS version */
@@ -97,7 +103,7 @@
X unchar target; /* target ID */
X unchar lun; /* LUN */
X unchar cluster_type; /* cluster properties */
- } hdr_list[35]; /* index is host drive number */
+ } hdr_list[MAX_HDRIVES]; /* index is host drive number */
X } iu;
X } gdth_iord_str;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/gdth_proc.c linux/drivers/scsi/gdth_proc.c
--- v2.2.19/drivers/scsi/gdth_proc.c Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/gdth_proc.c Wed Oct 10 01:41:15 2001
@@ -1,8 +1,11 @@
X /* gdth_proc.c
- * $Id: gdth_proc.c,v 1.23 2000/10/11 08:43:11 achim Exp $
+ * $Id: gdth_proc.c,v 1.33 2001/08/10 07:54:39 achim Exp $
X */
X
X #include "gdth_ioctl.h"
+#if LINUX_VERSION_CODE >= 0x020407
+#include <linux/completion.h>
+#endif
X
X int gdth_proc_info(char *buffer,char **start,off_t offset,int length,
X int hostno,int inout)
@@ -46,6 +49,8 @@
X #if LINUX_VERSION_CODE >= 0x020322
X sdev = scsi_get_host_dev(gdth_ctr_vtab[vh]);
X scp = scsi_allocate_device(sdev, 1, FALSE);
+ if (!scp)
+ return -ENOMEM;
X scp->cmd_len = 12;
X scp->use_sg = 0;
X #else
@@ -64,7 +69,12 @@
X } else if (piowr->magic == GDTIOCTL_MAGIC) {
X ret_val = gdth_set_bin_info( buffer, length, hanum, scp );
X } else {
- printk("GDT: Wrong signature: %x\n",piowr->magic);
+ printk("GDT: Wrong signature %x (%x required)!\n",
+ piowr->magic, GDTIOCTL_MAGIC);
+ if (piowr->magic > GDTIOCTL_MAGIC)
+ printk("GDT: Please update your driver.\n");
+ else
+ printk("GDT: Please update your tool.\n");
X ret_val = -EINVAL;
X }
X } else {
@@ -91,6 +101,7 @@
X
X char cmnd[MAX_COMMAND_SIZE];
X memset(cmnd, 0xff, 12);
+ memset(&gdtcmd, 0, sizeof(gdth_cmd_str));
X
X TRACE2(("gdth_set_asc_info() ha %d\n",hanum));
X ha = HADATA(gdth_ctr_tab[hanum]);
@@ -118,12 +129,10 @@
X if (drive != -1 && i != drive)
X continue;
X found = TRUE;
- gdtcmd.BoardNode = LOCALBOARD;
X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_FLUSH;
X gdtcmd.u.cache.DeviceNo = i;
X gdtcmd.u.cache.BlockNo = 1;
- gdtcmd.u.cache.sg_canz = 0;
X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
X #else
@@ -169,11 +178,10 @@
X }
X
X if (wb_mode) {
- if (!gdth_ioctl_alloc(hanum, sizeof(gdth_cpar_str)))
+ if (!gdth_ioctl_alloc(hanum, sizeof(gdth_cpar_str), TRUE))
X return(-EBUSY);
X pcpar = (gdth_cpar_str *)ha->pscratch;
X memcpy( pcpar, &ha->cpar, sizeof(gdth_cpar_str) );
- gdtcmd.BoardNode = LOCALBOARD;
X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;
X gdtcmd.u.ioctl.p_param = virt_to_bus(pcpar);
@@ -186,7 +194,7 @@
X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
X #endif
- gdth_ioctl_free(hanum);
+ gdth_ioctl_free(hanum, ha->pscratch);
X printk("Done.\n");
X return(orig_length);
X }
@@ -202,19 +210,20 @@
X #endif
X {
X unchar i, j;
- ushort k, hdr_cnt;
+ ushort k, hdr_cnt, status;
X gdth_ha_str *ha;
X gdth_iowr_str *piowr;
X gdth_iord_str *piord;
X gdth_cmd_str *pcmd;
X gdth_evt_str *pevt;
- ulong32 *ppadd, add_size;
- ulong32 *ppadd2, add_size2;
+ ulong32 *ppadd, add_size, *ppadd2, add_size2, info;
X ulong flags;
X gdth_cmd_str gdtcmd;
-
+ int drv_cyls, drv_hds, drv_secs;
+
X char cmnd[MAX_COMMAND_SIZE];
X memset(cmnd, 0xff, 12);
+ memset(&gdtcmd, 0, sizeof(gdth_cmd_str));
X
X TRACE2(("gdth_set_bin_info() ha %d\n",hanum));
X ha = HADATA(gdth_ctr_tab[hanum]);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 54'
echo 'File patch-2.2.20 is continued in part 55'
echo "55" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:52 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part53

#!/bin/sh -x
# this is part 53 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 53; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ 0x83, 0x01, 0x38, 0x06, 0x12, 0x31, 0xf0, 0x4f, 0x45, 0xfe, 0x90, 0x10, 0xfe, 0x40, 0x5a, 0x23,
+ 0x3f, 0xfb, 0x8c, 0x49, 0x48, 0xfe, 0xaa, 0x18, 0x62, 0x49, 0x71, 0x8c, 0x80, 0x48, 0xfe, 0xaa,
+ 0x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x19, 0x5f, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x02, 0x14, 0x07,
+ 0x01, 0x08, 0x17, 0xc1, 0x14, 0x1d, 0x01, 0x08, 0x17, 0xc1, 0x14, 0x07, 0x01, 0x08, 0x17, 0xc1,
+ 0xfe, 0x89, 0x49, 0x01, 0x08, 0x17, 0xc1, 0x5f, 0xfe, 0x89, 0x4a, 0x01, 0x08, 0x02, 0x50, 0x02,
+ 0x14, 0x07, 0x01, 0x08, 0x17, 0x74, 0x14, 0x7f, 0x01, 0x08, 0x17, 0x74, 0x14, 0x12, 0x01, 0x08,
+ 0x17, 0x74, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x17, 0x74, 0x14, 0x00, 0x01, 0x08, 0x17, 0x74, 0xfe,
+ 0x89, 0x4a, 0x01, 0x08, 0x17, 0x74, 0xfe, 0x09, 0x49, 0x01, 0x08, 0x17, 0x74, 0x5f, 0xcc, 0x01,
+ 0x08, 0x02, 0x21, 0xe4, 0x09, 0x07, 0xfe, 0x4c, 0x13, 0xc8, 0x20, 0xe4, 0xfe, 0x49, 0xf4, 0x00,
+ 0x4d, 0x5f, 0xa1, 0x5e, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, 0xcc, 0xff, 0x02, 0x00, 0x10, 0x2f,
+ 0xfe, 0x3e, 0x1a, 0x01, 0x43, 0x09, 0xfe, 0xe3, 0x00, 0xfe, 0x22, 0x13, 0x16, 0xfe, 0x64, 0x1a,
+ 0x26, 0x20, 0x9e, 0x01, 0x41, 0x21, 0x9e, 0x09, 0x07, 0x5d, 0x01, 0x0c, 0x61, 0x07, 0x44, 0x02,
+ 0x0a, 0x5a, 0x01, 0x18, 0xfe, 0x00, 0x40, 0xaa, 0x09, 0x1a, 0xfe, 0x12, 0x13, 0x0a, 0x9d, 0x01,
+ 0x18, 0xaa, 0x0a, 0x67, 0x01, 0xa3, 0x02, 0x0a, 0x9d, 0x01, 0x18, 0xaa, 0xfe, 0x80, 0xe7, 0x1a,
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02, 0x0f,
+ 0xfe, 0x8e, 0x90, 0x04, 0xfe, 0x8e, 0x93, 0x79, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x3c, 0x90, 0x04,
+ 0xfe, 0xbc, 0x93, 0x3a, 0x0b, 0x0e, 0x02, 0x8b, 0x0f, 0xfe, 0x03, 0x80, 0x04, 0xfe, 0x83, 0x83,
+ 0x33, 0x0b, 0x77, 0x0e, 0xa8, 0x02, 0xff, 0x66, 0x00, 0x00,
X };
X
X STATIC unsigned short _adv_asc38C1600_size =
- sizeof(_adv_asc38C1600_buf); /* 0x1662 */
+ sizeof(_adv_asc38C1600_buf); /* 0x1673 */
X STATIC ADV_DCNT _adv_asc38C1600_chksum =
- 0x057A378AUL; /* Expanded little_endian checksum. */
+ 0x0604EF77UL; /* Expanded little-endian checksum. */
X
X /* a_init.c */
X /*
@@ -16629,12 +14573,13 @@
X * Additional structure information can be found in a_condor.h where
X * the structure is defined.
X *
- * The XXX_Field_IsChar structs are needed to correct for endianness.
+ * The *_Field_IsChar structs are needed to correct for endianness.
X * These values are read from the board 16 bits at a time directly
- * into the structs. Because some fields are char, the values will be
- * in the wrong order. The XXX_Field_IsChar tells when to flip the
- * bytes. Cleaner solutions are welcome. :-)
- *
+ * into the structs. Because some fields are char, the values will be
+ * in the wrong order. The *_Field_IsChar tells when to flip the
+ * bytes. Data read and written to PCI memory is automatically swapped
+ * on big-endian platforms so char fields read as words are actually being
+ * unswapped on big-endian platforms.
X */
X STATIC ADVEEP_3550_CONFIG
X Default_3550_EEPROM_Config ASC_INITDATA = {
@@ -16676,14 +14621,14 @@
X
X STATIC ADVEEP_3550_CONFIG
X ADVEEP_3550_Config_Field_IsChar ASC_INITDATA = {


- 0, /* cfg_lsw */
- 0, /* cfg_msw */

- 0, /* -disc_enable */
- 0, /* wdtr_able */
- 0, /* sdtr_able */
- 0, /* start_motor */
- 0, /* tagqng_able */
- 0, /* bios_scan */
+ 0, /* cfg_lsw */
+ 0, /* cfg_msw */
+ 0, /* -disc_enable */
+ 0, /* wdtr_able */
+ 0, /* sdtr_able */
+ 0, /* start_motor */
+ 0, /* tagqng_able */
+ 0, /* bios_scan */
X 0, /* scam_tolerant */
X 1, /* adapter_scsi_id */
X 1, /* bios_boot_delay */
@@ -16691,11 +14636,11 @@
X 1, /* bios_id_lun */
X 1, /* termination */
X 1, /* reserved1 */
- 0, /* bios_ctrl */
- 0, /* ultra_able */
+ 0, /* bios_ctrl */
+ 0, /* ultra_able */
X 0, /* reserved2 */
- 1, /* max_host_qng */
- 1, /* max_dvc_qng */
+ 1, /* max_host_qng */
+ 1, /* max_dvc_qng */
X 0, /* dvc_cntl */
X 0, /* bug_fix */
X 0, /* serial_number_word1 */
@@ -16779,14 +14724,14 @@
X
X STATIC ADVEEP_38C0800_CONFIG
X ADVEEP_38C0800_Config_Field_IsChar ASC_INITDATA = {
- 0, /* 00 cfg_lsw */
- 0, /* 01 cfg_msw */
- 0, /* 02 disc_enable */
- 0, /* 03 wdtr_able */
- 0, /* 04 sdtr_speed1 */
- 0, /* 05 start_motor */
- 0, /* 06 tagqng_able */
- 0, /* 07 bios_scan */
+ 0, /* 00 cfg_lsw */
+ 0, /* 01 cfg_msw */
+ 0, /* 02 disc_enable */
+ 0, /* 03 wdtr_able */
+ 0, /* 04 sdtr_speed1 */
+ 0, /* 05 start_motor */
+ 0, /* 06 tagqng_able */
+ 0, /* 07 bios_scan */
X 0, /* 08 scam_tolerant */
X 1, /* 09 adapter_scsi_id */
X 1, /* bios_boot_delay */
@@ -16794,13 +14739,13 @@
X 1, /* bios_id_lun */
X 1, /* 11 termination_se */
X 1, /* termination_lvd */
- 0, /* 12 bios_ctrl */
- 0, /* 13 sdtr_speed2 */
- 0, /* 14 sdtr_speed3 */
- 1, /* 15 max_host_qng */
- 1, /* max_dvc_qng */
+ 0, /* 12 bios_ctrl */
+ 0, /* 13 sdtr_speed2 */
+ 0, /* 14 sdtr_speed3 */
+ 1, /* 15 max_host_qng */
+ 1, /* max_dvc_qng */
X 0, /* 16 dvc_cntl */
- 0, /* 17 sdtr_speed4 */
+ 0, /* 17 sdtr_speed4 */
X 0, /* 18 serial_number_word1 */
X 0, /* 19 serial_number_word2 */
X 0, /* 20 serial_number_word3 */
@@ -16834,8 +14779,8 @@
X 0, /* 55 reserved */
X 0, /* 56 cisptr_lsw */
X 0, /* 57 cisprt_msw */
- 0, /* 58 subsysvid */
- 0, /* 59 subsysid */
+ 0, /* 58 subsysvid */
+ 0, /* 59 subsysid */
X 0, /* 60 reserved */
X 0, /* 61 reserved */
X 0, /* 62 reserved */
@@ -16909,14 +14854,14 @@
X
X STATIC ADVEEP_38C1600_CONFIG
X ADVEEP_38C1600_Config_Field_IsChar ASC_INITDATA = {
- 0, /* 00 cfg_lsw */
- 0, /* 01 cfg_msw */
- 0, /* 02 disc_enable */
- 0, /* 03 wdtr_able */
- 0, /* 04 sdtr_speed1 */
- 0, /* 05 start_motor */
- 0, /* 06 tagqng_able */
- 0, /* 07 bios_scan */
+ 0, /* 00 cfg_lsw */
+ 0, /* 01 cfg_msw */
+ 0, /* 02 disc_enable */
+ 0, /* 03 wdtr_able */
+ 0, /* 04 sdtr_speed1 */
+ 0, /* 05 start_motor */
+ 0, /* 06 tagqng_able */
+ 0, /* 07 bios_scan */
X 0, /* 08 scam_tolerant */
X 1, /* 09 adapter_scsi_id */
X 1, /* bios_boot_delay */
@@ -16924,13 +14869,13 @@
X 1, /* bios_id_lun */
X 1, /* 11 termination_se */
X 1, /* termination_lvd */
- 0, /* 12 bios_ctrl */
- 0, /* 13 sdtr_speed2 */
- 0, /* 14 sdtr_speed3 */
- 1, /* 15 max_host_qng */
- 1, /* max_dvc_qng */
+ 0, /* 12 bios_ctrl */
+ 0, /* 13 sdtr_speed2 */
+ 0, /* 14 sdtr_speed3 */
+ 1, /* 15 max_host_qng */
+ 1, /* max_dvc_qng */
X 0, /* 16 dvc_cntl */
- 0, /* 17 sdtr_speed4 */
+ 0, /* 17 sdtr_speed4 */
X 0, /* 18 serial_number_word1 */
X 0, /* 19 serial_number_word2 */
X 0, /* 20 serial_number_word3 */
@@ -16964,8 +14909,8 @@
X 0, /* 55 reserved */
X 0, /* 56 cisptr_lsw */
X 0, /* 57 cisprt_msw */
- 0, /* 58 subsysvid */
- 0, /* 59 subsysid */
+ 0, /* 58 subsysvid */
+ 0, /* 59 subsysid */
X 0, /* 60 reserved */
X 0, /* 61 reserved */
X 0, /* 62 reserved */
@@ -17052,11 +14997,11 @@
X asc_dvc->cfg->chip_version =
X AdvGetChipVersion(iop_base, asc_dvc->bus_type);
X
- ASC_DBG2(1, "AdvInitGetConfig: iopb_chip_id_1: %x %x\n",
+ ASC_DBG2(1, "AdvInitGetConfig: iopb_chip_id_1: 0x%x 0x%x\n",
X (ushort) AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1),
X (ushort) ADV_CHIP_ID_BYTE);
X
- ASC_DBG2(1, "AdvInitGetConfig: iopw_chip_id_0: %x %x\n",
+ ASC_DBG2(1, "AdvInitGetConfig: iopw_chip_id_0: 0x%x 0x%x\n",
X (ushort) AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0),
X (ushort) ADV_CHIP_ID_WORD);
X
@@ -17121,6 +15066,8 @@
X *
X * For a non-fatal error return a warning code. If there are no warnings
X * then 0 is returned.
+ *
+ * Needed after initialization for error recovery.
X */
X STATIC int
X AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc)
@@ -17233,7 +15180,7 @@
X {
X AdvWriteWordAutoIncLram(iop_base, (((ushort)
X _adv_asc3550_buf[i + 3] << 8) |
- _adv_asc3550_buf[i + 2]));
+ _adv_asc3550_buf[i + 2]));
X word++;
X }
X i += 3;
@@ -17241,14 +15188,14 @@
X {
X AdvWriteWordAutoIncLram(iop_base, (((ushort)
X _adv_asc3550_buf[i + 2] << 8) |
- _adv_asc3550_buf[i + 1]));
+ _adv_asc3550_buf[i + 1]));
X i += 2;
X word++;
X } else
X {
X AdvWriteWordAutoIncLram(iop_base, (((ushort)
X _adv_asc3550_buf[(_adv_asc3550_buf[i] * 2) + 1] << 8) |
- _adv_asc3550_buf[_adv_asc3550_buf[i] * 2]));
+ _adv_asc3550_buf[_adv_asc3550_buf[i] * 2]));
X word++;
X }
X }
@@ -17414,7 +15361,6 @@
X */
X AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, asc_dvc->cfg->disc_enable);
X
-
X /*
X * Set SCSI_CFG0 Microcode Default Value.
X *
@@ -17608,8 +15554,8 @@
X asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
X return ADV_ERROR;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
X
X /*
X * The first command issued will be placed in the stopper carrier.
@@ -17619,9 +15565,7 @@
X /*
X * Set RISC ICQ physical address start value.
X */
- AdvWriteDWordLram(iop_base, ASC_MC_ICQ,
- /* carr_pa is stored LE, must be native before write */
- le32_to_cpu(asc_dvc->icq_sp->carr_pa));
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa);
X
X /*
X * Set-up the RISC->Host Initiator Response Queue (IRQ).
@@ -17631,8 +15575,8 @@
X asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
X return ADV_ERROR;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
X
X /*
X * The first command completed by the RISC will be placed in
@@ -17646,9 +15590,7 @@
X /*
X * Set RISC IRQ physical address start value.
X */
- AdvWriteDWordLram(iop_base, ASC_MC_IRQ,
- /* carr_pa is LE, must be native before write */
- le32_to_cpu(asc_dvc->irq_sp->carr_pa));
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa);
X asc_dvc->carr_pending_cnt = 0;
X
X AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES,
@@ -17704,6 +15646,8 @@
X *
X * For a non-fatal error return a warning code. If there are no warnings
X * then 0 is returned.
+ *
+ * Needed after initialization for error recovery.
X */
X STATIC int
X AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc)
@@ -18232,8 +16176,8 @@
X asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
X return ADV_ERROR;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
X
X /*
X * The first command issued will be placed in the stopper carrier.
@@ -18242,10 +16186,9 @@
X
X /*
X * Set RISC ICQ physical address start value.
+ * carr_pa is LE, must be native before write
X */
- AdvWriteDWordLram(iop_base, ASC_MC_ICQ,
- /* carr_pa is LE, must be native before write */
- le32_to_cpu(asc_dvc->icq_sp->carr_pa));
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa);
X
X /*
X * Set-up the RISC->Host Initiator Response Queue (IRQ).
@@ -18255,8 +16198,8 @@
X asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
X return ADV_ERROR;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
X
X /*
X * The first command completed by the RISC will be placed in
@@ -18269,10 +16212,10 @@
X
X /*
X * Set RISC IRQ physical address start value.
+ *
+ * carr_pa is LE, must be native before write *
X */
- AdvWriteDWordLram(iop_base, ASC_MC_IRQ,
- /* carr_pa is LE, must be native before write */
- le32_to_cpu(asc_dvc->irq_sp->carr_pa));
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa);
X asc_dvc->carr_pending_cnt = 0;
X
X AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES,
@@ -18328,11 +16271,11 @@
X *
X * For a non-fatal error return a warning code. If there are no warnings
X * then 0 is returned.
+ *
+ * Needed after initialization for error recovery.
X */


-ASC_INITFUNC(
-STATIC int,
+STATIC int

X AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc)
-)
X {
X AdvPortAddr iop_base;
X ushort warn_code;
@@ -18763,6 +16706,8 @@
X * Clear Big Endian and Terminator Polarity bits and set possibly
X * modified termination control bits in the Microcode SCSI_CFG1
X * Register Value.
+ *
+ * Big Endian bit is not used even on big endian machines.
X */
X scsi_cfg1 &= (~BIG_ENDIAN & ~DIS_TERM_DRV & ~TERM_POL);
X
@@ -18867,8 +16812,8 @@
X asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
X return ADV_ERROR;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
X
X /*
X * The first command issued will be placed in the stopper carrier.
@@ -18880,11 +16825,9 @@
X * COMMA register to the same value otherwise the RISC will
X * prematurely detect a command is available.
X */
- AdvWriteDWordLram(iop_base, ASC_MC_ICQ,
- /* carr_pa is stored LE, must be native before write */
- le32_to_cpu(asc_dvc->icq_sp->carr_pa));
- AdvWriteDWordRegister(iop_base, IOPDW_COMMA,
- le32_to_cpu(asc_dvc->icq_sp->carr_pa));
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa);
+ AdvWriteDWordRegister(iop_base, IOPDW_COMMA,
+ le32_to_cpu(asc_dvc->icq_sp->carr_pa));
X
X /*
X * Set-up the RISC->Host Initiator Response Queue (IRQ).
@@ -18894,8 +16837,8 @@
X asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
X return ADV_ERROR;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
X
X /*
X * The first command completed by the RISC will be placed in
@@ -18909,9 +16852,7 @@
X /*
X * Set RISC IRQ physical address start value.
X */
- AdvWriteDWordLram(iop_base, ASC_MC_IRQ,
- /* carr_pa is LE, must be native before write */
- le32_to_cpu(asc_dvc->irq_sp->carr_pa));
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa);
X asc_dvc->carr_pending_cnt = 0;
X
X AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES,
@@ -18989,8 +16930,6 @@
X * Read the board's EEPROM configuration.
X *
X * Set default values if a bad checksum is found.
- *
- * XXX - Don't handle big-endian access to EEPROM yet.
X */
X if (AdvGet3550EEPConfig(iop_base, &eep_config) != eep_config.check_sum)
X {
@@ -19011,13 +16950,13 @@
X * failed.
X */
X eep_config.serial_number_word3 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1);
X
X eep_config.serial_number_word2 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2);
X
X eep_config.serial_number_word1 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3);
X
X AdvSet3550EEPConfig(iop_base, &eep_config);
X }
@@ -19167,8 +17106,6 @@
X * Read the board's EEPROM configuration.
X *
X * Set default values if a bad checksum is found.
- *
- * XXX - Don't handle big-endian access to EEPROM yet.
X */
X if (AdvGet38C0800EEPConfig(iop_base, &eep_config) != eep_config.check_sum)
X {
@@ -19189,13 +17126,13 @@
X * failed.
X */
X eep_config.serial_number_word3 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1);
X
X eep_config.serial_number_word2 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2);
X
X eep_config.serial_number_word1 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3);
X
X AdvSet38C0800EEPConfig(iop_base, &eep_config);
X }
@@ -19465,13 +17402,13 @@
X * failed.
X */
X eep_config.serial_number_word3 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1);
X
X eep_config.serial_number_word2 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2);
X
X eep_config.serial_number_word1 =
- AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3);
+ AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3);
X
X AdvSet38C1600EEPConfig(iop_base, &eep_config);
X }
@@ -19660,38 +17597,37 @@
X ushort wval, chksum;
X ushort *wbuf;
X int eep_addr;
- ushort *charfields;
+ ushort *charfields;
X
- /* Charfields will tell us which words coming from the EEProm should not
- be byteswapped, because they are not a single short but a pair of
- chars. */
- charfields = (ushort*) &ADVEEP_3550_Config_Field_IsChar;
+ charfields = (ushort *) &ADVEEP_3550_Config_Field_IsChar;


X wbuf = (ushort *) cfg_buf;

X chksum = 0;
X
- for (eep_addr = ASC_EEP_DVC_CFG_BEGIN;
- eep_addr < ASC_EEP_DVC_CFG_END;
+ for (eep_addr = ADV_EEP_DVC_CFG_BEGIN;
+ eep_addr < ADV_EEP_DVC_CFG_END;
X eep_addr++, wbuf++)
X {
X wval = AdvReadEEPWord(iop_base, eep_addr);
- chksum += wval;
- /* swap back as needed */


- if (*charfields++)
- *wbuf = cpu_to_le16(wval);

- else
- *wbuf = wval;

+ chksum += wval; /* Checksum is calculated from word values. */
+ if (*charfields++) {


+ *wbuf = le16_to_cpu(wval);
+ } else {

+ *wbuf = wval;
+ }
X }
+ /* Read checksum word. */
X *wbuf = AdvReadEEPWord(iop_base, eep_addr);
- if (*charfields++)
- *wbuf = cpu_to_le16(*wbuf);
- wbuf++;
- for (eep_addr = ASC_EEP_DVC_CTL_BEGIN;
- eep_addr < ASC_EEP_MAX_WORD_ADDR;
+ wbuf++; charfields++;
+
+ /* Read rest of EEPROM not covered by the checksum. */
+ for (eep_addr = ADV_EEP_DVC_CTL_BEGIN;
+ eep_addr < ADV_EEP_MAX_WORD_ADDR;
X eep_addr++, wbuf++)
X {
X *wbuf = AdvReadEEPWord(iop_base, eep_addr);
- if (*charfields++)
- *wbuf = cpu_to_le16(*wbuf);
+ if (*charfields++) {
+ *wbuf = le16_to_cpu(*wbuf);
+ }
X }
X return chksum;
X }
@@ -19712,36 +17648,35 @@
X int eep_addr;
X ushort *charfields;
X
- /* Charfields will tell us which words coming from the EEProm should not
- be byteswapped, because they are not a single short but a pair of
- chars. */
- charfields = (ushort*) &ADVEEP_38C0800_Config_Field_IsChar;
+ charfields = (ushort *) &ADVEEP_38C0800_Config_Field_IsChar;


X wbuf = (ushort *) cfg_buf;

X chksum = 0;
X
- for (eep_addr = ASC_EEP_DVC_CFG_BEGIN;
- eep_addr < ASC_EEP_DVC_CFG_END;
+ for (eep_addr = ADV_EEP_DVC_CFG_BEGIN;
+ eep_addr < ADV_EEP_DVC_CFG_END;
X eep_addr++, wbuf++)
X {
X wval = AdvReadEEPWord(iop_base, eep_addr);
- chksum += wval;
- /* swap back as needed */


- if (*charfields++)
- *wbuf = cpu_to_le16(wval);

- else
- *wbuf = wval;

+ chksum += wval; /* Checksum is calculated from word values. */
+ if (*charfields++) {


+ *wbuf = le16_to_cpu(wval);
+ } else {

+ *wbuf = wval;
+ }
X }
+ /* Read checksum word. */
X *wbuf = AdvReadEEPWord(iop_base, eep_addr);
- if (*charfields++)
- *wbuf = cpu_to_le16(*wbuf);
- wbuf++;
- for (eep_addr = ASC_EEP_DVC_CTL_BEGIN;
- eep_addr < ASC_EEP_MAX_WORD_ADDR;
+ wbuf++; charfields++;
+
+ /* Read rest of EEPROM not covered by the checksum. */
+ for (eep_addr = ADV_EEP_DVC_CTL_BEGIN;
+ eep_addr < ADV_EEP_MAX_WORD_ADDR;
X eep_addr++, wbuf++)
X {
X *wbuf = AdvReadEEPWord(iop_base, eep_addr);
- if (*charfields++)
- *wbuf = cpu_to_le16(*wbuf);
+ if (*charfields++) {
+ *wbuf = le16_to_cpu(*wbuf);
+ }
X }
X return chksum;
X }
@@ -19760,38 +17695,37 @@
X ushort wval, chksum;
X ushort *wbuf;
X int eep_addr;
- ushort *charfields;
+ ushort *charfields;
X
- /* Charfields will tell us which words coming from the EEProm should not
- be byteswapped, because they are not a single short but a pair of
- chars. */
X charfields = (ushort*) &ADVEEP_38C1600_Config_Field_IsChar;


X wbuf = (ushort *) cfg_buf;

X chksum = 0;
X
- for (eep_addr = ASC_EEP_DVC_CFG_BEGIN;
- eep_addr < ASC_EEP_DVC_CFG_END;
+ for (eep_addr = ADV_EEP_DVC_CFG_BEGIN;
+ eep_addr < ADV_EEP_DVC_CFG_END;
X eep_addr++, wbuf++)
X {
X wval = AdvReadEEPWord(iop_base, eep_addr);
- chksum += wval;
- /* swap back as needed */


- if (*charfields++)
- *wbuf = cpu_to_le16(wval);

- else
- *wbuf = wval;

+ chksum += wval; /* Checksum is calculated from word values. */
+ if (*charfields++) {


+ *wbuf = le16_to_cpu(wval);
+ } else {

+ *wbuf = wval;
+ }
X }
+ /* Read checksum word. */
X *wbuf = AdvReadEEPWord(iop_base, eep_addr);
- if (*charfields++)
- *wbuf = cpu_to_le16(*wbuf);
- wbuf++;
- for (eep_addr = ASC_EEP_DVC_CTL_BEGIN;
- eep_addr < ASC_EEP_MAX_WORD_ADDR;
+ wbuf++; charfields++;
+
+ /* Read rest of EEPROM not covered by the checksum. */
+ for (eep_addr = ADV_EEP_DVC_CTL_BEGIN;
+ eep_addr < ADV_EEP_MAX_WORD_ADDR;
X eep_addr++, wbuf++)
X {
X *wbuf = AdvReadEEPWord(iop_base, eep_addr);
- if (*charfields++)
- *wbuf = cpu_to_le16(*wbuf);
+ if (*charfields++) {
+ *wbuf = le16_to_cpu(*wbuf);
+ }
X }
X return chksum;
X }
@@ -19820,7 +17754,7 @@
X {
X int eep_delay_ms;
X
- for (eep_delay_ms = 0; eep_delay_ms < ASC_EEP_DELAY_MS; eep_delay_ms++)
+ for (eep_delay_ms = 0; eep_delay_ms < ADV_EEP_DELAY_MS; eep_delay_ms++)
X {
X if (AdvReadWordRegister(iop_base, IOPW_EE_CMD) & ASC_EEP_CMD_DONE)
X {
@@ -19853,44 +17787,47 @@
X AdvWaitEEPCmd(iop_base);
X
X /*
- * Write EEPROM from word 0 to word 20
+ * Write EEPROM from word 0 to word 20.
X */
- for (addr = ASC_EEP_DVC_CFG_BEGIN;
- addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++)
+ for (addr = ADV_EEP_DVC_CFG_BEGIN;
+ addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++)
X {
- ushort tmp;
- if (charfields++) {
- uchar *cbuf = (uchar *) wbuf;
- tmp = *cbuf + ((*(cbuf + 1)) << 8);
- }
- else
- tmp = *wbuf;
- chksum += tmp;
- AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp);
+ ushort word;
+
+ if (*charfields++) {
+ word = cpu_to_le16(*wbuf);
+ } else {
+ word = *wbuf;
+ }
+ chksum += *wbuf; /* Checksum is calculated from word values. */
+ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
- DvcSleepMilliSecond(ASC_EEP_DELAY_MS);
+ DvcSleepMilliSecond(ADV_EEP_DELAY_MS);
X }
X
X /*
- * Write EEPROM checksum at word 21
+ * Write EEPROM checksum at word 21.
X */
X AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
- wbuf++; /* skip over check_sum */
+ wbuf++; charfields++;
X
X /*
- * Write EEPROM OEM name at words 22 to 29
+ * Write EEPROM OEM name at words 22 to 29.
X */
- for (addr = ASC_EEP_DVC_CTL_BEGIN;
- addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++)
+ for (addr = ADV_EEP_DVC_CTL_BEGIN;
+ addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++)
X {
- uchar *cbuf;
- ushort tmp;
- cbuf = (uchar *) wbuf;
- tmp = *cbuf + ((*(cbuf + 1)) << 8);
- AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp);
+ ushort word;
+
+ if (*charfields++) {
+ word = cpu_to_le16(*wbuf);
+ } else {
+ word = *wbuf;
+ }
+ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
X }
@@ -19918,44 +17855,47 @@
X AdvWaitEEPCmd(iop_base);
X
X /*
- * Write EEPROM from word 0 to word 20
+ * Write EEPROM from word 0 to word 20.
X */
- for (addr = ASC_EEP_DVC_CFG_BEGIN;
- addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++)
+ for (addr = ADV_EEP_DVC_CFG_BEGIN;
+ addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++)
X {
- ushort tmp;
- if (*charfields++) {
- uchar *cbuf = (uchar *) wbuf;
- tmp = *cbuf + ((*(cbuf + 1)) << 8);
- }
- else
- tmp = *wbuf;
- chksum += tmp;
- AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp);
+ ushort word;
+
+ if (*charfields++) {
+ word = cpu_to_le16(*wbuf);
+ } else {
+ word = *wbuf;
+ }
+ chksum += *wbuf; /* Checksum is calculated from word values. */
+ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
- DvcSleepMilliSecond(ASC_EEP_DELAY_MS);
+ DvcSleepMilliSecond(ADV_EEP_DELAY_MS);
X }
X
X /*
- * Write EEPROM checksum at word 21
+ * Write EEPROM checksum at word 21.
X */
X AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
- wbuf++; /* skip over check_sum */
+ wbuf++; charfields++;
X
X /*
- * Write EEPROM OEM name at words 22 to 29
+ * Write EEPROM OEM name at words 22 to 29.
X */
- for (addr = ASC_EEP_DVC_CTL_BEGIN;
- addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++)
+ for (addr = ADV_EEP_DVC_CTL_BEGIN;
+ addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++)
X {
- uchar *cbuf;
- ushort tmp;
- cbuf = (uchar *) wbuf;
- tmp = *cbuf + ((*(cbuf + 1)) << 8);
- AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp);
+ ushort word;
+
+ if (*charfields++) {
+ word = cpu_to_le16(*wbuf);
+ } else {
+ word = *wbuf;
+ }
+ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
X }
@@ -19972,7 +17912,7 @@
X ADVEEP_38C1600_CONFIG *cfg_buf)
X {


X ushort *wbuf;
- ushort *charfields;

+ ushort *charfields;
X ushort addr, chksum;


X
X wbuf = (ushort *) cfg_buf;

@@ -19983,44 +17923,47 @@
X AdvWaitEEPCmd(iop_base);
X
X /*
- * Write EEPROM from word 0 to word 20
+ * Write EEPROM from word 0 to word 20.
X */
- for (addr = ASC_EEP_DVC_CFG_BEGIN;
- addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++)
+ for (addr = ADV_EEP_DVC_CFG_BEGIN;
+ addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++)
X {
- ushort tmp;
- if (*charfields++) {
- uchar *cbuf = (uchar *) wbuf;
- tmp = *cbuf + ((*(cbuf + 1)) << 8);
- }
- else
- tmp = *wbuf;
- chksum += tmp;
- AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp);
+ ushort word;
+
+ if (*charfields++) {
+ word = cpu_to_le16(*wbuf);
+ } else {
+ word = *wbuf;
+ }
+ chksum += *wbuf; /* Checksum is calculated from word values. */
+ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
- DvcSleepMilliSecond(ASC_EEP_DELAY_MS);
+ DvcSleepMilliSecond(ADV_EEP_DELAY_MS);
X }
X
X /*
- * Write EEPROM checksum at word 21
+ * Write EEPROM checksum at word 21.
X */
X AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
- wbuf++; /* skip over check_sum */
+ wbuf++; charfields++;
X
X /*
- * Write EEPROM OEM name at words 22 to 29
+ * Write EEPROM OEM name at words 22 to 29.
X */
- for (addr = ASC_EEP_DVC_CTL_BEGIN;
- addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++)
+ for (addr = ADV_EEP_DVC_CTL_BEGIN;
+ addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++)
X {
- uchar *cbuf;
- ushort tmp;
- cbuf = (uchar *) wbuf;
- tmp = *cbuf + ((*(cbuf + 1)) << 8);
- AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp);
+ ushort word;
+
+ if (*charfields++) {
+ word = cpu_to_le16(*wbuf);
+ } else {
+ word = *wbuf;
+ }
+ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
X AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
X AdvWaitEEPCmd(iop_base);
X }
@@ -20055,7 +17998,7 @@
X AdvExeScsiQueue(ADV_DVC_VAR *asc_dvc,
X ADV_SCSI_REQ_Q *scsiq)
X {


- int last_int_level;
+ ulong last_int_level;

X AdvPortAddr iop_base;
X ADV_DCNT req_size;
X ADV_PADDR req_paddr;
@@ -20083,10 +18026,11 @@
X */
X if ((new_carrp = asc_dvc->carr_freelist) == NULL)
X {
+ DvcLeaveCritical(last_int_level);
X return ADV_BUSY;
X }
- asc_dvc->carr_freelist =
- (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(new_carrp->next_vpa));
+ asc_dvc->carr_freelist = (ADV_CARR_T *)
+ ADV_U32_TO_VADDR(le32_to_cpu(new_carrp->next_vpa));
X asc_dvc->carr_pending_cnt++;
X
X /*
@@ -20105,7 +18049,7 @@
X req_paddr = DvcGetPhyAddr(asc_dvc, scsiq, (uchar *) scsiq,
X (ADV_SDCNT *) &req_size, ADV_IS_SCSIQ_FLAG);
X
- ASC_ASSERT(ADV_8BALIGN(req_paddr) == req_paddr);
+ ASC_ASSERT(ADV_32BALIGN(req_paddr) == req_paddr);
X ASC_ASSERT(req_size >= sizeof(ADV_SCSI_REQ_Q));
X
X /* Wait for assertion before making little-endian */
@@ -20163,9 +18107,8 @@
X * Notify the RISC a carrier is ready by writing the physical
X * address of the new carrier stopper to the COMMA register.
X */
- AdvWriteDWordRegister(iop_base, IOPDW_COMMA,
- /* carr_pa is LE, must be native before write */
- le32_to_cpu(new_carrp->carr_pa));
+ AdvWriteDWordRegister(iop_base, IOPDW_COMMA,
+ le32_to_cpu(new_carrp->carr_pa));
X }
X
X DvcLeaveCritical(last_int_level);
@@ -20362,6 +18305,7 @@
X if ((int_stat & (ADV_INTR_STATUS_INTRA | ADV_INTR_STATUS_INTRB |
X ADV_INTR_STATUS_INTRC)) == 0)
X {
+ DvcLeaveCritical(flags);
X return ADV_FALSE;
X }
X
@@ -20399,7 +18343,8 @@
X /*
X * Check if the IRQ stopper carrier contains a completed request.
X */
- while (((irq_next_vpa = le32_to_cpu(asc_dvc->irq_sp->next_vpa)) & ASC_RQ_DONE) != 0)
+ while (((irq_next_vpa =
+ le32_to_cpu(asc_dvc->irq_sp->next_vpa)) & ASC_RQ_DONE) != 0)
X {
X /*
X * Get a pointer to the newly completed ADV_SCSI_REQ_Q structure.
@@ -20410,7 +18355,8 @@
X * below complements the conversion of ASC_SCSI_REQ_Q.scsiq_ptr'
X * in AdvExeScsiQueue().
X */
- scsiq = (ADV_SCSI_REQ_Q *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->areq_vpa));
+ scsiq = (ADV_SCSI_REQ_Q *)
+ ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->areq_vpa));
X
X /*
X * Request finished with good status and the queue was not
@@ -20433,7 +18379,8 @@
X asc_dvc->irq_sp = (ADV_CARR_T *)
X ADV_U32_TO_VADDR(ASC_GET_CARRP(irq_next_vpa));
X
- free_carrp->next_vpa = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist));
+ free_carrp->next_vpa =
+ cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist));
X asc_dvc->carr_freelist = free_carrp;
X asc_dvc->carr_pending_cnt--;
X
@@ -20449,10 +18396,16 @@
X * If the command that completed was a SCSI INQUIRY and
X * LUN 0 was sent the command, then process the INQUIRY
X * command information for the device.
+ *
+ * Note: If data returned were either VPD or CmdDt data,
+ * don't process the INQUIRY command information for
+ * the device, otherwise may erroneously set *_able bits.
X */
X if (scsiq->done_status == QD_NO_ERROR &&
X scsiq->cdb[0] == SCSICMD_Inquiry &&
- scsiq->target_lun == 0)
+ scsiq->target_lun == 0 &&
+ (scsiq->cdb[1] & ADV_INQ_RTN_VPD_AND_CMDDT)
+ == ADV_INQ_RTN_STD_INQUIRY_DATA)
X {
X AdvInquiryHandling(asc_dvc, scsiq);
X }
@@ -20504,7 +18457,7 @@
X ushort idle_cmd,
X ADV_DCNT idle_cmd_parameter)
X {


- int last_int_level;
+ ulong last_int_level;

X int result;
X ADV_DCNT i, j;
X AdvPortAddr iop_base;
@@ -20527,8 +18480,8 @@
X * followed, the microcode may process the idle command before the
X * parameters have been written to LRAM.
X */
- AdvWriteDWordLram(iop_base, ASC_MC_IDLE_CMD_PARAMETER,
- idle_cmd_parameter);
+ AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IDLE_CMD_PARAMETER,
+ cpu_to_le32(idle_cmd_parameter));
X AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD, idle_cmd);
X
X /*
@@ -20594,7 +18547,8 @@
X * microcode to the transfer residual count.
X */
X
- if (scsiq->cdb[4] < 8 || (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) < 8)
+ if (scsiq->cdb[4] < 8 ||
+ (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) < 8)
X {
X return;
X }
@@ -20607,7 +18561,7 @@
X /*
X * WDTR, SDTR, and Tag Queuing cannot be enabled for old devices.
X */
- if (INQ_RESPONSE_FMT(*inq) < 2 && INQ_ANSI_VER(*inq) < 2)
+ if (ADV_INQ_RESPONSE_FMT(inq) < 2 && ADV_INQ_ANSI_VER(inq) < 2)
X {
X return;
X } else
@@ -20631,7 +18585,7 @@
X * device's 'wdtr_able' bit and write the new value to the
X * microcode.
X */
- if ((asc_dvc->wdtr_able & tidmask) && INQ_WIDE16(*inq))
+ if ((asc_dvc->wdtr_able & tidmask) && ADV_INQ_WIDE16(inq))
X {
X AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, cfg_word);
X if ((cfg_word & tidmask) == 0)
@@ -20662,7 +18616,7 @@
X * supports synchronous transfers, then turn on the device's
X * 'sdtr_able' bit. Write the new value to the microcode.
X */
- if ((asc_dvc->sdtr_able & tidmask) && INQ_SYNC(*inq))
+ if ((asc_dvc->sdtr_able & tidmask) && ADV_INQ_SYNC(inq))
X {
X AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, cfg_word);
X if ((cfg_word & tidmask) == 0)
@@ -20685,8 +18639,8 @@
X * Clocking field, then check if DT mode is supported.
X */
X if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600 &&
- (scsiq->cdb[4] >= 57
- || (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) >= 57))
+ (scsiq->cdb[4] >= 57 ||
+ (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) >= 57))
X {
X /*
X * PPR (Parallel Protocol Request) Capable
@@ -20696,7 +18650,7 @@
X * messages to negotiate synchronous speed and offset, transfer
X * width, and protocol options.
X */
- if (INQ_CLOCKING(*inq) & INQ_CLOCKING_DT_ONLY)
+ if (ADV_INQ_CLOCKING(inq) & ADV_INQ_CLOCKING_DT_ONLY)
X {
X AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, asc_dvc->ppr_able);
X asc_dvc->ppr_able |= tidmask;
@@ -20716,7 +18670,7 @@
X * disabling Tag Queuing in the BIOS devices with Tag Queuing
X * bugs will at least work with the BIOS.
X */
- if ((asc_dvc->tagqng_able & tidmask) && INQ_CMD_QUEUE(*inq))
+ if ((asc_dvc->tagqng_able & tidmask) && ADV_INQ_CMD_QUEUE(inq))
X {
X AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, cfg_word);
X cfg_word |= tidmask;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/advansys.h linux/drivers/scsi/advansys.h
--- v2.2.19/drivers/scsi/advansys.h Sun Mar 25 17:31:31 2001
+++ linux/drivers/scsi/advansys.h Fri Nov 2 15:44:31 2001
@@ -2,7 +2,7 @@
X * advansys.h - Linux Host Driver for AdvanSys SCSI Adapters
X *

X * Copyright (c) 1995-2000 Advanced System Products, Inc.
- * Copyright (c) 2000 ConnectCom Solutions, Inc.
+ * Copyright (c) 2000-2001 ConnectCom Solutions, Inc.
X * All Rights Reserved.
X *
X * Redistribution and use in source and binary forms, with or without

@@ -11,7 +11,7 @@


X * modification.
X *
X * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys)
- * changed its name to name to ConnectCom Solutions, Inc.
+ * changed its name to ConnectCom Solutions, Inc.
X *
X * There is an AdvanSys Linux WWW page at:
X * http://www.connectcom.net/downloads/software/os/linux.html

@@ -28,42 +28,38 @@
X #ifndef _ADVANSYS_H
X #define _ADVANSYS_H


X
-/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
-#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S))
-
X #ifndef LINUX_VERSION_CODE
X #include <linux/version.h>
X #endif /* LINUX_VERSION_CODE */
X
+/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
+#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S))

+/* Driver supported only in version 2.2 and version >= 2.4. */
+#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \
+ (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \
+ LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
+#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels."
+#endif

+#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
+#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0))

+
X /*
X * Scsi_Host_Template function prototypes.
X */
X int advansys_detect(Scsi_Host_Template *);
X int advansys_release(struct Scsi_Host *);
X const char *advansys_info(struct Scsi_Host *);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-int advansys_command(Scsi_Cmnd *);


-#endif /* version < v2.3.28 */

X int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-int advansys_abort(Scsi_Cmnd *);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
X int advansys_reset(Scsi_Cmnd *);
-#else /* version >= v1.3.89 */
-int advansys_reset(Scsi_Cmnd *, unsigned int);


-#endif /* version >= v1.3.89 */

-#else /* version >= v2.3.28 */
-int advansys_eh_bus_reset(Scsi_Cmnd *);


-#endif /* version >= v2.3.28 */

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-int advansys_biosparam(Disk *, int, int[]);
-#else /* version >= v1.3.0 */
X int advansys_biosparam(Disk *, kdev_t, int[]);
+#ifdef CONFIG_PROC_FS
X #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
X extern struct proc_dir_entry proc_scsi_advansys;
X #endif /* version < v2.3.28 */
X int advansys_proc_info(char *, char **, off_t, int, int, int);


-#endif /* version >= v1.3.0 */

+#else /* !defined(CONFIG_PROC_FS) */
+#define advansys_proc_info NULL
+#endif /* !defined(CONFIG_PROC_FS) */
X
X /* init/main.c setup function */
X void advansys_setup(char *, int *);
@@ -71,108 +67,24 @@
X /*
X * AdvanSys Host Driver Scsi_Host_Template (struct SHT) from hosts.h.
X */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
+#if ASC_LINUX_KERNEL24
X #define ADVANSYS { \
- NULL, /* struct SHT *next */ \
- NULL, /* int *usage_count */ \
- "advansys", /* char *name */ \
- advansys_detect, /* int (*detect)(struct SHT *) */ \
- advansys_release, /* int (*release)(struct Scsi_Host *) */ \
- advansys_info, /* const char *(*info)(struct Scsi_Host *) */ \
- advansys_command, /* int (*command)(Scsi_Cmnd *) */ \
- advansys_queuecommand, \
- /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
- advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \
- advansys_reset, /* int (*reset)(Scsi_Cmnd *) */ \
- NULL, /* int (*slave_attach)(int, int) */ \
- advansys_biosparam, /* int (* bios_param)(Disk *, int, int []) */ \
- /* \
- * The following fields are set per adapter in advansys_detect(). \
- */ \
- 0, /* int can_queue */ \
- 0, /* int this_id */ \
- 0, /* short unsigned int sg_tablesize */ \
- 0, /* short cmd_per_lun */ \
- 0, /* unsigned char present */ \
- /* \
- * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
- * must be set. The flag will be cleared in advansys_detect for non-ISA \
- * adapters. Refer to the comment in scsi_module.c for more information. \
- */ \
- 1, /* unsigned unchecked_isa_dma:1 */ \
- /* \
- * All adapters controlled by this driver are capable of large \
- * scatter-gather lists. According to the mid-level SCSI documentation \
- * this obviates any performance gain provided by setting \
- * 'use_clustering'. But empirically while CPU utilization is increased \
- * by enabling clustering, I/O throughput increases as well. \
- */ \
- ENABLE_CLUSTERING, /* unsigned use_clustering:1 */ \
-}
-#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,75)
-#define ADVANSYS { \
- NULL, /* struct SHT *next */ \
- NULL, \
- /* version < v2.1.23 long *usage_count */ \
- /* version >= v2.1.23 struct module * */ \
- &proc_scsi_advansys, /* struct proc_dir_entry *proc_dir */ \
- advansys_proc_info, \
- /* int (*proc_info)(char *, char **, off_t, int, int, int) */ \
- "advansys", /* const char *name */ \
- advansys_detect, /* int (*detect)(struct SHT *) */ \
- advansys_release, /* int (*release)(struct Scsi_Host *) */ \
- advansys_info, /* const char *(*info)(struct Scsi_Host *) */ \
- advansys_command, /* int (*command)(Scsi_Cmnd *) */ \
- advansys_queuecommand, \
- /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
- advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \
- advansys_reset, \
- /* version < v1.3.89 int (*reset)(Scsi_Cmnd *) */ \
- /* version >= v1.3.89 int (*reset)(Scsi_Cmnd *, unsigned int) */ \
- NULL, /* int (*slave_attach)(int, int) */ \
- advansys_biosparam, /* int (* bios_param)(Disk *, kdev_t, int []) */ \
- /* \
- * The following fields are set per adapter in advansys_detect(). \
- */ \
- 0, /* int can_queue */ \
- 0, /* int this_id */ \
- 0, /* short unsigned int sg_tablesize */ \
- 0, /* short cmd_per_lun */ \
- 0, /* unsigned char present */ \
- /* \
- * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
- * must be set. The flag will be cleared in advansys_detect for non-ISA \
- * adapters. Refer to the comment in scsi_module.c for more information. \
- */ \
- 1, /* unsigned unchecked_isa_dma:1 */ \
- /* \
- * All adapters controlled by this driver are capable of large \
- * scatter-gather lists. According to the mid-level SCSI documentation \
- * this obviates any performance gain provided by setting \
- * 'use_clustering'. But empirically while CPU utilization is increased \
- * by enabling clustering, I/O throughput increases as well. \
- */ \
- ENABLE_CLUSTERING, /* unsigned use_clustering:1 */ \
-}
-#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-#define ADVANSYS { \
- proc_dir: &proc_scsi_advansys, \
- proc_info: advansys_proc_info, \
- name: "advansys", \
- detect: advansys_detect, \
- release: advansys_release, \
- info: advansys_info, \
- command: advansys_command, \
- queuecommand: advansys_queuecommand, \
- abort: advansys_abort, \
- reset: advansys_reset, \
- bios_param: advansys_biosparam, \
+ proc_name: "advansys", \
+ proc_info: advansys_proc_info, \
+ name: "advansys", \
+ detect: advansys_detect, \
+ release: advansys_release, \
+ info: advansys_info, \
+ queuecommand: advansys_queuecommand, \
+ use_new_eh_code: 1, \
+ eh_bus_reset_handler: advansys_reset, \
+ bios_param: advansys_biosparam, \


X /* \
X * Because the driver may control an ISA adapter 'unchecked_isa_dma' \

X * must be set. The flag will be cleared in advansys_detect for non-ISA \
X * adapters. Refer to the comment in scsi_module.c for more information. \
X */ \
- unchecked_isa_dma: 1, \
+ unchecked_isa_dma: 1, \
X /* \
X * All adapters controlled by this driver are capable of large \
X * scatter-gather lists. According to the mid-level SCSI documentation \
@@ -180,11 +92,10 @@
X * 'use_clustering'. But empirically while CPU utilization is increased \
X * by enabling clustering, I/O throughput increases as well. \
X */ \
- use_clustering: ENABLE_CLUSTERING, \
+ use_clustering: ENABLE_CLUSTERING, \
X }
-#else /* version >= v2.3.28 */
+#elif ASC_LINUX_KERNEL22
X #define ADVANSYS { \
- proc_name: "advansys", \
X proc_info: advansys_proc_info, \
X name: "advansys", \
X detect: advansys_detect, \
@@ -192,7 +103,7 @@
X info: advansys_info, \
X queuecommand: advansys_queuecommand, \
X use_new_eh_code: 1, \
- eh_bus_reset_handler: advansys_eh_bus_reset, \


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 53'
echo 'File patch-2.2.20 is continued in part 54'
echo "54" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:49 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part50

#!/bin/sh -x
# this is part 50 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 50; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20'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x72, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x03,
+ 0x15, 0x06, 0x01, 0x08, 0x26, 0xa6, 0x15, 0x1a, 0x01, 0x08, 0x26, 0xa6, 0x15, 0x06, 0x01, 0x08,
+ 0x26, 0xa6, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x26, 0xa6, 0x72, 0xfe, 0x89, 0x4a, 0x01, 0x08, 0x03,
+ 0x60, 0x03, 0x1e, 0xcc, 0x07, 0x06, 0xfe, 0x44, 0x13, 0xad, 0x12, 0xcc, 0xfe, 0x49, 0xf4, 0x00,
+ 0x3b, 0x72, 0x9f, 0x5e, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, 0xf1, 0x01, 0x08, 0x2f, 0x07, 0xfe,
+ 0xe3, 0x00, 0xfe, 0x20, 0x13, 0x1f, 0xfe, 0x5a, 0x15, 0x23, 0x12, 0xcd, 0x01, 0x43, 0x1e, 0xcd,
+ 0x07, 0x06, 0x45, 0x09, 0x4a, 0x06, 0x35, 0x03, 0x0a, 0x42, 0x01, 0x0e, 0xed, 0x88, 0x07, 0x10,
+ 0xa4, 0x0a, 0x80, 0x01, 0x0e, 0x88, 0x0a, 0x51, 0x01, 0x9e, 0x03, 0x0a, 0x80, 0x01, 0x0e, 0x88,
+ 0xfe, 0x80, 0xe7, 0x10, 0x07, 0x10, 0x84, 0xfe, 0x45, 0x58, 0x01, 0xe3, 0x88, 0x03, 0x0a, 0x42,
+ 0x01, 0x0e, 0x88, 0x0a, 0x51, 0x01, 0x9e, 0x03, 0x0a, 0x42, 0x01, 0x0e, 0xfe, 0x80, 0x80, 0xf2,
+ 0xfe, 0x49, 0xe4, 0x10, 0xa4, 0x0a, 0x80, 0x01, 0x0e, 0xf2, 0x0a, 0x51, 0x01, 0x82, 0x03, 0x17,
+ 0x10, 0x71, 0x66, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x24, 0x1c, 0xfe,
+ 0x1d, 0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0x5d, 0x24, 0x93, 0xfe, 0x0e, 0x10, 0x07, 0x06, 0x5d, 0x24, 0x4d, 0x9f, 0xad, 0x03, 0x14,
+ 0xfe, 0x09, 0x00, 0x01, 0x33, 0xfe, 0x04, 0xfe, 0x7d, 0x05, 0x7f, 0xf9, 0x03, 0x25, 0xfe, 0xca,
+ 0x18, 0xfe, 0x14, 0xf0, 0x08, 0x65, 0xfe, 0xc6, 0x18, 0x03, 0xff, 0x1a, 0x00, 0x00,
X };
X
X STATIC unsigned short _adv_asc3550_size =
- sizeof(_adv_asc3550_buf); /* 0x137B */
+ sizeof(_adv_asc3550_buf); /* 0x13AD */
X STATIC ADV_DCNT _adv_asc3550_chksum =
- 0x04CDA9B9UL; /* Expanded little-endian checksum. */
+ 0x04D52DDDUL; /* Expanded little-endian checksum. */


X
+/* Microcode buffer is kept after initialization for error recovery. */

X STATIC unsigned char _adv_asc38C0800_buf[] = {
- 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0x16, 0x01, 0x00, 0x48, 0xe4, 0x03, 0xf6,
- 0x18, 0xe4, 0x02, 0x00, 0x18, 0x80, 0xa8, 0x19, 0x00, 0xfa, 0xff, 0xff, 0x00, 0x0f, 0x00, 0xf6,
- 0x9e, 0xe7, 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x01, 0xe6, 0x09, 0xe7, 0x01, 0xf6, 0x01, 0xfa,
- 0x03, 0x00, 0x55, 0xf0, 0x04, 0x00, 0x1e, 0xf0, 0x85, 0xf0, 0x18, 0xf4, 0x08, 0x00, 0xbc, 0x00,
- 0x38, 0x54, 0x00, 0xec, 0xd5, 0xf0, 0x70, 0x0d, 0x00, 0xe6, 0x86, 0xf0, 0xb1, 0xf0, 0x98, 0x57,
- 0x01, 0xfc, 0xb4, 0x00, 0xd4, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x10, 0x00, 0x3c, 0x00, 0xbb, 0x00,
- 0x00, 0x10, 0x94, 0x19, 0x02, 0x80, 0x32, 0xf0, 0x6a, 0x0d, 0x02, 0x13, 0x98, 0x13, 0x18, 0x40,
- 0x00, 0x57, 0x01, 0xea, 0x02, 0xfc, 0x03, 0xfc, 0x3e, 0x00, 0xc0, 0x00, 0x6c, 0x01, 0x6e, 0x01,
- 0x74, 0x01, 0x76, 0x01, 0xb9, 0x54, 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, 0x01, 0x01, 0x3e, 0x01,
- 0x7a, 0x01, 0xba, 0x08, 0xac, 0x10, 0xf4, 0x10, 0x04, 0x12, 0x06, 0x13, 0xbb, 0x55, 0x3c, 0x56,
- 0x3e, 0x57, 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x5d, 0xf0, 0x02, 0xfa, 0x20, 0x00,
- 0x32, 0x00, 0x40, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01,
- 0x72, 0x01, 0x78, 0x01, 0x7c, 0x01, 0x62, 0x0a, 0x74, 0x0d, 0x08, 0x12, 0x4c, 0x1c, 0x02, 0x4a,
- 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x0c, 0x00, 0x0f, 0x00, 0x47, 0x00, 0xbe, 0x00,
- 0x00, 0x01, 0xfe, 0x10, 0x3a, 0x16, 0x32, 0x1c, 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, 0x00, 0x4c,
- 0x04, 0x80, 0x04, 0xea, 0x5c, 0xf0, 0xa7, 0xf0, 0x04, 0xf6, 0x03, 0xfa, 0x05, 0x00, 0x34, 0x00,
- 0x36, 0x00, 0x98, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x3a, 0x0b, 0x32, 0x0c, 0xf6, 0x0e,
- 0x04, 0x10, 0x0c, 0x10, 0x00, 0x11, 0x0a, 0x12, 0x04, 0x13, 0x30, 0x1c, 0x02, 0x48, 0x00, 0x4e,
- 0x42, 0x54, 0x44, 0x55, 0xbd, 0x56, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, 0xb8, 0xf0,
+ 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0x16, 0x18, 0xe4, 0x01, 0x00, 0x48, 0xe4,
+ 0x18, 0x80, 0x03, 0xf6, 0x02, 0x00, 0xce, 0x19, 0x00, 0xfa, 0xff, 0xff, 0x1c, 0x0f, 0x00, 0xf6,
+ 0x9e, 0xe7, 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x01, 0xfa, 0x01, 0xe6, 0x09, 0xe7, 0x55, 0xf0,
+ 0x01, 0xf6, 0x03, 0x00, 0x04, 0x00, 0x10, 0x00, 0x1e, 0xf0, 0x85, 0xf0, 0x18, 0xf4, 0x08, 0x00,
+ 0xbc, 0x00, 0x38, 0x54, 0x00, 0xec, 0xd5, 0xf0, 0x82, 0x0d, 0x00, 0xe6, 0x86, 0xf0, 0xb1, 0xf0,
+ 0x98, 0x57, 0x01, 0xfc, 0xb4, 0x00, 0xd4, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x3c, 0x00, 0xbb, 0x00,
+ 0x00, 0x10, 0xba, 0x19, 0x02, 0x80, 0x32, 0xf0, 0x7c, 0x0d, 0x02, 0x13, 0xba, 0x13, 0x18, 0x40,
+ 0x00, 0x57, 0x01, 0xea, 0x02, 0xfc, 0x03, 0xfc, 0x3e, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x74, 0x01,
+ 0x76, 0x01, 0xb9, 0x54, 0x3e, 0x57, 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, 0xc0, 0x00, 0x01, 0x01,
+ 0x3e, 0x01, 0x7a, 0x01, 0xca, 0x08, 0xce, 0x10, 0x16, 0x11, 0x04, 0x12, 0x08, 0x12, 0x02, 0x4a,
+ 0xbb, 0x55, 0x3c, 0x56, 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x5d, 0xf0, 0x02, 0xfa,
+ 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01,
+ 0x70, 0x01, 0x72, 0x01, 0x78, 0x01, 0x7c, 0x01, 0x62, 0x0a, 0x86, 0x0d, 0x06, 0x13, 0x4c, 0x1c,
+ 0x04, 0x80, 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x0c, 0x00, 0x0f, 0x00, 0x47, 0x00,
+ 0xbe, 0x00, 0x00, 0x01, 0x20, 0x11, 0x5c, 0x16, 0x32, 0x1c, 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44,
+ 0x00, 0x4c, 0x04, 0xea, 0x5c, 0xf0, 0xa7, 0xf0, 0x04, 0xf6, 0x03, 0xfa, 0x05, 0x00, 0x34, 0x00,
+ 0x36, 0x00, 0x98, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x4a, 0x0b, 0x42, 0x0c, 0x12, 0x0f,
+ 0x0c, 0x10, 0x22, 0x11, 0x0a, 0x12, 0x04, 0x13, 0x30, 0x1c, 0x02, 0x48, 0x00, 0x4e, 0x42, 0x54,
+ 0x44, 0x55, 0xbd, 0x56, 0x06, 0x83, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, 0xb8, 0xf0,
X 0x4b, 0xf4, 0x06, 0xf7, 0x0e, 0xf7, 0x04, 0xfc, 0x05, 0xfc, 0x06, 0x00, 0x19, 0x00, 0x33, 0x00,
X 0x9b, 0x00, 0xa4, 0x00, 0xb5, 0x00, 0xba, 0x00, 0xd0, 0x00, 0xe1, 0x00, 0xe7, 0x00, 0xe2, 0x03,
- 0xec, 0x0e, 0x02, 0x10, 0x0a, 0x10, 0x0a, 0x13, 0x12, 0x13, 0x02, 0x14, 0x12, 0x14, 0xe2, 0x15,
- 0xe6, 0x15, 0x82, 0x17, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44,
- 0x0a, 0x45, 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, 0x3a, 0x55, 0x83, 0x55, 0xe5, 0x55, 0xb0, 0x57,
- 0x01, 0x58, 0x83, 0x59, 0x06, 0x83, 0x19, 0xe4, 0x05, 0xe6, 0x0b, 0xf0, 0x0c, 0xf0, 0x04, 0xf8,
+ 0x08, 0x0f, 0x02, 0x10, 0x04, 0x10, 0x0a, 0x10, 0x0a, 0x13, 0x0c, 0x13, 0x12, 0x13, 0x24, 0x14,
+ 0x34, 0x14, 0x04, 0x16, 0x08, 0x16, 0xa4, 0x17, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44,
+ 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, 0x3a, 0x55, 0x83, 0x55,
+ 0xe5, 0x55, 0xb0, 0x57, 0x01, 0x58, 0x83, 0x59, 0x05, 0xe6, 0x0b, 0xf0, 0x0c, 0xf0, 0x04, 0xf8,
X 0x05, 0xf8, 0x07, 0x00, 0x0a, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x9e, 0x00, 0xa8, 0x00, 0xaa, 0x00,
X 0xb9, 0x00, 0xe0, 0x00, 0x22, 0x01, 0x26, 0x01, 0x79, 0x01, 0x7e, 0x01, 0xc4, 0x01, 0xc6, 0x01,
- 0x80, 0x02, 0x66, 0x03, 0xde, 0x04, 0x8a, 0x06, 0xe8, 0x07, 0x68, 0x08, 0x69, 0x08, 0xc6, 0x08,
- 0xe9, 0x09, 0xea, 0x0b, 0x12, 0x0f, 0x0e, 0x10, 0x1a, 0x10, 0x26, 0x10, 0xed, 0x10, 0xf1, 0x10,
- 0x08, 0x11, 0x06, 0x12, 0x0c, 0x12, 0x10, 0x12, 0x1c, 0x12, 0x0c, 0x13, 0x10, 0x13, 0x16, 0x13,
- 0x1e, 0x13, 0x24, 0x14, 0x54, 0x14, 0x14, 0x15, 0xa8, 0x15, 0x6b, 0x18, 0x98, 0x18, 0xa4, 0x18,
- 0x6c, 0x19, 0xc0, 0x19, 0x12, 0x1c, 0x46, 0x1c, 0x9c, 0x32, 0xfe, 0x9c, 0xf0, 0x2a, 0x02, 0xfe,
- 0x9a, 0x0d, 0xff, 0x10, 0x00, 0x00, 0xd7, 0xfe, 0xc2, 0x19, 0x00, 0xd6, 0xfe, 0x84, 0x01, 0xff,


- 0x03, 0x00, 0x00, 0xfe, 0x02, 0x15, 0xfe, 0x0c, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24,

- 0x00, 0xfe, 0x4c, 0x00, 0x5a, 0xff, 0x04, 0x00, 0x00, 0x11, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08,
+ 0x80, 0x02, 0x5e, 0x03, 0xee, 0x04, 0x9a, 0x06, 0xf8, 0x07, 0x62, 0x08, 0x68, 0x08, 0x69, 0x08,
+ 0xd6, 0x08, 0xe9, 0x09, 0xfa, 0x0b, 0x2e, 0x0f, 0x12, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10,
+ 0x2a, 0x11, 0x06, 0x12, 0x0c, 0x12, 0x3e, 0x12, 0x10, 0x13, 0x16, 0x13, 0x1e, 0x13, 0x46, 0x14,
+ 0x76, 0x14, 0x82, 0x14, 0x36, 0x15, 0xca, 0x15, 0x6b, 0x18, 0xbe, 0x18, 0xca, 0x18, 0xe6, 0x19,
+ 0x12, 0x1c, 0x46, 0x1c, 0x9c, 0x32, 0x00, 0x40, 0x0e, 0x47, 0xfe, 0x9c, 0xf0, 0x2b, 0x02, 0xfe,
+ 0xac, 0x0d, 0xff, 0x10, 0x00, 0x00, 0xd7, 0xfe, 0xe8, 0x19, 0x00, 0xd6, 0xfe, 0x84, 0x01, 0xff,


+ 0x03, 0x00, 0x00, 0xfe, 0x93, 0x15, 0xfe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, 0x30, 0x13,
- 0x0a, 0x08, 0x2d, 0xec, 0x14, 0x9d, 0x0a, 0x08, 0x05, 0x4c, 0x14, 0xfe, 0x0d, 0x00, 0x01, 0x36,
- 0x7b, 0xfe, 0x52, 0x0d, 0x02, 0x23, 0x2c, 0x12, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xfe, 0x40,
- 0x5c, 0x04, 0x14, 0x9d, 0x01, 0x36, 0x02, 0x2a, 0xfe, 0x42, 0x5b, 0x99, 0x18, 0xfe, 0x46, 0x59,
- 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x87, 0x80, 0xfe, 0x31, 0xe4, 0x5a, 0x0a, 0x08, 0x09,
- 0xfe, 0x84, 0x13, 0xfe, 0x20, 0x80, 0x06, 0x18, 0xfe, 0x7c, 0x12, 0x52, 0x08, 0x05, 0xfe, 0x6c,
- 0x13, 0x03, 0xfe, 0xa2, 0x00, 0x27, 0x19, 0xfe, 0x80, 0x05, 0xfe, 0x31, 0xe4, 0x59, 0x52, 0x08,
- 0x09, 0xfe, 0x56, 0x13, 0x03, 0xfe, 0xa0, 0x00, 0x27, 0xfe, 0x4e, 0x12, 0x66, 0xff, 0x02, 0x00,
- 0x10, 0x26, 0xfe, 0x38, 0x05, 0x1b, 0x34, 0xfe, 0x89, 0x48, 0xff, 0x02, 0x00, 0x10, 0x26, 0xfe,
- 0x46, 0x05, 0x25, 0xfe, 0x98, 0x05, 0x12, 0xfe, 0xe3, 0x00, 0x20, 0x52, 0xfe, 0x4a, 0xf0, 0xfe,
- 0x66, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x60, 0x05, 0x89, 0x24, 0xfe, 0x21, 0x00, 0xaa, 0x24, 0xfe,
- 0x22, 0x00, 0x88, 0x24, 0x57, 0xfe, 0x09, 0x48, 0xff, 0x02, 0x00, 0x10, 0x26, 0xfe, 0x76, 0x05,
- 0x25, 0xfe, 0x98, 0x05, 0xfe, 0xe2, 0x08, 0x52, 0x08, 0xcb, 0x4c, 0x01, 0xae, 0x24, 0x05, 0x13,
- 0xd3, 0x39, 0xfe, 0x27, 0x01, 0x0a, 0x08, 0x2d, 0xfe, 0x22, 0x12, 0x42, 0x01, 0xb0, 0x14, 0x9d,
- 0x0a, 0x08, 0x05, 0x4c, 0x14, 0xfe, 0x0d, 0x00, 0x01, 0x36, 0x7b, 0xfe, 0x52, 0x0d, 0x02, 0x23,
- 0x03, 0xfe, 0x9c, 0x00, 0x27, 0xfe, 0x3e, 0x12, 0x03, 0x5b, 0x27, 0xfe, 0x36, 0x13, 0x42, 0x01,
- 0xb0, 0x25, 0xfe, 0x08, 0x06, 0x07, 0x05, 0x52, 0x08, 0x1e, 0xfe, 0x02, 0x12, 0x4e, 0x01, 0xfe,
- 0x7c, 0x15, 0x1c, 0xfe, 0xfe, 0x05, 0x12, 0xa5, 0x01, 0x4a, 0x12, 0xfe, 0xe5, 0x00, 0x03, 0x5b,
- 0xbf, 0x0c, 0x5b, 0x03, 0xcd, 0x27, 0xfe, 0x62, 0x12, 0x03, 0x45, 0x27, 0xfe, 0x5a, 0x13, 0x01,
- 0xfe, 0xe6, 0x18, 0x01, 0xfe, 0x50, 0x19, 0xfe, 0x43, 0x48, 0xc4, 0xcc, 0x0f, 0x70, 0xff, 0x02,
- 0x00, 0x57, 0x51, 0x93, 0x1d, 0x43, 0x8c, 0xc4, 0x6d, 0x42, 0x01, 0xb0, 0x25, 0xfe, 0x72, 0x06,
- 0x52, 0x08, 0x1a, 0xe9, 0x92, 0x07, 0x58, 0x01, 0xfe, 0xaa, 0x15, 0x1c, 0xfe, 0x68, 0x06, 0x12,
- 0xa5, 0x01, 0x4a, 0x12, 0xfe, 0xe5, 0x00, 0x03, 0x45, 0xbf, 0x0c, 0x45, 0x16, 0x05, 0x01, 0xb0,
- 0xfc, 0x75, 0x73, 0x01, 0xad, 0x8d, 0x12, 0xfe, 0xe2, 0x00, 0x26, 0xdb, 0x1b, 0x34, 0xfe, 0x0a,
- 0xf0, 0xfe, 0xa6, 0x06, 0x94, 0xfe, 0x5c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, 0x64, 0x07, 0x95, 0x86,
- 0x02, 0x23, 0x0a, 0x08, 0x09, 0xfe, 0x2e, 0x12, 0x15, 0x18, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b,
- 0x15, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, 0xfe, 0x99, 0xa4, 0x01, 0x0b, 0x15, 0x00, 0x02,
- 0xfe, 0x32, 0x08, 0x78, 0x08, 0x1a, 0xfe, 0x38, 0x12, 0x0a, 0x08, 0x1a, 0xfe, 0x30, 0x13, 0x15,
- 0xfe, 0x1b, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01,
- 0x0b, 0x15, 0x05, 0x01, 0x0b, 0x15, 0x00, 0x02, 0xe1, 0x6b, 0x57, 0xbc, 0x4e, 0xfe, 0x9a, 0x81,
- 0x54, 0x2d, 0x7a, 0xfe, 0x32, 0x07, 0x07, 0x2d, 0xfe, 0x09, 0x6f, 0xb8, 0xfe, 0xca, 0x45, 0xfe,
- 0x32, 0x12, 0x68, 0x6c, 0x8c, 0x6b, 0x7f, 0x26, 0xfe, 0x44, 0x07, 0x1b, 0x34, 0xfe, 0x0a, 0xf0,
- 0xfe, 0x32, 0x07, 0x95, 0x86, 0x94, 0xfe, 0x5c, 0x07, 0x02, 0x23, 0x01, 0x4a, 0x02, 0xdb, 0x15,
- 0x1e, 0x02, 0xdb, 0xfe, 0x9c, 0xf7, 0xdc, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x55, 0xfe, 0xca,
- 0x07, 0x0c, 0x5f, 0x17, 0x60, 0x0a, 0x53, 0x59, 0x37, 0x21, 0x1f, 0x06, 0x11, 0xfe, 0x0e, 0x12,
- 0x8e, 0xfe, 0x80, 0x80, 0x39, 0x1f, 0x69, 0x29, 0xfe,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, 0x64, 0xfe, 0x98, 0x80, 0xc3, 0x09, 0xfe, 0x1a, 0x12, 0x4f, 0xfe, 0x19,
- 0x82, 0xfe, 0x6c, 0x18, 0xfe, 0x44, 0x54, 0xbc, 0xfe, 0x19, 0x81, 0xfe, 0x74, 0x18, 0x90, 0x91,
- 0x19, 0xfe, 0xbe, 0x08, 0x02, 0x49, 0x0a, 0x08, 0x59, 0xee, 0x03, 0x2e, 0x28, 0x3c, 0x0c, 0x40,
- 0x17, 0x41, 0x9b, 0x2e, 0x9c, 0x3c, 0xfe, 0x6c, 0x18, 0xfe, 0xed, 0x18, 0xfe, 0x44, 0x54, 0xfe,
- 0xe5, 0x54, 0x3a, 0x40, 0x3b, 0x41, 0x03, 0x48, 0x28, 0x62, 0x90, 0xfe, 0xe3, 0x54, 0xfe, 0x74,
- 0x18, 0xfe, 0xf5, 0x18, 0x90, 0xfe, 0xe3, 0x54, 0x91, 0xbe, 0x55, 0xfe, 0xbe, 0x08, 0x02, 0x49,
- 0xfe, 0x37, 0xf0, 0xfe, 0xca, 0x09, 0xfe, 0x8b, 0xf0, 0xfe, 0x50, 0x09, 0x02, 0x49, 0xfe, 0x98,
- 0x80, 0xc3, 0x09, 0x22, 0xfe, 0xea, 0x0a, 0x3a, 0x48, 0x3b, 0x62, 0x55, 0xfe, 0x2e, 0x0a, 0x0f,
- 0xfe, 0xc0, 0x07, 0x42, 0x98, 0x00, 0xed, 0xfe, 0x01, 0x59, 0xfe, 0x52, 0xf0, 0xfe, 0xfc, 0x09,
- 0x90, 0x7a, 0xfe, 0x14, 0x0a, 0x3a, 0x48, 0x90, 0xfe, 0xe3, 0x54, 0x56, 0x48, 0x7d, 0x62, 0xfe,
- 0x14, 0x58, 0xfe, 0x95, 0x58, 0x02, 0x49, 0x3a, 0x48, 0x3b, 0x62, 0xfe, 0x14, 0x59, 0xfe, 0x95,
- 0x59, 0xbc, 0x56, 0x48, 0x56, 0x62, 0x02, 0x49, 0x0a, 0x08, 0x59, 0xfe, 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, 0xfe, 0x04, 0x0c, 0xba, 0x19, 0x34, 0x2b, 0x76, 0xe6, 0xc5,
- 0x23, 0xc6, 0x23, 0x2b, 0xfc, 0x26, 0xfe, 0x10, 0x0c, 0x1b, 0x34, 0x94, 0xfe, 0x2c, 0x0c, 0x95,
- 0x86, 0xc5, 0xdc, 0xc6, 0xdc, 0x02, 0x23, 0x01, 0x4a, 0xfe, 0xdb, 0x10, 0x12, 0xfe, 0xe8, 0x00,
- 0xb3, 0xb4, 0x73, 0xc7, 0x81, 0xc8, 0x83, 0xfe, 0x89, 0xf0, 0x23, 0x33, 0x31, 0xe0, 0xc7, 0x81,
- 0xc8, 0x83, 0x26, 0xfe, 0x56, 0x0c, 0x1c, 0x23, 0x33, 0x31, 0xde, 0xba, 0x65, 0x10, 0xfe, 0x42,
- 0x00, 0x02, 0x64, 0x7c, 0x05, 0xfe, 0x81, 0x49, 0xfe, 0xa2, 0x12, 0x0a, 0x08, 0x09, 0xfe, 0x44,
- 0x13, 0x10, 0x00, 0x54, 0x09, 0xfe, 0x54, 0x12, 0x54, 0xfe, 0x28, 0x00, 0x22, 0xfe, 0x88, 0x0d,
- 0x07, 0x3d, 0x01, 0x0e, 0x06, 0x00, 0x4d, 0x44, 0xfe, 0x28, 0x00, 0xfe, 0xe2, 0x10, 0x01, 0xf6,
- 0x01, 0xf7, 0x07, 0xa4, 0x01, 0xfe, 0x0a, 0x0f, 0x63, 0x12, 0x2f, 0x01, 0x72, 0x02, 0x2a, 0x10,
- 0xfe, 0x44, 0x00, 0x54, 0x09, 0xe9, 0x44, 0x09, 0xfe, 0xb4, 0x10, 0x01, 0xae, 0x44, 0x09, 0xfe,
- 0xaa, 0x10, 0x01, 0xae, 0xfe, 0x19, 0x82, 0xfe, 0x34, 0x46, 0xab, 0x44, 0x09, 0x10, 0xfe, 0x43,
- 0x00, 0xfe, 0x96, 0x10, 0x0a, 0x53, 0x09, 0x37, 0x01, 0xf6, 0x01, 0xf7, 0x63, 0x12, 0x2f, 0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 0x13, 0x66, 0x2c, 0x01, 0x0b, 0xfe, 0xd5, 0x10, 0x0f, 0x70, 0xff, 0x02, 0x00, 0x57, 0x51,
- 0x93, 0x1d, 0xfe, 0xff, 0x7f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x04, 0x0f, 0x70, 0xff, 0x02,
- 0x00, 0x57, 0x51, 0x93, 0x1d, 0x43, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x04, 0x0f, 0x70, 0xff,
- 0x02, 0x00, 0x57, 0x51, 0x93, 0x04, 0x0f, 0x70, 0xff, 0x02, 0x00, 0x57, 0x51, 0x93, 0xfe, 0x0b,
- 0x58, 0x04, 0x07, 0x5b, 0x01, 0x87, 0x07, 0x45, 0x01, 0x87, 0x04, 0xfe, 0x03, 0xa1, 0x1d, 0x11,
- 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, 0xf4, 0x1e, 0x51, 0xfe, 0x00, 0x7d, 0xfe, 0x01, 0x7d, 0xfe,
- 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x69, 0x29, 0x0c, 0x5d, 0x17, 0x5e, 0x56, 0x40, 0x7d, 0x41, 0x04,
- 0xfe, 0x62, 0x08, 0xfe, 0x82, 0x4a, 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x8e, 0x04, 0x01, 0xfe,
- 0xe6, 0x18, 0xfe, 0x42, 0x48, 0x4e, 0x4f, 0x92, 0x01, 0x0b, 0x1c, 0xfe, 0x74, 0x15, 0x33, 0x31,
- 0xe0, 0x01, 0x0b, 0x1c, 0xfe, 0x74, 0x15, 0x33, 0x31, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, 0x59, 0x03,
- 0xcd, 0x27, 0xfe, 0xcc, 0x12, 0x52, 0x08, 0x1a, 0xfe, 0xc4, 0x13, 0x20, 0x68, 0x1a, 0xf0, 0x54,
- 0xca, 0x6a, 0xfe, 0xba, 0x14, 0x4c, 0x0f, 0x05, 0x16, 0xca, 0x7c, 0x30, 0xfe, 0x78, 0x10, 0xff,
- 0x02, 0x83, 0x55, 0xaa, 0xff, 0x02, 0x83, 0x55, 0x68, 0x18, 0xac, 0x98, 0xfe, 0x30, 0x00, 0x96,
- 0xf3, 0x16, 0x6c, 0x0f, 0x05, 0xfe, 0x56, 0x10, 0x68, 0x09, 0xef, 0x98, 0xfe, 0x64, 0x00, 0x96,
- 0xf3, 0x07, 0xfe, 0x64, 0x00, 0x16, 0x9e, 0x0f, 0x05, 0xfe, 0x28, 0x10, 0x68, 0x05, 0xfe, 0x60,
- 0x13, 0x98, 0xfe, 0xc8, 0x00, 0x96, 0xf3, 0x07, 0xfe, 0xc8, 0x00, 0x16, 0x58, 0x0f, 0x05, 0x89,
- 0x98, 0xfe, 0x90, 0x01, 0x7a, 0xfe, 0x20, 0x15, 0x92, 0xfe, 0x12, 0x10, 0xfe, 0x43, 0xf4, 0x9f,
- 0xfe, 0x56, 0xf0, 0xfe, 0x32, 0x15, 0xfe, 0x04, 0xf4, 0x70, 0xfe, 0x43, 0xf4, 0x9e, 0xfe, 0xf3,


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 50'
echo 'File patch-2.2.20 is continued in part 51'
echo "51" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:35 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part36

#!/bin/sh -x
# this is part 36 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 36; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&
X

X /* Select first port that is PortDown. */


-
X for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

X if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_DOWN &&


X pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
- *N = i;

- if (pAC->Rlmt.Port[A].PortState == SK_RLMT_PS_DOWN &&


- pAC->GIni.GP[A].PAutoNegFail != AutoNegDone) {
- *N = A;
- }

- if (pAC->Rlmt.Port[P].PortState == SK_RLMT_PS_DOWN &&


- pAC->GIni.GP[P].PAutoNegFail != AutoNegDone) {
- *N = P;
+ *pSelect = i;

+ if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_DOWN &&


+ pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) {
+ *pSelect = Active;
+ }

+ if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_DOWN &&


+ pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) {
+ *pSelect = PrefPort;
X }
X PortFound = SK_TRUE;
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_CHECK_SWITCH found Port %d down.\n",


- *N))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_CHECK_SWITCH found Port %d down.\n", *pSelect))


X break;
X }
X }
-
X return (PortFound);

X } /* SkRlmtSelectDown */
X
@@ -2082,58 +1779,50 @@


X * Nothing.
X */

X RLMT_STATIC void SkRlmtCheckSwitch(


-SK_AC *pAC, /* adapter context */

-SK_IOC IoC) /* I/O context */


+SK_AC *pAC, /* Adapter Context */

+SK_IOC IoC, /* I/O Context */

+SK_U32 NetIdx) /* Net index */
X {
X SK_EVPARA Para;
- SK_U32 A;
- SK_U32 P;
+ SK_U32 Active;
+ SK_U32 PrefPort;


X SK_U32 i;
X SK_BOOL PortFound;
X

- if (pAC->Rlmt.RlmtState == SK_RLMT_RS_INIT) {
- return;
- }
-
- A = pAC->Rlmt.MacActive; /* Index of active port. */
- P = pAC->Rlmt.PrefPort; /* Index of preferred port. */
+ Active = pAC->Rlmt.Net[NetIdx].ActivePort; /* Index of active port. */
+ PrefPort = pAC->Rlmt.Net[NetIdx].PrefPort; /* Index of preferred port. */
X PortFound = SK_FALSE;
+ pAC->Rlmt.CheckSwitch = SK_FALSE;
X
- if (pAC->Rlmt.LinksUp == 0) {
-
- /*
- * Last link went down - shut down the net.
- */
-
- pAC->Rlmt.RlmtState = SK_RLMT_RS_NET_DOWN;
+ if (pAC->Rlmt.Net[NetIdx].LinksUp == 0) {
+ /* Last link went down - shut down the net. */
+ pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_DOWN;
X Para.Para32[0] = SK_RLMT_NET_DOWN_TEMP;


- SkEventQueue(
- pAC,
- SKGE_DRV,

- SK_DRV_NET_DOWN,
- Para);
+ Para.Para32[1] = NetIdx;
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para);
X
+ Para.Para32[0] = pAC->Rlmt.Net[NetIdx].
+ Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber;
+ Para.Para32[1] = NetIdx;
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para);
X return;
- }
- else if (pAC->Rlmt.LinksUp == 1 &&
- pAC->Rlmt.RlmtState == SK_RLMT_RS_NET_DOWN) {
-
+ } /* pAC->Rlmt.LinksUp == 0 */
+ else if (pAC->Rlmt.Net[NetIdx].LinksUp == 1 &&
+ pAC->Rlmt.Net[NetIdx].RlmtState == SK_RLMT_RS_NET_DOWN) {
X /* First link came up - get the net up. */
-
- pAC->Rlmt.RlmtState = SK_RLMT_RS_NET_UP;
+ pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_UP;
X
X /*
- * If pAC->Rlmt.MacActive != Para.Para32[0],
+ * If pAC->Rlmt.ActivePort != Para.Para32[0],
X * the DRV switches to the port that came up.
X */
-
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
- if (!pAC->Rlmt.Port[i].LinkDown) {
- if (!pAC->Rlmt.Port[A].LinkDown) {
- i = A;


+ for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) {

+ if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) {

+ if (!pAC->Rlmt.Net[NetIdx].Port[Active]->LinkDown) {
+ i = Active;
X }
- if (!pAC->Rlmt.Port[P].LinkDown) {
- i = P;
+ if (!pAC->Rlmt.Net[NetIdx].Port[PrefPort]->LinkDown) {
+ i = PrefPort;


X }
X PortFound = SK_TRUE;

X break;
@@ -2141,184 +1830,143 @@


X }
X
X if (PortFound) {

- Para.Para32[0] = pAC->Rlmt.MacActive;
- Para.Para32[1] = i;
- SkEventQueue(
- pAC,
- SKGE_PNMI,
- SK_PNMI_EVT_RLMT_PORT_SWITCH,
- Para);
-
- pAC->Rlmt.MacActive = i;
- Para.Para32[0] = i;
+ Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber;
+ Para.Para32[1] = NetIdx;
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para);
+
+ pAC->Rlmt.Net[NetIdx].ActivePort = i;
+ Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber;
+ Para.Para32[1] = NetIdx;
X SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_UP, Para);


X
- if ((Para.pParaPtr = SkRlmtBuildPacket(
- pAC,
- IoC,

- i,
- SK_PACKET_ANNOUNCE,
- &pAC->Addr.CurrentMacAddress,
- &SkRlmtMcAddr)


- ) != NULL) {
-

+ if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
+ (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC,
+ pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber,
+ SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx].
+ CurrentMacAddress, &SkRlmtMcAddr)) != NULL) {
X /*
- * Send packet to RLMT multicast address
- * to force switches to learn the new
- * location of the address.
+ * Send announce packet to RLMT multicast address to force
+ * switches to learn the new location of the logical MAC address.
X */
-


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,
- Para);
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
X }
X }
X else {

- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,

- SKERR_RLMT_E007,
- SKERR_RLMT_E007_MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E007, SKERR_RLMT_E007_MSG);
X }
X
X return;
- }
- else {
- Para.Para32[0] = A;
+ } /* LinksUp == 1 && RlmtState == SK_RLMT_RS_NET_DOWN */
+ else { /* Cannot be reached in dual-net mode. */
+ Para.Para32[0] = Active;
X
X /*
X * Preselection:
- * If RLMT Mode != CheckLinkState
- * select port that received a broadcast frame
- * substantially later than all other ports
- * else select first port that is not SuspectRx
- * else select first port that is PortUp
- * else select port that is PortGoingUp for the longest time
- * else select first port that is PortDown
- * else stop.
+ * If RLMT Mode != CheckLinkState
+ * select port that received a broadcast frame substantially later
+ * than all other ports
+ * else select first port that is not SuspectRx
+ * else select first port that is PortUp
+ * else select port that is PortGoingUp for the longest time
+ * else select first port that is PortDown
+ * else stop.
X *
X * For the preselected port:
- * If ActivePort is equal in quality, select ActivePort.
+ * If ActivePort is equal in quality, select ActivePort.
X *
- * If PrefPort is equal in quality, select PrefPort.
+ * If PrefPort is equal in quality, select PrefPort.
X *
- * If MacActive != SelectedPort,
- * If old ActivePort is LinkDown,
- * SwitchHard
- * else
- * SwitchSoft
+ * If ActivePort != SelectedPort,
+ * If old ActivePort is LinkDown,
+ * SwitchHard
+ * else
+ * SwitchSoft
X */
-
- if (pAC->Rlmt.RlmtMode != SK_RLMT_CHECK_LINK) {
+ if (pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) {
X if (!PortFound) {
- PortFound = SkRlmtSelectBcRx(pAC, IoC,
- A, P, &Para.Para32[1]);
+ PortFound = SkRlmtSelectBcRx(
+ pAC, IoC, Active, PrefPort, &Para.Para32[1]);
X }
X
X if (!PortFound) {
- PortFound = SkRlmtSelectNotSuspect(pAC, IoC,
- A, P, &Para.Para32[1]);
+ PortFound = SkRlmtSelectNotSuspect(
+ pAC, IoC, Active, PrefPort, &Para.Para32[1]);
X }
- }
+ } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */
X
X if (!PortFound) {
- PortFound = SkRlmtSelectUp(pAC, IoC,
- A, P, &Para.Para32[1], AUTONEG_SUCCESS);
+ PortFound = SkRlmtSelectUp(
+ pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS);
X }
X
X if (!PortFound) {
- PortFound = SkRlmtSelectUp(pAC, IoC,
- A, P, &Para.Para32[1], AUTONEG_FAILED);
+ PortFound = SkRlmtSelectUp(
+ pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED);
X }
X
X if (!PortFound) {
- PortFound = SkRlmtSelectGoingUp(pAC, IoC,
- A, P, &Para.Para32[1], AUTONEG_SUCCESS);
+ PortFound = SkRlmtSelectGoingUp(
+ pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS);
X }
X
X if (!PortFound) {
- PortFound = SkRlmtSelectGoingUp(pAC, IoC,
- A, P,&Para.Para32[1], AUTONEG_FAILED);
+ PortFound = SkRlmtSelectGoingUp(
+ pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED);
X }
X
- if (pAC->Rlmt.RlmtMode != SK_RLMT_CHECK_LINK) {
+ if (pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) {
X if (!PortFound) {
X PortFound = SkRlmtSelectDown(pAC, IoC,
- A, P,&Para.Para32[1], AUTONEG_SUCCESS);
+ Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS);
X }
X
X if (!PortFound) {
X PortFound = SkRlmtSelectDown(pAC, IoC,
- A, P,&Para.Para32[1], AUTONEG_FAILED);
+ Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED);
X }
- }
+ } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */
X
X if (PortFound) {
- if (Para.Para32[1] != A) {
- pAC->Rlmt.MacActive = Para.Para32[1];
- SK_HWAC_LINK_LED(
- pAC,
- IoC,
- Para.Para32[1],
- SK_LED_ACTIVE);
- if (pAC->Rlmt.Port[A].LinkDown) {


- SkEventQueue(
- pAC,
- SKGE_DRV,

- SK_DRV_SWITCH_HARD,
- Para);
+ if (Para.Para32[1] != Active) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Active: %d, Para1: %d.\n", Active, Para.Para32[1]))
+ pAC->Rlmt.Net[NetIdx].ActivePort = Para.Para32[1];
+ Para.Para32[0] = pAC->Rlmt.Net[NetIdx].
+ Port[Para.Para32[0]]->PortNumber;
+ Para.Para32[1] = pAC->Rlmt.Net[NetIdx].
+ Port[Para.Para32[1]]->PortNumber;
+ SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[1], SK_LED_ACTIVE);
+ if (pAC->Rlmt.Port[Active].LinkDown) {
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_HARD, Para);
X }
X else {
- SK_HWAC_LINK_LED(
- pAC,
- IoC,
- Para.Para32[0],
- SK_LED_STANDBY);


- SkEventQueue(
- pAC,
- SKGE_DRV,

- SK_DRV_SWITCH_SOFT,
- Para);
+ SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY);
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_SOFT, Para);


X }
- SkEventQueue(
- pAC,

- SKGE_PNMI,
- SK_PNMI_EVT_RLMT_PORT_SWITCH,
- Para);


- if ((Para.pParaPtr = SkRlmtBuildPacket(
- pAC,
- IoC,

- Para.Para32[1],
- SK_PACKET_ANNOUNCE,
- &pAC->Addr.CurrentMacAddress,
- &SkRlmtMcAddr)


- ) != NULL) {
-

+ Para.Para32[1] = NetIdx;
+ Para.Para32[0] =
+ pAC->Rlmt.Net[NetIdx].Port[Para.Para32[0]]->PortNumber;
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para);
+ Para.Para32[0] = pAC->Rlmt.Net[NetIdx].
+ Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber;
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para);
+ if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
+ (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, Para.Para32[0],
+ SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx].CurrentMacAddress,
+ &SkRlmtMcAddr)) != NULL) {
X /*
- * Send "new" packet to RLMT multicast
- * address to force switches to learn
- * the new location of the MAC address.
+ * Send announce packet to RLMT multicast address to force
+ * switches to learn the new location of the logical
+ * MAC address.
X */
-


- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,
- Para);
- }

- }
- }


+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);

+ } /* (Para.pParaPtr = SkRlmtBuildPacket(...)) != NULL */
+ } /* Para.Para32[1] != Active */
+ } /* PortFound */
X else {


- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,

- SKERR_RLMT_E004,
- SKERR_RLMT_E004_MSG);
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E004, SKERR_RLMT_E004_MSG);
X }
- }
-
+ } /* LinksUp > 1 || LinksUp == 1 && RlmtState != SK_RLMT_RS_NET_DOWN */
X return;
X } /* SkRlmtCheckSwitch */
X
@@ -2338,66 +1986,65 @@


X * Nothing.
X */

X RLMT_STATIC void SkRlmtCheckSeg(


-SK_AC *pAC, /* adapter context */

-SK_IOC IoC) /* I/O context */


+SK_AC *pAC, /* Adapter Context */

+SK_IOC IoC, /* I/O Context */

+SK_U32 NetIdx) /* Net number */
X {
- SK_BOOL Equal;
- SK_U32 i, j;
+ SK_EVPARA Para;
+ SK_RLMT_NET *pNet;
+ SK_U32 i, j;
+ SK_BOOL Equal;
X

- pAC->Rlmt.RootIdSet = SK_FALSE;

+ pNet = &pAC->Rlmt.Net[NetIdx];
+ pNet->RootIdSet = SK_FALSE;
X Equal = SK_TRUE;
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
- if (pAC->Rlmt.Port[i].LinkDown ||
- !pAC->Rlmt.Port[i].RootIdSet) {
+
+ for (i = 0; i < pNet->NumPorts; i++) {
+ if (pNet->Port[i]->LinkDown || !pNet->Port[i]->RootIdSet) {
X continue;


X }
X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n",
- i,
- pAC->Rlmt.Port[i].Root.Id[0],
- pAC->Rlmt.Port[i].Root.Id[1],
- pAC->Rlmt.Port[i].Root.Id[2],
- pAC->Rlmt.Port[i].Root.Id[3],
- pAC->Rlmt.Port[i].Root.Id[4],
- pAC->Rlmt.Port[i].Root.Id[5],
- pAC->Rlmt.Port[i].Root.Id[6],
- pAC->Rlmt.Port[i].Root.Id[7]))
-
- if (!pAC->Rlmt.RootIdSet) {
- pAC->Rlmt.Root = pAC->Rlmt.Port[i].Root;
- pAC->Rlmt.RootIdSet = SK_TRUE;
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP,
+ ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n", i,
+ pNet->Port[i]->Root.Id[0], pNet->Port[i]->Root.Id[1],
+ pNet->Port[i]->Root.Id[2], pNet->Port[i]->Root.Id[3],
+ pNet->Port[i]->Root.Id[4], pNet->Port[i]->Root.Id[5],
+ pNet->Port[i]->Root.Id[6], pNet->Port[i]->Root.Id[7]))
+
+ if (!pNet->RootIdSet) {
+ pNet->Root = pNet->Port[i]->Root;
+ pNet->RootIdSet = SK_TRUE;
X continue;
X }
X
X for (j = 0; j < 8; j ++) {
- Equal &= pAC->Rlmt.Port[i].Root.Id[j] ==
- pAC->Rlmt.Root.Id[j];
+ Equal &= pNet->Port[i]->Root.Id[j] == pNet->Root.Id[j];
X if (!Equal) {


X break;
X }
X }
X

X if (!Equal) {


- SK_ERR_LOG(
- pAC,
- SK_ERRCL_COMM,

- SKERR_RLMT_E005,
- SKERR_RLMT_E005_MSG);
-#ifdef SK_PNMI_EVT_SEGMENTATION
- SkEventQueue(
- pAC,
- SKGE_PNMI,
- SK_PNMI_EVT_SEGMENTATION,
- Para);
-#endif /* SK_PNMI_EVT_SEGMENTATION */
- pAC->Rlmt.CheckingState &= ~SK_RLMT_RCS_REPORT_SEG;
+ SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E005, SKERR_RLMT_E005_MSG);
+ Para.Para32[0] = NetIdx;


+ Para.Para32[1] = (SK_U32)-1;

+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SEGMENTATION, Para);
+
+ pNet->CheckingState &= ~SK_RLMT_RCS_REPORT_SEG;
+
+ /* 2000-03-06 RA: New. */
+ Para.Para32[0] = NetIdx;


+ Para.Para32[1] = (SK_U32)-1;

+ SkTimerStart(pAC, IoC, &pNet->SegTimer, SK_RLMT_SEG_TO_VAL,
+ SKGE_RLMT, SK_RLMT_SEG_TIM, Para);
X break;
X }
- }
+ } /* for (i = 0; i < pNet->NumPorts; i++) */
+
+ /* 2000-03-06 RA: Moved here. */
+ /* Segmentation check not running anymore. */
+ pNet->CheckingState &= ~SK_RLMT_RCS_SEG;
+
X } /* SkRlmtCheckSeg */
X
X
@@ -2417,1005 +2064,1340 @@


X * Nothing
X */

X RLMT_STATIC void SkRlmtPortStart(


-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */

-SK_U32 PortIdx) /* event code */


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 PortNumber) /* Port number */
X {
X SK_EVPARA Para;
X
- pAC->Rlmt.Port[PortIdx].PortState = SK_RLMT_PS_LINK_DOWN;
- pAC->Rlmt.Port[PortIdx].PortStarted = SK_TRUE;
- pAC->Rlmt.Port[PortIdx].LinkDown = SK_TRUE;
- pAC->Rlmt.Port[PortIdx].PortDown = SK_TRUE;
- pAC->Rlmt.Port[PortIdx].CheckingState = 0;
- pAC->Rlmt.Port[PortIdx].RootIdSet = SK_FALSE;


- Para.Para32[0] = PortIdx;

+ pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_LINK_DOWN;
+ pAC->Rlmt.Port[PortNumber].PortStarted = SK_TRUE;
+ pAC->Rlmt.Port[PortNumber].LinkDown = SK_TRUE;
+ pAC->Rlmt.Port[PortNumber].PortDown = SK_TRUE;
+ pAC->Rlmt.Port[PortNumber].CheckingState = 0;
+ pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE;


+ Para.Para32[0] = PortNumber;
+ Para.Para32[1] = (SK_U32)-1;

X SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para);
X } /* SkRlmtPortStart */
X

X
X /******************************************************************************
X *

- * SkRlmtEvent - a PORT- or an RLMT-specific event happened
+ * SkRlmtEvtPortStartTim - PORT_START_TIM


X *
X * Description:

- * This routine handles PORT- and RLMT-specific events.
+ * This routine handles PORT_START_TIM events.


X *
X * Context:
X * runtime, pageable?

X * may be called after SK_INIT_IO


X *
X * Returns:

- * 0
+ * Nothing
X */
-int SkRlmtEvent(


-SK_AC *pAC, /* adapter context */
-SK_IOC IoC, /* I/O context */

-SK_U32 Event, /* event code */
-SK_EVPARA Para) /* event-specific parameter */
+RLMT_STATIC void SkRlmtEvtPortStartTim(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
X {
- SK_U32 i, j;
- SK_RLMT_PORT *pRPort;
- SK_EVPARA Para2;
- SK_MBUF *pMb;
- SK_MBUF *pNextMb;
- SK_MAC_ADDR *pOldMacAddr;
- SK_MAC_ADDR *pNewMacAddr;
- SK_U32 Timeout;
- SK_U32 NewTimeout;
- SK_U32 PrevRlmtMode;
-
- switch (Event) {
- case SK_RLMT_PORTSTART_TIM: /* From RLMT via TIME. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTSTART_TIMEOUT Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event))
-
- /*
- * Used to start non-preferred ports if the preferred one
- * does not come up.
- * This timeout needs only be set when starting the first
- * (preferred) port.
- */
+ SK_U32 i;
X
- if (pAC->Rlmt.Port[Para.Para32[0]].LinkDown) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTSTART_TIMEOUT Port %d Event BEGIN.\n", Para.Para32[0]))
X
- /* PORT_START failed. */
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTSTART_TIMEOUT Event EMPTY.\n"))
+ return;
+ }


X
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- if (!pAC->Rlmt.Port[i].PortStarted) {
- SkRlmtPortStart(pAC, IoC, i);
- }
+ /*
+ * Used to start non-preferred ports if the preferred one
+ * does not come up.
+ * This timeout needs only be set when starting the first
+ * (preferred) port.
+ */
+ if (pAC->Rlmt.Port[Para.Para32[0]].LinkDown) {
+ /* PORT_START failed. */
+ for (i = 0; i < pAC->Rlmt.Port[Para.Para32[0]].Net->NumPorts; i++) {
+ if (!pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortStarted) {
+ SkRlmtPortStart(pAC, IoC,
+ pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortNumber);
X }
X }
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTSTART_TIMEOUT Event (%d) END.\n", Event))
- break;
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTSTART_TIMEOUT Event END.\n"))
+} /* SkRlmtEvtPortStartTim */
X
- case SK_RLMT_LINK_UP: /* From SIRQ. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_LINK_UP Port %d Event (%d) BEGIN.\n",
- Para.Para32[0], Event))
-
- pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
-
- if (!pRPort->PortStarted) {


- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,

- SKERR_RLMT_E008,
- SKERR_RLMT_E008_MSG);


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_LINK_UP Event (%d) EMPTY.\n", Event))
- break;
- }
X
- if (!pRPort->LinkDown) {
- /* RA;:;: Any better solution? */
+/******************************************************************************
+ *
+ * SkRlmtEvtLinkUp - LINK_UP


+ *
+ * Description:

+ * This routine handles LLINK_UP events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtLinkUp(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */
+{
+ SK_U32 i;
+ SK_RLMT_PORT *pRPort;
+ SK_EVPARA Para2;


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_LINK_UP Event (%d) EMPTY.\n", Event))
- break;


- }
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_LINK_UP Port %d Event BEGIN.\n", Para.Para32[0]))
X
- SkTimerStop(pAC, IoC, &pRPort->UpTimer);
- SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
- SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
+ pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
+ if (!pRPort->PortStarted) {
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E008, SKERR_RLMT_E008_MSG);
X
- /* Do something if timer already fired? */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_LINK_UP Event EMPTY.\n"))
+ return;
+ }
X
- pRPort->LinkDown = SK_FALSE;
- pRPort->PortState = SK_RLMT_PS_GOING_UP;
- pRPort->GuTimeStamp = SkOsGetTime(pAC);
- pRPort->BcTimeStamp = 0;
- if (pAC->Rlmt.LinksUp == 0) {
- SK_HWAC_LINK_LED(
- pAC,
- IoC,
- Para.Para32[0],
- SK_LED_ACTIVE);
- }
- else {
- SK_HWAC_LINK_LED(
- pAC,
- IoC,
- Para.Para32[0],
- SK_LED_STANDBY);
+ if (!pRPort->LinkDown) {
+ /* RA;:;: Any better solution? */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_LINK_UP Event EMPTY.\n"))
+ return;
+ }
+
+ SkTimerStop(pAC, IoC, &pRPort->UpTimer);
+ SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);


+ SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
+

+ /* Do something if timer already fired? */
+
+ pRPort->LinkDown = SK_FALSE;


+ pRPort->PortState = SK_RLMT_PS_GOING_UP;
+ pRPort->GuTimeStamp = SkOsGetTime(pAC);

+ pRPort->BcTimeStamp = 0;
+ pRPort->Net->LinksUp++;
+ if (pRPort->Net->LinksUp == 1) {
+ SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_ACTIVE);
+ }
+ else {
+ SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY);
+ }
+
+ for (i = 0; i < pRPort->Net->NumPorts; i++) {
+ if (!pRPort->Net->Port[i]->PortStarted) {
+ SkRlmtPortStart(pAC, IoC, pRPort->Net->Port[i]->PortNumber);
X }
- pAC->Rlmt.LinksUp++;
+ }


X
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- if (!pAC->Rlmt.Port[i].PortStarted) {
- SkRlmtPortStart(pAC, IoC, i);
- }


+ SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
+

+ if (pRPort->Net->LinksUp >= 2) {
+ if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) {
+ /* Build the check chain. */


+ SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber);
X }

+ }
X
- SkRlmtCheckSwitch(pAC, IoC);

+ /* If the first link comes up, start the periodical RLMT timeout. */
+ if (pRPort->Net->NumPorts > 1 && pRPort->Net->LinksUp == 1 &&
+ (pRPort->Net->RlmtMode & SK_RLMT_CHECK_OTHERS) != 0) {
+ Para2.Para32[0] = pRPort->Net->NetNumber;
+ Para2.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pRPort->Net->LocTimer,
+ pRPort->Net->TimeoutValue, SKGE_RLMT, SK_RLMT_TIM, Para2);
+ }
X
- if (pAC->Rlmt.LinksUp >= 2) {


- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) {

+ Para2 = Para;
+ Para2.Para32[1] = (SK_U32)-1;


+ SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL,

+ SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para2);
+
+ /* Later: if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) && */
+ if ((pRPort->Net->RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
+ (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LINK) != 0 &&
+ (Para2.pParaPtr =
+ SkRlmtBuildPacket(pAC, IoC, Para.Para32[0], SK_PACKET_ANNOUNCE,
+ &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress, &SkRlmtMcAddr)
+ ) != NULL) {
+ /* Send "new" packet to RLMT multicast address. */


+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);

+ }
+
+ if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_SEG) {
+ if ((Para2.pParaPtr =
+ SkRlmtBuildSpanningTreePacket(pAC, IoC, Para.Para32[0])) != NULL) {
+ pAC->Rlmt.Port[Para.Para32[0]].RootIdSet = SK_FALSE;
+ pRPort->Net->CheckingState |=
+ SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG;
X
- /* Build the check chain. */


+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);
X

- SkRlmtBuildCheckChain(pAC);
- }


+ Para.Para32[1] = (SK_U32)-1;

+ SkTimerStart(pAC, IoC, &pRPort->Net->SegTimer,
+ SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para);
X }
+ }
X
- /*
- * If the first link comes up, start the periodical
- * RLMT timeout.
- */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_LINK_UP Event END.\n"))
+} /* SkRlmtEvtLinkUp */
X
- if (pAC->GIni.GIMacsFound > 1 && pAC->Rlmt.LinksUp == 1 &&
- (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_OTHERS)) {


- SkTimerStart(
- pAC,
- IoC,

- &pAC->Rlmt.LocTimer,
- pAC->Rlmt.TimeoutValue,
- SKGE_RLMT,
- SK_RLMT_TIM,
- Para);
- }

-
- SkTimerStart(
- pAC,
- IoC,

- &pRPort->UpTimer,
- SK_RLMT_PORTUP_TIM_VAL,
- SKGE_RLMT,
- SK_RLMT_PORTUP_TIM,
- Para);

X
- /*
- * Later:
- * if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) &&
- */
+/******************************************************************************
+ *
+ * SkRlmtEvtPortUpTim - PORT_UP_TIM


+ *
+ * Description:

+ * This routine handles PORT_UP_TIM events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtPortUpTim(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
+{
+ SK_RLMT_PORT *pRPort;
X
- if ((pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LINK) &&
- (Para2.pParaPtr = SkRlmtBuildPacket(
- pAC,
- IoC,
- Para.Para32[0],
- SK_PACKET_ANNOUNCE,
- &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress,
- &SkRlmtMcAddr)
- ) != NULL) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTUP_TIM Port %d Event BEGIN.\n", Para.Para32[0]))
X
- /* Send "new" packet to RLMT multicast address. */
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTUP_TIM Event EMPTY.\n"))
+ return;
+ }
X
- SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);
- }
+ pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
+ if (pRPort->LinkDown || (pRPort->PortState == SK_RLMT_PS_UP)) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTUP_TIM Port %d Event EMPTY.\n", Para.Para32[0]))
+ return;
+ }
X

- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) {

- if ((Para2.pParaPtr =


- SkRlmtBuildSpanningTreePacket(
- pAC,
- IoC,

- Para.Para32[0])


- ) != NULL) {
-

- pAC->Rlmt.Port[Para.Para32[0]].RootIdSet =
- SK_FALSE;
- pAC->Rlmt.CheckingState |=
- SK_RLMT_RCS_SEG |
- SK_RLMT_RCS_REPORT_SEG;
-

- SkEventQueue(
- pAC,
- SKGE_DRV,
- SK_DRV_RLMT_SEND,

- Para2);


-
- SkTimerStart(
- pAC,
- IoC,

- &pAC->Rlmt.SegTimer,
- SK_RLMT_SEG_TO_VAL,
- SKGE_RLMT,
- SK_RLMT_SEG_TIM,
- Para);
- }

+ pRPort->PortDown = SK_FALSE;
+ pRPort->PortState = SK_RLMT_PS_UP;
+ pRPort->Net->PortsUp++;
+ if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) {
+ if (pAC->Rlmt.NumNets <= 1) {


+ SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);

X }
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_UP, Para);
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_LINK_UP Event (%d) END.\n", Event))
- break;
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTUP_TIM Event END.\n"))
+} /* SkRlmtEvtPortUpTim */
X
- case SK_RLMT_PORTUP_TIM: /* From RLMT via TIME. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTUP_TIM Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event))
-
- pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
-
- if (pRPort->LinkDown || (pRPort->PortState == SK_RLMT_PS_UP)) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTUP_TIM Port %d Event (%d) EMPTY.\n",
- Para.Para32[0],
- Event))
- break;
- }
X
- pRPort->PortDown = SK_FALSE;
- pRPort->PortState = SK_RLMT_PS_UP;
- pAC->Rlmt.PortsUp++;
+/******************************************************************************
+ *
+ * SkRlmtEvtPortDownTim - PORT_DOWN_*


+ *
+ * Description:

+ * This routine handles PORT_DOWN_* events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtPortDownX(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_U32 Event, /* Event code */

+SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
+{
+ SK_RLMT_PORT *pRPort;


+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_PORTDOWN* Port %d Event (%d) BEGIN.\n",
+ Para.Para32[0], Event))
+
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTDOWN* Event EMPTY.\n"))
+ return;
+ }
X
- if (pAC->Rlmt.RlmtState != SK_RLMT_RS_INIT) {
- SkRlmtCheckSwitch(pAC, IoC);
+ pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
+ if (!pRPort->PortStarted || (Event == SK_RLMT_PORTDOWN_TX_TIM &&
+ !(pRPort->CheckingState & SK_RLMT_PCS_TX))) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTDOWN* Event (%d) EMPTY.\n", Event))
+ return;
+ }
+
+ /* Stop port's timers. */
+ SkTimerStop(pAC, IoC, &pRPort->UpTimer);
+ SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);


+ SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
X

- SkEventQueue(
- pAC,
- SKGE_PNMI,
- SK_PNMI_EVT_RLMT_PORT_UP,
- Para);
- }
+ if (pRPort->PortState != SK_RLMT_PS_LINK_DOWN) {
+ pRPort->PortState = SK_RLMT_PS_DOWN;
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTUP_TIM Event (%d) END.\n", Event))
- break;
+ if (!pRPort->PortDown) {
+ pRPort->Net->PortsUp--;
+ pRPort->PortDown = SK_TRUE;
+ SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_DOWN, Para);
+ }
X
- case SK_RLMT_PORTDOWN: /* From RLMT. */
- case SK_RLMT_PORTDOWN_RX_TIM: /* From RLMT via TIME. */
- case SK_RLMT_PORTDOWN_TX_TIM: /* From RLMT via TIME. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTDOWN* Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event))
-
- pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
-
- if (!pRPort->PortStarted ||
- (Event == SK_RLMT_PORTDOWN_TX_TIM &&
- !(pRPort->CheckingState & SK_RLMT_PCS_TX))) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTDOWN* Event (%d) EMPTY.\n", Event))
- break;
+ pRPort->PacketsPerTimeSlot = 0;
+ /* pRPort->DataPacketsPerTimeSlot = 0; */
+ pRPort->BpduPacketsPerTimeSlot = 0;
+
+ /*
+ * RA;:;: To be checked:
+ * - actions at RLMT_STOP: We should not switch anymore.
+ */
+ if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) {


+ if (Para.Para32[0] ==

+ pRPort->Net->Port[pRPort->Net->ActivePort]->PortNumber) {
+ /* Active Port went down. */


+ SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);

X }
- /* Stop port's timers. */
+ }
X
- SkTimerStop(pAC, IoC, &pRPort->UpTimer);
- SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
- SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORTDOWN* Event (%d) END.\n", Event))
+} /* SkRlmtEvtPortDownX */
X
- if (pRPort->PortState != SK_RLMT_PS_LINK_DOWN) {
- pRPort->PortState = SK_RLMT_PS_DOWN;
- }
X
- if (!pRPort->PortDown) {
- pAC->Rlmt.PortsUp--;
- pRPort->PortDown = SK_TRUE;
+/******************************************************************************
+ *
+ * SkRlmtEvtLinkDown - LINK_DOWN


+ *
+ * Description:

+ * This routine handles LINK_DOWN events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtLinkDown(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */
+{
+ SK_RLMT_PORT *pRPort;


X
- SkEventQueue(
- pAC,

- SKGE_PNMI,
- SK_PNMI_EVT_RLMT_PORT_DOWN,
- Para);
+ pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_LINK_DOWN Port %d Event BEGIN.\n", Para.Para32[0]))
+
+ if (!pAC->Rlmt.Port[Para.Para32[0]].LinkDown) {
+ pRPort->Net->LinksUp--;
+ pRPort->LinkDown = SK_TRUE;
+ pRPort->PortState = SK_RLMT_PS_LINK_DOWN;
+ SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_OFF);
+
+ if ((pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) != 0) {
+ /* Build the check chain. */


+ SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber);
X }

X
- pRPort->PacketsPerTimeSlot = 0;
- pRPort->DataPacketsPerTimeSlot = 0;
- pRPort->BpduPacketsPerTimeSlot = 0;
-#if 0
- pRPort->RlmtChksPerTimeSlot = 0;
- pRPort->RlmtAcksPerTimeSlot = 0;
-#endif /* 0 */
+ /* Ensure that port is marked down. */


+ Para.Para32[1] = -1;

+ (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PORTDOWN, Para);
+ }
X
- /*
- * RA;:;: To be checked:
- * - actions at RLMT_STOP: We should not switch anymore.
- */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_LINK_DOWN Event END.\n"))
+} /* SkRlmtEvtLinkDown */
+
+
+/******************************************************************************
+ *
+ * SkRlmtEvtPortAddr - PORT_ADDR


+ *
+ * Description:

+ * This routine handles PORT_ADDR events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtPortAddr(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
+{
+ SK_U32 i, j;
+ SK_RLMT_PORT *pRPort;
+ SK_MAC_ADDR *pOldMacAddr;
+ SK_MAC_ADDR *pNewMacAddr;
X
- if (pAC->Rlmt.RlmtState != SK_RLMT_RS_INIT) {
- if (Para.Para32[0] == pAC->Rlmt.MacActive) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORT_ADDR Port %d Event BEGIN.\n", Para.Para32[0]))
X
- /* Active Port went down. */
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORT_ADDR Event EMPTY.\n"))
+ return;
+ }
X
- SkRlmtCheckSwitch(pAC, IoC);
+ /* Port's physical MAC address changed. */
+ pOldMacAddr = &pAC->Addr.Port[Para.Para32[0]].PreviousMacAddress;
+ pNewMacAddr = &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress;
+
+ /*
+ * NOTE: This is not scalable for solutions where ports are
+ * checked remotely. There, we need to send an RLMT
+ * address change packet - and how do we ensure delivery?
+ */
+ for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
+ pRPort = &pAC->Rlmt.Port[i];
+ for (j = 0; j < pRPort->PortsChecked; j++) {
+ if (SK_ADDR_EQUAL(
+ pRPort->PortCheck[j].CheckAddr.a, pOldMacAddr->a)) {
+ pRPort->PortCheck[j].CheckAddr = *pNewMacAddr;
X }
X }
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORTDOWN* Event (%d) END.\n", Event))
- break;
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_PORT_ADDR Event END.\n"))
+} /* SkRlmtEvtPortAddr */
X
- case SK_RLMT_LINK_DOWN: /* From SIRQ. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_LINK_DOWN Port %d Event (%d) BEGIN.\n",
- Para.Para32[0], Event))
-
- if (!pAC->Rlmt.Port[Para.Para32[0]].LinkDown) {
- pAC->Rlmt.LinksUp--;
- pAC->Rlmt.Port[Para.Para32[0]].LinkDown = SK_TRUE;
- pAC->Rlmt.Port[Para.Para32[0]].PortState =
- SK_RLMT_PS_LINK_DOWN;
- SK_HWAC_LINK_LED(
- pAC,
- IoC,
- Para.Para32[0],
- SK_LED_OFF);
-
- if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) {
-
- /* Build the check chain. */
-
- SkRlmtBuildCheckChain(pAC);
- }
-
- /* Ensure that port is marked down. */
-
- (void)SkRlmtEvent(
- pAC,
- IoC,
- SK_RLMT_PORTDOWN,
- Para);
- }


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_LINK_DOWN Event (%d) END.\n", Event))
- break;
X
- case SK_RLMT_PORT_ADDR: /* From ADDR. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORT_ADDR Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event))
-
- /* Port's physical MAC address changed. */
-
- pOldMacAddr =
- &pAC->Addr.Port[Para.Para32[0]].PreviousMacAddress;
- pNewMacAddr =
- &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress;
+/******************************************************************************
+ *
+ * SkRlmtEvtStart - START


+ *
+ * Description:

+ * This routine handles START events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtStart(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
+{

+ SK_EVPARA Para2;
+ SK_U32 PortIdx;
+ SK_U32 PortNumber;
X
- /*
- * NOTE: This is not scalable for solutions where ports are
- * checked remotely. There, we need to send an RLMT
- * address change packet - and how do we ensure delivery?
- */
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_START Net %d Event BEGIN.\n", Para.Para32[0]))


X
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- pRPort = &pAC->Rlmt.Port[i];
- for (j = 0; j < pRPort->PortsChecked; j++) {
- if (SK_ADDR_EQUAL(
- pRPort->PortCheck[j].CheckAddr.a,
- pOldMacAddr->a)) {
- pRPort->PortCheck[j].CheckAddr =
- *pNewMacAddr;
- }
- }
- }
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_START Event EMPTY.\n"))
+ return;
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PORT_ADDR Event (%d) END.\n", Event))
- break;


+ if (Para.Para32[0] >= pAC->Rlmt.NumNets) {

+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad NetNumber %d.\n", Para.Para32[0]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_START Event EMPTY.\n"))
+ return;
+ }
X
- /* ----- RLMT events ----- */
+ if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState != SK_RLMT_RS_INIT) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_START Event EMPTY.\n"))
+ return;
+ }
X
- case SK_RLMT_START: /* From DRV. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_START Event (%d) BEGIN.\n", Event))
-
- if (pAC->Rlmt.RlmtState != SK_RLMT_RS_INIT) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_START Event (%d) EMPTY.\n", Event))
- break;
- }
+ if (pAC->Rlmt.NetsStarted >= pAC->Rlmt.NumNets) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("All nets should have been started.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_START Event EMPTY.\n"))
+ return;
+ }
X
- if (pAC->Rlmt.PrefPort >= (SK_U32)pAC->GIni.GIMacsFound) {


- SK_ERR_LOG(
- pAC,
- SK_ERRCL_SW,

- SKERR_RLMT_E009,
- SKERR_RLMT_E009_MSG);
-
- /* Change PrefPort to internal default. */
-
- Para.Para32[0] = 0xFFFFFFFF;
- (void)SkRlmtEvent(
- pAC,
- IoC,
- SK_RLMT_PREFPORT_CHANGE,
- Para);
- }
-#if 0
- if (pAC->GIni.GIMacsFound == 1 &&
- pAC->Rlmt.RlmtMode != SK_RLMT_CHECK_LINK) {


- Para.Para32[0] = SK_RLMT_CHECK_LINK;

- (void)SkRlmtEvent(
- pAC,
- IoC,
- SK_RLMT_MODE_CHANGE,
- Para);
- }
-#endif /* 0 */
- pAC->Rlmt.LinksUp = 0;
- pAC->Rlmt.PortsUp = 0;
- pAC->Rlmt.CheckingState = 0;
- pAC->Rlmt.RlmtState = SK_RLMT_RS_NET_DOWN;
-
- SkRlmtPortStart(pAC, IoC, pAC->Rlmt.PrefPort);
-
- /* Start Timer (for first port only). */
-
- Para2.Para32[0] = pAC->Rlmt.PrefPort;


- SkTimerStart(
- pAC,
- IoC,

- &pAC->Rlmt.Port[pAC->Rlmt.PrefPort].UpTimer,
- SK_RLMT_PORTSTART_TIM_VAL,
- SKGE_RLMT,
- SK_RLMT_PORTSTART_TIM,
- Para2);


-
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_START Event (%d) END.\n", Event))
- break;
+ if (pAC->Rlmt.Net[Para.Para32[0]].PrefPort >=
+ pAC->Rlmt.Net[Para.Para32[0]].NumPorts) {
+ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E009, SKERR_RLMT_E009_MSG);
X
- case SK_RLMT_STOP: /* From DRV. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_STOP Event (%d) BEGIN.\n", Event))
-
- if (pAC->Rlmt.RlmtState == SK_RLMT_RS_INIT) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_STOP Event (%d) EMPTY.\n", Event))
- break;
- }
+ /* Change PrefPort to internal default. */
+ Para2.Para32[0] = 0xFFFFFFFF;
+ Para2.Para32[1] = Para.Para32[0];
+ (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE, Para2);
+ }
X
- /* Stop RLMT timers. */
+ PortIdx = pAC->Rlmt.Net[Para.Para32[0]].PrefPort;
+ PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[PortIdx]->PortNumber;
X
- SkTimerStop(pAC, IoC, &pAC->Rlmt.LocTimer);
- SkTimerStop(pAC, IoC, &pAC->Rlmt.SegTimer);
+ pAC->Rlmt.Net[Para.Para32[0]].LinksUp = 0;
+ pAC->Rlmt.Net[Para.Para32[0]].PortsUp = 0;
+ pAC->Rlmt.Net[Para.Para32[0]].CheckingState = 0;
+ pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_NET_DOWN;
X
- /* Stop Net. */
+ /* Start preferred port. */
+ SkRlmtPortStart(pAC, IoC, PortNumber);
X

- pAC->Rlmt.RlmtState = SK_RLMT_RS_INIT;
- pAC->Rlmt.RootIdSet = SK_FALSE;

- Para2.Para32[0] = SK_RLMT_NET_DOWN_FINAL;
- SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para2);
+ /* Start Timer (for first port only). */
+ Para2.Para32[0] = PortNumber;
+ Para2.Para32[1] = (SK_U32)-1;
+ SkTimerStart(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer,
+ SK_RLMT_PORTSTART_TIM_VAL, SKGE_RLMT, SK_RLMT_PORTSTART_TIM, Para2);
X
- /* Stop ports. */
+ pAC->Rlmt.NetsStarted++;


X
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- if (pAC->Rlmt.Port[i].PortState != SK_RLMT_PS_INIT) {


- SkTimerStop(
- pAC,
- IoC,

- &pAC->Rlmt.Port[i].UpTimer);


- SkTimerStop(
- pAC,
- IoC,

- &pAC->Rlmt.Port[i].DownRxTimer);


- SkTimerStop(
- pAC,
- IoC,

- &pAC->Rlmt.Port[i].DownTxTimer);
-
- pAC->Rlmt.Port[i].PortState = SK_RLMT_PS_INIT;
- pAC->Rlmt.Port[i].RootIdSet = SK_FALSE;
- pAC->Rlmt.Port[i].PortStarted = SK_FALSE;
- Para2.Para32[0] = i;
- SkEventQueue(
- pAC,
- SKGE_HWAC,
- SK_HWEV_PORT_STOP,
- Para2);
- }


- }
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_START Event END.\n"))
+} /* SkRlmtEvtStart */


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_CTRL,
- ("SK_RLMT_STOP Event (%d) END.\n", Event))
- break;
X
- case SK_RLMT_TIM: /* From RLMT via TIME. */
-#if 0


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_TIM Event (%d) BEGIN.\n", Event))
-#endif /* 0 */
+/******************************************************************************
+ *
+ * SkRlmtEvtStop - STOP


+ *
+ * Description:

+ * This routine handles STOP events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtStop(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
+{

+ SK_EVPARA Para2;
+ SK_U32 PortNumber;
+ SK_U32 i;
X
- if (!(pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_OTHERS) ||
- pAC->Rlmt.LinksUp == 0) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STOP Net %d Event BEGIN.\n", Para.Para32[0]))
X
- /*
- * Mode changed or all links down:
- * No more link checking.
- */
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STOP Event EMPTY.\n"))
+ return;
+ }
X
- break;


+ if (Para.Para32[0] >= pAC->Rlmt.NumNets) {

+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad NetNumber %d.\n", Para.Para32[0]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STOP Event EMPTY.\n"))
+ return;
+ }
+
+ if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState == SK_RLMT_RS_INIT) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STOP Event EMPTY.\n"))
+ return;
+ }
+
+ if (pAC->Rlmt.NetsStarted == 0) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("All nets are stopped.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STOP Event EMPTY.\n"))
+ return;
+ }
+
+ /* Stop RLMT timers. */
+ SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer);
+ SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer);
+
+ /* Stop net. */
+ pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_INIT;
+ pAC->Rlmt.Net[Para.Para32[0]].RootIdSet = SK_FALSE;
+ Para2.Para32[0] = SK_RLMT_NET_DOWN_FINAL;
+ Para2.Para32[1] = Para.Para32[0]; /* Net# */
+ SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para2);
+
+ /* Stop ports. */
+ for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
+ PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber;
+ if (pAC->Rlmt.Port[PortNumber].PortState != SK_RLMT_PS_INIT) {
+ SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer);
+ SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownRxTimer);
+ SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownTxTimer);
+
+ pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_INIT;
+ pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE;
+ pAC->Rlmt.Port[PortNumber].PortStarted = SK_FALSE;
+ Para2.Para32[0] = PortNumber;


+ Para2.Para32[1] = (SK_U32)-1;

+ SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para2);
X }
+ }
+
+ pAC->Rlmt.NetsStarted--;


+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_STOP Event END.\n"))
+} /* SkRlmtEvtStop */
+
+
+/******************************************************************************
+ *
+ * SkRlmtEvtTim - TIM


+ *
+ * Description:

+ * This routine handles TIM events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtTim(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
+{

+ SK_RLMT_PORT *pRPort;
+ SK_U32 Timeout;
+ SK_U32 NewTimeout;
+ SK_U32 PortNumber;
+ SK_U32 i;
X
X #if 0
- pAC->Rlmt.SwitchCheckCounter--;
- if (pAC->Rlmt.SwitchCheckCounter == 0) {
- pAC->Rlmt.SwitchCheckCounter;


- }
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_TIM Event BEGIN.\n"))


X #endif /* 0 */
X

- NewTimeout = SK_RLMT_DEF_TO_VAL;


- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- pRPort = &pAC->Rlmt.Port[i];
- if (!pRPort->LinkDown) {
- Timeout = SkRlmtCheckPort(pAC, IoC, i);
- if (Timeout < NewTimeout) {
- NewTimeout = Timeout;
- }
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_TIM Event EMPTY.\n"))
+ return;
+ }
X
- /*
- * This counter should be set to 0 for all
- * ports before the first frame is sent in the
- * next loop.
- */
+ if ((pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_OTHERS) == 0 ||
+ pAC->Rlmt.Net[Para.Para32[0]].LinksUp == 0) {
+ /* Mode changed or all links down: No more link checking. */
+ return;
+ }
X
- pRPort->PacketsPerTimeSlot = 0;
- pRPort->DataPacketsPerTimeSlot = 0;
- pRPort->BpduPacketsPerTimeSlot = 0;
X #if 0
- pRPort->RlmtChksPerTimeSlot = 0;
- pRPort->RlmtAcksPerTimeSlot = 0;
+ pAC->Rlmt.SwitchCheckCounter--;
+ if (pAC->Rlmt.SwitchCheckCounter == 0) {
+ pAC->Rlmt.SwitchCheckCounter;
+ }


X #endif /* 0 */

+
+ NewTimeout = SK_RLMT_DEF_TO_VAL;
+ for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
+ PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber;


+ pRPort = &pAC->Rlmt.Port[PortNumber];

+ if (!pRPort->LinkDown) {
+ Timeout = SkRlmtCheckPort(pAC, IoC, PortNumber);
+ if (Timeout < NewTimeout) {
+ NewTimeout = Timeout;
X }
- }
- pAC->Rlmt.TimeoutValue = NewTimeout;
X
- if (pAC->Rlmt.LinksUp > 1) {
X /*
- * If checking remote ports, also send packets if
- * (LinksUp == 1) &&
- * this port checks at least one (remote) port.
+ * These counters should be set to 0 for all ports before the
+ * first frame is sent in the next loop.
X */
+ pRPort->PacketsPerTimeSlot = 0;
+ /* pRPort->DataPacketsPerTimeSlot = 0; */
+ pRPort->BpduPacketsPerTimeSlot = 0;
+ }
+ }
+ pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue = NewTimeout;
X
- /*
- * Must be new loop, as SkRlmtCheckPort can request to
- * check segmentation when e.g. checking the last port.
- */
+ if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1) {
+ /*
+ * If checking remote ports, also send packets if
+ * (LinksUp == 1) &&
+ * this port checks at least one (remote) port.
+ */


X
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- pRPort = &pAC->Rlmt.Port[i];
- if (!pRPort->LinkDown) { /* !PortDown? */
- SkRlmtSend(pAC, IoC, i);
- }
+ /*
+ * Must be new loop, as SkRlmtCheckPort can request to
+ * check segmentation when e.g. checking the last port.
+ */
+ for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
+ if (!pAC->Rlmt.Net[Para.Para32[0]].Port[i]->LinkDown) {
+ SkRlmtSend(pAC, IoC,
+ pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber);
X }
X }
+ }
X

- SkTimerStart(
- pAC,
- IoC,

- &pAC->Rlmt.LocTimer,
- pAC->Rlmt.TimeoutValue,
- SKGE_RLMT,
- SK_RLMT_TIM,
- Para);
-

- if (pAC->Rlmt.LinksUp > 1 &&


- (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) &&

- (pAC->Rlmt.CheckingState & SK_RLMT_RCS_START_SEG)) {


- SkTimerStart(
- pAC,
- IoC,

- &pAC->Rlmt.SegTimer,
- SK_RLMT_SEG_TO_VAL,
- SKGE_RLMT,
- SK_RLMT_SEG_TIM,
- Para);

- pAC->Rlmt.CheckingState &=
- ~SK_RLMT_RCS_START_SEG;
- pAC->Rlmt.CheckingState |=
- SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG;
- }
+ SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer,
+ pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue, SKGE_RLMT, SK_RLMT_TIM,
+ Para);
+
+ if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1 &&
+ (pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_SEG) &&
+ (pAC->Rlmt.Net[Para.Para32[0]].CheckingState & SK_RLMT_RCS_START_SEG)) {
+ SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer,
+ SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para);
+ pAC->Rlmt.Net[Para.Para32[0]].CheckingState &= ~SK_RLMT_RCS_START_SEG;
+ pAC->Rlmt.Net[Para.Para32[0]].CheckingState |=
+ SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG;
+ }
X
X #if 0


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_TIM Event (%d) END.\n", Event))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_TIM Event END.\n"))


X #endif /* 0 */

- break;
+} /* SkRlmtEvtTim */
X
- case SK_RLMT_SEG_TIM:


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_SEG_TIM Event (%d) BEGIN.\n", Event))
X
-#ifdef DEBUG


- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- SK_U8 InAddr8[6];
- SK_U16 *InAddr;
- SK_ADDR_PORT *pAPort;
-
- InAddr = (SK_U16 *)&InAddr8[0];
- pAPort = &pAC->Addr.Port[i];
- for (j = 0;
- j < pAPort->NextExactMatchRlmt;
- j++) {
-
- /* Get exact match address j from port i. */
-
- XM_INADDR(IoC, i, XM_EXM(j), InAddr);


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n",
- j,
- i,
- InAddr8[0],
- InAddr8[1],
- InAddr8[2],
- InAddr8[3],
- InAddr8[4],
- InAddr8[5],
- pAPort->Exact[j].a[0],
- pAPort->Exact[j].a[1],
- pAPort->Exact[j].a[2],
- pAPort->Exact[j].a[3],
- pAPort->Exact[j].a[4],
- pAPort->Exact[j].a[5]))
- }
+/******************************************************************************
+ *
+ * SkRlmtEvtSegTim - SEG_TIM


+ *
+ * Description:

+ * This routine handles SEG_TIM events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtSegTim(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
+{

+#ifdef XDEBUG
+ int j;


+#endif /* DEBUG */
+

+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SEG_TIM Event BEGIN.\n"))
+
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SEG_TIM Event EMPTY.\n"))
+ return;
+ }
+
+#ifdef xDEBUG
+ for (j = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; j++) {
+ SK_ADDR_PORT *pAPort;
+ SK_U32 k;
+ SK_U16 *InAddr;
+ SK_U8 InAddr8[6];
+
+ InAddr = (SK_U16 *)&InAddr8[0];
+ pAPort = pAC->Rlmt.Net[Para.Para32[0]].Port[j]->AddrPort;
+ for (k = 0; k < pAPort->NextExactMatchRlmt; k++) {
+ /* Get exact match address k from port j. */
+ XM_INADDR(IoC, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber,
+ XM_EXM(k), InAddr);
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n",
+ k, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber,
+ InAddr8[0], InAddr8[1], InAddr8[2],
+ InAddr8[3], InAddr8[4], InAddr8[5],
+ pAPort->Exact[k].a[0], pAPort->Exact[k].a[1],
+ pAPort->Exact[k].a[2], pAPort->Exact[k].a[3],
+ pAPort->Exact[k].a[4], pAPort->Exact[k].a[5]))
X }
+ }


X #endif /* DEBUG */
X

- pAC->Rlmt.CheckingState &= ~SK_RLMT_RCS_SEG;
+ SkRlmtCheckSeg(pAC, IoC, Para.Para32[0]);
X
- SkRlmtCheckSeg(pAC, IoC);
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_SEG_TIM Event END.\n"))
+} /* SkRlmtEvtSegTim */


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,

- SK_DBGCAT_CTRL,
- ("SK_RLMT_SEG_TIM Event (%d) END.\n", Event))
- break;
X
- case SK_RLMT_PACKET_RECEIVED: /* From DRV. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PACKET_RECEIVED Event (%d) BEGIN.\n", Event))
+/******************************************************************************
+ *
+ * SkRlmtEvtPacketRx - PACKET_RECEIVED


+ *
+ * Description:

+ * This routine handles PACKET_RECEIVED events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtPacketRx(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_MBUF *pMb */
+{
+ SK_MBUF *pMb;
+ SK_MBUF *pNextMb;
+ SK_U32 NetNumber;
+


+#if 0
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_PACKET_RECEIVED Event BEGIN.\n"))


+#endif /* 0 */
X

- /* Should we ignore frames during port switching? */
+ /* Should we ignore frames during port switching? */
X
X #ifdef DEBUG
- pMb = Para.pParaPtr;
- if (pMb == NULL) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("No mbuf.\n"))
- }
- else if (pMb->pNext != NULL) {


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("More than one mbuf or pMb->pNext not set.\n"))
- }
+ pMb = Para.pParaPtr;
+ if (pMb == NULL) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("No mbuf.\n"))
+ }
+ else if (pMb->pNext != NULL) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("More than one mbuf or pMb->pNext not set.\n"))
+ }


X #endif /* DEBUG */
X

- for (pMb = Para.pParaPtr; pMb != NULL; pMb = pNextMb) {
- pNextMb = pMb->pNext;
- pMb->pNext = NULL;
+ for (pMb = Para.pParaPtr; pMb != NULL; pMb = pNextMb) {
+ pNextMb = pMb->pNext;
+ pMb->pNext = NULL;
+
+ NetNumber = pAC->Rlmt.Port[pMb->PortIdx].Net->NetNumber;
+ if (pAC->Rlmt.Net[NetNumber].RlmtState == SK_RLMT_RS_INIT) {
+ SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
+ }
+ else {
X SkRlmtPacketReceive(pAC, IoC, pMb);
X }
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_PACKET_RECEIVED Event (%d) END.\n", Event))
- break;


+#if 0
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_PACKET_RECEIVED Event END.\n"))
+#endif /* 0 */
+} /* SkRlmtEvtPacketRx */
X
- case SK_RLMT_STATS_CLEAR: /* From PNMI. */


- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_STATS_CLEAR Event (%d) BEGIN.\n", Event))
X
- /* Clear statistics for virtual and physical ports. */
+/******************************************************************************
+ *
+ * SkRlmtEvtStatsClear - STATS_CLEAR


+ *
+ * Description:

+ * This routine handles STATS_CLEAR events.


+ *
+ * Context:
+ * runtime, pageable?
+ * may be called after SK_INIT_IO

+ *
+ * Returns:

+ * Nothing
+ */

+RLMT_STATIC void SkRlmtEvtStatsClear(


+SK_AC *pAC, /* Adapter Context */
+SK_IOC IoC, /* I/O Context */

+SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
+{

+ SK_U32 i;
+ SK_RLMT_PORT *pRPort;


+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

+ ("SK_RLMT_STATS_CLEAR Event BEGIN.\n"))


X
- for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {

- pAC->Rlmt.Port[i].TxHelloCts = 0;
- pAC->Rlmt.Port[i].RxHelloCts = 0;
- pAC->Rlmt.Port[i].TxSpHelloReqCts = 0;
- pAC->Rlmt.Port[i].RxSpHelloCts = 0;
- }
+ if (Para.Para32[1] != (SK_U32)-1) {
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad Parameter.\n"))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STATS_CLEAR Event EMPTY.\n"))
+ return;
+ }


X
- SK_DBG_MSG(
- pAC,
- SK_DBGMOD_RLMT,
- SK_DBGCAT_CTRL,

- ("SK_RLMT_STATS_CLEAR Event (%d) END.\n", Event))
- break;


+ if (Para.Para32[0] >= pAC->Rlmt.NumNets) {

+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("Bad NetNumber %d.\n", Para.Para32[0]))
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
+ ("SK_RLMT_STATS_CLEAR Event EMPTY.\n"))
+ return;
+ }
+
+ /* Clear statistics for logical and physical ports. */
+ for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
+ pRPort =
+ &pAC->Rlmt.Port[pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber];
+ pRPort->TxHelloCts = 0;
+ pRPort->RxHelloCts = 0;
+ pRPort->TxSpHelloReqCts = 0;
+ pRPort->RxSpHelloCts = 0;
+ }


+
+ SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 36'
echo 'File patch-2.2.20 is continued in part 37'
echo "37" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:45 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part46

#!/bin/sh -x
# this is part 46 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 46; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&
X }

X
- /* 'n_io_port' currently is one byte. */
+ /*
+ * 'n_io_port' currently is one byte.
+ *
+ * Set a value to 'n_io_port', but never referenced it because
+ * it may be truncated.
+ */
X shp->n_io_port = boardp->asc_n_io_port <= 255 ?
X boardp->asc_n_io_port : 255;
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
- /*
- * In old kernels without tag queuing support and with memory
- * allocation problems set a conservative 'cmd_per_lun' value.
- */
-#ifdef MODULE
- shp->cmd_per_lun = 1;
-#else /* MODULE */
- shp->cmd_per_lun = 4;
-#endif /* MODULE */
- ASC_DBG1(1, "advansys_detect: cmd_per_lun: %d\n", shp->cmd_per_lun);
-#else /* version >= v1.3.89 */
X /*
X * Following v1.3.89, 'cmd_per_lun' is no longer needed
X * and should be set to zero.
@@ -5802,7 +5351,6 @@
X * the number of commands to queue per device.
X */
X shp->select_queue_depths = advansys_select_queue_depths;


-#endif /* version >= v1.3.89 */
X

X /*
X * Set the maximum number of scatter-gather elements the
@@ -5822,20 +5370,6 @@
X shp->sg_tablesize = ADV_MAX_SG_LIST;
X }
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-#ifdef MODULE
- /*
- * If the driver is compiled as a module, set a limit on the
- * 'sg_tablesize' value to prevent memory allocation failures.
- * Memory allocation errors are more likely to occur at module
- * load time, then at driver initialization time.
- */
- if (shp->sg_tablesize > 64) {
- shp->sg_tablesize = 64;
- }
-#endif /* MODULE */
-#endif /* version < v2.0.0 */
-
X /*
X * The value of 'sg_tablesize' can not exceed the SCSI
X * mid-level driver definition of SG_ALL. SG_ALL also
@@ -5851,11 +5385,11 @@
X
X /* BIOS start address. */
X if (ASC_NARROW_BOARD(boardp)) {
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,29)
+#if ASC_LINUX_KERNEL24
X shp->base =
-#else /* version >= v2.3.29 */
+#elif ASC_LINUX_KERNEL22
X shp->base = (char *)
-#endif /* version < v2.3.29 */
+#endif
X ((ulong) AscGetChipBiosAddress(
X asc_dvc_varp->iop_base,
X asc_dvc_varp->bus_type));
@@ -5874,11 +5408,11 @@
X boardp->bios_codelen);
X
X ASC_DBG2(1,
- "advansys_detect: bios_signature %x, bios_version %x\n",
+ "advansys_detect: bios_signature 0x%x, bios_version 0x%x\n",
X boardp->bios_signature, boardp->bios_version);
X
X ASC_DBG2(1,
- "advansys_detect: bios_codeseg %x, bios_codelen %x\n",
+ "advansys_detect: bios_codeseg 0x%x, bios_codelen 0x%x\n",
X boardp->bios_codeseg, boardp->bios_codelen);
X
X /*
@@ -5890,11 +5424,10 @@
X * Convert x86 realmode code segment to a linear
X * address by shifting left 4.
X */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,29)
X shp->base =
-#else /* version >= v2.3.29 */
- shp->base = (char *)
-#endif /* version < v2.3.29 */
+#if ASC_LINUX_KERNEL22
+ (char *)
+#endif
X ((ulong) boardp->bios_codeseg << 4);
X } else {
X shp->base = 0;
@@ -5905,9 +5438,33 @@
X * Register Board Resources - I/O Port, DMA, IRQ
X */
X
- /* Register I/O port range. */
- ASC_DBG(2, "advansys_detect: request_region()\n");
+ /*
+ * Register I/O port range.
+ *
+ * For Wide boards the I/O ports are not used to access
+ * the board, but request the region anyway.
+ *
+ * 'shp->n_io_port' is not referenced, because it may be truncated.
+ */
+ ASC_DBG2(2,
+ "advansys_detect: request_region port 0x%lx, len 0x%x\n",
+ (ulong) shp->io_port, boardp->asc_n_io_port);
+#if ASC_LINUX_KERNEL24
+ if (request_region(shp->io_port, boardp->asc_n_io_port,
+ "advansys") == NULL) {
+ ASC_PRINT3(
+"advansys_detect: board %d: request_region() failed, port 0x%lx, len 0x%x\n",
+ boardp->id, (ulong) shp->io_port, boardp->asc_n_io_port);
+#ifdef CONFIG_PROC_FS
+ kfree(boardp->prtbuf);
+#endif /* CONFIG_PROC_FS */
+ scsi_unregister(shp);
+ asc_board_count--;
+ continue;
+ }
+#elif ASC_LINUX_KERNEL22
X request_region(shp->io_port, boardp->asc_n_io_port, "advansys");
+#endif
X
X /* Register DMA Channel for Narrow boards. */
X shp->dma_channel = NO_ISA_DMA; /* Default to no ISA DMA. */
@@ -5922,9 +5479,9 @@
X "advansys_detect: board %d: request_dma() %d failed %d\n",
X boardp->id, shp->dma_channel, ret);
X release_region(shp->io_port, boardp->asc_n_io_port);


-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
X kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
X scsi_unregister(shp);
X asc_board_count--;
X continue;

@@ -5936,10 +5493,6 @@
X
X /* Register IRQ Number. */
X ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
- if ((ret = request_irq(shp->irq, advansys_interrupt,
- SA_INTERRUPT, "advansys")) != 0)


-#else /* version >= v1.3.70 */

X /*
X * If request_irq() fails with the SA_INTERRUPT flag set,
X * then try again without the SA_INTERRUPT flag set. This
@@ -5955,31 +5508,28 @@
X ((ret = request_irq(shp->irq, advansys_interrupt,
X (share_irq == TRUE ? SA_SHIRQ : 0),
X "advansys", boardp)) != 0))


-#endif /* version >= v1.3.70 */

X {
X if (ret == -EBUSY) {
X ASC_PRINT2(
-"advansys_detect: board %d: request_irq(): IRQ %d already in use.\n",
+"advansys_detect: board %d: request_irq(): IRQ 0x%x already in use.\n",
X boardp->id, shp->irq);
X } else if (ret == -EINVAL) {
X ASC_PRINT2(
-"advansys_detect: board %d: request_irq(): IRQ %d not valid.\n",
+"advansys_detect: board %d: request_irq(): IRQ 0x%x not valid.\n",
X boardp->id, shp->irq);
X } else {
X ASC_PRINT3(
-"advansys_detect: board %d: request_irq(): IRQ %d failed with %d\n",
+"advansys_detect: board %d: request_irq(): IRQ 0x%x failed with %d\n",
X boardp->id, shp->irq, ret);
X }
X release_region(shp->io_port, boardp->asc_n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X iounmap(boardp->ioremap_addr);


-#endif /* version >= v1,3,0 */

X if (shp->dma_channel != NO_ISA_DMA) {
X free_dma(shp->dma_channel);


X }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS

X kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
X scsi_unregister(shp);
X asc_board_count--;
X continue;

@@ -5995,7 +5545,7 @@
X
X if (warn_code || err_code) {
X ASC_PRINT4(
-"AscInitAsc1000Driver: board %d: error: init_state %x, warn %x error %x\n",
+"advansys_detect: board %d error: init_state 0x%x, warn 0x%x, error 0x%x\n",


X boardp->id, asc_dvc_varp->init_state,

X warn_code, err_code);
X }
@@ -6005,25 +5555,13 @@
X adv_req_t *reqp = NULL;
X int sg_cnt = 0;
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
- carrp = (ADV_CARR_T *) &adv_carr_buf[0];
- req_cnt = sizeof(adv_req_buf)/sizeof(adv_req_t);
- sg_cnt = sizeof(adv_sgblk_buf)/sizeof(adv_sgblk_t);
- reqp = (adv_req_t *) &adv_req_buf[0];
- boardp->adv_sgblkp = NULL;
- for (sg_cnt = 0; sg_cnt < ADV_SGBLK_BUF_CNT; sg_cnt++) {
- sgp = (adv_sgblk_t *) &adv_sgblk_buf[sg_cnt];
- sgp->next_sgblkp = boardp->adv_sgblkp;
- boardp->adv_sgblkp = sgp;
- }
-#else /* version >= v1.3.0 */
X /*
X * Allocate buffer carrier structures. The total size
X * is about 4 KB, so allocate all at once.
X */
X carrp =
X (ADV_CARR_T *) kmalloc(ADV_CARRIER_BUFSIZE, GFP_ATOMIC);
- ASC_DBG1(1, "advansys_detect: carrp %lx\n", (ulong) carrp);
+ ASC_DBG1(1, "advansys_detect: carrp 0x%lx\n", (ulong) carrp);
X
X if (carrp == NULL) {
X goto kmalloc_error;
@@ -6042,7 +5580,7 @@
X kmalloc(sizeof(adv_req_t) * req_cnt, GFP_ATOMIC);
X
X ASC_DBG3(1,
- "advansys_detect: reqp %lx, req_cnt %d, bytes %lu\n",
+ "advansys_detect: reqp 0x%lx, req_cnt %d, bytes %lu\n",
X (ulong) reqp, req_cnt,
X (ulong) sizeof(adv_req_t) * req_cnt);
X
@@ -6087,24 +5625,24 @@
X if (carrp == NULL)
X {
X ASC_PRINT1(
-"advansys_detect: board %d: error: failed to kmalloc() carrier buffer.\n",
+"advansys_detect: board %d error: failed to kmalloc() carrier buffer.\n",
X boardp->id);
X err_code = ADV_ERROR;
X } else if (reqp == NULL) {
X kfree(carrp);
X ASC_PRINT1(
-"advansys_detect: board %d: error: failed to kmalloc() adv_req_t buffer.\n",
+"advansys_detect: board %d error: failed to kmalloc() adv_req_t buffer.\n",
X boardp->id);
X err_code = ADV_ERROR;
X } else if (boardp->adv_sgblkp == NULL) {
X kfree(carrp);
X kfree(reqp);
X ASC_PRINT1(
-"advansys_detect: board %d: error: failed to kmalloc() adv_sgblk_t buffers.\n",
+"advansys_detect: board %d error: failed to kmalloc() adv_sgblk_t buffers.\n",
X boardp->id);
X err_code = ADV_ERROR;
X } else {
-
+
X /* Save carrier buffer pointer. */
X boardp->orig_carrp = carrp;
X
@@ -6113,7 +5651,6 @@
X * driver is built as a module and can be unloaded.
X */
X boardp->orig_reqp = reqp;


-#endif /* version >= v1.3.0 */
X

X adv_dvc_varp->carrier_buf = carrp;
X
@@ -6146,17 +5683,14 @@
X
X if (warn_code || err_code) {
X ASC_PRINT3(
-"AdvInitAsc3550/38C0800/38C1600Driver: board %d: error: warn %x, error %x\n",
+"advansys_detect: board %d error: warn 0x%x, error 0x%x\n",
X boardp->id, warn_code, err_code);


X }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)

X }
-#endif /* version >= v1,3,0 */
X }
X

X if (err_code != 0) {

X release_region(shp->io_port, boardp->asc_n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X if (ASC_WIDE_BOARD(boardp)) {
X iounmap(boardp->ioremap_addr);
X if (boardp->orig_carrp) {
@@ -6173,18 +5707,13 @@
X kfree(sgp);
X }


X }
-#endif /* version >= v1,3,0 */

X if (shp->dma_channel != NO_ISA_DMA) {
X free_dma(shp->dma_channel);


X }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS

X kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
- free_irq(shp->irq);


-#else /* version >= v1.3.70 */

+#endif /* CONFIG_PROC_FS */
X free_irq(shp->irq, boardp);


-#endif /* version >= v1.3.70 */

X scsi_unregister(shp);
X asc_board_count--;
X continue;

@@ -6192,6 +5721,14 @@
X ASC_DBG_PRT_SCSI_HOST(2, shp);
X }
X }
+


+ /*
+ * XXX - Remove this comment and the next line when SCSI mid-level
+ * no longer acquires 'io_request_lock' before calling the SCSI
+ * low-level detect entrypoint.
+ */

+ ASC_LOCK_IO_REQUEST_LOCK
+
X ASC_DBG1(1, "advansys_detect: done: asc_board_count %d\n", asc_board_count);
X return asc_board_count;
X }
@@ -6208,17 +5745,12 @@
X
X ASC_DBG(1, "advansys_release: begin\n");
X boardp = ASC_BOARDP(shp);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
- free_irq(shp->irq);


-#else /* version >= v1.3.70 */

X free_irq(shp->irq, boardp);


-#endif /* version >= v1.3.70 */

X if (shp->dma_channel != NO_ISA_DMA) {
X ASC_DBG(1, "advansys_release: free_dma()\n");
X free_dma(shp->dma_channel);
X }
X release_region(shp->io_port, boardp->asc_n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X if (ASC_WIDE_BOARD(boardp)) {
X adv_sgblk_t *sgp = NULL;
X
@@ -6237,9 +5769,10 @@
X kfree(sgp);
X }
X }
+#ifdef CONFIG_PROC_FS
X ASC_ASSERT(boardp->prtbuf != NULL);


X kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
X scsi_unregister(shp);

X ASC_DBG(1, "advansys_release: end\n");
X return 0;
@@ -6275,51 +5808,37 @@
X } else {
X busname = "ISA";
X }
+ /* Don't reference 'shp->n_io_port'; It may be truncated. */
X sprintf(info,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92)
-"AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u, DMA %u",
-#else /* version >= v2.1.92 */
-"AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u, DMA %u",
-#endif /* version >= v2.1.92 */
- ASC_VERSION, busname, asc_dvc_varp->max_total_qng,
- (ulong) shp->base,
- (ulong) shp->io_port, boardp->asc_n_io_port - 1,
+"AdvanSys SCSI %s: %s: IO 0x%lX-0x%lX, IRQ 0x%X, DMA 0x%X",
+ ASC_VERSION, busname,
+ (ulong) shp->io_port,
+ (ulong) shp->io_port + boardp->asc_n_io_port - 1,
X shp->irq, shp->dma_channel);
- } else if (asc_dvc_varp->bus_type & ASC_IS_PCI) {
- if ((asc_dvc_varp->bus_type & ASC_IS_PCI_ULTRA)
- == ASC_IS_PCI_ULTRA) {
- busname = "PCI Ultra";
- } else {
- busname = "PCI";
- }
- sprintf(info,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92)
- "AdvanSys SCSI %s: %s %u CDB: IO %X/%X, IRQ %u",
-#else /* version >= v2.1.92 */
- "AdvanSys SCSI %s: %s %u CDB: IO %lX/%X, IRQ %u",
-#endif /* version >= v2.1.92 */
- ASC_VERSION, busname, asc_dvc_varp->max_total_qng,
- shp->io_port, boardp->asc_n_io_port - 1, shp->irq);
X } else {
X if (asc_dvc_varp->bus_type & ASC_IS_VL) {
X busname = "VL";
X } else if (asc_dvc_varp->bus_type & ASC_IS_EISA) {
X busname = "EISA";
+ } else if (asc_dvc_varp->bus_type & ASC_IS_PCI) {
+ if ((asc_dvc_varp->bus_type & ASC_IS_PCI_ULTRA)
+ == ASC_IS_PCI_ULTRA) {
+ busname = "PCI Ultra";
+ } else {
+ busname = "PCI";
+ }
X } else {
X busname = "?";
- ASC_PRINT2(
- "advansys_info: board %d: unknown bus type %d\n",
+ ASC_PRINT2( "advansys_info: board %d: unknown bus type %d\n",
X boardp->id, asc_dvc_varp->bus_type);
X }
+ /* Don't reference 'shp->n_io_port'; It may be truncated. */
X sprintf(info,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92)
- "AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %X/%X, IRQ %u",
-#else /* version >= v2.1.92 */
- "AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u",
-#endif /* version >= v2.1.92 */
- ASC_VERSION, busname, asc_dvc_varp->max_total_qng,
- (ulong) shp->base, shp->io_port - 1,
- boardp->asc_n_io_port, shp->irq);
+ "AdvanSys SCSI %s: %s: IO 0x%lX-0x%lX, IRQ 0x%X",
+ ASC_VERSION, busname,
+ (ulong) shp->io_port,
+ (ulong) shp->io_port + boardp->asc_n_io_port - 1,
+ shp->irq);


X }
X } else {
X /*

@@ -6343,57 +5862,18 @@
X iolen = ADV_38C1600_IOLEN;
X widename = "Ultra3-Wide";
X }
- if (boardp->bios_signature == 0x55AA) {
- sprintf(info,
-"AdvanSys SCSI %s: PCI %s: BIOS %X/%X, IO %X/%X, IRQ %u",
- ASC_VERSION,
- widename,
- boardp->bios_codeseg << 4,
- boardp->bios_codelen > 0 ?
- (boardp->bios_codelen << 9) - 1 : 0,
- (unsigned) boardp->ioport, iolen - 1,
- shp->irq);
- } else {
- sprintf(info,
-"AdvanSys SCSI %s: PCI %s: IO %X/%X, IRQ %u",
- ASC_VERSION,
- widename,
- (unsigned) boardp->ioport,
- (iolen - 1),
- shp->irq);
- }
+ sprintf(info, "AdvanSys SCSI %s: PCI %s: PCIMEM 0x%lX-0x%lX, IRQ 0x%X",
+ ASC_VERSION,
+ widename,
+ (ulong) adv_dvc_varp->iop_base,
+ (ulong) adv_dvc_varp->iop_base + iolen - 1,
+ shp->irq);
X }
X ASC_ASSERT(strlen(info) < ASC_INFO_SIZE);
X ASC_DBG(1, "advansys_info: end\n");
X return info;


X }
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)

-/*
- * advansys_command() - polled I/O entrypoint.
- *
- * Apparently host drivers shouldn't return until the command
- * is finished.
- *
- * Note: This is an old interface that is no longer used by the SCSI
- * mid-level driver. The new interface, advansys_queuecommand(),
- * currently handles all requests.
- */
-int
-advansys_command(Scsi_Cmnd *scp)
-{
- ASC_DBG1(1, "advansys_command: scp %lx\n", (ulong) scp);
- ASC_STATS(scp->host, command);
- scp->SCp.Status = 0; /* Set to a known state */
- advansys_queuecommand(scp, advansys_command_done);
- while (scp->SCp.Status == 0) {
- continue;
- }
- ASC_DBG1(1, "advansys_command: result %x\n", scp->result);


- return scp->result;
-}

-#endif /* version < v2.3.28 */

-
X /*
X * advansys_queuecommand() - interrupt-driven I/O entrypoint.
X *
@@ -6405,40 +5885,30 @@
X {


X struct Scsi_Host *shp;
X asc_board_t *boardp;

- int flags;
+ ulong flags;
X Scsi_Cmnd *done_scp;
X
X shp = scp->host;
X boardp = ASC_BOARDP(shp);
X ASC_STATS(shp, queuecommand);
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
X /*
- * Disable interrupts to preserve request ordering and provide
- * mutually exclusive access to global structures used to initiate
- * a request.
- */
- save_flags(flags);
- cli();


-#else /* version >= v2.3.28 */

+ * XXX - Remove this comment and the next line when SCSI mid-level
+ * no longer acquires 'io_request_lock' before calling the SCSI

+ * low-level queuecommand entrypoint.


+ */
+ ASC_UNLOCK_IO_REQUEST_LOCK
+

X spin_lock_irqsave(&boardp->lock, flags);


-#endif /* version >= v2.3.28 */

X
X /*
X * Block new commands while handling a reset or abort request.
X */
- if (boardp->flags & (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) {
- if (boardp->flags & ASC_HOST_IN_RESET) {
- ASC_DBG1(1,
- "advansys_queuecommand: scp %lx blocked for reset request\n",
- (ulong) scp);
- scp->result = HOST_BYTE(DID_RESET);
- } else {
- ASC_DBG1(1,
- "advansys_queuecommand: scp %lx blocked for abort request\n",
- (ulong) scp);
- scp->result = HOST_BYTE(DID_ABORT);
- }
+ if (boardp->flags & ASC_HOST_IN_RESET) {
+ ASC_DBG1(1,
+ "advansys_queuecommand: scp 0x%lx blocked for reset request\n",
+ (ulong) scp);
+ scp->result = HOST_BYTE(DID_RESET);
X
X /*
X * Add blocked requests to the board's 'done' queue. The queued
@@ -6446,11 +5916,7 @@
X * handling.
X */
X asc_enqueue(&boardp->done, scp, ASC_BACK);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- restore_flags(flags);


-#else /* version >= v2.3.28 */

X spin_unlock_irqrestore(&boardp->lock, flags);


-#endif /* version >= v2.3.28 */

X return 0;
X }
X

@@ -6467,13 +5933,15 @@
X * Save the function pointer to Linux mid-level 'done' function
X * and attempt to execute the command.
X *
- * If ASC_ERROR is returned the request has been added to the
+ * If ASC_NOERROR is returned the request has been added to the
X * board's 'active' queue and will be completed by the interrupt
X * handler.
X *
X * If ASC_BUSY is returned add the request to the board's per
- * target waiting list.
- *
+ * target waiting list. This is the first time the request has
+ * been tried. Add it to the back of the waiting list. It will be
+ * retried later.
+ *
X * If an error occurred, the request will have been placed on the
X * board's 'done' queue and must be completed before returning.
X */
@@ -6492,656 +5960,21 @@
X break;
X }
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- restore_flags(flags);


-#else /* version >= v2.3.28 */

X spin_unlock_irqrestore(&boardp->lock, flags);


-#endif /* version >= v2.3.28 */

- return 0;


-}
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)

-/*
- * advansys_abort()
- *
- * Abort the command specified by 'scp'.
- */
-int
-advansys_abort(Scsi_Cmnd *scp)
-{
- struct Scsi_Host *shp;
- asc_board_t *boardp;
- ASC_DVC_VAR *asc_dvc_varp;
- ADV_DVC_VAR *adv_dvc_varp;
- int flags;
- int do_scsi_done;
- int scp_found;
- Scsi_Cmnd *done_scp = NULL;
- int ret;
-
- /* Save current flags and disable interrupts. */
- save_flags(flags);
- cli();
-
- ASC_DBG1(1, "advansys_abort: scp %lx\n", (ulong) scp);
-
-#ifdef ADVANSYS_STATS
- if (scp->host != NULL) {
- ASC_STATS(scp->host, abort);
- }
-#endif /* ADVANSYS_STATS */
-
-#ifdef ADVANSYS_ASSERT
- do_scsi_done = ASC_ERROR;
- scp_found = ASC_ERROR;
- ret = ASC_ERROR;


-#endif /* ADVANSYS_ASSERT */
-

-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
- if (scp->serial_number != scp->serial_number_at_timeout) {
- ASC_PRINT1(
-"advansys_abort: timeout serial number changed for request %lx\n",
- (ulong) scp);
- do_scsi_done = ASC_FALSE;
- scp_found = ASC_FALSE;
- ret = SCSI_ABORT_NOT_RUNNING;
- } else


-#endif /* version >= v1.3.89 */

- if ((shp = scp->host) == NULL) {
- scp->result = HOST_BYTE(DID_ERROR);
- do_scsi_done = ASC_TRUE;
- scp_found = ASC_FALSE;
- ret = SCSI_ABORT_ERROR;
- } else if ((boardp = ASC_BOARDP(shp))->flags &
- (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) {
- ASC_PRINT2(
-"advansys_abort: board %d: Nested host reset or abort, flags 0x%x\n",
- boardp->id, boardp->flags);
- do_scsi_done = ASC_TRUE;
- if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) ||
- (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) {
- scp_found = ASC_TRUE;
- } else {
- scp_found = ASC_FALSE;
- }
- scp->result = HOST_BYTE(DID_ERROR);
- ret = SCSI_ABORT_ERROR;
- } else {
- /* Set abort flag to avoid nested reset or abort requests. */
- boardp->flags |= ASC_HOST_IN_ABORT;
-
- do_scsi_done = ASC_TRUE;
- if (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE) {
- /*
- * If asc_rmqueue() found the command on the waiting
- * queue, it had not been sent to the device. After
- * the queue is removed, no other handling is required.
- */
- ASC_DBG1(1, "advansys_abort: scp %lx found on waiting queue\n",
- (ulong) scp);
- scp_found = ASC_TRUE;
- scp->result = HOST_BYTE(DID_ABORT);
- ret = SCSI_ABORT_SUCCESS;
- } else if (asc_isqueued(&boardp->active, scp) == ASC_TRUE) {
- /*
- * If asc_isqueued() found the command on the active
- * queue, it has been sent to the device. The command
- * will be returned through the interrupt handler after
- * it has been aborted.
- */
-
- if (ASC_NARROW_BOARD(boardp)) {
- /*
- * Narrow Board
- */
- asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
- scp->result = HOST_BYTE(DID_ABORT);
-
- /* sti(); XXX */ /* Enable interrupts for AscAbortSRB(). */
- ASC_DBG1(1, "advansys_abort: before AscAbortSRB(), scp %lx\n",
- (ulong) scp);
- /* XXX */
- switch (AscAbortSRB(asc_dvc_varp, ASC_VADDR_TO_U32(scp))) {
- case ASC_TRUE:
- /* asc_isr_callback() will be called */
- ASC_DBG(1, "advansys_abort: AscAbortSRB() TRUE\n");
- ret = SCSI_ABORT_PENDING;
- break;
- case ASC_FALSE:
- /* Request has apparently already completed. */
- ASC_DBG(1, "advansys_abort: AscAbortSRB() FALSE\n");
- ret = SCSI_ABORT_NOT_RUNNING;
- break;
- case ASC_ERROR:
- default:
- ASC_DBG(1, "advansys_abort: AscAbortSRB() ERROR\n");
- ret = SCSI_ABORT_ERROR;
- break;
- }
- cli();
- } else {
- /*
- * Wide Board
- */
- adv_dvc_varp = &boardp->dvc_var.adv_dvc_var;
- scp->result = HOST_BYTE(DID_ABORT);
-
- ASC_DBG1(1,
- "advansys_abort: before AdvAbortQueue(), scp %lx\n",
- (ulong) scp);
-#if 0 /* XXX */
- switch (AdvAbortQueue(adv_dvc_varp, (ADV_VADDR) XXX)) {
- case ASC_TRUE:
- /* asc_isr_callback() will be called */
- ASC_DBG(1, "advansys_abort: AdvAbortQueue() TRUE\n");
- ret = SCSI_ABORT_PENDING;
- break;
- case ASC_FALSE:
- /* Request has apparently already completed. */
- ASC_DBG(1, "advansys_abort: AdvAbortQueue() FALSE\n");
- ret = SCSI_ABORT_NOT_RUNNING;
- break;
- case ASC_ERROR:
- default:
- ASC_DBG(1, "advansys_abort: AdvAbortQueue() ERROR\n");
- ret = SCSI_ABORT_ERROR;
- break;
- }
- /*
- * Ensure all requests completed by the microcode have
- * been processed by calling AdvISR().
- */
- (void) AdvISR(adv_dvc_varp);
-#else /* XXX */
- (void) AdvResetChipAndSB(adv_dvc_varp);
- ret = SCSI_ABORT_SUCCESS;
-#endif /* XXX */
- }
-
- /*
- * The request will either still be on the active queue
- * or have been added to the board's done queue.
- */
- if (asc_rmqueue(&boardp->active, scp) == ASC_TRUE) {
- scp->result = HOST_BYTE(DID_ABORT);
- scp_found = ASC_TRUE;
- } else {
- scp_found = asc_rmqueue(&boardp->done, scp);
- ASC_ASSERT(scp_found == ASC_TRUE);
- }
- } else {
- /*
- * The command was not found on the active or waiting queues.
- */
- do_scsi_done = ASC_TRUE;
- scp_found = ASC_FALSE;
- ret = SCSI_ABORT_NOT_RUNNING;
- }
-
- /* Clear abort flag. */
- boardp->flags &= ~ASC_HOST_IN_ABORT;
-
- /*
- * Because the ASC_HOST_IN_ABORT flag causes both
- * 'advansys_interrupt' and 'asc_isr_callback' to
- * queue requests to the board's 'done' queue and
- * prevents waiting commands from being executed,
- * these queued requests must be handled here.
- */
- done_scp = asc_dequeue_list(&boardp->done, NULL, ASC_TID_ALL);
-
- /*
- * Start any waiting commands for the board.
- */
- if (!ASC_QUEUE_EMPTY(&boardp->waiting)) {
- ASC_DBG(1, "advansys_interrupt: before asc_execute_queue()\n");
- asc_execute_queue(&boardp->waiting);
- }
- }
-
- /* Interrupts could be enabled here. */
X
X /*
- * Complete the request to be aborted, unless it has been
- * restarted as detected above, even if it was not found on
- * the device active or waiting queues.


+ * XXX - Remove this comment and the next line when SCSI mid-level
+ * no longer acquires 'io_request_lock' before calling the SCSI

+ * low-level queuecommand entrypoint.
X */
- ASC_ASSERT(do_scsi_done != ASC_ERROR);
- ASC_ASSERT(scp_found != ASC_ERROR);
- if (do_scsi_done == ASC_TRUE) {
- if (scp->scsi_done == NULL) {
- ASC_PRINT1(
-"advansys_abort: aborted request scsi_done() is NULL, %lx\n",
- (ulong) scp);
- } else {
- if (scp_found == ASC_FALSE) {
- ASC_PRINT1(
-"advansys_abort: abort request not active or waiting, completing anyway %lx\n",
- (ulong) scp);
- }
- ASC_STATS(scp->host, done);
- scp->scsi_done(scp);
- }
- }
-
- /*
- * It is possible for the request done function to re-enable
- * interrupts without confusing the driver. But here interrupts
- * aren't enabled until all requests have been completed.
- */
- if (done_scp != NULL) {
- asc_scsi_done_list(done_scp);
- }
+ ASC_LOCK_IO_REQUEST_LOCK
X
- ASC_DBG1(1, "advansys_abort: ret %d\n", ret);
-
- /* Re-enable interrupts, if they were enabled on entry. */
- restore_flags(flags);
-
- ASC_ASSERT(ret != ASC_ERROR);
- return ret;
+ return 0;
X }
X
X /*
X * advansys_reset()
X *
- * Reset the device associated with the command 'scp'.
- */
-int
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
-advansys_reset(Scsi_Cmnd *scp)
-#else /* version >= v1.3.89 */
-advansys_reset(Scsi_Cmnd *scp, unsigned int reset_flags)


-#endif /* version >= v1.3.89 */

-{
- struct Scsi_Host *shp;
- asc_board_t *boardp;
- ASC_DVC_VAR *asc_dvc_varp;
- ADV_DVC_VAR *adv_dvc_varp;
- int flags;
- Scsi_Cmnd *done_scp = NULL, *last_scp = NULL;
- Scsi_Cmnd *tscp, *new_last_scp;
- int do_scsi_done;
- int scp_found;
- int status;
- int target;
- int ret;
- int device_reset = ASC_FALSE;
-
- /* Save current flags and disable interrupts. */
- save_flags(flags);
- cli();
-
- ASC_DBG1(1, "advansys_reset: %lx\n", (ulong) scp);
-
-#ifdef ADVANSYS_STATS
- if (scp->host != NULL) {
- ASC_STATS(scp->host, reset);
- }
-#endif /* ADVANSYS_STATS */


-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)

- if ((reset_flags & SCSI_RESET_ASYNCHRONOUS) &&
- (scp->serial_number != scp->serial_number_at_timeout)) {
- ASC_PRINT1(
-"advansys_reset: timeout serial number changed for request %lx\n",
- (ulong) scp);
- do_scsi_done = ASC_FALSE;
- scp_found = ASC_FALSE;
- ret = SCSI_RESET_NOT_RUNNING;
- } else


-#endif /* version >= v1.3.89 */

- if ((shp = scp->host) == NULL) {
- scp->result = HOST_BYTE(DID_ERROR);
- do_scsi_done = ASC_TRUE;
- scp_found = ASC_FALSE;
- ret = SCSI_RESET_ERROR;
- } else if ((boardp = ASC_BOARDP(shp))->flags &
- (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) {
- ASC_PRINT2(
-"advansys_reset: board %d: Nested host reset or abort, flags 0x%x\n",
- boardp->id, boardp->flags);
- do_scsi_done = ASC_TRUE;
- if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) ||
- (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) {
- scp_found = ASC_TRUE;
- } else {
- scp_found = ASC_FALSE;
- }
- scp->result = HOST_BYTE(DID_ERROR);
- ret = SCSI_RESET_ERROR;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0)
- } else if (time_after_eq(jiffies, boardp->last_reset) &&
- time_before(jiffies, boardp->last_reset + (10 * HZ))) {
-#else /* version < v2.1.0 */
- } else if (jiffies >= boardp->last_reset &&
- jiffies < (boardp->last_reset + (10 * HZ))) {


-#endif /* version < v2.1.0 */

- /*
- * Don't allow a reset to be attempted within 10 seconds
- * of the last reset.
- *
- * If 'jiffies' wrapping occurs, the reset request will go
- * through, because a wrapped 'jiffies' would not pass the
- * test above.
- */
- ASC_DBG(1,
- "advansys_reset: reset within 10 sec of last reset ignored\n");
- do_scsi_done = ASC_TRUE;
- if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) ||
- (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) {
- scp_found = ASC_TRUE;
- } else {
- scp_found = ASC_FALSE;
- }
- scp->result = HOST_BYTE(DID_ERROR);
- ret = SCSI_RESET_ERROR;
- } else {
- do_scsi_done = ASC_TRUE;
-
- /* Set reset flag to avoid nested reset or abort requests. */
- boardp->flags |= ASC_HOST_IN_RESET;
-
- /*
- * If the request is on the target waiting or active queue
- * or the board done queue, then remove it and note that it
- * was found.
- */
- if (asc_rmqueue(&boardp->active, scp) == ASC_TRUE) {
- ASC_DBG(1, "advansys_reset: active scp_found = TRUE\n");
- scp_found = ASC_TRUE;
- } else if (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE) {
- ASC_DBG(1, "advansys_reset: waiting scp_found = TRUE\n");
- scp_found = ASC_TRUE;
- } else if (asc_rmqueue(&boardp->done, scp) == ASC_TRUE) {
- scp_found = ASC_TRUE;
- } else {
- scp_found = ASC_FALSE;
- }
-
-
- if (ASC_NARROW_BOARD(boardp)) {
- /*
- * Narrow Board
- *
- * If the suggest reset bus flags are set, then reset the bus.
- * Otherwise only reset the device.
- */
- asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
- if (reset_flags &
- (SCSI_RESET_SUGGEST_BUS_RESET |
- SCSI_RESET_SUGGEST_HOST_RESET)) {


-#endif /* version >= v1.3.89 */

-
- /*
- * Reset the target's SCSI bus.
- */
- ASC_DBG(1, "advansys_reset: before AscResetSB()\n");
- /* sti(); XXX */ /* Enable interrupts for AscResetSB(). */
- status = AscResetSB(asc_dvc_varp);
- /* cli(); XXX */
- switch (status) {
- case ASC_TRUE:
- ASC_DBG(1, "advansys_reset: AscResetSB() success\n");
- ret = SCSI_RESET_SUCCESS;
- break;
- case ASC_ERROR:
- default:
- ASC_DBG(1, "advansys_reset: AscResetSB() failed\n");
- ret = SCSI_RESET_ERROR;
- break;


- }
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)

- } else {
- /*
- * Reset the specified device. If the device reset fails,
- * then reset the SCSI bus.
- */
-
- ASC_DBG1(1,
- "advansys_reset: before AscResetDevice(), target %d\n",
- scp->target);
- /* sti(); XXX */ /* Enable interrupts for AscResetDevice(). */
- status = AscResetDevice(asc_dvc_varp, scp->target);
- /* cli(); XXX */
-
- switch (status) {
- case ASC_TRUE:
- ASC_DBG(1, "advansys_reset: AscResetDevice() success\n");
- device_reset = ASC_TRUE;
- ret = SCSI_RESET_SUCCESS;
- break;
- case ASC_ERROR:
- default:
- ASC_DBG(1,
-"advansys_reset: AscResetDevice() failed; Calling AscResetSB()\n");
- /* sti(); XXX */ /* Enable interrupts for AscResetSB(). */
- status = AscResetSB(asc_dvc_varp);
- /* cli(); XXX */
- switch (status) {
- case ASC_TRUE:
- ASC_DBG(1, "advansys_reset: AscResetSB() TRUE\n");
- ret = SCSI_RESET_SUCCESS;
- break;
- case ASC_ERROR:
- default:
- ASC_DBG(1, "advansys_reset: AscResetSB() ERROR\n");
- ret = SCSI_RESET_ERROR;
- break;
- }
- break;
- }
- }


-#endif /* version >= v1.3.89 */

- } else {
- /*
- * Wide Board
- *
- * If the suggest reset bus flags are set, then reset the bus.
- * Otherwise only reset the device.
- */
- adv_dvc_varp = &boardp->dvc_var.adv_dvc_var;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
- if (reset_flags &
- (SCSI_RESET_SUGGEST_BUS_RESET |
- SCSI_RESET_SUGGEST_HOST_RESET)) {


-#endif /* version >= v1.3.89 */

-
- /*
- * Reset the target's SCSI bus.
- */
- ASC_DBG(1, "advansys_reset: before AdvResetChipAndSB()\n");
- switch (AdvResetChipAndSB(adv_dvc_varp)) {
- case ASC_TRUE:
- ASC_DBG(1,
- "advansys_reset: AdvResetChipAndSB() success\n");
- ret = SCSI_RESET_SUCCESS;
- break;
- case ASC_FALSE:
- default:
- ASC_DBG(1, "advansys_reset: AdvResetChipAndSB() failed\n");
- ret = SCSI_RESET_ERROR;
- break;
- }
- /*
- * Ensure all requests completed by the microcode have
- * been processed by calling AdvISR().
- */
- (void) AdvISR(adv_dvc_varp);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
- } else {
- /*
- * Reset the specified device. If the device reset fails,
- * then reset the SCSI bus.
- */
-
- ASC_DBG1(1,
- "advansys_reset: before AdvResetDevice(), target %d\n",
- scp->target);
-
- switch (AdvResetDevice(adv_dvc_varp, scp->target)) {
- case ASC_TRUE:
- ASC_DBG(1, "advansys_reset: AdvResetDevice() success\n");
- device_reset = ASC_TRUE;
- ret = SCSI_RESET_SUCCESS;
- break;
- case ASC_FALSE:
- default:
- ASC_DBG(1,
-"advansys_reset: AdvResetDevice() failed; Calling AdvResetChipAndSB()\n");
-
- switch (AdvResetChipAndSB(adv_dvc_varp)) {
- case ASC_TRUE:
- ASC_DBG(1,
- "advansys_reset: AdvResetChipAndSB() TRUE\n");
- ret = SCSI_RESET_SUCCESS;
- break;
- case ASC_FALSE:
- default:
- ASC_DBG(1,
- "advansys_reset: AdvResetChipAndSB() ERROR\n");
- ret = SCSI_RESET_ERROR;
- break;
- }
- break;
- }
- /*
- * Ensure all requests completed by the microcode have
- * been processed by calling AdvISR().
- */
- (void) AdvISR(adv_dvc_varp);
- }


-#endif /* version >= v1.3.89 */

- }
-
- /*
- * Because the ASC_HOST_IN_RESET flag causes both
- * 'advansys_interrupt' and 'asc_isr_callback' to
- * queue requests to the board's 'done' queue and
- * prevents waiting commands from being executed,
- * these queued requests must be handled here.
- */
- done_scp = asc_dequeue_list(&boardp->done, &last_scp,
- ASC_TID_ALL);
-
- /*
- * If a device reset was performed dequeue all waiting
- * and active requests for the device and set the request
- * status to DID_RESET.
- *
- * If a SCSI bus reset was performed dequeue all waiting
- * and active requests for all devices and set the request
- * status to DID_RESET.
- */
- if (device_reset == ASC_TRUE) {
- target = scp->target;
- } else {
- target = ASC_TID_ALL;
- }
-
- /*
- * Add active requests to 'done_scp' and set the request status
- * to DID_RESET.
- */
- if (done_scp == NULL) {
- done_scp = asc_dequeue_list(&boardp->active, &last_scp, target);
- for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
- tscp->result = HOST_BYTE(DID_RESET);
- }
- } else {
- ASC_ASSERT(last_scp != NULL);
- REQPNEXT(last_scp) = asc_dequeue_list(&boardp->active,
- &new_last_scp, target);
- if (new_last_scp != NULL) {
- ASC_ASSERT(REQPNEXT(last_scp) != NULL);
- for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
- tscp->result = HOST_BYTE(DID_RESET);
- }
- last_scp = new_last_scp;
- }
- }
-
- /*
- * Add waiting requests to 'done_scp' and set the request status
- * to DID_RESET.
- */
- if (done_scp == NULL) {
- done_scp = asc_dequeue_list(&boardp->waiting, &last_scp, target);
- for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
- tscp->result = HOST_BYTE(DID_RESET);
- }
- } else {
- ASC_ASSERT(last_scp != NULL);
- REQPNEXT(last_scp) = asc_dequeue_list(&boardp->waiting,
- &new_last_scp, target);
- if (new_last_scp != NULL) {
- ASC_ASSERT(REQPNEXT(last_scp) != NULL);
- for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
- tscp->result = HOST_BYTE(DID_RESET);
- }
- last_scp = new_last_scp;
- }
- }
-
- /* Save the time of the most recently completed reset. */
- boardp->last_reset = jiffies;
-
- /* Clear reset flag. */
- boardp->flags &= ~ASC_HOST_IN_RESET;
-
- /*
- * Start any waiting commands for the board.
- */
- if (!ASC_QUEUE_EMPTY(&boardp->waiting)) {
- ASC_DBG(1, "advansys_interrupt: before asc_execute_queue()\n");
- asc_execute_queue(&boardp->waiting);
- }
- ret = SCSI_RESET_SUCCESS;
- }
-
- /* Interrupts could be enabled here. */
-
- ASC_ASSERT(do_scsi_done != ASC_ERROR);
- ASC_ASSERT(scp_found != ASC_ERROR);
- if (do_scsi_done == ASC_TRUE) {
- if (scp->scsi_done == NULL) {
- ASC_PRINT1(
-"advansys_reset: reset request scsi_done() is NULL, %lx\n",
- (ulong) scp);
- } else {
- if (scp_found == ASC_FALSE) {
- ASC_PRINT1(
-"advansys_reset: reset request not active or waiting, completing anyway %lx\n",
- (ulong) scp);
- }
- ASC_STATS(scp->host, done);
- scp->scsi_done(scp);
- }
- }
-
- /*
- * It is possible for the request done function to re-enable
- * interrupts without confusing the driver. But here interrupts
- * aren't enabled until requests have been completed.
- */
- if (done_scp != NULL) {
- asc_scsi_done_list(done_scp);
- }
-
- ASC_DBG1(1, "advansys_reset: ret %d\n", ret);
-
- /* Re-enable interrupts, if they were enabled on entry. */
- restore_flags(flags);
-
- ASC_ASSERT(ret != ASC_ERROR);
- return ret;
-}
-#else /* version >= v2.3.28 */
-/*
- * advansys_eh_bus_reset()
- *
X * Reset the bus associated with the command 'scp'.
X *
X * This function runs its own thread. Interrupts must be blocked but
@@ -7149,24 +5982,24 @@
X * required. Returns SUCCESS or FAILED.
X */
X int
-advansys_eh_bus_reset(Scsi_Cmnd *scp)
+advansys_reset(Scsi_Cmnd *scp)
X {


X struct Scsi_Host *shp;
X asc_board_t *boardp;

X ASC_DVC_VAR *asc_dvc_varp;
X ADV_DVC_VAR *adv_dvc_varp;
- int flags;
+ ulong flags;
X Scsi_Cmnd *done_scp = NULL, *last_scp = NULL;
X Scsi_Cmnd *tscp, *new_last_scp;
X int status;
- int ret;
+ int ret = SUCCESS;
X
- ASC_DBG1(1, "advansys_eh_bus_reset: %lx\n", (ulong) scp);
+ ASC_DBG1(1, "advansys_reset: 0x%lx\n", (ulong) scp);
X
X #ifdef ADVANSYS_STATS
X if (scp->host != NULL) {
- ASC_STATS(scp->host, eh_bus_reset);
- }
+ ASC_STATS(scp->host, reset);
+ }


X #endif /* ADVANSYS_STATS */
X

X if ((shp = scp->host) == NULL) {
@@ -7176,6 +6009,8 @@
X
X boardp = ASC_BOARDP(shp);
X
+ ASC_PRINT1("advansys_reset: board %d: SCSI bus reset started...\n",
+ boardp->id);
X /*
X * Check for re-entrancy.
X */
@@ -7187,32 +6022,43 @@
X boardp->flags |= ASC_HOST_IN_RESET;
X spin_unlock_irqrestore(&boardp->lock, flags);
X

+ /*
+ * XXX - Remove this comment and the next line when SCSI mid-level
+ * no longer acquires 'io_request_lock' before calling the SCSI

+ * low-level reset entrypoint.


+ */
+ ASC_UNLOCK_IO_REQUEST_LOCK
+

X if (ASC_NARROW_BOARD(boardp)) {
X /*

X * Narrow Board
- *
- * If the suggest reset bus flags are set, then reset the bus.
- * Otherwise only reset the device.
X */
X asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
X
X /*
- * Reset the target's SCSI bus.
+ * Reset the chip and SCSI bus.
X */
- ASC_DBG(1, "advansys_eh_bus_reset: before AscResetSB()\n");
- status = AscResetSB(asc_dvc_varp);
- switch (status) {
- case ASC_TRUE:
- ASC_DBG(1, "advansys_eh_bus_reset: AscResetSB() success\n");
- ret = SUCCESS;
- break;
- case ASC_ERROR:
- default:
- ASC_DBG(1, "advansys_eh_bus_reset: AscResetSB() failed\n");
+ ASC_DBG(1, "advansys_reset: before AscInitAsc1000Driver()\n");
+ status = AscInitAsc1000Driver(asc_dvc_varp);
+
+ /* Refer to ASC_IERR_* defintions for meaning of 'err_code'. */
+ if (asc_dvc_varp->err_code) {
+ ASC_PRINT2(
+ "advansys_reset: board %d: SCSI bus reset error: 0x%x\n",
+ boardp->id, asc_dvc_varp->err_code);
X ret = FAILED;
- break;
+ } else if (status) {
+ ASC_PRINT2(
+ "advansys_reset: board %d: SCSI bus reset warning: 0x%x\n",
+ boardp->id, status);
+ } else {
+ ASC_PRINT1(
+ "advansys_reset: board %d: SCSI bus reset successful.\n",
+ boardp->id);
X }
X
+ ASC_DBG(1, "advansys_reset: after AscInitAsc1000Driver()\n");
+
X /*
X * Acquire the board lock.
X */
@@ -7230,16 +6076,16 @@
X /*
X * Reset the target's SCSI bus.
X */
- ASC_DBG(1, "advansys_eh_bus_reset: before AdvResetChipAndSB()\n");
+ ASC_DBG(1, "advansys_reset: before AdvResetChipAndSB()\n");
X switch (AdvResetChipAndSB(adv_dvc_varp)) {
X case ASC_TRUE:
- ASC_DBG(1,
- "advansys_eh_bus_reset: AdvResetChipAndSB() success\n");
- ret = SUCCESS;
+ ASC_PRINT1("advansys_reset: board %d: SCSI bus reset successful.\n",
+ boardp->id);
X break;
X case ASC_FALSE:
X default:
- ASC_DBG(1, "advansys_eh_bus_reset: AdvResetChipAndSB() failed\n");
+ ASC_PRINT1("advansys_reset: board %d: SCSI bus reset error.\n",
+ boardp->id);
X ret = FAILED;
X break;
X }
@@ -7322,11 +6168,17 @@
X asc_scsi_done_list(done_scp);
X }
X
- ASC_DBG1(1, "advansys_eh_bus_reset: ret %d\n", ret);


+ /*
+ * XXX - Remove this comment and the next line when SCSI mid-level
+ * no longer acquires 'io_request_lock' before calling the SCSI

+ * low-level reset entrypoint.
+ */
+ ASC_LOCK_IO_REQUEST_LOCK
+
+ ASC_DBG1(1, "advansys_reset: ret %d\n", ret);
X
X return ret;
X }
-#endif /* version >= v2.3.28 */
X
X /*
X * advansys_biosparam()
@@ -7340,11 +6192,7 @@
X * ip[2]: cylinders
X */
X int
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-advansys_biosparam(Disk *dp, int dep, int ip[])
-#else /* version >= v1.3.0 */
X advansys_biosparam(Disk *dp, kdev_t dep, int ip[])


-#endif /* version >= v1.3.0 */
X {

X asc_board_t *boardp;
X
@@ -7440,14 +6288,14 @@
X #ifdef ADVANSYS_DEBUG
X ASC_DBG1(1, "advansys_setup: ints[0] %d\n", ints[0]);
X for (i = 1; i < ints[0]; i++) {
- ASC_DBG2(1, " ints[%d] %x", i, ints[i]);
+ ASC_DBG2(1, " ints[%d] 0x%x", i, ints[i]);
X }
X ASC_DBG(1, "\n");


X #endif /* ADVANSYS_DEBUG */
X

X for (i = 1; i <= ints[0] && i <= ASC_NUM_IOPORT_PROBE; i++) {
X asc_ioport[i-1] = ints[i];
- ASC_DBG2(1, "advansys_setup: asc_ioport[%d] %x\n",
+ ASC_DBG2(1, "advansys_setup: asc_ioport[%d] 0x%x\n",
X i - 1, asc_ioport[i-1]);
X }
X }
@@ -7457,15 +6305,15 @@
X * --- Loadable Driver Support
X */
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)
+#if ASC_LINUX_KERNEL24
+static Scsi_Host_Template driver_template = ADVANSYS;
+# include "scsi_module.c"
+#elif ASC_LINUX_KERNEL22
X #ifdef MODULE
X Scsi_Host_Template driver_template = ADVANSYS;
X # include "scsi_module.c"
X #endif /* MODULE */
-#else /* version >= v2.4.0 */
-static Scsi_Host_Template driver_template = ADVANSYS;
-# include "scsi_module.c"


-#endif /* version >= v2.4.0 */

+#endif
X
X
X /*
@@ -7475,41 +6323,21 @@
X /*
X * First-level interrupt handler.
X *
- * For versions > v1.3.70, 'dev_id' is a pointer to the interrupting
- * adapter's asc_board_t. Because all boards are currently checked
- * for interrupts on each interrupt, 'dev_id' is not referenced. 'dev_id'
- * could be used to identify an interrupt passed to the AdvanSys driver,
- * which is for a device sharing an interrupt with an AdvanSys adapter.
+ * 'dev_id' is a pointer to the interrupting adapter's asc_board_t. Because
+ * all boards are currently checked for interrupts on each interrupt, 'dev_id'
+ * is not referenced. 'dev_id' could be used to identify an interrupt passed
+ * to the AdvanSys driver which is for a device sharing an interrupt with
+ * an AdvanSys adapter.
X */
X STATIC void
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-advansys_interrupt(int irq, struct pt_regs *regs)


-#else /* version >= v1.3.70 */

X advansys_interrupt(int irq, void *dev_id, struct pt_regs *regs)


-#endif /* version >= v1.3.70 */

X {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95)
- int flags;
-#else /* version >= v2.1.95 */
- unsigned long flags;
-#endif /* version >= v2.1.95 */
+ ulong flags;
X int i;
X asc_board_t *boardp;
X Scsi_Cmnd *done_scp = NULL, *last_scp = NULL;
X Scsi_Cmnd *new_last_scp;
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95)
- /* Disable interrupts, if they aren't already disabled. */
- save_flags(flags);
- cli();
-#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- /*
- * Disable interrupts, if they aren't already disabled and acquire
- * the I/O spinlock.
- */
- spin_lock_irqsave(&io_request_lock, flags);


-#endif /* version < v2.3.28 */
-

X ASC_DBG(1, "advansys_interrupt: begin\n");
X
X /*
@@ -7518,11 +6346,9 @@
X */
X for (i = 0; i < asc_board_count; i++) {
X boardp = ASC_BOARDP(asc_host[i]);
- ASC_DBG2(2, "advansys_interrupt: i %d, boardp %lx\n",
- i, (ulong) boardp)
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28)
+ ASC_DBG2(2, "advansys_interrupt: i %d, boardp 0x%lx\n",
+ i, (ulong) boardp);
X spin_lock_irqsave(&boardp->lock, flags);


-#endif /* version >= v2.3.28 */

X if (ASC_NARROW_BOARD(boardp)) {
X /*

X * Narrow Board
@@ -7544,13 +6370,12 @@
X
X /*
X * Start waiting requests and create a list of completed requests.
- *
- * If a reset or abort request is being performed for the board,
- * the reset or abort handler will complete pending requests after
- * it has completed.
+ *
+ * If a reset request is being performed for the board, the reset
+ * handler will complete pending requests after it has completed.
X */
- if ((boardp->flags & (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) == 0) {
- ASC_DBG2(1, "advansys_interrupt: done_scp %lx, last_scp %lx\n",
+ if ((boardp->flags & ASC_HOST_IN_RESET) == 0) {
+ ASC_DBG2(1, "advansys_interrupt: done_scp 0x%lx, last_scp 0x%lx\n",
X (ulong) done_scp, (ulong) last_scp);
X
X /* Start any waiting commands for the board. */
@@ -7579,41 +6404,21 @@
X }
X }
X }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28)
X spin_unlock_irqrestore(&boardp->lock, flags);


-#endif /* version >= v2.3.28 */

X }
X
- /* Interrupts could be enabled here. */
-
X /*
- * It is possible for the request done function to re-enable
- * interrupts without confusing the driver. But here the
- * original flags aren't restored until all requests have been
- * completed.
+ * If interrupts were enabled on entry, then they
+ * are now enabled here.
+ *
+ * Complete all requests on the done list.
X */
X asc_scsi_done_list(done_scp);
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95)
- /*
- * Restore the original flags which will enable interrupts
- * if and only if they were enabled on entry.
- */
- restore_flags(flags);
-#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
- /*
- * Release the I/O spinlock and restore the original flags
- * which will enable interrupts if and only if they were
- * enabled on entry.
- */
- spin_unlock_irqrestore(&io_request_lock, flags);


-#endif /* version < v2.3.28 */
-

X ASC_DBG(1, "advansys_interrupt: end\n");
X return;


X }
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
X /*

X * Set the number of commands to queue per device for the
X * specified host adapter.
@@ -7642,24 +6447,11 @@
X device->queue_depth =
X boardp->dvc_var.adv_dvc_var.max_dvc_qng;
X }
- ASC_DBG3(1, "advansys_select_queue_depths: shp %lx, id %d, depth %d\n",
+ ASC_DBG3(1,
+ "advansys_select_queue_depths: shp 0x%lx, id %d, depth %d\n",
X (ulong) shp, device->id, device->queue_depth);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 46'
echo 'File patch-2.2.20 is continued in part 47'
echo "47" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:56 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part57

#!/bin/sh -x
# this is part 57 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 57; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- dev, block, linux_media_version);
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame %d with linux_media_version %d\n",
+ dev, ppos, linux_media_version);
X #endif
X return 0;
X }
X if (linux_media_version > STp->linux_media_version) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Frame %d sets linux_media_version to %d\n",
- dev, block, linux_media_version);
+ printk(OSST_DEB_MSG "osst%d:D: Frame %d sets linux_media_version to %d\n",
+ dev, ppos, linux_media_version);
X #endif
X memcpy(STp->application_sig, id_string, 5);
X STp->linux_media_version = linux_media_version;
@@ -1976,16 +2173,16 @@
X }
X if (update_frame_cntr > STp->update_frame_cntr) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Frame %d sets update_frame_counter to %d\n",
- dev, block, update_frame_cntr);
+ printk(OSST_DEB_MSG "osst%d:D: Frame %d sets update_frame_counter to %d\n",
+ dev, ppos, update_frame_cntr);
X #endif
X if (STp->header_cache == NULL) {
X if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) {
- printk(KERN_ERR "osst%i: Failed to allocate header cache\n", dev);
+ printk(KERN_ERR "osst%i:E: Failed to allocate header cache\n", dev);
X return 0;
X }
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Allocated memory for header cache\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Allocated memory for header cache\n", dev);
X #endif
X }
X osst_copy_from_buffer(STp->buffer, (unsigned char *)STp->header_cache);
@@ -1998,19 +2195,22 @@
X STp->filemark_cnt = ntohl(aux->filemark_cnt);
X STp->first_mark_ppos = ntohl(aux->next_mark_ppos);
X STp->last_mark_ppos = ntohl(aux->last_mark_ppos);
+ STp->last_mark_lbn = ntohl(aux->last_mark_lbn);
X STp->update_frame_cntr = update_frame_cntr;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: detected write pass %d, update frame counter %d, filemark counter %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: Detected write pass %d, update frame counter %d, filemark counter %d\n",
X dev, STp->wrt_pass_cntr, STp->update_frame_cntr, STp->filemark_cnt);
- printk(OSST_DEB_MSG "osst%i: first data frame on tape = %d, last = %d, eod frame = %d\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: first data frame on tape = %d, last = %d, eod frame = %d\n", dev,
X STp->first_data_ppos,
X ntohl(header->partition[0].last_frame_ppos),
X ntohl(header->partition[0].eod_frame_ppos));
- printk(OSST_DEB_MSG "osst%i: first mark on tape = %d, last = %d, eod frame = %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: first mark on tape = %d, last = %d, eod frame = %d\n",
X dev, STp->first_mark_ppos, STp->last_mark_ppos, STp->eod_frame_ppos);
X #endif
X if (header->minor_rev < 4 && STp->linux_media_version == 4) {
- printk(OSST_DEB_MSG "osst%i: Moving filemark list to ADR 1.4 location\n", dev);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%i:D: Moving filemark list to ADR 1.4 location\n", dev);
+#endif
X memcpy((void *)header->dat_fm_tab.fm_tab_ent,
X (void *)header->old_filemark_list, sizeof(header->dat_fm_tab.fm_tab_ent));
X memset((void *)header->old_filemark_list, 0, sizeof(header->old_filemark_list));
@@ -2034,9 +2234,8 @@
X header->dat_fm_tab.fm_tab_ent_sz != 4 ||
X header->dat_fm_tab.fm_tab_ent_cnt !=
X htons(STp->filemark_cnt<OS_FM_TAB_MAX?STp->filemark_cnt:OS_FM_TAB_MAX)))
- printk(KERN_WARNING "osst%i: Failed consistency check ADR 1.4 format\n", dev);
+ printk(KERN_WARNING "osst%i:W: Failed consistency check ADR 1.4 format\n", dev);
X
-// memcpy(STp->header_cache, header, sizeof(os_header_t));


X }
X
X return 1;

@@ -2044,7 +2243,7 @@
X
X static int osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt)
X {
- int position, block;
+ int position, ppos;
X int first, last;
X int valid = 0;
X int dev = TAPE_NR(STp->devt);
@@ -2059,37 +2258,37 @@
X STp->header_ok = STp->linux_media = STp->linux_media_version = 0;
X STp->wrt_pass_cntr = STp->update_frame_cntr = -1;
X STp->eod_frame_ppos = STp->first_data_ppos = -1;
- STp->first_mark_ppos = STp->last_mark_ppos = -1;
+ STp->first_mark_ppos = STp->last_mark_ppos = STp->last_mark_lbn = -1;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Reading header\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Reading header\n", dev);
X #endif
X
- /* optimization for speed - if we are positioned at block 10, read second group first */
+ /* optimization for speed - if we are positioned at ppos 10, read second group first */
X /* TODO try the ADR 1.1 locations for the second group if we have no valid one yet... */
X
X first = position==10?0xbae: 5;
X last = position==10?0xbb3:10;
X
- for (block = first; block < last; block++)
- if (__osst_analyze_headers(STp, aSCpnt, block))
+ for (ppos = first; ppos < last; ppos++)
+ if (__osst_analyze_headers(STp, aSCpnt, ppos))
X valid = 1;
X
X first = position==10? 5:0xbae;
X last = position==10?10:0xbb3;
X
- for (block = first; block < last; block++)
- if (__osst_analyze_headers(STp, aSCpnt, block))
+ for (ppos = first; ppos < last; ppos++)
+ if (__osst_analyze_headers(STp, aSCpnt, ppos))
X valid = 1;
X
X if (!valid) {
- printk(KERN_ERR "osst%i: Failed to find valid ADRL header, new media?\n", dev);
+ printk(KERN_ERR "osst%i:E: Failed to find valid ADRL header, new media?\n", dev);
X STp->eod_frame_ppos = STp->first_data_ppos = 0;
X osst_set_frame_position(STp, aSCpnt, 10, 0);
X return 0;
X }
X if (position <= STp->first_data_ppos) {
X position = STp->first_data_ppos;
- STp->ps[0].drv_file = STp->ps[0].drv_block = STp->logical_blk_num = 0;
+ STp->ps[0].drv_file = STp->ps[0].drv_block = STp->frame_seq_number = STp->logical_blk_num = 0;
X }
X osst_set_frame_position(STp, aSCpnt, position, 0);
X STp->header_ok = 1;
@@ -2100,18 +2299,21 @@
X static int osst_verify_position(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt)
X {
X int frame_position = STp->first_frame_position;
+ int frame_seq_numbr = STp->frame_seq_number;
X int logical_blk_num = STp->logical_blk_num;
+ int halfway_frame = STp->frame_in_buffer;
+ int read_pointer = STp->buffer->read_pointer;
X int prev_mark_ppos = -1;
X int actual_mark_ppos, i, n;
-#if 1 //DEBUG
+#if DEBUG
X int dev = TAPE_NR(STp->devt);
X
- printk(OSST_DEB_MSG "osst%i: Verify that the tape is really the one we think before writing\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Verify that the tape is really the one we think before writing\n", dev);
X #endif
X osst_set_frame_position(STp, aSCpnt, frame_position - 1, 0);
- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {
+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Couldn't get logical blk num in verify_position\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in verify_position\n", dev);
X #endif
X return (-EIO);
X }
@@ -2123,42 +2325,48 @@
X prev_mark_ppos = frame_position - 1; /* usually - we don't really know */
X actual_mark_ppos = STp->buffer->aux->frame_type == OS_FRAME_TYPE_MARKER ?
X frame_position - 1 : ntohl(STp->buffer->aux->last_mark_ppos);
- if (frame_position != STp->first_frame_position ||
- logical_blk_num != STp->logical_blk_num + 1 ||
- prev_mark_ppos != actual_mark_ppos ) {
-#if 1 //DEBUG
- printk(OSST_DEB_MSG "osst%i: Block mismatch: frame %d-%d, lblk %d-%d, mark %d-%d\n", dev,
- STp->first_frame_position, frame_position, STp->logical_blk_num + 1,
- logical_blk_num, actual_mark_ppos, prev_mark_ppos);
+ if (frame_position != STp->first_frame_position ||
+ frame_seq_numbr != STp->frame_seq_number + (halfway_frame?0:1) ||
+ prev_mark_ppos != actual_mark_ppos ) {
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Block mismatch: fppos %d-%d, fseq %d-%d, mark %d-%d\n", dev,
+ STp->first_frame_position, frame_position,
+ STp->frame_seq_number + (halfway_frame?0:1),
+ frame_seq_numbr, actual_mark_ppos, prev_mark_ppos);
X #endif
X return (-EIO);
X }
- STp->logical_blk_in_buffer = 0;
- STp->logical_blk_num = logical_blk_num;
+ if (halfway_frame) {
+ /* prepare buffer for append and rewrite on top of original */
+ osst_set_frame_position(STp, aSCpnt, frame_position - 1, 0);
+ STp->buffer->buffer_bytes = read_pointer;
+ STp->ps[STp->partition].rw = ST_WRITING;
+ STp->dirty = 1;
+ }
+ STp->frame_in_buffer = halfway_frame;
+ STp->frame_seq_number = frame_seq_numbr;
+ STp->logical_blk_num = logical_blk_num;


X return 0;
X }
X

X /* Acc. to OnStream, the vers. numbering is the following:
X * X.XX for released versions (X=digit),
X * XXXY for unreleased versions (Y=letter)
- * Ordering 1.05 < 106A < 106a < 106B < ... < 1.06
+ * Ordering 1.05 < 106A < 106B < ... < 106a < ... < 1.06
X * This fn makes monoton numbers out of this scheme ...
X */
X static unsigned int osst_parse_firmware_rev (const char * str)
X {
- unsigned int rev;
X if (str[1] == '.') {
- rev = (str[0]-0x30)*10000
- +(str[2]-0x30)*1000
- +(str[3]-0x30)*100;
+ return (str[0]-'0')*10000
+ +(str[2]-'0')*1000
+ +(str[3]-'0')*100;
X } else {
- rev = (str[0]-0x30)*10000
- +(str[1]-0x30)*1000
- +(str[2]-0x30)*100 - 100;
- rev += 2*(str[3] & 0x1f)
- +(str[3] >= 0x60? 1: 0);
+ return (str[0]-'0')*10000
+ +(str[1]-'0')*1000
+ +(str[2]-'0')*100 - 100
+ +(str[3]-'@');
X }
- return rev;
X }
X
X /*
@@ -2166,9 +2374,9 @@
X */
X static int osst_configure_onstream(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt)
X {
- int dev = TAPE_NR(STp->devt);
X unsigned char cmd[MAX_COMMAND_SIZE];
- Scsi_Cmnd * SCpnt = * aSCpnt;
+ int dev = TAPE_NR(STp->devt);
+ Scsi_Cmnd * SCpnt = * aSCpnt;
X osst_mode_parameter_header_t * header;
X osst_block_size_page_t * bs;
X osst_capabilities_page_t * cp;
@@ -2177,21 +2385,19 @@
X
X if (STp->ready != ST_READY) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Not Ready\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Not Ready\n", dev);
X #endif
X return (-EIO);
X }
X
X if (STp->os_fw_rev < 10600) {
- printk("osst%i: Old OnStream firmware revision detected (%s)\n",
- dev, STp->device->rev);
- printk("osst%i: An upgrade to version 1.06 or above is recommended\n",
- dev);
+ printk(KERN_INFO "osst%i:I: Old OnStream firmware revision detected (%s),\n", dev, STp->device->rev);
+ printk(KERN_INFO "osst%d:I: an upgrade to version 1.06 or above is recommended\n", dev);
X }
X
X /*
X * Configure 32.5KB (data+aux) frame size.
- * Get the current block size from the block size mode page
+ * Get the current frame size from the block size mode page
X */
X memset(cmd, 0, MAX_COMMAND_SIZE);
X cmd[0] = MODE_SENSE;
@@ -2202,13 +2408,13 @@
X SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE);
X if (SCpnt == NULL) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst: Busy\n");
+ printk(OSST_DEB_MSG "osst :D: Busy\n");
X #endif
X return (-EBUSY);
X }
X *aSCpnt = SCpnt;
X if ((STp->buffer)->last_result_fatal != 0) {
- printk (KERN_ERR "osst%i: Can't get tape block size mode page\n", dev);
+ printk (KERN_ERR "osst%d:E: Can't get tape block size mode page\n", dev);
X return (-EIO);
X }
X
@@ -2216,10 +2422,10 @@
X bs = (osst_block_size_page_t *) ((STp->buffer)->b_data + sizeof(osst_mode_parameter_header_t) + header->bdl);
X
X #if DEBUG
- printk(KERN_INFO "osst%i: 32KB play back: %s\n", dev, bs->play32 ? "Yes" : "No");
- printk(KERN_INFO "osst%i: 32.5KB play back: %s\n", dev, bs->play32_5 ? "Yes" : "No");
- printk(KERN_INFO "osst%i: 32KB record: %s\n", dev, bs->record32 ? "Yes" : "No");
- printk(KERN_INFO "osst%i: 32.5KB record: %s\n", dev, bs->record32_5 ? "Yes" : "No");
+ printk(OSST_DEB_MSG "osst%d:D: 32KB play back: %s\n", dev, bs->play32 ? "Yes" : "No");
+ printk(OSST_DEB_MSG "osst%d:D: 32.5KB play back: %s\n", dev, bs->play32_5 ? "Yes" : "No");
+ printk(OSST_DEB_MSG "osst%d:D: 32KB record: %s\n", dev, bs->record32 ? "Yes" : "No");
+ printk(OSST_DEB_MSG "osst%d:D: 32.5KB record: %s\n", dev, bs->record32_5 ? "Yes" : "No");


X #endif
X
X /*

@@ -2239,16 +2445,12 @@
X SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE);
X *aSCpnt = SCpnt;
X if ((STp->buffer)->last_result_fatal != 0) {
- printk (KERN_ERR "osst%i: Couldn't set tape block size mode page\n", dev);
+ printk (KERN_ERR "osst%d:E: Couldn't set tape block size mode page\n", dev);
X return (-EIO);
X }
X
- STp->block_size = (STp->raw) ? OS_FRAME_SIZE : OS_DATA_SIZE;
- STp->min_block = OS_FRAME_SIZE; /* FIXME */
- STp->max_block = STp->block_size;
-
X #if DEBUG
- printk(KERN_INFO "osst%i: Block Size changed to 32.5K\n", dev);
+ printk(KERN_INFO "osst%d:D: Block Size changed to 32.5K\n", dev);
X /*
X * In debug mode, we want to see as many errors as possible
X * to test the error recovery mechanism.
@@ -2284,7 +2486,7 @@
X *aSCpnt = SCpnt;
X
X if ((STp->buffer)->last_result_fatal != 0) {
- printk (KERN_ERR "osst%i: Couldn't set vendor name to %s\n", dev,
+ printk (KERN_ERR "osst%d:E: Couldn't set vendor name to %s\n", dev,
X (char *) ((STp->buffer)->b_data + MODE_HEADER_LENGTH + 2));
X return (-EIO);
X }
@@ -2299,7 +2501,7 @@
X *aSCpnt = SCpnt;
X
X if ((STp->buffer)->last_result_fatal != 0) {
- printk (KERN_ERR "osst%i: can't get capabilities page\n", dev);
+ printk (KERN_ERR "osst%d:E: Can't get capabilities page\n", dev);
X return (-EIO);
X }
X
@@ -2319,7 +2521,7 @@
X *aSCpnt = SCpnt;
X
X if ((STp->buffer)->last_result_fatal != 0) {
- printk (KERN_ERR "osst%i: can't get tape parameter page\n", dev);
+ printk (KERN_ERR "osst%d:E: Can't get tape parameter page\n", dev);
X return (-EIO);
X }
X
@@ -2330,7 +2532,7 @@
X STp->density = prm->density;
X STp->capacity = ntohs(prm->segtrk) * ntohs(prm->trks);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Density %d, tape length: %dMB, drive buffer size: %dKB\n",
+ printk(OSST_DEB_MSG "osst%d:D: Density %d, tape length: %dMB, drive buffer size: %dKB\n",
X dev, STp->density, STp->capacity / 32, drive_buffer_size);
X #endif
X
@@ -2348,7 +2550,7 @@
X
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Stepping over filemark %s.\n",
+ printk(OSST_DEB_MSG "osst%d:D: Stepping over filemark %s.\n",
X dev, forward ? "forward" : "backward");
X #endif
X
@@ -2361,7 +2563,7 @@
X result = osst_seek_logical_blk(STp, aSCpnt, STp->logical_blk_num - 1);
X
X if (result < 0)
- printk(KERN_ERR "osst%d: Stepping over filemark %s failed.\n",
+ printk(KERN_WARNING "osst%d:W: Stepping over filemark %s failed.\n",
X dev, forward ? "forward" : "backward");
X
X return result;
@@ -2401,7 +2603,7 @@
X result = ((SCpnt->sense_buffer[2] & 0x0f) == 3) ? -EIO : -EINVAL;
X
X if (result == -EINVAL)
- printk(KERN_ERR "osst%d: Can't read tape position.\n", dev);
+ printk(KERN_ERR "osst%d:E: Can't read tape position.\n", dev);
X else {
X
X if (result == -EIO) { /* re-read position */
@@ -2425,7 +2627,7 @@
X STp->cur_frames = (STp->buffer)->b_data[15];
X #if DEBUG
X if (debugging) {
- printk(OSST_DEB_MSG "osst%d: Drive Positions: host %d, tape %d%s, buffer %d\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Drive Positions: host %d, tape %d%s, buffer %d\n", dev,
X STp->first_frame_position, STp->last_frame_position,
X ((STp->buffer)->b_data[0]&0x80)?" (BOP)":
X ((STp->buffer)->b_data[0]&0x40)?" (EOP)":"",
@@ -2434,7 +2636,7 @@
X #endif
X if (STp->cur_frames == 0 && STp->first_frame_position != STp->last_frame_position) {
X #if DEBUG
- printk(KERN_WARNING "osst%d: Correcting read position %d, %d, %d\n", dev,
+ printk(KERN_WARNING "osst%d:D: Correcting read position %d, %d, %d\n", dev,
X STp->first_frame_position, STp->last_frame_position, STp->cur_frames);
X #endif
X STp->first_frame_position = STp->last_frame_position;
@@ -2446,60 +2648,66 @@
X }
X
X
-/* Set the tape block */
-static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int block, int skip)
+/* Set the physical tape position */
+static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int ppos, int skip)
X {
- ST_partstat *STps;
- int result = 0;
- int timeout;
+ ST_partstat * STps;
+ int result = 0;
+ int pp = (ppos == 3000 && !skip) ? 0 : ppos;
X unsigned char scmd[MAX_COMMAND_SIZE];
X Scsi_Cmnd * SCpnt;
- int dev = TAPE_NR(STp->devt);
+ int dev = TAPE_NR(STp->devt);
X
X if (STp->ready != ST_READY)
X return (-EIO);
- timeout = STp->long_timeout;
X STps = &(STp->ps[STp->partition]);
X
- if (block < 0 || block > STp->capacity) {
- printk(KERN_ERR "osst%d: Reposition request %d out of range\n", dev, block);
- block = block < 0 ? 0 : (STp->capacity - 1);
+ if (ppos < 0 || ppos > STp->capacity) {
+ printk(KERN_WARNING "osst%d:W: Reposition request %d out of range\n", dev, ppos);
+ pp = ppos = ppos < 0 ? 0 : (STp->capacity - 1);
X result = (-EINVAL);
X }
+
+ do {
X #if DEBUG
- if (debugging)
- printk(OSST_DEB_MSG "osst%d: Setting block to %d.\n", dev, block);
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Setting physical position to %d.\n", dev, pp);
X #endif
- memset (scmd, 0, MAX_COMMAND_SIZE);
- scmd[0] = SEEK_10;
- scmd[1] = 1;
- scmd[3] = (block >> 24);
- scmd[4] = (block >> 16);
- scmd[5] = (block >> 8);
- scmd[6] = block;
- if (skip)
- scmd[9] = 0x80;
+ memset (scmd, 0, MAX_COMMAND_SIZE);
+ scmd[0] = SEEK_10;
+ scmd[1] = 1;
+ scmd[3] = (pp >> 24);
+ scmd[4] = (pp >> 16);
+ scmd[5] = (pp >> 8);
+ scmd[6] = pp;
+ if (skip)
+ scmd[9] = 0x80;
X
- SCpnt = osst_do_scsi(*aSCpnt, STp, scmd, 20, timeout, MAX_READY_RETRIES, TRUE);
- if (!SCpnt) {
+ SCpnt = osst_do_scsi(*aSCpnt, STp, scmd, 20, STp->long_timeout, MAX_READY_RETRIES, TRUE);
+ if (!SCpnt) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Busy\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Busy\n", dev);
X #endif
- return (-EBUSY);
- }
- *aSCpnt = SCpnt;
+ return (-EBUSY);
+ }
+ *aSCpnt = SCpnt;
X
- STp->first_frame_position = STp->last_frame_position = block;
- STps->eof = ST_NOEOF;
- if ((STp->buffer)->last_result_fatal != 0) {
+ if ((STp->buffer)->last_result_fatal != 0) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: SEEK command failed.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: SEEK command from %d to %d failed.\n",
+ dev, STp->first_frame_position, pp);
X #endif
- result = (-EIO);
- }
+ result = (-EIO);
+ }
+ if (pp != ppos)
+ osst_wait_ready(STp, aSCpnt, 5 * 60);
+ } while ((pp != ppos) && (pp = ppos));
+
+ STp->first_frame_position = STp->last_frame_position = ppos;
+ STps->eof = ST_NOEOF;
X STps->at_sm = 0;
X STps->rw = ST_IDLE;
- STp->logical_blk_in_buffer = 0;
+ STp->frame_in_buffer = 0;
X return result;
X }
X
@@ -2508,7 +2716,7 @@
X /* osst versions of st functions - augmented and stripped to suit OnStream only */
X
X /* Flush the write buffer (never need to write if variable blocksize). */
-static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int file_blk)
+static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt)
X {
X int offset, transfer, blks = 0;
X int result = 0;
@@ -2521,19 +2729,19 @@
X if (SCpnt == (STp->buffer)->last_SCpnt)
X #if DEBUG
X { printk(OSST_DEB_MSG
- "osst%d: aSCpnt points to Scsi_Cmnd that write_behind_check will release -- cleared\n", dev);
+ "osst%d:D: aSCpnt points to Scsi_Cmnd that write_behind_check will release -- cleared\n", dev);
X #endif
X *aSCpnt = SCpnt = NULL;
X #if DEBUG
X } else if (SCpnt)
X printk(OSST_DEB_MSG
- "osst%d: aSCpnt does not point to Scsi_Cmnd that write_behind_check will release -- strange\n", dev);
+ "osst%d:D: aSCpnt does not point to Scsi_Cmnd that write_behind_check will release -- strange\n", dev);
X #endif
X osst_write_behind_check(STp);
X if ((STp->buffer)->last_result_fatal) {
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Async write error (flush) %x.\n",
+ printk(OSST_DEB_MSG "osst%d:D: Async write error (flush) %x.\n",
X dev, (STp->buffer)->last_result);
X #endif
X if ((STp->buffer)->last_result == INT_MAX)
@@ -2545,15 +2753,13 @@
X result = 0;
X if (STp->dirty == 1) {
X
+ STp->write_count++;
+ STps = &(STp->ps[STp->partition]);
+ STps->rw = ST_WRITING;
X offset = STp->buffer->buffer_bytes;
+ blks = (offset + STp->block_size - 1) / STp->block_size;
X transfer = OS_FRAME_SIZE;
- blks = 1;
X
-#if DEBUG
- if (debugging)
- printk(OSST_DEB_MSG "osst%d: Flushing %d bytes, Tranfering %d bytes in %d blocks.\n",
- dev, offset, transfer, blks);
-#endif
X if (offset < OS_DATA_SIZE)
X osst_zero_buffer_tail(STp->buffer);
X
@@ -2564,17 +2770,48 @@
X memset(cmd, 0, MAX_COMMAND_SIZE);
X cmd[0] = WRITE_6;
X cmd[1] = 1;
- cmd[4] = blks;
+ cmd[4] = 1;
+
+ switch (STp->write_type) {
+ case OS_WRITE_DATA:
+#if DEBUG
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Writing %d blocks to frame %d, lblks %d-%d\n",
+ dev, blks, STp->frame_seq_number,
+ STp->logical_blk_num - blks, STp->logical_blk_num - 1);
+#endif
+ osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->frame_seq_number++,
+ STp->logical_blk_num - blks, STp->block_size, blks);
+ break;
+ case OS_WRITE_EOD:
+ osst_init_aux(STp, OS_FRAME_TYPE_EOD, STp->frame_seq_number++, STp->logical_blk_num, 0, 0);
+ break;
+ case OS_WRITE_NEW_MARK:
+ osst_init_aux(STp, OS_FRAME_TYPE_MARKER, STp->frame_seq_number++, STp->logical_blk_num++,
+ 0, blks=1);
+ break;
+ case OS_WRITE_HEADER:
+ osst_init_aux(STp, OS_FRAME_TYPE_HEADER, 0, 0, 0, blks=0);
+ break;
+ default: /* probably FILLER */
+ osst_init_aux(STp, OS_FRAME_TYPE_FILL, 0, 0, 0, 0);
+ }
+#if DEBUG
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Flushing %d bytes, Transfering %d bytes in %d lblocks.\n",
+ dev, offset, transfer, blks);
+#endif
X
X SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, transfer, STp->timeout, MAX_WRITE_RETRIES, TRUE);
X *aSCpnt = SCpnt;
X if (!SCpnt)
X return (-EBUSY);
X
- STps = &(STp->ps[STp->partition]);
X if ((STp->buffer)->last_result_fatal != 0) {
- printk(OSST_DEB_MSG "osst%d: write sense [0]=0x%02x [2]=%02x [12]=%02x [13]=%02x\n", TAPE_NR(STp->devt),
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: write sense [0]=0x%02x [2]=%02x [12]=%02x [13]=%02x\n", TAPE_NR(STp->devt),
X SCpnt->sense_buffer[0], SCpnt->sense_buffer[2], SCpnt->sense_buffer[12], SCpnt->sense_buffer[13]);
+#endif
X if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
X (SCpnt->sense_buffer[2] & 0x40) && /* FIXME - SC-30 drive doesn't assert EOM bit */
X (SCpnt->sense_buffer[2] & 0x0f) == NO_SENSE) {
@@ -2584,7 +2821,7 @@
X }
X else {
X if (osst_write_error_recovery(STp, aSCpnt, 1)) {
- printk(KERN_ERR "osst%d: Error on flush.\n", dev);
+ printk(KERN_ERR "osst%d:E: Error on flush write.\n", dev);
X result = (-EIO);
X }


X }
@@ -2592,15 +2829,12 @@
X }

X else {
X STp->first_frame_position++;
- if (file_blk && STps->drv_block >= 0)
- STps->drv_block += blks;
- STp->first_frame_position += blks;
X STp->dirty = 0;
X (STp->buffer)->buffer_bytes = 0;
X }
X }
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Exit flush write buffer with code %d\n", dev, result);
+ printk(OSST_DEB_MSG "osst%d:D: Exit flush write buffer with code %d\n", dev, result);
X #endif
X return result;
X }
@@ -2610,15 +2844,12 @@
X seek_next is true. */
X static int osst_flush_buffer(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int seek_next)
X {
- int backspace, result;
- OSST_buffer * STbuffer;
+ int backspace = 0, result = 0;
X ST_partstat * STps;
X #if DEBUG
X int dev = TAPE_NR(STp->devt);
X #endif
X
- STbuffer = STp->buffer;
-
X /*
X * If there was a bus reset, block further access
X * to this device.
@@ -2631,21 +2862,25 @@
X
X STps = &(STp->ps[STp->partition]);
X if (STps->rw == ST_WRITING) /* Writing */
- return osst_flush_write_buffer(STp, aSCpnt, 1);
+ return osst_flush_write_buffer(STp, aSCpnt);
X
X if (STp->block_size == 0)
X return 0;
X
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Reached flush (read) buffer\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Reached flush (read) buffer\n", dev);
X #endif
- backspace = ((STp->buffer)->buffer_bytes +
- (STp->buffer)->read_pointer) / STp->block_size -
- ((STp->buffer)->read_pointer + STp->block_size - 1) /
- STp->block_size;
- (STp->buffer)->buffer_bytes = 0;
- (STp->buffer)->read_pointer = 0;
- result = 0;
+
+ if (!STp->can_bsr) {
+ backspace = ((STp->buffer)->buffer_bytes +
+ (STp->buffer)->read_pointer) / STp->block_size -
+ ((STp->buffer)->read_pointer + STp->block_size - 1) /
+ STp->block_size; /* FIXME is this relevant w. OSST? */
+ STp->buffer->buffer_bytes = 0;
+ STp->buffer->read_pointer = 0;
+ STp->frame_in_buffer = 0;
+ }
+
X if (!seek_next) {
X if (STps->eof == ST_FM_HIT) {
X result = cross_eof(STp, aSCpnt, FALSE); /* Back over the EOF hit */
@@ -2671,6 +2906,87 @@
X
X }
X
+static int osst_write_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int synchronous)
+{
+ unsigned char cmd[MAX_COMMAND_SIZE];
+ Scsi_Cmnd * SCpnt;
+ int blks;
+#if DEBUG
+ int dev = TAPE_NR(STp->devt);
+#endif
+
+ if ((!STp-> raw) && (STp->first_frame_position == 0xbae)) { /* _must_ preserve buffer! */
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Reaching config partition.\n", dev);
+#endif
+ if (osst_flush_drive_buffer(STp, aSCpnt) < 0) {
+ return (-EIO);
+ }
+ /* error recovery may have bumped us past the header partition */
+ if (osst_get_frame_position(STp, aSCpnt) < 0xbb8) {
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping over config partition.\n", dev);
+#endif
+ osst_position_tape_and_confirm(STp, aSCpnt, 0xbb8);
+ }
+ }
+
+ if (STp->poll)
+ osst_wait_frame (STp, aSCpnt, STp->first_frame_position, -50, 60);
+ /* TODO: Check for an error ! */
+
+// osst_build_stats(STp, &SCpnt);
+
+ STp->ps[STp->partition].rw = ST_WRITING;
+ STp->write_type = OS_WRITE_DATA;
+
+ memset(cmd, 0, MAX_COMMAND_SIZE);
+ cmd[0] = WRITE_6;
+ cmd[1] = 1;
+ cmd[4] = 1; /* one frame at a time... */
+ blks = STp->buffer->buffer_bytes / STp->block_size;
+#if DEBUG
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Writing %d blocks to frame %d, lblks %d-%d\n", dev, blks,
+ STp->frame_seq_number, STp->logical_blk_num - blks, STp->logical_blk_num - 1);
+#endif
+ osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->frame_seq_number++,
+ STp->logical_blk_num - blks, STp->block_size, blks);
+
+#if DEBUG
+ if (!synchronous)
+ STp->write_pending = 1;
+#endif
+ SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_WRITE_RETRIES, synchronous);
+ if (!SCpnt)
+ return (-EBUSY);
+ *aSCpnt = SCpnt;
+
+ if (synchronous) {
+ if (STp->buffer->last_result_fatal != 0) {
+#if DEBUG
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Error on write:\n", dev);
+#endif
+ if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
+ (SCpnt->sense_buffer[2] & 0x40)) {
+ if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW)
+ return (-ENOSPC);
+ }
+ else {
+ if (osst_write_error_recovery(STp, aSCpnt, 1))
+ return (-EIO);
+ }
+ }
+ else
+ STp->first_frame_position++;
+ }
+
+ STp->write_count++;
+


+ return 0;
+}
+

X
X /* Entry points to osst */
X
@@ -2682,7 +2998,6 @@
X ssize_t i, do_count, blks, retval, transfer;
X int write_threshold;
X int doing_write = 0;
- unsigned char cmd[MAX_COMMAND_SIZE];
X const char *b_point;
X Scsi_Cmnd * SCpnt = NULL;
X OS_Scsi_Tape * STp;
@@ -2728,7 +3043,7 @@
X
X #if DEBUG
X if (!STp->in_use) {
- printk(OSST_DEB_MSG "osst%d: Incorrect device.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Incorrect device.\n", dev);
X return (-EIO);
X }
X #endif
@@ -2738,13 +3053,13 @@
X
X /* Write must be integral number of blocks */
X if (STp->block_size != 0 && (count % STp->block_size) != 0) {
- printk(KERN_WARNING "osst%d: Write (%d bytes) not multiple of tape block size (32k).\n",
- dev, count);
+ printk(KERN_ERR "osst%d:E: Write (%d bytes) not multiple of tape block size (%d%c).\n", dev, count,
+ STp->block_size<1024?STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k');
X return (-EIO);
X }
X
- if (STp->first_frame_position >= STp->capacity - 164) {
- printk(KERN_WARNING "osst%d: Write truncated at EOM early warning (frame %d).\n",
+ if (STp->first_frame_position >= STp->capacity - OSST_EOM_RESERVE) {
+ printk(KERN_ERR "osst%d:E: Write truncated at EOM early warning (frame %d).\n",
X dev, STp->first_frame_position);
X return (-ENOSPC);
X }
@@ -2765,63 +3080,64 @@
X }
X else if (STps->rw != ST_WRITING) {
X /* Are we totally rewriting this tape? */
- if (!STp->header_ok || STp->first_frame_position == STp->first_data_ppos ||
- (STps->drv_file == 0 && STps->drv_block == 0)) {
+ if (!STp->header_ok ||
+ (STp->first_frame_position == STp->first_data_ppos && STps->drv_block < 0) ||
+ (STps->drv_file == 0 && STps->drv_block == 0)) {
X STp->wrt_pass_cntr++;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Allocating next write pass counter: %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: Allocating next write pass counter: %d\n",
X dev, STp->wrt_pass_cntr);
X #endif
X osst_reset_header(STp, &SCpnt);
- STps->drv_file = STps->drv_block = STp->logical_blk_num = 0;
+ STps->drv_file = STps->drv_block = 0;
X }
X /* Do we know where we'll be writing on the tape? */
X else {
X if ((STp->fast_open && osst_verify_position(STp, &SCpnt)) ||
X STps->drv_file < 0 || STps->drv_block < 0) {
- if (STp->first_frame_position == STp->eod_frame_ppos) {
+ if (STp->first_frame_position == STp->eod_frame_ppos) { /* at EOD */
X STps->drv_file = STp->filemark_cnt;
X STps->drv_block = 0;
X }
X else {
X /* We have no idea where the tape is positioned - give up */
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Cannot write at indeterminate position.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Cannot write at indeterminate position.\n", dev);
X #endif
X if (SCpnt) scsi_release_command(SCpnt);
X return (-EIO);
X }
X }
- if (STps->drv_file > 0 && STps->drv_file < STp->filemark_cnt) {
- STp->filemark_cnt = STps->drv_file;
+ if ((STps->drv_file + STps->drv_block) > 0 && STps->drv_file < STp->filemark_cnt) {
+ STp->filemark_cnt = STps->drv_file;
X STp->last_mark_ppos = ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[STp->filemark_cnt-1]);
- printk(KERN_WARNING "osst%d: Overwriting file %d with old write pass counter %d\n",
+ STp->last_mark_lbn = STp->logical_blk_num - STps->drv_block;
+ printk(KERN_WARNING "osst%d:W: Overwriting file %d with old write pass counter %d\n",
X dev, STps->drv_file, STp->wrt_pass_cntr);
- printk(KERN_WARNING "osst%d: may lead to stale data being accepted on reading back!\n",
+ printk(KERN_WARNING "osst%d:W: may lead to stale data being accepted on reading back!\n",
X dev);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: resetting filemark count to %d and last mark ppos to %d\n",
- dev, STp->filemark_cnt, STp->last_mark_ppos);
+ printk(OSST_DEB_MSG "osst%d:D: resetting filemark count to %d and last mark ppos,lbn to %d,%d\n",
+ dev, STp->filemark_cnt, STp->last_mark_ppos, STp->last_mark_lbn);
X #endif
X }
X }
X STp->fast_open = FALSE;
-//printk(OSST_DEB_MSG "osst%d: Starting write next file\n",dev);
X }
X if (!STp->header_ok) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Write cannot proceed without valid headers\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Write cannot proceed without valid headers\n", dev);
X #endif
X if (SCpnt) scsi_release_command(SCpnt);
X return (-EIO);
X }
X if ((STp->buffer)->writing) {
-if (SCpnt) printk(KERN_ERR "osst%d: Not supposed to have SCpnt at line %d\n", dev, __LINE__);
+if (SCpnt) printk(KERN_ERR "osst%d:A: Not supposed to have SCpnt at line %d\n", dev, __LINE__);
X osst_write_behind_check(STp);
X if ((STp->buffer)->last_result_fatal) {
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Async write error (write) %x.\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Async write error (write) %x.\n", dev,
X (STp->buffer)->last_result);
X #endif
X if ((STp->buffer)->last_result == INT_MAX)
@@ -2844,10 +3160,6 @@
X return (-EFAULT);
X
X if (!STm->do_buffer_writes) {
-#if 0
- if (STp->block_size != 0 && (count % STp->block_size) != 0)
- return (-EIO); /* Write must be integral number of blocks */
-#endif
X write_threshold = 1;
X }
X else
@@ -2856,35 +3168,11 @@
X write_threshold--;
X
X total = count;
-
- if ((!STp-> raw) && (STp->first_frame_position == 0xbae)) {
-#if DEBUG
- printk(OSST_DEB_MSG "osst%d: Skipping over config partition.\n", dev);
-#endif
- if (osst_flush_drive_buffer(STp, &SCpnt) < 0) {
- if (SCpnt) scsi_release_command(SCpnt);
- return (-EIO);
- }
- /* error recovery may have bumped us past the header partition */
- if (osst_get_frame_position(STp, &SCpnt) < 0xbb8)
- osst_position_tape_and_confirm(STp, &SCpnt, 0xbb8);
- }
-
- if (STp->poll)
- retval = osst_wait_frame (STp, &SCpnt, STp->first_frame_position, -50, 60);
- /* TODO: Check for an error ! */
-//osst_build_stats(STp, &SCpnt);
- memset(cmd, 0, MAX_COMMAND_SIZE);
- cmd[0] = WRITE_6;
- cmd[1] = 1;
-
- STps->rw = ST_WRITING;
- STp->write_type = OS_WRITE_DATA;
-
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Writing %d bytes to file %d block %d lblk %d frame %d\n",
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Writing %d bytes to file %d block %d lblk %d fseq %d fppos %d\n",
X dev, count, STps->drv_file, STps->drv_block,
- STp->logical_blk_num, STp->first_frame_position);
+ STp->logical_blk_num, STp->frame_seq_number, STp->first_frame_position);
X #endif
X
X b_point = buf;
@@ -2905,84 +3193,60 @@
X return i;
X }
X
- transfer = OS_FRAME_SIZE;
- blks = 1;
-
- osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->logical_blk_num++ );
+ blks = do_count / STp->block_size;
+ STp->logical_blk_num += blks; /* logical_blk_num is incremented as data is moved from user */
X
- cmd[2] = blks >> 16;
- cmd[3] = blks >> 8;
- cmd[4] = blks;
+ i = osst_write_frame(STp, &SCpnt, TRUE);
X
- SCpnt = osst_do_scsi(SCpnt, STp, cmd, transfer, STp->timeout, MAX_WRITE_RETRIES, TRUE);
- if (!SCpnt)
- return (-EBUSY);
-
- if ((STp->buffer)->last_result_fatal != 0) {
-#if DEBUG
- if (debugging)
- printk(OSST_DEB_MSG "osst%d: Error on write:\n", dev);
-#endif
- if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
- (SCpnt->sense_buffer[2] & 0x40)) {
- if ((SCpnt->sense_buffer[0] & 0x80) != 0)
- transfer = (SCpnt->sense_buffer[3] << 24) |
- (SCpnt->sense_buffer[4] << 16) |
- (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
- else
- transfer = 0;
- transfer *= STp->block_size;
+ if (i == (-ENOSPC)) {
+ transfer = STp->buffer->writing; /* FIXME -- check this logic */
X if (transfer <= do_count) {
- filp->f_pos += do_count - transfer;
- count -= do_count - transfer;
- if (STps->drv_block >= 0) {
- STps->drv_block += (do_count - transfer) / STp->block_size;
- }
- STps->eof = ST_EOM_OK;
- retval = (-ENOSPC); /* EOM within current request */
+ filp->f_pos += do_count - transfer; /* some of the data made it */
+ count -= do_count - transfer;
+ if (STps->drv_block >= 0) {
+ STps->drv_block += (do_count - transfer) / STp->block_size;
+ }
+ STps->eof = ST_EOM_OK;
+ retval = (-ENOSPC); /* EOM within current request */
X #if DEBUG
- if (debugging)
- printk(OSST_DEB_MSG "osst%d: EOM with %d bytes unwritten.\n",
- dev, transfer);
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: EOM with %d bytes unwritten.\n", dev, transfer);
X #endif
X }
X else {
- STps->eof = ST_EOM_ERROR;
- STps->drv_block = (-1); /* Too cautious? */
- retval = (-EIO); /* EOM for old data */
+ STps->eof = ST_EOM_ERROR;
+ STps->drv_block = (-1); /* Too cautious? */
+ retval = (-EIO); /* EOM for old data */
X #if DEBUG
- if (debugging)
- printk(OSST_DEB_MSG "osst%d: EOM with lost data.\n", dev);
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: EOM with lost data.\n", dev);
X #endif
X }
- }
- else {
- if (osst_write_error_recovery(STp, &SCpnt, 1) == 0) goto ok;
- STps->drv_block = (-1); /* Too cautious? */
- retval = (-EIO);
- }
+ } else
+ retval = i;
X
- scsi_release_command(SCpnt);
- SCpnt = NULL;
- (STp->buffer)->buffer_bytes = 0;
- STp->dirty = 0;
- if (count < total)
- return total - count;
- else
- return retval;
- }
- STp->first_frame_position++;
-ok:
+ if (retval < 0) {
+ if (SCpnt != NULL) {
+ scsi_release_command(SCpnt);
+ SCpnt = NULL;
+ }
+ STp->buffer->buffer_bytes = 0;
+ STp->dirty = 0;
+ if (count < total)
+ return total - count;
+ else
+ return retval;
+ }
X filp->f_pos += do_count;
X b_point += do_count;
X count -= do_count;
X if (STps->drv_block >= 0) {
X STps->drv_block += blks;
X }
- STp->first_frame_position += blks;
- (STp->buffer)->buffer_bytes = 0;
+ STp->buffer->buffer_bytes = 0;
X STp->dirty = 0;
- }
+ } /* end while write threshold exceeded */
+
X if (count != 0) {
X STp->dirty = 1;
X i = append_to_buffer(b_point, STp->buffer, count);
@@ -2993,6 +3257,11 @@
X }
X return i;
X }
+ blks = count / STp->block_size;
+ STp->logical_blk_num += blks;
+ if (STps->drv_block >= 0) {
+ STps->drv_block += blks;
+ }
X filp->f_pos += count;
X count = 0;
X }
@@ -3004,28 +3273,15 @@
X }
X
X if (STm->do_async_writes &&
- ((STp->buffer)->buffer_bytes >= STp->write_threshold &&
- (STp->buffer)->buffer_bytes >= OS_DATA_SIZE) ) {
+ (STp->buffer->buffer_bytes >= STp->write_threshold)) {
X /* Schedule an asynchronous write */
X (STp->buffer)->writing = ((STp->buffer)->buffer_bytes /
X STp->block_size) * STp->block_size;
X STp->dirty = !((STp->buffer)->writing ==
X (STp->buffer)->buffer_bytes);
X
- transfer = OS_FRAME_SIZE;
- blks = 1;
-
- osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->logical_blk_num++ );
-
- cmd[2] = blks >> 16;
- cmd[3] = blks >> 8;
- cmd[4] = blks;
-#if DEBUG
- STp->write_pending = 1;
-#endif
-
- SCpnt = osst_do_scsi(SCpnt, STp, cmd, transfer, STp->timeout, MAX_WRITE_RETRIES, FALSE);
- if (SCpnt == NULL)
+ i = osst_write_frame(STp, &SCpnt, FALSE);
+ if (i < 0)
X return (-EIO);
X }
X else if (SCpnt != NULL) {
@@ -3036,7 +3292,7 @@
X if (total > 0)
X STps->eof = ST_NOEOF;
X
- return( total);
+ return total;
X }
X
X
@@ -3081,19 +3337,13 @@
X return (-ENXIO);
X #if DEBUG
X if (!STp->in_use) {
- printk(OSST_DEB_MSG "osst%d: Incorrect device.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Incorrect device.\n", dev);
X return (-EIO);
X }
X #endif
X /* Must have initialized medium */
X if (!STp->header_ok) return (-EIO);
X
- if ((count % STp->block_size) != 0) {
- printk(KERN_WARNING "osst%d: Use multiple of %d bytes as block size (%d requested)\n",
- dev, STp->block_size, count);
- return (-EIO); /* Read must be integral number of blocks */
- }
-
X if (STp->do_auto_lock && STp->door_locked == ST_UNLOCKED &&
X !osst_int_ioctl(STp, &SCpnt, MTLOCK, 0))
X STp->door_locked = ST_LOCKED_AUTO;
@@ -3108,9 +3358,14 @@
X STps->rw = ST_IDLE;
X }
X
+ if ((count % STp->block_size) != 0) {
+ printk(KERN_WARNING "osst%d:W: Read (%d bytes) not multiple of tape block size (%d%c).\n", dev, count,
+ STp->block_size<1024?STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k');
+ }
+
X #if DEBUG
X if (debugging && STps->eof != ST_NOEOF)
- printk(OSST_DEB_MSG "osst%d: EOF/EOM flag up (%d). Bytes %d\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: EOF/EOM flag up (%d). Bytes %d\n", dev,
X STps->eof, (STp->buffer)->buffer_bytes);
X #endif
X if ((STp->buffer)->buffer_bytes == 0 &&
@@ -3134,39 +3389,49 @@
X }
X
X /* Loop until enough data in buffer or a special condition found */
- for (total = 0, special = 0; total < count && !special; ) {
+ for (total = 0, special = 0; total < count - STp->block_size + 1 && !special; ) {
X
X /* Get new data if the buffer is empty */
X if ((STp->buffer)->buffer_bytes == 0) {
- special = osst_get_logical_blk(STp, &SCpnt, STp->logical_blk_num, 0);
- STp->buffer->buffer_bytes = special ? 0 : OS_DATA_SIZE;
- STp->buffer->read_pointer = 0;
- STp->logical_blk_num++; /* block to look for next time */
- STp->logical_blk_in_buffer = 0;
+ if (STps->eof == ST_FM_HIT)
+ break;
+ special = osst_get_logical_frame(STp, &SCpnt, STp->frame_seq_number, 0);
X if (special < 0) { /* No need to continue read */
+ STp->frame_in_buffer = 0;
X if (SCpnt) scsi_release_command(SCpnt);
X return special;
- }
- STps->drv_block++;
+ }
X }
X
X /* Move the data from driver buffer to user buffer */
X if ((STp->buffer)->buffer_bytes > 0) {
X #if DEBUG
X if (debugging && STps->eof != ST_NOEOF)
- printk(OSST_DEB_MSG "osst%d: EOF up (%d). Left %d, needed %d.\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: EOF up (%d). Left %d, needed %d.\n", dev,
X STps->eof, (STp->buffer)->buffer_bytes, count - total);
X #endif
- transfer = (STp->buffer)->buffer_bytes < count - total ?
- (STp->buffer)->buffer_bytes : count - total;
+ transfer = (((STp->buffer)->buffer_bytes < count - total ?
+ (STp->buffer)->buffer_bytes : count - total)/
+ STp->block_size) * STp->block_size; /* force multiple of block size */
X i = from_buffer(STp->buffer, buf, transfer);
X if (i) {
X if (SCpnt) scsi_release_command(SCpnt);
X return i;
X }
- filp->f_pos += transfer;
- buf += transfer;
- total += transfer;
+ STp->logical_blk_num += transfer / STp->block_size;
+ STps->drv_block += transfer / STp->block_size;
+ filp->f_pos += transfer;
+ buf += transfer;
+ total += transfer;
+ }
+
+ if ((STp->buffer)->buffer_bytes == 0) {
+#if DEBUG
+ if (debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Finished with frame %d\n", dev, STp->frame_seq_number);
+#endif
+ STp->frame_in_buffer = 0;
+ STp->frame_seq_number++; /* frame to look for next time */
X }
X
X } /* for (total = 0, special = 0; total < count && !special; ) */
@@ -3200,21 +3465,21 @@
X static void osst_log_options(OS_Scsi_Tape *STp, ST_mode *STm, int dev)
X {
X printk(KERN_INFO
-"osst%d: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n",
+"osst%d:I: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n",
X dev, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes,
X STm->do_read_ahead);
X printk(KERN_INFO
-"osst%d: can bsr: %d, two FMs: %d, fast mteom: %d, auto lock: %d,\n",
+"osst%d:I: can bsr: %d, two FMs: %d, fast mteom: %d, auto lock: %d,\n",
X dev, STp->can_bsr, STp->two_fm, STp->fast_mteom, STp->do_auto_lock);
X printk(KERN_INFO
-"osst%d: defs for wr: %d, no block limits: %d, partitions: %d, s2 log: %d\n",
+"osst%d:I: defs for wr: %d, no block limits: %d, partitions: %d, s2 log: %d\n",
X dev, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions,
X STp->scsi2_logical);
X printk(KERN_INFO
-"osst%d: sysv: %d\n", dev, STm->sysv);
+"osst%d:I: sysv: %d\n", dev, STm->sysv);
X #if DEBUG
X printk(KERN_INFO
- "osst%d: debugging: %d\n",
+ "osst%d:D: debugging: %d\n",
X dev, debugging);
X #endif
X }
@@ -3233,7 +3498,7 @@
X modes_defined = TRUE;
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Initialized mode %d definition from mode 0\n",
+ printk(OSST_DEB_MSG "osst%d:D: Initialized mode %d definition from mode 0\n",
X dev, STp->current_mode);
X #endif
X }
@@ -3294,23 +3559,28 @@
X else if (code == MT_ST_WRITE_THRESHOLD) {
X value = (options & ~MT_ST_OPTIONS) * ST_KILOBYTE;
X if (value < 1 || value > osst_buffer_size) {
- printk(KERN_WARNING "osst%d: Write threshold %d too small or too large.\n",
+ printk(KERN_WARNING "osst%d:W: Write threshold %d too small or too large.\n",
X dev, value);
X return (-EIO);
X }
X STp->write_threshold = value;
- printk(KERN_INFO "osst%d: Write threshold set to %d bytes.\n",
+ printk(KERN_INFO "osst%d:I: Write threshold set to %d bytes.\n",
X dev, value);
X }
X else if (code == MT_ST_DEF_BLKSIZE) {
X value = (options & ~MT_ST_OPTIONS);
X if (value == ~MT_ST_OPTIONS) {
X STm->default_blksize = (-1);
- printk(KERN_INFO "osst%d: Default block size disabled.\n", dev);
+ printk(KERN_INFO "osst%d:I: Default block size disabled.\n", dev);
X }
X else {
+ if (value < 512 || value > OS_DATA_SIZE || OS_DATA_SIZE % value) {
+ printk(KERN_WARNING "osst%d:W: Default block size cannot be set to %d.\n",
+ dev, value);
+ return (-EINVAL);
+ }
X STm->default_blksize = value;
- printk(KERN_INFO "osst%d: Default block size set to %d bytes.\n",
+ printk(KERN_INFO "osst%d:I: Default block size set to %d bytes.\n",
X dev, STm->default_blksize);
X }
X }
@@ -3318,12 +3588,12 @@
X value = (options & ~MT_ST_OPTIONS);
X if ((value & MT_ST_SET_LONG_TIMEOUT) != 0) {
X STp->long_timeout = (value & ~MT_ST_SET_LONG_TIMEOUT) * HZ;
- printk(KERN_INFO "osst%d: Long timeout set to %d seconds.\n", dev,
+ printk(KERN_INFO "osst%d:I: Long timeout set to %d seconds.\n", dev,
X (value & ~MT_ST_SET_LONG_TIMEOUT));
X }
X else {
X STp->timeout = value * HZ;
- printk(KERN_INFO "osst%d: Normal timeout set to %d seconds.\n", dev,
+ printk(KERN_INFO "osst%d:I: Normal timeout set to %d seconds.\n", dev,
X value);
X }
X }
@@ -3333,33 +3603,33 @@
X if (code == MT_ST_DEF_DENSITY) {
X if (value == MT_ST_CLEAR_DEFAULT) {
X STm->default_density = (-1);
- printk(KERN_INFO "osst%d: Density default disabled.\n", dev);
+ printk(KERN_INFO "osst%d:I: Density default disabled.\n", dev);
X }
X else {
X STm->default_density = value & 0xff;
- printk(KERN_INFO "osst%d: Density default set to %x\n",
+ printk(KERN_INFO "osst%d:I: Density default set to %x\n",
X dev, STm->default_density);
X }
X }
X else if (code == MT_ST_DEF_DRVBUFFER) {
X if (value == MT_ST_CLEAR_DEFAULT) {
X STp->default_drvbuffer = 0xff;
- printk(KERN_INFO "osst%d: Drive buffer default disabled.\n", dev);
+ printk(KERN_INFO "osst%d:I: Drive buffer default disabled.\n", dev);
X }
X else {
X STp->default_drvbuffer = value & 7;
- printk(KERN_INFO "osst%d: Drive buffer default set to %x\n",
+ printk(KERN_INFO "osst%d:I: Drive buffer default set to %x\n",
X dev, STp->default_drvbuffer);
X }
X }
X else if (code == MT_ST_DEF_COMPRESSION) {
X if (value == MT_ST_CLEAR_DEFAULT) {
X STm->default_compression = ST_DONT_TOUCH;
- printk(KERN_INFO "osst%d: Compression default disabled.\n", dev);
+ printk(KERN_INFO "osst%d:I: Compression default disabled.\n", dev);
X }
X else {
X STm->default_compression = (value & 1 ? ST_YES : ST_NO);
- printk(KERN_INFO "osst%d: Compression default set to %x\n",
+ printk(KERN_INFO "osst%d:I: Compression default set to %x\n",
X dev, (value & 1));
X }
X }
@@ -3382,7 +3652,7 @@
X Scsi_Cmnd * SCpnt = *aSCpnt;
X ST_partstat * STps;
X int fileno, blkno, at_sm, datalen;
- int logical_blk_num;
+ int frame_seq_numbr, logical_blk_num;
X int dev = TAPE_NR(STp->devt);
X
X if (STp->ready != ST_READY && cmd_in != MTLOAD) {
@@ -3396,6 +3666,7 @@
X fileno = STps->drv_file;
X blkno = STps->drv_block;
X at_sm = STps->at_sm;
+ frame_seq_numbr = STp->frame_seq_number;
X logical_blk_num = STp->logical_blk_num;
X
X memset(cmd, 0, MAX_COMMAND_SIZE);
@@ -3410,7 +3681,6 @@
X ioctl_result = osst_space_over_filemarks_forward_fast(STp, &SCpnt, cmd_in, arg);
X else
X ioctl_result = osst_space_over_filemarks_forward_slow(STp, &SCpnt, cmd_in, arg);
- logical_blk_num = STp->logical_blk_num;
X if (fileno >= 0)
X fileno += arg;
X blkno = 0;
@@ -3423,7 +3693,6 @@
X if (STp->raw)
X return (-EIO);
X ioctl_result = osst_space_over_filemarks_backward(STp, &SCpnt, cmd_in, arg);
- logical_blk_num = STp->logical_blk_num;
X if (fileno >= 0)
X fileno -= arg;
X blkno = (-1); /* We can't know the block number */
@@ -3434,7 +3703,7 @@
X case MTBSR:
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%i: Skipping %lu blocks %s from logical block %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: Skipping %lu blocks %s from logical block %d\n",
X dev, arg, cmd_in==MTFSR?"forward":"backward", logical_blk_num);
X #endif
X if (cmd_in == MTFSR) {
@@ -3445,8 +3714,9 @@
X logical_blk_num -= arg;
X if (blkno >= 0) blkno -= arg;
X }
- ioctl_result = osst_seek_logical_blk(STp, &SCpnt, logical_blk_num-1);
- STp->logical_blk_in_buffer = 0;
+ ioctl_result = osst_seek_logical_blk(STp, &SCpnt, logical_blk_num);
+ fileno = STps->drv_file;
+ blkno = STps->drv_block;
X at_sm &= (arg == 0);
X goto os_bypass;
X
@@ -3458,7 +3728,7 @@
X cmd[4] = arg;
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Spacing tape forward %d setmarks.\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Spacing tape forward %d setmarks.\n", dev,
X cmd[2] * 65536 + cmd[3] * 256 + cmd[4]);
X #endif
X if (arg != 0) {
@@ -3478,7 +3748,7 @@
X if (cmd[2] & 0x80)
X ltmp = 0xff000000;
X ltmp = ltmp | (cmd[2] << 16) | (cmd[3] << 8) | cmd[4];
- printk(OSST_DEB_MSG "osst%d: Spacing tape backward %ld setmarks.\n",
+ printk(OSST_DEB_MSG "osst%d:D: Spacing tape backward %ld setmarks.\n",
X dev, (-ltmp));
X }
X #endif
@@ -3489,12 +3759,11 @@
X break;
X case MTWEOF:
X if ( STps->rw == ST_WRITING && !(STp->device)->was_reset)
- ioctl_result = osst_flush_write_buffer(STp, &SCpnt, 1);
+ ioctl_result = osst_flush_write_buffer(STp, &SCpnt);
X else
X ioctl_result = 0;
X for (i=0; i<arg; i++)
X ioctl_result |= osst_write_filemark(STp, &SCpnt);
- logical_blk_num = STp->logical_blk_num;
X if (fileno >= 0) fileno += arg;
X if (blkno >= 0) blkno = 0;
X goto os_bypass;
@@ -3514,10 +3783,10 @@
X #if DEBUG
X if (debugging) {
X if (cmd_in == MTWEOF)
- printk(OSST_DEB_MSG "osst%d: Writing %d filemarks.\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Writing %d filemarks.\n", dev,
X cmd[2] * 65536 + cmd[3] * 256 + cmd[4]);
X else
- printk(OSST_DEB_MSG "osst%d: Writing %d setmarks.\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Writing %d setmarks.\n", dev,
X cmd[2] * 65536 + cmd[3] * 256 + cmd[4]);
X }
X #endif
@@ -3543,50 +3812,49 @@
X if (debugging) {
X switch (cmd_in) {
X case MTUNLOAD:
- printk(OSST_DEB_MSG "osst%d: Unloading tape.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Unloading tape.\n", dev);
X break;
X case MTLOAD:
- printk(OSST_DEB_MSG "osst%d: Loading tape.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Loading tape.\n", dev);
X break;
X case MTRETEN:
- printk(OSST_DEB_MSG "osst%d: Retensioning tape.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Retensioning tape.\n", dev);
X break;
X case MTOFFL:
- printk(OSST_DEB_MSG "osst%d: Ejecting tape.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Ejecting tape.\n", dev);
X break;
X }
X }
X #endif
- fileno = blkno = at_sm = logical_blk_num = 0 ;
+ fileno = blkno = at_sm = frame_seq_numbr = logical_blk_num = 0 ;
X break;
X case MTNOP:
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: No op on tape.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: No-op on tape.\n", dev);
X #endif
X return 0; /* Should do something ? */
X break;
X case MTEOM:
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Spacing to end of recorded medium.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Spacing to end of recorded medium.\n", dev);
X #endif
X osst_set_frame_position(STp, &SCpnt, STp->eod_frame_ppos, 0);
- if (osst_get_logical_blk(STp, &SCpnt, -1, 0) < 0) {
+ if (osst_get_logical_frame(STp, &SCpnt, -1, 0) < 0) {
X ioctl_result = -EIO;
X goto os_bypass;
X }
X if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_EOD) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: No EOD frame found where expected.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: No EOD frame found where expected.\n", dev);
X #endif
X ioctl_result = -EIO;
X goto os_bypass;
X }
X ioctl_result = osst_set_frame_position(STp, &SCpnt, STp->eod_frame_ppos, 0);
- logical_blk_num = STp->logical_blk_num;
- fileno = STp->filemark_cnt;
- blkno = at_sm = 0;
+ fileno = STp->filemark_cnt;
+ blkno = at_sm = 0;
X goto os_bypass;
X
X case MTERASE:
@@ -3597,7 +3865,7 @@
X if (i < ioctl_result) ioctl_result = i;
X i = osst_position_tape_and_confirm(STp, &SCpnt, STp->eod_frame_ppos);
X if (i < ioctl_result) ioctl_result = i;
- fileno = blkno = at_sm = logical_blk_num = 0 ;
+ fileno = blkno = at_sm = 0 ;
X goto os_bypass;
X
X case MTREW:
@@ -3605,9 +3873,9 @@
X cmd[1] = 1;
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Rewinding tape, Immed=%d.\n", dev, cmd[1]);
+ printk(OSST_DEB_MSG "osst%d:D: Rewinding tape, Immed=%d.\n", dev, cmd[1]);
X #endif
- fileno = blkno = at_sm = logical_blk_num = 0 ;
+ fileno = blkno = at_sm = frame_seq_numbr = logical_blk_num = 0 ;
X break;
X
X case MTLOCK:
@@ -3616,8 +3884,8 @@
X cmd[4] = SCSI_REMOVAL_PREVENT;
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Locking drive door.\n", dev);
-#endif;
+ printk(OSST_DEB_MSG "osst%d:D: Locking drive door.\n", dev);
+#endif
X break;
X
X case MTUNLOCK:
@@ -3626,8 +3894,8 @@
X cmd[4] = SCSI_REMOVAL_ALLOW;
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: Unlocking drive door.\n", dev);
-#endif;
+ printk(OSST_DEB_MSG "osst%d:D: Unlocking drive door.\n", dev);
+#endif
X break;
X
X case MTSETBLK: /* Set block length */
@@ -3642,10 +3910,10 @@
X ((arg & MT_ST_BLKSIZE_MASK) < STp->min_block ||
X (arg & MT_ST_BLKSIZE_MASK) > STp->max_block ||
X (arg & MT_ST_BLKSIZE_MASK) > osst_buffer_size)) {
- printk(KERN_WARNING "osst%d: Illegal block size.\n", dev);
+ printk(KERN_WARNING "osst%d:W: Illegal block size.\n", dev);
X return (-EINVAL);
X }
- return 0; /* silently ignore if block size didn't change */
+ return 0; /* FIXME silently ignore if block size didn't change */
X
X default:
X return (-ENOSYS);
@@ -3654,20 +3922,25 @@
X SCpnt = osst_do_scsi(SCpnt, STp, cmd, datalen, timeout, MAX_RETRIES, TRUE);
X if (!SCpnt) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Couldn't exec scsi cmd for IOCTL\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't exec scsi cmd for IOCTL\n", dev);
X #endif
X return (-EBUSY);
X }
X
X ioctl_result = (STp->buffer)->last_result_fatal;
X
+ if (!ioctl_result) { /* SCSI command successful */
+ STp->frame_seq_number = frame_seq_numbr;
+ STp->logical_blk_num = logical_blk_num;
+ }
+
X os_bypass:
X #if DEBUG
X if (debugging)
- printk(OSST_DEB_MSG "osst%d: IOCTL (%d) Result=%d\n", dev, cmd_in, ioctl_result);
+ printk(OSST_DEB_MSG "osst%d:D: IOCTL (%d) Result=%d\n", dev, cmd_in, ioctl_result);
X #endif
X
- if (!ioctl_result) { /* SCSI command successful */
+ if (!ioctl_result) {
X
X if (cmd_in == MTFSFM) {
X fileno--;
@@ -3680,7 +3953,6 @@
X STps->drv_block = blkno;
X STps->drv_file = fileno;
X STps->at_sm = at_sm;
- STp->logical_blk_num = logical_blk_num;
X
X if (cmd_in == MTLOCK)
X STp->door_locked = ST_LOCKED_EXPLICIT;
@@ -3700,7 +3972,7 @@
X /* STp->rew_at_close = (MINOR(inode->i_rdev) & 0x80) == 0; FIXME */
X for (i=0; i < ST_NBR_PARTITIONS; i++) {
X STp->ps[i].rw = ST_IDLE;
- STp->ps[i].last_block_valid = FALSE;
+ STp->ps[i].last_block_valid = FALSE; /* FIXME - where else is this field maintained? */
X }
X STp->partition = 0;
X }
@@ -3769,12 +4041,12 @@
X return (-ENXIO);
X
X if( !scsi_block_when_processing_errors(STp->device) ) {
- return -ENXIO;
+ return (-ENXIO);
X }
X
X if (STp->in_use) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Device already in use.\n", dev);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 57'
echo 'File patch-2.2.20 is continued in part 58'
echo "58" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:40 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part41

#!/bin/sh -x
# this is part 41 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 41; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTBSF: Backward space over 'count' file marks. The tape is positioned at
+ * the EOT (End of Tape) side of the last skipped file mark.
+ */
+ccw_req_t *
+tape34xx_mtbsf (tape_info_t * ti, int count)


+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbsf parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbsf nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+ for (i = 0; i < count; i++) {

+ ccw->cmd_code = BACKSPACEFILE;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ }
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_BSF_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xbsf ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTFSR: Forward space over 'count' tape blocks (blocksize is set
+ * via MTSETBLK.
+ */
+ccw_req_t *
+tape34xx_mtfsr (tape_info_t * ti, int count)


+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xfsr parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xfsr nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+ for (i = 0; i < count; i++) {

+ ccw->cmd_code = FORSPACEBLOCK;
+ ccw->flags = CCW_FLAG_CC;

+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ }
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_FSB_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xfsr ccwgen");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTBSR: Backward space over 'count' tape blocks.
+ * (blocksize is set via MTSETBLK.
+ */
+ccw_req_t *
+tape34xx_mtbsr (tape_info_t * ti, int count)


+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbsr parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbsr nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+ for (i = 0; i < count; i++) {

+ ccw->cmd_code = BACKSPACEBLOCK;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ }
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_BSB_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xbsr ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTWEOF: Write 'count' file marks at the current position.
+ */
+ccw_req_t *
+tape34xx_mtweof (tape_info_t * ti, int count)


+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xweo parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xweo nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+ for (i = 0; i < count; i++) {

+ ccw->cmd_code = WRITETAPEMARK;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;

+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ }
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));

+ ccw++;


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_WTM_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xweo ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTREW: Rewind the tape.
+ */
+ccw_req_t *
+tape34xx_mtrew (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 3, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xrew nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = REWIND;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_REW_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xrew ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTOFFL: Rewind the tape and put the drive off-line.
+ * Implement 'rewind unload'
+ */
+ccw_req_t *
+tape34xx_mtoffl (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 3, 32);


+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xoff nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = REWIND_UNLOAD;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;

+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;

+ ccw->cmd_code = SENSE;


+ ccw->flags = 0;

+ ccw->count = 32;
+ ccw->cda = (unsigned long) cqr->cpaddr;


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_RUN_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xoff ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTNOP: 'No operation'.
+ */
+ccw_req_t *
+tape34xx_mtnop (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 1, 0);


+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xnop nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;

+ ccw->cda = (unsigned long) ccw->cmd_code;


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xnop ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTBSFM: Backward space over 'count' file marks.
+ * The tape is positioned at the BOT (Begin Of Tape) side of the
+ * last skipped file mark.
+ */
+ccw_req_t *
+tape34xx_mtbsfm (tape_info_t * ti, int count)


+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbsm parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbsm nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+ for (i = 0; i < count; i++) {

+ ccw->cmd_code = BACKSPACEFILE;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ }
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_BSF_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xbsm ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTFSFM: Forward space over 'count' file marks.
+ * The tape is positioned at the BOT (Begin Of Tape) side
+ * of the last skipped file mark.
+ */
+ccw_req_t *
+tape34xx_mtfsfm (tape_info_t * ti, int count)


+{
+ long lockflags;
+ int i;
+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ if ((count == 0) || (count > 510)) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xfsm parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ cqr = tape_alloc_ccw_req (ti, 2 + count, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xfsm nomem");

+ debug_text_event (tape_debug_area,6,"xfsm ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTEOM: positions at the end of the portion of the tape already used
+ * for recordind data. MTEOM positions after the last file mark, ready for
+ * appending another file.
+ * MTRETEN: Retension the tape, i.e. forward space to end of tape and rewind.
+ */
+ccw_req_t *
+tape34xx_mteom (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 4, 0);


+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xeom nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = FORSPACEFILE;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;

+ ccw->cmd_code = NOP;

+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;

+ ccw->cmd_code = CCW_CMD_TIC;


+ ccw->flags = 0;
+ ccw->count = 0;

+ ccw->cda = (unsigned long) (cqr->cpaddr);


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;
+ tapestate_set (ti, TS_FSF_INIT);
+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xeom ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTERASE: erases the tape.
+ */
+ccw_req_t *
+tape34xx_mterase (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 5, 0);


+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xera nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = REWIND;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;

+ ccw->cmd_code = ERASE_GAP;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;

+ ccw->cmd_code = DATA_SEC_ERASE;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_DSE_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xera ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTSETDENSITY: set tape density.
+ */
+ccw_req_t *
+tape34xx_mtsetdensity (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xden nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xden ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTSEEK: seek to the specified block.
+ */
+ccw_req_t *
+tape34xx_mtseek (tape_info_t * ti, int count)
+{
+ long lockflags;
+ __u8 *data;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ if ((data = kmalloc (4 * sizeof (__u8), GFP_KERNEL)) == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xsee nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }

+ data[0] = 0x01;
+ data[1] = data[2] = data[3] = 0x00;
+ if (count >= 4194304) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xsee parm");
+#endif /* TAPE_DEBUG */
+ kfree(data);
+ return NULL;
+ }
+ if (((tape34xx_disc_data_t *) ti->discdata)->modeset_byte & 0x08) // IDRC on
+
+ data[1] = data[1] | 0x80;
+ data[3] += count % 256;
+ data[2] += (count / 256) % 256;
+ data[1] += (count / 65536);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xsee id:");
+ debug_int_event (tape_debug_area,6,count);
+#endif /* TAPE_DEBUG */


+ cqr = tape_alloc_ccw_req (ti, 3, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xsee nomem");
+#endif /* TAPE_DEBUG */
+ kfree (data);


+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = LOCATE;


+ ccw->flags = CCW_FLAG_CC;

+ ccw->count = 4;
+ set_normalized_cda (ccw, (unsigned long) data);


+ ccw++;
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;

+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);

+ ti->kernbuf = data;


+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_LBL_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xsee ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTTELL: Tell block. Return the number of block relative to current file.
+ */
+ccw_req_t *
+tape34xx_mttell (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;
+ void *mem;
+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xtel nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }

+ mem = kmalloc (8, GFP_KERNEL);


+ if (!mem) {
+ tape_free_request (cqr);
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xtel nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;
+

+ ccw->cmd_code = READ_BLOCK_ID;


+ ccw->flags = 0;

+ ccw->count = 8;


+ set_normalized_cda (ccw, (unsigned long) mem);

+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = mem;

+ ti->userbuf = NULL;
+ tapestate_set (ti, TS_RBI_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xtel ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTSETDRVBUFFER: Set the tape drive buffer code to number.
+ * Implement NOP.
+ */
+ccw_req_t *
+tape34xx_mtsetdrvbuffer (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xbuf nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xbuf ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTLOCK: Locks the tape drive door.
+ * Implement NOP CCW command.
+ */
+ccw_req_t *
+tape34xx_mtlock (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xloc nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xloc ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTUNLOCK: Unlocks the tape drive door.
+ * Implement the NOP CCW command.
+ */
+ccw_req_t *
+tape34xx_mtunlock (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xulk nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xulk ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTLOAD: Loads the tape.
+ * This function is not implemented and returns NULL, which causes the Frontend to wait for a medium being loaded.
+ * The 3480/3490 type Tapes do not support a load command
+ */
+ccw_req_t *
+tape34xx_mtload (tape_info_t * ti, int count)
+{
+ return NULL;
+}
+
+/*
+ * MTUNLOAD: Rewind the tape and unload it.
+ */
+ccw_req_t *
+tape34xx_mtunload (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 3, 32);


+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xunl nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = REWIND_UNLOAD;


+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;

+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ ccw++;

+ ccw->cmd_code = SENSE;


+ ccw->flags = 0;

+ ccw->count = 32;
+ ccw->cda = (unsigned long) cqr->cpaddr;


+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_RUN_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xunl ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTCOMPRESSION: used to enable compression.
+ * Sets the IDRC on/off.
+ */
+ccw_req_t *
+tape34xx_mtcompression (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ if ((count < 0) || (count > 1)) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,6,"xcom parm");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }

+ if (count == 0)
+ ((tape34xx_disc_data_t *) ti->discdata)->modeset_byte = 0x00; // IDRC off
+
+ else
+ ((tape34xx_disc_data_t *) ti->discdata)->modeset_byte = 0x08; // IDRC on
+


+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xcom nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xcom ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTSTPART: Move the tape head at the partition with the number 'count'.
+ * Implement the NOP CCW command.
+ */
+ccw_req_t *
+tape34xx_mtsetpart (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xspa nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xspa ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTMKPART: .... dummy .
+ * Implement the NOP CCW command.
+ */
+ccw_req_t *
+tape34xx_mtmkpart (tape_info_t * ti, int count)
+{
+ long lockflags;


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ cqr = tape_alloc_ccw_req (ti, 2, 0);
+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xnpa nomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));
+ ccw++;

+ ccw->cmd_code = NOP;
+ ccw->flags = 0;
+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));
+ s390irq_spin_lock_irqsave (ti->devinfo.irq, lockflags);
+ ti->kernbuf = NULL;
+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_NOP_INIT);


+ s390irq_spin_unlock_irqrestore (ti->devinfo.irq, lockflags);
+#ifdef TAPE_DEBUG

+ debug_text_event (tape_debug_area,6,"xnpa ccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}
+

+/*
+ * MTIOCGET: query the tape drive status.
+ */
+ccw_req_t *
+tape34xx_mtiocget (tape_info_t * ti, int count)
+{
+ return NULL;
+}
+
+/*
+ * MTIOCPOS: query the tape position.
+ */
+ccw_req_t *
+tape34xx_mtiocpos (tape_info_t * ti, int count)
+{
+ return NULL;
+}
+
+ccw_req_t * tape34xx_bread (struct request *req,tape_info_t* ti,int tapeblock_major) {


+ ccw_req_t *cqr;
+ ccw1_t *ccw;

+ __u8 *data;
+ int s2b = blksize_size[tapeblock_major][ti->blk_minor]/hardsect_size[tapeblock_major][ti->blk_minor];
+ int realcount;
+ int size,bhct = 0;
+ struct buffer_head* bh;
+ for (bh = req->bh; bh; bh = bh->b_reqnext) {
+ if (bh->b_size > blksize_size[tapeblock_major][ti->blk_minor])
+ for (size = 0; size < bh->b_size; size += blksize_size[tapeblock_major][ti->blk_minor])
+ bhct++;
+ else
+ bhct++;
+ }
+ if ((data = kmalloc (4 * sizeof (__u8), GFP_ATOMIC)) == NULL) {
+#ifdef TAPE_DEBUG
+ debug_text_exception (tape_debug_area,3,"xBREDnomem");


+#endif /* TAPE_DEBUG */
+ return NULL;
+ }

+ data[0] = 0x01;
+ data[1] = data[2] = data[3] = 0x00;
+ realcount=req->sector/s2b;
+ if (((tape34xx_disc_data_t *) ti->discdata)->modeset_byte & 0x08) // IDRC on
+
+ data[1] = data[1] | 0x80;
+ data[3] += realcount % 256;
+ data[2] += (realcount / 256) % 256;
+ data[1] += (realcount / 65536);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xBREDid:");
+ debug_int_event (tape_debug_area,6,realcount);
+#endif /* TAPE_DEBUG */
+ cqr = tape_alloc_ccw_req (ti, 2+bhct+1, 0);


+ if (!cqr) {
+#ifdef TAPE_DEBUG

+ debug_text_exception (tape_debug_area,6,"xBREDnomem");
+#endif /* TAPE_DEBUG */
+ kfree(data);


+ return NULL;
+ }
+ ccw = cqr->cpaddr;
+ ccw->cmd_code = MODE_SET_DB;
+ ccw->flags = CCW_FLAG_CC;
+ ccw->count = 1;
+ set_normalized_cda (ccw, (unsigned long) (&(((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)));

+ if (realcount!=ti->position) {
+ ccw++;
+ ccw->cmd_code = LOCATE;


+ ccw->flags = CCW_FLAG_CC;

+ ccw->count = 4;
+ set_normalized_cda (ccw, (unsigned long) data);
+ }
+ ti->position=realcount+req->nr_sectors/s2b;
+ for (bh=req->bh;bh!=NULL;) {


+ ccw->flags = CCW_FLAG_CC;

+ if (bh->b_size >= blksize_size[tapeblock_major][ti->blk_minor]) {
+ for (size = 0; size < bh->b_size; size += blksize_size[tapeblock_major][ti->blk_minor]) {
+ ccw++;


+ ccw->flags = CCW_FLAG_CC;

+ ccw->cmd_code = READ_FORWARD;

+ ccw->count = blksize_size[tapeblock_major][ti->blk_minor];
+ set_normalized_cda (ccw, __pa (bh->b_data + size));
+ }
+ bh = bh->b_reqnext;
+ } else { /* group N bhs to fit into byt_per_blk */
+ for (size = 0; bh != NULL && size < blksize_size[tapeblock_major][ti->blk_minor];) {
+ ccw++;
+ ccw->flags = CCW_FLAG_DC;


+ ccw->cmd_code = READ_FORWARD;

+ ccw->count = bh->b_size;
+ set_normalized_cda (ccw, __pa (bh->b_data));
+ size += bh->b_size;
+ bh = bh->b_reqnext;
+ }
+ if (size != blksize_size[tapeblock_major][ti->blk_minor]) {
+ PRINT_WARN ("Cannot fulfill small request %d vs. %d (%ld sects)\n",
+ size,
+ blksize_size[tapeblock_major][ti->blk_minor],
+ req->nr_sectors);
+ kfree(data);


+ tape_free_request (cqr);
+ return NULL;
+ }
+ }

+ }
+ ccw -> flags &= ~(CCW_FLAG_DC);
+ ccw -> flags |= (CCW_FLAG_CC);


+ ccw++;
+ ccw->cmd_code = NOP;
+ ccw->flags = 0;

+ ccw->count = 0;
+ ccw->cda = (unsigned long) (&(ccw->cmd_code));

+ ti->kernbuf = data;


+ ti->userbuf = NULL;

+ tapestate_set (ti, TS_BLOCK_INIT);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xBREDccwg");


+#endif /* TAPE_DEBUG */
+ return cqr;
+}

+void tape34xx_free_bread (ccw_req_t* cqr,struct _tape_info_t* ti) {
+ ccw1_t* ccw;
+ for (ccw=(ccw1_t*)cqr->cpaddr;(ccw->flags & CCW_FLAG_CC)||(ccw->flags & CCW_FLAG_DC);ccw++)
+ if ((ccw->cmd_code == MODE_SET_DB) ||
+ (ccw->cmd_code == LOCATE) ||
+ (ccw->cmd_code == READ_FORWARD))
+ clear_normalized_cda(ccw);
+ tape_free_request(cqr);
+ kfree(ti->kernbuf);


+ ti->kernbuf=NULL;
+}
+

+/* event handlers */
+void
+tape34xx_default_handler (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xdefhandle");
+#endif /* TAPE_DEBUG */
+ PRINT_ERR ("TAPE34XX: An unexpected Unit Check occurred.\n");
+ PRINT_ERR ("TAPE34XX: Please read Documentation/s390/TAPE and report it!\n");
+ PRINT_ERR ("TAPE34XX: Current state is: %s",
+ (((tapestate_get (ti) < TS_SIZE) && (tapestate_get (ti) >= 0)) ?
+ state_verbose[tapestate_get (ti)] : "->UNKNOWN STATE<-"));
+ tape_dump_sense (&ti->devstat);
+ ti->rc = -EIO;


+ ti->wanna_wakeup=1;
+ switch (tapestate_get(ti)) {
+ case TS_REW_RELEASE_INIT:

+ tapestate_set(ti,TS_FAILED);


+ wake_up (&ti->wq);
+ break;

+ case TS_BLOCK_INIT:
+ tapestate_set(ti,TS_FAILED);
+ schedule_tapeblock_exec_IO(ti);
+ break;
+ default:
+ tapestate_set(ti,TS_FAILED);

+ wake_up_interruptible (&ti->wq);
+ }
+}

+
+void
+tape34xx_unexpect_uchk_handler (tape_info_t * ti)
+{
+ if ((ti->devstat.ii.sense.data[0] == 0x40) &&
+ (ti->devstat.ii.sense.data[1] == 0x40) &&
+ (ti->devstat.ii.sense.data[3] == 0x43)) {
+ // no tape in the drive
+ PRINT_INFO ("Drive %d not ready. No volume loaded.\n", ti->rew_minor / 2);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"xuuh nomed");
+#endif /* TAPE_DEBUG */
+ tapestate_set (ti, TS_FAILED);
+ ti->rc = -ENOMEDIUM;
+ ti->wanna_wakeup=1;
+ wake_up_interruptible (&ti->wq);
+ } else if ((ti->devstat.ii.sense.data[0] == 0x42) &&
+ (ti->devstat.ii.sense.data[1] == 0x44) &&
+ (ti->devstat.ii.sense.data[3] == 0x3b)) {
+ PRINT_INFO ("Media in drive %d was changed!\n",
+ ti->rew_minor / 2);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"xuuh medchg");
+#endif
+ /* nothing to do. chan end & dev end will be reported when io is finished */
+ } else {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"xuuh unexp");
+ debug_text_event (tape_debug_area,3,"state:");
+ debug_text_event (tape_debug_area,3,((tapestate_get (ti) < TS_SIZE) &&

+ (tapestate_get (ti) >= 0)) ?

+ state_verbose[tapestate_get (ti)] :
+ "TS UNKNOWN");
+#endif /* TAPE_DEBUG */

+ tape34xx_default_handler (ti);
+ }
+}
+
+void
+tape34xx_unused_done (tape_info_t * ti)
+{
+ if (ti->medium_is_unloaded) {
+ // A medium was inserted in the drive!
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xuui med");
+#endif /* TAPE_DEBUG */
+ PRINT_WARN ("A medium was inserted into the tape.\n");
+ ti->medium_is_unloaded=0;
+ } else {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"unsol.irq!");
+ debug_text_event (tape_debug_area,3,"dev end");
+ debug_int_exception (tape_debug_area,3,ti->devinfo.irq);
+#endif /* TAPE_DEBUG */
+ PRINT_WARN ("Unsolicited IRQ (Device End) caught in unused state.\n");
+ tape_dump_sense (&ti->devstat);
+ }
+}
+
+
+void
+tape34xx_idle_done (tape_info_t * ti)
+{
+ if (ti->medium_is_unloaded) {
+ // A medium was inserted in the drive!
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"xuud med");
+#endif /* TAPE_DEBUG */
+ PRINT_WARN ("A medium was inserted into the tape.\n");
+ ti->medium_is_unloaded=0;
+ wake_up_interruptible (&ti->wq);
+ } else {
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"unsol.irq!");
+ debug_text_event (tape_debug_area,3,"dev end");
+ debug_int_exception (tape_debug_area,3,ti->devinfo.irq);
+#endif /* TAPE_DEBUG */
+ PRINT_WARN ("Unsolicited IRQ (Device End) caught in idle state.\n");
+ tape_dump_sense (&ti->devstat);
+ }
+}
+
+void
+tape34xx_block_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"x:bREQdone");
+#endif /* TAPE_DEBUG */
+ tapestate_set(ti,TS_DONE);
+ schedule_tapeblock_exec_IO(ti);
+}
+
+void
+tape34xx_bsf_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"bsf done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_dse_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"dse done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_fsf_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"fsf done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_fsb_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"fsb done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_bsb_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"bsb done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_lbl_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"lbl done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ //s390irq_spin_unlock(tape->devinfo.irq);
+ ti->wanna_wakeup=1;


+ wake_up (&ti->wq);
+}

+
+void
+tape34xx_nop_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"nop done..");
+ debug_text_exception (tape_debug_area,6,"or rew/rel");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ //s390irq_spin_unlock(tape->devinfo.irq);
+ ti->wanna_wakeup=1;


+ wake_up (&ti->wq);
+}

+
+void
+tape34xx_rfo_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"rfo done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_rbi_init_done (tape_info_t * ti)
+{
+ __u8 *data;
+#ifdef TAPE_DEBUG
+ int i;
+#endif
+ tapestate_set (ti, TS_FAILED);
+ data = ti->kernbuf;
+ ti->rc = data[3];
+ ti->rc += 256 * data[2];
+ ti->rc += 65536 * (data[1] & 0x3F);
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"rbi done");
+ debug_text_event (tape_debug_area,6,"data:");
+ for (i=0;i<8;i++)
+ debug_int_event (tape_debug_area,6,data[i]);
+#endif
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_rew_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"rew done");
+#endif
+ //BH: use irqsave
+ //s390irq_spin_lock(tape->devinfo.irq);
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ //s390irq_spin_unlock(tape->devinfo.irq);
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_rew_release_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"rewR done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ //s390irq_spin_unlock(tape->devinfo.irq);
+ ti->wanna_wakeup=1;


+ wake_up (&ti->wq);
+}

+
+void
+tape34xx_run_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"rew done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_wri_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,6,"wri done");
+#endif
+ //BH: use irqsave
+ //s390irq_spin_lock(ti->devinfo.irq);
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ //s390irq_spin_unlock(ti->devinfo.irq);
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+void
+tape34xx_wtm_init_done (tape_info_t * ti)
+{
+#ifdef TAPE_DEBUG
+ debug_text_event (tape_debug_area,3,"wtm done");
+#endif
+ tapestate_set (ti, TS_DONE);
+ ti->rc = 0;
+ ti->wanna_wakeup=1;


+ wake_up_interruptible (&ti->wq);
+}
+

+/* This function analyses the tape's sense-data in case of a unit-check. If possible,
+ it tries to recover from the error. Else the user is informed about the problem. */
+void
+tape34xx_error_recovery (tape_info_t* ti)
+{
+ __u8* sense=ti->devstat.ii.sense.data;
+ int inhibit_cu_recovery=0;
+ int cu_type=ti->discipline->cu_type;
+ if ((((tape34xx_disc_data_t *) ti->discdata)->modeset_byte)&0x80) inhibit_cu_recovery=1;
+ if (tapestate_get(ti)==TS_BLOCK_INIT) {
+ // no recovery for block device, bottom half will retry...
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ }
+ if (sense[0]&SENSE_COMMAND_REJECT)
+ switch (tapestate_get(ti)) {
+ case TS_BLOCK_INIT:
+ case TS_DSE_INIT:
+ case TS_EGA_INIT:
+ case TS_WRI_INIT:
+ case TS_WTM_INIT:
+ if (sense[1]&SENSE_WRITE_PROTECT) {
+ // trying to write, but medium is write protected
+ tape34xx_error_recovery_has_failed(ti,EACCES);
+ return;
+ }
+ default:
+ tape34xx_error_recovery_HWBUG(ti,1);
+ return;
+ }
+ // special cases for various tape-states when reaching end of recorded area
+ if (((sense[0]==0x08) || (sense[0]==0x10) || (sense[0]==0x12)) &&
+ ((sense[1]==0x40) || (sense[1]==0x0c)))
+ switch (tapestate_get(ti)) {
+ case TS_FSF_INIT:
+ // Trying to seek beyond end of recorded area
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case TS_LBL_INIT:
+ // Block could not be located.
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case TS_RFO_INIT:
+ // Try to read beyond end of recorded area -> 0 bytes read
+ tape34xx_error_recovery_has_failed(ti,0);
+ return;
+ }
+ // Sensing special bits
+ if (sense[0]&SENSE_BUS_OUT_CHECK) {
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ }
+ if (sense[0]&SENSE_DATA_CHECK) {
+ // hardware failure, damaged tape or improper operating conditions
+ switch (sense[3]) {
+ case 0x23:
+ // a read data check occurred
+ if ((sense[2]&SENSE_TAPE_SYNC_MODE) ||
+ (inhibit_cu_recovery)) {
+ // data check is not permanent, may be recovered.
+ // We always use async-mode with cu-recovery, so this should *never* happen.
+ tape34xx_error_recovery_HWBUG(ti,2);
+ return;
+ } else {
+ // data check is permanent, CU recovery has failed
+ PRINT_WARN("Permanent read error, recovery failed!\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ }
+ case 0x25:
+ // a write data check occurred
+ if ((sense[2]&SENSE_TAPE_SYNC_MODE) ||
+ (inhibit_cu_recovery)) {
+ // data check is not permanent, may be recovered.
+ // We always use async-mode with cu-recovery, so this should *never* happen.
+ tape34xx_error_recovery_HWBUG(ti,3);
+ return;
+ } else {
+ // data check is permanent, cu-recovery has failed
+ PRINT_WARN("Permanent write error, recovery failed!\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ }
+ case 0x26:
+ // Data Check (read opposite) occurred. We'll recover this.
+ tape34xx_error_recovery_read_opposite(ti);
+ return;
+ case 0x28:
+ // The ID-Mark at the beginning of the tape could not be written. This is fatal, we'll report and exit.
+ PRINT_WARN("ID-Mark could not be written. Check your hardware!\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x31:
+ // Tape void. Tried to read beyond end of device. We'll report and exit.
+ PRINT_WARN("Try to read beyond end of recorded area!\n");
+ tape34xx_error_recovery_has_failed(ti,ENOSPC);
+ return;
+ case 0x41:
+ // Record sequence error. cu detected incorrect block-id sequence on tape. We'll report and exit.
+ PRINT_WARN("Illegal block-id sequence found!\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ default:
+ // well, all data checks for 3480 should result in one of the above erpa-codes. if not -> bug
+ // On 3490, other data-check conditions do exist.
+ if (cu_type==0x3480) {
+ tape34xx_error_recovery_HWBUG(ti,4);


+ return;
+ }
+ }
+ }

+ if (sense[0]&SENSE_OVERRUN) {
+ // A data overrun between cu and drive occurred. The channel speed is to slow! We'll report this and exit!
+ switch (sense[3]) {
+ case 0x40: // overrun error
+ PRINT_WARN ("Data overrun error between control-unit and drive. Use a faster channel connection, if possible! \n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ default:
+ // Overrun bit is set, but erpa does not show overrun error. This is a bug.
+ tape34xx_error_recovery_HWBUG(ti,5);
+ return;
+ }
+ }
+ if (sense[1]&SENSE_RECORD_SEQUENCE_ERR) {
+ switch (sense[3]) {
+ case 0x41:
+ // Record sequence error. cu detected incorrect block-id sequence on tape. We'll report and exit.
+ PRINT_WARN("Illegal block-id sequence found!\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ default:
+ // Record sequence error bit is set, but erpa does not show record sequence error. This is a bug.
+ tape34xx_error_recovery_HWBUG(ti,6);
+ return;
+ }
+ }
+ // Sensing erpa codes
+ switch (sense[3]) {
+ case 0x00:
+ // Everything is fine, but we got a unit check. Report and ignore!
+ PRINT_WARN ("Non-error sense was found. Unit-check will be ignored, expect errors...\n");
+ return;
+ case 0x21:
+ // Data streaming not operational. Cu switches to interlock mode, we reissue the command.
+ PRINT_WARN ("Data streaming not operational. Switching to interlock-mode! \n");
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x22:
+ // Path equipment check. Might be drive adapter error, buffer error on the lower interface, internal path not useable, or error during cartridge load.
+ // All of the above are not recoverable
+ PRINT_WARN ("A path equipment check occurred. One of the following conditions occurred:\n");
+ PRINT_WARN ("drive adapter error,buffer error on the lower interface, internal path not useable, error during cartridge load.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x23:
+ // Read data check. Should have been be covered earlier -> Bug!
+ tape34xx_error_recovery_HWBUG(ti,7);
+ return;
+ case 0x24:
+ // Load display check. Load display was command was issued, but the drive is displaying a drive check message. Can be threated as "device end".
+ tape34xx_error_recovery_succeded(ti);
+ return;
+ case 0x25:
+ // Write data check. Should have been covered earlier -> Bug!
+ tape34xx_error_recovery_HWBUG(ti,8);
+ return;
+ case 0x26:
+ // Data check (read opposite). Should have been covered earlier -> Bug!
+ tape34xx_error_recovery_HWBUG(ti,9);
+ return;
+ case 0x27:
+ // Command reject. May indicate illegal channel program or buffer over/underrun.
+ // Since all channel programms are issued by this driver and ought be correct,
+ // we assume a over/underrun situaltion and retry the channel program.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x28:
+ // Write id mark check. Should have beed covered earlier -> bug!
+ tape34xx_error_recovery_HWBUG(ti,10);
+ return;
+ case 0x29:
+ // Function incompatible. Either idrc is on but hardware not capable doing idrc
+ // or a perform subsystem func is issued and the cu is not online. Anyway, this
+ // cannot be recovered and is an I/O error.
+ PRINT_WARN ("Function incompatible. Try to switch off idrc! \n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x2a:
+ // Unsolicited environmental data. An internal counter overflows, we can ignore
+ // this and reissue the cmd.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x2b:
+ // Environmental data present. Indicates either unload completed ok or read buffered
+ // log command completed ok.
+ if (tapestate_get(ti)==TS_RUN_INIT) {
+ // Rewind unload completed ok.
+ tape34xx_error_recovery_succeded(ti);
+ return;
+ }
+ // Since we do not issue read buffered log commands, this should never occur -> bug.
+ tape34xx_error_recovery_HWBUG(ti,11);
+ return;
+ case 0x2c:
+ // Permanent equipment check. cu has tried recovery, but did not succeed. This is an
+ // I/O error.
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x2d:
+ // Data security erase failure.
+ if (tapestate_get(ti)==TS_DSE_INIT) {
+ // report an I/O error
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ }
+ // Data security erase failure, but no such command issued. This is a bug.
+ tape34xx_error_recovery_HWBUG(ti,12);
+ return;
+ case 0x2e:
+ // Not capable. This indicates either that the drive fails reading the format id mark
+ // or that that format specified is not supported by the drive. We write a message and
+ // return an I/O error.
+ PRINT_WARN("Drive not capable processing the tape format!");
+ tape34xx_error_recovery_has_failed(ti,EMEDIUMTYPE);
+ return;
+ case 0x2f:
+ // This erpa is reserved. This is a bug.
+ tape34xx_error_recovery_HWBUG(ti,13);
+ return;
+ case 0x30:
+ // The medium is write protected, while trying to write on it. We'll report this.
+ PRINT_WARN("Medium is write protected!\n");
+ tape34xx_error_recovery_has_failed(ti,EACCES);
+ return;
+ case 0x31:
+ // Tape void. Should have beed covered ealier -> bug
+ tape34xx_error_recovery_HWBUG(ti,14);
+ return;
+ case 0x32:
+ // Tension loss. We cannot recover this, it's an I/O error.
+ PRINT_WARN("The drive lost tape tension.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x33:
+ // Load Failure. The catridge was not inserted correctly or the tape is not threaded
+ // correctly. We cannot recover this, the user has to reload the catridge.
+ PRINT_WARN("Cartridge load failure. Reload the cartridge and try again.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x34:
+ // Unload failure. The drive cannot maintain tape tension and control tape movement
+ // during an unload operation.
+ PRINT_WARN("Failure during cartridge unload. Please try manually.\n");
+ if (tapestate_get(ti)!=TS_RUN_INIT) {
+ tape34xx_error_recovery_HWBUG(ti,15);
+ return;
+ }
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x35:
+ // Drive equipment check. One of the following:
+ // - cu cannot recover from a drive detected error
+ // - a check code message is displayed on drive message/load displays
+ // - the cartridge loader does not respond correctly
+ // - a failure occurs during an index, load, or unload cycle
+ PRINT_WARN("Equipment check! Please check the drive and the cartridge loader.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x36:
+ switch (cu_type) {
+ case 0x3480:
+ // This erpa is reserved for 3480 -> BUG
+ tape34xx_error_recovery_HWBUG(ti,16);
+ return;
+ case 0x3490:
+ // End of data. This is a permanent I/O error, which cannot be recovered.
+ // A read-type command has reached the end-of-data mark.
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ }
+ case 0x37:
+ // Tape length error. The tape is shorter than reported in the beginning-of-tape data.
+ PRINT_WARN("Tape length error.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x38:
+ // Physical end of tape. A read/write operation reached the physical end of tape.
+ if (tapestate_get(ti)==TS_WRI_INIT) {
+ tape34xx_error_recovery_has_failed(ti,ENOSPC);
+ }
+ return;
+ case 0x39:
+ // Backward at BOT. The drive is at BOT and is requestet to move backward.
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x3a:
+ // Drive switched not ready, but the command needs the drive to be ready.
+ PRINT_WARN("Drive not ready. Turn the ready/not ready switch to ready position and try again.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x3b:
+ // Manual rewind or unload. This causes an I/O error.
+ PRINT_WARN("Medium was rewound or unloaded manually. Expect errors! Please do only use the mtoffl and mtrew ioctl to unload tapes or rewind tapes.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x3c:
+ case 0x3d:
+ case 0x3e:
+ case 0x3f:
+ // These erpas are reserved -> BUG
+ tape34xx_error_recovery_HWBUG(ti,17);
+ return;
+ case 0x40:
+ // Overrun error. This should have been covered earlier -> bug.
+ tape34xx_error_recovery_HWBUG(ti,18);
+ return;
+ case 0x41:
+ // Record sequence error. This should have been covered earlier -> bug.
+ tape34xx_error_recovery_HWBUG(ti,19);
+ return;
+ case 0x42:
+ // Degraded mode. A condition that can cause degraded performace is detected.
+ PRINT_WARN("Subsystem is running in degraded mode. This may compromise your performace.\n");
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x43:
+ // Drive not ready. Probably swith the ready/not ready switch to ready?
+ PRINT_WARN("The drive is not ready. Maybe no medium in?\n");
+ tape34xx_error_recovery_has_failed(ti,ENOMEDIUM);
+ return;
+ case 0x44:
+ // Locate Block unsuccessfull. We'll report this.
+ if ((tapestate_get(ti)!=TS_BLOCK_INIT) &&
+ (tapestate_get(ti)!=TS_LBL_INIT)) {
+ tape34xx_error_recovery_HWBUG(ti,20); // No locate block was issued...
+ return;
+ }
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x45:
+ // The drive is assigned elsewhere [to a different channel path/computer].
+ PRINT_WARN("The drive is assigned elsewhere.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x46:
+ // Drive not online. Drive may be switched offline, the power supply may be switched off
+ // or the drive address may not be set correctly.
+ PRINT_WARN("The drive is not online.");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x47:
+ // Volume fenced. cu reports volume integrity is lost!
+ PRINT_WARN("Volume fenced. The volume integrity is lost! \n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x48:
+ // Log sense data and retry request. We'll do so...
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x49:
+ // Bus out check. A parity check error on the bus was found. PRINT_WARN("Bus out check. A data transfer over the bus was corrupted.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x4a:
+ // Control unit erp failed. We'll report this.
+ PRINT_WARN("The control unit failed recovering an I/O error.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x4b:
+ // Cu and drive incompatible. The drive requests micro-program patches, which are not available on the cu.
+ PRINT_WARN("The drive needs microprogram patches from the control unit, which are not available.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x4c:
+ // Recovered Check-One failure. Cu develops a hardware error, but is able to recover. We'll reissue the command.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x4d:
+ switch (cu_type) {
+ case 0x3480:
+ // This erpa is reserved for 3480 -> bug
+ tape34xx_error_recovery_HWBUG(ti,21);
+ return;
+ case 0x3490:
+ // Resetting event recieved. Since the driver does not support resetting event recovery
+ // (which has to be handled by the I/O Layer), we'll report and retry our command.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ }
+ case 0x4e:
+ switch (cu_type) {
+ case 0x3480:
+ // This erpa is reserved for 3480 -> bug.
+ tape34xx_error_recovery_HWBUG(ti,22);
+ return;
+ case 0x3490:
+ // Maximum block size exeeded. This indicates, that the block to be written is larger
+ // than allowed for buffered mode. We'll report this...
+ PRINT_WARN("Maximum block size for buffered mode exceeded.\n");
+ tape34xx_error_recovery_has_failed(ti,ENOBUFS);
+ return;
+ }
+ case 0x4f:
+ // These erpas are reserved -> bug
+ tape34xx_error_recovery_HWBUG(ti,23);
+ return;
+ case 0x50:
+ // Read buffered log (Overflow). Cu is running in extended beffered log mode, and a counter overflows.
+ // This should never happen, since we're never running in extended buffered log mode -> bug.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x51:
+ // Read buffered log (EOV). EOF processing occurs while the cu is in extended buffered log mode.
+ // This should never happen, since we're never running in extended buffered log mode -> bug.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x52:
+ // End of Volume complete. Rewind unload completed ok. We'll report to the user...
+ if (tapestate_get(ti)!=TS_RUN_INIT) {
+ tape34xx_error_recovery_HWBUG(ti,24);
+ return;
+ }
+ tape34xx_error_recovery_succeded(ti);
+ return;
+ case 0x53:
+ // Global command intercept. We'll have to reissue our command.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x54:
+ // Channel interface recovery (temporary). This can be recovered by reissuing the command.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x55:
+ // Channel interface recovery (permanent). This cannot be recovered, we'll inform the user.
+ PRINT_WARN("A permanent channel interface error occurred.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x56:
+ // Channel protocol error. This cannot be recovered.
+ PRINT_WARN("A channel protocol error occurred.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x57:
+ switch (cu_type) {
+ case 0x3480:
+ // Attention intercept. We have to reissue the command.
+ PRINT_WARN("An attention intercept occurred, which will be recovered.\n");
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ case 0x3490:
+ // Global status intercept. We have to reissue the command.
+ PRINT_WARN("An global status intercept was recieved, which will be recovered.\n");
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ }
+ case 0x58:
+ case 0x59:
+ // These erpas are reserved -> bug.
+ tape34xx_error_recovery_HWBUG(ti,25);
+ return;
+ case 0x5a:
+ // Tape length incompatible. The tape inserted is too long,
+ // which could cause damage to the tape or the drive.
+ PRINT_WARN("Tape length incompatible [should be IBM Cartridge System Tape]. May cause damage to drive or tape.n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x5b:
+ // Format 3480 XF incompatible
+ if (sense[1]&SENSE_BEGINNING_OF_TAPE) {
+ // Everything is fine. The tape will be overwritten in a different format.
+ tape34xx_error_recovery_do_retry(ti);
+ return;
+ }
+ PRINT_WARN("Tape format is incompatible to the drive, which writes 3480-2 XF.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x5c:
+ // Format 3480-2 XF incompatible
+ PRINT_WARN("Tape format is incompatible to the drive. The drive cannot access 3480-2 XF volumes.\n");
+ tape34xx_error_recovery_has_failed(ti,EIO);
+ return;
+ case 0x5d:
+ // Tape length violation.
+ PRINT_WARN("Tape length violation [should be IBM Enhanced Capacity Cartridge System Tape]. May cause damage to drive or tape.\n");
+ tape34xx_error_recovery_has_failed(ti,EMEDIUMTYPE);
+ return;
+ case 0x5e:
+ // Compaction algorithm incompatible.
+ PRINT_WARN("The volume is recorded using an incompatible compaction algorith, which is not supported by the control unit.\n");
+ tape34xx_error_recovery_has_failed(ti,EMEDIUMTYPE);
+ return;
+ default:
+ // Reserved erpas -> bug
+ tape34xx_error_recovery_HWBUG(ti,26);


+ return;
+ }
+}
+

+void tape34xx_error_recovery_has_failed (tape_info_t* ti,int error_id) {


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 41'
echo 'File patch-2.2.20 is continued in part 42'
echo "42" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:59 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part60

#!/bin/sh -x
# this is part 60 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 60; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00010004,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00001705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00009705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00011705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00019705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00021705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00029705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00031705,0x00001400,0x000a411e,0x00001003,
-0x00040730,0x00001002,0x000f619e,0x00001003,
-0x00039705,0x00001400,0x000a411e,0x00001003,
-0x000fe19e,0x00001003,0x0009c730,0x00001003,
-0x0008e19c,0x00001003,0x000083c1,0x00093040,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00009705,0x00001400,0x000a211e,0x00001003,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00011705,0x00001400,0x000a211e,0x00001003,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00019705,0x00001400,0x000a211e,0x00001003,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00021705,0x00001400,0x000a211e,0x00001003,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00029705,0x00001400,0x000a211e,0x00001003,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00031705,0x00001400,0x000a211e,0x00001003,
-0x00098730,0x00001002,0x000ee19e,0x00001003,
-0x00039705,0x00001400,0x000a211e,0x00001003,
-0x0000a730,0x00001008,0x000e2730,0x00001002,
-0x0000a731,0x00001002,0x0000a731,0x00001002,
-0x0000a731,0x00001002,0x0000a731,0x00001002,
-0x0000a731,0x00001002,0x0000a731,0x00001002,
-0x00000000,0x00000000,0x000f619c,0x00001003,
-0x0007f801,0x000c0000,0x00000037,0x00001000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x000c0000,0x00000000,0x00000000,
-0x0000373c,0x00001000,0x00000000,0x00000000,
-0x000ee19c,0x00001003,0x0007f801,0x000c0000,
-0x00000037,0x00001000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x0000273c,0x00001000,
-0x00000033,0x00001000,0x000e679e,0x00001003,
-0x00007705,0x00001400,0x000ac71e,0x00001003,
-0x00087fc1,0x000c3be0,0x0007f801,0x000c0000,
-0x00000037,0x00001000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x0000a730,0x00001003,
-0x00000033,0x00001000,0x0007f801,0x000c0000,
-0x00000037,0x00001000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x000c0000,
-0x00000032,0x00001000,0x0000273d,0x00001000,
-0x0004a730,0x00001003,0x00000f41,0x00097140,
-0x0000a841,0x0009b240,0x0000a0c1,0x0009f040,
-0x0001c641,0x00093540,0x0001cec1,0x0009b5c0,
-0x00000000,0x00000000,0x0001bf05,0x0003fc40,
-0x00002725,0x000aa400,0x00013705,0x00093a00,
-0x0000002e,0x0009d6c0,0x00038630,0x00001004,
-0x0004ef0a,0x000eb785,0x0003fc8a,0x00000000,
-0x00000000,0x000c70e0,0x0007d182,0x0002c640,
-0x00000630,0x00001004,0x000799b8,0x0002c6c0,
-0x00031705,0x00092240,0x00039f05,0x000932c0,
-0x0003520a,0x00000000,0x00040731,0x0000100b,
-0x00010705,0x000b20c0,0x00000000,0x000eba44,
-0x00032108,0x000c60c4,0x00065208,0x000c2917,
-0x000406b0,0x00001007,0x00012f05,0x00036880,
-0x0002818e,0x000c0000,0x0004410a,0x00000000,
-0x00040630,0x00001007,0x00029705,0x000c0000,
-0x00000000,0x00000000,0x00003fc1,0x0003fc40,
-0x000037c1,0x00091b40,0x00003fc1,0x000911c0,
-0x000037c1,0x000957c0,0x00003fc1,0x000951c0,
-0x000037c1,0x00000000,0x00003fc1,0x000991c0,
-0x000037c1,0x00000000,0x00003fc1,0x0009d1c0,
-0x000037c1,0x00000000,0x0001ccc1,0x000915c0,
-0x0001c441,0x0009d800,0x0009cdc1,0x00091240,
-0x0001c541,0x00091d00,0x0009cfc1,0x00095240,
-0x0001c741,0x00095c80,0x000e8ca9,0x00099240,
-0x000e85ad,0x00095640,0x00069ca9,0x00099d80,
-0x000e952d,0x00099640,0x000eaca9,0x0009d6c0,
-0x000ea5ad,0x00091a40,0x0006bca9,0x0009de80,
-0x000eb52d,0x00095a40,0x000ecca9,0x00099ac0,
-0x000ec5ad,0x0009da40,0x000edca9,0x0009d300,
-0x000a6e0a,0x00001000,0x000ed52d,0x00091e40,
-0x000eeca9,0x00095ec0,0x000ee5ad,0x00099e40,
-0x0006fca9,0x00002500,0x000fb208,0x000c59a0,
-0x000ef52d,0x0009de40,0x00068ca9,0x000912c1,
-0x000683ad,0x00095241,0x00020f05,0x000991c1,
-0x00000000,0x00000000,0x00086f88,0x00001000,
-0x0009cf81,0x000b5340,0x0009c701,0x000b92c0,
-0x0009de81,0x000bd300,0x0009d601,0x000b1700,
-0x0001fd81,0x000b9d80,0x0009f501,0x000b57c0,
-0x000a0f81,0x000bd740,0x00020701,0x000b5c80,
-0x000a1681,0x000b97c0,0x00021601,0x00002500,
-0x000a0701,0x000b9b40,0x000a0f81,0x000b1bc0,
-0x00021681,0x00002d00,0x00020f81,0x000bd800,
-0x000a0701,0x000b5bc0,0x00021601,0x00003500,
-0x000a0f81,0x000b5f40,0x000a0701,0x000bdbc0,
-0x00021681,0x00003d00,0x00020f81,0x000b1d00,
-0x000a0701,0x000b1fc0,0x00021601,0x00020500,
-0x00020f81,0x000b1341,0x000a0701,0x000b9fc0,
-0x00021681,0x00020d00,0x00020f81,0x000bde80,
-0x000a0701,0x000bdfc0,0x00021601,0x00021500,
-0x00020f81,0x000b9341,0x00020701,0x000b53c1,
-0x00021681,0x00021d00,0x000a0f81,0x000d0380,
-0x0000b601,0x000b15c0,0x00007b01,0x00000000,
-0x00007b81,0x000bd1c0,0x00007b01,0x00000000,
-0x00007b81,0x000b91c0,0x00007b01,0x000b57c0,
-0x00007b81,0x000b51c0,0x00007b01,0x000b1b40,
-0x00007b81,0x000b11c0,0x00087b01,0x000c3dc0,
-0x0007e488,0x000d7e45,0x00000000,0x000d7a44,
-0x0007e48a,0x00000000,0x00011f05,0x00084080,
-0x00000000,0x00000000,0x00001705,0x000b3540,
-0x00008a01,0x000bf040,0x00007081,0x000bb5c0,
-0x00055488,0x00000000,0x0000d482,0x0003fc40,
-0x0003fc88,0x00000000,0x0001e401,0x000b3a00,
-0x0001ec81,0x000bd6c0,0x0004ef08,0x000eb784,
-0x000c86b0,0x00001007,0x00008281,0x000bb240,
-0x0000b801,0x000b7140,0x00007888,0x00000000,
-0x0000073c,0x00001000,0x0007f188,0x000c0000,
-0x00000000,0x00000000,0x00055288,0x000c555c,
-0x0005528a,0x000c0000,0x0009fa88,0x000c5d00,
-0x0000fa88,0x00000000,0x00000032,0x00001000,
-0x0000073d,0x00001000,0x0007f188,0x000c0000,
-0x00000000,0x00000000,0x0008c01c,0x00001003,
-0x00002705,0x00001008,0x0008b201,0x000c1392,
-0x0000ba01,0x00000000,0x00008731,0x00001400,
-0x0004c108,0x000fe0c4,0x00057488,0x00000000,
-0x000a6388,0x00001001,0x0008b334,0x000bc141,
-0x0003020e,0x00000000,0x000886b0,0x00001008,
-0x00003625,0x000c5dfa,0x000a638a,0x00001001,
-0x0008020e,0x00001002,0x0008a6b0,0x00001008,
-0x0007f301,0x00000000,0x00000000,0x00000000,
-0x00002725,0x000a8c40,0x000000ae,0x00000000,
-0x000d8630,0x00001008,0x00000000,0x000c74e0,
-0x0007d182,0x0002d640,0x000a8630,0x00001008,
-0x000799b8,0x0002d6c0,0x0000748a,0x000c3ec5,
-0x0007420a,0x000c0000,0x00062208,0x000c4117,
-0x00070630,0x00001009,0x00000000,0x000c0000,
-0x0001022e,0x00000000,0x0003a630,0x00001009,
-0x00000000,0x000c0000,0x00000036,0x00001000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x0002a730,0x00001008,0x0007f801,0x000c0000,
-0x00000037,0x00001000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x0002a730,0x00001008,
-0x00000033,0x00001000,0x0002a705,0x00001008,
-0x00007a01,0x000c0000,0x000e6288,0x000d550a,
-0x0006428a,0x00000000,0x00060730,0x0000100a,
-0x00000000,0x000c0000,0x00000000,0x00000000,
-0x0007aab0,0x00034880,0x00078fb0,0x0000100b,
-0x00057488,0x00000000,0x00033b94,0x00081140,
-0x000183ae,0x00000000,0x000786b0,0x0000100b,
-0x00022f05,0x000c3545,0x0000eb8a,0x00000000,
-0x00042731,0x00001003,0x0007aab0,0x00034880,
-0x00048fb0,0x0000100a,0x00057488,0x00000000,
-0x00033b94,0x00081140,0x000183ae,0x00000000,
-0x000806b0,0x0000100b,0x00022f05,0x00000000,
-0x00007401,0x00091140,0x00048f05,0x000951c0,
-0x00042731,0x00001003,0x0000473d,0x00001000,
-0x000f19b0,0x000bbc47,0x00080000,0x000bffc7,
-0x000fe19e,0x00001003,0x00000000,0x00000000,
-0x0008e19c,0x00001003,0x000083c1,0x00093040,
-0x00000f41,0x00097140,0x0000a841,0x0009b240,
-0x0000a0c1,0x0009f040,0x0001c641,0x00093540,
-0x0001cec1,0x0009b5c0,0x00000000,0x000fdc44,
-0x00055208,0x00000000,0x00010705,0x000a2880,
-0x0000a23a,0x00093a00,0x0003fc8a,0x000df6c5,
-0x0004ef0a,0x000c0000,0x00012f05,0x00036880,
-0x00065308,0x000c2997,0x000d86b0,0x0000100a,
-0x0004410a,0x000d40c7,0x00000000,0x00000000,
-0x00080730,0x00001004,0x00056f0a,0x000ea105,
-0x00000000,0x00000000,0x0000473d,0x00001000,
-0x000f19b0,0x000bbc47,0x00080000,0x000bffc7,
-0x0000273d,0x00001000,0x00000000,0x000eba44,
-0x00048f05,0x0000f440,0x00007401,0x0000f7c0,
-0x00000734,0x00001000,0x00010705,0x000a6880,
-0x00006a88,0x000c75c4,0x00000000,0x000e5084,
-0x00000000,0x000eba44,0x00087401,0x000e4782,
-0x00000734,0x00001000,0x00010705,0x000a6880,
-0x00006a88,0x000c75c4,0x0007c108,0x000c0000,
-0x0007e721,0x000bed40,0x00005f25,0x000badc0,
-0x0003ba97,0x000beb80,0x00065590,0x000b2e00,
-0x00033217,0x00003ec0,0x00065590,0x000b8e40,
-0x0003ed80,0x000491c0,0x00073fb0,0x00074c80,
-0x000283a0,0x0000100c,0x000ee388,0x00042970,
-0x00008301,0x00021ef2,0x000b8f14,0x0000000f,
-0x000c4d8d,0x0000001b,0x000d6dc2,0x000e06c6,
-0x000032ac,0x000c3916,0x0004edc2,0x00074c80,
-0x00078898,0x00001000,0x00038894,0x00000032,
-0x000c4d8d,0x00092e1b,0x000d6dc2,0x000e06c6,
-0x0004edc2,0x000c1956,0x0000722c,0x00034a00,
-0x00041705,0x0009ed40,0x00058730,0x00001400,
-0x000d7488,0x000c3a00,0x00048f05,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 60'
echo 'File patch-2.2.20 is continued in part 61'
echo "61" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:58 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part59

#!/bin/sh -x
# this is part 59 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 59; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-0x0000270f,0x00010000,0x007a0000,0x00000000,
-0x068e0645,0x0105929d,0x929d929d,0x929d929d,
-0x929d929d,0x929d929d,0xa431ac75,0x0001735a,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0x735a0100,0x00000000,0x00000000,0x00000000,

echo 'End of part 59'
echo 'File patch-2.2.20 is continued in part 60'
echo "60" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:00 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part61

#!/bin/sh -x
# this is part 61 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 61; then

- };
+struct BA1struct BA1Struct = {
+{{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }},
+{0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000163,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00200040,0x00008010,0x00000000,
+0x00000000,0x80000001,0x00000001,0x00060000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00900080,0x00000173,0x00000000,
+0x00000000,0x00000010,0x00800000,0x00900000,
+0xf2c0000f,0x00000200,0x00000000,0x00010600,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000163,0x330300c2,
+0x06000000,0x00000000,0x80008000,0x80008000,
+0x3fc0000f,0x00000301,0x00010400,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00b00000,0x00d0806d,0x330480c3,
+0x04800000,0x00000001,0x00800001,0x0000ffff,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x066a0600,0x06350070,0x0000929d,0x929d929d,
+0x00000000,0x0000735a,0x00000600,0x00000000,
+0x929d735a,0x8734abfe,0x00010000,0x735a735a,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x0000804f,0x000000c3,
+0x05000000,0x00a00010,0x00000000,0x80008000,
+0x00000000,0x00000000,0x00000700,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000080,0x00a00000,0x0000809a,0x000000c2,
+0x07400000,0x00000000,0x80008000,0xffffffff,
+0x00c80028,0x00005555,0x00000000,0x000107a0,
+0x00c80028,0x000000c2,0x06800000,0x00000000,
+0x06e00080,0x00300000,0x000080bb,0x000000c9,
+0x07a00000,0x04000000,0x80008000,0xffffffff,
+0x00c80028,0x00005555,0x00000000,0x00000780,
+0x00c80028,0x000000c5,0xff800000,0x00000000,
+0x00640080,0x00c00000,0x00008197,0x000000c9,
+0x07800000,0x04000000,0x80008000,0xffffffff,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x0000805e,0x000000c1,
+0x00000000,0x00800000,0x80008000,0x80008000,
+0x00020000,0x0000ffff,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x929d0600,0x929d929d,0x929d929d,0x929d0000,
+0x929d929d,0x929d929d,0x929d929d,0x929d929d,
+0x929d929d,0x00100635,0x060b013f,0x00000004,
+0x00000001,0x007a0002,0x00000000,0x066e0610,
+0x0105929d,0x929d929d,0x929d929d,0x929d929d,
+0x929d929d,0xa431ac75,0x0001735a,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0x735a0051,
+0x00000000,0x929d929d,0x929d929d,0x929d929d,
+0x929d929d,0x929d929d,0x929d929d,0x929d929d,
+0x929d929d,0x929d929d,0x00000000,0x06400136,
+0x0000270f,0x00010000,0x007a0000,0x00000000,
+0x068e0645,0x0105929d,0x929d929d,0x929d929d,
+0x929d929d,0x929d929d,0xa431ac75,0x0001735a,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
+0x735a0100,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 61'
echo 'File patch-2.2.20 is continued in part 62'
echo "62" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:04 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part65

#!/bin/sh -x
# this is part 65 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 65; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X
X /* Device Data */
X char out [64]; // Answer Buffer
- int out_ptr; // Index to the first not readen byte
+ int out_ptr; // Index to the first not readen byte
X int out_count; // Bytes in the buffer
X
- int open; // Camera device open ?
- int rw_lock; // Block read <-> write
+ int open; // Camera device open ?
+ spinlock_t io_lock; // IO -lock
X
- char in [8]; // Command Input Buffer
+ char in [8]; // Command Input Buffer
X int in_count;
X
- int pic_index; // Cache for the Imagesize (-1 for nothing cached )
+ int pic_index; // Cache for the Imagesize (-1 for nothing cached )
X int pic_len;
X };
X
@@ -253,16 +270,16 @@
X }
X }
X wake_up= ( mdc800->camera_request_ready > 0 )
- &&
- (
- ((mdc800->camera_request_ready == 1) && (!mdc800->camera_busy))
- ||
- ((mdc800->camera_request_ready == 2) && data_received)
- ||
- ((mdc800->camera_request_ready == 3) && (mdc800->camera_busy))
- ||
- (urb->status < 0)
- );
+ &&
+ (
+ ((mdc800->camera_request_ready == 1) && (!mdc800->camera_busy))
+ ||
+ ((mdc800->camera_request_ready == 2) && data_received)
+ ||
+ ((mdc800->camera_request_ready == 3) && (mdc800->camera_busy))
+ ||
+ (urb->status < 0)
+ );
X
X if (wake_up)
X {
@@ -362,7 +379,7 @@
X */
X static void* mdc800_usb_probe (struct usb_device *dev ,unsigned int ifnum )
X {
- int i,j;
+ int i,j;
X struct usb_interface_descriptor *intf_desc;
X int irq_interval=0;
X
@@ -432,10 +449,10 @@
X
X info ("Found Mustek MDC800 on USB.");
X
+ spin_lock (&mdc800->io_lock);
+
X mdc800->dev=dev;
- mdc800->state=READY;
X mdc800->open=0;
- mdc800->rw_lock=0;
X
X /* Setup URB Structs */
X FILL_INT_URB (
@@ -469,6 +486,10 @@
X mdc800
X );
X
+ mdc800->state=READY;
+
+ spin_unlock (&mdc800->io_lock);
+
X return mdc800;
X }
X
@@ -539,18 +560,21 @@
X static int mdc800_device_open (struct inode* inode, struct file *file)
X {
X int retval=0;
+ int errn=0;
+
+ spin_lock (&mdc800->io_lock);
X
X if (mdc800->state == NOT_CONNECTED)
X {
- return -EBUSY;
+ errn=-EBUSY;
+ goto error_out;
X }
-
X if (mdc800->open)
X {
- return -EBUSY;
+ errn=-EBUSY;
+ goto error_out;
X }
X
- mdc800->rw_lock=0;
X mdc800->in_count=0;
X mdc800->out_count=0;
X mdc800->out_ptr=0;
@@ -562,16 +586,20 @@
X mdc800->camera_request_ready=0;
X
X retval=0;
+ mdc800->irq_urb->dev = mdc800->dev;
X if (usb_submit_urb (mdc800->irq_urb))
X {
X err ("request USB irq fails (submit_retval=%i urb_status=%i).",retval, mdc800->irq_urb->status);
- return -EIO;
+ errn = -EIO;
+ goto error_out;
X }
X
X mdc800->open=1;
-
X dbg ("Mustek MDC800 device opened.");
- return 0;
+
+error_out:
+ spin_unlock (&mdc800->io_lock);
+ return errn;
X }
X
X
@@ -583,7 +611,7 @@
X int retval=0;
X dbg ("Mustek MDC800 device closed.");
X
- lock_kernel();
+ spin_lock (&mdc800->io_lock);
X if (mdc800->open && (mdc800->state != NOT_CONNECTED))
X {
X mdc800->open=0;
@@ -595,7 +623,7 @@
X {
X retval=-EIO;
X }
- unlock_kernel();
+ spin_unlock (&mdc800->io_lock);
X
X return retval;
X }
@@ -609,23 +637,29 @@
X int left=len, sts=len; /* single transfer size */
X char* ptr=buf;
X
+ spin_lock (&mdc800->io_lock);
X if (mdc800->state == NOT_CONNECTED)
+ {
+ spin_unlock (&mdc800->io_lock);
X return -EBUSY;
-
+ }
X if (mdc800->state == WORKING)
X {
X warn ("Illegal State \"working\" reached during read ?!");
+ spin_unlock (&mdc800->io_lock);
X return -EBUSY;
X }
-
- if (!mdc800->open || mdc800->rw_lock)
+ if (!mdc800->open)
+ {
+ spin_unlock (&mdc800->io_lock);
X return -EBUSY;
- mdc800->rw_lock=1;
+ }
X
X while (left)
X {
- if (signal_pending (current)) {
- mdc800->rw_lock=0;
+ if (signal_pending (current))
+ {
+ spin_unlock (&mdc800->io_lock);
X return -EINTR;
X }
X
@@ -640,24 +674,25 @@
X mdc800->out_ptr=0;
X
X /* Download -> Request new bytes */
+ mdc800->download_urb->dev = mdc800->dev;
X if (usb_submit_urb (mdc800->download_urb))
X {
X err ("Can't submit download urb (status=%i)",mdc800->download_urb->status);
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return len-left;
X }
X interruptible_sleep_on_timeout (&mdc800->download_wait, TO_DOWNLOAD_GET_READY*HZ/1000);
X if (mdc800->download_urb->status != 0)
X {
X err ("request download-bytes fails (status=%i)",mdc800->download_urb->status);
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return len-left;
X }
X }
X else
X {
X /* No more bytes -> that's an error*/
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X }
@@ -671,7 +706,7 @@
X }
X }
X
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return len-left;
X }
X
@@ -686,17 +721,23 @@
X {
X int i=0;
X
+ spin_lock (&mdc800->io_lock);
X if (mdc800->state != READY)
+ {
+ spin_unlock (&mdc800->io_lock);
X return -EBUSY;
-
- if (!mdc800->open || mdc800->rw_lock)
+ }
+ if (!mdc800->open )
+ {
+ spin_unlock (&mdc800->io_lock);
X return -EBUSY;
- mdc800->rw_lock=1;
+ }
X
X while (i<len)
X {
- if (signal_pending (current)) {
- mdc800->rw_lock=0;
+ if (signal_pending (current))
+ {
+ spin_unlock (&mdc800->io_lock);
X return -EINTR;
X }
X
@@ -718,7 +759,7 @@
X else
X {
X err ("Command is to long !\n");
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X
@@ -730,7 +771,7 @@
X if (mdc800_usb_waitForIRQ (0,TO_GET_READY))
X {
X err ("Camera didn't get ready.\n");
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X
@@ -738,17 +779,18 @@
X
X mdc800->state=WORKING;
X memcpy (mdc800->write_urb->transfer_buffer, mdc800->in,8);
+ mdc800->write_urb->dev = mdc800->dev;
X if (usb_submit_urb (mdc800->write_urb))
X {
X err ("submitting write urb fails (status=%i)", mdc800->write_urb->status);
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X interruptible_sleep_on_timeout (&mdc800->write_wait, TO_WRITE_GET_READY*HZ/1000);
X if (mdc800->state == WORKING)
X {
X usb_unlink_urb (mdc800->write_urb);
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X
@@ -760,7 +802,7 @@
X {
X err ("call 0x07 before 0x05,0x3e");
X mdc800->state=READY;
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X mdc800->pic_len=-1;
@@ -779,7 +821,7 @@
X if (mdc800_usb_waitForIRQ (1,TO_READ_FROM_IRQ))
X {
X err ("requesting answer from irq fails");
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X
@@ -807,7 +849,7 @@
X if (mdc800_usb_waitForIRQ (0,TO_DEFAULT_COMMAND))
X {
X err ("Command Timeout.");
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);
X return -EIO;
X }
X }
@@ -817,7 +859,7 @@
X }
X i++;
X }
- mdc800->rw_lock=0;
+ spin_unlock (&mdc800->io_lock);


X return i;
X }
X

@@ -842,12 +884,11 @@
X */
X static struct usb_driver mdc800_usb_driver =
X {
- "mdc800",
- mdc800_usb_probe,
- mdc800_usb_disconnect,
- { 0,0 },
- &mdc800_device_ops,
- MDC800_DEVICE_MINOR_BASE
+ name: "mdc800",
+ probe: mdc800_usb_probe,
+ disconnect: mdc800_usb_disconnect,
+ fops: &mdc800_device_ops,
+ minor: MDC800_DEVICE_MINOR_BASE,
X };
X
X
@@ -865,10 +906,11 @@
X /* Allocate Memory */
X try (mdc800=kmalloc (sizeof (struct mdc800_data), GFP_KERNEL));
X
+ memset(mdc800, 0, sizeof(struct mdc800_data));
X mdc800->dev=0;
X mdc800->open=0;
X mdc800->state=NOT_CONNECTED;
- memset(mdc800, 0, sizeof(struct mdc800_data));
+ spin_lock_init (&mdc800->io_lock);
X
X init_waitqueue_head (&mdc800->irq_wait);
X init_waitqueue_head (&mdc800->write_wait);
@@ -886,8 +928,7 @@
X if (usb_register (&mdc800_usb_driver) < 0)
X goto cleanup_on_fail;
X
- info ("Mustek Digital Camera Driver " VERSION " (MDC800)");
- info (RELEASE_DATE " Henning Zabel <hen...@uni-paderborn.de>");
+ info (DRIVER_VERSION " " DRIVER_DESC);


X
X return 0;
X

@@ -930,9 +971,9 @@
X mdc800=0;
X }
X
-
-MODULE_AUTHOR ("Henning Zabel <hen...@uni-paderborn.de>");
-MODULE_DESCRIPTION ("USB Driver for Mustek MDC800 Digital Camera");
-
X module_init (usb_mdc800_init);
X module_exit (usb_mdc800_cleanup);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/ov511.c linux/drivers/usb/ov511.c
--- v2.2.19/drivers/usb/ov511.c Sun Mar 25 17:31:42 2001
+++ linux/drivers/usb/ov511.c Wed Oct 10 01:41:25 2001
@@ -30,8 +30,6 @@
X * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X */
X
-static const char version[] = "1.25";
-
X #define __NO_VERSION__
X
X #include <linux/config.h>
@@ -55,7 +53,12 @@
X
X #include "ov511.h"
X
-#undef OV511_GBR422 /* Experimental -- sets the 7610 to GBR422 */
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.28"
+#define DRIVER_AUTHOR "Mark McClelland <m...@i.am> & Bret Wallach & Orion Sky Lawlor <ola...@acm.org> & Kevin Moore & Charl P. Botha <cpb...@ieee.org> & Claudio Matsuoka <cla...@conectiva.com>"
+#define DRIVER_DESC "OV511 USB Camera Driver"
X
X #define OV511_I2C_RETRIES 3
X
@@ -64,8 +67,6 @@
X #define MAX_DATA_SIZE (MAX_FRAME_SIZE + sizeof(struct timeval))
X
X #define GET_SEGSIZE(p) ((p) == VIDEO_PALETTE_GREY ? 256 : 384)
-#define GET_DEPTH(p) ((p) == VIDEO_PALETTE_GREY ? 8 : \
- ((p) == VIDEO_PALETTE_YUV422 ? 16 : 24))
X
X /* PARAMETER VARIABLES: */
X static int autoadjust = 1; /* CCD dynamically changes exposure, etc... */
@@ -78,7 +79,7 @@
X * 5=highly repetitive mesgs
X * NOTE: This should be changed to 0, 1, or 2 for production kernels
X */
-static int debug = 3;
+static int debug = 0;
X
X /* Fix vertical misalignment of red and blue at 640x480 */
X static int fix_rgb_offset = 0;
@@ -116,6 +117,13 @@
X /* Display test pattern - doesn't work yet either */
X static int testpat = 0;
X
+/* Setting this to 1 will make the sensor output GBR422 instead on YUV420. Only
+ * affects RGB24 mode. */
+static int sensor_gbr = 0;
+
+/* Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details. */
+static int dumppix = 0;
+
X MODULE_PARM(autoadjust, "i");
X MODULE_PARM_DESC(autoadjust, "CCD dynamically changes exposure");
X MODULE_PARM(debug, "i");
@@ -142,11 +150,13 @@
X MODULE_PARM_DESC(compress, "Turn on compression (not functional yet)");
X MODULE_PARM(testpat, "i");
X MODULE_PARM_DESC(testpat, "Replace image with vertical bar testpattern (only partially working)");
+MODULE_PARM(sensor_gbr, "i");
+MODULE_PARM_DESC(sensor_gbr, "Make sensor output GBR422 rather than YUV420");
+MODULE_PARM(dumppix, "i");
+MODULE_PARM_DESC(dumppix, "Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details");
X
-MODULE_AUTHOR("Mark McClelland <m...@i.am> & Bret Wallach & Orion Sky Lawlor <ola...@acm.org> & Kevin Moore & Charl P. Botha <cpb...@ieee.org> & Claudio Matsuoka <cla...@conectiva.com>");
-MODULE_DESCRIPTION("OV511 USB Camera Driver");
-
-static char kernel_version[] = UTS_RELEASE;
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
X
X static struct usb_driver ov511_driver;
X
@@ -223,9 +233,10 @@
X if (!pmd_none(*pmd)) {
X ptep = pte_offset(pmd, adr);
X pte = *ptep;
- if (pte_present(pte))
- ret = page_address(pte_page(pte)) |
- (adr & (PAGE_SIZE-1));
+ if (pte_present(pte)) {
+ ret = (unsigned long) page_address(pte_page(pte));
+ ret |= (adr & (PAGE_SIZE - 1));
+ }
X }
X }
X
@@ -360,6 +371,7 @@
X ov511->bridge == BRG_OV511PLUS ? "OV511+" :
X "unknown");
X out += sprintf (out, "sensor : %s\n",
+ ov511->sensor == SEN_OV6620 ? "OV6620" :
X ov511->sensor == SEN_OV7610 ? "OV7610" :
X ov511->sensor == SEN_OV7620 ? "OV7620" :
X ov511->sensor == SEN_OV7620AE ? "OV7620AE" :
@@ -451,7 +463,6 @@
X }
X #endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */
X
-
X /**********************************************************************
X *
X * Camera interface
@@ -703,7 +714,7 @@
X {
X int rc;
X
- PDEBUG(3, "Reset: type=0x%X", reset_type);
+ PDEBUG(4, "Reset: type=0x%X", reset_type);
X rc = ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, reset_type);
X rc = ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, 0);
X
@@ -832,14 +843,21 @@
X } else if ((ov511->sensor == SEN_OV7620)
X || (ov511->sensor == SEN_OV7620AE)) {
X #if 0
- cur_con = ov511_i2c_read(dev, OV7610_REG_CNT);
- cur_brt = ov511_i2c_read(dev, OV7610_REG_BRT);
- // DEBUG_CODE
- PDEBUG(1, "con=%d brt=%d", ov511_i2c_read(dev, OV7610_REG_CNT),
- ov511_i2c_read(dev, OV7610_REG_BRT));
+ int cur_sat, new_sat, tmp;
X
- if (ov511_i2c_write(dev, OV7610_REG_CNT, p->contrast >> 8) < 0)
+ cur_sat = ov511_i2c_read(dev, OV7610_REG_BLUE);
+
+ tmp = (p->hue >> 8) - cur_sat;
+ new_sat = (tmp < 0) ? (-tmp) | 0x80 : tmp;
+
+ PDEBUG(1, "cur=%d target=%d diff=%d", cur_sat, p->hue >> 8, tmp);
+
+ if (ov511_i2c_write(dev, OV7610_REG_BLUE, new_sat) < 0)
X return -EIO;
+
+ // DEBUG_CODE
+ PDEBUG(1, "hue=%d", ov511_i2c_read(dev, OV7610_REG_BLUE));
+
X #endif
X }
X
@@ -885,6 +903,23 @@


X return 0;
X }
X

+/* Returns number of bits per pixel (regardless of where they are located; planar or
+ * not), or zero for unsupported format.
+ */
+static int ov511_get_depth(int palette)
+{
+ switch (palette) {
+ case VIDEO_PALETTE_GREY: return 8;
+ case VIDEO_PALETTE_RGB565: return 16;
+ case VIDEO_PALETTE_RGB24: return 24;
+ case VIDEO_PALETTE_YUV422: return 16;
+ case VIDEO_PALETTE_YUYV: return 16;
+ case VIDEO_PALETTE_YUV420: return 24;
+ case VIDEO_PALETTE_YUV422P: return 24; /* Planar */
+ default: return 0; /* Invalid format */
+ }
+}
+
X /* LNCNT values fixed by Lawrence Glaister <l...@jfm.bc.ca> */
X static struct mode_list mlist[] = {
X /* W H C PXCNT LNCNT PXDIV LNDIV M420 COMA COML */
@@ -920,6 +955,12 @@
X if (ov511_stop(ov511->dev) < 0)
X return -EIO;
X
+ /* Dumppix only works with RGB24 */
+ if (dumppix && (mode != VIDEO_PALETTE_RGB24)) {
+ err("dumppix only supported with RGB 24");


+ return -EINVAL;
+ }
+

X if (mode == VIDEO_PALETTE_GREY) {
X ov511_reg_write(dev, 0x16, 0x00);
X if (ov511->sensor == SEN_OV7610
@@ -956,9 +997,9 @@
X break;
X case SEN_OV6620:
X hwsbase = 0x38;
- hwebase = 0x39;
- vwsbase = 0x03;
- vwebase = 0x04;
+ hwebase = 0x3a;
+ vwsbase = 0x05;
+ vwebase = 0x06;
X break;
X case SEN_OV7620:
X hwsbase = 0x2c;
@@ -1042,13 +1083,16 @@
X /* Calculate and set the clock divisor */
X clock = ((sub_flag ? ov511->subw * ov511->subh : width * height)
X * (mlist[i].color ? 3 : 2) / 2) / 66000;
+#if 0
+ clock *= cams;
+#endif
X ov511_i2c_write(dev, 0x11, clock);
X
-#ifdef OV511_GBR422
- ov511_i2c_write(dev, 0x12, mlist[i].common_A | 0x08);
-#else
- ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x02:0x00));
-#endif
+ /* We only have code to convert GBR -> RGB24 */
+ if ((mode == VIDEO_PALETTE_RGB24) && sensor_gbr)
+ ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x0a:0x08));
+ else
+ ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x02:0x00));
X
X /* 7620/6620 don't have register 0x35, so play it safe */
X if (ov511->sensor == SEN_OV7610 ||
@@ -1116,7 +1160,7 @@
X
X static inline void
X ov511_move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v,
- int rowPixels, unsigned char * rgb)
+ int rowPixels, unsigned char * rgb, int bits)
X {
X const int rvScale = 91881;
X const int guScale = -22553;
@@ -1137,14 +1181,32 @@
X yTL *= yScale; yTR *= yScale;
X yBL *= yScale; yBR *= yScale;
X
- /* Write out top two pixels */
- rgb[0] = LIMIT(b+yTL); rgb[1] = LIMIT(g+yTL); rgb[2] = LIMIT(r+yTL);
- rgb[3] = LIMIT(b+yTR); rgb[4] = LIMIT(g+yTR); rgb[5] = LIMIT(r+yTR);
-
- /* Skip down to next line to write out bottom two pixels */
- rgb += 3 * rowPixels;
- rgb[0] = LIMIT(b+yBL); rgb[1] = LIMIT(g+yBL); rgb[2] = LIMIT(r+yBL);
- rgb[3] = LIMIT(b+yBR); rgb[4] = LIMIT(g+yBR); rgb[5] = LIMIT(r+yBR);
+ if (bits == 24) {
+ /* Write out top two pixels */
+ rgb[0] = LIMIT(b+yTL); rgb[1] = LIMIT(g+yTL); rgb[2] = LIMIT(r+yTL);
+ rgb[3] = LIMIT(b+yTR); rgb[4] = LIMIT(g+yTR); rgb[5] = LIMIT(r+yTR);
+
+ /* Skip down to next line to write out bottom two pixels */
+ rgb += 3 * rowPixels;
+ rgb[0] = LIMIT(b+yBL); rgb[1] = LIMIT(g+yBL); rgb[2] = LIMIT(r+yBL);
+ rgb[3] = LIMIT(b+yBR); rgb[4] = LIMIT(g+yBR); rgb[5] = LIMIT(r+yBR);
+ } else if (bits == 16) {
+ /* Write out top two pixels */
+ rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F) | ((LIMIT(g+yTL) << 3) & 0xE0);
+ rgb[1] = ((LIMIT(g+yTL) >> 5) & 0x07) | (LIMIT(r+yTL) & 0xF8);
+
+ rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F) | ((LIMIT(g+yTR) << 3) & 0xE0);
+ rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07) | (LIMIT(r+yTR) & 0xF8);
+
+ /* Skip down to next line to write out bottom two pixels */
+ rgb += 2 * rowPixels;
+
+ rgb[0] = ((LIMIT(b+yBL) >> 3) & 0x1F) | ((LIMIT(g+yBL) << 3) & 0xE0);
+ rgb[1] = ((LIMIT(g+yBL) >> 5) & 0x07) | (LIMIT(r+yBL) & 0xF8);
+
+ rgb[2] = ((LIMIT(b+yBR) >> 3) & 0x1F) | ((LIMIT(g+yBR) << 3) & 0xE0);
+ rgb[3] = ((LIMIT(g+yBR) >> 5) & 0x07) | (LIMIT(r+yBR) & 0xF8);


+ }
X }
X
X /*

@@ -1170,7 +1232,7 @@
X * Note that the U and V data in one segment represents a 16 x 16 pixel
X * area, but the Y data represents a 32 x 8 pixel area.
X *
- * If OV511_DUMPPIX is defined, _parse_data just dumps the incoming segments,
+ * If dumppix module param is set, _parse_data just dumps the incoming segments,
X * verbatim, in order, into the frame. When used with vidcat -f ppm -s 640x480
X * this puts the data on the standard output and can be analyzed with the
X * parseppm.c utility I wrote. That's a much faster way for figuring out how
@@ -1180,14 +1242,8 @@
X #define HDIV 8
X #define WDIV (256/HDIV)
X
-#undef OV511_DUMPPIX
-
-/* #define this and OV511_DUMPPIX to disable parsing of UV data */
-#undef OV511_FORCE_MONO
-
-#ifdef OV511_GBR422
X static void
-ov511_parse_data_rgb24(unsigned char *pIn0, unsigned char *pOut0,
+ov511_parse_gbr422_to_rgb24(unsigned char *pIn0, unsigned char *pOut0,
X int iOutY, int iOutUV, int iHalf, int iWidth)
X {
X int k, l, m;
@@ -1234,14 +1290,12 @@
X }
X }
X
-#else
-
X static void
-ov511_parse_data_rgb24(unsigned char *pIn0, unsigned char *pOut0,
- int iOutY, int iOutUV, int iHalf, int iWidth)
+ov511_parse_yuv420_to_rgb(unsigned char *pIn0, unsigned char *pOut0,
+ int iOutY, int iOutUV, int iHalf, int iWidth, int bits)
X {
-#ifndef OV511_DUMPPIX
X int k, l, m;
+ int bytes = bits >> 3;
X unsigned char *pIn;
X unsigned char *pOut, *pOut1;
X
@@ -1254,11 +1308,11 @@
X for (l = 0; l < 8; l++) {
X for (m = 0; m < 8; m++) {
X *pOut1 = *pIn++;
- pOut1 += 3;
+ pOut1 += bytes;
X }
- pOut1 += (iWidth - 8) * 3;
+ pOut1 += (iWidth - 8) * bytes;
X }
- pOut += 8 * 3;
+ pOut += 8 * bytes;
X }
X }
X
@@ -1268,16 +1322,16 @@
X for (l = 0; l < 4; l++) {
X for (m=0; m<8; m++) {
X int y00 = *(pOut);
- int y01 = *(pOut+3);
- int y10 = *(pOut+iWidth*3);
- int y11 = *(pOut+iWidth*3+3);
+ int y01 = *(pOut+bytes);
+ int y10 = *(pOut+iWidth*bytes);
+ int y11 = *(pOut+iWidth*bytes+bytes);
X int v = *(pIn+64) - 128;
X int u = *pIn++ - 128;
X ov511_move_420_block(y00, y01, y10, y11, u, v, iWidth,
- pOut);
- pOut += 6;
+ pOut, bits);
+ pOut += 2 * bytes;
X }
- pOut += (iWidth*2 - 16) * 3;
+ pOut += (iWidth*2 - 16) * bytes;
X }
X
X /* Just copy the other UV rows */
@@ -1285,9 +1339,9 @@
X for (m = 0; m < 8; m++) {
X *pOut++ = *(pIn + 64);
X *pOut = *pIn++;
- pOut += 5;
+ pOut += 2 * bytes - 1;
X }
- pOut += (iWidth*2 - 16) * 3;
+ pOut += (iWidth*2 - 16) * bytes;
X }
X
X /* Calculate values if it's the second half */
@@ -1305,72 +1359,65 @@
X int v = *pOut1 - 128;
X int u = *(pOut1+1) - 128;
X ov511_move_420_block(y00, y01, y10,
- y11, u, v, iWidth, pOut1);
- pOut1 += 6;
+ y11, u, v, iWidth, pOut1, bits);
+ pOut1 += 2 * bytes;
X }
- pOut1 += (iWidth*2 - 8) * 3;
+ pOut1 += (iWidth*2 - 8) * bytes;
X pIn += 8;
X }
- pOut += 8 * 3;
+ pOut += 8 * bytes;
X }
X }
-#else
+}
X
-#ifndef OV511_FORCE_MONO
- /* Just dump pix data straight out for debug */


- int i, j;
-

- pOut0 += iOutY;
- for (i = 0; i < HDIV; i++) {
- for (j = 0; j < WDIV; j++) {
- *pOut0++ = *pIn0++;
- *pOut0++ = *pIn0++;
- *pOut0++ = *pIn0++;
- }
- pOut0 += (iWidth - WDIV) * 3;
- }
-#else
-
-#if 1
- /* This converts the Y data to "black-and-white" RGB data */
- /* Useful for experimenting with compression */
- int k, l, m;
+static void
+ov511_dumppix(unsigned char *pIn0, unsigned char *pOut0,
+ int iOutY, int iOutUV, int iHalf, int iWidth)
+{
+ int i, j, k;
X unsigned char *pIn, *pOut, *pOut1;
X
- pIn = pIn0 + 128;
- pOut = pOut0 + iOutY;
- for (k = 0; k < 4; k++) {
- pOut1 = pOut;
- for (l = 0; l < 8; l++) {
- for (m = 0; m < 8; m++) {
- *pOut1++ = *pIn;
- *pOut1++ = *pIn;
- *pOut1++ = *pIn++;
+ switch (dumppix) {
+ case 1: /* Just dump YUV data straight out for debug */
+ pOut0 += iOutY;
+ for (i = 0; i < HDIV; i++) {
+ for (j = 0; j < WDIV; j++) {
+ *pOut0++ = *pIn0++;
+ *pOut0++ = *pIn0++;
+ *pOut0++ = *pIn0++;
X }
- pOut1 += (iWidth - 8) * 3;
+ pOut0 += (iWidth - WDIV) * 3;
X }
- pOut += 8 * 3;
- }
-#else
- /* This will dump the Y channel data stream as-is */
- int count;
- unsigned char *pIn, *pOut;
-
- pIn = pIn0 + 128;
- pOut = pOut0 + output_offset;
- for (count = 0; count < 256; count++) {
- *pOut++ = *pIn;
- *pOut++ = *pIn;
- *pOut++ = *pIn++;
- output_offset += 3;
- }
-#endif
-
-#endif
-
-#endif
+ break;
+ case 2: /* This converts the Y data to "black-and-white" RGB data */
+ /* Useful for experimenting with compression */
+ pIn = pIn0 + 128;
+ pOut = pOut0 + iOutY;
+ for (i = 0; i < 4; i++) {
+ pOut1 = pOut;
+ for (j = 0; j < 8; j++) {
+ for (k = 0; k < 8; k++) {
+ *pOut1++ = *pIn;
+ *pOut1++ = *pIn;
+ *pOut1++ = *pIn++;
+ }
+ pOut1 += (iWidth - 8) * 3;
+ }
+ pOut += 8 * 3;
+ }
+ break;
+ case 3: /* This will dump only the Y channel data stream as-is */
+ pIn = pIn0 + 128;
+ pOut = pOut0 + output_offset;
+ for (i = 0; i < 256; i++) {
+ *pOut++ = *pIn;
+ *pOut++ = *pIn;
+ *pOut++ = *pIn++;
+ output_offset += 3;
+ }
+ break;
+ } /* End switch (dumppix) */
X }
-#endif
X
X /* This converts YUV420 segments to YUYV */
X static void
@@ -1665,6 +1712,11 @@
X /* Frame start */
X PDEBUG(4, "Frame start, framenum = %d", ov511->curframe);
X
+#if 0
+ /* Make sure no previous data carries over; necessary
+ * for compression experimentation */
+ memset(frame->data, 0, MAX_DATA_SIZE);
+#endif
X output_offset = 0;
X
X /* Check to see if it's a snapshot frame */
@@ -1743,8 +1795,19 @@
X ov511_parse_data_grey (pData, pOut, iOutY, frame->width);
X break;
X case VIDEO_PALETTE_RGB24:
- ov511_parse_data_rgb24 (pData, pOut, iOutY, iOutUV,
- iY & 1, frame->width);
+ if (dumppix)
+ ov511_dumppix(pData, pOut, iOutY, iOutUV,
+ iY & 1, frame->width);
+ else if (sensor_gbr)
+ ov511_parse_gbr422_to_rgb24(pData, pOut, iOutY, iOutUV,
+ iY & 1, frame->width);
+ else
+ ov511_parse_yuv420_to_rgb(pData, pOut, iOutY, iOutUV,
+ iY & 1, frame->width, 24);
+ break;
+ case VIDEO_PALETTE_RGB565:
+ ov511_parse_yuv420_to_rgb(pData, pOut, iOutY, iOutUV,
+ iY & 1, frame->width, 16);
X break;
X case VIDEO_PALETTE_YUV422:
X case VIDEO_PALETTE_YUYV:
@@ -1785,11 +1848,20 @@
X static void ov511_isoc_irq(struct urb *urb)
X {
X int len;
- struct usb_ov511 *ov511 = urb->context;
+ struct usb_ov511 *ov511;
X struct ov511_sbuf *sbuf;
X
- if (!ov511->dev)
+ if (!urb->context) {
+ PDEBUG(4, "no context");
X return;
+ }
+
+ ov511 = (struct usb_ov511 *) urb->context;
+
+ if (!ov511->dev || !ov511->user) {
+ PDEBUG(4, "no device, or not open");
+ return;
+ }
X
X if (!ov511->streaming) {
X PDEBUG(4, "hmmm... not streaming, but got interrupt");
@@ -1808,6 +1880,8 @@
X /* Move to the next sbuf */
X ov511->cursbuf = (ov511->cursbuf + 1) % OV511_NUMSBUF;
X
+ urb->dev = ov511->dev;


+
X return;
X }
X

@@ -1875,6 +1949,7 @@
X ov511->sbuf[n].urb->next = ov511->sbuf[n+1].urb;
X
X for (n = 0; n < OV511_NUMSBUF; n++) {
+ ov511->sbuf[n].urb->dev = ov511->dev;
X err = usb_submit_urb(ov511->sbuf[n].urb);
X if (err)
X err("init isoc: usb_submit_urb(%d) ret %d", n, err);
@@ -2082,7 +2157,7 @@
X static int ov511_open(struct video_device *dev, int flags)
X {
X struct usb_ov511 *ov511 = (struct usb_ov511 *)dev;
- int err = 0;
+ int err;
X
X MOD_INC_USE_COUNT;
X PDEBUG(4, "opening");


@@ -2171,14 +2246,15 @@
X

X PDEBUG (4, "VIDIOCGCAP");
X
+ memset(&b, 0, sizeof(b));
X strcpy(b.name, "OV511 USB Camera");
X b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
X b.channels = 1;
X b.audios = 0;
X b.maxwidth = ov511->maxwidth;
X b.maxheight = ov511->maxheight;
- b.minwidth = 32;
- b.minheight = 16;
+ b.minwidth = 160;
+ b.minheight = 120;
X
X if (copy_to_user(arg, &b, sizeof(b)))
X return -EFAULT;
@@ -2222,9 +2298,11 @@
X
X PDEBUG (4, "VIDIOCGPICT");
X
+ memset(&p, 0, sizeof(p));
+
X if (ov7610_get_picture(ov511, &p))
X return -EIO;
-
+
X if (copy_to_user(arg, &p, sizeof(p)))
X return -EFAULT;
X
@@ -2240,12 +2318,7 @@
X if (copy_from_user(&p, arg, sizeof(p)))
X return -EFAULT;
X
- if (p.palette != VIDEO_PALETTE_GREY &&
- p.palette != VIDEO_PALETTE_RGB24 &&
- p.palette != VIDEO_PALETTE_YUV422 &&
- p.palette != VIDEO_PALETTE_YUYV &&
- p.palette != VIDEO_PALETTE_YUV420 &&
- p.palette != VIDEO_PALETTE_YUV422P)
+ if (!ov511_get_depth(p.palette))
X return -EINVAL;
X
X if (ov7610_set_picture(ov511, &p))
@@ -2344,11 +2417,11 @@
X {
X struct video_window vw;
X
+ memset(&vw, 0, sizeof(vw));
X vw.x = 0; /* FIXME */
X vw.y = 0;
X vw.width = ov511->frame[0].width;
X vw.height = ov511->frame[0].height;
- vw.chromakey = 0;
X vw.flags = 30;
X
X PDEBUG (4, "VIDIOCGWIN: %dx%d", vw.width, vw.height);
@@ -2361,12 +2434,16 @@
X case VIDIOCGMBUF:
X {
X struct video_mbuf vm;
+ int i;
X
X memset(&vm, 0, sizeof(vm));
X vm.size = OV511_NUMFRAMES * MAX_DATA_SIZE;
X vm.frames = OV511_NUMFRAMES;
X vm.offsets[0] = 0;
- vm.offsets[1] = MAX_FRAME_SIZE + sizeof (struct timeval);
+ for (i = 1; i < OV511_NUMFRAMES; i++) {
+ vm.offsets[i] = vm.offsets[i-1] + MAX_FRAME_SIZE
+ + sizeof (struct timeval);
+ }
X
X if (copy_to_user((void *)arg, (void *)&vm, sizeof(vm)))
X return -EFAULT;
@@ -2376,7 +2453,7 @@
X case VIDIOCMCAPTURE:
X {
X struct video_mmap vm;
- int ret;
+ int ret, depth;
X
X if (copy_from_user((void *)&vm, (void *)arg, sizeof(vm)))
X return -EFAULT;
@@ -2385,19 +2462,26 @@
X PDEBUG(4, "frame: %d, size: %dx%d, format: %d",
X vm.frame, vm.width, vm.height, vm.format);
X
- if (vm.format != VIDEO_PALETTE_RGB24 &&
- vm.format != VIDEO_PALETTE_YUV422 &&
- vm.format != VIDEO_PALETTE_YUYV &&
- vm.format != VIDEO_PALETTE_YUV420 &&
- vm.format != VIDEO_PALETTE_YUV422P &&
- vm.format != VIDEO_PALETTE_GREY)
+ depth = ov511_get_depth(vm.format);
+ if (!depth) {
+ err("VIDIOCMCAPTURE: invalid format (%d)", vm.format);
X return -EINVAL;
+ }
X
- if ((vm.frame != 0) && (vm.frame != 1))
+ if ((vm.frame != 0) && (vm.frame != 1)) {
+ err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame);
X return -EINVAL;
-
- if (vm.width > ov511->maxwidth || vm.height > ov511->maxheight)
+ }
+
+ if ((unsigned)vm.frame >= OV511_NUMFRAMES) {
+ err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame);


+ return -EINVAL;
+ }
+

+ if (vm.width > ov511->maxwidth || vm.height > ov511->maxheight) {
+ err("VIDIOCMCAPTURE: requested dimensions too big");
X return -EINVAL;
+ }
X
X if (ov511->frame[vm.frame].grabstate == FRAME_GRABBING)
X return -EBUSY;
@@ -2425,7 +2509,7 @@
X ov511->frame[vm.frame].format = vm.format;
X ov511->frame[vm.frame].sub_flag = ov511->sub_flag;
X ov511->frame[vm.frame].segsize = GET_SEGSIZE(vm.format);
- ov511->frame[vm.frame].depth = GET_DEPTH(vm.format);
+ ov511->frame[vm.frame].depth = depth;
X
X /* Mark it as ready */
X ov511->frame[vm.frame].grabstate = FRAME_READY;
@@ -2439,6 +2523,11 @@
X if (copy_from_user((void *)&frame, arg, sizeof(int)))
X return -EFAULT;
X
+ if ((unsigned)frame >= OV511_NUMFRAMES) {
+ err("VIDIOCSYNC: invalid frame (%d)", frame);


+ return -EINVAL;
+ }
+

X PDEBUG(4, "syncing to frame %d, grabstate = %d", frame,
X ov511->frame[frame].grabstate);
X
@@ -2484,6 +2573,13 @@
X goto redo;
X }
X case FRAME_DONE:
+ if (ov511->snap_enabled && !ov511->frame[frame].snapshot) {
+ int ret;
+ if ((ret = ov511_new_frame(ov511, frame)) < 0)
+ return ret;
+ goto redo;
+ }
+
X ov511->frame[frame].grabstate = FRAME_UNUSED;
X
X /* Reset the hardware snapshot button */
@@ -2660,7 +2756,7 @@
X
X PDEBUG(4, "mmap: %ld (%lX) bytes", size, size);
X
- if (size > (((2 * MAX_DATA_SIZE) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
+ if (size > (((OV511_NUMFRAMES * MAX_DATA_SIZE) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
X return -EINVAL;
X
X pos = (unsigned long)ov511->fbuf;
@@ -3171,7 +3267,7 @@
X return NULL;
X
X /* Checking vendor/product should be enough, but what the hell */
- if (interface->bInterfaceClass != 0xFF)
+ if (interface->bInterfaceClass != 0xFF)
X return NULL;
X if (interface->bInterfaceSubClass != 0x00)
X return NULL;
@@ -3266,7 +3362,8 @@
X }
X
X
-static void ov511_disconnect(struct usb_device *dev, void *ptr)
+static void
+ov511_disconnect(struct usb_device *dev, void *ptr)
X {
X struct usb_ov511 *ov511 = (struct usb_ov511 *) ptr;
X int n;
@@ -3324,10 +3421,9 @@
X }
X
X static struct usb_driver ov511_driver = {
- "ov511",
- ov511_probe,
- ov511_disconnect,
- { NULL, NULL }
+ name: "ov511",
+ probe: ov511_probe,
+ disconnect: ov511_disconnect
X };
X
X
@@ -3346,7 +3442,7 @@
X if (usb_register(&ov511_driver) < 0)
X return -1;
X
- info("ov511 driver version %s registered", version);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


X
X return 0;
X }

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/pegasus.c linux/drivers/usb/pegasus.c
--- v2.2.19/drivers/usb/pegasus.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/pegasus.c Wed Oct 10 01:41:26 2001
@@ -40,7 +40,6 @@
X */
X
X
-#include <linux/module.h>
X #include <linux/sched.h>
X #include <linux/malloc.h>
X #include <linux/init.h>
@@ -48,163 +47,40 @@
X #include <linux/netdevice.h>
X #include <linux/etherdevice.h>
X #include <linux/usb.h>
+#include <linux/module.h>
+#include "pegasus.h"
X
-
-static const char *version = __FILE__ ": v0.4.13 2000/10/13 (C) 1999-2000 Petko Manolov (pet...@dce.bg)";
-
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v0.4.18 2001/03/18 (C) 1999-2000"
+#define DRIVER_AUTHOR "Petko Manolov <pet...@dce.bg>"
+#define DRIVER_DESC "ADMtek AN986 Pegasus USB Ethernet driver"
X
X #define PEGASUS_USE_INTR
-
-
-#define PEGASUS_II 0x80000000
-#define HAS_HOME_PNA 0x40000000
-
-#define PEGASUS_MTU 1500
-#define PEGASUS_MAX_MTU 1536
-
-#define EPROM_WRITE 0x01
-#define EPROM_READ 0x02
-#define EPROM_DONE 0x04
-#define EPROM_WR_ENABLE 0x10
-#define EPROM_LOAD 0x20
-
-#define MII_BMCR 0x00
-#define MII_BMSR 0x01
-#define BMSR_MEDIA 0x7808
-#define MII_ANLPA 0x05
-#define ANLPA_100TX_FD 0x0100
-#define ANLPA_100TX_HD 0x0080
-#define ANLPA_10T_FD 0x0040
-#define ANLPA_10T_HD 0x0020
-#define PHY_DONE 0x80
-#define PHY_READ 0x40
-#define PHY_WRITE 0x20
-#define DEFAULT_GPIO_RESET 0x24
-#define LINKSYS_GPIO_RESET 0x24
-#define DEFAULT_GPIO_SET 0x26
-
-#define PEGASUS_PRESENT 0x00000001
-#define PEGASUS_RUNNING 0x00000002
-#define PEGASUS_TX_BUSY 0x00000004
-#define PEGASUS_RX_BUSY 0x00000008
-#define CTRL_URB_RUNNING 0x00000010
-#define CTRL_URB_SLEEP 0x00000020
-#define PEGASUS_UNPLUG 0x00000040
-#define ETH_REGS_CHANGE 0x40000000
-#define ETH_REGS_CHANGED 0x80000000
-
-#define RX_MULTICAST 2
-#define RX_PROMISCUOUS 4
-
-#define REG_TIMEOUT (HZ)
-#define PEGASUS_TX_TIMEOUT (HZ*10)
-
-#define TX_UNDERRUN 0x80
-#define EXCESSIVE_COL 0x40
-#define LATE_COL 0x20
-#define NO_CARRIER 0x10
-#define LOSS_CARRIER 0x08
-#define JABBER_TIMEOUT 0x04
-
-#define PEGASUS_REQT_READ 0xc0
-#define PEGASUS_REQT_WRITE 0x40
-#define PEGASUS_REQ_GET_REGS 0xf0
-#define PEGASUS_REQ_SET_REGS 0xf1
-#define PEGASUS_REQ_SET_REG PEGASUS_REQ_SET_REGS
-#define NUM_CTRL_URBS 0x10
-#define ALIGN(x) x __attribute__((aligned(L1_CACHE_BYTES)))
-
-enum pegasus_registers {
- EthCtrl0 = 0,
- EthCtrl1 = 1,
- EthCtrl2 = 2,
- EthID = 0x10,
- Reg1d = 0x1d,
- EpromOffset = 0x20,
- EpromData = 0x21, /* 0x21 low, 0x22 high byte */
- EpromCtrl = 0x23,
- PhyAddr = 0x25,
- PhyData = 0x26, /* 0x26 low, 0x27 high byte */
- PhyCtrl = 0x28,
- UsbStst = 0x2a,
- EthTxStat0 = 0x2b,
- EthTxStat1 = 0x2c,
- EthRxStat = 0x2d,
- Reg7b = 0x7b,
- Gpio0 = 0x7e,
- Gpio1 = 0x7f,
- Reg81 = 0x81,
-};
-
-
-typedef struct pegasus {
- struct usb_device *usb;
- struct net_device *net;
- struct net_device_stats stats;
- unsigned flags;
- unsigned features;
- int intr_interval;
- struct urb ctrl_urb, rx_urb, tx_urb, intr_urb;
- devrequest dr;
- wait_queue_head_t ctrl_wait;
- struct semaphore ctrl_sem;
- unsigned char ALIGN(rx_buff[PEGASUS_MAX_MTU]);
- unsigned char ALIGN(tx_buff[PEGASUS_MAX_MTU]);
- unsigned char ALIGN(intr_buff[8]);
- __u8 eth_regs[4];
- __u8 phy;
- __u8 gpio_res;
-} pegasus_t;
-
-struct usb_eth_dev {
- char *name;
- __u16 vendor;
- __u16 device;
- __u32 private; /* LSB is gpio reset value */
-};
-
+#define PEGASUS_WRITE_EEPROM
X
X static int loopback = 0;
X static int mii_mode = 0;
X static int multicast_filter_limit = 32;
X
+static struct usb_eth_dev usb_dev_id[] = {
+#define PEGASUS_DEV(pn, vid, pid, flags) \
+ {name:pn, vendor:vid, device:pid, private:flags},
+#include "pegasus.h"
+#undef PEGASUS_DEV
+ {NULL, 0, 0, 0}
+};
+
X
-MODULE_AUTHOR("Petko Manolov <pet...@dce.bg>");
-MODULE_DESCRIPTION("ADMtek AN986 Pegasus USB Ethernet driver");
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
X MODULE_PARM(loopback, "i");
-MODULE_PARM(mode, "i");
+MODULE_PARM(mii_mode, "i");
X MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
-MODULE_PARM_DESC(mode, "Enable HomePNA mode (bit 0) - default = MII mode = 0");
+MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
X
X
-static struct usb_eth_dev usb_dev_id[] = {
- {"Billionton USB-100", 0x08dd, 0x0986, DEFAULT_GPIO_RESET},
- {"Corega FEter USB-TX", 0x7aa, 0x0004, DEFAULT_GPIO_RESET},
- {"MELCO/BUFFALO LUA-TX", 0x0411, 0x0001, DEFAULT_GPIO_RESET},
- {"D-Link DSB-650TX", 0x2001, 0x4001, LINKSYS_GPIO_RESET},
- {"D-Link DSB-650TX", 0x2001, 0x4002, LINKSYS_GPIO_RESET},
- {"D-Link DSB-650TX(PNA)", 0x2001, 0x4003,
- HAS_HOME_PNA | DEFAULT_GPIO_RESET},
- {"D-Link DSB-650", 0x2001, 0xabc1, DEFAULT_GPIO_RESET},
- {"D-Link DU-E10", 0x07b8, 0xabc1, DEFAULT_GPIO_RESET},
- {"D-Link DU-E100", 0x07b8, 0x4002, DEFAULT_GPIO_RESET},
- {"Linksys USB10TX", 0x066b, 0x2202, LINKSYS_GPIO_RESET},
- {"Linksys USB100TX", 0x066b, 0x2203, LINKSYS_GPIO_RESET},
- {"Linksys USB100TX", 0x066b, 0x2204, HAS_HOME_PNA | LINKSYS_GPIO_RESET},
- {"Linksys USB Ethernet Adapter", 0x066b, 0x2206, LINKSYS_GPIO_RESET},
- {"SMC 202 USB Ethernet", 0x0707, 0x0200, DEFAULT_GPIO_RESET},
- {"ADMtek AN986 \"Pegasus\" USB Ethernet (eval board)", 0x07a6, 0x0986,
- HAS_HOME_PNA | DEFAULT_GPIO_RESET},
- {"Accton USB 10/100 Ethernet Adapter", 0x083a, 0x1046,
- DEFAULT_GPIO_RESET},
- {"IO DATA USB ET/TX", 0x04bb, 0x0904, DEFAULT_GPIO_RESET},
- {"LANEED USB Ethernet LD-USB/TX", 0x056e, 0x4002, DEFAULT_GPIO_RESET},
- {"SOHOware NUB100 Ethernet", 0x15e8, 0x9100, DEFAULT_GPIO_RESET},
- {"ADMtek ADM8511 \"Pegasus II\" USB Ethernet", 0x07a6, 0x8511,
- PEGASUS_II | DEFAULT_GPIO_RESET},
- {NULL, 0, 0, 0}
-};
-
X
X static int update_eth_regs_async( pegasus_t * );
X /* Aargh!!! I _really_ hate such tweaks */
@@ -242,29 +118,35 @@
X static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
X {
X int ret;
+ DECLARE_WAITQUEUE(wait, current);
X
- if ( pegasus->flags & ETH_REGS_CHANGED ) {
+ while ( pegasus->flags & ETH_REGS_CHANGED ) {
X pegasus->flags |= CTRL_URB_SLEEP;
X interruptible_sleep_on( &pegasus->ctrl_wait );
X }
X pegasus->dr.requesttype = PEGASUS_REQT_READ;
X pegasus->dr.request = PEGASUS_REQ_GET_REGS;
- pegasus->dr.value = 0;
+ pegasus->dr.value = cpu_to_le16 (0);
X pegasus->dr.index = cpu_to_le16p(&indx);
- pegasus->dr.length =
- pegasus->ctrl_urb.transfer_buffer_length = cpu_to_le16p(&size);
+ pegasus->dr.length = cpu_to_le16p(&size);
+ pegasus->ctrl_urb.transfer_buffer_length = size;
X
X FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
X usb_rcvctrlpipe(pegasus->usb,0),
X (char *)&pegasus->dr,
X data, size, ctrl_callback, pegasus );
X
+ add_wait_queue( &pegasus->ctrl_wait, &wait );
+ set_current_state( TASK_INTERRUPTIBLE );
+ pegasus->flags |= CTRL_URB_SLEEP;
+
X if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
X err( __FUNCTION__ " BAD CTRLs %d", ret);
X goto out;
X }
- pegasus->flags |= CTRL_URB_SLEEP;
- interruptible_sleep_on( &pegasus->ctrl_wait );
+
+ schedule();
+ remove_wait_queue( &pegasus->ctrl_wait, &wait );
X out:
X return ret;
X }
@@ -273,29 +155,35 @@
X static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
X {
X int ret;
+ DECLARE_WAITQUEUE(wait, current);
X
- if ( pegasus->flags & ETH_REGS_CHANGED ) {
+ while ( pegasus->flags & ETH_REGS_CHANGED ) {
X pegasus->flags |= CTRL_URB_SLEEP ;
X interruptible_sleep_on( &pegasus->ctrl_wait );
X }
X pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
X pegasus->dr.request = PEGASUS_REQ_SET_REGS;
- pegasus->dr.value = 0;
+ pegasus->dr.value = cpu_to_le16 (0);
X pegasus->dr.index = cpu_to_le16p( &indx );
- pegasus->dr.length =
- pegasus->ctrl_urb.transfer_buffer_length = cpu_to_le16p( &size );
+ pegasus->dr.length = cpu_to_le16p( &size );
+ pegasus->ctrl_urb.transfer_buffer_length = size;
X
X FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
X usb_sndctrlpipe(pegasus->usb,0),
X (char *)&pegasus->dr,
X data, size, ctrl_callback, pegasus );
+
+ add_wait_queue( &pegasus->ctrl_wait, &wait );
+ set_current_state( TASK_INTERRUPTIBLE );
+ pegasus->flags |= CTRL_URB_SLEEP;
X
X if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
X err( __FUNCTION__ " BAD CTRL %d", ret);
X return ret;
X }
- pegasus->flags |= CTRL_URB_SLEEP;
- interruptible_sleep_on( &pegasus->ctrl_wait );
+
+ schedule();
+ remove_wait_queue( &pegasus->ctrl_wait, &wait );


X
X return ret;
X }

@@ -304,29 +192,37 @@
X static int set_register( pegasus_t *pegasus, __u16 indx, __u8 data )
X {
X int ret;
-
- if ( pegasus->flags & ETH_REGS_CHANGED ) {
+ __u16 dat = data;
+ DECLARE_WAITQUEUE(wait, current);
+
+ while ( pegasus->flags & ETH_REGS_CHANGED ) {
X pegasus->flags |= CTRL_URB_SLEEP;
X interruptible_sleep_on( &pegasus->ctrl_wait );
X }
X pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
X pegasus->dr.request = PEGASUS_REQ_SET_REG;
- pegasus->dr.value = data;
+ pegasus->dr.value = cpu_to_le16p( &dat);
X pegasus->dr.index = cpu_to_le16p( &indx );
- pegasus->dr.length = pegasus->ctrl_urb.transfer_buffer_length = 1;
+ pegasus->dr.length = cpu_to_le16( 1 );
+ pegasus->ctrl_urb.transfer_buffer_length = 1;
X
X FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
X usb_sndctrlpipe(pegasus->usb,0),
X (char *)&pegasus->dr,
X &data, 1, ctrl_callback, pegasus );
X
+ add_wait_queue( &pegasus->ctrl_wait, &wait );
+ set_current_state( TASK_INTERRUPTIBLE );
+ pegasus->flags |= CTRL_URB_SLEEP;
+
X if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
X err( __FUNCTION__ " BAD CTRL %d", ret);
X return ret;
X }
- pegasus->flags |= CTRL_URB_SLEEP;
- interruptible_sleep_on( &pegasus->ctrl_wait );
-
+
+ schedule();
+ remove_wait_queue( &pegasus->ctrl_wait, &wait );
+
X return ret;
X }
X
@@ -338,8 +234,8 @@
X pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
X pegasus->dr.request = PEGASUS_REQ_SET_REGS;
X pegasus->dr.value = 0;
- pegasus->dr.index = EthCtrl0;
- pegasus->dr.length =
+ pegasus->dr.index = cpu_to_le16(EthCtrl0);
+ pegasus->dr.length = cpu_to_le16(3);
X pegasus->ctrl_urb.transfer_buffer_length = 3;
X
X FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
@@ -354,11 +250,12 @@
X }
X
X
-static int read_phy_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd )
+static int read_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd )
X {
X int i;
X __u8 data[4] = { phy, 0, 0, indx };
-
+ __u16 regdi;
+
X set_register( pegasus, PhyCtrl, 0 );
X set_registers( pegasus, PhyAddr, sizeof(data), data );
X set_register( pegasus, PhyCtrl, (indx | PHY_READ) );
@@ -368,7 +265,8 @@
X break;
X }
X if ( i < REG_TIMEOUT ) {
- get_registers( pegasus, PhyData, 2, regd );
+ get_registers( pegasus, PhyData, 2, &regdi );
+ *regd = le16_to_cpu(regdi);
X return 0;
X }
X warn( __FUNCTION__ " failed" );
@@ -377,7 +275,7 @@
X }
X
X
-static int write_phy_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 regd )
+static int write_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 regd )
X {
X int i;
X __u8 data[4] = { phy, 0, 0, indx };
@@ -401,18 +299,22 @@
X
X static int read_eprom_word( pegasus_t *pegasus, __u8 index, __u16 *retdata )
X {
- int i, tmp;
-
+ int i;
+ __u8 tmp;
+ __u16 retdatai;
+
X set_register( pegasus, EpromCtrl, 0 );
X set_register( pegasus, EpromOffset, index );
X set_register( pegasus, EpromCtrl, EPROM_READ);
+
X for ( i=0; i < REG_TIMEOUT; i++ ) {
X get_registers( pegasus, EpromCtrl, 1, &tmp );
X if ( tmp & EPROM_DONE )
X break;
X }
X if ( i < REG_TIMEOUT ) {
- get_registers( pegasus, EpromData, 2, retdata );
+ get_registers( pegasus, EpromData, 2, &retdatai );
+ *retdata = le16_to_cpu (retdatai);
X return 0;
X }
X warn( __FUNCTION__ " failed" );
@@ -467,9 +369,12 @@
X static inline void get_node_id( pegasus_t *pegasus, __u8 *id )
X {
X int i;
-
- for (i = 0; i < 3; i++)
- read_eprom_word( pegasus, i, (__u16 *)&id[i*2]);
+ __u16 w16;
+
+ for (i = 0; i < 3; i++) {
+ read_eprom_word( pegasus, i, &w16);
+ ((__u16 *) id)[i] = cpu_to_le16p (&w16);
+ }
X }
X
X
@@ -505,6 +410,15 @@
X }
X if ( i == REG_TIMEOUT )
X return 1;
+
+ if ( usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
+ usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK1 ) {
+ __u16 auxmode;
+
+ read_mii_word( pegasus, 0, 0x1b, &auxmode );
+ write_mii_word( pegasus, 0, 0x1b, auxmode | 4 );
+ }
+


X return 0;
X }
X

@@ -516,13 +430,13 @@
X pegasus_t *pegasus = dev->priv;
X
X
- if ( read_phy_word(pegasus, pegasus->phy, MII_BMSR, &bmsr) )
- return 2;
+ if ( read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr) )
+ return 1;
X if ( !(bmsr & 0x20) && !loopback )
X warn( "%s: link NOT established (0x%x) - check the cable.",
X dev->name, bmsr );
- if ( read_phy_word(pegasus, pegasus->phy, MII_ANLPA, &linkpart) )
- return 4;
+ if ( read_mii_word(pegasus, pegasus->phy, MII_ANLPA, &linkpart) )
+ return 2;
X if ( !(linkpart & 1) )
X warn( "link partner stat %x", linkpart );
X
@@ -536,7 +450,7 @@
X data[1] = 0;
X data[2] = (loopback & 1) ? 0x09 : 0x01;
X
- *(unsigned *)pegasus->eth_regs = *(unsigned *)data;
+ memcpy( pegasus->eth_regs, data, sizeof(data) );
X
X set_registers( pegasus, EthCtrl0, 3, data );
X
@@ -562,23 +476,29 @@
X
X if ( pegasus->flags & PEGASUS_RX_BUSY ) {
X pegasus->stats.rx_errors++;
+ dbg("pegasus Rx busy");
X return;
X }
X pegasus->flags |= PEGASUS_RX_BUSY;
X
- rx_status = *(int *)(pegasus->rx_buff + count - 4);
-
- if (urb->status) {
- dbg("%s: RX status %d", net->name, urb->status);
- goto goon;
+ switch ( urb->status ) {
+ case USB_ST_NOERROR:
+ break;
+ case USB_ST_NORESPONSE:
+ dbg( "reset MAC" );
+ pegasus->flags &= ~PEGASUS_RX_BUSY;
+ break;
+ default:
+ dbg( "%s: RX status %d", net->name, urb->status );
+ goto goon;
X }
X
X if ( !count )
X goto goon;
X
+ rx_status = le32_to_cpu(*(int *)(pegasus->rx_buff + count - 4));
X if ( rx_status & 0x000e0000 ) {
-
- dbg("%s: error receiving packet %x", net->name, rx_status & 0xe0000);
+ dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000);
X pegasus->stats.rx_errors++;
X if ( rx_status & 0x060000 )
X pegasus->stats.rx_length_errors++;
@@ -586,7 +506,6 @@
X pegasus->stats.rx_crc_errors++;
X if ( rx_status & 0x100000 )
X pegasus->stats.rx_frame_errors++;
-
X goto goon;
X }
X
@@ -629,6 +548,7 @@
X if ( urb->status )
X info("%s: TX status %d", pegasus->net->name, urb->status);
X
+ pegasus->net->trans_start = jiffies;
X netif_wake_queue( pegasus->net );
X }
X
@@ -641,6 +561,16 @@
X
X if ( !pegasus )
X return;
+
+ switch ( urb->status ) {
+ case USB_ST_NOERROR:
+ break;
+ case USB_ST_URB_KILLED:
+ return;
+ default:
+ info("intr status %d", urb->status);
+ }
+
X d = urb->transfer_buffer;
X net = pegasus->net;
X if ( d[0] & 0xfc ) {
@@ -654,31 +584,23 @@
X if ( d[0] & (NO_CARRIER | LOSS_CARRIER) )
X pegasus->stats.tx_carrier_errors++;
X }
- switch ( urb->status ) {
- case USB_ST_NOERROR:
- break;
- case USB_ST_URB_KILLED:
- break;
- default:
- info("intr status %d", urb->status);
- }
X }
X #endif
X
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,48)
X static void pegasus_tx_timeout( struct net_device *net )
X {
X pegasus_t *pegasus = net->priv;
X
X if ( !pegasus )
X return;
-
- usb_unlink_urb( &pegasus->tx_urb );
+
X warn("%s: Tx timed out.", net->name);
+ pegasus->tx_urb.transfer_flags |= USB_ASYNC_UNLINK;
+ usb_unlink_urb( &pegasus->tx_urb );
X pegasus->stats.tx_errors++;
- net->trans_start = jiffies;
-
- netif_wake_queue( net );
X }
+#endif
X
X
X static int pegasus_start_xmit( struct sk_buff *skb, struct net_device *net )
@@ -686,17 +608,17 @@
X pegasus_t *pegasus = net->priv;
X int count = ((skb->len+2) & 0x3f) ? skb->len+2 : skb->len+3;
X int res;
-
+ __u16 l16 = skb->len;
+
X netif_stop_queue( net );
X
- ((__u16 *)pegasus->tx_buff)[0] = skb->len;
+ ((__u16 *)pegasus->tx_buff)[0] = cpu_to_le16( l16 );
X memcpy(pegasus->tx_buff+2, skb->data, skb->len);
X FILL_BULK_URB( &pegasus->tx_urb, pegasus->usb,
X usb_sndbulkpipe(pegasus->usb, 2),
X pegasus->tx_buff, PEGASUS_MAX_MTU,
X write_bulk_callback, pegasus );
X pegasus->tx_urb.transfer_buffer_length = count;
- pegasus->tx_urb.transfer_flags |= USB_ASYNC_UNLINK;
X if ((res = usb_submit_urb(&pegasus->tx_urb))) {
X warn("failed tx_urb %d", res);
X pegasus->stats.tx_errors++;
@@ -732,6 +654,14 @@
X __u8 data[2];
X
X read_eprom_word( pegasus, 4, (__u16 *)data );
+ if ( data[1] < 0x80 ) {
+ info( "intr interval will be changed from %ums to %ums",
+ data[1], 0x80 );
+ data[1] = 0x80;
+#ifdef PEGASUS_WRITE_EEPROM
+ write_eprom_word( pegasus, 4, *(__u16 *)data );
+#endif
+ }
X pegasus->intr_interval = data[1];
X }
X
@@ -754,7 +684,6 @@
X if ( (res = usb_submit_urb(&pegasus->rx_urb)) )
X warn( __FUNCTION__ " failed rx_urb %d", res );
X #ifdef PEGASUS_USE_INTR
- get_interrupt_interval( pegasus );
X FILL_INT_URB( &pegasus->intr_urb, pegasus->usb,
X usb_rcvintpipe(pegasus->usb, 3),
X pegasus->intr_buff, sizeof(pegasus->intr_buff),
@@ -781,8 +710,9 @@
X usb_unlink_urb( &pegasus->rx_urb );
X usb_unlink_urb( &pegasus->tx_urb );
X usb_unlink_urb( &pegasus->ctrl_urb );
+#ifdef PEGASUS_USE_INTR
X usb_unlink_urb( &pegasus->intr_urb );
-
+#endif
X MOD_DEC_USE_COUNT;
X
X return 0;
@@ -798,12 +728,12 @@
X case SIOCDEVPRIVATE:
X data[0] = pegasus->phy;
X case SIOCDEVPRIVATE+1:
- read_phy_word(pegasus, data[0], data[1]&0x1f, &data[3]);
+ read_mii_word(pegasus, data[0], data[1]&0x1f, &data[3]);
X return 0;
X case SIOCDEVPRIVATE+2:
X if ( !capable(CAP_NET_ADMIN) )
X return -EPERM;
- write_phy_word(pegasus, pegasus->phy, data[1] & 0x1f, data[2]);
+ write_mii_word(pegasus, pegasus->phy, data[1] & 0x1f, data[2]);
X return 0;


X default:
X return -EOPNOTSUPP;

@@ -858,14 +788,14 @@
X __u16 tmp;
X
X for ( i=0; i < 32; i++ ) {
- read_phy_word( pegasus, i, MII_BMSR, &tmp );
+ read_mii_word( pegasus, i, MII_BMSR, &tmp );
X if ( tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0 )
X continue;
X else


X return i;
X }
X

- return 0;
+ return 0xff;
X }
X
X
@@ -882,11 +812,11 @@
X
X static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum )
X {
- struct net_device *net;
- pegasus_t *pegasus;
- int dev_indx;
+ struct net_device *net;
+ pegasus_t *pegasus;
+ int dev_index;
X
- if ( (dev_indx = check_device_ids(dev->descriptor.idVendor, dev->descriptor.idProduct)) == -1 ) {
+ if ( (dev_index = check_device_ids(dev->descriptor.idVendor, dev->descriptor.idProduct)) == -1 ) {
X return NULL;
X }
X
@@ -902,7 +832,7 @@
X
X usb_inc_dev_use( dev );
X memset(pegasus, 0, sizeof(struct pegasus));
- init_MUTEX( &pegasus-> ctrl_sem );
+ pegasus->dev_index = dev_index;
X init_waitqueue_head( &pegasus->ctrl_wait );
X
X net = init_etherdev( NULL, 0 );
@@ -926,7 +856,10 @@
X net->get_stats = pegasus_netdev_stats;
X net->mtu = PEGASUS_MTU;
X
- pegasus->features = usb_dev_id[dev_indx].private;
+ pegasus->features = usb_dev_id[dev_index].private;
+#ifdef PEGASUS_USE_INTR
+ get_interrupt_interval( pegasus );
+#endif
X if ( reset_mac(pegasus) ) {
X err("can't reset MAC");
X unregister_netdev( pegasus->net );
@@ -935,21 +868,21 @@
X return NULL;
X }
X
+ info( "%s: %s", net->name, usb_dev_id[dev_index].name );
+
X set_ethernet_addr( pegasus );
-
+
X if ( pegasus->features & PEGASUS_II ) {
X info( "setup Pegasus II specific registers" );
X setup_pegasus_II( pegasus );
X }
X
X pegasus->phy = mii_phy_probe( pegasus );
- if ( !pegasus->phy ) {
+ if ( pegasus->phy == 0xff ) {
X warn( "can't locate MII phy, using default" );
X pegasus->phy = 1;
X }
X
- info( "%s: %s", net->name, usb_dev_id[dev_indx].name );
-
X return pegasus;
X }
X
@@ -979,7 +912,8 @@
X
X int __init pegasus_init(void)
X {
- info( "%s", version );
+ info(DRIVER_VERSION " " DRIVER_AUTHOR);
+ info(DRIVER_DESC);
X return usb_register( &pegasus_driver );
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/pegasus.h linux/drivers/usb/pegasus.h
--- v2.2.19/drivers/usb/pegasus.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/pegasus.h Wed Oct 10 01:41:26 2001
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 1999,2000 Petko Manolov - Petkan (pet...@dce.bg)
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef PEGASUS_DEV
+
+#define PEGASUS_II 0x80000000
+#define HAS_HOME_PNA 0x40000000
+
+#define PEGASUS_MTU 1500
+#define PEGASUS_MAX_MTU 1536
+
+#define EPROM_WRITE 0x01
+#define EPROM_READ 0x02
+#define EPROM_DONE 0x04
+#define EPROM_WR_ENABLE 0x10
+#define EPROM_LOAD 0x20
+
+#define MII_BMCR 0x00
+#define MII_BMSR 0x01
+#define BMSR_MEDIA 0x7808
+#define MII_ANLPA 0x05
+#define ANLPA_100TX_FD 0x0100
+#define ANLPA_100TX_HD 0x0080
+#define ANLPA_10T_FD 0x0040
+#define ANLPA_10T_HD 0x0020
+#define PHY_DONE 0x80
+#define PHY_READ 0x40
+#define PHY_WRITE 0x20
+#define DEFAULT_GPIO_RESET 0x24
+#define LINKSYS_GPIO_RESET 0x24
+#define DEFAULT_GPIO_SET 0x26
+
+#define PEGASUS_PRESENT 0x00000001
+#define PEGASUS_RUNNING 0x00000002
+#define PEGASUS_TX_BUSY 0x00000004
+#define PEGASUS_RX_BUSY 0x00000008
+#define CTRL_URB_RUNNING 0x00000010
+#define CTRL_URB_SLEEP 0x00000020
+#define PEGASUS_UNPLUG 0x00000040
+#define ETH_REGS_CHANGE 0x40000000
+#define ETH_REGS_CHANGED 0x80000000
+
+#define RX_MULTICAST 2
+#define RX_PROMISCUOUS 4
+
+#define REG_TIMEOUT (HZ)
+#define PEGASUS_TX_TIMEOUT (HZ*10)
+
+#define TX_UNDERRUN 0x80
+#define EXCESSIVE_COL 0x40
+#define LATE_COL 0x20
+#define NO_CARRIER 0x10
+#define LOSS_CARRIER 0x08
+#define JABBER_TIMEOUT 0x04
+
+#define PEGASUS_REQT_READ 0xc0
+#define PEGASUS_REQT_WRITE 0x40
+#define PEGASUS_REQ_GET_REGS 0xf0
+#define PEGASUS_REQ_SET_REGS 0xf1
+#define PEGASUS_REQ_SET_REG PEGASUS_REQ_SET_REGS
+#define ALIGN(x) x __attribute__((aligned(L1_CACHE_BYTES)))
+
+enum pegasus_registers {
+ EthCtrl0 = 0,
+ EthCtrl1 = 1,
+ EthCtrl2 = 2,
+ EthID = 0x10,
+ Reg1d = 0x1d,
+ EpromOffset = 0x20,
+ EpromData = 0x21, /* 0x21 low, 0x22 high byte */
+ EpromCtrl = 0x23,
+ PhyAddr = 0x25,
+ PhyData = 0x26, /* 0x26 low, 0x27 high byte */
+ PhyCtrl = 0x28,
+ UsbStst = 0x2a,
+ EthTxStat0 = 0x2b,
+ EthTxStat1 = 0x2c,
+ EthRxStat = 0x2d,
+ Reg7b = 0x7b,
+ Gpio0 = 0x7e,
+ Gpio1 = 0x7f,
+ Reg81 = 0x81,
+};
+
+
+typedef struct pegasus {
+ struct usb_device *usb;
+ struct net_device *net;
+ struct net_device_stats stats;
+ unsigned flags;
+ unsigned features;
+ int dev_index;
+ int intr_interval;
+ struct urb ctrl_urb, rx_urb, tx_urb, intr_urb;
+ devrequest dr;
+ wait_queue_head_t ctrl_wait;
+ struct semaphore ctrl_sem;
+ unsigned char ALIGN(rx_buff[PEGASUS_MAX_MTU]);
+ unsigned char ALIGN(tx_buff[PEGASUS_MAX_MTU]);
+ unsigned char ALIGN(intr_buff[8]);
+ __u8 eth_regs[4];
+ __u8 phy;
+ __u8 gpio_res;
+} pegasus_t;
+
+
+struct usb_eth_dev {
+ char *name;
+ __u16 vendor;
+ __u16 device;
+ __u32 private; /* LSB is gpio reset value */
+};
+
+#define VENDOR_3COM 0x0506
+#define VENDOR_ACCTON 0x083a
+#define VENDOR_ADMTEK 0x07a6
+#define VENDOR_BILLIONTON 0x08dd
+#define VENDOR_COREGA 0x07aa
+#define VENDOR_DLINK1 0x2001
+#define VENDOR_DLINK2 0x07b8
+#define VENDOR_IODATA 0x04bb
+#define VENDOR_LANEED 0x056e
+#define VENDOR_LINKSYS 0x066b
+#define VENDOR_MELCO 0x0411
+#define VENDOR_SMARTBRIDGES 0x08d1
+#define VENDOR_SMC 0x0707
+#define VENDOR_SOHOWARE 0x15e8
+
+#else /* PEGASUS_DEV */
+
+PEGASUS_DEV( "3Com USB Ethernet 3C460B", VENDOR_3COM, 0x4601,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "Accton USB 10/100 Ethernet Adapter", VENDOR_ACCTON, 0x1046,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "ADMtek ADM8511 \"Pegasus II\" USB Ethernet",
+ VENDOR_ADMTEK, 0x8511,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "ADMtek AN986 \"Pegasus\" USB Ethernet (eval board)",
+ VENDOR_ADMTEK, 0x0986,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "Billionton USBEL-100", VENDOR_BILLIONTON, 0x0988,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "Billionton USBE-100", VENDOR_BILLIONTON, 0x8511,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK1, 0x4001,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK1, 0x4002,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "D-Link DSB-650TX(PNA)", VENDOR_DLINK1, 0x4003,
+ DEFAULT_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK1, 0xabc1,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "D-Link DU-E10", VENDOR_DLINK2, 0xabc1,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "D-Link DU-E100", VENDOR_DLINK2, 0x4002,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "FiberLine USB", VENDOR_DLINK2, 0x4102,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "IO DATA USB ET/TX", VENDOR_IODATA, 0x0904,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x4002,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x2202,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204,
+ LINKSYS_GPIO_RESET | HAS_HOME_PNA )
+PEGASUS_DEV( "Linksys USB Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
+ LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0001,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "smartNIC 2 PnP Adapter", VENDOR_SMARTBRIDGES, 0x0003,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "SMC 202 USB Ethernet", VENDOR_SMC, 0x0200,
+ DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "SOHOware NUB100 Ethernet", VENDOR_SOHOWARE, 0x9100,
+ DEFAULT_GPIO_RESET )
+
+#endif /* PEGASUS_DEV */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/plusb.c linux/drivers/usb/plusb.c
--- v2.2.19/drivers/usb/plusb.c Sun Mar 25 17:31:42 2001
+++ linux/drivers/usb/plusb.c Wed Oct 10 01:41:26 2001
@@ -1,9 +1,11 @@
X /*****************************************************************************/
X
X /*
- * plusb.c -- prolific pl-2302 driver.
+ * plusb.c -- prolific pl-2301/pl-2302 driver.
X *
X * Copyright (C) 2000 Deti Fliegl (de...@fliegl.de)
+ * Copyright (C) 2000 Pavel Machek (pa...@suse.cz)
+ * Copyright (C) 2000 Eric Z. Ayers (er...@compgen.com)
X *


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 65'
echo 'File patch-2.2.20 is continued in part 66'
echo "66" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:03 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part64

#!/bin/sh -x
# this is part 64 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 64; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ };
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sound/sscape.c linux/drivers/sound/sscape.c
--- v2.2.19/drivers/sound/sscape.c Sun Mar 25 17:31:34 2001
+++ linux/drivers/sound/sscape.c Wed Oct 10 01:41:23 2001
@@ -889,7 +889,7 @@


X return 0;
X }
X

-static void sscape_pnp_start_dma(sscape_info* devc, int arg )
+static void sscape_pnp_start_dma(sscape_info* devc, int arg )
X {
X int reg;
X if (arg == 0) reg = 2;
@@ -972,8 +972,8 @@
X restore_flags(flags);
X vfree(data);
X
- outb(0, devc -> base + 2);
- outb(0, devc -> base);
+ outb(0, devc -> base + 2);
+ outb(0, devc -> base);
X
X sscape_write ( devc, 9, sscape_read( devc, 9 ) | 0x40);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/Config.in linux/drivers/usb/Config.in
--- v2.2.19/drivers/usb/Config.in Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/Config.in Mon Oct 22 10:35:13 2001
@@ -10,6 +10,7 @@
X
X comment 'Miscellaneous USB options'
X bool ' Preliminary USB device filesystem' CONFIG_USB_DEVICEFS
+ bool ' Support for hot-pluggable USB devices' CONFIG_HOTPLUG
X if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
X bool ' Enforce USB bandwidth allocation (EXPERIMENTAL)' CONFIG_USB_BANDWIDTH
X else
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/Makefile linux/drivers/usb/Makefile
--- v2.2.19/drivers/usb/Makefile Sun Mar 25 17:31:42 2001
+++ linux/drivers/usb/Makefile Wed Oct 10 01:41:23 2001
@@ -23,7 +23,7 @@
X # Multipart objects.
X
X list-multi := usbcore.o
-usbcore-objs := usb.o usb-debug.o usb-core.o hub.o
+usbcore-objs := usb.o usb-debug.o hub.o
X
X # Optional parts of multipart objects.
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/acm.c linux/drivers/usb/acm.c
--- v2.2.19/drivers/usb/acm.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/acm.c Wed Oct 10 01:41:23 2001
@@ -1,5 +1,5 @@
X /*
- * acm.c Version 0.16
+ * acm.c Version 0.18
X *
X * Copyright (c) 1999 Armin Fuerst <fue...@in.tum.de>
X * Copyright (c) 1999 Pavel Machek <pa...@suse.cz>
@@ -19,6 +19,8 @@
X * v0.14 - sized down struct acm
X * v0.15 - fixed flow control again - characters could be lost
X * v0.16 - added code for modems with swapped data and control interfaces
+ * v0.17 - added new style probing
+ * v0.18 - fixed new style probing for devices with more configurations


X */
X
X /*

@@ -45,15 +47,22 @@
X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>
-//#define DEBUG
+#undef DEBUG
X #include <linux/usb.h>
X #include <linux/devfs_fs_kernel.h>
X
X /*


+ * Version Information
+ */

+#define DRIVER_VERSION "v0.18"
+#define DRIVER_AUTHOR "Armin Fuerst, Pavel Machek, Johannes Erdfelt, Vojtech Pavlik"
+#define DRIVER_DESC "USB Abstract Control Model driver for USB modems and ISDN adapters"
+
+/*
X * CMSPAR, some architectures can't have space and mark parity.
X */
X
@@ -145,7 +154,7 @@
X
X static struct usb_driver acm_driver;
X static struct tty_driver acm_tty_driver;
-static struct acm *acm_table[ACM_TTY_MINORS] = { NULL, /* .... */ };
+static struct acm *acm_table[ACM_TTY_MINORS];
X
X #define ACM_READY(acm) (acm && acm->dev && acm->used)
X
@@ -232,8 +241,14 @@
X dbg("nonzero read bulk status received: %d", urb->status);
X
X if (!urb->status & !acm->throttle) {
- for (i = 0; i < urb->actual_length && !acm->throttle; i++)
+ for (i = 0; i < urb->actual_length && !acm->throttle; i++) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters,
+ * we drop them. */
+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
X tty_insert_flip_char(tty, data[i], 0);
+ }
X tty_flip_buffer_push(tty);
X }
X
@@ -244,6 +259,7 @@
X }
X
X urb->actual_length = 0;
+ urb->dev = acm->dev;
X
X if (usb_submit_urb(urb))
X dbg("failed resubmitting read urb");
@@ -292,14 +308,20 @@
X
X if (acm->used++) return 0;
X
+ acm->ctrlurb.dev = acm->dev;
X if (usb_submit_urb(&acm->ctrlurb))
X dbg("usb_submit_urb(ctrl irq) failed");
X
+ acm->readurb.dev = acm->dev;
X if (usb_submit_urb(&acm->readurb))
X dbg("usb_submit_urb(read bulk) failed");
X
X acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS);
X
+ /* force low_latency on so that our tty_push actually forces the data through,
+ otherwise it is scheduled, and with high data rates data can get lost. */
+ tty->low_latency = 1;


+
X return 0;
X }
X

@@ -340,6 +362,7 @@
X memcpy(acm->writeurb.transfer_buffer, buf, count);
X
X acm->writeurb.transfer_buffer_length = count;
+ acm->writeurb.dev = acm->dev;
X
X if (usb_submit_urb(&acm->writeurb))
X dbg("usb_submit_urb(write bulk) failed");
@@ -500,7 +523,7 @@
X ifcom = cfacm->interface[0].altsetting + 0;
X ifdata = cfacm->interface[1].altsetting + 0;
X
- if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints != 2) {
+ if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints < 2) {
X ifcom = cfacm->interface[1].altsetting + 0;
X ifdata = cfacm->interface[0].altsetting + 0;
X if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints < 2)
@@ -563,7 +586,7 @@
X
X FILL_BULK_URB(&acm->writeurb, dev, usb_sndbulkpipe(dev, epwrite->bEndpointAddress),
X buf += readsize, acm->writesize, acm_write_bulk, acm);
-
+
X printk(KERN_INFO "ttyACM%d: USB ACM device\n", minor);
X
X acm_set_control(acm, acm->ctrlout);
@@ -679,6 +702,8 @@


X return -1;
X }
X

+ info(DRIVER_VERSION ":" DRIVER_DESC);


+
X return 0;
X }
X

@@ -691,5 +716,6 @@
X module_init(acm_init);
X module_exit(acm_exit);
X
-MODULE_AUTHOR("Armin Fuerst, Pavel Machek, Johannes Erdfelt, Vojtech Pavlik");
-MODULE_DESCRIPTION("USB Abstract Control Model driver for USB modems and ISDN adapters");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );

+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/bluetooth.c linux/drivers/usb/bluetooth.c
--- v2.2.19/drivers/usb/bluetooth.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/bluetooth.c Wed Oct 10 01:41:23 2001
@@ -1,10 +1,19 @@
X /*
- * bluetooth.c Version 0.7
+ * bluetooth.c Version 0.8
X *
X * Copyright (c) 2000 Greg Kroah-Hartman <gr...@kroah.com>
X * Copyright (c) 2000 Mark Douglas Corner <mco...@umich.edu>
X *
X * USB Bluetooth driver, based on the Bluetooth Spec version 1.0B
+ *
+ * (08/04/2001) gb
+ * Identify version on module load.
+ *
+ * (2001/03/10) Version 0.8 gkh
+ * Fixed problem with not unlinking interrupt urb on device close
+ * and resubmitting the read urb on error with bluetooth struct.
+ * Thanks to Narayan Mohanram <nar...@RovingNetworks.com> for the
+ * fixes.
X *
X * (11/29/2000) Version 0.7 gkh
X * Fixed problem with overrunning the tty flip buffer.
@@ -86,9 +95,12 @@
X #define DEBUG
X #include <linux/usb.h>
X
-/* Module information */
-MODULE_AUTHOR("Greg Kroah-Hartman, Mark Douglas Corner");
-MODULE_DESCRIPTION("USB Bluetooth driver");


+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v0.8"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner"
+#define DRIVER_DESC "USB Bluetooth driver"
X
X /* define this if you have hardware that is not good */
X /*#define BTBUGGYHARDWARE */
@@ -371,6 +383,7 @@
X for (i = 0; i < NUM_BULK_URBS; ++i)
X usb_unlink_urb (bluetooth->write_urb_pool[i]);
X usb_unlink_urb (bluetooth->read_urb);
+ usb_unlink_urb (bluetooth->interrupt_in_urb);
X
X bluetooth->active = 0;
X }
@@ -844,7 +857,7 @@
X
X if (!bluetooth) {
X dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
- goto exit;
+ return;
X }
X
X if (urb->status) {
@@ -1274,6 +1287,8 @@


X return -1;
X }
X

+ info(DRIVER_VERSION ":" DRIVER_DESC);


+
X return 0;
X }
X

@@ -1288,4 +1303,7 @@
X module_init(usb_bluetooth_init);
X module_exit(usb_bluetooth_exit);
X
+/* Module information */


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
X

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/dabusb.c linux/drivers/usb/dabusb.c
--- v2.2.19/drivers/usb/dabusb.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/dabusb.c Wed Oct 10 01:41:23 2001
@@ -43,6 +43,13 @@
X #include "dabusb.h"
X #include "dabfirmware.h"
X

+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v1.54"
+#define DRIVER_AUTHOR "Deti Fliegl, de...@fliegl.de"
+#define DRIVER_DESC "DAB-USB Interface Driver for Linux (c)1999"
+
X /* --------------------------------------------------------------------- */
X
X #define NRDABUSB 4
@@ -173,8 +180,8 @@
X
X // process if URB was not killed
X if (purb->status != -ENOENT) {
- unsigned int pipe = usb_rcvisocpipe (s->usbdev, _DABUSB_ISOPIPE);
- int pipesize = usb_maxpacket (s->usbdev, pipe, usb_pipeout (pipe));
+ unsigned int pipe = usb_rcvisocpipe (purb->dev, _DABUSB_ISOPIPE);
+ int pipesize = usb_maxpacket (purb->dev, pipe, usb_pipeout (pipe));
X for (i = 0; i < purb->number_of_packets; i++)
X if (!purb->iso_frame_desc[i].status) {
X len = purb->iso_frame_desc[i].actual_length;
@@ -456,8 +463,6 @@
X
X end = list_entry (s->rec_buff_list.prev, buff_t, buff_list);
X
- end->purb->dev=s->usbdev;
-
X ret = usb_submit_urb (end->purb);
X if (ret) {
X err("usb_submit_urb returned:%d", ret);
@@ -793,11 +798,11 @@
X
X static struct usb_driver dabusb_driver =
X {
- "dabusb",
- dabusb_probe,
- dabusb_disconnect,
- {NULL, NULL},
- &dabusb_fops,
+ name: "dabusb",
+ probe: dabusb_probe,
+ disconnect: dabusb_disconnect,
+ fops: &dabusb_fops,
+ minor: DABUSB_MINOR,
X DABUSB_MINOR
X };
X
@@ -826,6 +831,9 @@
X return -1;
X
X dbg("dabusb_init: driver registered");
+
+ info(DRIVER_VERSION ":" DRIVER_DESC);


+
X return 0;
X }
X

@@ -838,8 +846,9 @@
X
X /* --------------------------------------------------------------------- */
X
-MODULE_AUTHOR ("Deti Fliegl, de...@fliegl.de");
-MODULE_DESCRIPTION ("DAB-USB Interface Driver for Linux (c)1999");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );

+
X MODULE_PARM (buffers, "i");
X MODULE_PARM_DESC (buffers, "Number of buffers (default=256)");
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/dabusb.h linux/drivers/usb/dabusb.h
--- v2.2.19/drivers/usb/dabusb.h Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/dabusb.h Wed Oct 10 01:41:23 2001
@@ -23,7 +23,7 @@
X wait_queue_head_t wait;
X wait_queue_head_t remove_ok;
X spinlock_t lock;
- volatile atomic_t pending_io;
+ atomic_t pending_io;
X driver_state_t state;
X int remove_pending;
X int got_mem;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/dc2xx.c linux/drivers/usb/dc2xx.c
--- v2.2.19/drivers/usb/dc2xx.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/dc2xx.c Wed Oct 10 01:41:24 2001
@@ -44,11 +44,13 @@
X * 03 Nov, 1999 -- update for 2.3.25 kernel API changes.
X * 08 Jan, 2000 .. multiple camera support
X * 12 Aug, 2000 .. add some real locking, remove an Oops
+ * 08 Apr, 2001 .. Identify version on module load. gb
X *
X * Thanks to: the folk who've provided USB product IDs, sent in
- * patches, and shared their sucesses!
+ * patches, and shared their successes!
X */
X
+#include <linux/config.h>
X #include <linux/kernel.h>
X #include <linux/sched.h>
X #include <linux/signal.h>
@@ -59,6 +61,7 @@
X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/module.h>
+
X #ifdef CONFIG_USB_DEBUG
X #define DEBUG
X #else
@@ -67,6 +70,13 @@
X #include <linux/usb.h>
X
X

+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v1.0.0"
+#define DRIVER_AUTHOR "David Brownell, <dbro...@users.sourceforge.net>"
+#define DRIVER_DESC "USB Camera Driver for Kodak DC-2xx series cameras"
+
X
X /* current USB framework handles max of 16 USB devices per driver */
X #define MAX_CAMERAS 16
@@ -170,7 +180,7 @@
X usb_rcvbulkpipe (camera->dev, camera->inEP),
X camera->buf, len, &count, HZ*10);
X
- dbg ("read (%d) - 0x%x %d", len, retval, count);
+ dbg ("read (%Zd) - 0x%x %d", len, retval, count);
X
X if (!retval) {
X if (copy_to_user (buf, camera->buf, count))
@@ -183,7 +193,7 @@
X break;
X interruptible_sleep_on_timeout (&camera->wait, RETRY_TIMEOUT);
X
- dbg ("read (%d) - retry", len);
+ dbg ("read (%Zd) - retry", len);
X }
X up (&camera->sem);
X return retval;
@@ -267,7 +277,7 @@
X }
X done:
X up (&camera->sem);
- dbg ("wrote %d", bytes_written);
+ dbg ("wrote %Zd", bytes_written);
X return bytes_written;
X }
X
@@ -324,8 +334,9 @@
X if (!camera->dev) {
X minor_data [subminor] = NULL;
X kfree (camera);
- }
- up (&camera->sem);
+ } else
+ up (&camera->sem);
+
X up (&state_table_mutex);
X
X dbg ("close #%d", subminor);
@@ -396,7 +407,6 @@
X }
X if (i >= MAX_CAMERAS) {
X info ("Ignoring additional USB Camera");
- up (&state_table_mutex);
X goto bye;
X }
X
@@ -404,7 +414,6 @@
X camera = minor_data [i] = kmalloc (sizeof *camera, GFP_KERNEL);
X if (!camera) {
X err ("no memory!");
- up (&state_table_mutex);
X goto bye;
X }
X
@@ -471,13 +480,15 @@
X if (!camera->buf) {
X minor_data [subminor] = NULL;
X kfree (camera);
+ camera = NULL;
X } else
X camera->dev = NULL;
X
X info ("USB Camera #%d disconnected", subminor);
X usb_dec_dev_use (dev);
X
- up (&camera->sem);
+ if (camera != NULL)
+ up (&camera->sem);
X up (&state_table_mutex);
X }
X
@@ -496,6 +507,7 @@
X {
X if (usb_register (&camera_driver) < 0)
X return -1;
+ info(DRIVER_VERSION ":" DRIVER_DESC);


X return 0;
X }
X

@@ -504,9 +516,9 @@
X usb_deregister (&camera_driver);
X }
X
-
-MODULE_AUTHOR("David Brownell, dbro...@users.sourceforge.net");
-MODULE_DESCRIPTION("USB Camera Driver for Kodak DC-2xx series cameras");
-
X module_init (usb_dc2xx_init);
X module_exit (usb_dc2xx_cleanup);


+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/hub.c linux/drivers/usb/hub.c
--- v2.2.19/drivers/usb/hub.c Sun Mar 25 17:31:42 2001
+++ linux/drivers/usb/hub.c Wed Oct 10 01:41:24 2001
@@ -35,7 +35,7 @@
X
X static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
X static int khubd_pid = 0; /* PID of khubd */
-static int khubd_running = 0;
+static DECLARE_MUTEX_LOCKED(khubd_exited);
X
X static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size)
X {
@@ -76,34 +76,33 @@
X data, sizeof(struct usb_hub_status), HZ);
X }
X
-/*
- * A irq handler returns non-zero to indicate to
- * the low-level driver that it wants to be re-activated,
- * or zero to say "I'm done".
- */
X static void hub_irq(struct urb *urb)
X {
X struct usb_hub *hub = (struct usb_hub *)urb->context;
X unsigned long flags;
X
+ /* Cause a hub reset after 10 consecutive errors */
X if (urb->status) {
- if (urb->status != -ENOENT)
- dbg("nonzero status in irq %d", urb->status);
+ if (urb->status == -ENOENT)
+ return;
X
- return;
+ dbg("nonzero status in irq %d", urb->status);
+
+ if ((++hub->nerrors < 10) || hub->error)
+ return;
+
+ hub->error = urb->status;
X }
X
+ hub->nerrors = 0;
+
X /* Something happened, let khubd figure it out */
- if (waitqueue_active(&khubd_wait)) {
- /* Add the hub to the event queue */
- spin_lock_irqsave(&hub_event_lock, flags);
- if (hub->event_list.next == &hub->event_list) {
- list_add(&hub->event_list, &hub_event_list);
- /* Wake up khubd */
- wake_up(&khubd_wait);
- }
- spin_unlock_irqrestore(&hub_event_lock, flags);
+ spin_lock_irqsave(&hub_event_lock, flags);
+ if (list_empty(&hub->event_list)) {
+ list_add(&hub->event_list, &hub_event_list);
+ wake_up(&khubd_wait);
X }
+ spin_unlock_irqrestore(&hub_event_lock, flags);
X }
X
X static void usb_hub_power_on(struct usb_hub *hub)
@@ -114,40 +113,46 @@
X dbg("enabling power on all ports");
X for (i = 0; i < hub->nports; i++)
X usb_set_port_feature(hub->dev, i + 1, USB_PORT_FEAT_POWER);
+
+ /* Wait for power to be enabled */
+ wait_ms(hub->descriptor->bPwrOn2PwrGood * 2);
X }
X
-static int usb_hub_configure(struct usb_hub *hub)
+static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor *endpoint)
X {
X struct usb_device *dev = hub->dev;
- unsigned char buffer[HUB_DESCRIPTOR_MAX_SIZE], *bitmap;
- struct usb_hub_descriptor *descriptor;
- struct usb_descriptor_header *header;
- struct usb_hub_status *hubsts;
- int i, ret;
+ struct usb_hub_status hubstatus;
+ char portstr[USB_MAXCHILDREN + 1];
+ unsigned int pipe;
+ int i, maxp, ret;
+
+ hub->descriptor = kmalloc(HUB_DESCRIPTOR_MAX_SIZE, GFP_KERNEL);
+ if (!hub->descriptor) {
+ err("Unable to kmalloc %d bytes for hub descriptor", HUB_DESCRIPTOR_MAX_SIZE);
+ return -1;
+ }
X
X /* Request the entire hub descriptor. */
- header = (struct usb_descriptor_header *)buffer;
- ret = usb_get_hub_descriptor(dev, buffer, sizeof(buffer));
- /* <buffer> is large enough for a hub with 127 ports;
+ ret = usb_get_hub_descriptor(dev, hub->descriptor, HUB_DESCRIPTOR_MAX_SIZE);
+ /* <hub->descriptor> is large enough for a hub with 127 ports;
X * the hub can/will return fewer bytes here. */
X if (ret < 0) {
X err("Unable to get hub descriptor (err = %d)", ret);
+ kfree(hub->descriptor);


X return -1;
X }
X

- bitmap = kmalloc(header->bLength, GFP_KERNEL);
- if (!bitmap) {
- err("Unable to kmalloc %d bytes for bitmap", header->bLength);
- return -1;
- }
-
- memcpy (bitmap, buffer, header->bLength);
- descriptor = (struct usb_hub_descriptor *)bitmap;
+ le16_to_cpus(&hub->descriptor->wHubCharacteristics);
X
- hub->nports = dev->maxchild = descriptor->bNbrPorts;
+ hub->nports = dev->maxchild = hub->descriptor->bNbrPorts;
X info("%d port%s detected", hub->nports, (hub->nports == 1) ? "" : "s");
X
- switch (descriptor->wHubCharacteristics & HUB_CHAR_LPSM) {
+ if (hub->descriptor->wHubCharacteristics & HUB_CHAR_COMPOUND)
+ dbg("part of a compound device");
+ else
+ dbg("standalone hub");
+
+ switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) {
X case 0x00:
X dbg("ganged power switching");
X break;
@@ -160,12 +165,7 @@
X break;
X }
X
- if (descriptor->wHubCharacteristics & HUB_CHAR_COMPOUND)
- dbg("part of a compound device");
- else
- dbg("standalone hub");
-
- switch (descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
+ switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
X case 0x00:
X dbg("global over-current protection");
X break;
@@ -178,28 +178,55 @@
X break;
X }
X
- dbg("power on to power good time: %dms", descriptor->bPwrOn2PwrGood * 2);
- dbg("hub controller current requirement: %dmA", descriptor->bHubContrCurrent);
+ dbg("power on to power good time: %dms", hub->descriptor->bPwrOn2PwrGood * 2);
+ dbg("hub controller current requirement: %dmA", hub->descriptor->bHubContrCurrent);
X
X for (i = 0; i < dev->maxchild; i++)
- dbg("port %d is%s removable", i + 1,
- bitmap[7 + ((i + 1)/8)] & (1 << ((i + 1) % 8))
- ? " not" : "");
+ portstr[i] = hub->descriptor->bitmap[((i + 1) / 8)] & (1 << ((i + 1) % 8)) ? 'F' : 'R';
+ portstr[dev->maxchild] = 0;
X
- kfree(bitmap);
+ dbg("port removable status: %s", portstr);
X
- ret = usb_get_hub_status(dev, buffer);
+ ret = usb_get_hub_status(dev, &hubstatus);
X if (ret < 0) {
X err("Unable to get hub status (err = %d)", ret);
+ kfree(hub->descriptor);


X return -1;
X }
X

- hubsts = (struct usb_hub_status *)buffer;
+ le16_to_cpus(&hubstatus.wHubStatus);
+
X dbg("local power source is %s",
- (le16_to_cpu(hubsts->wHubStatus) & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
+ (hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
X
X dbg("%sover-current condition exists",
- (le16_to_cpu(hubsts->wHubStatus) & HUB_STATUS_OVERCURRENT) ? "" : "no ");
+ (hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
+
+ /* Start the interrupt endpoint */
+ pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+ maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+
+ if (maxp > sizeof(hub->buffer))
+ maxp = sizeof(hub->buffer);
+
+ hub->urb = usb_alloc_urb(0);
+ if (!hub->urb) {
+ err("couldn't allocate interrupt urb");
+ kfree(hub->descriptor);
+ return -1;
+ }
+
+ FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
+ hub, endpoint->bInterval);
+ ret = usb_submit_urb(hub->urb);
+ if (ret) {
+ err("usb_submit_urb failed (%d)", ret);
+ kfree(hub->descriptor);
+ return -1;
+ }
+
+ /* Wake up khubd */
+ wake_up(&khubd_wait);
X
X usb_hub_power_on(hub);
X
@@ -212,8 +239,6 @@
X struct usb_endpoint_descriptor *endpoint;
X struct usb_hub *hub;
X unsigned long flags;
- unsigned int pipe;
- int maxp, ret;
X
X interface = &dev->actconfig->interface[i].altsetting[0];
X
@@ -224,24 +249,32 @@
X /* Some hubs have a subclass of 1, which AFAICT according to the */
X /* specs is not defined, but it works */
X if ((interface->bInterfaceSubClass != 0) &&
- (interface->bInterfaceSubClass != 1))
+ (interface->bInterfaceSubClass != 1)) {
+ err("invalid subclass (%d) for USB hub device #%d",
+ interface->bInterfaceSubClass, dev->devnum);
X return NULL;
+ }
X
X /* Multiple endpoints? What kind of mutant ninja-hub is this? */
- if (interface->bNumEndpoints != 1)
+ if (interface->bNumEndpoints != 1) {
+ err("invalid bNumEndpoints (%d) for USB hub device #%d",
+ interface->bNumEndpoints, dev->devnum);
X return NULL;
+ }
X
X endpoint = &interface->endpoint[0];
X
X /* Output endpoint? Curiousier and curiousier.. */
X if (!(endpoint->bEndpointAddress & USB_DIR_IN)) {
- err("Device is hub class, but has output endpoint?");
+ err("Device #%d is hub class, but has output endpoint?",
+ dev->devnum);


X return NULL;
X }
X

X /* If it's not an interrupt endpoint, we'd better punt! */
- if ((endpoint->bmAttributes & 3) != 3) {
- err("Device is hub class, but has endpoint other than interrupt?");
+ if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT) {
+ err("Device #%d is hub class, but has endpoint other than interrupt?",
+ dev->devnum);


X return NULL;
X }
X

@@ -258,6 +291,7 @@
X

X INIT_LIST_HEAD(&hub->event_list);
X hub->dev = dev;
+ atomic_set(&hub->refcnt, 1);
X
X /* Record the new hub's existence */
X spin_lock_irqsave(&hub_event_lock, flags);
@@ -265,34 +299,11 @@
X list_add(&hub->hub_list, &hub_list);
X spin_unlock_irqrestore(&hub_event_lock, flags);
X
- if (usb_hub_configure(hub) >= 0) {
- pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
- maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
-
- if (maxp > sizeof(hub->buffer))
- maxp = sizeof(hub->buffer);
-
- hub->urb = usb_alloc_urb(0);
- if (!hub->urb) {
- err("couldn't allocate interrupt urb");
- goto fail;
- }
-
- FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
- hub, endpoint->bInterval);
- ret = usb_submit_urb(hub->urb);
- if (ret) {
- err("usb_submit_urb failed (%d)", ret);
- goto fail;
- }
-
- /* Wake up khubd */
- wake_up(&khubd_wait);
- }
+ if (usb_hub_configure(hub, endpoint) >= 0)
+ return hub;
X
- return hub;
+ err("hub configuration failed for device #%d", dev->devnum);
X
-fail:
X /* free hub, but first clean up its list. */
X spin_lock_irqsave(&hub_event_lock, flags);
X
@@ -309,11 +320,34 @@


X return NULL;
X }
X

+static void hub_get(struct usb_hub *hub)
+{
+ atomic_inc(&hub->refcnt);
+}
+
+static void hub_put(struct usb_hub *hub)
+{
+ if (atomic_dec_and_test(&hub->refcnt)) {
+ if (hub->descriptor) {
+ kfree(hub->descriptor);
+ hub->descriptor = NULL;
+ }
+
+ kfree(hub);
+ }
+}
+
X static void hub_disconnect(struct usb_device *dev, void *ptr)
X {
X struct usb_hub *hub = (struct usb_hub *)ptr;
X unsigned long flags;
X
+ if (hub->urb) {
+ usb_unlink_urb(hub->urb);
+ usb_free_urb(hub->urb);
+ hub->urb = NULL;
+ }
+
X spin_lock_irqsave(&hub_event_lock, flags);
X
X /* Delete it and then reset it */
@@ -324,17 +358,10 @@
X
X spin_unlock_irqrestore(&hub_event_lock, flags);
X
- if (hub->urb) {
- usb_unlink_urb(hub->urb);
- usb_free_urb(hub->urb);
- hub->urb = NULL;
- }
-
- /* Free the memory */
- kfree(hub);
+ hub_put(hub);
X }
X
-static int hub_ioctl (struct usb_device *hub, unsigned int code, void *user_data)
+static int hub_ioctl(struct usb_device *hub, unsigned int code, void *user_data)
X {
X /* assert ifno == 0 (part of hub spec) */
X switch (code) {
@@ -343,19 +370,19 @@
X unsigned long flags;
X int i;
X
- spin_lock_irqsave (&hub_event_lock, flags);
+ spin_lock_irqsave(&hub_event_lock, flags);
X if (hub->devnum <= 0)
X info->nports = 0;
X else {
X info->nports = hub->maxchild;
X for (i = 0; i < info->nports; i++) {
- if (hub->children [i] == NULL)
- info->port [i] = 0;
+ if (hub->children[i] == NULL)
+ info->port[i] = 0;
X else
- info->port [i] = hub->children [i]->devnum;
+ info->port[i] = hub->children[i]->devnum;
X }
X }
- spin_unlock_irqrestore (&hub_event_lock, flags);
+ spin_unlock_irqrestore(&hub_event_lock, flags);
X
X return info->nports + 1;
X }
@@ -365,121 +392,262 @@
X }
X }
X
-static void usb_hub_port_connect_change(struct usb_device *hub, int port)
+static int usb_hub_reset(struct usb_hub *hub)
X {
- struct usb_device *usb;
- struct usb_port_status portsts;
- unsigned short portstatus, portchange;
- int ret, tries;
-
- wait_ms(100);
+ struct usb_device *dev = hub->dev;
+ int i;
X
- ret = usb_get_port_status(hub, port + 1, &portsts);
- if (ret < 0) {
- err("get_port_status(%d) failed (err = %d)", port + 1, ret);
- return;
+ /* Disconnect any attached devices */
+ for (i = 0; i < hub->nports; i++) {
+ if (dev->children[i])
+ usb_disconnect(&dev->children[i]);
X }
X
- portstatus = le16_to_cpu(portsts.wPortStatus);
- portchange = le16_to_cpu(portsts.wPortChange);
- dbg("portstatus %x, change %x, %s", portstatus, portchange,
- portstatus&(1<<USB_PORT_FEAT_LOWSPEED) ? "1.5 Mb/s" : "12 Mb/s");
+ /* Attempt to reset the hub */
+ if (hub->urb)
+ usb_unlink_urb(hub->urb);
+ else
+ return -1;
X
- /* Clear the connection change status */
- usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION);
+ if (usb_reset_device(dev))
+ return -1;
X
- /* Disconnect any existing devices under this port */
- if (((!(portstatus & USB_PORT_STAT_CONNECTION)) &&
- (!(portstatus & USB_PORT_STAT_ENABLE)))|| (hub->children[port])) {
- usb_disconnect(&hub->children[port]);
- /* Return now if nothing is connected */
- if (!(portstatus & USB_PORT_STAT_CONNECTION))
- return;
+ hub->urb->dev = dev;
+ if (usb_submit_urb(hub->urb))
+ return -1;
+
+ usb_hub_power_on(hub);


+
+ return 0;
+}
+

+static void usb_hub_disconnect(struct usb_device *dev)
+{
+ struct usb_device *parent = dev->parent;
+ int i;
+
+ /* Find the device pointer to disconnect */
+ if (parent) {
+ for (i = 0; i < parent->maxchild; i++) {
+ if (parent->children[i] == dev) {
+ usb_disconnect(&parent->children[i]);
+ return;
+ }
+ }
X }
- wait_ms(400);
X
- down(&usb_address0_sem);
+ err("cannot disconnect hub %d", dev->devnum);
+}
X
-#define MAX_TRIES 5
- /* Reset the port */
- for (tries = 0; tries < MAX_TRIES ; tries++) {
- usb_set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET);
- wait_ms(200);
+#define HUB_RESET_TRIES 5
+#define HUB_PROBE_TRIES 2
+#define HUB_SHORT_RESET_TIME 10
+#define HUB_LONG_RESET_TIME 200
+#define HUB_RESET_TIMEOUT 500
+
+static int usb_hub_port_wait_reset(struct usb_device *hub, int port,
+ struct usb_device *dev, unsigned int delay)
+{
+ int delay_time, ret;
+ struct usb_port_status portsts;
+ unsigned short portchange, portstatus;
+
+ for (delay_time = 0; delay_time < HUB_RESET_TIMEOUT; delay_time += delay) {
+ /* wait to give the device a chance to reset */
+ wait_ms(delay);
X
+ /* read and decode port status */
X ret = usb_get_port_status(hub, port + 1, &portsts);
X if (ret < 0) {
X err("get_port_status(%d) failed (err = %d)", port + 1, ret);
- goto out;
+ return -1;
X }
X
X portstatus = le16_to_cpu(portsts.wPortStatus);
X portchange = le16_to_cpu(portsts.wPortChange);
- dbg("portstatus %x, change %x, %s", portstatus ,portchange,
- portstatus&(1<<USB_PORT_FEAT_LOWSPEED) ? "1.5 Mb/s" : "12 Mb/s");
+ dbg("port %d, portstatus %x, change %x, %s", port + 1,
+ portstatus, portchange,
+ portstatus & (1 << USB_PORT_FEAT_LOWSPEED) ? "1.5 Mb/s" : "12 Mb/s");
X
+ /* bomb out completely if something weird happened */
X if ((portchange & USB_PORT_STAT_C_CONNECTION) ||
X !(portstatus & USB_PORT_STAT_CONNECTION))
- goto out;
+ return -1;
X
- if (portstatus & USB_PORT_STAT_ENABLE)
- break;
+ /* if we`ve finished resetting, then break out of the loop */
+ if (!(portstatus & USB_PORT_STAT_RESET) &&
+ (portstatus & USB_PORT_STAT_ENABLE)) {
+ dev->slow = (portstatus & USB_PORT_STAT_LOW_SPEED) ? 1 : 0;


+ return 0;
+ }
+

+ /* switch to the long delay after two short delay failures */
+ if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
+ delay = HUB_LONG_RESET_TIME;
X
- wait_ms(200);
+ dbg("port %d of hub %d not reset yet, waiting %dms", port + 1,
+ hub->devnum, delay);
X }
X
- if (tries >= MAX_TRIES) {
- err("Cannot enable port %i after %i retries, disabling port.", port+1, MAX_TRIES);
- err("Maybe the USB cable is bad?");
- goto out;
+ return -1;
+}
+
+static int usb_hub_port_reset(struct usb_device *hub, int port,
+ struct usb_device *dev, unsigned int delay)


+{
+ int i;
+

+ /* Reset the port */
+ for (i = 0; i < HUB_RESET_TRIES; i++) {
+ usb_set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET);
+
+ /* return success if the port reset OK */
+ if (!usb_hub_port_wait_reset(hub, port, dev, delay)) {
+ usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_RESET);


+ return 0;
+ }
+

+ dbg("port %d of hub %d not enabled, trying reset again...",
+ port + 1, hub->devnum);
+ delay = HUB_LONG_RESET_TIME;
X }
X
- usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_RESET);
+ err("Cannot enable port %i of hub %d, disabling port.",
+ port + 1, hub->devnum);
+ err("Maybe the USB cable is bad?");
X
- /* Allocate a new device struct for it */
- usb = usb_alloc_dev(hub, hub->bus);
- if (!usb) {
- err("couldn't allocate usb_device");
- goto out;
+ return -1;
+}
+
+void usb_hub_port_disable(struct usb_device *hub, int port)
+{
+ int ret;
+
+ ret = usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_ENABLE);
+ if (ret)
+ err("cannot disable port %d of hub %d (err = %d)",
+ port + 1, hub->devnum, ret);
+}
+
+static void usb_hub_port_connect_change(struct usb_device *hub, int port,
+ struct usb_port_status *portsts)
+{
+ struct usb_device *dev;
+ unsigned short portstatus, portchange;
+ unsigned int delay = HUB_SHORT_RESET_TIME;
+ int i;
+ char *portstr, *tempstr;
+
+ portstatus = le16_to_cpu(portsts->wPortStatus);
+ portchange = le16_to_cpu(portsts->wPortChange);
+ dbg("port %d, portstatus %x, change %x, %s", port + 1, portstatus,
+ portchange, portstatus & (1 << USB_PORT_FEAT_LOWSPEED) ? "1.5 Mb/s" : "12 Mb/s");
+
+ /* Clear the connection change status */
+ usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION);
+
+ /* Disconnect any existing devices under this port */
+ if (hub->children[port])
+ usb_disconnect(&hub->children[port]);
+
+ /* Return now if nothing is connected */
+ if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
+ if (portstatus & USB_PORT_STAT_ENABLE)
+ usb_hub_port_disable(hub, port);
+
+ return;
X }
X
- usb->slow = (portstatus & USB_PORT_STAT_LOW_SPEED) ? 1 : 0;
+ /* Some low speed devices have problems with the quick delay, so */
+ /* be a bit pessimistic with those devices. RHbug #23670 */
+ if (portstatus & USB_PORT_STAT_LOW_SPEED) {
+ wait_ms(400);
+ delay = HUB_LONG_RESET_TIME;
+ }
X
- hub->children[port] = usb;
+ down(&usb_address0_sem);
X
- /* Find a new device ID for it */
- usb_connect(usb);
+ tempstr = kmalloc(1024, GFP_KERNEL);
+ portstr = kmalloc(1024, GFP_KERNEL);
X
- /* Run it through the hoops (find a driver, etc) */
- ret = usb_new_device(usb);
- if (ret) {
- /* Try resetting the device. Windows does this and it */
- /* gets some devices working correctly */
- usb_set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET);
+ for (i = 0; i < HUB_PROBE_TRIES; i++) {
+ struct usb_device *pdev, *cdev;
+
+ /* Allocate a new device struct */
+ dev = usb_alloc_dev(hub, hub->bus);
+ if (!dev) {
+ err("couldn't allocate usb_device");
+ break;
+ }
X
- ret = usb_new_device(usb);
- if (ret) {
- usb_disconnect(&hub->children[port]);
+ hub->children[port] = dev;
X
- /* Woops, disable the port */
- dbg("hub: disabling port %d", port + 1);
- usb_clear_port_feature(hub, port + 1,
- USB_PORT_FEAT_ENABLE);
+ /* Reset the device */
+ if (usb_hub_port_reset(hub, port, dev, delay)) {
+ usb_free_dev(dev);
+ break;
X }
- }
X
-out:
+ /* Find a new device ID for it */
+ usb_connect(dev);
+
+ /* Create a readable topology string */
+ cdev = dev;
+ pdev = dev->parent;
+ if (portstr && tempstr) {
+ portstr[0] = 0;
+ while (pdev) {
+ int port;
+
+ for (port = 0; port < pdev->maxchild; port++)
+ if (pdev->children[port] == cdev)
+ break;
+
+ strcpy(tempstr, portstr);
+ if (!strlen(tempstr))
+ sprintf(portstr, "%d", port + 1);
+ else
+ sprintf(portstr, "%d/%s", port + 1, tempstr);
+
+ cdev = pdev;
+ pdev = pdev->parent;
+ }
+ info("USB new device connect on bus%d/%s, assigned device number %d",
+ dev->bus->busnum, portstr, dev->devnum);
+ } else
+ info("USB new device connect on bus%d, assigned device number %d",
+ dev->bus->busnum, dev->devnum);
+
+ /* Run it through the hoops (find a driver, etc) */
+ if (!usb_new_device(dev))
+ goto done;
+
+ /* Free the configuration if there was an error */
+ usb_free_dev(dev);
+
+ /* Switch to a long reset time */
+ delay = HUB_LONG_RESET_TIME;
+ }
+
+ hub->children[port] = NULL;
+ usb_hub_port_disable(hub, port);
+done:
X up(&usb_address0_sem);
+ if (portstr)
+ kfree(portstr);
+ if (tempstr)
+ kfree(tempstr);
X }
X
X static void usb_hub_events(void)
X {
X unsigned long flags;
- int i;
X struct list_head *tmp;
X struct usb_device *dev;
X struct usb_hub *hub;
X struct usb_hub_status hubsts;
X unsigned short hubstatus, hubchange;
+ int i, ret;
X
X /*
X * We restart the list everytime to avoid a deadlock with
@@ -491,7 +659,7 @@
X spin_lock_irqsave(&hub_event_lock, flags);
X
X if (list_empty(&hub_event_list))
- goto he_unlock;
+ break;
X
X /* Grab the next entry from the beginning of the list */
X tmp = hub_event_list.next;
@@ -502,14 +670,30 @@
X list_del(tmp);
X INIT_LIST_HEAD(tmp);
X
+ hub_get(hub);
X spin_unlock_irqrestore(&hub_event_lock, flags);
X
+ if (hub->error) {
+ dbg("resetting hub %d for error %d", dev->devnum, hub->error);
+
+ if (usb_hub_reset(hub)) {
+ err("error resetting hub %d - disconnecting", dev->devnum);
+ usb_hub_disconnect(dev);
+ hub_put(hub);
+ continue;
+ }
+
+ hub->nerrors = 0;
+ hub->error = 0;
+ }
+
X for (i = 0; i < hub->nports; i++) {
X struct usb_port_status portsts;
X unsigned short portstatus, portchange;
X
- if (usb_get_port_status(dev, i + 1, &portsts) < 0) {
- err("get_port_status failed");
+ ret = usb_get_port_status(dev, i + 1, &portsts);
+ if (ret < 0) {
+ err("get_port_status failed (err = %d)", ret);
X continue;
X }
X
@@ -519,27 +703,27 @@
X if (portchange & USB_PORT_STAT_C_CONNECTION) {
X dbg("port %d connection change", i + 1);
X
- usb_hub_port_connect_change(dev, i);
- }
-
- if (portchange & USB_PORT_STAT_C_ENABLE) {
+ usb_hub_port_connect_change(dev, i, &portsts);
+ } else if (portchange & USB_PORT_STAT_C_ENABLE) {
X dbg("port %d enable change, status %x", i + 1, portstatus);
X usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_ENABLE);
X
- // EM interference sometimes causes bad shielded USB devices to
- // be shutdown by the hub, this hack enables them again.
- // Works at least with mouse driver.
+ /*
+ * EM interference sometimes causes bad shielded USB devices to
+ * be shutdown by the hub, this hack enables them again.
+ * Works at least with mouse driver.
+ */
X if (!(portstatus & USB_PORT_STAT_ENABLE) &&
X (portstatus & USB_PORT_STAT_CONNECTION) && (dev->children[i])) {
X err("already running port %i disabled by hub (EMI?), re-enabling...",
X i + 1);
- usb_hub_port_connect_change(dev, i);
+ usb_hub_port_connect_change(dev, i, &portsts);
X }
X }
X
- if (portstatus & USB_PORT_STAT_SUSPEND) {
+ if (portchange & USB_PORT_STAT_C_SUSPEND) {
X dbg("port %d suspend change", i + 1);
- usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_SUSPEND);
+ usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_SUSPEND);
X }
X
X if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
@@ -555,9 +739,9 @@
X } /* end for i */
X
X /* deal with hub status changes */
- if (usb_get_hub_status(dev, &hubsts) < 0) {
+ if (usb_get_hub_status(dev, &hubsts) < 0)
X err("get_hub_status failed");
- } else {
+ else {
X hubstatus = le16_to_cpup(&hubsts.wHubStatus);
X hubchange = le16_to_cpup(&hubsts.wHubChange);
X if (hubchange & HUB_CHANGE_LOCAL_POWER) {
@@ -566,21 +750,19 @@
X }
X if (hubchange & HUB_CHANGE_OVERCURRENT) {
X dbg("hub overcurrent change");
- wait_ms(500); //Cool down
+ wait_ms(500); /* Cool down */
X usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
X usb_hub_power_on(hub);
X }
X }
+ hub_put(hub);
X } /* end while (1) */
X
-he_unlock:
X spin_unlock_irqrestore(&hub_event_lock, flags);
X }
X
X static int usb_hub_thread(void *__hub)
X {
- khubd_running = 1;
-
X lock_kernel();
X
X /*
@@ -602,11 +784,12 @@
X } while (!signal_pending(current));
X
X dbg("usb_hub_thread exiting");
- khubd_running = 0;
X
+ up(&khubd_exited);


X return 0;
X }
X
+

X static struct usb_driver hub_driver = {
X name: "hub",
X probe: hub_probe,
@@ -636,6 +819,7 @@
X
X /* Fall through if kernel_thread failed */
X usb_deregister(&hub_driver);
+ err("failed to start usb_hub_thread");
X
X return -1;
X }
@@ -646,21 +830,11 @@
X
X /* Kill the thread */
X ret = kill_proc(khubd_pid, SIGTERM, 1);
- if (!ret) {
- /* Wait 10 seconds */
- int count = 10 * HZ;
X
- while (khubd_running && --count) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
- }
-
- if (!count)
- err("giving up on killing khubd");
- }
+ down(&khubd_exited);
X
X /*
- * Hub resources are freed for us by usb_deregister. It
+ * Hub resources are freed for us by usb_deregister. It calls
X * usb_driver_purge on every device which in turn calls that
X * devices disconnect function if it is using this driver.
X * The hub_disconnect function takes care of releasing the
@@ -701,23 +875,23 @@
X down(&usb_address0_sem);
X
X /* Send a reset to the device */
- usb_set_port_feature(parent, port + 1, USB_PORT_FEAT_RESET);
-
- wait_ms(200);
-
- usb_clear_port_feature(parent, port + 1, USB_PORT_FEAT_C_RESET);
+ if (usb_hub_port_reset(parent, port, dev, HUB_SHORT_RESET_TIME)) {
+ usb_hub_port_disable(parent, port);
+ up(&usb_address0_sem);
+ return(-ENODEV);
+ }
X
X /* Reprogram the Address */
X ret = usb_set_address(dev);
X if (ret < 0) {
X err("USB device not accepting new address (error=%d)", ret);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
- dev->devnum = -1;
+ usb_hub_port_disable(parent, port);
X up(&usb_address0_sem);


X return ret;
X }
X

- wait_ms(10); /* Let the SET_ADDRESS settle */
+ /* Let the SET_ADDRESS settle */
+ wait_ms(10);
X
X up(&usb_address0_sem);
X
@@ -748,7 +922,7 @@
X if (ret < 0)
X err("unable to get device descriptor (error=%d)", ret);
X else
- err("USB device descriptor short read (expected %i, got %i)", sizeof(dev->descriptor), ret);
+ err("USB device descriptor short read (expected %Zi, got %i)", sizeof(dev->descriptor), ret);
X
X clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
X dev->devnum = -1;
@@ -768,30 +942,23 @@
X usb_set_maxpacket(dev);
X
X return 1;
- } else {
- ret = usb_set_configuration(dev,
- dev->actconfig->bConfigurationValue);
- if (ret < 0) {
- err("failed to set active configuration (error=%d)",
- ret);
- return ret;
- }
+ }
X
- for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
- struct usb_interface *intf =
- &dev->actconfig->interface[i];
- struct usb_interface_descriptor *as =
- &intf->altsetting[intf->act_altsetting];
+ ret = usb_set_configuration(dev, dev->actconfig->bConfigurationValue);
+ if (ret < 0) {
+ err("failed to set active configuration (error=%d)", ret);
+ return ret;
+ }
X
- ret = usb_set_interface(dev, as->bInterfaceNumber,
- as->bAlternateSetting);
- if (ret < 0) {
- err("failed to set active alternate setting for interface %d (error=%d)", i, ret);
- return ret;
- }
- }
+ for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
+ struct usb_interface *intf = &dev->actconfig->interface[i];
+ struct usb_interface_descriptor *as = &intf->altsetting[intf->act_altsetting];
X
- return 0;
+ ret = usb_set_interface(dev, as->bInterfaceNumber, as->bAlternateSetting);
+ if (ret < 0) {
+ err("failed to set active alternate setting for interface %d (error=%d)", i, ret);
+ return ret;
+ }
X }
X
X return 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/hub.h linux/drivers/usb/hub.h
--- v2.2.19/drivers/usb/hub.h Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/hub.h Wed Oct 10 01:41:25 2001
@@ -82,48 +82,34 @@
X __u16 wHubCharacteristics;
X __u8 bPwrOn2PwrGood;
X __u8 bHubContrCurrent;
+
X /* DeviceRemovable and PortPwrCtrlMask want to be variable-length
X bitmaps that hold max 256 entries, but for now they're ignored */
+ __u8 bitmap[0];
X } __attribute__ ((packed));
X
X struct usb_device;
X
-typedef enum {
- USB_PORT_UNPOWERED = 0, /* Default state */
- USB_PORT_POWERED, /* When we've put power to it */
- USB_PORT_ENABLED, /* When it's been enabled */
- USB_PORT_DISABLED, /* If it's been disabled */
- USB_PORT_ADMINDISABLED, /* Forced down */
-} usb_hub_port_state;
-
-struct usb_hub_port {
- usb_hub_port_state cstate; /* Configuration state */
-
- struct usb_device *child; /* Device attached to this port */
-
- struct usb_hub *parent; /* Parent hub */
-};
-
X struct usb_hub {
- /* Device structure */
X struct usb_device *dev;
X
- /* Interrupt polling pipe */
- struct urb *urb;
+ struct urb *urb; /* Interrupt polling pipe */
X
X char buffer[(USB_MAXCHILDREN + 1 + 7) / 8]; /* add 1 bit for hub status change */
X /* and add 7 bits to round up to byte boundary */
+ int error;
+ int nerrors;
X
- /* List of hubs */
X struct list_head hub_list;
X
- /* Temporary event list */
X struct list_head event_list;
X
X /* Number of ports on the hub */
X int nports;
X
- struct usb_hub_port ports[0]; /* Dynamically allocated */
+ struct usb_hub_descriptor *descriptor;
+
+ atomic_t refcnt;
X };
X
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/mdc800.c linux/drivers/usb/mdc800.c
--- v2.2.19/drivers/usb/mdc800.c Sun Mar 25 17:31:42 2001
+++ linux/drivers/usb/mdc800.c Wed Oct 10 01:41:25 2001
@@ -22,13 +22,26 @@
X * (c) 1999/2000 Henning Zabel <hen...@uni-paderborn.de>
X *
X *
- * The driver brings the USB functions of the MDC800 to Linux.
+ * The driver brings the USB functions of the MDC800 to Linux.
X * To use the Camera you must support the USB Protocoll of the camera
X * to the Kernel Node.
X * The Driver uses a misc device Node. Create it with :
X * mknod /dev/mustek c 180 32
X *
X * The driver supports only one camera.
+ *
+ * (08/04/2001) gb
+ * Identify version on module load.
+ *
+ * version 0.7.5
+ * Fixed potential SMP races with Spinlocks.
+ * Thanks to Oliver Neukum <oliver...@lrz.uni-muenchen.de> who
+ * noticed the race conditions.
+ * (30/10/2000)
+ *
+ * Fixed: Setting urb->dev before submitting urb.
+ * by Greg KH <gr...@kroah.com>
+ * (13/10/2000)
X *
X * version 0.7.3
X * bugfix : The mdc800->state field gets set to READY after the
@@ -61,7 +74,7 @@
X * (09/11/1999)
X *
X * version 0.5.0:
- * first Version that gets a version number. Most of the needed
+ * first Version that gets a version number. Most of the needed
X * functions work.
X * (20/10/1999)
X */
@@ -80,8 +93,12 @@
X
X #include <linux/usb.h>
X
-#define VERSION "0.7.3"
-#define RELEASE_DATE "(24/04/2000)"


+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v0.7.5 (30/10/2000)"
+#define DRIVER_AUTHOR "Henning Zabel <hen...@uni-paderborn.de>"
+#define DRIVER_DESC "USB Driver for Mustek MDC800 Digital Camera"
X
X /* Vendor and Product Information */
X #define MDC800_VENDOR_ID 0x055f
@@ -123,7 +140,7 @@
X
X int camera_busy; // is camera busy ?
X int camera_request_ready; // Status to synchronize with irq
- char camera_response [8]; // last Bytes send after busy
+ char camera_response [8]; // last Bytes send after busy
X
X purb_t write_urb;
X char* write_urb_buffer;
@@ -138,16 +155,16 @@


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 64'
echo 'File patch-2.2.20 is continued in part 65'
echo "65" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:46 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part47

#!/bin/sh -x
# this is part 47 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 47; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&
X }
X }

-#endif /* version >= v1.3.89 */
-

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-/*
- * Function used only with polled I/O requests that are initiated by
- * advansys_command().
- */
-STATIC void
-advansys_command_done(Scsi_Cmnd *scp)
-{
- ASC_DBG1(1, "advansys_command_done: scp %lx\n", (ulong) scp);
- scp->SCp.Status = 1;


-}
-#endif /* version < v2.3.28 */

X
X /*
X * Complete all requests on the singly linked list pointed
@@ -7674,7 +6466,7 @@
X
X ASC_DBG(2, "asc_scsi_done_list: begin\n");
X while (scp != NULL) {
- ASC_DBG1(3, "asc_scsi_done_list: scp %lx\n", (ulong) scp);
+ ASC_DBG1(3, "asc_scsi_done_list: scp 0x%lx\n", (ulong) scp);
X tscp = REQPNEXT(scp);
X REQPNEXT(scp) = NULL;
X ASC_STATS(scp->host, done);
@@ -7722,12 +6514,15 @@
X * scsi_done - used to save caller's done function
X * host_scribble - used for pointer to another Scsi_Cmnd
X *
- * If this function returns ASC_NOERROR or ASC_ERROR the request
- * has been enqueued on the board's 'done' queue and must be
- * completed by the caller.
+ * If this function returns ASC_NOERROR the request has been enqueued
+ * on the board's 'active' queue and will be completed from the
+ * interrupt handler.
X *
- * If ASC_BUSY is returned the request must be enqueued by the
- * caller and re-tried later.
+ * If this function returns ASC_NOERROR the request has been enqueued
+ * on the board's 'done' queue and must be completed by the caller.
+ *
+ * If ASC_BUSY is returned the request will be enqueued by the
+ * caller on the target's waiting queue and re-tried later.


X */
X STATIC int

X asc_execute_scsi_cmnd(Scsi_Cmnd *scp)
@@ -7739,8 +6534,7 @@
X Scsi_Device *device;
X int ret;
X
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
- ASC_DBG2(1, "asc_execute_scsi_cmnd: scp %lx, done %lx\n",
+ ASC_DBG2(1, "asc_execute_scsi_cmnd: scp 0x%lx, done 0x%lx\n",
X (ulong) scp, (ulong) scp->scsi_done);
X
X boardp = ASC_BOARDP(scp->host);
@@ -7757,6 +6551,10 @@
X * Build Asc Library request structure using the
X * global structures 'asc_scsi_req' and 'asc_sg_head'.
X *
+ * If an error is returned, then the request has been
+ * queued on the board done queue. It will be completed


+ * by the caller.

+ *
X * asc_build_req() can not return ASC_BUSY.
X */
X if (asc_build_req(boardp, scp) == ASC_ERROR) {
@@ -7776,18 +6574,20 @@
X * request counter. Wrapping doesn't matter.
X */
X boardp->reqcnt[scp->target]++;
-
X asc_enqueue(&boardp->active, scp, ASC_BACK);
X ASC_DBG(1,
X "asc_execute_scsi_cmnd: AscExeScsiQueue(), ASC_NOERROR\n");
X break;
X case ASC_BUSY:
- /* Caller must enqueue request and retry later. */
+ /*
+ * Caller will enqueue request on the target's waiting queue
+ * and retry later.
+ */
X ASC_STATS(scp->host, exe_busy);
X break;
X case ASC_ERROR:
X ASC_PRINT2(
-"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() ASC_ERROR, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() ASC_ERROR, err_code 0x%x\n",
X boardp->id, asc_dvc_varp->err_code);
X ASC_STATS(scp->host, exe_error);
X scp->result = HOST_BYTE(DID_ERROR);
@@ -7795,7 +6595,7 @@


X break;
X default:
X ASC_PRINT2(

-"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() unknown, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() unknown, err_code 0x%x\n",
X boardp->id, asc_dvc_varp->err_code);
X ASC_STATS(scp->host, exe_unknown);
X scp->result = HOST_BYTE(DID_ERROR);
@@ -7811,7 +6611,7 @@
X /*
X * Build and get a pointer to an Adv Library request structure.
X *
- * If the request is successfully built then send it below,
+ * If the request is successfully built then send it below,
X * otherwise return with an error.
X */
X switch (adv_build_req(boardp, scp, &adv_scsiqp)) {
@@ -7820,14 +6620,28 @@
X break;
X case ASC_BUSY:
X ASC_DBG(1, "asc_execute_scsi_cmnd: adv_build_req ASC_BUSY\n");
+ /*
+ * If busy is returned the request has not been enqueued.
+ * It will be enqueued by the caller on the target's waiting
+ * queue and retried later.
+ *
+ * The asc_stats fields 'adv_build_noreq' and 'adv_build_nosg'
+ * count wide board busy conditions. They are updated in
+ * adv_build_req and adv_get_sglist, respectively.
+ */
X return ASC_BUSY;
X case ASC_ERROR:
+ /*
+ * If an error is returned, then the request has been
+ * queued on the board done queue. It will be completed


+ * by the caller.

+ */
X default:
X ASC_DBG(1, "asc_execute_scsi_cmnd: adv_build_req ASC_ERROR\n");
X ASC_STATS(scp->host, build_error);
X return ASC_ERROR;
X }
-
+
X /*
X * Execute the command. If there is no error, add the command
X * to the active queue.
@@ -7845,12 +6659,15 @@
X "asc_execute_scsi_cmnd: AdvExeScsiQueue(), ASC_NOERROR\n");
X break;
X case ASC_BUSY:
- /* Caller must enqueue request and retry later. */
+ /*
+ * Caller will enqueue request on the target's waiting queue
+ * and retry later.
+ */
X ASC_STATS(scp->host, exe_busy);
X break;
X case ASC_ERROR:
X ASC_PRINT2(
-"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() ASC_ERROR, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() ASC_ERROR, err_code 0x%x\n",
X boardp->id, adv_dvc_varp->err_code);
X ASC_STATS(scp->host, exe_error);
X scp->result = HOST_BYTE(DID_ERROR);
@@ -7858,7 +6675,7 @@


X break;
X default:
X ASC_PRINT2(

-"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() unknown, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() unknown, err_code 0x%x\n",
X boardp->id, adv_dvc_varp->err_code);
X ASC_STATS(scp->host, exe_unknown);
X scp->result = HOST_BYTE(DID_ERROR);
@@ -7868,7 +6685,6 @@
X }
X
X ASC_DBG(1, "asc_execute_scsi_cmnd: end\n");
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);


X return ret;
X }
X

@@ -7878,7 +6694,8 @@
X * The global structures 'asc_scsi_q' and 'asc_sg_head' are
X * used to build the request.
X *
- * If an error occurs, then return ASC_ERROR.
+ * If an error occurs, then queue the request on the board done
+ * queue and return ASC_ERROR.


X */
X STATIC int

X asc_build_req(asc_board_t *boardp, Scsi_Cmnd *scp)
@@ -7900,20 +6717,20 @@
X * For narrow boards a CDB length maximum of 12 bytes
X * is supported.
X */
- ASC_ASSERT(scp->cmd_len <= ASC_MAX_CDB_LEN);
X if (scp->cmd_len > ASC_MAX_CDB_LEN) {
- scp->cmd_len = ASC_MAX_CDB_LEN;
+ ASC_PRINT3(
+"asc_build_req: board %d: cmd_len %d > ASC_MAX_CDB_LEN %d\n",
+ boardp->id, scp->cmd_len, ASC_MAX_CDB_LEN);
+ scp->result = HOST_BYTE(DID_ERROR);
+ asc_enqueue(&boardp->done, scp, ASC_BACK);
+ return ASC_ERROR;
X }
X asc_scsi_q.cdbptr = &scp->cmnd[0];
X asc_scsi_q.q2.cdb_len = scp->cmd_len;
X asc_scsi_q.q1.target_id = ASC_TID_TO_TARGET_ID(scp->target);
X asc_scsi_q.q1.target_lun = scp->lun;
X asc_scsi_q.q2.target_ix = ASC_TIDLUN_TO_IX(scp->target, scp->lun);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- asc_scsi_q.q1.sense_addr = (ADV_PADDR) &scp->sense_buffer[0];
-#else /* version >= v2.0.0 */
X asc_scsi_q.q1.sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0]));
-#endif /* version >= v2.0.0 */
X asc_scsi_q.q1.sense_len = sizeof(scp->sense_buffer);
X
X /*
@@ -7925,7 +6742,7 @@
X *
X * The request count is incremented below for every successfully
X * started request.


- *
+ *
X */

X if ((boardp->dvc_var.asc_dvc_var.cur_dvc_qng[scp->target] > 0) &&
X (boardp->reqcnt[scp->target] % 255) == 0) {
@@ -7943,13 +6760,9 @@
X * CDB request of single contiguous buffer.
X */
X ASC_STATS(scp->host, cont_cnt);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- asc_scsi_q.q1.data_addr = (ADV_PADDR) scp->request_buffer;
-#else /* version >= v2.0.0 */
X asc_scsi_q.q1.data_addr =
X cpu_to_le32(virt_to_bus(scp->request_buffer));
-#endif /* version >= v2.0.0 */
- asc_scsi_q.q1.data_cnt = scp->request_bufflen;
+ asc_scsi_q.q1.data_cnt = cpu_to_le32(scp->request_bufflen);
X ASC_STATS_ADD(scp->host, cont_xfer,
X ASC_CEILING(scp->request_bufflen, 512));
X asc_scsi_q.q1.sg_queue_cnt = 0;
@@ -7982,6 +6795,7 @@
X asc_scsi_q.sg_head = &asc_sg_head;
X asc_scsi_q.q1.data_cnt = 0;
X asc_scsi_q.q1.data_addr = 0;
+ /* This is a byte value, otherwise it would need to be swapped. */
X asc_sg_head.entry_cnt = asc_scsi_q.q1.sg_queue_cnt = scp->use_sg;
X ASC_STATS_ADD(scp->host, sg_elem, asc_sg_head.entry_cnt);
X
@@ -7990,12 +6804,8 @@
X */
X slp = (struct scatterlist *) scp->request_buffer;
X for (sgcnt = 0; sgcnt < scp->use_sg; sgcnt++, slp++) {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- asc_sg_head.sg_list[sgcnt].addr = (ADV_PADDR) slp->address;
-#else /* version >= v2.0.0 */
X asc_sg_head.sg_list[sgcnt].addr =
X cpu_to_le32(virt_to_bus(slp->address));
-#endif /* version >= v2.0.0 */
X asc_sg_head.sg_list[sgcnt].bytes = cpu_to_le32(slp->length);
X ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512));
X }
@@ -8041,9 +6851,9 @@
X }
X
X /*
- * Get 4-byte aligned ADV_SCSI_REQ_Q and ADV_SG_BLOCK pointers.
+ * Get 32-byte aligned ADV_SCSI_REQ_Q and ADV_SG_BLOCK pointers.
X */
- scsiqp = (ADV_SCSI_REQ_Q *) ADV_8BALIGN(&reqp->scsi_req_q);
+ scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q);
X
X /*
X * Initialize the structure.
@@ -8069,9 +6879,13 @@
X * For wide boards a CDB length maximum of 16 bytes
X * is supported.
X */
- ASC_ASSERT(scp->cmd_len <= ADV_MAX_CDB_LEN);
X if (scp->cmd_len > ADV_MAX_CDB_LEN) {
- scp->cmd_len = ADV_MAX_CDB_LEN;
+ ASC_PRINT3(
+"adv_build_req: board %d: cmd_len %d > ADV_MAX_CDB_LEN %d\n",
+ boardp->id, scp->cmd_len, ADV_MAX_CDB_LEN);
+ scp->result = HOST_BYTE(DID_ERROR);
+ asc_enqueue(&boardp->done, scp, ASC_BACK);
+ return ASC_ERROR;
X }
X scsiqp->cdb_len = scp->cmd_len;
X /* Copy first 12 CDB bytes to cdb[]. */
@@ -8086,11 +6900,7 @@
X scsiqp->target_id = scp->target;
X scsiqp->target_lun = scp->lun;
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- scsiqp->sense_addr = (ADV_PADDR) &scp->sense_buffer[0];
-#else /* version >= v2.0.0 */
X scsiqp->sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0]));
-#endif /* version >= v2.0.0 */
X scsiqp->sense_len = sizeof(scp->sense_buffer);
X
X /*
@@ -8099,11 +6909,7 @@
X */
X scsiqp->data_cnt = cpu_to_le32(scp->request_bufflen);
X scsiqp->vdata_addr = scp->request_buffer;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- scsiqp->data_addr = (ADV_PADDR) scp->request_buffer;
-#else /* version >= v2.0.0 */
X scsiqp->data_addr = cpu_to_le32(virt_to_bus(scp->request_buffer));
-#endif /* version >= v2.0.0 */
X
X if (scp->use_sg == 0) {
X /*
@@ -8182,7 +6988,7 @@
X ADV_PADDR sg_block_paddr;
X int i;
X
- scsiqp = (ADV_SCSI_REQ_Q *) ADV_8BALIGN(&reqp->scsi_req_q);
+ scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q);
X slp = (struct scatterlist *) scp->request_buffer;
X sg_elem_cnt = scp->use_sg;
X prev_sg_block = NULL;
@@ -8223,12 +7029,7 @@
X * the allocated ADV_SG_BLOCK structure.
X */
X sg_block = (ADV_SG_BLOCK *) ADV_8BALIGN(&sgblkp->sg_block);
- sg_block_paddr =
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- (ADV_PADDR) sg_block;
-#else /* version >= v2.0.0 */
- virt_to_bus(sg_block);
-#endif /* version >= v2.0.0 */
+ sg_block_paddr = virt_to_bus(sg_block);
X
X /*
X * Check if this is the first 'adv_sgblk_t' for the request.
@@ -8262,11 +7063,7 @@
X for (i = 0; i < NO_OF_SG_PER_BLOCK; i++)
X {
X sg_block->sg_list[i].sg_addr =
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- (ADV_PADDR) slp->address;
-#else /* version >= v2.0.0 */
X cpu_to_le32(virt_to_bus(slp->address));
-#endif /* version >= v2.0.0 */
X sg_block->sg_list[i].sg_count = cpu_to_le32(slp->length);
X ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512));
X
@@ -8298,8 +7095,7 @@
X struct Scsi_Host *shp;
X int i;
X
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
- ASC_DBG2(1, "asc_isr_callback: asc_dvc_varp %lx, qdonep %lx\n",
+ ASC_DBG2(1, "asc_isr_callback: asc_dvc_varp 0x%lx, qdonep 0x%lx\n",
X (ulong) asc_dvc_varp, (ulong) qdonep);
X ASC_DBG_PRT_ASC_QDONE_INFO(2, qdonep);
X
@@ -8308,7 +7104,7 @@
X * command that has been completed.
X */
X scp = (Scsi_Cmnd *) ASC_U32_TO_VADDR(qdonep->d2.srb_ptr);
- ASC_DBG1(1, "asc_isr_callback: scp %lx\n", (ulong) scp);
+ ASC_DBG1(1, "asc_isr_callback: scp 0x%lx\n", (ulong) scp);
X
X if (scp == NULL) {
X ASC_PRINT("asc_isr_callback: scp is NULL\n");
@@ -8328,24 +7124,24 @@
X }
X if (i == asc_board_count) {
X ASC_PRINT2(
- "asc_isr_callback: scp %lx has bad host pointer, host %lx\n",
+ "asc_isr_callback: scp 0x%lx has bad host pointer, host 0x%lx\n",
X (ulong) scp, (ulong) shp);
X return;
X }
X
X ASC_STATS(shp, callback);
- ASC_DBG1(1, "asc_isr_callback: shp %lx\n", (ulong) shp);
+ ASC_DBG1(1, "asc_isr_callback: shp 0x%lx\n", (ulong) shp);
X
X /*
X * If the request isn't found on the active queue, it may
- * have been removed to handle a reset or abort request.
+ * have been removed to handle a reset request.
X * Display a message and return.
X */
X boardp = ASC_BOARDP(shp);
X ASC_ASSERT(asc_dvc_varp == &boardp->dvc_var.asc_dvc_var);
X if (asc_rmqueue(&boardp->active, scp) == ASC_FALSE) {
X ASC_PRINT2(
- "asc_isr_callback: board %d: scp %lx not on active queue\n",
+ "asc_isr_callback: board %d: scp 0x%lx not on active queue\n",
X boardp->id, (ulong) scp);
X return;
X }
@@ -8369,20 +7165,20 @@
X (ASC_SCSI_INQUIRY *) scp->request_buffer);
X }
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,19)
+#if ASC_LINUX_KERNEL24
X /*
X * Check for an underrun condition.
X *
X * If there was no error and an underrun condition, then
X * then return the number of underrun bytes.
X */
- if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 &&
+ if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 &&
X qdonep->remain_bytes <= scp->request_bufflen != 0) {
X ASC_DBG1(1, "asc_isr_callback: underrun condition %u bytes\n",
X (unsigned) qdonep->remain_bytes);
X scp->resid = qdonep->remain_bytes;
X }
-#endif /* version >= v2.3.19 */
+#endif
X break;
X
X case QD_WITH_ERROR:
@@ -8404,15 +7200,15 @@
X * byte as it is defined by SCSI.
X */
X scp->result = DRIVER_BYTE(DRIVER_SENSE) |
- STATUS_BYTE(qdonep->d3.scsi_stat);
+ STATUS_BYTE(qdonep->d3.scsi_stat);
X } else {
- scp->result = STATUS_BYTE(qdonep->d3.scsi_stat);
+ scp->result = STATUS_BYTE(qdonep->d3.scsi_stat);
X }


X break;
X
X default:

X /* QHSTA error occurred */
- ASC_DBG1(1, "asc_isr_callback: host_stat %x\n",
+ ASC_DBG1(1, "asc_isr_callback: host_stat 0x%x\n",
X qdonep->d3.host_stat);
X scp->result = HOST_BYTE(DID_BAD_TARGET);
X break;
@@ -8426,7 +7222,7 @@
X break;
X
X default:
- ASC_DBG1(1, "asc_isr_callback: done_stat %x\n", qdonep->d3.done_stat);
+ ASC_DBG1(1, "asc_isr_callback: done_stat 0x%x\n", qdonep->d3.done_stat);
X scp->result = HOST_BYTE(DID_ERROR) | MSG_BYTE(qdonep->d3.scsi_msg) |
X STATUS_BYTE(qdonep->d3.scsi_stat);
X break;
@@ -8443,7 +7239,7 @@
X boardp->init_tidmask |= ADV_TID_TO_TIDMASK(scp->target);
X }
X
- /*
+ /*
X * Because interrupts may be enabled by the 'Scsi_Cmnd' done
X * function, add the command to the end of the board's done queue.
X * The done function for the command will be called from
@@ -8468,9 +7264,12 @@
X Scsi_Cmnd *scp;
X struct Scsi_Host *shp;
X int i;
+#if ASC_LINUX_KERNEL24
+ ADV_DCNT resid_cnt;
+#endif
X
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
- ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp %lx, scsiqp %lx\n",
+
+ ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp 0x%lx, scsiqp 0x%lx\n",
X (ulong) adv_dvc_varp, (ulong) scsiqp);
X ASC_DBG_PRT_ADV_SCSI_REQ_Q(2, scsiqp);
X
@@ -8480,7 +7279,7 @@
X * completed ADV_SCSI_REQ_Q structure.
X */
X reqp = (adv_req_t *) ADV_U32_TO_VADDR(scsiqp->srb_ptr);
- ASC_DBG1(1, "adv_isr_callback: reqp %lx\n", (ulong) reqp);
+ ASC_DBG1(1, "adv_isr_callback: reqp 0x%lx\n", (ulong) reqp);
X if (reqp == NULL) {
X ASC_PRINT("adv_isr_callback: reqp is NULL\n");
X return;
@@ -8495,7 +7294,7 @@
X * determined.
X */
X scp = reqp->cmndp;
- ASC_DBG1(1, "adv_isr_callback: scp %lx\n", (ulong) scp);
+ ASC_DBG1(1, "adv_isr_callback: scp 0x%lx\n", (ulong) scp);
X if (scp == NULL) {
X ASC_PRINT("adv_isr_callback: scp is NULL; adv_req_t dropped.\n");
X return;
@@ -8518,18 +7317,17 @@
X */
X if (i == asc_board_count) {
X ASC_PRINT2(
- "adv_isr_callback: scp %lx has bad host pointer, host %lx\n",
+ "adv_isr_callback: scp 0x%lx has bad host pointer, host 0x%lx\n",
X (ulong) scp, (ulong) shp);
X return;
X }
X
X ASC_STATS(shp, callback);
- ASC_DBG1(1, "adv_isr_callback: shp %lx\n", (ulong) shp);
+ ASC_DBG1(1, "adv_isr_callback: shp 0x%lx\n", (ulong) shp);
X
X /*
X * If the request isn't found on the active queue, it may have been
- * removed to handle a reset or abort request. Display a message and
- * return.
+ * removed to handle a reset request. Display a message and return.
X *
X * Note: Because the structure may still be in use don't attempt
X * to free the adv_req_t and adv_sgblk_t, if any, structures.
@@ -8538,7 +7336,7 @@
X ASC_ASSERT(adv_dvc_varp == &boardp->dvc_var.adv_dvc_var);
X if (asc_rmqueue(&boardp->active, scp) == ASC_FALSE) {
X ASC_PRINT2(
- "adv_isr_callback: board %d: scp %lx not on active queue\n",
+ "adv_isr_callback: board %d: scp 0x%lx not on active queue\n",
X boardp->id, (ulong) scp);
X return;
X }
@@ -8551,20 +7349,21 @@
X ASC_DBG(2, "adv_isr_callback: QD_NO_ERROR\n");
X scp->result = 0;
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,19)
+#if ASC_LINUX_KERNEL24
X /*
X * Check for an underrun condition.
X *
X * If there was no error and an underrun condition, then
X * then return the number of underrun bytes.
X */
- if (scp->request_bufflen != 0 && scsiqp->data_cnt != 0 &&
- le32_to_cpu(scsiqp->data_cnt) <= scp->request_bufflen) {
+ resid_cnt = le32_to_cpu(scsiqp->data_cnt);
+ if (scp->request_bufflen != 0 && resid_cnt != 0 &&
+ resid_cnt <= scp->request_bufflen) {
X ASC_DBG1(1, "adv_isr_callback: underrun condition %lu bytes\n",
- (ulong) le32_to_cpu(scsiqp->data_cnt));
- scp->resid = le32_to_cpu(scsiqp->data_cnt);
+ (ulong) resid_cnt);
+ scp->resid = resid_cnt;
X }
-#endif /* version >= v2.3.19 */
+#endif
X break;
X
X case QD_WITH_ERROR:
@@ -8594,7 +7393,7 @@
X
X default:
X /* Some other QHSTA error occurred. */
- ASC_DBG1(1, "adv_isr_callback: host_status %x\n",
+ ASC_DBG1(1, "adv_isr_callback: host_status 0x%x\n",
X scsiqp->host_status);
X scp->result = HOST_BYTE(DID_BAD_TARGET);
X break;
@@ -8607,7 +7406,7 @@
X break;
X
X default:
- ASC_DBG1(1, "adv_isr_callback: done_status %x\n", scsiqp->done_status);
+ ASC_DBG1(1, "adv_isr_callback: done_status 0x%x\n", scsiqp->done_status);
X scp->result = HOST_BYTE(DID_ERROR) | STATUS_BYTE(scsiqp->scsi_status);
X break;
X }
@@ -8623,7 +7422,7 @@
X boardp->init_tidmask |= ADV_TID_TO_TIDMASK(scp->target);
X }
X
- /*
+ /*
X * Because interrupts may be enabled by the 'Scsi_Cmnd' done
X * function, add the command to the end of the board's done queue.
X * The done function for the command will be called from
@@ -8663,445 +7462,36 @@
X adv_async_callback(ADV_DVC_VAR *adv_dvc_varp, uchar code)
X {
X switch (code)
- {
- case ADV_ASYNC_SCSI_BUS_RESET_DET:
- /*
- * The firmware detected a SCSI Bus reset.
- */
- ASC_DBG(0, "adv_async_callback: ADV_ASYNC_SCSI_BUS_RESET_DET\n");
- break;
-
- case ADV_ASYNC_RDMA_FAILURE:
- /*
- * Handle RDMA failure by resetting the SCSI Bus and
- * possibly the chip if it is unresponsive. Log the error
- * with a unique code.
- */
- ASC_DBG(0, "adv_async_callback: ADV_ASYNC_RDMA_FAILURE\n");
- AdvResetChipAndSB(adv_dvc_varp);
- break;
-
- case ADV_HOST_SCSI_BUS_RESET:
- /*
- * Host generated SCSI bus reset occurred.
- */
- ASC_DBG(0, "adv_async_callback: ADV_HOST_SCSI_BUS_RESET\n");
- break;
-
- default:
- ASC_DBG1(0, "DvcAsyncCallBack: unknown code 0x%x\n", code);
- break;
- }
-}


-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI

-/*
- * Search for an AdvanSys PCI device in the PCI configuration space.
- */
-ASC_INITFUNC(
-STATIC int,
-asc_srch_pci_dev(PCI_DEVICE *pciDevice)
-)
-{
- int ret = PCI_DEVICE_NOT_FOUND;
-
- ASC_DBG(2, "asc_srch_pci_dev: begin\n");
-
- if (pci_scan_method == -1) {
- pci_scan_method = asc_scan_method();
- }
- pciDevice->type = pci_scan_method;
- ASC_DBG1(2, "asc_srch_pci_dev: type %d\n", pciDevice->type);
-
- ret = asc_pci_find_dev(pciDevice);
- ASC_DBG1(2, "asc_srch_pci_dev: asc_pci_find_dev() return %d\n", ret);
- if (ret == PCI_DEVICE_FOUND) {
- pciDevice->slotNumber = pciDevice->slotFound + 1;
- pciDevice->startSlot = pciDevice->slotFound + 1;
- } else {
- if (pciDevice->bridge > pciDevice->busNumber) {
- ASC_DBG2(2, "asc_srch_pci_dev: bridge %x, busNumber %x\n",
- pciDevice->bridge, pciDevice->busNumber);
- pciDevice->busNumber++;
- pciDevice->slotNumber = 0;
- pciDevice->startSlot = 0;
- pciDevice->endSlot = 0x0f;
- ret = asc_srch_pci_dev(pciDevice);
- ASC_DBG1(2, "asc_srch_pci_dev: recursive call return %d\n", ret);
- }
- }
-
- ASC_DBG1(2, "asc_srch_pci_dev: return %d\n", ret);
- return ret;
-}
-
-/*
- * Determine the access method to be used for 'pciDevice'.
- */
-ASC_INITFUNC(
-STATIC uchar,
-asc_scan_method(void)
-)
-{
- ushort data;
- PCI_DATA pciData;
- uchar type;
- uchar slot;
-
- ASC_DBG(2, "asc_scan_method: begin\n");
- memset(&pciData, 0, sizeof(pciData));
- for (type = 1; type < 3; type++) {
- pciData.type = type;
- for (slot = 0; slot < PCI_MAX_SLOT; slot++) {
- pciData.slot = slot;
- data = asc_get_cfg_word(&pciData);
- if ((data != 0xFFFF) && (data != 0x0000)) {
- ASC_DBG2(4, "asc_scan_method: data %x, type %d\n", data, type);
- return (type);
- }
- }
- }
- ASC_DBG1(4, "asc_scan_method: type %d\n", type);
- return (type);
-}
-
-/*
- * Check for an AdvanSys PCI device in 'pciDevice'.
- *
- * Return PCI_DEVICE_FOUND if found, otherwise return PCI_DEVICE_NOT_FOUND.
- */
-ASC_INITFUNC(
-STATIC int,
-asc_pci_find_dev(PCI_DEVICE *pciDevice)
-)
-{
- PCI_DATA pciData;
- ushort vendorid, deviceid;
- uchar classcode, subclass;
- uchar lslot;
-
- ASC_DBG(3, "asc_pci_find_dev: begin\n");
- pciData.type = pciDevice->type;
- pciData.bus = pciDevice->busNumber;
- pciData.func = pciDevice->devFunc;
- lslot = pciDevice->startSlot;
- for (; lslot < pciDevice->endSlot; lslot++) {
- pciData.slot = lslot;
- pciData.offset = VENDORID_OFFSET;
- vendorid = asc_get_cfg_word(&pciData);
- ASC_DBG1(3, "asc_pci_find_dev: vendorid %x\n", vendorid);
- if (vendorid != 0xffff) {
- pciData.offset = DEVICEID_OFFSET;
- deviceid = asc_get_cfg_word(&pciData);
- ASC_DBG1(3, "asc_pci_find_dev: deviceid %x\n", deviceid);
- if ((vendorid == ASC_PCI_VENDORID) &&
- ((deviceid == ASC_PCI_DEVICE_ID_1100) ||
- (deviceid == ASC_PCI_DEVICE_ID_1200) ||
- (deviceid == ASC_PCI_DEVICE_ID_1300) ||
- (deviceid == ASC_PCI_DEVICE_ID_2300) ||
- (deviceid == ASC_PCI_DEVICE_ID_2500))) {
- pciDevice->slotFound = lslot;
- ASC_DBG(3, "asc_pci_find_dev: PCI_DEVICE_FOUND\n");
- return PCI_DEVICE_FOUND;
- } else {
- pciData.offset = SUBCLASS_OFFSET;
- subclass = asc_get_cfg_byte(&pciData);
- pciData.offset = CLASSCODE_OFFSET;
- classcode = asc_get_cfg_byte(&pciData);
- if ((classcode & PCI_BASE_CLASS_BRIDGE_DEVICE) &&
- (subclass & PCI_SUB_CLASS_PCI_TO_PCI_BRIDGE_CONTROLLER)) {
- pciDevice->bridge++;
- }
- ASC_DBG2(3, "asc_pci_find_dev: subclass %x, classcode %x\n",
- subclass, classcode);
- }
- }
- }
- return PCI_DEVICE_NOT_FOUND;
-}
-
-/*
- * Read PCI configuration data into 'pciConfig'.
- */
-ASC_INITFUNC(
-STATIC void,
-asc_get_pci_cfg(PCI_DEVICE *pciDevice, PCI_CONFIG_SPACE *pciConfig)
-)
-{
- PCI_DATA pciData;
- uchar counter;
- uchar *localConfig;
-
- ASC_DBG1(4, "asc_get_pci_cfg: slotFound %d\n ",
- pciDevice->slotFound);
-
- pciData.type = pciDevice->type;
- pciData.bus = pciDevice->busNumber;
- pciData.slot = pciDevice->slotFound;
- pciData.func = pciDevice->devFunc;
- localConfig = (uchar *) pciConfig;
-
- for (counter = 0; counter < sizeof(PCI_CONFIG_SPACE); counter++) {
- pciData.offset = counter;
- *localConfig = asc_get_cfg_byte(&pciData);
- ASC_DBG1(4, "asc_get_pci_cfg: byte %x\n", *localConfig);
- localConfig++;
- }
- ASC_DBG1(4, "asc_get_pci_cfg: counter %d\n", counter);
-}
-
-/*
- * Read a word (16 bits) from the PCI configuration space.
- *
- * The configuration mechanism is checked for the correct access method.
- */
-ASC_INITFUNC(
-STATIC ushort,
-asc_get_cfg_word(PCI_DATA *pciData)
-)
-{
- ushort tmp;
- ADV_DCNT address;
- ADV_DCNT lbus = pciData->bus;
- ADV_DCNT lslot = pciData->slot;
- ADV_DCNT lfunc = pciData->func;
- uchar t2CFA, t2CF8;
- ADV_DCNT t1CF8, t1CFC;
-
- ASC_DBG4(4, "asc_get_cfg_word: type %d, bus %u, slot %u, func %u\n",
- pciData->type, (unsigned) lbus, (unsigned) lslot, (unsigned) lfunc);
-
- /*
- * Check type of configuration mechanism.
- */
- if (pciData->type == 2) {
- /*
- * Save registers to be restored later.
- */
- t2CFA = inp(0xCFA); /* save PCI bus register */
- t2CF8 = inp(0xCF8); /* save config space enable register */
-
- /*
- * Write the bus and enable registers.
- */
- /* set for type 1 cycle, if needed */
- outp(0xCFA, pciData->bus);
- /* set the function number */
- outp(0xCF8, 0x10 | (pciData->func << 1));
-
- /*
- * Read the configuration space type 2 locations.
- */
- tmp = (ushort) inpw(0xC000 | ((pciData->slot << 8) + pciData->offset));
-
- outp(0xCFA, t2CFA); /* save PCI bus register */
- outp(0xCF8, t2CF8); /* save config space enable register */
- } else {
- /*
- * Type 1 or 3 configuration mechanism.
- *
- * Save the CONFIG_ADDRESS and CONFIG_DATA register values.
- */
- t1CF8 = inpl(0xCF8);
- t1CFC = inpl(0xCFC);
-
- /*
- * enable <31>, bus = <23:16>, slot = <15:11>,
- * func = <10:8>, reg = <7:2>
- */
- address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) |
- (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L);
-
- /*
- * Write out the address to CONFIG_ADDRESS.
- */
- outpl(0xCF8, address);
-
- /*
- * Read in word from CONFIG_DATA.
- */
- tmp = (ushort) ((inpl(0xCFC) >>
- ((pciData->offset & 2) * 8)) & 0xFFFF);
-
- /*
- * Restore registers.
- */
- outpl(0xCF8, t1CF8);
- outpl(0xCFC, t1CFC);
- }
- ASC_DBG1(4, "asc_get_cfg_word: config data: %x\n", tmp);
- return tmp;
-}
-
-/*
- * Reads a byte from the PCI configuration space.
- *
- * The configuration mechanism is checked for the correct access method.
- */
-ASC_INITFUNC(
-STATIC uchar,
-asc_get_cfg_byte(PCI_DATA *pciData)
-)
-{
- uchar tmp;
- ADV_DCNT address;
- ADV_DCNT lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func;
- ADV_DCNT t2CFA, t2CF8;
- ADV_DCNT t1CF8, t1CFC;
-
- ASC_DBG1(4, "asc_get_cfg_byte: type: %d\n", pciData->type);
-
- /*
- * Check type of configuration mechanism.
- */
- if (pciData->type == 2) {
- /*
- * Save registers to be restored later.
- */
- t2CFA = inp(0xCFA); /* save PCI bus register */
- t2CF8 = inp(0xCF8); /* save config space enable register */
-
- /*
- * Write the bus and enable registers.
- */
- /* set for type 1 cycle, if needed */
- outp(0xCFA, pciData->bus);
- /* set the function number */
- outp(0xCF8, 0x10 | (pciData->func << 1));
-
- /*
- * Read configuration space type 2 locations.
- */
- tmp = inp(0xC000 | ((pciData->slot << 8) + pciData->offset));
-
- /*
- * Restore registers.
- */
- outp(0xCF8, t2CF8); /* restore the enable register */
- outp(0xCFA, t2CFA); /* restore PCI bus register */
- } else {
- /*
- * Type 1 or 3 configuration mechanism.
- *
- * Save CONFIG_ADDRESS and CONFIG_DATA register values.
- */
- t1CF8 = inpl(0xCF8);
- t1CFC = inpl(0xCFC);
-
- /*
- * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>,
- * reg = <7:2>
- */
- address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) |
- (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L);
-
- /*
- * Write out address to CONFIG_ADDRESS.
- */
- outpl(0xCF8, address);
-
- /*
- * Read in word from CONFIG_DATA.
- */
- tmp = (uchar) ((inpl(0xCFC) >> ((pciData->offset & 3) * 8)) & 0xFF);
-
- /*
- * Restore registers.
- */
- outpl(0xCF8, t1CF8);
- outpl(0xCFC, t1CFC);
- }
- ASC_DBG1(4, "asc_get_cfg_byte: config data: %x\n", tmp);
- return tmp;
-}
-
-/*
- * Write a byte to the PCI configuration space.
- */
-ASC_INITFUNC(
-STATIC void,
-asc_put_cfg_byte(PCI_DATA *pciData, uchar byte_data)
-)
-{
- ADV_DCNT tmpl;
- ADV_DCNT address;
- ADV_DCNT lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func;
- uchar t2CFA, t2CF8;
- ADV_DCNT t1CF8, t1CFC;
-
- ASC_DBG2(4, "asc_put_cfg_byte: type: %d, byte_data %x\n",
- pciData->type, byte_data);
-
- /*
- * Check type of configuration mechanism.
- */
- if (pciData->type == 2) {
-
- /*
- * Save registers to be restored later.
- */
- t2CFA = inp(0xCFA); /* save PCI bus register */
- t2CF8 = inp(0xCF8); /* save config space enable register */
-
- /*
- * Write bus and enable registers.
- */
- outp(0xCFA, pciData->bus);
-
- /*
- * Set the function number.
- */
- outp(0xCF8, 0x10 | (pciData->func << 1));
-
- /*
- * Write the configuration space type 2 locations.
- */
- outp(0xC000 | ((pciData->slot << 8) + pciData->offset), byte_data);
-
- /*
- * Restore registers.
- */
- outp(0xCF8, t2CF8); /* restore the enable register */
- outp(0xCFA, t2CFA); /* restore PCI bus register */
- } else {
-
- /*
- * Type 1 or 3 configuration mechanism.
- *
- * Save the CONFIG_ADDRESS and CONFIG_DATA register values.
- */
- t1CF8 = inpl(0xCF8);
- t1CFC = inpl(0xCFC);
-
- /*
- * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>,
- * reg = <7:2>
- */
- address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) | (lfunc << 8) |
- (pciData->offset & 0xFC) | 0x80000000L);
+ {
+ case ADV_ASYNC_SCSI_BUS_RESET_DET:
X /*
- * Write out address to CONFIG_ADDRESS.
+ * The firmware detected a SCSI Bus reset.
X */
- outpl(0xCF8, address);
+ ASC_DBG(0, "adv_async_callback: ADV_ASYNC_SCSI_BUS_RESET_DET\n");
+ break;
X
+ case ADV_ASYNC_RDMA_FAILURE:
X /*
- * Write double word to CONFIG_DATA preserving the bytes
- * in the double not written.
+ * Handle RDMA failure by resetting the SCSI Bus and
+ * possibly the chip if it is unresponsive. Log the error
+ * with a unique code.
X */
- tmpl = inpl(0xCFC) & ~(0xFF << ((pciData->offset & 3) * 8));
- outpl(0xCFC, tmpl | (byte_data << ((pciData->offset & 3) * 8)));
+ ASC_DBG(0, "adv_async_callback: ADV_ASYNC_RDMA_FAILURE\n");
+ AdvResetChipAndSB(adv_dvc_varp);
+ break;
X
+ case ADV_HOST_SCSI_BUS_RESET:
X /*
- * Restore registers.
+ * Host generated SCSI bus reset occurred.
X */
- outpl(0xCF8, t1CF8);
- outpl(0xCFC, t1CFC);
+ ASC_DBG(0, "adv_async_callback: ADV_HOST_SCSI_BUS_RESET\n");
+ break;
+
+ default:
+ ASC_DBG1(0, "DvcAsyncCallBack: unknown code 0x%x\n", code);
+ break;
X }
- ASC_DBG(4, "asc_put_cfg_byte: end\n");
X }
-#endif /* ASC_CONFIG_PCI */
-#endif /* version < v2.1.93 */
X
X /*
X * Add a 'REQP' to the end of specified queue. Set 'tidmask'
@@ -9116,9 +7506,8 @@
X {
X int tid;
X
- ASC_DBG3(3, "asc_enqueue: ascq %lx, reqp %lx, flag %d\n",
+ ASC_DBG3(3, "asc_enqueue: ascq 0x%lx, reqp 0x%lx, flag %d\n",
X (ulong) ascq, (ulong) reqp, flag);
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
X ASC_ASSERT(reqp != NULL);
X ASC_ASSERT(flag == ASC_FRONT || flag == ASC_BACK);
X tid = REQPTID(reqp);
@@ -9154,7 +7543,7 @@
X }
X REQPTIME(reqp) = REQTIMESTAMP();


X #endif /* ADVANSYS_STATS */

- ASC_DBG1(3, "asc_enqueue: reqp %lx\n", (ulong) reqp);
+ ASC_DBG1(3, "asc_enqueue: reqp 0x%lx\n", (ulong) reqp);
X return;
X }
X
@@ -9170,8 +7559,7 @@
X {
X REQP reqp;
X
- ASC_DBG2(3, "asc_dequeue: ascq %lx, tid %d\n", (ulong) ascq, tid);
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
+ ASC_DBG2(3, "asc_dequeue: ascq 0x%lx, tid %d\n", (ulong) ascq, tid);
X ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
X if ((reqp = ascq->q_first[tid]) != NULL) {
X ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid));
@@ -9189,7 +7577,7 @@
X REQTIMESTAT("asc_dequeue", ascq, reqp, tid);


X #endif /* ADVANSYS_STATS */
X }

- ASC_DBG1(3, "asc_dequeue: reqp %lx\n", (ulong) reqp);
+ ASC_DBG1(3, "asc_dequeue: reqp 0x%lx\n", (ulong) reqp);
X return reqp;
X }
X
@@ -9197,7 +7585,7 @@
X * Return a pointer to a singly linked list of all the requests queued
X * for 'tid' on the 'asc_queue_t' pointed to by 'ascq'.
X *
- * If 'lastpp' is not NULL, '*lastpp' will be set to point to the
+ * If 'lastpp' is not NULL, '*lastpp' will be set to point to the
X * the last request returned in the singly linked list.
X *
X * 'tid' should either be a valid target id or if it is ASC_TID_ALL,
@@ -9219,8 +7607,7 @@
X REQP firstp, lastp;
X int i;
X
- ASC_DBG2(3, "asc_dequeue_list: ascq %lx, tid %d\n", (ulong) ascq, tid);
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
+ ASC_DBG2(3, "asc_dequeue_list: ascq 0x%lx, tid %d\n", (ulong) ascq, tid);
X ASC_ASSERT((tid == ASC_TID_ALL) || (tid >= 0 && tid <= ADV_MAX_TID));
X
X /*
@@ -9280,7 +7667,7 @@
X if (lastpp) {
X *lastpp = lastp;
X }
- ASC_DBG1(3, "asc_dequeue_list: firstp %lx\n", (ulong) firstp);
+ ASC_DBG1(3, "asc_dequeue_list: firstp 0x%lx\n", (ulong) firstp);
X return firstp;
X }
X
@@ -9301,9 +7688,8 @@
X int tid;
X int ret = ASC_FALSE;
X
- ASC_DBG2(3, "asc_rmqueue: ascq %lx, reqp %lx\n",
+ ASC_DBG2(3, "asc_rmqueue: ascq 0x%lx, reqp 0x%lx\n",
X (ulong) ascq, (ulong) reqp);
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
X ASC_ASSERT(reqp != NULL);
X
X tid = REQPTID(reqp);
@@ -9354,41 +7740,9 @@
X }
X ASC_ASSERT(ascq->q_cur_cnt[tid] >= 0);


X #endif /* ADVANSYS_STATS */

- ASC_DBG2(3, "asc_rmqueue: reqp %lx, ret %d\n", (ulong) reqp, ret);
- return ret;


-}
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
-/*

- * If the specified 'REQP' is queued on the specified queue for
- * the specified target device, return ASC_TRUE.
- */
-STATIC int
-asc_isqueued(asc_queue_t *ascq, REQP reqp)
-{
- REQP treqp;
- int tid;
- int ret = ASC_FALSE;
-
- ASC_DBG2(3, "asc_isqueued: ascq %lx, reqp %lx\n",
- (ulong) ascq, (ulong) reqp);
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
- ASC_ASSERT(reqp != NULL);
-
- tid = REQPTID(reqp);
- ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
-
- for (treqp = ascq->q_first[tid]; treqp; treqp = REQPNEXT(treqp)) {
- ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid));
- if (treqp == reqp) {
- ret = ASC_TRUE;
- break;
- }
- }
- ASC_DBG1(3, "asc_isqueued: ret %x\n", ret);
+ ASC_DBG2(3, "asc_rmqueue: reqp 0x%lx, ret %d\n", (ulong) reqp, ret);
X return ret;
X }
-#endif /* version < v2.3.28 */
X
X /*
X * Execute as many queued requests as possible for the specified queue.
@@ -9402,8 +7756,7 @@
X REQP reqp;
X int i;
X
- ASC_DBG1(1, "asc_execute_queue: ascq %lx\n", (ulong) ascq);
- ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
+ ASC_DBG1(1, "asc_execute_queue: ascq 0x%lx\n", (ulong) ascq);
X /*
X * Execute queued commands for devices attached to
X * the current board in round-robin fashion.
@@ -9417,7 +7770,10 @@
X } else if (asc_execute_scsi_cmnd((Scsi_Cmnd *) reqp)
X == ASC_BUSY) {
X scan_tidmask &= ~ADV_TID_TO_TIDMASK(i);
- /* Put the request back at front of the list. */
+ /*
+ * The request returned ASC_BUSY. Enqueue at the front of
+ * target's waiting list to maintain correct ordering.
+ */
X asc_enqueue(ascq, reqp, ASC_FRONT);
X }
X }
@@ -9426,7 +7782,6 @@
X return;
X }
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
X #ifdef CONFIG_PROC_FS
X /*
X * asc_prt_board_devices()
@@ -9507,7 +7862,7 @@
X "BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n");
X ASC_PRT_NEXT();


X len = asc_prt_line(cp, leftlen,

-"can be found at the AdvanSys FTP site: ftp://ftp.advansys.com/pub\n");
+"can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n");
X ASC_PRT_NEXT();
X } else {
X major = (boardp->bios_version >> 12) & 0xF;
@@ -9526,10 +7881,10 @@
X if (major < 3 || (major <= 3 && minor < 1) ||
X (major <= 3 && minor <= 1 && letter < ('I'- 'A'))) {


X len = asc_prt_line(cp, leftlen,

-"Newer version of ROM BIOS is available at the AdvanSys FTP site:\n");
+"Newer version of ROM BIOS is available at the ConnectCom FTP site:\n");
X ASC_PRT_NEXT();


X len = asc_prt_line(cp, leftlen,

-"ftp://ftp.advansys.com/pub\n");
+"ftp://ftp.connectcom.net/pub\n");
X ASC_PRT_NEXT();
X }
X }
@@ -9695,7 +8050,7 @@


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-" cntl %x, no_scam %x\n",
+" cntl 0x%x, no_scam 0x%x\n",
X ep->cntl, ep->no_scam);
X ASC_PRT_NEXT();
X
@@ -9885,19 +8240,19 @@
X if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)


X {
X len = asc_prt_line(cp, leftlen,

-" termination: %u (%s), bios_ctrl: %x\n",
+" termination: %u (%s), bios_ctrl: 0x%x\n",
X ep_3550->termination, termstr, ep_3550->bios_ctrl);
X ASC_PRT_NEXT();
X } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)


X {
X len = asc_prt_line(cp, leftlen,

-" termination: %u (%s), bios_ctrl: %x\n",
+" termination: %u (%s), bios_ctrl: 0x%x\n",
X ep_38C0800->termination_lvd, termstr, ep_38C0800->bios_ctrl);
X ASC_PRT_NEXT();
X } else


X {
X len = asc_prt_line(cp, leftlen,

-" termination: %u (%s), bios_ctrl: %x\n",
+" termination: %u (%s), bios_ctrl: 0x%x\n",
X ep_38C1600->termination_lvd, termstr, ep_38C1600->bios_ctrl);
X ASC_PRT_NEXT();
X }
@@ -10089,9 +8444,7 @@
X int totlen;
X int len;
X int chip_scsi_id;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
X int i;


-#endif /* version >= v1.3.89 */
X

X boardp = ASC_BOARDP(shp);
X
@@ -10104,39 +8457,31 @@


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
-" host_busy %u, last_reset %u, max_id %u, max_lun %u\n",
- shp->host_busy, shp->last_reset, shp->max_id, shp->max_lun);


-#else /* version >= v1.3.89 */

X " host_busy %u, last_reset %u, max_id %u, max_lun %u, max_channel %u\n",
X shp->host_busy, shp->last_reset, shp->max_id, shp->max_lun,
X shp->max_channel);


-#endif /* version >= v1.3.89 */

X ASC_PRT_NEXT();
-

+
X len = asc_prt_line(cp, leftlen,

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,57)
-" can_queue %d, this_id %d, sg_tablesize %u, cmd_per_lun %u\n",
- shp->can_queue, shp->this_id, shp->sg_tablesize, shp->cmd_per_lun);
-#else /* version >= v1.3.57 */
X " unique_id %d, can_queue %d, this_id %d, sg_tablesize %u, cmd_per_lun %u\n",
X shp->unique_id, shp->can_queue, shp->this_id, shp->sg_tablesize,
X shp->cmd_per_lun);
-#endif /* version >= v1.3.57 */


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,57)
-" unchecked_isa_dma %d, loaded_as_module %d\n",
- shp->unchecked_isa_dma, shp->loaded_as_module);
-#else /* version >= v1.3.57 */
X " unchecked_isa_dma %d, use_clustering %d, loaded_as_module %d\n",
X shp->unchecked_isa_dma, shp->use_clustering, shp->loaded_as_module);
-#endif /* version >= v1.3.57 */
X ASC_PRT_NEXT();
X
- len = asc_prt_line(cp, leftlen, " flags %x, last_reset %x, jiffies %x\n",
- boardp->flags, boardp->last_reset, jiffies);


+ len = asc_prt_line(cp, leftlen,

+" flags 0x%x, last_reset 0x%x, jiffies 0x%x, asc_n_io_port 0x%x\n",
+ boardp->flags, boardp->last_reset, jiffies, boardp->asc_n_io_port);
+ ASC_PRT_NEXT();
+
+ /* 'shp->n_io_port' may be truncated because it is only one byte. */


+ len = asc_prt_line(cp, leftlen,

+" io_port 0x%x, n_io_port 0x%x\n",
+ shp->io_port, shp->n_io_port);
X ASC_PRT_NEXT();
X
X if (ASC_NARROW_BOARD(boardp)) {
@@ -10145,7 +8490,6 @@
X chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id;


X }
X
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)

X if (boardp->flags & ASC_SELECT_QUEUE_DEPTHS) {
X len = asc_prt_line(cp, leftlen, " queue_depth:");
X ASC_PRT_NEXT();
@@ -10164,7 +8508,6 @@
X len = asc_prt_line(cp, leftlen, "\n");
X ASC_PRT_NEXT();
X }
-#endif /* version >= v1.3.89 */
X
X return totlen;
X }
@@ -10207,12 +8550,12 @@


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-" chip_version %u, lib_version %x, lib_serial_no %u, mcode_date %x\n",
+" chip_version %u, lib_version 0x%x, lib_serial_no %u, mcode_date 0x%x\n",
X c->chip_version, c->lib_version, c->lib_serial_no, c->mcode_date);


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-" mcode_version %x, err_code %u\n",
+" mcode_version 0x%x, err_code %u\n",
X c->mcode_version, v->err_code);
X ASC_PRT_NEXT();
X
@@ -10400,14 +8743,14 @@


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-" iop_base %lx, cable_detect: %X, err_code %u\n",
+" iop_base 0x%lx, cable_detect: %X, err_code %u\n",
X v->iop_base,
X AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1) & CABLE_DETECT,
X v->err_code);


X ASC_PRT_NEXT();
X
X len = asc_prt_line(cp, leftlen,

-" chip_version %u, lib_version %x, mcode_date %x, mcode_version %x\n",
+" chip_version %u, lib_version 0x%x, mcode_date 0x%x, mcode_version 0x%x\n",
X c->chip_version, c->lib_version, c->mcode_date, c->mcode_version);
X ASC_PRT_NEXT();
X
@@ -10599,7 +8942,7 @@
X }
X
X /*
- * asc_proc_copy()
+ * asc_proc_copy()
X *
X * Copy proc information to a read buffer taking into account the current
X * read offset in the file and the remaining space in the read buffer.
@@ -10609,13 +8952,13 @@
X char *cp, int cplen)
X {
X int cnt = 0;
-
+
X ASC_DBG3(2, "asc_proc_copy: offset %d, advoffset %d, cplen %d\n",
X (unsigned) offset, (unsigned) advoffset, cplen);
X if (offset <= advoffset) {
X /* Read offset below current offset, copy everything. */
X cnt = ASC_MIN(cplen, leftlen);
- ASC_DBG3(2, "asc_proc_copy: curbuf %lx, cp %lx, cnt %d\n",
+ ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n",
X (ulong) curbuf, (ulong) cp, cnt);
X memcpy(curbuf, cp, cnt);
X } else if (offset < advoffset + cplen) {
@@ -10623,7 +8966,7 @@
X cnt = (advoffset + cplen) - offset;
X cp = (cp + cplen) - cnt;
X cnt = ASC_MIN(cnt, leftlen);
- ASC_DBG3(2, "asc_proc_copy: curbuf %lx, cp %lx, cnt %d\n",
+ ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n",
X (ulong) curbuf, (ulong) cp, cnt);
X memcpy(curbuf, cp, cnt);
X }
@@ -10662,7 +9005,6 @@
X return ret;
X }
X #endif /* CONFIG_PROC_FS */


-#endif /* version >= v1.3.0 */
X
X

X /*
@@ -10678,56 +9020,33 @@
X STATIC void
X DvcSleepMilliSecond(ADV_DCNT n)
X {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
- ADV_DCNT i;


-#endif /* version < v2.1.0 */
-

X ASC_DBG1(4, "DvcSleepMilliSecond: %lu\n", (ulong) n);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0)
X mdelay(n);


-#else /* version < v2.1.0 */

- for (i = 0; i < n; i++) {
- udelay(1000);
- }


-#endif /* version < v2.1.0 */

X }
X
-STATIC int
+/*
+ * Currently and inline noop but leave as a placeholder.
+ * Leave DvcEnterCritical() as a noop placeholder.
+ */
+STATIC inline ulong
X DvcEnterCritical(void)
X {
- int flags;
-
- save_flags(flags);
- cli();
- return flags;


+ return 0;
X }
X

-STATIC void
-DvcLeaveCritical(int flags)
+/*
+ * Critical sections are all protected by the board spinlock.
+ * Leave DvcLeaveCritical() as a noop placeholder.
+ */
+STATIC inline void
+DvcLeaveCritical(ulong flags)
X {
- restore_flags(flags);
-}
-
-STATIC ADV_DCNT
-DvcGetSGList(ASC_DVC_VAR *asc_dvc_sg, uchar *buf_addr, ADV_DCNT buf_len,
- ASC_SG_HEAD *asc_sg_head_ptr)
-{
- ADV_DCNT buf_size;
-
- buf_size = buf_len;
- asc_sg_head_ptr->entry_cnt = 1;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- asc_sg_head_ptr->sg_list[0].addr = (ADV_PADDR) buf_addr;
-#else /* version >= v2.0.0 */
- asc_sg_head_ptr->sg_list[0].addr = virt_to_bus(buf_addr);
-#endif /* version >= v2.0.0 */
- asc_sg_head_ptr->sg_list[0].bytes = buf_size;
- return buf_size;
+ return;
X }
X
X /*
X * void
- * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, ushort *outbuf, int words)
+ * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words)
X *
X * Calling/Exit State:
X * none
@@ -10736,23 +9055,24 @@
X * Output an ASC_SCSI_Q structure to the chip


X */
X STATIC void

-DvcPutScsiQ(PortAddr iop_base, ushort s_addr, ushort *outbuf, int words)
+DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words)
X {
X int i;
X
- ASC_DBG_PRT_HEX(2, "DvcPutScsiQ", (uchar *) outbuf, 2 * words);
+ ASC_DBG_PRT_HEX(2, "DvcPutScsiQ", outbuf, 2 * words);
X AscSetChipLramAddr(iop_base, s_addr);
- for (i = 0; i < words; i++, outbuf++) {
- if (i == 2 || i == 10) {


+ for (i = 0; i < 2 * words; i += 2) {

+ if (i == 4 || i == 20) {
X continue;
X }
- AscSetChipLramDataNoSwap(iop_base, *outbuf);
+ outpw(iop_base + IOP_RAM_DATA,
+ ((ushort) outbuf[i + 1] << 8) | outbuf[i]);
X }
X }
X
X /*
X * void
- * DvcGetQinfo(PortAddr iop_base, ushort s_addr, ushort *inbuf, int words)
+ * DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words)
X *
X * Calling/Exit State:
X * none
@@ -10761,79 +9081,21 @@
X * Input an ASC_QDONE_INFO structure from the chip


X */
X STATIC void

-DvcGetQinfo(PortAddr iop_base, ushort s_addr, ushort *inbuf, int words)
+DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words)
X {
X int i;
+ ushort word;
X
X AscSetChipLramAddr(iop_base, s_addr);
- for (i = 0; i < words; i++, inbuf++) {
- if (i == 5) {


+ for (i = 0; i < 2 * words; i += 2) {

+ if (i == 10) {
X continue;
X }
- *inbuf = AscGetChipLramDataNoSwap(iop_base);
- }
- ASC_DBG_PRT_HEX(2, "DvcGetQinfo", (uchar *) inbuf, 2 * words);
-}
-
-/*
- * void DvcOutPortWords(ushort iop_base, ushort &outbuf, int words)
- *
- * Calling/Exit State:
- * none
- *
- * Description:
- * output a buffer to an i/o port address
- */
-STATIC void
-DvcOutPortWords(ushort iop_base, ushort *outbuf, int words)
-{
- int i;
-
- for (i = 0; i < words; i++, outbuf++)
- outpw(iop_base, *outbuf);
-}
-
-/*
- * void DvcInPortWords(ushort iop_base, ushort &outbuf, int words)
- *
- * Calling/Exit State:
- * none
- *
- * Description:
- * input a buffer from an i/o port address
- */
-STATIC void
-DvcInPortWords(ushort iop_base, ushort *inbuf, int words)
-{
- int i;
-
- for (i = 0; i < words; i++, inbuf++)
- *inbuf = inpw(iop_base);
-}
-
-/*
- * void DvcOutPortDWords(PortAddr port, ADV_DCNT *pdw, int dwords)
- *
- * Calling/Exit State:
- * none
- *
- * Description:
- * output a buffer of 32-bit integers to an i/o port address in
- * 16 bit integer units
- */
-STATIC void
-DvcOutPortDWords(PortAddr port, ADV_DCNT *pdw, int dwords)
-{
- int i;
- int words;
- ushort *pw;
-
- pw = (ushort *) pdw;
- words = dwords << 1;
- for(i = 0; i < words; i++, pw++) {
- outpw(port, *pw);
+ word = inpw(iop_base + IOP_RAM_DATA);
+ inbuf[i] = word & 0xff;
+ inbuf[i + 1] = (word >> 8) & 0xff;
X }
- return;
+ ASC_DBG_PRT_HEX(2, "DvcGetQinfo", inbuf, 2 * words);
X }
X
X /*
@@ -10842,24 +9104,10 @@
X ASC_INITFUNC(
X STATIC uchar,
X DvcReadPCIConfigByte(
- ASC_DVC_VAR *asc_dvc,
+ ASC_DVC_VAR *asc_dvc,
X ushort offset)
X )


X {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI

- PCI_DATA pciData;
-
- pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
- pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
- pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
- pciData.offset = offset;
- pciData.type = pci_scan_method;
- return asc_get_cfg_byte(&pciData);
-#else /* ASC_CONFIG_PCI */
- return 0;


-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI

X uchar byte_data;
X pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
@@ -10867,10 +9115,9 @@
X ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
X offset, &byte_data);
X return byte_data;
-#else /* CONFIG_PCI */
+#else /* !defined(CONFIG_PCI) */
X return 0;
-#endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */
+#endif /* !defined(CONFIG_PCI) */
X }
X
X /*
@@ -10879,30 +9126,17 @@
X ASC_INITFUNC(
X STATIC void,
X DvcWritePCIConfigByte(
- ASC_DVC_VAR *asc_dvc,
- ushort offset,
+ ASC_DVC_VAR *asc_dvc,
+ ushort offset,
X uchar byte_data)
X )


X {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI

- PCI_DATA pciData;
-
- pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
- pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
- pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
- pciData.offset = offset;
- pciData.type = pci_scan_method;
- asc_put_cfg_byte(&pciData, byte_data);


-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI

X pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
X PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),


X ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
X offset, byte_data);

X #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */
X }
X
X /*
@@ -10978,14 +9212,10 @@
X {
X ADV_PADDR paddr;
X
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
- paddr = (ADV_PADDR) vaddr;
-#else /* version >= v2.0.0 */
X paddr = virt_to_bus(vaddr);
-#endif /* version >= v2.0.0 */
X
X ASC_DBG4(4,
- "DvcGetPhyAddr: vaddr 0x%lx, lenp 0x%lx *lenp %lu, paddr 0x%lx\n",
+ "DvcGetPhyAddr: vaddr 0x%lx, lenp 0x%lx *lenp %lu, paddr 0x%lx\n",
X (ulong) vaddr, (ulong) lenp, (ulong) *((ulong *) lenp), (ulong) paddr);
X
X return paddr;
@@ -10997,24 +9227,10 @@
X ASC_INITFUNC(
X STATIC uchar,
X DvcAdvReadPCIConfigByte(
- ADV_DVC_VAR *asc_dvc,
+ ADV_DVC_VAR *asc_dvc,
X ushort offset)
X )


X {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI

- PCI_DATA pciData;
-
- pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
- pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
- pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
- pciData.offset = offset;
- pciData.type = pci_scan_method;
- return asc_get_cfg_byte(&pciData);
-#else /* ASC_CONFIG_PCI */
- return 0;


-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI

X uchar byte_data;
X pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
@@ -11025,7 +9241,6 @@
X #else /* CONFIG_PCI */
X return 0;
X #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */
X }
X
X /*
@@ -11034,30 +9249,19 @@
X ASC_INITFUNC(
X STATIC void,
X DvcAdvWritePCIConfigByte(
- ADV_DVC_VAR *asc_dvc,
- ushort offset,
+ ADV_DVC_VAR *asc_dvc,
+ ushort offset,
X uchar byte_data)
X )


X {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI

- PCI_DATA pciData;
-
- pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
- pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
- pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
- pciData.offset = offset;
- pciData.type = pci_scan_method;
- asc_put_cfg_byte(&pciData, byte_data);


-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */
X #ifdef CONFIG_PCI

X pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
X PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 47'
echo 'File patch-2.2.20 is continued in part 48'
echo "48" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:02 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part63

#!/bin/sh -x
# this is part 63 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 63; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 63'
echo 'File patch-2.2.20 is continued in part 64'
echo "64" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:08 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part69

#!/bin/sh -x
# this is part 69 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 69; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&
+

+ kfree (transfer_buffer);
+ return result;
+}
+
+
+/****************************************************************************
+ * rom_read
+ * reads a number of bytes from the Edgeport device starting at the given
+ * address.
+ * If successful returns the number of bytes read, otherwise it returns
+ * a negative error number of the problem.
+ ****************************************************************************/
+static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data)
+{
+ int result;
+ __u16 current_length;
+ unsigned char *transfer_buffer;
+
+ dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
+
+ transfer_buffer = kmalloc (64, GFP_KERNEL);
+ if (!transfer_buffer) {
+ err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
+ return -ENOMEM;
+ }
+
+ /* need to split these reads up into 64 byte chunks */
+ result = 0;
+ while (length > 0) {
+ if (length > 64) {
+ current_length = 64;
+ } else {
+ current_length = length;
+ }
+// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, current_length);
+ result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM,
+ 0xC0, addr, extAddr, transfer_buffer, current_length, 300);
+ if (result < 0)
+ break;
+ memcpy (data, transfer_buffer, current_length);
+ length -= current_length;
+ addr += current_length;
+ data += current_length;
+ }
+
+ kfree (transfer_buffer);
+ return result;
+}
+
+
+/****************************************************************************
+ * send_iosp_ext_cmd
+ * Is used to send a IOSP message to the Edgeport device
+ ****************************************************************************/
+static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u8 param)
+{
+ unsigned char *buffer;
+ unsigned char *currentCommand;
+ int length = 0;
+ int status = 0;
+
+ dbg(__FUNCTION__" - %d, %d", command, param);
+
+ buffer = kmalloc (10, GFP_KERNEL);
+ if (!buffer) {
+ err(__FUNCTION__" - kmalloc(%d) failed.\n", 10);
+ return -ENOMEM;
+ }
+
+ currentCommand = buffer;
+
+ MAKE_CMD_EXT_CMD( &currentCommand, &length, edge_port->port->number, command, param);
+
+ status = write_cmd_usb (edge_port, buffer, length);
+ if (status) {
+ /* something bad happened, let's free up the memory */
+ kfree(buffer);
+ }
+
+ return status;
+}
+
+
+/*****************************************************************************
+ * write_cmd_usb
+ * this function writes the given buffer out to the bulk write endpoint.
+ *****************************************************************************/
+static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer, int length)
+{
+ struct edgeport_serial *edge_serial = (struct edgeport_serial *)edge_port->port->serial->private;
+ int status = 0;
+ urb_t *urb;
+ int timeout;
+
+ usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
+
+ /* Allocate our next urb */
+ urb = usb_alloc_urb (0);
+
+ CmdUrbs++;
+
+ dbg(__FUNCTION__" - ALLOCATE URB %p (outstanding %d)", urb, CmdUrbs);
+
+ if (!urb) {
+ return -ENOMEM;
+ }
+
+ FILL_BULK_URB (urb, edge_serial->serial->dev,
+ usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
+ buffer, length, edge_bulk_out_cmd_callback, edge_port);
+
+ /* set the USB_BULK_QUEUE flag so that we can shove a bunch of urbs at once down the pipe */
+ urb->transfer_flags |= USB_QUEUE_BULK;
+
+ edge_port->commandPending = TRUE;
+ urb->dev = edge_serial->serial->dev;
+ status = usb_submit_urb(urb);
+
+ if (status) {
+ /* something went wrong */
+ dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
+
+ /* if this urb had a transfer buffer already (old transfer) free it */
+ if (urb->transfer_buffer != NULL) {
+ kfree(urb->transfer_buffer);
+ }
+ usb_unlink_urb (urb);
+ usb_free_urb (urb);
+ return status;
+ }
+
+ // wait for command to finish
+ timeout = COMMAND_TIMEOUT;
+#if 0
+ while (timeout && edge_port->commandPending == TRUE) {
+ timeout = interruptible_sleep_on_timeout (&edge_port->wait_command, timeout);
+ }
+
+ if (edge_port->commandPending == TRUE) {
+ /* command timed out */
+ dbg(__FUNCTION__" - command timed out");
+ status = -EINVAL;
+ }
+#endif
+ return status;
+}
+
+
+/*****************************************************************************
+ * send_cmd_write_baud_rate
+ * this function sends the proper command to change the baud rate of the
+ * specified port.
+ *****************************************************************************/
+static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate)
+{
+ unsigned char *cmdBuffer;
+ unsigned char *currCmd;
+ int cmdLen = 0;
+ int divisor;
+ int status;
+ unsigned char number = edge_port->port->number;
+
+ dbg(__FUNCTION__" - port = %d, baud = %d", number, baudRate);
+
+ status = calc_baud_rate_divisor (baudRate, &divisor);
+ if (status) {
+ err(__FUNCTION__" - bad baud rate");
+ return status;
+ }
+
+ // Alloc memory for the string of commands.
+ cmdBuffer = kmalloc (0x100, GFP_KERNEL);
+ if (!cmdBuffer) {
+ err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100);
+ return -ENOMEM;
+ }
+ currCmd = cmdBuffer;
+
+ // Enable access to divisor latch
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, LCR, LCR_DL_ENABLE );
+
+ // Write the divisor itself
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, DLL, LOW8 (divisor) );
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, DLM, HIGH8(divisor) );
+
+ // Restore original value to disable access to divisor latch
+ MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, LCR, edge_port->shadowLCR);
+
+ status = write_cmd_usb(edge_port, cmdBuffer, cmdLen );
+
+ return status;
+}
+
+
+/*****************************************************************************
+ * calc_baud_rate_divisor
+ * this function calculates the proper baud rate divisor for the specified
+ * baud rate.
+ *****************************************************************************/
+static int calc_baud_rate_divisor (int baudrate, int *divisor)
+{
+ int i;
+ __u16 custom;
+ __u16 round1;
+ __u16 round;
+
+
+ dbg(__FUNCTION__" - %d", baudrate);
+
+ for (i = 0; i < NUM_ENTRIES(DivisorTable); i++) {
+ if ( DivisorTable[i].BaudRate == baudrate ) {
+ *divisor = DivisorTable[i].Divisor;


+ return 0;
+ }
+ }
+

+ // We have tried all of the standard baud rates
+ // lets try to calculate the divisor for this baud rate
+ // Make sure the baud rate is reasonable
+ if (baudrate > 75 && baudrate < 230400) {
+ // get divisor
+ custom = (__u16)(230400L / baudrate);
+
+ // Check for round off
+ round1 = (__u16)(2304000L / baudrate);
+ round = (__u16)(round1 - (custom * 10));
+ if (round > 4) {
+ custom++;
+ }
+ *divisor = custom;
+
+ dbg(__FUNCTION__" - Baud %d = %d\n", baudrate, custom);


+ return 0;
+ }
+

+ return -1;
+}
+
+

+/*****************************************************************************
+ * send_cmd_write_uart_register
+ * this function builds up a uart register message and sends to to the device.
+ *****************************************************************************/
+static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue)
+{
+ unsigned char *cmdBuffer;
+ unsigned char *currCmd;
+ unsigned long cmdLen = 0;
+ int status;
+
+ dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", regValue);
+
+ // Alloc memory for the string of commands.
+ cmdBuffer = kmalloc (0x10, GFP_KERNEL);
+ if (cmdBuffer == NULL ) {
+ return -ENOMEM;
+ }
+
+ currCmd = cmdBuffer;
+
+ // Build a cmd in the buffer to write the given register
+ MAKE_CMD_WRITE_REG(&currCmd, &cmdLen, edge_port->port->number, regNum, regValue);
+
+ status = write_cmd_usb(edge_port, cmdBuffer, cmdLen);
+
+ return status;
+}
+
+
+/*****************************************************************************
+ * change_port_settings
+ * This routine is called to set the UART on the device to match the specified
+ * new settings.
+ *****************************************************************************/
+static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
+{
+ struct tty_struct *tty;
+ int baud;
+ unsigned cflag;
+ __u8 mask = 0xff;
+ __u8 lData;
+ __u8 lParity;
+ __u8 lStop;
+ __u8 rxFlow;
+ __u8 txFlow;
+ int status;
+
+ dbg(__FUNCTION__" - port %d", edge_port->port->number);
+
+ if ((!edge_port->open) &&
+ (!edge_port->openPending)) {
+ dbg(__FUNCTION__" - port not opened");
+ return;
+ }
+
+ tty = edge_port->port->tty;
+ if ((!tty) ||
+ (!tty->termios)) {
+ dbg(__FUNCTION__" - no tty structures");
+ return;
+ }
+
+ cflag = tty->termios->c_cflag;
+
+ switch (cflag & CSIZE) {
+ case CS5: lData = LCR_BITS_5; mask = 0x1f; dbg(__FUNCTION__" - data bits = 5"); break;
+ case CS6: lData = LCR_BITS_6; mask = 0x3f; dbg(__FUNCTION__" - data bits = 6"); break;
+ case CS7: lData = LCR_BITS_7; mask = 0x7f; dbg(__FUNCTION__" - data bits = 7"); break;
+ default:
+ case CS8: lData = LCR_BITS_8; dbg(__FUNCTION__" - data bits = 8"); break;
+ }
+
+ lParity = LCR_PAR_NONE;
+ if (cflag & PARENB) {
+ if (cflag & PARODD) {
+ lParity = LCR_PAR_ODD;
+ dbg(__FUNCTION__" - parity = odd");
+ } else {
+ lParity = LCR_PAR_EVEN;
+ dbg(__FUNCTION__" - parity = even");
+ }
+ } else {
+ dbg(__FUNCTION__" - parity = none");
+ }
+
+ if (cflag & CSTOPB) {
+ lStop = LCR_STOP_2;
+ dbg(__FUNCTION__" - stop bits = 2");
+ } else {
+ lStop = LCR_STOP_1;
+ dbg(__FUNCTION__" - stop bits = 1");
+ }
+
+ /* figure out the flow control settings */
+ rxFlow = txFlow = 0x00;
+ if (cflag & CRTSCTS) {
+ rxFlow |= IOSP_RX_FLOW_RTS;
+ txFlow |= IOSP_TX_FLOW_CTS;
+ dbg(__FUNCTION__" - RTS/CTS is enabled");
+ } else {
+ dbg(__FUNCTION__" - RTS/CTS is disabled");
+ }
+
+ /* if we are implementing XON/XOFF, set the start and stop character in the device */
+ if (I_IXOFF(tty) || I_IXON(tty)) {
+ unsigned char stop_char = STOP_CHAR(tty);
+ unsigned char start_char = START_CHAR(tty);
+
+ {
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_XON_CHAR, start_char);
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_XOFF_CHAR, stop_char);
+ }
+
+ /* if we are implementing INBOUND XON/XOFF */
+ if (I_IXOFF(tty)) {
+ rxFlow |= IOSP_RX_FLOW_XON_XOFF;
+ dbg(__FUNCTION__" - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
+ } else {
+ dbg(__FUNCTION__" - INBOUND XON/XOFF is disabled");
+ }
+
+ /* if we are implementing OUTBOUND XON/XOFF */
+ if (I_IXON(tty)) {
+ txFlow |= IOSP_TX_FLOW_XON_XOFF;
+ dbg(__FUNCTION__" - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
+ } else {
+ dbg(__FUNCTION__" - OUTBOUND XON/XOFF is disabled");
+ }
+ }
+
+ /* Set flow control to the configured value */
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_RX_FLOW, rxFlow);
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_TX_FLOW, txFlow);
+
+
+ edge_port->shadowLCR &= ~(LCR_BITS_MASK | LCR_STOP_MASK | LCR_PAR_MASK);
+ edge_port->shadowLCR |= (lData | lParity | lStop);
+
+ edge_port->validDataMask = mask;
+
+ /* Send the updated LCR value to the EdgePort */
+ status = send_cmd_write_uart_register(edge_port, LCR, edge_port->shadowLCR);
+ if (status != 0) {
+ return;
+ }
+
+ /* set up the MCR register and send it to the EdgePort */
+ edge_port->shadowMCR = MCR_MASTER_IE;
+ if (cflag & CBAUD) {
+ edge_port->shadowMCR |= (MCR_DTR | MCR_RTS);
+ }
+ status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+ if (status != 0) {
+ return;
+ }
+
+ /* Determine divisor based on baud rate */
+ baud = tty_get_baud_rate(tty);
+ if (!baud) {
+ /* pick a default, any default... */
+ baud = 9600;
+ }
+
+ dbg(__FUNCTION__ " - baud rate = %d", baud);
+ status = send_cmd_write_baud_rate (edge_port, baud);
+


+ return;
+}
+
+

+/****************************************************************************
+ * unicode_to_ascii
+ * Turns a string from Unicode into ASCII.
+ * Doesn't do a good job with any characters that are outside the normal
+ * ASCII range, but it's only for debugging...
+ ****************************************************************************/
+static void unicode_to_ascii (char *string, short *unicode, int unicode_size)
+{
+ int i;
+ for (i = 0; i < unicode_size; ++i) {
+ string[i] = (char)(unicode[i]);
+ }
+ string[unicode_size] = 0x00;
+}
+
+
+/****************************************************************************
+ * get_manufacturing_desc
+ * reads in the manufacturing descriptor and stores it into the serial
+ * structure.
+ ****************************************************************************/
+static void get_manufacturing_desc (struct edgeport_serial *edge_serial)
+{
+ int response;
+
+ dbg("getting manufacturer descriptor");
+
+ response = rom_read (edge_serial->serial, (EDGE_MANUF_DESC_ADDR & 0xffff0000) >> 16,
+ (__u16)(EDGE_MANUF_DESC_ADDR & 0x0000ffff), EDGE_MANUF_DESC_LEN,
+ (__u8 *)(&edge_serial->manuf_descriptor));
+
+ if (response < 1) {
+ err("error in getting manufacturer descriptor");
+ } else {
+ char string[30];
+ dbg("**Manufacturer Descriptor");
+ dbg(" RomSize: %dK", edge_serial->manuf_descriptor.RomSize);
+ dbg(" RamSize: %dK", edge_serial->manuf_descriptor.RamSize);
+ dbg(" CpuRev: %d", edge_serial->manuf_descriptor.CpuRev);
+ dbg(" BoardRev: %d", edge_serial->manuf_descriptor.BoardRev);
+ dbg(" NumPorts: %d", edge_serial->manuf_descriptor.NumPorts);
+ dbg(" DescDate: %d/%d/%d", edge_serial->manuf_descriptor.DescDate[0], edge_serial->manuf_descriptor.DescDate[1], edge_serial->manuf_descriptor.DescDate[2]+1900);
+ unicode_to_ascii (string, edge_serial->manuf_descriptor.SerialNumber, edge_serial->manuf_descriptor.SerNumLength/2-1);
+ dbg(" SerialNumber: %s", string);
+ unicode_to_ascii (string, edge_serial->manuf_descriptor.AssemblyNumber, edge_serial->manuf_descriptor.AssemblyNumLength/2-1);
+ dbg(" AssemblyNumber: %s", string);
+ unicode_to_ascii (string, edge_serial->manuf_descriptor.OemAssyNumber, edge_serial->manuf_descriptor.OemAssyNumLength/2-1);
+ dbg(" OemAssyNumber: %s", string);
+ dbg(" UartType: %d", edge_serial->manuf_descriptor.UartType);
+ dbg(" IonPid: %d", edge_serial->manuf_descriptor.IonPid);
+ dbg(" IonConfig: %d", edge_serial->manuf_descriptor.IonConfig);
+ }
+}
+
+
+/****************************************************************************
+ * get_boot_desc
+ * reads in the bootloader descriptor and stores it into the serial
+ * structure.
+ ****************************************************************************/
+static void get_boot_desc (struct edgeport_serial *edge_serial)
+{
+ int response;
+
+ dbg("getting boot descriptor");
+
+ response = rom_read (edge_serial->serial, (EDGE_BOOT_DESC_ADDR & 0xffff0000) >> 16,
+ (__u16)(EDGE_BOOT_DESC_ADDR & 0x0000ffff), EDGE_BOOT_DESC_LEN,
+ (__u8 *)(&edge_serial->boot_descriptor));
+
+ if (response < 1) {
+ err("error in getting boot descriptor");
+ } else {
+ dbg("**Boot Descriptor:");
+ dbg(" BootCodeLength: %d", edge_serial->boot_descriptor.BootCodeLength);
+ dbg(" MajorVersion: %d", edge_serial->boot_descriptor.MajorVersion);
+ dbg(" MinorVersion: %d", edge_serial->boot_descriptor.MinorVersion);
+ dbg(" BuildNumber: %d", edge_serial->boot_descriptor.BuildNumber);
+ dbg(" Capabilities: 0x%x", edge_serial->boot_descriptor.Capabilities);
+ dbg(" UConfig0: %d", edge_serial->boot_descriptor.UConfig0);
+ dbg(" UConfig1: %d", edge_serial->boot_descriptor.UConfig1);
+ }
+}
+
+
+/****************************************************************************
+ * load_application_firmware
+ * This is called to load the application firmware to the device
+ ****************************************************************************/
+static void load_application_firmware (struct edgeport_serial *edge_serial)
+{
+ PEDGE_FIRMWARE_IMAGE_RECORD record;
+ unsigned char *firmware;
+ unsigned char *FirmwareImage;
+ int ImageSize;
+ int response;
+
+
+ switch (edge_serial->product_info.iDownloadFile) {
+ case EDGE_DOWNLOAD_FILE_I930:
+ dbg("downloading firmware version (930) %d.%d.%d",
+ OperationalCodeImageVersion_GEN1.MajorVersion,
+ OperationalCodeImageVersion_GEN1.MinorVersion,
+ OperationalCodeImageVersion_GEN1.BuildNumber);
+ firmware = &OperationalCodeImage_GEN1[0];
+ FirmwareImage = &OperationalCodeImage_GEN1[0];
+ ImageSize = sizeof(OperationalCodeImage_GEN1);
+ break;
+
+ case EDGE_DOWNLOAD_FILE_80251:
+ dbg("downloading firmware version (80251) %d.%d.%d",
+ OperationalCodeImageVersion_GEN2.MajorVersion,
+ OperationalCodeImageVersion_GEN2.MinorVersion,
+ OperationalCodeImageVersion_GEN2.BuildNumber);
+ firmware = &OperationalCodeImage_GEN2[0];
+ FirmwareImage = &OperationalCodeImage_GEN2[0];
+ ImageSize = sizeof(OperationalCodeImage_GEN2);
+ break;
+
+ case EDGE_DOWNLOAD_FILE_NONE:
+ dbg ("No download file specified, skipping download\n");
+ return;
+
+ default:


+ return;
+ }
+
+

+ for (;;) {
+ record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
+ response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
+ if (response < 0) {
+ err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
+ break;
+ }
+ firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
+ if (firmware >= &FirmwareImage[ImageSize]) {
+ break;
+ }
+ }
+
+ dbg("sending exec_dl_code");
+ response = usb_control_msg (edge_serial->serial->dev,
+ usb_sndctrlpipe(edge_serial->serial->dev, 0),
+ USB_REQUEST_ION_EXEC_DL_CODE,
+ 0x40, 0x4000, 0x0001, NULL, 0, 3000);
+


+ return;
+}
+
+
+

+
+/****************************************************************************
+ * edge_startup
+ ****************************************************************************/
+static int edge_startup (struct usb_serial *serial)
+{
+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;
+ struct usb_device *dev;
+ int i;
+
+ dev = serial->dev;
+
+ /* create our private serial structure */
+ edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
+ if (edge_serial == NULL) {
+ err(__FUNCTION__" - Out of memory");
+ return -ENOMEM;
+ }
+ memset (edge_serial, 0, sizeof(struct edgeport_serial));
+ edge_serial->serial = serial;
+ serial->private = edge_serial;
+
+ /* get the name for the device from the device */
+ if ( (i = get_string(dev, dev->descriptor.iManufacturer, &edge_serial->name[0])) != 0) {
+ edge_serial->name[i-1] = ' ';
+ }
+
+ get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]);
+
+ info("%s detected", edge_serial->name);
+
+ /* get the manufacturing descriptor for this device */
+ get_manufacturing_desc (edge_serial);
+
+ /* get the boot descriptor */
+ get_boot_desc (edge_serial);
+
+ get_product_info(edge_serial);
+
+ /* set the number of ports from the manufacturing description */
+ // FIXME should we override this???
+ //serial->num_ports = serial->product_info.NumPorts;
+ if (edge_serial->product_info.NumPorts != serial->num_ports) {
+ warn(__FUNCTION__ " - Device Reported %d serial ports vs core thinking we have %d ports, email gr...@kroah.com this info.", edge_serial->product_info.NumPorts, serial->num_ports);
+ }
+
+ dbg(__FUNCTION__ " - time 1 %ld", jiffies);
+
+ /* now load the application firmware into this device */
+ load_application_firmware (edge_serial);
+
+ dbg(__FUNCTION__ " - time 2 %ld", jiffies);
+
+ /* Check current Edgeport EEPROM and update if necessary */
+ update_edgeport_E2PROM (edge_serial);
+
+ dbg(__FUNCTION__ " - time 3 %ld", jiffies);
+
+ /* set the configuration to use #1 */
+// dbg("set_configuration 1");
+// usb_set_configuration (dev, 1);
+
+ /* we set up the pointers to the endpoints in the edge_open function,
+ * as the structures aren't created yet. */
+
+ /* set up our port private structures */
+ for (i = 0; i < serial->num_ports; ++i) {
+ edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
+ if (edge_port == NULL) {
+ err(__FUNCTION__" - Out of memory");
+ return -ENOMEM;
+ }
+ memset (edge_port, 0, sizeof(struct edgeport_port));
+ edge_port->port = &serial->port[i];
+ serial->port[i].private = edge_port;
+ }


+
+ return 0;
+}
+
+

+
+/****************************************************************************
+ * usb_edgeport_disconnect
+ * This function is called whenever the device is removed from the usb bus.
+ ****************************************************************************/
+//static void usb_edgeport_disconnect (struct usb_device *dev, void *ptr)
+static void edge_shutdown (struct usb_serial *serial)


+{
+ int i;
+

+ dbg (__FUNCTION__);
+
+ /* stop reads and writes on all ports */
+ for (i=0; i < serial->num_ports; ++i) {
+ while (serial->port[i].open_count > 0) {
+ edge_close (&serial->port[i], NULL);
+ }
+ }
+
+ /* free up any memory that we allocated */
+ // FIXME
+
+}
+
+
+/****************************************************************************
+ * edgeport_init
+ * This is called by the module subsystem, or on startup to initialize us
+ ****************************************************************************/
+int __init edgeport_init(void)
+{
+ usb_serial_register (&edgeport_4_device);
+ usb_serial_register (&rapidport_4_device);
+ usb_serial_register (&edgeport_4t_device);
+ usb_serial_register (&edgeport_2_device);
+ usb_serial_register (&edgeport_4i_device);
+ usb_serial_register (&edgeport_2i_device);
+ usb_serial_register (&edgeport_prl_device);
+ usb_serial_register (&edgeport_421_device);
+ usb_serial_register (&edgeport_21_device);
+ usb_serial_register (&edgeport_8dual_device);
+ usb_serial_register (&edgeport_8_device);
+ usb_serial_register (&edgeport_2din_device);
+ usb_serial_register (&edgeport_4din_device);
+ usb_serial_register (&edgeport_16dual_device);
+ usb_serial_register (&edgeport_compat_id_device);
+ usb_serial_register (&edgeport_8i_device);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


+ return 0;
+}
+
+

+
+/****************************************************************************
+ * edgeport_exit
+ * Called when the driver is about to be unloaded.
+ ****************************************************************************/
+void __exit edgeport_exit (void)
+{
+ usb_serial_deregister (&edgeport_4_device);
+ usb_serial_deregister (&rapidport_4_device);
+ usb_serial_deregister (&edgeport_4t_device);
+ usb_serial_deregister (&edgeport_2_device);
+ usb_serial_deregister (&edgeport_4i_device);
+ usb_serial_deregister (&edgeport_2i_device);
+ usb_serial_deregister (&edgeport_prl_device);
+ usb_serial_deregister (&edgeport_421_device);
+ usb_serial_deregister (&edgeport_21_device);
+ usb_serial_deregister (&edgeport_8dual_device);
+ usb_serial_deregister (&edgeport_8_device);
+ usb_serial_deregister (&edgeport_2din_device);
+ usb_serial_deregister (&edgeport_4din_device);
+ usb_serial_deregister (&edgeport_16dual_device);
+ usb_serial_deregister (&edgeport_compat_id_device);
+ usb_serial_deregister (&edgeport_8i_device);
+}
+
+module_init(edgeport_init);
+module_exit(edgeport_exit);
+


+/* Module information */
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );

+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_edgeport.h linux/drivers/usb/serial/io_edgeport.h
--- v2.2.19/drivers/usb/serial/io_edgeport.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_edgeport.h Wed Oct 10 01:41:30 2001
@@ -0,0 +1,152 @@
+/************************************************************************
+ *
+ * io_edgeport.h Edgeport Linux Interface definitions
+ *
+ * Copyright (c) 2000 Inside Out Networks, Inc.


+ *
+ * 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.
+ *
+ *

+ ************************************************************************/
+
+#if !defined(_IO_EDGEPORT_H_)
+#define _IO_EDGEPORT_H_
+
+
+#define MAX_RS232_PORTS 8 /* Max # of RS-232 ports per device */
+
+/* typedefs that the insideout headers need */
+#ifndef TRUE
+ #define TRUE (1)
+#endif
+#ifndef FALSE
+ #define FALSE (0)
+#endif
+#ifndef MIN
+ #define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+#ifndef MAX
+ #define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+#ifndef max
+ #define max MAX
+#endif
+
+#ifndef LOW8
+ #define LOW8(a) ((unsigned char)(a & 0xff))
+#endif
+#ifndef HIGH8
+ #define HIGH8(a) ((unsigned char)((a & 0xff00) >> 8))
+#endif
+#ifndef NUM_ENTRIES
+ #define NUM_ENTRIES(x) (sizeof(x)/sizeof((x)[0]))
+#endif
+
+#ifndef __KERNEL__
+#define __KERNEL__
+#endif
+
+#include "io_usbvend.h"
+
+
+
+/* The following table is used to map the USBx port number to
+ * the device serial number (or physical USB path), */
+#define MAX_EDGEPORTS 64
+
+struct comMapper {
+ char SerialNumber[MAX_SERIALNUMBER_LEN+1]; /* Serial number/usb path */
+ int numPorts; /* Number of ports */
+ int Original[MAX_RS232_PORTS]; /* Port numbers set by IOCTL */
+ int Port[MAX_RS232_PORTS]; /* Actual used port numbers */
+};
+
+
+#define EDGEPORT_CONFIG_DEVICE "/proc/edgeport"
+
+/* /proc/edgeport Interface
+ * This interface uses read/write/lseek interface to talk to the edgeport driver
+ * the following read functions are supported: */
+#define PROC_GET_MAPPING_TO_PATH 1
+#define PROC_GET_COM_ENTRY 2
+#define PROC_GET_EDGE_MANUF_DESCRIPTOR 3
+#define PROC_GET_BOOT_DESCRIPTOR 4
+#define PROC_GET_PRODUCT_INFO 5
+#define PROC_GET_STRINGS 6
+#define PROC_GET_CURRENT_COM_MAPPING 7
+
+/* The parameters to the lseek() for the read is: */
+#define PROC_READ_SETUP(Command, Argument) ((Command) + ((Argument)<<8))
+
+
+/* the following write functions are supported: */
+#define PROC_SET_COM_MAPPING 1
+#define PROC_SET_COM_ENTRY 2
+
+
+/* The following sturcture is passed to the write */
+struct procWrite {
+ int Command;
+ union {
+ struct comMapper Entry;
+ int ComMappingBasedOnUSBPort; /* Boolean value */
+ } u;
+};
+
+/*
+ * Product information read from the Edgeport
+ */
+struct edgeport_product_info {
+ __u16 ProductId; /* Product Identifier */
+ __u8 NumPorts; /* Number of ports on edgeport */
+ __u8 ProdInfoVer; /* What version of structure is this? */
+
+ __u32 IsServer :1; /* Set if Server */
+ __u32 IsRS232 :1; /* Set if RS-232 ports exist */
+ __u32 IsRS422 :1; /* Set if RS-422 ports exist */
+ __u32 IsRS485 :1; /* Set if RS-485 ports exist */
+ __u32 IsReserved :28; /* Reserved for later expansion */
+
+ __u8 RomSize; /* Size of ROM/E2PROM in K */
+ __u8 RamSize; /* Size of external RAM in K */
+ __u8 CpuRev; /* CPU revision level (chg only if s/w visible) */
+ __u8 BoardRev; /* PCB revision level (chg only if s/w visible) */
+
+ __u8 BootMajorVersion; /* Boot Firmware version: xx. */
+ __u8 BootMinorVersion; /* yy. */
+ __u16 BootBuildNumber; /* zzzz (LE format) */
+
+ __u8 FirmwareMajorVersion; /* Operational Firmware version:xx. */
+ __u8 FirmwareMinorVersion; /* yy. */
+ __u16 FirmwareBuildNumber; /* zzzz (LE format) */
+
+ __u8 ManufactureDescDate[3]; /* MM/DD/YY when descriptor template was compiled */
+ __u8 Unused1[1]; /* Available */
+
+ __u8 iDownloadFile; /* What to download to EPiC device */
+ __u8 Unused2[2]; /* Available */
+};
+
+/*
+ * Edgeport Stringblock String locations
+ */
+#define EDGESTRING_MANUFNAME 1 /* Manufacture Name */
+#define EDGESTRING_PRODNAME 2 /* Product Name */
+#define EDGESTRING_SERIALNUM 3 /* Serial Number */
+#define EDGESTRING_ASSEMNUM 4 /* Assembly Number */
+#define EDGESTRING_OEMASSEMNUM 5 /* OEM Assembly Number */
+#define EDGESTRING_MANUFDATE 6 /* Manufacture Date */
+#define EDGESTRING_ORIGSERIALNUM 7 /* Serial Number */
+
+struct string_block {
+ __u16 NumStrings; /* Number of strings in block */
+ __u16 Strings[1]; /* Start of string block */
+};
+
+typedef struct string_block STRING_BLOCK, *PSTRING_BLOCK;
+
+
+#endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_fw_boot.h linux/drivers/usb/serial/io_fw_boot.h
--- v2.2.19/drivers/usb/serial/io_fw_boot.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_fw_boot.h Wed Oct 10 01:41:30 2001
@@ -0,0 +1,558 @@
+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright(c) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
+#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
+ typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
+ {
+ unsigned short ExtAddr;
+ unsigned short Addr;
+ unsigned short Len;
+ unsigned char Data[0];
+ } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
+
+ typedef struct _EDGE_FIRMWARE_VERSION_INFO
+ {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)
+#define IMAGE_ARRAY_NAME FirmwareImage
+#define IMAGE_VERSION_NAME FirmwareImageVersion
+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,
+ 0x02, 0x00, 0x80, 0x02, 0x00, 0x03,
+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x0b,
+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,
+ 0x02, 0x01, 0xb8,
+
+// Segment #4, Start Address 00ff001b, Length 3
+0xff,0x00,0x1b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x1b,
+
+// Segment #5, Start Address 00ff0023, Length 3
+0xff,0x00,0x23,0x00,0x03,0x00,
+ 0x02, 0x00, 0x23,
+
+// Segment #6, Start Address 00ff002b, Length 3
+0xff,0x00,0x2b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x2b,
+
+// Segment #7, Start Address 00ff0033, Length 3
+0xff,0x00,0x33,0x00,0x03,0x00,
+ 0x02, 0x00, 0x33,
+
+// Segment #8, Start Address 00ff003b, Length 3
+0xff,0x00,0x3b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x3b,
+
+// Segment #9, Start Address 00ff0043, Length 3
+0xff,0x00,0x43,0x00,0x03,0x00,
+ 0x02, 0x01, 0xbd,
+
+// Segment #10, Start Address 00ff004b, Length 3
+0xff,0x00,0x4b,0x00,0x03,0x00,
+ 0x02, 0x01, 0xd0,
+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,
+ 0x02, 0x01, 0x21,
+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+
+// Segment #13, Start Address 00ff0080, Length 358
+0xff,0x00,0x80,0x00,0x66,0x01,
+ 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x3f, 0xf2, 0x7e, 0xf8, 0x00, 0x23, 0x7e, 0x00, 0x01, 0x7e, 0x10,
+ 0x00, 0x12, 0x07, 0x5f, 0x69, 0x20, 0x00, 0x0a, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x05, 0x75, 0x90,
+ 0x0d, 0x80, 0x03, 0x75, 0x90, 0x1d, 0xd2, 0xb5, 0x7e, 0x00, 0x00, 0xa5, 0xd8, 0xfd, 0x75, 0xa8,
+ 0x00, 0x75, 0xb1, 0x00, 0xa9, 0xd5, 0x87, 0xca, 0x29, 0x12, 0x09, 0xcc, 0x12, 0x09, 0xa0, 0xf5,
+ 0x09, 0x7a, 0xa1, 0x20, 0x12, 0x01, 0xe6, 0xda, 0x29, 0xa9, 0xd0, 0xc7, 0x7e, 0x00, 0x05, 0x7a,
+ 0x01, 0xf1, 0x75, 0xe1, 0x10, 0xa9, 0xd7, 0xf4, 0xa9, 0xd7, 0xe4, 0xa5, 0xd8, 0xf1, 0x75, 0xf1,
+ 0x00, 0x75, 0xe1, 0x3f, 0x75, 0xa2, 0x03, 0x75, 0xa3, 0x00, 0x75, 0xc0, 0x00, 0x75, 0xc1, 0x00,
+ 0xa9, 0xd1, 0xb1, 0xa9, 0xd0, 0xb1, 0xa9, 0xd5, 0xd3, 0xd2, 0xaf, 0xe4, 0x7e, 0x04, 0x28, 0x00,
+ 0x8d, 0xef, 0x1b, 0x04, 0x78, 0xfa, 0x04, 0xa9, 0x34, 0xd3, 0x03, 0x30, 0xe0, 0xee, 0xbe, 0x24,
+ 0x00, 0x00, 0x78, 0x05, 0x63, 0x90, 0x30, 0x80, 0xe3, 0xb2, 0x95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, 0xb8, 0x75, 0x08, 0x02, 0x12, 0x08, 0x33, 0xe5, 0xc0, 0x54, 0x03, 0x68, 0x05, 0x12, 0x01,
+ 0xee, 0x80, 0xf5, 0xda, 0xb8, 0x32,
+
+// Segment #14, Start Address 00ff1bca, Length 1
+0xff,0x00,0xca,0x1b,0x01,0x00,
+ 0x00,
+
+// Segment #15, Start Address 00ff01e6, Length 1613
+0xff,0x00,0xe6,0x01,0x4d,0x06,
+ 0xe4, 0x7a, 0xb3, 0x3f, 0xf1, 0x02, 0x02, 0x63, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b,
+ 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0xc0, 0xf1, 0x7e, 0xb3, 0x01, 0x2b,
+ 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x02,
+ 0x4d, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x02, 0xde, 0x80, 0x14, 0x30, 0xc1,
+ 0x08, 0x75, 0xf1, 0x00, 0x12, 0x02, 0xde, 0x80, 0x09, 0x30, 0xc0, 0x06, 0x75, 0xf1, 0x00, 0x12,
+ 0x02, 0x4d, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b,
+ 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0xc2, 0xc0, 0x7e, 0xb3, 0x01, 0x2b, 0xb4, 0x02, 0x07,
+ 0x12, 0x02, 0x6f, 0x02, 0x02, 0x63, 0x22, 0xb4, 0x01, 0xfc, 0x02, 0x02, 0xa9, 0x7e, 0x00, 0x00,
+ 0x7a, 0x03, 0x01, 0x2b, 0x7a, 0x03, 0x01, 0x2c, 0x22, 0x7e, 0xb3, 0x01, 0x23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x07, 0x01, 0x29, 0x68, 0x09, 0x22, 0x7a, 0x33,
+ 0x01, 0x2c, 0x7a, 0x23, 0x01, 0x2b, 0x7e, 0xb3, 0x01, 0x23, 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0,
+ 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4, 0x03, 0x02, 0x07,
+ 0x55, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x04, 0x18, 0x75, 0x84,
+ 0xff, 0x73, 0x02, 0x05, 0x6c, 0x02, 0x04, 0x60, 0x02, 0x06, 0x09, 0x02, 0x06, 0x24, 0x02, 0x05,
+ 0x05, 0x02, 0x04, 0xc6, 0x02, 0x06, 0x3d, 0x02, 0x06, 0x3d, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40,
+ 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02,
+ 0x06, 0x40, 0x02, 0x06, 0x46, 0x02, 0x06, 0xfa, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x02, 0x06,
+ 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x06,
+ 0x2a, 0x7e, 0xb3, 0x01, 0x25, 0x60, 0x56, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x26, 0x7e, 0x17, 0x01,
+ 0x27, 0x75, 0x08, 0x72, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x11, 0x08,
+ 0x12, 0x08, 0x33, 0x12, 0x07, 0x5f, 0x40, 0x35, 0x02, 0x02, 0x94, 0xb4, 0x08, 0x10, 0x75, 0x08,
+ 0x74, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x3f, 0xf1, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0xb4, 0x00,
+ 0x1c, 0x75, 0x08, 0x75, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x05, 0x75, 0xf3,
+ 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x07, 0x55,
+ 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x00, 0x35, 0x75, 0x08, 0x76, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01,
+ 0x28, 0x54, 0x0f, 0xf5, 0xf1, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, 0x09, 0xe5, 0xe1, 0x30, 0xe7,
+ 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5, 0xe1, 0x30, 0xe6, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74, 0x00,
+ 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x07, 0x55, 0xc0,
+ 0xf1, 0x7e, 0xb3, 0x01, 0x28, 0x54, 0x0f, 0x42, 0xf1, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x00, 0x45,
+ 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x01, 0x24, 0x75, 0x08, 0x77, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01,
+ 0x28, 0x54, 0x0f, 0x78, 0x05, 0x53, 0xe1, 0x3f, 0x80, 0x37, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7,
+ 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b, 0x53, 0xe1, 0xbf, 0x80, 0x26, 0xb4, 0x03, 0x17, 0x75, 0x08,
+ 0x78, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, 0x05, 0x43, 0xe1, 0x80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ca, 0x02, 0xff, 0xca, 0x06,
+ 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12, 0x7e, 0x57, 0x01, 0x25, 0x4d, 0x55, 0x68, 0x05, 0xa9, 0xd2,
+ 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x01,
+ 0x27, 0x7e, 0x17, 0x01, 0x25, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x02,
+ 0x90, 0x02, 0x07, 0x55, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x03, 0x15, 0x75, 0x08, 0xc2, 0x12, 0x08,
+ 0x33, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x01, 0x25, 0x7e, 0x57, 0x01, 0x29, 0x02, 0x02, 0x94,
+ 0xb4, 0x05, 0x39, 0x75, 0x08, 0xc0, 0x12, 0x08, 0x33, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9,
+ 0xd5, 0x87, 0x7e, 0x08, 0x01, 0x34, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37,
+ 0x01, 0x25, 0x7e, 0x47, 0x01, 0x29, 0x12, 0x08, 0x3f, 0xd0, 0x87, 0xd0, 0xa8, 0x7e, 0x08, 0x01,
+ 0x34, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x01, 0x29, 0x02, 0x02, 0x94, 0x02, 0x07, 0x55, 0x75,
+ 0x08, 0x07, 0x12, 0x08, 0x33, 0x43, 0xe1, 0xc0, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9,
+ 0xd5, 0x87, 0x12, 0x07, 0xca, 0x40, 0x19, 0x7e, 0x08, 0x01, 0x34, 0x7a, 0x0c, 0x00, 0x00, 0xca,
+ 0x0b, 0xca, 0x49, 0x12, 0x08, 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 0xd3, 0x22,
+
+// Segment #16, EXCLUDED Start Address 00ff7c00, Length 199
+
+
+// Segment #17, EXCLUDED Start Address 00ff7f00, Length 192
+
+
+// Segment #17, Start Address 00ff7fc0, Length 64
+0xff,0x00,0xc0,0x7f,0x40,0x00,
+ 0x40, 0x01, 0x02, 0x00, 0xca, 0x1b, 0x01, 0x0c, 0x02, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+// Segment #18, Start Address 00ff0833, Length 5015
+0xff,0x00,0x33,0x08,0x97,0x13,
+ 0xca, 0x08, 0x7e, 0x01, 0x08, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x80, 0x50, 0x0b, 0x1a,
+ 0x60, 0x0b, 0x35, 0x0b, 0x1a, 0x70, 0x0b, 0x35, 0x0b, 0x1a, 0x80, 0x0b, 0x35, 0x0b, 0x1a, 0x90,
+ 0x0b, 0x35, 0x0b, 0x1a, 0xa0, 0x0b, 0x35, 0x0b, 0x1a, 0xb0, 0x0b, 0x35, 0x0b, 0x1a, 0xc0, 0x0b,
+ 0x35, 0x0b, 0x1a, 0xd0, 0x0b, 0x35, 0x1b, 0x0a, 0x60, 0x0b, 0x15, 0x1b, 0x0a, 0x70, 0x0b, 0x15,
+ 0x1b, 0x0a, 0x80, 0x0b, 0x15, 0x1b, 0x0a, 0x90, 0x0b, 0x15, 0x1b, 0x0a, 0xa0, 0x0b, 0x15, 0x1b,
+ 0x0a, 0xb0, 0x0b, 0x15, 0x1b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0xd2, 0x94, 0x12, 0x19, 0xfb, 0x53, 0x90, 0xcf, 0x12, 0x19, 0xfb, 0x80, 0xf1, 0x0d, 0x0a,
+ 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0d,
+ 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
+ 0x45, 0x64, 0x67, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x34, 0x20, 0x2d, 0x20, 0x48, 0x61, 0x72,
+ 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
+ 0x73, 0x2c, 0x20, 0x52, 0x65, 0x76, 0x20, 0x31, 0x2e, 0x30, 0x30, 0x3b, 0x20, 0x43, 0x6f, 0x70,
+ 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x31, 0x39, 0x39, 0x38, 0x20, 0x49, 0x6e, 0x73, 0x69,
+ 0x64, 0x65, 0x20, 0x4f, 0x75, 0x74, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x0d,
+ 0x0a, 0x00, 0x50, 0x61, 0x73, 0x73, 0x00, 0x46, 0x41, 0x49, 0x4c, 0x20, 0x21, 0x21, 0x00, 0x50,
+ 0x61, 0x73, 0x73, 0x20, 0x20, 0x20, 0x20, 0x00, 0x46, 0x41, 0x49, 0x4c, 0x20, 0x21, 0x21, 0x20,
+ 0x00, 0x0d, 0x0a, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x52, 0x61, 0x6d, 0x3a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x61, 0x6d, 0x20, 0x54, 0x65, 0x73, 0x74, 0x3a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x62,
+ 0x69, 0x74, 0x20, 0x30, 0x2d, 0x31, 0x34, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x57, 0x72, 0x6f, 0x74, 0x65, 0x20, 0x41,
+ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x20, 0x30, 0x30, 0x3a, 0x00, 0x20, 0x20, 0x77, 0x69,
+ 0x74, 0x68, 0x20, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x20, 0x00, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,
+ 0x72, 0x65, 0x61, 0x64, 0x3a, 0x20, 0x00, 0x0d, 0x0a, 0x4f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20,
+ 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c,
+ 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x62, 0x69,
+ 0x74, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x68,
+ 0x6f, 0x72, 0x74, 0x65, 0x64, 0x0d, 0x0a, 0x74, 0x6f, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68,
+ 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x00, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x65,
+ 0x74, 0x65, 0x63, 0x74, 0x20, 0x55, 0x61, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x53, 0x63, 0x72, 0x61, 0x74, 0x63, 0x68, 0x20, 0x50, 0x61, 0x64, 0x2c, 0x46, 0x69, 0x46, 0x6f,
+ 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x26, 0x20, 0x52, 0x53, 0x54, 0x3a, 0x20, 0x00,
+ 0x0d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x55, 0x61, 0x72, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x73,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x31, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74,
+ 0x32, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x33, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74,
+ 0x34, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
+ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
+ 0x2d, 0x00, 0x0d, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x20, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72,
+ 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x20,
+ 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x41, 0x6e, 0x61, 0x6c,
+ 0x6f, 0x67, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x52, 0x58, 0x44, 0x2c, 0x54, 0x58, 0x44, 0x20, 0x74, 0x6f, 0x20, 0x52, 0x54, 0x53, 0x2c, 0x43,
+ 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x58, 0x44, 0x2c, 0x54, 0x58, 0x44, 0x20, 0x74, 0x6f, 0x20, 0x44,
+ 0x54, 0x52, 0x2c, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x5b, 0x43, 0x54, 0x53, 0x2c,
+ 0x52, 0x49, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x54, 0x52, 0x2c, 0x44, 0x53, 0x52, 0x2c, 0x43,
+ 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x5b,
+ 0x43, 0x54, 0x53, 0x2c, 0x43, 0x44, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x53, 0x52, 0x2c, 0x52,
+ 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x44, 0x54, 0x52, 0x5b, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x52,
+ 0x54, 0x53, 0x2c, 0x43, 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a,
+ 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x54, 0x52, 0x20, 0x74, 0x6f, 0x20, 0x43, 0x54, 0x53, 0x2c, 0x43,
+ 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x20, 0x74, 0x6f, 0x20, 0x43,
+ 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x20,
+ 0x74, 0x6f, 0x20, 0x43, 0x54, 0x53, 0x2c, 0x43, 0x44, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61,
+ 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a,
+ 0x44, 0x54, 0x52, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x20, 0x4c, 0x6f,
+ 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x00, 0x0d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20,
+ 0x52, 0x20, 0x21, 0x21, 0x21, 0x2c, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, 0x52,
+ 0x20, 0x21, 0x21, 0x21, 0x20, 0x2c, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, 0x52,
+ 0x20, 0x21, 0x21, 0x21, 0x0d, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
+ 0x63, 0x73, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x65, 0x6e, 0x74, 0x65,
+ 0x72, 0x20, 0x61, 0x20, 0x64, 0x65, 0x62, 0x75, 0x67, 0x20, 0x6c, 0x6f, 0x6f, 0x70, 0x20, 0x6f,
+ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x64, 0x65, 0x74, 0x65,
+ 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x00, 0x0d, 0x0a, 0x0a, 0x4e,
+ 0x6f, 0x20, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72,
+ 0x73, 0x20, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0x0d, 0x0a, 0x00, 0x43, 0x6f,
+ 0x70, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20,
+ 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x27,
+ 0x73, 0x20, 0x45, 0x45, 0x70, 0x72, 0x6f, 0x6d, 0x20, 0x2e, 0x2e, 0x2e, 0x00, 0x44, 0x6f, 0x6e,
+ 0x65, 0x0d, 0x0a, 0x0a, 0x2d, 0x3e, 0x20, 0x54, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x74,
+ 0x20, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x20, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x73,
+ 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x20, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f,
+ 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x00, 0xc2, 0xaf, 0xc2, 0x09, 0xc2, 0x0a, 0x75, 0x90, 0x0d,
+ 0x20, 0x17, 0x02, 0xd2, 0xb5, 0x43, 0x90, 0x30, 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b, 0xb0, 0x0b, 0xb0, 0x7d,
+ 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff,
+ 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x6c, 0xbb,
+ 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x41, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e,
+ 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x34, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff,
+ 0xbe, 0x7b, 0xb0, 0x78, 0x27, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0,
+ 0x78, 0x1a, 0x0b, 0xb0, 0xbe, 0xc4, 0xff, 0xfe, 0x78, 0x92, 0x0e, 0xb4, 0xa5, 0xdf, 0x8b, 0x7e,
+ 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x77, 0xca, 0x5b, 0xca, 0x6b,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 69'
echo 'File patch-2.2.20 is continued in part 70'
echo "70" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:07 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part68

#!/bin/sh -x
# this is part 68 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 68; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ edge_serial->boot_descriptor.MinorVersion,
+ edge_serial->boot_descriptor.BuildNumber);
+
+
+ if (BootNewVer > BootCurVer) {
+ dbg("**Update Boot Image from %d.%d.%d to %d.%d.%d",
+ edge_serial->boot_descriptor.MajorVersion,
+ edge_serial->boot_descriptor.MinorVersion,
+ edge_serial->boot_descriptor.BuildNumber,
+ BootMajorVersion,
+ BootMinorVersion,
+ BootBuildNumber);
+
+
+ dbg("Downloading new Boot Image");
+
+ firmware = BootImage;


+
+ for (;;) {
+ record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;

+ response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);


+ if (response < 0) {
+ err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
+ break;
+ }
+ firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;

+ if (firmware >= &BootImage[BootSize]) {
+ break;
+ }
+ }
+ } else {
+ dbg("Boot Image -- already up to date");
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Get string descriptor from device *
+ * *
+ ************************************************************************/
+static int get_string (struct usb_device *dev, int Id, char *string)
+{
+ struct usb_string_descriptor StringDesc;
+ struct usb_string_descriptor *pStringDesc;
+
+ dbg(__FUNCTION__ " - USB String ID = %d", Id );
+
+ if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {


+ return 0;
+ }
+

+ pStringDesc = kmalloc (StringDesc.bLength, GFP_KERNEL);
+
+ if (!pStringDesc) {


+ return 0;
+ }
+

+ if (!usb_get_descriptor(dev, USB_DT_STRING, Id, pStringDesc, StringDesc.bLength )) {
+ kfree(pStringDesc);


+ return 0;
+ }
+

+ unicode_to_ascii(string, pStringDesc->wData, pStringDesc->bLength/2-1);
+
+ kfree(pStringDesc);
+ return strlen(string);
+}
+
+
+/************************************************************************
+ *
+ * Get string descriptor from device
+ *
+ ************************************************************************/
+static int get_string_desc (struct usb_device *dev, int Id, struct usb_string_descriptor **pRetDesc)
+{
+ struct usb_string_descriptor StringDesc;
+ struct usb_string_descriptor *pStringDesc;
+
+ dbg(__FUNCTION__ " - USB String ID = %d", Id );
+
+ if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {


+ return 0;
+ }
+

+ pStringDesc = kmalloc (StringDesc.bLength, GFP_KERNEL);
+
+ if (!pStringDesc) {


+ return -1;
+ }
+

+ if (!usb_get_descriptor(dev, USB_DT_STRING, Id, pStringDesc, StringDesc.bLength )) {
+ kfree(pStringDesc);


+ return -1;
+ }
+

+ *pRetDesc = pStringDesc;


+ return 0;
+}
+
+
+

+
+/************************************************************************
+ * *
+ * *
+ ************************************************************************/
+static void get_product_info(struct edgeport_serial *edge_serial)
+{
+ struct edgeport_product_info *product_info = &edge_serial->product_info;
+
+ memset (product_info, 0, sizeof(struct edgeport_product_info));
+
+ product_info->ProductId = (__u16)(edge_serial->serial->dev->descriptor.idProduct & ~ION_DEVICE_ID_GENERATION_2);
+ product_info->NumPorts = edge_serial->manuf_descriptor.NumPorts;
+ product_info->ProdInfoVer = 0;
+
+ product_info->RomSize = edge_serial->manuf_descriptor.RomSize;
+ product_info->RamSize = edge_serial->manuf_descriptor.RamSize;
+ product_info->CpuRev = edge_serial->manuf_descriptor.CpuRev;
+ product_info->BoardRev = edge_serial->manuf_descriptor.BoardRev;
+
+ product_info->BootMajorVersion = edge_serial->boot_descriptor.MajorVersion;
+ product_info->BootMinorVersion = edge_serial->boot_descriptor.MinorVersion;
+ product_info->BootBuildNumber = edge_serial->boot_descriptor.BuildNumber;
+
+ memcpy(product_info->ManufactureDescDate, edge_serial->manuf_descriptor.DescDate, sizeof(edge_serial->manuf_descriptor.DescDate));
+
+ // check if this is 2nd generation hardware
+ if (edge_serial->serial->dev->descriptor.idProduct & ION_DEVICE_ID_GENERATION_2) {
+ product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN2.MajorVersion;
+ product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN2.MinorVersion;
+ product_info->FirmwareBuildNumber = OperationalCodeImageVersion_GEN2.BuildNumber;
+ product_info->iDownloadFile = EDGE_DOWNLOAD_FILE_80251;
+ } else {
+ product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN1.MajorVersion;
+ product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN1.MinorVersion;
+ product_info->FirmwareBuildNumber = OperationalCodeImageVersion_GEN1.BuildNumber;
+ product_info->iDownloadFile = EDGE_DOWNLOAD_FILE_I930;
+ }
+
+ // Determine Product type and set appropriate flags
+ switch (DEVICE_ID_FROM_USB_PRODUCT_ID(product_info->ProductId)) {
+ case ION_DEVICE_ID_EDGEPORT_COMPATIBLE:
+ case ION_DEVICE_ID_EDGEPORT_4T:
+ case ION_DEVICE_ID_EDGEPORT_4:
+ case ION_DEVICE_ID_EDGEPORT_2:
+ case ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU:
+ case ION_DEVICE_ID_EDGEPORT_8:
+ case ION_DEVICE_ID_EDGEPORT_421:
+ case ION_DEVICE_ID_EDGEPORT_21:
+ case ION_DEVICE_ID_EDGEPORT_2_DIN:
+ case ION_DEVICE_ID_EDGEPORT_4_DIN:
+ case ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU:
+ product_info->IsRS232 = 1;
+ break;
+
+ case ION_DEVICE_ID_EDGEPORT_2I: // Edgeport/2 RS422/RS485
+ product_info->IsRS422 = 1;
+ product_info->IsRS485 = 1;
+ break;
+
+ case ION_DEVICE_ID_EDGEPORT_8I: // Edgeport/4 RS422
+ case ION_DEVICE_ID_EDGEPORT_4I: // Edgeport/4 RS422
+ product_info->IsRS422 = 1;
+ break;
+ }
+
+ // Dump Product Info structure
+ dbg("**Product Information:");
+ dbg(" ProductId %x", product_info->ProductId );
+ dbg(" NumPorts %d", product_info->NumPorts );
+ dbg(" ProdInfoVer %d", product_info->ProdInfoVer );
+ dbg(" IsServer %d", product_info->IsServer);
+ dbg(" IsRS232 %d", product_info->IsRS232 );
+ dbg(" IsRS422 %d", product_info->IsRS422 );
+ dbg(" IsRS485 %d", product_info->IsRS485 );
+ dbg(" RomSize %d", product_info->RomSize );
+ dbg(" RamSize %d", product_info->RamSize );
+ dbg(" CpuRev %x", product_info->CpuRev );
+ dbg(" BoardRev %x", product_info->BoardRev);
+ dbg(" BootMajorVersion %d.%d.%d", product_info->BootMajorVersion,
+ product_info->BootMinorVersion,
+ product_info->BootBuildNumber);
+ dbg(" FirmwareMajorVersion %d.%d.%d", product_info->FirmwareMajorVersion,
+ product_info->FirmwareMinorVersion,
+ product_info->FirmwareBuildNumber);
+ dbg(" ManufactureDescDate %d/%d/%d", product_info->ManufactureDescDate[0],
+ product_info->ManufactureDescDate[1],
+ product_info->ManufactureDescDate[2]+1900);
+ dbg(" iDownloadFile 0x%x", product_info->iDownloadFile);
+
+}
+
+
+/************************************************************************/
+/************************************************************************/
+/* U S B C A L L B A C K F U N C T I O N S */
+/* U S B C A L L B A C K F U N C T I O N S */
+/************************************************************************/
+/************************************************************************/
+
+/*****************************************************************************
+ * edge_interrupt_callback
+ * this is the callback function for when we have received data on the
+ * interrupt endpoint.
+ *****************************************************************************/
+static void edge_interrupt_callback (struct urb *urb)
+{
+ struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context;
+ struct edgeport_port *edge_port;
+ struct usb_serial_port *port;
+ unsigned char *data = urb->transfer_buffer;
+ int length = urb->actual_length;
+ int bytes_avail;
+ int position;
+ int txCredits;
+ int portNumber;
+ int result;
+
+ dbg(__FUNCTION__);
+
+ if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
+ return;
+ }
+
+ if (urb->status) {
+ dbg(__FUNCTION__" - nonzero control read status received: %d", urb->status);
+ return;
+ }
+
+ // process this interrupt-read even if there are no ports open
+ if (length) {
+ usb_serial_debug_data (__FILE__, __FUNCTION__, length, data);
+
+ if (length > 1) {
+ bytes_avail = data[0] | (data[1] << 8);
+ if (bytes_avail) {
+ edge_serial->rxBytesAvail += bytes_avail;
+ dbg(__FUNCTION__" - bytes_avail = %d, rxBytesAvail %d", bytes_avail, edge_serial->rxBytesAvail);
+
+ if ((edge_serial->rxBytesAvail > 0) &&
+ (edge_serial->read_urb->status != -EINPROGRESS)) {
+ dbg(" --- Posting a read");
+
+ /* we have pending bytes on the bulk in pipe, send a request */
+ edge_serial->read_urb->dev = edge_serial->serial->dev;
+ result = usb_submit_urb(edge_serial->read_urb);
+ if (result) {
+ dbg(__FUNCTION__" - usb_submit_urb(read bulk) failed with result = %d", result);
+ }
+ }
+ }
+ }
+ /* grab the txcredits for the ports if available */
+ position = 2;
+ portNumber = 0;
+ while ((position < length) && (portNumber < edge_serial->serial->num_ports)) {
+ txCredits = data[position] | (data[position+1] << 8);
+ if (txCredits) {
+ port = &edge_serial->serial->port[portNumber];
+ if (port_paranoia_check (port, __FUNCTION__) == 0) {
+ edge_port = (struct edgeport_port *)port->private;
+ if (edge_port->open) {
+ edge_port->txCredits += txCredits;
+ dbg(__FUNCTION__" - txcredits for port%d = %d", portNumber, edge_port->txCredits);
+
+ /* tell the tty driver that something has changed */
+ wake_up_interruptible(&edge_port->port->tty->write_wait);
+
+ // Since we have more credit, check if more data can be sent
+ send_more_port_data(edge_serial, edge_port);
+ }
+ }
+ }
+ position += 2;
+ ++portNumber;


+ }
+ }
+}
+
+

+/*****************************************************************************
+ * edge_bulk_in_callback
+ * this is the callback function for when we have received data on the
+ * bulk in endpoint.
+ *****************************************************************************/
+static void edge_bulk_in_callback (struct urb *urb)
+{
+ struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context;
+ unsigned char *data = urb->transfer_buffer;
+ int status;
+ __u16 raw_data_length;
+
+ dbg(__FUNCTION__);
+
+ if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
+ return;
+ }
+
+ if (urb->status) {
+ dbg(__FUNCTION__" - nonzero read bulk status received: %d", urb->status);
+ return;
+ }
+
+ if (urb->actual_length) {
+ raw_data_length = urb->actual_length;
+
+ usb_serial_debug_data (__FILE__, __FUNCTION__, raw_data_length, data);
+
+ /* decrement our rxBytes available by the number that we just got */
+ edge_serial->rxBytesAvail -= raw_data_length;
+
+ dbg(__FUNCTION__" - Received = %d, rxBytesAvail %d", raw_data_length, edge_serial->rxBytesAvail);
+
+ process_rcvd_data (edge_serial, data, urb->actual_length);
+
+ /* check to see if there's any more data for us to read */
+ if ((edge_serial->rxBytesAvail > 0) &&
+ (edge_serial->read_urb->status != -EINPROGRESS)) {
+ dbg(" --- Posting a read");
+
+ /* there is, so resubmit our urb */
+ edge_serial->read_urb->dev = edge_serial->serial->dev;
+ status = usb_submit_urb(edge_serial->read_urb);
+ if (status) {
+ err(__FUNCTION__" - usb_submit_urb(read bulk) failed, status = %d", status);


+ }
+ }
+ }
+}
+
+

+/*****************************************************************************
+ * edge_bulk_out_data_callback
+ * this is the callback function for when we have finished sending serial data
+ * on the bulk out endpoint.
+ *****************************************************************************/
+static void edge_bulk_out_data_callback (struct urb *urb)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;


+ struct tty_struct *tty;
+

+ dbg(__FUNCTION__);
+
+ if (port_paranoia_check (edge_port->port, __FUNCTION__)) {
+ return;
+ }
+
+ if (urb->status) {
+ dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);


+ }
+
+ tty = edge_port->port->tty;
+

+ /* let the tty driver wakeup if it has a special write_wakeup function */
+ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
+ (tty->ldisc.write_wakeup)(tty);
+ }
+
+ /* tell the tty driver that something has changed */
+ wake_up_interruptible(&tty->write_wait);
+
+ // Release the Write URB
+ edge_port->write_in_progress = FALSE;
+
+ // Check if more data needs to be sent
+ send_more_port_data((struct edgeport_serial *)(edge_port->port->serial->private), edge_port);
+}
+
+
+/*****************************************************************************
+ * BulkOutCmdCallback
+ * this is the callback function for when we have finished sending a command
+ * on the bulk out endpoint.
+ *****************************************************************************/
+static void edge_bulk_out_cmd_callback (struct urb *urb)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
+ struct tty_struct *tty;
+ int status = urb->status;
+
+ dbg(__FUNCTION__);
+
+ CmdUrbs--;
+ dbg(__FUNCTION__" - FREE URB %p (outstanding %d)", urb, CmdUrbs);
+
+


+ /* if this urb had a transfer buffer already (old transfer) free it */
+ if (urb->transfer_buffer != NULL) {
+ kfree(urb->transfer_buffer);
+ }
+

+ // Free the command urb


+ usb_unlink_urb (urb);
+ usb_free_urb (urb);
+

+ if (port_paranoia_check (edge_port->port, __FUNCTION__)) {
+ return;
+ }
+
+ if (status) {
+ dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
+ return;
+ }
+
+ /* Get pointer to tty */


+ tty = edge_port->port->tty;
+

+ /* tell the tty driver that something has changed */
+ wake_up_interruptible(&tty->write_wait);
+
+
+ /* we have completed the command */
+ edge_port->commandPending = FALSE;
+ wake_up_interruptible(&edge_port->wait_command);
+}
+
+
+/*****************************************************************************
+ * Driver tty interface functions
+ *****************************************************************************/
+
+/*****************************************************************************
+ * SerialOpen
+ * this function is called by the tty driver when a port is opened
+ * If successful, we return 0
+ * Otherwise we return a negative error number.
+ *****************************************************************************/
+static int edge_open (struct usb_serial_port *port, struct file * filp)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)port->private;
+ struct usb_serial *serial;
+ struct edgeport_serial *edge_serial;
+ int response;
+ int timeout;
+
+ if (port_paranoia_check (port, __FUNCTION__))
+ return -ENODEV;
+
+ dbg(__FUNCTION__ " - port %d", port->number);
+
+ ++port->open_count;
+ MOD_INC_USE_COUNT;
+
+ if (!port->active) {
+ port->active = 1;
+


+ /* force low_latency on so that our tty_push actually forces the data through,

+ otherwise it is scheduled, and with high data rates (like with OHCI) data
+ can get lost. */
+ port->tty->low_latency = 1;
+
+ /* see if we've set up our endpoint info yet (can't set it up in edge_startup
+ as the structures were not set up at that time.) */
+ serial = port->serial;
+ edge_serial = (struct edgeport_serial *)serial->private;
+ if (edge_serial->interrupt_in_buffer == NULL) {
+ struct usb_serial_port *port0 = &serial->port[0];
+
+ /* not set up yet, so do it now */
+ edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
+ edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
+ edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
+ edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
+ edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
+ edge_serial->read_urb = port0->read_urb;
+ edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
+
+ /* set up our interrupt urb */
+ /* Like to use FILL_INT_URB, but we don't know wMaxPacketSize or bInterval, something to change for 2.5... */
+ edge_serial->interrupt_read_urb->complete = edge_interrupt_callback;
+ edge_serial->interrupt_read_urb->context = edge_serial;
+ /* FILL_INT_URB(edge_serial->interrupt_read_urb, serial->dev,
+ usb_rcvintpipe (serial->dev, edge_serial->interrupt_in_endpoint),
+ edge_serial->interrupt_in_buffer, edge_serial->interrupt_in_endpoint.wMaxPacketSize,
+ edge_interrupt_callback, edge_serial, edge_serial->interrupt_in_endpoint.bInterval);
+ */
+
+ /* set up our bulk in urb */
+ /* Like to use FILL_BULK_URB, but we don't know wMaxPacketSize or bInterval, something to change for 2.5... */
+ edge_serial->read_urb->complete = edge_bulk_in_callback;
+ edge_serial->read_urb->context = edge_serial;
+ /* FILL_BULK_URB(edge_serial->read_urb, serial->dev,
+ usb_rcvbulkpipe (serial->dev, edge_serial->bulk_in_endpoint),
+ edge_serial->bulk_in_buffer, edge_serial->bulk_in_endpoint->wMaxPacketSize,
+ edge_bulk_in_callback, edge_serial);
+ */
+
+ /* start interrupt read for this edgeport
+ * this interrupt will continue as long as the edgeport is connected */
+ response = usb_submit_urb (edge_serial->interrupt_read_urb);
+ if (response) {
+ err(__FUNCTION__" - Error %d submitting control urb", response);
+ }
+ }
+
+ /* initialize our wait queues */
+ init_waitqueue_head(&edge_port->wait_open);
+ init_waitqueue_head(&edge_port->wait_chase);
+ init_waitqueue_head(&edge_port->delta_msr_wait);
+ init_waitqueue_head(&edge_port->wait_command);
+
+ /* initialize our icount structure */
+ memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
+
+ /* initialize our port settings */
+ edge_port->txCredits = 0; /* Can't send any data yet */
+ edge_port->shadowMCR = MCR_MASTER_IE; /* Must always set this bit to enable ints! */
+ edge_port->chaseResponsePending = FALSE;
+
+ /* send a open port command */
+ edge_port->openPending = TRUE;
+ edge_port->open = FALSE;
+ response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
+
+ if (response < 0) {
+ err(__FUNCTION__" - error sending open port command");
+ edge_port->openPending = FALSE;
+ port->active = 0;
+ port->open_count = 0;
+ MOD_DEC_USE_COUNT;


+ return -ENODEV;
+ }
+

+ /* now wait for the port to be completly opened */
+ timeout = OPEN_TIMEOUT;
+ while (timeout && edge_port->openPending == TRUE) {
+ timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
+ }
+
+ if (edge_port->open == FALSE) {
+ /* open timed out */
+ dbg(__FUNCTION__" - open timedout");
+ edge_port->openPending = FALSE;
+ port->active = 0;
+ port->open_count = 0;
+ MOD_DEC_USE_COUNT;


+ return -ENODEV;
+ }
+

+ /* create the txfifo */
+ edge_port->txfifo.head = 0;
+ edge_port->txfifo.tail = 0;
+ edge_port->txfifo.count = 0;
+ edge_port->txfifo.size = edge_port->maxTxCredits;
+ edge_port->txfifo.fifo = kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
+
+ if (!edge_port->txfifo.fifo) {
+ dbg(__FUNCTION__" - no memory");
+ edge_close (port, filp);


+ return -ENOMEM;
+ }
+

+ /* Allocate a URB for the write */
+ edge_port->write_urb = usb_alloc_urb (0);
+
+ if (!edge_port->write_urb) {
+ dbg(__FUNCTION__" - no memory");
+ edge_close (port, filp);


+ return -ENOMEM;
+ }
+

+ dbg(__FUNCTION__"(%d) - Initialize TX fifo to %d bytes", port->number, edge_port->maxTxCredits);
+ }
+
+ dbg(__FUNCTION__" exited");


+
+ return 0;
+}
+
+

+/************************************************************************
+ *
+ * block_until_chase_response
+ *
+ * This function will block the close until one of the following:
+ * 1. Response to our Chase comes from Edgeport
+ * 2. A timout of 10 seconds without activity has expired
+ * (1K of Edgeport data @ 2400 baud ==> 4 sec to empty)
+ *
+ ************************************************************************/
+static void block_until_chase_response(struct edgeport_port *edge_port)
+{
+ __u16 lastCredits;
+ int timeout = 1*HZ;
+ int wait = 10;
+
+ while (1) {
+ // Save Last credits
+ lastCredits = edge_port->txCredits;
+
+ // Did we get our Chase response
+ if (edge_port->chaseResponsePending == FALSE) {
+ dbg(__FUNCTION__" - Got Chase Response");
+
+ // did we get all of our credit back?
+ if (edge_port->txCredits == edge_port->maxTxCredits ) {
+ dbg(__FUNCTION__" - Got all credits");


+ return;
+ }
+ }
+

+ // Block the thread for a while
+ interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout);
+
+ if (lastCredits == edge_port->txCredits) {
+ // No activity.. count down.
+ wait--;
+ if (wait == 0) {
+ edge_port->chaseResponsePending = FALSE;
+ dbg(__FUNCTION__" - Chase TIMEOUT");
+ return;
+ }
+ } else {
+ // Reset timout value back to 10 seconds
+ dbg(__FUNCTION__" - Last %d, Current %d", lastCredits, edge_port->txCredits);
+ wait = 10;


+ }
+ }
+}
+
+

+/************************************************************************
+ *
+ * block_until_tx_empty
+ *
+ * This function will block the close until one of the following:
+ * 1. TX count are 0
+ * 2. The edgeport has stopped
+ * 3. A timout of 3 seconds without activity has expired
+ *
+ ************************************************************************/
+static void block_until_tx_empty (struct edgeport_port *edge_port)
+{
+ struct TxFifo *fifo = &edge_port->txfifo;
+ __u32 lastCount;
+ int timeout = HZ/10;
+ int wait = 30;
+
+ while (1) {
+ // Save Last count
+ lastCount = fifo->count;
+
+ // Is the Edgeport Buffer empty?
+ if (lastCount == 0) {
+ dbg(__FUNCTION__" - TX Buffer Empty");
+ return;
+ }
+
+ // Block the thread for a while
+ interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout);
+
+ dbg(__FUNCTION__ " wait");
+
+ if (lastCount == fifo->count) {
+ // No activity.. count down.
+ wait--;
+ if (wait == 0) {
+ dbg(__FUNCTION__" - TIMEOUT");
+ return;
+ }
+ } else {
+ // Reset timout value back to seconds
+ wait = 30;


+ }
+ }
+}
+
+

+/*****************************************************************************
+ * edge_close
+ * this function is called by the tty driver when a port is closed
+ *****************************************************************************/
+static void edge_close (struct usb_serial_port *port, struct file * filp)
+{
+ struct usb_serial *serial;


+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;

+ int status;
+
+ if (port_paranoia_check (port, __FUNCTION__))
+ return;
+
+ dbg(__FUNCTION__ " - port %d", port->number);
+
+ serial = get_usb_serial (port, __FUNCTION__);
+ if (!serial)
+ return;
+
+ edge_serial = (struct edgeport_serial *)serial->private;
+ edge_port = (struct edgeport_port *)port->private;
+
+ --port->open_count;
+
+ if (port->open_count <= 0) {
+ // block until tx is empty
+ block_until_tx_empty(edge_port);
+
+ edge_port->closePending = TRUE;
+
+ /* flush and chase */
+ edge_port->chaseResponsePending = TRUE;
+
+ dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
+ status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
+ if (status == 0) {
+ // block until chase finished
+ block_until_chase_response(edge_port);
+ } else {
+ edge_port->chaseResponsePending = FALSE;
+ }
+
+ /* close the port */
+ dbg(__FUNCTION__" - Sending IOSP_CMD_CLOSE_PORT");
+ send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
+
+ //port->close = TRUE;
+ edge_port->closePending = FALSE;
+ edge_port->open = FALSE;
+ edge_port->openPending = FALSE;
+
+ if (edge_port->write_urb) {


+ /* if this urb had a transfer buffer already (old transfer) free it */

+ if (edge_port->write_urb->transfer_buffer != NULL) {
+ kfree(edge_port->write_urb->transfer_buffer);
+ }
+
+ usb_unlink_urb (edge_port->write_urb);
+ usb_free_urb (edge_port->write_urb);
+ }
+
+ if (edge_port->txfifo.fifo) {
+ kfree(edge_port->txfifo.fifo);
+ }
+ }
+
+ MOD_DEC_USE_COUNT;
+ dbg(__FUNCTION__" exited");
+}
+
+
+
+
+/*****************************************************************************
+ * SerialWrite
+ * this function is called by the tty driver when data should be written to
+ * the port.
+ * If successful, we return the number of bytes written, otherwise we return
+ * a negative error number.
+ *****************************************************************************/
+static int edge_write (struct usb_serial_port *port, int from_user, const unsigned char *data, int count)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)port->private;
+ struct TxFifo *fifo;
+ int copySize;
+ int bytesleft;
+ int firsthalf;
+ int secondhalf;
+
+ dbg(__FUNCTION__ " - port %d", port->number);
+
+ // get a pointer to the Tx fifo
+ fifo = &edge_port->txfifo;
+
+ // calculate number of bytes to put in fifo
+ copySize = MIN(count, (edge_port->txCredits - fifo->count));
+
+ dbg(__FUNCTION__"(%d) of %d byte(s) Fifo room %d -- will copy %d bytes",
+ port->number, count, edge_port->txCredits - fifo->count, copySize);
+
+ /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */
+ if (copySize == 0) {
+ dbg (__FUNCTION__" - copySize = Zero");


+ return 0;
+ }
+

+ // queue the data
+ // since we can never overflow the buffer we do not have to check for full condition
+
+ // the copy is done is two parts -- first fill to the end of the buffer
+ // then copy the reset from the start of the buffer
+
+ bytesleft = fifo->size - fifo->head;
+ firsthalf = MIN(bytesleft,copySize);
+ dbg (__FUNCTION__" - copy %d bytes of %d into fifo ", firsthalf, bytesleft);
+
+ /* now copy our data */
+ if (from_user) {
+ copy_from_user(&fifo->fifo[fifo->head], data, firsthalf);
+ } else {
+ memcpy(&fifo->fifo[fifo->head], data, firsthalf);
+ }
+
+ // update the index and size
+ fifo->head += firsthalf;
+ fifo->count += firsthalf;
+
+ // wrap the index
+ if (fifo->head == fifo->size) {
+ fifo->head = 0;
+ }
+
+ secondhalf = copySize-firsthalf;
+
+ if (secondhalf) {
+ dbg (__FUNCTION__" - copy rest of data %d", secondhalf);
+ if (from_user) {
+ copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf);
+ } else {
+ memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf);
+ }
+ // update the index and size
+ fifo->count += secondhalf;
+ fifo->head += secondhalf;
+ // No need to check for wrap since we can not get to end of fifo in this part
+ }
+
+ if (copySize) {
+ usb_serial_debug_data (__FILE__, __FUNCTION__, copySize, data);
+ }
+
+ send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port);
+
+ dbg(__FUNCTION__" wrote %d byte(s) TxCredits %d, Fifo %d", copySize, edge_port->txCredits, fifo->count);
+
+ return copySize;
+}
+
+
+/************************************************************************
+ *
+ * send_more_port_data()
+ *
+ * This routine attempts to write additional UART transmit data
+ * to a port over the USB bulk pipe. It is called (1) when new
+ * data has been written to a port's TxBuffer from higher layers
+ * (2) when the peripheral sends us additional TxCredits indicating
+ * that it can accept more Tx data for a given port; and (3) when
+ * a bulk write completes successfully and we want to see if we
+ * can transmit more.
+ *
+ ************************************************************************/
+static void send_more_port_data(struct edgeport_serial *edge_serial, struct edgeport_port *edge_port)
+{
+ struct TxFifo *fifo = &edge_port->txfifo;
+ struct urb *urb;
+ unsigned char *buffer;
+ int status;
+ unsigned long flags;
+ int count;
+ int bytesleft;
+ int firsthalf;
+ int secondhalf;
+
+ dbg(__FUNCTION__"(%d)", edge_port->port->number);
+
+ /* find our next free urb */ // ICK!!! FIXME!!!
+ save_flags(flags); cli();
+
+ if (edge_port->write_in_progress ||
+ !edge_port->open ||
+ (fifo->count == 0)) {
+ restore_flags(flags);
+ dbg(__FUNCTION__"(%d) EXIT - fifo %d, PendingWrite = %d", edge_port->port->number, fifo->count, edge_port->write_in_progress);
+ return;
+ }
+
+ // since the amount of data in the fifo will always fit into the
+ // edgeport buffer we do not need to check the write length
+
+ // Do we have enough credits for this port to make it worthwhile
+ // to bother queueing a write. If it's too small, say a few bytes,
+ // it's better to wait for more credits so we can do a larger
+ // write.
+ if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) {
+ restore_flags(flags);
+ dbg(__FUNCTION__"(%d) Not enough credit - fifo %d TxCredit %d", edge_port->port->number, fifo->count, edge_port->txCredits );
+ return;
+ }
+
+ // lock this write
+ edge_port->write_in_progress = TRUE;
+ restore_flags(flags);
+
+ // get a pointer to the write_urb
+ urb = edge_port->write_urb;


+
+ /* if this urb had a transfer buffer already (old transfer) free it */
+ if (urb->transfer_buffer != NULL) {
+ kfree(urb->transfer_buffer);

+ urb->transfer_buffer = NULL;
+ }
+
+ /* build the data header for the buffer and port that we are about to send out */
+ count = fifo->count;
+ buffer = kmalloc (count+2, GFP_KERNEL);
+ if (buffer == NULL) {
+ err(__FUNCTION__" - no more kernel memory...");
+ edge_port->write_in_progress = FALSE;
+ return;
+ }
+ buffer[0] = IOSP_BUILD_DATA_HDR1 (edge_port->port->number, count);
+ buffer[1] = IOSP_BUILD_DATA_HDR2 (edge_port->port->number, count);
+
+ /* now copy our data */
+ bytesleft = fifo->size - fifo->tail;
+ firsthalf = MIN(bytesleft,count);
+ memcpy(&buffer[2], &fifo->fifo[fifo->tail], firsthalf);
+ fifo->tail += firsthalf;
+ fifo->count -= firsthalf;
+ if (fifo->tail == fifo->size) {
+ fifo->tail = 0;
+ }
+
+ secondhalf = count-firsthalf;
+ if (secondhalf) {
+ memcpy(&buffer[2+firsthalf], &fifo->fifo[fifo->tail], secondhalf);
+ fifo->tail += secondhalf;
+ fifo->count -= secondhalf;
+ }
+
+ if (count) {
+ usb_serial_debug_data (__FILE__, __FUNCTION__, count, &buffer[2]);
+ }
+
+ /* fill up the urb with all of our data and submit it */


+ FILL_BULK_URB (urb, edge_serial->serial->dev,
+ usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),

+ buffer, count+2, edge_bulk_out_data_callback, edge_port);


+
+ /* set the USB_BULK_QUEUE flag so that we can shove a bunch of urbs at once down the pipe */
+ urb->transfer_flags |= USB_QUEUE_BULK;
+

+ urb->dev = edge_serial->serial->dev;
+ status = usb_submit_urb(urb);
+ if (status) {
+ /* something went wrong */
+ dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");

+ edge_port->write_in_progress = FALSE;
+ } else {
+ /* decrement the number of credits we have by the number we just sent */
+ edge_port->txCredits -= count;
+ edge_port->icount.tx += count;
+ }
+ dbg(__FUNCTION__" wrote %d byte(s) TxCredit %d, Fifo %d", count, edge_port->txCredits, fifo->count);
+}
+
+
+/*****************************************************************************
+ * edge_write_room
+ * this function is called by the tty driver when it wants to know how many
+ * bytes of data we can accept for a specific port.
+ * If successful, we return the amount of room that we have for this port
+ * (the txCredits),
+ * Otherwise we return a negative error number.
+ *****************************************************************************/
+static int edge_write_room (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ int room;
+
+ dbg(__FUNCTION__);
+
+ if (edge_port->closePending == TRUE) {
+ return -ENODEV;
+ }
+
+ dbg(__FUNCTION__" - port %d", port->number);
+
+ if (!edge_port->open) {
+ dbg (__FUNCTION__" - port not opened");
+ return -EINVAL;
+ }
+
+ // total of both buffers is still txCredit
+ room = edge_port->txCredits - edge_port->txfifo.count;
+
+ dbg(__FUNCTION__" - returns %d", room);
+ return room;
+}
+
+
+/*****************************************************************************
+ * edge_chars_in_buffer
+ * this function is called by the tty driver when it wants to know how many
+ * bytes of data we currently have outstanding in the port (data that has
+ * been written, but hasn't made it out the port yet)
+ * If successful, we return the number of bytes left to be written in the
+ * system,
+ * Otherwise we return a negative error number.
+ *****************************************************************************/
+static int edge_chars_in_buffer (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ int num_chars;
+
+ dbg(__FUNCTION__);
+
+ if (!edge_port->open) {
+ dbg (__FUNCTION__" - port not opened");
+ return -EINVAL;
+ }
+
+ num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
+ if (num_chars) {
+ dbg(__FUNCTION__"(port %d) - returns %d", port->number, num_chars);
+ }
+
+ return num_chars;
+}
+
+
+/*****************************************************************************
+ * SerialThrottle
+ * this function is called by the tty driver when it wants to stop the data
+ * being read from the port.
+ *****************************************************************************/
+static void edge_throttle (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ struct tty_struct *tty;
+ int status;
+
+ dbg(__FUNCTION__" - port %d", port->number);
+
+ if (!edge_port->open) {
+ dbg (__FUNCTION__" - port not opened");
+ return;
+ }
+
+ tty = port->tty;
+
+ /* if we are implementing XON/XOFF, send the stop character */
+ if (I_IXOFF(tty)) {


+ unsigned char stop_char = STOP_CHAR(tty);

+ status = edge_write (port, 0, &stop_char, 1);
+ if (status <= 0) {


+ return;
+ }
+ }
+

+ /* if we are implementing RTS/CTS, toggle that line */


+ if (tty->termios->c_cflag & CRTSCTS) {

+ edge_port->shadowMCR &= ~MCR_RTS;


+ status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+ if (status != 0) {
+ return;
+ }
+ }
+

+ return;
+}
+
+

+/*****************************************************************************
+ * edge_unthrottle
+ * this function is called by the tty driver when it wants to resume the data
+ * being read from the port (called after SerialThrottle is called)
+ *****************************************************************************/
+static void edge_unthrottle (struct usb_serial_port *port)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ struct tty_struct *tty;
+ int status;
+
+ dbg(__FUNCTION__" - port %d", port->number);
+
+ if (!edge_port->open) {
+ dbg (__FUNCTION__" - port not opened");
+ return;
+ }
+
+ tty = port->tty;
+
+ /* if we are implementing XON/XOFF, send the start character */
+ if (I_IXOFF(tty)) {


+ unsigned char start_char = START_CHAR(tty);

+ status = edge_write (port, 0, &start_char, 1);
+ if (status <= 0) {


+ return;
+ }
+ }
+

+ /* if we are implementing RTS/CTS, toggle that line */


+ if (tty->termios->c_cflag & CRTSCTS) {

+ edge_port->shadowMCR |= MCR_RTS;


+ status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+ if (status != 0) {
+ return;
+ }
+ }
+

+ return;
+}
+
+

+/*****************************************************************************
+ * SerialSetTermios
+ * this function is called by the tty driver when it wants to change the termios structure
+ *****************************************************************************/
+static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ struct tty_struct *tty = port->tty;
+ unsigned int cflag = tty->termios->c_cflag;
+
+ dbg(__FUNCTION__" - clfag %08x %08x iflag %08x %08x",
+ tty->termios->c_cflag,
+ old_termios->c_cflag,
+ RELEVANT_IFLAG(tty->termios->c_iflag),
+ RELEVANT_IFLAG(old_termios->c_iflag)
+ );
+
+ /* check that they really want us to change something */
+ if (old_termios) {
+ if ((cflag == old_termios->c_cflag) &&
+ (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
+ dbg(__FUNCTION__" - nothing to change");


+ return;
+ }
+ }
+

+ dbg(__FUNCTION__" - port %d", port->number);
+
+ if (!edge_port->open) {
+ dbg (__FUNCTION__" - port not opened");
+ return;
+ }
+
+ /* change the port settings to the new ones specified */
+ change_port_settings (edge_port, old_termios);


+
+ return;
+}
+
+

+/*****************************************************************************
+ * get_lsr_info - get line status register info
+ *
+ * Purpose: Let user call ioctl() to get info when the UART physically
+ * is emptied. On bus types like RS485, the transmitter must
+ * release the bus after transmitting. This must be done when
+ * the transmit shift register is empty, not be done when the
+ * transmit holding register is empty. This functionality
+ * allows an RS485 driver to be written in user space.
+ *****************************************************************************/
+static int get_lsr_info(struct edgeport_port *edge_port, unsigned int *value)
+{
+ unsigned int result = 0;
+
+ if (edge_port->maxTxCredits == edge_port->txCredits &&
+ edge_port->txfifo.count == 0) {
+ dbg(__FUNCTION__" -- Empty");
+ result = TIOCSER_TEMT;
+ }
+
+ if (copy_to_user(value, &result, sizeof(int)))
+ return -EFAULT;


+ return 0;
+}
+

+static int get_number_bytes_avail(struct edgeport_port *edge_port, unsigned int *value)
+{
+ unsigned int result = 0;
+ struct tty_struct *tty = edge_port->port->tty;
+
+ result = tty->read_cnt;
+
+ dbg(__FUNCTION__"(%d) = %d", edge_port->port->number, result);
+ if (copy_to_user(value, &result, sizeof(int)))
+ return -EFAULT;
+ //return 0;
+ return -ENOIOCTLCMD;
+}
+
+static int set_modem_info(struct edgeport_port *edge_port, unsigned int *value)
+{
+ unsigned int mcr = edge_port->shadowMCR;
+ unsigned int arg;
+
+ if (copy_from_user(&arg, value, sizeof(int)))
+ return -EFAULT;
+
+ // turn off the RTS and DTR
+ mcr &= ~(MCR_RTS | MCR_DTR);
+
+ mcr |= ((arg & TIOCM_RTS) ? MCR_RTS : 0);
+ mcr |= ((arg & TIOCM_DTR) ? MCR_DTR : 0);
+
+ edge_port->shadowMCR = mcr;
+
+ send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR);
+


+ return 0;
+}
+

+static int get_modem_info(struct edgeport_port *edge_port, unsigned int *value)
+{
+ unsigned int result = 0;
+ unsigned int msr = edge_port->shadowMSR;
+ unsigned int mcr = edge_port->shadowMCR;
+
+ result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */
+ | ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */
+ | ((msr & MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */
+ | ((msr & MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */
+ | ((msr & MSR_RI) ? TIOCM_RI: 0) /* 0x080 */
+ | ((msr & MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
+
+
+ dbg(__FUNCTION__" -- %x", result);
+
+ if (copy_to_user(value, &result, sizeof(int)))
+ return -EFAULT;


+ return 0;
+}
+
+
+

+static int get_serial_info(struct edgeport_port *edge_port, struct serial_struct * retinfo)


+{
+ struct serial_struct tmp;
+
+ if (!retinfo)

+ return -EFAULT;
+


+ memset(&tmp, 0, sizeof(tmp));
+

+ tmp.type = PORT_16550A;
+ tmp.line = edge_port->port->serial->minor;
+ tmp.port = edge_port->port->number;
+ tmp.irq = 0;
+ tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
+ tmp.xmit_fifo_size = edge_port->maxTxCredits;
+ tmp.baud_base = 9600;
+ tmp.close_delay = 5*HZ;
+ tmp.closing_wait = 30*HZ;
+// tmp.custom_divisor = state->custom_divisor;
+// tmp.hub6 = state->hub6;
+// tmp.io_type = state->io_type;
+
+
+ if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
+ return -EFAULT;


+ return 0;
+}
+
+
+

+/*****************************************************************************
+ * SerialIoctl
+ * this function handles any ioctl calls to the driver
+ *****************************************************************************/
+static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ struct async_icount cnow;
+ struct async_icount cprev;
+ struct serial_icounter_struct icount;
+ unsigned long flags;
+
+
+ dbg(__FUNCTION__" - port %d, cmd = 0x%x", port->number, cmd);
+
+ switch (cmd) {
+ // return number of bytes available
+ case TIOCINQ:
+ dbg(__FUNCTION__" (%d) TIOCINQ", port->number);
+ return get_number_bytes_avail(edge_port, (unsigned int *) arg);
+ break;
+
+// case TCGETS:
+// dbg(__FUNCTION__" (%d) TCGETS", port->number);
+// break;
+
+// case TCSETS:
+// dbg(__FUNCTION__" (%d) TCSETS", port->number);
+// break;
+
+ case TIOCSERGETLSR:
+ dbg(__FUNCTION__" (%d) TIOCSERGETLSR", port->number);
+ return get_lsr_info(edge_port, (unsigned int *) arg);
+ return 0;
+
+ case TIOCMSET:
+ dbg(__FUNCTION__" (%d) TIOCMSET", port->number);
+ return set_modem_info(edge_port, (unsigned int *) arg);
+
+ case TIOCMGET:
+ dbg(__FUNCTION__" (%d) TIOCMGET", port->number);
+ return get_modem_info(edge_port, (unsigned int *) arg);
+
+ case TIOCGSERIAL:
+ dbg(__FUNCTION__" (%d) TIOCGSERIAL", port->number);
+ return get_serial_info(edge_port, (struct serial_struct *) arg);
+
+ case TIOCSSERIAL:
+ dbg(__FUNCTION__" (%d) TIOCSSERIAL", port->number);
+ break;
+
+ case TIOCMIWAIT:
+ dbg(__FUNCTION__" (%d) TIOCMIWAIT", port->number);
+ save_flags(flags); cli();
+ cprev = edge_port->icount;
+ restore_flags(flags);
+ while (1) {
+ interruptible_sleep_on(&edge_port->delta_msr_wait);
+ /* see if a signal did it */
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ save_flags(flags); cli();
+ cnow = edge_port->icount; /* atomic copy */
+ restore_flags(flags);
+ if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+ cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
+ return -EIO; /* no change => error */
+ if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+ ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+ ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
+ ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
+ return 0;
+ }
+ cprev = cnow;
+ }
+ /* NOTREACHED */
+ break;
+
+ case TIOCGICOUNT:
+ save_flags(flags); cli();
+ cnow = edge_port->icount;
+ restore_flags(flags);
+ icount.cts = cnow.cts;
+ icount.dsr = cnow.dsr;
+ icount.rng = cnow.rng;
+ icount.dcd = cnow.dcd;
+ icount.rx = cnow.rx;
+ icount.tx = cnow.tx;
+ icount.frame = cnow.frame;
+ icount.overrun = cnow.overrun;
+ icount.parity = cnow.parity;
+ icount.brk = cnow.brk;
+ icount.buf_overrun = cnow.buf_overrun;
+
+ dbg(__FUNCTION__" (%d) TIOCGICOUNT RX=%d, TX=%d", port->number, icount.rx, icount.tx );
+ if (copy_to_user((void *)arg, &icount, sizeof(icount)))
+ return -EFAULT;


+ return 0;
+ }
+

+ return -ENOIOCTLCMD;
+}
+
+
+/*****************************************************************************
+ * SerialBreak
+ * this function sends a break to the port
+ *****************************************************************************/
+static void edge_break (struct usb_serial_port *port, int break_state)
+{
+ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
+ int status;
+
+ /* flush and chase */
+ edge_port->chaseResponsePending = TRUE;
+
+ dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
+ status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
+ if (status == 0) {
+ // block until chase finished
+ block_until_chase_response(edge_port);
+ } else {
+ edge_port->chaseResponsePending = FALSE;
+ }
+
+ if (break_state == -1) {
+ dbg(__FUNCTION__" - Sending IOSP_CMD_SET_BREAK");
+ status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0);
+ } else {
+ dbg(__FUNCTION__" - Sending IOSP_CMD_CLEAR_BREAK");
+ status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0);
+ }
+ if (status) {
+ dbg(__FUNCTION__" - error sending break set/clear command.");
+ }


+
+ return;
+}
+
+

+/*****************************************************************************
+ * process_rcvd_data
+ * this function handles the data received on the bulk in pipe.
+ *****************************************************************************/
+static int process_rcvd_data (struct edgeport_serial *edge_serial, unsigned char * buffer, __u16 bufferLength)
+{
+ struct usb_serial_port *port;
+ struct edgeport_port *edge_port;
+ struct tty_struct *tty;
+ __u16 lastBufferLength;
+ __u16 rxLen;
+ int i;
+
+ dbg(__FUNCTION__);
+
+ lastBufferLength = bufferLength + 1;
+
+ while (bufferLength > 0) {
+ /* failsafe incase we get a message that we don't understand */
+ if (lastBufferLength == bufferLength) {
+ dbg(__FUNCTION__" - stuck in loop, exiting it.");
+ break;
+ }
+ lastBufferLength = bufferLength;
+
+ switch (edge_serial->rxState) {
+ case EXPECT_HDR1:
+ edge_serial->rxHeader1 = *buffer;
+ ++buffer;
+ --bufferLength;
+
+ if (bufferLength == 0) {
+ edge_serial->rxState = EXPECT_HDR2;
+ break;
+ }
+ /* otherwise, drop on through */
+
+ case EXPECT_HDR2:
+ edge_serial->rxHeader2 = *buffer;
+ ++buffer;
+ --bufferLength;
+
+ dbg(__FUNCTION__" - Hdr1=%02X Hdr2=%02X", edge_serial->rxHeader1, edge_serial->rxHeader2);
+
+ // Process depending on whether this header is
+ // data or status
+
+ if (IS_CMD_STAT_HDR(edge_serial->rxHeader1)) {
+ // Decode this status header and goto EXPECT_HDR1 (if we
+ // can process the status with only 2 bytes), or goto
+ // EXPECT_HDR3 to get the third byte.
+
+ edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
+ edge_serial->rxStatusCode = IOSP_GET_STATUS_CODE(edge_serial->rxHeader1);
+
+ if (!IOSP_STATUS_IS_2BYTE(edge_serial->rxStatusCode)) {
+ // This status needs additional bytes. Save what we have
+ // and then wait for more data.
+ edge_serial->rxStatusParam = edge_serial->rxHeader2;
+
+ edge_serial->rxState = EXPECT_HDR3;
+ break;
+ }
+
+ // We have all the header bytes, process the status now
+ process_rcvd_status (edge_serial, edge_serial->rxHeader2, 0);
+
+ edge_serial->rxState = EXPECT_HDR1;
+ break;
+ } else {
+ edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
+ edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2);
+
+ dbg(__FUNCTION__" - Data for Port %u Len %u", edge_serial->rxPort, edge_serial->rxBytesRemaining);
+
+ //ASSERT( DevExt->RxPort < DevExt->NumPorts );
+ //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH );
+
+ if (bufferLength == 0 ) {
+ edge_serial->rxState = EXPECT_DATA;
+ break;
+ }
+ // Else, drop through
+ }
+
+ case EXPECT_DATA: // Expect data
+
+ if (bufferLength < edge_serial->rxBytesRemaining) {
+ rxLen = bufferLength;
+ edge_serial->rxState = EXPECT_DATA; // Expect data to start next buffer
+ } else {
+ // BufLen >= RxBytesRemaining
+ rxLen = edge_serial->rxBytesRemaining;
+ edge_serial->rxState = EXPECT_HDR1; // Start another header next time
+ }
+
+ bufferLength -= rxLen;
+ edge_serial->rxBytesRemaining -= rxLen;
+
+ /* spit this data back into the tty driver if this port is open */
+ if (rxLen) {
+ port = &edge_serial->serial->port[edge_serial->rxPort];
+ if (port_paranoia_check (port, __FUNCTION__) == 0) {
+ edge_port = (struct edgeport_port *)port->private;
+ if (edge_port->open) {


+ tty = edge_port->port->tty;

+ if (tty) {
+ dbg (__FUNCTION__" - Sending %d bytes to TTY for port %d", rxLen, edge_serial->rxPort);
+ for (i = 0; i < rxLen ; ++i) {
+ /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }
+ /* this doesn't actually push the data through unless tty->low_latency is set */
+ tty_insert_flip_char(tty, buffer[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+ edge_port->icount.rx += rxLen;
+ }
+ }
+ buffer += rxLen;
+ }
+
+ break;
+
+ case EXPECT_HDR3: // Expect 3rd byte of status header
+ edge_serial->rxHeader3 = *buffer;
+ ++buffer;
+ --bufferLength;
+
+ // We have all the header bytes, process the status now
+ process_rcvd_status (edge_serial, edge_serial->rxStatusParam, edge_serial->rxHeader3);
+ edge_serial->rxState = EXPECT_HDR1;


+ break;
+
+ }
+ }
+

+ return 0;
+}
+
+

+/*****************************************************************************
+ * process_rcvd_status
+ * this function handles the any status messages received on the bulk in pipe.
+ *****************************************************************************/
+static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2, __u8 byte3)
+{
+ struct usb_serial_port *port;
+ struct edgeport_port *edge_port;
+ __u8 code = edge_serial->rxStatusCode;
+
+ /* switch the port pointer to the one being currently talked about */
+ port = &edge_serial->serial->port[edge_serial->rxPort];
+ if (port_paranoia_check (port, __FUNCTION__)) {
+ return;
+ }
+ edge_port = (struct edgeport_port *)port->private;


+ if (edge_port == NULL) {

+ err (__FUNCTION__ " - edge_port == NULL for port %d", edge_serial->rxPort);
+ return;
+ }
+
+ dbg(__FUNCTION__" - port %d", edge_serial->rxPort);
+
+ if (code == IOSP_EXT_STATUS) {
+ switch (byte2) {
+ case IOSP_EXT_STATUS_CHASE_RSP:
+ // we want to do EXT status regardless of port open/closed
+ dbg(__FUNCTION__" - Port %u EXT CHASE_RSP Data = %02x", edge_serial->rxPort, byte3 );
+ // Currently, the only EXT_STATUS is Chase, so process here instead of one more call
+ // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do.
+ // Also, we currently clear flag and close the port regardless of content of above's Byte3.
+ // We could choose to do something else when Byte3 says Timeout on Chase from Edgeport,
+ // like wait longer in block_until_chase_response, but for now we don't.
+ edge_port->chaseResponsePending = FALSE;
+ wake_up_interruptible (&edge_port->wait_chase);
+ return;
+
+ case IOSP_EXT_STATUS_RX_CHECK_RSP:
+ dbg( __FUNCTION__" ========== Port %u CHECK_RSP Sequence = %02x =============\n", edge_serial->rxPort, byte3 );
+ //Port->RxCheckRsp = TRUE;


+ return;
+ }
+ }
+

+ if (code == IOSP_STATUS_OPEN_RSP) {
+ edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
+ edge_port->maxTxCredits = edge_port->txCredits;
+ dbg (__FUNCTION__" - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", edge_serial->rxPort, byte2, edge_port->txCredits);
+ handle_new_msr (edge_port, byte2);
+
+ /* send the current line settings to the port so we are in sync with any further termios calls */
+ change_port_settings (edge_port, edge_port->port->tty->termios);
+
+ /* we have completed the open */
+ edge_port->openPending = FALSE;
+ edge_port->open = TRUE;
+ wake_up_interruptible(&edge_port->wait_open);
+ return;
+ }
+
+ // If port is closed, silently discard all rcvd status. We can
+ // have cases where buffered status is received AFTER the close
+ // port command is sent to the Edgeport.
+ if ((!edge_port->open ) || (edge_port->closePending)) {
+ return;
+ }
+
+ switch (code) {
+ // Not currently sent by Edgeport
+ case IOSP_STATUS_LSR:
+ dbg(__FUNCTION__" - Port %u LSR Status = %02x", edge_serial->rxPort, byte2);
+ handle_new_lsr (edge_port, FALSE, byte2, 0);
+ break;
+
+ case IOSP_STATUS_LSR_DATA:
+ dbg(__FUNCTION__" - Port %u LSR Status = %02x, Data = %02x", edge_serial->rxPort, byte2, byte3);
+ // byte2 is LSR Register
+ // byte3 is broken data byte
+ handle_new_lsr (edge_port, TRUE, byte2, byte3);
+ break;
+ //
+ // case IOSP_EXT_4_STATUS:
+ // dbg(__FUNCTION__" - Port %u LSR Status = %02x Data = %02x", edge_serial->rxPort, byte2, byte3);
+ // break;
+ //
+ case IOSP_STATUS_MSR:
+ dbg(__FUNCTION__" - Port %u MSR Status = %02x", edge_serial->rxPort, byte2);
+
+ // Process this new modem status and generate appropriate
+ // events, etc, based on the new status. This routine
+ // also saves the MSR in Port->ShadowMsr.
+ handle_new_msr(edge_port, byte2);


+ break;
+
+ default:

+ dbg(__FUNCTION__" - Unrecognized IOSP status code %u\n", code);
+ break;
+ }
+
+ return;
+}
+
+
+/*****************************************************************************
+ * handle_new_msr
+ * this function handles any change to the msr register for a port.
+ *****************************************************************************/
+static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr)
+{
+ struct async_icount *icount;
+
+ dbg(__FUNCTION__" %02x", newMsr);
+
+ if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
+ icount = &edge_port->icount;
+
+ /* update input line counters */
+ if (newMsr & MSR_DELTA_CTS) {
+ icount->cts++;
+ }
+ if (newMsr & MSR_DELTA_DSR) {
+ icount->dsr++;
+ }
+ if (newMsr & MSR_DELTA_CD) {
+ icount->dcd++;
+ }
+ if (newMsr & MSR_DELTA_RI) {
+ icount->rng++;
+ }
+ wake_up_interruptible(&edge_port->delta_msr_wait);
+ }
+
+ /* Save the new modem status */
+ edge_port->shadowMSR = newMsr & 0xf0;


+
+ return;
+}
+
+

+/*****************************************************************************
+ * handle_new_lsr
+ * this function handles any change to the lsr register for a port.
+ *****************************************************************************/
+static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData, __u8 lsr, __u8 data)
+{
+ __u8 newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
+ struct async_icount *icount;
+
+ dbg(__FUNCTION__" - %02x", newLsr);
+
+ edge_port->shadowLSR = lsr;
+
+ if (newLsr & LSR_BREAK) {
+ //
+ // Parity and Framing errors only count if they
+ // occur exclusive of a break being
+ // received.
+ //
+ newLsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK);
+ }
+
+ /* Place LSR data byte into Rx buffer */
+ if (lsrData) {
+ tty_insert_flip_char(edge_port->port->tty, data, 0);
+ tty_flip_buffer_push(edge_port->port->tty);
+ }
+
+ /* update input line counters */
+ icount = &edge_port->icount;
+ if (newLsr & LSR_BREAK) {
+ icount->brk++;
+ }
+ if (newLsr & LSR_OVER_ERR) {
+ icount->overrun++;
+ }
+ if (newLsr & LSR_PAR_ERR) {
+ icount->parity++;
+ }
+ if (newLsr & LSR_FRM_ERR) {
+ icount->frame++;
+ }


+
+ return;
+}
+
+
+/****************************************************************************

+ * sram_write
+ * writes a number of bytes to the Edgeport device's sram starting at the
+ * given address.
+ * If successful returns the number of bytes written, otherwise it returns


+ * a negative error number of the problem.
+ ****************************************************************************/

+static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data)


+{
+ int result;
+ __u16 current_length;
+ unsigned char *transfer_buffer;
+

+// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);


+
+ transfer_buffer = kmalloc (64, GFP_KERNEL);
+ if (!transfer_buffer) {
+ err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
+ return -ENOMEM;
+ }
+

+ /* need to split these writes up into 64 byte chunks */


+ result = 0;
+ while (length > 0) {
+ if (length > 64) {
+ current_length = 64;
+ } else {
+ current_length = length;
+ }

+// dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
+ memcpy (transfer_buffer, data, current_length);
+ result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM,
+ 0x40, addr, extAddr, transfer_buffer, current_length, 300);


+ if (result < 0)
+ break;

+ length -= current_length;
+ addr += current_length;
+ data += current_length;
+ }
+
+ kfree (transfer_buffer);
+ return result;
+}
+
+
+/****************************************************************************

+ * rom_write
+ * writes a number of bytes to the Edgeport device's ROM starting at the
+ * given address.
+ * If successful returns the number of bytes written, otherwise it returns


+ * a negative error number of the problem.
+ ****************************************************************************/

+static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data)


+{
+ int result;
+ __u16 current_length;
+ unsigned char *transfer_buffer;
+

+// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);


+
+ transfer_buffer = kmalloc (64, GFP_KERNEL);
+ if (!transfer_buffer) {
+ err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
+ return -ENOMEM;
+ }
+

+ /* need to split these writes up into 64 byte chunks */


+ result = 0;
+ while (length > 0) {
+ if (length > 64) {
+ current_length = 64;
+ } else {
+ current_length = length;
+ }

+// dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
+ memcpy (transfer_buffer, data, current_length);
+ result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM,
+ 0x40, addr, extAddr, transfer_buffer, current_length, 300);


+ if (result < 0)
+ break;

+ length -= current_length;
+ addr += current_length;
+ data += current_length;
+ }

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 68'
echo 'File patch-2.2.20 is continued in part 69'
echo "69" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:09 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part70

#!/bin/sh -x
# this is part 70 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 70; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0b, 0x2a, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0a, 0x47, 0x12, 0x1a, 0xc9, 0x7e, 0x68, 0x0b, 0x79, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x6c, 0x77, 0xda, 0x6b, 0xca, 0x6b, 0x0b, 0x70, 0x0e, 0xc4,
+ 0xbe, 0xc4, 0xff, 0xff, 0x78, 0xf6, 0x1b, 0x70, 0x0a, 0x47, 0x12, 0x1a, 0xc9, 0x12, 0x1a, 0x08,
+ 0x30, 0x09, 0x30, 0xda, 0x6b, 0xda, 0x5b, 0x6c, 0xbb, 0x7e, 0x78, 0x00, 0x00, 0x7d, 0xfa, 0x5e,
+ 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d,
+ 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b,
+ 0xb0, 0x80, 0xd4, 0x7e, 0x68, 0x0a, 0xb6, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x30, 0x17,
+ 0x0e, 0x7e, 0x78,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, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0xe4, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x13, 0x03,
+ 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xef, 0x30, 0x00, 0x03, 0x02, 0x18, 0xb7, 0x02, 0x13, 0xbb,
+ 0x74, 0x07, 0x19, 0xb2, 0x00, 0x08, 0x12, 0x19, 0xfb, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00,
+ 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00,
+ 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xc2, 0x0b, 0x7e, 0xb0, 0x55, 0x12, 0x13,
+ 0x64, 0x7e, 0xb0, 0xaa, 0x12, 0x13, 0x64, 0x7e, 0xb0, 0x00, 0x12, 0x13, 0x64, 0x7e, 0xb0, 0xff,
+ 0x12, 0x13, 0x64, 0x30, 0x0b, 0x0f, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a,
+ 0x93, 0x12, 0x1a, 0x08, 0x22, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93,
+ 0x22, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xa2, 0x00, 0x00, 0xbc, 0xab, 0x78, 0x01,
+ 0x22, 0x20, 0x09, 0x03, 0xd2, 0x0b, 0x22, 0x12, 0x1a, 0x08, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19,
+ 0xee, 0x09, 0xa2, 0x00, 0x00, 0x80, 0xf3, 0xd2, 0x92, 0x12, 0x19, 0xee, 0xc2, 0x92, 0x12, 0x19,
+ 0xee, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x74, 0x80, 0x19, 0xb2, 0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19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90, 0x78,
+ 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e, 0x68,
+ 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f, 0x7e,
+ 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24,
+ 0x01, 0x00, 0xa5, 0xd9, 0xa2, 0x02, 0x18, 0xb7, 0x30, 0x17, 0x03, 0x02, 0x19, 0x3b, 0xc2, 0x8a,
+ 0x12, 0x19, 0x22, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x04,
+ 0x12, 0x19, 0xee, 0x0b, 0x00, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x20,
+ 0x8b, 0x3e, 0x20, 0x89, 0x3b, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x04, 0x09, 0xa2, 0x00, 0x10,
+ 0x4e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x30, 0x8b, 0x23, 0x30, 0x89, 0x20,
+ 0x09, 0xa2, 0x00, 0x10, 0x5e, 0xa0, 0xfd, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x7e, 0xa0,
+ 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x20, 0x8b, 0x05, 0x20, 0x89, 0x02, 0x80, 0x1a,
+ 0x12, 0x1a, 0x08, 0x30, 0x09, 0x14, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x5e,
+ 0xa0, 0xfd, 0x19, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x80, 0xec, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9,
+ 0x89, 0x02, 0x19, 0x3b, 0x20, 0x17, 0xfa, 0x12, 0x13, 0x8a, 0x12, 0x19, 0x22, 0x7e, 0x24, 0x80,
+ 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x20, 0x89, 0x26, 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04,
+ 0x12, 0x19, 0xee, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x30, 0x89, 0x0f,
+ 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x20, 0x89, 0x02, 0x80, 0x26, 0x12,
+ 0x1a, 0x08, 0x30, 0x09, 0x20, 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x7e,
+ 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04,
+ 0x12, 0x19, 0xee, 0x80, 0xe0, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xa8, 0x02, 0x19, 0x3b, 0x7e,
+ 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee,
+ 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xef, 0x22, 0x30, 0x0a, 0x19, 0x7e, 0x68, 0x0d, 0xf5, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0xd2, 0x09, 0x12, 0x19, 0xee, 0x12, 0x19, 0xee, 0x12, 0x19,
+ 0xee, 0x02, 0x0f, 0x10, 0x30, 0x17, 0x1c, 0x7e, 0x68, 0x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, 0xb1, 0x40, 0x2c, 0x53, 0x90, 0xcf, 0xd2,
+ 0x08, 0x7e, 0x04, 0x00, 0x08, 0x7e, 0x14, 0x00, 0x00, 0x84, 0xa5, 0xdb, 0xfc, 0xa5, 0xda, 0xf9,
+ 0xa5, 0xd9, 0xf6, 0x74, 0x40, 0x12, 0x1b, 0xb1, 0x40, 0x0e, 0x7e, 0x68, 0x0e, 0xc0, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x1a, 0x93, 0x02, 0x19, 0xe6, 0xc2, 0x95, 0xd2, 0x94, 0x80, 0xfe, 0xf5, 0x0a,
+ 0x7e, 0x78, 0x00, 0x0a, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0x01,
+ 0x7e, 0x74, 0x00, 0x01, 0x02, 0x08, 0xd6,
+};
+
+static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
+ 1, 12, 2 }; // Major, Minor, Build
+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_fw_boot2.h linux/drivers/usb/serial/io_fw_boot2.h
--- v2.2.19/drivers/usb/serial/io_fw_boot2.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_fw_boot2.h Wed Oct 10 01:41:30 2001
@@ -0,0 +1,548 @@

+ 0x02, 0x02, 0x56,

+
+// Segment #4, Start Address 00ff001b, Length 3
+0xff,0x00,0x1b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x1b,
+
+// Segment #5, Start Address 00ff0023, Length 3
+0xff,0x00,0x23,0x00,0x03,0x00,
+ 0x02, 0x00, 0x23,
+
+// Segment #6, Start Address 00ff002b, Length 3
+0xff,0x00,0x2b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x2b,
+
+// Segment #7, Start Address 00ff0033, Length 3
+0xff,0x00,0x33,0x00,0x03,0x00,
+ 0x02, 0x00, 0x33,
+
+// Segment #8, Start Address 00ff003b, Length 3
+0xff,0x00,0x3b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x3b,
+
+// Segment #9, Start Address 00ff0043, Length 3
+0xff,0x00,0x43,0x00,0x03,0x00,

+ 0x02, 0x00, 0x43,

+
+// Segment #10, Start Address 00ff004b, Length 3
+0xff,0x00,0x4b,0x00,0x03,0x00,

+ 0x02, 0x00, 0x4b,

+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,

+ 0x02, 0x01, 0xf5,

+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+

+// Segment #13, Start Address 00ff0080, Length 534
+0xff,0x00,0x80,0x00,0x16,0x02,
+ 0x7e, 0xb3, 0x91, 0x01, 0x20, 0xe3, 0x0c, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f,
+ 0xf2, 0x80, 0x0a, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x74, 0x00, 0x7a,
+ 0xb3, 0x91, 0x00, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x7e, 0xf8, 0x00, 0x24, 0x7e, 0x00, 0x01,
+ 0x7e, 0x10, 0x00, 0x12, 0x09, 0xd0, 0x69, 0x20, 0x00, 0x0a, 0x5e, 0x40, 0x1f, 0xbe, 0x24, 0x00,
+ 0x00, 0x78, 0x09, 0x7e, 0x00, 0x03, 0x7a, 0x03, 0x90, 0x00, 0x80, 0x07, 0x7e, 0x00, 0x02, 0x7a,
+ 0x03, 0x90, 0x00, 0x75, 0xb0, 0xdf, 0x7e, 0x00, 0x01, 0x7a, 0x03, 0x94, 0x00, 0x7a, 0x03, 0x01,
+ 0x24, 0x7e, 0x00, 0x01, 0x7a, 0x03, 0x93, 0x00, 0x7e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,
+ 0x02, 0x4d, 0x22, 0x78, 0x03, 0x7e, 0x60, 0x03, 0x7c, 0x76, 0x7e, 0x04, 0x28, 0x00, 0x8d, 0xef,
+ 0x1b, 0x04, 0x78, 0xfa, 0x04, 0x7e, 0x20, 0x07, 0x7a, 0x23, 0x91, 0x06, 0x7e, 0x23, 0x91, 0x07,
+ 0x7e, 0x31, 0x0a, 0xbc, 0x32, 0x68, 0x22, 0x7a, 0x21, 0x0a, 0x7e, 0x21, 0x09, 0x68, 0x17, 0xca,
+ 0xb8, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x44, 0x02, 0x7a, 0xb3, 0x91,
+ 0x07, 0xda, 0xb8, 0x75, 0x09, 0x00, 0x30, 0xe0, 0xc1, 0x6c, 0x67, 0x7a, 0x63, 0x90, 0x00, 0x80,
+ 0xb9, 0xbe, 0xb0, 0x02, 0x22, 0xc0, 0xd0, 0x75, 0x08, 0xfe, 0x12, 0x0a, 0xc0, 0x74, 0x02, 0x7a,
+ 0xb3, 0x91, 0x06, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74,
+ 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x04, 0x7e, 0xb3, 0x3f, 0xf2, 0x30,
+ 0xe0, 0x08, 0x74, 0x18, 0x7a, 0xb3, 0x91, 0x01, 0x80, 0x06, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x01,
+ 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x04, 0x02, 0x02, 0x36, 0x75, 0x08, 0xff, 0x12, 0x0a, 0xc0, 0x74,
+ 0x01, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x54,
+ 0xfc, 0x7a, 0xb3, 0x91, 0x07, 0x32, 0xca, 0xb8, 0x75, 0x08, 0x02, 0x12, 0x0a, 0xc0, 0x7e, 0xb3,
+ 0x91, 0x03, 0x20, 0xe5, 0x08, 0x30, 0xe0, 0x2b, 0x12, 0x02, 0x9e, 0x80, 0xf1, 0x7e, 0xb3, 0x91,
+ 0x04, 0x30, 0xe0, 0x05, 0xda, 0xb8, 0x02, 0x02, 0x39, 0x30, 0xe1, 0x05, 0xda, 0xb8, 0x02, 0x01,
+ 0xf5, 0x30, 0xe6, 0x05, 0x12, 0x04, 0x03, 0x80, 0xd5, 0x30, 0xe2, 0x05, 0xda, 0xb8, 0x02, 0x00,
+ 0x80, 0x80, 0xcb, 0xda, 0xb8, 0x32,
+
+// Segment #14, EXCLUDED Start Address 00ff31d7, Length 1
+
+
+// Segment #15, Start Address 00ff0296, Length 2090
+0xff,0x00,0x96,0x02,0x2a,0x08,
+ 0xe4, 0x7a, 0xb3, 0x3f, 0xf1, 0x02, 0x03, 0x41, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b,
+ 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00,
+ 0x7e, 0xb3, 0x01, 0x2e, 0xb4, 0x00, 0x02, 0x80, 0x1c, 0xb4, 0x01, 0x19, 0x7e, 0xb3, 0x91, 0x14,
+ 0x54, 0x14, 0x68, 0x05, 0x12, 0x03, 0x05, 0x80, 0x23, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x1c,
+ 0x12, 0x04, 0x43, 0x80, 0x17, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x05, 0x12, 0x04, 0x43, 0x80,
+ 0x0b, 0x7e, 0xb3, 0x91, 0x14, 0x54, 0x14, 0x68, 0x03, 0x12, 0x03, 0x05, 0xda, 0xeb, 0xda, 0x7b,
+ 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0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 0x05, 0x26, 0x22,
+ 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x01, 0x35, 0x7a, 0x03, 0x01, 0x30, 0x7e, 0xb3,
+ 0x01, 0x25, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x01, 0x2f, 0x7a, 0x33, 0x01, 0x2e, 0xbe, 0x07, 0x01,
+ 0x2b, 0x68, 0x09, 0x22, 0x7a, 0x33, 0x01, 0x2f, 0x7a, 0x23, 0x01, 0x2e, 0x7e, 0xb3, 0x01, 0x25,
+ 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5,
+ 0x06, 0x30, 0xe4, 0x03, 0x02, 0x09, 0x8b, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25,
+ 0xf0, 0x90, 0x05, 0x7e, 0x75, 0x84, 0xff, 0x73, 0x02, 0x07, 0x39, 0x02, 0x05, 0xc6, 0x02, 0x07,
+ 0xd2, 0x02, 0x07, 0xed, 0x02, 0x06, 0xd0, 0x02, 0x06, 0x5b, 0x02, 0x08, 0x1e, 0x02, 0x08, 0x1e,
+ 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02,
+ 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x27, 0x02, 0x08, 0xf9, 0x02, 0x08,
+ 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24,
+ 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x01, 0x26,
+ 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x01, 0x27, 0x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02, 0xff, 0xca,
+ 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x20, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0x23, 0x91,
+ 0x07, 0x7e, 0x57, 0x01, 0x27, 0x4d, 0x55, 0x68, 0x05, 0x4e, 0x20, 0x02, 0x80, 0x03, 0x5e, 0x20,
+ 0xfd, 0x7a, 0x23, 0x91, 0x07, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x01, 0x29,
+ 0x7e, 0x17, 0x01, 0x27, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x03, 0x77,
+ 0x02, 0x09, 0x8b, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e,
+ 0xb3, 0x01, 0x26, 0xb4, 0x03, 0x15, 0x75, 0x08, 0xc2, 0x12, 0x0a, 0xc0, 0x7e, 0x04, 0x00, 0x01,
+ 0x7e, 0x17, 0x01, 0x27, 0x7e, 0x57, 0x01, 0x2b, 0x02, 0x03, 0x84, 0xb4, 0x05, 0x41, 0x75, 0x08,
+ 0xc0, 0x12, 0x0a, 0xc0, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x7e,
+ 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x01, 0x27, 0x7e,
+ 0x47, 0x01, 0x2b, 0x12, 0x0a, 0xcc, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8,
+ 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x01, 0x2b, 0x02, 0x03, 0x84, 0xb4,
+ 0x01, 0x20, 0x7e, 0x00, 0x00, 0x7e, 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0x7e, 0x78,
+ 0x01, 0x37, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x2b, 0xbd, 0x74, 0x78, 0x17, 0x75, 0x08,
+ 0xc1, 0x12, 0x0a, 0xc0, 0x12, 0x0b, 0x63, 0x40, 0x0c, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94,
+ 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xd3,
+ 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62,
+ 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0x03, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e,
+ 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38,
+ 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35,
+ 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff,
+ 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff,
+ 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #16, EXCLUDED Start Address 00ff7c00, Length 227


+
+
+// Segment #17, EXCLUDED Start Address 00ff7f00, Length 192
+
+
+// Segment #17, Start Address 00ff7fc0, Length 64
+0xff,0x00,0xc0,0x7f,0x40,0x00,

+ 0x40, 0x01, 0x02, 0x00, 0xd7, 0x31, 0x02, 0x00, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x01, 0x00,

+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+

+// Segment #18, Start Address 00ff0ac0, Length 4163
+0xff,0x00,0xc0,0x0a,0x43,0x10,


+ 0xca, 0x08, 0x7e, 0x01, 0x08, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x80, 0x50, 0x0b, 0x1a,
+ 0x60, 0x0b, 0x35, 0x0b, 0x1a, 0x70, 0x0b, 0x35, 0x0b, 0x1a, 0x80, 0x0b, 0x35, 0x0b, 0x1a, 0x90,
+ 0x0b, 0x35, 0x0b, 0x1a, 0xa0, 0x0b, 0x35, 0x0b, 0x1a, 0xb0, 0x0b, 0x35, 0x0b, 0x1a, 0xc0, 0x0b,
+ 0x35, 0x0b, 0x1a, 0xd0, 0x0b, 0x35, 0x1b, 0x0a, 0x60, 0x0b, 0x15, 0x1b, 0x0a, 0x70, 0x0b, 0x15,
+ 0x1b, 0x0a, 0x80, 0x0b, 0x15, 0x1b, 0x0a, 0x90, 0x0b, 0x15, 0x1b, 0x0a, 0xa0, 0x0b, 0x15, 0x1b,
+ 0x0a, 0xb0, 0x0b, 0x15, 0x1b, 0x0a, 0xc0, 0x0b, 0x15, 0x1b, 0x0a, 0xd0, 0x0b, 0x15, 0x9e, 0x44,
+ 0x00, 0x10, 0x50, 0xaa, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x0e, 0x7e, 0x1b, 0xc0, 0x7a, 0x0b, 0xc0,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, 0x36, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21,
+ 0x0b, 0x00, 0xe4, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x11, 0xaa, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9,
+ 0xef, 0x30, 0x00, 0x03, 0x02, 0x17, 0x3b, 0x02, 0x12, 0x6a, 0x74, 0x07, 0x19, 0xb2, 0x00, 0x08,
+ 0x12, 0x19, 0x0c, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09,
+ 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09,
+ 0xb2, 0x00, 0x14, 0xc2, 0x13, 0x7e, 0xb0, 0x55, 0x12, 0x12, 0x0b, 0x7e, 0xb0, 0xaa, 0x12, 0x12,
+ 0x0b, 0x7e, 0xb0, 0x00, 0x12, 0x12, 0x0b, 0x7e, 0xb0, 0xff, 0x12, 0x12, 0x0b, 0x30, 0x13, 0x0f,
+ 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x22, 0x7e,
+ 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x22, 0x19, 0xb2, 0x00, 0x00, 0x12,
+ 0x18, 0xff, 0x09, 0xa2, 0x00, 0x00, 0xbc, 0xab, 0x78, 0x01, 0x22, 0x20, 0x11, 0x03, 0xd2, 0x13,
+ 0x22, 0x12, 0x19, 0x19, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, 0xa2, 0x00, 0x00, 0x80,
+ 0xf3, 0x75, 0xb0, 0xdf, 0x12, 0x18, 0xff, 0x75, 0xb0, 0xef, 0x12, 0x18, 0xff, 0x7e, 0x24, 0x80,
+ 0x00, 0x7e, 0x11, 0x21, 0x74, 0x80, 0x19, 0xb2, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x02, 0x19, 0xa2,
+ 0x00, 0x04, 0x19, 0xb2, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb2, 0x00, 0x0c, 0x74, 0x06, 0x19, 0xb2,
+ 0x00, 0x08, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xdb, 0x22, 0x7e, 0x68, 0x2f, 0x5a, 0x7a, 0x6c,
+ 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x12, 0x18,
+ 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09,
+ 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff,
+ 0x12, 0x19, 0xc4, 0x80, 0x1a, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,
+ 0x12, 0x19, 0x19, 0x30, 0x11, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x80, 0xf7, 0x2e,
+ 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xb6, 0x7e, 0x68, 0x2f, 0x7e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19,
+ 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00,
+ 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e,
+ 0xb0, 0x0a, 0x78,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, 0xff,
+ 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10,
+ 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0,
+ 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78,
+ 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00,
+ 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 70'
echo 'File patch-2.2.20 is continued in part 71'
echo "71" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:54 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part55

#!/bin/sh -x
# this is part 55 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 55; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

@@ -263,7 +272,8 @@
X } else {
X return(-EINVAL);
X }
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str)+add_size+add_size2 ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str)+add_size+add_size2,
+ TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X
@@ -279,15 +289,15 @@
X /* do IOCTL */
X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, pcmd, cmnd, piowr->timeout);
- piord->status = (ulong32)scp->SCp.Message;
+ piord->status = (scp->SCp.Message<<16)|scp->SCp.Status;
X #else
X gdth_do_cmd(&scp, pcmd, cmnd, piowr->timeout);
- piord->status = (ulong32)scp.SCp.Message;
+ piord->status = (scp.SCp.Message<<16)|scp.SCp.Status;
X #endif
X break;
X
X case GDTIOCTL_DRVERS:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
@@ -296,25 +306,33 @@
X break;
X
X case GDTIOCTL_CTRTYPE:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
X piord->status = S_OK;
X if (ha->type == GDT_ISA || ha->type == GDT_EISA) {
X piord->iu.ctrtype.type = (unchar)((ha->stype>>20) - 0x10);
- } else if (ha->type != GDT_PCIMPR) {
- piord->iu.ctrtype.type = (unchar)((ha->stype<<8) + 6);
X } else {
- piord->iu.ctrtype.type = 0xfe;
- piord->iu.ctrtype.ext_type = 0x6000 | ha->stype;
+ if (ha->type != GDT_PCIMPR) {
+ piord->iu.ctrtype.type = (unchar)((ha->stype<<4) + 6);
+ } else {
+ piord->iu.ctrtype.type =
+ (ha->oem_id == OEM_ID_INTEL ? 0xfd : 0xfe);
+ if (ha->stype >= 0x300)
+ piord->iu.ctrtype.ext_type = 0x6000 | ha->subdevice_id;
+ else
+ piord->iu.ctrtype.ext_type = 0x6000 | ha->stype;
+ }
+ piord->iu.ctrtype.device_id = ha->stype;
+ piord->iu.ctrtype.sub_device_id = ha->subdevice_id;
X }
X piord->iu.ctrtype.info = ha->brd_phys;
- piord->iu.ctrtype.oem_id = (ushort)GDT3_ID;
+ piord->iu.ctrtype.oem_id = ha->oem_id;
X break;
X
X case GDTIOCTL_CTRCNT:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
@@ -323,7 +341,7 @@
X break;
X
X case GDTIOCTL_OSVERS:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
@@ -334,7 +352,7 @@
X break;
X
X case GDTIOCTL_LOCKDRV:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X for (i = 0; i < piowr->iu.lockdrv.drive_cnt; ++i) {
@@ -360,7 +378,7 @@
X break;
X
X case GDTIOCTL_LOCKCHN:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X i = piowr->iu.lockchn.channel;
X if (i < ha->bus_cnt) {
@@ -388,7 +406,7 @@
X break;
X
X case GDTIOCTL_EVENT:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X if (piowr->iu.event.erase == 0xff) {
@@ -423,40 +441,40 @@
X break;
X
X case GDTIOCTL_SCSI:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
X memcpy(cmnd, piowr->iu.scsi.cmd, 12);


X #if LINUX_VERSION_CODE >= 0x020322

- scp->target = scp->device->id = piowr->iu.scsi.target;
- scp->channel = scp->device->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
+ scp->target = piowr->iu.scsi.target;
+ scp->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
X scp->cmd_len = piowr->iu.scsi.cmd_len;
X gdth_do_cmd(scp, pcmd, cmnd, piowr->timeout);
- piord->status = (ulong32)scp->SCp.Message;
+ piord->status = (scp->SCp.Message<<16)|scp->SCp.Status;
X #else
- scp.target = scp.device->id = piowr->iu.scsi.target;
- scp.channel = scp.device->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
+ scp.target = piowr->iu.scsi.target;
+ scp.channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
X scp.cmd_len = piowr->iu.scsi.cmd_len;
X gdth_do_cmd(&scp, pcmd, cmnd, piowr->timeout);
- piord->status = (ulong32)scp.SCp.Message;
+ piord->status = (scp.SCp.Message<<16)|scp.SCp.Status;
X #endif
X break;
X
X case GDTIOCTL_RESET_BUS:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);


X #if LINUX_VERSION_CODE >= 0x020322

- scp->channel = scp->device->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
+ scp->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
X piord->status = (ulong32)gdth_eh_bus_reset( scp );
X if (piord->status == SUCCESS)
X piord->status = S_OK;
X else
X piord->status = S_GENERR;
X #elif LINUX_VERSION_CODE >= 0x02015F
- scp.channel = scp.device->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
+ scp.channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
X piord->status = (ulong32)gdth_eh_bus_reset( &scp );
X if (piord->status == SUCCESS)
X piord->status = S_OK;
@@ -468,7 +486,7 @@
X break;
X
X case GDTIOCTL_HDRLIST:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
@@ -479,23 +497,20 @@
X piord->iu.hdr_list[i].target = i;
X piord->iu.hdr_list[i].lun = 0;
X piord->iu.hdr_list[i].cluster_type = ha->hdr[i].cluster_type;
- if (ha->hdr[i].cluster_type & CLUSTER_DRIVE) {
- gdtcmd.BoardNode = LOCALBOARD;
+ if (ha->hdr[i].cluster_type & CLUSTER_DRIVE) {
X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_CLUST_INFO;
X gdtcmd.u.cache.DeviceNo = i;
- gdtcmd.u.cache.BlockNo = 0;


- gdtcmd.u.cache.sg_canz = 0;
X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) == S_OK)
+ if (scp->SCp.Status == S_OK)
X piord->iu.hdr_list[i].cluster_type =
- (unchar)(scp->SCp.Message>>16);
+ (unchar)scp->SCp.Message;


X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) == S_OK)
+ if (scp.SCp.Status == S_OK)
X piord->iu.hdr_list[i].cluster_type =
- (unchar)(scp.SCp.Message>>16);
+ (unchar)scp.SCp.Message;


X #endif
X }
X } else {

@@ -505,47 +520,148 @@
X break;
X
X case GDTIOCTL_RESCAN:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
X piord->status = S_OK;
- GDTH_LOCK_HA(ha, flags);
- gdth_polling = TRUE;
- while (gdth_test_busy(hanum))
- gdth_delay(0);
- /* initialize cache service */
- gdth_internal_cmd(hanum,CACHESERVICE,GDT_INIT,LINUX_OS,0,0);
- hdr_cnt = (ushort)ha->info;
+ if (piowr->iu.rescan.flag == 0) {
+ /* old method: scan all host drives
+ re-initialize cache service to get host drive count
+ */
+ gdtcmd.Service = CACHESERVICE;
+ gdtcmd.OpCode = GDT_INIT;
+ gdtcmd.u.cache.DeviceNo = LINUX_OS;
+#if LINUX_VERSION_CODE >= 0x020322
+ gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp->SCp.Status;
+ info = (ulong32)scp->SCp.Message;
+#else
+ gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp.SCp.Status;
+ info = (ulong32)scp.SCp.Message;
+#endif
+ if (status != S_OK)
+ break;
+ k = 0;
+ hdr_cnt = (ushort)info;
+ } else {
+ k = piowr->iu.rescan.hdr_no;
+ hdr_cnt = k + 1;
+ }
+ if (hdr_cnt > MAX_HDRIVES)
+ hdr_cnt = MAX_HDRIVES;
X /* scanning for host drives */
- for (k = 0; k < MAX_HDRIVES; ++k)
- ha->hdr[k].present = FALSE;
- for (k = 0; k < hdr_cnt; ++k)
- gdth_analyse_hdrive(hanum, k);
- gdth_polling = FALSE;
- GDTH_UNLOCK_HA(ha, flags);
+ for (; k < hdr_cnt; ++k) {
+ /* info about host drive */
+ gdtcmd.Service = CACHESERVICE;
+ gdtcmd.OpCode = GDT_INFO;
+ gdtcmd.u.cache.DeviceNo = k;
+#if LINUX_VERSION_CODE >= 0x020322
+ gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp->SCp.Status;
+ info = (ulong32)scp->SCp.Message;
+#else
+ gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp.SCp.Status;
+ info = (ulong32)scp.SCp.Message;
+#endif
+ GDTH_LOCK_HA(ha, flags);
+ piord->iu.hdr_list[k].bus = ha->virt_bus;
+ piord->iu.hdr_list[k].target = k;
+ piord->iu.hdr_list[k].lun = 0;
+ if (status != S_OK) {
+ ha->hdr[k].present = FALSE;
+ } else {
+ ha->hdr[k].present = TRUE;
+ ha->hdr[k].size = info;
+ /* evaluate mapping (sectors per head, heads per cylinder) */
+ ha->hdr[k].size &= ~SECS32;
+ gdth_eval_mapping(ha->hdr[k].size,&drv_cyls,&drv_hds,&drv_secs);
+ ha->hdr[k].heads = (unchar)drv_hds;
+ ha->hdr[k].secs = (unchar)drv_secs;
+ /* round size */
+ ha->hdr[k].size = drv_cyls * drv_hds * drv_secs;
+ }
+ GDTH_UNLOCK_HA(ha, flags);
+ if (status != S_OK)
+ continue; /* next host drive */
+
+ /* devtype, cluster info, R/W attributes */
+ gdtcmd.Service = CACHESERVICE;
+ gdtcmd.OpCode = GDT_DEVTYPE;
+ gdtcmd.u.cache.DeviceNo = k;
+#if LINUX_VERSION_CODE >= 0x020322
+ gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp->SCp.Status;
+ info = (ulong32)scp->SCp.Message;
+#else
+ gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp.SCp.Status;
+ info = (ulong32)scp.SCp.Message;
+#endif
+ GDTH_LOCK_HA(ha, flags);
+ ha->hdr[k].devtype = 0;
+ if (status == S_OK)
+ ha->hdr[k].devtype = (ushort)info;
+ GDTH_UNLOCK_HA(ha, flags);
+
+ gdtcmd.Service = CACHESERVICE;
+ gdtcmd.OpCode = GDT_CLUST_INFO;
+ gdtcmd.u.cache.DeviceNo = k;
+#if LINUX_VERSION_CODE >= 0x020322
+ gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp->SCp.Status;
+ info = (ulong32)scp->SCp.Message;
+#else
+ gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp.SCp.Status;
+ info = (ulong32)scp.SCp.Message;
+#endif
+ GDTH_LOCK_HA(ha, flags);
+ ha->hdr[k].cluster_type = 0;
+ if (status == S_OK && !shared_access)
+ ha->hdr[k].cluster_type = (ushort)info;
+ GDTH_UNLOCK_HA(ha, flags);
+ piord->iu.hdr_list[k].cluster_type = ha->hdr[k].cluster_type;
+
+ gdtcmd.Service = CACHESERVICE;
+ gdtcmd.OpCode = GDT_RW_ATTRIBS;
+ gdtcmd.u.cache.DeviceNo = k;
+#if LINUX_VERSION_CODE >= 0x020322
+ gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp->SCp.Status;
+ info = (ulong32)scp->SCp.Message;
+#else
+ gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
+ status = (ushort)scp.SCp.Status;
+ info = (ulong32)scp.SCp.Message;
+#endif
+ GDTH_LOCK_HA(ha, flags);
+ ha->hdr[k].rw_attribs = 0;
+ if (status == S_OK)
+ ha->hdr[k].rw_attribs = (ushort)info;
+ GDTH_UNLOCK_HA(ha, flags);
+ }
X break;
X
X case GDTIOCTL_RESET_DRV:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str) ))
+ if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE ))
X return(-EBUSY);
X piord = (gdth_iord_str *)ha->pscratch;
X piord->size = sizeof(gdth_iord_str);
X piord->status = S_OK;
X i = piowr->iu.scsi.target;
X if (ha->hdr[i].present) {


- gdtcmd.BoardNode = LOCALBOARD;
X gdtcmd.Service = CACHESERVICE;

X gdtcmd.OpCode = GDT_CLUST_RESET;
X gdtcmd.u.cache.DeviceNo = i;
- gdtcmd.u.cache.BlockNo = 0;


- gdtcmd.u.cache.sg_canz = 0;
X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- piord->status = (ulong32)scp->SCp.Message;
+ piord->status = (scp->SCp.Message<<16)|scp->SCp.Status;


X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- piord->status = (ulong32)scp.SCp.Message;
+ piord->status = (scp.SCp.Message<<16)|scp.SCp.Status;
X #endif
X }
X break;
@@ -579,6 +695,7 @@
X char hrec[161];
X struct timeval tv;
X
+ char *buf;
X gdth_dskstat_str *pds;
X gdth_diskinfo_str *pdi;
X gdth_arrayinf_str *pai;
@@ -588,6 +705,7 @@


X
X char cmnd[MAX_COMMAND_SIZE];
X memset(cmnd, 0xff, 12);
+ memset(&gdtcmd, 0, sizeof(gdth_cmd_str));
X

X TRACE2(("gdth_get_info() ha %d bus %d\n",hanum,busnum));


X ha = HADATA(gdth_ctr_tab[hanum]);

@@ -595,6 +713,8 @@


X #if LINUX_VERSION_CODE >= 0x020322
X sdev = scsi_get_host_dev(gdth_ctr_vtab[vh]);
X scp = scsi_allocate_device(sdev, 1, FALSE);
+ if (!scp)
+ return -ENOMEM;
X scp->cmd_len = 12;
X scp->use_sg = 0;
X #else

@@ -631,13 +751,6 @@
X max_ids, hdr_channel);
X len += size; pos = begin + len;
X
- if (pos < offset) {
- len = 0;
- begin = pos;
- }
- if (pos > offset + length)
- goto stop_output;
-
X /* controller information */
X size = sprintf(buffer+len,"\nDisk Array Controller Information:\n");
X len += size; pos = begin + len;
@@ -680,25 +793,18 @@
X ha->binfo.ser_no, ha->binfo.memsize / 1024);
X len += size; pos = begin + len;
X
- if (pos < offset) {
- len = 0;
- begin = pos;
- }
- if (pos > offset + length)
- goto stop_output;
-
X /* 2. about physical devices */
X size = sprintf(buffer+len,"\nPhysical Devices:");
X len += size; pos = begin + len;
X flag = FALSE;
X
- if (!gdth_ioctl_alloc(hanum, GDTH_SCRATCH))
+ buf = gdth_ioctl_alloc(hanum, GDTH_SCRATCH, FALSE);
+ if (!buf)
X goto stop_output;
X for (i = 0; i < ha->bus_cnt; ++i) {
X /* 2.a statistics (and retries/reassigns) */
X TRACE2(("pdr_statistics() chn %d\n",i));
- pds = (gdth_dskstat_str *)(ha->pscratch + GDTH_SCRATCH/4);
- gdtcmd.BoardNode = LOCALBOARD;
+ pds = (gdth_dskstat_str *)(buf + GDTH_SCRATCH/4);


X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;

X gdtcmd.u.ioctl.p_param = virt_to_bus(pds);
@@ -714,10 +820,10 @@
X pds->entries = cnt;


X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) != S_OK)
+ if (scp->SCp.Status != S_OK)

X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) != S_OK)
+ if (scp.SCp.Status != S_OK)
X #endif
X {
X pds->count = 0;
@@ -728,8 +834,7 @@
X /* 2.b drive info */
X TRACE2(("scsi_drv_info() chn %d dev %d\n",
X i, ha->raw[i].id_list[j]));
- pdi = (gdth_diskinfo_str *)ha->pscratch;
- gdtcmd.BoardNode = LOCALBOARD;
+ pdi = (gdth_diskinfo_str *)buf;


X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;

X gdtcmd.u.ioctl.p_param = virt_to_bus(pdi);
@@ -739,10 +844,10 @@
X ha->raw[i].address | ha->raw[i].id_list[j];


X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) == S_OK)
+ if (scp->SCp.Status == S_OK)

X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) == S_OK)
+ if (scp.SCp.Status == S_OK)
X #endif
X {
X strncpy(hrec,pdi->vendor,8);
@@ -784,8 +889,7 @@
X /* 2.c grown defects */
X TRACE2(("scsi_drv_defcnt() chn %d dev %d\n",
X i, ha->raw[i].id_list[j]));
- pdef = (gdth_defcnt_str *)ha->pscratch;
- gdtcmd.BoardNode = LOCALBOARD;
+ pdef = (gdth_defcnt_str *)buf;


X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;

X gdtcmd.u.ioctl.p_param = virt_to_bus(pdef);
@@ -796,10 +900,10 @@
X pdef->sddc_type = 0x08;


X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) == S_OK)
+ if (scp->SCp.Status == S_OK)

X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) == S_OK)
+ if (scp.SCp.Status == S_OK)
X #endif
X {
X size = sprintf(buffer+len,
@@ -808,27 +912,28 @@
X len += size; pos = begin + len;
X }
X }
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > offset + length)
+ goto stop_output;
X }
X }
- gdth_ioctl_free(hanum);
+ gdth_ioctl_free(hanum, buf);
X
X if (!flag) {
X size = sprintf(buffer+len, "\n --\n");
X len += size; pos = begin + len;
X }
- if (pos < offset) {
- len = 0;
- begin = pos;
- }
- if (pos > offset + length)
- goto stop_output;
X
X /* 3. about logical drives */
X size = sprintf(buffer+len,"\nLogical Drives:");
X len += size; pos = begin + len;
X flag = FALSE;
X
- if (!gdth_ioctl_alloc(hanum, GDTH_SCRATCH))
+ buf = gdth_ioctl_alloc(hanum, GDTH_SCRATCH, FALSE);
+ if (!buf)
X goto stop_output;
X for (i = 0; i < MAX_LDRIVES; ++i) {
X if (!ha->hdr[i].is_logdrv)
@@ -839,8 +944,7 @@
X do {
X /* 3.a log. drive info */
X TRACE2(("cache_drv_info() drive no %d\n",drv_no));
- pcdi = (gdth_cdrinfo_str *)ha->pscratch;
- gdtcmd.BoardNode = LOCALBOARD;
+ pcdi = (gdth_cdrinfo_str *)buf;


X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;

X gdtcmd.u.ioctl.p_param = virt_to_bus(pcdi);
@@ -849,10 +953,10 @@
X gdtcmd.u.ioctl.channel = drv_no;


X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) != S_OK)
+ if (scp->SCp.Status != S_OK)


X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) != S_OK)
+ if (scp.SCp.Status != S_OK)
X #endif
X {
X break;
@@ -901,6 +1005,12 @@
X len += size; pos = begin + len;
X }
X drv_no = pcdi->ld_slave;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > offset + length)
+ goto stop_output;
X } while (drv_no != -1);
X
X if (is_mirr) {
@@ -917,34 +1027,34 @@
X size = sprintf(buffer+len,
X " To Array Drv.:\t%s\n", hrec);
X len += size; pos = begin + len;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > offset + length)
+ goto stop_output;
X }
- gdth_ioctl_free(hanum);
+ gdth_ioctl_free(hanum, buf);
X
X if (!flag) {
X size = sprintf(buffer+len, "\n --\n");
X len += size; pos = begin + len;
X }
- if (pos < offset) {
- len = 0;
- begin = pos;
- }
- if (pos > offset + length)
- goto stop_output;
X
X /* 4. about array drives */
X size = sprintf(buffer+len,"\nArray Drives:");
X len += size; pos = begin + len;
X flag = FALSE;
X
- if (!gdth_ioctl_alloc(hanum, GDTH_SCRATCH))
+ buf = gdth_ioctl_alloc(hanum, GDTH_SCRATCH, FALSE);
+ if (!buf)
X goto stop_output;
X for (i = 0; i < MAX_LDRIVES; ++i) {
X if (!(ha->hdr[i].is_arraydrv && ha->hdr[i].is_master))
X continue;
X /* 4.a array drive info */
X TRACE2(("array_info() drive no %d\n",i));
- pai = (gdth_arrayinf_str *)ha->pscratch;
- gdtcmd.BoardNode = LOCALBOARD;
+ pai = (gdth_arrayinf_str *)buf;


X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;

X gdtcmd.u.ioctl.p_param = virt_to_bus(pai);
@@ -953,10 +1063,10 @@
X gdtcmd.u.ioctl.channel = i;


X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) == S_OK)
+ if (scp->SCp.Status == S_OK)

X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) == S_OK)
+ if (scp.SCp.Status == S_OK)
X #endif
X {
X if (pai->ai_state == 0)
@@ -994,27 +1104,28 @@
X pai->ai_size/(1024*1024/pai->ai_secsize),
X hrec);
X len += size; pos = begin + len;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > offset + length)
+ goto stop_output;
X }
X }
- gdth_ioctl_free(hanum);
+ gdth_ioctl_free(hanum, buf);
X
X if (!flag) {
X size = sprintf(buffer+len, "\n --\n");
X len += size; pos = begin + len;
X }
- if (pos < offset) {
- len = 0;
- begin = pos;
- }
- if (pos > offset + length)
- goto stop_output;
X
X /* 5. about host drives */
X size = sprintf(buffer+len,"\nHost Drives:");
X len += size; pos = begin + len;
X flag = FALSE;
X
- if (!gdth_ioctl_alloc(hanum, GDTH_SCRATCH))
+ buf = gdth_ioctl_alloc(hanum, GDTH_SCRATCH, FALSE);
+ if (!buf)
X goto stop_output;
X for (i = 0; i < MAX_LDRIVES; ++i) {
X if (!ha->hdr[i].is_logdrv ||
@@ -1022,8 +1133,7 @@
X continue;
X /* 5.a get host drive list */
X TRACE2(("host_get() drv_no %d\n",i));
- phg = (gdth_hget_str *)ha->pscratch;
- gdtcmd.BoardNode = LOCALBOARD;
+ phg = (gdth_hget_str *)buf;


X gdtcmd.Service = CACHESERVICE;
X gdtcmd.OpCode = GDT_IOCTL;

X gdtcmd.u.ioctl.p_param = virt_to_bus(phg);
@@ -1034,10 +1144,10 @@
X phg->offset = GDTOFFSOF(gdth_hget_str, entry[0]);

X #if LINUX_VERSION_CODE >= 0x020322
X gdth_do_cmd(scp, &gdtcmd, cmnd, 30);

- if ((scp->SCp.Message & 0xffff) != S_OK)
+ if (scp->SCp.Status != S_OK)

X #else
X gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);

- if ((scp.SCp.Message & 0xffff) != S_OK)
+ if (scp.SCp.Status != S_OK)
X #endif
X {
X ha->hdr[i].ldr_no = i;
@@ -1054,7 +1164,7 @@
X }
X }
X }
- gdth_ioctl_free(hanum);
+ gdth_ioctl_free(hanum, buf);
X
X for (i = 0; i < MAX_HDRIVES; ++i) {
X if (!(ha->hdr[i].present))
@@ -1070,18 +1180,18 @@
X " Capacity [MB]:\t%-6d \tStart Sector: \t%d\n",
X ha->hdr[i].size/2048, ha->hdr[i].start_sec);
X len += size; pos = begin + len;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > offset + length)
+ goto stop_output;
X }
X
X if (!flag) {
X size = sprintf(buffer+len, "\n --\n");
X len += size; pos = begin + len;
X }
- if (pos < offset) {
- len = 0;
- begin = pos;
- }
- if (pos > offset + length)
- goto stop_output;
X }
X
X /* controller events */
@@ -1118,7 +1228,7 @@
X goto stop_output;
X length = piord->size;
X memcpy(buffer+len, (char *)piord, length);


- gdth_ioctl_free(hanum);
+ gdth_ioctl_free(hanum, ha->pscratch);

X len = length;
X }
X
@@ -1140,7 +1250,9 @@
X char *cmnd, int timeout)
X {
X unsigned bufflen;
-#if LINUX_VERSION_CODE >= 0x020322
+#if LINUX_VERSION_CODE >= 0x020407
+ DECLARE_COMPLETION(wait);
+#elif LINUX_VERSION_CODE >= 0x020322
X DECLARE_MUTEX_LOCKED(sem);
X #else
X struct semaphore sem = MUTEX_LOCKED;
@@ -1155,6 +1267,11 @@
X bufflen = 0;
X }
X scp->request.rq_status = RQ_SCSI_BUSY;
+#if LINUX_VERSION_CODE >= 0x020407
+ scp->request.waiting = &wait;
+ scsi_do_cmd(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1);
+ wait_for_completion(&wait);
+#else
X scp->request.sem = &sem;


X #if LINUX_VERSION_CODE >= 0x020322

X scsi_do_cmd(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1);
@@ -1164,6 +1281,7 @@
X GDTH_UNLOCK_SCSI_DOCMD();
X #endif
X down(&sem);
+#endif
X }
X
X void gdth_scsi_done(Scsi_Cmnd *scp)
@@ -1172,15 +1290,20 @@
X
X scp->request.rq_status = RQ_SCSI_DONE;
X
+#if LINUX_VERSION_CODE >= 0x020407
+ if (scp->request.waiting != NULL)
+ complete(scp->request.waiting);
+#else
X if (scp->request.sem != NULL)
X up(scp->request.sem);
+#endif
X }
X
-static int gdth_ioctl_alloc(int hanum, ushort size)
+static char *gdth_ioctl_alloc(int hanum, ushort size, int scratch)
X {
X gdth_ha_str *ha;
X ulong flags;
- int ret_val;
+ char *ret_val;
X
X if (size == 0 || size > GDTH_SCRATCH)
X return FALSE;
@@ -1188,17 +1311,26 @@


X ha = HADATA(gdth_ctr_tab[hanum]);

X GDTH_LOCK_HA(ha, flags);
X
- if (!ha->scratch_busy) {
- ha->scratch_busy = TRUE;
- ret_val = TRUE;
- } else
- ret_val = FALSE;
+ if (scratch) {
+ if (!ha->scratch_busy) {
+ ha->scratch_busy = TRUE;
+ ret_val = ha->pscratch;
+ } else
+ ret_val = NULL;
+ } else {
+#if LINUX_VERSION_CODE >= 0x020322
+ ret_val = (void *) __get_free_pages(GFP_ATOMIC | GFP_DMA,
+ GDTH_SCRATCH_ORD);
+#else
+ ret_val = scsi_init_malloc(GDTH_SCRATCH, GFP_ATOMIC | GFP_DMA);
+#endif
+ }
X
X GDTH_UNLOCK_HA(ha, flags);
X return ret_val;
X }
X
-static void gdth_ioctl_free(int hanum)
+static void gdth_ioctl_free(int hanum, char *buf)
X {
X gdth_ha_str *ha;
X ulong flags;
@@ -1206,7 +1338,15 @@


X ha = HADATA(gdth_ctr_tab[hanum]);

X GDTH_LOCK_HA(ha, flags);
X
- ha->scratch_busy = FALSE;
+ if (buf == ha->pscratch) {
+ ha->scratch_busy = FALSE;
+ } else {
+#if LINUX_VERSION_CODE >= 0x020322
+ free_pages((unsigned long)buf, GDTH_SCRATCH_ORD);
+#else
+ scsi_init_free((void *)buf, GDTH_SCRATCH);
+#endif
+ }
X
X GDTH_UNLOCK_HA(ha, flags);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/gdth_proc.h linux/drivers/scsi/gdth_proc.h
--- v2.2.19/drivers/scsi/gdth_proc.h Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/gdth_proc.h Wed Oct 10 01:41:16 2001
@@ -2,7 +2,7 @@
X #define _GDTH_PROC_H
X
X /* gdth_proc.h
- * $Id: gdth_proc.h,v 1.10 2000/07/24 09:30:01 achim Exp $
+ * $Id: gdth_proc.h,v 1.11 2001/07/25 15:37:40 achim Exp $
X */
X
X static int gdth_set_info(char *buffer,int length,int vh,int hanum,int busnum);
@@ -19,8 +19,8 @@
X static void gdth_do_cmd(Scsi_Cmnd *scp, gdth_cmd_str *cmd,
X char *cmnd, int timeout);
X
-static int gdth_ioctl_alloc(int hanum, ushort size);
-static void gdth_ioctl_free(int hanum);
+static char *gdth_ioctl_alloc(int hanum, ushort size, int scratch);
+static void gdth_ioctl_free(int hanum, char *buf);
X static int gdth_ioctl_check_bin(int hanum, ushort size);
X static void gdth_wait_completion(int hanum, int busnum, int id);
X static void gdth_stop_timeout(int hanum, int busnum, int id);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/ips.c linux/drivers/scsi/ips.c
--- v2.2.19/drivers/scsi/ips.c Sun Mar 25 17:31:34 2001
+++ linux/drivers/scsi/ips.c Wed Oct 10 01:41:16 2001
@@ -4835,7 +4835,7 @@
X }
X
X if (j >= 45)
- /* error occured */
+ /* error occurred */
X return (0);
X
X PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR);
@@ -4859,7 +4859,7 @@
X }
X
X if (j >= 240)
- /* error occured */
+ /* error occurred */
X return (0);
X
X ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR);
@@ -4924,7 +4924,7 @@
X }
X
X if (j >= 45)
- /* error occured */
+ /* error occurred */
X return (0);
X
X PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR);
@@ -4948,7 +4948,7 @@
X }
X
X if (j >= 240)
- /* error occured */
+ /* error occurred */
X return (0);
X
X ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR);
@@ -4965,7 +4965,7 @@
X }
X
X if (i >= 240)
- /* error occured */
+ /* error occurred */
X return (0);
X
X /* setup CCCR */
@@ -5015,7 +5015,7 @@
X }
X
X if (i >= 45) {
- /* error occured */
+ /* error occurred */
X printk(KERN_WARNING "(%s%d) timeout waiting for post.\n",
X ips_name, ha->host_num);
X
@@ -5046,7 +5046,7 @@
X }
X
X if (i >= 240) {
- /* error occured */
+ /* error occurred */
X printk(KERN_WARNING "(%s%d) timeout waiting for config.\n",
X ips_name, ha->host_num);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/megaraid.c linux/drivers/scsi/megaraid.c
--- v2.2.19/drivers/scsi/megaraid.c Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/megaraid.c Wed Oct 10 01:41:17 2001
@@ -1609,7 +1609,7 @@
X }
X
X /*--------------------------------------------------------------------
- * Initializes the adress of the controller's mailbox register
+ * Initializes the address of the controller's mailbox register
X * The mailbox register is used to issue commands to the card.
X * Format of the mailbox area:
X * 00 01 command
@@ -1890,7 +1890,7 @@
X "megaraid: to protect your data, please upgrade your firmware to version\n"
X "megaraid: 3.10 or later, available from the Dell Technical Support web\n"
X "megaraid: site at\n"
- "http://support.dell.com/us/en/filelib/download/index.asp?fileid=2940\n");
+ "http://support.dell.com/us/en/filelib/download/index.asp?fileid=2940\n");
X continue;
X }
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/osst.c linux/drivers/scsi/osst.c
--- v2.2.19/drivers/scsi/osst.c Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/osst.c Wed Oct 10 01:41:18 2001
@@ -16,18 +16,18 @@
X Copyright 1992 - 2000 Kai Makisara
X email Kai.Ma...@metla.fi
X
- $Header: /home/cvsroot/Driver/osst.c,v 1.28.2.12.2.1 2000/12/15 20:36:12 garloff Exp $
+ $Header: /home/cvsroot/Driver/osst.c,v 1.28.2.25 2001/06/03 21:56:26 riede Exp $
X
X Last modified: Wed Feb 2 22:04:05 2000 by maki...@kai.makisara.local
X Some small formal changes - aeb, 950809
X */
X
-static const char * cvsid = "$Id: osst.c,v 1.28.2.12.2.1 2000/12/15 20:36:12 garloff Exp $";
-const char * osst_version = "0.8.6.1";
+static const char * cvsid = "$Id: osst.c,v 1.28.2.25 2001/06/03 21:56:26 riede Exp $";
+const char * osst_version = "0.8.13";
X
X /* The "failure to reconnect" firmware bug */
-#define OSST_FW_NEED_POLL_MIN 10602 /*(107A)*/
-#define OSST_FW_NEED_POLL_MAX 10708 /*(108D)*/
+#define OSST_FW_NEED_POLL_MIN 10601 /*(107A)*/
+#define OSST_FW_NEED_POLL_MAX 10704 /*(108D)*/
X #define OSST_FW_NEED_POLL(x,d) ((x) >= OSST_FW_NEED_POLL_MIN && (x) <= OSST_FW_NEED_POLL_MAX && d->host->this_id != 7)
X
X #include <linux/module.h>
@@ -95,6 +95,8 @@
X
X #if DEBUG
X static int debugging = 1;
+/* uncomment define below to test error recovery */
+// #define OSST_INJECT_ERRORS 1
X #endif
X
X #define MAX_RETRIES 0
@@ -148,7 +150,7 @@
X
X static int osst_get_frame_position(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt);
X

-static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int file_blk);
+static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt);
X

X static int osst_write_error_recovery(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int pending);
X
@@ -179,7 +181,7 @@


X
X #if DEBUG
X if (debugging) {

- printk(OSST_DEB_MSG "osst%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n",
X dev, result,
X SCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2],
X SCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5],
@@ -199,14 +201,21 @@
X SCpnt->data_cmnd[0] != MODE_SENSE &&
X SCpnt->data_cmnd[0] != TEST_UNIT_READY)) { /* Abnormal conditions for tape */
X if (driver_byte(result) & DRIVER_SENSE) {
- printk(KERN_WARNING "osst%d: Error with sense data: ", dev);
+ printk(KERN_WARNING "osst%d:W: Error with sense data: ", dev);
X print_sense("osst", SCpnt);
X }
- else
+ else {
+static int notyetprinted = 1;
X printk(KERN_WARNING
- "osst%d: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n",
- dev, result, suggestion(result), driver_byte(result),
+ "osst%d:W: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n",
+ dev, result, suggestion(result), driver_byte(result) & DRIVER_MASK,
X host_byte(result));
+ if (notyetprinted) {
+ notyetprinted = 0;
+ printk(KERN_INFO "osst%d:I: This error may be caused by your scsi controller,\n", dev);
+ printk(KERN_INFO "osst%d:I: it has been reported with some Buslogic cards.\n", dev);
+ }
+ }
X }
X
X if ((sense[0] & 0x70) == 0x70 &&
@@ -222,7 +231,7 @@
X stp = "write";
X else
X stp = "ioctl";
- printk(OSST_DEB_MSG "osst%d: Recovered %s error (%d).\n", dev, stp,
+ printk(OSST_DEB_MSG "osst%d:D: Recovered %s error (%d).\n", dev, stp,
X os_scsi_tapes[dev]->recover_count);
X }
X #endif
@@ -237,7 +246,6 @@
X static void osst_sleep_done (Scsi_Cmnd * SCpnt)
X {
X unsigned int st_nbr;
- int remainder;
X OS_Scsi_Tape * STp;
X
X if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < osst_template.nr_dev) {
@@ -246,14 +254,7 @@
X (SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
X (SCpnt->sense_buffer[2] & 0x40)) {
X /* EOM at write-behind, has all been written? */


- if ((SCpnt->sense_buffer[0] & 0x80) != 0)

- remainder = (SCpnt->sense_buffer[3] << 24) |


- (SCpnt->sense_buffer[4] << 16) |
- (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
- else

- remainder = 0;
- if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW ||
- remainder > 0)


+ if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW)

X (STp->buffer)->last_result = SCpnt->result; /* Error */
X else
X (STp->buffer)->last_result = INT_MAX; /* OK */
@@ -270,7 +271,7 @@
X }
X #if DEBUG
X else if (debugging)
- printk(KERN_ERR "osst?: Illegal interrupt device %x\n", st_nbr);
+ printk(KERN_ERR "osst?:D: Illegal interrupt device %x\n", st_nbr);
X #endif
X }
X
@@ -283,12 +284,14 @@


X {
X unsigned long flags;

X unsigned char *bp;
-//static int inject = 0; /* FIXME - take out inject occasional read errors */
-//static int repeat = 0;
+#ifdef OSST_INJECT_ERRORS
+ static int inject = 0;
+ static int repeat = 0;
+#endif
X spin_lock_irqsave(&io_request_lock, flags);


X if (SCpnt == NULL)

X if ((SCpnt = scsi_allocate_device(NULL, STp->device, 1)) == NULL) {
- printk(KERN_ERR "osst%d: Can't get SCSI request.\n", TAPE_NR(STp->devt));
+ printk(KERN_ERR "osst%d:E: Can't get SCSI request.\n", TAPE_NR(STp->devt));
X spin_unlock_irqrestore(&io_request_lock, flags);
X return NULL;
X }
@@ -317,12 +320,14 @@
X down(SCpnt->request.sem);
X
X (STp->buffer)->last_result_fatal = osst_chk_result(SCpnt);
-//if ((STp->buffer)->last_result_fatal == 0 &&
-// cmd[0] == READ_6 && cmd[4] && ( /* (++ inject % 83) == 29 || */
-// (STp->first_frame_position == 240 /* or STp->read_error_frame to fail again on the block calculated above */ && ++repeat < 3))) {
-// printk(OSST_DEB_MSG "osst%d: injecting read error\n", TAPE_NR(STp->devt));
-// STp->buffer->last_result_fatal = 1; /* FIXME - take out inject occasional read errors */
-//}
+#ifdef OSST_INJECT_ERRORS
+ if (STp->buffer->last_result_fatal == 0 &&
+ cmd[0] == READ_6 && cmd[4] && ( /* (++ inject % 83) == 29 || */
+ (STp->first_frame_position == 240 /* or STp->read_error_frame to fail again on the block calculated above */ && ++repeat < 3))) {
+ printk(OSST_DEB_MSG "osst%d:D: Injecting read error\n", TAPE_NR(STp->devt));
+ STp->buffer->last_result_fatal = 1;
+ }
+#endif
X }
X
X return SCpnt;
@@ -333,7 +338,6 @@
X static void osst_write_behind_check(OS_Scsi_Tape *STp)
X {
X OSST_buffer * STbuffer;
- ST_partstat * STps;
X
X STbuffer = STp->buffer;
X
@@ -357,21 +361,9 @@
X scsi_release_command((STp->buffer)->last_SCpnt);
X
X if (STbuffer->writing < STbuffer->buffer_bytes)
-#if 0
- memcpy(STbuffer->b_data,
- STbuffer->b_data + STbuffer->writing,
- STbuffer->buffer_bytes - STbuffer->writing);
-#else
- printk(KERN_WARNING "osst: write_behind_check: something left in buffer!\n");
-#endif
+ printk(KERN_WARNING "osst:A: write_behind_check: something left in buffer!\n");
+
X STbuffer->buffer_bytes -= STbuffer->writing;


- STps = &(STp->ps[STp->partition]);

- if (STps->drv_block >= 0) {

- if (STp->block_size == 0)
- STps->drv_block++;
- else
- STps->drv_block += STbuffer->writing / STp->block_size;
- }
X STbuffer->writing = 0;
X
X return;
@@ -383,7 +375,8 @@
X /*
X * Initialize the OnStream AUX
X */
-static void osst_init_aux(OS_Scsi_Tape * STp, int frame_type, int logical_blk_num)
+static void osst_init_aux(OS_Scsi_Tape * STp, int frame_type, int frame_seq_number,
+ int logical_blk_num, int blk_sz, int blk_cnt)
X {
X os_aux_t *aux = STp->buffer->aux;
X os_partition_t *par = &aux->partition;
@@ -417,9 +410,10 @@
X dat->reserved1 = 0;
X dat->entry_cnt = 1;
X dat->reserved3 = 0;
- dat->dat_list[0].blk_sz = htonl(frame_type==OS_FRAME_TYPE_DATA?STp->block_size:0);
- dat->dat_list[0].blk_cnt = htons(1);
- dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER?OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA;
+ dat->dat_list[0].blk_sz = htonl(blk_sz);
+ dat->dat_list[0].blk_cnt = htons(blk_cnt);
+ dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER?
+ OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA;
X dat->dat_list[0].reserved = 0;
X case OS_FRAME_TYPE_EOD:
X aux->update_frame_cntr = htonl(0);
@@ -428,27 +422,28 @@
X par->wrt_pass_cntr = htons(STp->wrt_pass_cntr);
X par->first_frame_ppos = htonl(STp->first_data_ppos);
X par->last_frame_ppos = htonl(STp->capacity);
- aux->frame_seq_num = htonl(logical_blk_num);
+ aux->frame_seq_num = htonl(frame_seq_number);
X aux->logical_blk_num_high = htonl(0);
X aux->logical_blk_num = htonl(logical_blk_num);
X break;
X default: ; /* probably FILL */
X }
- aux->filemark_cnt = ntohl(STp->filemark_cnt); /* FIXME -- violates ADR spec */
+ aux->filemark_cnt = ntohl(STp->filemark_cnt);
X aux->phys_fm = ntohl(0xffffffff);
X aux->last_mark_ppos = ntohl(STp->last_mark_ppos);
+ aux->last_mark_lbn = ntohl(STp->last_mark_lbn);
X }
X
X /*
X * Verify that we have the correct tape frame
X */
-static int osst_verify_frame(OS_Scsi_Tape * STp, int logical_blk_num, int quiet)
+static int osst_verify_frame(OS_Scsi_Tape * STp, int frame_seq_number, int quiet)
X {
X os_aux_t * aux = STp->buffer->aux;
X os_partition_t * par = &(aux->partition);
X ST_partstat * STps = &(STp->ps[STp->partition]);
- int i;


X int dev = TAPE_NR(STp->devt);

+ int blk_cnt, blk_sz, i;
X
X if (STp->raw) {
X if (STp->buffer->last_result_fatal) {
@@ -459,55 +454,70 @@
X return 1;
X }
X if (STp->buffer->last_result_fatal) {
- printk(KERN_INFO "osst%d: Skipping frame, read error\n", dev);
- return 0;
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, read error\n", dev);
+#endif
+ return 0;
X }
X if (ntohl(aux->format_id) != 0) {
- printk(KERN_INFO "osst%d: Skipping frame, format_id %u\n", dev, ntohl(aux->format_id));
- return 0;
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, format_id %u\n", dev, ntohl(aux->format_id));
+#endif
+ goto err_out;
X }
X if (memcmp(aux->application_sig, STp->application_sig, 4) != 0 &&
X (memcmp(aux->application_sig, "LIN3", 4) != 0 || STp->linux_media_version != 4)) {
- printk(KERN_INFO "osst%d: Skipping frame, incorrect application signature\n", dev);
- return 0;
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, incorrect application signature\n", dev);
+#endif
+ goto err_out;
X }
X if (par->partition_num != OS_DATA_PARTITION) {
X if (!STp->linux_media || STp->linux_media_version != 2) {
- printk(KERN_INFO "osst%d: Skipping frame, partition num %d\n", dev, par->partition_num); return 0;
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, partition num %d\n",
+ dev, par->partition_num);
+#endif
+ goto err_out;
X }
X }
X if (par->par_desc_ver != OS_PARTITION_VERSION) {
- printk(KERN_INFO "osst%d: Skipping frame, partition version %d\n", dev, par->par_desc_ver);
- return 0;
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, partition version %d\n", dev, par->par_desc_ver);
+#endif
+ goto err_out;
X }
X if (ntohs(par->wrt_pass_cntr) != STp->wrt_pass_cntr) {
- printk(KERN_INFO "osst%d: Skipping frame, wrt_pass_cntr %d (expected %d)\n",
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, wrt_pass_cntr %d (expected %d)\n",
X dev, ntohs(par->wrt_pass_cntr), STp->wrt_pass_cntr);
- return 0;
- }
- if (aux->frame_seq_num != aux->logical_blk_num) {
- printk(KERN_INFO "osst%d: Skipping frame, seq != logical\n", dev);
- return 0;
+#endif
+ goto err_out;
X }
X if (aux->frame_type != OS_FRAME_TYPE_DATA &&
X aux->frame_type != OS_FRAME_TYPE_EOD &&
X aux->frame_type != OS_FRAME_TYPE_MARKER) {
- if (!quiet)
- printk(KERN_INFO "osst%d: Skipping frame, frame type %x\n", dev, aux->frame_type);
- return 0;
+#if DEBUG
+ if (!quiet)
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, frame type %x\n", dev, aux->frame_type);
+#endif
+ goto err_out;
X }
X if (aux->frame_type == OS_FRAME_TYPE_EOD &&
X STp->first_frame_position < STp->eod_frame_ppos) {
- printk(KERN_INFO "osst%d: skipping premature EOD frame %d\n", dev, STp->first_frame_position);
- return 0;
+ printk(KERN_INFO "osst%d:I: skipping premature EOD frame %d\n",
+ dev, STp->first_frame_position);
+ goto err_out;
X }
- STp->logical_blk_in_buffer = 1;
+ STp->frame_in_buffer = 1;
X
- if (logical_blk_num != -1 && ntohl(aux->logical_blk_num) != logical_blk_num) {
- if (!quiet)
- printk(KERN_INFO "osst%d: Skipping frame, logical_blk_num %u (expected %d)\n",
- dev, ntohl(aux->logical_blk_num), logical_blk_num);
- return 0;
+ if (frame_seq_number != -1 && ntohl(aux->frame_seq_num) != frame_seq_number) {
+#if DEBUG
+ if (!quiet)
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame, sequence number %u (expected %d)\n",
+ dev, ntohl(aux->frame_seq_num), frame_seq_number);
+#endif
+ goto err_out;
X }
X if (aux->frame_type == OS_FRAME_TYPE_MARKER) {
X STps->eof = ST_FM_HIT;
@@ -515,8 +525,8 @@
X i = ntohl(aux->filemark_cnt);
X if (STp->header_cache != NULL && i < OS_FM_TAB_MAX && (i > STp->filemark_cnt ||
X STp->first_frame_position - 1 != ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[i]))) {
-#if 1 //DEBUG
- printk(OSST_DEB_MSG "osst%i: %s filemark %d at frame %d\n", dev,
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: %s filemark %d at frame pos %d\n", dev,
X STp->header_cache->dat_fm_tab.fm_tab_ent[i] == 0?"Learned":"Corrected",
X i, STp->first_frame_position - 1);
X #endif
@@ -529,9 +539,31 @@
X STps->eof = ST_EOD_1;
X }
X if (aux->frame_type == OS_FRAME_TYPE_DATA) {


- STps->eof = ST_NOEOF;

+ blk_cnt = ntohs(aux->dat.dat_list[0].blk_cnt);
+ blk_sz = ntohl(aux->dat.dat_list[0].blk_sz);
+ STp->buffer->buffer_bytes = blk_cnt * blk_sz;


+ STp->buffer->read_pointer = 0;
+

+ /* See what block size was used to write file */
+ if (STp->block_size != blk_sz && blk_sz > 0) {
+ printk(KERN_INFO
+ "osst%d:I: File was written with block size %d%c, currently %d%c, adjusted to match.\n",
+ dev, blk_sz<1024?blk_sz:blk_sz/1024,blk_sz<1024?'b':'k',


+ STp->block_size<1024?STp->block_size:STp->block_size/1024,

+ STp->block_size<1024?'b':'k');
+ STp->block_size = blk_sz;
+ STp->buffer->buffer_blocks = OS_DATA_SIZE / blk_sz;
+ }
+ STps->eof = ST_NOEOF;
X }
- return 1;
+ STp->frame_seq_number = ntohl(aux->frame_seq_num);
+ STp->logical_blk_num = ntohl(aux->logical_blk_num);
+ return 1;
+
+err_out:
+ if (STp->read_error_frame == 0)
+ STp->read_error_frame = STp->first_frame_position - 1;


+ return 0;
X }
X

X /*
@@ -546,7 +578,7 @@
X int dbg = debugging;


X int dev = TAPE_NR(STp->devt);
X

- printk(OSST_DEB_MSG "osst%d: reached onstream wait ready\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Reached onstream wait ready\n", dev);
X #endif
X
X memset(cmd, 0, MAX_COMMAND_SIZE);
@@ -561,8 +593,8 @@
X time_before(jiffies, startwait + timeout*HZ) ) {


X #if DEBUG
X if (debugging) {

- printk(OSST_DEB_MSG "osst%d: Sleeping in onstream wait ready\n", dev);
- printk(OSST_DEB_MSG "osst%d: Turning off debugging for a while\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Sleeping in onstream wait ready\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev);
X debugging = 0;
X }
X #endif
@@ -581,12 +613,12 @@
X if ( SCpnt->sense_buffer[2] &&
X osst_write_error_recovery(STp, aSCpnt, 0) ) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Abnormal exit from onstream wait ready\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Abnormal exit from onstream wait ready\n", dev);


X #endif
X return (-EIO);
X }

X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Normal exit from onstream wait ready\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Normal exit from onstream wait ready\n", dev);
X #endif
X return 0;
X }
@@ -614,7 +646,7 @@
X #if DEBUG


X int dev = TAPE_NR(STp->devt);
X

- printk(OSST_DEB_MSG "osst%d: Reached onstream flush drive buffer (write filemark)\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Reached onstream flush drive buffer (write filemark)\n", dev);
X #endif
X
X memset(cmd, 0, MAX_COMMAND_SIZE);
@@ -667,7 +699,7 @@
X char notyetprinted = 1;
X #endif
X if (minlast >= 0 && STp->ps[STp->partition].rw != ST_READING)
- printk(KERN_ERR "osst%i: waiting for frame without having initialized read!\n", dev);
+ printk(KERN_ERR "osst%i:A: waiting for frame without having initialized read!\n", dev);
X
X while (time_before (jiffies, startwait + to*HZ))
X {
@@ -685,7 +717,8 @@
X {
X #if DEBUG
X if (jiffies - startwait >= 2*HZ/OSST_POLL_PER_SEC)
- printk ("osst%i: Succ wait f fr %i (>%i): %i-%i %i (%i): %3li.%li s\n",
+ printk (OSST_DEB_MSG
+ "osst%i:D: Succ wait f fr %i (>%i): %i-%i %i (%i): %3li.%li s\n",
X dev, curr, curr+minlast, STp->first_frame_position,
X STp->last_frame_position, STp->cur_frames,
X result, (jiffies-startwait)/HZ,
@@ -696,7 +729,7 @@
X #if DEBUG
X if (jiffies - startwait >= 2*HZ/OSST_POLL_PER_SEC && notyetprinted)
X {
- printk ("osst%i: Wait for frame %i (>%i): %i-%i %i (%i)\n",
+ printk (KERN_INFO "osst%i:I: Wait for frame %i (>%i): %i-%i %i (%i)\n",
X dev, curr, curr+minlast, STp->first_frame_position,
X STp->last_frame_position, STp->cur_frames, result);
X notyetprinted--;
@@ -706,7 +739,7 @@
X schedule_timeout (HZ / OSST_POLL_PER_SEC);
X }
X #if DEBUG
- printk ("osst%i: Fail wait f fr %i (>%i): %i-%i %i: %3li.%li s\n",
+ printk (OSST_DEB_MSG "osst%i:D: Fail wait f fr %i (>%i): %i-%i %i: %3li.%li s\n",
X dev, curr, curr+minlast, STp->first_frame_position,
X STp->last_frame_position, STp->cur_frames,
X (jiffies-startwait)/HZ, (((jiffies-startwait)%HZ)*10)/HZ);
@@ -715,9 +748,9 @@
X }
X
X /*
- * Read the next OnStream tape block at the current location
+ * Read the next OnStream tape frame at the current location
X */
-static int osst_read_block(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int timeout)
+static int osst_read_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int timeout)
X {


X unsigned char cmd[MAX_COMMAND_SIZE];

X Scsi_Cmnd * SCpnt;
@@ -741,7 +774,7 @@


X
X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%i: Reading block from OnStream tape\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Reading frame from OnStream tape\n", dev);
X #endif
X SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_RETRIES, TRUE);
X *aSCpnt = SCpnt;
@@ -752,11 +785,13 @@
X retval = 1;
X if (STp->read_error_frame == 0) {
X STp->read_error_frame = STp->first_frame_position;
- printk(OSST_DEB_MSG "osst: recording read error at %d\n", STp->read_error_frame);/*FIXME*/
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Recording read error at %d\n", dev, STp->read_error_frame);
+#endif


X }
X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n",
+ printk(OSST_DEB_MSG "osst%d:D: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n",
X dev,
X SCpnt->sense_buffer[0], SCpnt->sense_buffer[1],
X SCpnt->sense_buffer[2], SCpnt->sense_buffer[3],
@@ -768,16 +803,19 @@
X STp->first_frame_position++;


X #if DEBUG
X if (debugging) {

- printk(OSST_DEB_MSG "osst%i: AUX: %c%c%c%c UpdFrCt#%d %s FrSeq#%d LogBlk#%d\n", dev,
+ printk(OSST_DEB_MSG
+ "osst%d:D: AUX: %c%c%c%c UpdFrCt#%d Wpass#%d %s FrSeq#%d LogBlk#%d Qty=%d Sz=%d\n", dev,
X aux->application_sig[0], aux->application_sig[1],
- aux->application_sig[2], aux->application_sig[3], ntohl(aux->update_frame_cntr),
+ aux->application_sig[2], aux->application_sig[3],
+ ntohl(aux->update_frame_cntr), ntohs(aux->partition.wrt_pass_cntr),
X aux->frame_type==1?"EOD":aux->frame_type==2?"MARK":
X aux->frame_type==8?"HEADR":aux->frame_type==0x80?"DATA":"FILL",
- ntohl(aux->frame_seq_num), ntohl(aux->logical_blk_num) );
+ ntohl(aux->frame_seq_num), ntohl(aux->logical_blk_num),
+ ntohs(aux->dat.dat_list[0].blk_cnt), ntohl(aux->dat.dat_list[0].blk_sz) );
X if (aux->frame_type==2)
- printk(OSST_DEB_MSG "osst%i: mark_cnt=%d, last_mark=%d, next_mark=%d\n", dev,
- ntohl(aux->filemark_cnt), ntohl(aux->last_mark_ppos), ntohl(aux->next_mark_ppos));
- printk(OSST_DEB_MSG "osst%i: Exit read block from OnStream tape with code %d\n", dev, retval);
+ printk(OSST_DEB_MSG "osst%d:D: mark_cnt=%d, last_mark_ppos=%d, last_mark_lbn=%d\n", dev,
+ ntohl(aux->filemark_cnt), ntohl(aux->last_mark_ppos), ntohl(aux->last_mark_lbn));
+ printk(OSST_DEB_MSG "osst%d:D: Exit read frame from OnStream tape with code %d\n", dev, retval);
X }
X #endif
X return (retval);
@@ -795,22 +833,22 @@
X
X if (STps->rw != ST_READING) { /* Initialize read operation */
X if (STps->rw == ST_WRITING) {
- osst_flush_write_buffer(STp, aSCpnt, 1);
+ osst_flush_write_buffer(STp, aSCpnt);
X osst_flush_drive_buffer(STp, aSCpnt);
X }
X STps->rw = ST_READING;


- STp->logical_blk_in_buffer = 0;
+ STp->frame_in_buffer = 0;

X
X /*
X * Issue a read 0 command to get the OnStream drive
- * read blocks into its buffer.
+ * read frames into its buffer.


X */
X memset(cmd, 0, MAX_COMMAND_SIZE);

X cmd[0] = READ_6;


X cmd[1] = 1;
X

X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Start Read Ahead on OnStream tape\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Start Read Ahead on OnStream tape\n", dev);
X #endif
X SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, 0, STp->timeout, MAX_RETRIES, TRUE);
X *aSCpnt = SCpnt;
@@ -820,7 +858,7 @@
X return retval;
X }
X
-static int osst_get_logical_blk(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int logical_blk_num, int quiet)
+static int osst_get_logical_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int frame_seq_number, int quiet)
X {
X ST_partstat * STps = &(STp->ps[STp->partition]);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 55'
echo 'File patch-2.2.20 is continued in part 56'
echo "56" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:50 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part51

#!/bin/sh -x
# this is part 51 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 51; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

- 0x10, 0xfe, 0x40, 0x5c, 0x01, 0xfe, 0xf4, 0x13, 0x1d, 0x43, 0xee, 0xfe, 0x00, 0x17, 0xfe, 0x4d,
- 0xe4, 0x6d, 0x7a, 0xfe, 0x6e, 0x15, 0xc4, 0x6d, 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0xfe, 0x4d,
- 0xe4, 0xcc, 0x7a, 0xfe, 0x6e, 0x15, 0xc4, 0xcc, 0x89, 0x4f, 0x20, 0xfe, 0x4d, 0xf4, 0x00, 0xe9,
- 0x92, 0x0f, 0x05, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x04, 0x4f, 0x0f, 0x09, 0x04, 0x15, 0x05,
- 0x01, 0x0b, 0x25, 0xf4, 0x15, 0x09, 0x01, 0x0b, 0x25, 0xf4, 0x15, 0x18, 0x01, 0x0b, 0x25, 0xf4,
- 0x75, 0xfe, 0x89, 0x49, 0x01, 0x0b, 0x04, 0x15, 0x05, 0x01, 0x0b, 0x25, 0xaf, 0x15, 0x18, 0x01,
- 0x0b, 0x25, 0xaf, 0x15, 0x05, 0x01, 0x0b, 0x25, 0xaf, 0xfe, 0x89, 0x49, 0x01, 0x0b, 0x25, 0xaf,
- 0x75, 0xfe, 0x89, 0x4a, 0x01, 0x0b, 0x04, 0x4f, 0x04, 0x21, 0xd3, 0x06, 0x05, 0xfe, 0x48, 0x13,
- 0xb6, 0x13, 0xd3, 0xfe, 0x49, 0xf4, 0x00, 0x4c, 0x75, 0xa9, 0x66, 0xfe, 0x01, 0xec, 0xfe, 0x27,
- 0x01, 0xfe, 0x89, 0x48, 0xff, 0x02, 0x00, 0x10, 0x26, 0xfe, 0x0c, 0x16, 0x32, 0x06, 0xfe, 0xe3,
- 0x00, 0xfe, 0x20, 0x13, 0x1c, 0xfe, 0x30, 0x16, 0x20, 0x13, 0xd4, 0x01, 0x4a, 0x21, 0xd4, 0x06,
- 0x05, 0x65, 0x0a, 0x53, 0x05, 0x37, 0x04, 0x07, 0x47, 0x01, 0x0e, 0xfe, 0x00, 0x40, 0x8f, 0x06,
- 0x11, 0xac, 0x07, 0x84, 0x01, 0x0e, 0x8f, 0x07, 0x5c, 0x01, 0xa8, 0x04, 0x07, 0x84, 0x01, 0x0e,
- 0x8f, 0xfe, 0x80, 0xe7, 0x11, 0x06, 0x11, 0x8b, 0xfe, 0x45, 0x58, 0x01, 0xf2, 0x8f, 0x04, 0x07,
- 0x47, 0x01, 0x0e, 0x8f, 0x07, 0x5c, 0x01, 0xa8, 0x04, 0x07, 0x47, 0x01, 0x0e, 0xfe, 0x80, 0x80,
- 0xfe, 0x80, 0x4c, 0xfe, 0x49, 0xe4, 0x11, 0xac, 0x07, 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x4c, 0x07,
- 0x5c, 0x01, 0x87, 0x04, 0x16, 0x11, 0x74, 0x6b, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf, 0xfe, 0x19,
- 0xde, 0xfe, 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x2d, 0x97, 0xfe, 0xcc, 0x16, 0x01, 0xfe, 0xd2, 0x17,
- 0xed, 0x9a, 0x2d, 0x6b, 0xfe, 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x04, 0xb7, 0x22, 0xfe, 0xbc, 0x16,
- 0xfe, 0xda, 0x10, 0x16, 0x11, 0x74, 0x03, 0xfe, 0x64, 0x01, 0xfe, 0x00, 0xf4, 0x1e,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0xdd, 0x00, 0x69, 0x29, 0x04, 0x69, 0x29, 0xfe, 0x12, 0x45, 0x22, 0xfe, 0x86, 0x17,
- 0x14, 0x05, 0x39, 0xa0, 0xb2, 0x02, 0x2a, 0xfe, 0x39, 0xf0, 0xfe, 0xda, 0x17, 0x20, 0x04, 0xfe,
- 0x7e, 0x18, 0x1d, 0x18, 0x4d, 0x0f, 0x0d, 0x04, 0x74, 0x03, 0xd2, 0x1d, 0x05, 0xfe, 0xef, 0x12,
- 0xfe, 0xe1, 0x10, 0x7c, 0x6e, 0x67, 0x32, 0x06, 0x2f, 0xfe, 0x3c, 0x13, 0xfe, 0x7e, 0x14, 0xfe,
- 0x42, 0x13, 0x50, 0xc2, 0x07, 0x47, 0x01, 0x0e, 0xb9, 0xfe, 0x3e, 0x12, 0xfe, 0x41, 0x48, 0xfe,
- 0x45, 0x48, 0x01, 0xf2, 0xfe, 0x00, 0xcc, 0xb9, 0xfe, 0xf3, 0x13, 0x43, 0x77, 0x06, 0x11, 0xab,
- 0x07, 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x4c, 0x01, 0x72, 0xfe, 0x16, 0x10, 0x06, 0x82, 0x8c, 0xfe,
- 0x3c, 0x14, 0xfe, 0x24, 0x12, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0xfa, 0x17, 0x16, 0x09,
- 0x04, 0xfe, 0x9c, 0xe7, 0x09, 0x10, 0xfe, 0x15, 0x00, 0x63, 0x79, 0x29, 0x01, 0xe2, 0x16, 0x05,
- 0x04, 0x0a, 0x53, 0x2d, 0x37, 0x12, 0x2f, 0x01, 0x72, 0x16, 0x05, 0x04, 0xfe, 0x38, 0x90, 0xfe,
- 0xba, 0x90, 0x3a, 0xce, 0x3b, 0xcf, 0xfe, 0x48, 0x55, 0x35, 0xfe, 0xc9, 0x55, 0x04, 0x21, 0xa3,
- 0x76, 0x13, 0xa3, 0x04, 0x07, 0xa4, 0x01, 0x0e, 0xfe, 0x41, 0x48, 0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, 0x08, 0x05, 0x1b, 0xfe, 0x08, 0x13, 0x32, 0x07,
+ 0x82, 0xfe, 0x30, 0x13, 0x08, 0x05, 0x1b, 0xfe, 0x1c, 0x12, 0x15, 0x9d, 0x08, 0x05, 0x06, 0x4d,
+ 0x15, 0xfe, 0x0d, 0x00, 0x01, 0x36, 0x7b, 0xfe, 0x64, 0x0d, 0x02, 0x24, 0x2d, 0x12, 0xfe, 0xe6,
+ 0x00, 0xfe, 0x1c, 0x90, 0xfe, 0x40, 0x5c, 0x04, 0x15, 0x9d, 0x01, 0x36, 0x02, 0x2b, 0xfe, 0x42,
+ 0x5b, 0x99, 0x19, 0xfe, 0x46, 0x59, 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x87, 0x80, 0xfe,
+ 0x31, 0xe4, 0x5b, 0x08, 0x05, 0x0a, 0xfe, 0x84, 0x13, 0xfe, 0x20, 0x80, 0x07, 0x19, 0xfe, 0x7c,
+ 0x12, 0x53, 0x05, 0x06, 0xfe, 0x6c, 0x13, 0x03, 0xfe, 0xa2, 0x00, 0x28, 0x17, 0xfe, 0x90, 0x05,
+ 0xfe, 0x31, 0xe4, 0x5a, 0x53, 0x05, 0x0a, 0xfe, 0x56, 0x13, 0x03, 0xfe, 0xa0, 0x00, 0x28, 0xfe,
+ 0x4e, 0x12, 0x67, 0xff, 0x02, 0x00, 0x10, 0x27, 0xfe, 0x48, 0x05, 0x1c, 0x34, 0xfe, 0x89, 0x48,
+ 0xff, 0x02, 0x00, 0x10, 0x27, 0xfe, 0x56, 0x05, 0x26, 0xfe, 0xa8, 0x05, 0x12, 0xfe, 0xe3, 0x00,
+ 0x21, 0x53, 0xfe, 0x4a, 0xf0, 0xfe, 0x76, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x70, 0x05, 0x88, 0x25,
+ 0xfe, 0x21, 0x00, 0xab, 0x25, 0xfe, 0x22, 0x00, 0xaa, 0x25, 0x58, 0xfe, 0x09, 0x48, 0xff, 0x02,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, 0x1f, 0xfe, 0x08, 0x10, 0x03, 0xfe,
+ 0x96, 0x00, 0xfe, 0x02, 0xe6, 0x6d, 0xfe, 0x4e, 0x45, 0xea, 0xba, 0xff, 0x04, 0x68, 0x54, 0xe7,
+ 0x1e, 0x6e, 0xfe, 0x08, 0x1c, 0xfe, 0x67, 0x19, 0xfe, 0x0a, 0x1c, 0xfe, 0x1a, 0xf4, 0xfe, 0x00,
+ 0x04, 0xea, 0xfe, 0x48, 0xf4, 0x19, 0x7a, 0xfe, 0x74, 0x19, 0x0f, 0x19, 0x04, 0x07, 0x7e, 0xfe,
+ 0x5a, 0xf0, 0xfe, 0x84, 0x19, 0x25, 0xfe, 0x09, 0x00, 0xfe, 0x34, 0x10, 0x07, 0x1a, 0xfe, 0x5a,
+ 0xf0, 0xfe, 0x92, 0x19, 0x25, 0xca, 0xfe, 0x26, 0x10, 0x07, 0x19, 0x66, 0x25, 0x6d, 0xe5, 0x07,
+ 0x0a, 0x66, 0x25, 0x9e, 0xfe, 0x0e, 0x10, 0x07, 0x06, 0x66, 0x25, 0x59, 0xa9, 0xb8, 0x04, 0x15,
+ 0xfe, 0x09, 0x00, 0x01, 0x36, 0xfe, 0x04, 0xfe, 0x81, 0x03, 0x83, 0xfe, 0x40, 0x5c, 0x04, 0x1c,
+ 0xf7, 0xfe, 0x14, 0xf0, 0x0b, 0x27, 0xfe, 0xd6, 0x19, 0x1c, 0xf7, 0x7b, 0xf7, 0xfe, 0x82, 0xf0,
+ 0xfe, 0xda, 0x19, 0x04, 0xff, 0xcc, 0x00, 0x00,
X };
X
X STATIC unsigned short _adv_asc38C0800_size =
- sizeof(_adv_asc38C0800_buf); /* 0x14C7 */
+ sizeof(_adv_asc38C0800_buf); /* 0x14E1 */
X STATIC ADV_DCNT _adv_asc38C0800_chksum =
- 0x0505BAF2UL; /* Expanded little-endian checksum. */
-
+ 0x050D3FD8UL; /* Expanded little-endian checksum. */


X
+/* Microcode buffer is kept after initialization for error recovery. */

X STATIC unsigned char _adv_asc38C1600_buf[] = {
- 0x00, 0x00, 0x00, 0xf2, 0x00, 0xfc, 0x00, 0x16, 0x00, 0xf0, 0x01, 0x00, 0xe6, 0x1b, 0x48, 0xe4,
- 0x18, 0xe4, 0x03, 0xf6, 0x02, 0x00, 0x18, 0x80, 0x00, 0xfa, 0xff, 0xff, 0x04, 0x00, 0x00, 0xf6,
- 0x09, 0xe7, 0x82, 0xe7, 0x85, 0xf0, 0x86, 0xf0, 0xe8, 0x0e, 0x9e, 0xe7, 0xff, 0x00, 0x55, 0xf0,
- 0x01, 0xf6, 0x03, 0x00, 0x98, 0x57, 0x01, 0xe6, 0x00, 0xea, 0x00, 0xec, 0x18, 0xf4, 0x01, 0xfa,
- 0x08, 0x00, 0xd2, 0x1b, 0x38, 0x54, 0x32, 0xf0, 0x70, 0x0d, 0x1e, 0xf0, 0xd5, 0xf0, 0xbc, 0x00,
- 0x4b, 0xe4, 0x00, 0xe6, 0xb1, 0xf0, 0xb4, 0x00, 0x02, 0x13, 0x06, 0x13, 0x3e, 0x1c, 0x3e, 0x00,
- 0xd8, 0x01, 0x00, 0x10, 0x0c, 0x1c, 0x00, 0x57, 0x00, 0x80, 0x02, 0x80, 0x1b, 0x80, 0x01, 0xfc,
- 0x10, 0x00, 0x6a, 0x0d, 0xe0, 0x10, 0xb9, 0x54, 0xf2, 0x13, 0x18, 0x40, 0xbd, 0x56, 0x03, 0xe6,
- 0x01, 0xea, 0x5c, 0xf0, 0x0f, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x98, 0x10,
- 0x04, 0x12, 0x04, 0x13, 0xbb, 0x55, 0x3c, 0x56, 0x03, 0x58, 0x4a, 0xe4, 0x40, 0x00, 0xb6, 0x00,
- 0xbb, 0x00, 0x00, 0x01, 0x01, 0x01, 0x3e, 0x01, 0x7c, 0x09, 0x08, 0x12, 0x0a, 0x12, 0x4c, 0x1c,
- 0x3e, 0x57, 0x30, 0xe4, 0x05, 0xe6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xbb, 0x00, 0xc0, 0x00,
+ 0x00, 0x01, 0x01, 0x01, 0x3e, 0x01, 0x58, 0x0a, 0x44, 0x10, 0x0a, 0x12, 0x4c, 0x1c, 0x4e, 0x1c,
+ 0x02, 0x4a, 0x30, 0xe4, 0x05, 0xe6, 0x0c, 0x00, 0x3c, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01,
X 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, 0x72, 0x01, 0x74, 0x01, 0x76, 0x01, 0x78, 0x01, 0x7c, 0x01,
- 0x62, 0x0a, 0x74, 0x0d, 0x0c, 0x10, 0xea, 0x10, 0xec, 0x10, 0x22, 0x18, 0x4e, 0x1c, 0x02, 0x4a,
- 0x3a, 0x55, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x06, 0xf7, 0x03, 0xfc, 0x06, 0x00, 0x1e, 0x00,
- 0xbe, 0x00, 0xe1, 0x00, 0xde, 0x0e, 0x24, 0x18, 0x78, 0x18, 0x30, 0x1c, 0x32, 0x1c, 0x38, 0x1c,
- 0x10, 0x44, 0x02, 0x48, 0x00, 0x4c, 0xb0, 0x57, 0x04, 0x80, 0x4d, 0xe4, 0x04, 0xea, 0x5d, 0xf0,
- 0xa7, 0xf0, 0x04, 0xf6, 0x02, 0xfc, 0x05, 0x00, 0x09, 0x00, 0x19, 0x00, 0x32, 0x00, 0x33, 0x00,
- 0x34, 0x00, 0x36, 0x00, 0x98, 0x00, 0x9e, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x79, 0x01,
- 0xac, 0x08, 0x32, 0x0c, 0x02, 0x10, 0x04, 0x10, 0x12, 0x10, 0x0c, 0x12, 0x0a, 0x13, 0x6a, 0x14,
- 0x7a, 0x14, 0x56, 0x17, 0x00, 0x4e, 0x00, 0x54, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0,
- 0xb8, 0xf0, 0x48, 0xf4, 0x0e, 0xf7, 0x0a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0xa4, 0x00, 0xb5, 0x00,
- 0xba, 0x00, 0xd0, 0x00, 0xe7, 0x00, 0xe6, 0x03, 0x69, 0x08, 0xe9, 0x09, 0x2a, 0x0b, 0xd4, 0x0e,
- 0x0a, 0x10, 0x0e, 0x10, 0x12, 0x13, 0x94, 0x14, 0xc8, 0x17, 0xc0, 0x19, 0x24, 0x1b, 0x20, 0x1c,
- 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x89, 0x48,
- 0x68, 0x54, 0x83, 0x55, 0x01, 0x58, 0x83, 0x59, 0x40, 0x5c, 0x06, 0x83, 0x31, 0xe4, 0x02, 0xe6,
- 0x07, 0xf0, 0x08, 0xf0, 0x0b, 0xf0, 0x0c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, 0x05, 0xf8, 0x02, 0xfa,
- 0x03, 0xfa, 0x04, 0xfc, 0x05, 0xfc, 0x07, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xb9, 0x00, 0xe0, 0x00,
- 0xe5, 0x00, 0x22, 0x01, 0x26, 0x01, 0x60, 0x01, 0x7a, 0x01, 0x82, 0x01, 0xc8, 0x01, 0xca, 0x01,
- 0x84, 0x02, 0x6a, 0x03, 0xe2, 0x04, 0x4e, 0x07, 0x68, 0x08, 0x86, 0x09, 0xda, 0x0b, 0xfa, 0x0e,
- 0x06, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, 0xf3, 0x10, 0xf4, 0x10, 0x06, 0x12, 0x0e, 0x13,
- 0x10, 0x13, 0x16, 0x13, 0x1e, 0x13, 0xc4, 0x14, 0x90, 0x15, 0xfe, 0x9c, 0xf0, 0x30, 0x04, 0xfe,
- 0x9a, 0x0d, 0xff, 0x10, 0x00, 0x00, 0xe7, 0xfe, 0x00, 0x1c, 0x00, 0xe6, 0xfe, 0x88, 0x01, 0xff,


- 0x03, 0x00, 0x00, 0xfe, 0x02, 0x15, 0xfe, 0x0c, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24,

- 0x00, 0xfe, 0x4c, 0x00, 0x5d, 0xff, 0x04, 0x00, 0x00, 0x16, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08,
+ 0xc6, 0x0e, 0x0c, 0x10, 0xac, 0x12, 0xae, 0x12, 0x16, 0x1a, 0x32, 0x1c, 0x6e, 0x1e, 0x02, 0x48,
+ 0x3a, 0x55, 0xc9, 0x57, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x06, 0xf7, 0x03, 0xfc, 0x06, 0x00,
+ 0x1e, 0x00, 0xbe, 0x00, 0xe1, 0x00, 0x0c, 0x12, 0x18, 0x1a, 0x70, 0x1a, 0x30, 0x1c, 0x38, 0x1c,
+ 0x10, 0x44, 0x00, 0x4c, 0xb0, 0x57, 0x40, 0x5c, 0x4d, 0xe4, 0x04, 0xea, 0x5d, 0xf0, 0xa7, 0xf0,
+ 0x04, 0xf6, 0x02, 0xfc, 0x05, 0x00, 0x09, 0x00, 0x19, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00,
+ 0x36, 0x00, 0x98, 0x00, 0x9e, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x79, 0x01, 0x3c, 0x09,
+ 0x68, 0x0d, 0x02, 0x10, 0x04, 0x10, 0x3a, 0x10, 0x08, 0x12, 0x0a, 0x13, 0x40, 0x16, 0x50, 0x16,
+ 0x00, 0x17, 0x4a, 0x19, 0x00, 0x4e, 0x00, 0x54, 0x01, 0x58, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0,
+ 0x59, 0xf0, 0xb8, 0xf0, 0x48, 0xf4, 0x0e, 0xf7, 0x0a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0xa4, 0x00,
+ 0xb5, 0x00, 0xba, 0x00, 0xd0, 0x00, 0xe7, 0x00, 0xf0, 0x03, 0x69, 0x08, 0xe9, 0x09, 0x5c, 0x0c,
+ 0xb6, 0x12, 0xbc, 0x19, 0xd8, 0x1b, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x42, 0x1d, 0x08, 0x44,
+ 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x89, 0x48, 0x68, 0x54, 0x83, 0x55, 0x83, 0x59,
+ 0x31, 0xe4, 0x02, 0xe6, 0x07, 0xf0, 0x08, 0xf0, 0x0b, 0xf0, 0x0c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8,
+ 0x05, 0xf8, 0x02, 0xfa, 0x03, 0xfa, 0x04, 0xfc, 0x05, 0xfc, 0x07, 0x00, 0xa8, 0x00, 0xaa, 0x00,
+ 0xb9, 0x00, 0xe0, 0x00, 0xe5, 0x00, 0x22, 0x01, 0x26, 0x01, 0x60, 0x01, 0x7a, 0x01, 0x82, 0x01,
+ 0xc8, 0x01, 0xca, 0x01, 0x86, 0x02, 0x6a, 0x03, 0x18, 0x05, 0xb2, 0x07, 0x68, 0x08, 0x10, 0x0d,
+ 0x06, 0x10, 0x0a, 0x10, 0x0e, 0x10, 0x12, 0x10, 0x60, 0x10, 0xed, 0x10, 0xf3, 0x10, 0x06, 0x12,
+ 0x10, 0x12, 0x1e, 0x12, 0x0c, 0x13, 0x0e, 0x13, 0x10, 0x13, 0xfe, 0x9c, 0xf0, 0x35, 0x05, 0xfe,
+ 0xec, 0x0e, 0xff, 0x10, 0x00, 0x00, 0xe9, 0xfe, 0x34, 0x1f, 0x00, 0xe8, 0xfe, 0x88, 0x01, 0xff,


+ 0x03, 0x00, 0x00, 0xfe, 0x93, 0x15, 0xfe, 0x0f, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24,

+ 0x00, 0xfe, 0x4c, 0x00, 0x65, 0xff, 0x04, 0x00, 0x00, 0x1a, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08,
X 0x01, 0x01, 0xff, 0x08,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xfe, 0x06, 0xfc, 0xdc, 0x09, 0x78, 0x01, 0xb7,
- 0x04, 0x30, 0x1b, 0x8e, 0x40, 0xaf, 0x01, 0xfe, 0x22, 0x10, 0x09, 0x78, 0x01, 0x7a, 0xfe, 0xbd,
- 0x10, 0x09, 0x78, 0x01, 0x7a, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x18, 0x05,
- 0x1f, 0xae, 0x32, 0x25, 0x30, 0xfe, 0x3d, 0xf0, 0xfe, 0x0a, 0x02, 0x26, 0xfe, 0x9c, 0x02, 0xfe,
- 0x5a, 0x1c, 0xfe, 0x12, 0x1c, 0xfe, 0x14, 0x1c, 0x1b, 0xfe, 0x30, 0x00, 0x40, 0xaf, 0x01, 0x9c,
- 0x18, 0x05, 0x1f, 0xae, 0x04, 0xe7, 0x1d, 0x27, 0x07, 0x16, 0x2c, 0xfe, 0x69, 0x10, 0x18, 0x05,
- 0x1f, 0xae, 0xfe, 0x04, 0xec, 0x27, 0x6f, 0x34, 0x1c, 0x27, 0xfe, 0x05, 0xf6, 0xdc, 0x01, 0xfe,
- 0x66, 0x19, 0x0b, 0x59, 0x43, 0x3d, 0x11, 0x50, 0x58, 0xcd, 0x01, 0xfe, 0x9e, 0x18, 0x04, 0x30,
- 0x09, 0x44, 0x01, 0x14, 0x07, 0x00, 0x2d, 0x01, 0x7c, 0xfe, 0x20, 0x10, 0x09, 0xb1, 0x01, 0x14,
- 0xfe, 0x41, 0x58, 0x09, 0x44, 0x01, 0x14, 0xfe, 0x49, 0x54, 0x72, 0xfe, 0x14, 0x03, 0x01, 0xfe,
- 0x9e, 0x18, 0x04, 0x30, 0x32, 0x6f, 0xfe, 0x02, 0xe8, 0x2b, 0xfe, 0xbf, 0x57, 0xfe, 0x9e, 0x43,
- 0xfe, 0x77, 0x57, 0xfe, 0x27, 0xf0, 0xfe, 0xe4, 0x01, 0xfe, 0x07, 0x4b, 0xfe, 0x20, 0xf0, 0xb3,
- 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0x92, 0xd6, 0x95, 0x25, 0x24, 0x2a, 0xfe, 0x44, 0x04, 0x12,
- 0xfe, 0x40, 0x04, 0x75, 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x46, 0x12, 0x2e, 0xff, 0x02,
- 0x00, 0x10, 0x01, 0x06, 0x12, 0xfe, 0xd8, 0x04, 0x2e, 0x01, 0x06, 0x12, 0x24, 0x23, 0x21, 0xec,
- 0xfe, 0x4c, 0x44, 0xfe, 0x3c, 0x12, 0x4b, 0xfe, 0x44, 0x48, 0x0f, 0x2f, 0xfe, 0x4c, 0x54, 0x72,
- 0xea, 0x6f, 0x86, 0x2b, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x52, 0x13, 0x35, 0x07, 0x94,
- 0xfe, 0x4a, 0x13, 0xfe, 0x18, 0x10, 0x0f, 0x2f, 0xfe, 0x4c, 0x54, 0x72, 0xea, 0xfe, 0x06, 0x80,
- 0xfe, 0x48, 0x47, 0xfe, 0x38, 0x13, 0x35, 0x07, 0x94, 0xfe, 0x30, 0x13, 0x0b, 0x08, 0x38, 0xfe,
- 0x1c, 0x12, 0x1b, 0x76, 0x0b, 0x08, 0x05, 0x48, 0x1b, 0xfe, 0x0d, 0x00, 0x01, 0x3c, 0x88, 0xfe,
- 0x52, 0x0d, 0x04, 0x24, 0x2e, 0x11, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xcc, 0x03, 0x1b, 0x76,
- 0x01, 0x3c, 0x04, 0x30, 0xfe, 0x42, 0x5b, 0x74, 0x19, 0xfe, 0x46, 0x59, 0xfe, 0xbf, 0x57, 0xfe,
- 0x77, 0x57, 0xfe, 0x87, 0x80, 0xce, 0x5d, 0x0b, 0x08, 0x0a, 0xfe, 0x84, 0x13, 0xfe, 0x20, 0x80,
- 0x07, 0x19, 0xfe, 0x7c, 0x12, 0x36, 0x08, 0x05, 0xfe, 0x6c, 0x13, 0x02, 0xfe, 0xa2, 0x00, 0x1a,
- 0x17, 0xfe, 0x84, 0x05, 0xce, 0x4e, 0x36, 0x08, 0x0a, 0xfe, 0x56, 0x13, 0x02, 0xfe, 0xa0, 0x00,
- 0x1a, 0xfe, 0x4e, 0x12, 0x57, 0xff, 0x02, 0x00, 0x10, 0x2a, 0xfe, 0x3c, 0x05, 0x25, 0x39, 0xc7,
- 0xff, 0x02, 0x00, 0x10, 0x2a, 0xfe, 0x4a, 0x05, 0x13, 0xfe, 0x9c, 0x05, 0x11, 0xfe, 0xe3, 0x00,
- 0x22, 0x36, 0xfe, 0x4a, 0xf0, 0xfe, 0x6a, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x64, 0x05, 0x6a, 0x29,
- 0xfe, 0x21, 0x00, 0xb8, 0x29, 0xfe, 0x22, 0x00, 0x9b, 0x29, 0x43, 0xfe, 0x09, 0x48, 0xff, 0x02,
- 0x00, 0x10, 0x2a, 0xfe, 0x7a, 0x05, 0x13, 0xfe, 0x9c, 0x05, 0xfe, 0xe2, 0x08, 0x36, 0x08, 0xfe,
- 0x1c, 0x00, 0x48, 0x01, 0xa0, 0x29, 0x05, 0x1c, 0xe2, 0x40, 0xfe, 0x27, 0x01, 0x0b, 0x08, 0x38,
- 0xfe, 0x22, 0x12, 0x3b, 0x01, 0x7b, 0x1b, 0x76, 0x0b, 0x08, 0x05, 0x48, 0x1b, 0xfe, 0x0d, 0x00,
- 0x01, 0x3c, 0x88, 0xfe, 0x52, 0x0d, 0x04, 0x24, 0x02, 0xe4, 0x1a, 0xfe, 0xc6, 0x13, 0x02, 0xad,
- 0x1a, 0xfe, 0x3e, 0x12, 0x02, 0x5e, 0x1a, 0xfe, 0x36, 0x13, 0x3b, 0x01, 0x7b, 0x13, 0xfe, 0x14,
- 0x06, 0x09, 0x05, 0x36, 0x08, 0x20, 0xfe, 0x02, 0x12, 0x4a, 0x01, 0xfe, 0x62, 0x17, 0x12, 0xfe,
- 0x0a, 0x06, 0x11, 0x79, 0x01, 0x47, 0x11, 0xe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04,
- 0xfe, 0xce, 0x05, 0x02, 0x67, 0x83, 0x0c, 0x67, 0x18, 0x05, 0x01, 0x7b, 0xfe, 0x9c, 0x32, 0x6e,
- 0x7e, 0x01, 0x9f, 0x7d, 0x11, 0xfe, 0xe2, 0x00, 0x2a, 0xeb, 0x25, 0x39, 0xfe, 0x0a, 0xf0, 0xfe,
- 0x6a, 0x07, 0xa5, 0xfe, 0x20, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x28, 0x08, 0xa6, 0x99, 0x04, 0x24,
- 0x0b, 0x08, 0x0a, 0xfe, 0x2e, 0x12, 0x10, 0x19, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, 0x00,
- 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0xfe, 0x99, 0xa4, 0x01, 0x06, 0x10, 0x00, 0x04, 0xfe, 0xf6,
- 0x08, 0x84, 0x08, 0x0e, 0xfe, 0x38, 0x12, 0x0b, 0x08, 0x0e, 0xfe, 0x30, 0x13, 0x10, 0xfe, 0x1b,
- 0x00, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10,
- 0x05, 0x01, 0x06, 0x10, 0x00, 0x04, 0xee, 0x73, 0x43, 0x70, 0x4a, 0xfe, 0x9a, 0x81, 0x28, 0x38,
- 0x41, 0xfe, 0xf6, 0x07, 0x09, 0x38, 0xfe, 0x09, 0x6f, 0xc5, 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12,
- 0x4d, 0x5b, 0x49, 0x73, 0x90, 0x2a, 0xfe, 0x08, 0x08, 0x25, 0x39, 0xfe, 0x0a, 0xf0, 0xfe, 0xf6,
- 0x07, 0xa6, 0x99, 0xa5, 0xfe, 0x20, 0x08, 0x04, 0x24, 0x01, 0x47, 0x04, 0xeb, 0x10, 0x20, 0x04,
- 0xeb, 0xfe, 0x9c, 0xf7, 0x98, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x87, 0xfe, 0x8e, 0x08, 0x0c,
- 0x62, 0x1f, 0x63, 0x0b, 0x59, 0x4e, 0x3d, 0x1d, 0x27, 0x07, 0x16, 0xfe, 0x0e, 0x12, 0x81, 0xfe,
- 0x80, 0x80, 0x40, 0x27, 0x71, 0x2b, 0xf0, 0xfe, 0x83, 0xe7, 0xfe, 0x3f, 0x00, 0xb8, 0xfe, 0x03,
- 0x40, 0x0b, 0x59, 0x5d, 0x3d, 0x01, 0xbd, 0xc3, 0xfe, 0x1f, 0x40, 0x1c, 0x66, 0x01, 0xbb, 0xfe,
- 0x08, 0x50, 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, 0xfe, 0xc6, 0x51, 0x6a, 0xfe, 0x08, 0x90, 0xfe,
- 0x8a, 0x90, 0x0c, 0x60, 0x1f, 0x61, 0xfe, 0x0c, 0x90, 0xfe, 0x8e, 0x90, 0xfe, 0x40, 0x50, 0xfe,
- 0xc2, 0x50, 0x0c, 0x45, 0x1f, 0x46, 0xfe, 0x4a, 0x10, 0x0b, 0x08, 0x4e, 0xfe, 0x2a, 0x12, 0xfe,
- 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x0c, 0x62, 0x1f, 0x63, 0x0b, 0x08, 0x5d, 0x49, 0x01, 0xbd, 0xfe,
- 0x1f, 0x80, 0x1c, 0x66, 0xfe, 0x44, 0x90, 0xfe, 0xc6, 0x90, 0x0c, 0x64, 0x1f, 0x65, 0xfe, 0x08,
- 0x90, 0xfe, 0x8a, 0x90, 0x0c, 0x60, 0x1f, 0x61, 0xfe, 0x40, 0x90, 0xfe, 0xc2, 0x90, 0x0c, 0x45,


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 51'
echo 'File patch-2.2.20 is continued in part 52'
echo "52" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:12 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part73

#!/bin/sh -x
# this is part 73 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 73; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ {
+ unsigned short ExtAddr;
+ unsigned short Addr;
+ unsigned short Len;
+ unsigned char Data[0];
+ } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
+
+ typedef struct _EDGE_FIRMWARE_VERSION_INFO
+ {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)
+ #define IMAGE_ARRAY_NAME FirmwareImage

+ #define IMAGE_VERSION_NAME FirmwareImageVersion


+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,

+ 0x02, 0x00, 0x80, 0x02, 0x45, 0x14,

+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,

+ 0x02, 0x44, 0xa5,

+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,

+ 0x02, 0x63, 0xab,

+ 0x02, 0x67, 0x5f,

+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+

+// Segment #13, Start Address 00ff0080, Length 7
+0xff,0x00,0x80,0x00,0x07,0x00,
+ 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x52,
+
+// Segment #14, Start Address 00ff3000, Length 2918
+0xff,0x00,0x00,0x30,0x66,0x0b,
+ 0x12, 0x30, 0x64, 0x12, 0x30, 0xff, 0x12, 0x31, 0x2f, 0x12, 0x30, 0xb0, 0x80, 0xf2, 0xe5, 0x23,
+ 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, 0x09, 0xb1, 0x01, 0xb9, 0xb4, 0x00, 0x02, 0x80, 0x05, 0x14,
+ 0x19, 0xb1, 0x01, 0xb9, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xeb, 0x22, 0xc2, 0xaf, 0x7e, 0xb3,
+ 0x3f, 0xf1, 0xb4, 0x01, 0x03, 0x12, 0x65, 0x67, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x7e, 0xb3, 0x3f,
+ 0xf1, 0xb4, 0x01, 0x1d, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x6c, 0xaa,
+ 0x60, 0x0f, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0x12, 0x64, 0x24, 0xda, 0x59, 0xda, 0x39, 0xda,
+ 0x0b, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, 0x60, 0x43, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04,
+ 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0,
+ 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, 0x04, 0x0a, 0x32, 0x09, 0x53, 0x35, 0x33, 0x5e,
+ 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e,
+ 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xd1, 0x75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x33, 0x74, 0x33, 0xdd, 0x34, 0x46, 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x78,
+ 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8,
+ 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x49, 0x45, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18,
+ 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x89, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x89, 0x7e,
+ 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xb9, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xb9, 0xa5, 0xbe, 0x00, 0x1f,
+ 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f,
+ 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x18, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x12, 0x64, 0x86, 0x22,
+ 0x7e, 0x27, 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2,
+ 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12,
+ 0x4c, 0x72, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27,
+ 0x01, 0x8b, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8b, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xba, 0x80,
+ 0x27, 0x7e, 0x63, 0x01, 0xba, 0xa5, 0xbe, 0x00, 0x1f, 0x7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x38, 0x84, 0x38, 0xc5, 0x7c, 0xb3, 0xbe, 0xb0, 0x09, 0x28,
+ 0x22, 0x75, 0x2f, 0x09, 0x12, 0x73, 0x35, 0x75, 0x57, 0x02, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00,
+ 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x01, 0x7a, 0xb3,
+ 0x91, 0x11, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x34, 0xe6, 0x0b, 0x58,
+ 0x50, 0x89, 0x54, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x2f, 0xb0, 0x12, 0x73,
+ 0x35, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0x42, 0x24, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a,
+ 0x3b, 0x49, 0x33, 0x35, 0x57, 0x89, 0x34, 0x35, 0x67, 0x35, 0x95, 0x35, 0xc3, 0x35, 0xf1, 0x36,
+ 0x1f, 0x36, 0x4d, 0x36, 0x7b, 0x36, 0xa9, 0x12, 0x41, 0xba, 0xd2, 0x28, 0xd2, 0x08, 0xc2, 0x40,
+ 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x7e, 0x04, 0x00, 0x20,
+ 0x7a, 0x07, 0x01, 0x99, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xa9, 0x12, 0x41, 0x27, 0x12,
+ 0x5f, 0xb7, 0x02, 0x36, 0xd7, 0x12, 0x41, 0xd7, 0xd2, 0x29, 0xd2, 0x09, 0xc2, 0x41, 0xc2, 0x49,
+ 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xba, 0x7e, 0x04, 0x00, 0x20, 0x7a, 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e, 0x04, 0x80, 0x00, 0x4c,
+ 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19,
+ 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0,
+ 0x00, 0x10, 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74,
+ 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca,
+ 0xb8, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00,
+ 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x35, 0x33, 0x3e, 0x20, 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02,
+ 0x68, 0x20, 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10,
+ 0x59, 0x46, 0x01, 0xa9, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8,
+ 0x80, 0x11, 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59,
+ 0x46, 0x01, 0xa9, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30,
+ 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70,
+ 0x01, 0x68, 0x04, 0x44, 0x80, 0x80, 0x02, 0x54, 0x7f, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04,
+ 0x44, 0x02, 0x80, 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62,
+ 0x09, 0xb6, 0x35, 0x33, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xda,
+ 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44,
+ 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x04, 0xa5, 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70,
+ 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x29, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01,
+ 0x99, 0x80, 0x15, 0xa5, 0xee, 0x52, 0x29, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x78, 0x0a, 0x52, 0x26,
+ 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0x99, 0x12, 0x42, 0xa2, 0xd0, 0xa8, 0x22, 0x7e, 0x04,
+ 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40,
+ 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09,
+ 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00,
+ 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb5, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02,
+ 0x09,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,
+ 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x03, 0x12, 0x73, 0x35, 0x7a,
+ 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x6f, 0x7e,
+ 0x27, 0x01, 0x7f, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe,
+ 0x14, 0x14, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6f, 0x7a, 0x27, 0x01,
+ 0x7f, 0x02, 0x4f, 0xd6, 0x7e, 0x14, 0x10, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35,
+ 0x75, 0x2f, 0x04, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12,
+ 0x73, 0x35, 0x7e, 0x17, 0x01, 0x71, 0x7e, 0x27, 0x01, 0x81, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b,
+ 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x18, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec,
+ 0x7a, 0x17, 0x01, 0x71, 0x7a, 0x27, 0x01, 0x81, 0x02, 0x53, 0x03, 0x7e, 0x14, 0x14, 0x2d, 0x80,
+ 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x05, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f,
+ 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x73, 0x7e, 0x27, 0x01,
+ 0x83, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1c,
+ 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x73, 0x7a, 0x27, 0x01, 0x83, 0x02,
+ 0x56, 0x30, 0x7e, 0x14, 0x18, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f,
+ 0x06, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35,
+ 0x7e, 0x17, 0x01, 0x75, 0x7e, 0x27, 0x01, 0x85, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a,
+ 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x20, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17,
+ 0x01, 0x75, 0x7a, 0x27, 0x01, 0x85, 0x02, 0x59, 0x5d, 0x7e, 0x14, 0x1c, 0x2d, 0x80, 0xeb, 0x75,
+ 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x07, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73,
+ 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x77, 0x7e, 0x27, 0x01, 0x87, 0x2d,
+ 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x24, 0x2c, 0x38,
+ 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x77, 0x7a, 0x27, 0x01, 0x87, 0x02, 0x5c, 0x8a,
+ 0x7e, 0x14, 0x20, 0x2d, 0x80, 0xeb,
+
+// Segment #15, Start Address 00ff4000, Length 13109
+0xff,0x00,0x00,0x40,0x35,0x33,
+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0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xc1, 0x02, 0x73,
+ 0x50, 0x75, 0x57, 0x01, 0x75, 0x56, 0x00, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x54, 0x58, 0x75, 0x55,
+ 0x08, 0x75, 0x51, 0x08, 0x75, 0x53, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c, 0x00,
+ 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x42, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75, 0xb8,
+ 0x7f, 0x75, 0xb3, 0x01, 0x75, 0xb2, 0x01, 0xd2, 0xa9, 0x22, 0x75, 0xb0, 0xdf, 0xe4, 0xd5, 0xe0,
+ 0xfd, 0x75, 0xb0, 0xef, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2e, 0x7e, 0xa0, 0x08, 0x19, 0xa2,
+ 0x00, 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x83, 0x0b,
+ 0x20, 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19,
+ 0xb0, 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e,
+ 0x54, 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00,
+ 0x0c, 0x74, 0x07, 0x20, 0x68, 0x02, 0x74, 0x0f, 0x19, 0xb0, 0x00, 0x04, 0x30, 0x6b, 0x17, 0x74,
+ 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x28, 0x20, 0x68, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04,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0x07, 0x01, 0x7f, 0x7a, 0x07, 0x01, 0x8f, 0x22, 0xc2, 0x14,
+ 0xc2, 0x1c, 0xc2, 0x0c, 0x7e, 0x04, 0x14, 0x2d, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71,
+ 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x81, 0x7a, 0x07, 0x01, 0x91, 0x22, 0xc2, 0x15, 0xc2, 0x1d, 0xc2,
+ 0x0d, 0x7e, 0x04, 0x18, 0x2d, 0x7a, 0x07, 0x01, 0x63, 0x7a, 0x07, 0x01, 0x73, 0x6d, 0x00, 0x7a,
+ 0x07, 0x01, 0x83, 0x7a, 0x07, 0x01, 0x93, 0x22, 0xc2, 0x16, 0xc2, 0x1e, 0xc2, 0x0e, 0x7e, 0x04,
+ 0x1c, 0x2d, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x85,
+ 0x7a, 0x07, 0x01, 0x95, 0x22, 0xc2, 0x17, 0xc2, 0x1f, 0xc2, 0x0f, 0x7e, 0x04, 0x20, 0x2d, 0x7a,
+ 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x87, 0x7a, 0x07, 0x01,
+ 0x97, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x42, 0xad, 0x89, 0x24, 0x42, 0xbd, 0x42,
+ 0xd4, 0x42, 0xeb, 0x43, 0x02, 0x43, 0x19, 0x43, 0x30, 0x43, 0x47, 0x43, 0x5e, 0x30, 0x40, 0x07,
+ 0x20, 0x58, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, 0x50, 0x04, 0xc2, 0x28, 0x80,
+ 0x02, 0xd2, 0x28, 0x22, 0x30, 0x41, 0x07, 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49,
+ 0x07, 0x20, 0x51, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x42, 0x07, 0x20, 0x5a,
+ 0x04, 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, 0x07, 0x20, 0x52, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2,
+ 0x2a, 0x22, 0x30, 0x43, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30, 0x4b, 0x07, 0x20,
+ 0x53, 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x44, 0x07, 0x20, 0x5c, 0x04, 0xc2,
+ 0x2c, 0x80, 0x0c, 0x30, 0x4c, 0x07, 0x20, 0x54, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22,
+ 0x30, 0x45, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x55, 0x04,
+ 0xc2, 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x46, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80,
+ 0x0c, 0x30, 0x4e, 0x07, 0x20, 0x56, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30, 0x47,
+ 0x07, 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x57, 0x04, 0xc2, 0x2f,
+ 0x80, 0x02, 0xd2, 0x2f, 0x22, 0x44, 0x66, 0x43, 0x8a, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23,
+ 0x0a, 0x5b, 0x49, 0x55, 0x43, 0x75, 0x99, 0x54, 0xd3, 0x22, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x94,
+ 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x12, 0x44,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 0x6f, 0x45, 0x8b, 0x45, 0xa7, 0x45, 0xc3, 0x45, 0xdf, 0x45, 0xfb,
+ 0x46, 0x17, 0x46, 0x33, 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, 0xf0, 0xca, 0x0b, 0xca, 0x1b,
+ 0xca, 0x2b, 0xd2, 0x01, 0x75, 0x2f, 0x89, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x90, 0x00, 0x60, 0x28,
+ 0x7e, 0x14, 0x80, 0x00, 0x7e, 0x00, 0x00, 0x13, 0x50, 0x13, 0xca, 0x0b, 0xca, 0x59, 0x7c, 0xb0,
+ 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x45, 0x04, 0x99, 0x24, 0xda, 0x59, 0xda, 0x0b, 0xa5, 0x0a, 0xa5,
+ 0x08, 0xbe, 0x01, 0x2e, 0x78, 0xe1, 0x80, 0xd2, 0x30, 0x04, 0x05, 0xc2, 0x04, 0x12, 0x64, 0x86,
+ 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x09,
+ 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x80, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b,
+ 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x61, 0xab, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20,
+ 0xe0, 0x14, 0x75, 0x2f, 0x81, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff,
+ 0x69, 0x52, 0x61, 0xeb, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f,
+ 0x82, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0x2b,
+ 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x83, 0x12, 0x73, 0x35,
+ 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0x6b, 0x89, 0x54, 0x22, 0x09,
+ 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x84, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b,
+ 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0xab, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20,
+ 0xe0, 0x14, 0x75, 0x2f, 0x85, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff,
+ 0x69, 0x52, 0x62, 0xeb, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f,
+ 0x86, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x2b,
+ 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x87, 0x12, 0x73, 0x35,
+ 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x6b, 0x89, 0x54, 0x22, 0x10,
+ 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x75, 0x2f, 0xa0, 0x12, 0x73, 0x35, 0x7e,
+ 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x49, 0x45, 0x30, 0x30, 0x06, 0x20, 0xe6,
+ 0x4f, 0xd2, 0x08, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x60, 0x7e, 0x37, 0x01, 0x79, 0x7e, 0x27, 0x01,
+ 0x99, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01,
+ 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x08, 0x2c, 0x38, 0x68, 0x7a,
+ 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12,
+ 0x69, 0xf0, 0x10, 0x60, 0xc4, 0x22, 0xc2, 0x60, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a,
+ 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x99, 0x28, 0x04,
+ 0x7e, 0x27, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a,
+ 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x08, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51,
+ 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x9e, 0x44, 0x08, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x04, 0x2d,
+ 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x59, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03,
+ 0x02, 0x46, 0xc2, 0x22, 0xd2, 0x08, 0x7e, 0x04, 0x04, 0x2d, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07,
+ 0x01, 0x69, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75,
+ 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda,
+ 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xa9, 0x2e, 0x24, 0x00, 0x02, 0x2d,
+ 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a,
+ 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38,
+ 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x00, 0x00, 0x2e, 0x27, 0x01, 0xa9, 0x1b, 0x38, 0x20,
+ 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73,
+ 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, 0xb1,
+ 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x00, 0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09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e,
+ 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x48, 0x1e, 0x75, 0x2f,
+ 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38,
+ 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0xda, 0xb8,
+ 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x48, 0x1e, 0xda, 0xb8, 0x02, 0x49,
+ 0x45, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f,
+ 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68,
+ 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x50,
+ 0x80, 0x02, 0xc2, 0x50, 0x12, 0x42, 0xbd, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35,
+ 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e,
+ 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13,
+ 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00,
+ 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x48, 0x72, 0x75, 0x2f,
+ 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x09, 0x01, 0x22,
+ 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x75, 0x2f, 0xa1, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x81, 0x00,
+ 0x80, 0x06, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0,
+ 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x4c, 0x72, 0x30, 0x31, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x09,
+ 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x61, 0x7e, 0x37, 0x01, 0x7b, 0x7e, 0x27, 0x01, 0x9b, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, 0x37, 0x01, 0x7b, 0x7e, 0x37,
+ 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0c, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5b,
+ 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10,
+ 0x61, 0xc4, 0x22, 0xc2, 0x61, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9b, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a,
+ 0x37, 0x01, 0x7b, 0x7e, 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0c, 0x2c, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73,
+ 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35,
+ 0x9e, 0x44, 0x0c, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x08, 0x2d, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x5b, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x49, 0xef,
+ 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x08, 0x2d, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x75,
+ 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12,
+ 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68,
+ 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xab, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb,
+ 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38,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0x20, 0x68, 0x04, 0xd2, 0x59,
+ 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2,
+ 0x51, 0x12, 0x42, 0xd4, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00,
+ 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02,
+ 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e,
+ 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36,
+ 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4b, 0x9f, 0x75, 0x2f, 0x95, 0x12, 0x73,
+ 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03,
+ 0xd2, 0x0a, 0x22, 0x75, 0x2f, 0xa2, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x82, 0x00, 0x80, 0x06, 0x20,
+ 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8,
+ 0x68, 0x03, 0x12, 0x4f, 0x9f, 0x30, 0x32, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0a, 0x22, 0x30, 0xe6,
+ 0x02, 0xd2, 0x62, 0x7e, 0x37, 0x01, 0x7d, 0x7e, 0x27, 0x01, 0x9d, 0x9d, 0x32, 0x40, 0x31, 0x7d,
+ 0x02, 0x2e, 0x05, 0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, 0x6d, 0x75, 0x2f, 0x94, 0x12,
+ 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2,
+ 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01,
+ 0xcb, 0x7e, 0x27, 0x01, 0xad, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38,
+ 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01,
+ 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e,
+ 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xad, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12,
+ 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54,
+ 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1,
+ 0x00, 0x10, 0xd2, 0x12, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28,
+ 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x02, 0x00, 0x2e, 0x67, 0x01, 0xad, 0x9e, 0x24, 0x00, 0x02, 0x40,
+ 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01,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38, 0x13, 0x7a, 0x47, 0x01, 0x5f, 0x75,
+ 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f,
+ 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x14, 0x2d, 0x9d, 0x24,
+ 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x10, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5f, 0x12,
+ 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x50, 0x49, 0x22, 0xd2, 0x0b, 0x7e, 0x04, 0x10,
+ 0x2d, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, 0x01, 0x6f, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75,
+ 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1,
+ 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27,
+ 0x01, 0xaf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02,
+ 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43,
+ 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x03, 0x00,
+ 0x2e, 0x27, 0x01, 0xaf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02,
+ 0x6a, 0x63, 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x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73,
+ 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1,
+ 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12,
+ 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0,
+ 0xdb, 0x22, 0x02, 0x51, 0xf9, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12,
+ 0x73, 0x35, 0x22, 0x10, 0x0c, 0x01, 0x22, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x2f, 0xa4,
+ 0x12, 0x73, 0x35, 0x7e, 0x14, 0x84, 0x00, 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09,
+ 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x55, 0xf9, 0x30,
+ 0x34, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0c, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x64, 0x7e, 0x37, 0x01,
+ 0x81, 0x7e, 0x27, 0x01, 0xa1, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05,
+ 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x18,
+ 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f,
+ 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x64, 0xc4, 0x22, 0xc2, 0x64, 0x2d, 0x23, 0x68, 0x78,
+ 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x81, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27,
+ 0x01, 0xa1, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa1, 0x7e, 0x37, 0x01, 0x81, 0x9d, 0x32, 0x7d, 0x02,
+ 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43,
+ 0x2d, 0x42, 0xbe, 0x44, 0x18, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12,
+ 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73,
+ 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x18, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0,
+ 0x7e, 0x34, 0x14, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x61, 0x12, 0x69, 0xf0, 0xbe,
+ 0x25, 0x20, 0x78, 0x03, 0x02, 0x53, 0x76, 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x14, 0x2d, 0x7a, 0x07,
+ 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12,
+ 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca,
+ 0xb8, 0x54, 0x82,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x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x54, 0xd2,
+ 0xda, 0xb8, 0x02, 0x55, 0xf9, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12,
+ 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, 0x80,
+ 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x12, 0x43, 0x19, 0x02, 0x61, 0x13, 0x75, 0x2f,
+ 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0,
+ 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0,
+ 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0,
+ 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02,
+ 0x55, 0x26, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22,
+ 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x75, 0x2f, 0xa5, 0x12, 0x73, 0x35,
+ 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x59, 0x26, 0x30, 0x35, 0x06, 0x20,
+ 0xe6, 0x4f, 0xd2, 0x0d, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x65, 0x7e, 0x37, 0x01, 0x83, 0x7e, 0x27,
+ 0x01, 0xa3, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3c, 0x7a, 0x05, 0x3c, 0x7a, 0x37,
+ 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1c, 0x2c, 0x38, 0x68,
+ 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35,
+ 0x12, 0x69, 0xf0, 0x10, 0x65, 0xc4, 0x22, 0xc2, 0x65, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80,
+ 0x1a, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa3, 0x28,
+ 0x04, 0x7e, 0x27, 0x01, 0xa3, 0x7e, 0x37, 0x01, 0x83, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3c,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 73'
echo 'File patch-2.2.20 is continued in part 74'
echo "74" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:55 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part56

#!/bin/sh -x
# this is part 56 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 56; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X int dev = TAPE_NR(STp->devt);

@@ -831,16 +869,16 @@
X position;
X
X /*
- * Search and wait for the next logical tape block
+ * Search and wait for the next logical tape frame
X */
X while (1) {
X if (cnt++ > 400) {
- printk(KERN_WARNING "osst%d: Couldn't find logical block %d, aborting\n",
- dev, logical_blk_num);
+ printk(KERN_ERR "osst%d:E: Couldn't find logical frame %d, aborting\n",
+ dev, frame_seq_number);
X if (STp->read_error_frame) {
X osst_set_frame_position(STp, aSCpnt, STp->read_error_frame, 0);
-#if 1 //DEBUG
- printk(OSST_DEB_MSG "osst%d: Repositioning tape to bad block %d\n",
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Repositioning tape to bad frame %d\n",
X dev, STp->read_error_frame);
X #endif
X STp->read_error_frame = 0;
@@ -849,54 +887,55 @@


X }
X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Looking for block %d, attempt %d\n",
- dev, logical_blk_num, cnt);
+ printk(OSST_DEB_MSG "osst%d:D: Looking for frame %d, attempt %d\n",
+ dev, frame_seq_number, cnt);
X #endif
X if ( osst_initiate_read(STp, aSCpnt)
- || ( (!STp->logical_blk_in_buffer) && osst_read_block(STp, aSCpnt, 30) ) ) {
+ || ( (!STp->frame_in_buffer) && osst_read_frame(STp, aSCpnt, 30) ) ) {
X position = osst_get_frame_position(STp, aSCpnt);
X if (position >= 0xbae && position < 0xbb8)
X position = 0xbb8;
X else if (position > STp->eod_frame_ppos || ++bad == 10) {
-printk(OSST_DEB_MSG "osst%d: start again from pos %d, eod %d, bad %d\n", dev, position, STp->eod_frame_ppos, bad); /*FIXME*/
X position = STp->read_error_frame - 1;
X }
X else {
X position += 39;
X cnt += 20;
X }
-#if 1 //DEBUG
- printk(OSST_DEB_MSG "osst%d: Bad block detected, positioning tape to block %d\n",
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Bad frame detected, positioning tape to frame %d\n",
X dev, position);
X #endif
X osst_set_frame_position(STp, aSCpnt, position, 0);
X continue;
X }
- if (osst_verify_frame(STp, logical_blk_num, quiet))
+ if (osst_verify_frame(STp, frame_seq_number, quiet))
X break;
X if (osst_verify_frame(STp, -1, quiet)) {
- x = ntohl(STp->buffer->aux->logical_blk_num);
+ x = ntohl(STp->buffer->aux->frame_seq_num);
X if (STp->fast_open) {
-#if 1 //DEBUG
- printk(OSST_DEB_MSG "osst%d: Found logical block %d instead of %d after fast open\n",
- dev, x, logical_blk_num);
-#endif
+ printk(KERN_WARNING
+ "osst%d:W: Found logical frame %d instead of %d after fast open\n",
+ dev, x, frame_seq_number);
X STp->header_ok = 0;
X STp->read_error_frame = 0;
X return (-EIO);
X }
- if (x > logical_blk_num) {
+ if (x > frame_seq_number) {
X if (++past > 3) {
- /* positioning backwards did not bring us to the desired block */
+ /* positioning backwards did not bring us to the desired frame */
X position = STp->read_error_frame - 1;


X }
- else
+ else {

X position = osst_get_frame_position(STp, aSCpnt)
- + logical_blk_num - x - 1;
-#if 1 //DEBUG
+ + frame_seq_number - x - 1;
+ if (STp->first_frame_position >= 3000 && position < 3000)
+ position -= 10;
+ }
+#if DEBUG
X printk(OSST_DEB_MSG
- "osst%d: Found logical block %d while looking for %d: back up %d\n",
- dev, x, logical_blk_num,
+ "osst%d:D: Found logical frame %d while looking for %d: back up %d\n",
+ dev, x, frame_seq_number,
X STp->first_frame_position - position);
X #endif
X osst_set_frame_position(STp, aSCpnt, position, 0);
@@ -907,22 +946,26 @@
X }
X if (osst_get_frame_position(STp, aSCpnt) == 0xbaf) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Skipping config partition\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Skipping config partition\n", dev);
X #endif
X osst_set_frame_position(STp, aSCpnt, 0xbb8, 0);
X cnt--;
X }


- STp->logical_blk_in_buffer = 0;
+ STp->frame_in_buffer = 0;
X }

X if (cnt > 1) {
X STp->recover_count++;
X STp->recover_erreg++;
+ printk(KERN_WARNING "osst%d:I: Read error at position %d recovered\n",
+ dev, STp->read_error_frame);
X }
- STp->logical_blk_num = ntohl(STp->buffer->aux->logical_blk_num);
+ STp->read_count++;
X
X #if DEBUG
X if (debugging || STps->eof)
- printk(OSST_DEB_MSG "osst%i: Exit get logical block (%d=>%d) from OnStream tape with code %d\n", dev, logical_blk_num, STp->logical_blk_num, STps->eof);
+ printk(OSST_DEB_MSG
+ "osst%i:D: Exit get logical frame (%d=>%d) from OnStream tape with code %d\n",
+ dev, frame_seq_number, STp->frame_seq_number, STps->eof);
X #endif


X STp->fast_open = FALSE;

X STp->read_error_frame = 0;
@@ -931,60 +974,196 @@
X
X static int osst_seek_logical_blk(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int logical_blk_num)
X {
- int estimate;
- int retries = 0;
- int dev = TAPE_NR(STp->devt);
-
+ ST_partstat * STps = &(STp->ps[STp->partition]);
+ int dev = TAPE_NR(STp->devt);
+ int retries = 0;
+ int frame_seq_estimate, ppos_estimate, move;
+
X if (logical_blk_num < 0) logical_blk_num = 0;
- /* FIXME -- this may not be valid for foreign formats */
- if (logical_blk_num < 2980) estimate = logical_blk_num + 10;
- else estimate = logical_blk_num + 20;
-
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Seeking logical block %d (now at %d)\n",
- dev, logical_blk_num, STp->logical_blk_num);
-#endif
+ printk(OSST_DEB_MSG "osst%d:D: Seeking logical block %d (now at %d, size %d%c)\n",
+ dev, logical_blk_num, STp->logical_blk_num,

+ STp->block_size<1024?STp->block_size:STp->block_size/1024,
+ STp->block_size<1024?'b':'k');

+#endif
+ /* Do we know where we are? */
+ if (STps->drv_block >= 0) {
+ move = logical_blk_num - STp->logical_blk_num;
+ if (move < 0) move -= (OS_DATA_SIZE / STp->block_size) - 1;
+ move /= (OS_DATA_SIZE / STp->block_size);
+ frame_seq_estimate = STp->frame_seq_number + move;
+ } else
+ frame_seq_estimate = logical_blk_num * STp->block_size / OS_DATA_SIZE;
+
+ if (frame_seq_estimate < 2980) ppos_estimate = frame_seq_estimate + 10;
+ else ppos_estimate = frame_seq_estimate + 20;
+
X while (++retries < 10) {
- osst_set_frame_position(STp, aSCpnt, estimate, 0);
- if (osst_get_logical_blk(STp, aSCpnt, logical_blk_num, 1) >= 0)
- return 0;
- if (osst_get_logical_blk(STp, aSCpnt, -1, 1) < 0)
+ if (ppos_estimate > STp->eod_frame_ppos-2) {
+ frame_seq_estimate += STp->eod_frame_ppos - 2 - ppos_estimate;
+ ppos_estimate = STp->eod_frame_ppos - 2;
+ }
+ if (frame_seq_estimate < 0) {
+ frame_seq_estimate = 0;
+ ppos_estimate = 10;
+ }
+ osst_set_frame_position(STp, aSCpnt, ppos_estimate, 0);
+ if (osst_get_logical_frame(STp, aSCpnt, frame_seq_estimate, 1) >= 0) {
+ /* we've located the estimated frame, now does it have our block? */
+ if (logical_blk_num < STp->logical_blk_num ||
+ logical_blk_num >= STp->logical_blk_num + ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt)) {


+ if (STps->eof == ST_FM_HIT)

+ move = logical_blk_num < STp->logical_blk_num? -2 : 1;
+ else {
+ move = logical_blk_num - STp->logical_blk_num;
+ if (move < 0) move -= (OS_DATA_SIZE / STp->block_size) - 1;
+ move /= (OS_DATA_SIZE / STp->block_size);
+ }
+#if DEBUG
+ printk(OSST_DEB_MSG
+ "osst%d:D: Seek retry %d at ppos %d fsq %d (est %d) lbn %d (need %d) move %d\n",
+ dev, retries, ppos_estimate, STp->frame_seq_number, frame_seq_estimate,
+ STp->logical_blk_num, logical_blk_num, move);
+#endif
+ frame_seq_estimate += move;
+ ppos_estimate += move;
+ continue;
+ } else {
+ STp->buffer->read_pointer = (logical_blk_num - STp->logical_blk_num) * STp->block_size;
+ STp->buffer->buffer_bytes -= STp->buffer->read_pointer;


+ STp->logical_blk_num = logical_blk_num;

+#if DEBUG
+ printk(OSST_DEB_MSG
+ "osst%d:D: Seek success at ppos %d fsq %d in_buf %d, bytes %d, ptr %d*%d\n",
+ dev, ppos_estimate, STp->frame_seq_number, STp->frame_in_buffer,
+ STp->buffer->buffer_bytes, STp->buffer->read_pointer / STp->block_size,
+ STp->block_size);
+#endif
+ STps->drv_file = ntohl(STp->buffer->aux->filemark_cnt);


+ if (STps->eof == ST_FM_HIT) {

+ STps->drv_file++;
+ STps->drv_block = 0;
+ } else {
+ STps->drv_block = ntohl(STp->buffer->aux->last_mark_lbn)?
+ STp->logical_blk_num -
+ (STps->drv_file ? ntohl(STp->buffer->aux->last_mark_lbn) + 1 : 0):
+ -1;
+ }
+ STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_NOEOF;


+ return 0;
+ }
+ }

+ if (osst_get_logical_frame(STp, aSCpnt, -1, 1) < 0)
X goto error;
- if (STp->logical_blk_num != logical_blk_num)
- estimate += logical_blk_num - STp->logical_blk_num;
+ /* we are not yet at the estimated frame, adjust our estimate of its physical position */
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Seek retry %d at ppos %d fsq %d (est %d) lbn %d (need %d)\n",
+ dev, retries, ppos_estimate, STp->frame_seq_number, frame_seq_estimate,
+ STp->logical_blk_num, logical_blk_num);
+#endif
+ if (frame_seq_estimate != STp->frame_seq_number)
+ ppos_estimate += frame_seq_estimate - STp->frame_seq_number;
X else
X break;
X }
X error:
- printk(KERN_WARNING "osst%d: Couldn't seek to logical block %d (at %d), %d retries\n",
+ printk(KERN_ERR "osst%d:E: Couldn't seek to logical block %d (at %d), %d retries\n",
X dev, logical_blk_num, STp->logical_blk_num, retries);


X return (-EIO);
X }
X

-static int osst_seek_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int frame)
+/* The values below are based on the OnStream frame payload size of 32K == 2**15,
+ * that is, OSST_FRAME_SHIFT + OSST_SECTOR_SHIFT must be 15. With a minimum block
+ * size of 512 bytes, we need to be able to resolve 32K/512 == 64 == 2**6 positions
+ * inside each frame. Finaly, OSST_SECTOR_MASK == 2**OSST_FRAME_SHIFT - 1.
+ */
+#define OSST_FRAME_SHIFT 6
+#define OSST_SECTOR_SHIFT 9
+#define OSST_SECTOR_MASK 0x03F
+
+static int osst_get_sector(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt)
X {
- ST_partstat * STps = &(STp->ps[STp->partition]);
- int r;
+ int sector;
+#if DEBUG
+ int dev = TAPE_NR(STp->devt);
+
+ printk(OSST_DEB_MSG
+ "osst%d:D: Positioned at ppos %d, frame %d, lbn %d, file %d, blk %d, %cptr %d, eof %d\n",
+ dev, STp->first_frame_position, STp->frame_seq_number, STp->logical_blk_num,
+ STp->ps[STp->partition].drv_file, STp->ps[STp->partition].drv_block,
+ STp->ps[STp->partition].rw == ST_WRITING?'w':'r',
+ STp->ps[STp->partition].rw == ST_WRITING?STp->buffer->buffer_bytes:
+ STp->buffer->read_pointer, STp->ps[STp->partition].eof);
+#endif
+ /* do we know where we are inside a file? */
+ if (STp->ps[STp->partition].drv_block >= 0) {
+ sector = (STp->frame_in_buffer ? STp->first_frame_position-1 :
+ STp->first_frame_position) << OSST_FRAME_SHIFT;
+ if (STp->ps[STp->partition].rw == ST_WRITING)
+ sector |= (STp->buffer->buffer_bytes >> OSST_SECTOR_SHIFT) & OSST_SECTOR_MASK;
+ else
+ sector |= (STp->buffer->read_pointer >> OSST_SECTOR_SHIFT) & OSST_SECTOR_MASK;
+ } else {
+ sector = osst_get_frame_position(STp, aSCpnt);
+ if (sector > 0)
+ sector <<= OSST_FRAME_SHIFT;
+ }
+ return sector;
+}
X
+static int osst_seek_sector(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int sector)
+{
+ ST_partstat * STps = &(STp->ps[STp->partition]);
+ int frame = sector >> OSST_FRAME_SHIFT,
+ offset = (sector & OSST_SECTOR_MASK) << OSST_SECTOR_SHIFT,
+ r;
+#if DEBUG
+ int dev = TAPE_NR(STp->devt);
+
+ printk(OSST_DEB_MSG "osst%d:D: Seeking sector %d in frame %d at offset %d\n",
+ dev, sector, frame, offset);
+#endif
X if (frame < 0 || frame >= STp->capacity) return (-ENXIO);
X
X if (frame <= STp->first_data_ppos) {
- STp->logical_blk_num = STps->drv_file = STps->drv_block = 0;
+ STp->frame_seq_number = STp->logical_blk_num = STps->drv_file = STps->drv_block = 0;
X return (osst_set_frame_position(STp, aSCpnt, frame, 0));
X }
- r = osst_set_frame_position(STp, aSCpnt, frame-1, 0);
+ r = osst_set_frame_position(STp, aSCpnt, offset?frame:frame-1, 0);
X if (r < 0) return r;
X
- r = osst_get_logical_blk(STp, aSCpnt, -1, 1);
+ r = osst_get_logical_frame(STp, aSCpnt, -1, 1);
X if (r < 0) return r;
X
- if (osst_get_frame_position(STp, aSCpnt) != frame) return (-EIO);
+ if (osst_get_frame_position(STp, aSCpnt) != (offset?frame+1:frame)) return (-EIO);
X
- STp->logical_blk_num++;


- STp->logical_blk_in_buffer = 0;

- STps->drv_file = htonl(STp->buffer->aux->filemark_cnt);
- STps->drv_block = -1;
- STps->eof = ST_NOEOF; /* FIXME test for eod */
+ if (offset) {
+ STp->logical_blk_num += offset / STp->block_size;
+ STp->buffer->read_pointer = offset;
+ STp->buffer->buffer_bytes -= offset;
+ } else {
+ STp->frame_seq_number++;


+ STp->frame_in_buffer = 0;

+ STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);
+ STp->buffer->buffer_bytes = STp->buffer->read_pointer = 0;
+ }
+ STps->drv_file = ntohl(STp->buffer->aux->filemark_cnt);


+ if (STps->eof == ST_FM_HIT) {

+ STps->drv_file++;
+ STps->drv_block = 0;
+ } else {
+ STps->drv_block = ntohl(STp->buffer->aux->last_mark_lbn)?
+ STp->logical_blk_num -
+ (STps->drv_file ? ntohl(STp->buffer->aux->last_mark_lbn) + 1 : 0):
+ -1;
+ }
+ STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_NOEOF;
+#if DEBUG
+ printk(OSST_DEB_MSG
+ "osst%d:D: Now positioned at ppos %d, frame %d, lbn %d, file %d, blk %d, rptr %d, eof %d\n",
+ dev, STp->first_frame_position, STp->frame_seq_number, STp->logical_blk_num,
+ STps->drv_file, STps->drv_block, STp->buffer->read_pointer, STps->eof);
+#endif


X return 0;
X }
X

@@ -992,38 +1171,43 @@
X * Read back the drive's internal buffer contents, as a part
X * of the write error recovery mechanism for old OnStream
X * firmware revisions.
+ * Precondition for this function to work: all frames in the
+ * drive's buffer must be of one type (DATA, MARK or EOD)!
X */
X static int osst_read_back_buffer_and_rewrite(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt,
- unsigned int block, unsigned int skip, int pending)
+ unsigned int frame, unsigned int skip, int pending)
X {
X Scsi_Cmnd * SCpnt = * aSCpnt;
X unsigned char * buffer, * p;


X unsigned char cmd[MAX_COMMAND_SIZE];

- int frames, flag, new_block, i, logical_blk_num;
- int dev = TAPE_NR(STp->devt);
- long startwait = jiffies;
+ int flag, new_frame, i;
+ int nframes = STp->cur_frames;
+ int blks_per_frame = ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);
+ int frame_seq_number = ntohl(STp->buffer->aux->frame_seq_num)
+ - (nframes + pending - 1);
+ int logical_blk_num = ntohl(STp->buffer->aux->logical_blk_num)
+ - (nframes + pending - 1) * blks_per_frame;
+ int dev = TAPE_NR(STp->devt);
+ long startwait = jiffies;
X #if DEBUG
- int dbg = debugging;
+ int dbg = debugging;
X #endif
X
- frames = STp->cur_frames;
- if ((buffer = (unsigned char *)vmalloc((frames + pending) * OS_DATA_SIZE)) == NULL)
+ if ((buffer = (unsigned char *)vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL)
X return (-EIO);
X
- logical_blk_num = STp->logical_blk_num - frames - pending;
- printk(KERN_INFO "osst%d: Reading back %d frames from drive buffer%s\n",
- dev, frames, pending?" and one that was pending":"");
-
- if (pending) {
- osst_copy_from_buffer(STp->buffer, (p = &buffer[frames * OS_DATA_SIZE]));
-// memcpy((p = &buffer[frames * OS_DATA_SIZE]), STp->buffer->b_data, OS_DATA_SIZE);
+ printk(KERN_INFO "osst%d:I: Reading back %d frames from drive buffer%s\n",
+ dev, nframes, pending?" and one that was pending":"");
+
+ osst_copy_from_buffer(STp->buffer, (p = &buffer[nframes * OS_DATA_SIZE]));
X #if DEBUG
- if (debugging)
- printk(OSST_DEB_MSG "osst%d: Pending logical block %d, data %x %x %x %x\n",
- dev, logical_blk_num + frames, p[0], p[1], p[2], p[3]);
+ if (pending && debugging)
+ printk(OSST_DEB_MSG "osst%d:D: Pending frame %d (lblk %d), data %02x %02x %02x %02x\n",
+ dev, frame_seq_number + nframes,
+ logical_blk_num + nframes * blks_per_frame,
+ p[0], p[1], p[2], p[3]);
X #endif
- }
- for (i = 0, p = buffer; i < frames; i++, p += OS_DATA_SIZE) {
+ for (i = 0, p = buffer; i < nframes; i++, p += OS_DATA_SIZE) {


X
X memset(cmd, 0, MAX_COMMAND_SIZE);

X cmd[0] = 0x3C; /* Buffer Read */
@@ -1034,62 +1218,62 @@
X SCpnt = osst_do_scsi(SCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_RETRIES, TRUE);
X

X if ((STp->buffer)->last_result_fatal) {

- printk(KERN_ERR "osst%d: Failed to read block back from OnStream buffer\n", dev);
+ printk(KERN_ERR "osst%d:E: Failed to read frame back from OnStream buffer\n", dev);
X vfree((void *)buffer);
X *aSCpnt = SCpnt;
X return (-EIO);
X }
X osst_copy_from_buffer(STp->buffer, p);
-// memcpy(p, STp->buffer->b_data, OS_DATA_SIZE);


X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Read back logical block %d, data %x %x %x %x\n",
- dev, logical_blk_num + i, p[0], p[1], p[2], p[3]);
+ printk(OSST_DEB_MSG "osst%d:D: Read back logical frame %d, data %02x %02x %02x %02x\n",
+ dev, frame_seq_number + i, p[0], p[1], p[2], p[3]);
X #endif
X }
X *aSCpnt = SCpnt;
X osst_get_frame_position(STp, aSCpnt);
X
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Frames left in buffer: %d\n", dev, STp->cur_frames);
+ printk(OSST_DEB_MSG "osst%d:D: Frames left in buffer: %d\n", dev, STp->cur_frames);
X #endif
X /* Write synchronously so we can be sure we're OK again and don't have to recover recursively */
- /* In the header we don't actually re-write the blocks that fail, just the ones after them */
+ /* In the header we don't actually re-write the frames that fail, just the ones after them */
X
- for (flag=1, new_block=block, p=buffer, i=0; i < frames + pending; ) {
+ for (flag=1, new_frame=frame, p=buffer, i=0; i < nframes + pending; ) {
X
X if (flag) {
X if (STp->write_type == OS_WRITE_HEADER) {
X i += skip;
X p += skip * OS_DATA_SIZE;
X }
- else if (new_block < 2990 && new_block+skip+frames+pending >= 2990)
- new_block = 3000-i;
+ else if (new_frame < 2990 && new_frame+skip+nframes+pending >= 2990)
+ new_frame = 3000-i;
X else
- new_block += skip;
+ new_frame += skip;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Position to frame %d, write lblk %d\n",
- dev, new_block+i, logical_blk_num+i); /* FIXME var blk sz */
+ printk(OSST_DEB_MSG "osst%d:D: Position to frame %d, write fseq %d\n",
+ dev, new_frame+i, frame_seq_number+i);
X #endif
- osst_set_frame_position(STp, aSCpnt, new_block + i, 0);
+ osst_set_frame_position(STp, aSCpnt, new_frame + i, 0);
X osst_wait_ready(STp, aSCpnt, 60);
X osst_get_frame_position(STp, aSCpnt);
X SCpnt = * aSCpnt;
X
- if (new_block > block + 1000) {
- printk(KERN_ERR "osst%d: Failed to find valid tape media\n", dev);
+ if (new_frame > frame + 1000) {
+ printk(KERN_ERR "osst%d:E: Failed to find writable tape media\n", dev);
X vfree((void *)buffer);
X return (-EIO);
X }
X flag = 0;
- if ( i >= frames + pending ) break;
+ if ( i >= nframes + pending ) break;
X }
X osst_copy_to_buffer(STp->buffer, p);
-// memcpy(STp->buffer->b_data, p, OS_DATA_SIZE);
X /*
X * IMPORTANT: for error recovery to work, _never_ queue frames with mixed frame type!
X */
- osst_init_aux(STp, STp->buffer->aux->frame_type, logical_blk_num+i );
+ osst_init_aux(STp, STp->buffer->aux->frame_type, frame_seq_number+i,
+ logical_blk_num + i*blks_per_frame,
+ ntohl(STp->buffer->aux->dat.dat_list[0].blk_sz), blks_per_frame);
X memset(cmd, 0, MAX_COMMAND_SIZE);
X cmd[0] = WRITE_6;


X cmd[1] = 1;

@@ -1097,7 +1281,10 @@


X
X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: About to attempt to write to frame %d\n", dev, new_block+i);
+ printk(OSST_DEB_MSG
+ "osst%d:D: About to write frame %d, seq %d, lbn %d, data %02x %02x %02x %02x\n",
+ dev, new_frame+i, frame_seq_number+i, logical_blk_num + i*blks_per_frame,
+ p[0], p[1], p[2], p[3]);
X #endif
X SCpnt = osst_do_scsi(SCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_WRITE_RETRIES, TRUE);
X
@@ -1107,9 +1294,9 @@
X p += OS_DATA_SIZE; i++;
X
X /* if we just sent the last frame, wait till all successfully written */
- if ( i == frames + pending ) {
+ if ( i == nframes + pending ) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Check re-write successful\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Check re-write successful\n", dev);
X #endif
X memset(cmd, 0, MAX_COMMAND_SIZE);
X cmd[0] = WRITE_FILEMARKS;
@@ -1118,8 +1305,8 @@


X
X #if DEBUG
X if (debugging) {

- printk(OSST_DEB_MSG "osst%d: Sleeping in re-write wait ready\n", dev);


- printk(OSST_DEB_MSG "osst%d: Turning off debugging for a while\n", dev);

+ printk(OSST_DEB_MSG "osst%d:D: Sleeping in re-write wait ready\n", dev);


+ printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev);
X debugging = 0;
X }
X #endif

@@ -1144,44 +1331,47 @@
X }
X #if DEBUG
X debugging = dbg;
- printk(OSST_DEB_MSG "osst%d: Wait re-write finished\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Wait re-write finished\n", dev);
X #endif
X }
X }
+ *aSCpnt = SCpnt;
X if (flag) {
X if ((SCpnt->sense_buffer[ 2] & 0x0f) == 13 &&
X SCpnt->sense_buffer[12] == 0 &&
X SCpnt->sense_buffer[13] == 2) {
- printk(KERN_ERR "osst%d: Volume overflow in write error recovery\n", dev);
+ printk(KERN_ERR "osst%d:E: Volume overflow in write error recovery\n", dev);
X vfree((void *)buffer);
X return (-EIO); /* hit end of tape = fail */
X }
X i = ((SCpnt->sense_buffer[3] << 24) |
X (SCpnt->sense_buffer[4] << 16) |
X (SCpnt->sense_buffer[5] << 8) |
- SCpnt->sense_buffer[6] ) - new_block;
+ SCpnt->sense_buffer[6] ) - new_frame;
X p = &buffer[i * OS_DATA_SIZE];
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Additional write error at %d\n", dev, new_block+i);
+ printk(OSST_DEB_MSG "osst%d:D: Additional write error at %d\n", dev, new_frame+i);
X #endif
X osst_get_frame_position(STp, aSCpnt);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: reported frame positions: host = %d, tape = %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: reported frame positions: host = %d, tape = %d\n",
X dev, STp->first_frame_position, STp->last_frame_position);
X #endif
X }
- *aSCpnt = SCpnt;
X }
+ if (!pending)
+ osst_copy_to_buffer(STp->buffer, p); /* so buffer content == at entry in all cases */
X vfree((void *)buffer);
X return 0;
X }
X
X static int osst_reposition_and_retry(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt,
- unsigned int block, unsigned int skip, int pending)
+ unsigned int frame, unsigned int skip, int pending)


X {
X unsigned char cmd[MAX_COMMAND_SIZE];

- Scsi_Cmnd * SCpnt = * aSCpnt;

+ Scsi_Cmnd * SCpnt;


X int dev = TAPE_NR(STp->devt);

+ int expected __attribute__ ((__unused__));
X int attempts = 1000 / skip;
X int flag = 1;
X long startwait = jiffies;
@@ -1194,23 +1384,24 @@
X #if DEBUG
X debugging = dbg;
X #endif
- if (block < 2990 && block+skip+STp->cur_frames+pending >= 2990)
- block = 3000-skip;
+ if (frame < 2990 && frame+skip+STp->cur_frames+pending >= 2990)
+ frame = 3000-skip;
+ expected = frame+skip+STp->cur_frames+pending;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Position to frame %d, re-write from lblk %d\n",
- dev, block+skip, STp->logical_blk_num-STp->cur_frames-pending);
+ printk(OSST_DEB_MSG "osst%d:D: Position to fppos %d, re-write from fseq %d\n",
+ dev, frame+skip, STp->frame_seq_number-STp->cur_frames-pending);
X #endif
- osst_set_frame_position(STp, aSCpnt, block + skip, 1);
+ osst_set_frame_position(STp, aSCpnt, frame + skip, 1);
X flag = 0;
X attempts--;
X }
X if (osst_get_frame_position(STp, aSCpnt) < 0) { /* additional write error */
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Addl error, host %d, tape %d, buffer %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: Addl error, host %d, tape %d, buffer %d\n",
X dev, STp->first_frame_position,
X STp->last_frame_position, STp->cur_frames);
X #endif
- block = STp->last_frame_position;
+ frame = STp->last_frame_position;
X flag = 1;
X continue;
X }
@@ -1221,10 +1412,10 @@


X cmd[1] = 1;

X cmd[4] = 1;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: About to write pending lblk %d at frame %d\n",
- dev, STp->logical_blk_num-1, STp->first_frame_position);
+ printk(OSST_DEB_MSG "osst%d:D: About to write pending fseq %d at fppos %d\n",
+ dev, STp->frame_seq_number-1, STp->first_frame_position);
X #endif
- SCpnt = osst_do_scsi(SCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout,
+ SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout,
X MAX_WRITE_RETRIES, TRUE);
X *aSCpnt = SCpnt;
X
@@ -1232,8 +1423,8 @@
X if ((SCpnt->sense_buffer[ 2] & 0x0f) == 13 &&
X SCpnt->sense_buffer[12] == 0 &&
X SCpnt->sense_buffer[13] == 2) {
- printk(OSST_DEB_MSG
- "osst%d: Volume overflow in write error recovery\n",
+ printk(KERN_ERR
+ "osst%d:E: Volume overflow in write error recovery\n",
X dev);
X break; /* hit end of tape = fail */
X }
@@ -1247,20 +1438,25 @@
X if (STp->cur_frames == 0) {
X #if DEBUG
X debugging = dbg;
- printk(OSST_DEB_MSG "osst%d: Wait re-write finished\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Wait re-write finished\n", dev);
X #endif
+ if (STp->first_frame_position != expected) {
+ printk(KERN_ERR "osst%d:A: Actual position %d - expected %d\n",
+ dev, STp->first_frame_position, expected);
+ return (-EIO);
+ }
X return 0;


X }
X #if DEBUG
X if (debugging) {

- printk(OSST_DEB_MSG "osst%d: Sleeping in re-write wait ready\n", dev);


- printk(OSST_DEB_MSG "osst%d: Turning off debugging for a while\n", dev);

+ printk(OSST_DEB_MSG "osst%d:D: Sleeping in re-write wait ready\n", dev);


+ printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev);
X debugging = 0;
X }
X #endif

X schedule_timeout(HZ / 10);
X }
- printk(KERN_ERR "osst%d: Failed to find valid tape media\n", dev);
+ printk(KERN_ERR "osst%d:E: Failed to find valid tape media\n", dev);
X #if DEBUG
X debugging = dbg;
X #endif
@@ -1278,7 +1474,7 @@


X int dev = TAPE_NR(STp->devt);

X int retval = 0;
X int rw_state;
- unsigned int block, skip;
+ unsigned int frame, skip;
X
X rw_state = STps->rw;
X
@@ -1286,54 +1482,57 @@
X || SCpnt->sense_buffer[12] != 12
X || SCpnt->sense_buffer[13] != 0) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Write error recovery cannot handle %02x:%02x:%02x\n",
+ printk(OSST_DEB_MSG "osst%d:D: Write error recovery cannot handle %02x:%02x:%02x\n",
X dev, SCpnt->sense_buffer[ 2], SCpnt->sense_buffer[12], SCpnt->sense_buffer[13]);


X #endif
X return (-EIO);
X }

- block = (SCpnt->sense_buffer[3] << 24) |
+ frame = (SCpnt->sense_buffer[3] << 24) |
X (SCpnt->sense_buffer[4] << 16) |
X (SCpnt->sense_buffer[5] << 8) |
X SCpnt->sense_buffer[6];
X skip = SCpnt->sense_buffer[9];
X
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Detected physical bad block at %u, advised to skip %d\n", dev, block, skip);
+ printk(OSST_DEB_MSG "osst%d:D: Detected physical bad frame at %u, advised to skip %d\n",
+ dev, frame, skip);
X #endif
X osst_get_frame_position(STp, aSCpnt);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: reported frame positions: host = %d, tape = %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: reported frame positions: host = %d, tape = %d\n",
X dev, STp->first_frame_position, STp->last_frame_position);
X #endif
X switch (STp->write_type) {
X case OS_WRITE_DATA:
X case OS_WRITE_EOD:
X case OS_WRITE_NEW_MARK:
- printk(KERN_WARNING "osst%d: Relocating %d buffered logical blocks to physical block %u\n",
- dev, STp->cur_frames, block + skip);
+ printk(KERN_WARNING
+ "osst%d:I: Relocating %d buffered logical frames from position %u to %u\n",
+ dev, STp->cur_frames, frame, (frame + skip > 3000 && frame < 3000)?3000:frame + skip);
X if (STp->os_fw_rev >= 10600)
- retval = osst_reposition_and_retry(STp, aSCpnt, block, skip, pending);
+ retval = osst_reposition_and_retry(STp, aSCpnt, frame, skip, pending);
X else
- retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, block, skip, pending);
+ retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, frame, skip, pending);
+ printk(KERN_WARNING "osst%d:I: Write error%srecovered\n", dev, retval?" not ":" ");
X break;
X case OS_WRITE_LAST_MARK:
- printk(KERN_ERR "osst%d: Bad block in update last marker, fatal\n", dev);
- osst_set_frame_position(STp, aSCpnt, block + STp->cur_frames + pending, 0);
+ printk(KERN_ERR "osst%d:E: Bad frame in update last marker, fatal\n", dev);
+ osst_set_frame_position(STp, aSCpnt, frame + STp->cur_frames + pending, 0);
X retval = -EIO;
X break;
X case OS_WRITE_HEADER:
- printk(KERN_WARNING "osst%d: Bad block in header partition, skipped\n", dev);
- retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, block, 1, pending);
+ printk(KERN_WARNING "osst%d:I: Bad frame in header partition, skipped\n", dev);
+ retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, frame, 1, pending);
X break;
X default:
- printk(KERN_WARNING "osst%d: Bad block in filler, ignored\n", dev);
- osst_set_frame_position(STp, aSCpnt, block + STp->cur_frames + pending, 0);
+ printk(KERN_INFO "osst%d:I: Bad frame in filler, ignored\n", dev);
+ osst_set_frame_position(STp, aSCpnt, frame + STp->cur_frames + pending, 0);
X }
X osst_get_frame_position(STp, aSCpnt);
X #if DEBUG
- printk(KERN_ERR "osst%d: Positioning complete, cur_frames %d, pos %d, tape pos %d\n",
+ printk(OSST_DEB_MSG "osst%d:D: Positioning complete, cur_frames %d, pos %d, tape pos %d\n",
X dev, STp->cur_frames, STp->first_frame_position, STp->last_frame_position);
- printk(OSST_DEB_MSG "osst%d: next logical block to write: %d\n", dev, STp->logical_blk_num);
+ printk(OSST_DEB_MSG "osst%d:D: next logical frame to write: %d\n", dev, STp->logical_blk_num);
X #endif
X if (retval == 0) {
X STp->recover_count++;
@@ -1350,10 +1549,12 @@
X int last_mark_ppos = -1;
X
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Reached space_over_filemarks_backwards %d %d\n", dev, mt_op, mt_count);
+ printk(OSST_DEB_MSG "osst%d:D: Reached space_over_filemarks_backwards %d %d\n", dev, mt_op, mt_count);
+#endif


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks_bwd\n", dev);
X #endif


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks_bwd\n", dev);
X return -EIO;
X }
X if (STp->linux_media_version >= 4) {
@@ -1369,12 +1570,13 @@
X STp->header_cache->dat_fm_tab.fm_tab_ent[cnt-1] == STp->buffer->aux->last_mark_ppos)
X
X last_mark_ppos = ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[cnt - mt_count]);


-#if 1 //DEBUG
+#if DEBUG

X if (STp->header_cache == NULL || (cnt - mt_count) < 0 || (cnt - mt_count) >= OS_FM_TAB_MAX)
- printk(OSST_DEB_MSG "osst%i: Filemark lookup fail due to %s\n", dev,
+ printk(OSST_DEB_MSG "osst%i:D: Filemark lookup fail due to %s\n", dev,
X STp->header_cache == NULL?"lack of header cache":"count out of range");
X else
- printk(OSST_DEB_MSG "osst%i: Filemark lookup: prev mark %d (%s), skip %d to %d\n", dev, cnt,
+ printk(OSST_DEB_MSG "osst%i:D: Filemark lookup: prev mark %d (%s), skip %d to %d\n",
+ dev, cnt,
X ((cnt == -1 && ntohl(STp->buffer->aux->last_mark_ppos) == -1) ||
X (STp->header_cache->dat_fm_tab.fm_tab_ent[cnt-1] ==
X STp->buffer->aux->last_mark_ppos))?"match":"error",
@@ -1382,22 +1584,28 @@
X #endif
X if (last_mark_ppos > 10 && last_mark_ppos < STp->eod_frame_ppos) {
X osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0);


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev);


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG
+ "osst%d:D: Couldn't get logical blk num in space_filemarks\n", dev);
+#endif
X return (-EIO);
X }
X if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) {
- printk(KERN_INFO "osst%i: Expected to find marker at block %d, not found\n",
+ printk(KERN_WARNING "osst%i:W: Expected to find marker at ppos %d, not found\n",
X dev, last_mark_ppos);
X return (-EIO);
X }
X if (mt_op == MTBSFM) {
- STp->logical_blk_num++;


- STp->logical_blk_in_buffer = 0;

+ STp->frame_seq_number++;


+ STp->frame_in_buffer = 0;

+ STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);


X }
X return 0;
X }

- printk(KERN_INFO "osst%i: Reverting to scan filemark backwards\n", dev);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Reverting to scan filemark backwards\n", dev);
+#endif
X }
X cnt = 0;
X while (cnt != mt_count) {
@@ -1405,22 +1613,26 @@
X if (last_mark_ppos == -1)
X return (-EIO);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Positioning to last mark at %d\n", dev, last_mark_ppos);
+ printk(OSST_DEB_MSG "osst%d:D: Positioning to last mark at %d\n", dev, last_mark_ppos);
X #endif
X osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0);
X cnt++;


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev);


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n", dev);
+#endif
X return (-EIO);
X }
X if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) {
- printk(KERN_INFO "osst%i: expected to find marker at block %d, not found\n", dev, last_mark_ppos);
+ printk(KERN_WARNING "osst%d:W: Expected to find marker at ppos %d, not found\n",
+ dev, last_mark_ppos);


X return (-EIO);
X }
X }

X if (mt_op == MTBSFM) {
- STp->logical_blk_num++;


- STp->logical_blk_in_buffer = 0;

+ STp->frame_seq_number++;


+ STp->frame_in_buffer = 0;

+ STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);
X }
X return 0;
X }
@@ -1432,30 +1644,34 @@
X */
X static int osst_space_over_filemarks_forward_slow(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int mt_op, int mt_count)
X {
- int dev = TAPE_NR(STp->devt);
X int cnt = 0;
+#if DEBUG
+ int dev = TAPE_NR(STp->devt);
X
+ printk(OSST_DEB_MSG "osst%d:D: Reached space_over_filemarks_forward_slow %d %d\n", dev, mt_op, mt_count);
+#endif


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Reached space_over_filemarks_forward_slow %d %d\n", dev, mt_op, mt_count);
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks_fwd\n", dev);
X #endif


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks_fwd\n", dev);
X return (-EIO);
X }
X while (1) {


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev);


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n", dev);
+#endif
X return (-EIO);
X }
X if (STp->buffer->aux->frame_type == OS_FRAME_TYPE_MARKER)
X cnt++;
X if (STp->buffer->aux->frame_type == OS_FRAME_TYPE_EOD) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: space_fwd: EOD reached\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: space_fwd: EOD reached\n", dev);
X #endif
X if (STp->first_frame_position > STp->eod_frame_ppos+1) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: EOD position corrected (%d=>%d)\n",
+ printk(OSST_DEB_MSG "osst%d:D: EOD position corrected (%d=>%d)\n",
X dev, STp->eod_frame_ppos, STp->first_frame_position-1);
X #endif
X STp->eod_frame_ppos = STp->first_frame_position-1;
@@ -1464,11 +1680,12 @@
X }
X if (cnt == mt_count)
X break;


- STp->logical_blk_in_buffer = 0;
+ STp->frame_in_buffer = 0;
X }

X if (mt_op == MTFSF) {
- STp->logical_blk_num++;


- STp->logical_blk_in_buffer = 0;

+ STp->frame_seq_number++;


+ STp->frame_in_buffer = 0;

+ STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);
X }
X return 0;
X }
@@ -1483,10 +1700,12 @@
X next_mark_ppos = -1;
X
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Reached space_over_filemarks_forward_fast %d %d\n", dev, mt_op, mt_count);
+ printk(OSST_DEB_MSG "osst%d:D: Reached space_over_filemarks_forward_fast %d %d\n", dev, mt_op, mt_count);
+#endif


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks_fwd\n", dev);
X #endif


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks_fwd\n", dev);


X return (-EIO);
X }
X

@@ -1503,33 +1722,39 @@
X (STp->header_cache->dat_fm_tab.fm_tab_ent[cnt] == STp->buffer->aux->last_mark_ppos)))
X
X next_mark_ppos = ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[cnt + mt_count]);


-#if 1 //DEBUG
+#if DEBUG

X if (STp->header_cache == NULL || (cnt + mt_count) >= OS_FM_TAB_MAX)
- printk(OSST_DEB_MSG "osst%i: Filemark lookup fail due to %s\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Filemark lookup fail due to %s\n", dev,
X STp->header_cache == NULL?"lack of header cache":"count out of range");
X else
- printk(OSST_DEB_MSG "osst%i: Filemark lookup: prev mark %d (%s), skip %d to %d\n", dev, cnt,
+ printk(OSST_DEB_MSG "osst%d:D: Filemark lookup: prev mark %d (%s), skip %d to %d\n",
+ dev, cnt,
X ((cnt == -1 && ntohl(STp->buffer->aux->last_mark_ppos) == -1) ||
X (STp->header_cache->dat_fm_tab.fm_tab_ent[cnt] ==
X STp->buffer->aux->last_mark_ppos))?"match":"error",
X mt_count, next_mark_ppos);
X #endif
X if (next_mark_ppos <= 10 || next_mark_ppos > STp->eod_frame_ppos) {
- printk(KERN_INFO "osst%i: Reverting to slow filemark space\n", dev);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Reverting to slow filemark space\n", dev);
+#endif
X return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count);
X } else {
X osst_set_frame_position(STp, aSCpnt, next_mark_ppos, 0);


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev);


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n",
+ dev);
+#endif
X return (-EIO);
X }
X if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) {
- printk(KERN_INFO "osst%i: Expected to find marker at block %d, not found\n",
+ printk(KERN_WARNING "osst%d:W: Expected to find marker at ppos %d, not found\n",
X dev, next_mark_ppos);
X return (-EIO);
X }
X if (ntohl(STp->buffer->aux->filemark_cnt) != cnt + mt_count) {
- printk(KERN_INFO "osst%i: Expected to find marker %d at block %d, not %d\n",
+ printk(KERN_WARNING "osst%d:W: Expected to find marker %d at ppos %d, not %d\n",
X dev, cnt+mt_count, next_mark_ppos,
X ntohl(STp->buffer->aux->filemark_cnt));
X return (-EIO);
@@ -1544,24 +1769,28 @@
X break;
X if (STp->buffer->aux->frame_type == OS_FRAME_TYPE_EOD) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: space_fwd: EOD reached\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: space_fwd: EOD reached\n", dev);


X #endif
X return (-EIO);
X }

X if (ntohl(STp->buffer->aux->filemark_cnt) == 0) {
X if (STp->first_mark_ppos == -1) {
- printk(KERN_INFO "osst%i: Reverting to slow filemark space\n", dev);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Reverting to slow filemark space\n", dev);
+#endif
X return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count);
X }
X osst_set_frame_position(STp, aSCpnt, STp->first_mark_ppos, 0);


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO
- "osst%i: Couldn't get logical blk num in space_filemarks_fwd_fast\n",


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG
+ "osst%d:D: Couldn't get logical blk num in space_filemarks_fwd_fast\n",
X dev);
+#endif
X return (-EIO);
X }
X if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) {
- printk(KERN_INFO "osst%i: Expected to find filemark at %d\n",
+ printk(KERN_WARNING "osst%d:W: Expected to find filemark at %d\n",
X dev, STp->first_mark_ppos);
X return (-EIO);
X }
@@ -1575,28 +1804,35 @@
X while (cnt != mt_count) {
X next_mark_ppos = ntohl(STp->buffer->aux->next_mark_ppos);
X if (!next_mark_ppos || next_mark_ppos > STp->eod_frame_ppos) {
- printk(KERN_INFO "osst%i: Reverting to slow filemark space\n", dev);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Reverting to slow filemark space\n", dev);
+#endif
X return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count - cnt);
X }
X #if DEBUG
- else printk(OSST_DEB_MSG "osst%i: Positioning to next mark at %d\n", dev, next_mark_ppos);
+ else printk(OSST_DEB_MSG "osst%d:D: Positioning to next mark at %d\n", dev, next_mark_ppos);
X #endif
X osst_set_frame_position(STp, aSCpnt, next_mark_ppos, 0);
X cnt++;


- if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) {

- printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev);


+ if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {

+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n",
+ dev);
+#endif
X return (-EIO);
X }
X if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) {
- printk(KERN_INFO "osst%i: Expected to find marker at block %d, not found\n",
+ printk(KERN_WARNING "osst%d:W: Expected to find marker at ppos %d, not found\n",
X dev, next_mark_ppos);


X return (-EIO);
X }
X }

X }
- if (mt_op == MTFSF)
- STp->logical_blk_num++;


- STp->logical_blk_in_buffer = 0;

+ if (mt_op == MTFSF) {
+ STp->frame_seq_number++;


+ STp->frame_in_buffer = 0;

+ STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);


+ }
X return 0;
X }
X

@@ -1626,75 +1862,22 @@
X (STp->buffer)->b_data[MODE_HEADER_LENGTH + 3] = retries;
X
X if (debugging)
- printk(OSST_DEB_MSG "osst%i: Setting number of retries on OnStream tape to %d\n", dev, retries);
+ printk(OSST_DEB_MSG "osst%d:D: Setting number of retries on OnStream tape to %d\n", dev, retries);
X
X SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE);
X *aSCpnt = SCpnt;
X
X if ((STp->buffer)->last_result_fatal)
- printk (KERN_ERR "osst%d: Couldn't set retries to %d\n", dev, retries);
+ printk (KERN_ERR "osst%d:D: Couldn't set retries to %d\n", dev, retries);
X }
X #endif
X
-#if 0
-static void osst_update_markers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int last_mark_ppos, int this_mark_ppos)
-{
- int dev = TAPE_NR(STp->devt);
- int frame,
- reslt;
-
- if (STp->raw) return;
-
- STp->last_mark_ppos = this_mark_ppos;
- if (STp->header_cache != NULL && STp->filemark_cnt < OS_FM_TAB_MAX)
- STp->header_cache->dat_fm_tab.fm_tab_ent[STp->filemark_cnt] = htonl(this_mark_ppos);
- if (STp->filemark_cnt++ == 0)
- STp->first_mark_ppos = this_mark_ppos;
-
- if (STp->linux_media_version >= 4) return;
- if (last_mark_ppos == -1) return;
-
- STp->write_type = OS_WRITE_LAST_MARK;
- frame = osst_get_frame_position(STp, aSCpnt);
-#if DEBUG
- printk(OSST_DEB_MSG "osst%i: Update last_marker at frame %d\n", dev, last_mark_ppos);
- printk(OSST_DEB_MSG "osst%i: current position %d, lblk %d, tape blk %d\n",
- dev, frame, STp->logical_blk_num, STp->last_frame_position);
-#endif
- osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0);
- osst_initiate_read (STp, aSCpnt);
- reslt = osst_read_block(STp, aSCpnt, 180);
-
- if (reslt) {
- printk(KERN_WARNING "osst%i: couldn't read last marker\n", dev);
- osst_set_frame_position(STp, aSCpnt, frame, 0);
- return;
- }
- if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) {
- printk(KERN_WARNING "osst%i: expected marker at addr %d\n", dev, last_mark_ppos);
- osst_set_frame_position(STp, aSCpnt, frame, 0);
- return;
- }
-#if DEBUG
- printk(OSST_DEB_MSG "osst%i: writing back marker\n", dev);
-#endif
- STp->buffer->aux->next_mark_ppos = htonl(this_mark_ppos);
- osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0);
- STp->dirty = 1;
- if (osst_flush_write_buffer(STp, aSCpnt, 0) ||
- osst_flush_drive_buffer(STp, aSCpnt) ) {
- printk(KERN_WARNING "osst%i: couldn't write marker back at addr %d\n", dev, last_mark_ppos);
- }
- osst_set_frame_position(STp, aSCpnt, frame, 0);
-
- return; /* FIXME -- errors should go back to user space */
-}
-#endif
X
X static int osst_write_filemark(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt)
X {
X int result;
- int this_mark_ppos;
+ int this_mark_ppos = STp->first_frame_position;
+ int this_mark_lbn = STp->logical_blk_num;


X #if DEBUG
X int dev = TAPE_NR(STp->devt);

X #endif
@@ -1702,22 +1885,20 @@
X if (STp->raw) return 0;
X
X STp->write_type = OS_WRITE_NEW_MARK;
- this_mark_ppos = osst_get_frame_position(STp, aSCpnt);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Writing Filemark %i at frame %d (lblk %d)\n",
- dev, STp->filemark_cnt, this_mark_ppos, STp->logical_blk_num);
+ printk(OSST_DEB_MSG "osst%d:D: Writing Filemark %i at fppos %d (fseq %d, lblk %d)\n",
+ dev, STp->filemark_cnt, this_mark_ppos, STp->frame_seq_number, this_mark_lbn);
X #endif
- osst_init_aux(STp, OS_FRAME_TYPE_MARKER, STp->logical_blk_num++);


X STp->dirty = 1;

- result = osst_flush_write_buffer(STp, aSCpnt, 0);
+ result = osst_flush_write_buffer(STp, aSCpnt);
X result |= osst_flush_drive_buffer(STp, aSCpnt);
-//printk(OSST_DEB_MSG "osst%d: Finished writing file\n",TAPE_NR(STp->devt));
+
X STp->last_mark_ppos = this_mark_ppos;
+ STp->last_mark_lbn = this_mark_lbn;
X if (STp->header_cache != NULL && STp->filemark_cnt < OS_FM_TAB_MAX)
X STp->header_cache->dat_fm_tab.fm_tab_ent[STp->filemark_cnt] = htonl(this_mark_ppos);
X if (STp->filemark_cnt++ == 0)
X STp->first_mark_ppos = this_mark_ppos;
-// osst_update_markers(STp, aSCpnt, STp->last_mark_ppos, this_mark_ppos);


X return result;
X }
X

@@ -1731,70 +1912,67 @@
X if (STp->raw) return 0;
X
X STp->write_type = OS_WRITE_EOD;
- STp->eod_frame_ppos = osst_get_frame_position(STp, aSCpnt);
+ STp->eod_frame_ppos = STp->first_frame_position;
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Writing EOD at %d=>%d\n", dev, STp->logical_blk_num, STp->eod_frame_ppos);
+ printk(OSST_DEB_MSG "osst%d:D: Writing EOD at fppos %d (fseq %d, lblk %d)\n", dev,
+ STp->eod_frame_ppos, STp->frame_seq_number, STp->logical_blk_num);
X #endif
- osst_init_aux(STp, OS_FRAME_TYPE_EOD, STp->logical_blk_num++);


X STp->dirty = 1;
X

- result = osst_flush_write_buffer(STp, aSCpnt, 0);
+ result = osst_flush_write_buffer(STp, aSCpnt);
X result |= osst_flush_drive_buffer(STp, aSCpnt);
- STp->eod_frame_lfa = --(STp->logical_blk_num);
+ STp->eod_frame_lfa = --(STp->frame_seq_number);


X return result;
X }
X

-static int osst_write_filler(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int block, int count)
+static int osst_write_filler(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int where, int count)
X {


X int dev = TAPE_NR(STp->devt);
X

X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Reached onstream write filler group %d\n", dev, block);
+ printk(OSST_DEB_MSG "osst%d:D: Reached onstream write filler group %d\n", dev, where);
X #endif
X osst_wait_ready(STp, aSCpnt, 60 * 5);
- osst_set_frame_position(STp, aSCpnt, block, 0);
+ osst_set_frame_position(STp, aSCpnt, where, 0);
X STp->write_type = OS_WRITE_FILLER;
- osst_init_aux(STp, OS_FRAME_TYPE_FILL, 0);
X while (count--) {
X memcpy(STp->buffer->b_data, "Filler", 6);
X STp->buffer->buffer_bytes = 6;
X STp->dirty = 1;
- if (osst_flush_write_buffer(STp, aSCpnt, 0)) {
- printk(KERN_INFO "osst%i: Couldn't write filler frame\n", dev);
+ if (osst_flush_write_buffer(STp, aSCpnt)) {
+ printk(KERN_INFO "osst%i:I: Couldn't write filler frame\n", dev);


X return (-EIO);
X }
X }

X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Exiting onstream write filler group\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Exiting onstream write filler group\n", dev);
X #endif
X return osst_flush_drive_buffer(STp, aSCpnt);
X }
X
-static int __osst_write_header(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int block, int count)
+static int __osst_write_header(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int where, int count)
X {


X int dev = TAPE_NR(STp->devt);

X int result;
X
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Reached onstream write header group %d\n", dev, block);
+ printk(OSST_DEB_MSG "osst%d:D: Reached onstream write header group %d\n", dev, where);
X #endif
X osst_wait_ready(STp, aSCpnt, 60 * 5);
- osst_set_frame_position(STp, aSCpnt, block, 0);
+ osst_set_frame_position(STp, aSCpnt, where, 0);
X STp->write_type = OS_WRITE_HEADER;
- osst_init_aux(STp, OS_FRAME_TYPE_HEADER, STp->logical_blk_num);
X while (count--) {
X osst_copy_to_buffer(STp->buffer, (unsigned char *)STp->header_cache);
-// memcpy(STp->buffer->b_data, STp->header_cache, sizeof(os_header_t));
X STp->buffer->buffer_bytes = sizeof(os_header_t);


X STp->dirty = 1;

- if (osst_flush_write_buffer(STp, aSCpnt, 0)) {
- printk(KERN_INFO "osst%i: Couldn't write header frame\n", dev);
+ if (osst_flush_write_buffer(STp, aSCpnt)) {
+ printk(KERN_INFO "osst%i:I: Couldn't write header frame\n", dev);


X return (-EIO);
X }
X }

X result = osst_flush_drive_buffer(STp, aSCpnt);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Write onstream header group %s\n", dev, result?"failed":"done");
+ printk(OSST_DEB_MSG "osst%d:D: Write onstream header group %s\n", dev, result?"failed":"done");
X #endif
X return result;
X }
@@ -1806,18 +1984,18 @@


X int dev = TAPE_NR(STp->devt);
X

X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Writing tape header\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Writing tape header\n", dev);
X #endif
X if (STp->raw) return 0;
X

X if (STp->header_cache == NULL) {
X if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) {
- printk(KERN_ERR "osst%i: Failed to allocate header cache\n", dev);
+ printk(KERN_ERR "osst%i:E: Failed to allocate header cache\n", dev);

X return (-ENOMEM);
X }
X memset(STp->header_cache, 0, sizeof(os_header_t));
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Allocated and cleared memory for header cache\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Allocated and cleared memory for header cache\n", dev);
X #endif
X }
X if (STp->header_ok) STp->update_frame_cntr++;
@@ -1858,12 +2036,12 @@
X
X if (locate_eod) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: locating back to eod frame addr %d\n", dev, STp->eod_frame_ppos);
+ printk(OSST_DEB_MSG "osst%d:D: Locating back to eod frame addr %d\n", dev, STp->eod_frame_ppos);
X #endif
X osst_set_frame_position(STp, aSCpnt, STp->eod_frame_ppos, 0);
X }
X if (reslt)
- printk(KERN_WARNING "osst%i: write header failed\n", dev);
+ printk(KERN_ERR "osst%d:E: Write header failed\n", dev);
X else {
X memcpy(STp->application_sig, "LIN4", 4);
X STp->linux_media = 1;
@@ -1878,15 +2056,15 @@
X if (STp->header_cache != NULL)
X memset(STp->header_cache, 0, sizeof(os_header_t));
X
- STp->logical_blk_num = 0;


- STp->logical_blk_in_buffer = 0;

+ STp->logical_blk_num = STp->frame_seq_number = 0;


+ STp->frame_in_buffer = 0;

X STp->eod_frame_ppos = STp->first_data_ppos = 0x0000000A;
X STp->filemark_cnt = 0;


- STp->first_mark_ppos = STp->last_mark_ppos = -1;
+ STp->first_mark_ppos = STp->last_mark_ppos = STp->last_mark_lbn = -1;

X return osst_write_header(STp, aSCpnt, 1);
X }
X
-static int __osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int block)
+static int __osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int ppos)
X {


X int dev = TAPE_NR(STp->devt);

X os_header_t * header;
@@ -1898,17 +2076,17 @@
X if (STp->raw)
X return 1;
X
- if (block == 5 || block == 0xbae || STp->buffer->last_result_fatal) {
- if (osst_set_frame_position(STp, aSCpnt, block, 0))
- printk(KERN_WARNING "osst%i: Couldn't position tape\n", dev);
+ if (ppos == 5 || ppos == 0xbae || STp->buffer->last_result_fatal) {
+ if (osst_set_frame_position(STp, aSCpnt, ppos, 0))
+ printk(KERN_WARNING "osst%i:W: Couldn't position tape\n", dev);
X if (osst_initiate_read (STp, aSCpnt)) {
- printk(KERN_WARNING "osst%i: Couldn't initiate read\n", dev);
+ printk(KERN_WARNING "osst%i:W: Couldn't initiate read\n", dev);


X return 0;
X }
X }

- if (osst_read_block(STp, aSCpnt, 180)) {
+ if (osst_read_frame(STp, aSCpnt, 180)) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Couldn't read header frame\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Couldn't read header frame\n", dev);


X #endif
X return 0;
X }

@@ -1916,7 +2094,20 @@
X aux = STp->buffer->aux;
X if (aux->frame_type != OS_FRAME_TYPE_HEADER) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Skipping non-header frame (%d)\n", dev, block);
+ printk(OSST_DEB_MSG "osst%d:D: Skipping non-header frame (%d)\n", dev, ppos);
+#endif
+ return 0;
+ }
+ if (ntohl(aux->frame_seq_num) != 0 ||
+ ntohl(aux->logical_blk_num) != 0 ||
+ aux->partition.partition_num != OS_CONFIG_PARTITION ||
+ ntohl(aux->partition.first_frame_ppos) != 0 ||
+ ntohl(aux->partition.last_frame_ppos) != 0xbb7 ) {
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Invalid header frame (%d,%d,%d,%d,%d)\n", dev,
+ ntohl(aux->frame_seq_num), ntohl(aux->logical_blk_num),
+ aux->partition.partition_num, ntohl(aux->partition.first_frame_ppos),
+ ntohl(aux->partition.last_frame_ppos));


X #endif
X return 0;
X }

@@ -1924,51 +2115,57 @@
X strncmp(header->ident_str, "ADR-SEQ", 7) != 0) {
X strncpy(id_string, header->ident_str, 7);
X id_string[7] = 0;
- printk(KERN_INFO "osst%i: Invalid header identification string %s\n", dev, id_string);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Invalid header identification string %s\n", dev, id_string);
+#endif
X return 0;
X }
X update_frame_cntr = ntohl(aux->update_frame_cntr);


X if (update_frame_cntr < STp->update_frame_cntr) {

X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Skipping frame %d with update_frame_counter %d<%d\n",
- dev, block, update_frame_cntr, STp->update_frame_cntr);
+ printk(OSST_DEB_MSG "osst%d:D: Skipping frame %d with update_frame_counter %d<%d\n",
+ dev, ppos, update_frame_cntr, STp->update_frame_cntr);


X #endif
X return 0;
X }

X if (header->major_rev != 1 || header->minor_rev != 4 ) {
- printk(KERN_INFO "osst%i: %s revision %d.%d detected (1.4 supported)\n",
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: %s revision %d.%d detected (1.4 supported)\n",
X dev, (header->major_rev != 1 || header->minor_rev < 2 ||
X header->minor_rev > 4 )? "Invalid" : "Warning:",
X header->major_rev, header->minor_rev);
+#endif
X if (header->major_rev != 1 || header->minor_rev < 2 || header->minor_rev > 4)
X return 0;
X }
+#if DEBUG
X if (header->pt_par_num != 1)
- printk(KERN_INFO "osst%i: Warning: %d partitions defined, only one supported\n",
+ printk(KERN_INFO "osst%i:W: %d partitions defined, only one supported\n",
X dev, header->pt_par_num);
+#endif
X memcpy(id_string, aux->application_sig, 4);
X id_string[4] = 0;
X if (memcmp(id_string, "LIN", 3) == 0) {
X STp->linux_media = 1;
X linux_media_version = id_string[3] - '0';
X if (linux_media_version != 4)
- printk(KERN_INFO "osst%i: Linux media version %d detected (current 4)\n",
+ printk(KERN_INFO "osst%i:I: Linux media version %d detected (current 4)\n",
X dev, linux_media_version);
X } else {
- printk(KERN_WARNING "osst%i: non Linux media detected (%s)\n", dev, id_string);
+ printk(KERN_WARNING "osst%i:W: Non Linux media detected (%s)\n", dev, id_string);
X return 0;
X }
X if (linux_media_version < STp->linux_media_version) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%i: Skipping frame %d with linux_media_version %d\n",


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 56'
echo 'File patch-2.2.20 is continued in part 57'
echo "57" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 3:59:57 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part58

#!/bin/sh -x
# this is part 58 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 58; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ printk(OSST_DEB_MSG "osst%d:D: Device already in use.\n", dev);


X #endif
X return (-EBUSY);
X }

@@ -3789,7 +4061,7 @@
X if (mode != STp->current_mode) {


X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Mode change from %d to %d.\n",
+ printk(OSST_DEB_MSG "osst%d:D: Mode change from %d to %d.\n",
X dev, STp->current_mode, mode);
X #endif
X new_session = TRUE;
@@ -3811,7 +4083,7 @@
X if (i >= osst_nbr_buffers) {
X STp->buffer = new_tape_buffer(FALSE, need_dma_buffer);
X if (STp->buffer == NULL) {
- printk(KERN_WARNING "osst%d: Can't allocate tape buffer.\n", dev);
+ printk(KERN_WARNING "osst%d:W: Can't allocate tape buffer.\n", dev);
X STp->in_use = 0;
X if (STp->device->host->hostt->module)
X __MOD_DEC_USE_COUNT(STp->device->host->hostt->module);
@@ -3842,7 +4114,6 @@


X STps->rw = ST_IDLE;
X }

X STp->ready = ST_READY;
- STp->recover_count = 0;
X #if DEBUG
X STp->nbr_waits = STp->nbr_finished = 0;
X #endif
@@ -3865,7 +4136,7 @@
X (SCpnt->sense_buffer[2] & 0x0f) == NOT_READY &&
X SCpnt->sense_buffer[12] == 4 ) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Unit not ready, cause %x\n", dev, SCpnt->sense_buffer[13]);
+ printk(OSST_DEB_MSG "osst%d:D: Unit not ready, cause %x\n", dev, SCpnt->sense_buffer[13]);
X #endif
X if (SCpnt->sense_buffer[13] == 2) { /* initialize command required (LOAD) */
X memset (cmd, 0, MAX_COMMAND_SIZE);
@@ -3879,7 +4150,7 @@


X if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&

X (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: Unit wants attention\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Unit wants attention\n", dev);
X #endif


X STp->header_ok = 0;
X

@@ -3900,7 +4171,7 @@
X STp->nbr_partitions = 1; /* This guess will be updated later if necessary */


X for (i=0; i < ST_NBR_PARTITIONS; i++) {

X STps = &(STp->ps[i]);
- STps->rw = ST_IDLE;
+ STps->rw = ST_IDLE; /* FIXME - seems to be redundant... */


X STps->eof = ST_NOEOF;

X STps->at_sm = 0;

X STps->last_block_valid = FALSE;
@@ -3908,6 +4179,7 @@
X STps->drv_file = 0 ;
X }
X new_session = TRUE;
+ STp->recover_count = 0;
X }
X /*
X * if we have valid headers from before, and the drive/tape seem untouched,
@@ -3930,7 +4202,7 @@
X STp->buffer->b_data[MODE_HEADER_LENGTH + 4] != 'N' ||
X STp->buffer->b_data[MODE_HEADER_LENGTH + 5] != '4' ) {
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: signature was changed to %c%c%c%c\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: Signature was changed to %c%c%c%c\n", dev,
X STp->buffer->b_data[MODE_HEADER_LENGTH + 2],
X STp->buffer->b_data[MODE_HEADER_LENGTH + 3],
X STp->buffer->b_data[MODE_HEADER_LENGTH + 4],
@@ -3942,17 +4214,23 @@
X if (STp->header_ok && i == osst_get_frame_position(STp, &SCpnt)) {
X if (STp->door_locked == ST_UNLOCKED) {
X if (osst_int_ioctl(STp, &SCpnt, MTLOCK, 0))
- printk(KERN_WARNING "osst%d: Can't lock drive door\n", dev);
+ printk(KERN_INFO "osst%d:I: Can't lock drive door\n", dev);
X else
X STp->door_locked = ST_LOCKED_AUTO;
X }
+ if (!STp->frame_in_buffer) {
+ STp->block_size = (STp->raw) ? OS_FRAME_SIZE : (
+ (STm->default_blksize > 0) ? STm->default_blksize : OS_DATA_SIZE);
+ STp->buffer->buffer_bytes = STp->buffer->read_pointer = 0;
+ }
+ STp->buffer->buffer_blocks = OS_DATA_SIZE / STp->block_size;
X STp->fast_open = TRUE;
X scsi_release_command(SCpnt);


X return 0;
X }
X #if DEBUG

X if (i != STp->first_frame_position)
- printk(OSST_DEB_MSG "osst%d: tape position changed from %d to %d\n", dev, i, STp->first_frame_position);
+ printk(OSST_DEB_MSG "osst%d:D: Tape position changed from %d to %d\n", dev, i, STp->first_frame_position);
X #endif


X STp->header_ok = 0;
X }

@@ -3975,8 +4253,8 @@
X (STp->buffer)->b_data[MODE_HEADER_LENGTH + 2] = 2;
X (STp->buffer)->b_data[MODE_HEADER_LENGTH + 3] = 3;
X
-#if 1 //DEBUG
- printk(OSST_DEB_MSG "osst%i: Applying soft reset\n", dev);
+#if DEBUG
+ printk(OSST_DEB_MSG "osst%d:D: Applying soft reset\n", dev);
X #endif


X SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE);
X

@@ -4012,7 +4290,7 @@
X }
X
X if (osst_wait_ready(STp, &SCpnt, 3 * 60)) /* FIXME - not allowed with NOBLOCK */
- printk(KERN_WARNING "osst%i: Device did not become Ready in open\n",dev);
+ printk(KERN_INFO "osst%i:I: Device did not become Ready in open\n",dev);
X
X if ((STp->buffer)->last_result_fatal != 0) {
X if ((STp->device)->scsi_level >= SCSI_2 &&
@@ -4041,7 +4319,7 @@
X
X if (OS_FRAME_SIZE > (STp->buffer)->buffer_size &&
X !enlarge_buffer(STp->buffer, OS_FRAME_SIZE, STp->restr_dma)) {
- printk(KERN_NOTICE "osst%d: Framesize %d too large for buffer.\n", dev,
+ printk(KERN_NOTICE "osst%d:A: Framesize %d too large for buffer.\n", dev,
X OS_FRAME_SIZE);
X scsi_release_command(SCpnt);
X SCpnt = NULL;
@@ -4061,22 +4339,26 @@
X b_size += STp->buffer->sg[i++].length);
X STp->buffer->aux = (os_aux_t *) (STp->buffer->sg[i].address + OS_DATA_SIZE - b_size);
X #if DEBUG
- printk(OSST_DEB_MSG "osst%d: b_data points to %p in segment 0 at %p\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: b_data points to %p in segment 0 at %p\n", dev,
X STp->buffer->b_data, STp->buffer->sg[0].address);
- printk(OSST_DEB_MSG "osst%d: AUX points to %p in segment %d at %p\n", dev,
+ printk(OSST_DEB_MSG "osst%d:D: AUX points to %p in segment %d at %p\n", dev,
X STp->buffer->aux, i, STp->buffer->sg[i].address);
X #endif
X } else
X STp->buffer->aux = NULL; /* this had better never happen! */
X
- (STp->buffer)->buffer_blocks = 1;
+ STp->block_size = (STp->raw) ? OS_FRAME_SIZE : (
+ (STm->default_blksize > 0) ? STm->default_blksize : OS_DATA_SIZE);
+ STp->min_block = 512;
+ STp->max_block = OS_DATA_SIZE;
+ (STp->buffer)->buffer_blocks = OS_DATA_SIZE / STp->block_size;


X (STp->buffer)->buffer_bytes =

X (STp->buffer)->read_pointer =


- STp->logical_blk_in_buffer = 0;
+ STp->frame_in_buffer = 0;
X

X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Block size: %d, frame size: %d, buffer size: %d (%d blocks).\n",
+ printk(OSST_DEB_MSG "osst%d:D: Block size: %d, frame size: %d, buffer size: %d (%d blocks).\n",
X dev, STp->block_size, OS_FRAME_SIZE, (STp->buffer)->buffer_size,
X (STp->buffer)->buffer_blocks);
X #endif
@@ -4085,7 +4367,7 @@
X STp->write_prot = 1;


X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Write protected\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Write protected\n", dev);
X #endif
X if ((flags & O_ACCMODE) == O_WRONLY || (flags & O_ACCMODE) == O_RDWR) {
X (STp->buffer)->in_use = 0;
@@ -4105,7 +4387,7 @@
X if (new_session) { /* Change the drive parameters for the new mode */


X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: New Session\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: New Session\n", dev);
X #endif
X STp->density_changed = STp->blksize_changed = FALSE;
X STp->compression_changed = FALSE;
@@ -4116,7 +4398,7 @@
X */
X if (STp->door_locked == ST_UNLOCKED) {
X if (osst_int_ioctl(STp, &SCpnt, MTLOCK, 0))
- printk(KERN_WARNING "osst%d: Can't lock drive door\n", dev);
+ printk(KERN_INFO "osst%d:I: Can't lock drive door\n", dev);
X else
X STp->door_locked = ST_LOCKED_AUTO;
X }
@@ -4152,7 +4434,7 @@


X STps = &(STp->ps[STp->partition]);
X

X if ( STps->rw == ST_WRITING && !(STp->device)->was_reset) {

- result = osst_flush_write_buffer(STp, &SCpnt, 1);
+ result = osst_flush_write_buffer(STp, &SCpnt);
X if (result != 0 && result != (-ENOSPC))
X goto out;
X }
@@ -4161,9 +4443,9 @@


X
X #if DEBUG
X if (debugging) {

- printk(OSST_DEB_MSG "osst%d: File length %ld bytes.\n",
+ printk(OSST_DEB_MSG "osst%d:D: File length %ld bytes.\n",
X dev, (long)(filp->f_pos));
- printk(OSST_DEB_MSG "osst%d: Async write waits %d, finished %d.\n",
+ printk(OSST_DEB_MSG "osst%d:D: Async write waits %d, finished %d.\n",
X dev, STp->nbr_waits, STp->nbr_finished);
X }
X #endif
@@ -4184,7 +4466,7 @@


X
X #if DEBUG
X if (debugging)

- printk(OSST_DEB_MSG "osst%d: Buffer flushed, %d EOF(s) written\n",
+ printk(OSST_DEB_MSG "osst%d:D: Buffer flushed, %d EOF(s) written\n",
X dev, 1+STp->two_fm);
X #endif
X }
@@ -4192,7 +4474,7 @@


X STps = &(STp->ps[STp->partition]);

X if (!STm->sysv || STps->rw != ST_READING) {
X if (STp->can_bsr)
- result = osst_flush_buffer(STp, &SCpnt, 0);
+ result = osst_flush_buffer(STp, &SCpnt, 0); /* this is the default path */
X else if (STps->eof == ST_FM_HIT) {
X result = cross_eof(STp, &SCpnt, FALSE);
X if (result) {
@@ -4218,12 +4500,24 @@
X out:
X if (STp->rew_at_close) {
X result2 = osst_position_tape_and_confirm(STp, &SCpnt, STp->first_data_ppos);


- STps->drv_file = STps->drv_block = STp->logical_blk_num = 0;

- if (result == 0)
+ STps->drv_file = STps->drv_block = STp->frame_seq_number = STp->logical_blk_num = 0;
+ if (result == 0 && result2 < 0)
X result = result2;
X }


X if (SCpnt) scsi_release_command(SCpnt);
X

+ if (STp->recover_count) {
+ printk(KERN_INFO "osst%d:I: %d recovered errors in", dev, STp->recover_count);
+ if (STp->write_count)
+ printk(" %d frames written", STp->write_count);
+ if (STp->read_count)
+ printk(" %d frames read", STp->read_count);
+ printk("\n");
+ STp->recover_count = 0;
+ }
+ STp->write_count = 0;
+ STp->read_count = 0;
+


X return result;
X }
X

@@ -4275,7 +4569,7 @@
X STp = os_scsi_tapes[dev];
X #if DEBUG
X if (debugging && !STp->in_use) {


- printk(OSST_DEB_MSG "osst%d: Incorrect device.\n", dev);
+ printk(OSST_DEB_MSG "osst%d:D: Incorrect device.\n", dev);
X return (-EIO);
X }
X #endif

@@ -4304,7 +4598,7 @@
X return (-EFAULT);
X
X if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) {
- printk(KERN_WARNING "osst%d: MTSETDRVBUFFER only allowed for root.\n", dev);
+ printk(KERN_WARNING "osst%d:W: MTSETDRVBUFFER only allowed for root.\n", dev);
X return (-EPERM);
X }
X if (!STm->defined &&
@@ -4359,7 +4653,7 @@
X if (STp->door_locked != ST_UNLOCKED &&
X STp->door_locked != ST_LOCK_FAILS) {
X if (osst_int_ioctl(STp, &SCpnt, MTLOCK, 0)) {
- printk(KERN_NOTICE "osst%d: Could not relock door after bus reset.\n",
+ printk(KERN_NOTICE "osst%d:I: Could not relock door after bus reset.\n",
X dev);
X STp->door_locked = ST_UNLOCKED;
X }
@@ -4409,7 +4703,7 @@
X return 0;
X }
X if (mtc.mt_op == MTSEEK) {
- i = osst_seek_frame(STp, &SCpnt, mtc.mt_count);
+ i = osst_seek_sector(STp, &SCpnt, mtc.mt_count);
X if (SCpnt) scsi_release_command(SCpnt);
X if (!STp->can_partitions)
X STp->ps[0].rw = ST_IDLE;
@@ -4502,7 +4796,7 @@
X if (cmd_type == _IOC_TYPE(MTIOCPOS) && cmd_nr == _IOC_NR(MTIOCPOS)) {
X if (_IOC_SIZE(cmd_in) != sizeof(struct mtpos))
X return (-EINVAL);
- blk = osst_get_frame_position(STp, &SCpnt);
+ blk = osst_get_sector(STp, &SCpnt);
X if (SCpnt) scsi_release_command(SCpnt);
X if (blk < 0)
X return blk;
@@ -4594,7 +4888,7 @@
X }
X }
X if (!tb) {
- printk(KERN_NOTICE "osst: Can't allocate new tape buffer (nbr %d).\n",
+ printk(KERN_NOTICE "osst :I: Can't allocate new tape buffer (nbr %d).\n",
X osst_nbr_buffers);
X return NULL;
X }
@@ -4604,10 +4898,10 @@


X #if DEBUG
X if (debugging) {

X printk(OSST_DEB_MSG
- "osst: Allocated tape buffer %d (%d bytes, %d segments, dma: %d, a: %p).\n",
+ "osst :D: Allocated tape buffer %d (%d bytes, %d segments, dma: %d, a: %p).\n",
X osst_nbr_buffers, got, tb->sg_segs, need_dma, tb->b_data);
X printk(OSST_DEB_MSG
- "osst: segment sizes: first %d, last %d bytes.\n",
+ "osst :D: segment sizes: first %d, last %d bytes.\n",
X tb->sg[0].length, tb->sg[segs-1].length);
X }
X #endif
@@ -4652,8 +4946,7 @@
X order--;
X continue;
X }
- printk(KERN_NOTICE "osst: Failed to enlarge buffer to %d bytes.\n",
- new_size);
+ printk(KERN_WARNING "osst :W: Failed to enlarge buffer to %d bytes.\n", new_size);
X #if DEBUG
X STbuffer->buffer_size = got;
X #endif
@@ -4671,10 +4964,10 @@
X if (debugging) {
X for (nbr=0; osst_buffers[nbr] != STbuffer && nbr < osst_nbr_buffers; nbr++);
X printk(OSST_DEB_MSG
- "osst: Expanded tape buffer %d (%d bytes, %d->%d segments, dma: %d, a: %p).\n",
+ "osst :D: Expanded tape buffer %d (%d bytes, %d->%d segments, dma: %d, a: %p).\n",
X nbr, got, STbuffer->orig_sg_segs, STbuffer->sg_segs, need_dma, STbuffer->b_data);
X printk(OSST_DEB_MSG
- "osst: segment sizes: first %d, last %d bytes.\n",
+ "osst :D: segment sizes: first %d, last %d bytes.\n",
X STbuffer->sg[0].length, STbuffer->sg[segs-1].length);
X }
X #endif
@@ -4699,7 +4992,7 @@
X }
X #if DEBUG
X if (debugging && STbuffer->orig_sg_segs < STbuffer->sg_segs)
- printk(OSST_DEB_MSG "osst: Buffer at %p normalized to %d bytes (segs %d).\n",
+ printk(OSST_DEB_MSG "osst :D: Buffer at %p normalized to %d bytes (segs %d).\n",
X STbuffer->b_data, STbuffer->buffer_size, STbuffer->sg_segs);
X #endif
X STbuffer->sg_segs = STbuffer->orig_sg_segs;
@@ -4716,7 +5009,7 @@
X i < st_bp->sg_segs && offset >= st_bp->sg[i].length; i++)
X offset -= st_bp->sg[i].length;
X if (i == st_bp->sg_segs) { /* Should never happen */
- printk(KERN_WARNING "osst: Append_to_buffer offset overflow.\n");
+ printk(KERN_WARNING "osst :A: Append_to_buffer offset overflow.\n");
X return (-EIO);
X }
X for ( ; i < st_bp->sg_segs && do_count > 0; i++) {
@@ -4731,7 +5024,7 @@
X offset = 0;
X }
X if (do_count) { /* Should never happen */
- printk(KERN_WARNING "osst: Append_to_buffer overflow (left %d).\n",
+ printk(KERN_WARNING "osst :A: Append_to_buffer overflow (left %d).\n",
X do_count);
X return (-EIO);
X }
@@ -4749,7 +5042,7 @@
X i < st_bp->sg_segs && offset >= st_bp->sg[i].length; i++)
X offset -= st_bp->sg[i].length;
X if (i == st_bp->sg_segs) { /* Should never happen */
- printk(KERN_WARNING "osst: From_buffer offset overflow.\n");
+ printk(KERN_WARNING "osst :A: From_buffer offset overflow.\n");
X return (-EIO);
X }
X for ( ; i < st_bp->sg_segs && do_count > 0; i++) {
@@ -4765,7 +5058,7 @@
X offset = 0;
X }
X if (do_count) { /* Should never happen */
- printk(KERN_WARNING "osst: From_buffer overflow (left %d).\n",
+ printk(KERN_WARNING "osst :A: From_buffer overflow (left %d).\n",
X do_count);
X return (-EIO);
X }
@@ -4782,10 +5075,10 @@
X i < st_bp->sg_segs && offset >= st_bp->sg[i].length; i++)
X offset -= st_bp->sg[i].length;
X if (i == st_bp->sg_segs) { /* Should never happen */
- printk(KERN_WARNING "osst: Zero_buffer offset overflow.\n");
+ printk(KERN_WARNING "osst :A: Zero_buffer offset overflow.\n");
X return (-EIO);
X }
- for (do_count = OS_DATA_SIZE - st_bp->read_pointer;
+ for (do_count = OS_DATA_SIZE - st_bp->buffer_bytes;
X i < st_bp->sg_segs && do_count > 0; i++) {
X cnt = st_bp->sg[i].length - offset < do_count ?
X st_bp->sg[i].length - offset : do_count ;
@@ -4794,13 +5087,13 @@
X offset = 0;
X }
X if (do_count) { /* Should never happen */
- printk(KERN_WARNING "osst: Zero_buffer overflow (left %d).\n", do_count);
+ printk(KERN_WARNING "osst :A: Zero_buffer overflow (left %d).\n", do_count);
X return (-EIO);
X }
X return 0;
X }
X
-/* Copy a osst 32K block of memory into the buffer.
+/* Copy a osst 32K chunk of memory into the buffer.
X Returns zero (success) or negative error code. */
X static int osst_copy_to_buffer(OSST_buffer *st_bp, unsigned char *ptr)
X {
@@ -4814,14 +5107,14 @@
X ptr += cnt;
X }
X if (do_count || i != st_bp->sg_segs-1) { /* Should never happen */
- printk(KERN_WARNING "osst: Copy_to_buffer overflow (left %d at sg %d).\n",
+ printk(KERN_WARNING "osst :A: Copy_to_buffer overflow (left %d at sg %d).\n",
X do_count, i);
X return (-EIO);
X }
X return 0;
X }
X
-/* Copy a osst 32K block of memory from the buffer.
+/* Copy a osst 32K chunk of memory from the buffer.
X Returns zero (success) or negative error code. */
X static int osst_copy_from_buffer(OSST_buffer *st_bp, unsigned char *ptr)
X {
@@ -4835,7 +5128,7 @@
X ptr += cnt;
X }
X if (do_count || i != st_bp->sg_segs-1) { /* Should never happen */
- printk(KERN_WARNING "osst: Copy_from_buffer overflow (left %d at sg %d).\n",
+ printk(KERN_WARNING "osst :A: Copy_from_buffer overflow (left %d at sg %d).\n",
X do_count, i);
X return (-EIO);
X }
@@ -4847,8 +5140,8 @@
X
X #ifndef MODULE
X /* Set the boot options. Syntax: st=xxx,yyy
- where xxx is buffer size in 1024 byte blocks and yyy is write threshold
- in 1024 byte blocks. */
+ where xxx is buffer size in 1024 byte chunks and yyy is write threshold
+ in 1024 byte chunks. */
X __initfunc( void osst_setup(char *str, int *ints))
X {
X if (ints[0] > 0 && ints[1] > 0)
@@ -4883,7 +5176,7 @@
X OS_Scsi_Tape * tpnt;
X ST_mode * STm;
X ST_partstat * STps;
- int i;
+ int i, dev;
X #ifdef CONFIG_DEVFS_FS
X int mode;
X #endif
@@ -4904,16 +5197,17 @@
X tpnt = (OS_Scsi_Tape *)kmalloc(sizeof(OS_Scsi_Tape), GFP_ATOMIC);
X if (tpnt == NULL) {
X SDp->attached--;
- printk(KERN_ERR "osst: Can't allocate device descriptor.\n");
+ printk(KERN_WARNING "osst :W: Can't allocate device descriptor.\n");
X return 1;
X }
X memset(tpnt, 0, sizeof(OS_Scsi_Tape));
X os_scsi_tapes[i] = tpnt;
+ dev = i;
X tpnt->capacity = 0xfffff;
X
X /* allocate a buffer for this device */
X if (!new_tape_buffer(TRUE, TRUE))
- printk(KERN_ERR "osst: Unable to allocate a tape buffer.\n");
+ printk(KERN_ERR "osst :W: Unable to allocate a tape buffer.\n");
X
X #ifdef CONFIG_DEVFS_FS
X for (mode = 0; mode < ST_NBR_MODES; ++mode) {
@@ -4960,17 +5254,12 @@
X tpnt->long_timeout = OSST_LONG_TIMEOUT;
X
X /* Recognize OnStream tapes */
- printk ("osst%i: Tape driver with OnStream support osst %s\nosst%i: %s\n",
- i, osst_version, i, cvsid);
X /* We don't need to test for OnStream, as this has been done in detect () */
X tpnt->os_fw_rev = osst_parse_firmware_rev (SDp->rev);
-#if DEBUG
- printk ("osst%i: OnStream tape drive recognized, Model %s\n", i, SDp->model);
-#endif
X tpnt->omit_blklims = 1;
X
X tpnt->poll = (strncmp(SDp->model, "DI-", 3) == 0) || OSST_FW_NEED_POLL(tpnt->os_fw_rev,SDp);
- tpnt->logical_blk_in_buffer = 0;
+ tpnt->frame_in_buffer = 0;
X tpnt->header_ok = 0;
X tpnt->linux_media = 0;
X tpnt->header_cache = NULL;
@@ -4984,7 +5273,7 @@
X STm->do_buffer_writes = OSST_BUFFER_WRITES;
X STm->do_read_ahead = OSST_READ_AHEAD;


X STm->default_compression = ST_DONT_TOUCH;

- STm->default_blksize = 32 * ST_KILOBYTE; /* No forced size */
+ STm->default_blksize = 512;
X STm->default_density = (-1); /* No forced density */
X }
X
@@ -5005,6 +5294,10 @@
X tpnt->blksize_changed = FALSE;
X
X osst_template.nr_dev++;
+
+ printk(KERN_INFO "osst :I: Attached OnStream %.5s tape at scsi%d, channel %d, id %d, lun %d as osst%d\n",
+ SDp->model, SDp->host->host_no, SDp->channel, SDp->id, SDp->lun, dev);
+


X return 0;
X };
X

@@ -5016,10 +5309,7 @@
X * layer (ide-scsi, usb-storage, ...) */
X if (!OSST_SUPPORTS(SDp)) return 0;
X
- printk(KERN_WARNING
- "Detected OnStream scsi tape osst%d at scsi%d, channel %d, id %d, lun %d\n",
- osst_template.dev_noticed++,
- SDp->host->host_no, SDp->channel, SDp->id, SDp->lun);
+ osst_template.dev_noticed++;
X
X return 1;
X }
@@ -5039,7 +5329,7 @@
X #else
X if (register_chrdev(MAJOR_NR,"osst",&osst_fops)) {
X #endif
- printk(KERN_ERR "osst: Unable to get major %d for OnStream tapes\n",MAJOR_NR);
+ printk(KERN_ERR "osst :W: Unable to get major %d for OnStream tapes\n",MAJOR_NR);
X return 1;
X }
X osst_registered++;
@@ -5048,12 +5338,12 @@
X if (os_scsi_tapes) return 0;
X osst_template.dev_max = OSST_MAX_TAPES;
X if (osst_template.dev_max > 128 / ST_NBR_MODES)
- printk(KERN_INFO "osst: Only %d tapes accessible.\n", 128 / ST_NBR_MODES);
+ printk(KERN_INFO "osst :I: Only %d tapes accessible.\n", 128 / ST_NBR_MODES);
X os_scsi_tapes =
X (OS_Scsi_Tape **)kmalloc(osst_template.dev_max * sizeof(OS_Scsi_Tape *),
X GFP_ATOMIC);
X if (os_scsi_tapes == NULL) {
- printk(KERN_ERR "osst: Unable to allocate array for OnStream SCSI tapes.\n");
+ printk(KERN_ERR "osst :W: Unable to allocate array for OnStream SCSI tapes.\n");
X #ifdef CONFIG_DEVFS_FS
X devfs_unregister_chrdev(MAJOR_NR, "osst");
X #else
@@ -5069,7 +5359,7 @@
X (OSST_buffer **)kmalloc(osst_template.dev_max * sizeof(OSST_buffer *),
X GFP_ATOMIC);
X if (osst_buffers == NULL) {
- printk(KERN_ERR "osst: Unable to allocate tape buffer pointers.\n");
+ printk(KERN_ERR "osst :W: Unable to allocate tape buffer pointers.\n");
X #ifdef CONFIG_DEVFS_FS
X devfs_unregister_chrdev(MAJOR_NR, "osst");
X #else
@@ -5080,8 +5370,10 @@
X }
X osst_nbr_buffers = 0;
X
+ printk(KERN_INFO "osst :I: Tape driver with OnStream support version %s\nosst :I: %s\n", osst_version, cvsid);
+
X #if DEBUG
- printk(OSST_DEB_MSG "osst: Buffer size %d bytes, write threshold %d bytes.\n",
+ printk(OSST_DEB_MSG "osst :D: Buffer size %d bytes, write threshold %d bytes.\n",
X osst_buffer_size, osst_write_threshold);


X #endif
X return 0;

@@ -5135,9 +5427,12 @@
X osst_max_buffers = max_buffers;
X if (max_sg_segs >= OSST_FIRST_SG)
X osst_max_sg_segs = max_sg_segs;
- printk(KERN_INFO "osst: bufsize %d, wrt %d, max buffers %d, s/g segs %d.\n",
+#if DEBUG
+ printk(OSST_DEB_MSG "osst :D: bufsize %d, wrt %d, max buffers %d, s/g segs %d.\n",
X osst_buffer_size, osst_write_threshold, osst_max_buffers, osst_max_sg_segs);
-//printk(OSST_DEB_MSG "osst: sizeof(header) = %d (%s)\n",sizeof(os_header_t),sizeof(os_header_t)==OS_DATA_SIZE?"ok":"error");
+//printk(OSST_DEB_MSG "osst :D: sizeof(header) = %d (%s)\n",
+// sizeof(os_header_t),sizeof(os_header_t)==OS_DATA_SIZE?"ok":"error");
+#endif
X osst_template.module = &__this_module;
X result = scsi_register_module(MODULE_SCSI_DEV, &osst_template);
X if (result)
@@ -5179,6 +5474,6 @@
X }
X }
X osst_template.dev_max = 0;
- printk(KERN_INFO "osst: Unloaded.\n");
+ printk(KERN_INFO "osst :I: Unloaded.\n");
X }


X #endif /* MODULE */

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/osst.h linux/drivers/scsi/osst.h
--- v2.2.19/drivers/scsi/osst.h Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/osst.h Wed Oct 10 01:41:18 2001


@@ -1,5 +1,5 @@
X /*

- * $Header: /home/cvsroot/Driver/osst.h,v 1.5.2.2 2000/10/08 03:07:33 riede Exp $
+ * $Header: /home/cvsroot/Driver/osst.h,v 1.5.2.4 2001/01/26 01:30:56 riede Exp $
X */
X
X #include <linux/config.h>
@@ -319,7 +319,8 @@
X * Linux specific fields:
X */
X __u32 next_mark_ppos; /* when known, points to next marker */
- __u8 linux_specific[28];
+ __u32 last_mark_lbn; /* storing log_blk_num of last mark is extends ADR spec */
+ __u8 linux_specific[24];
X
X __u8 reserved_256_511[256];
X } os_aux_t;
@@ -459,6 +460,8 @@
X int min_block;
X int max_block;
X int recover_count; /* from tape opening */
+ int write_count;
+ int read_count;
X int recover_erreg; /* from last status call */
X /*
X * OnStream specific data
@@ -466,8 +469,9 @@
X int os_fw_rev; /* the firmware revision * 10000 */
X unsigned char raw; /* flag OnStream raw access (32.5KB block size) */
X unsigned char poll; /* flag that this drive needs polling (IDE|firmware) */
- unsigned char logical_blk_in_buffer; /* flag that the block as per logical_blk_num
+ unsigned char frame_in_buffer; /* flag that the frame as per frame_seq_number
X * has been read into STp->buffer and is valid */
+ int frame_seq_number; /* logical frame number */
X int logical_blk_num; /* logical block number */
X unsigned first_frame_position; /* physical frame to be transfered to/from host */
X unsigned last_frame_position; /* physical frame to be transferd to/from tape */
@@ -485,6 +489,7 @@
X int filemark_cnt;
X int first_mark_ppos;
X int last_mark_ppos;
+ int last_mark_lbn; /* storing log_blk_num of last mark is extends ADR spec */
X int first_data_ppos;
X int eod_frame_ppos;
X int eod_frame_lfa;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/osst_options.h linux/drivers/scsi/osst_options.h
--- v2.2.19/drivers/scsi/osst_options.h Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/osst_options.h Wed Oct 10 01:41:18 2001
@@ -8,7 +8,7 @@
X Changed (and renamed) for OnStream SCSI drives gar...@suse.de
X 2000-06-21
X
- $Header: /home/cvsroot/Driver/osst_options.h,v 1.4 2000/06/26 01:44:01 riede Exp $
+ $Header: /home/cvsroot/Driver/osst_options.h,v 1.4.2.1 2000/11/25 22:02:44 riede Exp $
X */
X
X #ifndef _OSST_OPTIONS_H
@@ -24,7 +24,7 @@
X because of buffered reads. Should be set to zero to support also drives
X that can't space backwards over records. NOTE: The tape will be
X spaced backwards over an "accidentally" crossed filemark in any case. */
-#define OSST_IN_FILE_POS 0
+#define OSST_IN_FILE_POS 1
X
X /* The tape driver buffer size in kilobytes. */
X /* Don't change, as this is the HW blocksize */
@@ -33,7 +33,13 @@
X /* The number of kilobytes of data in the buffer that triggers an
X asynchronous write in fixed block mode. See also OSST_ASYNC_WRITES
X below. */
-#define OSST_WRITE_THRESHOLD_BLOCKS 30
+#define OSST_WRITE_THRESHOLD_BLOCKS 32
+
+/* OSST_EOM_RESERVE defines the number of frames are kept in reserve for
+ * * write error recovery when writing near end of medium. ENOSPC is returned
+ * * when write() is called and the tape write position is within this number
+ * * of blocks from the tape capacity. */
+#define OSST_EOM_RESERVE 300
X
X /* The maximum number of tape buffers the driver allocates. The number
X is also constrained by the number of drives detected. Determines the
@@ -64,7 +70,7 @@
X
X /* If OSST_BUFFER_WRITES is non-zero, writes in fixed block mode are
X buffered until the driver buffer is full or asynchronous write is
- triggered. May make detection of End-Of-Medium early enough fail. */
+ triggered. */
X #define OSST_BUFFER_WRITES 1
X
X /* If OSST_ASYNC_WRITES is non-zero, the SCSI write command may be started
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/qlogicfc.c linux/drivers/scsi/qlogicfc.c
--- v2.2.19/drivers/scsi/qlogicfc.c Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/qlogicfc.c Wed Oct 10 01:41:19 2001
@@ -1324,6 +1324,7 @@
X case WRITE_6:
X case WRITE_BUFFER:
X case MODE_SELECT:
+ case MODE_SELECT_10:
X cmd->control_flags = CFLAG_WRITE;
X break;
X case REQUEST_SENSE:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/qlogicpti.c linux/drivers/scsi/qlogicpti.c
--- v2.2.19/drivers/scsi/qlogicpti.c Sun Mar 25 17:31:32 2001
+++ linux/drivers/scsi/qlogicpti.c Wed Oct 10 01:41:19 2001
@@ -648,7 +648,8 @@
X /* Is this a red snapper? */
X if(strcmp(qpti_dev->prom_name, "ptisp") &&
X strcmp(qpti_dev->prom_name, "PTI,ptisp") &&
- strcmp(qpti_dev->prom_name, "QLGC,isp"))
+ strcmp(qpti_dev->prom_name, "QLGC,isp") &&
+ strcmp(qpti_dev->prom_name, "SUNW,isp"))
X continue;
X
X /* Sometimes Antares cards come up not completely
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
--- v2.2.19/drivers/scsi/scsi.c Sun Mar 25 17:31:31 2001
+++ linux/drivers/scsi/scsi.c Wed Oct 10 01:41:19 2001
@@ -307,6 +307,7 @@
X {"COMPAQ","LOGICAL VOLUME","*", BLIST_FORCELUN},
X {"NEC","PD-1 ODX654P","*", BLIST_FORCELUN | BLIST_SINGLELUN},
X {"MATSHITA","PD-1","*", BLIST_FORCELUN | BLIST_SINGLELUN},
+{"TEAC","PD-1","*", BLIST_FORCELUN | BLIST_SINGLELUN},
X {"iomega","jaz 1GB","J.86", BLIST_NOTQ | BLIST_NOLUN},
X {"TOSHIBA","CDROM","*", BLIST_ISROM},
X {"MegaRAID", "LD", "*", BLIST_FORCELUN}, /* Multiple luns always safe (logical raid vols) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/sd_ioctl.c linux/drivers/scsi/sd_ioctl.c
--- v2.2.19/drivers/scsi/sd_ioctl.c Sun Mar 25 17:31:30 2001
+++ linux/drivers/scsi/sd_ioctl.c Wed Oct 10 01:41:19 2001
@@ -57,6 +57,7 @@
X diskinfo[2] = rscsi_disks[DEVICE_NR(dev)].capacity >> 11;
X
X /* override with calculated, extended default, or driver values */
+/* this is the only call of hostt->bios_param() */
X
X if(host->hostt->bios_param != NULL)
X host->hostt->bios_param(&rscsi_disks[DEVICE_NR(dev)],
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/sg.c linux/drivers/scsi/sg.c
--- v2.2.19/drivers/scsi/sg.c Sun Mar 25 17:31:30 2001
+++ linux/drivers/scsi/sg.c Wed Oct 10 01:41:20 2001
@@ -7,7 +7,7 @@
X * Original driver (sg.c):
X * Copyright (C) 1992 Lawrence Foard
X * 2.x extensions to driver:
- * Copyright (C) 1998 - 2000 Douglas Gilbert
+ * Copyright (C) 1998 - 2001 Douglas Gilbert
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
X *
X * Borrows code from st driver. Thanks to Alessandro Rubini's "dd" book.
X */
- static char * sg_version_str = "Version: 2.1.39 (20000626)";
- static int sg_version_num = 20139; /* 2 digits for each component */
+ static char * sg_version_str = "Version: 2.1.40 (20010620)";
+ static int sg_version_num = 20140; /* 2 digits for each component */
X /*
X * D. P. Gilbert (dgil...@interlog.com, do...@triode.net.au), notes:
X * - scsi logging is available via SCSI_LOG_TIMEOUT macros. First
@@ -1635,18 +1635,14 @@
X }
X
X /* If retSzp==NULL want exact size or fail */
-/* sg_low_malloc() should always be called from a process context allowing
- GFP_KERNEL to be used instead of GFP_ATOMIC */
X static char * sg_low_malloc(int rqSz, int lowDma, int mem_src, int * retSzp)
X {
X char * resp = NULL;
- int page_mask = lowDma ? (GFP_KERNEL | GFP_DMA) : GFP_KERNEL;
+ int page_mask = lowDma ? (GFP_ATOMIC | GFP_DMA) : GFP_ATOMIC;
X
X if (rqSz <= 0)
X return resp;
X if (SG_HEAP_KMAL == mem_src) {
- page_mask = lowDma ? (GFP_ATOMIC | GFP_DMA) : GFP_ATOMIC;
- /* Seen kmalloc(..,GFP_KERNEL) hang for 40 secs! */
X resp = kmalloc(rqSz, page_mask);
X if (resp && retSzp) *retSzp = rqSz;
X #ifdef SG_DEBUG
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/st.c linux/drivers/scsi/st.c
--- v2.2.19/drivers/scsi/st.c Sun Mar 25 17:37:36 2001
+++ linux/drivers/scsi/st.c Mon Oct 22 10:42:43 2001
@@ -8,10 +8,10 @@
X order) Klaus Ehrenfried, Wolfgang Denk, Steve Hirsch, Andreas Koppenh"ofer,
X Michael Leodolter, Eyal Lebedinsky, J"org Weule, and Eric Youngdale.
X
- Copyright 1992 - 2000 Kai Makisara
+ Copyright 1992 - 2001 Kai Makisara
X email Kai.Ma...@metla.fi
X
- Last modified: Tue Sep 5 23:17:08 2000 by maki...@kai.makisara.local
+ Last modified: Wed Sep 12 09:16:22 2001 by maki...@abies.metla.fi


X Some small formal changes - aeb, 950809
X */
X

@@ -59,9 +59,13 @@
X
X #ifdef MODULE
X MODULE_PARM(buffer_kbs, "i");
+MODULE_PARM_DESC(buffer_kbs, "Default driver buffer size (KB; 32)");
X MODULE_PARM(write_threshold_kbs, "i");
+MODULE_PARM_DESC(write_threshold_kbs, "Asynchronous write threshold (KB; 30)");
X MODULE_PARM(max_buffers, "i");
+MODULE_PARM_DESC(max_buffers, "Maximum number of buffer allocated at initialisation (4)");
X MODULE_PARM(max_sg_segs, "i");
+MODULE_PARM_DESC(max_sg_segs, "Maximum number of scatter/gather segments to use (32)");
X static int buffer_kbs = 0;
X static int write_threshold_kbs = 0;
X static int max_buffers = 0;
@@ -225,38 +229,33 @@
X int remainder;
X Scsi_Tape * STp;
X
- if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < st_template.nr_dev) {
- STp = &(scsi_tapes[st_nbr]);
- if ((STp->buffer)->writing &&
- (SCpnt->sense_buffer[0] & 0x70) == 0x70 &&


- (SCpnt->sense_buffer[2] & 0x40)) {

- /* EOM at write-behind, has all been written? */


- if ((SCpnt->sense_buffer[0] & 0x80) != 0)

- remainder = (SCpnt->sense_buffer[3] << 24) |
+ st_nbr = TAPE_NR(SCpnt->request.rq_dev);
+ STp = &(scsi_tapes[st_nbr]);
+ if ((STp->buffer)->writing &&
+ (SCpnt->sense_buffer[0] & 0x70) == 0x70 &&


+ (SCpnt->sense_buffer[2] & 0x40)) {

+ /* EOM at write-behind, has all been written? */
+ if ((SCpnt->sense_buffer[0] & 0x80) != 0)
+ remainder = (SCpnt->sense_buffer[3] << 24) |
X (SCpnt->sense_buffer[4] << 16) |


- (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
- else

- remainder = 0;
- if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW ||
- remainder > 0)
- (STp->buffer)->last_result = SCpnt->result; /* Error */
- else
- (STp->buffer)->last_result = INT_MAX; /* OK */
- }
+ (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6];
X else
- (STp->buffer)->last_result = SCpnt->result;
- SCpnt->request.rq_status = RQ_SCSI_DONE;
- (STp->buffer)->last_SCpnt = SCpnt;
-
-#if DEBUG
- STp->write_pending = 0;
-#endif
- up(SCpnt->request.sem);
+ remainder = 0;


+ if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW ||

+ remainder > 0)
+ (STp->buffer)->last_result = SCpnt->result; /* Error */
+ else
+ (STp->buffer)->last_result = INT_MAX; /* OK */
X }
+ else
+ (STp->buffer)->last_result = SCpnt->result;
+ SCpnt->request.rq_status = RQ_SCSI_DONE;
+ (STp->buffer)->last_SCpnt = SCpnt;
+
X #if DEBUG
- else if (debugging)
- printk(KERN_ERR "st?: Illegal interrupt device %x\n", st_nbr);
+ STp->write_pending = 0;
X #endif
+ up(SCpnt->request.sem);
X }
X
X
@@ -2324,6 +2323,8 @@
X return (-EINVAL);
X }
X cmd[0] = MODE_SELECT;
+ if ((STp->use_pf & USE_PF))
+ cmd[1] = 0x10;
X cmd[4] = datalen = 12;
X
X memset((STp->buffer)->b_data, 0, 12);
@@ -2502,6 +2503,20 @@
X STps->drv_block = (-1);
X STps->eof = ST_EOD;
X }
+ else if (cmd_in == MTSETBLK ||
+ cmd_in == MTSETDENSITY ||
+ cmd_in == MTSETDRVBUFFER ||
+ cmd_in == SET_DENS_AND_BLK) {
+ if ((SCpnt->sense_buffer[2] & 0x0f) == ILLEGAL_REQUEST &&
+ !(STp->use_pf & PF_TESTED)) {
+ /* Try the other possible state of Page Format if not
+ already tried */
+ STp->use_pf = !STp->use_pf | PF_TESTED;


+ scsi_release_command(SCpnt);
+ SCpnt = NULL;

+ return st_int_ioctl(inode, cmd_in, arg);
+ }
+ }
X else if (chg_eof)


X STps->eof = ST_NOEOF;
X

@@ -3467,6 +3482,7 @@
X tpnt->in_use = 0;
X tpnt->drv_buffer = 1; /* Try buffering if no mode sense */
X tpnt->restr_dma = (SDp->host)->unchecked_isa_dma;
+ tpnt->use_pf = (SDp->scsi_level >= SCSI_2);
X tpnt->density = 0;
X tpnt->do_auto_lock = ST_AUTO_LOCK;
X tpnt->can_bsr = ST_IN_FILE_POS;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/st.h linux/drivers/scsi/st.h
--- v2.2.19/drivers/scsi/st.h Sun Mar 25 17:31:30 2001
+++ linux/drivers/scsi/st.h Mon Oct 22 10:42:12 2001
@@ -79,6 +79,7 @@
X unsigned char restr_dma;
X unsigned char scsi2_logical;
X unsigned char default_drvbuffer; /* 0xff = don't touch, value 3 bits */
+ unsigned char use_pf; /* Set Page Format bit in all mode selects? */
X int write_threshold;
X int timeout; /* timeout for normal commands */
X int long_timeout; /* timeout for commands known to take long time*/
@@ -118,6 +119,10 @@
X unsigned char last_sense[16];
X #endif
X } Scsi_Tape;
+
+/* Bit masks for use_pf */
+#define USE_PF 1
+#define PF_TESTED 2
X
X extern Scsi_Tape * scsi_tapes;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/sym53c8xx.c linux/drivers/scsi/sym53c8xx.c
--- v2.2.19/drivers/scsi/sym53c8xx.c Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/sym53c8xx.c Wed Oct 10 01:41:20 2001
@@ -3646,7 +3646,7 @@
X ** some target to reset or some disconnected
X ** job to abort. Since error recovery is a serious
X ** busyness, we will really reset the SCSI BUS, if
- ** case of a SCSI interrupt occuring in this path.
+ ** case of a SCSI interrupt occurring in this path.


X */
X
X /*

@@ -8635,7 +8635,7 @@
X ** si: sist
X **
X ** SCSI bus lines:
-** so: control lines as driver by NCR.
+** so: control lines as driven by NCR.
X ** si: control lines as seen by NCR.
X ** sd: scsi data lines as seen by NCR.
X **
@@ -8644,7 +8644,7 @@
X ** scntl3: (see the manual)
X **
X ** current script command:
-** dsp: script adress (relative to start of script).
+** dsp: script address (relative to start of script).
X ** dbc: first word of script command.
X **
X ** First 24 register of the chip:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/scsi/sym53c8xx_defs.h linux/drivers/scsi/sym53c8xx_defs.h
--- v2.2.19/drivers/scsi/sym53c8xx_defs.h Sun Mar 25 17:31:33 2001
+++ linux/drivers/scsi/sym53c8xx_defs.h Fri Nov 2 15:44:31 2001
@@ -483,7 +483,7 @@


X #endif
X
X /*

- * If the CPU and the NCR use same endian-ness adressing,
+ * If the CPU and the NCR use same endian-ness addressing,
X * no byte reordering is needed for script patching.
X * Macro cpu_to_scr() is to be used for script patching.
X * Macro scr_to_cpu() is to be used for getting a DWORD
@@ -517,7 +517,7 @@
X * would have been correctly designed for PCI, this
X * option would be useless.
X *
- * If the CPU and the NCR use same endian-ness adressing,
+ * If the CPU and the NCR use same endian-ness addressing,
X * no byte reordering is needed for accessing chip io
X * registers. Functions suffixed by '_raw' are assumed
X * to access the chip over the PCI without doing byte
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/sound/cs461x_image.h linux/drivers/sound/cs461x_image.h
--- v2.2.19/drivers/sound/cs461x_image.h Sun Mar 25 17:31:36 2001
+++ linux/drivers/sound/cs461x_image.h Wed Oct 10 01:41:22 2001
@@ -1,3459 +1,3459 @@
-struct BA1struct BA1Struct = {
-{{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }},
-{0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000163,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00200040,0x00008010,0x00000000,
-0x00000000,0x80000001,0x00000001,0x00060000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00900080,0x00000173,0x00000000,
-0x00000000,0x00000010,0x00800000,0x00900000,
-0xf2c0000f,0x00000200,0x00000000,0x00010600,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000163,0x330300c2,
-0x06000000,0x00000000,0x80008000,0x80008000,
-0x3fc0000f,0x00000301,0x00010400,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00b00000,0x00d0806d,0x330480c3,
-0x04800000,0x00000001,0x00800001,0x0000ffff,

-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,

-0x066a0600,0x06350070,0x0000929d,0x929d929d,
-0x00000000,0x0000735a,0x00000600,0x00000000,
-0x929d735a,0x8734abfe,0x00010000,0x735a735a,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x0000804f,0x000000c3,
-0x05000000,0x00a00010,0x00000000,0x80008000,
-0x00000000,0x00000000,0x00000700,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000080,0x00a00000,0x0000809a,0x000000c2,
-0x07400000,0x00000000,0x80008000,0xffffffff,
-0x00c80028,0x00005555,0x00000000,0x000107a0,
-0x00c80028,0x000000c2,0x06800000,0x00000000,
-0x06e00080,0x00300000,0x000080bb,0x000000c9,
-0x07a00000,0x04000000,0x80008000,0xffffffff,
-0x00c80028,0x00005555,0x00000000,0x00000780,
-0x00c80028,0x000000c5,0xff800000,0x00000000,
-0x00640080,0x00c00000,0x00008197,0x000000c9,
-0x07800000,0x04000000,0x80008000,0xffffffff,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x00000000,0x00000000,
-0x00000000,0x00000000,0x0000805e,0x000000c1,
-0x00000000,0x00800000,0x80008000,0x80008000,
-0x00020000,0x0000ffff,0x00000000,0x00000000,

-0x929d0600,0x929d929d,0x929d929d,0x929d0000,
-0x929d929d,0x929d929d,0x929d929d,0x929d929d,
-0x929d929d,0x00100635,0x060b013f,0x00000004,
-0x00000001,0x007a0002,0x00000000,0x066e0610,
-0x0105929d,0x929d929d,0x929d929d,0x929d929d,
-0x929d929d,0xa431ac75,0x0001735a,0xa431ac75,

-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
-0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,

-0xa431ac75,0xa431ac75,0xa431ac75,0x735a0051,
-0x00000000,0x929d929d,0x929d929d,0x929d929d,
-0x929d929d,0x929d929d,0x929d929d,0x929d929d,
-0x929d929d,0x929d929d,0x00000000,0x06400136,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 58'
echo 'File patch-2.2.20 is continued in part 59'
echo "59" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:01 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part62

#!/bin/sh -x
# this is part 62 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 62; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+0x00000000,0x00000000,0x00000000,0x00010004,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00001705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00009705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00011705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00019705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00021705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00029705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00031705,0x00001400,0x000a411e,0x00001003,
+0x00040730,0x00001002,0x000f619e,0x00001003,
+0x00039705,0x00001400,0x000a411e,0x00001003,
+0x000fe19e,0x00001003,0x0009c730,0x00001003,
+0x0008e19c,0x00001003,0x000083c1,0x00093040,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00009705,0x00001400,0x000a211e,0x00001003,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00011705,0x00001400,0x000a211e,0x00001003,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00019705,0x00001400,0x000a211e,0x00001003,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00021705,0x00001400,0x000a211e,0x00001003,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00029705,0x00001400,0x000a211e,0x00001003,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00031705,0x00001400,0x000a211e,0x00001003,
+0x00098730,0x00001002,0x000ee19e,0x00001003,
+0x00039705,0x00001400,0x000a211e,0x00001003,
+0x0000a730,0x00001008,0x000e2730,0x00001002,
+0x0000a731,0x00001002,0x0000a731,0x00001002,
+0x0000a731,0x00001002,0x0000a731,0x00001002,
+0x0000a731,0x00001002,0x0000a731,0x00001002,
+0x00000000,0x00000000,0x000f619c,0x00001003,
+0x0007f801,0x000c0000,0x00000037,0x00001000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x000c0000,0x00000000,0x00000000,
+0x0000373c,0x00001000,0x00000000,0x00000000,
+0x000ee19c,0x00001003,0x0007f801,0x000c0000,
+0x00000037,0x00001000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x0000273c,0x00001000,
+0x00000033,0x00001000,0x000e679e,0x00001003,
+0x00007705,0x00001400,0x000ac71e,0x00001003,
+0x00087fc1,0x000c3be0,0x0007f801,0x000c0000,
+0x00000037,0x00001000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x0000a730,0x00001003,
+0x00000033,0x00001000,0x0007f801,0x000c0000,
+0x00000037,0x00001000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x000c0000,
+0x00000032,0x00001000,0x0000273d,0x00001000,
+0x0004a730,0x00001003,0x00000f41,0x00097140,
+0x0000a841,0x0009b240,0x0000a0c1,0x0009f040,
+0x0001c641,0x00093540,0x0001cec1,0x0009b5c0,
+0x00000000,0x00000000,0x0001bf05,0x0003fc40,
+0x00002725,0x000aa400,0x00013705,0x00093a00,
+0x0000002e,0x0009d6c0,0x00038630,0x00001004,
+0x0004ef0a,0x000eb785,0x0003fc8a,0x00000000,
+0x00000000,0x000c70e0,0x0007d182,0x0002c640,
+0x00000630,0x00001004,0x000799b8,0x0002c6c0,
+0x00031705,0x00092240,0x00039f05,0x000932c0,
+0x0003520a,0x00000000,0x00040731,0x0000100b,
+0x00010705,0x000b20c0,0x00000000,0x000eba44,
+0x00032108,0x000c60c4,0x00065208,0x000c2917,
+0x000406b0,0x00001007,0x00012f05,0x00036880,
+0x0002818e,0x000c0000,0x0004410a,0x00000000,
+0x00040630,0x00001007,0x00029705,0x000c0000,
+0x00000000,0x00000000,0x00003fc1,0x0003fc40,
+0x000037c1,0x00091b40,0x00003fc1,0x000911c0,
+0x000037c1,0x000957c0,0x00003fc1,0x000951c0,
+0x000037c1,0x00000000,0x00003fc1,0x000991c0,
+0x000037c1,0x00000000,0x00003fc1,0x0009d1c0,
+0x000037c1,0x00000000,0x0001ccc1,0x000915c0,
+0x0001c441,0x0009d800,0x0009cdc1,0x00091240,
+0x0001c541,0x00091d00,0x0009cfc1,0x00095240,
+0x0001c741,0x00095c80,0x000e8ca9,0x00099240,
+0x000e85ad,0x00095640,0x00069ca9,0x00099d80,
+0x000e952d,0x00099640,0x000eaca9,0x0009d6c0,
+0x000ea5ad,0x00091a40,0x0006bca9,0x0009de80,
+0x000eb52d,0x00095a40,0x000ecca9,0x00099ac0,
+0x000ec5ad,0x0009da40,0x000edca9,0x0009d300,
+0x000a6e0a,0x00001000,0x000ed52d,0x00091e40,
+0x000eeca9,0x00095ec0,0x000ee5ad,0x00099e40,
+0x0006fca9,0x00002500,0x000fb208,0x000c59a0,
+0x000ef52d,0x0009de40,0x00068ca9,0x000912c1,
+0x000683ad,0x00095241,0x00020f05,0x000991c1,
+0x00000000,0x00000000,0x00086f88,0x00001000,
+0x0009cf81,0x000b5340,0x0009c701,0x000b92c0,
+0x0009de81,0x000bd300,0x0009d601,0x000b1700,
+0x0001fd81,0x000b9d80,0x0009f501,0x000b57c0,
+0x000a0f81,0x000bd740,0x00020701,0x000b5c80,
+0x000a1681,0x000b97c0,0x00021601,0x00002500,
+0x000a0701,0x000b9b40,0x000a0f81,0x000b1bc0,
+0x00021681,0x00002d00,0x00020f81,0x000bd800,
+0x000a0701,0x000b5bc0,0x00021601,0x00003500,
+0x000a0f81,0x000b5f40,0x000a0701,0x000bdbc0,
+0x00021681,0x00003d00,0x00020f81,0x000b1d00,
+0x000a0701,0x000b1fc0,0x00021601,0x00020500,
+0x00020f81,0x000b1341,0x000a0701,0x000b9fc0,
+0x00021681,0x00020d00,0x00020f81,0x000bde80,
+0x000a0701,0x000bdfc0,0x00021601,0x00021500,
+0x00020f81,0x000b9341,0x00020701,0x000b53c1,
+0x00021681,0x00021d00,0x000a0f81,0x000d0380,
+0x0000b601,0x000b15c0,0x00007b01,0x00000000,
+0x00007b81,0x000bd1c0,0x00007b01,0x00000000,
+0x00007b81,0x000b91c0,0x00007b01,0x000b57c0,
+0x00007b81,0x000b51c0,0x00007b01,0x000b1b40,
+0x00007b81,0x000b11c0,0x00087b01,0x000c3dc0,
+0x0007e488,0x000d7e45,0x00000000,0x000d7a44,
+0x0007e48a,0x00000000,0x00011f05,0x00084080,
+0x00000000,0x00000000,0x00001705,0x000b3540,
+0x00008a01,0x000bf040,0x00007081,0x000bb5c0,
+0x00055488,0x00000000,0x0000d482,0x0003fc40,
+0x0003fc88,0x00000000,0x0001e401,0x000b3a00,
+0x0001ec81,0x000bd6c0,0x0004ef08,0x000eb784,
+0x000c86b0,0x00001007,0x00008281,0x000bb240,
+0x0000b801,0x000b7140,0x00007888,0x00000000,
+0x0000073c,0x00001000,0x0007f188,0x000c0000,
+0x00000000,0x00000000,0x00055288,0x000c555c,
+0x0005528a,0x000c0000,0x0009fa88,0x000c5d00,
+0x0000fa88,0x00000000,0x00000032,0x00001000,
+0x0000073d,0x00001000,0x0007f188,0x000c0000,
+0x00000000,0x00000000,0x0008c01c,0x00001003,
+0x00002705,0x00001008,0x0008b201,0x000c1392,
+0x0000ba01,0x00000000,0x00008731,0x00001400,
+0x0004c108,0x000fe0c4,0x00057488,0x00000000,
+0x000a6388,0x00001001,0x0008b334,0x000bc141,
+0x0003020e,0x00000000,0x000886b0,0x00001008,
+0x00003625,0x000c5dfa,0x000a638a,0x00001001,
+0x0008020e,0x00001002,0x0008a6b0,0x00001008,
+0x0007f301,0x00000000,0x00000000,0x00000000,
+0x00002725,0x000a8c40,0x000000ae,0x00000000,
+0x000d8630,0x00001008,0x00000000,0x000c74e0,
+0x0007d182,0x0002d640,0x000a8630,0x00001008,
+0x000799b8,0x0002d6c0,0x0000748a,0x000c3ec5,
+0x0007420a,0x000c0000,0x00062208,0x000c4117,
+0x00070630,0x00001009,0x00000000,0x000c0000,
+0x0001022e,0x00000000,0x0003a630,0x00001009,
+0x00000000,0x000c0000,0x00000036,0x00001000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x0002a730,0x00001008,0x0007f801,0x000c0000,
+0x00000037,0x00001000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x00000000,0x00000000,
+0x00000000,0x00000000,0x0002a730,0x00001008,
+0x00000033,0x00001000,0x0002a705,0x00001008,
+0x00007a01,0x000c0000,0x000e6288,0x000d550a,
+0x0006428a,0x00000000,0x00060730,0x0000100a,
+0x00000000,0x000c0000,0x00000000,0x00000000,
+0x0007aab0,0x00034880,0x00078fb0,0x0000100b,
+0x00057488,0x00000000,0x00033b94,0x00081140,
+0x000183ae,0x00000000,0x000786b0,0x0000100b,
+0x00022f05,0x000c3545,0x0000eb8a,0x00000000,
+0x00042731,0x00001003,0x0007aab0,0x00034880,
+0x00048fb0,0x0000100a,0x00057488,0x00000000,
+0x00033b94,0x00081140,0x000183ae,0x00000000,
+0x000806b0,0x0000100b,0x00022f05,0x00000000,
+0x00007401,0x00091140,0x00048f05,0x000951c0,
+0x00042731,0x00001003,0x0000473d,0x00001000,
+0x000f19b0,0x000bbc47,0x00080000,0x000bffc7,
+0x000fe19e,0x00001003,0x00000000,0x00000000,
+0x0008e19c,0x00001003,0x000083c1,0x00093040,
+0x00000f41,0x00097140,0x0000a841,0x0009b240,
+0x0000a0c1,0x0009f040,0x0001c641,0x00093540,
+0x0001cec1,0x0009b5c0,0x00000000,0x000fdc44,
+0x00055208,0x00000000,0x00010705,0x000a2880,
+0x0000a23a,0x00093a00,0x0003fc8a,0x000df6c5,
+0x0004ef0a,0x000c0000,0x00012f05,0x00036880,
+0x00065308,0x000c2997,0x000d86b0,0x0000100a,
+0x0004410a,0x000d40c7,0x00000000,0x00000000,
+0x00080730,0x00001004,0x00056f0a,0x000ea105,
+0x00000000,0x00000000,0x0000473d,0x00001000,
+0x000f19b0,0x000bbc47,0x00080000,0x000bffc7,
+0x0000273d,0x00001000,0x00000000,0x000eba44,
+0x00048f05,0x0000f440,0x00007401,0x0000f7c0,
+0x00000734,0x00001000,0x00010705,0x000a6880,
+0x00006a88,0x000c75c4,0x00000000,0x000e5084,
+0x00000000,0x000eba44,0x00087401,0x000e4782,
+0x00000734,0x00001000,0x00010705,0x000a6880,
+0x00006a88,0x000c75c4,0x0007c108,0x000c0000,
+0x0007e721,0x000bed40,0x00005f25,0x000badc0,
+0x0003ba97,0x000beb80,0x00065590,0x000b2e00,
+0x00033217,0x00003ec0,0x00065590,0x000b8e40,
+0x0003ed80,0x000491c0,0x00073fb0,0x00074c80,
+0x000283a0,0x0000100c,0x000ee388,0x00042970,
+0x00008301,0x00021ef2,0x000b8f14,0x0000000f,
+0x000c4d8d,0x0000001b,0x000d6dc2,0x000e06c6,
+0x000032ac,0x000c3916,0x0004edc2,0x00074c80,
+0x00078898,0x00001000,0x00038894,0x00000032,
+0x000c4d8d,0x00092e1b,0x000d6dc2,0x000e06c6,
+0x0004edc2,0x000c1956,0x0000722c,0x00034a00,
+0x00041705,0x0009ed40,0x00058730,0x00001400,
+0x000d7488,0x000c3a00,0x00048f05,0x00000000,

echo 'End of part 62'
echo 'File patch-2.2.20 is continued in part 63'
echo "63" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:18 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part79

#!/bin/sh -x
# this is part 79 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 79; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+{ 0x869b, 16, {0x00, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa} },
+{ 0x86ab, 16, {0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa0, 0x2e, 0x8f, 0x59} },
+{ 0x86bb, 16, {0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa0} },
+{ 0x86cb, 16, {0x2e, 0xaf, 0x03, 0x8f, 0x5a, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56, 0x7b, 0x0a, 0x7a} },
+{ 0x86db, 16, {0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa0, 0x2e, 0x8f, 0x59, 0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56} },
+{ 0x86eb, 16, {0xe5, 0x5a, 0xc3, 0x94, 0x05, 0x40, 0x15, 0xe5, 0x59, 0x24, 0x01, 0xf5, 0x59, 0xe4, 0x35, 0x58} },
+{ 0x86fb, 16, {0xf5, 0x58, 0xe4, 0x35, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 0x85, 0x5d, 0x82, 0x85} },
+{ 0x870b, 16, {0x5c, 0x83, 0xa3, 0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44} },
+{ 0x871b, 16, {0x80, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xe5, 0x59, 0xf0, 0xaf, 0x59, 0xae, 0x58, 0xad} },
+{ 0x872b, 16, {0x57, 0xac, 0x56, 0x78, 0x08, 0x12, 0xa0, 0xd1, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xef} },
+{ 0x873b, 16, {0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5} },
+{ 0x874b, 16, {0x5a, 0xe5, 0x55, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62} },
+{ 0x875b, 16, {0x05, 0x43, 0x5a, 0x0a, 0x80, 0x1a, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5a, 0x08, 0x80, 0x11, 0xef} },
+{ 0x876b, 16, {0xb4, 0x74, 0x05, 0x43, 0x5a, 0x02, 0x80, 0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x877b, 16, {0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03} },
+{ 0x878b, 16, {0x43, 0x5a, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5a, 0x40, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x879b, 16, {0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4} },
+{ 0x87ab, 16, {0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x23, 0xaf, 0x5b, 0x74, 0x01} },
+{ 0x87bb, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x5d, 0x24, 0x04, 0xf5} },
+{ 0x87cb, 16, {0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0xe4, 0xf5, 0x5a, 0x80, 0x10, 0xaf} },
+{ 0x87db, 16, {0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x3b, 0x85} },
+{ 0x87eb, 16, {0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c} },
+{ 0x87fb, 16, {0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35} },
+{ 0x880b, 16, {0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83} },
+{ 0x881b, 16, {0xef, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5} },
+{ 0x882b, 16, {0x5d, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09} },
+{ 0x883b, 16, {0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x06, 0xf5, 0x82, 0xe4} },
+{ 0x884b, 16, {0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5} },
+{ 0x885b, 16, {0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x886b, 16, {0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c} },
+{ 0x887b, 16, {0x83, 0xa3, 0xa3, 0xf0, 0xaf, 0x5b, 0x7d, 0x06, 0x12, 0x83, 0x2d, 0x75, 0x5a, 0x08, 0xe5, 0x55} },
+{ 0x888b, 16, {0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x5a, 0x10, 0xe5} },
+{ 0x889b, 16, {0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x5a, 0xf0} },
+{ 0x88ab, 16, {0xe5, 0x55, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05} },
+{ 0x88bb, 16, {0x40, 0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x55, 0x24, 0x06, 0xf5} },
+{ 0x88cb, 16, {0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94, 0x01, 0x40, 0x06, 0xed, 0xd3, 0x94} },
+{ 0x88db, 16, {0x02, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24} },
+{ 0x88eb, 16, {0xfb, 0x4f, 0xf5, 0x5a, 0xe5, 0x55, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0} },
+{ 0x88fb, 16, {0x24, 0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60, 0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a} },
+{ 0x890b, 16, {0x70, 0x14, 0x43, 0x5a, 0x18, 0x80, 0x12, 0x43, 0x5a, 0x08, 0x80, 0x0d, 0x43, 0x5a, 0x38, 0x80} },
+{ 0x891b, 16, {0x08, 0x43, 0x5a, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3} },
+{ 0x892b, 16, {0xa3, 0xa3, 0xe5, 0x5a, 0xf0, 0xaf, 0x5b, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0xaa, 0x54, 0xa9, 0x55} },
+{ 0x893b, 16, {0x7b, 0x01, 0xc0, 0x01, 0xe5, 0x5b, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35} },
+{ 0x894b, 15, {0xf0, 0xa8, 0x01, 0xfc, 0xd0, 0x01, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9f, 0x1f, 0x7f, 0x00} },
+{ 0x895a, 1, {0x22} },
+{ 0x895b, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x896b, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} },
+{ 0x897b, 16, {0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} },
+{ 0x898b, 16, {0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} },
+{ 0x899b, 16, {0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x89ab, 16, {0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2c, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} },
+{ 0x89bb, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x54, 0x7f, 0x02, 0x12, 0x81, 0xd9} },
+{ 0x89cb, 16, {0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x54, 0x5f, 0x90, 0x01, 0x32, 0xf0, 0x7e} },
+{ 0x89db, 10, {0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12, 0x8e, 0xb4, 0x7f, 0x00} },
+{ 0x89e5, 1, {0x22} },
+{ 0x89e6, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x89f6, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} },
+{ 0x8a06, 16, {0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
+{ 0x8a16, 16, {0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x8e} },
+{ 0x8a26, 3, {0xb4, 0x7f, 0x00} },
+{ 0x8a29, 1, {0x22} },
+{ 0x8a2a, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x8a2e, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8a3e, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8a4e, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
+{ 0x8a5e, 16, {0x44, 0x02, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x8a6e, 4, {0xfd, 0xf0, 0x7f, 0x00} },
+{ 0x8a72, 1, {0x22} },
+{ 0x8a73, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x8a77, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8a87, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8a97, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
+{ 0x8aa7, 16, {0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x8ab7, 4, {0xfe, 0xf0, 0x7f, 0x00} },
+{ 0x8abb, 1, {0x22} },
+{ 0x8abc, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x8ac0, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8ad0, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8ae0, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} },
+{ 0x8af0, 16, {0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
+{ 0x8b00, 1, {0x22} },
+{ 0x8b01, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} },
+{ 0x8b11, 16, {0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00} },
+{ 0x8b21, 1, {0x22} },
+{ 0x8b22, 4, {0x8e, 0x54, 0x8f, 0x55} },
+{ 0x8b26, 16, {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x59, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x56, 0xc3} },
+{ 0x8b36, 16, {0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x56, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} },
+{ 0x8b46, 16, {0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x57, 0x7e, 0x75, 0x58} },
+{ 0x8b56, 16, {0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x57, 0x7e, 0x75, 0x58, 0x00, 0x80, 0x16, 0x7e} },
+{ 0x8b66, 16, {0x7d, 0x7f, 0x80, 0x75, 0x57, 0x7d, 0x75, 0x58, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} },
+{ 0x8b76, 16, {0x57, 0x7d, 0x75, 0x58, 0x00, 0xe5, 0x59, 0x70, 0x1b, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0x74} },
+{ 0x8b86, 16, {0xff, 0xf0, 0xe5, 0x56, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} },
+{ 0x8b96, 16, {0x01, 0xf0, 0x80, 0x48, 0xe5, 0x55, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x54, 0xfe, 0xe5, 0x59, 0x60} },
+{ 0x8ba6, 16, {0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} },
+{ 0x8bb6, 16, {0x58, 0xe5, 0x58, 0xaa, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} },
+{ 0x8bc6, 16, {0x15, 0x59, 0x80, 0xd9, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x56, 0x25} },
+{ 0x8bd6, 14, {0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
+{ 0x8be4, 1, {0x22} },
+{ 0x8be5, 16, {0xef, 0x24, 0x05, 0xf5, 0x55, 0xe4, 0x3e, 0xf5, 0x54, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
+{ 0x8bf5, 16, {0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} },
+{ 0x8c05, 16, {0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x56, 0xf5, 0x57, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
+{ 0x8c15, 16, {0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0xc6} },
+{ 0x8c25, 16, {0x24, 0x14, 0x60, 0x03, 0x02, 0x8d, 0x12, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe} },
+{ 0x8c35, 16, {0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x59, 0x74, 0x01, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59} },
+{ 0x8c45, 16, {0x94, 0x40, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5} },
+{ 0x8c55, 16, {0x57, 0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x50, 0x03, 0x02, 0x8d, 0x15, 0xae, 0x58, 0xaf, 0x59} },
+{ 0x8c65, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
+{ 0x8c75, 16, {0x56, 0xf5, 0x57, 0x02, 0x8d, 0x15, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
+{ 0x8c85, 16, {0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59, 0x94} },
+{ 0x8c95, 16, {0x10, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x10, 0xd3, 0xe5, 0x57} },
+{ 0x8ca5, 16, {0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x40, 0x68, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85} },
+{ 0x8cb5, 16, {0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x80} },
+{ 0x8cc5, 16, {0x4f, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
+{ 0x8cd5, 16, {0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0x45, 0x59, 0x60, 0x0b, 0xd3, 0xe5, 0x59, 0x94, 0x40, 0xe5} },
+{ 0x8ce5, 16, {0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5, 0x57, 0x95, 0x59} },
+{ 0x8cf5, 16, {0xe5, 0x56, 0x95, 0x58, 0x40, 0x17, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
+{ 0x8d05, 16, {0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x7f, 0x01, 0x22} },
+{ 0x8d15, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8d, 0xd5, 0x24, 0xf9} },
+{ 0x8d25, 16, {0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8e, 0x25, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8e, 0x69} },
+{ 0x8d35, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} },
+{ 0x8d45, 16, {0x94, 0x00, 0x40, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57} },
+{ 0x8d55, 16, {0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x75, 0xe0} },
+{ 0x8d65, 16, {0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f} },
+{ 0x8d75, 16, {0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
+{ 0x8d85, 16, {0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8e} },
+{ 0x8d95, 16, {0x69, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x76} },
+{ 0x8da5, 16, {0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02} },
+{ 0x8db5, 16, {0x8e, 0x69, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
+{ 0x8dc5, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} },
+{ 0x8dd5, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} },
+{ 0x8de5, 16, {0x94, 0x00, 0x50, 0x03, 0x02, 0x8e, 0x69, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} },
+{ 0x8df5, 16, {0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e} },
+{ 0x8e05, 16, {0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
+{ 0x8e15, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} },
+{ 0x8e25, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78, 0xcf, 0xf0} },
+{ 0x8e35, 16, {0xa3, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x60, 0x24} },
+{ 0x8e45, 16, {0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} },
+{ 0x8e55, 16, {0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
+{ 0x8e65, 16, {0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3} },
+{ 0x8e75, 11, {0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x8e, 0xb4, 0x7f, 0x00} },
+{ 0x8e80, 1, {0x22} },
+{ 0x8e81, 16, {0x8e, 0x5f, 0x8f, 0x60, 0x8c, 0x61, 0x8d, 0x62, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x60} },
+{ 0x8e91, 16, {0xe5, 0x60, 0xae, 0x5f, 0x70, 0x02, 0x05, 0x5f, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
+{ 0x8ea1, 16, {0x62, 0xe5, 0x62, 0xac, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x8eb1, 3, {0x80, 0xd6, 0x22} },
+{ 0x8eb4, 6, {0x8d, 0x5a, 0xab, 0x07, 0xaa, 0x06} },
+{ 0x8eba, 16, {0x75, 0x5e, 0x40, 0x75, 0x5d, 0x0d, 0x75, 0x5c, 0x03, 0x75, 0x5b, 0x00, 0x90, 0x7f, 0xc2, 0xe0} },
+{ 0x8eca, 16, {0x20, 0xe1, 0xf9, 0xaf, 0x5e, 0xae, 0x5d, 0xad, 0x5c, 0xac, 0x5b, 0xec, 0x4d, 0x4e, 0x4f, 0x70} },
+{ 0x8eda, 16, {0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} },
+{ 0x8eea, 16, {0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5a, 0x12, 0x8e, 0x81, 0x90, 0x7f, 0xc3} },
+{ 0x8efa, 8, {0xe5, 0x5a, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x8f02, 1, {0x22} },
+{ 0x8f03, 16, {0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f} },
+{ 0x8f13, 16, {0x90, 0x01, 0x85, 0xf0, 0x90, 0x95, 0xbf, 0xe4, 0x93, 0x90, 0x01, 0x86, 0xf0, 0x90, 0x95, 0xc0} },
+{ 0x8f23, 16, {0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
+{ 0x8f33, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e} },
+{ 0x8f43, 16, {0x01, 0x7f, 0x7c, 0x12, 0x10, 0x2c, 0x7e, 0x01, 0x7f, 0x84, 0x7d, 0x14, 0x12, 0x8e, 0xb4, 0x7f} },
+{ 0x8f53, 1, {0x00} },
+{ 0x8f54, 1, {0x22} },
+{ 0x8f55, 16, {0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4b, 0x7b, 0x75, 0x4c, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} },
+{ 0x8f65, 16, {0x4b, 0x4e, 0x85, 0x4c, 0x4f, 0xe5, 0x4f, 0x24, 0x01, 0xf5, 0x53, 0xe4, 0x35, 0x4e, 0xf5, 0x52} },
+{ 0x8f75, 16, {0xe4, 0xf5, 0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} },
+{ 0x8f85, 16, {0x5b, 0x90, 0x8f, 0x8d, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8f, 0xb1, 0x02, 0x8f, 0xb1, 0x02, 0x8f} },
+{ 0x8f95, 16, {0xbb, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xd9, 0x02, 0x8f, 0xb1} },
+{ 0x8fa5, 16, {0x02, 0x8f, 0xcf, 0x02, 0x8f, 0xb1, 0x02, 0x8f, 0xe1, 0x02, 0x8f, 0xb1, 0xef, 0x64, 0x02, 0x60} },
+{ 0x8fb5, 16, {0x2b, 0x75, 0x4d, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x4d, 0xff, 0x80, 0x1c} },
+{ 0x8fc5, 16, {0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x4d, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} },
+{ 0x8fd5, 16, {0x4d, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x60, 0x15} },
+{ 0x8fe5, 16, {0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} },
+{ 0x8ff5, 16, {0x8e, 0xb4, 0xaf, 0x4d, 0x22, 0xe4, 0xf5, 0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0x14} },
+{ 0x9005, 16, {0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x91, 0x23, 0x90, 0x90, 0x14, 0xf8, 0x28, 0x28, 0x73, 0x02} },
+{ 0x9015, 16, {0x90, 0x41, 0x02, 0x90, 0x4d, 0x02, 0x90, 0x59, 0x02, 0x90, 0xa7, 0x02, 0x90, 0xb2, 0x02, 0x90} },
+{ 0x9025, 16, {0xbd, 0x02, 0x90, 0xc8, 0x02, 0x90, 0xd3, 0x02, 0x90, 0xde, 0x02, 0x90, 0xe9, 0x02, 0x90, 0xf4} },
+{ 0x9035, 16, {0x02, 0x90, 0xfb, 0x02, 0x91, 0x23, 0x02, 0x91, 0x06, 0x02, 0x91, 0x11, 0xaf, 0x53, 0xae, 0x52} },
+{ 0x9045, 16, {0x12, 0x83, 0xb7, 0x8f, 0x4d, 0x02, 0x91, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x84, 0x95, 0x8f} },
+{ 0x9055, 16, {0x4d, 0x02, 0x91, 0x26, 0x85, 0x52, 0x50, 0x85, 0x53, 0x51, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4} },
+{ 0x9065, 16, {0x35, 0x50, 0xfe, 0x12, 0x85, 0x2f, 0xaf, 0x51, 0xae, 0x50, 0x12, 0x85, 0xc2, 0x8f, 0x4d, 0xef} },
+{ 0x9075, 16, {0x64, 0x01, 0x60, 0x03, 0x02, 0x91, 0x26, 0xaf, 0x51, 0xae, 0x50, 0x12, 0x86, 0x17, 0x8f, 0x4d} },
+{ 0x9085, 16, {0xe5, 0x4d, 0x70, 0x03, 0x02, 0x91, 0x26, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0x75, 0xf0} },
+{ 0x9095, 16, {0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x86, 0x17, 0x02} },
+{ 0x90a5, 16, {0x91, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0x2a, 0x8f, 0x4d, 0x80, 0x74, 0xaf, 0x53, 0xae} },
+{ 0x90b5, 16, {0x52, 0x12, 0x8a, 0x73, 0x8f, 0x4d, 0x80, 0x69, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0xbc, 0x8f} },
+{ 0x90c5, 16, {0x4d, 0x80, 0x5e, 0xaf, 0x4c, 0xae, 0x4b, 0x12, 0x8b, 0xe5, 0x8f, 0x4d, 0x80, 0x53, 0xaf, 0x53} },
+{ 0x90d5, 16, {0xae, 0x52, 0x12, 0x89, 0x5b, 0x8f, 0x4d, 0x80, 0x48, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x1a, 0xf1} },
+{ 0x90e5, 16, {0x8f, 0x4d, 0x80, 0x3d, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xe6, 0x8f, 0x4d, 0x80, 0x32, 0x12} },
+{ 0x90f5, 16, {0x8f, 0x03, 0x8f, 0x4d, 0x80, 0x2b, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8b, 0x01, 0x8f, 0x4d, 0x80} },
+{ 0x9105, 16, {0x20, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8b, 0x22, 0x8f, 0x4d, 0x80, 0x15, 0xaf, 0x4c, 0xae, 0x4b} },
+{ 0x9115, 16, {0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x8e, 0x81, 0xe4, 0xf5, 0x4d, 0x80, 0x03, 0x75, 0x4d} },
+{ 0x9125, 16, {0xff, 0xe5, 0x4d, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e} },
+{ 0x9135, 16, {0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x8e, 0xb4, 0xaf} },
+{ 0x9145, 16, {0x4d, 0x22, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} },
+{ 0x9155, 16, {0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85} },
+{ 0x9165, 16, {0x52, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x8e, 0xb4} },
+{ 0x9175, 4, {0x8f, 0x4d, 0xaf, 0x4d} },
+{ 0x9179, 1, {0x22} },
+{ 0x917a, 8, {0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b} },
+{ 0x9182, 16, {0x75, 0x55, 0x01, 0x75, 0x56, 0x9c, 0xe4, 0xf5, 0x54, 0xaf, 0x50, 0x15, 0x50, 0xef, 0x70, 0x03} },
+{ 0x9192, 16, {0x02, 0x92, 0x18, 0xaf, 0x4f, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x4e} },
+{ 0x91a2, 16, {0xae, 0x4d, 0xad, 0x4c, 0xac, 0x4b, 0x12, 0xa0, 0x2e, 0xaf, 0x03, 0x8f, 0x53, 0xaf, 0x4e, 0xae} },
+{ 0x91b2, 16, {0x4d, 0xad, 0x4c, 0xac, 0x4b, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x4f, 0xe4} },
+{ 0x91c2, 16, {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
+{ 0x91d2, 16, {0x12, 0xa0, 0x2e, 0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b, 0xe5, 0x53, 0x24, 0x30, 0xf5} },
+{ 0x91e2, 16, {0x53, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x53, 0xf5, 0x53, 0x05, 0x56, 0xe5, 0x56} },
+{ 0x91f2, 16, {0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x56, 0xe5} },
+{ 0x9202, 16, {0x56, 0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x53, 0xf0, 0x05} },
+{ 0x9212, 16, {0x54, 0x05, 0x54, 0x02, 0x91, 0x8b, 0xe5, 0x56, 0x15, 0x56, 0x70, 0x02, 0x15, 0x55, 0xaf, 0x54} },
+{ 0x9222, 16, {0x15, 0x54, 0xef, 0x60, 0x23, 0xe5, 0x56, 0x15, 0x56, 0xae, 0x55, 0x70, 0x02, 0x15, 0x55, 0xf5} },
+{ 0x9232, 16, {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x52, 0xe5, 0x52, 0xac, 0x51, 0x70, 0x02, 0x05, 0x51, 0x14} },
+{ 0x9242, 8, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
+{ 0x924a, 1, {0x22} },
+{ 0x924b, 16, {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
+{ 0x925b, 16, {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
+{ 0x926b, 16, {0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x927b, 16, {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
+{ 0x928b, 16, {0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9f, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x929b, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
+{ 0x92ab, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x92bb, 1, {0x22} },
+{ 0x92bc, 16, {0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x92cc, 16, {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
+{ 0x92dc, 16, {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
+{ 0x92ec, 16, {0x9f, 0x1f, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9f, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x92fc, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
+{ 0x930c, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x931c, 1, {0x22} },
+{ 0x931d, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x50, 0x7b, 0x75, 0x51} },
+{ 0x932d, 16, {0x80, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x52, 0xf5} },
+{ 0x933d, 16, {0x53, 0x89, 0x54, 0xfe, 0x12, 0x92, 0xbc, 0xef, 0x60, 0x50, 0xab, 0x52, 0xaa, 0x53, 0xa9, 0x54} },
+{ 0x934d, 16, {0x12, 0x9f, 0x48, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
+{ 0x935d, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
+{ 0x936d, 16, {0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
+{ 0x937d, 16, {0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x30, 0x60, 0x0f, 0x85, 0x51, 0x82, 0x85, 0x50} },
+{ 0x938d, 10, {0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} },
+{ 0x9397, 1, {0x22} },
+{ 0x9398, 16, {0x12, 0x93, 0x1d, 0xe4, 0xf5, 0x4b, 0x74, 0x36, 0x25, 0x4b, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4c} },
+{ 0x93a8, 16, {0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4c, 0xff, 0xc4} },
+{ 0x93b8, 16, {0x54, 0x0f, 0xf5, 0x4d, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
+{ 0x93c8, 16, {0x83, 0xe5, 0x4c, 0xf0, 0xaf, 0x4b, 0x7d, 0x01, 0xe5, 0x4c, 0x45, 0x4d, 0xfb, 0x12, 0x92, 0x4b} },
+{ 0x93d8, 16, {0xef, 0x70, 0x05, 0x12, 0x93, 0x1d, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40} },
+{ 0x93e8, 16, {0xb5, 0x12, 0x93, 0x1d, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} },
+{ 0x93f8, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x4b} },
+{ 0x9408, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
+{ 0x9418, 16, {0x16, 0xaf, 0x4b, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05, 0x12, 0x93, 0x1d} },
+{ 0x9428, 16, {0x80, 0xef, 0xe5, 0x4c, 0xf4, 0x52, 0x3a, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
+{ 0x9438, 16, {0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x95, 0x05, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} },
+{ 0x9448, 16, {0xd9, 0x8e, 0x4e, 0x8f, 0x4f, 0xc3, 0xe5, 0x4e, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} },
+{ 0x9458, 16, {0xbc, 0xe0, 0x65, 0x4f, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8, 0x07} },
+{ 0x9468, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xbc, 0xe0, 0x55, 0x4c, 0x60} },
+{ 0x9478, 16, {0x14, 0xaf, 0x4b, 0x7d, 0x08, 0xe5, 0x4c, 0x55, 0x4f, 0xfb, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05} },
+{ 0x9488, 16, {0x12, 0x93, 0x1d, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} },
+{ 0x9498, 16, {0xbc, 0xe5, 0x4f, 0xf0, 0xe4, 0xf5, 0x4b, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x4b, 0xf8, 0xe6, 0xf5} },
+{ 0x94a8, 16, {0x4c, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4c, 0x1e, 0xe5, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x02} },
+{ 0x94b8, 16, {0xab, 0x4c, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05, 0x12, 0x93, 0x1d, 0x80, 0xef, 0x74, 0x2c, 0x25} },
+{ 0x94c8, 16, {0x4b, 0xf8, 0xe6, 0xf5, 0x4c, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
+{ 0x94d8, 16, {0xe0, 0x65, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x04, 0xab, 0x4c, 0x12, 0x92, 0x4b, 0xef, 0x70} },
+{ 0x94e8, 16, {0x05, 0x12, 0x93, 0x1d, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
+{ 0x94f8, 16, {0x83, 0xe5, 0x4c, 0xf0, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x93, 0x1d} },
+{ 0x9508, 1, {0x22} },
+{ 0x9509, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x62, 0x02, 0x95, 0x50} },
+{ 0x9515, 16, {0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x9525, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x9535, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x9545, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x95, 0x95, 0xe4, 0x7e} },
+{ 0x9555, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x9565, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x9575, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x9585, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x9595, 16, {0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
+{ 0x95a5, 16, {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
+{ 0x95b5, 8, {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
+{ 0x95bd, 1, {0x00} },
+{ 0x95be, 3, {0x00, 0x03, 0x1d} },
+{ 0x95c1, 8, {0x8b, 0x54, 0x8a, 0x55, 0x89, 0x56, 0x8d, 0x57} },
+{ 0x95c9, 16, {0xe4, 0xf5, 0x58, 0xf5, 0x59, 0xaf, 0x57, 0x15, 0x57, 0xef, 0x60, 0x36, 0xab, 0x54, 0x05, 0x56} },
+{ 0x95d9, 16, {0xe5, 0x56, 0xaa, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf9, 0x12, 0x9f, 0x48, 0xff, 0xe5, 0x58} },
+{ 0x95e9, 16, {0xe5, 0x59, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0xa2, 0x2f, 0xf5, 0x82, 0xee, 0x34} },
+{ 0x95f9, 16, {0x9b, 0xf5, 0x83, 0xe5, 0x58, 0xff, 0xe4, 0x93, 0xf5, 0x58, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x59} },
+{ 0x9609, 6, {0x80, 0xc3, 0xae, 0x58, 0xaf, 0x59} },
+{ 0x960f, 1, {0x22} },
+{ 0x9610, 11, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
+{ 0x961b, 16, {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
+{ 0x962b, 16, {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
+{ 0x963b, 16, {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
+{ 0x964b, 10, {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
+{ 0x9655, 9, {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x965e, 2, {0xa9, 0x03} },
+{ 0x9660, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
+{ 0x9670, 16, {0x57, 0x45, 0x58, 0xf5, 0x59, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x9680, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
+{ 0x9690, 16, {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x59, 0xeb} },
+{ 0x96a0, 16, {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x59, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
+{ 0x96b0, 16, {0x05, 0x22, 0xe5, 0x57, 0x5c, 0xfe, 0xe5, 0x58, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
+{ 0x96c0, 16, {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
+{ 0x96d0, 16, {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x57, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x58, 0x22, 0x7f} },
+{ 0x96e0, 1, {0x00} },
+{ 0x96e1, 1, {0x22} },
+{ 0x96e2, 16, {0x75, 0x50, 0x02, 0x75, 0x51, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x51, 0x82, 0x85} },
+{ 0x96f2, 16, {0x50, 0x83, 0xe0, 0xff, 0x90, 0x03, 0x36, 0xf0, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0} },
+{ 0x9702, 16, {0x90, 0x03, 0x37, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0x75, 0x52, 0x03, 0x75, 0x53, 0x39, 0xef, 0x14} },
+{ 0x9712, 16, {0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9b, 0x6a, 0x90, 0x97, 0x21, 0xf8, 0x28, 0x28, 0x73, 0x02} },
+{ 0x9722, 16, {0x97, 0x42, 0x02, 0x97, 0xe1, 0x02, 0x98, 0xe6, 0x02, 0x99, 0x06, 0x02, 0x99, 0x06, 0x02, 0x99} },
+{ 0x9732, 16, {0xa1, 0x02, 0x99, 0xdc, 0x02, 0x9a, 0x01, 0x02, 0x9a, 0xbf, 0x02, 0x9a, 0xef, 0x02, 0x9b, 0x1b} },
+{ 0x9742, 16, {0xe4, 0xf5, 0x4b, 0xe5, 0x4b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20} },
+{ 0x9752, 16, {0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74, 0x8a, 0x2e} },
+{ 0x9762, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4c, 0x80, 0x0d, 0x74, 0x8a, 0x2e} },
+{ 0x9772, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4c, 0xe5, 0x4f, 0x24, 0x07, 0xf5, 0x82} },
+{ 0x9782, 16, {0xe4, 0x35, 0x4e, 0xf5, 0x83, 0xe5, 0x4c, 0xf0, 0xe0, 0xf5, 0x4d, 0x65, 0x4c, 0x60, 0x38, 0xe4} },
+{ 0x9792, 16, {0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfd, 0x05, 0x53, 0xe5, 0x53, 0xaa, 0x52, 0x70, 0x02} },
+{ 0x97a2, 16, {0x05, 0x52, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70} },
+{ 0x97b2, 16, {0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4c, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
+{ 0x97c2, 16, {0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64, 0x02, 0x70} },
+{ 0x97d2, 16, {0x87, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60, 0x03, 0x02, 0x97, 0x45, 0x02, 0x9b, 0x70, 0xe4} },
+{ 0x97e2, 16, {0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0x05, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x03} },
+{ 0x97f2, 16, {0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x96, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe4, 0xf5, 0x4d, 0x7e} },
+{ 0x9802, 16, {0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} },
+{ 0x9812, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xc4, 0xf0, 0x90, 0x01} },
+{ 0x9822, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0x74, 0x02} },
+{ 0x9832, 16, {0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4c, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0} },
+{ 0x9842, 16, {0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52} },
+{ 0x9852, 16, {0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
+{ 0x9862, 16, {0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x4d, 0xff, 0x90, 0x01, 0xc4, 0xe0} },
+{ 0x9872, 16, {0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfe, 0x05, 0x53, 0xe5, 0x53} },
+{ 0x9882, 16, {0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x53, 0xe5} },
+{ 0x9892, 16, {0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53} },
+{ 0x98a2, 16, {0x82, 0x85, 0x52, 0x83, 0xe5, 0x4c, 0xf0, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x70, 0x16, 0x74, 0x08} },
+{ 0x98b2, 16, {0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60} },
+{ 0x98c2, 16, {0x03, 0x02, 0x98, 0x0d, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x05, 0x4b} },
+{ 0x98d2, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12} },
+{ 0x98e2, 16, {0xf0, 0x02, 0x9b, 0x70, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01} },
+{ 0x98f2, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01, 0xc4} },
+{ 0x9902, 16, {0xf0, 0x02, 0x9b, 0x70, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5} },
+{ 0x9912, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01, 0xc0} },
+{ 0x9922, 16, {0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
+{ 0x9932, 16, {0x83, 0x74, 0xff, 0xf0, 0xf5, 0x4d, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x9b, 0x70, 0x90, 0x01, 0xc0} },
+{ 0x9942, 16, {0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f} },
+{ 0x9952, 16, {0x02, 0x12, 0x81, 0xd9, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5} },
+{ 0x9962, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0x55, 0x4d, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f} },
+{ 0x9972, 16, {0x4c, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4c, 0x70, 0x04, 0x7f} },
+{ 0x9982, 16, {0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4c, 0xe5, 0x4c, 0x70, 0x03, 0x02, 0x9b, 0x70, 0xe4, 0x90} },
+{ 0x9992, 16, {0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0xe4} },
+{ 0x99a2, 16, {0xff, 0xfd, 0x12, 0x82, 0xa8, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0x85} },
+{ 0x99b2, 16, {0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x4f, 0x82, 0x85} },
+{ 0x99c2, 16, {0x4e, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3} },
+{ 0x99d2, 16, {0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x9b, 0x70, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00} },
+{ 0x99e2, 16, {0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xe5, 0x4f, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4e, 0xf5} },
+{ 0x99f2, 16, {0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x02, 0x9b, 0x70, 0xe4} },
+{ 0x9a02, 16, {0xf5, 0x4d, 0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0xe5, 0x4b, 0x75, 0xf0, 0x08} },
+{ 0x9a12, 16, {0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xf5, 0x83} },
+{ 0x9a22, 16, {0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} },
+{ 0x9a32, 16, {0x4b, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x57, 0x80, 0x75, 0x58, 0x40, 0x12, 0x96, 0x5e, 0x8f, 0x4d} },
+{ 0x9a42, 16, {0xe5, 0x4d, 0x70, 0x11, 0xaf, 0x4b, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20} },
+{ 0x9a52, 16, {0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d, 0x01, 0xfb, 0x75, 0x57} },
+{ 0x9a62, 16, {0x80, 0x75, 0x58, 0x40, 0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d} },
+{ 0x9a72, 16, {0x02, 0xfb, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20, 0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xaf, 0x4b, 0x7d} },
+{ 0x9a82, 16, {0x01, 0x12, 0x82, 0xa8, 0xe5, 0x4d, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04} },
+{ 0x9a92, 16, {0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
+{ 0x9aa2, 16, {0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0x05, 0x4b} },
+{ 0x9ab2, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x50, 0x03, 0x02, 0x9a, 0x06, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03} },
+{ 0x9ac2, 16, {0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74} },
+{ 0x9ad2, 16, {0x9b, 0xf0, 0xa3, 0x74, 0x92, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08} },
+{ 0x9ae2, 16, {0x70, 0x03, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03} },
+{ 0x9af2, 16, {0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5} },
+{ 0x9b02, 16, {0x52, 0xf0, 0xa3, 0xe5, 0x53, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x10, 0x2c, 0xef, 0x64, 0x08} },
+{ 0x9b12, 16, {0x60, 0x5c, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x51, 0x24, 0x02, 0xff, 0xe4, 0x35} },
+{ 0x9b22, 16, {0x50, 0xfa, 0xa9, 0x07, 0x7b, 0x01, 0x7d, 0x10, 0x12, 0x95, 0xc1, 0xef, 0x4e, 0x70, 0x32, 0x90} },
+{ 0x9b32, 16, {0x03, 0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5} },
+{ 0x9b42, 16, {0x51, 0x24, 0x02, 0x90, 0x03, 0x60, 0xf0, 0xe4, 0x35, 0x50, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03} },
+{ 0x9b52, 16, {0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80} },
+{ 0x9b62, 16, {0x0d, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01} },
+{ 0x9b72, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} },
+{ 0x9b82, 15, {0xf6, 0x7e, 0x03, 0x7f, 0x35, 0x7d, 0x24, 0x12, 0x8e, 0xb4, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
+{ 0x9b91, 1, {0x22} },
+{ 0x9b92, 16, {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} },
+{ 0x9ba2, 16, {0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} },
+{ 0x9bb2, 16, {0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} },
+{ 0x9bc2, 16, {0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} },
+{ 0x9bd2, 16, {0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} },
+{ 0x9be2, 16, {0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} },
+{ 0x9bf2, 16, {0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} },
+{ 0x9c02, 16, {0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} },
+{ 0x9c12, 16, {0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} },
+{ 0x9c22, 16, {0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} },
+{ 0x9c32, 16, {0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} },
+{ 0x9c42, 16, {0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} },
+{ 0x9c52, 16, {0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} },
+{ 0x9c62, 16, {0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} },
+{ 0x9c72, 16, {0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} },
+{ 0x9c82, 16, {0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} },
+{ 0x9c92, 16, {0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} },
+{ 0x9ca2, 16, {0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} },
+{ 0x9cb2, 16, {0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} },
+{ 0x9cc2, 16, {0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} },
+{ 0x9cd2, 16, {0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} },
+{ 0x9ce2, 16, {0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} },
+{ 0x9cf2, 16, {0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} },
+{ 0x9d02, 16, {0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} },
+{ 0x9d12, 16, {0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} },
+{ 0x9d22, 16, {0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} },
+{ 0x9d32, 16, {0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} },
+{ 0x9d42, 16, {0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} },
+{ 0x9d52, 16, {0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} },
+{ 0x9d62, 16, {0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} },
+{ 0x9d72, 16, {0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} },
+{ 0x9d82, 16, {0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} },
+{ 0x9d92, 16, {0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} },
+{ 0x9da2, 16, {0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
+{ 0x9db2, 16, {0x9e, 0x45, 0x74, 0x36, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0x9e, 0x45, 0xef, 0x75, 0xf0} },
+{ 0x9dc2, 16, {0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
+{ 0x9dd2, 16, {0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
+{ 0x9de2, 16, {0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
+{ 0x9df2, 16, {0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
+{ 0x9e02, 16, {0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
+{ 0x9e12, 16, {0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
+{ 0x9e22, 16, {0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
+{ 0x9e32, 16, {0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
+{ 0x9e42, 12, {0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0x9d, 0xa4} },
+{ 0x9e4e, 1, {0x22} },
+{ 0x9e4f, 16, {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
+{ 0x9e5f, 16, {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
+{ 0x9e6f, 16, {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
+{ 0x9e7f, 16, {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
+{ 0x9e8f, 16, {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
+{ 0x9e9f, 16, {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
+{ 0x9eaf, 16, {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
+{ 0x9ebf, 16, {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
+{ 0x9ecf, 16, {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
+{ 0x9edf, 16, {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
+{ 0x9eef, 16, {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
+{ 0x9eff, 16, {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
+{ 0x9f0f, 16, {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
+{ 0x9f1f, 16, {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
+{ 0x9f2f, 16, {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
+{ 0x9f3f, 9, {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x9e, 0x9f, 0x73} },
+{ 0x9f48, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0x9f58, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x9f61, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0x9f71, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0x9f81, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x9f8e, 16, {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
+{ 0x9f9e, 6, {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
+{ 0x9fa4, 16, {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
+{ 0x9fb4, 6, {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
+{ 0x9fba, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0x9fca, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0x9fda, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0x9fea, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0x9ff2, 16, {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
+{ 0xa002, 16, {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
+{ 0xa012, 16, {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
+{ 0xa022, 16, {0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
+{ 0xa032, 16, {0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
+{ 0xa042, 16, {0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
+{ 0xa052, 16, {0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
+{ 0xa062, 16, {0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
+{ 0xa072, 16, {0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
+{ 0xa082, 16, {0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
+{ 0xa092, 16, {0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
+{ 0xa0a2, 16, {0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
+{ 0xa0b2, 14, {0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
+{ 0xa0c0, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0xa0d0, 1, {0x22} },
+{ 0xa0d1, 16, {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
+{ 0xa0e1, 3, {0xd8, 0xf1, 0x22} },
+{ 0xa0e4, 16, {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
+{ 0xa0f4, 7, {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
+{ 0xa0fb, 12, {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0xa107, 16, {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa1, 0x1e, 0x12, 0xa1, 0x1e, 0x12} },
+{ 0xa117, 16, {0xa1, 0x1e, 0x12, 0xa1, 0x1e, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
+{ 0xa127, 16, {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
+{ 0xa137, 1, {0x22} },
X { 0xffff, 0, {0x00} }
X };
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/usb-core.c linux/drivers/usb/usb-core.c
--- v2.2.19/drivers/usb/usb-core.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/usb-core.c Thu Jan 1 01:00:00 1970
@@ -1,51 +0,0 @@
-/*
- * driver/usb/usb-core.c
- *
- * (C) Copyright David Waite 1999
- * based on code from usb.c, by Linus Torvalds
- *
- * The purpose of this file is to pull any and all generic modular code from
- * usb.c and put it in a separate file. This way usb.c is kept as a generic
- * library, while this file handles starting drivers, etc.
- *
- */
-
-#include <linux/version.h>
-#include <linux/kernel.h>
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/usb.h>
-
-/*
- * USB core
- */
-extern int usb_hub_init(void);
-extern void usb_hub_cleanup(void);
-extern int usb_major_init(void);
-extern void usb_major_cleanup(void);
-
-
-/*
- * Cleanup
- */
-static void __exit usb_exit(void)
-{
- usb_major_cleanup();
- usbdevfs_cleanup();
- usb_hub_cleanup();
-}
-
-/*
- * Init
- */
-int usb_init(void)
-{
- usb_major_init();
- usbdevfs_init();
- usb_hub_init();
-


- return 0;
-}
-

-module_init (usb_init);
-module_exit (usb_exit);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/usb-storage.c linux/drivers/usb/usb-storage.c
--- v2.2.19/drivers/usb/usb-storage.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/usb-storage.c Wed Oct 10 01:41:34 2001
@@ -1636,10 +1636,23 @@
X "Shuttle eUSCSI Bridge", US_SC_SCSI, US_PR_BULK, US_FL_ALT_LENGTH},
X { 0x04e6, 0x0006, 0x0100,
X "Shuttle eUSB MMC Adapter", US_SC_SCSI, US_PR_CB, US_FL_SINGLE_LUN},
+ { 0x054c, 0x0010, 0x0210, "Sony DSC", US_SC_SCSI, US_PR_CB,
+ US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH},
+ { 0x054c, 0x0010, 0x0322,
+ "Sony DSC-S75", US_SC_SCSI, US_PR_CB,
+ US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH},
X { 0x057b, 0x0000, 0x0114,
X "Y-E Data Flashbuster-U", US_SC_UFI, US_PR_CB, US_FL_SINGLE_LUN},
X { 0x059b, 0x0030, 0x0100,
X "Iomega Zip 250", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN},
+ { 0x059b, 0x0031, 0x0100,
+ "Iomega USB Zip 100", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN},
+ { 0x059b, 0x0032, 0x0100,
+ "Iomega USB Zip 250", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN},
+ { 0x059b, 0x0034, 0x0100,
+ "Iomega Zip 100", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN},
+ { 0x0644, 0x1000, 0x0133,
+ "TEAC CD-210PU", US_SC_8020, US_PR_BULK, US_FL_ALT_LENGTH},
X { 0x0693, 0x0002, 0x0100,
X "Hagiwara FlashGate SmartMedia", US_SC_SCSI, US_PR_BULK,
X US_FL_ALT_LENGTH},
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/usb-uhci.c linux/drivers/usb/usb-uhci.c
--- v2.2.19/drivers/usb/usb-uhci.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/usb-uhci.c Wed Oct 10 01:41:34 2001
@@ -2297,7 +2297,7 @@
X usb_endpoint_halt (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe));
X }
X
- // if any error occured: ignore this td, and continue
+ // if any error occurred: ignore this td, and continue
X if (status != 0) {
X //uhci_show_td (desc);
X urb->error_count++;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/usb.c linux/drivers/usb/usb.c
--- v2.2.19/drivers/usb/usb.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/usb.c Wed Oct 10 01:41:35 2001
@@ -2,7 +2,7 @@
X * drivers/usb/usb.c
X *
X * (C) Copyright Linus Torvalds 1999
- * (C) Copyright Johannes Erdfelt 1999
+ * (C) Copyright Johannes Erdfelt 1999-2001
X * (C) Copyright Andreas Gal 1999
X * (C) Copyright Gregory P. Smith 1999
X * (C) Copyright Deti Fliegl 1999 (new USB architecture)
@@ -15,8 +15,6 @@
X * Think of this as a "USB library" rather than anything else.
X * It should be considered a slave, with no callbacks. Callbacks
X * are evil.
- *
- * $Id: usb.c,v 1.53 2000/01/14 16:19:09 acher Exp $


X */
X
X #include <linux/config.h>

@@ -25,6 +23,7 @@
X #include <linux/bitops.h>
X #include <linux/malloc.h>
X #include <linux/interrupt.h> /* for in_interrupt() */
+#include <linux/init.h>
X
X
X #if defined(CONFIG_KMOD) && defined(CONFIG_HOTPLUG)
@@ -54,6 +53,9 @@
X 0;
X #endif
X
+extern int usb_hub_init(void);
+extern void usb_hub_cleanup(void);
+
X /*
X * Prototypes for the device driver probing/loading functions
X */
@@ -71,6 +73,15 @@
X
X static struct usb_driver *usb_minors[16];
X
+/**
+ * usb_register - register a USB driver
+ * @new_driver: USB operations for the driver
+ *
+ * Registers a USB driver with the USB core. The list of unattached
+ * interfaces will be rescanned whenever a new driver is added, allowing
+ * the new driver to attach to any recognized devices.
+ * Returns a negative error code on failure and 0 on success.
+ */
X int usb_register(struct usb_driver *new_driver)
X {
X if (new_driver->fops != NULL) {
@@ -86,19 +97,21 @@
X init_MUTEX(&new_driver->serialize);
X
X /* Add it to the list of known drivers */
- list_add(&new_driver->driver_list, &usb_driver_list);
+ list_add_tail(&new_driver->driver_list, &usb_driver_list);
X
X usb_scan_devices();


X
X return 0;
X }
X
-/*

- * We go through all existing devices, and see if any of them would
- * be acceptable to the new driver.. This is done using a depth-first
- * search for devices without a registered driver already, then
- * running 'probe' with each of the drivers registered on every one
- * of these.
+/**
+ * usb_scan_devices - scans all unclaimed USB interfaces
+ *
+ * Goes through all unclaimed USB interfaces, and offers them to all
+ * registered USB drivers through the 'probe' function.
+ * This will automatically be called after usb_register is called.
+ * It is called by some of the USB subsystems after one of their subdrivers
+ * are registered.
X */
X void usb_scan_devices(void)
X {
@@ -140,7 +153,9 @@
X down(&driver->serialize);
X driver->disconnect(dev, interface->private_data);
X up(&driver->serialize);
- usb_driver_release_interface(driver, interface);
+ /* if driver->disconnect didn't release the interface */
+ if (interface->driver)
+ usb_driver_release_interface(driver, interface);
X /*
X * This will go through the list looking for another
X * driver that can handle the device
@@ -150,8 +165,11 @@
X }
X }
X
-/*
- * Unlink a driver from the driver list when it is unloaded
+/**
+ * usb_deregister - unregister a USB driver
+ * @driver: USB operations of the driver to unregister
+ *
+ * Unlinks the specified driver from the internal USB driver list.
X */
X void usb_deregister(struct usb_driver *driver)
X {
@@ -327,8 +345,28 @@
X urb->bandwidth = 0;
X }
X
-/*
- * New functions for (de)registering a controller
+static void usb_bus_get(struct usb_bus *bus)
+{
+ atomic_inc(&bus->refcnt);
+}
+
+static void usb_bus_put(struct usb_bus *bus)
+{
+ if (atomic_dec_and_test(&bus->refcnt))
+ kfree(bus);
+}
+
+/**
+ * usb_alloc_bus - creates a new USB host controller structure
+ * @op: pointer to a struct usb_operations that this bus structure should use
+ *
+ * Creates a USB host controller bus structure with the specified
+ * usb_operations and initializes all the necessary internal objects.
+ * (For use only by USB Host Controller Drivers.)
+ *
+ * If no memory is available, NULL is returned.
+ *
+ * The caller should call usb_free_bus() when it is finished with the structure.
X */
X struct usb_bus *usb_alloc_bus(struct usb_operations *op)
X {
@@ -340,6 +378,10 @@
X
X memset(&bus->devmap, 0, sizeof(struct usb_devmap));
X
+#ifdef DEVNUM_ROUND_ROBIN
+ bus->devnum_next = 1;
+#endif /* DEVNUM_ROUND_ROBIN */
+
X bus->op = op;
X bus->root_hub = NULL;
X bus->hcpriv = NULL;
@@ -351,17 +393,31 @@
X INIT_LIST_HEAD(&bus->bus_list);
X INIT_LIST_HEAD(&bus->inodes);
X
+ atomic_set(&bus->refcnt, 1);
+
X return bus;
X }
X
+/**
+ * usb_free_bus - frees the memory used by a bus structure
+ * @bus: pointer to the bus to free
+ *
+ * (For use only by USB Host Controller Drivers.)
+ */
X void usb_free_bus(struct usb_bus *bus)
X {
X if (!bus)
X return;
X
- kfree(bus);
+ usb_bus_put(bus);
X }
X
+/**
+ * usb_register_bus - registers the USB host controller with the usb core


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 79'
echo 'File patch-2.2.20 is continued in part 80'
echo "80" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:13 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part74

#!/bin/sh -x
# this is part 74 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 74; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ 0x7a, 0x05, 0x3c, 0x7a, 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe,
+ 0x44, 0x1c, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a,
+ 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51,
+ 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x1c, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x18,
+ 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x63, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78,
+ 0x03, 0x02, 0x56, 0xa3, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x18, 0x2d, 0x7a, 0x07, 0x01, 0x63, 0x7a,
+ 0x07, 0x01, 0x73, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22,
+ 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82,
+ 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb3, 0x2e, 0x24, 0x00, 0x02,
+ 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30,
+ 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c,
+ 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27, 0x01, 0xb3, 0x1b, 0x38,
+ 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12,
+ 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09,
+ 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7f, 0x7a, 0x51,
+ 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67,
+ 0x01, 0xb3, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63,
+ 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43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0xff, 0x75,

+ 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30,

+ 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda,
+ 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x57, 0xff, 0xda, 0xb8, 0x02,
+ 0x59, 0x26, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5,
+ 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20,
+ 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2,
+ 0x55, 0x80, 0x02, 0xc2, 0x55, 0x12, 0x43, 0x30, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73,
+ 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04,
+ 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61,
+ 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00,
+ 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x58, 0x53, 0x75,
+ 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0e, 0x01,
+ 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x75, 0x2f, 0xa6, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x86,
+ 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e,
+ 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5c, 0x53, 0x30, 0x36, 0x06, 0x20, 0xe6, 0x4f, 0xd2,
+ 0x0e, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x66, 0x7e, 0x37, 0x01, 0x85, 0x7e, 0x27, 0x01, 0xa5, 0x9d,
+ 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e,
+ 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x20, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01,
+ 0x65, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0,
+ 0x10, 0x66, 0xc4, 0x22, 0xc2, 0x66, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27,
+ 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa5, 0x28, 0x04, 0x7e, 0x27,
+ 0x01, 0xa5, 0x7e, 0x37, 0x01, 0x85, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e,
+ 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x20, 0x2c,
+ 0x38, 0x13, 0x7a, 0x47, 0x01, 0x65, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12,
+ 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73,
+ 0x35, 0x9e, 0x44, 0x20, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x1c, 0x2d, 0x7d, 0x24,
+ 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x65, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x59,
+ 0xd0, 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x1c, 0x2d, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75,
+ 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92,
+ 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78,
+ 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb5, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe,
+ 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01,
+ 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a,
+ 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x06, 0x00, 0x2e, 0x27, 0x01, 0xb5, 0x1b, 0x38, 0x20, 0x0b, 0x35,
+ 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 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 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1,
+ 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80,
+ 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8,
+ 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61,
+ 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5b, 0x80, 0x75, 0x2f, 0x95, 0x12,
+ 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, 0x2f,
+ 0x03, 0xd2, 0x0f, 0x22, 0x75, 0x2f, 0xa7, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x87, 0x00, 0x80, 0x06,
+ 0x20, 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda,
+ 0xb8, 0x68, 0x03, 0x12, 0x5f, 0x80, 0x30, 0x37, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0f, 0x22, 0x30,
+ 0xe6, 0x02, 0xd2, 0x67, 0x7e, 0x37, 0x01, 0x87, 0x7e, 0x27, 0x01, 0xa7, 0x9d, 0x32, 0x40, 0x31,
+ 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, 0x87, 0x7e, 0x37, 0x01, 0x67,
+ 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x24, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x67, 0x75, 0x2f,
+ 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x67, 0xc4,
+ 0x22, 0xc2, 0x67, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x87, 0xbe,
+ 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa7, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa7, 0x7e,
+ 0x37, 0x01, 0x87, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01,
+ 0x87, 0x7e, 0x37, 0x01, 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x24, 0x2c, 0x38, 0x13, 0x7a,
+ 0x47, 0x01, 0x67, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02,
+ 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44,
+ 0x24, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x20, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a,
+ 0x47, 0x01, 0x67, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5c, 0xfd, 0x22, 0xd2,
+ 0x0f, 0x7e, 0x04, 0x20, 0x2d, 0x7a, 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x75, 0x2f, 0x94,
+ 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35,
+ 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54,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x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32,
+ 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5e, 0x59, 0xda, 0xb8, 0x02, 0x5f, 0x80, 0x09, 0xb1, 0x00, 0x18,
+ 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02,
+ 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x12,
+ 0x43, 0x5e, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a,
+ 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13,
+ 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c,
+ 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1,
+ 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5e, 0xad, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22,
+ 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09,
+ 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x50, 0x80, 0x02, 0xc2, 0x50, 0x02, 0x60, 0xff,
+ 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50,
+ 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04,
+ 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c,
+ 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02,
+ 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x02,
+ 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80,
+ 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, 0x53, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80,
+ 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c,
+ 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2,
+ 0x54, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14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, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4,
+ 0x03, 0x02, 0x71, 0xf2, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x6d,
+ 0xe5, 0x75, 0x84, 0xff, 0x73, 0x02, 0x6f, 0xa0, 0x02, 0x6e, 0x2d, 0x02, 0x70, 0x39, 0x02, 0x70,
+ 0x54, 0x02, 0x6f, 0x37, 0x02, 0x6e, 0xc2, 0x02, 0x70, 0x85, 0x02, 0x70, 0x85, 0x02, 0x70, 0x88,
+ 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02,
+ 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x8e, 0x02, 0x71, 0x60, 0x02, 0x70, 0x8b, 0x02, 0x70,
+ 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x74, 0x00, 0x7a,
+ 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x06, 0x2a,
+ 0x7e, 0xb3, 0x2c, 0x78, 0x60, 0x79, 0x7c, 0x0b, 0x7e, 0x13, 0x2c, 0x79, 0x7e, 0x17, 0x2c, 0x7a,
+ 0x75, 0x2f, 0x72, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12,
+ 0x73, 0x35, 0x12, 0x72, 0x37, 0x40, 0x58, 0x02, 0x6b, 0xeb, 0xb4, 0x08, 0x1c, 0x75, 0x2f, 0x74,
+ 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x3f, 0xf1, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00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x7e, 0x24,
+ 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d,
+ 0x87, 0x7e, 0x34, 0x7f, 0xc2, 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e,
+ 0x34, 0x7f, 0xcc, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50,
+ 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc,
+ 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b,
+ 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b,
+ 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00,
+ 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #16, Start Address 00ff7fc6, Length 4
+0xff,0x00,0xc6,0x7f,0x04,0x00,
+ 0x02, 0x00, 0x03, 0x00,
+
+// Segment #17, Start Address 00ff7335, Length 328
+0xff,0x00,0x35,0x73,0x48,0x01,
+ 0xca, 0x08, 0x7e, 0x01, 0x2f, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a,
+ 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b,
+ 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x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, 0xb6, 0x20, 0xe0, 0x06, 0x6c,
+ 0xdc, 0x7a, 0xd3, 0x90, 0x00, 0x4d, 0x77, 0x78, 0x90, 0xc2, 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00,
+ 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01, 0x04, 0x01, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x00, 0x08, 0x10,
+ 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00,
+ 0xfe, 0x0b, 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23, 0x7e,
+ 0x18, 0x74, 0x24, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5, 0xb8,
+ 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe,

+};
+
+static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {

+ 2, 0, 3 }; // Major, Minor, Build


+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_ionsp.h linux/drivers/usb/serial/io_ionsp.h
--- v2.2.19/drivers/usb/serial/io_ionsp.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_ionsp.h Wed Oct 10 01:41:31 2001
@@ -0,0 +1,454 @@
+/************************************************************************
+ *
+ * IONSP.H Definitions for I/O Networks Serial Protocol
+ *
+ * Copyright (c) 1997-1998 Inside Out Networks, Inc.
+ *
+ * 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.
+ *
+ * These definitions are used by both kernel-mode driver and the
+ * peripheral firmware and MUST be kept in sync.


+ *
+ ************************************************************************/
+

+/************************************************************************
+
+The data to and from all ports on the peripheral is multiplexed
+through a single endpoint pair (EP1 since it supports 64-byte
+MaxPacketSize). Therefore, the data, commands, and status for
+each port must be preceeded by a short header identifying the
+destination port. The header also identifies the bytes that follow
+as data or as command/status info.
+
+Header format, first byte:
+
+ CLLLLPPP
+ --------
+ | | |------ Port Number: 0-7
+ | |--------- Length: MSB bits of length
+ |----------- Data/Command: 0 = Data header
+ 1 = Cmd / Status (Cmd if OUT, Status if IN)
+
+This gives 2 possible formats:
+
+
+ Data header: 0LLLLPPP LLLLLLLL
+ ============
+
+ Where (LLLL,LLLLLLL) is 12-bit length of data that follows for
+ port number (PPP). The length is 0-based (0-FFF means 0-4095
+ bytes). The ~4K limit allows the host driver (which deals in
+ transfer requests instead of individual packets) to write a
+ large chunk of data in a single request. Note, however, that
+ the length must always be <= the current TxCredits for a given
+ port due to buffering limitations on the peripheral.
+
+
+ Cmd/Status header: 1ccccPPP [ CCCCCCCC, Params ]...
+ ==================
+
+ Where (cccc) or (cccc,CCCCCCCC) is the cmd or status identifier.
+ Frequently-used values are encoded as (cccc), longer ones using
+ (cccc,CCCCCCCC). Subsequent bytes are optional parameters and are
+ specific to the cmd or status code. This may include a length
+ for command and status codes that need variable-length parameters.
+
+
+In addition, we use another interrupt pipe (endpoint) which the host polls
+periodically for flow control information. The peripheral, when there has
+been a change, sends the following 10-byte packet:
+
+ RRRRRRRRRRRRRRRR
+ T0T0T0T0T0T0T0T0
+ T1T1T1T1T1T1T1T1
+ T2T2T2T2T2T2T2T2
+ T3T3T3T3T3T3T3T3
+
+The first field is the 16-bit RxBytesAvail field, which indicates the
+number of bytes which may be read by the host from EP1. This is necessary:
+(a) because OSR2.1 has a bug which causes data loss if the peripheral returns
+fewer bytes than the host expects to read, and (b) because, on Microsoft
+platforms at least, an outstanding read posted on EP1 consumes about 35% of
+the CPU just polling the device for data.
+
+The next 4 fields are the 16-bit TxCredits for each port, which indicate how
+many bytes the host is allowed to send on EP1 for transmit to a given port.
+After an OPEN_PORT command, the Edgeport sends the initial TxCredits for that
+port.
+
+All 16-bit fields are sent in little-endian (Intel) format.
+
+************************************************************************/
+
+//
+// Define format of InterruptStatus packet returned from the
+// Interrupt pipe
+//
+
+typedef struct _INT_STATUS_PKT {
+ __u16 RxBytesAvail; // Additional bytes available to
+ // be read from Bulk IN pipe
+ __u16 TxCredits[ MAX_RS232_PORTS ]; // Additional space available in
+ // given port's TxBuffer
+} INT_STATUS_PKT, *PINT_STATUS_PKT;
+
+
+#define GET_INT_STATUS_SIZE(NumPorts) (sizeof(__u16) + (sizeof(__u16) * (NumPorts)))
+
+
+
+//
+// Define cmd/status header values and macros to extract them.
+//
+// Data: 0LLLLPPP LLLLLLLL
+// Cmd/Stat: 1ccccPPP CCCCCCCC
+
+#define IOSP_DATA_HDR_SIZE 2
+#define IOSP_CMD_HDR_SIZE 2
+
+#define IOSP_MAX_DATA_LENGTH 0x0FFF // 12 bits -> 4K
+
+#define IOSP_PORT_MASK 0x07 // Mask to isolate port number
+#define IOSP_CMD_STAT_BIT 0x80 // If set, this is command/status header
+
+#define IS_CMD_STAT_HDR(Byte1) ((Byte1) & IOSP_CMD_STAT_BIT)
+#define IS_DATA_HDR(Byte1) (! IS_CMD_STAT_HDR(Byte1))
+
+#define IOSP_GET_HDR_PORT(Byte1) ((__u8) ((Byte1) & IOSP_PORT_MASK))
+#define IOSP_GET_HDR_DATA_LEN(Byte1, Byte2) ((__u16) ( ((__u16)((Byte1) & 0x78)) << 5) | (Byte2))
+#define IOSP_GET_STATUS_CODE(Byte1) ((__u8) (((Byte1) & 0x78) >> 3))
+
+
+//
+// These macros build the 1st and 2nd bytes for a data header
+//
+#define IOSP_BUILD_DATA_HDR1(Port, Len) ((__u8) (((Port) | ((__u8) (((__u16) (Len)) >> 5) & 0x78 ))))
+#define IOSP_BUILD_DATA_HDR2(Port, Len) ((__u8) (Len))
+
+
+//
+// These macros build the 1st and 2nd bytes for a command header
+//
+#define IOSP_BUILD_CMD_HDR1(Port, Cmd) ((__u8) ( IOSP_CMD_STAT_BIT | (Port) | ((__u8) ((Cmd) << 3)) ))
+
+
+//--------------------------------------------------------------
+//
+// Define values for commands and command parameters
+// (sent from Host to Edgeport)
+//
+// 1ccccPPP P1P1P1P1 [ P2P2P2P2P2 ]...
+//
+// cccc: 00-07 2-byte commands. Write UART register 0-7 with
+// value in P1. See 16650.H for definitions of
+// UART register numbers and contents.
+//
+// 08-0B 3-byte commands: ==== P1 ==== ==== P2 ====
+// 08 available for expansion
+// 09 1-param commands Command Code Param
+// 0A available for expansion
+// 0B available for expansion
+//
+// 0C-0D 4-byte commands. P1 = extended cmd and P2,P3 = params
+// Currently unimplemented.
+//
+// 0E-0F N-byte commands: P1 = num bytes after P1 (ie, TotalLen - 2)
+// P2 = extended cmd, P3..Pn = parameters.
+// Currently unimplemented.
+//
+
+#define IOSP_WRITE_UART_REG(n) ((n) & 0x07) // UartReg[ n ] := P1
+
+// Register numbers and contents
+// defined in 16554.H.
+
+// 0x08 // Available for expansion.
+#define IOSP_EXT_CMD 0x09 // P1 = Command code (defined below)
+
+// P2 = Parameter
+
+//
+// Extended Command values, used with IOSP_EXT_CMD, may
+// or may not use parameter P2.
+//
+
+#define IOSP_CMD_OPEN_PORT 0x00 // Enable ints, init UART. (NO PARAM)
+#define IOSP_CMD_CLOSE_PORT 0x01 // Disable ints, flush buffers. (NO PARAM)
+#define IOSP_CMD_CHASE_PORT 0x02 // Wait for Edgeport TX buffers to empty. (NO PARAM)
+#define IOSP_CMD_SET_RX_FLOW 0x03 // Set Rx Flow Control in Edgeport
+#define IOSP_CMD_SET_TX_FLOW 0x04 // Set Tx Flow Control in Edgeport
+#define IOSP_CMD_SET_XON_CHAR 0x05 // Set XON Character in Edgeport
+#define IOSP_CMD_SET_XOFF_CHAR 0x06 // Set XOFF Character in Edgeport
+#define IOSP_CMD_RX_CHECK_REQ 0x07 // Request Edgeport to insert a Checkpoint into
+
+// the receive data stream (Parameter = 1 byte sequence number)
+
+#define IOSP_CMD_SET_BREAK 0x08 // Turn on the BREAK (LCR bit 6)
+#define IOSP_CMD_CLEAR_BREAK 0x09 // Turn off the BREAK (LCR bit 6)
+
+
+//
+// Define macros to simplify building of IOSP cmds
+//
+
+#define MAKE_CMD_WRITE_REG(ppBuf, pLen, Port, Reg, Val) \
+ do { \
+ (*(ppBuf))[0] = IOSP_BUILD_CMD_HDR1( (Port), IOSP_WRITE_UART_REG(Reg) ); \
+ (*(ppBuf))[1] = (Val); \
+ \
+ *ppBuf += 2; \
+ *pLen += 2; \
+ } while (0)
+
+#define MAKE_CMD_EXT_CMD(ppBuf, pLen, Port, ExtCmd, Param) \
+ do { \
+ (*(ppBuf))[0] = IOSP_BUILD_CMD_HDR1( (Port), IOSP_EXT_CMD ); \
+ (*(ppBuf))[1] = (ExtCmd); \
+ (*(ppBuf))[2] = (Param); \
+ \
+ *ppBuf += 3; \
+ *pLen += 3; \
+ } while (0)
+
+
+
+//--------------------------------------------------------------
+//
+// Define format of flow control commands
+// (sent from Host to Edgeport)
+//
+// 11001PPP FlowCmd FlowTypes
+//
+// Note that the 'FlowTypes' parameter is a bit mask; that is,
+// more than one flow control type can be active at the same time.
+// FlowTypes = 0 means 'no flow control'.
+//
+
+//
+// IOSP_CMD_SET_RX_FLOW
+//
+// Tells Edgeport how it can stop incoming UART data
+//
+// Example for Port 0
+// P0 = 11001000
+// P1 = IOSP_CMD_SET_RX_FLOW
+// P2 = Bit mask as follows:
+
+#define IOSP_RX_FLOW_RTS 0x01 // Edgeport drops RTS to stop incoming data
+#define IOSP_RX_FLOW_DTR 0x02 // Edgeport drops DTR to stop incoming data
+#define IOSP_RX_FLOW_DSR_SENSITIVITY 0x04 // Ignores Rx data unless DSR high
+
+// Not currently implemented by firmware.
+#define IOSP_RX_FLOW_XON_XOFF 0x08 // Edgeport sends XOFF char to stop incoming data.
+
+// Host must have previously programmed the
+// XON/XOFF values with SET_XON/SET_XOFF
+// before enabling this bit.
+
+//
+// IOSP_CMD_SET_TX_FLOW
+//
+// Tells Edgeport what signal(s) will stop it from transmitting UART data


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 74'
echo 'File patch-2.2.20 is continued in part 75'
echo "75" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:14 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part75

#!/bin/sh -x
# this is part 75 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 75; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+//
+// Example for Port 0
+// P0 = 11001000

+// P1 = IOSP_CMD_SET_TX_FLOW


+// P2 = Bit mask as follows:
+

+#define IOSP_TX_FLOW_CTS 0x01 // Edgeport stops Tx if CTS low
+#define IOSP_TX_FLOW_DSR 0x02 // Edgeport stops Tx if DSR low
+#define IOSP_TX_FLOW_DCD 0x04 // Edgeport stops Tx if DCD low
+#define IOSP_TX_FLOW_XON_XOFF 0x08 // Edgeport stops Tx upon receiving XOFF char.


+
+// Host must have previously programmed the
+// XON/XOFF values with SET_XON/SET_XOFF
+// before enabling this bit.

+#define IOSP_TX_FLOW_XOFF_CONTINUE 0x10 // If not set, Edgeport stops Tx when
+
+// sending XOFF in order to fix broken
+// systems that interpret the next
+// received char as XON.
+// If set, Edgeport continues Tx
+// normally after transmitting XOFF.


+// Not currently implemented by firmware.

+#define IOSP_TX_TOGGLE_RTS 0x20 // Edgeport drives RTS as a true half-duplex
+
+// Request-to-Send signal: it is raised before
+// beginning transmission and lowered after
+// the last Tx char leaves the UART.


+// Not currently implemented by firmware.
+

+//
+// IOSP_CMD_SET_XON_CHAR
+//
+// Sets the character which Edgeport transmits/interprets as XON.
+// Note: This command MUST be sent before sending a SET_RX_FLOW or
+// SET_TX_FLOW with the XON_XOFF bit set.


+//
+// Example for Port 0
+// P0 = 11001000

+// P1 = IOSP_CMD_SET_XON_CHAR
+// P2 = 0x11
+
+
+//
+// IOSP_CMD_SET_XOFF_CHAR
+//
+// Sets the character which Edgeport transmits/interprets as XOFF.
+// Note: This command must be sent before sending a SET_RX_FLOW or
+// SET_TX_FLOW with the XON_XOFF bit set.


+//
+// Example for Port 0
+// P0 = 11001000

+// P1 = IOSP_CMD_SET_XOFF_CHAR
+// P2 = 0x13
+
+
+//
+// IOSP_CMD_RX_CHECK_REQ
+//
+// This command is used to assist in the implementation of the
+// IOCTL_SERIAL_PURGE Windows IOCTL.
+// This IOSP command tries to place a marker at the end of the RX
+// queue in the Edgeport. If the Edgeport RX queue is full then
+// the Check will be discarded.
+// It is up to the device driver to timeout waiting for the
+// RX_CHECK_RSP. If a RX_CHECK_RSP is received, the driver is
+// sure that all data has been received from the edgeport and
+// may now purge any internal RX buffers.
+// Note tat the sequence numbers may be used to detect lost
+// CHECK_REQs.
+


+// Example for Port 0
+// P0 = 11001000

+// P1 = IOSP_CMD_RX_CHECK_REQ
+// P2 = Sequence number
+
+
+// Response will be:
+// P1 = IOSP_EXT_RX_CHECK_RSP
+// P2 = Request Sequence number


+
+
+
+//--------------------------------------------------------------
+//

+// Define values for status and status parameters
+// (received by Host from Edgeport)
+//
+// 1ssssPPP P1P1P1P1 [ P2P2P2P2P2 ]...
+//
+// ssss: 00-07 2-byte status. ssss identifies which UART register
+// has changed value, and the new value is in P1.
+// Note that the ssss values do not correspond to the
+// 16554 register numbers given in 16554.H. Instead,
+// see below for definitions of the ssss numbers
+// used in this status message.
+//
+// 08-0B 3-byte status: ==== P1 ==== ==== P2 ====
+// 08 LSR_DATA: New LSR Errored byte
+// 09 1-param responses Response Code Param
+// 0A OPEN_RSP: InitialMsr TxBufferSize


+// 0B available for expansion
+//

+// 0C-0D 4-byte status. P1 = extended status code and P2,P3 = params
+// Not currently implemented.
+//
+// 0E-0F N-byte status: P1 = num bytes after P1 (ie, TotalLen - 2)
+// P2 = extended status, P3..Pn = parameters.
+// Not currently implemented.
+//
+
+/****************************************************
+ * SSSS values for 2-byte status messages (0-8)
+ ****************************************************/
+
+#define IOSP_STATUS_LSR 0x00 // P1 is new value of LSR register.
+
+// Bits defined in 16554.H. Edgeport
+// returns this in order to report
+// line status errors (overrun,
+// parity, framing, break). This form
+// is used when a errored receive data
+// character was NOT present in the
+// UART when the LSR error occurred
+// (ie, when LSR bit 0 = 0).
+
+#define IOSP_STATUS_MSR 0x01 // P1 is new value of MSR register.
+
+// Bits defined in 16554.H. Edgeport
+// returns this in order to report
+// changes in modem status lines
+// (CTS, DSR, RI, CD)
+//
+
+// 0x02 // Available for future expansion
+// 0x03 //
+// 0x04 //
+// 0x05 //
+// 0x06 //
+// 0x07 //
+
+
+/****************************************************
+ * SSSS values for 3-byte status messages (8-A)
+ ****************************************************/
+
+#define IOSP_STATUS_LSR_DATA 0x08 // P1 is new value of LSR register (same as STATUS_LSR)
+
+// P2 is errored character read from
+// RxFIFO after LSR reported an error.
+
+#define IOSP_EXT_STATUS 0x09 // P1 is status/response code, param in P2.
+
+
+// Response Codes (P1 values) for 3-byte status messages
+
+#define IOSP_EXT_STATUS_CHASE_RSP 0 // Reply to CHASE_PORT cmd. P2 is outcome:
+#define IOSP_EXT_STATUS_CHASE_PASS 0 // P2 = 0: All Tx data drained successfully
+#define IOSP_EXT_STATUS_CHASE_FAIL 1 // P2 = 1: Timed out (stuck due to flow
+
+// control from remote device).
+
+#define IOSP_EXT_STATUS_RX_CHECK_RSP 1 // Reply to RX_CHECK cmd. P2 is sequence number
+
+
+#define IOSP_STATUS_OPEN_RSP 0x0A // Reply to OPEN_PORT cmd.
+
+// P1 is Initial MSR value
+// P2 is encoded TxBuffer Size:
+// TxBufferSize = (P2 + 1) * 64
+
+// 0x0B // Available for future expansion
+
+#define GET_TX_BUFFER_SIZE(P2) (((P2) + 1) * 64)
+
+
+
+
+/****************************************************
+ * SSSS values for 4-byte status messages
+ ****************************************************/
+
+#define IOSP_EXT4_STATUS 0x0C // Extended status code in P1,
+
+// Params in P2, P3
+// Currently unimplemented.
+
+// 0x0D // Currently unused, available.
+
+
+
+//
+// Macros to parse status messages
+//
+
+#define IOSP_GET_STATUS_LEN(code) ( (code) < 8 ? 2 : ((code) < 0x0A ? 3 : 4) )
+
+#define IOSP_STATUS_IS_2BYTE(code) ( (code) < 0x08 )
+#define IOSP_STATUS_IS_3BYTE(code) ( ((code) >= 0x08) && ((code) <= 0x0B) )
+#define IOSP_STATUS_IS_4BYTE(code) ( ((code) >= 0x0C) && ((code) <= 0x0D) )
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_tables.h linux/drivers/usb/serial/io_tables.h
--- v2.2.19/drivers/usb/serial/io_tables.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_tables.h Wed Oct 10 01:41:31 2001
@@ -0,0 +1,437 @@
+/*
+ * IO Edgeport Driver tables
+ *
+ * Copyright (C) 2001
+ * Greg Kroah-Hartman (gr...@kroah.com)


+ *
+ * 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.
+ *

+ */
+
+/* Devices that this driver supports */
+static __u16 ionetworks_vendor_id = USB_VENDOR_ID_ION;
+static __u16 edgeport_4_id = ION_DEVICE_ID_EDGEPORT_4;
+static __u16 rapidport_4_id = ION_DEVICE_ID_RAPIDPORT_4;
+static __u16 edgeport_4t_id = ION_DEVICE_ID_EDGEPORT_4T;
+static __u16 edgeport_2_id = ION_DEVICE_ID_EDGEPORT_2;
+static __u16 edgeport_4i_id = ION_DEVICE_ID_EDGEPORT_4I;
+static __u16 edgeport_2i_id = ION_DEVICE_ID_EDGEPORT_2I;
+static __u16 edgeport_prl_id = ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT;
+static __u16 edgeport_421_id = ION_DEVICE_ID_EDGEPORT_421;
+static __u16 edgeport_21_id = ION_DEVICE_ID_EDGEPORT_21;
+static __u16 edgeport_8dual_id = ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU;
+static __u16 edgeport_8_id = ION_DEVICE_ID_EDGEPORT_8;
+static __u16 edgeport_2din_id = ION_DEVICE_ID_EDGEPORT_2_DIN;
+static __u16 edgeport_4din_id = ION_DEVICE_ID_EDGEPORT_4_DIN;
+static __u16 edgeport_16dual_id = ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU;
+static __u16 edgeport_compat_id = ION_DEVICE_ID_EDGEPORT_COMPATIBLE;
+static __u16 edgeport_8i_id = ION_DEVICE_ID_EDGEPORT_8I;
+
+
+/* build up the list of devices that this driver supports */
+struct usb_serial_device_type edgeport_4_device = {
+ name: "Edgeport 4",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_4_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type rapidport_4_device = {
+ name: "Rapidport 4",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &rapidport_4_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_4t_device = {
+ name: "Edgeport 4t",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_4t_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_2_device = {
+ name: "Edgeport 2",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_2_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 2,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_4i_device = {
+ name: "Edgeport 4i",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_4i_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_2i_device = {
+ name: "Edgeport 2i",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_2i_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 2,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_prl_device = {
+ name: "Edgeport Parallel",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_prl_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 1,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_421_device = {
+ name: "Edgeport 421",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_421_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 2,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_21_device = {
+ name: "Edgeport 21",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_21_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 2,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_8dual_device = {
+ name: "Edgeport 8 dual cpu",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_8dual_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_8_device = {
+ name: "Edgeport 8",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_8_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 8,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_2din_device = {
+ name: "Edgeport 2din",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_2din_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 2,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_4din_device = {
+ name: "Edgeport 4din",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_4din_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_16dual_device = {
+ name: "Edgeport 16 dual cpu",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_16dual_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 8,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_compat_id_device = {
+ name: "Edgeport Compatible",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_compat_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 4,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+struct usb_serial_device_type edgeport_8i_device = {
+ name: "Edgeport 8i",
+ idVendor: &ionetworks_vendor_id,
+ idProduct: &edgeport_8i_id,
+ needs_interrupt_in: MUST_HAVE,
+ needs_bulk_in: MUST_HAVE,
+ needs_bulk_out: MUST_HAVE,
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 8,
+ open: edge_open,
+ close: edge_close,
+ throttle: edge_throttle,
+ unthrottle: edge_unthrottle,
+ startup: edge_startup,
+ shutdown: edge_shutdown,
+ ioctl: edge_ioctl,
+ set_termios: edge_set_termios,
+ write: edge_write,
+ write_room: edge_write_room,
+ chars_in_buffer: edge_chars_in_buffer,
+ break_ctl: edge_break,
+};
+
+
+
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_usbvend.h linux/drivers/usb/serial/io_usbvend.h
--- v2.2.19/drivers/usb/serial/io_usbvend.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_usbvend.h Wed Oct 10 01:41:31 2001
@@ -0,0 +1,374 @@
+/************************************************************************
+ *
+ * USBVEND.H Vendor-specific USB definitions
+ *
+ * NOTE: This must be kept in sync with the Edgeport firmware and
+ * must be kept backward-compatible with older firmware.
+ *
+ ************************************************************************
+ *
+ * Copyright (c) 1998 Inside Out Networks, Inc.


+ * 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.
+ *

+ ************************************************************************/
+
+#if !defined(_USBVEND_H)
+#define _USBVEND_H
+
+#ifndef __KERNEL__
+#include "ionprag.h" /* Extra I/O Networks pragmas */
+
+#include <usbdi.h>
+
+#include "iondef.h" /* Standard I/O Networks definitions */
+#endif
+
+/************************************************************************
+ *
+ * D e f i n e s / T y p e d e f s


+ *
+ ************************************************************************/
+

+//
+// Definitions of USB product IDs
+//
+
+#define USB_VENDOR_ID_ION 0x1608 // Our VID
+
+//
+// Definitions of USB product IDs (PID)
+// We break the USB-defined PID into an OEM Id field (upper 6 bits)
+// and a Device Id (bottom 10 bits). The Device Id defines what
+// device this actually is regardless of what the OEM wants to
+// call it.
+//
+
+// ION-device OEM IDs
+#define ION_OEM_ID_ION 0 // 00h Inside Out Networks
+#define ION_OEM_ID_NLYNX 1 // 01h NLynx Systems
+#define ION_OEM_ID_GENERIC 2 // 02h Generic OEM
+#define ION_OEM_ID_MAC 3 // 03h Mac Version
+#define ION_OEM_ID_MEGAWOLF 4 // 04h Lupusb OEM Mac version (MegaWolf)
+#define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports
+
+
+// ION-device Device IDs
+// Product IDs - assigned to match middle digit of serial number
+
+
+// The ION_DEVICE_ID_GENERATION_2 bit (0x20) will be ORed into the existing edgeport
+// PIDs to identify 80251+Netchip hardware. This will guarantee that if a second
+// generation edgeport device is plugged into a PC with an older (pre 2.0) driver,
+// it will not enumerate.
+
+#define ION_DEVICE_ID_GENERATION_2 0x020 // This bit is set in the PID if this edgeport hardware
+ // is based on the 80251+Netchip.
+
+#define EDGEPORT_DEVICE_ID_MASK 0x3df // Not including GEN_2 bit
+
+#define ION_DEVICE_ID_UNCONFIGURED_EDGE_DEVICE 0x000 // In manufacturing only
+#define ION_DEVICE_ID_EDGEPORT_4 0x001 // Edgeport/4 RS232
+// ION_DEVICE_ID_HUBPORT_7 0x002 // Hubport/7 (Placeholder, not used by software)
+#define ION_DEVICE_ID_RAPIDPORT_4 0x003 // Rapidport/4
+#define ION_DEVICE_ID_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport")
+#define ION_DEVICE_ID_EDGEPORT_2 0x005 // Edgeport/2 RS232
+#define ION_DEVICE_ID_EDGEPORT_4I 0x006 // Edgeport/4 RS422
+#define ION_DEVICE_ID_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485
+// ION_DEVICE_ID_HUBPORT_4 0x008 // Hubport/4 (Placeholder, not used by software)
+// ION_DEVICE_ID_EDGEPORT_8_HANDBUILT 0x009 // Hand-built Edgeport/8 (Placeholder, used in middle digit of serial number only!)
+// ION_DEVICE_ID_MULTIMODEM_4X56 0x00A // MultiTech version of RP/4 (Placeholder, used in middle digit of serial number only!)
+#define ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT 0x00B // Edgeport/(4)21 Parallel port (USS720)
+#define ION_DEVICE_ID_EDGEPORT_421 0x00C // Edgeport/421 Hub+RS232+Parallel
+#define ION_DEVICE_ID_EDGEPORT_21 0x00D // Edgeport/21 RS232+Parallel
+#define ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU 0x00E // Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB)
+#define ION_DEVICE_ID_EDGEPORT_8 0x00F // Edgeport/8 (single-CPU)
+#define ION_DEVICE_ID_EDGEPORT_2_DIN 0x010 // Edgeport/2 RS232 with Apple DIN connector
+#define ION_DEVICE_ID_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector
+#define ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s)
+#define ION_DEVICE_ID_EDGEPORT_COMPATIBLE 0x013 // Edgeport Compatible, for NCR, Axiohm etc. testing
+#define ION_DEVICE_ID_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU)
+
+// These IDs are used by the Edgeport.exe program for uninstalling.
+//
+#define EDGEPORT_DEVICE_IDS {0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \
+ 0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \
+ 0x013, 0x014 }
+
+
+#define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \
+ ( (__u16) (((OemId) << 10) || (DeviceId)) )
+
+#define DEVICE_ID_FROM_USB_PRODUCT_ID( ProductId ) \
+ ( (__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK)) )
+
+#define OEM_ID_FROM_USB_PRODUCT_ID( ProductId ) \
+ ( (__u16) (((ProductId) >> 10) & 0x3F) )
+
+//
+// Definitions of parameters for download code. Note that these are
+// specific to a given version of download code and must change if the
+// corresponding download code changes.
+//
+
+// TxCredits value below which driver won't bother sending (to prevent too many small writes).
+// Send only if above 25%
+#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit) (max( ((InitialCredit) / 4), EDGE_FW_BULK_MAX_PACKET_SIZE ))
+
+#define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1)
+#define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads
+
+#define EDGE_FW_INT_MAX_PACKET_SIZE 32 // Max Packet Size for Interrupt In Endpoint
+ // Note that many units were shipped with MPS=16, we
+ // force an upgrade to this value).
+#define EDGE_FW_INT_INTERVAL 2 // 2ms polling on IntPipe
+
+
+//
+// Definitions of I/O Networks vendor-specific requests
+// for default endpoint
+//
+// bmRequestType = 00100000 Set vendor-specific, to device
+// bmRequestType = 10100000 Get vendor-specific, to device
+//
+// These are the definitions for the bRequest field for the
+// above bmRequestTypes.
+//
+// For the read/write Edgeport memory commands, the parameters
+// are as follows:
+// wValue = 16-bit address
+// wIndex = unused (though we could put segment 00: or FF: here)
+// wLength = # bytes to read/write (max 64)
+//
+
+#define USB_REQUEST_ION_RESET_DEVICE 0 // Warm reboot Edgeport, retaining USB address
+#define USB_REQUEST_ION_GET_EPIC_DESC 1 // Get Edgeport Compatibility Descriptor
+// unused 2 // Unused, available
+#define USB_REQUEST_ION_READ_RAM 3 // Read EdgePort RAM at specified addr
+#define USB_REQUEST_ION_WRITE_RAM 4 // Write EdgePort RAM at specified addr
+#define USB_REQUEST_ION_READ_ROM 5 // Read EdgePort ROM at specified addr
+#define USB_REQUEST_ION_WRITE_ROM 6 // Write EdgePort ROM at specified addr
+#define USB_REQUEST_ION_EXEC_DL_CODE 7 // Begin execution of RAM-based download
+ // code by jumping to address in wIndex:wValue
+// 8 // Unused, available
+#define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature
+ // (wValue != 0: Enable; wValue = 0: Disable)
+
+
+//
+// Define parameter values for our vendor-specific commands
+//
+
+
+// Values for iDownloadFile
+#define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested
+#define EDGE_DOWNLOAD_FILE_INTERNAL 0xFF // Download the file compiled into driver (930 version)
+#define EDGE_DOWNLOAD_FILE_I930 0xFF // Download the file compiled into driver (930 version)
+#define EDGE_DOWNLOAD_FILE_80251 0xFE // Download the file compiled into driver (80251 version)
+
+
+
+/*
+ * Special addresses for READ/WRITE_RAM/ROM
+ */
+
+// Version 1 (original) format of DeviceParams
+#define EDGE_MANUF_DESC_ADDR_V1 0x00FF7F00
+#define EDGE_MANUF_DESC_LEN_V1 sizeof(EDGE_MANUF_DESCRIPTOR_V1)
+
+// Version 2 format of DeviceParams. This format is longer (3C0h)
+// and starts lower in memory, at the uppermost 1K in ROM.
+#define EDGE_MANUF_DESC_ADDR 0x00FF7C00
+#define EDGE_MANUF_DESC_LEN sizeof(EDGE_MANUF_DESCRIPTOR)
+
+// Boot params descriptor
+#define EDGE_BOOT_DESC_ADDR 0x00FF7FC0
+#define EDGE_BOOT_DESC_LEN sizeof(EDGE_BOOT_DESCRIPTOR)
+
+// Define the max block size that may be read or written
+// in a read/write RAM/ROM command.
+#define MAX_SIZE_REQ_ION_READ_MEM ( (__u16) 64 )
+#define MAX_SIZE_REQ_ION_WRITE_MEM ( (__u16) 64 )
+
+
+//
+// Notes for the following two ION vendor-specific param descriptors:
+//
+// 1. These have a standard USB descriptor header so they look like a
+// normal descriptor.
+// 2. Any strings in the structures are in USB-defined string
+// descriptor format, so that they may be separately retrieved,
+// if necessary, with a minimum of work on the 930. This also
+// requires them to be in UNICODE format, which, for English at
+// least, simply means extending each UCHAR into a USHORT.
+// 3. For all fields, 00 means 'uninitialized'.
+// 4. All unused areas should be set to 00 for future expansion.
+//
+
+// This structure is ver 2 format. It contains ALL USB descriptors as
+// well as the configuration parameters that were in the original V1
+// structure. It is NOT modified when new boot code is downloaded; rather,
+// these values are set or modified by manufacturing. It is located at
+// xC00-xFBF (length 3C0h) in the ROM.
+// This structure is a superset of the v1 structure and is arranged so
+// that all of the v1 fields remain at the same address. We are just
+// adding more room to the front of the structure to hold the descriptors.
+//
+// The actual contents of this structure are defined in a 930 assembly
+// file, converted to a binary image, and then written by the serialization
+// program. The C definition of this structure just defines a dummy
+// area for general USB descriptors and the descriptor tables (the root
+// descriptor starts at xC00). At the bottom of the structure are the
+// fields inherited from the v1 structure.
+
+#define MAX_SERIALNUMBER_LEN 12
+#define MAX_ASSEMBLYNUMBER_LEN 14
+
+typedef struct _EDGE_MANUF_DESCRIPTOR {
+
+ __u16 RootDescTable[0x10]; // C00 Root of descriptor tables (just a placeholder)
+ __u8 DescriptorArea[0x2E0]; // C20 Descriptors go here, up to 2E0h (just a placeholder)
+
+ // Start of v1-compatible section
+ __u8 Length; // F00 Desc length for what follows, per USB (= C0h )
+ __u8 DescType; // F01 Desc type, per USB (=DEVICE type)
+ __u8 DescVer; // F02 Desc version/format (currently 2)
+ __u8 NumRootDescEntries; // F03 # entries in RootDescTable
+
+ __u8 RomSize; // F04 Size of ROM/E2PROM in K
+ __u8 RamSize; // F05 Size of external RAM in K
+ __u8 CpuRev; // F06 CPU revision level (chg only if s/w visible)
+ __u8 BoardRev; // F07 PCB revision level (chg only if s/w visible)
+
+ __u8 NumPorts; // F08 Number of ports
+ __u8 DescDate[3]; // F09 MM/DD/YY when descriptor template was compiler,
+ // so host can track changes to USB-only descriptors.
+
+ __u8 SerNumLength; // F0C USB string descriptor len
+ __u8 SerNumDescType; // F0D USB descriptor type (=STRING type)
+ __u16 SerialNumber[MAX_SERIALNUMBER_LEN]; // F0E "01-01-000100" Unicode Serial Number
+
+ __u8 AssemblyNumLength; // F26 USB string descriptor len
+ __u8 AssemblyNumDescType; // F27 USB descriptor type (=STRING type)
+ __u16 AssemblyNumber[MAX_ASSEMBLYNUMBER_LEN]; // F28 "350-1000-01-A " assembly number
+
+ __u8 OemAssyNumLength; // F44 USB string descriptor len
+ __u8 OemAssyNumDescType; // F45 USB descriptor type (=STRING type)
+ __u16 OemAssyNumber[MAX_ASSEMBLYNUMBER_LEN]; // F46 "xxxxxxxxxxxxxx" OEM assembly number
+
+ __u8 ManufDateLength; // F62 USB string descriptor len
+ __u8 ManufDateDescType; // F63 USB descriptor type (=STRING type)
+ __u16 ManufDate[6]; // F64 "MMDDYY" manufacturing date
+
+ __u8 Reserved3[0x4D]; // F70 -- unused, set to 0 --
+
+ __u8 UartType; // FBD Uart Type
+ __u8 IonPid; // FBE Product ID, == LSB of USB DevDesc.PID
+ // (Note: Edgeport/4s before 11/98 will have
+ // 00 here instead of 01)
+ __u8 IonConfig; // FBF Config byte for ION manufacturing use
+ // FBF end of structure, total len = 3C0h
+
+} EDGE_MANUF_DESCRIPTOR, *PEDGE_MANUF_DESCRIPTOR;
+
+
+#define MANUF_DESC_VER_1 1 // Original definition of MANUF_DESC
+#define MANUF_DESC_VER_2 2 // Ver 2, starts at xC00h len 3C0h
+
+
+// Uart Types
+// Note: Since this field was added only recently, all Edgeport/4 units
+// shipped before 11/98 will have 00 in this field. Therefore,
+// both 00 and 01 values mean '654.
+#define MANUF_UART_EXAR_654_EARLY 0 // Exar 16C654 in Edgeport/4s before 11/98
+#define MANUF_UART_EXAR_654 1 // Exar 16C654
+#define MANUF_UART_EXAR_2852 2 // Exar 16C2852
+
+//
+// Note: The CpuRev and BoardRev values do not conform to manufacturing
+// revisions; they are to be incremented only when the CPU or hardware
+// changes in a software-visible way, such that the 930 software or
+// the host driver needs to handle the hardware differently.
+//
+
+// Values of bottom 5 bits of CpuRev & BoardRev for
+// Implementation 0 (ie, 930-based)
+#define MANUF_CPU_REV_AD4 1 // 930 AD4, with EP1 Rx bug (needs RXSPM)
+#define MANUF_CPU_REV_AD5 2 // 930 AD5, with above bug (supposedly) fixed
+#define MANUF_CPU_80251 0x20 // Intel 80251
+
+
+#define MANUF_BOARD_REV_A 1 // Original version, == Manuf Rev A
+#define MANUF_BOARD_REV_B 2 // Manuf Rev B, wakeup interrupt works
+#define MANUF_BOARD_REV_C 3 // Manuf Rev C, 2/4 ports, rs232/rs422
+#define MANUF_BOARD_REV_GENERATION_2 0x20 // Second generaiton edgeport
+
+
+
+
+// Values of bottom 5 bits of CpuRev & BoardRev for
+// Implementation 1 (ie, 251+Netchip-based)
+#define MANUF_CPU_REV_1 1 // C251TB Rev 1 (Need actual Intel rev here)
+
+#define MANUF_BOARD_REV_A 1 // First rev of 251+Netchip design
+
+
+
+#define MANUF_SERNUM_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->SerialNumber)
+#define MANUF_ASSYNUM_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->AssemblyNumber)
+#define MANUF_OEMASSYNUM_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->OemAssyNumber)
+#define MANUF_MANUFDATE_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->ManufDate)
+
+#define MANUF_ION_CONFIG_MASTER 0x80 // 1=Master mode, 0=Normal
+#define MANUF_ION_CONFIG_DIAG 0x40 // 1=Run h/w diags, 0=norm
+#define MANUF_ION_CONFIG_DIAG_NO_LOOP 0x20 // As above but no ext loopback test
+
+
+//
+// This structure describes parameters for the boot code, and
+// is programmed along with new boot code. These are values
+// which are specific to a given build of the boot code. It
+// is exactly 64 bytes long and is fixed at address FF:xFC0
+// - FF:xFFF. Note that the 930-mandated UCONFIG bytes are
+// included in this structure.
+//
+typedef struct _EDGE_BOOT_DESCRIPTOR {
+ __u8 Length; // C0 Desc length, per USB (= 40h)
+ __u8 DescType; // C1 Desc type, per USB (= DEVICE type)
+ __u8 DescVer; // C2 Desc version/format
+ __u8 Reserved1; // C3 -- unused, set to 0 --
+
+ __u16 BootCodeLength; // C4 Boot code goes from FF:0000 to FF:(len-1)
+ // (LE format)
+
+ __u8 MajorVersion; // C6 Firmware version: xx.
+ __u8 MinorVersion; // C7 yy.
+ __u16 BuildNumber; // C8 zzzz (LE format)
+
+ __u16 EnumRootDescTable; // CA Root of ROM-based descriptor table
+ __u8 NumDescTypes; // CC Number of supported descriptor types
+
+ __u8 Reserved4; // CD Fix Compiler Packing
+
+ __u16 Capabilities; // CE-CF Capabilities flags (LE format)
+ __u8 Reserved2[0x28]; // D0 -- unused, set to 0 --
+ __u8 UConfig0; // F8 930-defined CPU configuration byte 0
+ __u8 UConfig1; // F9 930-defined CPU configuration byte 1
+ __u8 Reserved3[6]; // FA -- unused, set to 0 --
+ // FF end of structure, total len = 80
+
+} EDGE_BOOT_DESCRIPTOR, *PEDGE_BOOT_DESCRIPTOR;
+
+
+#define BOOT_DESC_VER_1 1 // Original definition of BOOT_PARAMS
+#define BOOT_DESC_VER_2 2 // 2nd definition, descriptors not included in boot
+
+
+ // Capabilities flags
+
+#define BOOT_CAP_RESET_CMD 0x0001 // If set, boot correctly supports ION_RESET_DEVICE
+
+#endif // if !defined()
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/keyspan.c linux/drivers/usb/serial/keyspan.c
--- v2.2.19/drivers/usb/serial/keyspan.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/keyspan.c Wed Oct 10 01:41:31 2001
@@ -28,6 +28,9 @@
X open source projects.
X
X Change History
+ (04/08/2001) gb
+ Identify version on module load.
+
X Tue Oct 10 23:15:33 EST 2000 Hugh
X Merged Paul's changes with my USA-49W mods. Work in progress
X still...
@@ -46,6 +49,7 @@
X */
X

X
+#include <linux/config.h>
X #include <linux/kernel.h>
X #include <linux/sched.h>
X #include <linux/signal.h>

@@ -59,16 +63,24 @@
X #include <linux/tty_flip.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>
-
-#define DEBUG
-/* #ifdef CONFIG_USB_SERIAL_DEBUG */
- #define DEBUG
-/* #endif */
X #include <linux/usb.h>
X
+#ifdef CONFIG_USB_SERIAL_DEBUG
+ static int debug = 1;
+#else
+ static int debug;
+#endif
+
X #include "usb-serial.h"
X #include "keyspan.h"


X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Hugh Blemings <hu...@linuxcare.com>"
+#define DRIVER_DESC "Keyspan USB to Serial Converter Driver"
+
X #define INSTAT_BUFLEN 32
X #define GLOCONT_BUFLEN 64
X
@@ -161,6 +173,9 @@
X usb_serial_register (&keyspan_usa28_device);
X usb_serial_register (&keyspan_usa28x_device);
X usb_serial_register (&keyspan_usa49w_device);


+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+

X return 0;
X }
X

@@ -1282,7 +1297,21 @@
X msg.setPrescaler = 0xff;
X }
X
- msg.lcr = USA_DATABITS_8 | STOPBITS_5678_1;
+ msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1;
+ switch (p_priv->cflag & CSIZE) {
+ case CS5:
+ msg.lcr |= USA_DATABITS_5;
+ break;
+ case CS6:
+ msg.lcr |= USA_DATABITS_6;
+ break;
+ case CS7:
+ msg.lcr |= USA_DATABITS_7;
+ break;
+ case CS8:
+ msg.lcr |= USA_DATABITS_8;
+ break;
+ }
X if (p_priv->cflag & PARENB) {
X /* note USA_PARITY_NONE == 0 */
X msg.lcr |= (p_priv->cflag & PARODD)?
@@ -1475,7 +1504,21 @@
X //msg.setPrescaler = 0xff;
X }
X
- msg.lcr = USA_DATABITS_8 | STOPBITS_5678_1;
+ msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1;
+ switch (p_priv->cflag & CSIZE) {
+ case CS5:
+ msg.lcr |= USA_DATABITS_5;
+ break;
+ case CS6:
+ msg.lcr |= USA_DATABITS_6;
+ break;
+ case CS7:
+ msg.lcr |= USA_DATABITS_7;
+ break;
+ case CS8:
+ msg.lcr |= USA_DATABITS_8;
+ break;
+ }
X if (p_priv->cflag & PARENB) {
X /* note USA_PARITY_NONE == 0 */
X msg.lcr |= (p_priv->cflag & PARODD)?
@@ -1668,3 +1711,10 @@
X kfree(port->private);
X }
X }
+


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");

+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/keyspan_pda.c linux/drivers/usb/serial/keyspan_pda.c
--- v2.2.19/drivers/usb/serial/keyspan_pda.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/keyspan_pda.c Wed Oct 10 01:41:32 2001
@@ -12,6 +12,13 @@
X *
X * See Documentation/usb/usb-serial.txt for more information on using this driver
X *
+ * (04/08/2001) gb


+ * Identify version on module load.
+ *

+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
X * (08/28/2000) gkh
X * Added locks for SMP safeness.
X * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more
@@ -54,19 +61,20 @@
X #include <linux/init.h>
X #include <linux/malloc.h>


X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>

X #include <linux/spinlock.h>
X #include <linux/tqueue.h>
+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>
+
X
X struct ezusb_hex_record {
X __u16 address;
@@ -75,9 +83,15 @@
X };
X
X #include "keyspan_pda_fw.h"
-
X #include "usb-serial.h"


X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Brian Warner <war...@lothar.com>"
+#define DRIVER_DESC "USB Keyspan PDA Converter driver"
+
X struct keyspan_pda_private {
X int tx_room;
X int tx_throttled;
@@ -112,7 +126,7 @@
X /* wake up other tty processes */
X wake_up_interruptible( &tty->write_wait );
X /* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
-
+ MOD_DEC_USE_COUNT;
X }
X
X static void keyspan_pda_request_unthrottle( struct usb_serial *serial )
@@ -131,7 +145,7 @@
X NULL,
X 0,
X 2*HZ);
-
+ MOD_DEC_USE_COUNT;
X }
X
X
@@ -180,7 +194,9 @@
X tty = serial->port[0].tty;
X priv->tx_throttled = 0;
X /* queue up a wakeup at scheduler time */
- queue_task( &priv->wakeup_task, &tq_scheduler );
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&priv->wakeup_task) == 0)
+ MOD_DEC_USE_COUNT;
X break;
X default:
X break;
@@ -212,6 +228,7 @@
X {
X /* just restart the receive interrupt URB */
X dbg("keyspan_pda_rx_unthrottle port %d", port->number);
+ port->interrupt_in_urb->dev = port->serial->dev;
X if (usb_submit_urb(port->interrupt_in_urb))
X dbg(" usb_submit_urb(read urb) failed");
X return;
@@ -506,6 +523,7 @@
X
X priv->tx_room -= count;
X
+ port->write_urb->dev = port->serial->dev;
X if (usb_submit_urb(port->write_urb)) {


X dbg(" usb_submit_urb(write bulk) failed");

X spin_unlock_irqrestore (&port->port_lock, flags);
@@ -520,7 +538,9 @@
X
X if (request_unthrottle) {
X priv->tx_throttled = 1; /* block writers */
- queue_task( &priv->unthrottle_task, &tq_scheduler );
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&priv->unthrottle_task) == 0)
+ MOD_DEC_USE_COUNT;
X }
X
X spin_unlock_irqrestore (&port->port_lock, flags);
@@ -546,8 +566,9 @@
X }
X
X /* queue up a wakeup at scheduler time */
- queue_task( &priv->wakeup_task, &tq_scheduler );
-
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&priv->wakeup_task) == 0)
+ MOD_DEC_USE_COUNT;
X }
X
X
@@ -627,6 +648,7 @@
X keyspan_pda_set_modem_info(serial, 0);
X
X /*Start reading from the device*/
+ port->interrupt_in_urb->dev = serial->dev;
X if (usb_submit_urb(port->interrupt_in_urb))
X dbg(__FUNCTION__" - usb_submit_urb(read int) failed");
X } else {
@@ -783,6 +805,7 @@
X {
X usb_serial_register (&keyspan_pda_fake_device);
X usb_serial_register (&keyspan_pda_device);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


X return 0;
X }
X

@@ -797,5 +820,9 @@
X module_init(keyspan_pda_init);
X module_exit(keyspan_pda_exit);
X
-MODULE_AUTHOR("Brian Warner <war...@lothar.com>");
-MODULE_DESCRIPTION("USB Keyspan PDA Converter driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");

+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/keyspan_pda_fw.h linux/drivers/usb/serial/keyspan_pda_fw.h
--- v2.2.19/drivers/usb/serial/keyspan_pda_fw.h Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/keyspan_pda_fw.h Wed Oct 10 01:41:32 2001
@@ -1,9 +1,15 @@
X /*
- * keyspan_pda_fw.h
+ * USB Keyspan PDA Firmware
+ *
+ * Copyright (c) 1999, 2000 Brian Warner <war...@lothar.com>


+ *
+ * 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.

X *
X * Generated from keyspan_pda.s by ezusb_convert.pl
- * This file is presumed to be under the same copyright as the source file
- * from which it was derived.
+ *
X */
X
X static const struct ezusb_hex_record keyspan_pda_firmware[] = {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/mct_u232.c linux/drivers/usb/serial/mct_u232.c
--- v2.2.19/drivers/usb/serial/mct_u232.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/mct_u232.c Wed Oct 10 01:41:32 2001
@@ -0,0 +1,883 @@
+/*
+ * MCT (Magic Control Technology Corp.) USB RS232 Converter Driver
+ *
+ * Copyright (C) 2000 Wolfgang Grandegger (wolf...@ces.ch)


+ *
+ * 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.
+ *

+ * This program is largely derived from the Belkin USB Serial Adapter Driver
+ * (see belkin_sa.[ch]). All of the information about the device was acquired
+ * by using SniffUSB on Windows98. For technical details see mct_u232.h.
+ *
+ * William G. Greathouse and Greg Kroah-Hartman provided great help on how to
+ * do the reverse engineering and how to write a USB serial device driver.
+ *
+ * TO BE DONE, TO BE CHECKED:
+ * DTR/RTS signal handling may be incomplete or incorrect. I have mainly
+ * implemented what I have seen with SniffUSB or found in belkin_sa.c.
+ * For further TODOs check also belkin_sa.c.
+ *
+ * TEST STATUS:
+ * Basic tests have been performed with minicom/zmodem transfers and
+ * modem dialing under Linux 2.4.0-test10 (for me it works fine).
+ *
+ * 04-May-2001 Stelian Pop
+ * - Set the maximum bulk output size for Sitecom U232-P25 model to 16 bytes
+ * instead of the device reported 32 (using 32 bytes causes many data
+ * loss, Windows driver uses 16 too).
+ *
+ * 02-May-2001 Stelian Pop
+ * - Fixed the baud calculation for Sitecom U232-P25 model
+ *
+ * 08-Apr-2001 gb
+ * - Identify version on module load.
+ *
+ * 06-Jan-2001 Cornel Ciocirlan
+ * - Added support for Sitecom U232-P25 model (Product Id 0x0230)
+ * - Added support for D-Link DU-H3SP USB BAY (Product Id 0x0200)
+ *
+ * 29-Nov-2000 Greg Kroah-Hartman
+ * - Added device id table to fit with 2.4.0-test11 structure.
+ * - took out DEAL_WITH_TWO_INT_IN_ENDPOINTS #define as it's not needed
+ * (lots of things will change if/when the usb-serial core changes to
+ * handle these issues.
+ *
+ * 27-Nov-2000 Wolfgang Grandegger
+ * A version for kernel 2.4.0-test10 released to the Linux community
+ * (via linux-usb-devel).
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/fcntl.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/usb.h>
+
+#ifdef CONFIG_USB_SERIAL_DEBUG
+ static int debug = 1;
+#else
+ static int debug;
+#endif
+
+#include "usb-serial.h"
+#include "mct_u232.h"
+
+
+/*


+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Wolfgang Grandegger <wolf...@ces.ch>"
+#define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
+
+/*
+ * Some not properly written applications do not handle the return code of
+ * write() correctly. This can result in character losses. A work-a-round
+ * can be compiled in with the following definition. This work-a-round
+ * should _NOT_ be part of an 'official' kernel release, of course!
+ */
+#undef FIX_WRITE_RETURN_CODE_PROBLEM
+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+static int write_blocking = 0; /* disabled by default */
+#endif
+
+/*
+ * Function prototypes
+ */
+static int mct_u232_startup (struct usb_serial *serial);
+static void mct_u232_shutdown (struct usb_serial *serial);
+static int mct_u232_open (struct usb_serial_port *port,
+ struct file *filp);
+static void mct_u232_close (struct usb_serial_port *port,
+ struct file *filp);
+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+static int mct_u232_write (struct usb_serial_port *port,
+ int from_user,
+ const unsigned char *buf,
+ int count);
+static void mct_u232_write_bulk_callback (struct urb *urb);
+#endif
+static void mct_u232_read_int_callback (struct urb *urb);
+static void mct_u232_set_termios (struct usb_serial_port *port,
+ struct termios * old);
+static int mct_u232_ioctl (struct usb_serial_port *port,
+ struct file * file,
+ unsigned int cmd,
+ unsigned long arg);
+static void mct_u232_break_ctl (struct usb_serial_port *port,
+ int break_state );
+
+/*
+ * All of the device info needed for the MCT USB-RS232 converter.
+ */
+static __u16 mct_u232_vendor_id = MCT_U232_VID;
+static __u16 mct_u232_product_id = MCT_U232_PID;
+static __u16 mct_u232_sitecom_id = MCT_U232_SITECOM_PID;
+static __u16 mct_u232_du_h3sp_id = MCT_U232_DU_H3SP_PID;
+
+struct usb_serial_device_type mct_u232_device = {
+ name: "Magic Control Technology USB-RS232",
+ idVendor: &mct_u232_vendor_id,
+ idProduct: &mct_u232_product_id,
+ needs_interrupt_in: MUST_HAVE, /* 2 interrupt-in endpoints */
+ needs_bulk_in: MUST_HAVE_NOT, /* no bulk-in endpoint */
+ needs_bulk_out: MUST_HAVE, /* 1 bulk-out endpoint */
+ num_interrupt_in: 2,
+ num_bulk_in: 0,
+ num_bulk_out: 1,
+ num_ports: 1,
+ open: mct_u232_open,
+ close: mct_u232_close,
+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+ write: mct_u232_write,
+ write_bulk_callback: mct_u232_write_bulk_callback,
+#endif
+ read_int_callback: mct_u232_read_int_callback,
+ ioctl: mct_u232_ioctl,
+ set_termios: mct_u232_set_termios,
+ break_ctl: mct_u232_break_ctl,
+ startup: mct_u232_startup,
+ shutdown: mct_u232_shutdown,
+};
+
+struct usb_serial_device_type mct_u232_sitecom_device = {
+ name: "MCT/Sitecom USB-RS232",
+ idVendor: &mct_u232_vendor_id,
+ idProduct: &mct_u232_sitecom_id,
+ needs_interrupt_in: MUST_HAVE, /* 2 interrupt-in endpoints */
+ needs_bulk_in: MUST_HAVE_NOT, /* no bulk-in endpoint */
+ needs_bulk_out: MUST_HAVE, /* 1 bulk-out endpoint */
+ num_interrupt_in: 2,
+ num_bulk_in: 0,
+ num_bulk_out: 1,
+ num_ports: 1,
+ open: mct_u232_open,
+ close: mct_u232_close,
+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+ write: mct_u232_write,
+ write_bulk_callback: mct_u232_write_bulk_callback,
+#endif
+ read_int_callback: mct_u232_read_int_callback,
+ ioctl: mct_u232_ioctl,
+ set_termios: mct_u232_set_termios,
+ break_ctl: mct_u232_break_ctl,
+ startup: mct_u232_startup,
+ shutdown: mct_u232_shutdown,
+};
+
+struct usb_serial_device_type mct_u232_du_h3sp_device = {
+ name: "MCT/D-Link DU-H3SP USB BAY",
+ idVendor: &mct_u232_vendor_id,
+ idProduct: &mct_u232_du_h3sp_id,
+ needs_interrupt_in: MUST_HAVE, /* 2 interrupt-in endpoints */
+ needs_bulk_in: MUST_HAVE_NOT, /* no bulk-in endpoint */
+ needs_bulk_out: MUST_HAVE, /* 1 bulk-out endpoint */
+ num_interrupt_in: 2,
+ num_bulk_in: 0,
+ num_bulk_out: 1,
+ num_ports: 1,
+ open: mct_u232_open,
+ close: mct_u232_close,
+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+ write: mct_u232_write,
+ write_bulk_callback: mct_u232_write_bulk_callback,
+#endif
+ read_int_callback: mct_u232_read_int_callback,
+ ioctl: mct_u232_ioctl,
+ set_termios: mct_u232_set_termios,
+ break_ctl: mct_u232_break_ctl,
+ startup: mct_u232_startup,
+ shutdown: mct_u232_shutdown,


+};
+
+
+
+

+struct mct_u232_private {
+ unsigned long control_state; /* Modem Line Setting (TIOCM) */
+ unsigned char last_lcr; /* Line Control Register */
+ unsigned char last_lsr; /* Line Status Register */
+ unsigned char last_msr; /* Modem Status Register */
+};
+
+/*
+ * Handle vendor specific USB requests
+ */
+
+#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
+
+static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value) {
+ if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID) {
+ switch (value) {
+ case 300: return 0x01;
+ case 600: return 0x02; /* this one not tested */
+ case 1200: return 0x03;
+ case 2400: return 0x04;
+ case 4800: return 0x06;
+ case 9600: return 0x08;
+ case 19200: return 0x09;
+ case 38400: return 0x0a;
+ case 57600: return 0x0b;
+ case 115200: return 0x0c;
+ default: return -1; /* normally not reached */
+ }
+ }
+ else
+ return MCT_U232_BAUD_RATE(value);
+}
+
+static int mct_u232_set_baud_rate(struct usb_serial *serial, int value)
+{
+ unsigned int divisor;
+ int rc;
+ divisor = mct_u232_calculate_baud_rate(serial, value);
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_BAUD_RATE_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Set BAUD RATE %d failed (error = %d)", value, rc);
+ dbg("set_baud_rate: value: %d, divisor: 0x%x", value, divisor);
+ return rc;
+} /* mct_u232_set_baud_rate */
+
+static int mct_u232_set_line_ctrl(struct usb_serial *serial, unsigned char lcr)
+{
+ int rc;
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_LINE_CTRL_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Set LINE CTRL 0x%x failed (error = %d)", lcr, rc);
+ dbg("set_line_ctrl: 0x%x", lcr);
+ return rc;
+} /* mct_u232_set_line_ctrl */
+
+static int mct_u232_set_modem_ctrl(struct usb_serial *serial,
+ unsigned long control_state)
+{
+ int rc;
+ unsigned char mcr = MCT_U232_MCR_NONE;
+
+ if (control_state & TIOCM_DTR)
+ mcr |= MCT_U232_MCR_DTR;
+ if (control_state & TIOCM_RTS)
+ mcr |= MCT_U232_MCR_RTS;
+
+ rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ MCT_U232_SET_MODEM_CTRL_REQUEST,
+ MCT_U232_SET_REQUEST_TYPE,
+ 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0)
+ err("Set MODEM CTRL 0x%x failed (error = %d)", mcr, rc);
+ dbg("set_modem_ctrl: state=0x%lx ==> mcr=0x%x", control_state, mcr);
+
+ return rc;
+} /* mct_u232_set_modem_ctrl */
+
+static int mct_u232_get_modem_stat(struct usb_serial *serial, unsigned char *msr)
+{
+ int rc;
+ rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+ MCT_U232_GET_MODEM_STAT_REQUEST,
+ MCT_U232_GET_REQUEST_TYPE,
+ 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE,
+ WDR_TIMEOUT);
+ if (rc < 0) {
+ err("Get MODEM STATus failed (error = %d)", rc);
+ *msr = 0;
+ }
+ dbg("get_modem_stat: 0x%x", *msr);
+ return rc;
+} /* mct_u232_get_modem_stat */
+
+static void mct_u232_msr_to_state(unsigned long *control_state, unsigned char msr)
+{
+ /* Translate Control Line states */
+ if (msr & MCT_U232_MSR_DSR)
+ *control_state |= TIOCM_DSR;
+ else
+ *control_state &= ~TIOCM_DSR;
+ if (msr & MCT_U232_MSR_CTS)
+ *control_state |= TIOCM_CTS;
+ else
+ *control_state &= ~TIOCM_CTS;
+ if (msr & MCT_U232_MSR_RI)
+ *control_state |= TIOCM_RI;
+ else
+ *control_state &= ~TIOCM_RI;
+ if (msr & MCT_U232_MSR_CD)
+ *control_state |= TIOCM_CD;
+ else
+ *control_state &= ~TIOCM_CD;
+ dbg("msr_to_state: msr=0x%x ==> state=0x%lx", msr, *control_state);
+} /* mct_u232_msr_to_state */
+
+/*
+ * Driver's tty interface functions
+ */
+
+static int mct_u232_startup (struct usb_serial *serial)
+{
+ struct mct_u232_private *priv;
+
+ /* allocate the private data structure */
+ serial->port->private = kmalloc(sizeof(struct mct_u232_private),
+ GFP_KERNEL);
+ if (!serial->port->private)
+ return (-1); /* error */
+ priv = (struct mct_u232_private *)serial->port->private;
+ /* set initial values for control structures */
+ priv->control_state = 0;
+ priv->last_lsr = 0;
+ priv->last_msr = 0;
+
+ init_waitqueue_head(&serial->port->write_wait);
+
+ return (0);
+} /* mct_u232_startup */
+
+
+static void mct_u232_shutdown (struct usb_serial *serial)
+{
+ int i;
+

+ dbg (__FUNCTION__);
+
+ /* stop reads and writes on all ports */
+ for (i=0; i < serial->num_ports; ++i) {
+ while (serial->port[i].open_count > 0) {

+ mct_u232_close (&serial->port[i], NULL);
+ }
+ /* My special items, the standard routines free my urbs */
+ if (serial->port[i].private)
+ kfree(serial->port[i].private);
+ }
+} /* mct_u232_shutdown */
+
+static int mct_u232_open (struct usb_serial_port *port, struct file *filp)
+{
+ unsigned long flags;
+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
+
+ dbg(__FUNCTION__" port %d", port->number);
+
+ spin_lock_irqsave (&port->port_lock, flags);


+
+ ++port->open_count;
+ MOD_INC_USE_COUNT;
+
+ if (!port->active) {
+ port->active = 1;
+

+ /* Compensate for a hardware bug: although the Sitecom U232-P25
+ * device reports a maximum output packet size of 32 bytes,
+ * it seems to be able to accept only 16 bytes (and that's what
+ * SniffUSB says too...)
+ */
+ if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
+ port->bulk_out_size = 16;
+
+ /* Do a defined restart: the normal serial device seems to
+ * always turn on DTR and RTS here, so do the same. I'm not
+ * sure if this is really necessary. But it should not harm
+ * either.
+ */
+ if (port->tty->termios->c_cflag & CBAUD)
+ priv->control_state = TIOCM_DTR | TIOCM_RTS;
+ else
+ priv->control_state = 0;
+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+
+ priv->last_lcr = (MCT_U232_DATA_BITS_8 |
+ MCT_U232_PARITY_NONE |
+ MCT_U232_STOP_BITS_1);
+ mct_u232_set_line_ctrl(serial, priv->last_lcr);
+
+ /* Read modem status and update control state */
+ mct_u232_get_modem_stat(serial, &priv->last_msr);
+ mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
+
+ {
+ /* Puh, that's dirty */
+ struct usb_serial_port *rport;
+ rport = &serial->port[1];
+ rport->tty = port->tty;
+ rport->private = port->private;
+ port->read_urb = rport->interrupt_in_urb;
+ }
+
+ port->read_urb->dev = port->serial->dev;
+ if (usb_submit_urb(port->read_urb))
+ err("usb_submit_urb(read bulk) failed");
+
+ port->interrupt_in_urb->dev = port->serial->dev;
+ if (usb_submit_urb(port->interrupt_in_urb))
+ err(" usb_submit_urb(read int) failed");
+
+ }
+
+ spin_unlock_irqrestore (&port->port_lock, flags);
+
+ return 0;
+} /* mct_u232_open */
+
+
+static void mct_u232_close (struct usb_serial_port *port, struct file *filp)


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 75'
echo 'File patch-2.2.20 is continued in part 76'
echo "76" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:10 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part71

#!/bin/sh -x
# this is part 71 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 71; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x0e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4,
+ 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12,
+ 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19,
+ 0xa2, 0x00, 0x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, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12,
+ 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2,
+ 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xa2, 0x20, 0x1f, 0x68, 0x12, 0x12,
+ 0x31, 0x12, 0x17, 0xa9, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x20, 0x89, 0x26,
+ 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00,
+ 0x00, 0x12, 0x18, 0xff, 0x30, 0x89, 0x0f, 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18,
+ 0xff, 0x20, 0x89, 0x02, 0x80, 0x26, 0x12, 0x19, 0x19, 0x30, 0x11, 0x20, 0x7e, 0xa0, 0xff, 0x19,
+ 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x18, 0xff,
+ 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x80, 0xe0, 0x2e, 0x24, 0x01, 0x00,
+ 0xa5, 0xd9, 0xa8, 0x02, 0x17, 0xc2, 0x02, 0x18, 0x4c, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21,
+ 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9,
+ 0xef, 0x22, 0x30, 0x1f, 0x03, 0x02, 0x18, 0x4c, 0xc2, 0x8a, 0x12, 0x17, 0xa9, 0x0b, 0x00, 0x12,
+ 0x18, 0x16, 0x20, 0x8b, 0x24, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x02, 0x7a, 0xb3, 0x91,
+ 0x07, 0x74, 0x0c, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, 0x0c,
+ 0x30, 0x8b, 0x06, 0x12, 0x18, 0x16, 0x30, 0x8b, 0xad, 0x12, 0x19, 0x19, 0x30, 0x11, 0xa7, 0x12,
+ 0x18, 0x16, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19,
+ 0x0c, 0x12, 0x18, 0x16, 0x80, 0xe9, 0x7e, 0xa0, 0x00, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x7a,
+ 0xa3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7a, 0xa3, 0x91, 0x07, 0x12, 0x18, 0xff,
+ 0x74, 0xef, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x03, 0x74, 0x0c, 0x7a, 0xb3,
+ 0x91, 0x06, 0x74, 0x08, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, 0x0c, 0x22, 0x30, 0x12, 0x19, 0x7e,
+ 0x68, 0x30, 0xc2, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0xd2, 0x11, 0x12, 0x18, 0xff, 0x12,
+ 0x18, 0xff, 0x12, 0x18, 0xff, 0x02, 0x0c, 0xca, 0x30, 0x1f, 0x1c, 0x7e, 0x68, 0x31, 0x3c, 0x7a,
+ 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x31, 0x5e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19,
+ 0xc4, 0x12, 0x1a, 0x6e, 0x02, 0x18, 0xf7, 0x0b, 0x00, 0x7e, 0x78, 0x18, 0xb1,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80, 0x12, 0x1a, 0xea, 0x40,
+ 0x30, 0x7e, 0x00, 0x03, 0x7a, 0x03, 0x90, 0x00, 0xd2, 0x10, 0x7e, 0x04, 0x00, 0x08, 0x7e, 0x14,
+ 0x00, 0x00, 0x84, 0xa5, 0xdb, 0xfc, 0xa5, 0xda, 0xf9, 0xa5, 0xd9, 0xf6, 0x74, 0x40, 0x12, 0x1a,
+ 0xea, 0x40, 0x0e, 0x7e, 0x68, 0x31, 0x8d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x02, 0x18,
+ 0xf7, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x80, 0xfe, 0xf5, 0x0b, 0x7e, 0x78, 0x00, 0x0b,
+ 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0x01, 0x7e, 0x74, 0x00, 0x01,
+ 0x02, 0x0b, 0x63,
+
+// Segment #19, EXCLUDED Start Address 00ff2c66, Length 1393
+


+};
+
+static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {

+ 2, 0, 3 }; // Major, Minor, Build


+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_fw_down.h linux/drivers/usb/serial/io_fw_down.h
--- v2.2.19/drivers/usb/serial/io_fw_down.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_fw_down.h Wed Oct 10 01:41:30 2001
@@ -0,0 +1,1123 @@


+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright(c) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)

+ #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD


+ typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
+ {
+ unsigned short ExtAddr;
+ unsigned short Addr;
+ unsigned short Len;
+ unsigned char Data[0];
+ } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
+
+ typedef struct _EDGE_FIRMWARE_VERSION_INFO
+ {
+ unsigned char MajorVersion;
+ unsigned char MinorVersion;
+ unsigned short BuildNumber;
+ } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
+
+#endif
+
+#if !defined(IMAGE_ARRAY_NAME)

+ #define IMAGE_ARRAY_NAME FirmwareImage
+ #define IMAGE_VERSION_NAME FirmwareImageVersion


+#endif
+
+static unsigned char IMAGE_ARRAY_NAME[] = {
+
+// Segment #1, Start Address 00ff0000, Length 6
+0xff,0x00,0x00,0x00,0x06,0x00,

+ 0x02, 0x00, 0x80, 0x02, 0x49, 0x39,

+
+// Segment #2, Start Address 00ff000b, Length 3
+0xff,0x00,0x0b,0x00,0x03,0x00,

+ 0x02, 0x44, 0x1a,

+
+// Segment #3, Start Address 00ff0013, Length 3
+0xff,0x00,0x13,0x00,0x03,0x00,

+ 0x02, 0x00, 0x13,

+ 0x02, 0x70, 0xd4,

+
+// Segment #11, Start Address 00ff0053, Length 3
+0xff,0x00,0x53,0x00,0x03,0x00,

+ 0x02, 0x77, 0x9d,

+
+// Segment #12, Start Address 00ff007b, Length 3
+0xff,0x00,0x7b,0x00,0x03,0x00,
+ 0x02, 0x00, 0x7b,
+

+// Segment #13, Start Address 00ff0080, Length 7
+0xff,0x00,0x80,0x00,0x07,0x00,

+ 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x51,
+
+// Segment #14, Start Address 00ff4000, Length 15920
+0xff,0x00,0x00,0x40,0x30,0x3e,


+ 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x14, 0x7f, 0xf8,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 0x75,
+ 0x55, 0x08, 0x75, 0x51, 0x08, 0x75, 0x53, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c,
+ 0x00, 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x42, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75,
+ 0xb8, 0x7f, 0x75, 0xb3, 0x07, 0x75, 0xb2, 0x07, 0xd2, 0xa9, 0x22, 0xd2, 0x92, 0xe4, 0xd5, 0xe0,
+ 0xfd, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2e, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00,
+ 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x72, 0x0b, 0x20,
+ 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19, 0xb0,
+ 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e, 0x54,
+ 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00, 0x0c,
+ 0x74, 0x07, 0x20, 0x68, 0x02, 0x74, 0x0f, 0x19, 0xb0, 0x00, 0x04, 0x30, 0x6b, 0x17, 0x74, 0xbf,
+ 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x28, 0x20, 0x68, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04, 0x74,
+ 0x03, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0, 0x00,
+ 0x10, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02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, 0x71, 0x6d,
+ 0x00, 0x7a, 0x07, 0x01, 0x81, 0x7a, 0x07, 0x01, 0x91, 0x22, 0xc2, 0x15, 0xc2, 0x1d, 0xc2, 0x0d,
+ 0x7e, 0x04, 0x1d, 0xcd, 0x7a, 0x07, 0x01, 0x63, 0x7a, 0x07, 0x01, 0x73, 0x6d, 0x00, 0x7a, 0x07,
+ 0x01, 0x83, 0x7a, 0x07, 0x01, 0x93, 0x22, 0xc2, 0x16, 0xc2, 0x1e, 0xc2, 0x0e, 0x7e, 0x04, 0x21,
+ 0xcd, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x85, 0x7a,
+ 0x07, 0x01, 0x95, 0x22, 0xc2, 0x17, 0xc2, 0x1f, 0xc2, 0x0f, 0x7e, 0x04, 0x25, 0xcd, 0x7a, 0x07,
+ 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x87, 0x7a, 0x07, 0x01, 0x97,
+ 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x42, 0x9c, 0x89, 0x24, 0x42, 0xac, 0x42, 0xc3,
+ 0x42, 0xda, 0x42, 0xf1, 0x43, 0x08, 0x43, 0x1f, 0x43, 0x36, 0x43, 0x4d, 0x30, 0x40, 0x07, 0x20,
+ 0x58, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, 0x50, 0x04, 0xc2, 0x28, 0x80, 0x02,
+ 0xd2, 0x28, 0x22, 0x30, 0x41, 0x07, 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49, 0x07,
+ 0x20, 0x51, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x42, 0x07, 0x20, 0x5a, 0x04,
+ 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, 0x07,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x75, 0xf1,
+ 0x01, 0x75, 0xe1, 0x1f, 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x75, 0xf1, 0x02, 0x75, 0xe1, 0x03,
+ 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x43, 0xa2, 0x1c, 0x12, 0x40, 0xeb, 0x7e, 0x20, 0x00, 0x12,
+ 0x41, 0x8e, 0x0b, 0x20, 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0xa9, 0xd5, 0x87, 0x12,
+ 0x43, 0xd7, 0xd2, 0x92, 0xc2, 0xa8, 0x22, 0x75, 0xa3, 0x00, 0x53, 0xa2, 0x03, 0x75, 0xc1, 0x00,
+ 0x53, 0xc0, 0x03, 0x7e, 0x00, 0x05, 0x7a, 0x01, 0xf1, 0x43, 0xf4, 0x80, 0x43, 0xe4, 0x80, 0xe5,
+ 0xf2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xf2, 0xe5, 0xe2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xe2, 0x75,
+ 0xe1, 0x10, 0xa5, 0xd8, 0xe1, 0x22, 0x12, 0x44, 0x76, 0x12, 0x44, 0x8c, 0x12, 0x45, 0x27, 0x12,
+ 0x45, 0x57, 0x12, 0x49, 0x0f, 0x12, 0x44, 0xd8, 0x80, 0xec, 0xca, 0x09, 0x12, 0x44, 0x58, 0x10,
+ 0x01, 0x12, 0xd5, 0x51, 0x1e, 0x63, 0x53, 0x01, 0x7e, 0x00, 0x54, 0x2e, 0x01, 0x53, 0xa5, 0xe6,
+ 0xf5, 0x51, 0x80, 0x12, 0x20, 0x02, 0x1e, 0x75, 0x53, 0x00, 0x85, 0x54, 0x51, 0xd2, 0x02, 0x74,
+ 0x00, 0x80, 0x0d, 0x30, 0x02, 0x0f, 0xc2, 0x02, 0x7e, 0x00, 0x56, 0x2e, 0x01, 0x53, 0xa5, 0xe6,
+ 0x53, 0x90, 0xcf, 0x42, 0x90, 0xda, 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, 0x54, 0x75, 0x2f, 0x82, 0x12, 0x7e, 0x30, 0x54, 0x3e,
+ 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x66, 0xb4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54,
+ 0x75, 0x2f, 0x83, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52,
+ 0x66, 0xf4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x84, 0x12, 0x7e, 0x30, 0x54, 0x3e,
+ 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x67, 0x34, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54,
+ 0x75, 0x2f, 0x85, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52,
+ 0x67, 0x74, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x86, 0x12, 0x7e, 0x30, 0x54, 0x3e,
+ 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x67, 0xb4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54,
+ 0x75, 0x2f, 0x87, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52,
+ 0x67, 0xf4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x10, 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2,
+ 0x08, 0x22, 0x75, 0x2f, 0xa0, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28,
+ 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68,
+ 0x03, 0x12, 0x4d, 0x96, 0x30, 0x30, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x08, 0x22, 0x30, 0xe6, 0x02,
+ 0xd2, 0x60, 0x7e, 0x37, 0x01, 0x79, 0x7e, 0x27, 0x01, 0x99, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02,
+ 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43,
+ 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12,
+ 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x60, 0xc4, 0x22, 0xc2,
+ 0x60, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00,
+ 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x99, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x99, 0x7e, 0x37, 0x01,
+ 0x79, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e,
+ 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01,
+ 0x59, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34,
+ 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x0d, 0xcd,
+ 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x09, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01,
+ 0x59, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4b, 0x0b, 0x22, 0xd2, 0x08, 0x7e,
+ 0x04, 0x09, 0xcd, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x75, 0x2f, 0x94, 0x12, 0x7e,
+ 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04,
+ 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb,
+ 0x7e, 0x27, 0x01, 0xa9, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c,
+ 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9,
+ 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24,
+ 0x00, 0x00, 0x2e, 0x27, 0x01, 0xa9, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e,
+ 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12,
+ 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09,
+ 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0x80, 0x7f, 0x7a, 0x51,
+ 0x2f, 0x12, 0x7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+ 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00,
+ 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4c, 0xc3, 0x75,
+ 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x09, 0x01,
+ 0x22, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x75, 0x2f, 0xa1, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x81,
+ 0x00, 0x80, 0x06, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e,
+ 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x50, 0xcb, 0x30, 0x31, 0x06, 0x20, 0xe6, 0x4f, 0xd2,
+ 0x09, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x61, 0x7e, 0x37, 0x01, 0x7b, 0x7e, 0x27, 0x01, 0x9b, 0x9d,
+ 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, 0x37, 0x01, 0x7b, 0x7e,
+ 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01,
+ 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34,
+ 0x10, 0x61, 0xc4, 0x22, 0xc2, 0x61, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27,
+ 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a,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, 0x68, 0x34, 0xbe, 0x25,
+ 0x20, 0x78, 0x03, 0x02, 0x51, 0x75, 0x22, 0xd2, 0x0a, 0x7e, 0x04, 0x11, 0xcd, 0x7a, 0x07, 0x01,
+ 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e,
+ 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8,
+ 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xad, 0x2e, 0x24,
+ 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a,
+ 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44,
+ 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xad,
+ 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03,
+ 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04,
+ 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19,
+ 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44,
+ 0x05, 0xcd, 0x9d, 0x24, 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, 0x64, 0x7e, 0x37, 0x01, 0x81, 0x7e, 0x27, 0x01, 0xa1, 0x9d, 0x32,
+ 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37,
+ 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x61,
+ 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10,
+ 0x64, 0xc4, 0x22, 0xc2, 0x64, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01,
+ 0x81, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa1, 0x28, 0x04, 0x7e, 0x27, 0x01,
+ 0xa1, 0x7e, 0x37, 0x01, 0x81, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a,
+ 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xcc, 0x38,
+ 0x13, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e,
+ 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30,
+ 0x9e, 0x44, 0x1d, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x19, 0xcd, 0x7d, 0x24, 0x2d,
+ 0x43, 0x7a, 0x47, 0x01, 0x61, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x57, 0xdf,
+ 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x19, 0xcd, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x75,
+ 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12,
+ 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70,
+ 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb1, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34,
+ 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb,
+ 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47,
+ 0x01, 0xc9, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01, 0xb1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a,
+ 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04,
+ 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04,
+ 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x14, 0x22,
+ 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64,
+ 0x04, 0x00, 0x2e, 0x67, 0x01, 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x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22,
+ 0x02, 0x59, 0x97, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30,
+ 0x22, 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x75, 0x2f, 0xa5, 0x12, 0x7e,
+ 0x30, 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00,
+ 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5d, 0x9f, 0x30, 0x35, 0x06,
+ 0x20, 0xe6, 0x4f, 0xd2, 0x0d, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x65, 0x7e, 0x37, 0x01, 0x83, 0x7e,
+ 0x27, 0x01, 0xa3, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3c, 0x7a, 0x05, 0x3c, 0x7a,
+ 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x21, 0xcc, 0x38,
+ 0x68, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e,
+ 0x30, 0x12, 0x68, 0x34, 0x10, 0x65, 0xc4, 0x22, 0xc2, 0x65, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33,
+ 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa3,
+ 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa3, 0x7e, 0x37, 0x01, 0x83, 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x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22,

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 71'
echo 'File patch-2.2.20 is continued in part 72'
echo "72" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:22 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part83

#!/bin/sh -x
# this is part 83 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 83; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-#define MODE 0x03 /* Mode Reg */
-#define RAH1 0x04 /* Receive Address High 1 */
-#define RAH2 0x05 /* Receive Address High 2 */
-#define RAL1 0x06 /* Receive Address Low 1 */
-#define RAL2 0x07 /* Receive Address Low 2 */
-#define IPC 0x08 /* Interrupt Port Configuration */
-#define CCR1 0x09 /* Common Configuration Reg 1 */
-#define CCR3 0x0A /* Common Configuration Reg 3 */
-#define PRE 0x0B /* Preamble Reg */
-#define RTR1 0x0C /* Receive Timeslot Reg 1 */
-#define RTR2 0x0D /* Receive Timeslot Reg 2 */
-#define RTR3 0x0E /* Receive Timeslot Reg 3 */
-#define RTR4 0x0F /* Receive Timeslot Reg 4 */
-#define TTR1 0x10 /* Transmit Timeslot Reg 1 */
-#define TTR2 0x11 /* Transmit Timeslot Reg 2 */
-#define TTR3 0x12 /* Transmit Timeslot Reg 3 */
-#define TTR4 0x13 /* Transmit Timeslot Reg 4 */
-#define IMR0 0x14 /* Interrupt Mask Reg 0 */
-#define IMR1 0x15 /* Interrupt Mask Reg 1 */
-#define IMR2 0x16 /* Interrupt Mask Reg 2 */
-#define IMR3 0x17 /* Interrupt Mask Reg 3 */
-#define IMR4 0x18 /* Interrupt Mask Reg 4 */
-#define IMR5 0x19 /* Interrupt Mask Reg 5 */
-#define FMR0 0x1A /* Framer Mode Reigster 0 */
-#define FMR1 0x1B /* Framer Mode Reigster 1 */
-#define FMR2 0x1C /* Framer Mode Reigster 2 */
-#define LOOP 0x1D /* Channel Loop Back */
-#define XSW 0x1E /* Transmit Service Word */
-#define FMR4 0x1E /* Framer Mode Reg 4 */
-#define XSP 0x1F /* Transmit Spare Bits */
-#define FMR5 0x1F /* Framer Mode Reg 5 */
-#define XC0 0x20 /* Transmit Control 0 */
-#define XC1 0x21 /* Transmit Control 1 */
-#define RC0 0x22 /* Receive Control 0 */
-#define RC1 0x23 /* Receive Control 1 */
-#define XPM0 0x24 /* Transmit Pulse Mask 0 */
-#define XPM1 0x25 /* Transmit Pulse Mask 1 */
-#define XPM2 0x26 /* Transmit Pulse Mask 2 */
-#define TSWM 0x27 /* Transparent Service Word Mask */
-#define TEST1 0x28 /* Manuf. Test Reg 1 */
-#define IDLE 0x29 /* Idle Channel Code */
-#define XSA4 0x2A /* Transmit SA4 Bit Reg */
-#define XDL1 0x2A /* Transmit DL-Bit Reg 2 */
-#define XSA5 0x2B /* Transmit SA4 Bit Reg */
-#define XDL2 0x2B /* Transmit DL-Bit Reg 2 */
-#define XSA6 0x2C /* Transmit SA4 Bit Reg */
-#define XDL3 0x2C /* Transmit DL-Bit Reg 2 */
-#define XSA7 0x2D /* Transmit SA4 Bit Reg */
-#define CCB1 0x2D /* Clear Channel Reg 1 */
-#define XSA8 0x2E /* Transmit SA4 Bit Reg */
-#define CCB2 0x2E /* Clear Channel Reg 2 */
-#define FMR3 0x2F /* Framer Mode Reg. 3 */
-#define CCB3 0x2F /* Clear Channel Reg 3 */
-#define ICB1 0x30 /* Idle Channel Reg 1 */
-#define ICB2 0x31 /* Idle Channel Reg 2 */
-#define ICB3 0x32 /* Idle Channel Reg 3 */
-#define ICB4 0x33 /* Idle Channel Reg 4 */
-#define LIM0 0x34 /* Line Interface Mode 0 */
-#define LIM1 0x35 /* Line Interface Mode 1 */
-#define PCDR 0x36 /* Pulse Count Detection */
-#define PCRR 0x37 /* Pulse Count Recovery */
-#define LIM2 0x38 /* Line Interface Mode Reg 2 */
-#define LCR1 0x39 /* Loop Code Reg 1 */
-#define LCR2 0x3A /* Loop Code Reg 2 */
-#define LCR3 0x3B /* Loop Code Reg 3 */
-#define SIC1 0x3C /* System Interface Control 1 */
-
-/* Read-only Registers (E1/T1 control mode read registers) */
-#define RFIFOH 0x00 /* Receive FIFO */
-#define RFIFOL 0x01 /* Receive FIFO */
-#define FRS0 0x4C /* Framer Receive Status 0 */
-#define FRS1 0x4D /* Framer Receive Status 1 */
-#define RSW 0x4E /* Receive Service Word */
-#define FRS2 0x4E /* Framer Receive Status 2 */
-#define RSP 0x4F /* Receive Spare Bits */
-#define FRS3 0x4F /* Framer Receive Status 3 */
-#define FECL 0x50 /* Framing Error Counter */
-#define FECH 0x51 /* Framing Error Counter */
-#define CVCL 0x52 /* Code Violation Counter */
-#define CVCH 0x53 /* Code Violation Counter */
-#define CECL 0x54 /* CRC Error Counter 1 */
-#define CECH 0x55 /* CRC Error Counter 1 */
-#define EBCL 0x56 /* E-Bit Error Counter */
-#define EBCH 0x57 /* E-Bit Error Counter */
-#define BECL 0x58 /* Bit Error Counter Low */
-#define BECH 0x59 /* Bit Error Counter Low */
-#define CEC3 0x5A /* CRC Error Counter 3 (16-bit) */
-#define RSA4 0x5C /* Receive SA4 Bit Reg */
-#define RDL1 0x5C /* Receive DL-Bit Reg 1 */
-#define RSA5 0x5D /* Receive SA5 Bit Reg */
-#define RDL2 0x5D /* Receive DL-Bit Reg 2 */
-#define RSA6 0x5E /* Receive SA6 Bit Reg */
-#define RDL3 0x5E /* Receive DL-Bit Reg 3 */
-#define RSA7 0x5F /* Receive SA7 Bit Reg */
-#define RSA8 0x60 /* Receive SA8 Bit Reg */
-#define RSA6S 0x61 /* Receive SA6 Bit Status Reg */
-#define TSR0 0x62 /* Manuf. Test Reg 0 */
-#define TSR1 0x63 /* Manuf. Test Reg 1 */
-#define SIS 0x64 /* Signaling Status Reg */
-#define RSIS 0x65 /* Receive Signaling Status Reg */
-#define RBCL 0x66 /* Receive Byte Control */
-#define RBCH 0x67 /* Receive Byte Control */
-#define FISR0 0x68 /* Interrupt Status Reg 0 */
-#define FISR1 0x69 /* Interrupt Status Reg 1 */
-#define FISR2 0x6A /* Interrupt Status Reg 2 */
-#define FISR3 0x6B /* Interrupt Status Reg 3 */
-#define GIS 0x6E /* Global Interrupt Status */
-#define VSTR 0x6F /* Version Status */
-#define RS(nbr) (0x70 + (nbr)) /* Rx CAS Reg (0 to 15) */
-
-#endif /* _FALC_LH_H */
-
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/fd.h linux/include/linux/fd.h
--- v2.2.19/include/linux/fd.h Sun Mar 25 17:31:03 2001
+++ linux/include/linux/fd.h Mon Oct 22 10:56:20 2001
@@ -216,8 +216,8 @@
X /* Prevent "aliased" accesses. */
X int fd_ref;
X int fd_device;
- unsigned long last_checked; /* when was the drive last checked for a disk
- * change? */
+ unsigned long last_checked; /* when was the drive last checked
+ * for a disk change? */
X
X char *dmabuf;
X int bufblocks;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/fddidevice.h linux/include/linux/fddidevice.h
--- v2.2.19/include/linux/fddidevice.h Sun Mar 25 17:31:04 2001
+++ linux/include/linux/fddidevice.h Wed Oct 10 01:41:55 2001
@@ -34,6 +34,8 @@
X extern int fddi_rebuild_header(struct sk_buff *skb);
X extern unsigned short fddi_type_trans(struct sk_buff *skb,
X struct device *dev);
+struct device *
+init_fddidev(struct device *dev, int sizeof_priv);
X #endif
X
X #endif /* _LINUX_FDDIDEVICE_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/fs.h linux/include/linux/fs.h
--- v2.2.19/include/linux/fs.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/fs.h Mon Oct 22 10:56:12 2001
@@ -872,6 +872,7 @@
X #define LOOKUP_DIRECTORY (2)
X #define LOOKUP_SLASHOK (4)
X #define LOOKUP_CONTINUE (8)
+#define LOOKUP_INSYMLINK (16)
X
X extern struct dentry * lookup_dentry(const char *, struct dentry *, unsigned int);
X extern struct dentry * __namei(const char *, unsigned int);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/hd64572.h linux/include/linux/hd64572.h
--- v2.2.19/include/linux/hd64572.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/hd64572.h Thu Jan 1 01:00:00 1970
@@ -1,437 +0,0 @@
-/*
- * hd64572.h Description of the Hitachi HD64572 (SCA-II), valid for
- * CPU modes 0 & 2.
- *
- * Author: Ivan Passos <iv...@cyclades.com>
- *
- * Copyright: (c) 2000 Cyclades Corp.
- *
- * 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.
- *
- * $Log: hd64572.h,v $
- * Revision 1.0 2000/01/25 ivan
- * Initial version.


- *
- */
-

-#ifndef _HD64572_H
-#define _HD64572_H
-
-/* Illegal Access Register */
-#define ILAR 0x00
-
-/* Wait Controller Registers */
-#define PABR0L 0x20 /* Physical Addr Boundary Register 0 L */
-#define PABR0H 0x21 /* Physical Addr Boundary Register 0 H */
-#define PABR1L 0x22 /* Physical Addr Boundary Register 1 L */
-#define PABR1H 0x23 /* Physical Addr Boundary Register 1 H */
-#define WCRL 0x24 /* Wait Control Register L */
-#define WCRM 0x25 /* Wait Control Register M */
-#define WCRH 0x26 /* Wait Control Register H */
-
-/* Interrupt Registers */
-#define IVR 0x60 /* Interrupt Vector Register */
-#define IMVR 0x64 /* Interrupt Modified Vector Register */
-#define ITCR 0x68 /* Interrupt Control Register */
-#define ISR0 0x6c /* Interrupt Status Register 0 */
-#define ISR1 0x70 /* Interrupt Status Register 1 */
-#define IER0 0x74 /* Interrupt Enable Register 0 */
-#define IER1 0x78 /* Interrupt Enable Register 1 */
-
-/* Register Access Macros (chan is 0 or 1 in _any_ case) */
-#define M_REG(reg, chan) (reg + 0x80*chan) /* MSCI */
-#define DRX_REG(reg, chan) (reg + 0x40*chan) /* DMA Rx */
-#define DTX_REG(reg, chan) (reg + 0x20*(2*chan + 1)) /* DMA Tx */
-#define TRX_REG(reg, chan) (reg + 0x20*chan) /* Timer Rx */
-#define TTX_REG(reg, chan) (reg + 0x10*(2*chan + 1)) /* Timer Tx */
-#define ST_REG(reg, chan) (reg + 0x80*chan) /* Status Cnt */
-#define IR0_DRX(val, chan) ((val)<<(8*(chan))) /* Int DMA Rx */
-#define IR0_DTX(val, chan) ((val)<<(4*(2*chan + 1))) /* Int DMA Tx */
-#define IR0_M(val, chan) ((val)<<(8*(chan))) /* Int MSCI */
-
-/* MSCI Channel Registers */
-#define MD0 0x138 /* Mode reg 0 */
-#define MD1 0x139 /* Mode reg 1 */
-#define MD2 0x13a /* Mode reg 2 */
-#define MD3 0x13b /* Mode reg 3 */
-#define CTL 0x130 /* Control reg */
-#define RXS 0x13c /* RX clock source */
-#define TXS 0x13d /* TX clock source */
-#define EXS 0x13e /* External clock input selection */
-#define TMCT 0x144 /* Time constant (Tx) */
-#define TMCR 0x145 /* Time constant (Rx) */
-#define CMD 0x128 /* Command reg */
-#define ST0 0x118 /* Status reg 0 */
-#define ST1 0x119 /* Status reg 1 */
-#define ST2 0x11a /* Status reg 2 */
-#define ST3 0x11b /* Status reg 3 */
-#define ST4 0x11c /* Status reg 4 */
-#define FST 0x11d /* frame Status reg */
-#define IE0 0x120 /* Interrupt enable reg 0 */
-#define IE1 0x121 /* Interrupt enable reg 1 */
-#define IE2 0x122 /* Interrupt enable reg 2 */
-#define IE4 0x124 /* Interrupt enable reg 4 */
-#define FIE 0x125 /* Frame Interrupt enable reg */
-#define SA0 0x140 /* Syn Address reg 0 */
-#define SA1 0x141 /* Syn Address reg 1 */
-#define IDL 0x142 /* Idle register */
-#define TRBL 0x100 /* TX/RX buffer reg L */
-#define TRBK 0x101 /* TX/RX buffer reg K */
-#define TRBJ 0x102 /* TX/RX buffer reg J */
-#define TRBH 0x103 /* TX/RX buffer reg H */
-#define TRC0 0x148 /* TX Ready control reg 0 */
-#define TRC1 0x149 /* TX Ready control reg 1 */
-#define RRC 0x14a /* RX Ready control reg */
-#define CST0 0x108 /* Current Status Register 0 */
-#define CST1 0x109 /* Current Status Register 1 */
-#define CST2 0x10a /* Current Status Register 2 */
-#define CST3 0x10b /* Current Status Register 3 */
-#define GPO 0x131 /* General Purpose Output Pin Ctl Reg */
-#define TFS 0x14b /* Tx Start Threshold Ctl Reg */
-#define TFN 0x143 /* Inter-transmit-frame Time Fill Ctl Reg */
-#define TBN 0x110 /* Tx Buffer Number Reg */
-#define RBN 0x111 /* Rx Buffer Number Reg */
-#define TNR0 0x150 /* Tx DMA Request Ctl Reg 0 */
-#define TNR1 0x151 /* Tx DMA Request Ctl Reg 1 */
-#define TCR 0x152 /* Tx DMA Critical Request Reg */
-#define RNR 0x154 /* Rx DMA Request Ctl Reg */
-#define RCR 0x156 /* Rx DMA Critical Request Reg */
-
-/* Timer Registers */
-#define TCNTL 0x200 /* Timer Upcounter L */
-#define TCNTH 0x201 /* Timer Upcounter H */
-#define TCONRL 0x204 /* Timer Constant Register L */
-#define TCONRH 0x205 /* Timer Constant Register H */
-#define TCSR 0x206 /* Timer Control/Status Register */
-#define TEPR 0x207 /* Timer Expand Prescale Register */
-
-/* DMA registers */
-#define PCR 0x40 /* DMA priority control reg */
-#define DRR 0x44 /* DMA reset reg */
-#define DMER 0x07 /* DMA Master Enable reg */
-#define BTCR 0x08 /* Burst Tx Ctl Reg */
-#define BOLR 0x0c /* Back-off Length Reg */
-#define DSR_RX(chan) (0x48 + 2*chan) /* DMA Status Reg (Rx) */
-#define DSR_TX(chan) (0x49 + 2*chan) /* DMA Status Reg (Tx) */
-#define DIR_RX(chan) (0x4c + 2*chan) /* DMA Interrupt Enable Reg (Rx) */
-#define DIR_TX(chan) (0x4d + 2*chan) /* DMA Interrupt Enable Reg (Tx) */
-#define FCT_RX(chan) (0x50 + 2*chan) /* Frame End Interrupt Counter (Rx) */
-#define FCT_TX(chan) (0x51 + 2*chan) /* Frame End Interrupt Counter (Tx) */
-#define DMR_RX(chan) (0x54 + 2*chan) /* DMA Mode Reg (Rx) */
-#define DMR_TX(chan) (0x55 + 2*chan) /* DMA Mode Reg (Tx) */
-#define DCR_RX(chan) (0x58 + 2*chan) /* DMA Command Reg (Rx) */
-#define DCR_TX(chan) (0x59 + 2*chan) /* DMA Command Reg (Tx) */
-
-/* DMA Channel Registers */
-#define DARL 0x80 /* Dest Addr Register L (single-block, RX only) */
-#define DARH 0x81 /* Dest Addr Register H (single-block, RX only) */
-#define DARB 0x82 /* Dest Addr Register B (single-block, RX only) */
-#define DARBH 0x83 /* Dest Addr Register BH (single-block, RX only) */
-#define SARL 0x80 /* Source Addr Register L (single-block, TX only) */
-#define SARH 0x81 /* Source Addr Register H (single-block, TX only) */
-#define SARB 0x82 /* Source Addr Register B (single-block, TX only) */
-#define DARBH 0x83 /* Source Addr Register BH (single-block, TX only) */
-#define BARL 0x80 /* Buffer Addr Register L (chained-block) */
-#define BARH 0x81 /* Buffer Addr Register H (chained-block) */
-#define BARB 0x82 /* Buffer Addr Register B (chained-block) */
-#define BARBH 0x83 /* Buffer Addr Register BH (chained-block) */
-#define CDAL 0x84 /* Current Descriptor Addr Register L */
-#define CDAH 0x85 /* Current Descriptor Addr Register H */
-#define CDAB 0x86 /* Current Descriptor Addr Register B */
-#define CDABH 0x87 /* Current Descriptor Addr Register BH */
-#define EDAL 0x88 /* Error Descriptor Addr Register L */
-#define EDAH 0x89 /* Error Descriptor Addr Register H */
-#define EDAB 0x8a /* Error Descriptor Addr Register B */
-#define EDABH 0x8b /* Error Descriptor Addr Register BH */
-#define BFLL 0x90 /* RX Buffer Length L (only RX) */
-#define BFLH 0x91 /* RX Buffer Length H (only RX) */
-#define BCRL 0x8c /* Byte Count Register L */
-#define BCRH 0x8d /* Byte Count Register H */
-
-/* Block Descriptor Structure */
-typedef struct {
- unsigned long next; /* pointer to next block descriptor */
- unsigned long ptbuf; /* buffer pointer */
- unsigned short len; /* data length */
- unsigned char status; /* status */
- unsigned char filler[5]; /* alignment filler (16 bytes) */
-} pcsca_bd_t;
-
-/*
- Descriptor Status definitions:
-
- Bit Transmission Reception
-
- 7 EOM EOM
- 6 - Short Frame
- 5 - Abort
- 4 - Residual bit
- 3 Underrun Overrun
- 2 - CRC
- 1 Ownership Ownership
- 0 EOT -
-*/
-#define DST_EOT 0x01 /* End of transmit command */
-#define DST_OSB 0x02 /* Ownership bit */
-#define DST_CRC 0x04 /* CRC Error */
-#define DST_OVR 0x08 /* Overrun */
-#define DST_UDR 0x08 /* Underrun */
-#define DST_RBIT 0x10 /* Residual bit */
-#define DST_ABT 0x20 /* Abort */
-#define DST_SHRT 0x40 /* Short Frame */
-#define DST_EOM 0x80 /* End of Message */
-
-/* Status Counter Registers */
-#define CMCR 0x158 /* Counter Master Ctl Reg */
-#define TECNTL 0x160 /* Tx EOM Counter L */
-#define TECNTM 0x161 /* Tx EOM Counter M */
-#define TECNTH 0x162 /* Tx EOM Counter H */
-#define TECCR 0x163 /* Tx EOM Counter Ctl Reg */
-#define URCNTL 0x164 /* Underrun Counter L */
-#define URCNTH 0x165 /* Underrun Counter H */
-#define URCCR 0x167 /* Underrun Counter Ctl Reg */
-#define RECNTL 0x168 /* Rx EOM Counter L */
-#define RECNTM 0x169 /* Rx EOM Counter M */
-#define RECNTH 0x16a /* Rx EOM Counter H */
-#define RECCR 0x16b /* Rx EOM Counter Ctl Reg */
-#define ORCNTL 0x16c /* Overrun Counter L */
-#define ORCNTH 0x16d /* Overrun Counter H */
-#define ORCCR 0x16f /* Overrun Counter Ctl Reg */
-#define CECNTL 0x170 /* CRC Counter L */
-#define CECNTH 0x171 /* CRC Counter H */
-#define CECCR 0x173 /* CRC Counter Ctl Reg */
-#define ABCNTL 0x174 /* Abort frame Counter L */
-#define ABCNTH 0x175 /* Abort frame Counter H */
-#define ABCCR 0x177 /* Abort frame Counter Ctl Reg */
-#define SHCNTL 0x178 /* Short frame Counter L */
-#define SHCNTH 0x179 /* Short frame Counter H */
-#define SHCCR 0x17b /* Short frame Counter Ctl Reg */
-#define RSCNTL 0x17c /* Residual bit Counter L */
-#define RSCNTH 0x17d /* Residual bit Counter H */
-#define RSCCR 0x17f /* Residual bit Counter Ctl Reg */
-
-/* Register Programming Constants */
-
-#define IR0_DMIC 0x00000001
-#define IR0_DMIB 0x00000002
-#define IR0_DMIA 0x00000004
-#define IR0_EFT 0x00000008
-#define IR0_DMAREQ 0x00010000
-#define IR0_TXINT 0x00020000
-#define IR0_RXINTB 0x00040000
-#define IR0_RXINTA 0x00080000
-#define IR0_TXRDY 0x00100000
-#define IR0_RXRDY 0x00200000
-
-#define MD0_CRC16_0 0x00
-#define MD0_CRC16_1 0x01
-#define MD0_CRC32 0x02
-#define MD0_CRC_CCITT 0x03
-#define MD0_CRCC0 0x04
-#define MD0_CRCC1 0x08
-#define MD0_AUTO_ENA 0x10
-#define MD0_ASYNC 0x00
-#define MD0_BY_MSYNC 0x20
-#define MD0_BY_BISYNC 0x40
-#define MD0_BY_EXT 0x60
-#define MD0_BIT_SYNC 0x80
-#define MD0_TRANSP 0xc0
-
-#define MD1_NOADDR 0x00
-#define MD1_SADDR1 0x40
-#define MD1_SADDR2 0x80
-#define MD1_DADDR 0xc0
-
-#define MD2_F_DUPLEX 0x00
-#define MD2_AUTO_ECHO 0x01
-#define MD2_LOOP_HI_Z 0x02
-#define MD2_LOOP_MIR 0x03
-#define MD2_ADPLL_X8 0x00
-#define MD2_ADPLL_X16 0x08
-#define MD2_ADPLL_X32 0x10
-#define MD2_NRZ 0x00
-#define MD2_NRZI 0x20
-#define MD2_NRZ_IEEE 0x40
-#define MD2_MANCH 0x00
-#define MD2_FM1 0x20
-#define MD2_FM0 0x40
-#define MD2_FM 0x80
-
-#define CTL_RTS 0x01
-#define CTL_DTR 0x02
-#define CTL_SYN 0x04
-#define CTL_IDLC 0x10
-#define CTL_UDRNC 0x20
-#define CTL_URSKP 0x40
-#define CTL_URCT 0x80
-
-#define RXS_BR0 0x01
-#define RXS_BR1 0x02
-#define RXS_BR2 0x04
-#define RXS_BR3 0x08
-#define RXS_ECLK 0x00
-#define RXS_ECLK_NS 0x20
-#define RXS_IBRG 0x40
-#define RXS_PLL1 0x50
-#define RXS_PLL2 0x60
-#define RXS_PLL3 0x70
-#define RXS_DRTXC 0x80
-
-#define TXS_BR0 0x01
-#define TXS_BR1 0x02
-#define TXS_BR2 0x04
-#define TXS_BR3 0x08
-#define TXS_ECLK 0x00
-#define TXS_IBRG 0x40
-#define TXS_RCLK 0x60
-#define TXS_DTRXC 0x80
-
-#define EXS_RES0 0x01
-#define EXS_RES1 0x02
-#define EXS_RES2 0x04
-#define EXS_TES0 0x10
-#define EXS_TES1 0x20
-#define EXS_TES2 0x40
-
-#define CMD_RX_RST 0x11
-#define CMD_RX_ENA 0x12
-#define CMD_RX_DIS 0x13
-#define CMD_RX_CRC_INIT 0x14
-#define CMD_RX_MSG_REJ 0x15
-#define CMD_RX_MP_SRCH 0x16
-#define CMD_RX_CRC_EXC 0x17
-#define CMD_RX_CRC_FRC 0x18
-#define CMD_TX_RST 0x01
-#define CMD_TX_ENA 0x02
-#define CMD_TX_DISA 0x03
-#define CMD_TX_CRC_INIT 0x04
-#define CMD_TX_CRC_EXC 0x05
-#define CMD_TX_EOM 0x06
-#define CMD_TX_ABORT 0x07
-#define CMD_TX_MP_ON 0x08
-#define CMD_TX_BUF_CLR 0x09
-#define CMD_TX_DISB 0x0b
-#define CMD_CH_RST 0x21
-#define CMD_SRCH_MODE 0x31
-#define CMD_NOP 0x00
-
-#define ST0_RXRDY 0x01
-#define ST0_TXRDY 0x02
-#define ST0_RXINTB 0x20
-#define ST0_RXINTA 0x40
-#define ST0_TXINT 0x80
-
-#define ST1_IDLE 0x01
-#define ST1_ABORT 0x02
-#define ST1_CDCD 0x04
-#define ST1_CCTS 0x08
-#define ST1_SYN_FLAG 0x10
-#define ST1_CLMD 0x20
-#define ST1_TXIDLE 0x40
-#define ST1_UDRN 0x80
-
-#define ST2_CRCE 0x04
-#define ST2_ONRN 0x08
-#define ST2_RBIT 0x10
-#define ST2_ABORT 0x20
-#define ST2_SHORT 0x40
-#define ST2_EOM 0x80
-
-#define ST3_RX_ENA 0x01
-#define ST3_TX_ENA 0x02
-#define ST3_DCD 0x04
-#define ST3_CTS 0x08
-#define ST3_SRCH_MODE 0x10
-#define ST3_SLOOP 0x20
-#define ST3_GPI 0x80
-
-#define ST4_RDNR 0x01
-#define ST4_RDCR 0x02
-#define ST4_TDNR 0x04
-#define ST4_TDCR 0x08
-#define ST4_OCLM 0x20
-#define ST4_CFT 0x40
-#define ST4_CGPI 0x80
-
-#define FST_CRCEF 0x04
-#define FST_OVRNF 0x08
-#define FST_RBIF 0x10
-#define FST_ABTF 0x20
-#define FST_SHRTF 0x40
-#define FST_EOMF 0x80
-
-#define IE0_RXRDY 0x01
-#define IE0_TXRDY 0x02
-#define IE0_RXINTB 0x20
-#define IE0_RXINTA 0x40
-#define IE0_TXINT 0x80
-
-#define IE1_IDLD 0x01
-#define IE1_ABTD 0x02
-#define IE1_CDCD 0x04
-#define IE1_CCTS 0x08
-#define IE1_SYNCD 0x10
-#define IE1_CLMD 0x20
-#define IE1_IDL 0x40
-#define IE1_UDRN 0x80
-
-#define IE2_CRCE 0x04
-#define IE2_OVRN 0x08
-#define IE2_RBIT 0x10
-#define IE2_ABT 0x20
-#define IE2_SHRT 0x40
-#define IE2_EOM 0x80
-
-#define IE4_RDNR 0x01
-#define IE4_RDCR 0x02
-#define IE4_TDNR 0x04
-#define IE4_TDCR 0x08
-#define IE4_OCLM 0x20
-#define IE4_CFT 0x40
-#define IE4_CGPI 0x80
-
-#define FIE_CRCEF 0x04
-#define FIE_OVRNF 0x08
-#define FIE_RBIF 0x10
-#define FIE_ABTF 0x20
-#define FIE_SHRTF 0x40
-#define FIE_EOMF 0x80
-
-#define DSR_DWE 0x01
-#define DSR_DE 0x02
-#define DSR_REF 0x04
-#define DSR_UDRF 0x04
-#define DSR_COA 0x08
-#define DSR_COF 0x10
-#define DSR_BOF 0x20
-#define DSR_EOM 0x40
-#define DSR_EOT 0x80
-
-#define DIR_REF 0x04
-#define DIR_UDRF 0x04
-#define DIR_COA 0x08
-#define DIR_COF 0x10
-#define DIR_BOF 0x20
-#define DIR_EOM 0x40
-#define DIR_EOT 0x80
-
-#define DMR_CNTE 0x02
-#define DMR_NF 0x04
-#define DMR_SEOME 0x08
-#define DMR_TMOD 0x10
-
-#define DCR_SW_ABT 0x01
-#define DCR_FCT_CLR 0x02
-
-#define PCR_PR0 0x01
-#define PCR_PR1 0x02
-#define PCR_PR2 0x04
-#define PCR_CCC 0x08
-#define PCR_BRC 0x10
-#define PCR_OSB 0x40
-#define PCR_BURST 0x80
-
-#endif /* (_HD64572_H) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/hysdn_if.h linux/include/linux/hysdn_if.h
--- v2.2.19/include/linux/hysdn_if.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/hysdn_if.h Wed Oct 10 01:41:55 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_if.h,v 1.1 2000/02/10 19:47:50 werner Exp $
+/* $Id: hysdn_if.h,v 1.1.8.2 2001/05/17 20:41:52 kai Exp $
X
X * Linux driver for HYSDN cards, ioctl definitions shared by hynetmgr and driver.
X * written by Werner Cornelius (wer...@titro.de) for Hypercope GmbH
@@ -19,18 +19,12 @@
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
- * $Log: hysdn_if.h,v $
- * Revision 1.1 2000/02/10 19:47:50 werner
- *
- * Initial release
- *
- *
X */
X
X /****************/
X /* error values */
X /****************/
-#define ERR_NONE 0 /* no error occured */
+#define ERR_NONE 0 /* no error occurred */
X #define ERR_ALREADY_BOOT 1000 /* we are already booting */
X #define EPOF_BAD_MAGIC 1001 /* bad magic in POF header */
X #define ERR_BOARD_DPRAM 1002 /* board DPRAM failed */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/ioport.h linux/include/linux/ioport.h
--- v2.2.19/include/linux/ioport.h Sun Mar 25 17:31:03 2001
+++ linux/include/linux/ioport.h Wed Oct 10 01:41:55 2001
@@ -32,4 +32,21 @@
X extern void autoirq_setup(int waittime);
X extern int autoirq_report(int waittime);
X
+/*
+ * for compatibility with 2.4
+ */
+
+extern inline int check_mem_region(unsigned long from, unsigned long extent)


+{
+ return 0;
+}

+
+extern inline void request_mem_region(unsigned long from, unsigned long extent,const char *name)
+{
+}
+
+extern inline void release_mem_region(unsigned long from, unsigned long extent)
+{
+}
+
X #endif /* _LINUX_PORTIO_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/isdn.h linux/include/linux/isdn.h
--- v2.2.19/include/linux/isdn.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/isdn.h Wed Oct 10 01:41:55 2001
@@ -104,6 +104,12 @@
X
X #define IIOCDRVCTL _IO('I',128)
X
+/* cisco hdlck device private ioctls */
+#define SIOCGKEEPPERIOD (SIOCDEVPRIVATE + 0)
+#define SIOCSKEEPPERIOD (SIOCDEVPRIVATE + 1)
+#define SIOCGDEBSERINT (SIOCDEVPRIVATE + 2)
+#define SIOCSDEBSERINT (SIOCDEVPRIVATE + 3)
+
X /* Packet encapsulations for net-interfaces */
X #define ISDN_NET_ENCAP_ETHER 0
X #define ISDN_NET_ENCAP_RAWIP 1
@@ -261,9 +267,9 @@
X ((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE) )
X
X /* Timer-delays and scheduling-flags */
-#define ISDN_TIMER_RES 3 /* Main Timer-Resolution */
-#define ISDN_TIMER_02SEC (HZ/(ISDN_TIMER_RES+1)/5) /* Slow-Timer1 .2 sec */
-#define ISDN_TIMER_1SEC (HZ/(ISDN_TIMER_RES+1)) /* Slow-Timer2 1 sec */
+#define ISDN_TIMER_RES 4 /* Main Timer-Resolution */
+#define ISDN_TIMER_02SEC (HZ/ISDN_TIMER_RES/5) /* Slow-Timer1 .2 sec */
+#define ISDN_TIMER_1SEC (HZ/ISDN_TIMER_RES) /* Slow-Timer2 1 sec */
X #define ISDN_TIMER_RINGING 5 /* tty RINGs = ISDN_TIMER_1SEC * this factor */
X #define ISDN_TIMER_KEEPINT 10 /* Cisco-Keepalive = ISDN_TIMER_1SEC * this factor */
X #define ISDN_TIMER_MODEMREAD 1
@@ -272,13 +278,11 @@
X #define ISDN_TIMER_MODEMXMIT 8
X #define ISDN_TIMER_NETDIAL 16
X #define ISDN_TIMER_NETHANGUP 32
-#define ISDN_TIMER_KEEPALIVE 128 /* Cisco-Keepalive */
X #define ISDN_TIMER_CARRIER 256 /* Wait for Carrier */
X #define ISDN_TIMER_FAST (ISDN_TIMER_MODEMREAD | ISDN_TIMER_MODEMPLUS | \
X ISDN_TIMER_MODEMXMIT)
X #define ISDN_TIMER_SLOW (ISDN_TIMER_MODEMRING | ISDN_TIMER_NETHANGUP | \
- ISDN_TIMER_NETDIAL | ISDN_TIMER_KEEPALIVE | \
- ISDN_TIMER_CARRIER)
+ ISDN_TIMER_NETDIAL | ISDN_TIMER_CARRIER)
X
X /* Timeout-Values for isdn_net_dial() */
X #define ISDN_TIMER_DTIMEOUT10 (10*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1)))
@@ -400,9 +404,15 @@
X #ifdef CONFIG_ISDN_X25
X struct concap_device_ops *dops; /* callbacks used by encapsulator */
X #endif
- int cisco_loop; /* Loop counter for Cisco-SLARP */
+ /* use an own struct for that in later versions */
X ulong cisco_myseq; /* Local keepalive seq. for Cisco */
+ ulong cisco_mineseen; /* returned keepalive seq. from remote */
X ulong cisco_yourseq; /* Remote keepalive seq. for Cisco */
+ int cisco_keepalive_period; /* keepalive period */
+ ulong cisco_last_slarp_in; /* jiffie of last keepalive packet we received */
+ char cisco_line_state; /* state of line according to keepalive packets */
+ char cisco_debserint; /* debugging flag of cisco hdlc with slarp */
+ struct timer_list cisco_timer;
X struct tq_struct tqueue;
X } isdn_net_local;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/isdn_ppp.h linux/include/linux/isdn_ppp.h
--- v2.2.19/include/linux/isdn_ppp.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/isdn_ppp.h Wed Oct 10 01:41:56 2001
@@ -79,7 +79,7 @@
X *
X * We use this same struct for the reset entry of the compressor to commu-
X * nicate to its caller how to deal with sending of a Reset Ack. In this
- * case, expra is not used, but other options still apply (supressing
+ * case, expra is not used, but other options still apply (suppressing
X * sending with rsend, appending arbitrary data, etc).
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/kcomp.h linux/include/linux/kcomp.h
--- v2.2.19/include/linux/kcomp.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/kcomp.h Fri Nov 2 15:45:54 2001
@@ -17,7 +17,7 @@
X
X #define net_device device
X #define dev_kfree_skb_irq(a) dev_kfree_skb(a)
-#define netif_wake_queue(dev) clear_bit(0, &dev->tbusy)
+#define netif_wake_queue(dev) do { clear_bit(0, &dev->tbusy); mark_bh(NET_BH); } while(0)
X #define netif_stop_queue(dev) set_bit(0, &dev->tbusy)
X #define netif_start_queue(dev) do { dev->tbusy = 0; dev->interrupt = 0; dev->start = 1; } while (0)
X #define netif_queue_stopped(dev) dev->tbusy
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/kmod.h linux/include/linux/kmod.h
--- v2.2.19/include/linux/kmod.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/kmod.h Mon Oct 22 10:56:13 2001
@@ -13,7 +13,10 @@
X #else
X #include <linux/errno.h>
X
-#define request_module(x) do {} while(0)
+static inline int request_module(const char *name)
+{
+ return -ENOSYS;
+}
X static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
X {
X return -EACCES;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/module.h linux/include/linux/module.h
--- v2.2.19/include/linux/module.h Sun Mar 25 17:31:04 2001
+++ linux/include/linux/module.h Fri Nov 2 15:44:03 2001
@@ -136,6 +136,7 @@
X (mod_member_present((mod), can_unload) && (mod)->can_unload \
X ? (mod)->can_unload() : atomic_read(&(mod)->uc.usecount))
X
+extern int try_inc_mod_count(struct module *mod);
X /* Indirect stringification. */
X
X #define __MODULE_STRING_1(x) #x
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/netdevice.h linux/include/linux/netdevice.h
--- v2.2.19/include/linux/netdevice.h Sun Mar 25 17:31:03 2001
+++ linux/include/linux/netdevice.h Fri Nov 2 15:44:25 2001
@@ -441,6 +441,8 @@
X extern void unregister_netdev(struct device *dev);
X extern int register_trdev(struct device *dev);
X extern void unregister_trdev(struct device *dev);
+extern int register_fddidev(struct device *dev);
+extern void unregister_fddidev(struct device *dev);
X extern int register_fcdev(struct device *dev);
X extern void unregister_fcdev(struct device *dev);
X /* Functions used for multicast support */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/netlink.h linux/include/linux/netlink.h
--- v2.2.19/include/linux/netlink.h Sun Mar 25 17:31:04 2001
+++ linux/include/linux/netlink.h Mon Oct 22 10:48:00 2001
@@ -33,7 +33,7 @@
X
X #define NLM_F_REQUEST 1 /* It is request message. */
X #define NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */
-#define NLM_F_ACK 4 /* If succeed, reply with ack */
+#define NLM_F_ACK 4 /* Reply with ack, with zero or error code */
X #define NLM_F_ECHO 8 /* Echo this request */
X
X /* Modifiers to GET request */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/nfs_fs.h linux/include/linux/nfs_fs.h
--- v2.2.19/include/linux/nfs_fs.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/nfs_fs.h Fri Nov 2 15:44:09 2001
@@ -141,8 +141,6 @@
X extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
X extern int nfs_wait_on_inode(struct inode *, int flag);
X extern void nfs_unlock_inode(struct inode *);
-extern int nfs_update_atime(struct dentry *);
-
X
X /*
X * linux/fs/nfs/file.c
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/nfs_xdr.h linux/include/linux/nfs_xdr.h
--- v2.2.19/include/linux/nfs_xdr.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/nfs_xdr.h Wed Oct 10 01:41:56 2001
@@ -89,7 +89,7 @@
X #define NFS_WRITE_MAXIOV 8
X struct nfs_writeargs {
X struct nfs_fh * fh;
- __u32 offset;
+ __u64 offset;
X __u32 count;
X enum nfs3_stable_how stable;
X unsigned int nriov;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/parport.h linux/include/linux/parport.h
--- v2.2.19/include/linux/parport.h Sun Mar 25 17:31:04 2001
+++ linux/include/linux/parport.h Fri Nov 2 15:44:22 2001
@@ -166,7 +166,7 @@
X struct wait_queue *wait_q;
X unsigned long int time;
X unsigned long int timeslice;
- unsigned int waiting;
+ unsigned long waiting;
X struct pardevice *waitprev;
X struct pardevice *waitnext;
X };
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/pc300.h linux/include/linux/pc300.h
--- v2.2.19/include/linux/pc300.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/pc300.h Thu Jan 1 01:00:00 1970
@@ -1,382 +0,0 @@
-/*
- * pc300.h Cyclades-PC300(tm) Kernel API Definitions.
- *
- * Author: Ivan Passos <iv...@cyclades.com>
- *
- * Copyright: (c) 1999-2000 Cyclades Corp.
- *
- * 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.
- *
- * $Log: pc300.h,v $
- * Revision 2.2 2000/06/23 ivan
- * Inclusion of 'loopback' field on structure 'pc300chconf', to allow
- * loopback mode operation.
- *
- * Revision 2.1 2000/06/09 ivan
- * Changes to use the new generic HDLC layer in the driver.
- *
- * Revision 2.0 2000/03/27 ivan
- * Added support for the PC300/TE cards.
- *
- * Revision 1.1 2000/01/31 ivan
- * Replaced 'pc300[drv|sca].h' former PC300 driver include files.
- *
- * Revision 1.0 1999/12/16 ivan
- * First official release.
- * Inclusion of 'nchan' field on structure 'pc300hw', to allow variable
- * number of ports per card.
- * Inclusion of 'if_ptr' field on structure 'pc300dev'.
- *
- * Revision 0.6 1999/11/17 ivan
- * Changed X.25-specific function names to comply with adopted convention.
- *
- * Revision 0.5 1999/11/16 Daniela Squassoni
- * X.25 support.
- *
- * Revision 0.4 1999/11/15 ivan
- * Inclusion of 'clock' field on structure 'pc300hw'.
- *
- * Revision 0.3 1999/11/10 ivan
- * IOCTL name changing.
- * Inclusion of driver function prototypes.
- *
- * Revision 0.2 1999/11/03 ivan
- * Inclusion of 'tx_skb' and union 'ifu' on structure 'pc300dev'.
- *
- * Revision 0.1 1999/01/15 ivan
- * Initial version.


- *
- */
-

-#ifndef _PC300_H
-#define _PC300_H
-
-#ifndef __HDLC_H
-#include <linux/hdlc.h>
-#endif
-#ifndef _HD64572_H
-#include <linux/hd64572.h>
-#endif
-#ifndef _FALC_LH_H
-#include <linux/falc-lh.h>
-#endif
-
-#ifndef CY_TYPES
-#define CY_TYPES
-#if defined(__alpha__)
-typedef unsigned long ucdouble; /* 64 bits, unsigned */
-typedef unsigned int uclong; /* 32 bits, unsigned */
-#else
-typedef unsigned long uclong; /* 32 bits, unsigned */
-#endif
-typedef unsigned short ucshort; /* 16 bits, unsigned */
-typedef unsigned char ucchar; /* 8 bits, unsigned */
-#endif /* CY_TYPES */
-
-#define PC300_DEVNAME "hdlc" /* Dev. name base (for hdlc0, hdlc1, etc.) */
-#define PC300_MAXINDEX 100 /* Max dev. name index (the '0' in hdlc0) */
-
-#define PC300_MAXCARDS 4 /* Max number of cards per system */
-#define PC300_MAXCHAN 2 /* Number of channels per card */
-
-#define PC300_PLX_WIN 0x80 /* PLX control window size (128b) */
-#define PC300_RAMSIZE 0x80000 /* RAM window size (512Kb) */
-#define PC300_SCASIZE 0x400 /* SCA window size (1Kb) */
-#define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */
-
-#define PC300_OSC_CLOCK 24576000
-#define PC300_PCI_CLOCK 33000000
-
-#define BD_DEF_LEN 0x0800 /* DMA buffer length (2KB) */
-#define DMA_TX_MEMSZ 0x8000 /* Total DMA Tx memory size (32KB/ch) */
-#define DMA_RX_MEMSZ 0x10000 /* Total DMA Rx memory size (64KB/ch) */
-
-#define N_DMA_TX_BUF (DMA_TX_MEMSZ / BD_DEF_LEN) /* DMA Tx buffers */
-#define N_DMA_RX_BUF (DMA_RX_MEMSZ / BD_DEF_LEN) /* DMA Rx buffers */
-
-/* DMA Buffer Offsets */
-#define DMA_TX_BASE ((N_DMA_TX_BUF + N_DMA_RX_BUF) * \
- PC300_MAXCHAN * sizeof(pcsca_bd_t))
-#define DMA_RX_BASE (DMA_TX_BASE + PC300_MAXCHAN*DMA_TX_MEMSZ)
-
-/* DMA Descriptor Offsets */
-#define DMA_TX_BD_BASE 0x0000
-#define DMA_RX_BD_BASE (DMA_TX_BD_BASE + ((PC300_MAXCHAN*DMA_TX_MEMSZ / \
- BD_DEF_LEN) * sizeof(pcsca_bd_t)))
-
-/* DMA Descriptor Macros */
-#define TX_BD_ADDR(chan, n) (DMA_TX_BD_BASE + \
- ((N_DMA_TX_BUF*chan) + n) * sizeof(pcsca_bd_t))
-#define RX_BD_ADDR(chan, n) (DMA_RX_BD_BASE + \
- ((N_DMA_RX_BUF*chan) + n) * sizeof(pcsca_bd_t))
-
-/* Macro to access the FALC registers (TE only) */
-#define F_REG(reg, chan) (0x200*(chan) + ((reg)<<2))
-
-/***************************************
- * Memory access functions/macros *
- * (required to support Alpha systems) *
- ***************************************/
-#ifdef __KERNEL__
-#define cpc_writeb(port,val) {writeb((ucchar)(val),(ulong)(port)); mb();}
-#define cpc_writew(port,val) {writew((ushort)(val),(ulong)(port)); mb();}
-#define cpc_writel(port,val) {writel((uclong)(val),(ulong)(port)); mb();}
-
-#define cpc_readb(port) readb(port)
-#define cpc_readw(port) readw(port)
-#define cpc_readl(port) readl(port)
-
-#else /* __KERNEL__ */
-#define cpc_writeb(port,val) (*(volatile ucchar *)(port) = (ucchar)(val))
-#define cpc_writew(port,val) (*(volatile ucshort *)(port) = (ucshort)(val))
-#define cpc_writel(port,val) (*(volatile uclong *)(port) = (uclong)(val))
-
-#define cpc_readb(port) (*(volatile ucchar *)(port))
-#define cpc_readw(port) (*(volatile ucshort *)(port))
-#define cpc_readl(port) (*(volatile uclong *)(port))
-
-#endif /* __KERNEL__ */
-
-/****** Data Structures *****************************************************/
-
-/*
- * RUNTIME_9050 - PLX PCI9050-1 local configuration and shared runtime
- * registers. This structure can be used to access the 9050 registers
- * (memory mapped).
- */
-struct RUNTIME_9050 {
- uclong loc_addr_range[4]; /* 00-0Ch : Local Address Ranges */
- uclong loc_rom_range; /* 10h : Local ROM Range */
- uclong loc_addr_base[4]; /* 14-20h : Local Address Base Addrs */
- uclong loc_rom_base; /* 24h : Local ROM Base */
- uclong loc_bus_descr[4]; /* 28-34h : Local Bus Descriptors */
- uclong rom_bus_descr; /* 38h : ROM Bus Descriptor */
- uclong cs_base[4]; /* 3C-48h : Chip Select Base Addrs */
- uclong intr_ctrl_stat; /* 4Ch : Interrupt Control/Status */
- uclong init_ctrl; /* 50h : EEPROM ctrl, Init Ctrl, etc */
-};
-
-#define PLX_9050_LINT1_ENABLE 0x01
-#define PLX_9050_LINT1_POL 0x02
-#define PLX_9050_LINT1_STATUS 0x04
-#define PLX_9050_LINT2_ENABLE 0x08
-#define PLX_9050_LINT2_POL 0x10
-#define PLX_9050_LINT2_STATUS 0x20
-#define PLX_9050_INTR_ENABLE 0x40
-#define PLX_9050_SW_INTR 0x80
-
-/* Masks to access the init_ctrl PLX register */
-#define PC300_CLKSEL_MASK (0x00000004UL)
-#define PC300_CHMEDIA_MASK(chan) (0x00000020UL<<(chan*3))
-#define PC300_CTYPE_MASK (0x00000800UL)
-
-/* CPLD Registers (base addr = falcbase, TE only) */
-#define CPLD_REG1 0x140 /* Chip resets, DCD/CTS status */
-#define CPLD_REG2 0x144 /* Clock enable , LED control */
-
-/* CPLD Register bit description: for the FALC bits, they should always be
- set based on the channel (use (bit<<(2*ch)) to access the correct bit for
- that channel) */
-#define CPLD_REG1_FALC_RESET 0x01
-#define CPLD_REG1_SCA_RESET 0x02
-#define CPLD_REG1_GLOBAL_CLK 0x08
-#define CPLD_REG1_FALC_DCD 0x10
-#define CPLD_REG1_FALC_CTS 0x20
-
-#define CPLD_REG2_FALC_TX_CLK 0x01
-#define CPLD_REG2_FALC_RX_CLK 0x02
-#define CPLD_REG2_FALC_LED1 0x10
-#define CPLD_REG2_FALC_LED2 0x20
-
-/* Structure with FALC-related fields (TE only) */
-#define PC300_FALC_MAXLOOP 0x0000ffff /* for falc_issue_cmd() */
-
-typedef struct falc {
- ucchar sync; /* If true FALC is synchronized */
- ucchar active; /* if TRUE then already active */
- ucchar loop_active; /* if TRUE a line loopback UP was received */
- ucchar loop_gen; /* if TRUE a line loopback UP was issued */
-
- ucchar num_channels;
- ucchar offset; /* 1 for T1, 0 for E1 */
- ucchar full_bandwidth;
-
- ucchar xmb_cause;
- ucchar multiframe_mode;
-
- /* Statistics */
- ucshort pden; /* Pulse Density violation count */
- ucshort los; /* Loss of Signal count */
- ucshort losr; /* Loss of Signal recovery count */
- ucshort lfa; /* Loss of frame alignment count */
- ucshort farec; /* Frame Alignment Recovery count */
- ucshort lmfa; /* Loss of multiframe alignment count */
- ucshort ais; /* Remote Alarm indication Signal count */
- ucshort sec; /* One-second timer */
- ucshort es; /* Errored second */
- ucshort rai; /* remote alarm received */
- ucshort bec;
- ucshort fec;
- ucshort cvc;
- ucshort cec;
- ucshort ebc;
-
- /* Status */
- ucchar red_alarm;
- ucchar blue_alarm;
- ucchar loss_fa;
- ucchar yellow_alarm;
- ucchar loss_mfa;
- ucchar prbs;
-} falc_t;
-
-typedef struct pc300dev {
- void *if_ptr; /* General purpose pointer */
- struct pc300ch *chan;
-#ifdef __KERNEL__
- char name[16];
- void *private;
- hdlc_device *hdlc;
- struct net_device_stats stats;
- struct sk_buff *tx_skb;
-#endif /* __KERNEL__ */
-}pc300dev_t;
-
-typedef struct pc300hw {
- int type; /* RSV, X21, etc. */
- int nchan; /* number of channels */
- int irq; /* interrupt request level */
- uclong clock; /* Board clock */
- uclong plxphys; /* PLX registers MMIO base (physical) */
- uclong plxbase; /* PLX registers MMIO base (virtual) */
- uclong plxsize; /* PLX registers MMIO size */
- uclong scaphys; /* SCA registers MMIO base (physical) */
- uclong scabase; /* SCA registers MMIO base (virtual) */
- uclong scasize; /* SCA registers MMIO size */
- uclong ramphys; /* On-board RAM MMIO base (physical) */
- uclong rambase; /* On-board RAM MMIO base (virtual) */
- uclong ramsize; /* On-board RAM MMIO size */
- uclong falcphys; /* FALC registers MMIO base (physical) */
- uclong falcbase; /* FALC registers MMIO base (virtual) */
- uclong falcsize; /* FALC registers MMIO size */
-} pc300hw_t;
-
-typedef struct pc300chconf {
- ucchar media; /* HW media (RS232, V.35, etc.) */
- uclong proto; /* Protocol (PPP, X.25, etc.) */
- uclong clkrate; /* Clock rate (in bps, 0 = ext. clock) */
- ucchar loopback; /* Loopback mode */
-
- /* TE-specific parameters */
- ucchar lcode; /* Line Code (AMI, B8ZS, etc.) */
- ucchar fr_mode; /* Frame Mode (ESF, D4, etc.) */
- ucchar lbo; /* Line Build Out */
- ucchar rx_sens; /* Rx Sensitivity (long- or short-haul) */
- uclong tslot_bitmap; /* bit[i]=1 => timeslot _i_ is active */
-} pc300chconf_t;
-
-typedef struct pc300ch {
- struct pc300 *card;
- int channel;
- pc300dev_t d;
- pc300chconf_t conf;
- ucchar tx_first_bd; /* First TX DMA block descr. w/ data */
- ucchar tx_next_bd; /* Next free TX DMA block descriptor */
- ucchar rx_first_bd; /* First free RX DMA block descriptor */
- ucchar rx_last_bd; /* Last free RX DMA block descriptor */
- falc_t falc; /* FALC structure (TE only) */
-} pc300ch_t;
-
-typedef struct pc300 {
- pc300hw_t hw; /* hardware config. */
- pc300ch_t chan[PC300_MAXCHAN];
-#ifdef __KERNEL__
- spinlock_t card_lock;
-#endif /* __KERNEL__ */
-} pc300_t;
-
-/* DEV ioctl() commands */
-#define N_SPPP_IOCTLS 2
-
-enum pc300_ioctl_cmds {
- SIOCCPCRESERVED = (SIOCDEVPRIVATE + N_SPPP_IOCTLS),
- SIOCGPC300CONF,
- SIOCSPC300CONF,
- SIOCGPC300STATUS,
- SIOCGPC300FALCSTATUS,
-};
-
-/* Control Constant Definitions */
-#define PC300_RSV 0x01
-#define PC300_X21 0x02
-#define PC300_TE 0x03
-
-#define PC300_LC_AMI 0x01
-#define PC300_LC_B8ZS 0x02
-#define PC300_LC_NRZ 0x03
-#define PC300_LC_HDB3 0x04
-
-/* Framing (T1) */
-#define PC300_FR_ESF 0x01
-#define PC300_FR_D4 0x02
-#define PC300_FR_ESF_JAPAN 0x03
-
-/* Framing (E1) */
-#define PC300_FR_MF_CRC4 0x04
-#define PC300_FR_MF_NON_CRC4 0x05
-
-#define PC300_LBO_0_DB 0x00
-#define PC300_LBO_7_5_DB 0x01
-#define PC300_LBO_15_DB 0x02
-#define PC300_LBO_22_5_DB 0x03
-
-#define PC300_RX_SENS_SH 0x01
-#define PC300_RX_SENS_LH 0x02
-
-#define PC300_TX_TIMEOUT (2*HZ)
-#define PC300_TX_QUEUE_LEN 10
-#define PC300_DEF_MTU 1500
-
-#ifdef __KERNEL__
-/* Function Prototypes */
-static void tx_dma_buf_pt_init(pc300_t *, int);
-static void tx_dma_buf_init(pc300_t *, int);
-static void rx_dma_buf_pt_init(pc300_t *, int);
-static void rx_dma_buf_init(pc300_t *, int);
-static void tx_dma_buf_check(pc300_t *, int);
-static void rx_dma_buf_check(pc300_t *, int);
-int dma_buf_write(pc300_t *, int, ucchar *, int);
-int dma_buf_read(pc300_t *, int, struct sk_buff *);
-void tx_dma_start(pc300_t *, int);
-void rx_dma_start(pc300_t *, int);
-void tx_dma_stop(pc300_t *, int);
-void rx_dma_stop(pc300_t *, int);
-int cpc_queue_xmit(struct sk_buff *, struct device *);
-void cpc_net_rx(hdlc_device *);
-#ifdef CONFIG_PC300_X25
-int cpc_x25_packetlayer_xmit(struct sk_buff *, struct device *);
-void cpc_lapb_connected(void *, int);
-void cpc_lapb_disconnected(void *, int);
-void cpc_lapb_data_indication(void *, struct sk_buff *);
-void cpc_lapb_data_transmit(void *, struct sk_buff *);
-#endif /* CONFIG_PC300_X25 */
-static void cpc_intr(int, void *, struct pt_regs *);
-void cpc_sca_status(pc300_t *, int);
-int cpc_ioctl(hdlc_device *, struct ifreq *, int);
-static int clock_rate_calc(uclong, uclong, int *);
-int ch_config(pc300dev_t *);
-int rx_config(pc300dev_t *);
-int tx_config(pc300dev_t *);
-int cpc_opench(pc300dev_t *);
-void cpc_closech(pc300dev_t *);
-int cpc_open(hdlc_device *);
-void cpc_close(hdlc_device *);
-static uclong detect_ram(pc300_t *);
-static void plx_init(pc300_t *);
-static int cpc_detect(void);
-#endif /* __KERNEL__ */
-
-#endif /* _PC300_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/pci.h linux/include/linux/pci.h
--- v2.2.19/include/linux/pci.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/pci.h Mon Oct 22 10:56:11 2001
@@ -329,6 +329,7 @@
X #define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43
X #define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011
X #define PCI_DEVICE_ID_COMPAQ_CISS 0xb060
+#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178
X #define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130
X #define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150
X
@@ -626,7 +627,12 @@
X #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
X #define PCI_DEVICE_ID_APPLE_GC 0x0002
X #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
-
+#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018
+#define PCI_DEVICE_ID_APPLE_KL_USB 0x0019
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021
+#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030
+
X #define PCI_VENDOR_ID_YAMAHA 0x1073
X #define PCI_DEVICE_ID_YAMAHA_724 0x0004
X #define PCI_DEVICE_ID_YAMAHA_724F 0x000d
@@ -1350,11 +1356,24 @@
X #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
X #define PCI_FUNC(devfn) ((devfn) & 0x07)
X
+/* Ioctls for /proc/bus/pci/X/Y nodes. */
+#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8)
+#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */
+#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */
+#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
+#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
+
X #ifdef __KERNEL__
X
X #include <linux/types.h>
X #include <linux/config.h>
X
+/* File state for mmap()s on /proc/bus/pci/X/Y */
+enum pci_mmap_state {
+ pci_mmap_io,
+ pci_mmap_mem
+};
+
X /*
X * There is one pci_dev structure for each slot-number/function-number
X * combination:
@@ -1423,6 +1442,10 @@
X #define PCIBIOS_BAD_REGISTER_NUMBER 0x87
X #define PCIBIOS_SET_FAILED 0x88
X #define PCIBIOS_BUFFER_TOO_SMALL 0x89
+
+/* Include architecture-dependent settings and functions */
+
+#include <asm/pci.h>
X
X /* Low-level architecture-dependent routines */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/quota.h linux/include/linux/quota.h
--- v2.2.19/include/linux/quota.h Sun Mar 25 17:31:04 2001
+++ linux/include/linux/quota.h Mon Oct 22 10:56:09 2001
@@ -155,7 +155,7 @@
X * Maximum length of a message generated in the quota system,
X * that needs to be kicked onto the tty.
X */
-#define MAX_QUOTA_MESSAGE 75
+#define MAX_QUOTA_MESSAGE (PAGE_SIZE + 256)
X
X #define DQ_LOCKED 0x01 /* locked for update */
X #define DQ_WANT 0x02 /* wanted for update */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/sched.h linux/include/linux/sched.h
--- v2.2.19/include/linux/sched.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/sched.h Fri Nov 2 15:44:02 2001
@@ -254,6 +254,7 @@
X */
X struct exec_domain *exec_domain;
X long need_resched;
+ unsigned long ptrace;
X
X /* various fields */
X long counter;
@@ -361,8 +362,6 @@
X /* Not implemented yet, only for 486*/
X #define PF_STARTING 0x00000002 /* being created */
X #define PF_EXITING 0x00000004 /* getting shut down */
-#define PF_PTRACED 0x00000010 /* set if ptrace (0) has been called */
-#define PF_TRACESYS 0x00000020 /* tracing system calls */
X #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */
X #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */
X #define PF_DUMPCORE 0x00000200 /* dumped core */
@@ -372,7 +371,14 @@
X #define PF_FREE_PAGES 0x00002000 /* The current-> */
X
X #define PF_USEDFPU 0x00100000 /* task used FPU this quantum (SMP) */
-#define PF_DTRACE 0x00200000 /* delayed trace (used on m68k, i386) */
+
+/*
+ * Ptrace flags
+ */
+#define PT_PTRACED 0x00000001 /* set if ptrace (0) has been called */
+#define PT_TRACESYS 0x00000002 /* tracing system calls */
+#define PT_DTRACE 0x00000004 /* delayed trace (used on m68k, i386) */
+
X
X /*
X * Limit the stack by to some sane default: root can always
@@ -387,7 +393,7 @@
X * your own risk!. Base=0, limit=0x1fffff (=2MB)
X */
X #define INIT_TASK \
-/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0, \
+/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0,0, \
X /* counter */ DEF_PRIORITY,DEF_PRIORITY,0, \
X /* SMP */ 0,0,0,-1, \
X /* schedlink */ &init_task,&init_task, &init_task, &init_task, \
@@ -500,7 +506,7 @@
X extern unsigned long volatile jiffies;
X extern unsigned long itimer_ticks;
X extern unsigned long itimer_next;
-extern struct timeval xtime;
+extern volatile struct timeval xtime;
X extern void do_timer(struct pt_regs *);
X
X extern unsigned int * prof_buffer;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/sunrpc/sched.h linux/include/linux/sunrpc/sched.h
--- v2.2.19/include/linux/sunrpc/sched.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/sunrpc/sched.h Mon Oct 22 10:56:17 2001
@@ -81,7 +81,7 @@
X unsigned int tk_lock; /* Task lock counter */
X unsigned char tk_active : 1,/* Task has been activated */
X tk_wakeup : 1;/* Task waiting to wake up */
- unsigned int tk_runstate; /* Task run status */
+ unsigned long tk_runstate; /* Task run status */
X #ifdef RPC_DEBUG
X unsigned int tk_pid; /* debugging aid */
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/sunrpc/xprt.h linux/include/linux/sunrpc/xprt.h
--- v2.2.19/include/linux/sunrpc/xprt.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/sunrpc/xprt.h Mon Oct 22 10:57:01 2001
@@ -143,7 +143,7 @@
X struct rpc_wait_queue pingwait; /* waiting on ping() */
X struct rpc_rqst * free; /* free slots */
X struct rpc_rqst slot[RPC_MAXREQS];
- unsigned int sockstate; /* Socket state */
+ unsigned long sockstate; /* Socket state */
X unsigned char nocong : 1,/* no congestion control */
X stream : 1,/* TCP */
X shutdown : 1,/* being shut down */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/synclink.h linux/include/linux/synclink.h
--- v2.2.19/include/linux/synclink.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/synclink.h Wed Oct 10 01:41:58 2001
@@ -1,7 +1,7 @@
X /*
X * SyncLink Multiprotocol Serial Adapter Driver
X *
- * $Id: synclink.h,v 2.2 2000/11/08 17:08:30 paul Exp $
+ * $Id: synclink.h,v 2.5 2001/03/26 17:04:35 ez Exp $
X *
X * Copyright (C) 1998-2000 by Microgate Corporation
X *
@@ -11,7 +11,7 @@
X
X #ifndef _SYNCLINK_H_
X #define _SYNCLINK_H_
-#define SYNCLINK_H_VERSION 2.2
+#define SYNCLINK_H_VERSION 2.5
X
X #define BOOLEAN int
X #define TRUE 1
@@ -84,6 +84,11 @@
X #define HDLC_CRC_NONE 0
X #define HDLC_CRC_16_CCITT 1
X #define HDLC_CRC_32_CCITT 2
+#define HDLC_CRC_MASK 0x00ff
+#define HDLC_CRC_RETURN_EX 0x8000
+
+#define RX_OK 0
+#define RX_CRC_ERROR 1
X
X #define HDLC_TXIDLE_FLAGS 0
X #define HDLC_TXIDLE_ALT_ZEROS_ONES 1
@@ -117,6 +122,7 @@
X
X #define MGSL_MODE_ASYNC 1
X #define MGSL_MODE_HDLC 2
+#define MGSL_MODE_RAW 6
X
X #define MGSL_BUS_TYPE_ISA 1
X #define MGSL_BUS_TYPE_EISA 2
@@ -150,6 +156,8 @@
X
X #define MICROGATE_VENDOR_ID 0x13c0
X #define SYNCLINK_DEVICE_ID 0x0010
+#define MGSCC_DEVICE_ID 0x0020
+#define SYNCLINK_SCA_DEVICE_ID 0x0030
X #define MGSL_MAX_SERIAL_NUMBER 30
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/tty.h linux/include/linux/tty.h
--- v2.2.19/include/linux/tty.h Sun Mar 25 17:31:03 2001
+++ linux/include/linux/tty.h Mon Oct 22 10:56:12 2001
@@ -364,6 +364,8 @@
X extern int specialix_init(void);
X extern int espserial_init(void);
X extern int macserial_init(void);
+extern int mgsl_init(void);
+extern int n_hdlc_init(void);
X
X extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device,
X const char *routine);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/usb.h linux/include/linux/usb.h
--- v2.2.19/include/linux/usb.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/usb.h Wed Oct 10 01:41:58 2001
@@ -236,36 +236,36 @@
X
X /* Endpoint descriptor */
X struct usb_endpoint_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bEndpointAddress;
- __u8 bmAttributes;
- __u16 wMaxPacketSize;
- __u8 bInterval;
- __u8 bRefresh;
- __u8 bSynchAddress;
+ __u8 bLength __attribute__ ((packed));
+ __u8 bDescriptorType __attribute__ ((packed));
+ __u8 bEndpointAddress __attribute__ ((packed));
+ __u8 bmAttributes __attribute__ ((packed));
+ __u16 wMaxPacketSize __attribute__ ((packed));
+ __u8 bInterval __attribute__ ((packed));
+ __u8 bRefresh __attribute__ ((packed));
+ __u8 bSynchAddress __attribute__ ((packed));
X
X unsigned char *extra; /* Extra descriptors */
X int extralen;
-} __attribute__ ((packed));
+};
X
X /* Interface descriptor */
X struct usb_interface_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bInterfaceNumber;
- __u8 bAlternateSetting;
- __u8 bNumEndpoints;
- __u8 bInterfaceClass;
- __u8 bInterfaceSubClass;
- __u8 bInterfaceProtocol;
- __u8 iInterface;
+ __u8 bLength __attribute__ ((packed));
+ __u8 bDescriptorType __attribute__ ((packed));
+ __u8 bInterfaceNumber __attribute__ ((packed));
+ __u8 bAlternateSetting __attribute__ ((packed));
+ __u8 bNumEndpoints __attribute__ ((packed));
+ __u8 bInterfaceClass __attribute__ ((packed));
+ __u8 bInterfaceSubClass __attribute__ ((packed));
+ __u8 bInterfaceProtocol __attribute__ ((packed));
+ __u8 iInterface __attribute__ ((packed));
X
X struct usb_endpoint_descriptor *endpoint;
X
- unsigned char *extra; /* Extra descriptors */
+ unsigned char *extra; /* Extra descriptors */
X int extralen;
-} __attribute__ ((packed));
+};
X
X struct usb_interface {
X struct usb_interface_descriptor *altsetting;
@@ -280,20 +280,20 @@
X
X /* Configuration descriptor information.. */
X struct usb_config_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
- __u16 wTotalLength;
- __u8 bNumInterfaces;
- __u8 bConfigurationValue;
- __u8 iConfiguration;
- __u8 bmAttributes;
- __u8 MaxPower;
+ __u8 bLength __attribute__ ((packed));
+ __u8 bDescriptorType __attribute__ ((packed));
+ __u16 wTotalLength __attribute__ ((packed));
+ __u8 bNumInterfaces __attribute__ ((packed));
+ __u8 bConfigurationValue __attribute__ ((packed));
+ __u8 iConfiguration __attribute__ ((packed));
+ __u8 bmAttributes __attribute__ ((packed));
+ __u8 MaxPower __attribute__ ((packed));
X
X struct usb_interface *interface;
X
- unsigned char *extra; /* Extra descriptors */
+ unsigned char *extra; /* Extra descriptors */
X int extralen;
-} __attribute__ ((packed));
+};
X
X /* String descriptor */
X struct usb_string_descriptor {
@@ -317,6 +317,7 @@
X
X struct semaphore serialize;
X
+ /* ioctl -- userspace apps can talk to drivers through usbdevfs */
X int (*ioctl)(struct usb_device *dev, unsigned int code, void *buf);
X };
X
@@ -350,6 +351,8 @@
X #define USB_URB_EARLY_COMPLETE 0x0004
X #define USB_ASYNC_UNLINK 0x0008
X #define USB_QUEUE_BULK 0x0010
+#define USB_NO_FSBR 0x0020
+#define USB_ZERO_PACKET 0x0040 // Finish bulk OUTs always with zero length packet
X #define USB_TIMEOUT_KILLED 0x1000 // only set by HCD!
X
X typedef struct
@@ -372,7 +375,7 @@
X struct usb_device *dev; // pointer to associated USB device
X unsigned int pipe; // pipe information
X int status; // returned status
- unsigned int transfer_flags; // USB_DISABLE_SPD | USB_ISO_ASAP | USB_URB_EARLY_COMPLETE
+ unsigned int transfer_flags; // USB_DISABLE_SPD | USB_ISO_ASAP | etc.
X void *transfer_buffer; // associated data buffer
X int transfer_buffer_length; // data buffer length
X int actual_length; // actual data buffer length
@@ -486,12 +489,18 @@
X int (*unlink_urb) (struct urb* purb);
X };
X
+#define DEVNUM_ROUND_ROBIN /***** OPTION *****/
+
X /*
X * Allocated per bus we have
X */
X struct usb_bus {
X int busnum; /* Bus number (in order of reg) */
X
+#ifdef DEVNUM_ROUND_ROBIN
+ int devnum_next; /* Next open device number in round-robin allocation */


+#endif /* DEVNUM_ROUND_ROBIN */
+

X struct usb_devmap devmap; /* Device map */
X struct usb_operations *op; /* Operations (specific to the HC) */
X struct usb_device *root_hub; /* Root hub */
@@ -508,6 +517,8 @@
X
X /* usbdevfs inode list */
X struct list_head inodes;


+
+ atomic_t refcnt;
X };
X

X #define USB_MAXCHILDREN (16) /* This is arbitrary */
@@ -779,13 +790,13 @@
X
X #else /* CONFIG_USB_DEVICEFS */
X
-extern inline void usbdevfs_add_bus(struct usb_bus *bus) {}
-extern inline void usbdevfs_remove_bus(struct usb_bus *bus) {}
-extern inline void usbdevfs_add_device(struct usb_device *dev) {}
-extern inline void usbdevfs_remove_device(struct usb_device *dev) {}
+static inline void usbdevfs_add_bus(struct usb_bus *bus) {}
+static inline void usbdevfs_remove_bus(struct usb_bus *bus) {}
+static inline void usbdevfs_add_device(struct usb_device *dev) {}
+static inline void usbdevfs_remove_device(struct usb_device *dev) {}
X
-extern inline int usbdevfs_init(void) { return 0; }
-extern inline void usbdevfs_cleanup(void) { }
+static inline int usbdevfs_init(void) { return 0; }
+static inline void usbdevfs_cleanup(void) { }
X
X #endif /* CONFIG_USB_DEVICEFS */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/net/ip.h linux/include/net/ip.h
--- v2.2.19/include/net/ip.h Sun Mar 25 17:37:40 2001


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 83'
echo 'File patch-2.2.20 is continued in part 84'
echo "84" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:05 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part66

#!/bin/sh -x
# this is part 66 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 66; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
@@ -20,9 +22,100 @@
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X *
+ * This driver creates a network interface (plusb0, plusb1, ...) that will
+ * send messages over a USB host-host cable based on the Prolific ASIC.
+ * It works a lot like plip or PP over an RS-232C null modem cable.
+ *
+ * Expect speeds of around 330Kbytes/second over a UHCI host controller.
+ * OHCI should be faster. Increase the MTU for faster transfers of large
+ * files (up-to 800Kbytes/second). (16384 is a good size)
X *
X * $Id: plusb.c,v 1.18 2000/02/14 10:38:58 fliegl Exp $
X *
+ * Changelog:
+ *
+ * v0.1 deti
+ * Original Version of driver.
+ * v0.2 15 Sep 2000 pavel
+ * Patches to decrease latency by rescheduling the bottom half of
+ * interrupt code.
+ * v0.3 10 Oct 2000 eric
+ * Patches to work in v2.2 backport (v2.4 changes the way net_dev.name
+ * is allocated)
+ * v0.4 19 Oct 2000 eric
+ * Some more performance fixes. Lock re-submitting urbs.
+ * Lower the number of sk_buff's to queue.
+ * v0.5 25 Oct 2000 eric
+ * Removed use of usb_bulk_msg() all together. This caused
+ * the driver to block in an interrupt context.
+ * Consolidate read urb submission into read_urb_submit().
+ * Performance is the same as v0.4.
+ * v0.5.1 27 Oct 2000 eric
+ * Extra debugging messages to help diagnose problem with uchi.o stack.
+ * v0.5.2 27 Oct 2000 eric
+ * Set the 'start' flag for the network device in plusb_net_start()
+ * and plusb_net_stop() (doesn't help)
+ * v0.5.3 27 Oct 2000 pavel
+ * Commented out handlers when -EPIPE is received,
+ * (remove calls to usb_clear_halt()) Since the callback is in
+ * an interrupt context, it doesn't help, it just panics
+ * the kernel. (what do we do?)
+ * Under high load, dev_alloc_skb() fails, the read URB must
+ * be re-submitted.
+ * Added plusb_change_mtu() and increased the size of _BULK_DATA_LEN
+ * v0.5.4 31 Oct 2000 eric
+ * Fix race between plusb_net_xmit() and plusb_bulk_write_complete()
+ * v0.5.5 1 Nov 2000 eric
+ * Remove dev->start field, otherwise, it won't compile in 2.4
+ * Use dev_kfree_skb_any(). (important in 2.4 kernel)
+ * v0.5.6 2 Nov 2000 pavel,eric
+ * Add calls to netif_stop_queue() and netif_start_queue()
+ * Drop packets that come in while the free list is empty.
+ * (This version is being submitted after the release of 2.4-test10)
+ * v0.5.7 6 Nov 2000
+ * Fix to not re-submit the urb on error to help when cables
+ * are yanked (not tested)
+ *
+ *
+ * KNOWN PROBLEMS: (Any suggestions greatfully accepted!)
+ *
+ * 2 Nov 2000
+ * - The shutdown for this may not be entirely clean. Sometimes, the
+ * kernel will Oops when the cable is unplugged, or
+ * if the plusb module is removed.
+ * - If you ifdown a device and then ifup it again, the link will not
+ * always work. You have to 'rmmod plusb ; modprobe plusb' on
+ * both machines to get it to work again. Something must be wrong with
+ * plusb_net_open() and plusb_net_start() ? Maybe
+ * the 'suspend' and 'resume' entry points need to be
+ * implemented?
+ * - Needs to handle -EPIPE correctly in bulk complete handlers.
+ * (replace usb_clear_halt() function with async urbs?)
+ * - I think this code relies too much on one spinlock and does
+ * too much in the interrupt handler. The net1080 code is
+ * much more elegant, and should work for this chip. Its
+ * only drawback is that it is going to be tough to backport
+ * it to v2.2.
+ * - Occasionally the device will hang under the 'uhci.o'
+ * driver. The workaround is to ifdown the device and
+ * remove the modules, then re-insert them. You may have
+ * better luck with the 'usb-uhci.o' driver.
+ * - After using ifconfig down ; ifconfig up, sometimes packets
+ * continue to be received, but there is a framing problem.
+ *
+ * FUTURE DIRECTIONS:
+ *
+ * - Fix the known problems.
+ * - There isn't much functional difference between the net1080
+ * driver and this one. It would be neat if the same driver
+ * could handle both types of chips. Or if both drivers
+ * could handle both types of chips - this one is easier to
+ * backport to the 2.2 kernel.
+ * - Get rid of plusb_add_buf_tail and the single spinlock.
+ * Use a separate spinlock for the 2 lists, and use atomic
+ * operators for writeurb_submitted and readurb_submitted members.
+ *
+ *
X */
X
X /*****************************************************************************/
@@ -40,23 +133,113 @@


X #include <linux/netdevice.h>
X #include <linux/etherdevice.h>

X #include <linux/skbuff.h>
-#define DEBUG
+//#define DEBUG 1
X #include <linux/usb.h>
X
-#include "plusb.h"
+#if (LINUX_VERSION_CODE < 0x020300)
+#define dev_kfree_skb_any dev_kfree_skb
+#endif
+


+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v0.5.7"


+#define DRIVER_AUTHOR "Deti Fliegl, de...@fliegl.de"

+#define DRIVER_DESC "PL-2302 USB Interface Driver for Linux (c)2000"
+
+/* Definitions formerly in plusb.h relocated. No need to export them -EZA */
+
+#define _PLUSB_INTPIPE 0x1
+#define _PLUSB_BULKOUTPIPE 0x2
+#define _PLUSB_BULKINPIPE 0x3
+
+#define _SKB_NUM 32
+
+/* increase size of BULK_DATA_LEN so we can use bigger MTU's*/
+#define _BULK_DATA_LEN 32768
+
+
+typedef struct
+{
+ int connected; /* indicates if this structure is active */
+ struct usb_device *usbdev;
+ /* keep track of USB structure */
+ int status; /* Prolific status byte returned from interrupt */
+ int in_bh; /* flag to indicate that we are in the bulk handler */
+ int opened; /* flag to indicate that network dev is open */
+
+ spinlock_t lock; /* Lock for the buffer list. re-used for
+ locking around submitting the readurb member.
+ */
+ urb_t *inturb; /* Read buffer for the interrupt callback */
+ unsigned char * interrupt_in_buffer;
+ /* holds data for the inturb*/
+ urb_t *readurb; /* Read buffer for the bulk data callback */
+ unsigned char * bulk_in_buffer;
+ /* kmalloc'ed data for the readurb */
+ int readurb_submitted;
+ /* Flag to indicate that readurb already sent */
+ urb_t *writeurb; /* Write buffer for the bulk data callback */
+ int writeurb_submitted;
+ /* Flag to indicate that writeurb already sent */
+
+ struct list_head tx_skb_list;
+ /* sk_buff's read from net device */
+ struct list_head free_skb_list;
+ /* free sk_buff list */
+ struct net_device net_dev;
+ /* handle to linux network device */
+ struct net_device_stats net_stats;
+ /* stats to return for ifconfig output */
+} plusb_t,*pplusb_t;
+
+/*
+ * skb_list - queue of packets from the network driver to be delivered to USB
+ */
+typedef struct
+{
+ struct list_head skb_list;
+ struct sk_buff *skb;
+ int state;
+ plusb_t *s;
+} skb_list_t,*pskb_list_t;
+


X
X /* --------------------------------------------------------------------- */
X

X #define NRPLUSB 4
X
+/*
+ * Interrupt endpoint status byte, from Prolific PL-2301 docs
+ * Check the 'download' link at www.prolifictech.com
+ */
+#define _PL_INT_RES1 0x80 /* reserved */
+#define _PL_INT_RES2 0x40 /* reserved */
+#define _PL_INT_RXD _PL_INT_RES2 /* Read data ready - Not documented by Prolific, but seems to work! */
+#define _PL_INT_TX_RDY 0x20 /* OK to transmit data */
+#define _PL_INT_RESET_O 0x10 /* reset output pipe */
+#define _PL_INT_RESET_I 0x08 /* reset input pipe */
+#define _PL_INT_TX_C 0x04 /* transmission complete */
+#define _PL_INT_TX_REQ 0x02 /* transmission received */
+#define _PL_INT_PEER_E 0x01 /* peer exists */
+
X /*-------------------------------------------------------------------*/
X
X static plusb_t plusb[NRPLUSB];
X
+static void plusb_write_bulk_complete(urb_t *purb);
+static void plusb_read_bulk_complete(urb_t *purb);
+static void plusb_int_complete(urb_t *purb);
+
X /* --------------------------------------------------------------------- */
+
+/*
+ * plusb_add_buf_tail - Take the head of the src list and append it to
+ * the tail of the dest list
+ */
X static int plusb_add_buf_tail (plusb_t *s, struct list_head *dst, struct list_head *src)
X {
- unsigned long flags;
+ unsigned long flags = 0;
X struct list_head *tmp;
X int ret = 0;
X
@@ -76,126 +259,218 @@
X }
X /*-------------------------------------------------------------------*/
X
-static int plusb_my_bulk(plusb_t *s, int pipe, void *data, int size, int *actual_length)
+/*
+ * dequeue_next_skb - submit the first thing on the tx_skb_list to the
+ * USB stack. This function should be called each time we get a new
+ * message to send to the other host, or each time a message is successfully
+ * sent.
+ */
+static void dequeue_next_skb(char * func, plusb_t * s)
X {
- int ret;
+ skb_list_t * skb_list;
+ unsigned long flags = 0;
X
- dbg("plusb_my_bulk: len:%d",size);
+ if (!s->connected)
+ return;
+
+ spin_lock_irqsave (&s->lock, flags);
+
+ if (!list_empty (&s->tx_skb_list) && !s->writeurb_submitted) {
+ int submit_ret;
+ skb_list = list_entry (s->tx_skb_list.next, skb_list_t, skb_list);
X
- ret=usb_bulk_msg(s->usbdev, pipe, data, size, actual_length, 500);
- if(ret<0) {
- err("plusb: usb_bulk_msg failed(%d)",ret);
+ if (skb_list->skb) {
+ s->writeurb_submitted = 1;
+
+ /* Use the buffer inside the sk_buff directly. why copy? */
+ FILL_BULK_URB_TO(s->writeurb, s->usbdev,
+ usb_sndbulkpipe(s->usbdev, _PLUSB_BULKOUTPIPE),
+ skb_list->skb->data, skb_list->skb->len,
+ plusb_write_bulk_complete, skb_list, 500);
+
+ dbg ("%s: %s: submitting urb. skb_list %p", s->net_dev.name, func, skb_list);
+
+ submit_ret = usb_submit_urb(s->writeurb);
+ if (submit_ret) {
+ s->writeurb_submitted = 0;
+ printk (KERN_CRIT "%s: %s: can't submit writeurb: %d\n",
+ s->net_dev.name, func, submit_ret);
+ }
+ } /* end if the skb value has been filled in */
X }
X
- if( ret == -EPIPE ) {
- warn("CLEAR_FEATURE request to remove STALL condition.");
- if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe)))
- err("request failed");
- }
-
- dbg("plusb_my_bulk: finished act: %d", *actual_length);
- return ret;
+ spin_unlock_irqrestore (&s->lock, flags);
X }
X
-/* --------------------------------------------------------------------- */
-
-static void plusb_bh(void *context)
+/*
+ * submit_read_urb - re-submit the read URB to the stack
+ */
+void submit_read_urb(char * func, plusb_t * s)
X {
- plusb_t *s=context;
- struct net_device_stats *stats=&s->net_stats;
- int ret=0;
- int actual_length;
- skb_list_t *skb_list;
- struct sk_buff *skb;
-
- dbg("plusb_bh: i:%d",in_interrupt());
+ unsigned long flags=0;
X
- while(!list_empty(&s->tx_skb_list)) {
-
- if(!(s->status&_PLUSB_TXOK))
- break;
-
- skb_list = list_entry (s->tx_skb_list.next, skb_list_t, skb_list);
- if(!skb_list->state) {
- dbg("plusb_bh: not yet ready");
- schedule();
- continue;
- }
-
- skb=skb_list->skb;
- ret=plusb_my_bulk(s, usb_sndbulkpipe (s->usbdev, _PLUSB_BULKOUTPIPE),
- skb->data, skb->len, &actual_length);
-
- if(ret || skb->len != actual_length ||!(skb->len%64)) {
- plusb_my_bulk(s, usb_sndbulkpipe (s->usbdev, _PLUSB_BULKOUTPIPE),
- NULL, 0, &actual_length);
- }
-
- if(!ret) {
- stats->tx_packets++;
- stats->tx_bytes+=skb->len;
- }
- else {
- stats->tx_errors++;
- stats->tx_aborted_errors++;
+ if (!s->connected)
+ return;
+
+ spin_lock_irqsave (&s->lock, flags);
+
+ if (!s->readurb_submitted) {
+ int ret;
+ s->readurb_submitted=1;
+ s->readurb->dev=s->usbdev;
+ ret = usb_submit_urb(s->readurb);
+ if (ret) {
+ printk (KERN_CRIT "%s: %s: error %d submitting read URB\n",
+ s->net_dev.name, func, ret);
+ s->readurb_submitted=0;
X }
-
- dbg("plusb_bh: dev_kfree_skb");
-
- dev_kfree_skb(skb);
- skb_list->state=0;
- plusb_add_buf_tail (s, &s->free_skb_list, &s->tx_skb_list);
X }
X
- dbg("plusb_bh: finished");
- s->in_bh=0;
+ spin_unlock_irqrestore (&s->lock, flags);
+
X }
-


X /* --------------------------------------------------------------------- */
X

+/*
+ * plusb_net_xmit - callback from the network device driver for outgoing data
+ *
+ * Data has arrived to the network device from the local machine and needs
+ * to be sent over the USB cable. This is in an interrupt, so we don't
+ * want to spend too much time in this function.
+ *
+ */
X static int plusb_net_xmit(struct sk_buff *skb, struct net_device *dev)
X {
X plusb_t *s=dev->priv;
X skb_list_t *skb_list;
- int ret=NET_XMIT_SUCCESS;
+ unsigned int flags;
X
X dbg("plusb_net_xmit: len:%d i:%d",skb->len,in_interrupt());
X
- if(!s->connected || list_empty(&s->free_skb_list)) {
- ret=NET_XMIT_CN;
- goto lab;
- }
+ if(!s->connected || !s->opened) {
+ /*
+ NOTE: If we get to this point, you'll return the error
+ kernel: virtual device plusb0 asks to queue packet
+
+ Other things we could do:
+ 1) just drop this packet
+ 2) drop other packets in the queue
+ */
+ return 1;
+ }
X
- plusb_add_buf_tail (s, &s->tx_skb_list, &s->free_skb_list);
+ spin_lock_irqsave (&s->lock, flags);
+
+ if (list_empty(&s->free_skb_list)
+ || plusb_add_buf_tail (s, &s->tx_skb_list, &s->free_skb_list)) {
+ /* The buffers on this side are full. DROP the packet
+ I think that this shouldn't happen with the correct
+ use of the netif_XXX functions -EZA
+ */
+ dbg ("plusb: Free list is empty.");
+ kfree_skb(skb);
+ s->net_stats.tx_dropped++;
+ spin_unlock_irqrestore (&s->lock, flags);


+ return 0;
+ }
+

X skb_list = list_entry (s->tx_skb_list.prev, skb_list_t, skb_list);
X skb_list->skb=skb;
X skb_list->state=1;
+ skb_list->s=s;
+
+ if (list_empty(&s->free_skb_list)) {
+ /* apply "backpressure". Tell the net layer to stop sending
+ the driver packets.
+ */
+ netif_stop_queue(dev);
+ }
+
+ spin_unlock_irqrestore (&s->lock, flags);
+
+ /* If there is no write urb outstanding, pull the first thing
+ off of the list and submit it to the USB stack
+ */
+ dequeue_next_skb("plusb_net_xmit", s);


+
+ return 0;
+}

X
-lab:
- if(s->in_bh)
- return ret;
+/* --------------------------------------------------------------------- */
X
- dbg("plusb_net_xmit: queue_task");
+/*
+ * plusb_write_bulk_complete () - callback after the data has been
+ * sent to the USB device, or a timeout occurred.
+ */
+static void plusb_write_bulk_complete(urb_t *purb)
+{
+ skb_list_t * skb_list=purb->context;
+ plusb_t *s=skb_list->s;
X
- s->in_bh=1;
- queue_task(&s->bh, &tq_scheduler);
+ dbg ("%s: plusb_write_bulk_complete: status:%d skb_list:%p\n",
+ s->net_dev.name, purb->status, skb_list);
X
- dbg("plusb_net_xmit: finished");
- return ret;
+ skb_list->state=0;
X
-}
+ if( purb->status == -EPIPE )
+ printk(KERN_CRIT "%s: plusb_write_bulk_complete: got -EPIPE and don't know what to do!\n",
+ s->net_dev.name);
+
+ if(!purb->status) {
+ s->net_stats.tx_packets++;
+ s->net_stats.tx_bytes+=skb_list->skb->len;
+ }
+ else {
+ err ("%s: plusb_write_bulk_complete: returned ERROR status:%d\n",
+ s->net_dev.name, purb->status);
X
-/* --------------------------------------------------------------------- */
+ s->net_stats.tx_errors++;
+ s->net_stats.tx_aborted_errors++;
+ }
+
+ dbg("plusb_bh: dev_kfree_skb");
+
+ /* NOTE: In 2.4 it's a problem to call dev_kfree_skb() in a hard IRQ:
+ Oct 28 23:42:14 bug kernel: Warning: kfree_skb on hard IRQ c023329a
+ */
+ dev_kfree_skb_any(skb_list->skb);
+
+ skb_list->skb = NULL;
+ if (plusb_add_buf_tail (s, &s->free_skb_list, &s->tx_skb_list)) {
+ err ("plusb: tx list empty. This shouldn't happen.");
+ }
X
-static void plusb_bulk_complete(urb_t *purb)
+ purb->status = 0;
+ s->writeurb_submitted = 0;
+
+ netif_wake_queue((&s->net_dev));
+
+ dequeue_next_skb("plusb_write_bulk_complete", s);
+
+
+}
+
+/*
+ * plusb_read_bulk_complete - Callback for data arriving from the USB device
+ *
+ * This gets called back when a full 'urb' is received from the remote system.
+ * This urb was allocated by this driver and is kept in the member: s->readurb
+ *
+ */
+static void plusb_read_bulk_complete(urb_t *purb)
X {
+
X plusb_t *s=purb->context;
X
- dbg("plusb_bulk_complete: status:%d length:%d",purb->status,purb->actual_length);
+ dbg("plusb_read_bulk_complete: status:%d length:%d", purb->status,purb->actual_length);
+
X if(!s->connected)
X return;
X
- if( !purb->status) {
+ if( purb->status == -EPIPE )
+ printk(KERN_CRIT "%s: plusb_read_bulk_complete: got -EPIPE and I don't know what to do!\n",
+ s->net_dev.name);
+ else if (!purb->status) {
X struct sk_buff *skb;
X unsigned char *dst;
X int len=purb->transfer_buffer_length;
@@ -204,31 +479,69 @@
X skb=dev_alloc_skb(len);
X
X if(!skb) {
- err("plusb_bulk_complete: dev_alloc_skb(%d)=NULL, dropping frame",len);
+ printk (KERN_CRIT "%s: plusb_read_bulk_complete: dev_alloc_skb(%d)=NULL, dropping frame\n", s->net_dev.name, len);
X stats->rx_dropped++;
- return;
+ } else {
+ dst=(char *)skb_put(skb, len);
+ memcpy( dst, purb->transfer_buffer, len);
+
+ skb->dev=&s->net_dev;
+ skb->protocol=eth_type_trans(skb, skb->dev);
+ stats->rx_packets++;
+ stats->rx_bytes+=len;
+ netif_rx(skb);
X }
+
+ }
+
+ s->readurb_submitted = 0;
+
+ if (purb->status) {
+ /* Give the system a chance to "catch its breath". Shortcut
+ re-submitting the read URB> It will be re-submitted if
+ another interrupt comes back. The problem scenario is that
+ the plub is pulled and the read returns an error.
+ You don't want to resumbit in this case.
+ */
+ err ("%s: plusb_read_bulk_complete: returned status %d\n",
+ s->net_dev.name, purb->status);
+ return;
+ }
X
- dst=(char *)skb_put(skb, len);
- memcpy( dst, purb->transfer_buffer, len);
X
- skb->dev=&s->net_dev;
- skb->protocol=eth_type_trans(skb, skb->dev);
- stats->rx_packets++;
- stats->rx_bytes+=len;
- netif_rx(skb);
- }
- else
- purb->status=0;
+ purb->status=0;
+
+ /* Keep it coming! resubmit the URB for reading.. Make sure
+ we aren't in contention with the interrupt callback.
+ */
+ submit_read_urb("plusb_read_bulk_complete", s);
X }
X
X /* --------------------------------------------------------------------- */
-
+/*
+ * plusb_int_complete - USB driver callback for interrupt msg from the device
+ *
+ * Interrupts are scheduled to go off on a periodic basis (see FILL_INT_URB)
+ * For the prolific device, this is basically just returning a register
+ * filled with bits. See the macro definitions for _PL_INT_XXX above.
+ * Most of these bits are for implementing a machine-machine protocol
+ * and can be set with a special message (described as the "Quicklink"
+ * feature in the prolific documentation.)
+ *
+ * I don't think we need any of that to work as a network device. If a
+ * message is lost, big deal - that's what UNIX networking expects from
+ * the physical layer.
+ *
+ */
X static void plusb_int_complete(urb_t *purb)
X {
X plusb_t *s=purb->context;
X s->status=((unsigned char*)purb->transfer_buffer)[0]&255;
+
X #if 0
+ /* This isn't right because 0x20 is TX_RDY and
+ sometimes will not be set
+ */
X if((s->status&0x3f)!=0x20) {
X warn("invalid device status %02X", s->status);
X return;
@@ -237,66 +550,95 @@
X if(!s->connected)
X return;
X
- if(s->status&_PLUSB_RXD) {
- int ret;
-
- if(s->bulkurb->status) {
- err("plusb_int_complete: URB still in use");
- return;
- }
-
- ret=usb_submit_urb(s->bulkurb);
- if(ret && ret!=-EBUSY) {
- err("plusb_int_complete: usb_submit_urb failed");
- }
- }
-
- if(purb->status || s->status!=160)
- dbg("status: %p %d buf: %02X", purb->dev, purb->status, s->status);
+ /* Don't turn this on unless you want to see the log flooded. */
+#if 0
+ printk("plusb_int_complete: PEER_E:%d TX_REQ:%d TX_C:%d RESET_IN:%d RESET_O: %d TX_RDY:%d RES1:%d RES2:%d\n",
+ s->status & _PL_INT_PEER_E ? 1 : 0,
+ s->status & _PL_INT_TX_REQ ? 1 : 0,
+ s->status & _PL_INT_TX_C ? 1 : 0,
+ s->status & _PL_INT_RESET_I ? 1 : 0,
+ s->status & _PL_INT_RESET_O ? 1 : 0,
+ s->status & _PL_INT_TX_RDY ? 1 : 0,
+ s->status & _PL_INT_RES1 ? 1 : 0,
+ s->status & _PL_INT_RES2 ? 1 : 0);
+#endif
+
+#if 1
+ /* At first glance, this logic appears to not really be needed, but
+ it can help recover from intermittent problems where the
+ usb_submit_urb() fails in the read callback. -EZA
+ */
+
+ /* Try to submit the read URB again. Make sure
+ we aren't in contention with the bulk read callback
+ */
+ submit_read_urb ("plusb_int_complete", s);
+
+ /* While we are at it, why not check to see if the
+ write urb should be re-submitted?
+ */
+ dequeue_next_skb("plusb_int_complete", s);
+
+#endif
+
X }
X
X /* --------------------------------------------------------------------- */
-
+/*
+ * plusb_free_all - deallocate all memory kept for an instance of the device.
+ */
X static void plusb_free_all(plusb_t *s)
X {
X struct list_head *skb;
X skb_list_t *skb_list;
X
X dbg("plusb_free_all");
+
+ /* set a flag to tell all callbacks to cease and desist */
+ s->connected = 0;
+
+ /* If the interrupt handler is about to fire, let it finish up */
X run_task_queue(&tq_immediate);
X
X if(s->inturb) {
X dbg("unlink inturb");
X usb_unlink_urb(s->inturb);
- }
-
- if(s->inturb && s->inturb->transfer_buffer) {
- dbg("kfree inturb->transfer_buffer");
- kfree(s->inturb->transfer_buffer);
- s->inturb->transfer_buffer=NULL;
- }
-
- if(s->inturb) {
X dbg("free_urb inturb");
X usb_free_urb(s->inturb);
X s->inturb=NULL;
X }
+
+ if(s->interrupt_in_buffer) {
+ dbg("kfree s->interrupt_in_buffer");
+ kfree(s->interrupt_in_buffer);
+ s->interrupt_in_buffer=NULL;
+ }
X
- if(s->bulkurb) {
- dbg("unlink bulkurb");
- usb_unlink_urb(s->bulkurb);
+ if(s->readurb) {
+ dbg("unlink readurb");
+ usb_unlink_urb(s->readurb);
+ dbg("free_urb readurb:");
+ usb_free_urb(s->readurb);
+ s->readurb=NULL;
X }
+
+ if(s->bulk_in_buffer) {
+ dbg("kfree s->bulk_in_buffer");
+ kfree(s->bulk_in_buffer);
+ s->bulk_in_buffer=NULL;
+ }
+
+ s->readurb_submitted = 0;
X
- if(s->bulkurb && s->bulkurb->transfer_buffer) {
- dbg("kfree bulkurb->transfer_buffer");
- kfree(s->bulkurb->transfer_buffer);
- s->bulkurb->transfer_buffer=NULL;
- }
- if(s->bulkurb) {
- dbg("free_urb bulkurb");
- usb_free_urb(s->bulkurb);
- s->bulkurb=NULL;
+ if(s->writeurb) {
+ dbg("unlink writeurb");
+ usb_unlink_urb(s->writeurb);
+ dbg("free_urb writeurb:");
+ usb_free_urb(s->writeurb);
+ s->writeurb=NULL;
X }
+
+ s->writeurb_submitted = 0;
X
X while(!list_empty(&s->free_skb_list)) {
X skb=s->free_skb_list.next;
@@ -309,20 +651,30 @@
X skb=s->tx_skb_list.next;
X list_del(skb);
X skb_list = list_entry (skb, skb_list_t, skb_list);
- kfree(skb_list);
+ if (skb_list->skb) {
+ dbg ("Freeing SKB in queue");
+ dev_kfree_skb_any(skb_list->skb);
+ skb_list->skb = NULL;
+ }
+ kfree(skb_list);
X }
+
+ s->in_bh=0;
+
X dbg("plusb_free_all: finished");
X }
X
X /*-------------------------------------------------------------------*/
-
+/*
+ * plusb_alloc - allocate memory associated with one instance of the device
+ */
X static int plusb_alloc(plusb_t *s)
X {
X int i;
X skb_list_t *skb;
X
X dbg("plusb_alloc");
-
+
X for(i=0 ; i < _SKB_NUM ; i++) {
X skb=kmalloc(sizeof(skb_list_t), GFP_KERNEL);
X if(!skb) {
@@ -340,47 +692,63 @@
X goto reject;
X }
X
- dbg("bulkurb allocation:");
- s->bulkurb=usb_alloc_urb(0);
- if(!s->bulkurb) {
+ dbg("bulk read urb allocation:");
+ s->readurb=usb_alloc_urb(0);
+ if(!s->readurb) {
X err("alloc_urb failed");
X goto reject;
X }
X
- dbg("bulkurb/inturb init:");
- s->inturb->dev=s->usbdev;
- s->inturb->pipe=usb_rcvintpipe (s->usbdev, _PLUSB_INTPIPE);
- s->inturb->transfer_buffer=kmalloc(64, GFP_KERNEL);
- if(!s->inturb->transfer_buffer) {
- err("kmalloc failed");
+ dbg("bulk write urb allocation:");
+ s->writeurb=usb_alloc_urb(0);
+ if(!s->writeurb) {
+ err("alloc_urb for writeurb failed");
X goto reject;
X }
X
- s->inturb->transfer_buffer_length=1;
- s->inturb->complete=plusb_int_complete;
- s->inturb->context=s;
- s->inturb->interval=10;
+ dbg("readurb/inturb init:");
+ s->interrupt_in_buffer=kmalloc(64, GFP_KERNEL);
+ if(!s->interrupt_in_buffer) {
+ err("kmalloc failed");
+ goto reject;
+ }
+
+ /* The original value of '10' makes this interrupt fire off a LOT.
+ It was set so low because the callback determined when to
+ sumbit the buld read URB. I've lowered it to 100 - the driver
+ doesn't depend on that logic anymore. -EZA
+ */
+ FILL_INT_URB(s->inturb, s->usbdev,
+ usb_rcvintpipe (s->usbdev, _PLUSB_INTPIPE),
+ s->interrupt_in_buffer, 1,
+ plusb_int_complete, s, HZ);
X
X dbg("inturb submission:");
X if(usb_submit_urb(s->inturb)<0) {
X err("usb_submit_urb failed");
X goto reject;
X }
-
- dbg("bulkurb init:");
- s->bulkurb->dev=s->usbdev;
- s->bulkurb->pipe=usb_rcvbulkpipe (s->usbdev, _PLUSB_BULKINPIPE);
- s->bulkurb->transfer_buffer=kmalloc(_BULK_DATA_LEN, GFP_KERNEL);
- if(!s->bulkurb->transfer_buffer) {
- err("kmalloc failed");
- goto reject;
- }
X
- s->bulkurb->transfer_buffer_length=_BULK_DATA_LEN;
- s->bulkurb->complete=plusb_bulk_complete;
- s->bulkurb->context=s;
-
- dbg("plusb_alloc: finished");
+ dbg("readurb init:");
+ s->bulk_in_buffer = kmalloc(_BULK_DATA_LEN, GFP_KERNEL);
+ if (!s->bulk_in_buffer) {
+ err("kmalloc %d bytes for bulk in buffer failed", _BULK_DATA_LEN);
+ }
+
+ FILL_BULK_URB(s->readurb, s->usbdev,
+ usb_rcvbulkpipe(s->usbdev, _PLUSB_BULKINPIPE),
+ s->bulk_in_buffer, _BULK_DATA_LEN,
+ plusb_read_bulk_complete, s);
+
+ /* The write urb will be initialized inside the network
+ interrupt.
+ */
+
+ /* get the bulk read going */
+ submit_read_urb("plusb_alloc", s);
+
+ dbg ("plusb_alloc: finished. readurb=%p writeurb=%p inturb=%p",
+ s->readurb, s->writeurb, s->inturb);


X
X return 0;
X

@@ -403,8 +771,11 @@
X return -ENOMEM;
X
X s->opened=1;
- MOD_INC_USE_COUNT;
X
+ MOD_INC_USE_COUNT;
+
+ netif_start_queue(dev);
+
X dbg("plusb_net_open: success");
X
X return 0;
@@ -416,11 +787,14 @@
X static int plusb_net_stop(struct net_device *dev)
X {
X plusb_t *s=dev->priv;
+
+ netif_stop_queue(dev);
X
X dbg("plusb_net_stop");
X
- plusb_free_all(s);
X s->opened=0;
+ plusb_free_all(s);
+
X MOD_DEC_USE_COUNT;
X dbg("plusb_net_stop:finished");
X return 0;
@@ -457,33 +831,43 @@
X {
X plusb_t *s = ptr;
X
- printk ("plusb_net_disconnect: Starting\n");
-
X dbg("plusb_disconnect");
X
- s->connected = 0;
-
X plusb_free_all(s);
X
X if(!s->opened && s->net_dev.name) {
X dbg("unregistering netdev: %s",s->net_dev.name);
X unregister_netdev(&s->net_dev);
X s->net_dev.name[0] = '\0';
-#if (LINUX_VERSION_CODE < 0x020300)
- kfree (s->net_dev.name);
- s->net_dev.name = NULL;
-#endif
+#if (LINUX_VERSION_CODE < 0x020300)
+ dbg("plusb_disconnect: About to free name");
+ kfree (s->net_dev.name);
+ s->net_dev.name = NULL;
+#endif
X }
X
X dbg("plusb_disconnect: finished");
-
- printk ("plusb_net_disconnect: Finished\n");
-
X MOD_DEC_USE_COUNT;
X }
X
X /* --------------------------------------------------------------------- */
X
+static int plusb_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > _BULK_DATA_LEN))
+ return -EINVAL;
+
+ printk("plusb: changing mtu to %d\n", new_mtu);
+ dev->mtu = new_mtu;
+
+ /* NOTE: Could we change the size of the READ URB here dynamically
+ to save kernel memory?
+ */


+ return 0;
+}
+

+/* --------------------------------------------------------------------- */
+
X int plusb_net_init(struct net_device *dev)
X {
X dbg("plusb_net_init");
@@ -493,7 +877,14 @@
X dev->hard_start_xmit=plusb_net_xmit;
X dev->get_stats = plusb_net_get_stats;
X ether_setup(dev);
- dev->tx_queue_len = 0;
+ dev->change_mtu = plusb_change_mtu;
+ /* Setting the default MTU to 16K gives good performance for
+ me, and keeps the ping latency low too. Setting it up
+ to 32K made performance go down. -EZA
+ Pavel says it would be best not to do this...
+ */
+ /*dev->mtu=16384; */
+ dev->tx_queue_len = 0;
X dev->flags = IFF_POINTOPOINT|IFF_NOARP;
X
X
@@ -507,14 +898,8 @@
X {
X plusb_t *s;
X
- printk ("plusb_probe: Starting\n");
-
- if (usbdev) {
- printk("plusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d\n",
- usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, ifnum);
- } else {
- printk ("plusb: usbdev is NULL!\n");
- }
+ dbg("plusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d",
+ usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, ifnum);
X
X if (usbdev->descriptor.idVendor != 0x067b || usbdev->descriptor.idProduct > 0x1)
X return NULL;
@@ -523,61 +908,58 @@
X if (usbdev->descriptor.bNumConfigurations != 1)
X return NULL;
X
- printk ("plusb_probe: Looking for Struct\n");
X s = plusb_find_struct ();
X if (!s)
X return NULL;
X
X s->usbdev = usbdev;
X
- printk ("plusb_probe: Setting Configuration\n");
X if (usb_set_configuration (s->usbdev, usbdev->config[0].bConfigurationValue) < 0) {
X err("set_configuration failed");


X return NULL;
X }
X

- printk ("plusb_probe: Setting Interface\n");
X if (usb_set_interface (s->usbdev, 0, 0) < 0) {
X err("set_interface failed");


X return NULL;
X }
X

- printk ("plusb_probe: Checking device name\n");
-
X #if (LINUX_VERSION_CODE < 0x020300)
- {
- int i;
+ {
+ int i;
X
- /* EZA: find the device number... we seem to have lost it...*/
- for (i=0; i<NRPLUSB; i++) {
- if (&plusb[i] == s)
- break;
- }
-
- /* EZA: for Kernel version 2.2, the driver is responsible for
- allocating this memory. For version 2.4, the rules
- have apparently changed, but there is a nifty function
- 'init_netdev' that might make this easier... It's in
- ../net/net_init.c - but can we get there from here? (no)
- */
- if(!s->net_dev.name) {
- s->net_dev.name = kmalloc(strlen("plusbXXXX"), GFP_KERNEL);
- sprintf (s->net_dev.name, "plusb%d", i);
- s->net_dev.init=plusb_net_init;
- s->net_dev.priv=s;
-
- printk ("plusb_probe: Registering Device\n");
- if(!register_netdev(&s->net_dev))
- info("registered: %s", s->net_dev.name);
- else {
- err("register_netdev failed");
- s->net_dev.name[0] = '\0';
- }
- printk ("plusb_probe: Connected!\n");
- }
- }
+ /* For Kernel version 2.2, the driver is responsible for
+ allocating this memory. For version 2.4, the rules
+ have apparently changed, but there is a nifty function
+ 'init_netdev' that might make this easier... It's in
+ ../net/net_init.c - but can we get there from here? (no)
+ -EZA
+ */
+
+ /* Find the device number... we seem to have lost it... -EZA */
+ for (i=0; i<NRPLUSB; i++) {
+ if (&plusb[i] == s)
+ break;
+ }
+
+ if(!s->net_dev.name) {
+ s->net_dev.name = kmalloc(strlen("plusbXXXX"), GFP_KERNEL);
+ sprintf (s->net_dev.name, "plusb%d", i);
+ s->net_dev.init=plusb_net_init;
+ s->net_dev.priv=s;
+
+ printk ("plusb_probe: Registering Device\n");
+ if(!register_netdev(&s->net_dev))
+ info("registered: %s", s->net_dev.name);
+ else {
+ err("register_netdev failed");
+ s->net_dev.name[0] = '\0';
+ }
+ dbg ("plusb_probe: Connected!");
+ }
+ }
X #else
- /* Kernel version 2.3+ works a little bit differently */
+ /* Kernel version 2.3+ works a little bit differently than 2.2 */
X if(!s->net_dev.name[0]) {
X strcpy(s->net_dev.name, "plusb%d");
X s->net_dev.init=plusb_net_init;
@@ -589,10 +971,9 @@
X s->net_dev.name[0] = '\0';
X }
X }
-
X #endif
+
X s->connected = 1;
- printk ("plusb_probe: Set Connected\n");
X
X if(s->opened) {
X dbg("net device already allocated, restarting USB transfers");
@@ -617,32 +998,24 @@
X static int __init plusb_init (void)
X {
X unsigned u;
-
X dbg("plusb_init");
X
X /* initialize struct */
X for (u = 0; u < NRPLUSB; u++) {
- plusb_t *s;
- dbg("plusb_init: u=%ud about to assign s\n", u);
- s= &plusb[u];
- dbg("plusb_init: u=%ud about to memset\n", u);
+ plusb_t *s = &plusb[u];
X memset (s, 0, sizeof (plusb_t));
- s->bh.routine = (void (*)(void *))plusb_bh;
- s->bh.data = s;
- dbg("plusb_init: u=%ud about to init list head\n", u);
X INIT_LIST_HEAD (&s->tx_skb_list);
X INIT_LIST_HEAD (&s->free_skb_list);
- dbg("plusb_init: u=%ud about to init spin lock\n", u);
X spin_lock_init (&s->lock);
X }
-
- dbg ("plusb_init: Initialized structure\n");
-
+
X /* register misc device */
X usb_register (&plusb_driver);
X
X dbg("plusb_init: driver registered");
X
+ info(DRIVER_VERSION ":" DRIVER_DESC);


+
X return 0;
X }
X

@@ -655,10 +1028,21 @@
X dbg("plusb_cleanup");
X for (u = 0; u < NRPLUSB; u++) {
X plusb_t *s = &plusb[u];
+#if (LINUX_VERSION_CODE < 0x020300)
+ if(s->net_dev.name) {
+ dbg("unregistering netdev: %s",s->net_dev.name);
+ unregister_netdev(&s->net_dev);
+ s->net_dev.name[0] = '\0';
+ kfree (s->net_dev.name);
+ s->net_dev.name = NULL;
+ }
+#else
X if(s->net_dev.name[0]) {
X dbg("unregistering netdev: %s",s->net_dev.name);
X unregister_netdev(&s->net_dev);
+ s->net_dev.name[0] = '\0';
X }
+#endif
X }
X usb_deregister (&plusb_driver);
X dbg("plusb_cleanup: finished");
@@ -666,8 +1050,8 @@


X
X /* --------------------------------------------------------------------- */
X
-MODULE_AUTHOR ("Deti Fliegl, de...@fliegl.de");

-MODULE_DESCRIPTION ("PL-2302 USB Interface Driver for Linux (c)2000");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
X

X
X module_init (plusb_init);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/plusb.h linux/drivers/usb/plusb.h
--- v2.2.19/drivers/usb/plusb.h Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/plusb.h Thu Jan 1 01:00:00 1970
@@ -1,48 +0,0 @@
-#define _PLUSB_INTPIPE 0x1
-#define _PLUSB_BULKOUTPIPE 0x2
-#define _PLUSB_BULKINPIPE 0x3
-
-#define _SKB_NUM 1000
-// 7 6 5 4 3 2 1 0
-// tx rx 1 0
-// 1110 0000 rxdata
-// 1010 0000 idle
-// 0010 0000 tx over
-// 0110 tx over + rxd
-
-#define _PLUSB_RXD 0x40
-#define _PLUSB_TXOK 0x80
-
-#ifdef __KERNEL__
-#define _BULK_DATA_LEN 16384
-
-typedef struct
-{
- struct list_head skb_list;
- struct sk_buff *skb;
- int state;
-} skb_list_t,*pskb_list_t;
-
-typedef struct
-{
- struct usb_device *usbdev;
-
- int status;
- int connected;
- int in_bh;
- int opened;
-
- spinlock_t lock;
-
- urb_t *inturb;
- urb_t *bulkurb;
-
- struct list_head tx_skb_list;
- struct list_head free_skb_list;
- struct tq_struct bh;
-
- struct net_device net_dev;
- struct net_device_stats net_stats;
-} plusb_t,*pplusb_t;
-
-#endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/printer.c linux/drivers/usb/printer.c
--- v2.2.19/drivers/usb/printer.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/printer.c Wed Oct 10 01:41:26 2001
@@ -460,7 +460,7 @@
X struct usb_endpoint_descriptor *epread, *epwrite;
X struct usblp *usblp;
X int minor, i, bidir = 0, quirks;
- int alts = dev->actconfig->interface[ifnum].act_altsetting;
+ int alts = -1;
X int length, err;
X char *buf;
X
@@ -474,12 +474,18 @@
X (interface->bInterfaceProtocol > 1 && interface->bNumEndpoints < 2))
X continue;
X
+ if (alts == -1)
+ alts = i;
+
X if (interface->bInterfaceProtocol > 1) {
X bidir = 1;
X alts = i;
X break;
X }
X }
+
+ if (alts == -1)
+ return NULL;
X
X interface = &dev->actconfig->interface[ifnum].altsetting[alts];
X if (usb_set_interface(dev, ifnum, alts))
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/rio500.c linux/drivers/usb/rio500.c
--- v2.2.19/drivers/usb/rio500.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/rio500.c Wed Oct 10 01:41:28 2001
@@ -40,6 +40,13 @@
X
X #include "rio500_usb.h"
X

+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v1.0.0"
+#define DRIVER_AUTHOR "Cesar Miquel <miq...@df.uba.ar>"
+#define DRIVER_DESC "USB Rio 500 driver"
+
X #define RIO_MINOR 64
X
X /* stall/wait timeout for rio */
@@ -121,16 +128,21 @@
X data = (void *) arg;
X if (data == NULL)
X break;
- if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand)))
- return -EFAULT;
- if (rio_cmd.length > PAGE_SIZE)
- return -EINVAL;
+ if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) {
+ retval = -EFAULT;
+ goto err_out;
+ }
+ if (rio_cmd.length > PAGE_SIZE) {
+ retval = -EINVAL;
+ goto err_out;
+ }
X buffer = (unsigned char *) __get_free_page(GFP_KERNEL);
X if (buffer == NULL)
X return -ENOMEM;
X if (copy_from_user(buffer, rio_cmd.buffer, rio_cmd.length)) {
+ retval = -EFAULT;
X free_page((unsigned long) buffer);
- return -EFAULT;


+ goto err_out;
X }
X

X requesttype = rio_cmd.requesttype | USB_DIR_IN |
@@ -466,8 +478,7 @@
X release: close_rio,
X };
X
-static struct
-usb_driver rio_driver = {
+static struct usb_driver rio_driver = {
X name: "rio500",
X probe: probe_rio,
X disconnect: disconnect_rio,
@@ -481,6 +492,8 @@
X return -1;
X
X info("USB Rio support registered.");
+ info(DRIVER_VERSION ":" DRIVER_DESC);


+
X return 0;
X }
X

@@ -498,5 +511,6 @@
X module_init(usb_rio_init);
X module_exit(usb_rio_cleanup);
X
-MODULE_AUTHOR("Cesar Miquel <miq...@df.uba.ar>");
-MODULE_DESCRIPTION("USB Rio 500 driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );

+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/scanner.c linux/drivers/usb/scanner.c
--- v2.2.19/drivers/usb/scanner.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/scanner.c Wed Oct 10 01:41:28 2001
@@ -1,7 +1,7 @@
X /* -*- linux-c -*- */
X
X /*
- * Driver for USB Scanners (linux-2.4.0test1-ac7)
+ * Driver for USB Scanners (linux-2.4.0)
X *
X * Copyright (C) 1999, 2000 David E. Nelson
X *
@@ -199,6 +199,34 @@
X * - Fixed HP S20 ID's...again..sigh. Thanks to Ruud
X * Linders <rlin...@xs4all.nl>.
X *
+ * 0.4.4
+ * - Added addtional Mustek ID's (BearPaw 1200, 600 CU, 1200 USB,
+ * and 1200 UB. Thanks to Henning Meier-Geinitz <henn...@gmx.de>.
+ * - Added the Vuego Scan Brisa 340U ID's. Apparently this scanner is
+ * marketed by Acer Peripherals as a cheap 300 dpi model. Thanks to
+ * David Gundersen <gund...@paradise.net.nz>.
+ * - Added the Epson Expression1600 ID's. Thanks to Karl Heinz
+ * Kremer <k...@khk.net>.
+ *
+ * 0.4.5 2/28/2001
+ * - Added Mustek ID's (BearPaw 2400, 1200 CU Plus, BearPaw 1200F).
+ * Thanks to Henning Meier-Geinitz <henn...@gmx.de>.
+ * - Added read_timeout module parameter to override RD_NAK_TIMEOUT
+ * when read()'ing from devices.
+ * - Stalled pipes are now checked and cleared with
+ * usb_clear_halt() for the read_scanner() function. This should
+ * address the "funky result: -32" error messages.
+ * - Removed Microtek scanner ID's. Microtek scanners are now
+ * supported via the drivers/usb/microtek.c driver.
+ * - Added scanner specific read timeout's.
+ * - Return status errors are NEGATIVE!!! This should address the
+ * "funky result: -110" error messages.
+ * - Replaced USB_ST_TIMEOUT with ETIMEDOUT.
+ * - rd_nak was still defined in MODULE_PARM. It's been updated with
+ * read_timeout. Thanks to Mark W. Webb <mark...@adelphia.net> for
+ * reporting this bug.
+ * - Added Epson Perfection 1640SU and 1640SU Photo. Thanks to
+ * Jean-Luc <f5...@db0bm.ampr.org>.
X *
X * TODO
X *
@@ -236,6 +264,7 @@
X */
X #include "scanner.h"
X
+
X static void
X irq_scanner(struct urb *urb)
X {
@@ -266,13 +295,18 @@
X
X kdev_t scn_minor;
X
+ int err=0;
+
+ lock_kernel();
+
X scn_minor = USB_SCN_MINOR(inode);
X
X dbg("open_scanner: scn_minor:%d", scn_minor);
X
X if (!p_scn_table[scn_minor]) {
X err("open_scanner(%d): Unable to access minor data", scn_minor);
- return -ENODEV;
+ err = -ENODEV;
+ goto out_error;
X }
X
X scn = p_scn_table[scn_minor];
@@ -281,17 +315,20 @@
X
X if (!dev) {
X err("open_scanner(%d): Scanner device not present", scn_minor);
- return -ENODEV;
+ err = -ENODEV;
+ goto out_error;
X }
X
X if (!scn->present) {
X err("open_scanner(%d): Scanner is not present", scn_minor);
- return -ENODEV;
+ err = -ENODEV;
+ goto out_error;
X }
X
X if (scn->isopen) {
X err("open_scanner(%d): Scanner device is already open", scn_minor);
- return -EBUSY;
+ err = -EBUSY;
+ goto out_error;
X }
X
X init_waitqueue_head(&scn->rd_wait_q);
@@ -302,7 +339,11 @@
X
X MOD_INC_USE_COUNT;
X
- return 0;
+out_error:
+
+ unlock_kernel();
+
+ return err;


X }
X
X static int

@@ -338,7 +379,7 @@
X {
X struct scn_usb_data *scn;
X struct usb_device *dev;
-
+
X ssize_t bytes_written = 0; /* Overall count of bytes written */
X ssize_t ret = 0;
X
@@ -347,7 +388,7 @@
X int this_write; /* Number of bytes to write */
X int partial; /* Number of bytes successfully written */
X int result = 0;
-
+
X char *obuf;
X
X scn = file->private_data;
@@ -360,6 +401,8 @@
X
X file->f_dentry->d_inode->i_atime = CURRENT_TIME;
X
+ down(&(scn->gen_lock));
+
X while (count > 0) {
X
X if (signal_pending(current)) {
@@ -368,7 +411,7 @@
X }
X
X this_write = (count >= OBUF_SIZE) ? OBUF_SIZE : count;
-
+
X if (copy_from_user(scn->obuf, buffer, this_write)) {
X ret = -EFAULT;
X break;
@@ -377,15 +420,15 @@
X result = usb_bulk_msg(dev,usb_sndbulkpipe(dev, scn->bulk_out_ep), obuf, this_write, &partial, 60*HZ);
X dbg("write stats(%d): result:%d this_write:%d partial:%d", scn_minor, result, this_write, partial);
X
- if (result == USB_ST_TIMEOUT) { /* NAK -- shouldn't happen */
+ if (result == -ETIMEDOUT) { /* NAK -- shouldn't happen */
X warn("write_scanner: NAK received.");
- ret = -ETIME;
+ ret = result;
X break;
X } else if (result < 0) { /* We should not get any I/O errors */
X warn("write_scanner(%d): funky result: %d. Please notify the maintainer.", scn_minor, result);
X ret = -EIO;
X break;
- }
+ }
X
X #ifdef WR_DATA_DUMP
X if (partial) {
@@ -412,6 +455,7 @@
X break;
X }
X }
+ up(&(scn->gen_lock));
X mdelay(5); /* This seems to help with SANE queries */
X return ret ? ret : bytes_written;
X }
@@ -450,6 +494,7 @@
X atime of
X the device
X node */
+ down(&(scn->gen_lock));
X
X while (count > 0) {
X if (signal_pending(current)) {
@@ -458,11 +503,11 @@
X }
X
X this_read = (count >= IBUF_SIZE) ? IBUF_SIZE : count;
-
- result = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, scn->bulk_in_ep), ibuf, this_read, &partial, RD_NAK_TIMEOUT);
+
+ result = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, scn->bulk_in_ep), ibuf, this_read, &partial, scn->rd_nak_timeout);
X dbg("read stats(%d): result:%d this_read:%d partial:%d count:%d", scn_minor, result, this_read, partial, count);
X
-/*
+/*
X * Scanners are sometimes inheriently slow since they are mechanical
X * in nature. USB bulk reads tend to timeout while the scanner is
X * positioning, resetting, warming up the lamp, etc if the timeout is
@@ -473,26 +518,38 @@
X * that something had hung or crashed when in fact the USB read was
X * just waiting on data. So, the below code retains the same long
X * timeout period, but splits it up into smaller parts so that
- * Ctrl-C's are acted upon in a reasonable amount of time.
+ * Ctrl-C's are acted upon in a reasonable amount of time.
X */
X
- if (result == USB_ST_TIMEOUT && !partial) { /* Timeout
- and no
- data */
- if (--rd_expire <= 0) {
- warn("read_scanner(%d): excessive NAK's received", scn_minor);
- ret = -ETIME;
- break;
- } else {
- interruptible_sleep_on_timeout(&scn->rd_wait_q, RD_NAK_TIMEOUT);
- continue;
+ if (result == -ETIMEDOUT) { /* NAK */
+ if (!partial) { /* No data */
+ if (--rd_expire <= 0) { /* Give it up */
+ warn("read_scanner(%d): excessive NAK's received", scn_minor);
+ ret = result;
+ break;
+ } else { /* Keep trying to read data */
+ interruptible_sleep_on_timeout(&scn->rd_wait_q, scn->rd_nak_timeout);
+ continue;
+ }
+ } else { /* Timeout w/ some data */
+ goto data_recvd;
X }
+ }
+
+ if (result == -EPIPE) { /* No hope */
+ if(usb_clear_halt(dev, scn->bulk_in_ep)) {
+ err("read_scanner(%d): Failure to clear endpoint halt condition (%Zd).", scn_minor, ret);
+ }
+ ret = result;
+ break;
X } else if ((result < 0) && (result != USB_ST_DATAUNDERRUN)) {
X warn("read_scanner(%d): funky result:%d. Please notify the maintainer.", scn_minor, (int)result);
X ret = -EIO;
X break;
X }
X
+ data_recvd:
+
X #ifdef RD_DATA_DUMP
X if (partial) {
X unsigned char cnt, cnt_max;
@@ -518,7 +575,8 @@
X break;
X }
X }
-
+ up(&(scn->gen_lock));
+
X return ret ? ret : bytes_read;
X }
X
@@ -528,7 +586,7 @@
X struct scn_usb_data *scn;
X struct usb_interface_descriptor *interface;
X struct usb_endpoint_descriptor *endpoint;
-
+
X int ep_cnt;
X int ix;
X
@@ -550,7 +608,7 @@
X * 3. Determine/Assign Intr Endpoint
X */
X
-/*
+/*
X * There doesn't seem to be an imaging class defined in the USB
X * Spec. (yet). If there is, HP isn't following it and it doesn't
X * look like anybody else is either. Therefore, we have to test the
@@ -577,7 +635,7 @@
X dev->descriptor.idProduct == product) { /* User specified */
X valid_device = 1;
X }
-
+
X if (!valid_device)
X return NULL; /* We didn't find anything pleasing */
X
@@ -599,7 +657,7 @@
X interface = dev->config[0].interface[ifnum].altsetting;
X endpoint = interface[ifnum].endpoint;
X
-/*
+/*
X * Start checking for two bulk endpoints OR two bulk endpoints *and* one
X * interrupt endpoint. If we have an interrupt endpoint go ahead and
X * setup the handler. FIXME: This is a future enhancement...
@@ -622,7 +680,7 @@
X dbg("probe_scanner: bulk_in_ep:%d", have_bulk_in);
X continue;
X }
-
+
X if (!have_bulk_out && IS_EP_BULK_OUT(endpoint[ep_cnt])) {
X ep_cnt++;
X have_bulk_out = ep_cnt;
@@ -665,7 +723,7 @@
X }
X
X
-/*
+/*
X * Determine a minor number and initialize the structure associated
X * with it. The problem with this is that we are counting on the fact
X * that the user will sequentially add device nodes for the scanner
@@ -695,7 +753,7 @@
X /* Ok, if we detected an interrupt EP, setup a handler for it */
X if (have_intr) {
X dbg("probe_scanner(%d): Configuring IRQ handler for intr EP:%d", scn_minor, have_intr);
- FILL_INT_URB(&scn->scn_irq, dev,
+ FILL_INT_URB(&scn->scn_irq, dev,
X usb_rcvintpipe(dev, have_intr),
X &scn->button, 1, irq_scanner, scn,
X // endpoint[(int)have_intr].bInterval);
@@ -724,6 +782,26 @@
X return NULL;
X }
X dbg("probe_scanner(%d): ibuf address:%p", scn_minor, scn->ibuf);
+
+
+ switch (dev->descriptor.idVendor) { /* Scanner specific read timeout parameters */
+ case 0x04b8: /* Seiko/Epson */
+ scn->rd_nak_timeout = HZ * 40;
+ break;
+ case 0x055f: /* Mustek */
+ case 0x0400: /* Another Mustek */
+ case 0x0ff5: /* And yet another Mustek */
+ scn->rd_nak_timeout = HZ * 1;
+ default:
+ scn->rd_nak_timeout = RD_NAK_TIMEOUT;
+ }
+
+
+ if (read_timeout > 0) { /* User specified read timeout overrides everything */
+ info("probe_scanner: User specified USB read timeout - %d", read_timeout);
+ scn->rd_nak_timeout = read_timeout;
+ }
+
X
X scn->bulk_in_ep = have_bulk_in;
X scn->bulk_out_ep = have_bulk_out;
@@ -733,6 +811,8 @@
X scn->scn_minor = scn_minor;
X scn->isopen = 0;
X
+ init_MUTEX(&(scn->gen_lock));
+
X return p_scn_table[scn_minor] = scn;
X }
X
@@ -740,7 +820,7 @@
X disconnect_scanner(struct usb_device *dev, void *ptr)
X {
X struct scn_usb_data *scn = (struct scn_usb_data *) ptr;
-
+
X if(scn->intr_ep) {
X dbg("disconnect_scanner(%d): Unlinking IRQ URB", scn->scn_minor);
X usb_unlink_urb(&scn->scn_irq);
@@ -762,11 +842,11 @@
X unsigned int cmd, unsigned long arg)
X {
X struct usb_device *dev;
-
+
X int result;
X
X kdev_t scn_minor;
-
+
X scn_minor = USB_SCN_MINOR(inode);
X
X if (!p_scn_table[scn_minor]) {
@@ -775,7 +855,7 @@
X }
X
X dev = p_scn_table[scn_minor]->scn_dev;
-
+
X switch (cmd)
X {
X case PV8630_IOCTL_INREQUEST :
@@ -786,10 +866,10 @@
X __u16 value;
X __u16 index;
X } args;
-
+
X if (copy_from_user(&args, (void *)arg, sizeof(args)))
X return -EFAULT;
-
+
X result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
X args.request, USB_TYPE_VENDOR|
X USB_RECIP_DEVICE|USB_DIR_IN,
@@ -802,7 +882,7 @@
X return -EFAULT;
X
X dbg("ioctl_scanner(%d): inreq: result:%d\n", scn_minor, result);
-

+
X return result;
X }

X case PV8630_IOCTL_OUTREQUEST :
@@ -812,10 +892,10 @@
X __u16 value;
X __u16 index;
X } args;
-
+
X if (copy_from_user(&args, (void *)arg, sizeof(args)))
X return -EFAULT;
-
+
X dbg("ioctl_scanner(%d): outreq: args.value:%x args.index:%x args.request:%x\n", scn_minor, args.value, args.index, args.request);
X
X result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
@@ -825,7 +905,7 @@
X 0, HZ*5);
X
X dbg("ioctl_scanner(%d): outreq: result:%d\n", scn_minor, result);
-

+
X return result;
X }

X default:
@@ -848,12 +928,11 @@
X
X static struct
X usb_driver scanner_driver = {
- "usbscanner",
- probe_scanner,
- disconnect_scanner,
- { NULL, NULL },
- &usb_scanner_fops,
- SCN_BASE_MNR
+ name: "usbscanner",
+ probe: probe_scanner,
+ disconnect: disconnect_scanner,
+ fops: &usb_scanner_fops,
+ minor: SCN_BASE_MNR,
X };
X
X void __exit
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/scanner.h linux/drivers/usb/scanner.h
--- v2.2.19/drivers/usb/scanner.h Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/scanner.h Wed Oct 10 01:41:28 2001
@@ -1,5 +1,5 @@
X /*
- * Driver for USB Scanners (linux-2.4.0test1-ac7)
+ * Driver for USB Scanners (linux-2.4.0)
X *
X * Copyright (C) 1999, 2000 David E. Nelson
X *
@@ -30,12 +30,13 @@
X #include <linux/delay.h>
X #include <linux/ioctl.h>
X #include <linux/sched.h>
+#include <linux/smp_lock.h>
X
X // #define DEBUG


X
X #include <linux/usb.h>
X

-static __s32 vendor=-1, product=-1;
+static __s32 vendor=-1, product=-1, read_timeout=0;
X
X MODULE_AUTHOR("David E. Nelson, dne...@jump.net, http://www.jump.net/~dnelson");
X MODULE_DESCRIPTION("USB Scanner Driver");
@@ -46,6 +47,9 @@
X MODULE_PARM(product, "i");
X MODULE_PARM_DESC(product, "User specified USB idProduct");
X
+MODULE_PARM(read_timeout, "i");
+MODULE_PARM_DESC(read_timeout, "User specified read timeout in seconds");
+
X
X /* Enable to activate the ioctl interface. This is mainly meant for */
X /* development purposes until an ioctl number is officially registered */
@@ -72,7 +76,7 @@
X #define OBUF_SIZE 4096
X
X /* read_scanner timeouts -- RD_NAK_TIMEOUT * RD_EXPIRE = Number of seconds */
-#define RD_NAK_TIMEOUT (10*HZ) /* Number of X seconds to wait */
+#define RD_NAK_TIMEOUT (10*HZ) /* Default number of X seconds to wait */
X #define RD_EXPIRE 12 /* Number of attempts to wait X seconds */
X
X
@@ -89,11 +93,13 @@
X unsigned int ifnum; /* Interface number of the USB device */
X kdev_t scn_minor; /* Scanner minor - used in disconnect() */
X unsigned char button; /* Front panel buffer */
- char isopen; /* Not zero if the device is open */
+ char isopen; /* Not zero if the device is open */
X char present; /* Not zero if device is present */
X char *obuf, *ibuf; /* transfer buffers */
X char bulk_in_ep, bulk_out_ep, intr_ep; /* Endpoint assignments */
X wait_queue_head_t rd_wait_q; /* read timeouts */
+ struct semaphore gen_lock; /* lock to prevent concurrent reads or writes */
+ unsigned int rd_nak_timeout; /* Seconds to wait before read() timeout. */
X };
X
X static struct scn_usb_data *p_scn_table[SCN_MAX_MNR] = { NULL, /* ... */};
@@ -106,8 +112,10 @@
X /* Acer */
X { 0x04a5, 0x2060 }, /* Prisa Acerscan 620U & 640U (!) */
X { 0x04a5, 0x2040 }, /* Prisa AcerScan 620U (!) */
+ { 0x04a5, 0x2022 }, /* Vuego Scan Brisa 340U */
X /* Agfa */
X { 0x06bd, 0x0001 }, /* SnapScan 1212U */
+ { 0x06bd, 0x0002 }, /* SnapScan 1236U */
X { 0x06bd, 0x2061 }, /* Another SnapScan 1212U (?) */
X { 0x06bd, 0x0100 }, /* SnapScan Touch */
X /* Colorado -- See Primax/Colorado below */
@@ -120,20 +128,28 @@
X { 0x03f0, 0x0105 }, /* 4200C */
X { 0x03f0, 0x0102 }, /* PhotoSmart S20 */
X { 0x03f0, 0x0401 }, /* 5200C */
+ // { 0x03f0, 0x0701 }, /* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */
X { 0x03f0, 0x0201 }, /* 6200C */
X { 0x03f0, 0x0601 }, /* 6300C */
X /* iVina */
X { 0x0638, 0x0268 }, /* 1200U */
- /* Microtek */
- { 0x05da, 0x0099 }, /* ScanMaker X6 - X6U */
- { 0x05da, 0x0094 }, /* Phantom 336CX - C3 */
- { 0x05da, 0x00a0 }, /* Phantom 336CX - C3 #2 */
- { 0x05da, 0x009a }, /* Phantom C6 */
- { 0x05da, 0x00a3 }, /* ScanMaker V6USL */
- { 0x05da, 0x80a3 }, /* ScanMaker V6USL #2 */
- { 0x05da, 0x80ac }, /* ScanMaker V6UL - SpicyU */
+ /* Microtek No longer supported - Enable SCSI and USB Microtek in kernel config */
+ // { 0x05da, 0x0099 }, /* ScanMaker X6 - X6U */
+ // { 0x05da, 0x0094 }, /* Phantom 336CX - C3 */
+ // { 0x05da, 0x00a0 }, /* Phantom 336CX - C3 #2 */
+ // { 0x05da, 0x009a }, /* Phantom C6 */
+ // { 0x05da, 0x00a3 }, /* ScanMaker V6USL */
+ // { 0x05da, 0x80a3 }, /* ScanMaker V6USL #2 */
+ // { 0x05da, 0x80ac }, /* ScanMaker V6UL - SpicyU */
X /* Mustek */
X { 0x055f, 0x0001 }, /* 1200 CU */
+ { 0x0400, 0x1000 }, /* BearPaw 1200 */
+ { 0x055f, 0x0002 }, /* 600 CU */
+ { 0x055f, 0x0003 }, /* 1200 USB */
+ { 0x055f, 0x0006 }, /* 1200 UB */
+ { 0x0400, 0x1001 }, /* BearPaw 2400 */
+ { 0x055f, 0x0008 }, /* 1200 CU Plus */
+ { 0x0ff5, 0x0010 }, /* BearPaw 1200F */
X /* Primax/Colorado */
X { 0x0461, 0x0300 }, /* G2-300 #1 */
X { 0x0461, 0x0380 }, /* G2-600 #1 */
@@ -151,7 +167,11 @@
X { 0x04b8, 0x0101 }, /* Perfection 636U and 636Photo */
X { 0x04b8, 0x0103 }, /* Perfection 610 */
X { 0x04b8, 0x0104 }, /* Perfection 1200U and 1200Photo */
+ { 0x04b8, 0x0106 }, /* Stylus Scan 2500 */
+ { 0x04b8, 0x0107 }, /* Expression 1600 */
+ { 0x04b8, 0x010a }, /* Perfection 1640SU and 1640SU Photo */
X { 0x04b8, 0x010b }, /* Perfection 1240U and 1240Photo */
+ { 0x04b8, 0x010c }, /* Perfection 640U */
X /* Umax */
X { 0x1606, 0x0010 }, /* Astra 1220U */
X { 0x1606, 0x0002 }, /* Astra 1236U */
@@ -161,6 +181,10 @@
X { 0x04a7, 0x0221 }, /* OneTouch 5300 */
X { 0x04a7, 0x0221 }, /* OneTouch 7600 duplicate ID (!) */
X { 0x04a7, 0x0231 }, /* 6100 */
+ { 0x04a7, 0x0211 }, /* OneTouch 7600 USB */
+ { 0x04a7, 0x0311 }, /* 6200 EPP/USB */
+ { 0x04a7, 0x0321 }, /* OneTouch 8100 EPP/USB */
+ { 0x04a7, 0x0331 }, /* OneTouch 8600 EPP/USB */
X };
X
X /* Forward declarations */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/Config.in linux/drivers/usb/serial/Config.in
--- v2.2.19/drivers/usb/serial/Config.in Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/Config.in Wed Oct 10 01:41:28 2001
@@ -6,7 +6,9 @@
X
X tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
X if [ "$CONFIG_USB_SERIAL" != "n" ]; then
- bool ' USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG
+ if [ "$CONFIG_USB_SERIAL" = "y" ]; then
+ bool ' USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG
+ fi
X bool ' USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC
X dep_tristate ' USB Belkin and Peracom Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X dep_tristate ' USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
@@ -14,9 +16,10 @@
X dep_tristate ' USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X dep_tristate ' USB Handspring Visor Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
+ dep_tristate ' USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X dep_tristate ' USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X dep_tristate ' USB Keyspan USA-xxx Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
- if [ "$CONFIG_USB_SERIAL_KEYSPAN" = "y" -o "$CONFIG_USB_SERIAL_KEYSPAN" = "m" ]; then
+ if [ "$CONFIG_USB_SERIAL_KEYSPAN" != "n" ]; then
X bool ' USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28
X bool ' USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X
X bool ' USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 66'
echo 'File patch-2.2.20 is continued in part 67'
echo "67" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:06 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part67

#!/bin/sh -x
# this is part 67 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 67; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

@@ -24,6 +27,7 @@
X bool ' USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W
X bool ' USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W
X fi
+ dep_tristate ' USB MCT Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X dep_tristate ' USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
X fi
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/Makefile linux/drivers/usb/serial/Makefile
--- v2.2.19/drivers/usb/serial/Makefile Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/Makefile Wed Oct 10 01:41:28 2001
@@ -24,6 +24,8 @@
X obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o
X obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
X obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o
+obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o
+obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o
X
X # Objects that export symbols.
X export-objs := usbserial.o
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/belkin_sa.c linux/drivers/usb/serial/belkin_sa.c
--- v2.2.19/drivers/usb/serial/belkin_sa.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/belkin_sa.c Wed Oct 10 01:41:29 2001
@@ -23,8 +23,15 @@
X * framework in, but haven't analyzed the "tty_flip" interface yet.
X * -- Add support for flush commands
X * -- Add everything that is missing :)


+ *
+ * 08-Apr-2001 gb
+ * - Identify version on module load.

X *
- * (11/06/2000) gkh
+ * 12-Mar-2001 gkh
+ * - Added support for the GoHubs GO-COM232 device which is the same as the
+ * Peracom device.
+ *
+ * 06-Nov-2000 gkh
X * - Added support for the old Belkin and Peracom devices.
X * - Made the port able to be opened multiple times.
X * - Added some defaults incase the line settings are things these devices
@@ -59,22 +66,29 @@


X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>

+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>

X
X #include "usb-serial.h"
X #include "belkin_sa.h"


X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "William Greathouse <wgrea...@smva.com>"
+#define DRIVER_DESC "USB Belkin Serial converter driver"
+
X /* function prototypes for a Belkin USB Serial Adapter F5U103 */
X static int belkin_sa_startup (struct usb_serial *serial);
X static void belkin_sa_shutdown (struct usb_serial *serial);
@@ -158,6 +172,30 @@
X shutdown: belkin_sa_shutdown,
X };
X
+/* the GoHubs Go-COM232 device is the same as the Peracom single port adapter */
+static __u16 gocom232_vendor_id = PERACOM_VID;
+static __u16 gocom232_product_id = PERACOM_PID;
+struct usb_serial_device_type gocom232_device = {
+ name: "GO-COM232 USB Serial Converter",
+ idVendor: &gocom232_vendor_id, /* the Go-COM232 vendor ID */
+ idProduct: &gocom232_product_id, /* the Go-COM232 product id */
+ needs_interrupt_in: MUST_HAVE, /* this device must have an interrupt in endpoint */
+ needs_bulk_in: MUST_HAVE, /* this device must have a bulk in endpoint */
+ needs_bulk_out: MUST_HAVE, /* this device must have a bulk out endpoint */


+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 1,

+ open: belkin_sa_open,
+ close: belkin_sa_close,
+ read_int_callback: belkin_sa_read_int_callback, /* How we get the status info */
+ ioctl: belkin_sa_ioctl,
+ set_termios: belkin_sa_set_termios,
+ break_ctl: belkin_sa_break_ctl,
+ startup: belkin_sa_startup,
+ shutdown: belkin_sa_shutdown,
+};
+
X
X struct belkin_sa_private {
X unsigned long control_state;
@@ -217,8 +255,8 @@
X belkin_sa_close (&serial->port[i], NULL);
X }
X /* My special items, the standard routines free my urbs */
- if (serial->port->private)
- kfree(serial->port->private);


+ if (serial->port[i].private)
+ kfree(serial->port[i].private);

X }
X }
X
@@ -284,7 +322,6 @@
X struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
X struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private;
X struct usb_serial *serial;
- struct tty_struct *tty;
X unsigned char *data = urb->transfer_buffer;
X
X /* the urb might have been killed. */
@@ -360,7 +397,7 @@
X unsigned int cflag = port->tty->termios->c_cflag;
X unsigned int old_iflag = old_termios->c_iflag;
X unsigned int old_cflag = old_termios->c_cflag;
- __u16 urb_value; /* Will hold the new flags */
+ __u16 urb_value = 0; /* Will hold the new flags */
X
X /* Set the baud rate */
X if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {
@@ -543,6 +580,8 @@
X usb_serial_register (&belkin_sa_device);
X usb_serial_register (&belkin_old_device);
X usb_serial_register (&peracom_device);
+ usb_serial_register (&gocom232_device);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


X return 0;
X }
X

@@ -552,10 +591,16 @@
X usb_serial_deregister (&belkin_sa_device);
X usb_serial_deregister (&belkin_old_device);
X usb_serial_deregister (&peracom_device);
+ usb_serial_deregister (&gocom232_device);
X }
X
X
X module_init (belkin_sa_init);
-module_exit(belkin_sa_exit);
+module_exit (belkin_sa_exit);
+


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+

+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");

X
-MODULE_DESCRIPTION("USB Belkin Serial converter driver");
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/belkin_sa.h linux/drivers/usb/serial/belkin_sa.h
--- v2.2.19/drivers/usb/serial/belkin_sa.h Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/belkin_sa.h Wed Oct 10 01:41:29 2001
@@ -15,7 +15,10 @@
X *


X * See Documentation/usb/usb-serial.txt for more information on using this driver
X *

- * (11/06/2000) gkh
+ * 12-Mar-2001 gkh
+ * Added GoHubs GO-COM232 device id.
+ *
+ * 06-Nov-2000 gkh
X * Added old Belkin and Peracom device ids, which this driver supports
X *
X * 12-Oct-2000 William Greathouse
@@ -38,6 +41,9 @@
X
X #define PERACOM_VID 0x0565 /* Peracom's vendor id */
X #define PERACOM_PID 0x0001 /* Peracom's single port serial converter's id */
+
+#define GOHUBS_VID 0x0921 /* GoHubs vendor id */
+#define GOHUBS_PID 0x1000 /* GoHubs single port serial converter's id (identical to the Peracom device) */
X
X /* Vendor Request Interface */
X #define BELKIN_SA_SET_BAUDRATE_REQUEST 0 /* Set baud rate */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/digi_acceleport.c linux/drivers/usb/serial/digi_acceleport.c
--- v2.2.19/drivers/usb/serial/digi_acceleport.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/digi_acceleport.c Wed Oct 10 01:41:30 2001
@@ -13,6 +13,9 @@
X *
X * Peter Berger (pbe...@brimson.com)
X * Al Borchers (borc...@steinerpoint.com)
+*
+* (04/08/2001) gb
+* Identify version on module load.
X *
X * (11/01/2000) pberger and borchers
X * -- Turned off the USB_DISABLE_SPD flag for write bulk urbs--it caused
@@ -232,25 +235,32 @@


X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>
X #include <linux/tqueue.h>
+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif

X
-#include <linux/usb.h>
X #include "usb-serial.h"
X
X
X /* Defines */
X
+/*


+ * Version Information
+ */

+#define DRIVER_VERSION "v1.80.1.2"
+#define DRIVER_AUTHOR "Peter Berger <pbe...@brimson.com>, Al Borchers <borc...@steinerpoint.com>"
+#define DRIVER_DESC "Digi AccelePort USB-2/USB-4 Serial Converter driver"
+
X /* port output buffer length -- must be <= transfer buffer length - 2 */
X /* so we can be sure to send the full buffer in one urb */
X #define DIGI_OUT_BUF_SIZE 8
@@ -585,7 +595,7 @@
X spin_lock_irqsave( &priv->dp_port_lock, flags );
X digi_wakeup_write( port );
X spin_unlock_irqrestore( &priv->dp_port_lock, flags );


-
+ MOD_DEC_USE_COUNT;
X }
X

X static void digi_wakeup_write( struct usb_serial_port *port )
@@ -1266,12 +1276,10 @@
X || priv->dp_write_urb_in_use ) {
X
X /* buffer data if count is 1 (probably put_char) if possible */
- if( count == 1 ) {
- new_len = MIN( count,
- DIGI_OUT_BUF_SIZE-priv->dp_out_buf_len );
- memcpy( priv->dp_out_buf+priv->dp_out_buf_len, buf,
- new_len );
- priv->dp_out_buf_len += new_len;
+ if( count == 1 && priv->dp_out_buf_len < DIGI_OUT_BUF_SIZE ) {
+ priv->dp_out_buf[priv->dp_out_buf_len++]
+ = *(from_user ? user_buf : buf);
+ new_len = 1;
X } else {
X new_len = 0;
X }
@@ -1393,7 +1401,9 @@
X
X /* also queue up a wakeup at scheduler time, in case we */
X /* lost the race in write_chan(). */
- queue_task( &priv->dp_wakeup_task, &tq_scheduler );
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&priv->dp_wakeup_task) == 0)
+ MOD_DEC_USE_COUNT;
X
X spin_unlock( &priv->dp_port_lock );
X
@@ -2052,6 +2062,7 @@
X {
X usb_serial_register (&digi_acceleport_2_device);
X usb_serial_register (&digi_acceleport_4_device);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


X return 0;
X }
X

@@ -2067,6 +2078,9 @@
X module_exit(digi_exit);
X
X
-MODULE_AUTHOR("Peter Berger <pbe...@brimson.com>, Al Borchers <borc...@steinerpoint.com>");
-MODULE_DESCRIPTION("Digi AccelePort USB-2/USB-4 Serial Converter driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+

+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");

X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/empeg.c linux/drivers/usb/serial/empeg.c
--- v2.2.19/drivers/usb/serial/empeg.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/empeg.c Wed Oct 10 01:41:30 2001
@@ -13,6 +13,13 @@
X *


X * See Documentation/usb/usb-serial.txt for more information on using this driver
X *

+ * (07/29/2001) gb
+ * remove unused code in empeg_close() (thanks to Oliver Neukum for pointing this
+ * out) and rewrote empeg_set_termios().
+ *

+ * (04/08/2001) gb
+ * Identify version on module load.
+ *

X * (01/22/2001) gb
X * Added write_room() and chars_in_buffer() support.
X *
@@ -55,15 +62,23 @@


X #include <linux/tty_flip.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>

+#include <linux/usb.h>
+


X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>

X
X #include "usb-serial.h"


X
+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v1.0.1"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <gr...@kroah.com>, Gary Brubaker <xav...@ix.netcom.com>"
+#define DRIVER_DESC "USB Empeg Mark I/II Driver"
+
X #define EMPEG_VENDOR_ID 0x084f
X #define EMPEG_PRODUCT_ID 0x0001
X
@@ -147,55 +162,8 @@
X
X if (!port->active) {
X
- /* gb - 2000/11/05
- * personally, I think these termios should be set in
- * empeg_startup(), but it appears doing so leads to one
- * of those chicken/egg problems. :)
- */
- port->tty->termios->c_iflag
- &= ~(IGNBRK
- | BRKINT
- | PARMRK
- | ISTRIP
- | INLCR
- | IGNCR
- | ICRNL
- | IXON);
-
- port->tty->termios->c_oflag
- &= ~OPOST;
-
- port->tty->termios->c_lflag
- &= ~(ECHO
- | ECHONL
- | ICANON
- | ISIG
- | IEXTEN);
-
- port->tty->termios->c_cflag
- &= ~(CSIZE
- | PARENB);
-
- port->tty->termios->c_cflag
- |= CS8;
-
- /* gb - 2000/12/03
- * Contributed by Borislav Deianov
- * Notify the tty driver that the termios have changed!!
- */
- port->tty->ldisc.set_termios(port->tty, NULL);
-
- /* gb - 2000/11/05
- * force low_latency on
- *
- * The tty_flip_buffer_push()'s in empeg_read_bulk_callback() will actually
- * force the data through if low_latency is set. Otherwise the pushes are
- * scheduled; this is bad as it opens up the possibility of dropping bytes
- * on the floor. We are trying to sustain high data transfer rates; and
- * don't want to drop bytes on the floor.
- * Moral: use low_latency - drop no bytes - life is good. :)
- */
- port->tty->low_latency = 1;
+ /* Force default termio settings */
+ empeg_set_termios (port, NULL) ;
X
X port->active = 1;
X bytes_in = 0;
@@ -230,7 +198,6 @@
X static void empeg_close (struct usb_serial_port *port, struct file * filp)
X {
X struct usb_serial *serial;
- unsigned char *transfer_buffer;


X unsigned long flags;
X

X if (port_paranoia_check (port, __FUNCTION__))
@@ -247,14 +214,6 @@
X --port->open_count;
X
X if (port->open_count <= 0) {
- transfer_buffer = kmalloc (0x12, GFP_KERNEL);
-
- if (!transfer_buffer) {
- err(__FUNCTION__ " - kmalloc(%d) failed.", 0x12);
- } else {
- kfree (transfer_buffer);
- }
-
X /* shutdown our bulk read */
X usb_unlink_urb (port->read_urb);
X port->active = 0;
@@ -575,65 +534,63 @@
X }
X
X
-/* This function is all nice and good, but we don't change anything based on it :) */
X static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios)
X {
- unsigned int cflag = port->tty->termios->c_cflag;
X
X dbg(__FUNCTION__ " - port %d", port->number);
X
- /* check that they really want us to change something */
- if (old_termios) {
- if ((cflag == old_termios->c_cflag) &&
- (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
- dbg(__FUNCTION__ " - nothing to change...");


- return;
- }
- }
-

X if ((!port->tty) || (!port->tty->termios)) {
X dbg(__FUNCTION__" - no tty structures");
X return;
X }
X
- /* get the byte size */
- switch (cflag & CSIZE) {
- case CS5: dbg(__FUNCTION__ " - data bits = 5"); break;
- case CS6: dbg(__FUNCTION__ " - data bits = 6"); break;
- case CS7: dbg(__FUNCTION__ " - data bits = 7"); break;
- default:
- case CS8: dbg(__FUNCTION__ " - data bits = 8"); break;
- }
-
- /* determine the parity */
- if (cflag & PARENB)
- if (cflag & PARODD)
- dbg(__FUNCTION__ " - parity = odd");
- else
- dbg(__FUNCTION__ " - parity = even");
- else
- dbg(__FUNCTION__ " - parity = none");
-
- /* figure out the stop bits requested */
- if (cflag & CSTOPB)
- dbg(__FUNCTION__ " - stop bits = 2");
- else
- dbg(__FUNCTION__ " - stop bits = 1");
-
- /* figure out the flow control settings */
- if (cflag & CRTSCTS)
- dbg(__FUNCTION__ " - RTS/CTS is enabled");
- else
- dbg(__FUNCTION__ " - RTS/CTS is disabled");
-
- /* determine software flow control */
- if (I_IXOFF(port->tty))
- dbg(__FUNCTION__ " - XON/XOFF is enabled, XON = %2x, XOFF = %2x", START_CHAR(port->tty), STOP_CHAR(port->tty));
- else
- dbg(__FUNCTION__ " - XON/XOFF is disabled");
+ /*
+ * The empeg-car player wants these particular tty settings.
+ * You could, for example, change the baud rate, however the
+ * player only supports 115200 (currently), so there is really
+ * no point in support for changes to the tty settings.
+ * (at least for now)
+ *
+ * The default requirements for this device are:
+ */
+ port->tty->termios->c_iflag
+ &= ~(IGNBRK /* disable ignore break */
+ | BRKINT /* disable break causes interrupt */
+ | PARMRK /* disable mark parity errors */
+ | ISTRIP /* disable clear high bit of input characters */
+ | INLCR /* disable translate NL to CR */
+ | IGNCR /* disable ignore CR */
+ | ICRNL /* disable translate CR to NL */
+ | IXON); /* disable enable XON/XOFF flow control */
+
+ port->tty->termios->c_oflag
+ &= ~OPOST; /* disable postprocess output characters */
+
+ port->tty->termios->c_lflag
+ &= ~(ECHO /* disable echo input characters */
+ | ECHONL /* disable echo new line */
+ | ICANON /* disable erase, kill, werase, and rprnt special characters */
+ | ISIG /* disable interrupt, quit, and suspend special characters */
+ | IEXTEN); /* disable non-POSIX special characters */
+
+ port->tty->termios->c_cflag
+ &= ~(CSIZE /* no size */
+ | PARENB /* disable parity bit */
+ | CBAUD); /* clear current baud rate */
+
+ port->tty->termios->c_cflag
+ |= (CS8 /* character size 8 bits */
+ | B115200); /* baud rate 115200 */
+
+ /*
+ * Force low_latency on; otherwise the pushes are scheduled;
+ * this is bad as it opens up the possibility of dropping bytes
+ * on the floor. We don't want to drop bytes on the floor. :)
+ */
+ port->tty->low_latency = 1;
X
- /* get the baud rate wanted */
- dbg(__FUNCTION__ " - baud rate = %d", tty_get_baud_rate(port->tty));
+ /* Notify the tty driver that the termios have changed. */
+ port->tty->ldisc.set_termios(port->tty, NULL);
X
X return;
X
@@ -665,6 +622,8 @@
X }
X }


X
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
X return 0;
X
X }

@@ -699,5 +658,9 @@
X module_init(empeg_init);
X module_exit(empeg_exit);
X
-MODULE_AUTHOR("Gary Brubaker <xav...@ix.netcom.com>");
-MODULE_DESCRIPTION("USB Empeg Mark I/II Driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+

+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/ftdi_sio.c linux/drivers/usb/serial/ftdi_sio.c
--- v2.2.19/drivers/usb/serial/ftdi_sio.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/ftdi_sio.c Wed Oct 10 01:41:30 2001
@@ -14,7 +14,22 @@
X *
X * See http://reality.sgi.com/bryder_wellington/ftdi_sio for upto date testing info
X * and extra documentation
+ *
+ * (23/May/2001) Bill Ryder
+ * Added runtime debug patch (thanx Tyson D Sawyer).
+ * Cleaned up comments for 8U232
+ * Added parity, framing and overrun error handling
+ * Added receive break handling.
+ *

+ * (04/08/2001) gb
+ * Identify version on module load.

X *
+ * (18/March/2001) Bill Ryder
+ * (Not released)
+ * Added send break handling. (requires kernel patch too)
+ * Fixed 8U232AM hardware RTS/CTS etc status reporting.
+ * Added flipbuf fix copied from generic device
+ *
X * (12/3/2000) Bill Ryder
X * Added support for 8U232AM device.
X * Moved PID and VIDs into header file only.
@@ -70,31 +85,35 @@


X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>

+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>

X
X #include "usb-serial.h"
-
X #include "ftdi_sio.h"
X

X
+/*
+ * Version Information
+ */

+#define DRIVER_VERSION "v1.1.0"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <gr...@kroah.com>, Bill Ryder <bry...@sgi.com>"
+#define DRIVER_DESC "USB FTDI RS232 Converters Driver"
+
X
X
X struct ftdi_private {
X ftdi_type_t ftdi_type;
- char last_status_byte; /* device sends this every 40ms when open */
-
-
+ __u16 last_set_data_urb_value ; /* the last data state set - needed for doing a break */
X };
X /* function prototypes for a FTDI serial converter */
X static int ftdi_sio_startup (struct usb_serial *serial);
@@ -107,6 +126,10 @@
X static void ftdi_sio_read_bulk_callback (struct urb *urb);
X static void ftdi_sio_set_termios (struct usb_serial_port *port, struct termios * old);
X static int ftdi_sio_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+static void ftdi_sio_break_ctl (struct usb_serial_port *port, int break_state );
+
+/* Should rename most ftdi_sio's to ftdi_ now since there are two devices
+ which share common code */
X
X /* All of the device info needed for the FTDI SIO serial converter */
X static __u16 ftdi_vendor_id = FTDI_VID;
@@ -130,6 +153,7 @@
X write_bulk_callback: ftdi_sio_write_bulk_callback,
X ioctl: ftdi_sio_ioctl,
X set_termios: ftdi_sio_set_termios,
+ break_ctl: ftdi_sio_break_ctl,
X startup: ftdi_sio_startup,
X shutdown: ftdi_sio_shutdown,
X };
@@ -152,6 +176,7 @@
X write_bulk_callback: ftdi_sio_write_bulk_callback,
X ioctl: ftdi_sio_ioctl,
X set_termios: ftdi_sio_set_termios,
+ break_ctl: ftdi_sio_break_ctl,
X startup: ftdi_8U232AM_startup,
X shutdown: ftdi_sio_shutdown,
X };
@@ -269,7 +294,8 @@


X
X spin_unlock_irqrestore (&port->port_lock, flags);

X
- /* do not allow a task to be queued to deliver received data */
+ /* This will push the characters through immediately rather
+ than queue a task to deliver them */
X port->tty->low_latency = 1;
X
X /* No error checking for this (will get errors later anyway) */
@@ -498,9 +524,9 @@
X static void ftdi_sio_read_bulk_callback (struct urb *urb)
X { /* ftdi_sio_serial_buld_callback */
X struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
- struct ftdi_private *priv = (struct ftdi_private *)port->private;
X struct usb_serial *serial;
X struct tty_struct *tty = port->tty ;
+ char error_flag;
X unsigned char *data = urb->transfer_buffer;
X
X const int data_offset = 2;
@@ -527,23 +553,76 @@
X if (urb->actual_length > 2) {
X usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
X } else {
- dbg("Just status");
+ dbg("Just status 0o%03o0o%03o",data[0],data[1]);
X }
X
- priv->last_status_byte = data[0]; /* this has modem control lines */
X
X /* TO DO -- check for hung up line and handle appropriately: */
X /* send hangup */
X /* See acm.c - you do a tty_hangup - eg tty_hangup(tty) */
X /* if CD is dropped and the line is not CLOCAL then we should hangup */
X
-
+ /* Handle errors and break */
+ error_flag = TTY_NORMAL;
+ /* Although the device uses a bitmask and hence can have multiple */
+ /* errors on a packet - the order here sets the priority the */
+ /* error is returned to the tty layer */
+
+ if ( data[1] & FTDI_RS_OE ) {
+ error_flag = TTY_OVERRUN;
+ dbg("OVERRRUN error");
+ }
+ if ( data[1] & FTDI_RS_BI ) {
+ error_flag = TTY_BREAK;
+ dbg("BREAK received");
+ }
+ if ( data[1] & FTDI_RS_PE ) {
+ error_flag = TTY_PARITY;
+ dbg("PARITY error");
+ }
+ if ( data[1] & FTDI_RS_FE ) {
+ error_flag = TTY_FRAME;
+ dbg("FRAMING error");
+ }
X if (urb->actual_length > data_offset) {
+
X for (i = data_offset ; i < urb->actual_length ; ++i) {
- tty_insert_flip_char(tty, data[i], 0);
- }
+ /* have to make sure we don't overflow the buffer
+ with tty_insert_flip_char's */


+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }

+ /* Note that the error flag is duplicated for
+ every character received since we don't know
+ which character it applied to */
+ tty_insert_flip_char(tty, data[i], error_flag);
+ }
X tty_flip_buffer_push(tty);
+
+
+ }
+
+#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW
+ /* if a parity error is detected you get status packets forever
+ until a character is sent without a parity error.
+ This doesn't work well since the application receives a never
+ ending stream of bad data - even though new data hasn't been sent.
+ Therefore I (bill) have taken this out.
+ However - this might make sense for framing errors and so on
+ so I am leaving the code in for now.
+ */
+ else {
+ if (error_flag != TTY_NORMAL){
+ dbg("error_flag is not normal");
+ /* In this case it is just status - if that is an error send a bad character */


+ if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ tty_flip_buffer_push(tty);
+ }

+ tty_insert_flip_char(tty, 0xff, error_flag);
+ tty_flip_buffer_push(tty);
+ }
X }
+#endif
X
X /* Continue trying to always read */
X FILL_BULK_URB(urb, serial->dev,
@@ -605,6 +684,38 @@
X return(urb_value);
X }
X
+static void ftdi_sio_break_ctl( struct usb_serial_port *port, int break_state )
+{


+ struct usb_serial *serial = port->serial;

+ struct ftdi_private *priv = (struct ftdi_private *)port->private;
+ __u16 urb_value = 0;
+ char buf[1];
+
+ /* break_state = -1 to turn on break, and 0 to turn off break */
+ /* see drivers/char/tty_io.c to see it used */
+ /* last_set_data_urb_value NEVER has the break bit set in it */
+
+ if (break_state) {
+ urb_value = priv->last_set_data_urb_value | FTDI_SIO_SET_BREAK;
+ } else {
+ urb_value = priv->last_set_data_urb_value;
+ }
+
+
+ if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+ FTDI_SIO_SET_DATA_REQUEST,
+ FTDI_SIO_SET_DATA_REQUEST_TYPE,
+ urb_value , 0,
+ buf, 0, WDR_TIMEOUT) < 0) {
+ err(__FUNCTION__ " FAILED to enable/disable break state (state was %d)",break_state);
+ }
+
+ dbg(__FUNCTION__ " break state is %d - urb is %d",break_state, urb_value);


+
+}
+
+
+

X /* As I understand this - old_termios contains the original termios settings */
X /* and tty->termios contains the new setting to be used */
X /* */
@@ -648,6 +759,11 @@
X err("CSIZE was set but not CS5-CS8");
X }
X }
+
+ /* This is needed by the break command since it uses the same command - but is
+ * or'ed with this value */
+ priv->last_set_data_urb_value = urb_value;
+
X if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
X FTDI_SIO_SET_DATA_REQUEST,
X FTDI_SIO_SET_DATA_REQUEST_TYPE,
@@ -721,7 +837,7 @@
X struct usb_serial *serial = port->serial;
X struct ftdi_private *priv = (struct ftdi_private *)port->private;
X __u16 urb_value=0; /* Will hold the new flags */
- char buf[1];
+ char buf[2];
X int ret, mask;
X
X dbg(__FUNCTION__ " cmd 0x%04x", cmd);
@@ -731,12 +847,7 @@
X
X case TIOCMGET:
X dbg(__FUNCTION__ " TIOCMGET");
- /* The MODEM_STATUS_REQUEST works for the sio but not the 232 */
X if (priv->ftdi_type == sio){
- /* TO DECIDE - use the 40ms status packets or not? */
- /* PRO: No need to send urb */
- /* CON: Could be 40ms out of date */
-
X /* Request the status from the device */
X if ((ret = usb_control_msg(serial->dev,
X usb_rcvctrlpipe(serial->dev, 0),
@@ -749,8 +860,18 @@
X return(ret);
X }
X } else {
- /* This gets updated every 40ms - so just copy it in */
- buf[0] = priv->last_status_byte;
+ /* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same
+ format as the data returned from the in point */
+ if ((ret = usb_control_msg(serial->dev,
+ usb_rcvctrlpipe(serial->dev, 0),
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST,
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
+ 0, 0,
+ buf, 2, WDR_TIMEOUT)) < 0 ) {
+ err(__FUNCTION__ " Could not get modem status of device - err: %d",
+ ret);
+ return(ret);
+ }
X }
X
X return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
@@ -841,6 +962,7 @@
X dbg(__FUNCTION__);
X usb_serial_register (&ftdi_sio_device);
X usb_serial_register (&ftdi_8U232AM_device);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


X return 0;
X }
X

@@ -856,5 +978,9 @@
X module_init(ftdi_sio_init);
X module_exit(ftdi_sio_exit);
X
-MODULE_AUTHOR("Greg Kroah-Hartman <gr...@kroah.com>, Bill Ryder <bry...@sgi.com>");
-MODULE_DESCRIPTION("USB FTDI RS232 converters driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+

+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/ftdi_sio.h linux/drivers/usb/serial/ftdi_sio.h
--- v2.2.19/drivers/usb/serial/ftdi_sio.h Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/ftdi_sio.h Wed Oct 10 01:41:30 2001
@@ -146,7 +146,7 @@
X #define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11 )
X #define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11 )
X #define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11 )
-
+#define FTDI_SIO_SET_BREAK (0x1 << 14)
X /* FTDI_SIO_SET_DATA */
X
X /*
@@ -170,7 +170,10 @@
X * 0 = 1
X * 1 = 1.5
X * 2 = 2
- * B14..15 Reserved
+ * B14
+ * 1 = TX ON (break)
+ * 0 = TX OFF (normal state)
+ * B15 Reserved
X *
X */
X
@@ -434,6 +437,17 @@
X * B6 Transmitter Empty (TEMT)
X * B7 Error in RCVR FIFO
X *
+ */
+#define FTDI_RS_DR 1
+#define FTDI_RS_OE (1<<1)
+#define FTDI_RS_PE (1<<2)
+#define FTDI_RS_FE (1<<3)
+#define FTDI_RS_BI (1<<4)
+#define FTDI_RS_THRE (1<<5)
+#define FTDI_RS_TEMT (1<<6)
+#define FTDI_RS_FIFO (1<<7)
+
+/*
X * OUT Endpoint
X *
X * This device reserves the first bytes of data on this endpoint contain the length
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_16654.h linux/drivers/usb/serial/io_16654.h
--- v2.2.19/drivers/usb/serial/io_16654.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_16654.h Wed Oct 10 01:41:30 2001
@@ -0,0 +1,195 @@
+/************************************************************************
+ *
+ * 16654.H Definitions for 16C654 UART used on EdgePorts


+ *
+ * Copyright (c) 1998 Inside Out Networks, Inc.
+ * 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.
+ *
+ ************************************************************************/
+

+#if !defined(_16654_H)
+#define _16654_H


+
+/************************************************************************
+ *
+ * D e f i n e s / T y p e d e f s
+ *
+ ************************************************************************/
+
+ //

+ // UART register numbers
+ // Numbers 0-7 are passed to the Edgeport directly. Numbers 8 and
+ // above are used internally to indicate that we must enable access
+ // to them via LCR bit 0x80 or LCR = 0xBF.
+ // The register number sent to the Edgeport is then (x & 0x7).
+ //
+ // Driver must not access registers that affect operation of the
+ // the EdgePort firmware -- that includes THR, RHR, IER, FCR.
+
+
+#define THR 0 // ! Transmit Holding Register (Write)
+#define RDR 0 // ! Receive Holding Register (Read)
+#define IER 1 // ! Interrupt Enable Register
+#define FCR 2 // ! Fifo Control Register (Write)
+#define ISR 2 // Interrupt Status Register (Read)
+#define LCR 3 // Line Control Register
+#define MCR 4 // Modem Control Register
+#define LSR 5 // Line Status Register
+#define MSR 6 // Modem Status Register
+#define SPR 7 // ScratchPad Register
+#define DLL 8 // Bank2[ 0 ] Divisor Latch LSB
+#define DLM 9 // Bank2[ 1 ] Divisor Latch MSB
+#define EFR 10 // Bank2[ 2 ] Extended Function Register
+//efine unused 11 // Bank2[ 3 ]
+#define XON1 12 // Bank2[ 4 ] Xon-1
+#define XON2 13 // Bank2[ 5 ] Xon-2
+#define XOFF1 14 // Bank2[ 6 ] Xoff-1
+#define XOFF2 15 // Bank2[ 7 ] Xoff-2
+
+#define NUM_16654_REGS 16
+
+#define IS_REG_2ND_BANK(x) ((x) >= 8)
+
+ //
+ // Bit definitions for each register
+ //
+
+#define IER_RX 0x01 // Enable receive interrupt
+#define IER_TX 0x02 // Enable transmit interrupt
+#define IER_RXS 0x04 // Enable receive status interrupt
+#define IER_MDM 0x08 // Enable modem status interrupt
+#define IER_SLEEP 0x10 // Enable sleep mode
+#define IER_XOFF 0x20 // Enable s/w flow control (XOFF) interrupt
+#define IER_RTS 0x40 // Enable RTS interrupt
+#define IER_CTS 0x80 // Enable CTS interrupt
+#define IER_ENABLE_ALL 0xFF // Enable all ints
+
+
+#define FCR_FIFO_EN 0x01 // Enable FIFOs
+#define FCR_RXCLR 0x02 // Reset Rx FIFO
+#define FCR_TXCLR 0x04 // Reset Tx FIFO
+#define FCR_DMA_BLK 0x08 // Enable DMA block mode
+#define FCR_TX_LEVEL_MASK 0x30 // Mask for Tx FIFO Level
+#define FCR_TX_LEVEL_8 0x00 // Tx FIFO Level = 8 bytes
+#define FCR_TX_LEVEL_16 0x10 // Tx FIFO Level = 16 bytes
+#define FCR_TX_LEVEL_32 0x20 // Tx FIFO Level = 32 bytes
+#define FCR_TX_LEVEL_56 0x30 // Tx FIFO Level = 56 bytes
+#define FCR_RX_LEVEL_MASK 0xC0 // Mask for Rx FIFO Level
+#define FCR_RX_LEVEL_8 0x00 // Rx FIFO Level = 8 bytes
+#define FCR_RX_LEVEL_16 0x40 // Rx FIFO Level = 16 bytes
+#define FCR_RX_LEVEL_56 0x80 // Rx FIFO Level = 56 bytes
+#define FCR_RX_LEVEL_60 0xC0 // Rx FIFO Level = 60 bytes
+
+
+#define ISR_INT_MDM_STATUS 0x00 // Modem status int pending
+#define ISR_INT_NONE 0x01 // No interrupt pending
+#define ISR_INT_TXRDY 0x02 // Tx ready int pending
+#define ISR_INT_RXRDY 0x04 // Rx ready int pending
+#define ISR_INT_LINE_STATUS 0x06 // Line status int pending
+#define ISR_INT_RX_TIMEOUT 0x0C // Rx timeout int pending
+#define ISR_INT_RX_XOFF 0x10 // Rx Xoff int pending
+#define ISR_INT_RTS_CTS 0x20 // RTS/CTS change int pending
+#define ISR_FIFO_ENABLED 0xC0 // Bits set if FIFOs enabled
+#define ISR_INT_BITS_MASK 0x3E // Mask to isolate valid int causes
+
+
+#define LCR_BITS_5 0x00 // 5 bits/char
+#define LCR_BITS_6 0x01 // 6 bits/char
+#define LCR_BITS_7 0x02 // 7 bits/char
+#define LCR_BITS_8 0x03 // 8 bits/char
+#define LCR_BITS_MASK 0x03 // Mask for bits/char field
+
+#define LCR_STOP_1 0x00 // 1 stop bit
+#define LCR_STOP_1_5 0x04 // 1.5 stop bits (if 5 bits/char)
+#define LCR_STOP_2 0x04 // 2 stop bits (if 6-8 bits/char)
+#define LCR_STOP_MASK 0x04 // Mask for stop bits field
+
+#define LCR_PAR_NONE 0x00 // No parity
+#define LCR_PAR_ODD 0x08 // Odd parity
+#define LCR_PAR_EVEN 0x18 // Even parity
+#define LCR_PAR_MARK 0x28 // Force parity bit to 1
+#define LCR_PAR_SPACE 0x38 // Force parity bit to 0
+#define LCR_PAR_MASK 0x38 // Mask for parity field
+
+#define LCR_SET_BREAK 0x40 // Set Break condition
+#define LCR_DL_ENABLE 0x80 // Enable access to divisor latch
+
+#define LCR_ACCESS_EFR 0xBF // Load this value to access DLL,DLM,
+ // and also the '654-only registers
+ // EFR, XON1, XON2, XOFF1, XOFF2
+
+
+#define MCR_DTR 0x01 // Assert DTR
+#define MCR_RTS 0x02 // Assert RTS
+#define MCR_OUT1 0x04 // Loopback only: Sets state of RI
+#define MCR_MASTER_IE 0x08 // Enable interrupt outputs
+#define MCR_LOOPBACK 0x10 // Set internal (digital) loopback mode
+#define MCR_XON_ANY 0x20 // Enable any char to exit XOFF mode
+#define MCR_IR_ENABLE 0x40 // Enable IrDA functions
+#define MCR_BRG_DIV_4 0x80 // Divide baud rate clk by /4 instead of /1
+
+
+#define LSR_RX_AVAIL 0x01 // Rx data available
+#define LSR_OVER_ERR 0x02 // Rx overrun
+#define LSR_PAR_ERR 0x04 // Rx parity error
+#define LSR_FRM_ERR 0x08 // Rx framing error
+#define LSR_BREAK 0x10 // Rx break condition detected
+#define LSR_TX_EMPTY 0x20 // Tx Fifo empty
+#define LSR_TX_ALL_EMPTY 0x40 // Tx Fifo and shift register empty
+#define LSR_FIFO_ERR 0x80 // Rx Fifo contains at least 1 erred char
+
+
+#define MSR_DELTA_CTS 0x01 // CTS changed from last read
+#define MSR_DELTA_DSR 0x02 // DSR changed from last read
+#define MSR_DELTA_RI 0x04 // RI changed from 0 -> 1
+#define MSR_DELTA_CD 0x08 // CD changed from last read
+#define MSR_CTS 0x10 // Current state of CTS
+#define MSR_DSR 0x20 // Current state of DSR
+#define MSR_RI 0x40 // Current state of RI
+#define MSR_CD 0x80 // Current state of CD
+
+
+
+ // Tx Rx
+ //-------------------------------
+#define EFR_SWFC_NONE 0x00 // None None
+#define EFR_SWFC_RX1 0x02 // None XOFF1
+#define EFR_SWFC_RX2 0x01 // None XOFF2
+#define EFR_SWFC_RX12 0x03 // None XOFF1 & XOFF2
+#define EFR_SWFC_TX1 0x08 // XOFF1 None
+#define EFR_SWFC_TX1_RX1 0x0a // XOFF1 XOFF1
+#define EFR_SWFC_TX1_RX2 0x09 // XOFF1 XOFF2
+#define EFR_SWFC_TX1_RX12 0x0b // XOFF1 XOFF1 & XOFF2
+#define EFR_SWFC_TX2 0x04 // XOFF2 None
+#define EFR_SWFC_TX2_RX1 0x06 // XOFF2 XOFF1
+#define EFR_SWFC_TX2_RX2 0x05 // XOFF2 XOFF2
+#define EFR_SWFC_TX2_RX12 0x07 // XOFF2 XOFF1 & XOFF2
+#define EFR_SWFC_TX12 0x0c // XOFF1 & XOFF2 None
+#define EFR_SWFC_TX12_RX1 0x0e // XOFF1 & XOFF2 XOFF1
+#define EFR_SWFC_TX12_RX2 0x0d // XOFF1 & XOFF2 XOFF2
+#define EFR_SWFC_TX12_RX12 0x0f // XOFF1 & XOFF2 XOFF1 & XOFF2
+
+#define EFR_TX_FC_MASK 0x0c // Mask to isolate Rx flow control
+#define EFR_TX_FC_NONE 0x00 // No Tx Xon/Xoff flow control
+#define EFR_TX_FC_X1 0x08 // Transmit Xon1/Xoff1
+#define EFR_TX_FC_X2 0x04 // Transmit Xon2/Xoff2
+#define EFR_TX_FC_X1_2 0x0c // Transmit Xon1&2/Xoff1&2
+
+#define EFR_RX_FC_MASK 0x03 // Mask to isolate Rx flow control
+#define EFR_RX_FC_NONE 0x00 // No Rx Xon/Xoff flow control
+#define EFR_RX_FC_X1 0x02 // Receiver compares Xon1/Xoff1
+#define EFR_RX_FC_X2 0x01 // Receiver compares Xon2/Xoff2
+#define EFR_RX_FC_X1_2 0x03 // Receiver compares Xon1&2/Xoff1&2
+
+
+#define EFR_SWFC_MASK 0x0F // Mask for software flow control field
+#define EFR_ENABLE_16654 0x10 // Enable 16C654 features
+#define EFR_SPEC_DETECT 0x20 // Enable special character detect interrupt
+#define EFR_AUTO_RTS 0x40 // Use RTS for Rx flow control
+#define EFR_AUTO_CTS 0x80 // Use CTS for Tx flow control
+
+#endif // if !defined(_16654_H)
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_edgeport.c linux/drivers/usb/serial/io_edgeport.c
--- v2.2.19/drivers/usb/serial/io_edgeport.c Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_edgeport.c Wed Oct 10 01:41:30 2001
@@ -0,0 +1,3079 @@
+/*
+ * Edgeport USB Serial Converter driver
+ *
+ * Copyright(c) 2000 Inside Out Networks, All rights reserved.
+ * Copyright(c) 2001 Greg Kroah-Hartman <gr...@kroah.com>
+ *
+ * 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.
+ *
+ * Supports the following devices:
+ * Edgeport/4
+ * Edgeport/4t
+ * Edgeport/2
+ * Edgeport/4i
+ * Edgeport/2i
+ * Edgeport/421
+ * Edgeport/21
+ * Rapidport/4
+ * Edgeport/8
+ * Edgeport/2D8
+ * Edgeport/4D8
+ * Edgeport/8i
+ *
+ * Version history:
+ *
+ * (04/08/2001) gb


+ * - Identify version on module load.
+ *

+ * 2.0 2001_03_05 greg kroah-hartman
+ * - reworked entire driver to fit properly in with the other usb-serial
+ * drivers. Occasional oopses still happen, but it's a good start.
+ *
+ * 1.2.3 (02/23/2001) greg kroah-hartman
+ * - changed device table to work properly for 2.4.x final format.
+ * - fixed problem with dropping data at high data rates.
+ *
+ * 1.2.2 (11/27/2000) greg kroah-hartman
+ * - cleaned up more NTisms.
+ * - Added device table for 2.4.0-test11
+ *
+ * 1.2.1 (11/08/2000) greg kroah-hartman
+ * - Started to clean up NTisms.
+ * - Fixed problem with dev field of urb for kernels >= 2.4.0-test9
+ *
+ * 1.2 (10/17/2000) David Iacovelli
+ * Remove all EPIC code and GPL source
+ * Fix RELEVANT_IFLAG macro to include flow control
+ * changes port configuration changes.
+ * Fix redefinition of SERIAL_MAGIC
+ * Change all timeout values to 5 seconds
+ * Tried to fix the UHCI multiple urb submission, but failed miserably.
+ * it seems to work fine with OHCI.
+ * ( Greg take a look at the #if 0 at end of WriteCmdUsb() we must
+ * find a way to work arount this UHCI bug )
+ *
+ * 1.1 (10/11/2000) David Iacovelli
+ * Fix XON/XOFF flow control to support both IXON and IXOFF
+ *
+ * 0.9.27 (06/30/2000) David Iacovelli
+ * Added transmit queue and now allocate urb for command writes.
+ *
+ * 0.9.26 (06/29/2000) David Iacovelli
+ * Add support for 80251 based edgeport
+ *
+ * 0.9.25 (06/27/2000) David Iacovelli
+ * Do not close the port if it has multiple opens.
+ *
+ * 0.9.24 (05/26/2000) David Iacovelli
+ * Add IOCTLs to support RXTX and JAVA POS
+ * and first cut at running BlackBox Demo
+ *
+ * 0.9.23 (05/24/2000) David Iacovelli
+ * Add IOCTLs to support RXTX and JAVA POS
+ *
+ * 0.9.22 (05/23/2000) David Iacovelli
+ * fixed bug in enumeration. If epconfig turns on mapping by
+ * path after a device is already plugged in, we now update
+ * the mapping correctly
+ *
+ * 0.9.21 (05/16/2000) David Iacovelli
+ * Added BlockUntilChaseResp() to also wait for txcredits
+ * Updated the way we allocate and handle write URBs
+ * Add debug code to dump buffers
+ *
+ * 0.9.20 (05/01/2000) David Iacovelli
+ * change driver to use usb/tts/
+ *
+ * 0.9.19 (05/01/2000) David Iacovelli
+ * Update code to compile if DEBUG is off
+ *
+ * 0.9.18 (04/28/2000) David Iacovelli
+ * cleanup and test tty_register with devfs
+ *
+ * 0.9.17 (04/27/2000) greg kroah-hartman
+ * changed tty_register around to be like the way it
+ * was before, but now it works properly with devfs.
+ *
+ * 0.9.16 (04/26/2000) david iacovelli
+ * Fixed bug in GetProductInfo()
+ *
+ * 0.9.15 (04/25/2000) david iacovelli
+ * Updated enumeration
+ *
+ * 0.9.14 (04/24/2000) david iacovelli
+ * Removed all config/status IOCTLS and
+ * converted to using /proc/edgeport
+ * still playing with devfs
+ *
+ * 0.9.13 (04/24/2000) david iacovelli
+ * Removed configuration based on ttyUSB0
+ * Added support for configuration using /prod/edgeport
+ * first attempt at using devfs (not working yet!)
+ * Added IOCTL to GetProductInfo()
+ * Added support for custom baud rates
+ * Add support for random port numbers
+ *
+ * 0.9.12 (04/18/2000) david iacovelli
+ * added additional configuration IOCTLs
+ * use ttyUSB0 for configuration
+ *
+ * 0.9.11 (04/17/2000) greg kroah-hartman
+ * fixed module initialization race conditions.
+ * made all urbs dynamically allocated.
+ * made driver devfs compatible. now it only registers the tty device
+ * when the device is actually plugged in.
+ *
+ * 0.9.10 (04/13/2000) greg kroah-hartman
+ * added proc interface framework.
+ *
+ * 0.9.9 (04/13/2000) david iacovelli
+ * added enumeration code and ioctls to configure the device
+ *
+ * 0.9.8 (04/12/2000) david iacovelli
+ * Change interrupt read start when device is plugged in
+ * and stop when device is removed
+ * process interrupt reads when all ports are closed
+ * (keep value of rxBytesAvail consistent with the edgeport)
+ * set the USB_BULK_QUEUE flag so that we can shove a bunch
+ * of urbs at once down the pipe
+ *
+ * 0.9.7 (04/10/2000) david iacovelli
+ * start to add enumeration code.
+ * generate serial number for epic devices
+ * add support for kdb
+ *
+ * 0.9.6 (03/30/2000) david iacovelli
+ * add IOCTL to get string, manufacture, and boot descriptors
+ *
+ * 0.9.5 (03/14/2000) greg kroah-hartman
+ * more error checking added to SerialOpen to try to fix UHCI open problem
+ *
+ * 0.9.4 (03/09/2000) greg kroah-hartman
+ * added more error checking to handle oops when data is hanging
+ * around and tty is abruptly closed.
+ *
+ * 0.9.3 (03/09/2000) david iacovelli
+ * Add epic support for xon/xoff chars
+ * play with performance
+ *
+ * 0.9.2 (03/08/2000) greg kroah-hartman
+ * changed most "info" calls to "dbg"
+ * implemented flow control properly in the termios call
+ *
+ * 0.9.1 (03/08/2000) david iacovelli
+ * added EPIC support
+ * enabled bootloader update
+ *
+ * 0.9 (03/08/2000) greg kroah-hartman
+ * Release to IO networks.
+ * Integrated changes that David made
+ * made getting urbs for writing SMP safe
+ *
+ * 0.8 (03/07/2000) greg kroah-hartman
+ * Release to IO networks.
+ * Fixed problems that were seen in code by David.
+ * Now both Edgeport/4 and Edgeport/2 works properly.
+ * Changed most of the functions to use port instead of serial.
+ *
+ * 0.7 (02/27/2000) greg kroah-hartman
+ * Milestone 3 release.
+ * Release to IO Networks
+ * ioctl for waiting on line change implemented.
+ * ioctl for getting statistics implemented.
+ * multiport support working.
+ * lsr and msr registers are now handled properly.
+ * change break now hooked up and working.
+ * support for all known Edgeport devices.
+ *
+ * 0.6 (02/22/2000) greg kroah-hartman
+ * Release to IO networks.
+ * CHASE is implemented correctly when port is closed.
+ * SerialOpen now blocks correctly until port is fully opened.
+ *
+ * 0.5 (02/20/2000) greg kroah-hartman
+ * Release to IO networks.
+ * Known problems:
+ * modem status register changes are not sent on to the user
+ * CHASE is not implemented when the port is closed.
+ *
+ * 0.4 (02/16/2000) greg kroah-hartman
+ * Second cut at the CeBit demo.
+ * Doesn't leak memory on every write to the port
+ * Still small leaks on startup.
+ * Added support for Edgeport/2 and Edgeport/8
+ *
+ * 0.3 (02/15/2000) greg kroah-hartman
+ * CeBit demo release.
+ * Force the line settings to 4800, 8, 1, e for the demo.
+ * Warning! This version leaks memory like crazy!
+ *
+ * 0.2 (01/30/2000) greg kroah-hartman
+ * Milestone 1 release.
+ * Device is found by USB subsystem, enumerated, fimware is downloaded
+ * and the descriptors are printed to the debug log, config is set, and
+ * green light starts to blink. Open port works, and data can be sent
+ * and received at the default settings of the UART. Loopback connector
+ * and debug log confirms this.
+ *
+ * 0.1 (01/23/2000) greg kroah-hartman
+ * Initial release to help IO Networks try to set up their test system.
+ * Edgeport4 is recognized, firmware is downloaded, config is set so
+ * device blinks green light every 3 sec. Port is bound, but opening,
+ * closing, and sending data do not work properly.


+ *
+ */
+

+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/poll.h>
+#include <linux/init.h>

+#include <linux/malloc.h>


+#include <linux/fcntl.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>

+#include <linux/serial.h>
+#include <linux/ioctl.h>
+#include <linux/proc_fs.h>


+#include <linux/usb.h>
+
+#ifdef CONFIG_USB_SERIAL_DEBUG
+ static int debug = 1;
+#else
+ static int debug;
+#endif
+
+#include "usb-serial.h"
+

+#include "io_edgeport.h"
+#include "io_ionsp.h" /* info for the iosp messages */
+#include "io_16654.h" /* 16654 UART defines */
+
+/*


+ * Version Information
+ */

+#define DRIVER_VERSION "v2.0.0"
+#define DRIVER_AUTHOR "Greg Kroah-Hartman <gr...@kroah.com> and David Iacovelli"
+#define DRIVER_DESC "Edgeport USB Serial Driver"
+
+/* First, the latest boot code - for first generation edgeports */
+#define IMAGE_ARRAY_NAME BootCodeImage_GEN1
+#define IMAGE_VERSION_NAME BootCodeImageVersion_GEN1
+#include "io_fw_boot.h" /* the bootloader firmware to download to a device, if it needs it */
+
+/* for second generation edgeports */
+#define IMAGE_ARRAY_NAME BootCodeImage_GEN2
+#define IMAGE_VERSION_NAME BootCodeImageVersion_GEN2
+#include "io_fw_boot2.h" /* the bootloader firmware to download to a device, if it needs it */
+
+/* Then finally the main run-time operational code - for first generation edgeports */
+#define IMAGE_ARRAY_NAME OperationalCodeImage_GEN1
+#define IMAGE_VERSION_NAME OperationalCodeImageVersion_GEN1
+#include "io_fw_down.h" /* Define array OperationalCodeImage[] */
+
+/* for second generation edgeports */
+#define IMAGE_ARRAY_NAME OperationalCodeImage_GEN2
+#define IMAGE_VERSION_NAME OperationalCodeImageVersion_GEN2
+#include "io_fw_down2.h" /* Define array OperationalCodeImage[] */
+
+
+#define MAX_NAME_LEN 64
+
+
+#define CHASE_TIMEOUT (5*HZ) /* 5 seconds */
+#define OPEN_TIMEOUT (5*HZ) /* 5 seconds */
+#define COMMAND_TIMEOUT (5*HZ) /* 5 seconds */
+
+#ifndef SERIAL_MAGIC
+ #define SERIAL_MAGIC 0x6702
+#endif
+#define PORT_MAGIC 0x7301
+
+
+/* receive port state */
+enum RXSTATE {
+ EXPECT_HDR1 = 0, /* Expect header byte 1 */
+ EXPECT_HDR2 = 1, /* Expect header byte 2 */
+ EXPECT_DATA = 2, /* Expect 'RxBytesRemaining' data */
+ EXPECT_HDR3 = 3, /* Expect header byte 3 (for status hdrs only) */
+};
+
+
+/* the info for all of the devices that this driver supports */
+int EdgeportDevices[] = EDGEPORT_DEVICE_IDS;
+#define NUM_EDGEPORT_DEVICES (sizeof(EdgeportDevices) / sizeof(int))
+
+
+/* Transmit Fifo
+ * This Transmit queue is an extension of the edgeport Rx buffer.
+ * The maximum amount of data buffered in both the edgeport
+ * Rx buffer (maxTxCredits) and this buffer will never exceed maxTxCredits.
+ */
+struct TxFifo {
+ unsigned int head; /* index to head pointer (write) */
+ unsigned int tail; /* index to tail pointer (read) */
+ unsigned int count; /* Bytes in queue */
+ unsigned int size; /* Max size of queue (equal to Max number of TxCredits) */
+ unsigned char *fifo; /* allocated Buffer */
+};
+
+/* This structure holds all of the local port information */
+struct edgeport_port {
+ __u16 txCredits; /* our current credits for this port */
+ __u16 maxTxCredits; /* the max size of the port */
+
+ struct TxFifo txfifo; /* transmit fifo -- size will be maxTxCredits */
+ struct urb *write_urb; /* write URB for this port */
+ char write_in_progress; /* TRUE while a write URB is outstanding */
+
+ __u8 shadowLCR; /* last LCR value received */
+ __u8 shadowMCR; /* last MCR value received */
+ __u8 shadowMSR; /* last MSR value received */
+ __u8 shadowLSR; /* last LSR value received */
+ __u8 shadowXonChar; /* last value set as XON char in Edgeport */
+ __u8 shadowXoffChar; /* last value set as XOFF char in Edgeport */
+ __u8 validDataMask;
+ __u32 baudRate;
+
+ char open;
+ char openPending;
+ char commandPending;
+ char closePending;
+ char chaseResponsePending;
+
+ wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */
+ wait_queue_head_t wait_open; /* for handling sleeping while waiting for open to finish */
+ wait_queue_head_t wait_command; /* for handling sleeping while waiting for command to finish */
+ wait_queue_head_t delta_msr_wait; /* for handling sleeping while waiting for msr change to happen */
+
+ struct async_icount icount;
+ struct usb_serial_port *port; /* loop back to the owner of this object */
+};
+
+
+/* This structure holds all of the individual device information */
+struct edgeport_serial {
+ char name[MAX_NAME_LEN+1]; /* string name of this device */
+
+ EDGE_MANUF_DESCRIPTOR manuf_descriptor; /* the manufacturer descriptor */
+ EDGE_BOOT_DESCRIPTOR boot_descriptor; /* the boot firmware descriptor */
+ struct edgeport_product_info product_info; /* Product Info */
+
+ __u8 interrupt_in_endpoint; /* the interrupt endpoint handle */
+ unsigned char * interrupt_in_buffer; /* the buffer we use for the interrupt endpoint */
+ struct urb * interrupt_read_urb; /* our interrupt urb */
+
+ __u8 bulk_in_endpoint; /* the bulk in endpoint handle */
+ unsigned char * bulk_in_buffer; /* the buffer we use for the bulk in endpoint */
+ struct urb * read_urb; /* our bulk read urb */
+
+ __u8 bulk_out_endpoint; /* the bulk out endpoint handle */
+
+ __s16 rxBytesAvail; /* the number of bytes that we need to read from this device */
+
+ enum RXSTATE rxState; /* the current state of the bulk receive processor */
+ __u8 rxHeader1; /* receive header byte 1 */
+ __u8 rxHeader2; /* receive header byte 2 */
+ __u8 rxHeader3; /* receive header byte 3 */
+ __u8 rxPort; /* the port that we are currently receiving data for */
+ __u8 rxStatusCode; /* the receive status code */
+ __u8 rxStatusParam; /* the receive status paramater */
+ __s16 rxBytesRemaining; /* the number of port bytes left to read */
+ struct usb_serial *serial; /* loop back to the owner of this object */
+};
+
+/* baud rate information */
+typedef struct _DIVISOR_TABLE_ENTRY {
+ __u32 BaudRate;
+ __u16 Divisor;
+} DIVISOR_TABLE_ENTRY, *PDIVISOR_TABLE_ENTRY;
+
+//
+// Define table of divisors for Rev A EdgePort/4 hardware
+// These assume a 3.6864MHz crystal, the standard /16, and
+// MCR.7 = 0.
+//
+static DIVISOR_TABLE_ENTRY DivisorTable[] = {
+ { 75, 3072},
+ { 110, 2095}, /* 2094.545455 => 230450 => .0217 % over */
+ { 134, 1713}, /* 1713.011152 => 230398.5 => .00065% under */
+ { 150, 1536},
+ { 300, 768},
+ { 600, 384},
+ { 1200, 192},
+ { 1800, 128},
+ { 2400, 96},
+ { 4800, 48},
+ { 7200, 32},
+ { 9600, 24},
+ { 14400, 16},
+ { 19200, 12},
+ { 38400, 6},
+ { 57600, 4},
+ { 115200, 2},
+ { 230400, 1},
+};
+
+/* local variables */
+static int CmdUrbs = 0; /* Number of outstanding Command Write Urbs */
+
+
+/* local function prototypes */
+
+/* function prototypes for all URB callbacks */
+static void edge_interrupt_callback (struct urb *urb);
+static void edge_bulk_in_callback (struct urb *urb);
+static void edge_bulk_out_data_callback (struct urb *urb);


+static void edge_bulk_out_cmd_callback (struct urb *urb);
+

+/* function prototypes for the usbserial callbacks */
+static int edge_open (struct usb_serial_port *port, struct file *filp);
+static void edge_close (struct usb_serial_port *port, struct file *filp);
+static int edge_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
+static int edge_write_room (struct usb_serial_port *port);
+static int edge_chars_in_buffer (struct usb_serial_port *port);
+static void edge_throttle (struct usb_serial_port *port);
+static void edge_unthrottle (struct usb_serial_port *port);
+static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg);
+static void edge_break (struct usb_serial_port *port, int break_state);
+static int edge_startup (struct usb_serial *serial);
+static void edge_shutdown (struct usb_serial *serial);
+
+
+#include "io_tables.h" /* all of the devices that this driver supports */
+
+
+/* function prototypes for all of our local functions */
+static int process_rcvd_data (struct edgeport_serial *edge_serial, unsigned char *buffer, __u16 bufferLength);
+static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2, __u8 byte3);
+static void handle_new_msr (struct edgeport_port *edge_port, __u8 newMsr);
+static void handle_new_lsr (struct edgeport_port *edge_port, __u8 lsrData, __u8 lsr, __u8 data);
+static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u8 param);
+static int calc_baud_rate_divisor (int baud_rate, int *divisor);
+static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate);
+static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios);
+static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue);
+static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer, int writeLength);
+static void send_more_port_data (struct edgeport_serial *edge_serial, struct edgeport_port *edge_port);
+
+static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data);
+static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data);
+static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data);
+static void get_manufacturing_desc (struct edgeport_serial *edge_serial);
+static void get_boot_desc (struct edgeport_serial *edge_serial);


+static void load_application_firmware (struct edgeport_serial *edge_serial);
+
+

+static void unicode_to_ascii (char *string, short *unicode, int unicode_size);
+

+static int get_string_desc (struct usb_device *dev, int Id, struct usb_string_descriptor **pRetDesc);
+
+
+
+
+// ************************************************************************
+// ************************************************************************
+// ************************************************************************
+// ************************************************************************
+
+// These functions should be in firmware.c


+
+/************************************************************************
+ * *

+ * update_edgeport_E2PROM() Compare current versions of *
+ * Boot ROM and Manufacture *
+ * Descriptors with versions *
+ * embedded in this driver *


+ * *
+ ************************************************************************/

+void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
+{
+ __u32 BootCurVer;
+ __u32 BootNewVer;
+ __u8 BootMajorVersion;
+ __u8 BootMinorVersion;
+ __u16 BootBuildNumber;
+ __u8 *BootImage;
+ __u32 BootSize;


+ PEDGE_FIRMWARE_IMAGE_RECORD record;
+ unsigned char *firmware;

+ int response;
+
+
+ switch (edge_serial->product_info.iDownloadFile) {
+ case EDGE_DOWNLOAD_FILE_I930:

+ BootMajorVersion = BootCodeImageVersion_GEN1.MajorVersion;
+ BootMinorVersion = BootCodeImageVersion_GEN1.MinorVersion;
+ BootBuildNumber = BootCodeImageVersion_GEN1.BuildNumber;
+ BootImage = &BootCodeImage_GEN1[0];
+ BootSize = sizeof( BootCodeImage_GEN1 );
+ break;
+
+ case EDGE_DOWNLOAD_FILE_80251:
+ BootMajorVersion = BootCodeImageVersion_GEN2.MajorVersion;
+ BootMinorVersion = BootCodeImageVersion_GEN2.MinorVersion;
+ BootBuildNumber = BootCodeImageVersion_GEN2.BuildNumber;
+ BootImage = &BootCodeImage_GEN2[0];
+ BootSize = sizeof( BootCodeImage_GEN2 );
+ break;
+
+ default:
+ return;
+ }
+
+ // Check Boot Image Version
+ BootCurVer = (edge_serial->boot_descriptor.MajorVersion << 24) +
+ (edge_serial->boot_descriptor.MinorVersion << 16) +
+ edge_serial->boot_descriptor.BuildNumber;
+
+ BootNewVer = (BootMajorVersion << 24) +
+ (BootMinorVersion << 16) +
+ BootBuildNumber;
+
+ dbg("Current Boot Image version %d.%d.%d",
+ edge_serial->boot_descriptor.MajorVersion,


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 67'
echo 'File patch-2.2.20 is continued in part 68'
echo "68" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:15 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part76

#!/bin/sh -x
# this is part 76 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 76; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+{
+ unsigned long flags;
+

+ dbg(__FUNCTION__" port %d", port->number);
+
+ spin_lock_irqsave (&port->port_lock, flags);
+

+ --port->open_count;
+ MOD_DEC_USE_COUNT;
+
+ if (port->open_count <= 0) {
+ /* shutdown our bulk reads and writes */
+ usb_unlink_urb (port->write_urb);
+ usb_unlink_urb (port->read_urb);
+ /* wgg - do I need this? I think so. */
+ usb_unlink_urb (port->interrupt_in_urb);


+ port->active = 0;

+ }
+
+ spin_unlock_irqrestore (&port->port_lock, flags);
+

+} /* mct_u232_close */
+
+
+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+/* The generic routines work fine otherwise */
+
+static int mct_u232_write (struct usb_serial_port *port, int from_user,
+ const unsigned char *buf, int count)
+{


+ struct usb_serial *serial = port->serial;

+ unsigned long flags;
+ int result, bytes_sent, size;
+
+ dbg(__FUNCTION__ " - port %d", port->number);
+
+ if (count == 0) {
+ dbg(__FUNCTION__ " - write request of 0 bytes");
+ return (0);
+ }
+
+ /* only do something if we have a bulk out endpoint */
+ if (!serial->num_bulk_out)
+ return(0);;
+
+ /* another write is still pending? */
+ if (port->write_urb->status == -EINPROGRESS) {
+ dbg (__FUNCTION__ " - already writing");
+ return (0);
+ }
+
+ bytes_sent = 0;
+ while (count > 0) {


+
+ spin_lock_irqsave (&port->port_lock, flags);
+

+ size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
+
+ usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf);
+
+ if (from_user) {
+ copy_from_user(port->write_urb->transfer_buffer, buf, size);
+ }
+ else {
+ memcpy (port->write_urb->transfer_buffer, buf, size);
+ }
+
+ /* set up our urb */
+ FILL_BULK_URB(port->write_urb, serial->dev,
+ usb_sndbulkpipe(serial->dev,
+ port->bulk_out_endpointAddress),
+ port->write_urb->transfer_buffer, size,
+ ((serial->type->write_bulk_callback) ?
+ serial->type->write_bulk_callback :
+ mct_u232_write_bulk_callback),
+ port);
+
+ /* send the data out the bulk port */
+ result = usb_submit_urb(port->write_urb);
+ if (result) {
+ err(__FUNCTION__
+ " - failed submitting write urb, error %d", result);


+ spin_unlock_irqrestore (&port->port_lock, flags);

+ return bytes_sent;


+ }
+
+ spin_unlock_irqrestore (&port->port_lock, flags);
+

+ bytes_sent += size;
+ if (write_blocking)
+ interruptible_sleep_on(&port->write_wait);
+ else
+ break;
+
+ buf += size;
+ count -= size;
+ }
+
+ return bytes_sent;
+} /* mct_u232_write */
+


+static void mct_u232_write_bulk_callback (struct urb *urb)

+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;


+ struct usb_serial *serial = port->serial;

+ struct tty_struct *tty = port->tty;
+
+ dbg(__FUNCTION__ " - port %d", port->number);
+
+ if (!serial) {
+ dbg(__FUNCTION__ " - bad serial pointer, exiting");
+ return;
+ }
+
+ if (urb->status) {
+ dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
+ urb->status);
+ return;
+ }
+
+ if (write_blocking) {
+ wake_up_interruptible(&port->write_wait);


+ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&

+ tty->ldisc.write_wakeup)
+ (tty->ldisc.write_wakeup)(tty);
+ wake_up_interruptible(&tty->write_wait);
+
+ } else {
+ /* from generic_write_bulk_callback */
+ queue_task(&port->tqueue, &tq_immediate);
+ mark_bh(IMMEDIATE_BH);
+ }
+
+ return;
+} /* mct_u232_write_bulk_callback */
+#endif
+


+static void mct_u232_read_int_callback (struct urb *urb)

+{
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;


+ struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
+ struct usb_serial *serial = port->serial;

+ struct tty_struct *tty;
+ unsigned char *data = urb->transfer_buffer;
+
+ dbg(__FUNCTION__ " - port %d", port->number);
+
+ /* The urb might have been killed. */
+ if (urb->status) {
+ dbg(__FUNCTION__ " - nonzero read bulk status received: %d",
+ urb->status);
+ return;
+ }
+ if (!serial) {
+ dbg(__FUNCTION__ " - bad serial pointer, exiting");
+ return;
+ }
+
+ usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
+
+ /*
+ * Work-a-round: handle the 'usual' bulk-in pipe here
+ */
+ if (urb->transfer_buffer_length > 2) {
+ int i;
+ tty = port->tty;
+ if (urb->actual_length) {
+ for (i = 0; i < urb->actual_length ; ++i) {
+ tty_insert_flip_char(tty, data[i], 0);
+ }
+ tty_flip_buffer_push(tty);
+ }
+ /* INT urbs are automatically re-submitted */
+ return;
+ }
+
+ /*
+ * The interrupt-in pipe signals exceptional conditions (modem line
+ * signal changes and errors). data[0] holds MSR, data[1] holds LSR.
+ */
+ priv->last_msr = data[MCT_U232_MSR_INDEX];
+
+ /* Record Control Line states */


+ mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
+

+#if 0
+ /* Not yet handled. See belin_sa.c for further information */
+ /* Now to report any errors */
+ priv->last_lsr = data[MCT_U232_LSR_INDEX];
+ /*
+ * fill in the flip buffer here, but I do not know the relation
+ * to the current/next receive buffer or characters. I need
+ * to look in to this before committing any code.
+ */
+ if (priv->last_lsr & MCT_U232_LSR_ERR) {
+ tty = port->tty;
+ /* Overrun Error */
+ if (priv->last_lsr & MCT_U232_LSR_OE) {
+ }
+ /* Parity Error */
+ if (priv->last_lsr & MCT_U232_LSR_PE) {
+ }
+ /* Framing Error */
+ if (priv->last_lsr & MCT_U232_LSR_FE) {
+ }
+ /* Break Indicator */
+ if (priv->last_lsr & MCT_U232_LSR_BI) {
+ }
+ }
+#endif
+
+ /* INT urbs are automatically re-submitted */
+} /* mct_u232_read_int_callback */
+
+


+static void mct_u232_set_termios (struct usb_serial_port *port,

+ struct termios *old_termios)
+{


+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = (struct mct_u232_private *)port->private;

+ unsigned int iflag = port->tty->termios->c_iflag;
+ unsigned int old_iflag = old_termios->c_iflag;
+ unsigned int cflag = port->tty->termios->c_cflag;
+ unsigned int old_cflag = old_termios->c_cflag;
+
+ /*
+ * Update baud rate
+ */
+ if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
+ /* reassert DTR and (maybe) RTS on transition from B0 */
+ if( (old_cflag & CBAUD) == B0 ) {
+ dbg(__FUNCTION__ ": baud was B0");
+ priv->control_state |= TIOCM_DTR;
+ /* don't set RTS if using hardware flow control */
+ if (!(old_cflag & CRTSCTS)) {
+ priv->control_state |= TIOCM_RTS;
+ }


+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+ }
+

+ switch(cflag & CBAUD) {
+ case B0: /* handled below */
+ break;
+ case B300: mct_u232_set_baud_rate(serial, 300);
+ break;
+ case B600: mct_u232_set_baud_rate(serial, 600);
+ break;
+ case B1200: mct_u232_set_baud_rate(serial, 1200);
+ break;
+ case B2400: mct_u232_set_baud_rate(serial, 2400);
+ break;
+ case B4800: mct_u232_set_baud_rate(serial, 4800);
+ break;
+ case B9600: mct_u232_set_baud_rate(serial, 9600);
+ break;
+ case B19200: mct_u232_set_baud_rate(serial, 19200);
+ break;
+ case B38400: mct_u232_set_baud_rate(serial, 38400);
+ break;
+ case B57600: mct_u232_set_baud_rate(serial, 57600);
+ break;
+ case B115200: mct_u232_set_baud_rate(serial, 115200);
+ break;
+ default: err("MCT USB-RS232 converter: unsupported baudrate request, using default of 9600");
+ mct_u232_set_baud_rate(serial, 9600); break;
+ }
+ if ((cflag & CBAUD) == B0 ) {
+ dbg(__FUNCTION__ ": baud is B0");
+ /* Drop RTS and DTR */
+ priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);


+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+ }
+ }

+
+ /*
+ * Update line control register (LCR)
+ */
+ if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD))
+ || (cflag & CSIZE) != (old_cflag & CSIZE)
+ || (cflag & CSTOPB) != (old_cflag & CSTOPB) ) {
+
+
+ priv->last_lcr = 0;
+
+ /* set the parity */


+ if (cflag & PARENB)

+ priv->last_lcr |= (cflag & PARODD) ?
+ MCT_U232_PARITY_ODD : MCT_U232_PARITY_EVEN;
+ else
+ priv->last_lcr |= MCT_U232_PARITY_NONE;
+
+ /* set the number of data bits */
+ switch (cflag & CSIZE) {
+ case CS5:
+ priv->last_lcr |= MCT_U232_DATA_BITS_5; break;
+ case CS6:
+ priv->last_lcr |= MCT_U232_DATA_BITS_6; break;
+ case CS7:
+ priv->last_lcr |= MCT_U232_DATA_BITS_7; break;
+ case CS8:
+ priv->last_lcr |= MCT_U232_DATA_BITS_8; break;
+ default:
+ err("CSIZE was not CS5-CS8, using default of 8");
+ priv->last_lcr |= MCT_U232_DATA_BITS_8;
+ break;
+ }
+
+ /* set the number of stop bits */
+ priv->last_lcr |= (cflag & CSTOPB) ?
+ MCT_U232_STOP_BITS_2 : MCT_U232_STOP_BITS_1;
+


+ mct_u232_set_line_ctrl(serial, priv->last_lcr);
+ }
+

+ /*
+ * Set flow control: well, I do not really now how to handle DTR/RTS.
+ * Just do what we have seen with SniffUSB on Win98.
+ */
+ if( (iflag & IXOFF) != (old_iflag & IXOFF)
+ || (iflag & IXON) != (old_iflag & IXON)
+ || (cflag & CRTSCTS) != (old_cflag & CRTSCTS) ) {
+
+ /* Drop DTR/RTS if no flow control otherwise assert */
+ if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS) )


+ priv->control_state |= TIOCM_DTR | TIOCM_RTS;
+ else

+ priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);


+ mct_u232_set_modem_ctrl(serial, priv->control_state);
+ }

+} /* mct_u232_set_termios */
+
+
+static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
+{


+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = (struct mct_u232_private *)port->private;

+ unsigned char lcr = priv->last_lcr;
+
+ dbg (__FUNCTION__ "state=%d", break_state);
+
+ if (break_state)
+ lcr |= MCT_U232_SET_BREAK;
+
+ mct_u232_set_line_ctrl(serial, lcr);
+} /* mct_u232_break_ctl */
+
+
+static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
+ unsigned int cmd, unsigned long arg)
+{


+ struct usb_serial *serial = port->serial;
+ struct mct_u232_private *priv = (struct mct_u232_private *)port->private;

+ int ret, mask;
+
+ dbg (__FUNCTION__ "cmd=0x%x", cmd);
+
+ /* Based on code from acm.c and others */
+ switch (cmd) {
+ case TIOCMGET:
+ return put_user(priv->control_state, (unsigned long *) arg);
+ break;
+
+ case TIOCMSET: /* Turns on and off the lines as specified by the mask */
+ case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
+ case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
+ if ((ret = get_user(mask, (unsigned long *) arg))) return ret;
+
+ if ((cmd == TIOCMSET) || (mask & TIOCM_RTS)) {
+ /* RTS needs set */
+ if( ((cmd == TIOCMSET) && (mask & TIOCM_RTS)) ||
+ (cmd == TIOCMBIS) )
+ priv->control_state |= TIOCM_RTS;
+ else
+ priv->control_state &= ~TIOCM_RTS;
+ }
+
+ if ((cmd == TIOCMSET) || (mask & TIOCM_DTR)) {
+ /* DTR needs set */
+ if( ((cmd == TIOCMSET) && (mask & TIOCM_DTR)) ||
+ (cmd == TIOCMBIS) )
+ priv->control_state |= TIOCM_DTR;
+ else
+ priv->control_state &= ~TIOCM_DTR;
+ }
+ mct_u232_set_modem_ctrl(serial, priv->control_state);


+ break;
+
+ case TIOCMIWAIT:

+ /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+ /* TODO */
+ return( 0 );
+
+ case TIOCGICOUNT:
+ /* return count of modemline transitions */
+ /* TODO */
+ return 0;
+
+ default:
+ dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd);
+ return(-ENOIOCTLCMD);
+ break;
+ }
+ return 0;
+} /* mct_u232_ioctl */
+
+
+static int __init mct_u232_init (void)
+{
+ usb_serial_register (&mct_u232_device);
+ usb_serial_register (&mct_u232_sitecom_device);
+ usb_serial_register (&mct_u232_du_h3sp_device);
+ info(DRIVER_VERSION ":" DRIVER_DESC);


+ return 0;
+}
+

+
+static void __exit mct_u232_exit (void)
+{
+ usb_serial_deregister (&mct_u232_device);
+ usb_serial_deregister (&mct_u232_sitecom_device);
+ usb_serial_deregister (&mct_u232_du_h3sp_device);
+}
+
+
+module_init (mct_u232_init);
+module_exit(mct_u232_exit);


+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+

+#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+MODULE_PARM(write_blocking, "i");
+MODULE_PARM_DESC(write_blocking,
+ "The write function will block to write out all data");
+#endif


+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/mct_u232.h linux/drivers/usb/serial/mct_u232.h
--- v2.2.19/drivers/usb/serial/mct_u232.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/mct_u232.h Wed Oct 10 01:41:32 2001
@@ -0,0 +1,369 @@
+/*
+ * Definitions for MCT (Magic Control Technology) USB-RS232 Converter Driver


+ *
+ * Copyright (C) 2000 Wolfgang Grandegger (wolf...@ces.ch)
+ *
+ * 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.
+ *

+ * This driver is for the device MCT USB-RS232 Converter (25 pin, Model No.
+ * U232-P25) from Magic Control Technology Corp. (there is also a 9 pin
+ * Model No. U232-P9). See http://www.mct.com.tw/p_u232.html for further
+ * information. The properties of this device are listed at the end of this
+ * file. This device is available from various distributors. I know Hana,
+ * http://www.hana.de and D-Link, http://www.dlink.com/products/usb/dsbs25.
+ *
+ * All of the information about the device was acquired by using SniffUSB
+ * on Windows98. The technical details of the reverse engineering are
+ * summarized at the end of this file.
+ */
+
+#ifndef __LINUX_USB_SERIAL_MCT_U232_H
+#define __LINUX_USB_SERIAL_MCT_U232_H
+
+#define MCT_U232_VID 0x0711 /* Vendor Id */
+#define MCT_U232_PID 0x0210 /* Original MCT Product Id */
+
+/* U232-P25, Sitecom */
+#define MCT_U232_SITECOM_PID 0x0230 /* Sitecom Product Id */
+
+/* DU-H3SP USB BAY hub */
+
+#define MCT_U232_DU_H3SP_PID 0x0200 /* D-Link DU-H3SP USB BAY */
+
+/*
+ * Vendor Request Interface
+ */
+#define MCT_U232_SET_REQUEST_TYPE 0x40
+#define MCT_U232_GET_REQUEST_TYPE 0xc0
+
+#define MCT_U232_GET_MODEM_STAT_REQUEST 2 /* Get Modem Status Register (MSR) */
+#define MCT_U232_GET_MODEM_STAT_SIZE 1
+
+#define MCT_U232_GET_LINE_CTRL_REQUEST 6 /* Get Line Control Register (LCR) */
+#define MCT_U232_GET_LINE_CTRL_SIZE 1 /* ... not used by this driver */
+
+#define MCT_U232_SET_BAUD_RATE_REQUEST 5 /* Set Baud Rate Divisor */
+#define MCT_U232_SET_BAUD_RATE_SIZE 4
+
+#define MCT_U232_SET_LINE_CTRL_REQUEST 7 /* Set Line Control Register (LCR) */
+#define MCT_U232_SET_LINE_CTRL_SIZE 1
+
+#define MCT_U232_SET_MODEM_CTRL_REQUEST 10 /* Set Modem Control Register (MCR) */
+#define MCT_U232_SET_MODEM_CTRL_SIZE 1
+
+/*
+ * Baud rate (divisor)
+ */
+#define MCT_U232_BAUD_RATE(b) (115200/b)
+
+/*
+ * Line Control Register (LCR)
+ */
+#define MCT_U232_SET_BREAK 0x40
+
+#define MCT_U232_PARITY_SPACE 0x38
+#define MCT_U232_PARITY_MARK 0x28
+#define MCT_U232_PARITY_EVEN 0x18
+#define MCT_U232_PARITY_ODD 0x08
+#define MCT_U232_PARITY_NONE 0x00
+
+#define MCT_U232_DATA_BITS_5 0x00
+#define MCT_U232_DATA_BITS_6 0x01
+#define MCT_U232_DATA_BITS_7 0x02
+#define MCT_U232_DATA_BITS_8 0x03
+
+#define MCT_U232_STOP_BITS_2 0x04
+#define MCT_U232_STOP_BITS_1 0x00
+
+/*
+ * Modem Control Register (MCR)
+ */
+#define MCT_U232_MCR_NONE 0x8 /* Deactivate DTR and RTS */
+#define MCT_U232_MCR_RTS 0xa /* Activate RTS */
+#define MCT_U232_MCR_DTR 0x9 /* Activate DTR */
+
+/*
+ * Modem Status Register (MSR)
+ */
+#define MCT_U232_MSR_INDEX 0x0 /* data[index] */
+#define MCT_U232_MSR_CD 0x80 /* Current CD */
+#define MCT_U232_MSR_RI 0x40 /* Current RI */
+#define MCT_U232_MSR_DSR 0x20 /* Current DSR */
+#define MCT_U232_MSR_CTS 0x10 /* Current CTS */
+#define MCT_U232_MSR_DCD 0x08 /* Delta CD */
+#define MCT_U232_MSR_DRI 0x04 /* Delta RI */
+#define MCT_U232_MSR_DDSR 0x02 /* Delta DSR */
+#define MCT_U232_MSR_DCTS 0x01 /* Delta CTS */
+
+/*
+ * Line Status Register (LSR)
+ */
+#define MCT_U232_LSR_INDEX 1 /* data[index] */
+#define MCT_U232_LSR_ERR 0x80 /* OE | PE | FE | BI */
+#define MCT_U232_LSR_TEMT 0x40 /* transmit register empty */
+#define MCT_U232_LSR_THRE 0x20 /* transmit holding register empty */
+#define MCT_U232_LSR_BI 0x10 /* break indicator */
+#define MCT_U232_LSR_FE 0x08 /* framing error */
+#define MCT_U232_LSR_OE 0x02 /* overrun error */
+#define MCT_U232_LSR_PE 0x04 /* parity error */
+#define MCT_U232_LSR_OE 0x02 /* overrun error */
+#define MCT_U232_LSR_DR 0x01 /* receive data ready */
+
+
+/* -----------------------------------------------------------------------------
+ * Technical Specification reverse engineered with SniffUSB on Windows98
+ * =====================================================================
+ *
+ * The technical details of the device have been acquired be using "SniffUSB"
+ * and the vendor-supplied device driver (version 2.3A) under Windows98. To
+ * identify the USB vendor-specific requests and to assign them to terminal
+ * settings (flow control, baud rate, etc.) the program "SerialSettings" from
+ * William G. Greathouse has been proven to be very useful. I also used the
+ * Win98 "HyperTerminal" and "usb-robot" on Linux for testing. The results and
+ * observations are summarized below:
+ *
+ * The USB requests seem to be directly mapped to the registers of a 8250,
+ * 16450 or 16550 UART. The FreeBSD handbook (appendix F.4 "Input/Output
+ * devices") contains a comprehensive description of UARTs and its registers.
+ * The bit descriptions are actually taken from there.
+ *
+ *
+ * Baud rate (divisor)
+ * -------------------
+ *
+ * BmRequestType: 0x4 (0100 0000B)
+ * bRequest: 0x5
+ * wValue: 0x0
+ * wIndex: 0x0
+ * wLength: 0x4
+ * Data: divisor = 115200 / baud_rate
+ *
+ *
+ * Line Control Register (LCR)
+ * ---------------------------
+ *
+ * BmRequestType: 0x4 (0100 0000B) 0xc (1100 0000B)
+ * bRequest: 0x7 0x6
+ * wValue: 0x0
+ * wIndex: 0x0
+ * wLength: 0x1
+ * Data: LCR (see below)
+ *
+ * Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data
+ * transmit/receive register (THR/RBR) and the Interrupt Enable Register
+ * (IER) is disabled. Any access to these ports is now redirected to the
+ * Divisor Latch Registers. Setting this bit, loading the Divisor
+ * Registers, and clearing DLAB should be done with interrupts disabled.
+ * Bit 6: Set Break. When set to "1", the transmitter begins to transmit
+ * continuous Spacing until this bit is set to "0". This overrides any
+ * bits of characters that are being transmitted.
+ * Bit 5: Stick Parity. When parity is enabled, setting this bit causes parity
+ * to always be "1" or "0", based on the value of Bit 4.
+ * Bit 4: Even Parity Select (EPS). When parity is enabled and Bit 5 is "0",
+ * setting this bit causes even parity to be transmitted and expected.
+ * Otherwise, odd parity is used.
+ * Bit 3: Parity Enable (PEN). When set to "1", a parity bit is inserted
+ * between the last bit of the data and the Stop Bit. The UART will also
+ * expect parity to be present in the received data.
+ * Bit 2: Number of Stop Bits (STB). If set to "1" and using 5-bit data words,
+ * 1.5 Stop Bits are transmitted and expected in each data word. For
+ * 6, 7 and 8-bit data words, 2 Stop Bits are transmitted and expected.
+ * When this bit is set to "0", one Stop Bit is used on each data word.
+ * Bit 1: Word Length Select Bit #1 (WLSB1)
+ * Bit 0: Word Length Select Bit #0 (WLSB0)
+ * Together these bits specify the number of bits in each data word.
+ * 1 0 Word Length
+ * 0 0 5 Data Bits
+ * 0 1 6 Data Bits
+ * 1 0 7 Data Bits
+ * 1 1 8 Data Bits
+ *
+ * SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs
+ * in the Win98 driver: the break does not work (bit 6 is not asserted) and the
+ * sticky parity bit is not cleared when set once. The LCR can also be read
+ * back with USB request 6 but this has never been observed with SniffUSB.
+ *
+ *
+ * Modem Control Register (MCR)
+ * ----------------------------
+ *
+ * BmRequestType: 0x4 (0100 0000B)
+ * bRequest: 0xa
+ * wValue: 0x0
+ * wIndex: 0x0
+ * wLength: 0x1
+ * Data: MCR (Bit 4..7, see below)
+ *
+ * Bit 7: Reserved, always 0.
+ * Bit 6: Reserved, always 0.
+ * Bit 5: Reserved, always 0.
+ * Bit 4: Loop-Back Enable. When set to "1", the UART transmitter and receiver
+ * are internally connected together to allow diagnostic operations. In
+ * addition, the UART modem control outputs are connected to the UART
+ * modem control inputs. CTS is connected to RTS, DTR is connected to
+ * DSR, OUT1 is connected to RI, and OUT 2 is connected to DCD.
+ * Bit 3: OUT 2. An auxiliary output that the host processor may set high or
+ * low. In the IBM PC serial adapter (and most clones), OUT 2 is used
+ * to tri-state (disable) the interrupt signal from the
+ * 8250/16450/16550 UART.
+ * Bit 2: OUT 1. An auxiliary output that the host processor may set high or
+ * low. This output is not used on the IBM PC serial adapter.
+ * Bit 1: Request to Send (RTS). When set to "1", the output of the UART -RTS
+ * line is Low (Active).
+ * Bit 0: Data Terminal Ready (DTR). When set to "1", the output of the UART
+ * -DTR line is Low (Active).
+ *
+ * SniffUSB observations: Bit 2 and 4 seem not to be used but bit 3 has been
+ * seen _always_ set.
+ *
+ *
+ * Modem Status Register (MSR)
+ * ---------------------------
+ *
+ * BmRequestType: 0xc (1100 0000B)
+ * bRequest: 0x2
+ * wValue: 0x0
+ * wIndex: 0x0
+ * wLength: 0x1
+ * Data: MSR (see below)
+ *
+ * Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the
+ * UART.
+ * Bit 6: Ring Indicator (RI). Reflects the state of the RI line on the UART.
+ * Bit 5: Data Set Ready (DSR). Reflects the state of the DSR line on the UART.
+ * Bit 4: Clear To Send (CTS). Reflects the state of the CTS line on the UART.
+ * Bit 3: Delta Data Carrier Detect (DDCD). Set to "1" if the -DCD line has
+ * changed state one more more times since the last time the MSR was
+ * read by the host.
+ * Bit 2: Trailing Edge Ring Indicator (TERI). Set to "1" if the -RI line has
+ * had a low to high transition since the last time the MSR was read by
+ * the host.
+ * Bit 1: Delta Data Set Ready (DDSR). Set to "1" if the -DSR line has changed
+ * state one more more times since the last time the MSR was read by the
+ * host.
+ * Bit 0: Delta Clear To Send (DCTS). Set to "1" if the -CTS line has changed
+ * state one more times since the last time the MSR was read by the
+ * host.
+ *
+ * SniffUSB observations: the MSR is also returned as first byte on the
+ * interrupt-in endpoint 0x83 to signal changes of modem status lines. The USB
+ * request to read MSR cannot be applied during normal device operation.
+ *
+ *
+ * Line Status Register (LSR)
+ * --------------------------
+ *
+ * Bit 7 Error in Receiver FIFO. On the 8250/16450 UART, this bit is zero.
+ * This bit is set to "1" when any of the bytes in the FIFO have one or
+ * more of the following error conditions: PE, FE, or BI.
+ * Bit 6 Transmitter Empty (TEMT). When set to "1", there are no words
+ * remaining in the transmit FIFO or the transmit shift register. The
+ * transmitter is completely idle.
+ * Bit 5 Transmitter Holding Register Empty (THRE). When set to "1", the FIFO
+ * (or holding register) now has room for at least one additional word
+ * to transmit. The transmitter may still be transmitting when this bit
+ * is set to "1".
+ * Bit 4 Break Interrupt (BI). The receiver has detected a Break signal.
+ * Bit 3 Framing Error (FE). A Start Bit was detected but the Stop Bit did not
+ * appear at the expected time. The received word is probably garbled.
+ * Bit 2 Parity Error (PE). The parity bit was incorrect for the word received.
+ * Bit 1 Overrun Error (OE). A new word was received and there was no room in
+ * the receive buffer. The newly-arrived word in the shift register is
+ * discarded. On 8250/16450 UARTs, the word in the holding register is
+ * discarded and the newly- arrived word is put in the holding register.
+ * Bit 0 Data Ready (DR). One or more words are in the receive FIFO that the
+ * host may read. A word must be completely received and moved from the
+ * shift register into the FIFO (or holding register for 8250/16450
+ * designs) before this bit is set.
+ *
+ * SniffUSB observations: the LSR is returned as second byte on the interrupt-in
+ * endpoint 0x83 to signal error conditions. Such errors have been seen with
+ * minicom/zmodem transfers (CRC errors).
+ *
+ *
+ * Flow control
+ * ------------
+ *
+ * SniffUSB observations: no flow control specific requests have been realized
+ * apart from DTR/RTS settings. Both signals are dropped for no flow control
+ * but asserted for hardware or software flow control.
+ *
+ *
+ * Endpoint usage
+ * --------------
+ *
+ * SniffUSB observations: the bulk-out endpoint 0x1 and interrupt-in endpoint
+ * 0x81 is used to transmit and receive characters. The second interrupt-in
+ * endpoint 0x83 signals exceptional conditions like modem line changes and
+ * errors. The first byte returned is the MSR and the second byte the LSR.
+ *
+ *
+ * Other observations
+ * ------------------
+ *
+ * Queued bulk transfers like used in visor.c did not work.
+ *
+ *
+ * Properties of the USB device used (as found in /var/log/messages)
+ * -----------------------------------------------------------------
+ *
+ * Manufacturer: MCT Corporation.
+ * Product: USB-232 Interfact Controller
+ * SerialNumber: U2S22050
+ *
+ * Length = 18
+ * DescriptorType = 01
+ * USB version = 1.00
+ * Vendor:Product = 0711:0210
+ * MaxPacketSize0 = 8
+ * NumConfigurations = 1
+ * Device version = 1.02
+ * Device Class:SubClass:Protocol = 00:00:00
+ * Per-interface classes
+ * Configuration:
+ * bLength = 9
+ * bDescriptorType = 02
+ * wTotalLength = 0027
+ * bNumInterfaces = 01
+ * bConfigurationValue = 01
+ * iConfiguration = 00
+ * bmAttributes = c0
+ * MaxPower = 100mA
+ *
+ * Interface: 0
+ * Alternate Setting: 0
+ * bLength = 9
+ * bDescriptorType = 04
+ * bInterfaceNumber = 00
+ * bAlternateSetting = 00
+ * bNumEndpoints = 03
+ * bInterface Class:SubClass:Protocol = 00:00:00
+ * iInterface = 00
+ * Endpoint:
+ * bLength = 7
+ * bDescriptorType = 05
+ * bEndpointAddress = 81 (in)
+ * bmAttributes = 03 (Interrupt)
+ * wMaxPacketSize = 0040
+ * bInterval = 02
+ * Endpoint:
+ * bLength = 7
+ * bDescriptorType = 05
+ * bEndpointAddress = 01 (out)
+ * bmAttributes = 02 (Bulk)
+ * wMaxPacketSize = 0040
+ * bInterval = 00
+ * Endpoint:
+ * bLength = 7
+ * bDescriptorType = 05
+ * bEndpointAddress = 83 (in)
+ * bmAttributes = 03 (Interrupt)
+ * wMaxPacketSize = 0002
+ * bInterval = 02
+ */
+
+#endif /* __LINUX_USB_SERIAL_MCT_U232_H */
+
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/omninet.c linux/drivers/usb/serial/omninet.c
--- v2.2.19/drivers/usb/serial/omninet.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/omninet.c Wed Oct 10 01:41:33 2001
@@ -9,7 +9,14 @@


X * See Documentation/usb/usb-serial.txt for more information on using this driver
X *

X * Please report both successes and troubles to the author at omn...@kroah.com
+ *

+ * (04/08/2001) gb
+ * Identify version on module load.

X *


+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.
+ *
X * (08/28/2000) gkh
X * Added locks for SMP safeness.
X * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more

@@ -31,25 +38,29 @@


X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>

-


+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG

- #define isalpha(x) ( ( x > 96 && x < 123) || ( x > 64 && x < 91) || (x > 47 && x < 58) )


- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif

X
-#include <linux/usb.h>


-
X #include "usb-serial.h"
X

X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Anonymous"
+#define DRIVER_DESC "USB ZyXEL omni.net LCD PLUS Driver"
+
X #define ZYXEL_VENDOR_ID 0x0586
X #define ZYXEL_OMNINET_ID 0x1000
X
@@ -129,6 +140,7 @@
X struct usb_serial_port *wport;
X struct omninet_data *od;
X unsigned long flags;
+ int result;


X
X if (port_paranoia_check (port, __FUNCTION__))

X return -ENODEV;
@@ -149,7 +161,7 @@
X
X od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
X if( !od ) {
- err(__FUNCTION__"- kmalloc(%d) failed.", sizeof(struct omninet_data));
+ err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct omninet_data));
X --port->open_count;


X port->active = 0;

X spin_unlock_irqrestore (&port->port_lock, flags);

@@ -162,8 +174,13 @@
X wport->tty = port->tty;
X
X /* Start reading from the device */
- if (usb_submit_urb(port->read_urb))
- dbg(__FUNCTION__" - read bulk (%p) failed", port->read_urb);
+ FILL_BULK_URB(port->read_urb, serial->dev,
+ usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
+ omninet_read_bulk_callback, port);
+ result = usb_submit_urb(port->read_urb);
+ if (result)
+ err(__FUNCTION__ " - failed submitting read urb, error %d", result);


X }
X
X spin_unlock_irqrestore (&port->port_lock, flags);

@@ -222,6 +239,7 @@
X struct omninet_header *header = (struct omninet_header *) &data[0];
X
X int i;
+ int result;
X
X // dbg("omninet_read_bulk_callback");
X
@@ -235,8 +253,7 @@
X return;
X }
X
-#ifdef DEBUG
- if(header->oh_xxx != 0x30) {
+ if ((debug) && (header->oh_xxx != 0x30)) {
X if (urb->actual_length) {
X printk (KERN_DEBUG __FILE__ ": omninet_read %d: ", header->oh_len);
X for (i = 0; i < (header->oh_len + OMNINET_HEADERLEN); i++) {
@@ -245,7 +262,6 @@
X printk ("\n");
X }
X }
-#endif
X
X if (urb->actual_length && header->oh_len) {
X for (i = 0; i < header->oh_len; i++) {
@@ -255,8 +271,13 @@
X }
X

X /* Continue trying to always read */

- if (usb_submit_urb(urb))
- dbg(__FUNCTION__" - failed resubmitting read urb");
+ FILL_BULK_URB(urb, serial->dev,
+ usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
+ urb->transfer_buffer, urb->transfer_buffer_length,
+ omninet_read_bulk_callback, port);
+ result = usb_submit_urb(urb);
+ if (result)
+ err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
X
X return;
X }
@@ -270,11 +291,7 @@
X struct omninet_header *header = (struct omninet_header *) wport->write_urb->transfer_buffer;


X
X unsigned long flags;

-/*
-#ifdef DEBUG
- int i;
-#endif
-*/
+ int result;
X
X // dbg("omninet_write port %d", port->number);
X
@@ -282,18 +299,6 @@
X dbg(__FUNCTION__" - write request of 0 bytes");
X return (0);
X }
-/*
-#ifdef DEBUG
- printk (KERN_DEBUG __FILE__ ": omninet_write %d: ", count);
- for (i = 0; i < count; i++) {
- if( isalpha(buf[i]) )
- printk ("%c ", buf[i]);
- else
- printk ("%.2x ", buf[i]);
- }
- printk ("\n");
-#endif
-*/
X if (wport->write_urb->status == -EINPROGRESS) {
X dbg (__FUNCTION__" - already writing");
X return (0);
@@ -310,6 +315,7 @@
X memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
X }
X
+ usb_serial_debug_data (__FILE__, __FUNCTION__, count, wport->write_urb->transfer_buffer);
X
X header->oh_seq = od->od_outseq++;
X header->oh_len = count;
@@ -319,8 +325,10 @@
X /* send the data out the bulk port, always 64 bytes */
X wport->write_urb->transfer_buffer_length = 64;
X
- if (usb_submit_urb(wport->write_urb)) {
- dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
+ wport->write_urb->dev = serial->dev;
+ result = usb_submit_urb(wport->write_urb);
+ if (result) {
+ err(__FUNCTION__ " - failed submitting write urb, error %d", result);


X spin_unlock_irqrestore (&port->port_lock, flags);

X return 0;
X }
@@ -392,6 +400,7 @@
X static int __init omninet_init (void)
X {
X usb_serial_register (&zyxel_omninet_device);


+ info(DRIVER_VERSION ":" DRIVER_DESC);
X return 0;
X }
X

@@ -404,4 +413,10 @@
X
X module_init(omninet_init);
X module_exit(omninet_exit);


+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");

X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/usb-serial.h linux/drivers/usb/serial/usb-serial.h
--- v2.2.19/drivers/usb/serial/usb-serial.h Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/usb-serial.h Wed Oct 10 01:41:33 2001
@@ -220,15 +220,24 @@
X
X static inline void usb_serial_debug_data (const char *file, const char *function, int size, const unsigned char *data)
X {
-#ifdef CONFIG_USB_SERIAL_DEBUG
X int i;
+
+ if (!debug)
+ return;
+
X printk (KERN_DEBUG "%s: %s - length = %d, data = ", file, function, size);
X for (i = 0; i < size; ++i) {
X printk ("%.2x ", data[i]);
X }
X printk ("\n");
-#endif
X }
+
+
+/* Use our own dbg macro */
+#undef dbg
+#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0)
+
+
X
X #endif /* ifdef __LINUX_USB_SERIAL_H */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/usbserial.c linux/drivers/usb/serial/usbserial.c
--- v2.2.19/drivers/usb/serial/usbserial.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/usbserial.c Wed Oct 10 01:41:33 2001
@@ -14,6 +14,9 @@
X * based on a driver by Brad Keryan)


X *
X * See Documentation/usb/usb-serial.txt for more information on using this driver

+ *

+ * (04/08/2001) gb
+ * Identify version on module load.

X *
X * 2001_02_05 gkh
X * Fixed buffer overflows bug with the generic serial driver. Thanks to
@@ -264,20 +267,23 @@
X #include <linux/list.h>
X #include <linux/smp_lock.h>
X #include <linux/devfs_fs_kernel.h>


+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>

-
-/* Module information */
-MODULE_AUTHOR("Greg Kroah-Hartman, gr...@kroah.com, http://www.kroah.com/linux-usb/");
-MODULE_DESCRIPTION("USB Serial Driver");
X

X #include "usb-serial.h"
X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Greg Kroah-Hartman, gr...@kroah.com, http://www.kroah.com/linux-usb/"
+#define DRIVER_DESC "USB Serial Driver core"
+
X #define MAX(a,b) (((a)>(b))?(a):(b))
X
X /* function prototypes for a "generic" type serial converter (no flow control, not all endpoints needed) */
@@ -296,11 +302,6 @@
X #ifdef CONFIG_USB_SERIAL_GENERIC
X static __u16 vendor = 0x05f9;
X static __u16 product = 0xffff;
-MODULE_PARM(vendor, "i");
-MODULE_PARM_DESC(vendor, "User specified USB idVendor");
-
-MODULE_PARM(product, "i");
-MODULE_PARM_DESC(product, "User specified USB idProduct");
X
X /* All of the device info needed for the Generic Serial Converter */
X static struct usb_serial_device_type generic_device = {
@@ -346,6 +347,7 @@
X static struct termios * serial_termios_locked[SERIAL_TTY_MINORS];
X static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; /* initially all NULL */
X
+
X LIST_HEAD(usb_serial_driver_list);
X
X
@@ -808,8 +810,6 @@
X spin_lock_irqsave (&port->port_lock, flags);
X count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
X
- usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
-
X if (from_user) {
X copy_from_user(port->write_urb->transfer_buffer, buf, count);
X }
@@ -817,6 +817,8 @@
X memcpy (port->write_urb->transfer_buffer, buf, count);
X }
X
+ usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
+
X /* set up our urb */
X FILL_BULK_URB(port->write_urb, serial->dev,
X usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
@@ -1194,6 +1196,7 @@
X /* we don't use num_ports here cauz some devices have more endpoint pairs than ports */
X max_endpoints = MAX(num_bulk_in, num_bulk_out);
X max_endpoints = MAX(max_endpoints, num_interrupt_in);
+ max_endpoints = MAX(max_endpoints, serial->num_ports);
X dbg (__FUNCTION__ " - setting up %d port structures for this device", max_endpoints);
X for (i = 0; i < max_endpoints; ++i) {
X port = &serial->port[i];
@@ -1371,8 +1374,9 @@
X err("usb_register failed for the usb-serial driver. Error number %d", result);


X return -1;
X }
-

-

+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
X return 0;
X }
X

@@ -1436,4 +1440,18 @@
X EXPORT_SYMBOL(ezusb_writememory);
X EXPORT_SYMBOL(ezusb_set_reset);
X #endif
+


+
+/* Module information */

+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+

+MODULE_PARM(vendor, "i");
+MODULE_PARM_DESC(vendor, "User specified USB idVendor");
+
+MODULE_PARM(product, "i");
+MODULE_PARM_DESC(product, "User specified USB idProduct");
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/visor.c linux/drivers/usb/serial/visor.c
--- v2.2.19/drivers/usb/serial/visor.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/usb/serial/visor.c Wed Oct 10 01:41:33 2001
@@ -10,6 +10,9 @@
X * (at your option) any later version.
X *


X * See Documentation/usb/usb-serial.txt for more information on using this driver

+ *

+ * (04/08/2001) gb
+ * Identify version on module load.

X *
X * (01/21/2000) gkh
X * Added write_room and chars_in_buffer, as they were previously using the
@@ -89,18 +92,24 @@


X #include <linux/tty_flip.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>

+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>

X
X #include "usb-serial.h"
-

X #include "visor.h"


X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Greg Kroah-Hartman <gr...@kroah.com>"
+#define DRIVER_DESC "USB HandSpring Visor driver"
+
X #define MIN(a,b) (((a)<(b))?(a):(b))
X
X /* function prototypes for a handspring visor */
@@ -149,7 +158,7 @@
X
X
X #define NUM_URBS 24
-#define URB_TRANSFER_BUFFER_SIZE 64
+#define URB_TRANSFER_BUFFER_SIZE 768
X static struct urb *write_urb_pool[NUM_URBS];
X static spinlock_t write_urb_pool_lock;
X static int bytes_in;
@@ -644,7 +653,9 @@
X continue;
X }
X }
-

+
+ info(DRIVER_VERSION ":" DRIVER_DESC);
+
X return 0;
X }
X

@@ -677,5 +688,9 @@
X module_init(visor_init);
X module_exit(visor_exit);
X
-MODULE_AUTHOR("Greg Kroah-Hartman <gr...@kroah.com>");
-MODULE_DESCRIPTION("USB HandSpring Visor driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/whiteheat.c linux/drivers/usb/serial/whiteheat.c
--- v2.2.19/drivers/usb/serial/whiteheat.c Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/whiteheat.c Wed Oct 10 01:41:33 2001


@@ -1,7 +1,7 @@
X /*

X * USB ConnectTech WhiteHEAT driver
X *
- * Copyright (C) 1999, 2000
+ * Copyright (C) 1999 - 2001
X * Greg Kroah-Hartman (gr...@kroah.com)
X *
X * This program is free software; you can redistribute it and/or modify
@@ -10,7 +10,27 @@
X * (at your option) any later version.
X *


X * See Documentation/usb/usb-serial.txt for more information on using this driver

+ *


+ * (04/08/2001) gb
+ * Identify version on module load.
+ *

+ * 2001_Mar_19 gkh
+ * Fixed MOD_INC and MOD_DEC logic, the ability to open a port more
+ * than once, and the got the proper usb_device_id table entries so
+ * the driver works again.


+ *
+ * (10/05/2000) gkh
+ * Fixed bug with urb->dev not being set properly, now that the usb
+ * core needs it.

X *
+ * (10/03/2000) smd
+ * firmware is improved to guard against crap sent to device
+ * firmware now replies CMD_FAILURE on bad things
+ * read_callback fix you provided for private info struct
+ * command_finished now indicates success or fail
+ * setup_port struct now packed to avoid gcc padding
+ * firmware uses 1 based port numbering, driver now handles that
+ *
X * (09/11/2000) gkh
X * Removed DEBUG #ifdefs with call to usb_serial_debug_data
X *
@@ -42,25 +62,30 @@


X #include <linux/init.h>
X #include <linux/malloc.h>
X #include <linux/fcntl.h>
+#include <linux/tty.h>
X #include <linux/tty_driver.h>
X #include <linux/tty_flip.h>
-#include <linux/tty.h>
X #include <linux/module.h>
X #include <linux/spinlock.h>

+#include <linux/usb.h>
X
X #ifdef CONFIG_USB_SERIAL_DEBUG
- #define DEBUG
+ static int debug = 1;
X #else
- #undef DEBUG
+ static int debug;
X #endif
-#include <linux/usb.h>

X
X #include "usb-serial.h"
-

X #include "whiteheat_fw.h" /* firmware for the ConnectTech WhiteHEAT device */
-
X #include "whiteheat.h" /* WhiteHEAT specific commands */


X
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"

+#define DRIVER_AUTHOR "Greg Kroah-Hartman <gr...@kroah.com>"
+#define DRIVER_DESC "USB ConnectTech WhiteHEAT driver"
+
X #define CONNECT_TECH_VENDOR_ID 0x0710
X #define CONNECT_TECH_FAKE_WHITE_HEAT_ID 0x0001
X #define CONNECT_TECH_WHITE_HEAT_ID 0x8001
@@ -148,8 +173,11 @@
X
X static void command_port_read_callback (struct urb *urb)
X {
- struct whiteheat_private *info = (struct whiteheat_private *)urb->context;
+ struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+ struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
+ struct whiteheat_private *info;


X unsigned char *data = urb->transfer_buffer;

+ int result;
X
X dbg (__FUNCTION__);
X
@@ -158,15 +186,39 @@
X return;
X }
X
+ if (!serial) {
+ dbg(__FUNCTION__ " - bad serial pointer, exiting");
+ return;
+ }
+

X usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
X

+ info = (struct whiteheat_private *)port->private;
+ if (!info) {
+ dbg (__FUNCTION__ " - info is NULL, exiting.");
+ return;
+ }
+
X /* right now, if the command is COMMAND_COMPLETE, just flip the bit saying the command finished */
X /* in the future we're going to have to pay attention to the actual command that completed */
X if (data[0] == WHITEHEAT_CMD_COMPLETE) {
- info->command_finished = TRUE;
+ info->command_finished = WHITEHEAT_CMD_COMPLETE;
+ wake_up_interruptible(&info->wait_command);
X }
X
- return;
+ if (data[0] == WHITEHEAT_CMD_FAILURE) {
+ info->command_finished = WHITEHEAT_CMD_FAILURE;
+ wake_up_interruptible(&info->wait_command);
+ }
+
+ /* Continue trying to always read */
+ FILL_BULK_URB(port->read_urb, serial->dev,
+ usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
+ port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
+ command_port_read_callback, port);
+ result = usb_submit_urb(port->read_urb);
+ if (result)
+ dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
X }
X
X
@@ -187,6 +239,7 @@
X transfer_buffer[0] = command;
X memcpy (&transfer_buffer[1], data, datasize);
X port->write_urb->transfer_buffer_length = datasize + 1;
+ port->write_urb->dev = serial->dev;
X if (usb_submit_urb (port->write_urb)) {
X dbg (__FUNCTION__" - submit urb failed");
X return -1;
@@ -203,6 +256,16 @@


X return -1;
X }
X

+ if (info->command_finished == WHITEHEAT_CMD_FAILURE) {
+ dbg (__FUNCTION__ " - command failed.");


+ return -1;
+ }
+

+ if (info->command_finished == WHITEHEAT_CMD_COMPLETE) {
+ dbg (__FUNCTION__ " - command completed.");
+ return 0;
+ }


+
X return 0;
X }
X

@@ -212,41 +275,48 @@
X struct whiteheat_min_set open_command;
X struct usb_serial_port *command_port;
X struct whiteheat_private *info;
+ int result;
X
X dbg(__FUNCTION__" - port %d", port->number);
X
- if (port->active) {
- dbg (__FUNCTION__ " - device already open");
- return -EINVAL;
- }
- port->active = 1;
-
- /* set up some stuff for our command port */
- command_port = &port->serial->port[COMMAND_PORT];
- if (command_port->private == NULL) {
- info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
- if (info == NULL) {
- err(__FUNCTION__ " - out of memory");
- return -ENOMEM;


+ ++port->open_count;
+ MOD_INC_USE_COUNT;
+
+ if (!port->active) {
+ port->active = 1;
+

+ /* set up some stuff for our command port */
+ command_port = &port->serial->port[COMMAND_PORT];
+ if (command_port->private == NULL) {
+ info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
+ if (info == NULL) {
+ err(__FUNCTION__ " - out of memory");


+ return -ENOMEM;
+ }
+

+ init_waitqueue_head(&info->wait_command);
+ command_port->private = info;
+ command_port->write_urb->complete = command_port_write_callback;
+ command_port->read_urb->complete = command_port_read_callback;
+ command_port->read_urb->dev = port->serial->dev;
+ command_port->tty = port->tty; /* need this to "fake" our our sanity check macros */
+ usb_submit_urb (command_port->read_urb);
X }
X
- init_waitqueue_head(&info->wait_command);
- command_port->private = info;
- command_port->write_urb->complete = command_port_write_callback;
- command_port->read_urb->complete = command_port_read_callback;
- usb_submit_urb (command_port->read_urb);
- }
-
- /* Start reading from the device */
- if (usb_submit_urb(port->read_urb))
- dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed");
-
- /* send an open port command */
- open_command.port = port->number - port->serial->minor;
- whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
-
- /* Need to do device specific setup here (control lines, baud rate, etc.) */
- /* FIXME!!! */
+ /* Start reading from the device */


+ port->read_urb->dev = port->serial->dev;

+ result = usb_submit_urb(port->read_urb);
+ if (result)
+ err(__FUNCTION__ " - failed submitting read urb, error %d", result);
+
+ /* send an open port command */
+ /* firmware uses 1 based port numbering */
+ open_command.port = port->number - port->serial->minor + 1;
+ whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
+
+ /* Need to do device specific setup here (control lines, baud rate, etc.) */
+ /* FIXME!!! */
+ }
X
X dbg(__FUNCTION__ " - exit");
X
@@ -260,17 +330,23 @@
X
X dbg(__FUNCTION__ " - port %d", port->number);
X
- /* send a close command to the port */
- close_command.port = port->number - port->serial->minor;
- whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
-
- /* Need to change the control lines here */
- /* FIXME */
-
- /* shutdown our bulk reads and writes */
- usb_unlink_urb (port->write_urb);
- usb_unlink_urb (port->read_urb);
- port->active = 0;
+ --port->open_count;
+
+ if (port->open_count <= 0) {
+ /* send a close command to the port */
+ /* firmware uses 1 based port numbering */
+ close_command.port = port->number - port->serial->minor + 1;
+ whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
+
+ /* Need to change the control lines here */
+ /* FIXME */
+
+ /* shutdown our bulk reads and writes */
+ usb_unlink_urb (port->write_urb);
+ usb_unlink_urb (port->read_urb);


+ port->active = 0;
+ }

+ MOD_DEC_USE_COUNT;
X }
X
X

@@ -303,6 +379,10 @@
X return;
X }
X
+ /* set the port number */
+ /* firmware uses 1 based port numbering */
+ port_settings.port = port->number + 1;
+
X /* get the byte size */
X switch (cflag & CSIZE) {
X case CS5: port_settings.bits = 5; break;
@@ -337,10 +417,10 @@
X else
X port_settings.hflow = 0;
X dbg(__FUNCTION__ " - hardware flow control = %s %s %s %s",
- (port_settings.hflow | WHITEHEAT_CTS_FLOW) ? "CTS" : "",
- (port_settings.hflow | WHITEHEAT_RTS_FLOW) ? "RTS" : "",
- (port_settings.hflow | WHITEHEAT_DSR_FLOW) ? "DSR" : "",
- (port_settings.hflow | WHITEHEAT_DTR_FLOW) ? "DTR" : "");
+ (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "",
+ (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "",
+ (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "",
+ (port_settings.hflow & WHITEHEAT_DTR_FLOW) ? "DTR" : "");
X
X /* determine software flow control */
X if (I_IXOFF(port->tty))
@@ -464,9 +544,17 @@
X static void whiteheat_shutdown (struct usb_serial *serial)
X {
X struct usb_serial_port *command_port;
+ int i;
X
X dbg(__FUNCTION__);
X

+ /* stop reads and writes on all ports */
+ for (i=0; i < serial->num_ports; ++i) {
+ while (serial->port[i].open_count > 0) {

+ whiteheat_close (&serial->port[i], NULL);
+ }
+ }
+
X /* free up our private data for our command port */
X command_port = &serial->port[COMMAND_PORT];
X if (command_port->private != NULL) {
@@ -485,7 +573,8 @@
X struct whiteheat_rdb_set rdb_command;
X
X /* send a set rts command to the port */
- rdb_command.port = port->number - port->serial->minor;
+ /* firmware uses 1 based port numbering */
+ rdb_command.port = port->number - port->serial->minor + 1;
X rdb_command.state = state;
X
X whiteheat_send_cmd (port->serial, command, (__u8 *)&rdb_command, sizeof(rdb_command));
@@ -514,6 +603,7 @@
X {
X usb_serial_register (&whiteheat_fake_device);
X usb_serial_register (&whiteheat_device);


+ info(DRIVER_VERSION " " DRIVER_DESC);
X return 0;
X }
X

@@ -528,5 +618,9 @@
X module_init(whiteheat_init);
X module_exit(whiteheat_exit);
X
-MODULE_AUTHOR("Greg Kroah-Hartman <gr...@kroah.com>");
-MODULE_DESCRIPTION("USB ConnectTech WhiteHEAT driver");


+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/whiteheat.h linux/drivers/usb/serial/whiteheat.h
--- v2.2.19/drivers/usb/serial/whiteheat.h Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/whiteheat.h Wed Oct 10 01:41:33 2001
@@ -37,6 +37,7 @@
X #define WHITEHEAT_ECHO 14 /* send data to the indicated IN endpoint */
X #define WHITEHEAT_DO_TEST 15 /* perform the specified test */
X #define WHITEHEAT_CMD_COMPLETE 16 /* reply for certain commands */
+#define WHITEHEAT_CMD_FAILURE 17 /* reply for failed commands */
X
X /* Data for the WHITEHEAT_SETUP_PORT command */
X #define WHITEHEAT_CTS_FLOW 0x08
@@ -64,7 +65,7 @@
X * RTS (0x80) (RTS off/on when receiver fills/empties)
X * DTR (0x02) (DTR off/on when receiver fills/empties) */
X __u8 lloop; /* local loopback 0 or 1, default 0 */
-};
+} __attribute__ ((packed));
X
X /* data for WHITEHEAT_SET_RTS, WHITEHEAT_SET_DTR, and WHITEHEAT_SET_BREAK commands */
X struct whiteheat_rdb_set {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/whiteheat_fw.h linux/drivers/usb/serial/whiteheat_fw.h
--- v2.2.19/drivers/usb/serial/whiteheat_fw.h Sun Mar 25 17:31:43 2001
+++ linux/drivers/usb/serial/whiteheat_fw.h Wed Oct 10 01:41:34 2001
@@ -47,159 +47,154 @@
X };
X
X static const struct whiteheat_hex_record whiteheat_firmware[] = {
-{ 0x0000, 3, {0x02, 0x93, 0xa9} },
+{ 0x0000, 3, {0x02, 0x95, 0x09} },
X { 0x0003, 3, {0x02, 0x13, 0x12} },
-{ 0x000b, 3, {0x02, 0x0a, 0x80} },
-{ 0x0033, 3, {0x02, 0x08, 0x15} },
+{ 0x000b, 3, {0x02, 0x0a, 0x91} },
+{ 0x0033, 3, {0x02, 0x08, 0x1b} },
X { 0x0043, 3, {0x02, 0x0a, 0x00} },
-{ 0x005b, 3, {0x02, 0x82, 0x31} },
+{ 0x005b, 3, {0x02, 0x1a, 0xd2} },
X { 0x0370, 16, {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x73, 0x14, 0x70, 0x03, 0x02, 0x04, 0xe7, 0x24} },
-{ 0x0380, 16, {0xfe, 0x70, 0x03, 0x02, 0x05, 0x45, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x64, 0x14, 0x70, 0x03} },
+{ 0x0380, 16, {0xfe, 0x70, 0x03, 0x02, 0x05, 0x4f, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x64, 0x14, 0x70, 0x03} },
X { 0x0390, 16, {0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x49, 0x24} },
-{ 0x03a0, 16, {0x05, 0x60, 0x03, 0x02, 0x05, 0x94, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} },
+{ 0x03a0, 16, {0x05, 0x60, 0x03, 0x02, 0x05, 0x9e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} },
X { 0x03b0, 16, {0x36, 0x24, 0x02, 0x70, 0x7b, 0x74, 0x12, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5} },
-{ 0x03c0, 16, {0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x7b, 0xea, 0x49, 0x60, 0x0d} },
-{ 0x03d0, 16, {0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xb4} },
-{ 0x03e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x3a, 0xea} },
-{ 0x03f0, 16, {0x49, 0x60, 0x33, 0x12, 0x9b, 0x72, 0xf5, 0x4b, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4b, 0xd3} },
+{ 0x03c0, 16, {0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x81, 0xea, 0x49, 0x60, 0x0d} },
+{ 0x03d0, 16, {0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} },
+{ 0x03e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x40, 0xea} },
+{ 0x03f0, 16, {0x49, 0x60, 0x33, 0x12, 0x9f, 0x48, 0xf5, 0x4b, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4b, 0xd3} },
X { 0x0400, 16, {0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x4b, 0x40} },
-{ 0x0410, 16, {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4b, 0x12, 0x8d, 0xd9, 0x90, 0x7f, 0xb5} },
-{ 0x0420, 16, {0xe5, 0x4b, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b} },
-{ 0x0430, 16, {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
-{ 0x0440, 16, {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
-{ 0x0450, 16, {0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
-{ 0x0460, 16, {0xa8, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} },
-{ 0x0470, 16, {0x02, 0x05, 0x9b, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} },
+{ 0x0410, 16, {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4b, 0x12, 0x8e, 0x81, 0x90, 0x7f, 0xb5} },
+{ 0x0420, 16, {0xe5, 0x4b, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5} },
+{ 0x0430, 16, {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
+{ 0x0440, 16, {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
+{ 0x0450, 16, {0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
+{ 0x0460, 16, {0xa8, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} },
+{ 0x0470, 16, {0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} },
X { 0x0480, 16, {0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x05, 0xe4, 0x33, 0x4f, 0x90} },
-{ 0x0490, 16, {0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x9b, 0xe4} },
-{ 0x04a0, 16, {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x9b, 0x90} },
+{ 0x0490, 16, {0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0xe4} },
+{ 0x04a0, 16, {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0x90} },
X { 0x04b0, 16, {0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25} },
X { 0x04c0, 16, {0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0x01, 0x90, 0x7f, 0x00} },
-{ 0x04d0, 16, {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xb4} },
-{ 0x04e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} },
-{ 0x04f0, 16, {0x02, 0x60, 0x03, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} },


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 76'
echo 'File patch-2.2.20 is continued in part 77'
echo "77" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:11 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part72

#!/bin/sh -x
# this is part 72 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 72; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28,
+ 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb,
+ 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd,
+ 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0,
+ 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14,
+ 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b,
+ 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5c, 0x78, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1,
+ 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54,
+ 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68,
+ 0x07, 0xca, 0xb8, 0x12, 0x5c, 0x78, 0xda, 0xb8, 0x02, 0x5d, 0x9f, 0x09, 0xb1, 0x00, 0x18, 0x7e,
+ 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0x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x85, 0x7e, 0x27, 0x01, 0xa5, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05,
+ 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42,
+ 0xbe, 0x44, 0x25, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x65, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30,
+ 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x66, 0xc4, 0x22, 0xc2, 0x66, 0x2d,
+ 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x68,
+ 0x6a, 0xbe, 0x27, 0x01, 0xa5, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa5, 0x7e, 0x37, 0x01, 0x85, 0x9d,
+ 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01,
+ 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x65, 0x75,
+ 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f,
+ 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x25, 0xcd, 0x9d, 0x24,
+ 0x12, 0x68, 0x34, 0x7e, 0x34, 0x21, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x65, 0x12,
+ 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5e, 0x49, 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x21,
+ 0xcd, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75,
+ 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1,
+ 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27,
+ 0x01, 0xb5, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02,
+ 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43,
+ 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x06, 0x00,
+ 0x2e, 0x27, 0x01, 0xb5, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe,
+ 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30,
+ 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00,
+ 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12,
+ 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x06, 0x00, 0x2e, 0x67, 0x01, 0xb5,
+ 0x9e, 0x24, 0x00, 0x02, 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65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x60, 0x01, 0x75, 0x2f, 0x95,
+ 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20,
+ 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x75, 0x2f, 0xa7, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x87, 0x00, 0x80,
+ 0x06, 0x20, 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e,
+ 0xda, 0xb8, 0x68, 0x03, 0x12, 0x64, 0x09, 0x30, 0x37, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0f, 0x22,
+ 0x30, 0xe6, 0x02, 0xd2, 0x67, 0x7e, 0x37, 0x01, 0x87, 0x7e, 0x27, 0x01, 0xa7, 0x9d, 0x32, 0x40,
+ 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, 0x87, 0x7e, 0x37, 0x01,
+ 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x67, 0x75,
+ 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x67,
+ 0xc4, 0x22, 0xc2, 0x67, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x87,
+ 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa7, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa7,
+ 0x7e, 0x37, 0x01, 0x87, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37,
+ 0x01, 0x87, 0x7e, 0x37, 0x01, 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xcc, 0x38, 0x13,
+ 0x7a, 0x47, 0x01, 0x67, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30,
+ 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e,
+ 0x44, 0x29, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x25, 0xcd, 0x7d, 0x24, 0x2d, 0x43,
+ 0x7a, 0x47, 0x01, 0x67, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x61, 0x7e, 0x22,
+ 0xd2, 0x0f, 0x7e, 0x04, 0x25, 0xcd, 0x7a, 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x75, 0x2f,
+ 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e,
+ 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e,
+ 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04,
+ 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e,
+ 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01,
+ 0xc9, 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27, 0x01, 0xb7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51,
+ 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75,

+ 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30,

+ 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80,
+ 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x07,
+ 0x00, 0x2e, 0x67, 0x01, 0xb7, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35,
+ 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02,
+ 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44,
+ 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0,
+ 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e,
+ 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a,
+ 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22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68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x02,
+ 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd,
+ 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80,
+ 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80,
+ 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b,
+ 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2,
+ 0x53, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18,
+ 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e,
+ 0x50, 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e,
+ 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04,
+ 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80,
+ 0x02, 0xc2, 0x55, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1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35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00,
+ 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38,
+ 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19,
+ 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b,
+ 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e,
+ 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10,
+ 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35,
+ 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19,
+ 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b,
+ 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e,
+ 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00,
+ 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0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0x59, 0x05, 0x00, 0x32, 0x12, 0x41,
+ 0x72, 0x12, 0x41, 0x8e, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb2, 0x12, 0x7e, 0x30, 0x0a, 0x22, 0x09,
+ 0xb2, 0x6a, 0x93, 0x42, 0x23, 0x7e, 0xb0, 0x9c, 0x19, 0xb2, 0x01, 0xb9, 0x12, 0x45, 0x74, 0xd0,
+ 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0,
+ 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68,
+ 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda,
+ 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02,
+ 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca, 0xb8, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8,
+ 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x6a, 0x93, 0x3e, 0x20,
+ 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x20, 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19,
+ 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10, 0x59, 0x46, 0x01, 0xa9, 0x09, 0xb0, 0x00, 0x10, 0x44,
+ 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x11, 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0,
+ 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59, 0x46, 0x01, 0xa9, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e,
+ 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09,
+ 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x04, 0x44, 0x80, 0x80, 0x02, 0x54, 0x7f,
+ 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x02, 0x80, 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00,
+ 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x6a, 0x93, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe,
+ 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xda, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x10, 0xa5,
+ 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x04, 0xa5,
+ 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x29, 0x42, 0x26,
+ 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x15, 0xa5, 0xee, 0x52, 0x29, 0x7c, 0x74,
+ 0x5e, 0x70, 0x02, 0x78, 0x0a, 0x52, 0x26, 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0x99, 0x12,
+ 0x42, 0x91, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74,
+ 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 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03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x4d, 0x7a, 0x25,
+ 0x4f, 0x7e, 0x64, 0x77, 0x47, 0x7a, 0x65, 0x4b, 0x89, 0x24, 0x02, 0x77, 0x55, 0x7e, 0x64, 0x76,
+ 0xbd, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca, 0x19, 0xca,
+ 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x4d, 0x7e, 0x64,
+ 0x77, 0x33, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x76, 0xb2, 0x7a,
+ 0x65, 0x4b, 0x22, 0x75, 0x2f, 0x52, 0x12, 0x7e, 0x30, 0x7e, 0x21, 0x4d, 0x7e, 0x09, 0x30, 0x0b,
+ 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x2f, 0x54, 0x12, 0x7e, 0x30, 0x7e, 0x15, 0x4d,
+ 0x7e, 0x25, 0x4f, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x77, 0xd1, 0x30, 0xe6,
+ 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44, 0x6a, 0x68,
+ 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x77, 0xd9, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda, 0x39, 0xda,
+ 0x09, 0x7e, 0x64, 0x76, 0xbd, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x4d, 0xf5, 0x4f,
+ 0x7e, 0x64, 0x77, 0x96, 0x80, 0x99, 0x7e, 0x15, 0x4d, 0xe5, 0x4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0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30,
+ 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10,
+ 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50,
+ 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44,
+ 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22,
+
+// Segment #15, Start Address 00ff7fc6, Length 4
+0xff,0x00,0xc6,0x7f,0x04,0x00,
+ 0x01, 0x0c, 0x03, 0x00,
+
+// Segment #16, Start Address 00ff7e30, Length 315
+0xff,0x00,0x30,0x7e,0x3b,0x01,


+ 0xca, 0x08, 0x7e, 0x01, 0x2f, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a,
+ 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b,
+ 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e,
+ 0x44, 0x00, 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78,
+ 0xfa, 0x7f, 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00,

+ 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x7e, 0x9f,
+ 0xda, 0x79, 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x43,
+ 0x90, 0x30, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0,
+ 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07,
+ 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9,
+ 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06,
+ 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2c, 0x6d, 0x00, 0x7c, 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27,
+ 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, 0x16, 0x0b, 0x2c, 0x0b, 0x1c,
+ 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x03, 0x63, 0x90, 0x30, 0x4d, 0x77, 0x78, 0x93, 0xc2,
+ 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00,
+ 0x02, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x04, 0x00, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e,
+ 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00, 0xfe, 0x0b, 0x1a, 0x00, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a,
+ 0x51, 0x23, 0x7e, 0x18, 0x7f, 0x15, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60,
+ 0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe,

+};
+
+static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {

+ 1, 12, 3 }; // Major, Minor, Build


+
+#undef IMAGE_VERSION_NAME
+
+#undef IMAGE_ARRAY_NAME
+

diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/usb/serial/io_fw_down2.h linux/drivers/usb/serial/io_fw_down2.h
--- v2.2.19/drivers/usb/serial/io_fw_down2.h Thu Jan 1 01:00:00 1970
+++ linux/drivers/usb/serial/io_fw_down2.h Wed Oct 10 01:41:30 2001
@@ -0,0 +1,1135 @@


+//**************************************************************
+//* Edgeport/4 Binary Image
+//* Generated by HEX2C v1.06
+//* Copyright(c) 1998 Inside Out Networks, All rights reserved.
+//* 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.
+//**************************************************************
+
+
+//Image structure definition
+#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
+ #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
+ typedef struct _EDGE_FIRMWARE_IMAGE_RECORD

SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 72'
echo 'File patch-2.2.20 is continued in part 73'
echo "73" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:16 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part77

#!/bin/sh -x
# this is part 77 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 77; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-{ 0x0500, 16, {0x05, 0x9b, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0} },
-{ 0x0510, 16, {0x70, 0x2a, 0x90, 0x7f, 0xec, 0xe0, 0xff, 0xf4, 0x54, 0x80, 0xfe, 0xc4, 0x54, 0x0f, 0xfe, 0xef} },
-{ 0x0520, 16, {0x54, 0x07, 0xfd, 0x2e, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4} },
-{ 0x0530, 16, {0xf0, 0x90, 0x7f, 0xd7, 0xed, 0xf0, 0xef, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0} },
-{ 0x0540, 16, {0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70} },
-{ 0x0550, 16, {0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x00, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0} },
-{ 0x0560, 16, {0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4} },
-{ 0x0570, 16, {0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
-{ 0x0580, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44} },
-{ 0x0590, 16, {0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44} },
-{ 0x05a0, 2, {0x02, 0xf0} },
-{ 0x05a2, 1, {0x22} },
-{ 0x05a3, 16, {0x75, 0x47, 0xff, 0x75, 0x46, 0xff, 0x75, 0x45, 0x0f, 0x75, 0x44, 0x00, 0xd2, 0x03, 0xc2, 0x06} },
-{ 0x05b3, 16, {0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xe4, 0x90} },
-{ 0x05c3, 16, {0x01, 0xbc, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0xc0, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} },
-{ 0x05d3, 16, {0x0b, 0x8d, 0xe4, 0x90, 0x02, 0xaf, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
-{ 0x05e3, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} },
-{ 0x05f3, 16, {0x01, 0x7f, 0x00, 0x12, 0x19, 0xc1, 0x75, 0x49, 0x12, 0x75, 0x4a, 0x0a, 0x90, 0x01, 0x0b, 0xe0} },
-{ 0x0603, 16, {0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
-{ 0x0613, 16, {0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} },
-{ 0x0623, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} },
-{ 0x0633, 16, {0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
-{ 0x0643, 16, {0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} },
-{ 0x0653, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} },
-{ 0x0663, 16, {0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} },
-{ 0x0673, 16, {0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} },
-{ 0x0683, 16, {0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x4f, 0x10, 0x75, 0x50, 0x02, 0x75} },
-{ 0x0693, 16, {0x51, 0x12, 0x75, 0x52, 0xac, 0x12, 0x90, 0x15, 0x75, 0x49, 0x12, 0x75, 0x4a, 0xb2, 0x90, 0x01} },
-{ 0x06a3, 16, {0x0d, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82} },
-{ 0x06b3, 16, {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} },
-{ 0x06c3, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} },
-{ 0x06d3, 16, {0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} },
-{ 0x06e3, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4a, 0xe5, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x05, 0x49} },
-{ 0x06f3, 16, {0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} },
-{ 0x0703, 16, {0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0x9d, 0x25, 0x7e, 0x01} },
-{ 0x0713, 16, {0x7f, 0x18, 0x12, 0x85, 0x08, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
-{ 0x0723, 16, {0xa3, 0xe0, 0xff, 0x75, 0x4f, 0x0a, 0x75, 0x50, 0x06, 0x75, 0x51, 0x12, 0x75, 0x52, 0xb8, 0x12} },
-{ 0x0733, 16, {0x90, 0x15, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} },
-{ 0x0743, 16, {0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} },
-{ 0x0753, 16, {0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xca, 0x75, 0x43, 0x50} },
-{ 0x0763, 16, {0x75, 0x42, 0x6d, 0x75, 0x41, 0x33, 0x75, 0x40, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} },
-{ 0x0773, 16, {0x7d, 0xff, 0x7c, 0xff, 0x78, 0x40, 0x12, 0x9d, 0x0e, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} },
-{ 0x0783, 16, {0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x0a, 0xed, 0x50} },
-{ 0x0793, 16, {0x06, 0x12, 0x0b, 0x00, 0x12, 0x0a, 0xf2, 0xc2, 0x06, 0x12, 0x92, 0x38, 0x90, 0x01, 0xbd, 0xe0} },
-{ 0x07a3, 16, {0x60, 0x10, 0x7e, 0x7b, 0x7f, 0x40, 0x12, 0x8e, 0xc1, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f} },
-{ 0x07b3, 16, {0xd3, 0xf0, 0x90, 0x02, 0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x95, 0x30, 0x12, 0x99, 0xcc, 0xe4} },
-{ 0x07c3, 16, {0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc} },
-{ 0x07d3, 16, {0xe0, 0x5e, 0x60, 0x14, 0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01} },
-{ 0x07e3, 16, {0x80, 0x02, 0x7e, 0x00, 0x8e, 0x48, 0x80, 0x03, 0x75, 0x48, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82} },
-{ 0x07f3, 16, {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe5, 0x48, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94} },
-{ 0x0803, 16, {0x0a, 0x40, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07} },
-{ 0x0813, 1, {0x84} },
-{ 0x0814, 1, {0x22} },
-{ 0x0815, 4, {0x53, 0xd8, 0xef, 0x32} },
-{ 0x0819, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0x74, 0x89} },
-{ 0x0829, 16, {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0x23, 0x90, 0x7f} },
-{ 0x0839, 16, {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x7f, 0x02, 0x7d, 0xff} },
-{ 0x0849, 16, {0x12, 0x81, 0xe0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} },
-{ 0x0859, 16, {0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0} },
-{ 0x0869, 16, {0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} },
-{ 0x0879, 16, {0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} },
-{ 0x0889, 7, {0x32, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x22} },
-{ 0x0890, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
-{ 0x08a0, 16, {0x09, 0x23, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x81, 0xe0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23} },
-{ 0x08b0, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f} },
-{ 0x08c0, 16, {0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0} },
-{ 0x08d0, 16, {0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} },
-{ 0x08e0, 12, {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x12, 0x0b, 0x00, 0x22} },
-{ 0x08ec, 16, {0x90, 0x11, 0xfc, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
-{ 0x08fc, 16, {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} },
-{ 0x090c, 16, {0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x08, 0x19, 0x75, 0x82, 0xfc} },
-{ 0x091c, 7, {0x75, 0x83, 0x11, 0x74, 0xff, 0xf0, 0x22} },
-{ 0x0923, 16, {0x8e, 0x58, 0x8f, 0x59, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0x4e, 0x60} },
-{ 0x0933, 7, {0x05, 0x12, 0x09, 0xef, 0x80, 0xee, 0x22} },
-{ 0x093a, 2, {0x8f, 0x4c} },
-{ 0x093c, 16, {0xe4, 0xf5, 0x4d, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x6a, 0xab, 0x4e, 0xaa, 0x4f} },
-{ 0x094c, 16, {0xa9, 0x50, 0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0xb4, 0x03, 0x1d, 0xaf, 0x4d, 0x05, 0x4d, 0xef} },
-{ 0x095c, 16, {0xb5, 0x4c, 0x01, 0x22, 0x12, 0x9b, 0x72, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
-{ 0x096c, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x097a, 1, {0x22} },
-{ 0x097b, 16, {0xe4, 0xfe, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x12, 0xab, 0x4e, 0xaa, 0x4f, 0xa9} },
-{ 0x098b, 16, {0x50, 0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
-{ 0x099b, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9b, 0xe4, 0x85, 0xf0, 0x4c, 0xf5, 0x4d, 0x62, 0x4c} },
-{ 0x09ab, 16, {0xe5, 0x4c, 0x62, 0x4d, 0xe5, 0x4d, 0x62, 0x4c, 0x29, 0xfd, 0xe5, 0x4c, 0x3a, 0xa9, 0x05, 0x75} },
-{ 0x09bb, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x09c9, 1, {0x22} },
-{ 0x09ca, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
-{ 0x09da, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0x23, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
-{ 0x09ea, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} },
-{ 0x09ef, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
-{ 0x09ff, 1, {0x22} },
+{ 0x04d0, 16, {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} },
+{ 0x04e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} },
+{ 0x04f0, 16, {0x02, 0x60, 0x03, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} },
+{ 0x0500, 16, {0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x0510, 16, {0x70, 0x34, 0x90, 0x7f, 0xec, 0xe0, 0xff, 0x54, 0x07, 0xfe, 0xf5, 0x4b, 0xef, 0x30, 0xe7, 0x03} },
+{ 0x0520, 16, {0x43, 0x4b, 0x10, 0x90, 0x7f, 0xd7, 0xe5, 0x4b, 0xf0, 0xe5, 0x4b, 0x44, 0x20, 0xf0, 0xef, 0xf4} },
+{ 0x0530, 16, {0x54, 0x80, 0xfd, 0xc4, 0x54, 0x0f, 0x2e, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
+{ 0x0540, 16, {0xf5, 0x83, 0xe4, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90} },
+{ 0x0550, 16, {0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
+{ 0x0560, 16, {0x01, 0x04, 0xd2, 0x00, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90} },
+{ 0x0570, 16, {0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f} },
+{ 0x0580, 16, {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x0590, 16, {0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f} },
+{ 0x05a0, 12, {0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
+{ 0x05ac, 1, {0x22} },
+{ 0x05ad, 16, {0x75, 0x47, 0xff, 0x75, 0x46, 0xff, 0x75, 0x45, 0x0f, 0x75, 0x44, 0x00, 0xd2, 0x03, 0xc2, 0x06} },
+{ 0x05bd, 16, {0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xe4, 0x90} },
+{ 0x05cd, 16, {0x01, 0xbc, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0xc0, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} },
+{ 0x05dd, 16, {0x0b, 0x8d, 0xe4, 0x90, 0x02, 0xaf, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
+{ 0x05ed, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} },
+{ 0x05fd, 16, {0x01, 0x7f, 0x00, 0x12, 0x10, 0x2c, 0x75, 0x49, 0x12, 0x75, 0x4a, 0x0a, 0x90, 0x01, 0x0b, 0xe0} },
+{ 0x060d, 16, {0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
+{ 0x061d, 16, {0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} },
+{ 0x062d, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} },
+{ 0x063d, 16, {0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x064d, 16, {0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} },
+{ 0x065d, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} },
+{ 0x066d, 16, {0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} },
+{ 0x067d, 16, {0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} },
+{ 0x068d, 16, {0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x4f, 0x10, 0x75, 0x50, 0x02, 0x75} },
+{ 0x069d, 16, {0x51, 0x12, 0x75, 0x52, 0xac, 0x12, 0x91, 0x7a, 0x75, 0x49, 0x12, 0x75, 0x4a, 0xb2, 0x90, 0x01} },
+{ 0x06ad, 16, {0x0d, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82} },
+{ 0x06bd, 16, {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} },
+{ 0x06cd, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} },
+{ 0x06dd, 16, {0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} },
+{ 0x06ed, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4a, 0xe5, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x05, 0x49} },
+{ 0x06fd, 16, {0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} },
+{ 0x070d, 16, {0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0xa0, 0xfb, 0x7e, 0x01} },
+{ 0x071d, 16, {0x7f, 0x18, 0x12, 0x85, 0x2f, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x072d, 16, {0xa3, 0xe0, 0xff, 0x75, 0x4f, 0x0a, 0x75, 0x50, 0x06, 0x75, 0x51, 0x12, 0x75, 0x52, 0xb8, 0x12} },
+{ 0x073d, 16, {0x91, 0x7a, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} },
+{ 0x074d, 16, {0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} },
+{ 0x075d, 16, {0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xd0, 0x75, 0x43, 0x50} },
+{ 0x076d, 16, {0x75, 0x42, 0x6d, 0x75, 0x41, 0x33, 0x75, 0x40, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} },
+{ 0x077d, 16, {0x7d, 0xff, 0x7c, 0xff, 0x78, 0x40, 0x12, 0xa0, 0xe4, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} },
+{ 0x078d, 16, {0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x09, 0xf5, 0x50} },
+{ 0x079d, 16, {0x06, 0x12, 0x0b, 0x00, 0x12, 0x09, 0xfa, 0xc2, 0x06, 0x12, 0x93, 0x98, 0x90, 0x01, 0xbd, 0xe0} },
+{ 0x07ad, 16, {0x60, 0x0c, 0x12, 0x8f, 0x55, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x02} },
+{ 0x07bd, 16, {0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x96, 0xe2, 0x12, 0x9d, 0xa2, 0xe4, 0xff, 0x74, 0x01, 0xa8} },
+{ 0x07cd, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc, 0xe0, 0x5e, 0x60, 0x14} },
+{ 0x07dd, 16, {0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00} },
+{ 0x07ed, 16, {0x8e, 0x48, 0x80, 0x03, 0x75, 0x48, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5} },
+{ 0x07fd, 16, {0x83, 0xe5, 0x48, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7f} },
+{ 0x080d, 13, {0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07, 0x8e} },
+{ 0x081a, 1, {0x22} },
+{ 0x081b, 4, {0x53, 0xd8, 0xef, 0x32} },
+{ 0x081f, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0x74, 0x89} },
+{ 0x082f, 16, {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0x29, 0x90, 0x7f} },
+{ 0x083f, 16, {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x02, 0x7d, 0xff} },
+{ 0x084f, 16, {0x12, 0x11, 0x77, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} },
+{ 0x085f, 16, {0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0} },
+{ 0x086f, 16, {0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} },
+{ 0x087f, 16, {0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} },
+{ 0x088f, 7, {0x32, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x22} },
+{ 0x0896, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
+{ 0x08a6, 16, {0x09, 0x29, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x11, 0x77, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29} },
+{ 0x08b6, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f} },
+{ 0x08c6, 16, {0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0} },
+{ 0x08d6, 16, {0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} },
+{ 0x08e6, 12, {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x12, 0x0b, 0x00, 0x22} },
+{ 0x08f2, 16, {0x90, 0x95, 0xbe, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
+{ 0x0902, 16, {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} },
+{ 0x0912, 16, {0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x08, 0x1f, 0x75, 0x82, 0xbe} },
+{ 0x0922, 7, {0x75, 0x83, 0x95, 0x74, 0xff, 0xf0, 0x22} },
+{ 0x0929, 16, {0x8e, 0x58, 0x8f, 0x59, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0x4e, 0x60} },
+{ 0x0939, 7, {0x05, 0x12, 0x0a, 0x58, 0x80, 0xee, 0x22} },
+{ 0x0940, 2, {0x8f, 0x4c} },
+{ 0x0942, 16, {0xe4, 0xf5, 0x4d, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x6a, 0xab, 0x4e, 0xaa, 0x4f} },
+{ 0x0952, 16, {0xa9, 0x50, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0xb4, 0x03, 0x1d, 0xaf, 0x4d, 0x05, 0x4d, 0xef} },
+{ 0x0962, 16, {0xb5, 0x4c, 0x01, 0x22, 0x12, 0x9f, 0x48, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x0972, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0980, 1, {0x22} },
+{ 0x0981, 16, {0xe4, 0xfe, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x12, 0xab, 0x4e, 0xaa, 0x4f, 0xa9} },
+{ 0x0991, 16, {0x50, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x09a1, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9f, 0xba, 0x85, 0xf0, 0x4c, 0xf5, 0x4d, 0x62, 0x4c} },
+{ 0x09b1, 16, {0xe5, 0x4c, 0x62, 0x4d, 0xe5, 0x4d, 0x62, 0x4c, 0x29, 0xfd, 0xe5, 0x4c, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x09c1, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x09cf, 1, {0x22} },
+{ 0x09d0, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
+{ 0x09e0, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0x29, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x09f0, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x09f5, 5, {0x12, 0x08, 0x96, 0xd3, 0x22} },
+{ 0x09fa, 5, {0x12, 0x08, 0x1f, 0xd3, 0x22} },
+{ 0x09ff, 1, {0x32} },
X { 0x0a00, 16, {0x02, 0x0b, 0xaa, 0x00, 0x02, 0x0b, 0xdd, 0x00, 0x02, 0x0b, 0xc2, 0x00, 0x02, 0x0c, 0x1c, 0x00} },
-{ 0x0a10, 16, {0x02, 0x0c, 0x06, 0x00, 0x02, 0x0a, 0xf7, 0x00, 0x02, 0x0a, 0xf8, 0x00, 0x02, 0x0a, 0xf9, 0x00} },
-{ 0x0a20, 16, {0x02, 0x0c, 0x37, 0x00, 0x02, 0x0d, 0x27, 0x00, 0x02, 0x0c, 0x73, 0x00, 0x02, 0x0d, 0x7b, 0x00} },
-{ 0x0a30, 16, {0x02, 0x0c, 0xaf, 0x00, 0x02, 0x0d, 0xcf, 0x00, 0x02, 0x0c, 0xeb, 0x00, 0x02, 0x0e, 0x23, 0x00} },
-{ 0x0a40, 16, {0x02, 0x0a, 0xfa, 0x00, 0x02, 0x0a, 0xfc, 0x00, 0x02, 0x0a, 0xfb, 0x00, 0x02, 0x0a, 0xfd, 0x00} },
-{ 0x0a50, 8, {0x02, 0x0e, 0x77, 0x00, 0x02, 0x0e, 0x8d, 0x00} },
-{ 0x0a58, 16, {0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
-{ 0x0a68, 16, {0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} },
-{ 0x0a78, 7, {0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} },
-{ 0x0a7f, 1, {0x22} },
-{ 0x0a80, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} },
-{ 0x0a90, 1, {0x07} },
-{ 0x0a91, 16, {0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} },
-{ 0x0aa1, 16, {0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} },
-{ 0x0ab1, 16, {0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x03, 0x00} },
-{ 0x0ac1, 16, {0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} },
-{ 0x0ad1, 13, {0x01, 0xc1, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x34, 0xff, 0xf0} },
-{ 0x0ade, 15, {0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0aed, 5, {0x12, 0x08, 0x90, 0xd3, 0x22} },
-{ 0x0af2, 5, {0x12, 0x08, 0x19, 0xd3, 0x22} },
-{ 0x0af7, 1, {0x32} },
-{ 0x0af8, 1, {0x32} },
-{ 0x0af9, 1, {0x32} },
-{ 0x0afa, 1, {0x32} },
-{ 0x0afb, 1, {0x32} },
-{ 0x0afc, 1, {0x32} },
-{ 0x0afd, 1, {0x32} },
+{ 0x0a10, 16, {0x02, 0x0c, 0x06, 0x00, 0x02, 0x09, 0xff, 0x00, 0x02, 0x0a, 0xfe, 0x00, 0x02, 0x0a, 0xff, 0x00} },
+{ 0x0a20, 16, {0x02, 0x0c, 0x37, 0x00, 0x02, 0x0d, 0x29, 0x00, 0x02, 0x0c, 0x73, 0x00, 0x02, 0x0d, 0x7d, 0x00} },
+{ 0x0a30, 16, {0x02, 0x0c, 0xaf, 0x00, 0x02, 0x0d, 0xd1, 0x00, 0x02, 0x0c, 0xeb, 0x00, 0x02, 0x0e, 0x25, 0x00} },
+{ 0x0a40, 16, {0x02, 0x0d, 0x27, 0x00, 0x02, 0x0e, 0x79, 0x00, 0x02, 0x0d, 0x28, 0x00, 0x02, 0x0e, 0x7a, 0x00} },
+{ 0x0a50, 8, {0x02, 0x0e, 0x7b, 0x00, 0x02, 0x0e, 0x91, 0x00} },
+{ 0x0a58, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x0a68, 1, {0x22} },
+{ 0x0a69, 16, {0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
+{ 0x0a79, 16, {0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} },
+{ 0x0a89, 7, {0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} },
+{ 0x0a90, 1, {0x22} },
+{ 0x0a91, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} },
+{ 0x0aa1, 1, {0x07} },
+{ 0x0aa2, 16, {0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} },
+{ 0x0ab2, 16, {0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} },
+{ 0x0ac2, 16, {0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x03, 0x00} },
+{ 0x0ad2, 16, {0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} },
+{ 0x0ae2, 13, {0x01, 0xc1, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x34, 0xff, 0xf0} },
+{ 0x0aef, 15, {0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0afe, 1, {0x32} },
+{ 0x0aff, 1, {0x32} },
X { 0x0b00, 9, {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
X { 0x0b7d, 16, {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
-{ 0x0b8d, 16, {0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x10, 0x0c, 0x12, 0x08, 0xec} },
-{ 0x0b9d, 13, {0x12, 0x0e, 0xa9, 0x12, 0x90, 0xe6, 0x12, 0x1b, 0x0c, 0x12, 0x0a, 0x58, 0x22} },
+{ 0x0b8d, 16, {0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x80, 0x00, 0x12, 0x08, 0xf2} },
+{ 0x0b9d, 13, {0x12, 0x0e, 0xad, 0x12, 0x11, 0xe5, 0x12, 0x11, 0xc8, 0x12, 0x0a, 0x69, 0x22} },
X { 0x0baa, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
X { 0x0bba, 8, {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
X { 0x0bc2, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
@@ -227,91 +222,97 @@
X { 0x0cfb, 16, {0xa9, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x30, 0xe3, 0x13, 0xe5, 0x3b, 0x30, 0xe3, 0x07, 0x90, 0x20} },
X { 0x0d0b, 16, {0x1c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
X { 0x0d1b, 12, {0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d27, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
-{ 0x0d37, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20} },
-{ 0x0d47, 16, {0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} },
-{ 0x0d57, 16, {0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
-{ 0x0d67, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
-{ 0x0d77, 4, {0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d7b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
-{ 0x0d8b, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20} },
-{ 0x0d9b, 16, {0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} },
-{ 0x0dab, 16, {0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
-{ 0x0dbb, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
-{ 0x0dcb, 4, {0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dcf, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
-{ 0x0ddf, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20} },
-{ 0x0def, 16, {0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} },
-{ 0x0dff, 16, {0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
-{ 0x0e0f, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
-{ 0x0e1f, 4, {0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0e23, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
-{ 0x0e33, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20} },
-{ 0x0e43, 16, {0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} },
-{ 0x0e53, 16, {0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
-{ 0x0e63, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
-{ 0x0e73, 4, {0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0e77, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
-{ 0x0e87, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0e8d, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} },
-{ 0x0e9d, 12, {0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0ea9, 16, {0x90, 0x01, 0x20, 0x12, 0x9d, 0x31, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
-{ 0x0eb9, 16, {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} },
-{ 0x0ec9, 16, {0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
-{ 0x0ed9, 16, {0xc3, 0x94, 0x04, 0x50, 0x13, 0xef, 0x04, 0xa3, 0xf0, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x85, 0xe1} },
-{ 0x0ee9, 16, {0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xe3, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90} },
-{ 0x0ef9, 16, {0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x0f09, 16, {0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04} },
-{ 0x0f19, 16, {0xf0, 0x80, 0xdc, 0xe4, 0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0} },
-{ 0x0f29, 16, {0x90, 0x01, 0x1e, 0xe0, 0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8} },
-{ 0x0f39, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x83} },
-{ 0x0f49, 16, {0x5f, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0} },
-{ 0x0f59, 16, {0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20} },
-{ 0x0f69, 16, {0xf5, 0x83, 0xe0, 0x54, 0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83} },
-{ 0x0f79, 16, {0xee, 0xf0, 0x74, 0x36, 0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c} },
-{ 0x0f89, 16, {0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0} },
-{ 0x0f99, 16, {0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f} },
-{ 0x0fa9, 16, {0xf5, 0x4b, 0x60, 0x5e, 0xe4, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94} },
-{ 0x0fb9, 16, {0x04, 0x50, 0xe7, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x4b} },
-{ 0x0fc9, 16, {0x60, 0x38, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4} },
-{ 0x0fd9, 16, {0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4} },
-{ 0x0fe9, 16, {0x34, 0x20, 0xf5, 0x83, 0xe0, 0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x0ff9, 16, {0x20, 0xf5, 0x83, 0xe0, 0xfe, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0} },
-{ 0x1009, 3, {0x80, 0xa7, 0x22} },
-{ 0x100c, 16, {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9b, 0x8b, 0xfd, 0x8b, 0x4d, 0x75} },
-{ 0x101c, 16, {0x4e, 0x12, 0x75, 0x4f, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4b} },
-{ 0x102c, 16, {0xf5, 0x4c, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
-{ 0x103c, 16, {0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
-{ 0x104c, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
-{ 0x105c, 16, {0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x11, 0xd2, 0xab, 0x4d, 0xaa, 0x4e, 0xa9, 0x4f} },
-{ 0x106c, 16, {0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0x64, 0x05, 0x60, 0x03, 0x02, 0x11, 0xc1, 0x90, 0x00, 0x03} },
-{ 0x107c, 16, {0x12, 0x9b, 0x8b, 0x64, 0x01, 0x60, 0x03, 0x02, 0x11, 0x48, 0x90, 0x00, 0x02, 0x12, 0x9b, 0x8b} },
-{ 0x108c, 16, {0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x11, 0x22, 0xec, 0xc3, 0x94, 0x10} },
-{ 0x109c, 16, {0x40, 0x03, 0x02, 0x11, 0x22, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4c, 0xae, 0x4b, 0x78, 0x02, 0xce} },
-{ 0x10ac, 16, {0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
-{ 0x10bc, 16, {0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} },
-{ 0x10cc, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0xae, 0xe0} },
-{ 0x10dc, 16, {0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x4c, 0xae, 0x4b, 0x78} },
-{ 0x10ec, 16, {0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x10fc, 16, {0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
-{ 0x110c, 16, {0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
-{ 0x111c, 16, {0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9b, 0x8b, 0x25} },
-{ 0x112c, 16, {0x4c, 0xf5, 0x4c, 0xe4, 0x35, 0x4b, 0xf5, 0x4b, 0x90, 0x00, 0x05, 0x12, 0x9b, 0x8b, 0xfe, 0xe4} },
-{ 0x113c, 16, {0x25, 0x4c, 0xf5, 0x4c, 0xee, 0x35, 0x4b, 0xf5, 0x4b, 0x02, 0x11, 0xc4, 0xab, 0x4d, 0xaa, 0x4e} },
-{ 0x114c, 16, {0xa9, 0x4f, 0x90, 0x00, 0x03, 0x12, 0x9b, 0x8b, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
-{ 0x115c, 16, {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9b, 0x8b, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
-{ 0x116c, 16, {0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
-{ 0x117c, 16, {0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
-{ 0x118c, 16, {0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
-{ 0x119c, 16, {0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} },
-{ 0x11ac, 16, {0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} },
-{ 0x11bc, 16, {0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35} },
-{ 0x11cc, 16, {0x4e, 0xf5, 0x4e, 0x02, 0x10, 0x5d, 0x20, 0x03, 0x0d, 0x90, 0x02, 0xae, 0xe0, 0x60, 0x07, 0x90} },
-{ 0x11dc, 8, {0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} },
-{ 0x11e4, 1, {0x22} },
-{ 0x11e5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33} },
-{ 0x11f5, 7, {0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00, 0x22} },
-{ 0x11fc, 3, {0x00, 0x03, 0x15} },
+{ 0x0d27, 1, {0x32} },
+{ 0x0d28, 1, {0x32} },
+{ 0x0d29, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0d39, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20} },
+{ 0x0d49, 16, {0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} },
+{ 0x0d59, 16, {0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
+{ 0x0d69, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
+{ 0x0d79, 4, {0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d7d, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0d8d, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20} },
+{ 0x0d9d, 16, {0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} },
+{ 0x0dad, 16, {0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
+{ 0x0dbd, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
+{ 0x0dcd, 4, {0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dd1, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0de1, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20} },
+{ 0x0df1, 16, {0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} },
+{ 0x0e01, 16, {0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
+{ 0x0e11, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
+{ 0x0e21, 4, {0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e25, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x0e35, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20} },
+{ 0x0e45, 16, {0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} },
+{ 0x0e55, 16, {0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
+{ 0x0e65, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
+{ 0x0e75, 4, {0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e79, 1, {0x32} },
+{ 0x0e7a, 1, {0x32} },
+{ 0x0e7b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
+{ 0x0e8b, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e91, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} },
+{ 0x0ea1, 12, {0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0ead, 16, {0x90, 0x01, 0x20, 0x12, 0xa1, 0x07, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
+{ 0x0ebd, 16, {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} },
+{ 0x0ecd, 16, {0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
+{ 0x0edd, 16, {0x04, 0xa3, 0xf0, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0, 0xa8} },
+{ 0x0eed, 16, {0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9f} },
+{ 0x0efd, 16, {0x1f, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x86, 0x17, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} },
+{ 0x0f0d, 16, {0x94, 0x04, 0x40, 0xc7, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
+{ 0x0f1d, 16, {0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
+{ 0x0f2d, 16, {0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
+{ 0x0f3d, 16, {0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0f4d, 16, {0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
+{ 0x0f5d, 16, {0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x83, 0xb7, 0x90, 0x01, 0x1e} },
+{ 0x0f6d, 16, {0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0f7d, 16, {0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x0f8d, 16, {0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xee, 0xf0, 0x74, 0x36} },
+{ 0x0f9d, 16, {0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c, 0x2f, 0xf8, 0xe4, 0xf6} },
+{ 0x0fad, 16, {0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0fbd, 16, {0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0x4b, 0x60, 0x5e} },
+{ 0x0fcd, 4, {0xe4, 0x90, 0x01, 0x1e} },
+{ 0x0fd1, 16, {0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0xe7, 0x74, 0x01, 0xa8, 0x07, 0x08} },
+{ 0x0fe1, 16, {0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x4b, 0x60, 0x38, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75} },
+{ 0x0ff1, 16, {0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0x75} },
+{ 0x1001, 16, {0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xef, 0x75, 0xf0} },
+{ 0x1011, 16, {0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0x7d, 0x06, 0x12} },
+{ 0x1021, 11, {0x83, 0x2d, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xa7, 0x22} },
+{ 0x102c, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x1030, 16, {0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
+{ 0x1040, 16, {0x4a, 0x70, 0x03, 0x02, 0x11, 0x74, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x11, 0x46, 0x90} },
+{ 0x1050, 16, {0x10, 0x56, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x11, 0x24, 0x02, 0x10, 0xdc, 0x02, 0x10, 0xc5, 0x02} },
+{ 0x1060, 16, {0x10, 0xab, 0x02, 0x10, 0x9a, 0x02, 0x10, 0x85, 0x02, 0x10, 0x6b, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x1070, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} },
+{ 0x1080, 16, {0xf0, 0x19, 0x02, 0x11, 0x46, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} },
+{ 0x1090, 16, {0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x11, 0x46, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
+{ 0x10a0, 16, {0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x11, 0x46, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x10b0, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} },
+{ 0x10c0, 16, {0xf0, 0x19, 0x02, 0x11, 0x46, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x10d0, 16, {0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x54, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
+{ 0x10e0, 16, {0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
+{ 0x10f0, 16, {0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
+{ 0x1100, 16, {0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
+{ 0x1110, 16, {0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
+{ 0x1120, 16, {0x9f, 0x8e, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
+{ 0x1130, 16, {0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
+{ 0x1140, 16, {0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x54, 0x30, 0xe0, 0xf7, 0x30} },
+{ 0x1150, 16, {0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
+{ 0x1160, 16, {0x10, 0x32, 0xe5, 0x54, 0x30, 0xe1, 0x03, 0x02, 0x10, 0x32, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} },
+{ 0x1170, 6, {0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} },
+{ 0x1176, 1, {0x22} },
+{ 0x1177, 2, {0xae, 0x07} },
+{ 0x1179, 16, {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
+{ 0x1189, 16, {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
+{ 0x1199, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
+{ 0x11a9, 16, {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
+{ 0x11b9, 14, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
+{ 0x11c7, 1, {0x22} },
+{ 0x11c8, 16, {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x11, 0x77, 0x7f, 0x05} },
+{ 0x11d8, 13, {0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x11, 0x77, 0x22} },
+{ 0x11e5, 16, {0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
+{ 0x11f5, 10, {0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
X { 0x1200, 16, {0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0x10, 0x07, 0x01, 0x80, 0x42, 0x00, 0x01, 0x02} },
X { 0x1210, 16, {0x03, 0x01, 0x09, 0x02, 0x58, 0x00, 0x01, 0x01, 0x04, 0x80, 0x3c, 0x09, 0x04, 0x00, 0x00, 0x0a} },
X { 0x1220, 16, {0xff, 0xff, 0xff, 0x05, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40} },
@@ -438,557 +439,623 @@
X { 0x19a0, 16, {0x80, 0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74} },
X { 0x19b0, 16, {0x00, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x02, 0x13, 0x43} },
X { 0x19c0, 1, {0x32} },
-{ 0x19c1, 4, {0xad, 0x07, 0xac, 0x06} },
-{ 0x19c5, 16, {0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
-{ 0x19d5, 16, {0x4a, 0x70, 0x03, 0x02, 0x1b, 0x09, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x1a, 0xdb, 0x90} },
-{ 0x19e5, 16, {0x19, 0xeb, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x1a, 0xb9, 0x02, 0x1a, 0x71, 0x02, 0x1a, 0x5a, 0x02} },
-{ 0x19f5, 16, {0x1a, 0x40, 0x02, 0x1a, 0x2f, 0x02, 0x1a, 0x1a, 0x02, 0x1a, 0x00, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x1a05, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} },
-{ 0x1a15, 16, {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} },
-{ 0x1a25, 16, {0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x1a, 0xdb, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
-{ 0x1a35, 16, {0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x1a45, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} },
-{ 0x1a55, 16, {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x1a65, 16, {0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x54, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
-{ 0x1a75, 16, {0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
-{ 0x1a85, 16, {0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x1a95, 16, {0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
-{ 0x1aa5, 16, {0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
-{ 0x1ab5, 16, {0x9b, 0xb8, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
-{ 0x1ac5, 16, {0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
-{ 0x1ad5, 16, {0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x54, 0x30, 0xe0, 0xf7, 0x30} },
-{ 0x1ae5, 16, {0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
-{ 0x1af5, 16, {0x19, 0xc7, 0xe5, 0x54, 0x30, 0xe1, 0x03, 0x02, 0x19, 0xc7, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} },
-{ 0x1b05, 6, {0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} },
-{ 0x1b0b, 1, {0x22} },
-{ 0x1b0c, 16, {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x81, 0xe0, 0x7f, 0x05} },
-{ 0x1b1c, 13, {0x7e, 0x00, 0x12, 0x09, 0x23, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x81, 0xe0, 0x22} },
-{ 0x1b29, 16, {0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0} },
-{ 0x8000, 4, {0x8e, 0x54, 0x8f, 0x55} },
-{ 0x8004, 16, {0x75, 0x56, 0x03, 0xe5, 0x55, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe} },
-{ 0x8014, 16, {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x81, 0x0e, 0xe5, 0x56, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
-{ 0x8024, 16, {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x80, 0xb2, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
-{ 0x8034, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
-{ 0x8044, 16, {0x80, 0x6c, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
-{ 0x8054, 16, {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x56, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} },
-{ 0x8064, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x8074, 16, {0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5} },
-{ 0x8084, 16, {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x55, 0x24} },
-{ 0x8094, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9b, 0xb8, 0x85} },
-{ 0x80a4, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xb8, 0x90, 0x7f} },
-{ 0x80b4, 16, {0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
-{ 0x80c4, 16, {0x22, 0xe5, 0x57, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
-{ 0x80d4, 16, {0xe5, 0x56, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x80e4, 16, {0x80, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
-{ 0x80f4, 16, {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
-{ 0x8104, 12, {0x56, 0x03, 0x02, 0x80, 0x07, 0x15, 0x56, 0x02, 0x80, 0x07, 0x7f, 0x08} },
-{ 0x8110, 1, {0x22} },
-{ 0x8111, 2, {0xac, 0x07} },
-{ 0x8113, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} },
-{ 0x8123, 16, {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
-{ 0x8133, 16, {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} },
-{ 0x8143, 16, {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
-{ 0x8153, 16, {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
-{ 0x8163, 16, {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} },
-{ 0x8173, 16, {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} },
-{ 0x8183, 16, {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} },
-{ 0x8193, 16, {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} },
-{ 0x81a3, 16, {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} },
-{ 0x81b3, 16, {0x02, 0x81, 0x13, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} },
-{ 0x81c3, 16, {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x81d3, 12, {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
-{ 0x81df, 1, {0x22} },
-{ 0x81e0, 2, {0xae, 0x07} },
-{ 0x81e2, 16, {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
-{ 0x81f2, 16, {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
-{ 0x8202, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
-{ 0x8212, 16, {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
-{ 0x8222, 14, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
-{ 0x8230, 1, {0x22} },
-{ 0x8231, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
-{ 0x8241, 15, {0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x8250, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
-{ 0x8260, 16, {0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x5e, 0x74, 0xbf} },
-{ 0x8270, 16, {0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
-{ 0x8280, 16, {0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} },
-{ 0x8290, 16, {0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} },
-{ 0x82a0, 16, {0xef, 0x55, 0x3b, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
-{ 0x82b0, 16, {0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} },
-{ 0x82c0, 16, {0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5e, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} },
-{ 0x82d0, 4, {0x83, 0xa3, 0xe9, 0xf0} },
-{ 0x82d4, 1, {0x22} },
-{ 0x82d5, 4, {0x8f, 0x5e, 0x8d, 0x5f} },
-{ 0x82d9, 16, {0xe4, 0xf5, 0x60, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
-{ 0x82e9, 16, {0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
-{ 0x82f9, 16, {0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x9c, 0xea, 0x50} },
-{ 0x8309, 16, {0x3c, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83} },
-{ 0x8319, 16, {0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} },
-{ 0x8329, 16, {0x00, 0xc3, 0x12, 0x9c, 0xea, 0x40, 0x0c, 0x75, 0x60, 0x40, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76} },
-{ 0x8339, 16, {0x10, 0x80, 0x0a, 0x75, 0x60, 0x80, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76, 0x38, 0xe5, 0x60, 0x45} },
-{ 0x8349, 16, {0x5f, 0x44, 0x01, 0xff, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x8359, 5, {0x20, 0xf5, 0x83, 0xef, 0xf0} },
-{ 0x835e, 1, {0x22} },
-{ 0x835f, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
-{ 0x836f, 16, {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x55, 0x8f, 0x56, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5} },
-{ 0x837f, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7} },
-{ 0x838f, 16, {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x74, 0x22, 0x25, 0x54, 0xf8, 0xe4, 0xf6} },
-{ 0x839f, 16, {0xe5, 0x56, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf} },
-{ 0x83af, 16, {0x54, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0xaf, 0x54, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x85, 0x56, 0x82} },
-{ 0x83bf, 16, {0x85, 0x55, 0x83, 0xa3, 0xa3, 0xe0, 0x20, 0xe0, 0x22, 0xe0, 0xff, 0xe5, 0x56, 0x24, 0x05, 0xf5} },
-{ 0x83cf, 16, {0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xe5, 0x56, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x55} },
-{ 0x83df, 16, {0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0x74, 0xf8, 0x25, 0x54, 0xf5} },
-{ 0x83ef, 16, {0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c} },
-{ 0x83ff, 16, {0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe} },
-{ 0x840f, 16, {0xe5, 0x54, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3} },
-{ 0x841f, 16, {0xef, 0xf0, 0xaf, 0x54, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42} },
-{ 0x842f, 3, {0x30, 0x7f, 0x00} },
-{ 0x8432, 1, {0x22} },
-{ 0x8433, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xff, 0xe4, 0xfd, 0x12, 0x82, 0x50, 0x74, 0xf8} },
-{ 0x8443, 16, {0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x75, 0xf0, 0x08} },
-{ 0x8453, 16, {0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x56, 0x8f, 0x57, 0xf5, 0x83} },
-{ 0x8463, 16, {0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} },
-{ 0x8473, 16, {0x54, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0xe5, 0x57, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5} },
-{ 0x8483, 16, {0x83, 0xe0, 0x30, 0xe0, 0x09, 0x85, 0x57, 0x82, 0x85, 0x56, 0x83, 0xe0, 0xf5, 0x55, 0xaf, 0x54} },
-{ 0x8493, 16, {0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x54} },
-{ 0x84a3, 16, {0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5} },
-{ 0x84b3, 16, {0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} },
-{ 0x84c3, 1, {0x22} },
-{ 0x84c4, 4, {0x8e, 0x54, 0x8f, 0x55} },
-{ 0x84c8, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x56, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82} },
-{ 0x84d8, 16, {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x70, 0x23, 0x85, 0x55, 0x82, 0x8e, 0x83, 0xa3} },
-{ 0x84e8, 16, {0xe0, 0x30, 0xe0, 0x07, 0xaf, 0x56, 0x7d, 0x02, 0x12, 0x82, 0xd5, 0x85, 0x55, 0x82, 0x85, 0x54} },
-{ 0x84f8, 15, {0x83, 0xa3, 0xe0, 0x30, 0xe1, 0x07, 0xaf, 0x56, 0x7d, 0x04, 0x12, 0x82, 0xd5, 0x7f, 0x00} },
-{ 0x8507, 1, {0x22} },
-{ 0x8508, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
-{ 0x8518, 16, {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
-{ 0x8528, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
-{ 0x8538, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
-{ 0x8548, 16, {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
-{ 0x8558, 16, {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
-{ 0x8568, 16, {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
-{ 0x8578, 16, {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
-{ 0x8588, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
-{ 0x8598, 3, {0x83, 0xf0, 0x22} },
-{ 0x859b, 16, {0x79, 0x0d, 0x8e, 0x54, 0x8f, 0x55, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
-{ 0x85ab, 16, {0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f} },
-{ 0x85bb, 16, {0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x55, 0xe5} },
-{ 0x85cb, 16, {0x55, 0xaa, 0x54, 0x70, 0x02, 0x05, 0x54, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9} },
-{ 0x85db, 5, {0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x85e0, 1, {0x22} },
-{ 0x85e1, 4, {0x8e, 0x54, 0x8f, 0x55} },
-{ 0x85e5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
-{ 0x85f5, 16, {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x5c, 0x8f, 0x5d, 0xaa, 0x06, 0xa9, 0x55, 0x7b, 0x01, 0xc0} },
-{ 0x8605, 16, {0x03, 0xc0, 0x01, 0xe5, 0x5b, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0} },
-{ 0x8615, 16, {0xa8, 0x01, 0xfc, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9b, 0x49} },
-{ 0x8625, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3} },
-{ 0x8635, 16, {0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0x9c, 0xea, 0x40, 0x10} },
-{ 0x8645, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0x9d, 0x31, 0x00, 0x00, 0x00, 0x08, 0x80, 0x2e} },
-{ 0x8655, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3} },
-{ 0x8665, 16, {0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0x9c, 0xea, 0x50, 0x0e} },


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 77'
echo 'File patch-2.2.20 is continued in part 78'
echo "78" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:19 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part80

#!/bin/sh -x
# this is part 80 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 80; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+ * @bus: pointer to the bus to register


+ *
+ * (For use only by USB Host Controller Drivers.)
+ */

X void usb_register_bus(struct usb_bus *bus)
X {
X int busnum;
@@ -373,6 +429,8 @@
X } else
X warn("too many buses");
X
+ usb_bus_get(bus);
+
X /* Add it to the list of buses */
X list_add(&bus->bus_list, &usb_bus_list);
X
@@ -381,6 +439,12 @@
X info("new USB bus registered, assigned bus number %d", bus->busnum);
X }
X
+/**
+ * usb_deregister_bus - deregisters the USB host controller
+ * @bus: pointer to the bus to deregister


+ *
+ * (For use only by USB Host Controller Drivers.)
+ */

X void usb_deregister_bus(struct usb_bus *bus)
X {
X info("USB bus %d deregistered", bus->busnum);
@@ -395,6 +459,8 @@
X usbdevfs_remove_bus(bus);
X
X clear_bit(bus->busnum, busmap.busmap);
+
+ usb_bus_put(bus);
X }
X
X /*
@@ -722,7 +788,8 @@
X value = call_usermodehelper (argv [0], argv, envp);
X kfree (buf);
X kfree (envp);
- dbg ("kusbd policy returned 0x%x", value);
+ if (value != 0)
+ dbg ("kusbd policy returned 0x%x", value);
X }
X
X #else
@@ -783,6 +850,8 @@
X
X memset(dev, 0, sizeof(*dev));
X
+ usb_bus_get(bus);
+
X dev->bus = bus;
X dev->parent = parent;
X atomic_set(&dev->refcnt, 1);
@@ -799,6 +868,9 @@
X if (atomic_dec_and_test(&dev->refcnt)) {
X dev->bus->op->deallocate(dev);
X usb_destroy_configuration(dev);
+
+ usb_bus_put(dev->bus);
+
X kfree(dev);
X }
X }
@@ -807,10 +879,23 @@
X {
X atomic_inc(&dev->refcnt);
X }
+
X /* -------------------------------------------------------------------------------------
X * New USB Core Functions
X * -------------------------------------------------------------------------------------*/
X
+/**
+ * usb_alloc_urb - creates a new urb for a USB driver to use
+ * @iso_packets: number of iso packets for this urb
+ *
+ * Creates an urb for the USB driver to use and returns a pointer to it.


+ * If no memory is available, NULL is returned.
+ *

+ * If the driver want to use this urb for interrupt, control, or bulk
+ * endpoints, pass '0' as the number of iso packets.
+ *
+ * The driver should call usb_free_urb() when it is finished with the urb.
+ */
X urb_t *usb_alloc_urb(int iso_packets)
X {
X urb_t *urb;
@@ -829,7 +914,14 @@
X return urb;
X }
X
-/*-------------------------------------------------------------------*/
+/**
+ * usb_free_urb - frees the memory used by a urb
+ * @urb: pointer to the urb to free
+ *
+ * If an urb is created with a call to usb_create_urb() it should be
+ * cleaned up with a call to usb_free_urb() when the driver is finished
+ * with it.
+ */
X void usb_free_urb(urb_t* urb)
X {
X if (urb)
@@ -894,6 +986,7 @@
X if (status) {
X // something went wrong
X usb_free_urb(urb);
+ current->state = TASK_RUNNING;
X remove_wait_queue(&wqh, &wait);
X return status;
X }
@@ -904,6 +997,7 @@
X } else
X status = 1;
X
+ current->state = TASK_RUNNING;
X remove_wait_queue(&wqh, &wait);
X
X if (!status) {
@@ -945,7 +1039,27 @@
X
X }
X
-/*-------------------------------------------------------------------*/
+/**
+ * usb_control_msg - Builds a control urb, sends it off and waits for completion
+ * @dev: pointer to the usb device to send the message to
+ * @pipe: endpoint "pipe" to send the message to
+ * @request: USB message request value
+ * @requesttype: USB message request type value
+ * @value: USB message value
+ * @index: USB message index value
+ * @data: pointer to the data to send
+ * @size: length in bytes of the data to send
+ * @timeout: time to wait for the message to complete before timing out (if 0 the wait is forever)
+ *
+ * This function sends a simple control message to a specified endpoint
+ * and waits for the message to complete, or timeout.
+ *
+ * If successful, it returns 0, othwise a negative error number.
+ *
+ * Don't use this function from within an interrupt context, like a
+ * bottom half handler. If you need a asyncronous message, or need to send
+ * a message from within interrupt context, use usb_submit_urb()
+ */
X int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
X __u16 value, __u16 index, void *data, __u16 size, int timeout)
X {
@@ -970,10 +1084,27 @@


X return ret;
X }
X

-/*-------------------------------------------------------------------*/
-/* compatibility wrapper, builds bulk urb, and waits for completion */
-/* synchronous behavior */
X
+/**
+ * usb_bulk_msg - Builds a bulk urb, sends it off and waits for completion
+ * @usb_dev: pointer to the usb device to send the message to
+ * @pipe: endpoint "pipe" to send the message to
+ * @data: pointer to the data to send
+ * @len: length in bytes of the data to send
+ * @actual_length: pointer to a location to put the actual length transfered in bytes
+ * @timeout: time to wait for the message to complete before timing out (if 0 the wait is forever)
+ *
+ * This function sends a simple bulk message to a specified endpoint
+ * and waits for the message to complete, or timeout.
+ *
+ * If successful, it returns 0, othwise a negative error number.
+ * The number of actual bytes transferred will be plaed in the
+ * actual_timeout paramater.
+ *
+ * Don't use this function from within an interrupt context, like a
+ * bottom half handler. If you need a asyncronous message, or need to
+ * send a message from within interrupt context, use usb_submit_urb()
+ */
X int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe,
X void *data, int len, int *actual_length, int timeout)
X {
@@ -1479,8 +1610,6 @@
X
X info("USB disconnect on device %d", dev->devnum);
X
- call_policy ("remove", dev);
-
X if (dev->actconfig) {
X for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
X struct usb_interface *interface = &dev->actconfig->interface[i];
@@ -1489,7 +1618,9 @@


X down(&driver->serialize);
X driver->disconnect(dev, interface->private_data);
X up(&driver->serialize);
- usb_driver_release_interface(driver, interface);
+ /* if driver->disconnect didn't release the interface */
+ if (interface->driver)
+ usb_driver_release_interface(driver, interface);
X }

X }
X }
@@ -1501,6 +1632,9 @@
X usb_disconnect(child);
X }
X
+ /* Let policy agent unload modules etc */
+ call_policy ("remove", dev);
+
X /* Free the device number and remove the /proc/bus/usb entry */
X if (dev->devnum > 0) {


X clear_bit(dev->devnum, &dev->bus->devmap.devicemap);

@@ -1522,10 +1656,20 @@
X int devnum;
X // FIXME needs locking for SMP!!
X /* why? this is called only from the hub thread,
- * which hopefully doesn't run on multiple CPU's simulatenously 8-)
+ * which hopefully doesn't run on multiple CPU's simultaneously 8-)
X */
X dev->descriptor.bMaxPacketSize0 = 8; /* Start off at 8 bytes */
+#ifndef DEVNUM_ROUND_ROBIN
X devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, 1);
+#else /* round_robin alloc of devnums */
+ /* Try to allocate the next devnum beginning at bus->devnum_next. */
+ devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, dev->bus->devnum_next);
+ if (devnum >= 128)
+ devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, 1);
+
+ dev->bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1);
+#endif /* round_robin alloc of devnums */
+
X if (devnum < 128) {
X set_bit(devnum, dev->bus->devmap.devicemap);
X dev->devnum = devnum;
@@ -1556,9 +1700,9 @@
X while (i--) {
X if ((result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
X USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
- (type << 8) + index, 0, buf, size, HZ * GET_TIMEOUT)) >= 0 ||
+ (type << 8) + index, 0, buf, size, HZ * GET_TIMEOUT)) > 0 ||
X result == -EPIPE)
- break;
+ break; /* retry if the returned length was 0; flaky device */
X }
X return result;
X }
@@ -1933,7 +2077,8 @@
X
X err = usb_set_address(dev);
X if (err < 0) {
- err("USB device not accepting new address (error=%d)", err);
+ err("USB device not accepting new address=%d (error=%d)",
+ dev->devnum, err);


X clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
X dev->devnum = -1;

X return 1;
@@ -1959,7 +2104,8 @@
X if (err < 0)
X err("unable to get device descriptor (error=%d)", err);
X else
- err("USB device descriptor short read (expected %i, got %i)", sizeof(dev->descriptor), err);


+ err("USB device descriptor short read (expected %Zi, got %i)",

+ sizeof(dev->descriptor), err);


X
X clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
X dev->devnum = -1;

@@ -1968,17 +2114,18 @@
X

X err = usb_get_configuration(dev);
X if (err < 0) {
- err("unable to get configuration (error=%d)", err);
- usb_destroy_configuration(dev);
+ err("unable to get device %d configuration (error=%d)", dev->devnum, err);


X clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
X dev->devnum = -1;

+ usb_free_dev(dev);


X return 1;
X }
X

X /* we set the default configuration here */
X err = usb_set_configuration(dev, dev->config[0].bConfigurationValue);
X if (err) {
- err("failed to set default configuration (error=%d)", err);
+ err("failed to set device %d default configuration (error=%d)",
+ dev->devnum, err);


X clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
X dev->devnum = -1;

X return 1;
@@ -2051,6 +2198,32 @@
X return &usb_bus_list;
X }


X #endif
+
+
+/*

+ * Init
+ */
+static int __init usb_init(void)
+{
+ usb_major_init();
+ usbdevfs_init();
+ usb_hub_init();


+
+ return 0;
+}

+
+/*
+ * Cleanup
+ */
+static void __exit usb_exit(void)
+{
+ usb_major_cleanup();
+ usbdevfs_cleanup();
+ usb_hub_cleanup();
+}
+
+module_init(usb_init);
+module_exit(usb_exit);
X
X /*
X * USB may be built into the kernel or be built as modules.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/video/aty128fb.c linux/drivers/video/aty128fb.c
--- v2.2.19/drivers/video/aty128fb.c Sun Mar 25 17:37:37 2001
+++ linux/drivers/video/aty128fb.c Wed Oct 10 01:41:35 2001
@@ -1747,15 +1747,43 @@
X memset(&var, 0, sizeof(var));
X
X #ifdef CONFIG_FB_OF
- /* New iBook */
- if (default_vmode == VMODE_CHOOSE &&
- machine_is_compatible("PowerBook2,2"))
- default_vmode = VMODE_800_600_60;
-
- if (default_vmode == VMODE_CHOOSE)
- var = default_var;
- else if (mac_vmode_to_var(default_vmode, default_cmode, &var))
- var = default_var;
+ if (_machine == _MACH_Pmac) {
+ if (mode_option) {
+ if (mac_vmode_to_var(default_vmode, default_cmode, &var))
+ var = default_var;
+ } else {
+ if (default_vmode <= 0 || default_vmode > VMODE_MAX)
+ default_vmode = VMODE_1024_768_60;
+
+ /* iBook SE */
+ if (machine_is_compatible("PowerBook2,2"))
+ default_vmode = VMODE_800_600_60;
+
+ /* iMacs and newer iBooks need to use 1024x768
+ * PowerMac2,1 first r128 iMacs
+ * PowerMac4,1 january 2001 iMacs "flower power"
+ */
+ if (machine_is_compatible("PowerMac2,1") ||
+ machine_is_compatible("PowerMac2,2") ||
+ machine_is_compatible("PowerMac4,1"))
+ default_vmode = VMODE_1024_768_75;
+
+ /* PowerBook Firewire (Pismo) and iBook2 */
+ if (machine_is_compatible("PowerBook3,1") ||
+ machine_is_compatible("PowerBook4,1"))
+ default_vmode = VMODE_1024_768_60;
+
+ /* PowerBook Titanium */
+ if (machine_is_compatible("PowerBook3,2"))
+ default_vmode = VMODE_1152_768_60;
+
+ if (default_cmode < CMODE_8 || default_cmode > CMODE_32)
+ default_cmode = CMODE_8;
+
+ if (mac_vmode_to_var(default_vmode, default_cmode, &var))
+ var = default_var;
+ }
+ } else
X #else /* CONFIG_FB_OF */
X var = default_var;
X #endif /* CONFIG_FB_OF */
@@ -2088,6 +2116,11 @@
X dp = dp->parent;
X if (dp->name && !strcmp(dp->name, "ATY,RageM3pB"))
X return;
+
+ if (dp->name && !strcmp(dp->name, "ATY,RageM3p12A") && dp->parent)
+ dp = dp->parent;
+ if (dp->name && !strcmp(dp->name, "ATY,RageM3p12B"))
+ return;
X
X switch (dp->n_addrs) {
X case 3:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/video/atyfb.c linux/drivers/video/atyfb.c
--- v2.2.19/drivers/video/atyfb.c Sun Mar 25 17:31:39 2001
+++ linux/drivers/video/atyfb.c Wed Oct 10 01:41:36 2001
@@ -3268,7 +3268,7 @@
X addr = dp->addrs[1].address;
X break;
X default:
- printk("Warning: got %d adresses for ATY:\n", dp->n_addrs);
+ printk("Warning: got %d addresses for ATY:\n", dp->n_addrs);
X for (i = 0; i < dp->n_addrs; i++)
X printk(" %08x-%08x", dp->addrs[i].address,
X dp->addrs[i].address+dp->addrs[i].size-1);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/video/cgfourteenfb.c linux/drivers/video/cgfourteenfb.c
--- v2.2.19/drivers/video/cgfourteenfb.c Sun Mar 25 17:31:40 2001
+++ linux/drivers/video/cgfourteenfb.c Mon Oct 22 10:45:57 2001
@@ -1,4 +1,4 @@
-/* $Id: cgfourteenfb.c,v 1.4.2.1 1999/09/28 15:59:58 davem Exp $
+/* $Id: cgfourteenfb.c,v 1.4.2.2 2001/07/27 09:44:41 davem Exp $
X * cgfourteenfb.c: CGfourteen frame buffer driver
X *
X * Copyright (C) 1996,1998 Jakub Jelinek (j...@ultra.linux.cz)
@@ -234,6 +234,8 @@
X spin_lock_irqsave(&fb->lock, flags);
X if (c->enable)
X cur->ccr |= CG14_CCR_ENABLE;
+ else
+ cur->ccr &= ~CG14_CCR_ENABLE;
X cur->cursx = ((c->cpos.fbx - c->chot.fbx) & 0xfff);
X cur->cursy = ((c->cpos.fby - c->chot.fby) & 0xfff);
X spin_unlock_irqrestore(&fb->lock, flags);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/video/fbmem.c linux/drivers/video/fbmem.c
--- v2.2.19/drivers/video/fbmem.c Sun Mar 25 17:31:40 2001
+++ linux/drivers/video/fbmem.c Wed Oct 10 01:41:37 2001
@@ -251,14 +251,16 @@
X {
X struct fb_info **fi;
X
- len = 0;
+ int buflen = 0;
X for (fi = registered_fb; fi < &registered_fb[FB_MAX] && len < 4000; fi++)
X if (*fi)
- len += sprintf(buf + len, "%d %s\n",
+ buflen += sprintf(buf + buflen, "%d %s\n",
X GET_FB_IDX((*fi)->node),
X (*fi)->modename);
X *start = buf + offset;
- return len > offset ? len - offset : 0;
+
+ buflen = buflen > offset ? buflen - offset : 0;
+ return len < buflen ? len : buflen;
X }
X
X static ssize_t
@@ -498,6 +500,8 @@
X (*info->blank)(arg, info);


X return 0;
X default:

+ if (fb->fb_ioctl == NULL)
+ return -EINVAL;
X return fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE(info),
X info);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/video/macmodes.c linux/drivers/video/macmodes.c
--- v2.2.19/drivers/video/macmodes.c Sun Mar 25 17:31:40 2001
+++ linux/drivers/video/macmodes.c Wed Oct 10 01:41:37 2001
@@ -202,8 +202,22 @@
X FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
X };
X
+ /* 1152x768, 60 Hz, Titanium PowerBook */
X
-static const struct mac_mode *mac_modes[20] = {
+static const struct mac_mode mac_mode_21 = {
+ VMODE_1152_768_60, 1152, 768,
+ 15386, 158, 26, 29, 3, 136, 6,
+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
+};
+
+ /* 1600x1024, 60 Hz, Non-Interlaced (112.27 MHz dotclock) */
+static const struct mac_mode mac_mode_22 = {
+ VMODE_1600_1024_60, 1600, 1024,
+ 8908, 88, 104, 1, 10, 16, 1,
+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
+};
+
+static const struct mac_mode *mac_modes[22] = {
X NULL, /* 512x384, 60Hz interlaced (NTSC) */
X NULL, /* 512x384, 60Hz */
X NULL, /* 640x480, 50Hz interlaced (PAL) */
@@ -224,6 +238,8 @@
X &mac_mode_18, /* 1152x870, 75Hz */
X &mac_mode_19, /* 1280x960, 75Hz */
X &mac_mode_20, /* 1280x1024, 75Hz */
+ &mac_mode_21, /* 1152x768, 60Hz */
+ &mac_mode_22, /* 1600x1024, 60Hz */
X };
X
X static const struct mac_mode *mac_modes_inv[] = {
@@ -241,6 +257,7 @@
X &mac_mode_18, /* 1152x870, 75Hz */
X &mac_mode_19, /* 1280x960, 75Hz */
X &mac_mode_20, /* 1280x1024, 75Hz */
+ &mac_mode_22, /* 1600x1024, 60Hz */
X };
X
X
@@ -267,6 +284,7 @@
X { 0x730, VMODE_768_576_50I }, /* PAL (Alternate) */
X { 0x73a, VMODE_1152_870_75 }, /* 3rd party 19" */
X { 0x73f, VMODE_640_480_67 }, /* no sense lines connected at all */
+ { 0xBEEF, VMODE_1600_1024_60 }, /* 22" Apple Cinema Display */
X { -1, VMODE_640_480_60 }, /* catch-all, must be last */
X };
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/drivers/video/offb.c linux/drivers/video/offb.c
--- v2.2.19/drivers/video/offb.c Sun Mar 25 17:31:40 2001
+++ linux/drivers/video/offb.c Wed Oct 10 01:41:37 2001
@@ -447,6 +447,7 @@
X #ifdef CONFIG_FB_ATY128
X if (!strncmp(dp->name, "ATY,Rage128", 11) ||
X !strncmp(dp->name, "ATY,RageM3p1", 12) ||
+ !strncmp(dp->name, "ATY,RageM3p2", 12) ||
X !strncmp(dp->name, "ATY,RageM3pA", 12)) {
X aty128fb_of_init(dp);
X return 1;
@@ -733,7 +734,7 @@
X disp->scrollmode = SCROLL_YREDRAW;
X
X strcpy(info->info.modename, "OFfb ");
- strncat(info->info.modename, full_name, sizeof(info->info.modename));
+ strncat(info->info.modename, full_name, sizeof(info->info.modename)-6);
X info->info.node = -1;
X info->info.fbops = &offb_ops;
X info->info.disp = disp;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/binfmt_aout.c linux/fs/binfmt_aout.c
--- v2.2.19/fs/binfmt_aout.c Sun Mar 25 17:37:38 2001
+++ linux/fs/binfmt_aout.c Wed Oct 10 01:41:38 2001
@@ -30,17 +30,17 @@
X #include <asm/pgtable.h>
X
X static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
-static int load_aout_library(int fd);
-static int aout_core_dump(long signr, struct pt_regs * regs);
+static int load_aout_library(struct file *file);
+static int aout_core_dump(long signr, struct pt_regs * regs, struct file *);
X
X extern void dump_thread(struct pt_regs *, struct user *);
X
X static struct linux_binfmt aout_format = {
-#ifndef MODULE
- NULL, NULL, load_aout_binary, load_aout_library, aout_core_dump
-#else
- NULL, &__this_module, load_aout_binary, load_aout_library, aout_core_dump
-#endif
+ module: THIS_MODULE,
+ load_binary: load_aout_binary,
+ load_shlib: load_aout_library,
+ core_dump: aout_core_dump,
+ min_coredump: PAGE_SIZE,
X };
X
X static void set_brk(unsigned long start, unsigned long end)
@@ -88,15 +88,11 @@
X * dumping of the process results in another error..
X */
X
-static inline int
-do_aout_core_dump(long signr, struct pt_regs * regs)
+static int
+aout_core_dump(long signr, struct pt_regs * regs, struct file * file)
X {
- struct dentry * dentry = NULL;
- struct inode * inode = NULL;
- struct file * file;
X mm_segment_t fs;
X int has_dumped = 0;
- char corefile[6+sizeof(current->comm)];
X unsigned long dump_start, dump_size;
X struct user dump;
X #if defined(__alpha__)
@@ -112,32 +108,8 @@
X # define START_STACK(u) (u.start_stack)
X #endif
X
- if (!current->dumpable || atomic_read(&current->mm->count) != 1)
- return 0;
- current->dumpable = 0;
-
-/* See if we have enough room to write the upage. */
- if (current->rlim[RLIMIT_CORE].rlim_cur < PAGE_SIZE)
- return 0;
X fs = get_fs();
X set_fs(KERNEL_DS);
- memcpy(corefile,"core.",5);
-#if 0
- memcpy(corefile+5,current->comm,sizeof(current->comm));
-#else
- corefile[4] = '\0';
-#endif
- file = filp_open(corefile,O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600);
- if (IS_ERR(file))
- goto end_coredump;
- dentry = file->f_dentry;
- inode = dentry->d_inode;
- if (!S_ISREG(inode->i_mode))
- goto close_coredump;
- if (!inode->i_op || !inode->i_op->default_file_ops)
- goto close_coredump;
- if (!file->f_op->write)
- goto close_coredump;
X has_dumped = 1;
X current->flags |= PF_DUMPCORE;
X strncpy(dump.u_comm, current->comm, sizeof(current->comm));
@@ -217,23 +189,10 @@
X set_fs(KERNEL_DS);
X DUMP_WRITE(current,sizeof(*current));
X close_coredump:
- filp_close(file, NULL);
-end_coredump:
X set_fs(fs);
X return has_dumped;
X }
X
-static int
-aout_core_dump(long signr, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_aout_core_dump(signr, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X /*
X * create_aout_tables() parses the env- and arg-strings in new user
X * memory and creates the pointer tables from them, and puts their
@@ -303,7 +262,7 @@
X * libraries. There is no binary dependent code anywhere else.
X */
X
-static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
+static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
X {
X struct exec ex;
X struct file * file;
@@ -452,16 +411,12 @@
X }
X }
X beyond_if:
+ set_binfmt(&aout_format);
X if (current->exec_domain && current->exec_domain->module)
X __MOD_DEC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_DEC_USE_COUNT(current->binfmt->module);
X current->exec_domain = lookup_exec_domain(current->personality);
- current->binfmt = &aout_format;
X if (current->exec_domain && current->exec_domain->module)
X __MOD_INC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_INC_USE_COUNT(current->binfmt->module);
X
X set_brk(current->mm->start_brk, current->mm->brk);
X
@@ -473,27 +428,13 @@
X regs->gp = ex.a_gpvalue;
X #endif
X start_thread(regs, ex.a_entry, p);
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X send_sig(SIGTRAP, current, 0);


X return 0;
X }
X
-

-static int
-load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_aout_binary(bprm, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
-static inline int
-do_load_aout_library(int fd)
+static int load_aout_library(struct file *file)
X {
- struct file * file;
X struct inode * inode;
X unsigned long bss, start_addr, len;
X unsigned long error;
@@ -501,12 +442,6 @@
X loff_t offset = 0;
X struct exec ex;
X
- retval = -EACCES;
- file = fget(fd);
- if (!file)
- goto out;
- if (!file->f_op)
- goto out_putf;
X inode = file->f_dentry->d_inode;
X
X retval = -ENOEXEC;
@@ -569,22 +504,8 @@
X retval = 0;
X
X out_putf:
- fput(file);
-out:
X return retval;
X }
-
-static int
-load_aout_library(int fd)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_aout_library(fd);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X
X int __init init_aout_binfmt(void)
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- v2.2.19/fs/binfmt_elf.c Sun Mar 25 17:37:38 2001
+++ linux/fs/binfmt_elf.c Wed Oct 10 01:41:38 2001
@@ -40,7 +40,7 @@
X #include <linux/elf.h>
X
X static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
-static int load_elf_library(int fd);
+static int load_elf_library(struct file *file);
X extern int dump_fpu (struct pt_regs *, elf_fpregset_t *);
X extern void dump_thread(struct pt_regs *, struct user *);
X
@@ -54,7 +54,7 @@
X * don't even try.
X */
X #ifdef USE_ELF_CORE_DUMP
-static int elf_core_dump(long signr, struct pt_regs * regs);
+static int elf_core_dump(long signr, struct pt_regs * regs, struct file *);
X #else
X #define elf_core_dump NULL
X #endif
@@ -64,11 +64,11 @@
X #define ELF_PAGEALIGN(_v) (((_v) + ELF_EXEC_PAGESIZE - 1) & ~(ELF_EXEC_PAGESIZE - 1))
X
X static struct linux_binfmt elf_format = {
-#ifndef MODULE
- NULL, NULL, load_elf_binary, load_elf_library, elf_core_dump
-#else
- NULL, &__this_module, load_elf_binary, load_elf_library, elf_core_dump
-#endif
+ module: THIS_MODULE,
+ load_binary: load_elf_binary,
+ load_shlib: load_elf_library,
+ core_dump: elf_core_dump,
+ min_coredump: ELF_EXEC_PAGESIZE,
X };
X
X static void set_brk(unsigned long start, unsigned long end)
@@ -415,8 +415,7 @@
X #define INTERPRETER_ELF 2
X
X
-static inline int
-do_load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
+static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
X {
X struct file * file;
X struct dentry *interpreter_dentry = NULL; /* to shut gcc up */
@@ -673,7 +672,7 @@
X if (elf_ex.e_type == ET_DYN) {
X load_bias += error -
X ELF_PAGESTART(load_bias + vaddr);
- load_addr += error;
+ load_addr += load_bias;
X }
X }
X k = elf_ppnt->p_vaddr;
@@ -727,16 +726,12 @@
X if (interpreter_type != INTERPRETER_AOUT)
X sys_close(elf_exec_fileno);
X
+ set_binfmt(&elf_format);
X if (current->exec_domain && current->exec_domain->module)
X __MOD_DEC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_DEC_USE_COUNT(current->binfmt->module);
X current->exec_domain = lookup_exec_domain(current->personality);
- current->binfmt = &elf_format;
X if (current->exec_domain && current->exec_domain->module)
X __MOD_INC_USE_COUNT(current->exec_domain->module);
- if (current->binfmt && current->binfmt->module)
- __MOD_INC_USE_COUNT(current->binfmt->module);
X
X compute_creds(bprm);
X current->flags &= ~PF_FORKNOEXEC;
@@ -799,7 +794,7 @@
X #endif
X
X start_thread(regs, elf_entry, bprm->p);
- if (current->flags & PF_PTRACED)
+ if (current->ptrace & PT_PTRACED)
X send_sig(SIGTRAP, current, 0);
X retval = 0;
X out:
@@ -819,24 +814,11 @@
X goto out;
X }
X
-static int
-load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_elf_binary(bprm, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X /* This is really simpleminded and specialized - we are loading an
X a.out library that is given an ELF header. */
X
-static inline int
-do_load_elf_library(int fd)
+static int load_elf_library(struct file *file)
X {
- struct file * file;
X struct dentry * dentry;
X struct inode * inode;
X struct elf_phdr *elf_phdata;
@@ -845,10 +827,6 @@
X struct elfhdr elf_ex;
X loff_t offset = 0;
X
- error = -EACCES;
- file = fget(fd);
- if (!file || !file->f_op)
- goto out;
X dentry = file->f_dentry;
X inode = dentry->d_inode;
X
@@ -924,21 +902,9 @@
X out_free_ph:
X kfree(elf_phdata);
X out_putf:
- fput(file);
-out:
X return error;
X }
X
-static int load_elf_library(int fd)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_elf_library(fd);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X /*
X * Note that some platforms still use traditional core dumps and not
X * the ELF core dump. Each platform can select it as appropriate.
@@ -1078,14 +1044,10 @@
X * and then they are actually written out. If we run out of core limit
X * we just truncate.
X */
-static int elf_core_dump(long signr, struct pt_regs * regs)
+static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
X {
X int has_dumped = 0;
- struct file *file;
- struct dentry *dentry;
- struct inode *inode;
X mm_segment_t fs;
- char corefile[6+sizeof(current->comm)];
X int segs;
X int i;
X size_t size = 0;
@@ -1099,16 +1061,6 @@
X elf_fpregset_t fpu; /* NT_PRFPREG */
X struct elf_prpsinfo psinfo; /* NT_PRPSINFO */
X
- if (!current->dumpable ||
- limit < ELF_EXEC_PAGESIZE ||
- atomic_read(&current->mm->count) != 1)
- return 0;
- current->dumpable = 0;
-
-#ifndef CONFIG_BINFMT_ELF
- MOD_INC_USE_COUNT;
-#endif
-
X segs = current->mm->map_count;
X
X #ifdef DEBUG
@@ -1139,27 +1091,6 @@
X fs = get_fs();
X set_fs(KERNEL_DS);
X
- memcpy(corefile,"core.",5);
-#if 0
- memcpy(corefile+5,current->comm,sizeof(current->comm));
-#else
- corefile[4] = '\0';
-#endif
- file = filp_open(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600);
- if (IS_ERR(file))
- goto end_coredump;
- dentry = file->f_dentry;
- inode = dentry->d_inode;
- if (inode->i_nlink > 1)
- goto close_coredump; /* multiple links - don't dump */
-
- if (!S_ISREG(inode->i_mode))
- goto close_coredump;
- if (!inode->i_op || !inode->i_op->default_file_ops)
- goto close_coredump;
- if (!file->f_op->write)
- goto close_coredump;
-
X has_dumped = 1;
X current->flags |= PF_DUMPCORE;
X
@@ -1358,13 +1289,8 @@
X }
X
X close_coredump:
- filp_close(file, NULL);
-
X end_coredump:
X set_fs(fs);
-#ifndef CONFIG_BINFMT_ELF
- MOD_DEC_USE_COUNT;
-#endif
X return has_dumped;
X }
X #endif /* USE_ELF_CORE_DUMP */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/binfmt_em86.c linux/fs/binfmt_em86.c
--- v2.2.19/fs/binfmt_em86.c Sun Mar 25 17:30:59 2001
+++ linux/fs/binfmt_em86.c Wed Oct 10 01:41:38 2001
@@ -20,7 +20,7 @@
X #define EM86_INTERP "/usr/bin/em86"
X #define EM86_I_NAME "em86"
X
-static int do_load_em86(struct linux_binprm *bprm,struct pt_regs *regs)
+static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs)
X {
X char *interp, *i_name, *i_arg;
X struct dentry * dentry;
@@ -93,21 +93,9 @@
X return search_binary_handler(bprm, regs);
X }
X
-static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs)
-{
- int retval;
- MOD_INC_USE_COUNT;
- retval = do_load_em86(bprm,regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X struct linux_binfmt em86_format = {
-#ifndef MODULE
- NULL, 0, load_em86, NULL, NULL
-#else
- NULL, &__this_module, load_em86, NULL, NULL
-#endif
+ module: THIS_MODULE,
+ load_binary: load_em86,
X };
X
X int __init init_em86_binfmt(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/binfmt_java.c linux/fs/binfmt_java.c
--- v2.2.19/fs/binfmt_java.c Sun Mar 25 17:30:59 2001
+++ linux/fs/binfmt_java.c Wed Oct 10 01:41:38 2001
@@ -23,7 +23,7 @@
X char binfmt_java_interpreter[65] = _PATH_JAVA;
X char binfmt_java_appletviewer[65] = _PATH_APPLET;
X
-static int do_load_java(struct linux_binprm *bprm,struct pt_regs *regs)
+static int load_java(struct linux_binprm *bprm,struct pt_regs *regs)
X {
X char *i_name;
X int len;
@@ -93,7 +93,7 @@
X return search_binary_handler(bprm,regs);
X }
X
-static int do_load_applet(struct linux_binprm *bprm,struct pt_regs *regs)
+static int load_applet(struct linux_binprm *bprm,struct pt_regs *regs)
X {
X char *i_name;
X struct dentry * dentry;
@@ -140,38 +140,14 @@
X return search_binary_handler(bprm,regs);
X }
X
-static int load_java(struct linux_binprm *bprm,struct pt_regs *regs)
-{
- int retval;
- MOD_INC_USE_COUNT;
- retval = do_load_java(bprm,regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X static struct linux_binfmt java_format = {
-#ifndef MODULE
- NULL, 0, load_java, NULL, NULL
-#else
- NULL, &__this_module, load_java, NULL, NULL
-#endif
+ module: THIS_MODULE,
+ load_binary: load_java,
X };
X
-static int load_applet(struct linux_binprm *bprm,struct pt_regs *regs)
-{
- int retval;
- MOD_INC_USE_COUNT;
- retval = do_load_applet(bprm,regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X static struct linux_binfmt applet_format = {
-#ifndef MODULE
- NULL, 0, load_applet, NULL, NULL
-#else
- NULL, &__this_module, load_applet, NULL, NULL
-#endif
+ module: THIS_MODULE,
+ load_binary: load_applet,
X };
X
X int __init init_java_binfmt(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/binfmt_misc.c linux/fs/binfmt_misc.c
--- v2.2.19/fs/binfmt_misc.c Sun Mar 25 17:37:38 2001
+++ linux/fs/binfmt_misc.c Wed Oct 10 01:41:38 2001
@@ -48,7 +48,7 @@
X typedef struct binfmt_entry {
X struct binfmt_entry *next;
X long id;
- int flags; /* type, status, etc. */
+ long flags; /* type, status, etc. */
X int offset; /* offset of magic */
X int size; /* size of magic/mask */
X char *magic; /* magic or filename extension */
@@ -65,11 +65,8 @@
X static int entry_proc_setup(Node *e);
X
X static struct linux_binfmt misc_format = {
-#ifndef MODULE
- NULL, 0, load_misc_binary, NULL, NULL
-#else
- NULL, &__this_module, load_misc_binary, NULL, NULL
-#endif
+ module: THIS_MODULE,
+ load_binary: load_misc_binary,
X };
X
X static struct proc_dir_entry *bm_dir = NULL;
@@ -190,7 +187,6 @@
X char *iname_addr = iname;
X int retval;
X
- MOD_INC_USE_COUNT;
X retval = -ENOEXEC;
X if (!enabled)
X goto _ret;
@@ -230,7 +226,6 @@
X if (retval >= 0)
X retval = search_binary_handler(bprm, regs);
X _ret:
- MOD_DEC_USE_COUNT;
X return retval;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/binfmt_script.c linux/fs/binfmt_script.c
--- v2.2.19/fs/binfmt_script.c Sun Mar 25 17:30:59 2001
+++ linux/fs/binfmt_script.c Wed Oct 10 01:41:38 2001
@@ -12,7 +12,7 @@
X #include <linux/binfmts.h>
X #include <linux/init.h>
X
-static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
+static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
X {
X char *cp, *i_name, *i_name_start, *i_arg;
X struct dentry * dentry;
@@ -90,21 +90,9 @@
X return search_binary_handler(bprm,regs);
X }
X
-static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
-{
- int retval;
- MOD_INC_USE_COUNT;
- retval = do_load_script(bprm,regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
X struct linux_binfmt script_format = {
-#ifndef MODULE
- NULL, 0, load_script, NULL, NULL
-#else
- NULL, &__this_module, load_script, NULL, NULL
-#endif
+ module: THIS_MODULE,
+ load_binary: load_script,
X };
X
X int __init init_script_binfmt(void)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/dcache.c linux/fs/dcache.c
--- v2.2.19/fs/dcache.c Sun Mar 25 17:37:38 2001
+++ linux/fs/dcache.c Wed Oct 10 01:41:39 2001
@@ -702,7 +702,7 @@
X * Note that we have to be a lot more careful about getting the hash
X * switched - we have to switch the hash value properly even if it
X * then no longer matches the actual (corrupted) string of the target.
- * The has value has to match the hash queue that the dentry is on..
+ * The hash value has to match the hash queue that the dentry is on..
X */
X static inline void switch_names(struct dentry * dentry, struct dentry * target)
X {
@@ -829,7 +829,7 @@
X struct dentry *pwd = current->fs->pwd;
X
X error = -ENOENT;
- /* Has the current directory has been unlinked? */
+ /* Has the current directory been unlinked? */
X if (pwd->d_parent == pwd || !list_empty(&pwd->d_hash)) {
X char *page = (char *) __get_free_page(GFP_USER);
X error = -ENOMEM;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/dquot.c linux/fs/dquot.c
--- v2.2.19/fs/dquot.c Sun Mar 25 17:37:38 2001
+++ linux/fs/dquot.c Wed Oct 10 01:41:39 2001
@@ -667,8 +667,6 @@
X {
X int cnt;
X
- if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)))
- return 0;
X if (is_quotafile(inode))
X return 0;
X if (type != -1)
@@ -1082,38 +1080,34 @@
X unsigned int id = 0;
X short cnt;
X
- if (S_ISREG(inode->i_mode) ||
- S_ISDIR(inode->i_mode) ||
- S_ISLNK(inode->i_mode)) {
- /* We don't want to have quotas on quota files - nasty deadlocks possible */
- if (is_quotafile(inode))
- return;
- for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
- if (type != -1 && cnt != type)
+ /* We don't want to have quotas on quota files - nasty deadlocks possible */
+ if (is_quotafile(inode))
+ return;
+ for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
+ if (type != -1 && cnt != type)
+ continue;
+
+ if (!sb_has_quota_enabled(inode->i_sb, cnt))
+ continue;
+
+ if (inode->i_dquot[cnt] == NODQUOT) {
+ switch (cnt) {
+ case USRQUOTA:
+ id = inode->i_uid;
+ break;
+ case GRPQUOTA:
+ id = inode->i_gid;
+ break;
+ }
+ dquot = dqget(inode->i_dev, id, cnt);
+ if (dquot == NODQUOT)
X continue;
-
- if (!sb_has_quota_enabled(inode->i_sb, cnt))
+ if (inode->i_dquot[cnt] != NODQUOT) {
+ dqput(dquot);
X continue;
-
- if (inode->i_dquot[cnt] == NODQUOT) {
- switch (cnt) {
- case USRQUOTA:
- id = inode->i_uid;
- break;
- case GRPQUOTA:
- id = inode->i_gid;
- break;
- }
- dquot = dqget(inode->i_dev, id, cnt);
- if (dquot == NODQUOT)
- continue;
- if (inode->i_dquot[cnt] != NODQUOT) {
- dqput(dquot);
- continue;
- }
- inode->i_dquot[cnt] = dquot;
- inode->i_flags |= S_QUOTA;
- }
+ }
+ inode->i_dquot[cnt] = dquot;
+ inode->i_flags |= S_QUOTA;
X }
X }
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/exec.c linux/fs/exec.c
--- v2.2.19/fs/exec.c Sun Mar 25 17:37:38 2001
+++ linux/fs/exec.c Mon Oct 22 10:59:38 2001
@@ -31,6 +31,8 @@
X #include <linux/fcntl.h>
X #include <linux/smp_lock.h>
X #include <linux/init.h>
+#define __NO_VERSION__
+#include <linux/module.h>
X
X #include <asm/uaccess.h>
X #include <asm/pgtable.h>
@@ -168,30 +170,40 @@
X */
X asmlinkage int sys_uselib(const char * library)
X {
- int fd, retval;
+ int retval;
X struct file * file;
X struct linux_binfmt * fmt;
+ char * tmp = getname(library);
X
X lock_kernel();
- fd = sys_open(library, 0, 0);
- retval = fd;
- if (fd < 0)
+ retval = PTR_ERR(tmp);
+ if (IS_ERR(tmp))
+ goto out;
+
+ file = filp_open(tmp, 0, 0);
+ putname(tmp);
+
+ retval = PTR_ERR(file);
+ if (IS_ERR(file))
X goto out;
- file = fget(fd);
+
+ retval = -EINVAL;
+ if (!S_ISREG(file->f_dentry->d_inode->i_mode))
+ goto out_fput;
+
X retval = -ENOEXEC;
- if (file && file->f_dentry && file->f_op && file->f_op->read) {
+ if (file->f_op && file->f_op->read) {
X for (fmt = formats ; fmt ; fmt = fmt->next) {
- int (*fn)(int) = fmt->load_shlib;
+ int (*fn)(struct file *) = fmt->load_shlib;
X if (!fn)
X continue;
- /* N.B. Should use file instead of fd */
- retval = fn(fd);
+ retval = fn(file);
X if (retval != -ENOEXEC)
X break;
X }
X }
+out_fput:
X fput(file);
- sys_close(fd);
X out:
X unlock_kernel();
X return retval;
@@ -520,6 +532,8 @@
X bprm->dumpable = 0;
X if (current->euid == current->uid && current->egid == current->gid)
X bprm->dumpable = !bprm->priv_change;
+ else
+ current->dumpable = 0;
X name = bprm->filename;
X for (i=0; (ch = *(name++)) != '\0';) {
X if (ch == '/')
@@ -533,8 +547,10 @@
X flush_thread();
X
X if (bprm->e_uid != current->euid || bprm->e_gid != current->egid ||
- permission(bprm->dentry->d_inode, MAY_READ))
+ permission(bprm->dentry->d_inode, MAY_READ)) {
X bprm->dumpable = 0;
+ current->dumpable = 0;
+ }
X
X current->self_exec_id++;
X
@@ -552,12 +568,11 @@
X }
X
X /*
- * We mustn't allow tracing of suid binaries, unless
- * the tracer has the capability to trace anything..
+ * We mustn't allow tracing of suid binaries, no matter what.
X */
X static inline int must_not_trace_exec(struct task_struct * p)
X {
- return (p->flags & PF_PTRACED) && !cap_raised(p->p_pptr->cap_effective, CAP_SYS_PTRACE);
+ return (p->ptrace & PT_PTRACED);
X }
X
X /*
@@ -649,6 +664,7 @@
X
X bprm->priv_change = id_change || cap_raised;
X if (bprm->priv_change) {
+ current->dumpable = 0;
X /* We can't suid-execute if we're sharing parts of the executable */
X /* or if we're being traced (or if suid execs are not allowed) */
X /* (current->mm->count > 1 is ok, as we'll get a new mm anyway) */
@@ -705,8 +721,10 @@
X current->suid = current->euid = current->fsuid = bprm->e_uid;
X current->sgid = current->egid = current->fsgid = bprm->e_gid;
X if (current->euid != current->uid || current->egid != current->gid ||
- !cap_issubset(new_permitted, current->cap_permitted))
- bprm->dumpable = 0;
+ !cap_issubset(new_permitted, current->cap_permitted)) {
+ bprm->dumpable = 0;
+ current->dumpable = 0;
+ }
X
X current->keep_capabilities = 0;
X }
@@ -887,4 +905,67 @@
X current->dumpable = was_dumpable;
X
X return retval;
+}
+
+void set_binfmt(struct linux_binfmt *new)
+{
+ struct linux_binfmt *old = current->binfmt;
+ if (new && new->module)
+ __MOD_INC_USE_COUNT(new->module);
+ current->binfmt = new;
+ if (old && old->module)
+ __MOD_DEC_USE_COUNT(old->module);
+}
+
+int do_coredump(long signr, struct pt_regs * regs)
+{
+ struct linux_binfmt *binfmt;
+ char corename[6+sizeof(current->comm)];
+ struct file * file;
+ struct inode * inode;
+
+ lock_kernel();
+ binfmt = current->binfmt;
+ if (!binfmt || !binfmt->core_dump)
+ goto fail;
+ if (!current->dumpable || atomic_read(&current->mm->count) != 1)
+ goto fail;
+ if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
+ goto fail;
+ current->dumpable = 0;
+
+ memcpy(corename,"core.", 5);
+#if 0
+ memcpy(corename+5,current->comm,sizeof(current->comm));
+#else
+ corename[4] = '\0';
+#endif
+ file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
+ if (IS_ERR(file))
+ goto fail;
+ inode = file->f_dentry->d_inode;
+ if (inode->i_nlink > 1)
+ goto close_fail; /* multiple links - don't dump */
+ if (list_empty(&file->f_dentry->d_hash))
+ goto close_fail;
+
+ if (!S_ISREG(inode->i_mode))
+ goto close_fail;
+ if (!file->f_op)
+ goto close_fail;
+ if (!file->f_op->write)
+ goto close_fail;
+ if (do_truncate(file->f_dentry, 0) != 0)
+ goto close_fail;
+ if (!binfmt->core_dump(signr, regs, file))
+ goto close_fail;
+ filp_close(file, NULL);
+ unlock_kernel();
+ return 1;
+
+close_fail:
+ filp_close(file, NULL);
+fail:
+ unlock_kernel();
+ return 0;
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/lockd/svc4proc.c linux/fs/lockd/svc4proc.c
--- v2.2.19/fs/lockd/svc4proc.c Sun Mar 25 17:37:38 2001
+++ linux/fs/lockd/svc4proc.c Wed Oct 10 01:41:40 2001
@@ -256,6 +256,7 @@
X
X dprintk("lockd: TEST_MSG called\n");
X
+ memset(&res, 0, sizeof(res));
X if ((stat = nlm4svc_proc_test(rqstp, argp, &res)) == 0)
X stat = nlm4svc_callback(rqstp, NLMPROC_TEST_RES, &res);
X return stat;
@@ -439,7 +440,7 @@
X /* Obtain the host pointer for this NFS server and try to
X * reclaim all locks we hold on this server.
X */
- saddr.sin_addr.s_addr = argp->addr;
+ saddr.sin_addr.s_addr = htonl(argp->addr);
X if ((host = nlmclnt_lookup_host(&saddr, prot, vers)) != NULL) {
X nlmclnt_recovery(host, argp->state);
X nlm_release_host(host);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/lockd/svcproc.c linux/fs/lockd/svcproc.c
--- v2.2.19/fs/lockd/svcproc.c Sun Mar 25 17:37:38 2001
+++ linux/fs/lockd/svcproc.c Wed Oct 10 01:41:40 2001
@@ -265,6 +265,7 @@
X
X dprintk("lockd: TEST_MSG called\n");
X
+ memset(&res, 0, sizeof(res));
X if ((stat = nlmsvc_proc_test(rqstp, argp, &res)) == 0)
X stat = nlmsvc_callback(rqstp, NLMPROC_TEST_RES, &res);
X return stat;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/locks.c linux/fs/locks.c
--- v2.2.19/fs/locks.c Sun Mar 25 17:37:38 2001
+++ linux/fs/locks.c Wed Oct 10 01:41:40 2001
@@ -734,6 +734,7 @@
X fl->fl_end = OFFSET_MAX;
X fl->fl_file = filp;
X fl->fl_owner = NULL;
+ fl->fl_pid = current->pid;
X
X return (1);
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/namei.c linux/fs/namei.c
--- v2.2.19/fs/namei.c Sun Mar 25 17:30:58 2001
+++ linux/fs/namei.c Mon Oct 22 10:30:50 2001
@@ -277,6 +277,15 @@
X result->d_op->d_revalidate(result, flags);
X return result;
X }
+/*
+ * Yes, this really increments the link_count by 5, and
+ * decrements it by 4. Together with checking against 25,
+ * this limits recursive symlink follows to 5, while
+ * limiting consecutive symlinks to 25.
+ *
+ * Without that kind of total limit, nasty chains of consecutive
+ * symlinks can cause almost arbitrarily long lookups.
+ */
X
X static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry, unsigned int follow)
X {
@@ -284,13 +293,17 @@
X
X if ((follow & LOOKUP_FOLLOW)
X && inode && inode->i_op && inode->i_op->follow_link) {
- if (current->link_count < 5) {
+ if (current->link_count < 25) {
X struct dentry * result;
X
- current->link_count++;
+ if (current->need_resched) {
+ current->state = TASK_RUNNING;
+ schedule();
+ }
+ current->link_count += 5;
X /* This eats the base */
- result = inode->i_op->follow_link(dentry, base, follow);
- current->link_count--;
+ result = inode->i_op->follow_link(dentry, base, follow|LOOKUP_INSYMLINK);
+ current->link_count -= 4;
X dput(dentry);
X return result;
X }
@@ -324,6 +337,8 @@
X struct dentry * dentry;
X struct inode *inode;
X
+ if (!(lookup_flags & LOOKUP_INSYMLINK))
+ current->link_count=0;
X if (*name == '/') {
X if (base)
X dput(base);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/nfs/dir.c linux/fs/nfs/dir.c
--- v2.2.19/fs/nfs/dir.c Sun Mar 25 17:37:38 2001
+++ linux/fs/nfs/dir.c Wed Oct 10 01:41:41 2001
@@ -341,8 +341,8 @@
X struct rpc_cred *cred = nfs_file_cred(file);
X struct page *page = NULL;
X unsigned long cache_page;
- u32 *p;
- int status = -EIO;
+ u32 *start, *p;


+ int status = 0;

X
X dfprintk(VFS, "NFS: uncached_readdir() searching for cookie %Lu\n", (long long)desc->target);
X if (desc->page) {
@@ -356,21 +356,22 @@
X goto out;
X }
X page = page_cache_entry(cache_page);
- p = (u32 *)page_address(page);
- status = NFS_PROTO(inode)->readdir(inode, cred, desc->target, p,
- NFS_SERVER(inode)->dtsize, 0);
- if (status >= 0) {
- p = desc->decode(p, desc->entry, 0);
+ start = (u32 *)page_address(page);
+ desc->error = NFS_PROTO(inode)->readdir(inode, cred, desc->target,
+ start, NFS_SERVER(inode)->dtsize, 0);
+ if (desc->error >= 0) {
+ p = desc->decode(start, desc->entry, 0);
X if (IS_ERR(p))
X status = PTR_ERR(p);
X else
X desc->entry->prev_cookie = desc->target;
- }
+ } else
+ status = -EIO;
X if (status < 0)
X goto out_release;
X
X desc->page_index = 0;
- desc->page_offset = 0;
+ desc->page_offset = (char *)p - (char *)start;
X desc->page = page;
X status = nfs_do_filldir(desc, dirent, filldir);
X
@@ -421,16 +422,15 @@
X res = readdir_search_pagecache(desc);
X if (res == -EBADCOOKIE) {
X /* This means either end of directory */
- if (desc->entry->cookie == desc->target) {
- res = 0;
- break;
+ if (desc->entry->cookie != desc->target) {
+ /* Or that the server has 'lost' a cookie */
+ res = uncached_readdir(desc, dirent, filldir);
+ if (res >= 0)
+ continue;
X }
- /* Or that the server has 'lost' a cookie */
- res = uncached_readdir(desc, dirent, filldir);
- if (res >= 0)
- continue;
- }
- if (res < 0)
+ res = 0;
+ break;
+ } else if (res < 0)
X break;
X
X res = nfs_do_filldir(desc, dirent, filldir);
@@ -454,6 +454,9 @@
X */
X static loff_t nfs_dir_llseek(struct file *file, loff_t offset, int origin)
X {
+ /* Glibc 2.0 backwards compatibility crap... */
+ if (origin == 1 && offset == 0)
+ return file->f_pos;
X /* We disallow SEEK_CUR and SEEK_END */
X if (origin != 0)
X return -EINVAL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/nfs/inode.c linux/fs/nfs/inode.c
--- v2.2.19/fs/nfs/inode.c Sun Mar 25 17:37:38 2001
+++ linux/fs/nfs/inode.c Wed Oct 10 01:41:41 2001
@@ -115,6 +115,8 @@
X inode->i_mode = 0;
X inode->i_rdev = 0;
X inode->i_op = NULL;
+ /* We can't support UPDATE_ATIME(), since the server will reset it */
+ inode->i_flags |= MS_NOATIME;
X NFS_FILEID(inode) = 0;
X NFS_FSID(inode) = 0;
X INIT_LIST_HEAD(&inode->u.nfs_i.read);
@@ -435,6 +437,7 @@
X goto failure_put_root;
X
X sb->s_root->d_op = &nfs_dentry_operations;
+ sb->s_root->d_time = jiffies;
X
X /* Get some general file system info */
X if (server->rpc_ops->statfs(server, &fh, &fsinfo) >= 0) {
@@ -642,7 +645,6 @@
X inode->i_ctime = nfs_time_to_secs(fattr->ctime);
X NFS_CACHE_CTIME(inode) = fattr->ctime;
X NFS_CACHE_MTIME(inode) = fattr->mtime;
- NFS_CACHE_ATIME(inode) = fattr->atime;
X NFS_CACHE_ISIZE(inode) = fattr->size;
X NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode);
X NFS_ATTRTIMEO_UPDATE(inode) = jiffies;
@@ -796,21 +798,6 @@
X return error;
X }
X
-int
-nfs_update_atime(struct dentry *dentry)
-{
- struct iattr attr;
- struct inode *inode = dentry->d_inode;
-
- nfs_revalidate(dentry);
- if (!inode || time_before(inode->i_atime,nfs_time_to_secs(NFS_CACHE_ATIME(inode))))
- return 0;
-
- attr.ia_valid = ATTR_ATIME|ATTR_ATIME_SET;
- attr.ia_atime = inode->i_atime;
- return nfs_notify_change(dentry, &attr);
-}
-
X /*
X * Wait for the inode to get unlocked.
X * (Used for NFS_INO_LOCKED and NFS_INO_REVALIDATING).
@@ -1025,12 +1012,8 @@
X
X NFS_CACHE_CTIME(inode) = fattr->ctime;
X inode->i_ctime = nfs_time_to_secs(fattr->ctime);
- /* If we've been messing around with atime, don't
- * update it. Save the server value in NFS_CACHE_ATIME.
- */
- NFS_CACHE_ATIME(inode) = fattr->atime;
- if (time_before(inode->i_atime, nfs_time_to_secs(fattr->atime)))
- inode->i_atime = nfs_time_to_secs(fattr->atime);
+
+ inode->i_atime = nfs_time_to_secs(fattr->atime);
X
X NFS_CACHE_MTIME(inode) = new_mtime;
X inode->i_mtime = nfs_time_to_secs(new_mtime);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/nfs/symlink.c linux/fs/nfs/symlink.c
--- v2.2.19/fs/nfs/symlink.c Sun Mar 25 17:37:38 2001
+++ linux/fs/nfs/symlink.c Wed Oct 10 01:41:41 2001
@@ -32,26 +32,9 @@
X * symlinks can't do much...
X */
X struct inode_operations nfs_symlink_inode_operations = {
- NULL, /* no file-operations */
- NULL, /* create */
- NULL, /* lookup */
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
- nfs_readlink, /* readlink */
- nfs_follow_link, /* follow_link */
- NULL, /* get_block */
- NULL, /* readpage */
- NULL, /* writepage */
- NULL, /* flushpage */
- NULL, /* truncate */
- NULL, /* permission */
- NULL, /* smap */
- NULL /* revalidate */
+ readlink: nfs_readlink,
+ follow_link: nfs_follow_link,
+ revalidate: nfs_revalidate,
X };
X
X /* Symlink caching in the page cache is even more simplistic
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/nfsd/nfssvc.c linux/fs/nfsd/nfssvc.c
--- v2.2.19/fs/nfsd/nfssvc.c Sun Mar 25 17:30:59 2001
+++ linux/fs/nfsd/nfssvc.c Wed Oct 10 01:41:41 2001
@@ -6,6 +6,11 @@
X * Authors: Olaf Kirch (ok...@monad.swb.de)
X *
X * Copyright (C) 1995-1999 Olaf Kirch <ok...@monad.swb.de>
+ *
+ * Apr 24, 2001: Added semaphores around nfsd_cache calls
+ * to protect it since it can yeild the processor
+ * in its kmalloc call.
+ * Craig I. Hagan <ha...@cih.com>
X */
X
X #define __NO_VERSION__
@@ -44,6 +49,8 @@
X struct timeval nfssvc_boot = { 0, 0 };
X static atomic_t nfsd_active = ATOMIC_INIT(0);
X
+static struct semaphore nfsd_cache_sem = MUTEX;
+
X /*
X * Maximum number of nfsd processes
X */
@@ -81,8 +88,9 @@
X if (error < 0)
X goto failure;
X #endif
-
+ down(&nfsd_cache_sem);
X nfsd_racache_init(); /* Readahead param cache */
+ up(&nfsd_cache_sem);
X
X while (nrservs--) {
X error = svc_create_thread(nfsd, serv);
@@ -146,7 +154,6 @@
X if (err < 0)
X break;
X
-
X /* Lock the export hash tables for reading. */
X exp_readlock();
X
@@ -160,6 +167,7 @@
X recalc_sigpending(current);
X spin_unlock_irq(&current->sigmask_lock);
X
+
X svc_process(serv, rqstp);
X
X /* Unlock export hash tables */
@@ -180,8 +188,10 @@
X
X /* Count active threads */
X if (atomic_dec_and_test(&nfsd_active)) {
+ down(&nfsd_cache_sem);
X nfsd_export_shutdown(); /* revoke all exports */
X nfsd_racache_shutdown(); /* release read-ahead cache */
+ up(&nfsd_cache_sem);
X }
X
X /* Release lockd */
@@ -200,13 +210,19 @@
X struct svc_procedure *proc;
X kxdrproc_t xdr;
X u32 nfserr;
+ int res_lookup;
X
X dprintk("nfsd_dispatch: vers %d proc %d\n",
X rqstp->rq_vers, rqstp->rq_proc);
X proc = rqstp->rq_procinfo;
X
X /* Check whether we have this call in the cache. */
- switch (nfsd_cache_lookup(rqstp, proc->pc_cachetype)) {
+
+ down(&nfsd_cache_sem);
+ res_lookup = nfsd_cache_lookup(rqstp, proc->pc_cachetype);
+ up(&nfsd_cache_sem);
+
+ switch (res_lookup) {
X case RC_INTR:
X case RC_DROPIT:
X return 0;
@@ -220,7 +236,9 @@
X xdr = proc->pc_decode;
X if (xdr && !xdr(rqstp, rqstp->rq_argbuf.buf, rqstp->rq_argp)) {
X dprintk("nfsd: failed to decode arguments!\n");
+ down(&nfsd_cache_sem);
X nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
+ up(&nfsd_cache_sem);
X *statp = rpc_garbage_args;
X return 1;
X }
@@ -239,7 +257,9 @@
X if (xdr && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) {
X /* Failed to encode result. Release cache entry */
X dprintk("nfsd: failed to encode result!\n");
+ down(&nfsd_cache_sem);
X nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
+ up(&nfsd_cache_sem);
X *statp = rpc_system_err;
X return 1;
X }
@@ -250,14 +270,18 @@
X && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) {
X /* Failed to encode result. Release cache entry */
X dprintk("nfsd: failed to encode result!\n");
+ down(&nfsd_cache_sem);
X nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
+ up(&nfsd_cache_sem);
X *statp = rpc_system_err;
X return 1;
X }
X #endif /* CONFIG_NFSD_V3 */
X
X /* Store reply in cache. */
+ down(&nfsd_cache_sem);
X nfsd_cache_update(rqstp, proc->pc_cachetype, statp + 1);
+ up(&nfsd_cache_sem);
X return 1;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/nls/nls_koi8-r.c linux/fs/nls/nls_koi8-r.c
--- v2.2.19/fs/nls/nls_koi8-r.c Sun Mar 25 17:31:00 2001
+++ linux/fs/nls/nls_koi8-r.c Wed Oct 10 01:41:42 2001
@@ -5,6 +5,7 @@
X * Generated automatically from the Unicode and charset
X * tables from the Unicode Organization (www.unicode.org).
X * The Unicode to charset table has only exact mappings.
+ * Patched to include KOI8-U and KOI8-RU support
X */
X
X #include <linux/module.h>
@@ -66,14 +67,14 @@
X {0xb0, 0x00}, {0xb2, 0x00}, {0xb7, 0x00}, {0xf7, 0x00},
X /* 0xa0*/
X {0x50, 0x25}, {0x51, 0x25}, {0x52, 0x25}, {0x51, 0x04},
- {0x53, 0x25}, {0x54, 0x25}, {0x55, 0x25}, {0x56, 0x25},
+ {0x54, 0x04}, {0x54, 0x25}, {0x56, 0x04}, {0x57, 0x04},
X {0x57, 0x25}, {0x58, 0x25}, {0x59, 0x25}, {0x5a, 0x25},
- {0x5b, 0x25}, {0x5c, 0x25}, {0x5d, 0x25}, {0x5e, 0x25},
+ {0x5b, 0x25}, {0x91, 0x04}, {0x5e, 0x04}, {0x5e, 0x25},
X /* 0xb0*/
X {0x5f, 0x25}, {0x60, 0x25}, {0x61, 0x25}, {0x01, 0x04},
- {0x62, 0x25}, {0x63, 0x25}, {0x64, 0x25}, {0x65, 0x25},
+ {0x04, 0x04}, {0x63, 0x25}, {0x06, 0x04}, {0x07, 0x04},
X {0x66, 0x25}, {0x67, 0x25}, {0x68, 0x25}, {0x69, 0x25},
- {0x6a, 0x25}, {0x6b, 0x25}, {0x6c, 0x25}, {0xa9, 0x00},
+ {0x6a, 0x25}, {0x90, 0x04}, {0x0e, 0x04}, {0xa9, 0x00},
X /* 0xc0*/
X {0x4e, 0x04}, {0x30, 0x04}, {0x31, 0x04}, {0x46, 0x04},
X {0x34, 0x04}, {0x35, 0x04}, {0x44, 0x04}, {0x33, 0x04},
@@ -133,8 +134,8 @@
X };
X
X static unsigned char page04[256] = {
- 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+ 0x00, 0xb3, 0x00, 0x00, 0xb4, 0x00, 0xb6, 0xb7, /* 0x00-0x07 */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, /* 0x08-0x0f */
X 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, /* 0x10-0x17 */
X 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, /* 0x18-0x1f */
X 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, /* 0x20-0x27 */
@@ -143,8 +144,8 @@
X 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, /* 0x38-0x3f */
X 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */
X 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */
- 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+ 0x00, 0xa3, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0x50-0x57 */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x58-0x5f */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
@@ -152,7 +153,7 @@
X
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+ 0xbd, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
@@ -306,8 +307,8 @@
X 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */
X 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */
X 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x98-0x9f */
- 0xa0, 0xa1, 0xa2, 0x00, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
- 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
+ 0xa0, 0xa1, 0xa2, 0x00, 0xb4, 0xa5, 0xb6, 0xb7, /* 0xa0-0xa7 */
+ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xbd, 0xbe, 0xaf, /* 0xa8-0xaf */
X 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
X 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/ntfs/fs.c linux/fs/ntfs/fs.c
--- v2.2.19/fs/ntfs/fs.c Sun Mar 25 17:31:02 2001
+++ linux/fs/ntfs/fs.c Wed Oct 10 01:41:42 2001
@@ -29,6 +29,7 @@
X #include <linux/nls.h>
X #include <linux/locks.h>
X #include <linux/init.h>
+#include <asm/page.h>


X
X /* Forward declarations */

X static struct inode_operations ntfs_dir_inode_operations;
@@ -941,6 +942,13 @@
X brelse(bh);
X NTFS_SB(vol)=sb;
X ntfs_debug(DEBUG_OTHER, "Done to init volume\n");
+
+ /* Check the cluster size is within allowed blocksize limits. */
+ if (vol->clustersize > PAGE_SIZE) {
+ ntfs_error("Partition cluster size is not supported yet (it "
+ "is > max kernel blocksize).\n");
+ goto ntfs_read_super_unl;
+ }
X
X /* Inform the kernel that a device block is a NTFS cluster */
X sb->s_blocksize=vol->clustersize;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/ntfs/support.c linux/fs/ntfs/support.c
--- v2.2.19/fs/ntfs/support.c Sun Mar 25 17:31:02 2001
+++ linux/fs/ntfs/support.c Wed Oct 10 01:41:42 2001
@@ -102,7 +102,7 @@
X memmove(dest, src, n);


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 80'
echo 'File patch-2.2.20 is continued in part 81'
echo "81" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:17 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part78

#!/bin/sh -x
# this is part 78 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 78; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

-{ 0x8675, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0x9d, 0x31, 0x00, 0x07, 0x08, 0x00, 0x85, 0x55} },
-{ 0x8685, 16, {0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
-{ 0x8695, 16, {0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0x9c, 0x58, 0x8f, 0x59, 0x8e, 0x58, 0x8d} },
-{ 0x86a5, 16, {0x57, 0x8c, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0x9c, 0x58, 0xaf, 0x03} },
-{ 0x86b5, 16, {0x8f, 0x5a, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x86c5, 16, {0x78, 0x00, 0x12, 0x9c, 0x58, 0x8f, 0x59, 0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56, 0xe5, 0x5a, 0xc3} },
-{ 0x86d5, 16, {0x94, 0x05, 0x40, 0x15, 0xe5, 0x59, 0x24, 0x01, 0xf5, 0x59, 0xe4, 0x35, 0x58, 0xf5, 0x58, 0xe4} },
-{ 0x86e5, 16, {0x35, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3} },
-{ 0x86f5, 16, {0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
-{ 0x8705, 16, {0x5d, 0x82, 0x85, 0x5c, 0x83, 0xe5, 0x59, 0xf0, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56} },
-{ 0x8715, 16, {0x78, 0x08, 0x12, 0x9c, 0xfb, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xef, 0xf0, 0x85, 0x5d} },
-{ 0x8725, 16, {0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5, 0x5a, 0xe5, 0x55} },
-{ 0x8735, 16, {0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62, 0x05, 0x43, 0x5a} },
-{ 0x8745, 16, {0x0a, 0x80, 0x10, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5a, 0x08, 0x80, 0x07, 0xef, 0xb4, 0x74, 0x03} },
-{ 0x8755, 16, {0x43, 0x5a, 0x02, 0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff} },
-{ 0x8765, 16, {0x30, 0xe3, 0x03, 0x43, 0x5a, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5a, 0x40, 0xe5, 0x5d, 0x24} },
-{ 0x8775, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x55, 0x24, 0x0b} },
-{ 0x8785, 16, {0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x23, 0xaf} },
-{ 0x8795, 16, {0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x5d} },
-{ 0x87a5, 16, {0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0xe4, 0xf5, 0x5a} },
-{ 0x87b5, 16, {0x80, 0x10, 0xaf, 0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4} },
-{ 0x87c5, 16, {0x52, 0x3b, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x5d} },
-{ 0x87d5, 16, {0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5} },
-{ 0x87e5, 16, {0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
-{ 0x87f5, 16, {0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83} },
-{ 0x8805, 16, {0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5} },
-{ 0x8815, 16, {0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x06} },
-{ 0x8825, 16, {0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4} },
-{ 0x8835, 16, {0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5} },
-{ 0x8845, 16, {0x83, 0xef, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x5d} },
-{ 0x8855, 16, {0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xf0, 0xaf, 0x5b, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0x75, 0x5a} },
-{ 0x8865, 16, {0x08, 0xe5, 0x55, 0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43} },
-{ 0x8875, 16, {0x5a, 0x10, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x54, 0x03} },
-{ 0x8885, 16, {0x45, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x14} },
-{ 0x8895, 16, {0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xe5, 0x55, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5} },
-{ 0x88a5, 16, {0x83, 0xe0, 0x24, 0xfb, 0x4f, 0xf5, 0x5a, 0xe5, 0x55, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x54} },
-{ 0x88b5, 16, {0xf5, 0x83, 0xe0, 0x24, 0xd0, 0x60, 0x15, 0x14, 0x60, 0x17, 0x24, 0xc2, 0x60, 0x09, 0x24, 0x0a} },
-{ 0x88c5, 16, {0x70, 0x12, 0x43, 0x5a, 0x18, 0x80, 0x0d, 0x43, 0x5a, 0x08, 0x80, 0x08, 0x43, 0x5a, 0x38, 0x80} },
-{ 0x88d5, 16, {0x03, 0x43, 0x5a, 0x28, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5a, 0xf0} },
-{ 0x88e5, 9, {0xaf, 0x5b, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x7f, 0x00} },
-{ 0x88ee, 1, {0x22} },
-{ 0x88ef, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4} },
-{ 0x88ff, 16, {0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01, 0x2c, 0x74, 0x08, 0xf0, 0xef, 0x04, 0xa3, 0xf0, 0xe4} },
-{ 0x890f, 16, {0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5} },
-{ 0x891f, 16, {0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82} },
-{ 0x892f, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2c, 0x2f, 0xf8} },
-{ 0x893f, 16, {0xe6, 0xa3, 0xf0, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x54} },
-{ 0x894f, 16, {0x7f, 0x02, 0x12, 0x81, 0x11, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x54, 0x5f} },
-{ 0x895f, 16, {0x90, 0x01, 0x32, 0xf0, 0x7e, 0x01, 0x7f, 0x2c, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e} },
-{ 0x896f, 11, {0x00, 0x75, 0x5d, 0x00, 0x7d, 0x07, 0x12, 0x8e, 0x0c, 0x7f, 0x00} },
-{ 0x897a, 1, {0x22} },
-{ 0x897b, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x898b, 16, {0xaf, 0x82, 0xfe, 0x90, 0x01, 0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24} },
-{ 0x899b, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f} },
-{ 0x89ab, 16, {0x33, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e, 0x00, 0x75, 0x5d, 0x00, 0x7d, 0x02, 0x12} },
-{ 0x89bb, 4, {0x8e, 0x0c, 0x7f, 0x00} },
-{ 0x89bf, 1, {0x22} },
-{ 0x89c0, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x89d0, 16, {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} },
-{ 0x89e0, 16, {0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} },
-{ 0x89f0, 11, {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} },
-{ 0x89fb, 1, {0x22} },
-{ 0x89fc, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x8a0c, 16, {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} },
-{ 0x8a1c, 16, {0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} },
-{ 0x8a2c, 11, {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x00} },
-{ 0x8a37, 1, {0x22} },
-{ 0x8a38, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x8a48, 16, {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3} },
-{ 0x8a58, 16, {0xe0, 0x44, 0x40, 0xf0, 0x80, 0x0f, 0xae, 0x04, 0xaf, 0x05, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3} },
-{ 0x8a68, 7, {0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
-{ 0x8a6f, 1, {0x22} },
-{ 0x8a70, 4, {0x8e, 0x54, 0x8f, 0x55} },
-{ 0x8a74, 16, {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x58, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x24, 0xfe, 0x60} },
-{ 0x8a84, 16, {0x16, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75} },
-{ 0x8a94, 16, {0x56, 0x7e, 0x75, 0x57, 0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x56, 0x7e, 0x75, 0x57} },
-{ 0x8aa4, 16, {0x00, 0x80, 0x16, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x56, 0x7d, 0x75, 0x57, 0x80, 0x80, 0x0a, 0x7e} },
-{ 0x8ab4, 16, {0x7d, 0x7f, 0x00, 0x75, 0x56, 0x7d, 0x75, 0x57, 0x00, 0xe5, 0x58, 0x70, 0x20, 0x85, 0x57, 0x82} },
-{ 0x8ac4, 16, {0x85, 0x56, 0x83, 0x74, 0xff, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x25, 0xe0, 0x24} },
-{ 0x8ad4, 16, {0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x4d, 0xe5, 0x55, 0x24} },
-{ 0x8ae4, 16, {0x02, 0xff, 0xe4, 0x35, 0x54, 0xfe, 0xe5, 0x58, 0x60, 0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} },
-{ 0x8af4, 16, {0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x57, 0xe5, 0x57, 0xaa, 0x56, 0x70, 0x02} },
-{ 0x8b04, 16, {0x05, 0x56, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x15, 0x58, 0x80, 0xd9, 0x85, 0x55, 0x82} },
-{ 0x8b14, 16, {0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x25, 0xe0, 0x24} },
-{ 0x8b24, 12, {0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
-{ 0x8b30, 1, {0x22} },
-{ 0x8b31, 16, {0xef, 0x24, 0x05, 0xf5, 0x55, 0xe4, 0x3e, 0xf5, 0x54, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
-{ 0x8b41, 16, {0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} },
-{ 0x8b51, 16, {0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x56, 0xf5, 0x57, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
-{ 0x8b61, 16, {0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0x12} },
-{ 0x8b71, 16, {0x24, 0x14, 0x60, 0x03, 0x02, 0x8c, 0x5e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe} },
-{ 0x8b81, 16, {0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x59, 0x74, 0x01, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59} },
-{ 0x8b91, 16, {0x94, 0x40, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5} },
-{ 0x8ba1, 16, {0x57, 0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x50, 0x03, 0x02, 0x8c, 0x61, 0xae, 0x58, 0xaf, 0x59} },
-{ 0x8bb1, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
-{ 0x8bc1, 16, {0x56, 0xf5, 0x57, 0x02, 0x8c, 0x61, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
-{ 0x8bd1, 16, {0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59, 0x94} },
-{ 0x8be1, 16, {0x10, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x10, 0xd3, 0xe5, 0x57} },
-{ 0x8bf1, 16, {0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x40, 0x68, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85} },
-{ 0x8c01, 16, {0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x80} },
-{ 0x8c11, 16, {0x4f, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
-{ 0x8c21, 16, {0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0x45, 0x59, 0x60, 0x0b, 0xd3, 0xe5, 0x59, 0x94, 0x40, 0xe5} },
-{ 0x8c31, 16, {0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5, 0x57, 0x95, 0x59} },
-{ 0x8c41, 16, {0xe5, 0x56, 0x95, 0x58, 0x40, 0x17, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
-{ 0x8c51, 16, {0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x7f, 0x01, 0x22} },
-{ 0x8c61, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8d, 0x21, 0x24, 0xf9} },
-{ 0x8c71, 16, {0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8d, 0x71, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8d, 0xb5} },
-{ 0x8c81, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} },
-{ 0x8c91, 16, {0x94, 0x00, 0x40, 0x03, 0x02, 0x8d, 0xb5, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57} },
-{ 0x8ca1, 16, {0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02, 0x8d, 0xb5, 0x90, 0x01, 0x75, 0xe0} },
-{ 0x8cb1, 16, {0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b} },
-{ 0x8cc1, 16, {0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
-{ 0x8cd1, 16, {0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8d} },
-{ 0x8ce1, 16, {0xb5, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8d, 0xb5, 0x90, 0x01, 0x76} },
-{ 0x8cf1, 16, {0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02} },
-{ 0x8d01, 16, {0x8d, 0xb5, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
-{ 0x8d11, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} },
-{ 0x8d21, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} },
-{ 0x8d31, 16, {0x94, 0x00, 0x50, 0x03, 0x02, 0x8d, 0xb5, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} },
-{ 0x8d41, 16, {0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e} },
-{ 0x8d51, 16, {0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
-{ 0x8d61, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} },
-{ 0x8d71, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78, 0xcf, 0xf0} },
-{ 0x8d81, 16, {0xa3, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x60, 0x24} },
-{ 0x8d91, 16, {0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} },
-{ 0x8da1, 16, {0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
-{ 0x8db1, 16, {0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3} },
-{ 0x8dc1, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e, 0x00, 0x75} },
-{ 0x8dd1, 7, {0x5d, 0x00, 0x12, 0x8e, 0x0c, 0x7f, 0x00} },
-{ 0x8dd8, 1, {0x22} },
-{ 0x8dd9, 16, {0x8e, 0x61, 0x8f, 0x62, 0x8c, 0x63, 0x8d, 0x64, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x62} },
-{ 0x8de9, 16, {0xe5, 0x62, 0xae, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
-{ 0x8df9, 16, {0x64, 0xe5, 0x64, 0xac, 0x63, 0x70, 0x02, 0x05, 0x63, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
-{ 0x8e09, 3, {0x80, 0xd6, 0x22} },
-{ 0x8e0c, 16, {0x8d, 0x5c, 0xab, 0x07, 0xaa, 0x06, 0xaf, 0x60, 0xae, 0x5f, 0xad, 0x5e, 0xac, 0x5d, 0xec, 0x4d} },
-{ 0x8e1c, 16, {0x4e, 0x4f, 0x60, 0x1c, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x1c, 0x7f, 0xff, 0x7e, 0xff, 0x7d} },
-{ 0x8e2c, 16, {0xff, 0x7c, 0xff, 0x78, 0x5d, 0x12, 0x9d, 0x0e, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0x09, 0x80, 0xe4} },
-{ 0x8e3c, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0xf9, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16, 0xaf, 0x03} },
-{ 0x8e4c, 16, {0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5c, 0x12, 0x8d, 0xd9, 0x90, 0x7f, 0xc3, 0xe5, 0x5c} },
-{ 0x8e5c, 7, {0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00, 0x22} },
-{ 0x8e63, 16, {0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f} },
-{ 0x8e73, 16, {0x90, 0x01, 0x85, 0xf0, 0x90, 0x11, 0xfd, 0xe4, 0x93, 0x90, 0x01, 0x86, 0xf0, 0x90, 0x11, 0xfe} },
-{ 0x8e83, 16, {0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
-{ 0x8e93, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e} },
-{ 0x8ea3, 16, {0x01, 0x7f, 0x7c, 0x12, 0x19, 0xc1, 0x7e, 0x01, 0x7f, 0x84, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00} },
-{ 0x8eb3, 13, {0x75, 0x5e, 0x00, 0x75, 0x5d, 0x00, 0x7d, 0x14, 0x12, 0x8e, 0x0c, 0x7f, 0x00} },
-{ 0x8ec0, 1, {0x22} },
-{ 0x8ec1, 4, {0x8e, 0x4b, 0x8f, 0x4c} },
-{ 0x8ec5, 16, {0x85, 0x4b, 0x4e, 0x85, 0x4c, 0x4f, 0xe5, 0x4f, 0x24, 0x01, 0xf5, 0x53, 0xe4, 0x35, 0x4e, 0xf5} },
-{ 0x8ed5, 16, {0x52, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0x14, 0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x8f} },
-{ 0x8ee5, 16, {0xd6, 0x90, 0x8e, 0xed, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8f, 0x1a, 0x02, 0x8f, 0x26, 0x02, 0x8f} },
-{ 0x8ef5, 16, {0x32, 0x02, 0x8f, 0x5c, 0x02, 0x8f, 0x67, 0x02, 0x8f, 0x72, 0x02, 0x8f, 0x7d, 0x02, 0x8f, 0x88} },
-{ 0x8f05, 16, {0x02, 0x8f, 0x93, 0x02, 0x8f, 0x9e, 0x02, 0x8f, 0xa9, 0x02, 0x8f, 0xb0, 0x02, 0x8f, 0xd6, 0x02} },
-{ 0x8f15, 16, {0x8f, 0xbb, 0x02, 0x8f, 0xc6, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x83, 0x5f, 0x8f, 0x4d, 0x02, 0x8f} },
-{ 0x8f25, 16, {0xd6, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x84, 0x33, 0x8f, 0x4d, 0x02, 0x8f, 0xd6, 0x85, 0x52, 0x50} },
-{ 0x8f35, 16, {0x85, 0x53, 0x51, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xfe, 0x12, 0x85, 0x08, 0xaf} },
-{ 0x8f45, 16, {0x51, 0xae, 0x50, 0x12, 0x85, 0x9b, 0xef, 0x70, 0x03, 0x02, 0x8f, 0xd6, 0xaf, 0x51, 0xae, 0x50} },
-{ 0x8f55, 16, {0x12, 0x85, 0xe1, 0x8f, 0x4d, 0x80, 0x7a, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xc0, 0x8f, 0x4d} },
-{ 0x8f65, 16, {0x80, 0x6f, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xfc, 0x8f, 0x4d, 0x80, 0x64, 0xaf, 0x53, 0xae} },
-{ 0x8f75, 16, {0x52, 0x12, 0x8a, 0x38, 0x8f, 0x4d, 0x80, 0x59, 0xaf, 0x4c, 0xae, 0x4b, 0x12, 0x8b, 0x31, 0x8f} },
-{ 0x8f85, 16, {0x4d, 0x80, 0x4e, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x88, 0xef, 0x8f, 0x4d, 0x80, 0x43, 0xaf, 0x53} },
-{ 0x8f95, 16, {0xae, 0x52, 0x12, 0x84, 0xc4, 0x8f, 0x4d, 0x80, 0x38, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0x7b} },
-{ 0x8fa5, 16, {0x8f, 0x4d, 0x80, 0x2d, 0x12, 0x8e, 0x63, 0x8f, 0x4d, 0x80, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12} },
-{ 0x8fb5, 16, {0x11, 0xe5, 0x8f, 0x4d, 0x80, 0x1b, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0x70, 0x8f, 0x4d, 0x80} },
-{ 0x8fc5, 16, {0x10, 0xaf, 0x4c, 0xae, 0x4b, 0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x8d, 0xd9, 0xe4, 0xf5} },
-{ 0x8fd5, 16, {0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24, 0xfe} },
-{ 0x8fe5, 16, {0x70, 0x2b, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
-{ 0x8ff5, 16, {0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00} },
-{ 0x9005, 15, {0x75, 0x5e, 0x00, 0x75, 0x5d, 0x00, 0x7d, 0x03, 0x12, 0x8e, 0x0c, 0x8f, 0x4d, 0xaf, 0x4d} },
-{ 0x9014, 1, {0x22} },
-{ 0x9015, 8, {0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b} },
-{ 0x901d, 16, {0x75, 0x55, 0x01, 0x75, 0x56, 0x9c, 0xe4, 0xf5, 0x54, 0xaf, 0x50, 0x15, 0x50, 0xef, 0x70, 0x03} },
-{ 0x902d, 16, {0x02, 0x90, 0xb3, 0xaf, 0x4f, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x4e} },
-{ 0x903d, 16, {0xae, 0x4d, 0xad, 0x4c, 0xac, 0x4b, 0x12, 0x9c, 0x58, 0xaf, 0x03, 0x8f, 0x53, 0xaf, 0x4e, 0xae} },
-{ 0x904d, 16, {0x4d, 0xad, 0x4c, 0xac, 0x4b, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x4f, 0xe4} },
-{ 0x905d, 16, {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
-{ 0x906d, 16, {0x12, 0x9c, 0x58, 0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b, 0xe5, 0x53, 0x24, 0x30, 0xf5} },
-{ 0x907d, 16, {0x53, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x53, 0xf5, 0x53, 0x05, 0x56, 0xe5, 0x56} },
-{ 0x908d, 16, {0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x56, 0xe5} },
-{ 0x909d, 16, {0x56, 0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x53, 0xf0, 0x05} },
-{ 0x90ad, 16, {0x54, 0x05, 0x54, 0x02, 0x90, 0x26, 0xe5, 0x56, 0x15, 0x56, 0x70, 0x02, 0x15, 0x55, 0xaf, 0x54} },
-{ 0x90bd, 16, {0x15, 0x54, 0xef, 0x60, 0x23, 0xe5, 0x56, 0x15, 0x56, 0xae, 0x55, 0x70, 0x02, 0x15, 0x55, 0xf5} },
-{ 0x90cd, 16, {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x52, 0xe5, 0x52, 0xac, 0x51, 0x70, 0x02, 0x05, 0x51, 0x14} },
-{ 0x90dd, 8, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },


-{ 0x90e5, 1, {0x22} },

-{ 0x90e6, 16, {0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
-{ 0x90f6, 10, {0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
-{ 0x9100, 16, {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
-{ 0x9110, 16, {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
-{ 0x9120, 16, {0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
-{ 0x9130, 16, {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
-{ 0x9140, 16, {0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9b, 0xb8, 0xfc, 0xd3, 0xe5, 0xf0} },
-{ 0x9150, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
-{ 0x9160, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x9170, 1, {0x22} },
-{ 0x9171, 16, {0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
-{ 0x9181, 16, {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
-{ 0x9191, 16, {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
-{ 0x91a1, 16, {0x9b, 0x49, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9b, 0xb8, 0xfc, 0xd3, 0xe5, 0xf0} },
-{ 0x91b1, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
-{ 0x91c1, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x91d1, 1, {0x22} },
-{ 0x91d2, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x5e, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x50, 0x7b, 0x75, 0x51} },
-{ 0x91e2, 16, {0x80, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x52, 0xf5} },
-{ 0x91f2, 16, {0x53, 0x89, 0x54, 0xfe, 0x12, 0x91, 0x71, 0xef, 0x60, 0x3b, 0xab, 0x52, 0xaa, 0x53, 0xa9, 0x54} },
-{ 0x9202, 16, {0x12, 0x9b, 0x72, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
-{ 0x9212, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
-{ 0x9222, 16, {0x04, 0xf0, 0xd2, 0xaf, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3} },
-{ 0x9232, 5, {0x74, 0x04, 0xf0, 0xd2, 0xaf} },
-{ 0x9237, 1, {0x22} },
-{ 0x9238, 16, {0x12, 0x91, 0xd2, 0xe4, 0xf5, 0x4b, 0x74, 0x36, 0x25, 0x4b, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4c} },
-{ 0x9248, 16, {0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4c, 0xff, 0xc4} },
-{ 0x9258, 16, {0x54, 0x0f, 0xf5, 0x4d, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
-{ 0x9268, 16, {0x83, 0xe5, 0x4c, 0xf0, 0xaf, 0x4b, 0x7d, 0x01, 0xe5, 0x4c, 0x45, 0x4d, 0xfb, 0x12, 0x91, 0x00} },
-{ 0x9278, 16, {0xef, 0x70, 0x05, 0x12, 0x91, 0xd2, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40} },
-{ 0x9288, 16, {0xb5, 0x12, 0x91, 0xd2, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} },
-{ 0x9298, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x4b} },
-{ 0x92a8, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
-{ 0x92b8, 16, {0x16, 0xaf, 0x4b, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x91, 0x00, 0xef, 0x70, 0x05, 0x12, 0x91, 0xd2} },
-{ 0x92c8, 16, {0x80, 0xef, 0xe5, 0x4c, 0xf4, 0x52, 0x3a, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
-{ 0x92d8, 16, {0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x93, 0xa5, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} },
-{ 0x92e8, 16, {0x11, 0x8e, 0x4e, 0x8f, 0x4f, 0xc3, 0xe5, 0x4e, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} },
-{ 0x92f8, 16, {0xbc, 0xe0, 0x65, 0x4f, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8, 0x07} },
-{ 0x9308, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xbc, 0xe0, 0x55, 0x4c, 0x60} },
-{ 0x9318, 16, {0x14, 0xaf, 0x4b, 0x7d, 0x08, 0xe5, 0x4c, 0x55, 0x4f, 0xfb, 0x12, 0x91, 0x00, 0xef, 0x70, 0x05} },
-{ 0x9328, 16, {0x12, 0x91, 0xd2, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} },
-{ 0x9338, 16, {0xbc, 0xe5, 0x4f, 0xf0, 0xe4, 0xf5, 0x4b, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x4b, 0xf8, 0xe6, 0xf5} },
-{ 0x9348, 16, {0x4c, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4c, 0x1e, 0xe5, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x02} },
-{ 0x9358, 16, {0xab, 0x4c, 0x12, 0x91, 0x00, 0xef, 0x70, 0x05, 0x12, 0x91, 0xd2, 0x80, 0xef, 0x74, 0x2c, 0x25} },
-{ 0x9368, 16, {0x4b, 0xf8, 0xe6, 0xf5, 0x4c, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
-{ 0x9378, 16, {0xe0, 0x65, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x04, 0xab, 0x4c, 0x12, 0x91, 0x00, 0xef, 0x70} },
-{ 0x9388, 16, {0x05, 0x12, 0x91, 0xd2, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
-{ 0x9398, 16, {0x83, 0xe5, 0x4c, 0xf0, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x91, 0xd2} },
-{ 0x93a8, 1, {0x22} },
-{ 0x93a9, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x64, 0x02, 0x93, 0xf0} },
-{ 0x93b5, 16, {0x02, 0x05, 0xa3, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
-{ 0x93c5, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
-{ 0x93d5, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
-{ 0x93e5, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x94, 0x35, 0xe4, 0x7e} },
-{ 0x93f5, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
-{ 0x9405, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
-{ 0x9415, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
-{ 0x9425, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
-{ 0x9435, 16, {0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
-{ 0x9445, 16, {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
-{ 0x9455, 8, {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
-{ 0x945d, 1, {0x00} },
-{ 0x945e, 11, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
-{ 0x9469, 16, {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
-{ 0x9479, 16, {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
-{ 0x9489, 16, {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
-{ 0x9499, 10, {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
-{ 0x94a3, 9, {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x94ac, 2, {0xa9, 0x03} },
-{ 0x94ae, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
-{ 0x94be, 16, {0x57, 0x45, 0x58, 0xf5, 0x59, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
-{ 0x94ce, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
-{ 0x94de, 16, {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x59, 0xeb} },
-{ 0x94ee, 16, {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x59, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
-{ 0x94fe, 16, {0x05, 0x22, 0xe5, 0x57, 0x5c, 0xfe, 0xe5, 0x58, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
-{ 0x950e, 16, {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
-{ 0x951e, 16, {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x57, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x58, 0x22, 0x7f} },
-{ 0x952e, 1, {0x00} },
-{ 0x952f, 1, {0x22} },
-{ 0x9530, 16, {0x75, 0x50, 0x02, 0x75, 0x51, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x51, 0x82, 0x85} },
-{ 0x9540, 16, {0x50, 0x83, 0xe0, 0xff, 0x90, 0x03, 0x36, 0xf0, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0} },
-{ 0x9550, 16, {0x90, 0x03, 0x37, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0x75, 0x52, 0x03, 0x75, 0x53, 0x39, 0xef, 0x14} },
-{ 0x9560, 16, {0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x99, 0x98, 0x90, 0x95, 0x6f, 0xf8, 0x28, 0x28, 0x73, 0x02} },
-{ 0x9570, 16, {0x95, 0x90, 0x02, 0x96, 0x2f, 0x02, 0x97, 0x34, 0x02, 0x97, 0x54, 0x02, 0x97, 0x54, 0x02, 0x97} },
-{ 0x9580, 16, {0xef, 0x02, 0x98, 0x2a, 0x02, 0x98, 0x4f, 0x02, 0x99, 0x0d, 0x02, 0x99, 0x39, 0x02, 0x99, 0x65} },
-{ 0x9590, 16, {0xe4, 0xf5, 0x4b, 0xe5, 0x4b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20} },
-{ 0x95a0, 16, {0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74, 0x8a, 0x2e} },
-{ 0x95b0, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4c, 0x80, 0x0d, 0x74, 0x8a, 0x2e} },
-{ 0x95c0, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4c, 0xe5, 0x4f, 0x24, 0x07, 0xf5, 0x82} },
-{ 0x95d0, 16, {0xe4, 0x35, 0x4e, 0xf5, 0x83, 0xe5, 0x4c, 0xf0, 0xe0, 0xf5, 0x4d, 0x65, 0x4c, 0x60, 0x38, 0xe4} },
-{ 0x95e0, 16, {0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfd, 0x05, 0x53, 0xe5, 0x53, 0xaa, 0x52, 0x70, 0x02} },
-{ 0x95f0, 16, {0x05, 0x52, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70} },
-{ 0x9600, 16, {0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4c, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
-{ 0x9610, 16, {0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x99, 0x9e, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64, 0x02, 0x70} },
-{ 0x9620, 16, {0x87, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60, 0x03, 0x02, 0x95, 0x93, 0x02, 0x99, 0x9e, 0xe4} },
-{ 0x9630, 16, {0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0x50, 0x05, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x03} },
-{ 0x9640, 16, {0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x94, 0xf0, 0xa3, 0x74, 0x5e, 0xf0, 0xe4, 0xf5, 0x4d, 0x7e} },
-{ 0x9650, 16, {0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} },
-{ 0x9660, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xc4, 0xf0, 0x90, 0x01} },
-{ 0x9670, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0x74, 0x02} },
-{ 0x9680, 16, {0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4c, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0} },
-{ 0x9690, 16, {0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52} },
-{ 0x96a0, 16, {0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
-{ 0x96b0, 16, {0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x4d, 0xff, 0x90, 0x01, 0xc4, 0xe0} },
-{ 0x96c0, 16, {0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfe, 0x05, 0x53, 0xe5, 0x53} },
-{ 0x96d0, 16, {0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x53, 0xe5} },
-{ 0x96e0, 16, {0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53} },
-{ 0x96f0, 16, {0x82, 0x85, 0x52, 0x83, 0xe5, 0x4c, 0xf0, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x70, 0x16, 0x74, 0x08} },
-{ 0x9700, 16, {0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60} },
-{ 0x9710, 16, {0x03, 0x02, 0x96, 0x5b, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x05, 0x4b} },
-{ 0x9720, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12} },
-{ 0x9730, 16, {0xf0, 0x02, 0x99, 0x9e, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01} },
-{ 0x9740, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01, 0xc4} },
-{ 0x9750, 16, {0xf0, 0x02, 0x99, 0x9e, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5} },
-{ 0x9760, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01, 0xc0} },
-{ 0x9770, 16, {0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
-{ 0x9780, 16, {0x83, 0x74, 0xff, 0xf0, 0xf5, 0x4d, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x99, 0x9e, 0x90, 0x01, 0xc0} },
-{ 0x9790, 16, {0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f} },
-{ 0x97a0, 16, {0x02, 0x12, 0x81, 0x11, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5} },
-{ 0x97b0, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0x55, 0x4d, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f} },
-{ 0x97c0, 16, {0x4c, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4c, 0x70, 0x04, 0x7f} },
-{ 0x97d0, 16, {0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4c, 0xe5, 0x4c, 0x70, 0x03, 0x02, 0x99, 0x9e, 0xe4, 0x90} },
-{ 0x97e0, 16, {0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x99, 0x9e, 0xe4} },
-{ 0x97f0, 16, {0xff, 0xfd, 0x12, 0x82, 0x50, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0x85} },
-{ 0x9800, 16, {0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x4f, 0x82, 0x85} },
-{ 0x9810, 16, {0x4e, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3} },
-{ 0x9820, 16, {0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x99, 0x9e, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00} },
-{ 0x9830, 16, {0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xe5, 0x4f, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4e, 0xf5} },
-{ 0x9840, 16, {0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x02, 0x99, 0x9e, 0xe4} },
-{ 0x9850, 16, {0xf5, 0x4d, 0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0x50, 0xe5, 0x4b, 0x75, 0xf0, 0x08} },
-{ 0x9860, 16, {0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xf5, 0x83} },
-{ 0x9870, 16, {0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} },
-{ 0x9880, 16, {0x4b, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x57, 0x80, 0x75, 0x58, 0x40, 0x12, 0x94, 0xac, 0x8f, 0x4d} },
-{ 0x9890, 16, {0xe5, 0x4d, 0x70, 0x11, 0xaf, 0x4b, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20} },
-{ 0x98a0, 16, {0x12, 0x94, 0xac, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d, 0x01, 0xfb, 0x75, 0x57} },
-{ 0x98b0, 16, {0x80, 0x75, 0x58, 0x40, 0x12, 0x94, 0xac, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d} },
-{ 0x98c0, 16, {0x02, 0xfb, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20, 0x12, 0x94, 0xac, 0x8f, 0x4d, 0xaf, 0x4b, 0x7d} },
-{ 0x98d0, 16, {0x01, 0x12, 0x82, 0x50, 0xe5, 0x4d, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04} },
-{ 0x98e0, 16, {0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
-{ 0x98f0, 16, {0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x99, 0x9e, 0x05, 0x4b} },
-{ 0x9900, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x50, 0x03, 0x02, 0x98, 0x54, 0x02, 0x99, 0x9e, 0xe4, 0x90, 0x03} },
-{ 0x9910, 16, {0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74} },
-{ 0x9920, 16, {0x1b, 0xf0, 0xa3, 0x74, 0x29, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x80, 0x00, 0xef, 0x64, 0x08} },
-{ 0x9930, 16, {0x60, 0x6c, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x65, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
-{ 0x9940, 16, {0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x52, 0xf0, 0xa3, 0xe5} },
-{ 0x9950, 16, {0x53, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x40, 0xe4, 0x90} },
-{ 0x9960, 16, {0x03, 0x38, 0xf0, 0x80, 0x39, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0} },
-{ 0x9970, 16, {0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x51, 0x24, 0x02, 0x90, 0x03, 0x60, 0xf0, 0xe4, 0x35} },
-{ 0x9980, 16, {0x50, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x80, 0x00, 0xef, 0x64, 0x08, 0x60} },
-{ 0x9990, 16, {0x0d, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01} },
-{ 0x99a0, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} },
-{ 0x99b0, 16, {0xf6, 0x7e, 0x03, 0x7f, 0x35, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e, 0x00, 0x75, 0x5d} },
-{ 0x99c0, 11, {0x00, 0x7d, 0x24, 0x12, 0x8e, 0x0c, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
-{ 0x99cb, 1, {0x22} },
-{ 0x99cc, 16, {0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
-{ 0x99dc, 16, {0x9a, 0x6f, 0x74, 0x36, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0x9a, 0x6f, 0xef, 0x75, 0xf0} },
-{ 0x99ec, 16, {0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
-{ 0x99fc, 16, {0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
-{ 0x9a0c, 16, {0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
-{ 0x9a1c, 16, {0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
-{ 0x9a2c, 16, {0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
-{ 0x9a3c, 16, {0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
-{ 0x9a4c, 16, {0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
-{ 0x9a5c, 16, {0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
-{ 0x9a6c, 12, {0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0x99, 0xce} },
-{ 0x9a78, 1, {0x22} },
-{ 0x9a79, 16, {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
-{ 0x9a89, 16, {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
-{ 0x9a99, 16, {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
-{ 0x9aa9, 16, {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
-{ 0x9ab9, 16, {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
-{ 0x9ac9, 16, {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
-{ 0x9ad9, 16, {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
-{ 0x9ae9, 16, {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
-{ 0x9af9, 16, {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
-{ 0x9b09, 16, {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
-{ 0x9b19, 16, {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
-{ 0x9b29, 16, {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
-{ 0x9b39, 16, {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
-{ 0x9b49, 16, {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
-{ 0x9b59, 16, {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
-{ 0x9b69, 9, {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x9a, 0xc9, 0x73} },
-{ 0x9b72, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
-{ 0x9b82, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x9b8b, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
-{ 0x9b9b, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
-{ 0x9bab, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x9bb8, 16, {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
-{ 0x9bc8, 6, {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
-{ 0x9bce, 16, {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
-{ 0x9bde, 6, {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
-{ 0x9be4, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
-{ 0x9bf4, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
-{ 0x9c04, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
-{ 0x9c14, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
-{ 0x9c1c, 16, {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
-{ 0x9c2c, 16, {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
-{ 0x9c3c, 16, {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0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, 0xe4, 0xc8, 0xf9, 0x22} },
-{ 0x9cea, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
-{ 0x9cfa, 1, {0x22} },
-{ 0x9cfb, 16, {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
-{ 0x9d0b, 3, {0xd8, 0xf1, 0x22} },
-{ 0x9d0e, 16, {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
-{ 0x9d1e, 7, {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
-{ 0x9d25, 12, {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
-{ 0x9d31, 16, {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0x9d, 0x48, 0x12, 0x9d, 0x48, 0x12} },
-{ 0x9d41, 16, {0x9d, 0x48, 0x12, 0x9d, 0x48, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
-{ 0x9d51, 16, {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
-{ 0x9d61, 1, {0x22} },
+{ 0x19c1, 4, {0x8e, 0x54, 0x8f, 0x55} },
+{ 0x19c5, 16, {0x75, 0x56, 0x03, 0xe5, 0x55, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe} },
+{ 0x19d5, 16, {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x1a, 0xcf, 0xe5, 0x56, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
+{ 0x19e5, 16, {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x1a, 0x73, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
+{ 0x19f5, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
+{ 0x1a05, 16, {0x80, 0x6c, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
+{ 0x1a15, 16, {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x56, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} },
+{ 0x1a25, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82} },
+{ 0x1a35, 16, {0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5} },
+{ 0x1a45, 16, {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x55, 0x24} },
+{ 0x1a55, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9f, 0x8e, 0x85} },
+{ 0x1a65, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0x8e, 0x90, 0x7f} },
+{ 0x1a75, 16, {0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
+{ 0x1a85, 16, {0x22, 0xe5, 0x57, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
+{ 0x1a95, 16, {0xe5, 0x56, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x1aa5, 16, {0x80, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
+{ 0x1ab5, 16, {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
+{ 0x1ac5, 12, {0x56, 0x03, 0x02, 0x19, 0xc8, 0x15, 0x56, 0x02, 0x19, 0xc8, 0x7f, 0x08} },
+{ 0x1ad1, 1, {0x22} },
+{ 0x1ad2, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
+{ 0x1ae2, 15, {0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x1af1, 4, {0x8e, 0x54, 0x8f, 0x55} },
+{ 0x1af5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x56, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x1b05, 16, {0xe5, 0x56, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
+{ 0x1b15, 16, {0x54, 0x03, 0x70, 0x24, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0x30, 0xe0, 0x07, 0xaf} },
+{ 0x1b25, 16, {0x56, 0x7d, 0x02, 0x12, 0x83, 0x2d, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0x30, 0xe1} },
+{ 0x1b35, 10, {0x07, 0xaf, 0x56, 0x7d, 0x04, 0x12, 0x83, 0x2d, 0x7f, 0x00} },
+{ 0x1b3f, 1, {0x22} },
+{ 0x8000, 16, {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9f, 0x61, 0xfd, 0x8b, 0x4d, 0x75} },
+{ 0x8010, 16, {0x4e, 0x12, 0x75, 0x4f, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4b} },
+{ 0x8020, 16, {0xf5, 0x4c, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
+{ 0x8030, 16, {0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
+{ 0x8040, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
+{ 0x8050, 16, {0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x81, 0xc6, 0xab, 0x4d, 0xaa, 0x4e, 0xa9, 0x4f} },
+{ 0x8060, 16, {0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} },
+{ 0x8070, 16, {0x12, 0x9f, 0x61, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0x9f, 0x61} },
+{ 0x8080, 16, {0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x81, 0x16, 0xec, 0xc3, 0x94, 0x10} },
+{ 0x8090, 16, {0x40, 0x03, 0x02, 0x81, 0x16, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4c, 0xae, 0x4b, 0x78, 0x02, 0xce} },
+{ 0x80a0, 16, {0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
+{ 0x80b0, 16, {0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} },
+{ 0x80c0, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0xae, 0xe0} },
+{ 0x80d0, 16, {0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x4c, 0xae, 0x4b, 0x78} },
+{ 0x80e0, 16, {0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x80f0, 16, {0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
+{ 0x8100, 16, {0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
+{ 0x8110, 16, {0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9f, 0x61, 0x25} },
+{ 0x8120, 16, {0x4c, 0xf5, 0x4c, 0xe4, 0x35, 0x4b, 0xf5, 0x4b, 0x90, 0x00, 0x05, 0x12, 0x9f, 0x61, 0xfe, 0xe4} },
+{ 0x8130, 16, {0x25, 0x4c, 0xf5, 0x4c, 0xee, 0x35, 0x4b, 0xf5, 0x4b, 0x02, 0x81, 0xb8, 0xab, 0x4d, 0xaa, 0x4e} },
+{ 0x8140, 16, {0xa9, 0x4f, 0x90, 0x00, 0x03, 0x12, 0x9f, 0x61, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
+{ 0x8150, 16, {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9f, 0x61, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
+{ 0x8160, 16, {0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
+{ 0x8170, 16, {0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
+{ 0x8180, 16, {0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
+{ 0x8190, 16, {0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} },
+{ 0x81a0, 16, {0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} },
+{ 0x81b0, 16, {0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35} },
+{ 0x81c0, 16, {0x4e, 0xf5, 0x4e, 0x02, 0x80, 0x51, 0x20, 0x03, 0x0d, 0x90, 0x02, 0xae, 0xe0, 0x60, 0x07, 0x90} },
+{ 0x81d0, 8, {0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} },
+{ 0x81d8, 1, {0x22} },
+{ 0x81d9, 2, {0xac, 0x07} },
+{ 0x81db, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} },
+{ 0x81eb, 16, {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
+{ 0x81fb, 16, {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} },
+{ 0x820b, 16, {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
+{ 0x821b, 16, {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
+{ 0x822b, 16, {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} },
+{ 0x823b, 16, {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} },
+{ 0x824b, 16, {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} },
+{ 0x825b, 16, {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} },
+{ 0x826b, 16, {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} },
+{ 0x827b, 16, {0x02, 0x81, 0xdb, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} },
+{ 0x828b, 16, {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x829b, 12, {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
+{ 0x82a7, 1, {0x22} },
+{ 0x82a8, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
+{ 0x82b8, 16, {0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x5e, 0x74, 0xbf} },
+{ 0x82c8, 16, {0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
+{ 0x82d8, 16, {0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} },
+{ 0x82e8, 16, {0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} },
+{ 0x82f8, 16, {0xef, 0x55, 0x3b, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
+{ 0x8308, 16, {0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} },
+{ 0x8318, 16, {0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5e, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} },
+{ 0x8328, 4, {0x83, 0xa3, 0xe9, 0xf0} },
+{ 0x832c, 1, {0x22} },
+{ 0x832d, 4, {0x8f, 0x5e, 0x8d, 0x5f} },
+{ 0x8331, 16, {0xe4, 0xf5, 0x60, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
+{ 0x8341, 16, {0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x8351, 16, {0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0xa0, 0xc0, 0x50} },
+{ 0x8361, 16, {0x3c, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83} },
+{ 0x8371, 16, {0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} },
+{ 0x8381, 16, {0x00, 0xc3, 0x12, 0xa0, 0xc0, 0x40, 0x0c, 0x75, 0x60, 0x40, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76} },
+{ 0x8391, 16, {0x10, 0x80, 0x0a, 0x75, 0x60, 0x80, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76, 0x38, 0xe5, 0x60, 0x45} },
+{ 0x83a1, 16, {0x5f, 0x44, 0x01, 0xff, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x83b1, 5, {0x20, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x83b6, 1, {0x22} },
+{ 0x83b7, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x83c7, 16, {0xe5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
+{ 0x83d7, 16, {0x55, 0x8f, 0x56, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x83e7, 16, {0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
+{ 0x83f7, 16, {0x83, 0xe4, 0xf0, 0x74, 0x22, 0x25, 0x54, 0xf8, 0xe4, 0xf6, 0xe5, 0x56, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x8407, 16, {0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x83, 0x2d} },
+{ 0x8417, 16, {0xaf, 0x54, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xa3, 0xe0} },
+{ 0x8427, 16, {0x20, 0xe0, 0x22, 0xe0, 0xff, 0xe5, 0x56, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83} },
+{ 0x8437, 16, {0xe0, 0xe5, 0x56, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x54} },
+{ 0x8447, 16, {0x7d, 0x06, 0x12, 0x83, 0x2d, 0x74, 0xf8, 0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
+{ 0x8457, 16, {0xe4, 0xf0, 0xe5, 0x54, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24} },
+{ 0x8467, 16, {0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xef} },
+{ 0x8477, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0xaf, 0x54, 0x74, 0x01} },
+{ 0x8487, 13, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7f, 0x00} },
+{ 0x8494, 1, {0x22} },
+{ 0x8495, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x84a5, 16, {0xaf, 0x54, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0x74, 0xf8, 0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
+{ 0x84b5, 16, {0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x84c5, 16, {0x20, 0xaf, 0x82, 0xf5, 0x56, 0x8f, 0x57, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4} },
+{ 0x84d5, 16, {0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x83, 0x2d, 0xe5} },
+{ 0x84e5, 16, {0x57, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x09, 0x85, 0x57} },
+{ 0x84f5, 16, {0x82, 0x85, 0x56, 0x83, 0xe0, 0xf5, 0x55, 0xaf, 0x54, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
+{ 0x8505, 16, {0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4} },
+{ 0x8515, 16, {0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82} },
+{ 0x8525, 9, {0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} },
+{ 0x852e, 1, {0x22} },
+{ 0x852f, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
+{ 0x853f, 16, {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
+{ 0x854f, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
+{ 0x855f, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
+{ 0x856f, 16, {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
+{ 0x857f, 16, {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
+{ 0x858f, 16, {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
+{ 0x859f, 16, {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
+{ 0x85af, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
+{ 0x85bf, 3, {0x83, 0xf0, 0x22} },
+{ 0x85c2, 4, {0xad, 0x07, 0xac, 0x06} },
+{ 0x85c6, 16, {0x79, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff} },
+{ 0x85d6, 16, {0x22, 0x8c, 0x54, 0x8d, 0x55, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x85e6, 16, {0x03, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} },
+{ 0x85f6, 16, {0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x55, 0xe5, 0x55, 0xaa, 0x54, 0x70, 0x02} },
+{ 0x8606, 16, {0x05, 0x54, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x8616, 1, {0x22} },
+{ 0x8617, 4, {0x8e, 0x54, 0x8f, 0x55} },
+{ 0x861b, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5b, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
+{ 0x862b, 16, {0xe5, 0x5b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
+{ 0x863b, 16, {0x5c, 0x8f, 0x5d, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
+{ 0x864b, 16, {0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0xa0} },
+{ 0x865b, 16, {0xc0, 0x40, 0x10, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0xa1, 0x07, 0x00, 0x00, 0x00} },
+{ 0x866b, 16, {0x08, 0x80, 0x2e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
+{ 0x867b, 16, {0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0xa0} },
+{ 0x868b, 16, {0xc0, 0x50, 0x0e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0xa1, 0x07, 0x00, 0x07, 0x08} },


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 78'
echo 'File patch-2.2.20 is continued in part 79'
echo "79" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:23 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part84

#!/bin/sh -x
# this is part 84 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 84; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

+++ linux/include/net/ip.h Fri Nov 2 15:45:13 2001
@@ -170,7 +170,7 @@
X extern __inline__
X int ip_decrease_ttl(struct iphdr *iph)
X {
- u16 check = iph->check;
+ u32 check = iph->check;
X check += __constant_htons(0x0100);
X iph->check = check + ((check>=0xFFFF) ? 1 : 0);
X return --iph->ttl;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/net/sock.h linux/include/net/sock.h
--- v2.2.19/include/net/sock.h Sun Mar 25 17:31:07 2001
+++ linux/include/net/sock.h Fri Nov 2 15:44:26 2001
@@ -306,6 +306,8 @@
X struct open_request **syn_wait_last;
X
X int syn_backlog; /* Backlog of received SYNs */
+
+ unsigned long last_synq_overflow;
X };
X
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/scsi/sg.h linux/include/scsi/sg.h
--- v2.2.19/include/scsi/sg.h Sun Mar 25 17:31:09 2001
+++ linux/include/scsi/sg.h Wed Oct 10 01:42:00 2001
@@ -9,12 +9,14 @@
X Original driver (sg.h):


X * Copyright (C) 1992 Lawrence Foard

X 2.x extensions to driver:
-* Copyright (C) 1998 - 2000 Douglas Gilbert
+* Copyright (C) 1998 - 2001 Douglas Gilbert
X
- Version: 2.1.39 (20000626)
+ Version: 2.1.40 (20010620)
X This version for 2.2.x series kernels
X D. P. Gilbert (dgil...@interlog.com, do...@triode.net.au)
X
+ Changes since 2.1.38 (20000626)
+ - fix bug that caused long wait when large buffer requested
X Changes since 2.1.38 (20000527)
X - more scatter gather fine tuning for sym53c416
X Changes since 2.1.37 (20000504)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/video/macmodes.h linux/include/video/macmodes.h
--- v2.2.19/include/video/macmodes.h Sun Mar 25 17:31:10 2001
+++ linux/include/video/macmodes.h Wed Oct 10 01:42:00 2001
@@ -38,7 +38,9 @@
X #define VMODE_1152_870_75 18 /* 1152x870, 75Hz */
X #define VMODE_1280_960_75 19 /* 1280x960, 75Hz */
X #define VMODE_1280_1024_75 20 /* 1280x1024, 75Hz */
-#define VMODE_MAX 20
+#define VMODE_1152_768_60 21 /* 1152x768, 60Hz */
+#define VMODE_1600_1024_60 22 /* 1600x1024, 60Hz */
+#define VMODE_MAX 22
X #define VMODE_CHOOSE 99
X
X #define CMODE_NVRAM -1
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/init/main.c linux/init/main.c
--- v2.2.19/init/main.c Sun Mar 25 17:37:40 2001
+++ linux/init/main.c Wed Oct 31 14:08:37 2001
@@ -357,6 +357,9 @@
X #ifdef CONFIG_ADBMOUSE
X extern void adb_mouse_setup(char *str, int *ints);
X #endif
+#ifdef CONFIG_COMPUTONE
+extern void ip2_setup(char *str, int *ints);
+#endif
X #ifdef CONFIG_WDT
X extern void wdt_setup(char *str, int *ints);
X #endif
@@ -462,13 +465,8 @@
X const char *name;
X const int num;
X } root_dev_names[] __initdata = {
-#ifdef CONFIG_ROOT_NFS
X { "nfs", 0x00ff },
-#endif
-#ifdef CONFIG_BLK_DEV_LOOP
X { "loop", 0x0700 },
-#endif
-#ifdef CONFIG_BLK_DEV_IDE
X { "hda", 0x0300 },
X { "hdb", 0x0340 },
X { "hdc", 0x1600 },
@@ -481,8 +479,6 @@
X { "hdj", 0x3840 },
X { "hdk", 0x3900 },
X { "hdl", 0x3940 },
-#endif
-#ifdef CONFIG_BLK_DEV_SD
X { "sda", 0x0800 },
X { "sdb", 0x0810 },
X { "sdc", 0x0820 },
@@ -499,8 +495,6 @@
X { "sdn", 0x08d0 },
X { "sdo", 0x08e0 },
X { "sdp", 0x08f0 },
-#endif
-#ifdef CONFIG_BLK_DEV_DAC960
X { "rd/c0d0p",0x3000 },
X { "rd/c0d1p",0x3008 },
X { "rd/c0d2p",0x3010 },
@@ -517,8 +511,6 @@
X { "rd/c0d13p",0x3068 },
X { "rd/c0d14p",0x3070 },
X { "rd/c0d15p",0x3078 },
-#endif
-#if defined(CONFIG_BLK_CPQ_DA) || defined(CONFIG_BLK_CPQ_DA_MODULE)
X { "ida/c0d0p",0x4800 },
X { "ida/c0d1p",0x4810 },
X { "ida/c0d2p",0x4820 },
@@ -535,71 +527,34 @@
X { "ida/c0d13p",0x48D0 },
X { "ida/c0d14p",0x48E0 },
X { "ida/c0d15p",0x48F0 },
-#endif
-#ifdef CONFIG_ATARI_ACSI
X { "ada", 0x1c00 },
X { "adb", 0x1c10 },
X { "adc", 0x1c20 },
X { "add", 0x1c30 },
X { "ade", 0x1c40 },
-#endif
-#ifdef CONFIG_BLK_DEV_FD
X { "fd", 0x0200 },
-#endif
-#ifdef CONFIG_MD_BOOT
X { "md", 0x0900 },
-#endif
-#ifdef CONFIG_BLK_DEV_XD
X { "xda", 0x0d00 },
X { "xdb", 0x0d40 },
-#endif
-#ifdef CONFIG_BLK_DEV_RAM
X { "ram", 0x0100 },
-#endif
-#ifdef CONFIG_BLK_DEV_SR
X { "scd", 0x0b00 },
-#endif
-#ifdef CONFIG_MCD
X { "mcd", 0x1700 },
-#endif
-#ifdef CONFIG_CDU535
X { "cdu535", 0x1800 },
X { "sonycd", 0x1800 },
-#endif
-#ifdef CONFIG_AZTCD
X { "aztcd", 0x1d00 },
-#endif
-#ifdef CONFIG_CM206
X { "cm206cd", 0x2000 },
-#endif
-#ifdef CONFIG_GSCD
X { "gscd", 0x1000 },
-#endif
-#ifdef CONFIG_SBPCD
X { "sbpcd", 0x1900 },
-#endif
-#ifdef CONFIG_BLK_DEV_PS2
X { "eda", 0x2400 },
X { "edb", 0x2440 },
-#endif
-#ifdef CONFIG_PARIDE_PD
X { "pda", 0x2d00 },
X { "pdb", 0x2d10 },
X { "pdc", 0x2d20 },
X { "pdd", 0x2d30 },
-#endif
-#ifdef CONFIG_PARIDE_PCD
X { "pcd", 0x2e00 },
-#endif
-#ifdef CONFIG_PARIDE_PF
X { "pf", 0x2f00 },
-#endif
-#if CONFIG_APBLOCK
X { "apblock", APBLOCK_MAJOR << 8},
-#endif
-#if CONFIG_DDV
X { "ddv", DDV_MAJOR << 8},
-#endif
X #ifdef CONFIG_MDISK
X { "mnda", (MDISK_MAJOR << MINORBITS)},
X { "mndb", (MDISK_MAJOR << MINORBITS) + 1},
@@ -1038,6 +993,9 @@
X #endif
X #ifdef CONFIG_SOUNDMODEM
X { "soundmodem=", sm_setup },
+#endif
+#ifdef CONFIG_COMPUTONE
+ { "ip2=", ip2_setup };
X #endif
X #ifdef CONFIG_WDT
X { "wdt=", wdt_setup },
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/kernel/exit.c linux/kernel/exit.c
--- v2.2.19/kernel/exit.c Sun Mar 25 17:37:40 2001
+++ linux/kernel/exit.c Wed Oct 10 01:42:02 2001
@@ -339,7 +339,7 @@
X p = current->p_cptr;
X current->p_cptr = p->p_osptr;
X p->p_ysptr = NULL;
- p->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ p->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
X
X p->p_pptr = p->p_opptr;
X p->p_osptr = p->p_pptr->p_cptr;
@@ -475,7 +475,7 @@
X case TASK_STOPPED:
X if (!p->exit_code)
X continue;
- if (!(options & WUNTRACED) && !(p->flags & PF_PTRACED))
+ if (!(options & WUNTRACED) && !(p->ptrace & PT_PTRACED))
X continue;
X read_unlock(&tasklist_lock);
X retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/kernel/fork.c linux/kernel/fork.c
--- v2.2.19/kernel/fork.c Sun Mar 25 17:37:40 2001
+++ linux/kernel/fork.c Wed Oct 10 01:42:02 2001
@@ -557,7 +557,7 @@
X new_flags &= ~(PF_SUPERPRIV | PF_USEDFPU | PF_VFORK);
X new_flags |= PF_FORKNOEXEC;
X if (!(clone_flags & CLONE_PTRACE))
- new_flags &= ~(PF_PTRACED|PF_TRACESYS);
+ p->ptrace = 0;
X if (clone_flags & CLONE_VFORK)
X new_flags |= PF_VFORK;
X p->flags = new_flags;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/kernel/ksyms.c linux/kernel/ksyms.c
--- v2.2.19/kernel/ksyms.c Sun Mar 25 17:31:02 2001
+++ linux/kernel/ksyms.c Wed Oct 10 01:42:02 2001
@@ -81,6 +81,7 @@
X
X #ifdef CONFIG_MODULES
X EXPORT_SYMBOL(get_module_symbol);
+EXPORT_SYMBOL(try_inc_mod_count);
X #endif
X EXPORT_SYMBOL(get_options);
X
@@ -274,6 +275,7 @@
X EXPORT_SYMBOL(prepare_binprm);
X EXPORT_SYMBOL(compute_creds);
X EXPORT_SYMBOL(remove_arg_zero);
+EXPORT_SYMBOL(set_binfmt);
X
X /* execution environment registration */
X EXPORT_SYMBOL(lookup_exec_domain);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/kernel/module.c linux/kernel/module.c
--- v2.2.19/kernel/module.c Sun Mar 25 17:31:02 2001
+++ linux/kernel/module.c Mon Oct 22 10:37:44 2001
@@ -356,6 +356,21 @@


X return error;
X }
X

+static spinlock_t unload_lock = SPIN_LOCK_UNLOCKED;
+int try_inc_mod_count(struct module *mod)
+{
+ int res = 1;
+ if (mod) {
+ spin_lock(&unload_lock);
+ if (mod->flags & MOD_DELETED)
+ res = 0;
+ else
+ __MOD_INC_USE_COUNT(mod);
+ spin_unlock(&unload_lock);
+ }
+ return res;
+}
+
X asmlinkage int
X sys_delete_module(const char *name_user)
X {
@@ -383,11 +398,18 @@
X }
X put_mod_name(name);
X error = -EBUSY;
- if (mod->refs != NULL || __MOD_IN_USE(mod))
+ if (mod->refs != NULL)
X goto out;
X
- free_module(mod, 0);
- error = 0;
+ spin_lock(&unload_lock);
+ if (!__MOD_IN_USE(mod)) {
+ mod->flags |= MOD_DELETED;
+ spin_unlock(&unload_lock);
+ free_module(mod, 0);
+ error = 0;
+ } else {
+ spin_unlock(&unload_lock);
+ }


X goto out;
X }
X

@@ -396,6 +418,7 @@
X something_changed = 0;
X for (mod = module_list; mod != &kernel_module; mod = next) {
X next = mod->next;
+ spin_lock(&unload_lock);
X if (mod->refs == NULL
X && (mod->flags & MOD_AUTOCLEAN)
X && (mod->flags & MOD_RUNNING)
@@ -404,11 +427,16 @@
X && !__MOD_IN_USE(mod)) {
X if ((mod->flags & MOD_VISITED)
X && !(mod->flags & MOD_JUST_FREED)) {
+ spin_unlock(&unload_lock);
X mod->flags &= ~MOD_VISITED;
X } else {
+ mod->flags |= MOD_DELETED;
+ spin_unlock(&unload_lock);
X free_module(mod, 1);
X something_changed = 1;
X }
+ } else {
+ spin_unlock(&unload_lock);
X }
X }
X if (something_changed)
@@ -781,7 +809,6 @@
X
X /* Let the module clean up. */
X
- mod->flags |= MOD_DELETED;
X if (mod->flags & MOD_RUNNING)
X {
X if(mod->cleanup)
@@ -1015,6 +1042,11 @@
X sys_get_kernel_syms(struct kernel_sym *table)
X {
X return -ENOSYS;
+}
+
+int try_inc_mod_count(struct module *mod)
+{
+ return 1;
X }
X
X #endif /* CONFIG_MODULES */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/kernel/signal.c linux/kernel/signal.c
--- v2.2.19/kernel/signal.c Sun Mar 25 17:37:40 2001
+++ linux/kernel/signal.c Wed Oct 10 01:42:03 2001
@@ -222,7 +222,7 @@
X struct k_sigaction *ka;
X
X /* Don't ignore traced or blocked signals */
- if ((t->flags & PF_PTRACED) || sigismember(&t->blocked, sig))
+ if ((t->ptrace & PT_PTRACED) || sigismember(&t->blocked, sig))
X return 0;
X
X signals = t->sig;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/mm/slab.c linux/mm/slab.c
--- v2.2.19/mm/slab.c Sun Mar 25 17:31:03 2001
+++ linux/mm/slab.c Wed Oct 10 01:42:03 2001
@@ -1257,7 +1257,7 @@
X /* A series of memory allocations for a new slab.
X * Neither the cache-chain semaphore, or cache-lock, are
X * held, but the incrementing c_growing prevents this
- * this cache from being reaped or shrunk.
+ * cache from being reaped or shrunk.
X * Note: The cache could be selected in for reaping in
X * kmem_cache_reap(), but when the final test is made the
X * growing value will be seen.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/mm/swapfile.c linux/mm/swapfile.c
--- v2.2.19/mm/swapfile.c Sun Mar 25 17:31:03 2001
+++ linux/mm/swapfile.c Wed Oct 10 01:42:03 2001
@@ -448,7 +448,7 @@
X
X len += sprintf(buf, "Filename\t\t\tType\t\tSize\tUsed\tPriority\n");
X for (i = 0 ; i < nr_swapfiles ; i++, ptr++) {
- if (ptr->flags & SWP_USED) {
+ if ((ptr->flags & SWP_USED) && ptr->swap_map) {
X char * path = d_path(ptr->swap_file, page, PAGE_SIZE);
X
X len += sprintf(buf + len, "%-31s ", path);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/core/dev.c linux/net/core/dev.c
--- v2.2.19/net/core/dev.c Sun Mar 25 17:37:41 2001
+++ linux/net/core/dev.c Wed Oct 10 01:42:04 2001
@@ -2105,7 +2105,7 @@
X #ifdef CONFIG_PC300
X cpc_init();
X #endif
-#ifdef CONFIG_HDLC
+#ifdef CONFIG_SYNCPPP
X sync_ppp_init();
X #endif
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/core/sock.c linux/net/core/sock.c
--- v2.2.19/net/core/sock.c Sun Mar 25 17:37:41 2001
+++ linux/net/core/sock.c Wed Oct 10 01:42:04 2001
@@ -7,7 +7,7 @@
X * handler for protocols to use and generic option handler.
X *
X *
- * Version: $Id: sock.c,v 1.80.2.3 2000/08/10 00:37:05 davem Exp $
+ * Version: $Id: sock.c,v 1.80.2.5 2001/05/11 02:07:23 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
@@ -752,9 +752,11 @@
X break;
X try_size = fallback;
X }
- skb = sock_wmalloc(sk, try_size, 0, sk->allocation);
+ skb = sock_wmalloc_err(sk, try_size, 0, sk->allocation, &err);
X if (skb)
X break;
+ if (err)
+ goto failure;
X
X /*
X * This means we have too many buffers for this socket already.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
--- v2.2.19/net/ipv4/af_inet.c Sun Mar 25 17:31:12 2001
+++ linux/net/ipv4/af_inet.c Wed Oct 10 01:42:05 2001
@@ -877,7 +877,8 @@
X case SIOCGSTAMP:
X if(sk->stamp.tv_sec==0)
X return -ENOENT;
- err = copy_to_user((void *)arg,&sk->stamp,sizeof(struct timeval));
+ err = copy_to_user((void *)arg, &sk->stamp,
+ sizeof(struct timeval));
X if (err)
X err = -EFAULT;
X return err;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/arp.c linux/net/ipv4/arp.c
--- v2.2.19/net/ipv4/arp.c Sun Mar 25 17:31:12 2001
+++ linux/net/ipv4/arp.c Wed Oct 10 01:42:05 2001
@@ -1,6 +1,6 @@
X /* linux/net/inet/arp.c
X *
- * Version: $Id: arp.c,v 1.77.2.7 2000/10/29 11:41:15 davem Exp $
+ * Version: $Id: arp.c,v 1.77.2.8 2001/07/06 11:36:55 davem Exp $
X *
X * Copyright (C) 1994 by Florian La Roche
X *
@@ -731,7 +731,8 @@
X (addr_type == RTN_UNICAST && rt->u.dst.dev != dev &&
X (IN_DEV_PROXY_ARP(in_dev) || pneigh_lookup(&arp_tbl, &tip, dev, 0)))) {
X n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
- neigh_release(n);
+ if (n)
+ neigh_release(n);
X
X if (skb->stamp.tv_sec == 0 ||
X skb->pkt_type == PACKET_HOST ||
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/igmp.c linux/net/ipv4/igmp.c
--- v2.2.19/net/ipv4/igmp.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/igmp.c Mon Oct 22 10:48:00 2001
@@ -8,7 +8,7 @@
X * the older version didn't come out right using gcc 2.5.8, the newer one
X * seems to fall out with gcc 2.6.2.
X *
- * Version: $Id: igmp.c,v 1.30.2.2 2001/01/10 10:04:07 davem Exp $
+ * Version: $Id: igmp.c,v 1.30.2.3 2001/07/27 09:35:49 davem Exp $
X *
X * Authors:
X * Alan Cox <Alan...@linux.org>
@@ -109,7 +109,7 @@
X #define IGMP_Unsolicited_Report_Count 2
X
X
-#define IGMP_Initial_Report_Delay (1*HZ)
+#define IGMP_Initial_Report_Delay (1)
X
X /* IGMP_Initial_Report_Delay is not from IGMP specs!
X * IGMP specs require to report membership immediately after
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
--- v2.2.19/net/ipv4/ip_input.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/ip_input.c Wed Oct 10 01:42:05 2001
@@ -5,7 +5,7 @@
X *
X * The Internet Protocol (IP) module.
X *
- * Version: $Id: ip_input.c,v 1.37.2.4 2001/01/04 04:20:16 davem Exp $
+ * Version: $Id: ip_input.c,v 1.37.2.5 2001/06/07 06:47:54 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
@@ -181,8 +181,11 @@
X int type;
X
X type = skb->h.icmph->type;
- if (type < 32)
- return test_bit(type, &sk->tp_pinfo.tp_raw4.filter);
+ if (type < 32) {
+ __u32 data = sk->tp_pinfo.tp_raw4.filter.data;
+
+ return ((1 << type) & data) != 0;
+ }
X
X /* Do not block unknown ICMP types */
X return 0;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/ip_masq_irc.c linux/net/ipv4/ip_masq_irc.c
--- v2.2.19/net/ipv4/ip_masq_irc.c Sun Mar 25 17:31:12 2001
+++ linux/net/ipv4/ip_masq_irc.c Wed Oct 10 01:42:06 2001
@@ -22,6 +22,7 @@
X * <ssh...@escape.ca>
X * Scottie Shore : added support for mIRC DCC resume negotiation
X * <ssh...@escape.ca>
+ * Juan Jose Ciarlante : src addr/port checking for better security (spotted by Michal Zalewski)
X *
X * This program is free software; you can redistribute it and/or
X * modify it under the terms of the GNU General Public License
@@ -38,7 +39,12 @@
X * /etc/conf.modules (or /etc/modules.conf depending on your config)
X * where modload will pick it up should you use modload to load your
X * modules.
- *
+ *
+ * Insecure "back" data channel opening
+ * The helper does some trivial checks when opening a new DCC data
+ * channel. Use module parameter
+ * insecure=1
+ * ... to avoid this and get previous (pre 2.2.20) behaviour.
X */
X
X #include <linux/config.h>
@@ -72,6 +78,9 @@
X
X MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_MASQ_APP_PORTS) "i");
X
+static int insecure=0;
+MODULE_PARM(insecure, "i");
+
X
X /*
X * List of supported DCC protocols
@@ -110,6 +119,30 @@


X return 0;
X }
X

+
+/*
+ * Ugly workaround [TM] --mummy ... why does this protocol sucks?
+ *
+ * The <1024 check and same source address just raise the
+ * security "feeling" => they don't prevent a redirector listening
+ * in same src address at a higher port; you should protect
+ * your internal network with ipchains output rules anyway
+ */
+
+static inline int masq_irc_out_check(const struct ip_masq *ms, __u32 data_saddr, __u16 data_sport) {
+ int allow=1;
+
+ IP_MASQ_DEBUG(1-debug, "masq_irc_out_check( s_addr=%d.%d.%d.%d, data_saddr=%d.%d.%d.%d, data_sport=%d",
+ NIPQUAD(ms->saddr), NIPQUAD(data_saddr), ntohs(data_sport));
+
+ /*
+ * Ignore data channel back to other src addr, nor to port < 1024
+ */
+ if (ms->saddr != data_saddr || ntohs(data_sport) < 1024)
+ allow=0;
+
+ return allow;
+}
X int
X masq_irc_out (struct ip_masq_app *mapp, struct ip_masq *ms, struct sk_buff **skb_p, __u32 maddr)
X {
@@ -118,7 +151,7 @@
X struct tcphdr *th;
X char *data, *data_limit;
X __u32 s_addr;
- __u16 s_port;
+ __u32 s_port; /* larger to allow strtoul() return value validation */
X struct ip_masq *n_ms;
X char buf[20]; /* "m_addr m_port" (dec base)*/
X unsigned buf_len;
@@ -199,12 +232,25 @@
X s_port = simple_strtoul(data,&data,10);
X addr_end_p = data;
X
+ /* Sanity checks */
+ if (!s_addr || !s_port || s_port > 65535)
+ continue;
+
+ /* Prefer net order from now on */
+ s_addr = htonl(s_addr);
+ s_port = htons(s_port);
+
+ /* Simple validation */
+ if (!insecure && !masq_irc_out_check(ms, s_addr, s_port))
+ /* We may just: return 0; */
+ continue;
+
X /* Do we already have a port open for this client?
X * If so, use it (for DCC ACCEPT)
X */
X
X n_ms = ip_masq_out_get(IPPROTO_TCP,
- htonl(s_addr),htons(s_port),
+ s_addr, s_port,
X 0, 0);
X
X /*
@@ -216,7 +262,7 @@
X if (n_ms==NULL)
X n_ms = ip_masq_new(IPPROTO_TCP,
X maddr, 0,
- htonl(s_addr),htons(s_port),
+ s_addr, s_port,
X 0, 0,
X IP_MASQ_F_NO_DPORT|IP_MASQ_F_NO_DADDR);
X if (n_ms==NULL)
@@ -236,7 +282,10 @@
X diff = buf_len - (addr_end_p-addr_beg_p);
X
X *addr_beg_p = '\0';
- IP_MASQ_DEBUG(1-debug, "masq_irc_out(): '%s' %X:%X detected (diff=%d)\n", dcc_p, s_addr,s_port, diff);
+ IP_MASQ_DEBUG(1-debug, "masq_irc_out(): '%s' %d.%d.%d.%d:%d -> %d.%d.%d.%d:%d detected (diff=%d)\n", dcc_p,
+ NIPQUAD(s_addr), htons(s_port),
+ NIPQUAD(n_ms->maddr), htons(n_ms->mport),
+ diff);
X
X /*
X * No shift.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/ip_masq_vdolive.c linux/net/ipv4/ip_masq_vdolive.c
--- v2.2.19/net/ipv4/ip_masq_vdolive.c Sun Mar 25 17:31:12 2001
+++ linux/net/ipv4/ip_masq_vdolive.c Wed Oct 10 01:42:06 2001
@@ -242,7 +242,7 @@
X ports[i]))) {
X return j;
X }
- IP_MASQ_DEBUG(1-debug, "RealAudio: loaded support on port[%d] = %d\n", i, ports[i]);
+ IP_MASQ_DEBUG(1-debug, "VDOlive: loaded support on port[%d] = %d\n", i, ports[i]);
X } else {
X /* To be safe, force the incarnation table entry to NULL */
X masq_incarnations[i] = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/ip_sockglue.c linux/net/ipv4/ip_sockglue.c
--- v2.2.19/net/ipv4/ip_sockglue.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/ip_sockglue.c Wed Oct 10 01:42:07 2001
@@ -5,7 +5,7 @@
X *
X * The IP to API glue.
X *
- * Version: $Id: ip_sockglue.c,v 1.42 1999/04/22 10:07:34 davem Exp $
+ * Version: $Id: ip_sockglue.c,v 1.42.2.1 2001/02/20 04:21:46 davem Exp $
X *
X * Authors: see ip.c
X *
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
--- v2.2.19/net/ipv4/ipmr.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/ipmr.c Wed Oct 10 01:42:07 2001
@@ -9,7 +9,7 @@
X * as published by the Free Software Foundation; either version
X * 2 of the License, or (at your option) any later version.
X *
- * Version: $Id: ipmr.c,v 1.40.2.2 1999/06/20 21:27:44 davem Exp $
+ * Version: $Id: ipmr.c,v 1.40.2.3 2001/02/20 04:21:46 davem Exp $
X *
X * Fixes:
X * Michael Chastain : Incorrect size of copying.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/raw.c linux/net/ipv4/raw.c
--- v2.2.19/net/ipv4/raw.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/raw.c Wed Oct 10 01:42:07 2001
@@ -5,7 +5,7 @@
X *
X * RAW - implementation of IP "raw" sockets.
X *
- * Version: $Id: raw.c,v 1.39.2.1 1999/06/20 20:14:50 davem Exp $
+ * Version: $Id: raw.c,v 1.39.2.2 2001/02/20 04:21:46 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/route.c linux/net/ipv4/route.c
--- v2.2.19/net/ipv4/route.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/route.c Wed Oct 10 01:42:08 2001
@@ -5,7 +5,7 @@
X *
X * ROUTE - implementation of the IP router.
X *
- * Version: $Id: route.c,v 1.67.2.5 2000/09/01 23:19:46 davem Exp $
+ * Version: $Id: route.c,v 1.67.2.6 2001/02/09 08:43:58 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
@@ -1346,7 +1346,7 @@
X #ifdef CONFIG_IP_ROUTE_VERBOSE
X if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit()) {
X /*
- * RFC1812 recommenadtion, if source is martian,
+ * RFC1812 recommendation, if source is martian,
X * the only hint is MAC header.
X */
X printk(KERN_WARNING "martian source %08x for %08x, dev %s\n", saddr, daddr, dev->name);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/syncookies.c linux/net/ipv4/syncookies.c
--- v2.2.19/net/ipv4/syncookies.c Sun Mar 25 17:31:12 2001
+++ linux/net/ipv4/syncookies.c Wed Oct 31 14:14:18 2001
@@ -23,8 +23,6 @@
X
X extern int sysctl_tcp_syncookies;
X
-static unsigned long tcp_lastsynq_overflow;
-
X /*
X * This table has to be sorted and terminated with (__u16)-1.
X * XXX generate a better table.
@@ -54,7 +52,9 @@
X int mssind;
X const __u16 mss = *mssp;
X
- tcp_lastsynq_overflow = jiffies;
+
+ sk->tp_pinfo.af_tcp.last_synq_overflow = jiffies;
+
X /* XXX sort msstab[] by probability? Binary search? */
X for (mssind = 0; mss > msstab[mssind+1]; mssind++)
X ;
@@ -79,14 +79,11 @@
X * Check if a ack sequence number is a valid syncookie.
X * Return the decoded mss if it is, or 0 if not.
X */
-static inline int cookie_check(struct sk_buff *skb, __u32 cookie)
+static inline int cookie_check(struct sk_buff *skb, __u32 cookie)
X {
X __u32 seq;
X __u32 mssind;
X
- if ((jiffies - tcp_lastsynq_overflow) > TCP_TIMEOUT_INIT)
- return 0;
-
X seq = ntohl(skb->h.th->seq)-1;
X mssind = check_tcp_syn_cookie(cookie,
X skb->nh.iph->saddr, skb->nh.iph->daddr,
@@ -134,6 +131,8 @@
X return sk;
X if (!skb->h.th->ack)
X return sk;
+ if (time_after(jiffies, sk->tp_pinfo.af_tcp.last_synq_overflow + TCP_TIMEOUT_INIT))
+ return 0;
X
X mss = cookie_check(skb, cookie);
X if (mss == 0) {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/sysctl_net_ipv4.c linux/net/ipv4/sysctl_net_ipv4.c
--- v2.2.19/net/ipv4/sysctl_net_ipv4.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/sysctl_net_ipv4.c Wed Oct 10 01:42:08 2001


@@ -1,7 +1,7 @@
X /*

X * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
X *
- * $Id: sysctl_net_ipv4.c,v 1.38.2.4 2000/09/16 09:40:00 davem Exp $
+ * $Id: sysctl_net_ipv4.c,v 1.38.2.5 2001/02/09 08:43:58 davem Exp $
X *
X * Begun April 1, 1996, Mike Shaver.
X * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- v2.2.19/net/ipv4/tcp.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/tcp.c Wed Oct 10 01:42:09 2001
@@ -5,7 +5,7 @@
X *
X * Implementation of the Transmission Control Protocol(TCP).
X *
- * Version: $Id: tcp.c,v 1.140.2.16 2001/01/04 05:28:46 davem Exp $
+ * Version: $Id: tcp.c,v 1.140.2.17 2001/02/20 04:21:46 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- v2.2.19/net/ipv4/tcp_input.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv4/tcp_input.c Wed Oct 10 01:42:10 2001
@@ -5,7 +5,7 @@
X *
X * Implementation of the Transmission Control Protocol(TCP).
X *
- * Version: $Id: tcp_input.c,v 1.164.2.21 2001/03/06 05:39:39 davem Exp $
+ * Version: $Id: tcp_input.c,v 1.164.2.25 2001/05/24 22:33:21 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
@@ -734,8 +734,6 @@
X if (tp->retransmits) {
X if (tp->packets_out == 0) {
X tp->retransmits = 0;
- tp->fackets_out = 0;
- tp->retrans_out = 0;
X tp->backoff = 0;
X tcp_set_rto(tp);
X } else {
@@ -782,8 +780,10 @@
X if(sk->zapped)
X return(1); /* Dead, can't ack any more so why bother */
X
- if (tp->pending == TIME_KEEPOPEN)
+ if (tp->pending == TIME_KEEPOPEN) {
X tp->probes_out = 0;
+ tp->pending = 0;
+ }
X
X tp->rcv_tstamp = tcp_time_stamp;
X
@@ -851,8 +851,6 @@
X if (tp->retransmits) {
X if (tp->packets_out == 0) {
X tp->retransmits = 0;
- tp->fackets_out = 0;
- tp->retrans_out = 0;
X }
X } else {
X /* We don't have a timestamp. Can only use
@@ -879,6 +877,8 @@
X tcp_ack_packets_out(sk, tp);
X } else {
X tcp_clear_xmit_timer(sk, TIME_RETRANS);
+ tp->fackets_out = 0;
+ tp->retrans_out = 0;
X }
X
X flag &= (FLAG_DATA | FLAG_WIN_UPDATE);
@@ -1441,8 +1441,8 @@
X if (!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) {
X /* A retransmit, 2nd most common case. Force an imediate ack. */
X SOCK_DEBUG(sk, "retransmit received: seq %X\n", TCP_SKB_CB(skb)->seq);
- tcp_enter_quickack_mode(tp);
X out_of_window:
+ tcp_enter_quickack_mode(tp);
X tp->delayed_acks++;
X kfree_skb(skb);
X return;
@@ -1538,7 +1538,7 @@
X skb_pull(skb, th->doff*4);
X skb_trim(skb, len - (th->doff*4));
X
- if (skb->len == 0 && !th->fin)
+ if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq)
X return(0);
X
X /*
@@ -1961,7 +1961,7 @@
X * Dave!!! Phrase above (and all about rcv_mss) has
X * nothing to do with reality. rcv_mss must measure TOTAL
X * size, including sacks, IP options etc. Hence, measure_rcv_mss
- * must occure before pulling etc, otherwise it will flap
+ * must occur before pulling etc, otherwise it will flap
X * like hell. Even putting it before tcp_data is wrong,
X * it should use skb->tail - skb->nh.raw instead.
X * --ANK (980805)
@@ -2280,10 +2280,8 @@
X tcp_sync_mss(sk, tp->pmtu_cookie);
X tp->rcv_mss = tp->mss_cache;
X
- if (sk->state == TCP_SYN_RECV)
- goto discard;
-
- goto step6;
+ /* Discard data/urg received with SYN. Safety is the first. */
+ goto discard;
X }
X
X /* Parse the tcp_options present on this header.
@@ -2418,7 +2416,6 @@
X } else
X goto discard;
X
-step6:
X /* step 6: check the URG bit */
X tcp_urg(sk, th, len);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- v2.2.19/net/ipv4/tcp_output.c Sun Mar 25 17:31:12 2001
+++ linux/net/ipv4/tcp_output.c Wed Oct 10 01:42:10 2001
@@ -5,7 +5,7 @@
X *
X * Implementation of the Transmission Control Protocol(TCP).
X *
- * Version: $Id: tcp_output.c,v 1.108.2.11 2000/11/10 12:43:29 davem Exp $
+ * Version: $Id: tcp_output.c,v 1.108.2.12 2001/04/10 19:58:44 davem Exp $
X *
X * Authors: Ross Biro, <bi...@leland.Stanford.Edu>
X * Fred N. van Kempen, <wal...@uWalt.NL.Mugnet.ORG>
@@ -547,6 +547,8 @@
X */
X kfree_skb(next_skb);
X sk->tp_pinfo.af_tcp.packets_out--;
+ if (sk->tp_pinfo.af_tcp.fackets_out)
+ sk->tp_pinfo.af_tcp.fackets_out--;
X }
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv6/ip6_fib.c linux/net/ipv6/ip6_fib.c
--- v2.2.19/net/ipv6/ip6_fib.c Sun Mar 25 17:31:13 2001
+++ linux/net/ipv6/ip6_fib.c Wed Oct 10 01:42:10 2001
@@ -5,7 +5,7 @@
X * Authors:
X * Pedro Roque <ro...@di.fc.ul.pt>
X *
- * $Id: ip6_fib.c,v 1.17 1999/04/22 10:07:41 davem Exp $
+ * $Id: ip6_fib.c,v 1.17.2.1 2001/06/07 06:47:54 davem Exp $
X *
X * This program is free software; you can redistribute it and/or
X * modify it under the terms of the GNU General Public License


@@ -179,7 +179,7 @@
X

X xb = ntohl(xb);
X
- while (test_bit(j, &xb) == 0)
+ while ((xb & (1 << j)) == 0)
X j--;
X
X return (i * 32 + 31 - j);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv6/ip6_input.c linux/net/ipv6/ip6_input.c
--- v2.2.19/net/ipv6/ip6_input.c Sun Mar 25 17:31:13 2001
+++ linux/net/ipv6/ip6_input.c Wed Oct 10 01:42:11 2001
@@ -6,7 +6,7 @@
X * Pedro Roque <ro...@di.fc.ul.pt>
X * Ian P. Morris <I.P.M...@soton.ac.uk>
X *
- * $Id: ip6_input.c,v 1.11.2.2 2000/09/13 01:27:53 davem Exp $
+ * $Id: ip6_input.c,v 1.11.2.3 2001/06/07 06:47:54 davem Exp $
X *
X * Based in linux/net/ipv4/ip_input.c
X *
@@ -97,10 +97,14 @@
X {
X struct icmp6hdr *icmph;
X struct raw6_opt *opt;
+ int bit_nr;
X
X opt = &sk->tp_pinfo.tp_raw;
X icmph = (struct icmp6hdr *) skb->h.raw;
- return test_bit(icmph->icmp6_type, &opt->filter);
+ bit_nr = icmph->icmp6_type;
+ if (bit_nr >= (8 * 32))
+ return 0;
+ return ((opt->filter.data[bit_nr >> 5] & (1 << bit_nr)) != 0);
X }
X
X /*
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv6/ipv6_sockglue.c linux/net/ipv6/ipv6_sockglue.c
--- v2.2.19/net/ipv6/ipv6_sockglue.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv6/ipv6_sockglue.c Wed Oct 10 01:42:11 2001
@@ -7,7 +7,7 @@
X *
X * Based on linux/net/ipv4/ip_sockglue.c
X *
- * $Id: ipv6_sockglue.c,v 1.27 1999/04/22 10:07:43 davem Exp $
+ * $Id: ipv6_sockglue.c,v 1.27.2.2 2001/02/21 01:08:55 davem Exp $
X *
X * This program is free software; you can redistribute it and/or
X * modify it under the terms of the GNU General Public License
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv6/ndisc.c linux/net/ipv6/ndisc.c
--- v2.2.19/net/ipv6/ndisc.c Sun Mar 25 17:31:13 2001
+++ linux/net/ipv6/ndisc.c Wed Oct 10 01:42:11 2001
@@ -364,9 +364,23 @@
X struct nd_msg *msg;
X int len;
X int err;
+ int send_llinfo;
+
+ if (saddr == NULL) {
+ struct inet6_ifaddr *ifa;
+
+ /* use link local address */
+ ifa = ipv6_get_lladdr(dev);
+
+ if (ifa)
+ saddr = &ifa->addr;
+ else
+ return;
+ }
X
X len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
- if (dev->addr_len)
+ send_llinfo = dev->addr_len && ipv6_addr_type(saddr) != IPV6_ADDR_ANY;
+ if (send_llinfo)
X len += NDISC_OPT_SPACE(dev->addr_len);
X
X skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
@@ -376,15 +390,6 @@
X return;
X }
X
- if (saddr == NULL) {
- struct inet6_ifaddr *ifa;
-
- /* use link local address */
- ifa = ipv6_get_lladdr(dev);
-
- if (ifa)
- saddr = &ifa->addr;
- }
X
X if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) {
X kfree_skb(skb);
@@ -402,7 +407,7 @@
X /* Set the target address. */
X ipv6_addr_copy(&msg->target, solicit);
X
- if (dev->addr_len)
+ if (send_llinfo)
X ndisc_fill_option((void*)&msg->opt, ND_OPT_SOURCE_LL_ADDR, dev->dev_addr, dev->addr_len);
X
X /* checksum */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/ipv6/raw.c linux/net/ipv6/raw.c
--- v2.2.19/net/ipv6/raw.c Sun Mar 25 17:37:41 2001
+++ linux/net/ipv6/raw.c Wed Oct 10 01:42:11 2001
@@ -7,7 +7,7 @@
X *
X * Adapted from linux/net/ipv4/raw.c
X *
- * $Id: raw.c,v 1.24.2.1 1999/06/20 20:14:58 davem Exp $
+ * $Id: raw.c,v 1.24.2.2 2001/02/20 04:21:47 davem Exp $
X *
X * This program is free software; you can redistribute it and/or
X * modify it under the terms of the GNU General Public License
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/rose/af_rose.c linux/net/rose/af_rose.c
--- v2.2.19/net/rose/af_rose.c Sun Mar 25 17:37:41 2001
+++ linux/net/rose/af_rose.c Wed Oct 10 01:42:11 2001
@@ -21,6 +21,9 @@
X * Implemented idle timer.
X * Added use count to neighbour.
X * Tomi(OH2BNS) Fixed rose_getname().
+ *
+ * ROSE 0.63 Jean-Paul(F6FBB) Fixed wrong length of L3 packets
+ * Added CLEAR_REQUEST facilities
X */
X
X #include <linux/config.h>
@@ -1503,7 +1506,7 @@
X
X sock_register(&rose_family_ops);
X register_netdevice_notifier(&rose_dev_notifier);
- printk(KERN_INFO "F6FBB/G4KLX ROSE for Linux. Version 0.62 for AX25.037 Linux 2.1\n");
+ printk(KERN_INFO "F6FBB/G4KLX ROSE for Linux. Version 0.63 for AX25.037 Linux 2.2\n");
X
X ax25_protocol_register(AX25_P_ROSE, rose_route_frame);
X ax25_linkfail_register(rose_link_failed);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/rose/rose_link.c linux/net/rose/rose_link.c
--- v2.2.19/net/rose/rose_link.c Sun Mar 25 17:31:13 2001
+++ linux/net/rose/rose_link.c Wed Oct 10 01:42:11 2001
@@ -266,15 +266,21 @@
X struct sk_buff *skb;
X unsigned char *dptr;
X int len;
+ struct device *first;
+ int faclen = 0;
X
X len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 3;
X
- if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)
+ first = rose_dev_first();
+ if (first)
+ faclen = 6 + AX25_ADDR_LEN + 3 + ROSE_ADDR_LEN;
+
+ if ((skb = alloc_skb(len + faclen, GFP_ATOMIC)) == NULL)
X return;
X
X skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN);
X
- dptr = skb_put(skb, ROSE_MIN_LEN + 3);
+ dptr = skb_put(skb, ROSE_MIN_LEN + 3 + faclen);
X
X *dptr++ = AX25_P_ROSE;
X *dptr++ = ((lci >> 8) & 0x0F) | ROSE_GFI;
@@ -282,6 +288,21 @@
X *dptr++ = ROSE_CLEAR_REQUEST;
X *dptr++ = cause;
X *dptr++ = diagnostic;
+
+ if (first) {
+ *dptr++ = 0x00; /* Address length */
+ *dptr++ = 4 + AX25_ADDR_LEN + 3 + ROSE_ADDR_LEN; /* Facilities length */
+ *dptr++ = 0;
+ *dptr++ = FAC_NATIONAL;
+ *dptr++ = FAC_NATIONAL_FAIL_CALL;
+ *dptr++ = AX25_ADDR_LEN;
+ memcpy(dptr, &rose_callsign, AX25_ADDR_LEN);
+ dptr += AX25_ADDR_LEN;
+ *dptr++ = FAC_NATIONAL_FAIL_ADD;
+ *dptr++ = ROSE_ADDR_LEN + 1;
+ *dptr++ = ROSE_ADDR_LEN * 2;
+ memcpy(dptr, first->dev_addr, ROSE_ADDR_LEN);
+ }
X
X if (!rose_send_frame(skb, neigh))
X kfree_skb(skb);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/rose/rose_subr.c linux/net/rose/rose_subr.c
--- v2.2.19/net/rose/rose_subr.c Sun Mar 25 17:31:13 2001
+++ linux/net/rose/rose_subr.c Wed Oct 10 01:42:11 2001
@@ -121,9 +121,10 @@
X unsigned char lci1, lci2;
X char buffer[100];
X int len, faclen = 0;
+ int ax25_header_len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 1;
X
- len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 1;
-
+ len = ax25_header_len + ROSE_MIN_LEN;
+
X switch (frametype) {
X case ROSE_CALL_REQUEST:
X len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN;
@@ -131,10 +132,27 @@
X len += faclen;
X break;
X case ROSE_CALL_ACCEPTED:
- case ROSE_CLEAR_REQUEST:
X case ROSE_RESET_REQUEST:
X len += 2;
X break;
+ case ROSE_CLEAR_REQUEST:
+ len += 3;
+ /* facilities */
+ faclen = 3 + 2 + AX25_ADDR_LEN + 3 + ROSE_ADDR_LEN;
+ dptr = buffer;
+ *dptr++ = faclen-1; /* Facilities length */
+ *dptr++ = 0;
+ *dptr++ = FAC_NATIONAL;
+ *dptr++ = FAC_NATIONAL_FAIL_CALL;
+ *dptr++ = AX25_ADDR_LEN;
+ memcpy(dptr, &rose_callsign, AX25_ADDR_LEN);
+ dptr += AX25_ADDR_LEN;
+ *dptr++ = FAC_NATIONAL_FAIL_ADD;
+ *dptr++ = ROSE_ADDR_LEN + 1;
+ *dptr++ = ROSE_ADDR_LEN * 2;
+ memcpy(dptr, &sk->protinfo.rose->source_addr, ROSE_ADDR_LEN);
+ len += faclen;
+ break;
X }
X
X if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)


@@ -143,9 +161,9 @@
X /*

X * Space for AX.25 header and PID.
X */
- skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 1);
+ skb_reserve(skb, ax25_header_len);
X
- dptr = skb_put(skb, skb_tailroom(skb));
+ dptr = skb_put(skb, len - ax25_header_len);
X
X lci1 = (sk->protinfo.rose->lci >> 8) & 0x0F;
X lci2 = (sk->protinfo.rose->lci >> 0) & 0xFF;
@@ -179,6 +197,9 @@
X *dptr++ = frametype;
X *dptr++ = sk->protinfo.rose->cause;
X *dptr++ = sk->protinfo.rose->diagnostic;
+ *dptr++ = 0x00; /* Address length */
+ memcpy(dptr, buffer, faclen);
+ dptr += faclen;
X break;
X
X case ROSE_RESET_REQUEST:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/sunrpc/sched.c linux/net/sunrpc/sched.c
--- v2.2.19/net/sunrpc/sched.c Sun Mar 25 17:37:42 2001
+++ linux/net/sunrpc/sched.c Wed Oct 31 14:16:00 2001
@@ -77,7 +77,7 @@
X * This is the last-ditch buffer for NFS swap requests
X */
X static u32 swap_buffer[PAGE_SIZE >> 2];
-static int swap_buffer_used = 0;
+static long swap_buffer_used = 0;
X
X /*
X * Make allocation of the swap_buffer SMP-safe
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/net/sunrpc/xprt.c linux/net/sunrpc/xprt.c
--- v2.2.19/net/sunrpc/xprt.c Sun Mar 25 17:37:42 2001
+++ linux/net/sunrpc/xprt.c Wed Oct 10 01:42:12 2001
@@ -1145,9 +1145,11 @@
X unsigned long oldflags;
X spin_lock_irqsave(&xprt_sock_lock, oldflags);
X xprt->snd_task = NULL;
- if (!rpc_wake_up_next(&xprt->sending) && xprt->stream)
+ if (!rpc_wake_up_next(&xprt->sending) && xprt->stream) {
+ spin_unlock_irqrestore(&xprt_sock_lock, oldflags);
X xprt_add_tcp_timer(xprt, RPCXPRT_TIMEOUT);
- spin_unlock_irqrestore(&xprt_sock_lock, oldflags);
+ } else
+ spin_unlock_irqrestore(&xprt_sock_lock, oldflags);
X }
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/scripts/lxdialog/checklist.c linux/scripts/lxdialog/checklist.c
--- v2.2.19/scripts/lxdialog/checklist.c Sun Mar 25 17:37:42 2001
+++ linux/scripts/lxdialog/checklist.c Wed Oct 10 01:42:13 2001
@@ -211,13 +211,15 @@
X status[i+scroll], i, i == choice);
X }
X
- wnoutrefresh (list);
-
X print_arrows(dialog, choice, item_no, scroll,
X box_y, box_x + check_x + 5, list_height);
X
X print_buttons(dialog, height, width, 0);
X
+ wnoutrefresh (list);
+ wnoutrefresh (dialog);
+ doupdate ();
+
X while (key != ESC) {
X key = wgetch (list);
X
@@ -355,7 +357,11 @@
X case ESC:
X break;
X }
+
+ /* Now, update everything... */
+ doupdate ();
X }
+
X
X delwin (dialog);
X free (status);
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/scripts/ver_linux linux/scripts/ver_linux
--- v2.2.19/scripts/ver_linux Sun Mar 25 17:37:42 2001
+++ linux/scripts/ver_linux Mon Oct 22 10:40:38 2001
@@ -20,11 +20,13 @@
X ld -v 2>&1 | awk -F\) '{print $1}' | awk \
X '/BFD/{print "binutils ",$NF}'
X
-mount --version | awk -F\- '{print "util-linux ", $NF}'
+fdformat --version | awk -F\- '{print "util-linux ", $NF}'
+
+mount --version | awk -F\- '{print "mount ", $NF}'
X
X insmod -V 2>&1 | awk 'NR==1 {print "modutils ",$NF}'
X
-tune2fs 2>&1 | grep tune2fs | sed 's/,//' | awk \
+tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \
X 'NR==1 {print "e2fsprogs ", $2}'
X
X reiserfsck 2>&1 | grep reiserfsprogs | awk \
@@ -64,5 +66,7 @@
X
X expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}'
X
-X=`cat /proc/modules | sed -e "s/ .*$//"`
-echo "Modules Loaded "$X
+if [ -e /proc/modules ]; then
+ X=`cat /proc/modules | sed -e "s/ .*$//"`
+ echo "Modules Loaded "$X
+fi


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'

echo 'File patch-2.2.20 is complete' &&
chmod 644 patch-2.2.20 ||


echo 'restore of patch-2.2.20 failed'

Cksum="`cksum < 'patch-2.2.20'`"
if ! test "1620627927 4820629" = "$Cksum" ; then
echo 'patch-2.2.20: original Checksum 1620627927 4820629, current one' "$Cksum"
rm -f _shar_wnt_.tmp
rm -f _shar_seq_.tmp
exit 1
fi
rm -f _shar_wnt_.tmp
fi
rm -f _shar_seq_.tmp
echo 'You have unpacked the last part.'
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:20 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part81

#!/bin/sh -x
# this is part 81 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 81; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X }
X
-/* Warn that an error occured. */
+/* Warn that an error occurred. */
X void ntfs_error(const char *fmt,...)
X {
X va_list ap;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/open.c linux/fs/open.c
--- v2.2.19/fs/open.c Sun Mar 25 17:37:38 2001
+++ linux/fs/open.c Wed Oct 10 01:41:42 2001
@@ -305,9 +305,15 @@
X res = PTR_ERR(dentry);
X if (!IS_ERR(dentry)) {
X res = permission(dentry->d_inode, mode);
- /* SuS v2 requires we report a read only fs too */
- if(!res && (mode & S_IWOTH) && IS_RDONLY(dentry->d_inode))
- res = -EROFS;
+
+ /* SUSv2 says to return EROFS for open() and access()
+ for files on a read-only filesystem, when writing
+ is requested. Clearly, we want to be able to run
+ a system from read-only media, so should not
+ interpret this to mean that open("/dev/tty") should
+ fail when the device node lives on a CDROM.
+ In other words, no additional check is needed here. */
+
X dput(dentry);
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/proc/mem.c linux/fs/proc/mem.c
--- v2.2.19/fs/proc/mem.c Sun Mar 25 17:30:58 2001
+++ linux/fs/proc/mem.c Wed Oct 10 01:41:42 2001
@@ -62,7 +62,7 @@
X * that we would allow ptrace to work.
X */
X if (tsk) {
- if (!(tsk->flags & PF_PTRACED)
+ if (!(tsk->ptrace & PT_PTRACED)
X || tsk->state != TASK_STOPPED
X || tsk->p_pptr != current)
X tsk = NULL;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/smbfs/ChangeLog linux/fs/smbfs/ChangeLog
--- v2.2.19/fs/smbfs/ChangeLog Sun Mar 25 17:37:38 2001
+++ linux/fs/smbfs/ChangeLog Wed Oct 10 01:41:42 2001
@@ -1,5 +1,16 @@
X ChangeLog for smbfs.
X
+2001-05-24 Urban Widmark <ur...@teststation.com>
+
+ * proc.c: fix smb_proc_open to allow open being called more than once
+ with different modes (O_RDONLY -> O_WRONLY) without closing.
+ (bugfix from 2.4.3, fix by Michael Kockelkorn)
+ * inode.c: tail -f fix for non-readonly opened files
+ (related to the smb_proc_open change).
+ (bugfix from 2.4.3)
+ * inode.c: tail -f fix for fast size changes with the same mtime.
+ (bugfix from 2.4.3)
+
X 2000-11-22 Igor Zhbanov <b...@uniyar.ac.ru>
X
X * proc.c: fixed date_unix2dos for dates earlier than 01/01/1980
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/smbfs/inode.c linux/fs/smbfs/inode.c
--- v2.2.19/fs/smbfs/inode.c Sun Mar 25 17:30:59 2001
+++ linux/fs/smbfs/inode.c Wed Oct 10 01:41:43 2001
@@ -242,21 +242,12 @@
X {
X struct inode *inode = dentry->d_inode;
X time_t last_time;
+ off_t last_sz;
X int error = 0;
X
X DEBUG1("\n");
X
X /*
- * If this is a file opened with write permissions,
- * the inode will be up-to-date.
- */
- if (S_ISREG(inode->i_mode) && smb_is_open(inode))
- {
- if (inode->u.smbfs_i.access != SMB_O_RDONLY)
- goto out;
- }
-
- /*
X * Check whether we've recently refreshed the inode.
X */
X if (time_before(jiffies, inode->u.smbfs_i.oldmtime + HZ/10))
@@ -271,8 +262,9 @@
X * (Note: a size change should have a different mtime.)
X */
X last_time = inode->i_mtime;
+ last_sz = inode->i_size;
X error = smb_refresh_inode(dentry);
- if (error || inode->i_mtime != last_time)
+ if (error || inode->i_mtime != last_time || inode->i_size != last_sz)
X {
X VERBOSE("%s/%s changed, old=%ld, new=%ld\n",
X DENTRY_PATH(dentry),
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/smbfs/proc.c linux/fs/smbfs/proc.c
--- v2.2.19/fs/smbfs/proc.c Sun Mar 25 17:37:39 2001
+++ linux/fs/smbfs/proc.c Wed Oct 10 01:41:43 2001
@@ -609,7 +609,7 @@
X * Check for a valid connection.
X */
X if (server->state == CONN_VALID) {
- PARANOIA("sucessful, new pid=%d, generation=%d\n",
+ PARANOIA("successful, new pid=%d, generation=%d\n",
X server->conn_pid, server->generation);
X result = 1;
X }
@@ -890,8 +890,6 @@
X /* smb_vwv2 has mtime */
X /* smb_vwv4 has size */
X ino->u.smbfs_i.access = (WVAL(server->packet, smb_vwv6) & SMB_ACCMASK);
- if (!(wish & (O_WRONLY | O_RDWR)))
- ino->u.smbfs_i.access = SMB_O_RDONLY;
X ino->u.smbfs_i.open = server->generation;
X
X out:
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/fs/super.c linux/fs/super.c
--- v2.2.19/fs/super.c Sun Mar 25 17:30:58 2001
+++ linux/fs/super.c Wed Oct 10 01:41:43 2001
@@ -589,7 +589,7 @@
X * filesystems which don't use real block-devices. -- jrs
X */
X
-static unsigned int unnamed_dev_in_use[256/(8*sizeof(unsigned int))] = { 0, };
+static unsigned long unnamed_dev_in_use[256/(8*sizeof(unsigned long))] = { 0, };
X
X kdev_t get_unnamed_dev(void)
X {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-alpha/pci.h linux/include/asm-alpha/pci.h
--- v2.2.19/include/asm-alpha/pci.h Sun Mar 25 17:31:06 2001
+++ linux/include/asm-alpha/pci.h Wed Oct 10 01:41:45 2001
@@ -53,4 +53,13 @@
X #define IOBASE_SPARSE_IO 3
X #define IOBASE_DENSE_IO 4
X
+/* Return the index of the PCI controller for device PDEV. */
+static __inline__ int pci_controller_num(struct pci_dev *pdev)
+{
+ if (bus2hose[pdev->bus->number] == NULL)
+ return -ENXIO;
+
+ return bus2hose[pdev->bus->number]->pci_host_index;
+}
+
X #endif /* __ALPHA_PCI_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-alpha/resource.h linux/include/asm-alpha/resource.h
--- v2.2.19/include/asm-alpha/resource.h Sun Mar 25 17:31:06 2001
+++ linux/include/asm-alpha/resource.h Wed Oct 10 01:41:45 2001
@@ -25,7 +25,7 @@
X {LONG_MAX, LONG_MAX}, /* RLIMIT_CPU */ \
X {LONG_MAX, LONG_MAX}, /* RLIMIT_FSIZE */ \
X {LONG_MAX, LONG_MAX}, /* RLIMIT_DATA */ \
- {_STK_LIM, _STK_LIM}, /* RLIMIT_STACK */ \
+ {_STK_LIM, LONG_MAX}, /* RLIMIT_STACK */ \
X { 0, LONG_MAX}, /* RLIMIT_CORE */ \
X {LONG_MAX, LONG_MAX}, /* RLIMIT_RSS */ \
X {INR_OPEN, INR_OPEN}, /* RLIMIT_NOFILE */ \
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-arm/pci.h linux/include/asm-arm/pci.h
--- v2.2.19/include/asm-arm/pci.h Thu Jan 1 01:00:00 1970
+++ linux/include/asm-arm/pci.h Wed Oct 10 01:41:45 2001
@@ -0,0 +1,7 @@
+#ifndef _ARM_PCI_H
+#define _ARM_PCI_H
+
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV) (0)
+
+#endif /* !(_ARM_PCI_H) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-i386/pci.h linux/include/asm-i386/pci.h
--- v2.2.19/include/asm-i386/pci.h Thu Jan 1 01:00:00 1970
+++ linux/include/asm-i386/pci.h Wed Oct 10 01:41:46 2001
@@ -0,0 +1,7 @@
+#ifndef _I386_PCI_H
+#define _I386_PCI_H
+
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV) (0)
+
+#endif /* !(_I386_PCI_H) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-m68k/entry.h linux/include/asm-m68k/entry.h
--- v2.2.19/include/asm-m68k/entry.h Sun Mar 25 17:31:07 2001
+++ linux/include/asm-m68k/entry.h Wed Oct 10 01:41:46 2001
@@ -52,12 +52,12 @@
X LSIGTRAP = 5
X
X /* process bits for task_struct.flags */
-PF_TRACESYS_OFF = 3
-PF_TRACESYS_BIT = 5
-PF_PTRACED_OFF = 3
-PF_PTRACED_BIT = 4
-PF_DTRACE_OFF = 1
-PF_DTRACE_BIT = 5
+PT_TRACESYS_OFF = 3
+PT_TRACESYS_BIT = 5
+PT_PTRACED_OFF = 3
+PT_PTRACED_BIT = 4
+PT_DTRACE_OFF = 1
+PT_DTRACE_BIT = 5
X
X #define SAVE_ALL_INT save_all_int
X #define SAVE_ALL_SYS save_all_sys
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-mips/offset.h linux/include/asm-mips/offset.h
--- v2.2.19/include/asm-mips/offset.h Sun Mar 25 17:31:06 2001
+++ linux/include/asm-mips/offset.h Wed Oct 10 01:41:47 2001
@@ -49,9 +49,10 @@
X #define TASK_FLAGS 4
X #define TASK_SIGPENDING 8
X #define TASK_NEED_RESCHED 20
-#define TASK_COUNTER 24
-#define TASK_PRIORITY 28
-#define TASK_MM 920
+#define TASK_PTRACE 24
+#define TASK_COUNTER 28
+#define TASK_PRIORITY 32
+#define TASK_MM 924
X
X /* MIPS specific thread_struct offsets. */
X #define THREAD_REG16 560
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-mips/pci.h linux/include/asm-mips/pci.h
--- v2.2.19/include/asm-mips/pci.h Sun Mar 25 17:31:06 2001
+++ linux/include/asm-mips/pci.h Wed Oct 10 01:41:47 2001
@@ -39,4 +39,7 @@
X
X extern struct pci_ops *pci_ops;
X
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV) (0)
+
X #endif /* __ASM_MIPS_PCI_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-ppc/pci.h linux/include/asm-ppc/pci.h
--- v2.2.19/include/asm-ppc/pci.h Sun Mar 25 17:31:09 2001
+++ linux/include/asm-ppc/pci.h Wed Oct 10 01:41:48 2001
@@ -9,5 +9,7 @@
X #define IOBASE_MEMORY 1
X #define IOBASE_IO 2
X
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV) (0)
X
X #endif
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/bitops.h linux/include/asm-s390/bitops.h
--- v2.2.19/include/asm-s390/bitops.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/bitops.h Wed Oct 10 01:41:49 2001
@@ -841,7 +841,7 @@
X " icm %0,2,1(%1)\n"
X " icm %0,4,2(%1)\n"
X " icm %0,8,3(%1)"
- : "=&a" (word) : "a" (p) );
+ : "=&a" (word) : "a" (p) : "cc" );
X word >>= bit;
X res = bit;
X /* Look for zero in first longword */
@@ -857,7 +857,7 @@
X "1: nr %1,0\n"
X " ic %1,0(%1,%2)\n"
X " alr %0,%1"
- : "+&d" (res), "+&d" (word)
+ : "+&d" (res), "+&a" (word)
X : "a" (&_zb_findmap)
X : "cc", "0" );
X if (res < 32)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/byteorder.h linux/include/asm-s390/byteorder.h
--- v2.2.19/include/asm-s390/byteorder.h Sun Mar 25 17:31:10 2001
+++ linux/include/asm-s390/byteorder.h Wed Oct 10 01:41:49 2001
@@ -23,7 +23,7 @@
X " icm %0,4,2(%1)\n"
X " icm %0,2,1(%1)\n"
X " ic %0,0(%1)"
- : "+&d" (x) : "a" (&temp) : "memory" );
+ : "+&d" (x) : "a" (&temp) : "memory", "cc" );
X return x;
X }
X
@@ -36,7 +36,7 @@
X " icm %0,4,2(%1)\n"
X " icm %0,2,1(%1)\n"
X " ic %0,0(%1)"
- : "=&d" (result) : "a" (x) );
+ : "=&d" (result) : "a" (x) : "cc" );


X return result;
X }
X

@@ -48,7 +48,7 @@
X " icm 0,2,1(%0)\n"
X " ic 0,0(%0)\n"
X " st 0,0(%0)"
- : : "a" (x) : "0", "memory");
+ : : "a" (x) : "0", "memory", "cc" );
X }
X
X static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
@@ -59,7 +59,7 @@
X " sth %0,0(%1)\n"
X " icm %0,2,1(%1)\n"
X " ic %0,0(%1)\n"
- : "+&d" (x) : "a" (&temp) : "memory");
+ : "+&d" (x) : "a" (&temp) : "memory", "cc" );
X return x;
X }
X
@@ -71,7 +71,7 @@
X " sr %0,%0\n"
X " icm %0,2,1(%1)\n"
X " ic %0,0(%1)\n"
- : "=&d" (result) : "a" (x) );
+ : "=&d" (result) : "a" (x) : "cc" );


X return result;
X }
X

@@ -81,7 +81,7 @@
X " icm 0,2,1(%0)\n"
X " ic 0,0(%0)\n"
X " sth 0,0(%0)"
- : : "a" (x) : "0", "memory");
+ : : "a" (x) : "0", "memory", "cc" );
X }
X
X #define __arch__swab32(x) ___arch__swab32(x)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/ccwcache.h linux/include/asm-s390/ccwcache.h
--- v2.2.19/include/asm-s390/ccwcache.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/ccwcache.h Wed Oct 10 01:41:49 2001
@@ -62,7 +62,7 @@
X #define CQR_STATUS_FILLED 0x01 /* request is ready to be preocessed */
X #define CQR_STATUS_QUEUED 0x02 /* request is queued to be processed */
X #define CQR_STATUS_IN_IO 0x04 /* request is currently in IO */
-#define CQR_STATUS_DONE 0x08 /* request is completed sucessfully */
+#define CQR_STATUS_DONE 0x08 /* request is completed successfully */
X #define CQR_STATUS_ERROR 0x10 /* request is completed with error */
X #define CQR_STATUS_FAILED 0x20 /* request is finally failed */
X #define CQR_STATUS_PENDING 0x07 /* request is waiting for interrupt - ERP only */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/current.h linux/include/asm-s390/current.h
--- v2.2.19/include/asm-s390/current.h Sun Mar 25 17:31:10 2001
+++ linux/include/asm-s390/current.h Wed Oct 10 01:41:49 2001
@@ -20,7 +20,7 @@
X struct task_struct *current;
X __asm__("lhi %0,-8192\n\t"
X "nr %0,15"
- : "=&r" (current) );
+ : "=&r" (current) : : "cc" );
X return current;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/debug.h linux/include/asm-s390/debug.h
--- v2.2.19/include/asm-s390/debug.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/debug.h Wed Oct 10 01:41:49 2001
@@ -53,7 +53,7 @@
X #define DEBUG_DATA(entry) (char*)(entry + 1) /* data is stored behind */
X /* the entry information */
X
-#define STCK(x) asm volatile ("STCK %0":"=m" (x))
+#define STCK(x) asm volatile ("STCK %0" : "=m" (x) : : "cc" )
X
X typedef struct __debug_entry debug_entry_t;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/io.h linux/include/asm-s390/io.h
--- v2.2.19/include/asm-s390/io.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/io.h Wed Oct 10 01:41:49 2001
@@ -29,7 +29,7 @@
X " jz 0f\n"
X " sr %0,%0\n"
X "0:"
- : "=a" (real_address) : "a" (address) );
+ : "=a" (real_address) : "a" (address) : "cc" );
X return real_address;
X }
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/irq.h linux/include/asm-s390/irq.h
--- v2.2.19/include/asm-s390/irq.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/irq.h Wed Oct 10 01:41:49 2001
@@ -147,7 +147,7 @@
X
X typedef struct {
X __u8 cmd_code;/* command code */
- __u8 flags; /* flags, like IDA adressing, etc. */
+ __u8 flags; /* flags, like IDA addressing, etc. */
X __u16 count; /* byte count */
X __u32 cda; /* data address */
X } __attribute__ ((packed,aligned(8))) ccw1_t;
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/lowcore.h linux/include/asm-s390/lowcore.h
--- v2.2.19/include/asm-s390/lowcore.h Sun Mar 25 17:31:10 2001
+++ linux/include/asm-s390/lowcore.h Wed Oct 10 01:41:49 2001
@@ -32,9 +32,9 @@
X #define __LC_SUBCHANNEL_NR 0x0BA
X #define __LC_IO_INT_PARM 0x0BC
X #define __LC_MCCK_CODE 0x0E8
-#define __LC_AREGS_SAVE_AREA 0x200
-#define __LC_CREGS_SAVE_AREA 0x240
-#define __LC_RETURN_PSW 0x280
+#define __LC_AREGS_SAVE_AREA 0x120
+#define __LC_CREGS_SAVE_AREA 0x1c0
+#define __LC_RETURN_PSW 0x200
X
X #define __LC_SYNC_IO_WORD 0x400
X
@@ -44,6 +44,7 @@
X #define __LC_CPUID 0xC50
X #define __LC_CPUADDR 0xC58
X #define __LC_IPLDEV 0xC6C
+#define __LC_PANIC_MAGIC 0xE00
X
X
X /* interrupt handler start with all io, external and mcck interrupt disabled */
@@ -126,15 +127,14 @@
X __u32 failing_storage_address; /* 0x0f8 */
X __u8 pad5[0x100-0xfc]; /* 0x0fc */
X __u32 st_status_fixed_logout[4];/* 0x100 */
- __u8 pad6[0x160-0x110]; /* 0x110 */
+ __u8 pad6[0x120-0x110]; /* 0x110 */
+ __u32 access_regs_save_area[16];/* 0x120 */
X __u32 floating_pt_save_area[8]; /* 0x160 */
X __u32 gpregs_save_area[16]; /* 0x180 */
- __u8 pad7[0x200-0x1c0]; /* 0x1c0 */
+ __u32 cregs_save_area[16]; /* 0x1c0 */
X
- __u32 access_regs_save_area[16];/* 0x200 */
- __u32 cregs_save_area[16]; /* 0x240 */
- psw_t return_psw; /* 0x280 */
- __u8 pad8[0x400-0x288]; /* 0x288 */
+ psw_t return_psw; /* 0x200 */
+ __u8 pad8[0x400-0x208]; /* 0x208 */
X
X __u32 sync_io_word; /* 0x400 */
X
@@ -154,9 +154,14 @@
X atomic_t ext_call_fast; /* 0xc78 */
X atomic_t ext_call_queue; /* 0xc7c */
X atomic_t ext_call_count; /* 0xc80 */
+ __u8 pad10[0xe00-0xc84]; /* 0xc84 */
X
- /* Align SMP info to the top 1k of prefix area */
- __u8 pad10[0x1000-0xc84]; /* 0xc84 */
+ /* 0xe00 is used as indicator for dump tools */
+ /* whether the kernel died with panic() or not */
+ __u32 panic_magic; /* 0xe00 */
+
+ /* Align to the top 1k of prefix area */
+ __u8 pad11[0x1000-0xe04]; /* 0xe04 */
X } __attribute__((packed)); /* End structure*/
X
X extern __inline__ void set_prefix(__u32 address)
@@ -176,6 +181,8 @@
X ((cpu)==smp_processor_id() ? S390_lowcore:(*lowcore_ptr[(cpu)]))
X #endif
X #endif /* __ASSEMBLY__ */
+
+#define __PANIC_MAGIC 0xDEADC0DE
X
X #endif
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/pgtable.h linux/include/asm-s390/pgtable.h
--- v2.2.19/include/asm-s390/pgtable.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/pgtable.h Wed Oct 10 01:41:50 2001
@@ -115,7 +115,7 @@
X "lr 4,%2\n\t"
X "csp 2,4" :
X : "d" (cs1), "d" (dum), "d" (adr)
- : "2", "3", "4");
+ : "2", "3", "4", "cc" );
X }
X
X static inline void __flush_global_tlb(void)
@@ -529,7 +529,7 @@
X __asm__ __volatile(" ic 0,2(%0)\n"
X " ipte %1,%2\n"
X " stc 0,2(%0)"
- : : "a" (pte), "a" (pto), "a" (addr): "0");
+ : : "a" (pte), "a" (pto), "a" (addr): "0", "cc" );
X }
X
X /*
@@ -711,10 +711,10 @@
X }
X
X /*
- * a page-table entry has only 19 bit for offset and 7 bit for type
- * if bits 0, 20 or 23 are set, a translation specification exceptions occures, and it's
- * hard to find out the failing address
- * therefor, we zero out this bits
+ * a page-table entry has only 19 bits for offset and 7 bits for type
+ * if bits 0, 20 or 23 are set, a translation specification exception occurs,
+ * and it's hard to find out the failing address
+ * therefore, we zero out these bits
X */
X
X #define SWP_TYPE(entry) (((entry) >> 1) & 0x3f)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/processor.h linux/include/asm-s390/processor.h
--- v2.2.19/include/asm-s390/processor.h Sun Mar 25 17:31:10 2001
+++ linux/include/asm-s390/processor.h Wed Oct 10 01:41:50 2001
@@ -193,7 +193,7 @@
X " stctl 0,15,0x1c0\n" /* store control registers */
X " oi 0x1c0,0x10\n" /* fake protection bit */
X " lpsw 0(%0)"
- : : "a" (dw_psw), "a" (&ctl_buf));
+ : : "a" (dw_psw), "a" (&ctl_buf) : "cc" );
X }
X
X #endif /* __ASM_S390_PROCESSOR_H */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/system.h linux/include/asm-s390/system.h
--- v2.2.19/include/asm-s390/system.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/system.h Wed Oct 10 01:41:51 2001
@@ -50,7 +50,7 @@
X " jl 1b\n"
X " ex 0,4(2)" /* store *ptr to x */
X : "+a&" (ptr) : "a" (&x)
- : "memory", "0", "1", "2");
+ : "memory", "cc", "0", "1", "2");
X break;
X case 2:
X if(((__u32)ptr)&1)
@@ -73,7 +73,7 @@
X " jl 1b\n"
X " ex 0,4(2)" /* store *ptr to x */
X : "+a&" (ptr) : "a" (&x)
- : "memory", "0", "1", "2");
+ : "memory", "cc", "0", "1", "2");
X break;
X case 4:
X if(((__u32)ptr)&3)
@@ -84,7 +84,7 @@
X " jl 0b\n"
X " lr %0,0\n"
X : "+d&" (x) : "a" (ptr)
- : "memory", "0" );
+ : "memory", "cc", "0" );
X break;
X default:
X abort();
@@ -140,7 +140,7 @@
X " st 0,0(1)\n" \
X "1: ex %1,4(2)" /* execute lctl */ \
X : "=m" (dummy) : "a" (cr*17), "a" (1<<(bit)) \
- : "0", "1", "2"); \
+ : "cc", "0", "1", "2"); \
X })
X
X #define __ctl_clear_bit(cr, bit) ({ \
@@ -159,7 +159,7 @@
X " st 0,0(1)\n" \
X "1: ex %1,4(2)" /* execute lctl */ \
X : "=m" (dummy) : "a" (cr*17), "a" (~(1<<(bit))) \
- : "0", "1", "2"); \
+ : "cc", "0", "1", "2"); \
X })
X
X #ifdef __SMP__
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-s390/uaccess.h linux/include/asm-s390/uaccess.h
--- v2.2.19/include/asm-s390/uaccess.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-s390/uaccess.h Wed Oct 10 01:41:51 2001
@@ -104,7 +104,7 @@
X ".previous"
X : "=m" (*((__u32*) ptr)) , "=&d" (err)
X : "d" (x), "K" (-EFAULT)
- : "4" );
+ : "cc", "4" );
X return err;
X }
X
@@ -132,7 +132,7 @@
X ".previous"
X : "=m" (*((__u16*) ptr)) , "=&d" (err)
X : "d" (x), "K" (-EFAULT)
- : "4" );
+ : "cc", "4" );
X return err;
X }
X
@@ -160,7 +160,7 @@
X ".previous"
X : "=m" (*((__u8*) ptr)) , "=&d" (err)
X : "d" (x), "K" (-EFAULT)
- : "4" );
+ : "cc", "4" );
X return err;
X }
X
@@ -225,7 +225,7 @@
X ".previous" \
X : "=d" (x) , "=&d" (err) \
X : "m" (*(const __u32*) ptr), "K" (-EFAULT) \
- : "4" ); \
+ : "cc", "4" ); \
X })
X
X #define __get_user_asm_2(x, ptr, err) \
@@ -250,7 +250,7 @@
X ".previous" \
X : "=d" (x) , "=&d" (err) \
X : "m" (*(const __u16*) ptr), "K" (-EFAULT) \
- : "4" ); \
+ : "cc", "4" ); \
X })
X
X #define __get_user_asm_1(x, ptr, err) \
@@ -276,7 +276,7 @@
X ".previous" \
X : "=d" (x) , "=&d" (err) \
X : "m" (*(const __u8*) ptr), "K" (-EFAULT) \
- : "4" ); \
+ : "cc", "4" ); \
X })
X
X #define __get_user(x, ptr) \
@@ -359,7 +359,7 @@
X " .long 0b,__copy_to_user_fixup\n"
X ".previous"
X : "+&d" (n) : "d" (to), "d" (from)
- : "1", "2", "3", "4", "5" );
+ : "cc", "1", "2", "3", "4", "5" );
X return n;
X }
X
@@ -397,7 +397,7 @@
X " .long 0b,__copy_from_user_fixup\n"
X ".previous"
X : "+&d" (n) : "d" (to), "d" (from)
- : "1", "2", "3", "4", "5" );
+ : "cc", "1", "2", "3", "4", "5" );
X return n;
X }
X
@@ -458,7 +458,7 @@
X : "=&a" (len)
X : "a" (dst), "d" (src), "d" (count),
X "K" (-EFAULT)
- : "2", "3", "4", "memory" );
+ : "2", "3", "4", "memory", "cc" );
X return len;
X }
X
@@ -505,6 +505,7 @@
X : "cc", "0", "4" );
X return n;
X }
+#define strlen_user(str) strnlen_user(str, ~0UL)
X
X /*
X * Zero Userspace
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc/asm_offsets.h linux/include/asm-sparc/asm_offsets.h
--- v2.2.19/include/asm-sparc/asm_offsets.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-sparc/asm_offsets.h Wed Oct 10 01:41:51 2001
@@ -18,147 +18,149 @@
X #define ASIZ_task_exec_domain 0x00000004
X #define AOFF_task_need_resched 0x00000014
X #define ASIZ_task_need_resched 0x00000004
-#define AOFF_task_counter 0x00000018
+#define AOFF_task_ptrace 0x00000018
+#define ASIZ_task_ptrace 0x00000004
+#define AOFF_task_counter 0x0000001c
X #define ASIZ_task_counter 0x00000004
-#define AOFF_task_priority 0x0000001c
+#define AOFF_task_priority 0x00000020
X #define ASIZ_task_priority 0x00000004
-#define AOFF_task_avg_slice 0x00000020
+#define AOFF_task_avg_slice 0x00000024
X #define ASIZ_task_avg_slice 0x00000004
-#define AOFF_task_has_cpu 0x00000024
+#define AOFF_task_has_cpu 0x00000028
X #define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000028
+#define AOFF_task_processor 0x0000002c
X #define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x0000002c
+#define AOFF_task_last_processor 0x00000030
X #define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000030
+#define AOFF_task_lock_depth 0x00000034
X #define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000034
+#define AOFF_task_next_task 0x00000038
X #define ASIZ_task_next_task 0x00000004
-#define AOFF_task_prev_task 0x00000038
+#define AOFF_task_prev_task 0x0000003c
X #define ASIZ_task_prev_task 0x00000004
-#define AOFF_task_next_run 0x0000003c
+#define AOFF_task_next_run 0x00000040
X #define ASIZ_task_next_run 0x00000004
-#define AOFF_task_prev_run 0x00000040
+#define AOFF_task_prev_run 0x00000044
X #define ASIZ_task_prev_run 0x00000004
-#define AOFF_task_task_exclusive 0x00000044
+#define AOFF_task_task_exclusive 0x00000048
X #define ASIZ_task_task_exclusive 0x00000004
-#define AOFF_task_binfmt 0x00000048
+#define AOFF_task_binfmt 0x0000004c
X #define ASIZ_task_binfmt 0x00000004
-#define AOFF_task_exit_code 0x0000004c
+#define AOFF_task_exit_code 0x00000050
X #define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x00000050
+#define AOFF_task_exit_signal 0x00000054
X #define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000054
+#define AOFF_task_pdeath_signal 0x00000058
X #define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000058
+#define AOFF_task_personality 0x0000005c
X #define ASIZ_task_personality 0x00000004
-#define AOFF_task_pid 0x00000060
+#define AOFF_task_pid 0x00000064
X #define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000064
+#define AOFF_task_pgrp 0x00000068
X #define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x00000068
+#define AOFF_task_tty_old_pgrp 0x0000006c
X #define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x0000006c
+#define AOFF_task_session 0x00000070
X #define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x00000070
+#define AOFF_task_leader 0x00000074
X #define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x00000074
+#define AOFF_task_p_opptr 0x00000078
X #define ASIZ_task_p_opptr 0x00000004
-#define AOFF_task_p_pptr 0x00000078
+#define AOFF_task_p_pptr 0x0000007c
X #define ASIZ_task_p_pptr 0x00000004
-#define AOFF_task_p_cptr 0x0000007c
+#define AOFF_task_p_cptr 0x00000080
X #define ASIZ_task_p_cptr 0x00000004
-#define AOFF_task_p_ysptr 0x00000080
+#define AOFF_task_p_ysptr 0x00000084
X #define ASIZ_task_p_ysptr 0x00000004
-#define AOFF_task_p_osptr 0x00000084
+#define AOFF_task_p_osptr 0x00000088
X #define ASIZ_task_p_osptr 0x00000004
-#define AOFF_task_pidhash_next 0x00000088
+#define AOFF_task_pidhash_next 0x0000008c
X #define ASIZ_task_pidhash_next 0x00000004
-#define AOFF_task_pidhash_pprev 0x0000008c
+#define AOFF_task_pidhash_pprev 0x00000090
X #define ASIZ_task_pidhash_pprev 0x00000004
-#define AOFF_task_tarray_ptr 0x00000090
+#define AOFF_task_tarray_ptr 0x00000094
X #define ASIZ_task_tarray_ptr 0x00000004
-#define AOFF_task_wait_chldexit 0x00000094
+#define AOFF_task_wait_chldexit 0x00000098
X #define ASIZ_task_wait_chldexit 0x00000004
-#define AOFF_task_vfork_sem 0x00000098
+#define AOFF_task_vfork_sem 0x0000009c
X #define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_policy 0x0000009c
+#define AOFF_task_policy 0x000000a0
X #define ASIZ_task_policy 0x00000004
-#define AOFF_task_rt_priority 0x000000a0
+#define AOFF_task_rt_priority 0x000000a4
X #define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000a4
+#define AOFF_task_it_real_value 0x000000a8
X #define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000a8
+#define AOFF_task_it_prof_value 0x000000ac
X #define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000ac
+#define AOFF_task_it_virt_value 0x000000b0
X #define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000b0
+#define AOFF_task_it_real_incr 0x000000b4
X #define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000b4
+#define AOFF_task_it_prof_incr 0x000000b8
X #define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000b8
+#define AOFF_task_it_virt_incr 0x000000bc
X #define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000bc
+#define AOFF_task_real_timer 0x000000c0
X #define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000d0
+#define AOFF_task_times 0x000000d4
X #define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000e0
+#define AOFF_task_start_time 0x000000e4
X #define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000e4
+#define AOFF_task_per_cpu_utime 0x000000e8
X #define ASIZ_task_per_cpu_utime 0x00000004
-#define AOFF_task_min_flt 0x000000ec
+#define AOFF_task_min_flt 0x000000f0
X #define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000000f0
+#define AOFF_task_maj_flt 0x000000f4
X #define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x000000f4
+#define AOFF_task_nswap 0x000000f8
X #define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x000000f8
+#define AOFF_task_cmin_flt 0x000000fc
X #define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x000000fc
+#define AOFF_task_cmaj_flt 0x00000100
X #define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000100
+#define AOFF_task_cnswap 0x00000104
X #define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x00000106
+#define AOFF_task_uid 0x0000010a
X #define ASIZ_task_uid 0x00000002
-#define AOFF_task_euid 0x00000108
+#define AOFF_task_euid 0x0000010c
X #define ASIZ_task_euid 0x00000002
-#define AOFF_task_suid 0x0000010a
+#define AOFF_task_suid 0x0000010e
X #define ASIZ_task_suid 0x00000002
-#define AOFF_task_fsuid 0x0000010c
+#define AOFF_task_fsuid 0x00000110
X #define ASIZ_task_fsuid 0x00000002
-#define AOFF_task_gid 0x0000010e
+#define AOFF_task_gid 0x00000112
X #define ASIZ_task_gid 0x00000002
-#define AOFF_task_egid 0x00000110
+#define AOFF_task_egid 0x00000114
X #define ASIZ_task_egid 0x00000002
-#define AOFF_task_sgid 0x00000112
+#define AOFF_task_sgid 0x00000116
X #define ASIZ_task_sgid 0x00000002
-#define AOFF_task_fsgid 0x00000114
+#define AOFF_task_fsgid 0x00000118
X #define ASIZ_task_fsgid 0x00000002
-#define AOFF_task_ngroups 0x00000118
+#define AOFF_task_ngroups 0x0000011c
X #define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x0000011c
+#define AOFF_task_groups 0x00000120
X #define ASIZ_task_groups 0x00000040
-#define AOFF_task_cap_effective 0x0000015c
+#define AOFF_task_cap_effective 0x00000160
X #define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000160
+#define AOFF_task_cap_inheritable 0x00000164
X #define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000164
+#define AOFF_task_cap_permitted 0x00000168
X #define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x0000016c
+#define AOFF_task_user 0x00000170
X #define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000170
+#define AOFF_task_rlim 0x00000174
X #define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x000001c0
+#define AOFF_task_used_math 0x000001c4
X #define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x000001c2
+#define AOFF_task_comm 0x000001c6
X #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x000001d4
+#define AOFF_task_link_count 0x000001d8
X #define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x000001d8
+#define AOFF_task_tty 0x000001dc
X #define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x000001dc
+#define AOFF_task_semundo 0x000001e0
X #define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x000001e0
+#define AOFF_task_semsleeping 0x000001e4
X #define ASIZ_task_semsleeping 0x00000004
X #define AOFF_task_tss 0x000001e8
X #define ASIZ_task_tss 0x00000388
@@ -309,147 +311,149 @@
X #define ASIZ_task_exec_domain 0x00000004
X #define AOFF_task_need_resched 0x00000014
X #define ASIZ_task_need_resched 0x00000004
-#define AOFF_task_counter 0x00000018
+#define AOFF_task_ptrace 0x00000018
+#define ASIZ_task_ptrace 0x00000004
+#define AOFF_task_counter 0x0000001c
X #define ASIZ_task_counter 0x00000004
-#define AOFF_task_priority 0x0000001c
+#define AOFF_task_priority 0x00000020
X #define ASIZ_task_priority 0x00000004
-#define AOFF_task_avg_slice 0x00000020
+#define AOFF_task_avg_slice 0x00000024
X #define ASIZ_task_avg_slice 0x00000004
-#define AOFF_task_has_cpu 0x00000024
+#define AOFF_task_has_cpu 0x00000028
X #define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000028
+#define AOFF_task_processor 0x0000002c
X #define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x0000002c
+#define AOFF_task_last_processor 0x00000030
X #define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000030
+#define AOFF_task_lock_depth 0x00000034
X #define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000034
+#define AOFF_task_next_task 0x00000038
X #define ASIZ_task_next_task 0x00000004
-#define AOFF_task_prev_task 0x00000038
+#define AOFF_task_prev_task 0x0000003c
X #define ASIZ_task_prev_task 0x00000004
-#define AOFF_task_next_run 0x0000003c
+#define AOFF_task_next_run 0x00000040
X #define ASIZ_task_next_run 0x00000004
-#define AOFF_task_prev_run 0x00000040
+#define AOFF_task_prev_run 0x00000044
X #define ASIZ_task_prev_run 0x00000004
-#define AOFF_task_task_exclusive 0x00000044
+#define AOFF_task_task_exclusive 0x00000048
X #define ASIZ_task_task_exclusive 0x00000004
-#define AOFF_task_binfmt 0x00000048
+#define AOFF_task_binfmt 0x0000004c
X #define ASIZ_task_binfmt 0x00000004
-#define AOFF_task_exit_code 0x0000004c
+#define AOFF_task_exit_code 0x00000050
X #define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x00000050
+#define AOFF_task_exit_signal 0x00000054
X #define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000054
+#define AOFF_task_pdeath_signal 0x00000058
X #define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000058
+#define AOFF_task_personality 0x0000005c
X #define ASIZ_task_personality 0x00000004
-#define AOFF_task_pid 0x00000060
+#define AOFF_task_pid 0x00000064
X #define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000064
+#define AOFF_task_pgrp 0x00000068
X #define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x00000068
+#define AOFF_task_tty_old_pgrp 0x0000006c
X #define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x0000006c
+#define AOFF_task_session 0x00000070
X #define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x00000070
+#define AOFF_task_leader 0x00000074
X #define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x00000074
+#define AOFF_task_p_opptr 0x00000078
X #define ASIZ_task_p_opptr 0x00000004
-#define AOFF_task_p_pptr 0x00000078
+#define AOFF_task_p_pptr 0x0000007c
X #define ASIZ_task_p_pptr 0x00000004
-#define AOFF_task_p_cptr 0x0000007c
+#define AOFF_task_p_cptr 0x00000080
X #define ASIZ_task_p_cptr 0x00000004
-#define AOFF_task_p_ysptr 0x00000080
+#define AOFF_task_p_ysptr 0x00000084
X #define ASIZ_task_p_ysptr 0x00000004
-#define AOFF_task_p_osptr 0x00000084
+#define AOFF_task_p_osptr 0x00000088
X #define ASIZ_task_p_osptr 0x00000004
-#define AOFF_task_pidhash_next 0x00000088
+#define AOFF_task_pidhash_next 0x0000008c
X #define ASIZ_task_pidhash_next 0x00000004
-#define AOFF_task_pidhash_pprev 0x0000008c
+#define AOFF_task_pidhash_pprev 0x00000090
X #define ASIZ_task_pidhash_pprev 0x00000004
-#define AOFF_task_tarray_ptr 0x00000090
+#define AOFF_task_tarray_ptr 0x00000094
X #define ASIZ_task_tarray_ptr 0x00000004
-#define AOFF_task_wait_chldexit 0x00000094
+#define AOFF_task_wait_chldexit 0x00000098
X #define ASIZ_task_wait_chldexit 0x00000004
-#define AOFF_task_vfork_sem 0x00000098
+#define AOFF_task_vfork_sem 0x0000009c
X #define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_policy 0x0000009c
+#define AOFF_task_policy 0x000000a0
X #define ASIZ_task_policy 0x00000004
-#define AOFF_task_rt_priority 0x000000a0
+#define AOFF_task_rt_priority 0x000000a4
X #define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000a4
+#define AOFF_task_it_real_value 0x000000a8
X #define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000a8
+#define AOFF_task_it_prof_value 0x000000ac
X #define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000ac
+#define AOFF_task_it_virt_value 0x000000b0
X #define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000b0
+#define AOFF_task_it_real_incr 0x000000b4
X #define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000b4
+#define AOFF_task_it_prof_incr 0x000000b8
X #define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000b8
+#define AOFF_task_it_virt_incr 0x000000bc
X #define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000bc
+#define AOFF_task_real_timer 0x000000c0
X #define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000d0
+#define AOFF_task_times 0x000000d4
X #define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000e0
+#define AOFF_task_start_time 0x000000e4
X #define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000e4
+#define AOFF_task_per_cpu_utime 0x000000e8
X #define ASIZ_task_per_cpu_utime 0x00000080
-#define AOFF_task_min_flt 0x000001e4
+#define AOFF_task_min_flt 0x000001e8
X #define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000001e8
+#define AOFF_task_maj_flt 0x000001ec
X #define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x000001ec
+#define AOFF_task_nswap 0x000001f0
X #define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x000001f0
+#define AOFF_task_cmin_flt 0x000001f4
X #define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x000001f4
+#define AOFF_task_cmaj_flt 0x000001f8
X #define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x000001f8
+#define AOFF_task_cnswap 0x000001fc
X #define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x000001fe
+#define AOFF_task_uid 0x00000202
X #define ASIZ_task_uid 0x00000002
-#define AOFF_task_euid 0x00000200
+#define AOFF_task_euid 0x00000204
X #define ASIZ_task_euid 0x00000002
-#define AOFF_task_suid 0x00000202
+#define AOFF_task_suid 0x00000206
X #define ASIZ_task_suid 0x00000002
-#define AOFF_task_fsuid 0x00000204
+#define AOFF_task_fsuid 0x00000208
X #define ASIZ_task_fsuid 0x00000002
-#define AOFF_task_gid 0x00000206
+#define AOFF_task_gid 0x0000020a
X #define ASIZ_task_gid 0x00000002
-#define AOFF_task_egid 0x00000208
+#define AOFF_task_egid 0x0000020c
X #define ASIZ_task_egid 0x00000002
-#define AOFF_task_sgid 0x0000020a
+#define AOFF_task_sgid 0x0000020e
X #define ASIZ_task_sgid 0x00000002
-#define AOFF_task_fsgid 0x0000020c
+#define AOFF_task_fsgid 0x00000210
X #define ASIZ_task_fsgid 0x00000002
-#define AOFF_task_ngroups 0x00000210
+#define AOFF_task_ngroups 0x00000214
X #define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000214
+#define AOFF_task_groups 0x00000218
X #define ASIZ_task_groups 0x00000040
-#define AOFF_task_cap_effective 0x00000254
+#define AOFF_task_cap_effective 0x00000258
X #define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000258
+#define AOFF_task_cap_inheritable 0x0000025c
X #define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x0000025c
+#define AOFF_task_cap_permitted 0x00000260
X #define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000264
+#define AOFF_task_user 0x00000268
X #define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000268
+#define AOFF_task_rlim 0x0000026c
X #define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x000002b8
+#define AOFF_task_used_math 0x000002bc
X #define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x000002ba
+#define AOFF_task_comm 0x000002be
X #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x000002cc
+#define AOFF_task_link_count 0x000002d0
X #define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x000002d0
+#define AOFF_task_tty 0x000002d4
X #define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x000002d4
+#define AOFF_task_semundo 0x000002d8
X #define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x000002d8
+#define AOFF_task_semsleeping 0x000002dc
X #define ASIZ_task_semsleeping 0x00000004
X #define AOFF_task_tss 0x000002e0
X #define ASIZ_task_tss 0x00000388
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc/pci.h linux/include/asm-sparc/pci.h
--- v2.2.19/include/asm-sparc/pci.h Thu Jan 1 01:00:00 1970
+++ linux/include/asm-sparc/pci.h Wed Oct 10 01:41:51 2001
@@ -0,0 +1,7 @@
+#ifndef _SPARC_PCI_H
+#define _SPARC_PCI_H
+
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV) (0)
+
+#endif /* !(_SPARC_PCI_H) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc/siginfo.h linux/include/asm-sparc/siginfo.h
--- v2.2.19/include/asm-sparc/siginfo.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-sparc/siginfo.h Wed Oct 10 01:41:51 2001
@@ -1,4 +1,4 @@
-/* $Id: siginfo.h,v 1.4 1999/04/28 19:45:20 davem Exp $
+/* $Id: siginfo.h,v 1.4.2.1 2001/03/01 00:49:02 davem Exp $
X * siginfo.c:
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc/uaccess.h linux/include/asm-sparc/uaccess.h
--- v2.2.19/include/asm-sparc/uaccess.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-sparc/uaccess.h Wed Oct 10 01:41:51 2001
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.18.2.1 1999/09/10 09:54:34 davem Exp $
+/* $Id: uaccess.h,v 1.18.2.2 2001/03/01 00:49:02 davem Exp $
X * uaccess.h: User space memore access functions.
X *
X * Copyright (C) 1996 David S. Miller (da...@caip.rutgers.edu)
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/asm_offsets.h linux/include/asm-sparc64/asm_offsets.h
--- v2.2.19/include/asm-sparc64/asm_offsets.h Sun Mar 25 17:37:39 2001
+++ linux/include/asm-sparc64/asm_offsets.h Wed Oct 10 01:41:52 2001
@@ -18,147 +18,149 @@
X #define ASIZ_task_exec_domain 0x00000008
X #define AOFF_task_need_resched 0x00000028
X #define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000030
+#define AOFF_task_ptrace 0x00000030
+#define ASIZ_task_ptrace 0x00000008
+#define AOFF_task_counter 0x00000038
X #define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000038
+#define AOFF_task_priority 0x00000040
X #define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000040
+#define AOFF_task_avg_slice 0x00000048
X #define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000048
+#define AOFF_task_has_cpu 0x00000050
X #define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x0000004c
+#define AOFF_task_processor 0x00000054
X #define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000050
+#define AOFF_task_last_processor 0x00000058
X #define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000054
+#define AOFF_task_lock_depth 0x0000005c
X #define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000058
+#define AOFF_task_next_task 0x00000060
X #define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000060
+#define AOFF_task_prev_task 0x00000068
X #define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_next_run 0x00000068
+#define AOFF_task_next_run 0x00000070
X #define ASIZ_task_next_run 0x00000008
-#define AOFF_task_prev_run 0x00000070
+#define AOFF_task_prev_run 0x00000078
X #define ASIZ_task_prev_run 0x00000008
-#define AOFF_task_task_exclusive 0x00000078
+#define AOFF_task_task_exclusive 0x00000080
X #define ASIZ_task_task_exclusive 0x00000004
-#define AOFF_task_binfmt 0x00000080
+#define AOFF_task_binfmt 0x00000088
X #define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000088
+#define AOFF_task_exit_code 0x00000090
X #define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000008c
+#define AOFF_task_exit_signal 0x00000094
X #define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000090
+#define AOFF_task_pdeath_signal 0x00000098
X #define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000098
+#define AOFF_task_personality 0x000000a0
X #define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x000000a4
+#define AOFF_task_pid 0x000000ac
X #define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x000000a8
+#define AOFF_task_pgrp 0x000000b0
X #define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x000000ac
+#define AOFF_task_tty_old_pgrp 0x000000b4
X #define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000b0
+#define AOFF_task_session 0x000000b8
X #define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000b4
+#define AOFF_task_leader 0x000000bc
X #define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000b8
+#define AOFF_task_p_opptr 0x000000c0
X #define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000c0
+#define AOFF_task_p_pptr 0x000000c8
X #define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000c8
+#define AOFF_task_p_cptr 0x000000d0
X #define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000d0
+#define AOFF_task_p_ysptr 0x000000d8
X #define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000d8
+#define AOFF_task_p_osptr 0x000000e0
X #define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000e0
+#define AOFF_task_pidhash_next 0x000000e8
X #define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000e8
+#define AOFF_task_pidhash_pprev 0x000000f0
X #define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_tarray_ptr 0x000000f0
+#define AOFF_task_tarray_ptr 0x000000f8
X #define ASIZ_task_tarray_ptr 0x00000008
-#define AOFF_task_wait_chldexit 0x000000f8
+#define AOFF_task_wait_chldexit 0x00000100
X #define ASIZ_task_wait_chldexit 0x00000008
-#define AOFF_task_vfork_sem 0x00000100
+#define AOFF_task_vfork_sem 0x00000108
X #define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000108
+#define AOFF_task_policy 0x00000110
X #define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000110
+#define AOFF_task_rt_priority 0x00000118
X #define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000118
+#define AOFF_task_it_real_value 0x00000120
X #define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000120
+#define AOFF_task_it_prof_value 0x00000128
X #define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000128
+#define AOFF_task_it_virt_value 0x00000130
X #define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000130
+#define AOFF_task_it_real_incr 0x00000138
X #define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000138
+#define AOFF_task_it_prof_incr 0x00000140
X #define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000140
+#define AOFF_task_it_virt_incr 0x00000148
X #define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000148
+#define AOFF_task_real_timer 0x00000150
X #define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000170
+#define AOFF_task_times 0x00000178
X #define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x00000190
+#define AOFF_task_start_time 0x00000198
X #define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x00000198
+#define AOFF_task_per_cpu_utime 0x000001a0
X #define ASIZ_task_per_cpu_utime 0x00000008
-#define AOFF_task_min_flt 0x000001a8
+#define AOFF_task_min_flt 0x000001b0
X #define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000001b0
+#define AOFF_task_maj_flt 0x000001b8
X #define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000001b8
+#define AOFF_task_nswap 0x000001c0
X #define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000001c0
+#define AOFF_task_cmin_flt 0x000001c8
X #define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000001c8
+#define AOFF_task_cmaj_flt 0x000001d0
X #define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000001d0
+#define AOFF_task_cnswap 0x000001d8
X #define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000001dc
+#define AOFF_task_uid 0x000001e4
X #define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000001e0
+#define AOFF_task_euid 0x000001e8
X #define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000001e4
+#define AOFF_task_suid 0x000001ec
X #define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000001e8
+#define AOFF_task_fsuid 0x000001f0
X #define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000001ec
+#define AOFF_task_gid 0x000001f4
X #define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000001f0
+#define AOFF_task_egid 0x000001f8
X #define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000001f4
+#define AOFF_task_sgid 0x000001fc
X #define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000001f8
+#define AOFF_task_fsgid 0x00000200
X #define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000001fc
+#define AOFF_task_ngroups 0x00000204
X #define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000200
+#define AOFF_task_groups 0x00000208
X #define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000280
+#define AOFF_task_cap_effective 0x00000288
X #define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000284
+#define AOFF_task_cap_inheritable 0x0000028c
X #define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000288
+#define AOFF_task_cap_permitted 0x00000290
X #define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000290
+#define AOFF_task_user 0x00000298
X #define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000298
+#define AOFF_task_rlim 0x000002a0
X #define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000338
+#define AOFF_task_used_math 0x00000340
X #define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000033a
+#define AOFF_task_comm 0x00000342
X #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000034c
+#define AOFF_task_link_count 0x00000354
X #define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000350
+#define AOFF_task_tty 0x00000358
X #define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000358
+#define AOFF_task_semundo 0x00000360
X #define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000360
+#define AOFF_task_semsleeping 0x00000368
X #define ASIZ_task_semsleeping 0x00000008
X #define AOFF_task_tss 0x00000370
X #define ASIZ_task_tss 0x00000470
@@ -320,147 +322,149 @@
X #define ASIZ_task_exec_domain 0x00000008
X #define AOFF_task_need_resched 0x00000028
X #define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000030
+#define AOFF_task_ptrace 0x00000030
+#define ASIZ_task_ptrace 0x00000008
+#define AOFF_task_counter 0x00000038
X #define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000038
+#define AOFF_task_priority 0x00000040
X #define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000040
+#define AOFF_task_avg_slice 0x00000048
X #define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000048
+#define AOFF_task_has_cpu 0x00000050
X #define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x0000004c
+#define AOFF_task_processor 0x00000054
X #define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000050
+#define AOFF_task_last_processor 0x00000058
X #define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000054
+#define AOFF_task_lock_depth 0x0000005c
X #define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000058
+#define AOFF_task_next_task 0x00000060
X #define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000060
+#define AOFF_task_prev_task 0x00000068
X #define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_next_run 0x00000068
+#define AOFF_task_next_run 0x00000070
X #define ASIZ_task_next_run 0x00000008
-#define AOFF_task_prev_run 0x00000070
+#define AOFF_task_prev_run 0x00000078
X #define ASIZ_task_prev_run 0x00000008
-#define AOFF_task_task_exclusive 0x00000078
+#define AOFF_task_task_exclusive 0x00000080
X #define ASIZ_task_task_exclusive 0x00000004
-#define AOFF_task_binfmt 0x00000080
+#define AOFF_task_binfmt 0x00000088
X #define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000088
+#define AOFF_task_exit_code 0x00000090
X #define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000008c
+#define AOFF_task_exit_signal 0x00000094
X #define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000090
+#define AOFF_task_pdeath_signal 0x00000098
X #define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000098
+#define AOFF_task_personality 0x000000a0
X #define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x000000a4
+#define AOFF_task_pid 0x000000ac
X #define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x000000a8
+#define AOFF_task_pgrp 0x000000b0
X #define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x000000ac
+#define AOFF_task_tty_old_pgrp 0x000000b4
X #define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000b0
+#define AOFF_task_session 0x000000b8
X #define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000b4
+#define AOFF_task_leader 0x000000bc
X #define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000b8
+#define AOFF_task_p_opptr 0x000000c0
X #define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000c0
+#define AOFF_task_p_pptr 0x000000c8
X #define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000c8
+#define AOFF_task_p_cptr 0x000000d0
X #define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000d0
+#define AOFF_task_p_ysptr 0x000000d8
X #define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000d8
+#define AOFF_task_p_osptr 0x000000e0
X #define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000e0
+#define AOFF_task_pidhash_next 0x000000e8
X #define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000e8
+#define AOFF_task_pidhash_pprev 0x000000f0
X #define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_tarray_ptr 0x000000f0
+#define AOFF_task_tarray_ptr 0x000000f8
X #define ASIZ_task_tarray_ptr 0x00000008
-#define AOFF_task_wait_chldexit 0x000000f8
+#define AOFF_task_wait_chldexit 0x00000100
X #define ASIZ_task_wait_chldexit 0x00000008
-#define AOFF_task_vfork_sem 0x00000100
+#define AOFF_task_vfork_sem 0x00000108
X #define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000108
+#define AOFF_task_policy 0x00000110


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 81'
echo 'File patch-2.2.20 is continued in part 82'
echo "82" > _shar_seq_.tmp
exit 0

Thomas Kobienia

unread,
Nov 3, 2001, 4:00:21 AM11/3/01
to
Archive-name: v2.2/patch-2.2.20/part82

#!/bin/sh -x
# this is part 82 of a 84 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.2.20 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 82; then


echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.2.20'
else
echo 'x - continuing with patch-2.2.20'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.2.20' &&

X #define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x00000398
+#define AOFF_task_min_flt 0x000003a0
X #define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003a0
+#define AOFF_task_maj_flt 0x000003a8
X #define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003a8
+#define AOFF_task_nswap 0x000003b0
X #define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003b0
+#define AOFF_task_cmin_flt 0x000003b8
X #define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003b8
+#define AOFF_task_cmaj_flt 0x000003c0
X #define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003c0
+#define AOFF_task_cnswap 0x000003c8
X #define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003cc
+#define AOFF_task_uid 0x000003d4
X #define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000003d0
+#define AOFF_task_euid 0x000003d8
X #define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000003d4
+#define AOFF_task_suid 0x000003dc
X #define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000003d8
+#define AOFF_task_fsuid 0x000003e0
X #define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000003dc
+#define AOFF_task_gid 0x000003e4
X #define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000003e0
+#define AOFF_task_egid 0x000003e8
X #define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000003e4
+#define AOFF_task_sgid 0x000003ec
X #define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000003e8
+#define AOFF_task_fsgid 0x000003f0
X #define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000003ec
+#define AOFF_task_ngroups 0x000003f4
X #define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x000003f0
+#define AOFF_task_groups 0x000003f8
X #define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000470
+#define AOFF_task_cap_effective 0x00000478
X #define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000474
+#define AOFF_task_cap_inheritable 0x0000047c
X #define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000478
+#define AOFF_task_cap_permitted 0x00000480
X #define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000480
+#define AOFF_task_user 0x00000488
X #define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000488
+#define AOFF_task_rlim 0x00000490
X #define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000528
+#define AOFF_task_used_math 0x00000530
X #define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000052a
+#define AOFF_task_comm 0x00000532
X #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000053c
+#define AOFF_task_link_count 0x00000544
X #define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000540
+#define AOFF_task_tty 0x00000548
X #define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000548
+#define AOFF_task_semundo 0x00000550
X #define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000550
+#define AOFF_task_semsleeping 0x00000558
X #define ASIZ_task_semsleeping 0x00000008
X #define AOFF_task_tss 0x00000560
X #define ASIZ_task_tss 0x00000470
@@ -620,147 +624,149 @@

X #define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x00000398
+#define AOFF_task_min_flt 0x000003a0
X #define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003a0
+#define AOFF_task_maj_flt 0x000003a8
X #define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003a8
+#define AOFF_task_nswap 0x000003b0
X #define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003b0
+#define AOFF_task_cmin_flt 0x000003b8
X #define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003b8
+#define AOFF_task_cmaj_flt 0x000003c0
X #define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003c0
+#define AOFF_task_cnswap 0x000003c8
X #define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003cc
+#define AOFF_task_uid 0x000003d4
X #define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000003d0
+#define AOFF_task_euid 0x000003d8
X #define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000003d4
+#define AOFF_task_suid 0x000003dc
X #define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000003d8
+#define AOFF_task_fsuid 0x000003e0
X #define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000003dc
+#define AOFF_task_gid 0x000003e4
X #define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000003e0
+#define AOFF_task_egid 0x000003e8
X #define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000003e4
+#define AOFF_task_sgid 0x000003ec
X #define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000003e8
+#define AOFF_task_fsgid 0x000003f0
X #define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000003ec
+#define AOFF_task_ngroups 0x000003f4
X #define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x000003f0
+#define AOFF_task_groups 0x000003f8
X #define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000470
+#define AOFF_task_cap_effective 0x00000478
X #define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000474
+#define AOFF_task_cap_inheritable 0x0000047c
X #define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000478
+#define AOFF_task_cap_permitted 0x00000480
X #define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000480
+#define AOFF_task_user 0x00000488
X #define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000488
+#define AOFF_task_rlim 0x00000490
X #define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000528
+#define AOFF_task_used_math 0x00000530
X #define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000052a
+#define AOFF_task_comm 0x00000532
X #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000053c
+#define AOFF_task_link_count 0x00000544
X #define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000540
+#define AOFF_task_tty 0x00000548
X #define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000548
+#define AOFF_task_semundo 0x00000550
X #define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000550
+#define AOFF_task_semsleeping 0x00000558
X #define ASIZ_task_semsleeping 0x00000008
X #define AOFF_task_tss 0x00000560
X #define ASIZ_task_tss 0x00000470
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/bitops.h linux/include/asm-sparc64/bitops.h
--- v2.2.19/include/asm-sparc64/bitops.h Sun Mar 25 17:31:09 2001
+++ linux/include/asm-sparc64/bitops.h Wed Oct 10 01:41:52 2001
@@ -1,4 +1,4 @@
-/* $Id: bitops.h,v 1.26.2.1 2000/08/10 23:50:04 davem Exp $
+/* $Id: bitops.h,v 1.26.2.2 2001/06/07 06:19:33 davem Exp $
X * bitops.h: Bit string operations on the V9.
X *
X * Copyright 1996, 1997 David S. Miller (da...@caip.rutgers.edu)
@@ -20,7 +20,7 @@
X * all bit-ops return 0 if bit was previously clear and != 0 otherwise.
X */
X
-extern __inline__ unsigned long test_and_set_bit(unsigned long nr, void *addr)
+extern __inline__ unsigned long test_and_set_bit(unsigned long nr, volatile void *addr)
X {
X unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
X unsigned long oldbit;
@@ -41,7 +41,7 @@
X return oldbit != 0;
X }
X
-extern __inline__ void set_bit(unsigned long nr, void *addr)
+extern __inline__ void set_bit(unsigned long nr, volatile void *addr)
X {
X unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
X
@@ -60,7 +60,7 @@
X : "g5", "g7", "cc", "memory");
X }
X
-extern __inline__ unsigned long test_and_clear_bit(unsigned long nr, void *addr)
+extern __inline__ unsigned long test_and_clear_bit(unsigned long nr, volatile void *addr)
X {
X unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
X unsigned long oldbit;
@@ -81,7 +81,7 @@
X return oldbit != 0;
X }
X
-extern __inline__ void clear_bit(unsigned long nr, void *addr)
+extern __inline__ void clear_bit(unsigned long nr, volatile void *addr)
X {
X unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
X
@@ -100,7 +100,7 @@
X : "g5", "g7", "cc", "memory");
X }
X
-extern __inline__ unsigned long test_and_change_bit(unsigned long nr, void *addr)
+extern __inline__ unsigned long test_and_change_bit(unsigned long nr, volatile void *addr)
X {
X unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
X unsigned long oldbit;
@@ -119,7 +119,7 @@
X return oldbit != 0;
X }
X
-extern __inline__ void change_bit(unsigned long nr, void *addr)
+extern __inline__ void change_bit(unsigned long nr, volatile void *addr)
X {
X unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
X
@@ -135,7 +135,7 @@
X : "g5", "g7", "cc", "memory");
X }
X
-extern __inline__ unsigned long test_bit(int nr, __const__ void *addr)
+extern __inline__ unsigned long test_bit(int nr, __const__ volatile void *addr)
X {
X return 1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63));
X }
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/pbm.h linux/include/asm-sparc64/pbm.h
--- v2.2.19/include/asm-sparc64/pbm.h Sun Mar 25 17:31:09 2001
+++ linux/include/asm-sparc64/pbm.h Mon Oct 22 10:34:26 2001
@@ -1,4 +1,4 @@
-/* $Id: pbm.h,v 1.16.2.1 2000/06/14 07:41:19 davem Exp $
+/* $Id: pbm.h,v 1.16.2.3 2001/08/12 13:17:25 davem Exp $
X * pbm.h: U2P PCI bus module pseudo driver software state.
X *
X * Copyright (C) 1997 David S. Miller (da...@caip.rutgers.edu)
@@ -50,6 +50,9 @@
X int num_pbm_intmap;
X struct linux_prom_pci_intmask pbm_intmask;
X
+ /* PCI slot mapping. */
+ unsigned int pci_first_slot;
+
X /* Now things for the actual PCI bus probes. */
X unsigned int pci_first_busno;
X unsigned int pci_last_busno;
@@ -64,6 +67,7 @@
X unsigned long *pci_mem_space;
X u32 upa_portid;
X int index;
+ int pbms_same_domain;
X struct linux_pbm_info pbm_A;
X struct linux_pbm_info pbm_B;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/pci.h linux/include/asm-sparc64/pci.h
--- v2.2.19/include/asm-sparc64/pci.h Thu Jan 1 01:00:00 1970
+++ linux/include/asm-sparc64/pci.h Wed Oct 10 01:41:52 2001
@@ -0,0 +1,19 @@
+#ifndef _SPARC64_PCI_H
+#define _SPARC64_PCI_H
+
+#include <linux/fs.h>
+#include <linux/mm.h>


+
+/* Return the index of the PCI controller for device PDEV. */
+

+extern int pci_controller_num(struct pci_dev *pdev);
+
+/* Platform support for /proc/bus/pci/X/Y mmap()s. */
+
+#define HAVE_PCI_MMAP
+
+extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+ enum pci_mmap_state mmap_state,
+ int write_combine);
+
+#endif /* !(_SPARC64_PCI_H) */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/sab82532.h linux/include/asm-sparc64/sab82532.h
--- v2.2.19/include/asm-sparc64/sab82532.h Sun Mar 25 17:31:09 2001
+++ linux/include/asm-sparc64/sab82532.h Wed Oct 10 01:41:52 2001
@@ -1,4 +1,4 @@
-/* $Id: sab82532.h,v 1.4 1998/10/25 23:04:29 ecd Exp $
+/* $Id: sab82532.h,v 1.4.2.1 2001/05/28 23:13:36 ecd Exp $
X * sab82532.h: Register Definitions for the Siemens SAB82532 DUSCC
X *
X * Copyright (C) 1997 Eddie C. Dost (e...@skynet.be)
@@ -148,7 +148,7 @@
X int close_delay;
X unsigned short closing_wait;
X unsigned short closing_wait2;
- int all_sent;
+ unsigned long irqflags;
X int is_console;
X unsigned char interrupt_mask0;
X unsigned char interrupt_mask1;
@@ -179,6 +179,10 @@
X struct sab82532 *next;
X struct sab82532 *prev;
X };
+
+/* irqflags bits */
+#define SAB82532_ALLS 0x00000001
+#define SAB82532_XPR 0x00000002
X
X
X /* RFIFO Status Byte */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/smp.h linux/include/asm-sparc64/smp.h
--- v2.2.19/include/asm-sparc64/smp.h Sun Mar 25 17:31:09 2001
+++ linux/include/asm-sparc64/smp.h Wed Oct 10 01:41:53 2001
@@ -38,7 +38,7 @@
X unsigned int multiplier;
X unsigned int counter;
X unsigned int idle_volume;
- unsigned int __pad;
+ unsigned int clock_tick; /* %tick's per second */
X unsigned long udelay_val;
X
X /* Dcache line 2 */
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/ttable.h linux/include/asm-sparc64/ttable.h
--- v2.2.19/include/asm-sparc64/ttable.h Sun Mar 25 17:31:09 2001
+++ linux/include/asm-sparc64/ttable.h Wed Oct 10 01:41:53 2001
@@ -1,4 +1,4 @@
-/* $Id: ttable.h,v 1.11.2.3 1999/10/07 20:48:25 davem Exp $ */
+/* $Id: ttable.h,v 1.11.2.5 2001/03/28 11:24:15 davem Exp $ */
X #ifndef _SPARC64_TTABLE_H
X #define _SPARC64_TTABLE_H
X
@@ -54,12 +54,22 @@
X clr %l6; \
X nop;
X
+ /* The grotty trick to save %g1 into current->thread.kernel_cntd0
+ * is because when we take this trap we could be interrupting trap
+ * code already using the trap alternate global registers. It is
+ * better to corrupt a performance counter than corrupt trap register
+ * state. We cross our fingers and pray that this store/load does
+ * not cause yet another CEE trap.
+ */
X #define TRAPTL1_CEE \
+ membar #Sync; \
+ stx %g1, [%g6 + AOFF_task_tss + AOFF_thread_kernel_cntd0]; \
X ldxa [%g0] ASI_AFSR, %g1; \
X membar #Sync; \
X stxa %g1, [%g0] ASI_AFSR; \
X membar #Sync; \
- retry; nop; nop; nop;
+ ldx [%g6 + AOFF_task_tss + AOFF_thread_kernel_cntd0], %g1; \
+ retry;
X
X #define TRAP_ARG(routine, arg) \
X sethi %hi(109f), %g7; \
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/asm-sparc64/uaccess.h linux/include/asm-sparc64/uaccess.h
--- v2.2.19/include/asm-sparc64/uaccess.h Sun Mar 25 17:37:40 2001
+++ linux/include/asm-sparc64/uaccess.h Wed Oct 10 01:41:53 2001
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.29.2.1 1999/09/10 09:54:38 davem Exp $ */
+/* $Id: uaccess.h,v 1.29.2.2 2001/03/01 00:49:03 davem Exp $ */
X #ifndef _ASM_UACCESS_H
X #define _ASM_UACCESS_H
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/agp_backend.h linux/include/linux/agp_backend.h
--- v2.2.19/include/linux/agp_backend.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/agp_backend.h Wed Oct 10 01:41:54 2001
@@ -58,7 +58,16 @@
X AMD_GENERIC,
X AMD_IRONGATE,
X ALI_M1541,
- ALI_GENERIC
+ ALI_M1621,
+ ALI_M1631,
+ ALI_M1632,
+ ALI_M1641,
+ ALI_M1647,
+ ALI_M1651,
+ ALI_GENERIC,
+ SVWRKS_HE,
+ SVWRKS_LE,
+ SVWRKS_GENERIC
X };
X
X typedef struct _agp_version {
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/b1lli.h linux/include/linux/b1lli.h
--- v2.2.19/include/linux/b1lli.h Sun Mar 25 17:31:04 2001
+++ linux/include/linux/b1lli.h Wed Oct 10 01:41:54 2001
@@ -1,75 +1,10 @@
X /*
- * $Id: b1lli.h,v 1.8 1999/07/01 15:26:54 calle Exp $
+ * $Id: b1lli.h,v 1.8.8.2 2001/05/17 20:41:52 kai Exp $
X *
X * ISDN lowlevel-module for AVM B1-card.
X *
X * Copyright 1996 by Carsten Paeth (ca...@calle.in-berlin.de)
X *
- * $Log: b1lli.h,v $
- * Revision 1.8 1999/07/01 15:26:54 calle
- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
- *
- * Revision 1.7 1999/06/21 15:24:25 calle
- * extend information in /proc.
- *
- * Revision 1.6 1999/04/15 19:49:36 calle
- * fix fuer die B1-PCI. Jetzt geht z.B. auch IRQ 17 ...
- *
- * Revision 1.5 1998/10/25 14:50:28 fritz
- * Backported from MIPS (Cobalt).
- *
- * Revision 1.4 1998/03/29 16:05:02 calle
- * changes from 2.0 tree merged.
- *
- * Revision 1.1.2.9 1998/03/20 14:30:02 calle
- * added cardnr to detect if you try to add same T1 to different io address.
- * change number of nccis depending on number of channels.
- *
- * Revision 1.1.2.8 1998/03/04 17:32:33 calle
- * Changes for T1.
- *
- * Revision 1.1.2.7 1998/02/27 15:38:29 calle
- * T1 running with slow link.
- *
- * Revision 1.1.2.6 1998/02/24 17:57:36 calle
- * changes for T1.
- *
- * Revision 1.3 1998/01/31 10:54:37 calle
- * include changes for PCMCIA cards from 2.0 version
- *
- * Revision 1.2 1997/12/10 19:38:42 calle
- * get changes from 2.0 tree
- *
- * Revision 1.1.2.2 1997/11/26 16:57:26 calle
- * more changes for B1/M1/T1.
- *
- * Revision 1.1.2.1 1997/11/26 10:47:01 calle
- * prepared for M1 (Mobile) and T1 (PMX) cards.
- * prepared to set configuration after load to support other D-channel
- * protocols, point-to-point and leased lines.
- *
- * Revision 1.1 1997/03/04 21:27:32 calle
- * First version in isdn4linux
- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *
- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision
- *
X */
X
X #ifndef _B1LLI_H_
@@ -129,7 +64,7 @@
X #define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
X #define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
X #define AVMB1_GET_CARDINFO 5 /* get cardtype */
-#define AVMB1_REMOVECARD 6 /* remove a card (usefull for T1) */
+#define AVMB1_REMOVECARD 6 /* remove a card (useful for T1) */
X
X #define AVMB1_REGISTERCARD_IS_OBSOLETE
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/b1pcmcia.h linux/include/linux/b1pcmcia.h
--- v2.2.19/include/linux/b1pcmcia.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/b1pcmcia.h Wed Oct 10 01:41:54 2001
@@ -1,27 +1,10 @@
X /*
- * $Id: b1pcmcia.h,v 1.1 1999/07/01 15:26:56 calle Exp $
+ * $Id: b1pcmcia.h,v 1.1.8.1 2001/05/17 20:41:52 kai Exp $
X *
X * Exported functions of module b1pcmcia to be called by
X * avm_cs card services module.
X *
X * Copyright 1999 by Carsten Paeth (ca...@calle.in-berlin.de)
- *
- * $Log: b1pcmcia.h,v $
- * Revision 1.1 1999/07/01 15:26:56 calle
- * complete new version (I love it):
- * + new hardware independed "capi_driver" interface that will make it easy to:
- * - support other controllers with CAPI-2.0 (i.e. USB Controller)
- * - write a CAPI-2.0 for the passive cards
- * - support serial link CAPI-2.0 boxes.
- * + wrote "capi_driver" for all supported cards.
- * + "capi_driver" (supported cards) now have to be configured with
- * make menuconfig, in the past all supported cards where included
- * at once.
- * + new and better informations in /proc/capi/
- * + new ioctl to switch trace of capi messages per controller
- * using "avmcapictrl trace [contr] on|off|...."
- * + complete testcircle with all supported cards and also the
- * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done.
X *
X */
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/binfmts.h linux/include/linux/binfmts.h
--- v2.2.19/include/linux/binfmts.h Sun Mar 25 17:37:40 2001
+++ linux/include/linux/binfmts.h Mon Oct 22 10:56:09 2001
@@ -32,6 +32,8 @@
X int priv_change;
X };
X
+struct file;
+
X /*
X * This structure defines the functions that are used to load the binary formats that
X * linux accepts.
@@ -40,10 +42,13 @@
X struct linux_binfmt * next;
X struct module *module;
X int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
- int (*load_shlib)(int fd);
- int (*core_dump)(long signr, struct pt_regs * regs);
+ int (*load_shlib)(struct file *file);
+ int (*core_dump)(long signr, struct pt_regs * regs, struct file *file);
+ unsigned long min_coredump;
X };
X
+extern void set_binfmt(struct linux_binfmt *);
+extern int do_coredump(long, struct pt_regs *);
X extern int register_binfmt(struct linux_binfmt *);
X extern int unregister_binfmt(struct linux_binfmt *);
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/cciss_ioctl.h linux/include/linux/cciss_ioctl.h
--- v2.2.19/include/linux/cciss_ioctl.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/cciss_ioctl.h Wed Oct 10 01:41:54 2001
@@ -80,25 +80,28 @@
X
X #define CISS_MAX_LUN 16
X
+#define LEVEL2LUN 1 // index into Target(x) structure, due to byte swapping
+#define LEVEL3LUN 0
+
X #pragma pack(1)
X
X //Command List Structure
X typedef union _SCSI3Addr_struct {
X struct {
+ BYTE Dev;
X BYTE Bus:6;
X BYTE Mode:2; // b00
- BYTE Dev;
X } PeripDev;
X struct {
+ BYTE DevLSB;
X BYTE DevMSB:6;
X BYTE Mode:2; // b01
- BYTE DevLSB;
X } LogDev;
X struct {
- BYTE Targ:6;
- BYTE Mode:2; // b10
X BYTE Dev:5;
X BYTE Bus:3;
+ BYTE Targ:6;
+ BYTE Mode:2; // b10
X } LogUnit;
X } SCSI3Addr_struct;
X
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/concap.h linux/include/linux/concap.h
--- v2.2.19/include/linux/concap.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/concap.h Wed Oct 10 01:41:55 2001
@@ -5,6 +5,7 @@
X #ifdef __KERNEL__
X #include <linux/skbuff.h>
X #include <linux/netdevice.h>
+#include <linux/isdn_compat.h>
X
X /* Stuff to support encapsulation protocols genericly. The encapsulation
X protocol is processed at the uppermost layer of the network interface.
diff -u --recursive --new-file --exclude-from /usr/src/exclude v2.2.19/include/linux/falc-lh.h linux/include/linux/falc-lh.h
--- v2.2.19/include/linux/falc-lh.h Sun Mar 25 17:31:05 2001
+++ linux/include/linux/falc-lh.h Thu Jan 1 01:00:00 1970
@@ -1,1231 +0,0 @@
-/*
- * falc.h Description of the Siemens FALC T1/E1 framer.


- *
- * Author: Ivan Passos <iv...@cyclades.com>
- *
- * Copyright: (c) 2000 Cyclades Corp.
- *
- * 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.
- *

- * $Log: falc.h,v $
- * Revision 1.1 2000/05/15 ivan
- * Included DJA bits for the LIM2 register.
- *
- * Revision 1.0 2000/02/22 ivan


- * Initial version.
- *
- */
-

-#ifndef _FALC_LH_H
-#define _FALC_LH_H
-
-#define NUM_OF_T1_CHANNELS 24
-#define NUM_OF_E1_CHANNELS 32
-
-/*>>>>>>>>>>>>>>>>> FALC Register Bits (Transmit Mode) <<<<<<<<<<<<<<<<<<< */
-
-/* CMDR (Command Register)
- ---------------- E1 & T1 ------------------------------ */
-#define CMDR_RMC 0x80
-#define CMDR_RRES 0x40
-#define CMDR_XREP 0x20
-#define CMDR_XRES 0x10
-#define CMDR_XHF 0x08
-#define CMDR_XTF 0x04
-#define CMDR_XME 0x02
-#define CMDR_SRES 0x01
-
-/* MODE (Mode Register)
- ----------------- E1 & T1 ----------------------------- */
-#define MODE_MDS2 0x80
-#define MODE_MDS1 0x40
-#define MODE_MDS0 0x20
-#define MODE_BRAC 0x10
-#define MODE_HRAC 0x08
-
-/* IPC (Interrupt Port Configuration)
- ----------------- E1 & T1 ----------------------------- */
-#define IPC_VIS 0x80
-#define IPC_SCI 0x04
-#define IPC_IC1 0x02
-#define IPC_IC0 0x01
-
-/* CCR1 (Common Configuration Register 1)
- ----------------- E1 & T1 ----------------------------- */
-#define CCR1_SFLG 0x80
-#define CCR1_XTS16RA 0x40
-#define CCR1_BRM 0x40
-#define CCR1_CASSYM 0x20
-#define CCR1_EDLX 0x20
-#define CCR1_EITS 0x10
-#define CCR1_ITF 0x08
-#define CCR1_RFT1 0x02
-#define CCR1_RFT0 0x01
-
-/* CCR3 (Common Configuration Register 3)
- ---------------- E1 & T1 ------------------------------ */
-
-#define CCR3_PRE1 0x80
-#define CCR3_PRE0 0x40
-#define CCR3_EPT 0x20
-#define CCR3_RADD 0x10
-#define CCR3_RCRC 0x04
-#define CCR3_XCRC 0x02
-
-
-/* RTR1-4 (Receive Timeslot Register 1-4)
- ---------------- E1 & T1 ------------------------------ */
-
-#define RTR1_TS0 0x80
-#define RTR1_TS1 0x40
-#define RTR1_TS2 0x20
-#define RTR1_TS3 0x10
-#define RTR1_TS4 0x08
-#define RTR1_TS5 0x04
-#define RTR1_TS6 0x02
-#define RTR1_TS7 0x01
-
-#define RTR2_TS8 0x80
-#define RTR2_TS9 0x40
-#define RTR2_TS10 0x20
-#define RTR2_TS11 0x10
-#define RTR2_TS12 0x08
-#define RTR2_TS13 0x04
-#define RTR2_TS14 0x02
-#define RTR2_TS15 0x01
-
-#define RTR3_TS16 0x80
-#define RTR3_TS17 0x40
-#define RTR3_TS18 0x20
-#define RTR3_TS19 0x10
-#define RTR3_TS20 0x08
-#define RTR3_TS21 0x04
-#define RTR3_TS22 0x02
-#define RTR3_TS23 0x01
-
-#define RTR4_TS24 0x80
-#define RTR4_TS25 0x40
-#define RTR4_TS26 0x20
-#define RTR4_TS27 0x10
-#define RTR4_TS28 0x08
-#define RTR4_TS29 0x04
-#define RTR4_TS30 0x02
-#define RTR4_TS31 0x01
-
-
-/* TTR1-4 (Transmit Timeslot Register 1-4)
- ---------------- E1 & T1 ------------------------------ */
-
-#define TTR1_TS0 0x80
-#define TTR1_TS1 0x40
-#define TTR1_TS2 0x20
-#define TTR1_TS3 0x10
-#define TTR1_TS4 0x08
-#define TTR1_TS5 0x04
-#define TTR1_TS6 0x02
-#define TTR1_TS7 0x01
-
-#define TTR2_TS8 0x80
-#define TTR2_TS9 0x40
-#define TTR2_TS10 0x20
-#define TTR2_TS11 0x10
-#define TTR2_TS12 0x08
-#define TTR2_TS13 0x04
-#define TTR2_TS14 0x02
-#define TTR2_TS15 0x01
-
-#define TTR3_TS16 0x80
-#define TTR3_TS17 0x40
-#define TTR3_TS18 0x20
-#define TTR3_TS19 0x10
-#define TTR3_TS20 0x08
-#define TTR3_TS21 0x04
-#define TTR3_TS22 0x02
-#define TTR3_TS23 0x01
-
-#define TTR4_TS24 0x80
-#define TTR4_TS25 0x40
-#define TTR4_TS26 0x20
-#define TTR4_TS27 0x10
-#define TTR4_TS28 0x08
-#define TTR4_TS29 0x04
-#define TTR4_TS30 0x02
-#define TTR4_TS31 0x01
-
-
-
-/* IMR0-4 (Interrupt Mask Register 0-4)
-
- ----------------- E1 & T1 ----------------------------- */
-
-#define IMR0_RME 0x80
-#define IMR0_RFS 0x40
-#define IMR0_T8MS 0x20
-#define IMR0_ISF 0x20
-#define IMR0_RMB 0x10
-#define IMR0_CASC 0x08
-#define IMR0_RSC 0x08
-#define IMR0_CRC6 0x04
-#define IMR0_CRC4 0x04
-#define IMR0_PDEN 0x02
-#define IMR0_RPF 0x01
-
-#define IMR1_CASE 0x80
-#define IMR1_RDO 0x40
-#define IMR1_ALLS 0x20
-#define IMR1_XDU 0x10
-#define IMR1_XMB 0x08
-#define IMR1_XLSC 0x02
-#define IMR1_XPR 0x01
-#define IMR1_LLBSC 0x80
-
-#define IMR2_FAR 0x80
-#define IMR2_LFA 0x40
-#define IMR2_MFAR 0x20
-#define IMR2_T400MS 0x10
-#define IMR2_LMFA 0x10
-#define IMR2_AIS 0x08
-#define IMR2_LOS 0x04
-#define IMR2_RAR 0x02
-#define IMR2_RA 0x01
-
-#define IMR3_ES 0x80
-#define IMR3_SEC 0x40
-#define IMR3_LMFA16 0x20
-#define IMR3_AIS16 0x10
-#define IMR3_RA16 0x08
-#define IMR3_API 0x04
-#define IMR3_XSLP 0x20
-#define IMR3_XSLN 0x10
-#define IMR3_LLBSC 0x08
-#define IMR3_XRS 0x04
-#define IMR3_SLN 0x02
-#define IMR3_SLP 0x01
-
-#define IMR4_LFA 0x80
-#define IMR4_FER 0x40
-#define IMR4_CER 0x20
-#define IMR4_AIS 0x10
-#define IMR4_LOS 0x08
-#define IMR4_CVE 0x04
-#define IMR4_SLIP 0x02
-#define IMR4_EBE 0x01
-
-/* FMR0-5 for E1 and T1 (Framer Mode Register ) */
-
-#define FMR0_XC1 0x80
-#define FMR0_XC0 0x40
-#define FMR0_RC1 0x20
-#define FMR0_RC0 0x10
-#define FMR0_EXTD 0x08
-#define FMR0_ALM 0x04
-#define E1_FMR0_FRS 0x02
-#define T1_FMR0_FRS 0x08
-#define FMR0_SRAF 0x04
-#define FMR0_EXLS 0x02
-#define FMR0_SIM 0x01
-
-#define FMR1_MFCS 0x80
-#define FMR1_AFR 0x40
-#define FMR1_ENSA 0x20
-#define FMR1_CTM 0x80
-#define FMR1_SIGM 0x40
-#define FMR1_EDL 0x20
-#define FMR1_PMOD 0x10
-#define FMR1_XFS 0x08
-#define FMR1_CRC 0x08
-#define FMR1_ECM 0x04
-#define FMR1_IMOD 0x02
-#define FMR1_XAIS 0x01
-
-#define FMR2_RFS1 0x80
-#define FMR2_RFS0 0x40
-#define FMR2_MCSP 0x40
-#define FMR2_RTM 0x20
-#define FMR2_SSP 0x20
-#define FMR2_DAIS 0x10
-#define FMR2_SAIS 0x08
-#define FMR2_PLB 0x04
-#define FMR2_AXRA 0x02
-#define FMR2_ALMF 0x01
-#define FMR2_EXZE 0x01
-
-#define LOOP_RTM 0x40
-#define LOOP_SFM 0x40
-#define LOOP_ECLB 0x20
-#define LOOP_CLA 0x1f
-
-/*--------------------- E1 ----------------------------*/
-#define FMR3_XLD 0x20
-#define FMR3_XLU 0x10
-
-/*--------------------- T1 ----------------------------*/
-#define FMR4_AIS3 0x80
-#define FMR4_TM 0x40
-#define FMR4_XRA 0x20
-#define FMR4_SSC1 0x10
-#define FMR4_SSC0 0x08
-#define FMR4_AUTO 0x04
-#define FMR4_FM1 0x02
-#define FMR4_FM0 0x01
-
-#define FMR5_SRS 0x80
-#define FMR5_EIBR 0x40
-#define FMR5_XLD 0x20
-#define FMR5_XLU 0x10
-
-
-/* LOOP (Channel Loop Back)
-
- ------------------ E1 & T1 ---------------------------- */
-
-#define LOOP_SFM 0x40
-#define LOOP_ECLB 0x20
-#define LOOP_CLA4 0x10
-#define LOOP_CLA3 0x08
-#define LOOP_CLA2 0x04
-#define LOOP_CLA1 0x02
-#define LOOP_CLA0 0x01
-
-
-
-/* XSW (Transmit Service Word Pulseframe)
-
- ------------------- E1 --------------------------- */
-
-#define XSW_XSIS 0x80
-#define XSW_XRA 0x20
-#define XSW_XY0 0x10
-#define XSW_XY1 0x08
-#define XSW_XY2 0x04
-#define XSW_XY3 0x02
-#define XSW_XY4 0x01
-
-
-/* XSP (Transmit Spare Bits)
-
- ------------------- E1 --------------------------- */
-
-#define XSP_XAP 0x80
-#define XSP_CASEN 0x40
-#define XSP_TT0 0x20
-#define XSP_EBP 0x10
-#define XSP_AXS 0x08
-#define XSP_XSIF 0x04
-#define XSP_XS13 0x02
-#define XSP_XS15 0x01
-
-
-/* XC0/1 (Transmit Control 0/1)
- ------------------ E1 & T1 ---------------------------- */
-
-#define XC0_SA8E 0x80
-#define XC0_SA7E 0x40
-#define XC0_SA6E 0x20
-#define XC0_SA5E 0x10
-#define XC0_SA4E 0x08
-#define XC0_BRM 0x80
-#define XC0_MFBS 0x40
-#define XC0_SFRZ 0x10
-#define XC0_XCO2 0x04
-#define XC0_XCO1 0x02
-#define XC0_XCO0 0x01
-
-#define XC1_XTO5 0x20
-#define XC1_XTO4 0x10
-#define XC1_XTO3 0x08
-#define XC1_XTO2 0x04
-#define XC1_XTO1 0x02
-#define XC1_XTO0 0x01
-
-
-/* RC0/1 (Receive Control 0/1)
- ------------------ E1 & T1 ---------------------------- */
-
-#define RC0_SICS 0x40
-#define RC0_CRCI 0x20
-#define RC0_XCRCI 0x10
-#define RC0_RDIS 0x08
-#define RC0_RCO2 0x04
-#define RC0_RCO1 0x02
-#define RC0_RCO0 0x01
-
-#define RC1_SWD 0x80
-#define RC1_ASY4 0x40
-#define RC1_RRAM 0x40
-#define RC1_RTO5 0x20
-#define RC1_RTO4 0x10
-#define RC1_RTO3 0x08
-#define RC1_RTO2 0x04
-#define RC1_RTO1 0x02
-#define RC1_RTO0 0x01
-
-
-
-/* XPM0-2 (Transmit Pulse Mask 0-2)
- --------------------- E1 & T1 ------------------------- */
-
-#define XPM0_XP12 0x80
-#define XPM0_XP11 0x40
-#define XPM0_XP10 0x20
-#define XPM0_XP04 0x10
-#define XPM0_XP03 0x08
-#define XPM0_XP02 0x04
-#define XPM0_XP01 0x02
-#define XPM0_XP00 0x01
-
-#define XPM1_XP30 0x80
-#define XPM1_XP24 0x40
-#define XPM1_XP23 0x20
-#define XPM1_XP22 0x10
-#define XPM1_XP21 0x08
-#define XPM1_XP20 0x04
-#define XPM1_XP14 0x02
-#define XPM1_XP13 0x01
-
-#define XPM2_XLHP 0x80
-#define XPM2_XLT 0x40
-#define XPM2_DAXLT 0x20
-#define XPM2_XP34 0x08
-#define XPM2_XP33 0x04
-#define XPM2_XP32 0x02
-#define XPM2_XP31 0x01
-
-
-/* TSWM (Transparent Service Word Mask)
- ------------------ E1 ---------------------------- */
-
-#define TSWM_TSIS 0x80
-#define TSWM_TSIF 0x40
-#define TSWM_TRA 0x20
-#define TSWM_TSA4 0x10
-#define TSWM_TSA5 0x08
-#define TSWM_TSA6 0x04
-#define TSWM_TSA7 0x02
-#define TSWM_TSA8 0x01
-
-/* IDLE <Idle Channel Code Register>
-
- ------------------ E1 & T1 ----------------------- */
-
-#define IDLE_IDL7 0x80
-#define IDLE_IDL6 0x40
-#define IDLE_IDL5 0x20
-#define IDLE_IDL4 0x10
-#define IDLE_IDL3 0x08
-#define IDLE_IDL2 0x04
-#define IDLE_IDL1 0x02
-#define IDLE_IDL0 0x01
-
-
-/* XSA4-8 <Transmit SA4-8 Register(Read/Write) >
- -------------------E1 ----------------------------- */
-
-#define XSA4_XS47 0x80
-#define XSA4_XS46 0x40
-#define XSA4_XS45 0x20
-#define XSA4_XS44 0x10
-#define XSA4_XS43 0x08
-#define XSA4_XS42 0x04
-#define XSA4_XS41 0x02
-#define XSA4_XS40 0x01
-
-#define XSA5_XS57 0x80
-#define XSA5_XS56 0x40
-#define XSA5_XS55 0x20
-#define XSA5_XS54 0x10
-#define XSA5_XS53 0x08
-#define XSA5_XS52 0x04
-#define XSA5_XS51 0x02
-#define XSA5_XS50 0x01
-
-#define XSA6_XS67 0x80
-#define XSA6_XS66 0x40
-#define XSA6_XS65 0x20
-#define XSA6_XS64 0x10
-#define XSA6_XS63 0x08
-#define XSA6_XS62 0x04
-#define XSA6_XS61 0x02
-#define XSA6_XS60 0x01
-
-#define XSA7_XS77 0x80
-#define XSA7_XS76 0x40
-#define XSA7_XS75 0x20
-#define XSA7_XS74 0x10
-#define XSA7_XS73 0x08
-#define XSA7_XS72 0x04
-#define XSA7_XS71 0x02
-#define XSA7_XS70 0x01
-
-#define XSA8_XS87 0x80
-#define XSA8_XS86 0x40
-#define XSA8_XS85 0x20
-#define XSA8_XS84 0x10
-#define XSA8_XS83 0x08
-#define XSA8_XS82 0x04
-#define XSA8_XS81 0x02
-#define XSA8_XS80 0x01
-
-
-/* XDL1-3 (Transmit DL-Bit Register1-3 (read/write))
- ----------------------- T1 --------------------- */
-
-#define XDL1_XDL17 0x80
-#define XDL1_XDL16 0x40
-#define XDL1_XDL15 0x20
-#define XDL1_XDL14 0x10
-#define XDL1_XDL13 0x08
-#define XDL1_XDL12 0x04
-#define XDL1_XDL11 0x02
-#define XDL1_XDL10 0x01
-
-#define XDL2_XDL27 0x80
-#define XDL2_XDL26 0x40
-#define XDL2_XDL25 0x20
-#define XDL2_XDL24 0x10
-#define XDL2_XDL23 0x08
-#define XDL2_XDL22 0x04
-#define XDL2_XDL21 0x02
-#define XDL2_XDL20 0x01
-
-#define XDL3_XDL37 0x80
-#define XDL3_XDL36 0x40
-#define XDL3_XDL35 0x20
-#define XDL3_XDL34 0x10
-#define XDL3_XDL33 0x08
-#define XDL3_XDL32 0x04
-#define XDL3_XDL31 0x02
-#define XDL3_XDL30 0x01
-
-
-/* ICB1-4 (Idle Channel Register 1-4)
- ------------------ E1 ---------------------------- */
-
-#define E1_ICB1_IC0 0x80
-#define E1_ICB1_IC1 0x40
-#define E1_ICB1_IC2 0x20
-#define E1_ICB1_IC3 0x10
-#define E1_ICB1_IC4 0x08
-#define E1_ICB1_IC5 0x04
-#define E1_ICB1_IC6 0x02
-#define E1_ICB1_IC7 0x01
-
-#define E1_ICB2_IC8 0x80
-#define E1_ICB2_IC9 0x40
-#define E1_ICB2_IC10 0x20
-#define E1_ICB2_IC11 0x10
-#define E1_ICB2_IC12 0x08
-#define E1_ICB2_IC13 0x04
-#define E1_ICB2_IC14 0x02
-#define E1_ICB2_IC15 0x01
-
-#define E1_ICB3_IC16 0x80
-#define E1_ICB3_IC17 0x40
-#define E1_ICB3_IC18 0x20
-#define E1_ICB3_IC19 0x10
-#define E1_ICB3_IC20 0x08
-#define E1_ICB3_IC21 0x04
-#define E1_ICB3_IC22 0x02
-#define E1_ICB3_IC23 0x01
-
-#define E1_ICB4_IC24 0x80
-#define E1_ICB4_IC25 0x40
-#define E1_ICB4_IC26 0x20
-#define E1_ICB4_IC27 0x10
-#define E1_ICB4_IC28 0x08
-#define E1_ICB4_IC29 0x04
-#define E1_ICB4_IC30 0x02
-#define E1_ICB4_IC31 0x01
-
-/* ICB1-4 (Idle Channel Register 1-4)
- ------------------ T1 ---------------------------- */
-
-#define T1_ICB1_IC1 0x80
-#define T1_ICB1_IC2 0x40
-#define T1_ICB1_IC3 0x20
-#define T1_ICB1_IC4 0x10
-#define T1_ICB1_IC5 0x08
-#define T1_ICB1_IC6 0x04
-#define T1_ICB1_IC7 0x02
-#define T1_ICB1_IC8 0x01
-
-#define T1_ICB2_IC9 0x80
-#define T1_ICB2_IC10 0x40
-#define T1_ICB2_IC11 0x20
-#define T1_ICB2_IC12 0x10
-#define T1_ICB2_IC13 0x08
-#define T1_ICB2_IC14 0x04
-#define T1_ICB2_IC15 0x02
-#define T1_ICB2_IC16 0x01
-
-#define T1_ICB3_IC17 0x80
-#define T1_ICB3_IC18 0x40
-#define T1_ICB3_IC19 0x20
-#define T1_ICB3_IC20 0x10
-#define T1_ICB3_IC21 0x08
-#define T1_ICB3_IC22 0x04
-#define T1_ICB3_IC23 0x02
-#define T1_ICB3_IC24 0x01
-
-/* FMR3 (Framer Mode Register 3)
- --------------------E1------------------------ */
-
-#define FMR3_CMI 0x08
-#define FMR3_SYNSA 0x04
-#define FMR3_CFRZ 0x02
-#define FMR3_EXTIW 0x01
-
-
-
-/* CCB1-3 (Clear Channel Register)
- ------------------- T1 ----------------------- */
-
-#define CCB1_CH1 0x80
-#define CCB1_CH2 0x40
-#define CCB1_CH3 0x20
-#define CCB1_CH4 0x10
-#define CCB1_CH5 0x08
-#define CCB1_CH6 0x04
-#define CCB1_CH7 0x02
-#define CCB1_CH8 0x01
-
-#define CCB2_CH9 0x80
-#define CCB2_CH10 0x40
-#define CCB2_CH11 0x20
-#define CCB2_CH12 0x10
-#define CCB2_CH13 0x08
-#define CCB2_CH14 0x04
-#define CCB2_CH15 0x02
-#define CCB2_CH16 0x01
-
-#define CCB3_CH17 0x80
-#define CCB3_CH18 0x40
-#define CCB3_CH19 0x20
-#define CCB3_CH20 0x10
-#define CCB3_CH21 0x08
-#define CCB3_CH22 0x04
-#define CCB3_CH23 0x02
-#define CCB3_CH24 0x01
-
-
-/* LIM0/1 (Line Interface Mode 0/1)
- ------------------- E1 & T1 --------------------------- */
-
-#define LIM0_XFB 0x80
-#define LIM0_XDOS 0x40
-#define LIM0_SCL1 0x20
-#define LIM0_SCL0 0x10
-#define LIM0_EQON 0x08
-#define LIM0_ELOS 0x04
-#define LIM0_LL 0x02
-#define LIM0_MAS 0x01
-
-#define LIM1_EFSC 0x80
-#define LIM1_RIL2 0x40
-#define LIM1_RIL1 0x20
-#define LIM1_RIL0 0x10
-#define LIM1_DCOC 0x08
-#define LIM1_JATT 0x04
-#define LIM1_RL 0x02
-#define LIM1_DRS 0x01
-
-
-/* PCDR (Pulse Count Detection Register(Read/Write))
- ------------------ E1 & T1 ------------------------- */
-
-#define PCDR_PCD7 0x80
-#define PCDR_PCD6 0x40
-#define PCDR_PCD5 0x20
-#define PCDR_PCD4 0x10
-#define PCDR_PCD3 0x08
-#define PCDR_PCD2 0x04
-#define PCDR_PCD1 0x02
-#define PCDR_PCD0 0x01
-
-#define PCRR_PCR7 0x80
-#define PCRR_PCR6 0x40
-#define PCRR_PCR5 0x20
-#define PCRR_PCR4 0x10
-#define PCRR_PCR3 0x08
-#define PCRR_PCR2 0x04
-#define PCRR_PCR1 0x02
-#define PCRR_PCR0 0x01
-
-
-/* LIM2 (Line Interface Mode 2)
-
- ------------------ E1 & T1 ---------------------------- */
-
-#define LIM2_DJA2 0x20
-#define LIM2_DJA1 0x10
-#define LIM2_LOS2 0x02
-#define LIM2_LOS1 0x01
-
-/* LCR1 (Loop Code Register 1) */
-
-#define LCR1_EPRM 0x80
-#define LCR1_XPRBS 0x40
-
-/* SIC1 (System Interface Control 1) */
-#define SIC1_SRSC 0x80
-#define SIC1_RBS1 0x20
-#define SIC1_RBS0 0x10
-#define SIC1_SXSC 0x08
-#define SIC1_XBS1 0x02
-#define SIC1_XBS0 0x01
-
-/* DEC (Disable Error Counter)
- ------------------ E1 & T1 ---------------------------- */
-
-#define DEC_DCEC3 0x20
-#define DEC_DBEC 0x10
-#define DEC_DCEC1 0x08
-#define DEC_DCEC 0x08
-#define DEC_DEBC 0x04
-#define DEC_DCVC 0x02
-#define DEC_DFEC 0x01
-
-
-/* FALC Register Bits (Receive Mode)
- ---------------------------------------------------------------------------- */
-
-
-/* FRS0/1 (Framer Receive Status Register 0/1)
- ----------------- E1 & T1 ---------------------------------- */
-
-#define FRS0_LOS 0x80
-#define FRS0_AIS 0x40
-#define FRS0_LFA 0x20
-#define FRS0_RRA 0x10
-#define FRS0_API 0x08
-#define FRS0_NMF 0x04
-#define FRS0_LMFA 0x02
-#define FRS0_FSRF 0x01
-
-#define FRS1_TS16RA 0x40
-#define FRS1_TS16LOS 0x20
-#define FRS1_TS16AIS 0x10
-#define FRS1_TS16LFA 0x08
-#define FRS1_EXZD 0x80
-#define FRS1_LLBDD 0x10
-#define FRS1_LLBAD 0x08
-#define FRS1_XLS 0x02
-#define FRS1_XLO 0x01
-#define FRS1_PDEN 0x40
-
-/* FRS2/3 (Framer Receive Status Register 2/3)
- ----------------- T1 ---------------------------------- */
-
-#define FRS2_ESC2 0x80
-#define FRS2_ESC1 0x40
-#define FRS2_ESC0 0x20
-
-#define FRS3_FEH5 0x20
-#define FRS3_FEH4 0x10
-#define FRS3_FEH3 0x08
-#define FRS3_FEH2 0x04
-#define FRS3_FEH1 0x02
-#define FRS3_FEH0 0x01
-
-
-/* RSW (Receive Service Word Pulseframe)
- ----------------- E1 ------------------------------ */
-
-#define RSW_RSI 0x80
-#define RSW_RRA 0x20
-#define RSW_RYO 0x10
-#define RSW_RY1 0x08
-#define RSW_RY2 0x04
-#define RSW_RY3 0x02
-#define RSW_RY4 0x01
-
-
-/* RSP (Receive Spare Bits / Additional Status)
- ---------------- E1 ------------------------------- */
-
-#define RSP_SI1 0x80
-#define RSP_SI2 0x40
-#define RSP_LLBDD 0x10
-#define RSP_LLBAD 0x08
-#define RSP_RSIF 0x04
-#define RSP_RS13 0x02
-#define RSP_RS15 0x01
-
-
-/* FECL (Framing Error Counter)
- ---------------- E1 & T1 -------------------------- */
-
-#define FECL_FE7 0x80
-#define FECL_FE6 0x40
-#define FECL_FE5 0x20
-#define FECL_FE4 0x10
-#define FECL_FE3 0x08
-#define FECL_FE2 0x04
-#define FECL_FE1 0x02
-#define FECL_FE0 0x01
-
-#define FECH_FE15 0x80
-#define FECH_FE14 0x40
-#define FECH_FE13 0x20
-#define FECH_FE12 0x10
-#define FECH_FE11 0x08
-#define FECH_FE10 0x04
-#define FECH_FE9 0x02
-#define FECH_FE8 0x01
-
-
-/* CVCl (Code Violation Counter)
- ----------------- E1 ------------------------- */
-
-#define CVCL_CV7 0x80
-#define CVCL_CV6 0x40
-#define CVCL_CV5 0x20
-#define CVCL_CV4 0x10
-#define CVCL_CV3 0x08
-#define CVCL_CV2 0x04
-#define CVCL_CV1 0x02
-#define CVCL_CV0 0x01
-
-#define CVCH_CV15 0x80
-#define CVCH_CV14 0x40
-#define CVCH_CV13 0x20
-#define CVCH_CV12 0x10
-#define CVCH_CV11 0x08
-#define CVCH_CV10 0x04
-#define CVCH_CV9 0x02
-#define CVCH_CV8 0x01
-
-
-/* CEC1-3L (CRC Error Counter)
- ------------------ E1 ----------------------------- */
-
-#define CEC1L_CR7 0x80
-#define CEC1L_CR6 0x40
-#define CEC1L_CR5 0x20
-#define CEC1L_CR4 0x10
-#define CEC1L_CR3 0x08
-#define CEC1L_CR2 0x04
-#define CEC1L_CR1 0x02
-#define CEC1L_CR0 0x01
-
-#define CEC1H_CR15 0x80
-#define CEC1H_CR14 0x40
-#define CEC1H_CR13 0x20
-#define CEC1H_CR12 0x10
-#define CEC1H_CR11 0x08
-#define CEC1H_CR10 0x04
-#define CEC1H_CR9 0x02
-#define CEC1H_CR8 0x01
-
-#define CEC2L_CR7 0x80
-#define CEC2L_CR6 0x40
-#define CEC2L_CR5 0x20
-#define CEC2L_CR4 0x10
-#define CEC2L_CR3 0x08
-#define CEC2L_CR2 0x04
-#define CEC2L_CR1 0x02
-#define CEC2L_CR0 0x01
-
-#define CEC2H_CR15 0x80
-#define CEC2H_CR14 0x40
-#define CEC2H_CR13 0x20
-#define CEC2H_CR12 0x10
-#define CEC2H_CR11 0x08
-#define CEC2H_CR10 0x04
-#define CEC2H_CR9 0x02
-#define CEC2H_CR8 0x01
-
-#define CEC3L_CR7 0x80
-#define CEC3L_CR6 0x40
-#define CEC3L_CR5 0x20
-#define CEC3L_CR4 0x10
-#define CEC3L_CR3 0x08
-#define CEC3L_CR2 0x04
-#define CEC3L_CR1 0x02
-#define CEC3L_CR0 0x01
-
-#define CEC3H_CR15 0x80
-#define CEC3H_CR14 0x40
-#define CEC3H_CR13 0x20
-#define CEC3H_CR12 0x10
-#define CEC3H_CR11 0x08
-#define CEC3H_CR10 0x04
-#define CEC3H_CR9 0x02
-#define CEC3H_CR8 0x01
-
-
-/* CECL (CRC Error Counter)
-
- ------------------ T1 ----------------------------- */
-
-#define CECL_CR7 0x80
-#define CECL_CR6 0x40
-#define CECL_CR5 0x20
-#define CECL_CR4 0x10
-#define CECL_CR3 0x08
-#define CECL_CR2 0x04
-#define CECL_CR1 0x02
-#define CECL_CR0 0x01
-
-#define CECH_CR15 0x80
-#define CECH_CR14 0x40
-#define CECH_CR13 0x20
-#define CECH_CR12 0x10
-#define CECH_CR11 0x08
-#define CECH_CR10 0x04
-#define CECH_CR9 0x02
-#define CECH_CR8 0x01
-
-/* EBCL (E Bit Error Counter)
- ------------------- E1 & T1 ------------------------- */
-
-#define EBCL_EB7 0x80
-#define EBCL_EB6 0x40
-#define EBCL_EB5 0x20
-#define EBCL_EB4 0x10
-#define EBCL_EB3 0x08
-#define EBCL_EB2 0x04
-#define EBCL_EB1 0x02
-#define EBCL_EB0 0x01
-
-#define EBCH_EB15 0x80
-#define EBCH_EB14 0x40
-#define EBCH_EB13 0x20
-#define EBCH_EB12 0x10
-#define EBCH_EB11 0x08
-#define EBCH_EB10 0x04
-#define EBCH_EB9 0x02
-#define EBCH_EB8 0x01
-
-
-/* RSA4-8 (Receive Sa4-8-Bit Register)
- -------------------- E1 --------------------------- */
-
-#define RSA4_RS47 0x80
-#define RSA4_RS46 0x40
-#define RSA4_RS45 0x20
-#define RSA4_RS44 0x10
-#define RSA4_RS43 0x08
-#define RSA4_RS42 0x04
-#define RSA4_RS41 0x02
-#define RSA4_RS40 0x01
-
-#define RSA5_RS57 0x80
-#define RSA5_RS56 0x40
-#define RSA5_RS55 0x20
-#define RSA5_RS54 0x10
-#define RSA5_RS53 0x08
-#define RSA5_RS52 0x04
-#define RSA5_RS51 0x02
-#define RSA5_RS50 0x01
-
-#define RSA6_RS67 0x80
-#define RSA6_RS66 0x40
-#define RSA6_RS65 0x20
-#define RSA6_RS64 0x10
-#define RSA6_RS63 0x08
-#define RSA6_RS62 0x04
-#define RSA6_RS61 0x02
-#define RSA6_RS60 0x01
-
-#define RSA7_RS77 0x80
-#define RSA7_RS76 0x40
-#define RSA7_RS75 0x20
-#define RSA7_RS74 0x10
-#define RSA7_RS73 0x08
-#define RSA7_RS72 0x04
-#define RSA7_RS71 0x02
-#define RSA7_RS70 0x01
-
-#define RSA8_RS87 0x80
-#define RSA8_RS86 0x40
-#define RSA8_RS85 0x20
-#define RSA8_RS84 0x10
-#define RSA8_RS83 0x08
-#define RSA8_RS82 0x04
-#define RSA8_RS81 0x02
-#define RSA8_RS80 0x01
-
-/* RSA6S (Receive Sa6 Bit Status Register)
- ------------------------ T1 ------------------------- */
-
-#define RSA6S_SX 0x20
-#define RSA6S_SF 0x10
-#define RSA6S_SE 0x08
-#define RSA6S_SC 0x04
-#define RSA6S_SA 0x02
-#define RSA6S_S8 0x01
-
-
-/* RDL1-3 Receive DL-Bit Register1-3)
- ------------------------ T1 ------------------------- */
-
-#define RDL1_RDL17 0x80
-#define RDL1_RDL16 0x40
-#define RDL1_RDL15 0x20
-#define RDL1_RDL14 0x10
-#define RDL1_RDL13 0x08
-#define RDL1_RDL12 0x04
-#define RDL1_RDL11 0x02
-#define RDL1_RDL10 0x01
-
-#define RDL2_RDL27 0x80
-#define RDL2_RDL26 0x40
-#define RDL2_RDL25 0x20
-#define RDL2_RDL24 0x10
-#define RDL2_RDL23 0x08
-#define RDL2_RDL22 0x04
-#define RDL2_RDL21 0x02
-#define RDL2_RDL20 0x01
-
-#define RDL3_RDL37 0x80
-#define RDL3_RDL36 0x40
-#define RDL3_RDL35 0x20
-#define RDL3_RDL34 0x10
-#define RDL3_RDL33 0x08
-#define RDL3_RDL32 0x04
-#define RDL3_RDL31 0x02
-#define RDL3_RDL30 0x01
-
-
-/* SIS (Signaling Status Register)
-
- -------------------- E1 & T1 -------------------------- */
-
-#define SIS_XDOV 0x80
-#define SIS_XFW 0x40
-#define SIS_XREP 0x20
-#define SIS_RLI 0x08
-#define SIS_CEC 0x04
-#define SIS_BOM 0x01
-
-
-/* RSIS (Receive Signaling Status Register)
-
- -------------------- E1 & T1 --------------------------- */
-
-#define RSIS_VFR 0x80
-#define RSIS_RDO 0x40
-#define RSIS_CRC16 0x20
-#define RSIS_RAB 0x10
-#define RSIS_HA1 0x08
-#define RSIS_HA0 0x04
-#define RSIS_HFR 0x02
-#define RSIS_LA 0x01
-
-
-/* RBCL/H (Receive Byte Count Low/High)
-
- ------------------- E1 & T1 ----------------------- */
-
-#define RBCL_RBC7 0x80
-#define RBCL_RBC6 0x40
-#define RBCL_RBC5 0x20
-#define RBCL_RBC4 0x10
-#define RBCL_RBC3 0x08
-#define RBCL_RBC2 0x04
-#define RBCL_RBC1 0x02
-#define RBCL_RBC0 0x01
-
-#define RBCH_OV 0x10
-#define RBCH_RBC11 0x08
-#define RBCH_RBC10 0x04
-#define RBCH_RBC9 0x02
-#define RBCH_RBC8 0x01
-
-
-/* ISR1-3 (Interrupt Status Register 1-3)
-
- ------------------ E1 & T1 ------------------------------ */
-
-#define FISR0_RME 0x80
-#define FISR0_RFS 0x40
-#define FISR0_T8MS 0x20
-#define FISR0_ISF 0x20
-#define FISR0_RMB 0x10
-#define FISR0_CASC 0x08
-#define FISR0_RSC 0x08
-#define FISR0_CRC6 0x04
-#define FISR0_CRC4 0x04
-#define FISR0_PDEN 0x02
-#define FISR0_RPF 0x01
-
-#define FISR1_CASE 0x80
-#define FISR1_LLBSC 0x80
-#define FISR1_RDO 0x40
-#define FISR1_ALLS 0x20
-#define FISR1_XDU 0x10
-#define FISR1_XMB 0x08
-#define FISR1_XLSC 0x02
-#define FISR1_XPR 0x01
-
-#define FISR2_FAR 0x80
-#define FISR2_LFA 0x40
-#define FISR2_MFAR 0x20
-#define FISR2_T400MS 0x10
-#define FISR2_LMFA 0x10
-#define FISR2_AIS 0x08
-#define FISR2_LOS 0x04
-#define FISR2_RAR 0x02
-#define FISR2_RA 0x01
-
-#define FISR3_ES 0x80
-#define FISR3_SEC 0x40
-#define FISR3_LMFA16 0x20
-#define FISR3_AIS16 0x10
-#define FISR3_RA16 0x08
-#define FISR3_API 0x04
-#define FISR3_XSLP 0x20
-#define FISR3_XSLN 0x10
-#define FISR3_LLBSC 0x08
-#define FISR3_XRS 0x04
-#define FISR3_SLN 0x02
-#define FISR3_SLP 0x01
-
-
-/* GIS (Global Interrupt Status Register)
-
- --------------------- E1 & T1 --------------------- */
-
-#define GIS_ISR3 0x08
-#define GIS_ISR2 0x04
-#define GIS_ISR1 0x02
-#define GIS_ISR0 0x01
-
-
-/* VSTR (Version Status Register)
-
- --------------------- E1 & T1 --------------------- */
-
-#define VSTR_VN3 0x08
-#define VSTR_VN2 0x04
-#define VSTR_VN1 0x02
-#define VSTR_VN0 0x01
-
-
-/*>>>>>>>>>>>>>>>>>>>>> Local Control Structures <<<<<<<<<<<<<<<<<<<<<<<<< */
-
-/* Write-only Registers (E1/T1 control mode write registers) */
-#define XFIFOH 0x00 /* Tx FIFO High Byte */
-#define XFIFOL 0x01 /* Tx FIFO Low Byte */
-#define CMDR 0x02 /* Command Reg */
-#define DEC 0x60 /* Disable Error Counter */
-#define TEST2 0x62 /* Manuf. Test Reg 2 */
-#define XS(nbr) (0x70 + (nbr)) /* Tx CAS Reg (0 to 15) */
-
-/* Read-write Registers (E1/T1 status mode read registers) */


SHAR_EOF
true || echo 'restore of patch-2.2.20 failed'
fi

echo 'End of part 82'
echo 'File patch-2.2.20 is continued in part 83'
echo "83" > _shar_seq_.tmp
exit 0

0 new messages