Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
authorLinus Torvalds <torvalds@g5.osdl.org>
Sun, 2 Apr 2006 20:01:11 +0000 (13:01 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 2 Apr 2006 20:01:11 +0000 (13:01 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] at91_wdt.c - Atmel AT91RM9200 watchdog driver
  [WATCHDOG] pcwd_usb.c: fix a NULL pointer dereference
  [WATCHDOG] pcwd.c sprintf/strcpy fix
  [WATCHDOG] pcwd.c general clean-up after patches
  [WATCHDOG] pcwd.c add debug info
  [WATCHDOG] pcwd.c pcwd_cleanup_module patch
  [WATCHDOG] pcwd.c firmware-info patch
  [WATCHDOG] pcwd.c control status patch

385 files changed:
Documentation/DocBook/Makefile
Documentation/DocBook/kernel-api.tmpl
Documentation/acpi-hotkey.txt
Documentation/fujitsu/frv/kernel-ABI.txt
Documentation/input/joystick-parport.txt
Documentation/kernel-parameters.txt
Documentation/networking/packet_mmap.txt
Documentation/networking/tuntap.txt
Documentation/pcmcia/driver-changes.txt
Documentation/video4linux/CARDLIST.saa7134
Documentation/video4linux/et61x251.txt [moved from Documentation/usb/et61x251.txt with 100% similarity]
Documentation/video4linux/ibmcam.txt [moved from Documentation/usb/ibmcam.txt with 99% similarity]
Documentation/video4linux/ov511.txt [moved from Documentation/usb/ov511.txt with 99% similarity]
Documentation/video4linux/se401.txt [moved from Documentation/usb/se401.txt with 100% similarity]
Documentation/video4linux/sn9c102.txt [moved from Documentation/usb/sn9c102.txt with 98% similarity]
Documentation/video4linux/stv680.txt [moved from Documentation/usb/stv680.txt with 82% similarity]
Documentation/video4linux/w9968cf.txt [moved from Documentation/usb/w9968cf.txt with 97% similarity]
Documentation/video4linux/zc0301.txt [moved from Documentation/usb/zc0301.txt with 100% similarity]
MAINTAINERS
arch/alpha/kernel/setup.c
arch/i386/kernel/crash.c
arch/i386/kernel/setup.c
arch/mips/Kconfig
arch/mips/kernel/Makefile
arch/mips/kernel/i8253.c [new file with mode: 0644]
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/systbl.S
arch/powerpc/kernel/traps.c
arch/powerpc/mm/fault.c
arch/powerpc/platforms/83xx/mpc834x_sys.c
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/cell/spu_callbacks.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/pseries/eeh.c
arch/powerpc/platforms/pseries/eeh_driver.c
arch/powerpc/platforms/pseries/eeh_event.c
arch/powerpc/platforms/pseries/hvCall.S
arch/powerpc/platforms/pseries/hvconsole.c
arch/powerpc/platforms/pseries/hvcserver.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/vio.c
arch/powerpc/platforms/pseries/xics.c
arch/sparc/kernel/systbls.S
arch/sparc64/defconfig
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/mm/fault.c
arch/sparc64/mm/hugetlbpage.c
block/ll_rw_blk.c
drivers/Makefile
drivers/bluetooth/bluecard_cs.c
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/dtl1_cs.c
drivers/char/hvcs.c
drivers/char/keyboard.c
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/cm4040_cs.c
drivers/char/pcmcia/synclink_cs.c
drivers/ide/legacy/ide-cs.c
drivers/ieee1394/sbp2.c
drivers/infiniband/Kconfig
drivers/infiniband/Makefile
drivers/infiniband/hw/ipath/Kconfig [new file with mode: 0644]
drivers/infiniband/hw/ipath/Makefile [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_common.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_cq.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_debug.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_diag.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_driver.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_eeprom.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_file_ops.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_fs.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_ht400.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_init_chip.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_intr.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_kernel.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_keys.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_layer.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_layer.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_mad.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_mr.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_pe800.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_qp.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_rc.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_registers.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_ruc.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_srq.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_stats.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_sysfs.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_uc.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_ud.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_user_pages.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_verbs.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_verbs.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_verbs_mcast.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ipath_wc_x86_64.c [new file with mode: 0644]
drivers/infiniband/hw/ipath/ips_common.h [new file with mode: 0644]
drivers/infiniband/hw/ipath/verbs_debug.h [new file with mode: 0644]
drivers/input/evbug.c
drivers/input/evdev.c
drivers/input/gameport/gameport.c
drivers/input/gameport/ns558.c
drivers/input/input.c
drivers/input/joydev.c
drivers/input/joystick/amijoy.c
drivers/input/joystick/db9.c
drivers/input/joystick/gamecon.c
drivers/input/joystick/iforce/iforce-ff.c
drivers/input/joystick/iforce/iforce-main.c
drivers/input/joystick/iforce/iforce.h
drivers/input/joystick/turbografx.c
drivers/input/keyboard/Kconfig
drivers/input/keyboard/atkbd.c
drivers/input/keyboard/corgikbd.c
drivers/input/keyboard/hil_kbd.c
drivers/input/keyboard/spitzkbd.c
drivers/input/misc/pcspkr.c
drivers/input/misc/uinput.c
drivers/input/mouse/hil_ptr.c
drivers/input/mouse/psmouse-base.c
drivers/input/mouse/synaptics.c
drivers/input/mousedev.c
drivers/input/power.c
drivers/input/serio/hil_mlc.c
drivers/input/serio/i8042-x86ia64io.h
drivers/input/serio/libps2.c
drivers/input/serio/parkbd.c
drivers/input/serio/rpckbd.c
drivers/input/serio/serio.c
drivers/input/serio/serio_raw.c
drivers/input/tsdev.c
drivers/isdn/hardware/avm/avm_cs.c
drivers/isdn/hisax/avma1_cs.c
drivers/isdn/hisax/elsa_cs.c
drivers/isdn/hisax/sedlbauer_cs.c
drivers/isdn/hisax/teles_cs.c
drivers/md/dm-target.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/md/raid6main.c
drivers/media/Kconfig
drivers/media/dvb/bt8xx/Kconfig
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvb_frontend.h
drivers/media/dvb/dvb-usb/cxusb.c
drivers/media/dvb/dvb-usb/dtt200u.c
drivers/media/dvb/dvb-usb/dvb-usb-ids.h
drivers/media/dvb/dvb-usb/vp702x-fe.c
drivers/media/dvb/frontends/Kconfig
drivers/media/dvb/frontends/tda1004x.c
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/av7110_av.c
drivers/media/dvb/ttpci/budget-av.c
drivers/media/dvb/ttpci/budget-core.c
drivers/media/dvb/ttpci/budget-patch.c
drivers/media/dvb/ttpci/budget.h
drivers/media/video/Kconfig
drivers/media/video/Makefile
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-vbi.c
drivers/media/video/cpia.c
drivers/media/video/cpia2/cpia2.h
drivers/media/video/cx25840/cx25840-audio.c
drivers/media/video/cx25840/cx25840-core.c
drivers/media/video/cx25840/cx25840-core.h [moved from drivers/media/video/cx25840/cx25840.h with 72% similarity]
drivers/media/video/cx25840/cx25840-firmware.c
drivers/media/video/cx25840/cx25840-vbi.c
drivers/media/video/cx88/Kconfig
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/et61x251/Kconfig [new file with mode: 0644]
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/msp3400-driver.c
drivers/media/video/msp3400-driver.h
drivers/media/video/msp3400-kthreads.c
drivers/media/video/pwc/Kconfig [new file with mode: 0644]
drivers/media/video/saa7115.c
drivers/media/video/saa7127.c
drivers/media/video/saa7134/Kconfig
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134.h
drivers/media/video/sn9c102/Kconfig [new file with mode: 0644]
drivers/media/video/tuner-core.c
drivers/media/video/tvaudio.c
drivers/media/video/tveeprom.c
drivers/media/video/tvp5150.c
drivers/media/video/upd64031a.c [new file with mode: 0644]
drivers/media/video/upd64083.c [new file with mode: 0644]
drivers/media/video/usbvideo/Kconfig [new file with mode: 0644]
drivers/media/video/usbvideo/Makefile
drivers/media/video/v4l2-common.c
drivers/media/video/video-buf.c
drivers/media/video/wm8739.c [new file with mode: 0644]
drivers/media/video/zc0301/Kconfig [new file with mode: 0644]
drivers/mtd/chips/Kconfig
drivers/mtd/maps/pcmciamtd.c
drivers/net/8139cp.c
drivers/net/arcnet/arcnet.c
drivers/net/arcnet/com90xx.c
drivers/net/b44.c
drivers/net/chelsio/sge.c
drivers/net/e1000/e1000_main.c
drivers/net/eql.c
drivers/net/ibmveth.c
drivers/net/irda/sa1100_ir.c
drivers/net/ne2k-pci.c
drivers/net/ns83820.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/com20020_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/ibmtr_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/starfire.c
drivers/net/tg3.c
drivers/net/tokenring/abyss.c
drivers/net/tokenring/madgemc.c
drivers/net/wireless/airo_cs.c
drivers/net/wireless/atmel_cs.c
drivers/net/wireless/hostap/hostap_cs.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/netwave_cs.c
drivers/net/wireless/orinoco_cs.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/ray_cs.h
drivers/net/wireless/spectrum_cs.c
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/wavelan_cs.p.h
drivers/net/wireless/wl3501.h
drivers/net/wireless/wl3501_cs.c
drivers/net/yellowfin.c
drivers/parport/parport_cs.c
drivers/pcmcia/Kconfig
drivers/pcmcia/Makefile
drivers/pcmcia/at91_cf.c [new file with mode: 0644]
drivers/pcmcia/cistpl.c
drivers/pcmcia/cs.c
drivers/pcmcia/cs_internal.h
drivers/pcmcia/ds.c
drivers/pcmcia/ds_internal.h
drivers/pcmcia/i82092.c
drivers/pcmcia/i82365.c
drivers/pcmcia/pcmcia_compat.c [deleted file]
drivers/pcmcia/pcmcia_ioctl.c
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/pd6729.c
drivers/pcmcia/rsrc_mgr.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/pcmcia/sa1100_cerf.c
drivers/pcmcia/socket_sysfs.c
drivers/pcmcia/ti113x.h
drivers/s390/block/dasd_erp.c
drivers/s390/char/sclp_rw.c
drivers/s390/char/tape_block.c
drivers/s390/net/lcs.c
drivers/scsi/aic7xxx/Kconfig.aic7xxx
drivers/scsi/ibmvscsi/rpa_vscsi.c
drivers/scsi/pcmcia/aha152x_stub.c
drivers/scsi/pcmcia/fdomain_stub.c
drivers/scsi/pcmcia/nsp_cs.c
drivers/scsi/pcmcia/nsp_cs.h
drivers/scsi/pcmcia/qlogic_stub.c
drivers/scsi/pcmcia/sym53c500_cs.c
drivers/serial/jsm/jsm.h
drivers/serial/jsm/jsm_driver.c
drivers/serial/jsm/jsm_neo.c
drivers/serial/serial_cs.c
drivers/telephony/ixj_pcmcia.c
drivers/usb/host/sl811_cs.c
drivers/usb/input/hid-input.c
fs/direct-io.c
fs/dquot.c
fs/exec.c
fs/fcntl.c
fs/freevxfs/vxfs_olt.c
fs/hfsplus/bnode.c
fs/hfsplus/btree.c
fs/inode.c
fs/jffs2/background.c
fs/smbfs/file.c
fs/splice.c
fs/sysfs/dir.c
fs/sysfs/inode.c
fs/sysv/dir.c
fs/udf/inode.c
include/asm-arm/arch-at91rm9200/hardware.h
include/asm-powerpc/eeh.h
include/asm-powerpc/hvcall.h
include/asm-sparc/unistd.h
include/asm-sparc64/unistd.h
include/linux/fs.h
include/linux/gameport.h
include/linux/hrtimer.h
include/linux/input.h
include/linux/kbd_kern.h
include/linux/keyboard.h
include/linux/libps2.h
include/linux/netfilter/x_tables.h
include/linux/netfilter/xt_esp.h [new file with mode: 0644]
include/linux/netfilter/xt_multiport.h [new file with mode: 0644]
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netfilter_ipv4/ipt_esp.h
include/linux/netfilter_ipv4/ipt_multiport.h
include/linux/netfilter_ipv6/ip6t_esp.h
include/linux/netfilter_ipv6/ip6t_multiport.h
include/linux/pipe_fs_i.h
include/linux/serio.h
include/linux/uinput.h
include/linux/videodev2.h
include/media/cx25840.h [new file with mode: 0644]
include/media/msp3400.h
include/media/saa7115.h [new file with mode: 0644]
include/media/saa7127.h [new file with mode: 0644]
include/media/upd64031a.h [new file with mode: 0644]
include/media/upd64083.h [new file with mode: 0644]
include/net/xfrm.h
include/pcmcia/bulkmem.h
include/pcmcia/ciscode.h
include/pcmcia/cistpl.h
include/pcmcia/cs.h
include/pcmcia/ds.h
include/pcmcia/ss.h
ipc/shm.c
ipc/util.c
kernel/power/Kconfig
kernel/printk.c
kernel/ptrace.c
kernel/signal.c
kernel/time.c
kernel/timer.c
mm/highmem.c
mm/mmap.c
mm/page-writeback.c
mm/slab.c
mm/swap_state.c
mm/vmalloc.c
net/compat.c
net/ipv4/ah4.c
net/ipv4/esp4.c
net/ipv4/ipcomp.c
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/Makefile
net/ipv4/netfilter/ip_conntrack_netlink.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_multiport.c [deleted file]
net/ipv4/xfrm4_input.c
net/ipv4/xfrm4_tunnel.c
net/ipv6/ah6.c
net/ipv6/esp6.c
net/ipv6/ipcomp6.c
net/ipv6/netfilter/Kconfig
net/ipv6/netfilter/Makefile
net/ipv6/netfilter/ip6t_esp.c [deleted file]
net/ipv6/netfilter/ip6t_multiport.c [deleted file]
net/ipv6/xfrm6_input.c
net/ipv6/xfrm6_tunnel.c
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nf_conntrack_netlink.c
net/netfilter/x_tables.c
net/netfilter/xt_esp.c [moved from net/ipv4/netfilter/ipt_esp.c with 51% similarity]
net/netfilter/xt_multiport.c [new file with mode: 0644]
net/netfilter/xt_policy.c
net/socket.c
net/xfrm/xfrm_input.c
net/xfrm/xfrm_policy.c
sound/pcmcia/pdaudiocf/pdaudiocf.c
sound/pcmcia/pdaudiocf/pdaudiocf.h
sound/pcmcia/vx/vxpocket.c
sound/pcmcia/vx/vxpocket.h

index 7d87dd73cbe40552d67450059c45934faff45529..5a2882d275ba5b3beabb305c62a22f38aa5cff44 100644 (file)
@@ -2,7 +2,7 @@
 # This makefile is used to generate the kernel documentation,
 # primarily based on in-line comments in various source files.
 # See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
-# to ducument the SRC - and how to read it.
+# to document the SRC - and how to read it.
 # To add a new book the only step required is to add the book to the
 # list of DOCBOOKS.
 
index 8c9c6704e85bab5e26b6f28b2240e96346cc5660..ca02e04a906c219acfd21b8a72c827bd7f0b31e4 100644 (file)
@@ -322,7 +322,6 @@ X!Earch/i386/kernel/mca.c
   <chapter id="sysfs">
      <title>The Filesystem for Exporting Kernel Objects</title>
 !Efs/sysfs/file.c
-!Efs/sysfs/dir.c
 !Efs/sysfs/symlink.c
 !Efs/sysfs/bin.c
   </chapter>
index 744f1aec65535f7d3bbadeedcc4f3e8c508709fb..38040fa376495d2cf000f47de01f7d1980ff960d 100644 (file)
@@ -30,7 +30,7 @@ specific hotkey(event))
 echo "event_num:event_type:event_argument" > 
        /proc/acpi/hotkey/action.
 The result of the execution of this aml method is 
-attached to /proc/acpi/hotkey/poll_method, which is dnyamically
+attached to /proc/acpi/hotkey/poll_method, which is dynamically
 created.  Please use command "cat /proc/acpi/hotkey/polling_method" 
 to retrieve it.
 
index 0ed9b0a779bcad04025cae00bdf2fa40fe1f4748..8b0a5fc8bfd96cc64fe09f165b740f272196f654 100644 (file)
@@ -1,17 +1,19 @@
-                                =================================
-                                INTERNAL KERNEL ABI FOR FR-V ARCH
-                                =================================
-
-The internal FRV kernel ABI is not quite the same as the userspace ABI. A number of the registers
-are used for special purposed, and the ABI is not consistent between modules vs core, and MMU vs
-no-MMU.
-
-This partly stems from the fact that FRV CPUs do not have a separate supervisor stack pointer, and
-most of them do not have any scratch registers, thus requiring at least one general purpose
-register to be clobbered in such an event. Also, within the kernel core, it is possible to simply
-jump or call directly between functions using a relative offset. This cannot be extended to modules
-for the displacement is likely to be too far. Thus in modules the address of a function to call
-must be calculated in a register and then used, requiring two extra instructions.
+                       =================================
+                       INTERNAL KERNEL ABI FOR FR-V ARCH
+                       =================================
+
+The internal FRV kernel ABI is not quite the same as the userspace ABI. A
+number of the registers are used for special purposed, and the ABI is not
+consistent between modules vs core, and MMU vs no-MMU.
+
+This partly stems from the fact that FRV CPUs do not have a separate
+supervisor stack pointer, and most of them do not have any scratch
+registers, thus requiring at least one general purpose register to be
+clobbered in such an event. Also, within the kernel core, it is possible to
+simply jump or call directly between functions using a relative offset.
+This cannot be extended to modules for the displacement is likely to be too
+far. Thus in modules the address of a function to call must be calculated
+in a register and then used, requiring two extra instructions.
 
 This document has the following sections:
 
@@ -39,7 +41,8 @@ When a system call is made, the following registers are effective:
 CPU OPERATING MODES
 ===================
 
-The FR-V CPU has three basic operating modes. In order of increasing capability:
+The FR-V CPU has three basic operating modes. In order of increasing
+capability:
 
   (1) User mode.
 
@@ -47,42 +50,46 @@ The FR-V CPU has three basic operating modes. In order of increasing capability:
 
   (2) Kernel mode.
 
-      Normal kernel mode. There are many additional control registers available that may be
-      accessed in this mode, in addition to all the stuff available to user mode. This has two
-      submodes:
+      Normal kernel mode. There are many additional control registers
+      available that may be accessed in this mode, in addition to all the
+      stuff available to user mode. This has two submodes:
 
       (a) Exceptions enabled (PSR.T == 1).
 
-         Exceptions will invoke the appropriate normal kernel mode handler. On entry to the
-         handler, the PSR.T bit will be cleared.
+         Exceptions will invoke the appropriate normal kernel mode
+         handler. On entry to the handler, the PSR.T bit will be cleared.
 
       (b) Exceptions disabled (PSR.T == 0).
 
-         No exceptions or interrupts may happen. Any mandatory exceptions will cause the CPU to
-         halt unless the CPU is told to jump into debug mode instead.
+         No exceptions or interrupts may happen. Any mandatory exceptions
+         will cause the CPU to halt unless the CPU is told to jump into
+         debug mode instead.
 
   (3) Debug mode.
 
-      No exceptions may happen in this mode. Memory protection and management exceptions will be
-      flagged for later consideration, but the exception handler won't be invoked. Debugging traps
-      such as hardware breakpoints and watchpoints will be ignored. This mode is entered only by
-      debugging events obtained from the other two modes.
+      No exceptions may happen in this mode. Memory protection and
+      management exceptions will be flagged for later consideration, but
+      the exception handler won't be invoked. Debugging traps such as
+      hardware breakpoints and watchpoints will be ignored. This mode is
+      entered only by debugging events obtained from the other two modes.
 
-      All kernel mode registers may be accessed, plus a few extra debugging specific registers.
+      All kernel mode registers may be accessed, plus a few extra debugging
+      specific registers.
 
 
 =================================
 INTERNAL KERNEL-MODE REGISTER ABI
 =================================
 
-There are a number of permanent register assignments that are set up by entry.S in the exception
-prologue. Note that there is a complete set of exception prologues for each of user->kernel
-transition and kernel->kernel transition. There are also user->debug and kernel->debug mode
-transition prologues.
+There are a number of permanent register assignments that are set up by
+entry.S in the exception prologue. Note that there is a complete set of
+exception prologues for each of user->kernel transition and kernel->kernel
+transition. There are also user->debug and kernel->debug mode transition
+prologues.
 
 
        REGISTER        FLAVOUR USE
-       =============== ======= ====================================================
+       =============== ======= ==============================================
        GR1                     Supervisor stack pointer
        GR15                    Current thread info pointer
        GR16                    GP-Rel base register for small data
@@ -92,10 +99,12 @@ transition prologues.
        GR31            NOMMU   Destroyed by debug mode entry
        GR31            MMU     Destroyed by TLB miss kernel mode entry
        CCR.ICC2                Virtual interrupt disablement tracking
-       CCCR.CC3                Cleared by exception prologue (atomic op emulation)
+       CCCR.CC3                Cleared by exception prologue 
+                               (atomic op emulation)
        SCR0            MMU     See mmu-layout.txt.
        SCR1            MMU     See mmu-layout.txt.
-       SCR2            MMU     Save for EAR0 (destroyed by icache insns in debug mode)
+       SCR2            MMU     Save for EAR0 (destroyed by icache insns 
+                                              in debug mode)
        SCR3            MMU     Save for GR31 during debug exceptions
        DAMR/IAMR       NOMMU   Fixed memory protection layout.
        DAMR/IAMR       MMU     See mmu-layout.txt.
@@ -104,18 +113,21 @@ transition prologues.
 Certain registers are also used or modified across function calls:
 
        REGISTER        CALL                            RETURN
-       =============== =============================== ===============================
+       =============== =============================== ======================
        GR0             Fixed Zero                      -
        GR2             Function call frame pointer
        GR3             Special                         Preserved
        GR3-GR7         -                               Clobbered
-       GR8             Function call arg #1            Return value (or clobbered)
-       GR9             Function call arg #2            Return value MSW (or clobbered)
+       GR8             Function call arg #1            Return value 
+                                                       (or clobbered)
+       GR9             Function call arg #2            Return value MSW 
+                                                       (or clobbered)
        GR10-GR13       Function call arg #3-#6         Clobbered
        GR14            -                               Clobbered
        GR15-GR16       Special                         Preserved
        GR17-GR27       -                               Preserved
-       GR28-GR31       Special                         Only accessed explicitly
+       GR28-GR31       Special                         Only accessed 
+                                                       explicitly
        LR              Return address after CALL       Clobbered
        CCR/CCCR        -                               Mostly Clobbered
 
@@ -124,46 +136,53 @@ Certain registers are also used or modified across function calls:
 INTERNAL DEBUG-MODE REGISTER ABI
 ================================
 
-This is the same as the kernel-mode register ABI for functions calls. The difference is that in
-debug-mode there's a different stack and a different exception frame. Almost all the global
-registers from kernel-mode (including the stack pointer) may be changed.
+This is the same as the kernel-mode register ABI for functions calls. The
+difference is that in debug-mode there's a different stack and a different
+exception frame. Almost all the global registers from kernel-mode
+(including the stack pointer) may be changed.
 
        REGISTER        FLAVOUR USE
-       =============== ======= ====================================================
+       =============== ======= ==============================================
        GR1                     Debug stack pointer
        GR16                    GP-Rel base register for small data
-       GR31                    Current debug exception frame pointer (__debug_frame)
+       GR31                    Current debug exception frame pointer 
+                               (__debug_frame)
        SCR3            MMU     Saved value of GR31
 
 
-Note that debug mode is able to interfere with the kernel's emulated atomic ops, so it must be
-exceedingly careful not to do any that would interact with the main kernel in this regard. Hence
-the debug mode code (gdbstub) is almost completely self-contained. The only external code used is
-the sprintf family of functions.
+Note that debug mode is able to interfere with the kernel's emulated atomic
+ops, so it must be exceedingly careful not to do any that would interact
+with the main kernel in this regard. Hence the debug mode code (gdbstub) is
+almost completely self-contained. The only external code used is the
+sprintf family of functions.
 
-Futhermore, break.S is so complicated because single-step mode does not switch off on entry to an
-exception. That means unless manually disabled, single-stepping will blithely go on stepping into
-things like interrupts. See gdbstub.txt for more information.
+Futhermore, break.S is so complicated because single-step mode does not
+switch off on entry to an exception. That means unless manually disabled,
+single-stepping will blithely go on stepping into things like interrupts.
+See gdbstub.txt for more information.
 
 
 ==========================
 VIRTUAL INTERRUPT HANDLING
 ==========================
 
-Because accesses to the PSR is so slow, and to disable interrupts we have to access it twice (once
-to read and once to write), we don't actually disable interrupts at all if we don't have to. What
-we do instead is use the ICC2 condition code flags to note virtual disablement, such that if we
-then do take an interrupt, we note the flag, really disable interrupts, set another flag and resume
-execution at the point the interrupt happened. Setting condition flags as a side effect of an
-arithmetic or logical instruction is really fast. This use of the ICC2 only occurs within the
+Because accesses to the PSR is so slow, and to disable interrupts we have
+to access it twice (once to read and once to write), we don't actually
+disable interrupts at all if we don't have to. What we do instead is use
+the ICC2 condition code flags to note virtual disablement, such that if we
+then do take an interrupt, we note the flag, really disable interrupts, set
+another flag and resume execution at the point the interrupt happened.
+Setting condition flags as a side effect of an arithmetic or logical
+instruction is really fast. This use of the ICC2 only occurs within the
 kernel - it does not affect userspace.
 
 The flags we use are:
 
  (*) CCR.ICC2.Z [Zero flag]
 
-     Set to virtually disable interrupts, clear when interrupts are virtually enabled. Can be
-     modified by logical instructions without affecting the Carry flag.
+     Set to virtually disable interrupts, clear when interrupts are
+     virtually enabled. Can be modified by logical instructions without
+     affecting the Carry flag.
 
  (*) CCR.ICC2.C [Carry flag]
 
@@ -176,8 +195,9 @@ What happens is this:
 
        ICC2.Z is 0, ICC2.C is 1.
 
- (2) An interrupt occurs. The exception prologue examines ICC2.Z and determines that nothing needs
-     doing. This is done simply with an unlikely BEQ instruction.
+ (2) An interrupt occurs. The exception prologue examines ICC2.Z and
+     determines that nothing needs doing. This is done simply with an
+     unlikely BEQ instruction.
 
  (3) The interrupts are disabled (local_irq_disable)
 
@@ -187,48 +207,56 @@ What happens is this:
 
        ICC2.Z would be set to 0.
 
-     A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would be used to trap if
-     interrupts were now virtually enabled, but physically disabled - which they're not, so the
-     trap isn't taken. The kernel would then be back to state (1).
+     A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would
+     be used to trap if interrupts were now virtually enabled, but
+     physically disabled - which they're not, so the trap isn't taken. The
+     kernel would then be back to state (1).
 
- (5) An interrupt occurs. The exception prologue examines ICC2.Z and determines that the interrupt
-     shouldn't actually have happened. It jumps aside, and there disabled interrupts by setting
-     PSR.PIL to 14 and then it clears ICC2.C.
+ (5) An interrupt occurs. The exception prologue examines ICC2.Z and
+     determines that the interrupt shouldn't actually have happened. It
+     jumps aside, and there disabled interrupts by setting PSR.PIL to 14
+     and then it clears ICC2.C.
 
  (6) If interrupts were then saved and disabled again (local_irq_save):
 
-       ICC2.Z would be shifted into the save variable and masked off (giving a 1).
+       ICC2.Z would be shifted into the save variable and masked off 
+       (giving a 1).
 
-       ICC2.Z would then be set to 1 (thus unchanged), and ICC2.C would be unaffected (ie: 0).
+       ICC2.Z would then be set to 1 (thus unchanged), and ICC2.C would be
+       unaffected (ie: 0).
 
  (7) If interrupts were then restored from state (6) (local_irq_restore):
 
-       ICC2.Z would be set to indicate the result of XOR'ing the saved value (ie: 1) with 1, which
-       gives a result of 0 - thus leaving ICC2.Z set.
+       ICC2.Z would be set to indicate the result of XOR'ing the saved
+       value (ie: 1) with 1, which gives a result of 0 - thus leaving
+       ICC2.Z set.
 
        ICC2.C would remain unaffected (ie: 0).
 
-     A TIHI #2 instruction would be used to again assay the current state, but this would do
-     nothing as Z==1.
+     A TIHI #2 instruction would be used to again assay the current state,
+     but this would do nothing as Z==1.
 
  (8) If interrupts were then enabled (local_irq_enable):
 
-       ICC2.Z would be cleared. ICC2.C would be left unaffected. Both flags would now be 0.
+       ICC2.Z would be cleared. ICC2.C would be left unaffected. Both
+       flags would now be 0.
 
-     A TIHI #2 instruction again issued to assay the current state would then trap as both Z==0
-     [interrupts virtually enabled] and C==0 [interrupts really disabled] would then be true.
+     A TIHI #2 instruction again issued to assay the current state would
+     then trap as both Z==0 [interrupts virtually enabled] and C==0
+     [interrupts really disabled] would then be true.
 
- (9) The trap #2 handler would simply enable hardware interrupts (set PSR.PIL to 0), set ICC2.C to
-     1 and return.
+ (9) The trap #2 handler would simply enable hardware interrupts 
+     (set PSR.PIL to 0), set ICC2.C to 1 and return.
 
 (10) Immediately upon returning, the pending interrupt would be taken.
 
-(11) The interrupt handler would take the path of actually processing the interrupt (ICC2.Z is
-     clear, BEQ fails as per step (2)).
+(11) The interrupt handler would take the path of actually processing the
+     interrupt (ICC2.Z is clear, BEQ fails as per step (2)).
 
-(12) The interrupt handler would then set ICC2.C to 1 since hardware interrupts are definitely
-     enabled - or else the kernel wouldn't be here.
+(12) The interrupt handler would then set ICC2.C to 1 since hardware
+     interrupts are definitely enabled - or else the kernel wouldn't be here.
 
 (13) On return from the interrupt handler, things would be back to state (1).
 
-This trap (#2) is only available in kernel mode. In user mode it will result in SIGILL.
+This trap (#2) is only available in kernel mode. In user mode it will
+result in SIGILL.
index 88a011c9f985c090def78c8a7cd29f0b734d5582..d537c48cc6d02d0541b44271698f6997e90332e4 100644 (file)
@@ -36,12 +36,12 @@ with them.
 
   All NES and SNES use the same synchronous serial protocol, clocked from
 the computer's side (and thus timing insensitive). To allow up to 5 NES
-and/or SNES gamepads connected to the parallel port at once, the output
-lines of the parallel port are shared, while one of 5 available input lines
-is assigned to each gamepad.
+and/or SNES gamepads and/or SNES mice connected to the parallel port at once,
+the output lines of the parallel port are shared, while one of 5 available
+input lines is assigned to each gamepad.
 
   This protocol is handled by the gamecon.c driver, so that's the one
-you'll use for NES and SNES gamepads.
+you'll use for NES, SNES gamepads and SNES mice.
 
   The main problem with PC parallel ports is that they don't have +5V power
 source on any of their pins. So, if you want a reliable source of power
@@ -106,7 +106,7 @@ A, Turbo B, Select and Start, and is connected through 5 wires, then it is
 either a NES or NES clone and will work with this connection. SNES gamepads
 also use 5 wires, but have more buttons. They will work as well, of course.
 
-Pinout for NES gamepads                 Pinout for SNES gamepads
+Pinout for NES gamepads                 Pinout for SNES gamepads and mice
 
           +----> Power                   +-----------------------\
           |                            7 | o  o  o  o |  x  x  o  | 1
@@ -454,6 +454,7 @@ uses the following kernel/module command line:
          6  | N64 pad
          7  | Sony PSX controller
          8  | Sony PSX DDR controller
+         9  | SNES mouse
 
   The exact type of the PSX controller type is autoprobed when used so
 hot swapping should work (but is not recomended).
index f8cb55c30b0fb4d3c8a9931d15c0eedb13684b46..b3a6187e53051866004696e4d5718cd85240e1c2 100644 (file)
@@ -1,4 +1,4 @@
-February 2003             Kernel Parameters                     v2.5.59
+                          Kernel Parameters
                           ~~~~~~~~~~~~~~~~~
 
 The following is a consolidated list of the kernel parameters as implemented
@@ -17,9 +17,17 @@ are specified on the kernel command line with the module name plus
 
        usbcore.blinkenlights=1
 
-The text in square brackets at the beginning of the description states the
-restrictions on the kernel for the said kernel parameter to be valid. The
-restrictions referred to are that the relevant option is valid if:
+This document may not be entirely up to date and comprehensive. The command
+"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
+module. Loadable modules, after being loaded into the running kernel, also
+reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
+parameters may be changed at runtime by the command
+"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
+
+The parameters listed below are only valid if certain kernel build options were
+enabled and if respective hardware is present. The text in square brackets at
+the beginning of each description states the restrictions within which a
+parameter is applicable:
 
        ACPI    ACPI support is enabled.
        ALSA    ALSA sound support is enabled.
@@ -1046,10 +1054,10 @@ running once the system is up.
        noltlbs         [PPC] Do not use large page/tlb entries for kernel
                        lowmem mapping on PPC40x.
 
-       nomce           [IA-32] Machine Check Exception
-
        nomca           [IA-64] Disable machine check abort handling
 
+       nomce           [IA-32] Machine Check Exception
+
        noresidual      [PPC] Don't use residual data on PReP machines.
 
        noresume        [SWSUSP] Disables resume and restores original swap
@@ -1682,20 +1690,6 @@ running once the system is up.
 
 
 ______________________________________________________________________
-Changelog:
-
-2000-06-??     Mr. Unknown
-       The last known update (for 2.4.0) - the changelog was not kept before.
-
-2002-11-24     Petr Baudis <pasky@ucw.cz>
-               Randy Dunlap <randy.dunlap@verizon.net>
-       Update for 2.5.49, description for most of the options introduced,
-       references to other documentation (C files, READMEs, ..), added S390,
-       PPC, SPARC, MTD, ALSA and OSS category. Minor corrections and
-       reformatting.
-
-2005-10-19     Randy Dunlap <rdunlap@xenotime.net>
-       Lots of typos, whitespace, some reformatting.
 
 TODO:
 
index 4fc8e987432073e8f10a81d6ee52fd9ac9cf696e..aaf99d5f0dad6455f83c4ef811e907d83c98cec1 100644 (file)
@@ -254,7 +254,7 @@ and, the number of frames be
 
        <block number> * <block size> / <frame size>
 
-Suposse the following parameters, which apply for 2.6 kernel and an
+Suppose the following parameters, which apply for 2.6 kernel and an
 i386 architecture:
 
        <size-max> = 131072 bytes
index ec3d109d787a42ca07f3ef60e94d8fcb888e6a2f..76750fb9151a1ab79526591edb355dba167bb1ce 100644 (file)
@@ -138,7 +138,7 @@ This means that you have to read/write IP packets when you are using tun and
 ethernet frames when using tap.
 
 5. What is the difference between BPF and TUN/TAP driver?
-BFP is an advanced packet filter. It can be attached to existing
+BPF is an advanced packet filter. It can be attached to existing
 network interface. It does not provide a virtual network interface.
 A TUN/TAP driver does provide a virtual network interface and it is possible
 to attach BPF to this interface.
index 97420f08c7869acf063b233890d7b521e735179d..4739c5c3face33164587d55749eb3f2f98c3674d 100644 (file)
@@ -1,5 +1,11 @@
 This file details changes in 2.6 which affect PCMCIA card driver authors:
 
+* New release helper (as of 2.6.17)
+   Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
+   necessary now is calling pcmcia_disable_device. As there is no valid
+   reason left to call pcmcia_release_io and pcmcia_release_irq, the
+   exports for them were removed.
+
 * Unify detach and REMOVAL event code, as well as attach and INSERTION
   code (as of 2.6.16)
        void (*remove)          (struct pcmcia_device *dev);
index 8c71954559633218b813322eb87afaa2578dc17a..bca50903233f07dc19868b2b3fd466c8b5dabfc9 100644 (file)
@@ -52,7 +52,7 @@
  51 -> ProVideo PV952                           [1540:9524]
  52 -> AverMedia AverTV/305                     [1461:2108]
  53 -> ASUS TV-FM 7135                          [1043:4845]
- 54 -> LifeView FlyTV Platinum FM               [5168:0214,1489:0214]
+ 54 -> LifeView FlyTV Platinum FM / Gold        [5168:0214,1489:0214,5168:0304]
  55 -> LifeView FlyDVB-T DUO                    [5168:0306]
  56 -> Avermedia AVerTV 307                     [1461:a70a]
  57 -> Avermedia AVerTV GO 007 FM               [1461:f31f]
@@ -84,7 +84,7 @@
  83 -> Terratec Cinergy 250 PCI TV              [153b:1160]
  84 -> LifeView FlyDVB Trio                     [5168:0319]
  85 -> AverTV DVB-T 777                         [1461:2c05]
- 86 -> LifeView FlyDVB-T                        [5168:0301]
+ 86 -> LifeView FlyDVB-T / Genius VideoWonder DVB-T [5168:0301,1489:0301]
  87 -> ADS Instant TV Duo Cardbus PTV331        [0331:1421]
  88 -> Tevion/KWorld DVB-T 220RF                [17de:7201]
  89 -> ELSA EX-VISION 700TV                     [1048:226c]
@@ -92,3 +92,4 @@
  91 -> AVerMedia A169 B                         [1461:7360]
  92 -> AVerMedia A169 B1                        [1461:6360]
  93 -> Medion 7134 Bridge #2                    [16be:0005]
+ 94 -> LifeView FlyDVB-T Hybrid Cardbus         [5168:3306,5168:3502]
similarity index 99%
rename from Documentation/usb/ibmcam.txt
rename to Documentation/video4linux/ibmcam.txt
index c250036441311db261a17dff7d6ebad69ec47370..4a40a2e99451a54702b1d2251cc8df2c77666fc0 100644 (file)
@@ -122,7 +122,7 @@ WHAT YOU NEED:
 - A Linux box with USB support (2.3/2.4; 2.2 w/backport may work)
 
 - A Video4Linux compatible frame grabber program such as xawtv.
-  
+
 HOW TO COMPILE THE DRIVER:
 
 You need to compile the driver only if you are a developer
similarity index 99%
rename from Documentation/usb/ov511.txt
rename to Documentation/video4linux/ov511.txt
index a7fc0432bff1a406b1dc385a4d4912b96d567a3d..142741e3c578693c06d73cd3246ba391456271e1 100644 (file)
@@ -9,7 +9,7 @@ INTRODUCTION:
 
 This is a driver for the OV511, a USB-only chip used in many "webcam" devices.
 Any camera using the OV511/OV511+ and the OV6620/OV7610/20/20AE should work.
-Video capture devices that use the Philips SAA7111A decoder also work. It 
+Video capture devices that use the Philips SAA7111A decoder also work. It
 supports streaming and capture of color or monochrome video via the Video4Linux
 API. Most V4L apps are compatible with it. Most resolutions with a width and
 height that are a multiple of 8 are supported.
@@ -52,15 +52,15 @@ from it:
 
        chmod 666 /dev/video
        chmod 666 /dev/video0 (if necessary)
-       
+
 Now you are ready to run a video app! Both vidcat and xawtv work well for me
 at 640x480.
-       
+
 [Using vidcat:]
 
        vidcat -s 640x480 -p c > test.jpg
        xview test.jpg
-       
+
 [Using xawtv:]
 
 From the main xawtv directory:
@@ -70,7 +70,7 @@ From the main xawtv directory:
        make
        make install
 
-Now you should be able to run xawtv. Right click for the options dialog. 
+Now you should be able to run xawtv. Right click for the options dialog.
 
 MODULE PARAMETERS:
 
@@ -286,4 +286,3 @@ Randy Dunlap, and others. Big thanks to them for their pioneering work on that
 and the USB stack. Thanks to Bret Wallach for getting camera reg IO, ISOC, and
 image capture working. Thanks to Orion Sky Lawlor, Kevin Moore, and Claudio
 Matsuoka for their work as well.
-
similarity index 98%
rename from Documentation/usb/sn9c102.txt
rename to Documentation/video4linux/sn9c102.txt
index b957beae5607619c4a75764dd8982999167fd756..142920bc011fb9120314182addc312ce57d8c0f8 100644 (file)
@@ -174,7 +174,7 @@ Module parameters are listed below:
 -------------------------------------------------------------------------------
 Name:           video_nr
 Type:           short array (min = 0, max = 64)
-Syntax:         <-1|n[,...]> 
+Syntax:         <-1|n[,...]>
 Description:    Specify V4L2 minor mode number:
                 -1 = use next available
                  n = use minor number n
@@ -187,7 +187,7 @@ Default:        -1
 -------------------------------------------------------------------------------
 Name:           force_munmap
 Type:           bool array (min = 0, max = 64)
-Syntax:         <0|1[,...]> 
+Syntax:         <0|1[,...]>
 Description:    Force the application to unmap previously mapped buffer memory
                 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
                 all the applications support this feature. This parameter is
@@ -206,7 +206,7 @@ Default:        2
 -------------------------------------------------------------------------------
 Name:           debug
 Type:           ushort
-Syntax:         <n> 
+Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                 0 = none (use carefully)
                 1 = critical errors
@@ -267,7 +267,7 @@ The sysfs interface also provides the "frame_header" entry, which exports the
 frame header of the most recent requested and captured video frame. The header
 is always 18-bytes long and is appended to every video frame by the SN9C10x
 controllers. As an example, this additional information can be used by the user
-application for implementing auto-exposure features via software. 
+application for implementing auto-exposure features via software.
 
 The following table describes the frame header:
 
@@ -441,7 +441,7 @@ blue pixels in one video frame. Each pixel is associated with a 8-bit long
 value and is disposed in memory according to the pattern shown below:
 
 B[0]   G[1]    B[2]    G[3]    ...   B[m-2]         G[m-1]
-G[m]   R[m+1]  G[m+2]  R[m+2]  ...   G[2m-2]        R[2m-1] 
+G[m]   R[m+1]  G[m+2]  R[m+2]  ...   G[2m-2]        R[2m-1]
 ...
 ...                                  B[(n-1)(m-2)]  G[(n-1)(m-1)]
 ...                                  G[n(m-2)]      R[n(m-1)]
@@ -472,12 +472,12 @@ The pixel reference value is calculated as follows:
 The algorithm purely describes the conversion from compressed Bayer code used
 in the SN9C10x chips to uncompressed Bayer. Additional steps are required to
 convert this to a color image (i.e. a color interpolation algorithm).
+
 The following Huffman codes have been found:
-0: +0 (relative to reference pixel value) 
+0: +0 (relative to reference pixel value)
 100: +4
 101: -4?
-1110xxxx: set absolute value to xxxx.0000 
+1110xxxx: set absolute value to xxxx.0000
 1101: +11
 1111: -11
 11001: +20
similarity index 82%
rename from Documentation/usb/stv680.txt
rename to Documentation/video4linux/stv680.txt
index 6448041e7a37b92882ce6bce42c72ccf0daa00c3..4f8946f32f51b620a051fab35aac66ab01796f2b 100644 (file)
@@ -5,15 +5,15 @@ Copyright, 2001, Kevin Sisson
 
 INTRODUCTION:
 
-STMicroelectronics produces the STV0680B chip, which comes in two 
-types, -001 and -003. The -003 version allows the recording and downloading 
-of sound clips from the camera, and allows a flash attachment. Otherwise, 
-it uses the same commands as the -001 version. Both versions support a 
-variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20 
-CIF pictures. The STV0680 supports either a serial or a usb interface, and 
+STMicroelectronics produces the STV0680B chip, which comes in two
+types, -001 and -003. The -003 version allows the recording and downloading
+of sound clips from the camera, and allows a flash attachment. Otherwise,
+it uses the same commands as the -001 version. Both versions support a
+variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20
+CIF pictures. The STV0680 supports either a serial or a usb interface, and
 video is possible through the usb interface.
 
-The following cameras are known to work with this driver, although any 
+The following cameras are known to work with this driver, although any
 camera with Vendor/Product codes of 0553/0202 should work:
 
 Aiptek Pencam (various models)
@@ -34,15 +34,15 @@ http://www.linux-usb.org
 MODULE OPTIONS:
 
 When the driver is compiled as a module, you can set a "swapRGB=1"
-option, if necessary, for those applications that require it 
-(such as xawtv). However, the driver should detect and set this 
+option, if necessary, for those applications that require it
+(such as xawtv). However, the driver should detect and set this
 automatically, so this option should not normally be used.
 
 
 KNOWN PROBLEMS:
 
-The driver seems to work better with the usb-ohci than the usb-uhci host 
-controller driver. 
+The driver seems to work better with the usb-ohci than the usb-uhci host
+controller driver.
 
 HELP:
 
@@ -50,6 +50,4 @@ The latest info on this driver can be found at:
 http://personal.clt.bellsouth.net/~kjsisson or at
 http://stv0680-usb.sourceforge.net
 
-Any questions to me can be send to:  kjsisson@bellsouth.net
-
-
+Any questions to me can be send to:  kjsisson@bellsouth.net
\ No newline at end of file
similarity index 97%
rename from Documentation/usb/w9968cf.txt
rename to Documentation/video4linux/w9968cf.txt
index 9d46cd0b19e3190064da339dbe108b3184e1c7f0..3b704f2aae6dc9218df5f788b92f83818a3c1c9b 100644 (file)
@@ -1,5 +1,5 @@
 
-                   W996[87]CF JPEG USB Dual Mode Camera Chip 
+                   W996[87]CF JPEG USB Dual Mode Camera Chip
                      Driver for Linux 2.6 (basic version)
                    =========================================
 
@@ -115,7 +115,7 @@ additional testing and full support, would be much appreciated.
 ======================
 For it to work properly, the driver needs kernel support for Video4Linux, USB
 and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not
-actually using any external "ovcamchip" module, given that the W996[87]CF 
+actually using any external "ovcamchip" module, given that the W996[87]CF
 driver depends on the version of the module present in the official kernels.
 
 The following options of the kernel configuration file must be enabled and
@@ -197,16 +197,16 @@ Note:            The kernel must be compiled with the CONFIG_KMOD option
                  enabled for the 'ovcamchip' module to be loaded and for
                  this parameter to be present.
 -------------------------------------------------------------------------------
-Name:           simcams 
-Type:           int 
-Syntax:         <n> 
+Name:           simcams
+Type:           int
+Syntax:         <n>
 Description:    Number of cameras allowed to stream simultaneously.
                 n may vary from 0 to 32.
 Default:        32
 -------------------------------------------------------------------------------
 Name:           video_nr
 Type:           int array (min = 0, max = 32)
-Syntax:         <-1|n[,...]> 
+Syntax:         <-1|n[,...]>
 Description:    Specify V4L minor mode number.
                 -1 = use next available
                  n = use minor number n
@@ -219,7 +219,7 @@ Default:        -1
 -------------------------------------------------------------------------------
 Name:           packet_size
 Type:           int array (min = 0, max = 32)
-Syntax:         <n[,...]> 
+Syntax:         <n[,...]>
 Description:    Specify the maximum data payload size in bytes for alternate
                 settings, for each device. n is scaled between 63 and 1023.
 Default:        1023
@@ -234,7 +234,7 @@ Default:        2
 -------------------------------------------------------------------------------
 Name:           double_buffer
 Type:           bool array (min = 0, max = 32)
-Syntax:         <0|1[,...]> 
+Syntax:         <0|1[,...]>
 Description:    Hardware double buffering: 0 disabled, 1 enabled.
                 It should be enabled if you want smooth video output: if you
                 obtain out of sync. video, disable it, or try to
@@ -243,13 +243,13 @@ Default:        1 for every device.
 -------------------------------------------------------------------------------
 Name:           clamping
 Type:           bool array (min = 0, max = 32)
-Syntax:         <0|1[,...]> 
+Syntax:         <0|1[,...]>
 Description:    Video data clamping: 0 disabled, 1 enabled.
 Default:        0 for every device.
 -------------------------------------------------------------------------------
 Name:           filter_type
 Type:           int array (min = 0, max = 32)
-Syntax:         <0|1|2[,...]> 
+Syntax:         <0|1|2[,...]>
 Description:    Video filter type.
                 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter.
                 The filter is used to reduce noise and aliasing artifacts
@@ -258,13 +258,13 @@ Default:        0 for every device.
 -------------------------------------------------------------------------------
 Name:           largeview
 Type:           bool array (min = 0, max = 32)
-Syntax:         <0|1[,...]> 
+Syntax:         <0|1[,...]>
 Description:    Large view: 0 disabled, 1 enabled.
 Default:        1 for every device.
 -------------------------------------------------------------------------------
 Name:           upscaling
 Type:           bool array (min = 0, max = 32)
-Syntax:         <0|1[,...]> 
+Syntax:         <0|1[,...]>
 Description:    Software scaling (for non-compressed video only):
                 0 disabled, 1 enabled.
                 Disable it if you have a slow CPU or you don't have enough
@@ -341,8 +341,8 @@ Default:        50 for every device.
 -------------------------------------------------------------------------------
 Name:           bandingfilter
 Type:           bool array (min = 0, max = 32)
-Syntax:         <0|1[,...]> 
-Description:    Banding filter to reduce effects of fluorescent 
+Syntax:         <0|1[,...]>
+Description:    Banding filter to reduce effects of fluorescent
                 lighting:
                 0 disabled, 1 enabled.
                 This filter tries to reduce the pattern of horizontal
@@ -374,7 +374,7 @@ Default:        0 for every device.
 -------------------------------------------------------------------------------
 Name:           monochrome
 Type:           bool array (min = 0, max = 32)
-Syntax:         <0|1[,...]> 
+Syntax:         <0|1[,...]>
 Description:    The image sensor is monochrome:
                 0 = no, 1 = yes
 Default:        0 for every device.
@@ -400,19 +400,19 @@ Default:        32768 for every device.
 -------------------------------------------------------------------------------
 Name:           contrast
 Type:           long array (min = 0, max = 32)
-Syntax:         <n[,...]> 
+Syntax:         <n[,...]>
 Description:    Set picture contrast (0-65535).
 Default:        50000 for every device.
 -------------------------------------------------------------------------------
 Name:           whiteness
 Type:           long array (min = 0, max = 32)
-Syntax:         <n[,...]> 
+Syntax:         <n[,...]>
 Description:    Set picture whiteness (0-65535).
 Default:        32768 for every device.
 -------------------------------------------------------------------------------
 Name:           debug
 Type:           int
-Syntax:         <n> 
+Syntax:         <n>
 Description:    Debugging information level, from 0 to 6:
                 0 = none (use carefully)
                 1 = critical errors
index c9465811addce19e2ca571afc4919b2aa7a7584a..f97657b7e2c712e54ab7d67f0ab671e6118b706d 100644 (file)
@@ -1451,6 +1451,12 @@ P:       Juanjo Ciarlante
 M:     jjciarla@raiz.uncu.edu.ar
 S:     Maintained
 
+IPATH DRIVER:
+P:     Bryan O'Sullivan
+M:     support@pathscale.com
+L:     openib-general@openib.org
+S:     Supported
+
 IPX NETWORK LAYER
 P:     Arnaldo Carvalho de Melo
 M:     acme@conectiva.com.br
index dd87696705969ce1e07ef095285c3370bb170f93..a15e18a00258ee69d65329945c174e0ec0e3f66c 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/ioport.h>
+#include <linux/platform_device.h>
 #include <linux/bootmem.h>
 #include <linux/pci.h>
 #include <linux/seq_file.h>
@@ -1478,3 +1479,20 @@ alpha_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
 #endif
         return NOTIFY_DONE;
 }
+
+static __init int add_pcspkr(void)
+{
+       struct platform_device *pd;
+       int ret;
+
+       pd = platform_device_alloc("pcspkr", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+device_initcall(add_pcspkr);
index e3c5fca0aa8ad1ba9fd2797646d88c1b2146bdf7..2b0cfce24a619af5105e11705adb771f5298c0a1 100644 (file)
@@ -69,7 +69,7 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu)
         * for the data I pass, and I need tags
         * on the data to indicate what information I have
         * squirrelled away.  ELF notes happen to provide
-        * all of that that no need to invent something new.
+        * all of that, so there is no need to invent something new.
         */
        buf = (u32*)per_cpu_ptr(crash_notes, cpu);
        if (!buf)
index 8c08660b4e5dd6c2411fb79fa62cbc557f751a70..eacc3f0a2ea4de5b334f8172cce979570eddc133 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/initrd.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
+#include <linux/platform_device.h>
 #include <linux/console.h>
 #include <linux/mca.h>
 #include <linux/root_dev.h>
@@ -1547,6 +1548,23 @@ void __init setup_arch(char **cmdline_p)
 #endif
 }
 
+static __init int add_pcspkr(void)
+{
+       struct platform_device *pd;
+       int ret;
+
+       pd = platform_device_alloc("pcspkr", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+device_initcall(add_pcspkr);
+
 #include "setup_arch_post.h"
 /*
  * Local Variables:
index 5080ea1799a43807c31f718b439b21b441d487aa..e15709ce886626158aba18c05851cb5bc04065c6 100644 (file)
@@ -233,6 +233,7 @@ config MACH_JAZZ
        select ARC32
        select ARCH_MAY_HAVE_PC_FDC
        select GENERIC_ISA_DMA
+       select I8253
        select I8259
        select ISA
        select SYS_HAS_CPU_R4X00
@@ -530,6 +531,7 @@ config QEMU
        select DMA_COHERENT
        select GENERIC_ISA_DMA
        select HAVE_STD_PC_SERIAL_PORT
+       select I8253
        select I8259
        select ISA
        select SWAP_IO_SPACE
@@ -714,6 +716,7 @@ config SNI_RM200_PCI
        select HAVE_STD_PC_SERIAL_PORT
        select HW_HAS_EISA
        select HW_HAS_PCI
+       select I8253
        select I8259
        select ISA
        select SYS_HAS_CPU_R4X00
@@ -1721,6 +1724,9 @@ config MMU
        bool
        default y
 
+config I8253
+       bool
+
 source "drivers/pcmcia/Kconfig"
 
 source "drivers/pci/hotplug/Kconfig"
index f36c4f20ee8af09bbeca3658cf96ba15a410d8b2..309d54cceda3c66eb93d4c48eb655aaa6238d72c 100644 (file)
@@ -59,6 +59,8 @@ obj-$(CONFIG_PROC_FS)         += proc.o
 
 obj-$(CONFIG_64BIT)            += cpu-bugs64.o
 
+obj-$(CONFIG_I8253)            += i8253.o
+
 CFLAGS_cpu-bugs64.o    = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
 
 EXTRA_AFLAGS := $(CFLAGS)
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
new file mode 100644 (file)
index 0000000..475df69
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2006 IBM Corporation
+ *
+ * Implements device information for i8253 timer chip
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation
+ */
+
+#include <linux/platform_device.h>
+
+static __init int add_pcspkr(void)
+{
+       struct platform_device *pd;
+       int ret;
+
+       pd = platform_device_alloc("pcspkr", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+device_initcall(add_pcspkr);
index 1b73508ecb2bde2e7b5f72777ff0ad0b45a4fe33..2cbde865d4f57b5cc0e1d871d26933e36d927eec 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/prom.h>
 #include <asm/vdso_datapage.h>
 
-#define MODULE_VERS "1.6"
+#define MODULE_VERS "1.7"
 #define MODULE_NAME "lparcfg"
 
 /* #define LPARCFG_DEBUG */
@@ -149,17 +149,17 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag)
        if (rc == 0)            /* success, return */
                return;
 /* check for null tag ? */
-       if (rc == H_Hardware)
+       if (rc == H_HARDWARE)
                printk(KERN_INFO
                       "plpar-hcall (%s) failed with hardware fault\n", tag);
-       else if (rc == H_Function)
+       else if (rc == H_FUNCTION)
                printk(KERN_INFO
                       "plpar-hcall (%s) failed; function not allowed\n", tag);
-       else if (rc == H_Authority)
+       else if (rc == H_AUTHORITY)
                printk(KERN_INFO
-                      "plpar-hcall (%s) failed; not authorized to this function\n",
-                      tag);
-       else if (rc == H_Parameter)
+                      "plpar-hcall (%s) failed; not authorized to this"
+                      " function\n", tag);
+       else if (rc == H_PARAMETER)
                printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
                       tag);
        else
@@ -209,7 +209,7 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
        unsigned long dummy;
        rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
 
-       if (rc != H_Authority)
+       if (rc != H_AUTHORITY)
                log_plpar_hcall_return(rc, "H_PIC");
 }
 
@@ -242,7 +242,7 @@ static void parse_system_parameter_string(struct seq_file *m)
 {
        int call_status;
 
-       char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
+       unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
        if (!local_buffer) {
                printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
                       __FILE__, __FUNCTION__, __LINE__);
@@ -254,7 +254,8 @@ static void parse_system_parameter_string(struct seq_file *m)
        call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
                                NULL,
                                SPLPAR_CHARACTERISTICS_TOKEN,
-                               __pa(rtas_data_buf));
+                               __pa(rtas_data_buf),
+                               RTAS_DATA_BUF_SIZE);
        memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
        spin_unlock(&rtas_data_buf_lock);
 
@@ -275,7 +276,7 @@ static void parse_system_parameter_string(struct seq_file *m)
 #ifdef LPARCFG_DEBUG
                printk(KERN_INFO "success calling get-system-parameter \n");
 #endif
-               splpar_strlen = local_buffer[0] * 16 + local_buffer[1];
+               splpar_strlen = local_buffer[0] * 256 + local_buffer[1];
                local_buffer += 2;      /* step over strlen value */
 
                memset(workbuffer, 0, SPLPAR_MAXLENGTH);
@@ -529,13 +530,13 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
        retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
                                    *new_weight_ptr);
 
-       if (retval == H_Success || retval == H_Constrained) {
+       if (retval == H_SUCCESS || retval == H_CONSTRAINED) {
                retval = count;
-       } else if (retval == H_Busy) {
+       } else if (retval == H_BUSY) {
                retval = -EBUSY;
-       } else if (retval == H_Hardware) {
+       } else if (retval == H_HARDWARE) {
                retval = -EIO;
-       } else if (retval == H_Parameter) {
+       } else if (retval == H_PARAMETER) {
                retval = -EINVAL;
        } else {
                printk(KERN_WARNING "%s: received unknown hv return code %ld",
index 06636c927a7ec4e2f3049fcd87f8219a37472e20..0112318213ab5aada8c00e5ec6877c801501ccd3 100644 (file)
@@ -578,18 +578,18 @@ static void rtas_percpu_suspend_me(void *info)
         * We use "waiting" to indicate our state.  As long
         * as it is >0, we are still trying to all join up.
         * If it goes to 0, we have successfully joined up and
-        * one thread got H_Continue.  If any error happens,
+        * one thread got H_CONTINUE.  If any error happens,
         * we set it to <0.
         */
        local_irq_save(flags);
        do {
                rc = plpar_hcall_norets(H_JOIN);
                smp_rmb();
-       } while (rc == H_Success && data->waiting > 0);
-       if (rc == H_Success)
+       } while (rc == H_SUCCESS && data->waiting > 0);
+       if (rc == H_SUCCESS)
                goto out;
 
-       if (rc == H_Continue) {
+       if (rc == H_CONTINUE) {
                data->waiting = 0;
                data->args->args[data->args->nargs] =
                        rtas_call(ibm_suspend_me_token, 0, 1, NULL);
@@ -597,7 +597,7 @@ static void rtas_percpu_suspend_me(void *info)
                        plpar_hcall_norets(H_PROD,i);
        } else {
                data->waiting = -EBUSY;
-               printk(KERN_ERR "Error on H_Join hypervisor call\n");
+               printk(KERN_ERR "Error on H_JOIN hypervisor call\n");
        }
 
 out:
@@ -624,7 +624,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
                printk(KERN_ERR "Error doing global join\n");
 
        /* Prod each CPU.  This won't hurt, and will wake
-        * anyone we successfully put to sleep with H_Join
+        * anyone we successfully put to sleep with H_JOIN.
         */
        for_each_possible_cpu(i)
                plpar_hcall_norets(H_PROD, i);
index c607f3b9ca17494ce7a1f93ddac8d811ce66b997..1d93e73a700345ab65c3243786edabb8422587d8 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
+#include <linux/platform_device.h>
 #include <linux/ide.h>
 #include <linux/seq_file.h>
 #include <linux/ioport.h>
@@ -462,6 +463,29 @@ static int __init early_xmon(char *p)
 early_param("xmon", early_xmon);
 #endif
 
+static __init int add_pcspkr(void)
+{
+       struct device_node *np;
+       struct platform_device *pd;
+       int ret;
+
+       np = of_find_compatible_node(NULL, NULL, "pnpPNP,100");
+       of_node_put(np);
+       if (!np)
+               return -ENODEV;
+
+       pd = platform_device_alloc("pcspkr", -1);
+       if (!pd)
+               return -ENOMEM;
+
+       ret = platform_device_add(pd);
+       if (ret)
+               platform_device_put(pd);
+
+       return ret;
+}
+device_initcall(add_pcspkr);
+
 void probe_machine(void)
 {
        extern struct machdep_calls __machine_desc_start;
index a72bf5dceeee587875f6a4ad1aa41fc9fcc6df8a..69ac2570134425dd108d372fe030fcb9d271483e 100644 (file)
@@ -50,7 +50,6 @@
 #include <asm/kgdb.h>
 #endif
 
-extern void platform_init(void);
 extern void bootx_init(unsigned long r4, unsigned long phys);
 
 boot_infos_t *boot_infos;
@@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
                strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
 #endif /* CONFIG_CMDLINE */
 
-#ifdef CONFIG_PPC_MULTIPLATFORM
        probe_machine();
-#else
-       /* Base init based on machine type. Obsoloete, please kill ! */
-       platform_init();
-#endif
 
 #ifdef CONFIG_6xx
        if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
index 59aa92cd6fa4eabab53ee3bc8d5381e4a3f095a0..13e91c4d70a8ff1444fff3ccc232750569c3c5c0 100644 (file)
@@ -215,12 +215,10 @@ void __init early_setup(unsigned long dt_ptr)
        /*
         * Initialize stab / SLB management except on iSeries
         */
-       if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
-               if (cpu_has_feature(CPU_FTR_SLB))
-                       slb_initialize();
-               else
-                       stab_initialize(get_paca()->stab_real);
-       }
+       if (cpu_has_feature(CPU_FTR_SLB))
+               slb_initialize();
+       else if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               stab_initialize(get_paca()->stab_real);
 
        DBG(" <- early_setup()\n");
 }
index 1ad55f0466fd621b58f5271bceebb01ea07c4624..1424eab450ee915322478f21ab00cefb5fd8a04b 100644 (file)
@@ -322,3 +322,4 @@ SYSCALL(spu_create)
 COMPAT_SYS(pselect6)
 COMPAT_SYS(ppoll)
 SYSCALL(unshare)
+SYSCALL(splice)
index 4cbde211eb699b965385f7046b9b834f2c15ea44..064a525646922cf165177a8b9b8bc8c54df00800 100644 (file)
@@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs)
  */
 static inline int check_io_access(struct pt_regs *regs)
 {
-#ifdef CONFIG_PPC_PMAC
+#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
        unsigned long msr = regs->msr;
        const struct exception_table_entry *entry;
        unsigned int *nip = (unsigned int *)regs->nip;
@@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs)
                        return 1;
                }
        }
-#endif /* CONFIG_PPC_PMAC */
+#endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
        return 0;
 }
 
@@ -308,8 +308,8 @@ platform_machine_check(struct pt_regs *regs)
 
 void machine_check_exception(struct pt_regs *regs)
 {
-#ifdef CONFIG_PPC64
        int recover = 0;
+       unsigned long reason = get_mc_reason(regs);
 
        /* See if any machine dependent calls */
        if (ppc_md.machine_check_exception)
@@ -317,8 +317,6 @@ void machine_check_exception(struct pt_regs *regs)
 
        if (recover)
                return;
-#else
-       unsigned long reason = get_mc_reason(regs);
 
        if (user_mode(regs)) {
                regs->msr |= MSR_RI;
@@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs)
         * additional info, e.g. bus error registers.
         */
        platform_machine_check(regs);
-#endif /* CONFIG_PPC64 */
 
        if (debugger_fault_handler(regs))
                return;
index 5aea0909a5ec91d3fd7a2cca3c8692db3cb55490..fdbba4206d59eb7a46b34707a5f421b7b9dfb8f3 100644 (file)
@@ -177,15 +177,15 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
 
        /* When running in the kernel we expect faults to occur only to
         * addresses in user space.  All other faults represent errors in the
-        * kernel and should generate an OOPS.  Unfortunatly, in the case of an
-        * erroneous fault occuring in a code path which already holds mmap_sem
+        * kernel and should generate an OOPS.  Unfortunately, in the case of an
+        * erroneous fault occurring in a code path which already holds mmap_sem
         * we will deadlock attempting to validate the fault against the
         * address space.  Luckily the kernel only validly references user
         * space from well defined areas of code, which are listed in the
         * exceptions table.
         *
         * As the vast majority of faults will be valid we will only perform
-        * the source reference check when there is a possibilty of a deadlock.
+        * the source reference check when there is a possibility of a deadlock.
         * Attempt to lock the address space, if we cannot we then validate the
         * source.  If this is invalid we can skip the address space check,
         * thus avoiding the deadlock.
index 7c18b4cd5db43724b304ad786b655e3b29db3fb6..7e789d2420ba41730c97916b690ee4ded43285af 100644 (file)
@@ -158,25 +158,25 @@ static int __init mpc834x_rtc_hookup(void)
 late_initcall(mpc834x_rtc_hookup);
 #endif
 
-void __init platform_init(void)
+/*
+ * Called very early, MMU is off, device-tree isn't unflattened
+ */
+static int __init mpc834x_sys_probe(void)
 {
-       /* setup the PowerPC module struct */
-       ppc_md.setup_arch = mpc834x_sys_setup_arch;
-
-       ppc_md.init_IRQ = mpc834x_sys_init_IRQ;
-       ppc_md.get_irq = ipic_get_irq;
-
-       ppc_md.restart = mpc83xx_restart;
-
-       ppc_md.time_init = mpc83xx_time_init;
-       ppc_md.set_rtc_time = NULL;
-       ppc_md.get_rtc_time = NULL;
-       ppc_md.calibrate_decr = generic_calibrate_decr;
-
-       ppc_md.progress = udbg_progress;
-
-       if (ppc_md.progress)
-               ppc_md.progress("mpc834x_sys_init(): exit", 0);
-
-       return;
+       /* We always match for now, eventually we should look at the flat
+          dev tree to ensure this is the board we are suppose to run on
+       */
+       return 1;
 }
+
+define_machine(mpc834x_sys) {
+       .name                   = "MPC834x SYS",
+       .probe                  = mpc834x_sys_probe,
+       .setup_arch             = mpc834x_sys_setup_arch,
+       .init_IRQ               = mpc834x_sys_init_IRQ,
+       .get_irq                = ipic_get_irq,
+       .restart                = mpc83xx_restart,
+       .time_init              = mpc83xx_time_init,
+       .calibrate_decr         = generic_calibrate_decr,
+       .progress               = udbg_progress,
+};
index b7821dbae00d6e99a51960cf18d3a051a3bf0554..5eeff370f5fcaa7084f758110c2a1f710822a5c3 100644 (file)
@@ -220,25 +220,25 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
        seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
 }
 
-void __init platform_init(void)
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init mpc85xx_ads_probe(void)
 {
-       ppc_md.setup_arch = mpc85xx_ads_setup_arch;
-       ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
-
-       ppc_md.init_IRQ = mpc85xx_ads_pic_init;
-       ppc_md.get_irq = mpic_get_irq;
-
-       ppc_md.restart = mpc85xx_restart;
-       ppc_md.power_off = NULL;
-       ppc_md.halt = NULL;
-
-       ppc_md.time_init = NULL;
-       ppc_md.set_rtc_time = NULL;
-       ppc_md.get_rtc_time = NULL;
-       ppc_md.calibrate_decr = generic_calibrate_decr;
-
-       ppc_md.progress = udbg_progress;
-
-       if (ppc_md.progress)
-               ppc_md.progress("mpc85xx_ads platform_init(): exit", 0);
+       /* We always match for now, eventually we should look at the flat
+          dev tree to ensure this is the board we are suppose to run on
+       */
+       return 1;
 }
+
+define_machine(mpc85xx_ads) {
+       .name                   = "MPC85xx ADS",
+       .probe                  = mpc85xx_ads_probe,
+       .setup_arch             = mpc85xx_ads_setup_arch,
+       .init_IRQ               = mpc85xx_ads_pic_init,
+       .show_cpuinfo           = mpc85xx_ads_show_cpuinfo,
+       .get_irq                = mpic_get_irq,
+       .restart                = mpc85xx_restart,
+       .calibrate_decr         = generic_calibrate_decr,
+       .progress               = udbg_progress,
+};
index 3a4245c926ade05db556dd11fef29d524335913a..6594bec7388243d8581f816dbca1d98b29176b01 100644 (file)
@@ -316,6 +316,7 @@ void *spu_syscall_table[] = {
        [__NR_pselect6]                 sys_ni_syscall, /* sys_pselect */
        [__NR_ppoll]                    sys_ni_syscall, /* sys_ppoll */
        [__NR_unshare]                  sys_unshare,
+       [__NR_splice]                   sys_splice,
 };
 
 long spu_sys_callback(struct spu_syscall_block *s)
index c04e078c0fe573dc41fc1576be4154d06dcc39f6..483c8b76232c010de9b1f10e6fc1b88656eb98cf 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/ptrace.h>
 
 #include <asm/spu.h>
+#include <asm/unistd.h>
 
 #include "spufs.h"
 
index 9b2b1cb117b37f16db490e37a61482170a947729..780fb27a0099e24ca66b3fee2fbb9a5f7a258f1b 100644 (file)
@@ -865,7 +865,7 @@ void __init eeh_init(void)
  * on the CEC architecture, type of the device, on earlier boot
  * command-line arguments & etc.
  */
-void eeh_add_device_early(struct device_node *dn)
+static void eeh_add_device_early(struct device_node *dn)
 {
        struct pci_controller *phb;
        struct eeh_early_enable_info info;
@@ -882,7 +882,6 @@ void eeh_add_device_early(struct device_node *dn)
        info.buid_lo = BUID_LO(phb->buid);
        early_enable_eeh(dn, &info);
 }
-EXPORT_SYMBOL_GPL(eeh_add_device_early);
 
 void eeh_add_device_tree_early(struct device_node *dn)
 {
@@ -893,20 +892,6 @@ void eeh_add_device_tree_early(struct device_node *dn)
 }
 EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
 
-void eeh_add_device_tree_late(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-
-       list_for_each_entry(dev, &bus->devices, bus_list) {
-               eeh_add_device_late(dev);
-               if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
-                       struct pci_bus *subbus = dev->subordinate;
-                       if (subbus)
-                               eeh_add_device_tree_late(subbus);
-               }
-       }
-}
-
 /**
  * eeh_add_device_late - perform EEH initialization for the indicated pci device
  * @dev: pci device for which to set up EEH
@@ -914,7 +899,7 @@ void eeh_add_device_tree_late(struct pci_bus *bus)
  * This routine must be used to complete EEH initialization for PCI
  * devices that were added after system boot (e.g. hotplug, dlpar).
  */
-void eeh_add_device_late(struct pci_dev *dev)
+static void eeh_add_device_late(struct pci_dev *dev)
 {
        struct device_node *dn;
        struct pci_dn *pdn;
@@ -933,16 +918,33 @@ void eeh_add_device_late(struct pci_dev *dev)
 
        pci_addr_cache_insert_device (dev);
 }
-EXPORT_SYMBOL_GPL(eeh_add_device_late);
+
+void eeh_add_device_tree_late(struct pci_bus *bus)
+{
+       struct pci_dev *dev;
+
+       list_for_each_entry(dev, &bus->devices, bus_list) {
+               eeh_add_device_late(dev);
+               if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+                       struct pci_bus *subbus = dev->subordinate;
+                       if (subbus)
+                               eeh_add_device_tree_late(subbus);
+               }
+       }
+}
+EXPORT_SYMBOL_GPL(eeh_add_device_tree_late);
 
 /**
  * eeh_remove_device - undo EEH setup for the indicated pci device
  * @dev: pci device to be removed
  *
- * This routine should be when a device is removed from a running
- * system (e.g. by hotplug or dlpar).
+ * This routine should be called when a device is removed from
+ * a running system (e.g. by hotplug or dlpar).  It unregisters
+ * the PCI device from the EEH subsystem.  I/O errors affecting
+ * this device will no longer be detected after this call; thus,
+ * i/o errors affecting this slot may leave this device unusable.
  */
-void eeh_remove_device(struct pci_dev *dev)
+static void eeh_remove_device(struct pci_dev *dev)
 {
        struct device_node *dn;
        if (!dev || !eeh_subsystem_enabled)
@@ -958,21 +960,17 @@ void eeh_remove_device(struct pci_dev *dev)
        PCI_DN(dn)->pcidev = NULL;
        pci_dev_put (dev);
 }
-EXPORT_SYMBOL_GPL(eeh_remove_device);
 
 void eeh_remove_bus_device(struct pci_dev *dev)
 {
+       struct pci_bus *bus = dev->subordinate;
+       struct pci_dev *child, *tmp;
+
        eeh_remove_device(dev);
-       if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
-               struct pci_bus *bus = dev->subordinate;
-               struct list_head *ln;
-               if (!bus)
-                       return; 
-               for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
-                       struct pci_dev *pdev = pci_dev_b(ln);
-                       if (pdev)
-                               eeh_remove_bus_device(pdev);
-               }
+
+       if (bus && dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+               list_for_each_entry_safe(child, tmp, &bus->devices, bus_list)
+                        eeh_remove_bus_device(child);
        }
 }
 EXPORT_SYMBOL_GPL(eeh_remove_bus_device);
index cc2495a0cdd58754db004f3d34fe353c4dc65981..1fba695e32e82d113cbfcab42e18cfc69ae0da62 100644 (file)
@@ -293,15 +293,16 @@ void handle_eeh_events (struct eeh_event *event)
        frozen_pdn = PCI_DN(frozen_dn);
        frozen_pdn->eeh_freeze_count++;
 
-       pci_str = pci_name (frozen_pdn->pcidev);
-       drv_str = pcid_name (frozen_pdn->pcidev);
-       if (!pci_str) {
+       if (frozen_pdn->pcidev) {
+               pci_str = pci_name (frozen_pdn->pcidev);
+               drv_str = pcid_name (frozen_pdn->pcidev);
+       } else {
                pci_str = pci_name (event->dev);
                drv_str = pcid_name (event->dev);
        }
        
        if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
-               goto hard_fail;
+               goto excess_failures;
 
        /* If the reset state is a '5' and the time to reset is 0 (infinity)
         * or is more then 15 seconds, then mark this as a permanent failure.
@@ -356,7 +357,7 @@ void handle_eeh_events (struct eeh_event *event)
 
        return;
        
-hard_fail:
+excess_failures:
        /*
         * About 90% of all real-life EEH failures in the field
         * are due to poorly seated PCI cards. Only 10% or so are
@@ -367,7 +368,15 @@ hard_fail:
           "and has been permanently disabled.  Please try reseating\n"
           "this device or replacing it.\n",
                drv_str, pci_str, frozen_pdn->eeh_freeze_count);
+       goto perm_error;
+
+hard_fail:
+       printk(KERN_ERR
+          "EEH: Unable to recover from failure of PCI device %s - %s\n"
+          "Please try reseating this device or replacing it.\n",
+               drv_str, pci_str);
 
+perm_error:
        eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */);
 
        /* Notify all devices that they're about to go down. */
index 9a9961f27480d5736981c5982716ee17fc7c307e..a1bda6f96fd1ff2c4a50f7d2221779e3b6629124 100644 (file)
@@ -19,7 +19,9 @@
  */
 
 #include <linux/list.h>
+#include <linux/mutex.h>
 #include <linux/pci.h>
+#include <linux/workqueue.h>
 #include <asm/eeh_event.h>
 #include <asm/ppc-pci.h>
 
@@ -37,14 +39,18 @@ LIST_HEAD(eeh_eventlist);
 static void eeh_thread_launcher(void *);
 DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL);
 
+/* Serialize reset sequences for a given pci device */
+DEFINE_MUTEX(eeh_event_mutex);
+
 /**
- * eeh_event_handler - dispatch EEH events.  The detection of a frozen
- * slot can occur inside an interrupt, where it can be hard to do
- * anything about it.  The goal of this routine is to pull these
- * detection events out of the context of the interrupt handler, and
- * re-dispatch them for processing at a later time in a normal context.
- *
+ * eeh_event_handler - dispatch EEH events.
  * @dummy - unused
+ *
+ * The detection of a frozen slot can occur inside an interrupt,
+ * where it can be hard to do anything about it.  The goal of this
+ * routine is to pull these detection events out of the context
+ * of the interrupt handler, and re-dispatch them for processing
+ * at a later time in a normal context.
  */
 static int eeh_event_handler(void * dummy)
 {
@@ -64,23 +70,24 @@ static int eeh_event_handler(void * dummy)
                        event = list_entry(eeh_eventlist.next, struct eeh_event, list);
                        list_del(&event->list);
                }
-               
-               if (event)
-                       eeh_mark_slot(event->dn, EEH_MODE_RECOVERING);
-
                spin_unlock_irqrestore(&eeh_eventlist_lock, flags);
+
                if (event == NULL)
                        break;
 
+               /* Serialize processing of EEH events */
+               mutex_lock(&eeh_event_mutex);
+               eeh_mark_slot(event->dn, EEH_MODE_RECOVERING);
+
                printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
                       pci_name(event->dev));
 
                handle_eeh_events(event);
 
                eeh_clear_slot(event->dn, EEH_MODE_RECOVERING);
-
                pci_dev_put(event->dev);
                kfree(event);
+               mutex_unlock(&eeh_event_mutex);
        }
 
        return 0;
@@ -88,7 +95,6 @@ static int eeh_event_handler(void * dummy)
 
 /**
  * eeh_thread_launcher
- *
  * @dummy - unused
  */
 static void eeh_thread_launcher(void *dummy)
index db7c19fe92972ccb3fc750e2d53a71737c608552..c9ff547f9d2519a4b6db4ae5c9a13bf196a99674 100644 (file)
@@ -127,3 +127,103 @@ _GLOBAL(plpar_hcall_4out)
 
        mtcrf   0xff,r0
        blr                             /* return r3 = status */
+
+/* plpar_hcall_7arg_7ret(unsigned long opcode,         R3
+                        unsigned long arg1,            R4
+                        unsigned long arg2,            R5
+                        unsigned long arg3,            R6
+                        unsigned long arg4,            R7
+                        unsigned long arg5,            R8
+                        unsigned long arg6,            R9
+                        unsigned long arg7,            R10
+                        unsigned long *out1,           112(R1)
+                        unsigned long *out2,           110(R1)
+                        unsigned long *out3,           108(R1)
+                        unsigned long *out4,           106(R1)
+                        unsigned long *out5,           104(R1)
+                        unsigned long *out6,           102(R1)
+                        unsigned long *out7);          100(R1)
+*/
+_GLOBAL(plpar_hcall_7arg_7ret)
+       HMT_MEDIUM
+
+       mfcr    r0
+       stw     r0,8(r1)
+
+       HVSC                            /* invoke the hypervisor */
+
+       lwz     r0,8(r1)
+
+       ld      r11,STK_PARM(r11)(r1)   /* Fetch r4 ret arg */
+       std     r4,0(r11)
+       ld      r11,STK_PARM(r12)(r1)   /* Fetch r5 ret arg */
+       std     r5,0(r11)
+       ld      r11,STK_PARM(r13)(r1)   /* Fetch r6 ret arg */
+       std     r6,0(r11)
+       ld      r11,STK_PARM(r14)(r1)   /* Fetch r7 ret arg */
+       std     r7,0(r11)
+       ld      r11,STK_PARM(r15)(r1)   /* Fetch r8 ret arg */
+       std     r8,0(r11)
+       ld      r11,STK_PARM(r16)(r1)   /* Fetch r9 ret arg */
+       std     r9,0(r11)
+       ld      r11,STK_PARM(r17)(r1)   /* Fetch r10 ret arg */
+       std     r10,0(r11)
+
+       mtcrf   0xff,r0
+
+       blr                             /* return r3 = status */
+
+/* plpar_hcall_9arg_9ret(unsigned long opcode,         R3
+                        unsigned long arg1,            R4
+                        unsigned long arg2,            R5
+                        unsigned long arg3,            R6
+                        unsigned long arg4,            R7
+                        unsigned long arg5,            R8
+                        unsigned long arg6,            R9
+                        unsigned long arg7,            R10
+                        unsigned long arg8,            112(R1)
+                        unsigned long arg9,            110(R1)
+                        unsigned long *out1,           108(R1)
+                        unsigned long *out2,           106(R1)
+                        unsigned long *out3,           104(R1)
+                        unsigned long *out4,           102(R1)
+                        unsigned long *out5,           100(R1)
+                        unsigned long *out6,            98(R1)
+                        unsigned long *out7);           96(R1)
+                        unsigned long *out8,            94(R1)
+                        unsigned long *out9,            92(R1)
+*/
+_GLOBAL(plpar_hcall_9arg_9ret)
+       HMT_MEDIUM
+
+       mfcr    r0
+       stw     r0,8(r1)
+
+       ld      r11,STK_PARM(r11)(r1)    /* put arg8 in R11 */
+       ld      r12,STK_PARM(r12)(r1)    /* put arg9 in R12 */
+
+       HVSC                            /* invoke the hypervisor */
+
+       ld      r0,STK_PARM(r13)(r1)    /* Fetch r4 ret arg */
+       stdx    r4,r0,r0
+       ld      r0,STK_PARM(r14)(r1)    /* Fetch r5 ret arg */
+       stdx    r5,r0,r0
+       ld      r0,STK_PARM(r15)(r1)    /* Fetch r6 ret arg */
+       stdx    r6,r0,r0
+       ld      r0,STK_PARM(r16)(r1)    /* Fetch r7 ret arg */
+       stdx    r7,r0,r0
+       ld      r0,STK_PARM(r17)(r1)    /* Fetch r8 ret arg */
+       stdx    r8,r0,r0
+       ld      r0,STK_PARM(r18)(r1)    /* Fetch r9 ret arg */
+       stdx    r9,r0,r0
+       ld      r0,STK_PARM(r19)(r1)    /* Fetch r10 ret arg */
+       stdx    r10,r0,r0
+       ld      r0,STK_PARM(r20)(r1)    /* Fetch r11 ret arg */
+       stdx    r11,r0,r0
+       ld      r0,STK_PARM(r21)(r1)    /* Fetch r12 ret arg */
+       stdx    r12,r0,r0
+
+       lwz     r0,8(r1)
+       mtcrf   0xff,r0
+
+       blr                             /* return r3 = status */
index ba6befd96636e2314d351a072e712f154e87ec00..a72a987f1d4d4364b7b512a62821ab39dc4d7d9f 100644 (file)
@@ -41,7 +41,7 @@ int hvc_get_chars(uint32_t vtermno, char *buf, int count)
        unsigned long got;
 
        if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got,
-               (unsigned long *)buf, (unsigned long *)buf+1) == H_Success)
+               (unsigned long *)buf, (unsigned long *)buf+1) == H_SUCCESS)
                return got;
        return 0;
 }
@@ -69,9 +69,9 @@ int hvc_put_chars(uint32_t vtermno, const char *buf, int count)
 
        ret = plpar_hcall_norets(H_PUT_TERM_CHAR, vtermno, count, lbuf[0],
                                 lbuf[1]);
-       if (ret == H_Success)
+       if (ret == H_SUCCESS)
                return count;
-       if (ret == H_Busy)
+       if (ret == H_BUSY)
                return 0;
        return -EIO;
 }
index 22bfb5c89db9fe0cfbde10c3688130e69a3becb0..fcf4b4cbeaf331aa7986b0b705bc4bbe2148ee7b 100644 (file)
@@ -43,21 +43,21 @@ MODULE_VERSION(HVCS_ARCH_VERSION);
 static int hvcs_convert(long to_convert)
 {
        switch (to_convert) {
-               case H_Success:
+               case H_SUCCESS:
                        return 0;
-               case H_Parameter:
+               case H_PARAMETER:
                        return -EINVAL;
-               case H_Hardware:
+               case H_HARDWARE:
                        return -EIO;
-               case H_Busy:
-               case H_LongBusyOrder1msec:
-               case H_LongBusyOrder10msec:
-               case H_LongBusyOrder100msec:
-               case H_LongBusyOrder1sec:
-               case H_LongBusyOrder10sec:
-               case H_LongBusyOrder100sec:
+               case H_BUSY:
+               case H_LONG_BUSY_ORDER_1_MSEC:
+               case H_LONG_BUSY_ORDER_10_MSEC:
+               case H_LONG_BUSY_ORDER_100_MSEC:
+               case H_LONG_BUSY_ORDER_1_SEC:
+               case H_LONG_BUSY_ORDER_10_SEC:
+               case H_LONG_BUSY_ORDER_100_SEC:
                        return -EBUSY;
-               case H_Function: /* fall through */
+               case H_FUNCTION: /* fall through */
                default:
                        return -EPERM;
        }
index 8952528d31ac61ed7801c77d771dd6c00ec8b507..634b7d06d3cc2a7df78645104294fae0e491647a 100644 (file)
@@ -54,7 +54,8 @@ EXPORT_SYMBOL(plpar_hcall);
 EXPORT_SYMBOL(plpar_hcall_4out);
 EXPORT_SYMBOL(plpar_hcall_norets);
 EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
-
+EXPORT_SYMBOL(plpar_hcall_7arg_7ret);
+EXPORT_SYMBOL(plpar_hcall_9arg_9ret);
 extern void pSeries_find_serial_port(void);
 
 
@@ -72,7 +73,7 @@ static void udbg_hvsi_putc(char c)
 
        do {
                rc = plpar_put_term_char(vtermno, sizeof(packet), packet);
-       } while (rc == H_Busy);
+       } while (rc == H_BUSY);
 }
 
 static long hvsi_udbg_buf_len;
@@ -85,7 +86,7 @@ static int udbg_hvsi_getc_poll(void)
 
        if (hvsi_udbg_buf_len == 0) {
                rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf);
-               if (rc != H_Success || hvsi_udbg_buf[0] != 0xff) {
+               if (rc != H_SUCCESS || hvsi_udbg_buf[0] != 0xff) {
                        /* bad read or non-data packet */
                        hvsi_udbg_buf_len = 0;
                } else {
@@ -139,7 +140,7 @@ static void udbg_putcLP(char c)
        buf[0] = c;
        do {
                rc = plpar_put_term_char(vtermno, 1, buf);
-       } while(rc == H_Busy);
+       } while(rc == H_BUSY);
 }
 
 /* Buffered chars getc */
@@ -158,7 +159,7 @@ static int udbg_getc_pollLP(void)
                /* get some more chars. */
                inbuflen = 0;
                rc = plpar_get_term_char(vtermno, &inbuflen, buf);
-               if (rc != H_Success)
+               if (rc != H_SUCCESS)
                        inbuflen = 0;   /* otherwise inbuflen is garbage */
        }
        if (inbuflen <= 0 || inbuflen > 16) {
@@ -304,7 +305,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
 
        lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v,
                              hpte_r, &slot, &dummy0, &dummy1);
-       if (unlikely(lpar_rc == H_PTEG_Full)) {
+       if (unlikely(lpar_rc == H_PTEG_FULL)) {
                if (!(vflags & HPTE_V_BOLTED))
                        DBG_LOW(" full\n");
                return -1;
@@ -315,7 +316,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
         * will fail. However we must catch the failure in hash_page
         * or we will loop forever, so return -2 in this case.
         */
-       if (unlikely(lpar_rc != H_Success)) {
+       if (unlikely(lpar_rc != H_SUCCESS)) {
                if (!(vflags & HPTE_V_BOLTED))
                        DBG_LOW(" lpar err %d\n", lpar_rc);
                return -2;
@@ -346,9 +347,9 @@ static long pSeries_lpar_hpte_remove(unsigned long hpte_group)
                /* don't remove a bolted entry */
                lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset,
                                           (0x1UL << 4), &dummy1, &dummy2);
-               if (lpar_rc == H_Success)
+               if (lpar_rc == H_SUCCESS)
                        return i;
-               BUG_ON(lpar_rc != H_Not_Found);
+               BUG_ON(lpar_rc != H_NOT_FOUND);
 
                slot_offset++;
                slot_offset &= 0x7;
@@ -391,14 +392,14 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot,
 
        lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN);
 
-       if (lpar_rc == H_Not_Found) {
+       if (lpar_rc == H_NOT_FOUND) {
                DBG_LOW("not found !\n");
                return -1;
        }
 
        DBG_LOW("ok\n");
 
-       BUG_ON(lpar_rc != H_Success);
+       BUG_ON(lpar_rc != H_SUCCESS);
 
        return 0;
 }
@@ -417,7 +418,7 @@ static unsigned long pSeries_lpar_hpte_getword0(unsigned long slot)
 
        lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1);
 
-       BUG_ON(lpar_rc != H_Success);
+       BUG_ON(lpar_rc != H_SUCCESS);
 
        return dword0;
 }
@@ -468,7 +469,7 @@ static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp,
        flags = newpp & 7;
        lpar_rc = plpar_pte_protect(flags, slot, 0);
 
-       BUG_ON(lpar_rc != H_Success);
+       BUG_ON(lpar_rc != H_SUCCESS);
 }
 
 static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
@@ -484,10 +485,10 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
        want_v = hpte_encode_v(va, psize);
        lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN,
                                   &dummy1, &dummy2);
-       if (lpar_rc == H_Not_Found)
+       if (lpar_rc == H_NOT_FOUND)
                return;
 
-       BUG_ON(lpar_rc != H_Success);
+       BUG_ON(lpar_rc != H_SUCCESS);
 }
 
 /*
index b2fbf8ba8fbb793bbcd75e7d912d4ae9d21c5b01..5eb55ef1c91cd20a99ffe811596458c7d8acf326 100644 (file)
@@ -463,7 +463,7 @@ static void pseries_dedicated_idle_sleep(void)
         * very low priority.  The cede enables interrupts, which
         * doesn't matter here.
         */
-       if (!lppaca[cpu ^ 1].idle || poll_pending() == H_Pending)
+       if (!lppaca[cpu ^ 1].idle || poll_pending() == H_PENDING)
                cede_processor();
 
 out:
index 866379b80c09029ab78d21e9744699afe2484ee6..8e53e04ada8ba8681bad1fa267e8bf3ada50cd6c 100644 (file)
@@ -258,7 +258,7 @@ EXPORT_SYMBOL(vio_find_node);
 int vio_enable_interrupts(struct vio_dev *dev)
 {
        int rc = h_vio_signal(dev->unit_address, VIO_IRQ_ENABLE);
-       if (rc != H_Success)
+       if (rc != H_SUCCESS)
                printk(KERN_ERR "vio: Error 0x%x enabling interrupts\n", rc);
        return rc;
 }
@@ -267,7 +267,7 @@ EXPORT_SYMBOL(vio_enable_interrupts);
 int vio_disable_interrupts(struct vio_dev *dev)
 {
        int rc = h_vio_signal(dev->unit_address, VIO_IRQ_DISABLE);
-       if (rc != H_Success)
+       if (rc != H_SUCCESS)
                printk(KERN_ERR "vio: Error 0x%x disabling interrupts\n", rc);
        return rc;
 }
index 4864cb32be250478de4705809c4403f8ca2eb630..2d60ea30fed6a00d24efa99085070fbfe2492c16 100644 (file)
@@ -168,7 +168,7 @@ static int pSeriesLP_xirr_info_get(int n_cpu)
        unsigned long return_value;
 
        lpar_rc = plpar_xirr(&return_value);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic(" bad return code xirr - rc = %lx \n", lpar_rc);
        return (int)return_value;
 }
@@ -179,7 +179,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value)
        unsigned long val64 = value & 0xffffffff;
 
        lpar_rc = plpar_eoi(val64);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc,
                      val64);
 }
@@ -189,7 +189,7 @@ void pSeriesLP_cppr_info(int n_cpu, u8 value)
        unsigned long lpar_rc;
 
        lpar_rc = plpar_cppr(value);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic("bad return code cppr - rc = %lx\n", lpar_rc);
 }
 
@@ -198,7 +198,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value)
        unsigned long lpar_rc;
 
        lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic("bad return code qirr - rc = %lx\n", lpar_rc);
 }
 
index 768de64b371fd0be3a7065ce26d4fbb550d78ea6..fbbec5e761c68957c27a442374716df3404bf634 100644 (file)
@@ -64,13 +64,13 @@ sys_call_table:
 /*215*/        .long sys_ipc, sys_sigreturn, sys_clone, sys_ioprio_get, sys_adjtimex
 /*220*/        .long sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid
 /*225*/        .long sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16
-/*230*/        .long sys_select, sys_time, sys_nis_syscall, sys_stime, sys_statfs64
+/*230*/        .long sys_select, sys_time, sys_splice, sys_stime, sys_statfs64
                                          /* "We are the Knights of the Forest of Ni!!" */
 /*235*/        .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
 /*240*/        .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
 /*245*/        .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
 /*250*/        .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
-/*255*/        .long sys_nis_syscall, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
+/*255*/        .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
 /*260*/        .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
 /*265*/        .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy
 /*270*/        .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
index 900fb0b940d80c784dedeb31f766130fe4dae4d5..30389085a3591167b3e5adf37812246d102aeea9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.16
-# Sun Mar 26 14:58:11 2006
+# Fri Mar 31 01:40:57 2006
 #
 CONFIG_SPARC=y
 CONFIG_SPARC64=y
@@ -180,6 +180,7 @@ CONFIG_SYN_COOKIES=y
 CONFIG_INET_AH=y
 CONFIG_INET_ESP=y
 CONFIG_INET_IPCOMP=y
+CONFIG_INET_XFRM_TUNNEL=y
 CONFIG_INET_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
@@ -203,6 +204,7 @@ CONFIG_IPV6_ROUTE_INFO=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
 # CONFIG_NETFILTER is not set
@@ -308,7 +310,6 @@ CONFIG_BLK_DEV_NBD=m
 # CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_UB=m
 # CONFIG_BLK_DEV_RAM is not set
-CONFIG_BLK_DEV_RAM_COUNT=16
 # CONFIG_BLK_DEV_INITRD is not set
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -449,6 +450,7 @@ CONFIG_MD_RAID0=m
 CONFIG_MD_RAID1=m
 CONFIG_MD_RAID10=m
 CONFIG_MD_RAID5=m
+# CONFIG_MD_RAID5_RESHAPE is not set
 CONFIG_MD_RAID6=m
 CONFIG_MD_MULTIPATH=m
 # CONFIG_MD_FAULTY is not set
@@ -741,9 +743,7 @@ CONFIG_I2C_ALGOBIT=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
 # CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
@@ -826,6 +826,7 @@ CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_FIRMWARE_EDID is not set
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_TILEBLITTING=y
 # CONFIG_FB_CIRRUS is not set
@@ -1116,6 +1117,11 @@ CONFIG_USB_HIDDEV=y
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
 #
 
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
 #
 # Misc Linux/SPARC drivers
 #
index 7dc28a48426861dcd8b3925a687e7e73bbfbf024..8175a6968c6bcc5cdd66f96a89ee60b30bb5b328 100644 (file)
@@ -830,9 +830,16 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
 
 static void tsb_sync(void *info)
 {
+       struct trap_per_cpu *tp = &trap_block[raw_smp_processor_id()];
        struct mm_struct *mm = info;
 
-       if (current->active_mm == mm)
+       /* It is not valid to test "currrent->active_mm == mm" here.
+        *
+        * The value of "current" is not changed atomically with
+        * switch_mm().  But that's OK, we just need to check the
+        * current cpu's trap block PGD physical address.
+        */
+       if (tp->pgd_paddr == __pa(mm->pgd))
                tsb_context_switch(mm);
 }
 
index c4a1cef4b1e547992ae671b7710f4952f1c291f1..86dd5cb81e09fc9bfa08cce1c90ff6ffe5c5b026 100644 (file)
@@ -136,6 +136,8 @@ SIGN1(sys32_getpeername, sys_getpeername, %o0)
 SIGN1(sys32_getsockname, sys_getsockname, %o0)
 SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1)
 SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2)
+SIGN2(sys32_splice, sys_splice, %o0, %o1)
+SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5)
 
        .globl          sys32_mmap2
 sys32_mmap2:
index 2e906bad56faac67154d10be40de2d74782fe79f..31030bf00f1a7a5a42fabb8ac1ff31c5292fa1a1 100644 (file)
@@ -1069,3 +1069,11 @@ long sys32_lookup_dcookie(unsigned long cookie_high,
        return sys_lookup_dcookie((cookie_high << 32) | cookie_low,
                                  buf, len);
 }
+
+long compat_sync_file_range(int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, int flags)
+{
+       return sys_sync_file_range(fd,
+                                  (off_high << 32) | off_low,
+                                  (nb_high << 32) | nb_low,
+                                  flags);
+}
index 3b250f2318fdaaee2c1fbfdf1e3237f26e9cfac8..857b82c82875bf4154a424b41ea9607a0f910e64 100644 (file)
@@ -66,12 +66,12 @@ sys_call_table32:
        .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
 /*220*/        .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid
        .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
-/*230*/        .word sys32_select, compat_sys_time, sys_nis_syscall, compat_sys_stime, compat_sys_statfs64
+/*230*/        .word sys32_select, compat_sys_time, sys32_splice, compat_sys_stime, compat_sys_statfs64
        .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall
 /*240*/        .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
        .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
 /*250*/        .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
-       .word sys_ni_syscall, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
+       .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
 /*260*/        .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
        .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
 /*270*/        .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
@@ -135,12 +135,12 @@ sys_call_table:
        .word sys_ipc, sys_nis_syscall, sys_clone, sys_ioprio_get, sys_adjtimex
 /*220*/        .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid
        .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid
-/*230*/        .word sys_select, sys_nis_syscall, sys_nis_syscall, sys_stime, sys_statfs64
+/*230*/        .word sys_select, sys_nis_syscall, sys_splice, sys_stime, sys_statfs64
        .word sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
 /*240*/        .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
        .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
 /*250*/        .word sys64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
-       .word sys_ni_syscall, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
+       .word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
 /*260*/        .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
        .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy
 /*270*/        .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
index 0db2f7d9fab50ff57ff5d7125ed731afdbf5f445..6e002aacb961832113ba30d522d437460ee20612 100644 (file)
@@ -327,8 +327,12 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
                insn = get_fault_insn(regs, 0);
                if (!insn)
                        goto continue_fault;
+               /* All loads, stores and atomics have bits 30 and 31 both set
+                * in the instruction.  Bit 21 is set in all stores, but we
+                * have to avoid prefetches which also have bit 21 set.
+                */
                if ((insn & 0xc0200000) == 0xc0200000 &&
-                   (insn & 0x1780000) != 0x1680000) {
+                   (insn & 0x01780000) != 0x01680000) {
                        /* Don't bother updating thread struct value,
                         * because update_mmu_cache only cares which tlb
                         * the access came from.
index 074620d413d4733db87aca5f0ce6f09be09a080e..fbbbebbad8a49219674c119551f07a85b594bd9e 100644 (file)
@@ -198,6 +198,13 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
        pmd_t *pmd;
        pte_t *pte = NULL;
 
+       /* We must align the address, because our caller will run
+        * set_huge_pte_at() on whatever we return, which writes out
+        * all of the sub-ptes for the hugepage range.  So we have
+        * to give it the first such sub-pte.
+        */
+       addr &= HPAGE_MASK;
+
        pgd = pgd_offset(mm, addr);
        pud = pud_alloc(mm, pgd, addr);
        if (pud) {
index 5b26af8597f3fae3bcb4651186ebb748eaa8583c..e112d1a5dab6b8c2dcae45e2a6b18bbfc4529760 100644 (file)
@@ -1740,7 +1740,7 @@ EXPORT_SYMBOL(blk_run_queue);
 
 /**
  * blk_cleanup_queue: - release a &request_queue_t when it is no longer needed
- * @q:    the request queue to be released
+ * @kobj:    the kobj belonging of the request queue to be released
  *
  * Description:
  *     blk_cleanup_queue is the pair to blk_init_queue() or
index d6e8ffbd8132d8b29fc51f699e63e8a8b9e4b1dc..447d8e68887a1f668312806e8cedd75c8c218247 100644 (file)
@@ -25,9 +25,6 @@ obj-$(CONFIG_CONNECTOR)               += connector/
 obj-$(CONFIG_FB_I810)           += video/i810/
 obj-$(CONFIG_FB_INTEL)          += video/intelfb/
 
-# we also need input/serio early so serio bus is initialized by the time
-# serial drivers start registering their serio ports
-obj-$(CONFIG_SERIO)            += input/serio/
 obj-y                          += serial/
 obj-$(CONFIG_PARPORT)          += parport/
 obj-y                          += base/ block/ misc/ mfd/ net/ media/
@@ -53,6 +50,7 @@ obj-$(CONFIG_TC)              += tc/
 obj-$(CONFIG_USB)              += usb/
 obj-$(CONFIG_PCI)              += usb/
 obj-$(CONFIG_USB_GADGET)       += usb/gadget/
+obj-$(CONFIG_SERIO)            += input/serio/
 obj-$(CONFIG_GAMEPORT)         += input/gameport/
 obj-$(CONFIG_INPUT)            += input/
 obj-$(CONFIG_I2O)              += message/
@@ -71,6 +69,7 @@ obj-$(CONFIG_CPU_FREQ)                += cpufreq/
 obj-$(CONFIG_MMC)              += mmc/
 obj-$(CONFIG_NEW_LEDS)         += leds/
 obj-$(CONFIG_INFINIBAND)       += infiniband/
+obj-$(CONFIG_IPATH_CORE)       += infiniband/
 obj-$(CONFIG_SGI_SN)           += sn/
 obj-y                          += firmware/
 obj-$(CONFIG_CRYPTO)           += crypto/
index 9888bc1517555b7e85a1c7da2930bf1d71c76f68..473a13b22b298e09a20f63749e8ce9f2d576f06f 100644 (file)
@@ -65,7 +65,7 @@ MODULE_LICENSE("GPL");
 
 
 typedef struct bluecard_info_t {
-       dev_link_t link;
+       struct pcmcia_device *p_dev;
        dev_node_t node;
 
        struct hci_dev *hdev;
@@ -85,8 +85,8 @@ typedef struct bluecard_info_t {
 } bluecard_info_t;
 
 
-static void bluecard_config(dev_link_t *link);
-static void bluecard_release(dev_link_t *link);
+static int bluecard_config(struct pcmcia_device *link);
+static void bluecard_release(struct pcmcia_device *link);
 
 static void bluecard_detach(struct pcmcia_device *p_dev);
 
@@ -162,7 +162,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev);
 static void bluecard_activity_led_timeout(u_long arg)
 {
        bluecard_info_t *info = (bluecard_info_t *)arg;
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
 
        if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
                return;
@@ -179,7 +179,7 @@ static void bluecard_activity_led_timeout(u_long arg)
 
 static void bluecard_enable_activity_led(bluecard_info_t *info)
 {
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
 
        if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
                return;
@@ -235,7 +235,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info)
        }
 
        do {
-               register unsigned int iobase = info->link.io.BasePort1;
+               register unsigned int iobase = info->p_dev->io.BasePort1;
                register unsigned int offset;
                register unsigned char command;
                register unsigned long ready_bit;
@@ -244,7 +244,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info)
 
                clear_bit(XMIT_WAKEUP, &(info->tx_state));
 
-               if (!(info->link.state & DEV_PRESENT))
+               if (!pcmcia_dev_present(info->p_dev))
                        return;
 
                if (test_bit(XMIT_BUFFER_NUMBER, &(info->tx_state))) {
@@ -382,7 +382,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
                return;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        if (test_bit(XMIT_SENDING_READY, &(info->tx_state)))
                bluecard_enable_activity_led(info);
@@ -512,7 +512,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst, struct pt_regs *r
        if (!test_bit(CARD_READY, &(info->hw_state)))
                return IRQ_HANDLED;
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        spin_lock(&(info->lock));
 
@@ -626,7 +626,7 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
 static int bluecard_hci_open(struct hci_dev *hdev)
 {
        bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
 
        if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
                bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
@@ -646,7 +646,7 @@ static int bluecard_hci_open(struct hci_dev *hdev)
 static int bluecard_hci_close(struct hci_dev *hdev)
 {
        bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
 
        if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
                return 0;
@@ -713,7 +713,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l
 
 static int bluecard_open(bluecard_info_t *info)
 {
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
        struct hci_dev *hdev;
        unsigned char id;
 
@@ -831,7 +831,7 @@ static int bluecard_open(bluecard_info_t *info)
 
 static int bluecard_close(bluecard_info_t *info)
 {
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
        struct hci_dev *hdev = info->hdev;
 
        if (!hdev)
@@ -856,17 +856,16 @@ static int bluecard_close(bluecard_info_t *info)
        return 0;
 }
 
-static int bluecard_attach(struct pcmcia_device *p_dev)
+static int bluecard_probe(struct pcmcia_device *link)
 {
        bluecard_info_t *info;
-       dev_link_t *link;
 
        /* Create new info device */
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       link = &info->link;
+       info->p_dev = link;
        link->priv = info;
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -878,32 +877,22 @@ static int bluecard_attach(struct pcmcia_device *p_dev)
        link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
-       link->conf.Vcc = 50;
        link->conf.IntType = INT_MEMORY_AND_IO;
 
-       link->handle = p_dev;
-       p_dev->instance = link;
-
-       link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-       bluecard_config(link);
-
-       return 0;
+       return bluecard_config(link);
 }
 
 
-static void bluecard_detach(struct pcmcia_device *p_dev)
+static void bluecard_detach(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        bluecard_info_t *info = link->priv;
 
-       if (link->state & DEV_CONFIG)
-               bluecard_release(link);
-
+       bluecard_release(link);
        kfree(info);
 }
 
 
-static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        int i;
 
@@ -918,14 +907,12 @@ static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse
        return pcmcia_parse_tuple(handle, tuple, parse);
 }
 
-static void bluecard_config(dev_link_t *link)
+static int bluecard_config(struct pcmcia_device *link)
 {
-       client_handle_t handle = link->handle;
        bluecard_info_t *info = link->priv;
        tuple_t tuple;
        u_short buf[256];
        cisparse_t parse;
-       config_info_t config;
        int i, n, last_ret, last_fn;
 
        tuple.TupleData = (cisdata_t *)buf;
@@ -935,7 +922,7 @@ static void bluecard_config(dev_link_t *link)
 
        /* Get configuration register information */
        tuple.DesiredTuple = CISTPL_CONFIG;
-       last_ret = first_tuple(handle, &tuple, &parse);
+       last_ret = first_tuple(link, &tuple, &parse);
        if (last_ret != CS_SUCCESS) {
                last_fn = ParseTuple;
                goto cs_failed;
@@ -943,36 +930,31 @@ static void bluecard_config(dev_link_t *link)
        link->conf.ConfigBase = parse.config.base;
        link->conf.Present = parse.config.rmask[0];
 
-       /* Configure card */
-       link->state |= DEV_CONFIG;
-       i = pcmcia_get_configuration_info(handle, &config);
-       link->conf.Vcc = config.Vcc;
-
        link->conf.ConfigIndex = 0x20;
        link->io.NumPorts1 = 64;
        link->io.IOAddrLines = 6;
 
        for (n = 0; n < 0x400; n += 0x40) {
                link->io.BasePort1 = n ^ 0x300;
-               i = pcmcia_request_io(link->handle, &link->io);
+               i = pcmcia_request_io(link, &link->io);
                if (i == CS_SUCCESS)
                        break;
        }
 
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestIO, i);
+               cs_error(link, RequestIO, i);
                goto failed;
        }
 
-       i = pcmcia_request_irq(link->handle, &link->irq);
+       i = pcmcia_request_irq(link, &link->irq);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestIRQ, i);
+               cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
-       i = pcmcia_request_configuration(link->handle, &link->conf);
+       i = pcmcia_request_configuration(link, &link->conf);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestConfiguration, i);
+               cs_error(link, RequestConfiguration, i);
                goto failed;
        }
 
@@ -980,57 +962,28 @@ static void bluecard_config(dev_link_t *link)
                goto failed;
 
        strcpy(info->node.dev_name, info->hdev->name);
-       link->dev = &info->node;
-       link->state &= ~DEV_CONFIG_PENDING;
+       link->dev_node = &info->node;
 
-       return;
+       return 0;
 
 cs_failed:
-       cs_error(link->handle, last_fn, last_ret);
+       cs_error(link, last_fn, last_ret);
 
 failed:
        bluecard_release(link);
+       return -ENODEV;
 }
 
 
-static void bluecard_release(dev_link_t *link)
+static void bluecard_release(struct pcmcia_device *link)
 {
        bluecard_info_t *info = link->priv;
 
-       if (link->state & DEV_PRESENT)
-               bluecard_close(info);
+       bluecard_close(info);
 
        del_timer(&(info->timer));
 
-       link->dev = NULL;
-
-       pcmcia_release_configuration(link->handle);
-       pcmcia_release_io(link->handle, &link->io);
-       pcmcia_release_irq(link->handle, &link->irq);
-
-       link->state &= ~DEV_CONFIG;
-}
-
-static int bluecard_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int bluecard_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
+       pcmcia_disable_device(link);
 }
 
 static struct pcmcia_device_id bluecard_ids[] = {
@@ -1046,11 +999,9 @@ static struct pcmcia_driver bluecard_driver = {
        .drv            = {
                .name   = "bluecard_cs",
        },
-       .probe          = bluecard_attach,
+       .probe          = bluecard_probe,
        .remove         = bluecard_detach,
        .id_table       = bluecard_ids,
-       .suspend        = bluecard_suspend,
-       .resume         = bluecard_resume,
 };
 
 static int __init init_bluecard_cs(void)
index 7e21b1ff27c4213fb78de899fc03f11fe7fe0e58..b94ac2f9f7baf2d5e9cc0641e52de23cd1536d13 100644 (file)
@@ -72,7 +72,7 @@ MODULE_LICENSE("GPL");
 
 
 typedef struct bt3c_info_t {
-       dev_link_t link;
+       struct pcmcia_device *p_dev;
        dev_node_t node;
 
        struct hci_dev *hdev;
@@ -88,8 +88,8 @@ typedef struct bt3c_info_t {
 } bt3c_info_t;
 
 
-static void bt3c_config(dev_link_t *link);
-static void bt3c_release(dev_link_t *link);
+static int bt3c_config(struct pcmcia_device *link);
+static void bt3c_release(struct pcmcia_device *link);
 
 static void bt3c_detach(struct pcmcia_device *p_dev);
 
@@ -191,11 +191,11 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
                return;
 
        do {
-               register unsigned int iobase = info->link.io.BasePort1;
+               register unsigned int iobase = info->p_dev->io.BasePort1;
                register struct sk_buff *skb;
                register int len;
 
-               if (!(info->link.state & DEV_PRESENT))
+               if (!pcmcia_dev_present(info->p_dev))
                        break;
 
 
@@ -229,7 +229,7 @@ static void bt3c_receive(bt3c_info_t *info)
                return;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        avail = bt3c_read(iobase, 0x7006);
        //printk("bt3c_cs: receiving %d bytes\n", avail);
@@ -350,7 +350,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
                return IRQ_NONE;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        spin_lock(&(info->lock));
 
@@ -481,7 +481,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int co
        unsigned int iobase, size, addr, fcs, tmp;
        int i, err = 0;
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        /* Reset */
        bt3c_io_write(iobase, 0x8040, 0x0404);
@@ -562,7 +562,6 @@ static int bt3c_open(bt3c_info_t *info)
 {
        const struct firmware *firmware;
        struct hci_dev *hdev;
-       client_handle_t handle;
        int err;
 
        spin_lock_init(&(info->lock));
@@ -594,10 +593,8 @@ static int bt3c_open(bt3c_info_t *info)
 
        hdev->owner = THIS_MODULE;
 
-       handle = info->link.handle;
-
        /* Load firmware */
-       err = request_firmware(&firmware, "BT3CPCC.bin", &handle_to_dev(handle));
+       err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
        if (err < 0) {
                BT_ERR("Firmware request failed");
                goto error;
@@ -648,17 +645,16 @@ static int bt3c_close(bt3c_info_t *info)
        return 0;
 }
 
-static int bt3c_attach(struct pcmcia_device *p_dev)
+static int bt3c_probe(struct pcmcia_device *link)
 {
        bt3c_info_t *info;
-       dev_link_t *link;
 
        /* Create new info device */
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       link = &info->link;
+       info->p_dev = link;
        link->priv = info;
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -670,31 +666,21 @@ static int bt3c_attach(struct pcmcia_device *p_dev)
        link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
-       link->conf.Vcc = 50;
        link->conf.IntType = INT_MEMORY_AND_IO;
 
-       link->handle = p_dev;
-       p_dev->instance = link;
-
-       link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-       bt3c_config(link);
-
-       return 0;
+       return bt3c_config(link);
 }
 
 
-static void bt3c_detach(struct pcmcia_device *p_dev)
+static void bt3c_detach(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        bt3c_info_t *info = link->priv;
 
-       if (link->state & DEV_CONFIG)
-               bt3c_release(link);
-
+       bt3c_release(link);
        kfree(info);
 }
 
-static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        int i;
 
@@ -705,30 +691,28 @@ static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
        return pcmcia_parse_tuple(handle, tuple, parse);
 }
 
-static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        return get_tuple(handle, tuple, parse);
 }
 
-static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        return get_tuple(handle, tuple, parse);
 }
 
-static void bt3c_config(dev_link_t *link)
+static int bt3c_config(struct pcmcia_device *link)
 {
        static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
-       client_handle_t handle = link->handle;
        bt3c_info_t *info = link->priv;
        tuple_t tuple;
        u_short buf[256];
        cisparse_t parse;
        cistpl_cftable_entry_t *cf = &parse.cftable_entry;
-       config_info_t config;
        int i, j, try, last_ret, last_fn;
 
        tuple.TupleData = (cisdata_t *)buf;
@@ -738,7 +722,7 @@ static void bt3c_config(dev_link_t *link)
 
        /* Get configuration register information */
        tuple.DesiredTuple = CISTPL_CONFIG;
-       last_ret = first_tuple(handle, &tuple, &parse);
+       last_ret = first_tuple(link, &tuple, &parse);
        if (last_ret != CS_SUCCESS) {
                last_fn = ParseTuple;
                goto cs_failed;
@@ -746,11 +730,6 @@ static void bt3c_config(dev_link_t *link)
        link->conf.ConfigBase = parse.config.base;
        link->conf.Present = parse.config.rmask[0];
 
-       /* Configure card */
-       link->state |= DEV_CONFIG;
-       i = pcmcia_get_configuration_info(handle, &config);
-       link->conf.Vcc = config.Vcc;
-
        /* First pass: look for a config entry that looks normal. */
        tuple.TupleData = (cisdata_t *)buf;
        tuple.TupleOffset = 0;
@@ -759,59 +738,59 @@ static void bt3c_config(dev_link_t *link)
        tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
        /* Two tries: without IO aliases, then with aliases */
        for (try = 0; try < 2; try++) {
-               i = first_tuple(handle, &tuple, &parse);
+               i = first_tuple(link, &tuple, &parse);
                while (i != CS_NO_MORE_ITEMS) {
                        if (i != CS_SUCCESS)
                                goto next_entry;
                        if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
-                               link->conf.Vpp1 = link->conf.Vpp2 = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+                               link->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
                        if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && (cf->io.win[0].base != 0)) {
                                link->conf.ConfigIndex = cf->index;
                                link->io.BasePort1 = cf->io.win[0].base;
                                link->io.IOAddrLines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
-                               i = pcmcia_request_io(link->handle, &link->io);
+                               i = pcmcia_request_io(link, &link->io);
                                if (i == CS_SUCCESS)
                                        goto found_port;
                        }
 next_entry:
-                       i = next_tuple(handle, &tuple, &parse);
+                       i = next_tuple(link, &tuple, &parse);
                }
        }
 
        /* Second pass: try to find an entry that isn't picky about
           its base address, then try to grab any standard serial port
           address, and finally try to get any free port. */
-       i = first_tuple(handle, &tuple, &parse);
+       i = first_tuple(link, &tuple, &parse);
        while (i != CS_NO_MORE_ITEMS) {
                if ((i == CS_SUCCESS) && (cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
                        link->conf.ConfigIndex = cf->index;
                        for (j = 0; j < 5; j++) {
                                link->io.BasePort1 = base[j];
                                link->io.IOAddrLines = base[j] ? 16 : 3;
-                               i = pcmcia_request_io(link->handle, &link->io);
+                               i = pcmcia_request_io(link, &link->io);
                                if (i == CS_SUCCESS)
                                        goto found_port;
                        }
                }
-               i = next_tuple(handle, &tuple, &parse);
+               i = next_tuple(link, &tuple, &parse);
        }
 
 found_port:
        if (i != CS_SUCCESS) {
                BT_ERR("No usable port range found");
-               cs_error(link->handle, RequestIO, i);
+               cs_error(link, RequestIO, i);
                goto failed;
        }
 
-       i = pcmcia_request_irq(link->handle, &link->irq);
+       i = pcmcia_request_irq(link, &link->irq);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestIRQ, i);
+               cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
-       i = pcmcia_request_configuration(link->handle, &link->conf);
+       i = pcmcia_request_configuration(link, &link->conf);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestConfiguration, i);
+               cs_error(link, RequestConfiguration, i);
                goto failed;
        }
 
@@ -819,55 +798,26 @@ found_port:
                goto failed;
 
        strcpy(info->node.dev_name, info->hdev->name);
-       link->dev = &info->node;
-       link->state &= ~DEV_CONFIG_PENDING;
+       link->dev_node = &info->node;
 
-       return;
+       return 0;
 
 cs_failed:
-       cs_error(link->handle, last_fn, last_ret);
+       cs_error(link, last_fn, last_ret);
 
 failed:
        bt3c_release(link);
+       return -ENODEV;
 }
 
 
-static void bt3c_release(dev_link_t *link)
+static void bt3c_release(struct pcmcia_device *link)
 {
        bt3c_info_t *info = link->priv;
 
-       if (link->state & DEV_PRESENT)
-               bt3c_close(info);
-
-       link->dev = NULL;
-
-       pcmcia_release_configuration(link->handle);
-       pcmcia_release_io(link->handle, &link->io);
-       pcmcia_release_irq(link->handle, &link->irq);
-
-       link->state &= ~DEV_CONFIG;
-}
-
-static int bt3c_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
+       bt3c_close(info);
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int bt3c_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
+       pcmcia_disable_device(link);
 }
 
 
@@ -882,11 +832,9 @@ static struct pcmcia_driver bt3c_driver = {
        .drv            = {
                .name   = "bt3c_cs",
        },
-       .probe          = bt3c_attach,
+       .probe          = bt3c_probe,
        .remove         = bt3c_detach,
        .id_table       = bt3c_ids,
-       .suspend        = bt3c_suspend,
-       .resume         = bt3c_resume,
 };
 
 static int __init init_bt3c_cs(void)
index 7b4bff4cfa2dfac57daa86f1c96ae9c3b0c947de..9ce4c93467e57da73794711497e80936baaeaf3d 100644 (file)
@@ -68,7 +68,7 @@ MODULE_LICENSE("GPL");
 
 
 typedef struct btuart_info_t {
-       dev_link_t link;
+       struct pcmcia_device *p_dev;
        dev_node_t node;
 
        struct hci_dev *hdev;
@@ -84,8 +84,8 @@ typedef struct btuart_info_t {
 } btuart_info_t;
 
 
-static void btuart_config(dev_link_t *link);
-static void btuart_release(dev_link_t *link);
+static int btuart_config(struct pcmcia_device *link);
+static void btuart_release(struct pcmcia_device *link);
 
 static void btuart_detach(struct pcmcia_device *p_dev);
 
@@ -146,13 +146,13 @@ static void btuart_write_wakeup(btuart_info_t *info)
        }
 
        do {
-               register unsigned int iobase = info->link.io.BasePort1;
+               register unsigned int iobase = info->p_dev->io.BasePort1;
                register struct sk_buff *skb;
                register int len;
 
                clear_bit(XMIT_WAKEUP, &(info->tx_state));
 
-               if (!(info->link.state & DEV_PRESENT))
+               if (!pcmcia_dev_present(info->p_dev))
                        return;
 
                if (!(skb = skb_dequeue(&(info->txq))))
@@ -187,7 +187,7 @@ static void btuart_receive(btuart_info_t *info)
                return;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        do {
                info->hdev->stat.byte_rx++;
@@ -301,7 +301,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg
                return IRQ_NONE;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        spin_lock(&(info->lock));
 
@@ -357,7 +357,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)
                return;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        spin_lock_irqsave(&(info->lock), flags);
 
@@ -481,7 +481,7 @@ static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned lon
 static int btuart_open(btuart_info_t *info)
 {
        unsigned long flags;
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
        struct hci_dev *hdev;
 
        spin_lock_init(&(info->lock));
@@ -550,7 +550,7 @@ static int btuart_open(btuart_info_t *info)
 static int btuart_close(btuart_info_t *info)
 {
        unsigned long flags;
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
        struct hci_dev *hdev = info->hdev;
 
        if (!hdev)
@@ -576,17 +576,16 @@ static int btuart_close(btuart_info_t *info)
        return 0;
 }
 
-static int btuart_attach(struct pcmcia_device *p_dev)
+static int btuart_probe(struct pcmcia_device *link)
 {
        btuart_info_t *info;
-       dev_link_t *link;
 
        /* Create new info device */
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       link = &info->link;
+       info->p_dev = link;
        link->priv = info;
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -598,31 +597,21 @@ static int btuart_attach(struct pcmcia_device *p_dev)
        link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
-       link->conf.Vcc = 50;
        link->conf.IntType = INT_MEMORY_AND_IO;
 
-       link->handle = p_dev;
-       p_dev->instance = link;
-
-       link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-       btuart_config(link);
-
-       return 0;
+       return btuart_config(link);
 }
 
 
-static void btuart_detach(struct pcmcia_device *p_dev)
+static void btuart_detach(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        btuart_info_t *info = link->priv;
 
-       if (link->state & DEV_CONFIG)
-               btuart_release(link);
-
+       btuart_release(link);
        kfree(info);
 }
 
-static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        int i;
 
@@ -633,30 +622,28 @@ static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
        return pcmcia_parse_tuple(handle, tuple, parse);
 }
 
-static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        return get_tuple(handle, tuple, parse);
 }
 
-static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        return get_tuple(handle, tuple, parse);
 }
 
-static void btuart_config(dev_link_t *link)
+static int btuart_config(struct pcmcia_device *link)
 {
        static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
-       client_handle_t handle = link->handle;
        btuart_info_t *info = link->priv;
        tuple_t tuple;
        u_short buf[256];
        cisparse_t parse;
        cistpl_cftable_entry_t *cf = &parse.cftable_entry;
-       config_info_t config;
        int i, j, try, last_ret, last_fn;
 
        tuple.TupleData = (cisdata_t *)buf;
@@ -666,7 +653,7 @@ static void btuart_config(dev_link_t *link)
 
        /* Get configuration register information */
        tuple.DesiredTuple = CISTPL_CONFIG;
-       last_ret = first_tuple(handle, &tuple, &parse);
+       last_ret = first_tuple(link, &tuple, &parse);
        if (last_ret != CS_SUCCESS) {
                last_fn = ParseTuple;
                goto cs_failed;
@@ -674,11 +661,6 @@ static void btuart_config(dev_link_t *link)
        link->conf.ConfigBase = parse.config.base;
        link->conf.Present = parse.config.rmask[0];
 
-       /* Configure card */
-       link->state |= DEV_CONFIG;
-       i = pcmcia_get_configuration_info(handle, &config);
-       link->conf.Vcc = config.Vcc;
-
        /* First pass: look for a config entry that looks normal. */
        tuple.TupleData = (cisdata_t *) buf;
        tuple.TupleOffset = 0;
@@ -687,29 +669,29 @@ static void btuart_config(dev_link_t *link)
        tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
        /* Two tries: without IO aliases, then with aliases */
        for (try = 0; try < 2; try++) {
-               i = first_tuple(handle, &tuple, &parse);
+               i = first_tuple(link, &tuple, &parse);
                while (i != CS_NO_MORE_ITEMS) {
                        if (i != CS_SUCCESS)
                                goto next_entry;
                        if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
-                               link->conf.Vpp1 = link->conf.Vpp2 = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+                               link->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
                        if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && (cf->io.win[0].base != 0)) {
                                link->conf.ConfigIndex = cf->index;
                                link->io.BasePort1 = cf->io.win[0].base;
                                link->io.IOAddrLines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
-                               i = pcmcia_request_io(link->handle, &link->io);
+                               i = pcmcia_request_io(link, &link->io);
                                if (i == CS_SUCCESS)
                                        goto found_port;
                        }
 next_entry:
-                       i = next_tuple(handle, &tuple, &parse);
+                       i = next_tuple(link, &tuple, &parse);
                }
        }
 
        /* Second pass: try to find an entry that isn't picky about
           its base address, then try to grab any standard serial port
           address, and finally try to get any free port. */
-       i = first_tuple(handle, &tuple, &parse);
+       i = first_tuple(link, &tuple, &parse);
        while (i != CS_NO_MORE_ITEMS) {
                if ((i == CS_SUCCESS) && (cf->io.nwin > 0)
                    && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
@@ -717,30 +699,30 @@ next_entry:
                        for (j = 0; j < 5; j++) {
                                link->io.BasePort1 = base[j];
                                link->io.IOAddrLines = base[j] ? 16 : 3;
-                               i = pcmcia_request_io(link->handle, &link->io);
+                               i = pcmcia_request_io(link, &link->io);
                                if (i == CS_SUCCESS)
                                        goto found_port;
                        }
                }
-               i = next_tuple(handle, &tuple, &parse);
+               i = next_tuple(link, &tuple, &parse);
        }
 
 found_port:
        if (i != CS_SUCCESS) {
                BT_ERR("No usable port range found");
-               cs_error(link->handle, RequestIO, i);
+               cs_error(link, RequestIO, i);
                goto failed;
        }
 
-       i = pcmcia_request_irq(link->handle, &link->irq);
+       i = pcmcia_request_irq(link, &link->irq);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestIRQ, i);
+               cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
-       i = pcmcia_request_configuration(link->handle, &link->conf);
+       i = pcmcia_request_configuration(link, &link->conf);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestConfiguration, i);
+               cs_error(link, RequestConfiguration, i);
                goto failed;
        }
 
@@ -748,58 +730,28 @@ found_port:
                goto failed;
 
        strcpy(info->node.dev_name, info->hdev->name);
-       link->dev = &info->node;
-       link->state &= ~DEV_CONFIG_PENDING;
+       link->dev_node = &info->node;
 
-       return;
+       return 0;
 
 cs_failed:
-       cs_error(link->handle, last_fn, last_ret);
+       cs_error(link, last_fn, last_ret);
 
 failed:
        btuart_release(link);
+       return -ENODEV;
 }
 
 
-static void btuart_release(dev_link_t *link)
+static void btuart_release(struct pcmcia_device *link)
 {
        btuart_info_t *info = link->priv;
 
-       if (link->state & DEV_PRESENT)
-               btuart_close(info);
-
-       link->dev = NULL;
-
-       pcmcia_release_configuration(link->handle);
-       pcmcia_release_io(link->handle, &link->io);
-       pcmcia_release_irq(link->handle, &link->irq);
-
-       link->state &= ~DEV_CONFIG;
-}
-
-static int btuart_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
+       btuart_close(info);
 
-       return 0;
+       pcmcia_disable_device(link);
 }
 
-static int btuart_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
-
 static struct pcmcia_device_id btuart_ids[] = {
        /* don't use this driver. Use serial_cs + hci_uart instead */
        PCMCIA_DEVICE_NULL
@@ -811,11 +763,9 @@ static struct pcmcia_driver btuart_driver = {
        .drv            = {
                .name   = "btuart_cs",
        },
-       .probe          = btuart_attach,
+       .probe          = btuart_probe,
        .remove         = btuart_detach,
        .id_table       = btuart_ids,
-       .suspend        = btuart_suspend,
-       .resume         = btuart_resume,
 };
 
 static int __init init_btuart_cs(void)
index 0449bc45ae5e53dd85f463a7e3b6a155492035fe..a71a240611e0ef0cac35dabd2097aaeeab87d04e 100644 (file)
@@ -68,7 +68,7 @@ MODULE_LICENSE("GPL");
 
 
 typedef struct dtl1_info_t {
-       dev_link_t link;
+       struct pcmcia_device *p_dev;
        dev_node_t node;
 
        struct hci_dev *hdev;
@@ -87,8 +87,8 @@ typedef struct dtl1_info_t {
 } dtl1_info_t;
 
 
-static void dtl1_config(dev_link_t *link);
-static void dtl1_release(dev_link_t *link);
+static int dtl1_config(struct pcmcia_device *link);
+static void dtl1_release(struct pcmcia_device *link);
 
 static void dtl1_detach(struct pcmcia_device *p_dev);
 
@@ -153,13 +153,13 @@ static void dtl1_write_wakeup(dtl1_info_t *info)
        }
 
        do {
-               register unsigned int iobase = info->link.io.BasePort1;
+               register unsigned int iobase = info->p_dev->io.BasePort1;
                register struct sk_buff *skb;
                register int len;
 
                clear_bit(XMIT_WAKEUP, &(info->tx_state));
 
-               if (!(info->link.state & DEV_PRESENT))
+               if (!pcmcia_dev_present(info->p_dev))
                        return;
 
                if (!(skb = skb_dequeue(&(info->txq))))
@@ -218,7 +218,7 @@ static void dtl1_receive(dtl1_info_t *info)
                return;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        do {
                info->hdev->stat.byte_rx++;
@@ -305,7 +305,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
                return IRQ_NONE;
        }
 
-       iobase = info->link.io.BasePort1;
+       iobase = info->p_dev->io.BasePort1;
 
        spin_lock(&(info->lock));
 
@@ -458,7 +458,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd,  unsigned long
 static int dtl1_open(dtl1_info_t *info)
 {
        unsigned long flags;
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
        struct hci_dev *hdev;
 
        spin_lock_init(&(info->lock));
@@ -504,7 +504,7 @@ static int dtl1_open(dtl1_info_t *info)
        outb(UART_LCR_WLEN8, iobase + UART_LCR);        /* Reset DLAB */
        outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR);
 
-       info->ri_latch = inb(info->link.io.BasePort1 + UART_MSR) & UART_MSR_RI;
+       info->ri_latch = inb(info->p_dev->io.BasePort1 + UART_MSR) & UART_MSR_RI;
 
        /* Turn on interrupts */
        outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER);
@@ -529,7 +529,7 @@ static int dtl1_open(dtl1_info_t *info)
 static int dtl1_close(dtl1_info_t *info)
 {
        unsigned long flags;
-       unsigned int iobase = info->link.io.BasePort1;
+       unsigned int iobase = info->p_dev->io.BasePort1;
        struct hci_dev *hdev = info->hdev;
 
        if (!hdev)
@@ -555,17 +555,16 @@ static int dtl1_close(dtl1_info_t *info)
        return 0;
 }
 
-static int dtl1_attach(struct pcmcia_device *p_dev)
+static int dtl1_probe(struct pcmcia_device *link)
 {
        dtl1_info_t *info;
-       dev_link_t *link;
 
        /* Create new info device */
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       link = &info->link;
+       info->p_dev = link;
        link->priv = info;
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -577,31 +576,22 @@ static int dtl1_attach(struct pcmcia_device *p_dev)
        link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
-       link->conf.Vcc = 50;
        link->conf.IntType = INT_MEMORY_AND_IO;
 
-       link->handle = p_dev;
-       p_dev->instance = link;
-
-       link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-       dtl1_config(link);
-
-       return 0;
+       return dtl1_config(link);
 }
 
 
-static void dtl1_detach(struct pcmcia_device *p_dev)
+static void dtl1_detach(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        dtl1_info_t *info = link->priv;
 
-       if (link->state & DEV_CONFIG)
-               dtl1_release(link);
+       dtl1_release(link);
 
        kfree(info);
 }
 
-static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        int i;
 
@@ -612,29 +602,27 @@ static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
        return pcmcia_parse_tuple(handle, tuple, parse);
 }
 
-static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        return get_tuple(handle, tuple, parse);
 }
 
-static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
+static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
 {
        if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        return get_tuple(handle, tuple, parse);
 }
 
-static void dtl1_config(dev_link_t *link)
+static int dtl1_config(struct pcmcia_device *link)
 {
-       client_handle_t handle = link->handle;
        dtl1_info_t *info = link->priv;
        tuple_t tuple;
        u_short buf[256];
        cisparse_t parse;
        cistpl_cftable_entry_t *cf = &parse.cftable_entry;
-       config_info_t config;
        int i, last_ret, last_fn;
 
        tuple.TupleData = (cisdata_t *)buf;
@@ -644,7 +632,7 @@ static void dtl1_config(dev_link_t *link)
 
        /* Get configuration register information */
        tuple.DesiredTuple = CISTPL_CONFIG;
-       last_ret = first_tuple(handle, &tuple, &parse);
+       last_ret = first_tuple(link, &tuple, &parse);
        if (last_ret != CS_SUCCESS) {
                last_fn = ParseTuple;
                goto cs_failed;
@@ -652,11 +640,6 @@ static void dtl1_config(dev_link_t *link)
        link->conf.ConfigBase = parse.config.base;
        link->conf.Present = parse.config.rmask[0];
 
-       /* Configure card */
-       link->state |= DEV_CONFIG;
-       i = pcmcia_get_configuration_info(handle, &config);
-       link->conf.Vcc = config.Vcc;
-
        tuple.TupleData = (cisdata_t *)buf;
        tuple.TupleOffset = 0;
        tuple.TupleDataMax = 255;
@@ -665,34 +648,34 @@ static void dtl1_config(dev_link_t *link)
 
        /* Look for a generic full-sized window */
        link->io.NumPorts1 = 8;
-       i = first_tuple(handle, &tuple, &parse);
+       i = first_tuple(link, &tuple, &parse);
        while (i != CS_NO_MORE_ITEMS) {
                if ((i == CS_SUCCESS) && (cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
                        link->conf.ConfigIndex = cf->index;
                        link->io.BasePort1 = cf->io.win[0].base;
                        link->io.NumPorts1 = cf->io.win[0].len; /*yo */
                        link->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
-                       i = pcmcia_request_io(link->handle, &link->io);
+                       i = pcmcia_request_io(link, &link->io);
                        if (i == CS_SUCCESS)
                                break;
                }
-               i = next_tuple(handle, &tuple, &parse);
+               i = next_tuple(link, &tuple, &parse);
        }
 
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestIO, i);
+               cs_error(link, RequestIO, i);
                goto failed;
        }
 
-       i = pcmcia_request_irq(link->handle, &link->irq);
+       i = pcmcia_request_irq(link, &link->irq);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestIRQ, i);
+               cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
-       i = pcmcia_request_configuration(link->handle, &link->conf);
+       i = pcmcia_request_configuration(link, &link->conf);
        if (i != CS_SUCCESS) {
-               cs_error(link->handle, RequestConfiguration, i);
+               cs_error(link, RequestConfiguration, i);
                goto failed;
        }
 
@@ -700,55 +683,26 @@ static void dtl1_config(dev_link_t *link)
                goto failed;
 
        strcpy(info->node.dev_name, info->hdev->name);
-       link->dev = &info->node;
-       link->state &= ~DEV_CONFIG_PENDING;
+       link->dev_node = &info->node;
 
-       return;
+       return 0;
 
 cs_failed:
-       cs_error(link->handle, last_fn, last_ret);
+       cs_error(link, last_fn, last_ret);
 
 failed:
        dtl1_release(link);
+       return -ENODEV;
 }
 
 
-static void dtl1_release(dev_link_t *link)
+static void dtl1_release(struct pcmcia_device *link)
 {
        dtl1_info_t *info = link->priv;
 
-       if (link->state & DEV_PRESENT)
-               dtl1_close(info);
-
-       link->dev = NULL;
-
-       pcmcia_release_configuration(link->handle);
-       pcmcia_release_io(link->handle, &link->io);
-       pcmcia_release_irq(link->handle, &link->irq);
-
-       link->state &= ~DEV_CONFIG;
-}
-
-static int dtl1_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int dtl1_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
+       dtl1_close(info);
 
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
+       pcmcia_disable_device(link);
 }
 
 
@@ -765,11 +719,9 @@ static struct pcmcia_driver dtl1_driver = {
        .drv            = {
                .name   = "dtl1_cs",
        },
-       .probe          = dtl1_attach,
+       .probe          = dtl1_probe,
        .remove         = dtl1_detach,
        .id_table       = dtl1_ids,
-       .suspend        = dtl1_suspend,
-       .resume         = dtl1_resume,
 };
 
 static int __init init_dtl1_cs(void)
index 327b00c3c45eafef31aa9254e1e6589f6088295d..8d97b3911293bf46436bd743ae9c28aaad714316 100644 (file)
@@ -904,7 +904,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address,
                 * It is possible the vty-server was removed after the irq was
                 * requested but before we have time to enable interrupts.
                 */
-               if (vio_enable_interrupts(vdev) == H_Success)
+               if (vio_enable_interrupts(vdev) == H_SUCCESS)
                        return 0;
                else {
                        printk(KERN_ERR "HVCS: int enable failed for"
index 8b603b2d1c4211ebedb7a4e575db84278b75c276..935670a3cd987a2ea13e4412873b9ed8ca41e17d 100644 (file)
@@ -74,7 +74,7 @@ void compute_shiftstate(void);
        k_self,         k_fn,           k_spec,         k_pad,\
        k_dead,         k_cons,         k_cur,          k_shift,\
        k_meta,         k_ascii,        k_lock,         k_lowercase,\
-       k_slock,        k_dead2,        k_ignore,       k_ignore
+       k_slock,        k_dead2,        k_brl,          k_ignore
 
 typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value,
                            char up_flag, struct pt_regs *regs);
@@ -100,7 +100,7 @@ static fn_handler_fn *fn_handler[] = { FN_HANDLERS };
 const int max_vals[] = {
        255, ARRAY_SIZE(func_table) - 1, ARRAY_SIZE(fn_handler) - 1, NR_PAD - 1,
        NR_DEAD - 1, 255, 3, NR_SHIFT - 1, 255, NR_ASCII - 1, NR_LOCK - 1,
-       255, NR_LOCK - 1, 255
+       255, NR_LOCK - 1, 255, NR_BRL - 1
 };
 
 const int NR_TYPES = ARRAY_SIZE(max_vals);
@@ -126,7 +126,7 @@ static unsigned long key_down[NBITS(KEY_MAX)];              /* keyboard key bitmap */
 static unsigned char shift_down[NR_SHIFT];             /* shift state counters.. */
 static int dead_key_next;
 static int npadch = -1;                                        /* -1 or number assembled on pad */
-static unsigned char diacr;
+static unsigned int diacr;
 static char rep;                                       /* flag telling character repeat */
 
 static unsigned char ledstate = 0xff;                  /* undefined */
@@ -394,22 +394,30 @@ void compute_shiftstate(void)
  * Otherwise, conclude that DIACR was not combining after all,
  * queue it and return CH.
  */
-static unsigned char handle_diacr(struct vc_data *vc, unsigned char ch)
+static unsigned int handle_diacr(struct vc_data *vc, unsigned int ch)
 {
-       int d = diacr;
+       unsigned int d = diacr;
        unsigned int i;
 
        diacr = 0;
 
-       for (i = 0; i < accent_table_size; i++) {
-               if (accent_table[i].diacr == d && accent_table[i].base == ch)
-                       return accent_table[i].result;
+       if ((d & ~0xff) == BRL_UC_ROW) {
+               if ((ch & ~0xff) == BRL_UC_ROW)
+                       return d | ch;
+       } else {
+               for (i = 0; i < accent_table_size; i++)
+                       if (accent_table[i].diacr == d && accent_table[i].base == ch)
+                               return accent_table[i].result;
        }
 
-       if (ch == ' ' || ch == d)
+       if (ch == ' ' || ch == (BRL_UC_ROW|0) || ch == d)
                return d;
 
-       put_queue(vc, d);
+       if (kbd->kbdmode == VC_UNICODE)
+               to_utf8(vc, d);
+       else if (d < 0x100)
+               put_queue(vc, d);
+
        return ch;
 }
 
@@ -419,7 +427,10 @@ static unsigned char handle_diacr(struct vc_data *vc, unsigned char ch)
 static void fn_enter(struct vc_data *vc, struct pt_regs *regs)
 {
        if (diacr) {
-               put_queue(vc, diacr);
+               if (kbd->kbdmode == VC_UNICODE)
+                       to_utf8(vc, diacr);
+               else if (diacr < 0x100)
+                       put_queue(vc, diacr);
                diacr = 0;
        }
        put_queue(vc, 13);
@@ -615,7 +626,7 @@ static void k_lowercase(struct vc_data *vc, unsigned char value, char up_flag, s
        printk(KERN_ERR "keyboard.c: k_lowercase was called - impossible\n");
 }
 
-static void k_self(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
+static void k_unicode(struct vc_data *vc, unsigned int value, char up_flag, struct pt_regs *regs)
 {
        if (up_flag)
                return;         /* no action, if this is a key release */
@@ -628,7 +639,10 @@ static void k_self(struct vc_data *vc, unsigned char value, char up_flag, struct
                diacr = value;
                return;
        }
-       put_queue(vc, value);
+       if (kbd->kbdmode == VC_UNICODE)
+               to_utf8(vc, value);
+       else if (value < 0x100)
+               put_queue(vc, value);
 }
 
 /*
@@ -636,13 +650,23 @@ static void k_self(struct vc_data *vc, unsigned char value, char up_flag, struct
  * dead keys modifying the same character. Very useful
  * for Vietnamese.
  */
-static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
+static void k_deadunicode(struct vc_data *vc, unsigned int value, char up_flag, struct pt_regs *regs)
 {
        if (up_flag)
                return;
        diacr = (diacr ? handle_diacr(vc, value) : value);
 }
 
+static void k_self(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
+{
+       k_unicode(vc, value, up_flag, regs);
+}
+
+static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
+{
+       k_deadunicode(vc, value, up_flag, regs);
+}
+
 /*
  * Obsolete - for backwards compatibility only
  */
@@ -650,7 +674,7 @@ static void k_dead(struct vc_data *vc, unsigned char value, char up_flag, struct
 {
        static unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' };
        value = ret_diacr[value];
-       k_dead2(vc, value, up_flag, regs);
+       k_deadunicode(vc, value, up_flag, regs);
 }
 
 static void k_cons(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
@@ -835,6 +859,62 @@ static void k_slock(struct vc_data *vc, unsigned char value, char up_flag, struc
        }
 }
 
+/* by default, 300ms interval for combination release */
+static long brl_timeout = 300;
+MODULE_PARM_DESC(brl_timeout, "Braille keys release delay in ms (0 for combination on first release, < 0 for dead characters)");
+module_param(brl_timeout, long, 0644);
+static void k_brl(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
+{
+       static unsigned pressed,committing;
+       static unsigned long releasestart;
+
+       if (kbd->kbdmode != VC_UNICODE) {
+               if (!up_flag)
+                       printk("keyboard mode must be unicode for braille patterns\n");
+               return;
+       }
+
+       if (!value) {
+               k_unicode(vc, BRL_UC_ROW, up_flag, regs);
+               return;
+       }
+
+       if (value > 8)
+               return;
+
+       if (brl_timeout < 0) {
+               k_deadunicode(vc, BRL_UC_ROW | (1 << (value - 1)), up_flag, regs);
+               return;
+       }
+
+       if (up_flag) {
+               if (brl_timeout) {
+                       if (!committing ||
+                           jiffies - releasestart > (brl_timeout * HZ) / 1000) {
+                               committing = pressed;
+                               releasestart = jiffies;
+                       }
+                       pressed &= ~(1 << (value - 1));
+                       if (!pressed) {
+                               if (committing) {
+                                       k_unicode(vc, BRL_UC_ROW | committing, 0, regs);
+                                       committing = 0;
+                               }
+                       }
+               } else {
+                       if (committing) {
+                               k_unicode(vc, BRL_UC_ROW | committing, 0, regs);
+                               committing = 0;
+                       }
+                       pressed &= ~(1 << (value - 1));
+               }
+       } else {
+               pressed |= 1 << (value - 1);
+               if (!brl_timeout)
+                       committing = pressed;
+       }
+}
+
 /*
  * The leds display either (i) the status of NumLock, CapsLock, ScrollLock,
  * or (ii) whatever pattern of lights people want to show using KDSETLED,
@@ -1125,9 +1205,13 @@ static void kbd_keycode(unsigned int keycode, int down,
        }
 
        if (keycode > NR_KEYS)
-               return;
+               if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
+                       keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
+               else
+                       return;
+       else
+               keysym = key_map[keycode];
 
-       keysym = key_map[keycode];
        type = KTYP(keysym);
 
        if (type < 0xf0) {
index 5fdf185154330c367fc850b5009fe132e55d848e..02114a0bd0d9d4aadc5a7df96fb93801c6acbfbc 100644 (file)
@@ -46,7 +46,7 @@
 /* #define ATR_CSUM */
 
 #ifdef PCMCIA_DEBUG
-#define reader_to_dev(x)       (&handle_to_dev(x->link.handle))
+#define reader_to_dev(x)       (&handle_to_dev(x->p_dev->handle))
 static int pc_debug = PCMCIA_DEBUG;
 module_param(pc_debug, int, 0600);
 #define DEBUGP(n, rdr, x, args...) do {                                \
@@ -67,7 +67,7 @@ static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";
 #define        T_100MSEC       msecs_to_jiffies(100)
 #define        T_500MSEC       msecs_to_jiffies(500)
 
-static void cm4000_release(dev_link_t *link);
+static void cm4000_release(struct pcmcia_device *link);
 
 static int major;              /* major number we get from the kernel */
 
@@ -106,7 +106,7 @@ static int major;           /* major number we get from the kernel */
 #define REG_STOPBITS(x)                (x + 7)
 
 struct cm4000_dev {
-       dev_link_t link;                /* pcmcia link */
+       struct pcmcia_device *p_dev;
        dev_node_t node;                /* OS node (major,minor) */
 
        unsigned char atr[MAX_ATR];
@@ -149,14 +149,14 @@ struct cm4000_dev {
 #define        ZERO_DEV(dev)                                           \
        memset(&dev->atr_csum,0,                                \
                sizeof(struct cm4000_dev) -                     \
-               /*link*/ sizeof(dev_link_t) -                   \
+               /*link*/ sizeof(struct pcmcia_device) -         \
                /*node*/ sizeof(dev_node_t) -                   \
                /*atr*/ MAX_ATR*sizeof(char) -                  \
                /*rbuf*/ 512*sizeof(char) -                     \
                /*sbuf*/ 512*sizeof(char) -                     \
                /*queue*/ 4*sizeof(wait_queue_head_t))
 
-static dev_link_t *dev_table[CM4000_MAX_DEV];
+static struct pcmcia_device *dev_table[CM4000_MAX_DEV];
 static struct class *cmm_class;
 
 /* This table doesn't use spaces after the comma between fields and thus
@@ -454,7 +454,7 @@ static struct card_fixup card_fixups[] = {
 static void set_cardparameter(struct cm4000_dev *dev)
 {
        int i;
-       ioaddr_t iobase = dev->link.io.BasePort1;
+       ioaddr_t iobase = dev->p_dev->io.BasePort1;
        u_int8_t stopbits = 0x02; /* ISO default */
 
        DEBUGP(3, dev, "-> set_cardparameter\n");
@@ -487,7 +487,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
        unsigned short num_bytes_read;
        unsigned char pts_reply[4];
        ssize_t rc;
-       ioaddr_t iobase = dev->link.io.BasePort1;
+       ioaddr_t iobase = dev->p_dev->io.BasePort1;
 
        rc = 0;
 
@@ -699,7 +699,7 @@ static void terminate_monitor(struct cm4000_dev *dev)
 static void monitor_card(unsigned long p)
 {
        struct cm4000_dev *dev = (struct cm4000_dev *) p;
-       ioaddr_t iobase = dev->link.io.BasePort1;
+       ioaddr_t iobase = dev->p_dev->io.BasePort1;
        unsigned short s;
        struct ptsreq ptsreq;
        int i, atrc;
@@ -962,7 +962,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
                        loff_t *ppos)
 {
        struct cm4000_dev *dev = filp->private_data;
-       ioaddr_t iobase = dev->link.io.BasePort1;
+       ioaddr_t iobase = dev->p_dev->io.BasePort1;
        ssize_t rc;
        int i, j, k;
 
@@ -971,7 +971,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
        if (count == 0)         /* according to manpage */
                return 0;
 
-       if ((dev->link.state & DEV_PRESENT) == 0 ||     /* socket removed */
+       if (!pcmcia_dev_present(dev->p_dev) || /* device removed */
            test_bit(IS_CMM_ABSENT, &dev->flags))
                return -ENODEV;
 
@@ -1083,7 +1083,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
                         size_t count, loff_t *ppos)
 {
        struct cm4000_dev *dev = (struct cm4000_dev *) filp->private_data;
-       ioaddr_t iobase = dev->link.io.BasePort1;
+       ioaddr_t iobase = dev->p_dev->io.BasePort1;
        unsigned short s;
        unsigned char tmp;
        unsigned char infolen;
@@ -1108,7 +1108,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
 
        sendT0 = dev->proto ? 0 : nr > 5 ? 0x08 : 0;
 
-       if ((dev->link.state & DEV_PRESENT) == 0 ||     /* socket removed */
+       if (!pcmcia_dev_present(dev->p_dev) || /* device removed */
            test_bit(IS_CMM_ABSENT, &dev->flags))
                return -ENODEV;
 
@@ -1440,8 +1440,8 @@ static int cmm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
                     unsigned long arg)
 {
        struct cm4000_dev *dev = filp->private_data;
-       ioaddr_t iobase = dev->link.io.BasePort1;
-       dev_link_t *link;
+       ioaddr_t iobase = dev->p_dev->io.BasePort1;
+       struct pcmcia_device *link;
        int size;
        int rc;
        void __user *argp = (void __user *)arg;
@@ -1458,7 +1458,7 @@ static int cmm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
               iminor(inode), ioctl_names[_IOC_NR(cmd)]);
 
        link = dev_table[iminor(inode)];
-       if (!(DEV_OK(link))) {
+       if (!pcmcia_dev_present(link)) {
                DEBUGP(4, dev, "DEV_OK false\n");
                return -ENODEV;
        }
@@ -1660,14 +1660,14 @@ static int cmm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
 static int cmm_open(struct inode *inode, struct file *filp)
 {
        struct cm4000_dev *dev;
-       dev_link_t *link;
+       struct pcmcia_device *link;
        int rc, minor = iminor(inode);
 
        if (minor >= CM4000_MAX_DEV)
                return -ENODEV;
 
        link = dev_table[minor];
-       if (link == NULL || !(DEV_OK(link)))
+       if (link == NULL || !pcmcia_dev_present(link))
                return -ENODEV;
 
        if (link->open)
@@ -1709,7 +1709,7 @@ static int cmm_open(struct inode *inode, struct file *filp)
 static int cmm_close(struct inode *inode, struct file *filp)
 {
        struct cm4000_dev *dev;
-       dev_link_t *link;
+       struct pcmcia_device *link;
        int minor = iminor(inode);
 
        if (minor >= CM4000_MAX_DEV)
@@ -1735,7 +1735,7 @@ static int cmm_close(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static void cmm_cm4000_release(dev_link_t * link)
+static void cmm_cm4000_release(struct pcmcia_device * link)
 {
        struct cm4000_dev *dev = link->priv;
 
@@ -1759,13 +1759,11 @@ static void cmm_cm4000_release(dev_link_t * link)
 
 /*==== Interface to PCMCIA Layer =======================================*/
 
-static void cm4000_config(dev_link_t * link, int devno)
+static int cm4000_config(struct pcmcia_device * link, int devno)
 {
-       client_handle_t handle = link->handle;
        struct cm4000_dev *dev;
        tuple_t tuple;
        cisparse_t parse;
-       config_info_t conf;
        u_char buf[64];
        int fail_fn, fail_rc;
        int rc;
@@ -1777,41 +1775,34 @@ static void cm4000_config(dev_link_t * link, int devno)
        tuple.TupleDataMax = sizeof(buf);
        tuple.TupleOffset = 0;
 
-       if ((fail_rc = pcmcia_get_first_tuple(handle, &tuple)) != CS_SUCCESS) {
+       if ((fail_rc = pcmcia_get_first_tuple(link, &tuple)) != CS_SUCCESS) {
                fail_fn = GetFirstTuple;
                goto cs_failed;
        }
-       if ((fail_rc = pcmcia_get_tuple_data(handle, &tuple)) != CS_SUCCESS) {
+       if ((fail_rc = pcmcia_get_tuple_data(link, &tuple)) != CS_SUCCESS) {
                fail_fn = GetTupleData;
                goto cs_failed;
        }
        if ((fail_rc =
-            pcmcia_parse_tuple(handle, &tuple, &parse)) != CS_SUCCESS) {
+            pcmcia_parse_tuple(link, &tuple, &parse)) != CS_SUCCESS) {
                fail_fn = ParseTuple;
                goto cs_failed;
        }
-       if ((fail_rc =
-            pcmcia_get_configuration_info(handle, &conf)) != CS_SUCCESS) {
-               fail_fn = GetConfigurationInfo;
-               goto cs_failed;
-       }
 
-       link->state |= DEV_CONFIG;
        link->conf.ConfigBase = parse.config.base;
        link->conf.Present = parse.config.rmask[0];
-       link->conf.Vcc = conf.Vcc;
 
        link->io.BasePort2 = 0;
        link->io.NumPorts2 = 0;
        link->io.Attributes2 = 0;
        tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       for (rc = pcmcia_get_first_tuple(handle, &tuple);
-            rc == CS_SUCCESS; rc = pcmcia_get_next_tuple(handle, &tuple)) {
+       for (rc = pcmcia_get_first_tuple(link, &tuple);
+            rc == CS_SUCCESS; rc = pcmcia_get_next_tuple(link, &tuple)) {
 
-               rc = pcmcia_get_tuple_data(handle, &tuple);
+               rc = pcmcia_get_tuple_data(link, &tuple);
                if (rc != CS_SUCCESS)
                        continue;
-               rc = pcmcia_parse_tuple(handle, &tuple, &parse);
+               rc = pcmcia_parse_tuple(link, &tuple, &parse);
                if (rc != CS_SUCCESS)
                        continue;
 
@@ -1831,7 +1822,7 @@ static void cm4000_config(dev_link_t * link, int devno)
                link->io.IOAddrLines = parse.cftable_entry.io.flags
                    & CISTPL_IO_LINES_MASK;
 
-               rc = pcmcia_request_io(handle, &link->io);
+               rc = pcmcia_request_io(link, &link->io);
                if (rc == CS_SUCCESS)
                        break;  /* we are done */
        }
@@ -1841,7 +1832,7 @@ static void cm4000_config(dev_link_t * link, int devno)
        link->conf.IntType = 00000002;
 
        if ((fail_rc =
-            pcmcia_request_configuration(handle, &link->conf)) != CS_SUCCESS) {
+            pcmcia_request_configuration(link, &link->conf)) != CS_SUCCESS) {
                fail_fn = RequestConfiguration;
                goto cs_release;
        }
@@ -1851,63 +1842,48 @@ static void cm4000_config(dev_link_t * link, int devno)
        dev->node.major = major;
        dev->node.minor = devno;
        dev->node.next = NULL;
-       link->dev = &dev->node;
-       link->state &= ~DEV_CONFIG_PENDING;
+       link->dev_node = &dev->node;
 
-       return;
+       return 0;
 
 cs_failed:
-       cs_error(handle, fail_fn, fail_rc);
+       cs_error(link, fail_fn, fail_rc);
 cs_release:
        cm4000_release(link);
-
-       link->state &= ~DEV_CONFIG_PENDING;
+       return -ENODEV;
 }
 
-static int cm4000_suspend(struct pcmcia_device *p_dev)
+static int cm4000_suspend(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        struct cm4000_dev *dev;
 
        dev = link->priv;
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
        stop_monitor(dev);
 
        return 0;
 }
 
-static int cm4000_resume(struct pcmcia_device *p_dev)
+static int cm4000_resume(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        struct cm4000_dev *dev;
 
        dev = link->priv;
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
        if (link->open)
                start_monitor(dev);
 
        return 0;
 }
 
-static void cm4000_release(dev_link_t *link)
+static void cm4000_release(struct pcmcia_device *link)
 {
        cmm_cm4000_release(link->priv); /* delay release until device closed */
-       pcmcia_release_configuration(link->handle);
-       pcmcia_release_io(link->handle, &link->io);
+       pcmcia_disable_device(link);
 }
 
-static int cm4000_attach(struct pcmcia_device *p_dev)
+static int cm4000_probe(struct pcmcia_device *link)
 {
        struct cm4000_dev *dev;
-       dev_link_t *link;
-       int i;
+       int i, ret;
 
        for (i = 0; i < CM4000_MAX_DEV; i++)
                if (dev_table[i] == NULL)
@@ -1923,7 +1899,7 @@ static int cm4000_attach(struct pcmcia_device *p_dev)
        if (dev == NULL)
                return -ENOMEM;
 
-       link = &dev->link;
+       dev->p_dev = link;
        link->priv = dev;
        link->conf.IntType = INT_MEMORY_AND_IO;
        dev_table[i] = link;
@@ -1933,11 +1909,9 @@ static int cm4000_attach(struct pcmcia_device *p_dev)
        init_waitqueue_head(&dev->atrq);
        init_waitqueue_head(&dev->readq);
 
-       link->handle = p_dev;
-       p_dev->instance = link;
-
-       link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-       cm4000_config(link, i);
+       ret = cm4000_config(link, i);
+       if (ret)
+               return ret;
 
        class_device_create(cmm_class, NULL, MKDEV(major, i), NULL,
                            "cmm%d", i);
@@ -1945,9 +1919,8 @@ static int cm4000_attach(struct pcmcia_device *p_dev)
        return 0;
 }
 
-static void cm4000_detach(struct pcmcia_device *p_dev)
+static void cm4000_detach(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        struct cm4000_dev *dev = link->priv;
        int devno;
 
@@ -1958,11 +1931,9 @@ static void cm4000_detach(struct pcmcia_device *p_dev)
        if (devno == CM4000_MAX_DEV)
                return;
 
-       link->state &= ~DEV_PRESENT;
        stop_monitor(dev);
 
-       if (link->state & DEV_CONFIG)
-               cm4000_release(link);
+       cm4000_release(link);
 
        dev_table[devno] = NULL;
        kfree(dev);
@@ -1993,7 +1964,7 @@ static struct pcmcia_driver cm4000_driver = {
        .drv      = {
                .name = "cm4000_cs",
                },
-       .probe    = cm4000_attach,
+       .probe    = cm4000_probe,
        .remove   = cm4000_detach,
        .suspend  = cm4000_suspend,
        .resume   = cm4000_resume,
index 466e33bab029e6b317628649068009766f56af9f..29efa64580a89bf11d8d88050ac471575884cc9e 100644 (file)
@@ -41,7 +41,7 @@
 
 
 #ifdef PCMCIA_DEBUG
-#define reader_to_dev(x)       (&handle_to_dev(x->link.handle))
+#define reader_to_dev(x)       (&handle_to_dev(x->p_dev->handle))
 static int pc_debug = PCMCIA_DEBUG;
 module_param(pc_debug, int, 0600);
 #define DEBUGP(n, rdr, x, args...) do {                                \
@@ -65,7 +65,7 @@ static char *version =
 /* how often to poll for fifo status change */
 #define POLL_PERIOD                            msecs_to_jiffies(10)
 
-static void reader_release(dev_link_t *link);
+static void reader_release(struct pcmcia_device *link);
 
 static int major;
 static struct class *cmx_class;
@@ -74,7 +74,7 @@ static struct class *cmx_class;
 #define                BS_WRITABLE     0x02
 
 struct reader_dev {
-       dev_link_t              link;
+       struct pcmcia_device    *p_dev;
        dev_node_t              node;
        wait_queue_head_t       devq;
        wait_queue_head_t       poll_wait;
@@ -87,7 +87,7 @@ struct reader_dev {
        struct timer_list       poll_timer;
 };
 
-static dev_link_t *dev_table[CM_MAX_DEV];
+static struct pcmcia_device *dev_table[CM_MAX_DEV];
 
 #ifndef PCMCIA_DEBUG
 #define        xoutb   outb
@@ -116,7 +116,7 @@ static inline unsigned char xinb(unsigned short port)
 static void cm4040_do_poll(unsigned long dummy)
 {
        struct reader_dev *dev = (struct reader_dev *) dummy;
-       unsigned int obs = xinb(dev->link.io.BasePort1
+       unsigned int obs = xinb(dev->p_dev->io.BasePort1
                                + REG_OFFSET_BUFFER_STATUS);
 
        if ((obs & BSR_BULK_IN_FULL)) {
@@ -147,7 +147,7 @@ static void cm4040_stop_poll(struct reader_dev *dev)
 static int wait_for_bulk_out_ready(struct reader_dev *dev)
 {
        int i, rc;
-       int iobase = dev->link.io.BasePort1;
+       int iobase = dev->p_dev->io.BasePort1;
 
        for (i = 0; i < POLL_LOOP_COUNT; i++) {
                if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS)
@@ -177,7 +177,7 @@ static int wait_for_bulk_out_ready(struct reader_dev *dev)
 /* Write to Sync Control Register */
 static int write_sync_reg(unsigned char val, struct reader_dev *dev)
 {
-       int iobase = dev->link.io.BasePort1;
+       int iobase = dev->p_dev->io.BasePort1;
        int rc;
 
        rc = wait_for_bulk_out_ready(dev);
@@ -195,7 +195,7 @@ static int write_sync_reg(unsigned char val, struct reader_dev *dev)
 static int wait_for_bulk_in_ready(struct reader_dev *dev)
 {
        int i, rc;
-       int iobase = dev->link.io.BasePort1;
+       int iobase = dev->p_dev->io.BasePort1;
 
        for (i = 0; i < POLL_LOOP_COUNT; i++) {
                if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS)
@@ -225,7 +225,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
                        size_t count, loff_t *ppos)
 {
        struct reader_dev *dev = filp->private_data;
-       int iobase = dev->link.io.BasePort1;
+       int iobase = dev->p_dev->io.BasePort1;
        size_t bytes_to_read;
        unsigned long i;
        size_t min_bytes_to_read;
@@ -246,7 +246,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
                return -EAGAIN;
        }
 
-       if ((dev->link.state & DEV_PRESENT)==0)
+       if (!pcmcia_dev_present(dev->p_dev))
                return -ENODEV;
 
        for (i = 0; i < 5; i++) {
@@ -328,7 +328,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
                         size_t count, loff_t *ppos)
 {
        struct reader_dev *dev = filp->private_data;
-       int iobase = dev->link.io.BasePort1;
+       int iobase = dev->p_dev->io.BasePort1;
        ssize_t rc;
        int i;
        unsigned int bytes_to_write;
@@ -351,7 +351,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
                return -EAGAIN;
        }
 
-       if ((dev->link.state & DEV_PRESENT) == 0)
+       if (!pcmcia_dev_present(dev->p_dev))
                return -ENODEV;
 
        bytes_to_write = count;
@@ -445,14 +445,14 @@ static unsigned int cm4040_poll(struct file *filp, poll_table *wait)
 static int cm4040_open(struct inode *inode, struct file *filp)
 {
        struct reader_dev *dev;
-       dev_link_t *link;
+       struct pcmcia_device *link;
        int minor = iminor(inode);
 
        if (minor >= CM_MAX_DEV)
                return -ENODEV;
 
        link = dev_table[minor];
-       if (link == NULL || !(DEV_OK(link)))
+       if (link == NULL || !pcmcia_dev_present(link))
                return -ENODEV;
 
        if (link->open)
@@ -478,7 +478,7 @@ static int cm4040_open(struct inode *inode, struct file *filp)
 static int cm4040_close(struct inode *inode, struct file *filp)
 {
        struct reader_dev *dev = filp->private_data;
-       dev_link_t *link;
+       struct pcmcia_device *link;
        int minor = iminor(inode);
 
        DEBUGP(2, dev, "-> cm4040_close(maj/min=%d.%d)\n", imajor(inode),
@@ -500,7 +500,7 @@ static int cm4040_close(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static void cm4040_reader_release(dev_link_t *link)
+static void cm4040_reader_release(struct pcmcia_device *link)
 {
        struct reader_dev *dev = link->priv;
 
@@ -514,60 +514,49 @@ static void cm4040_reader_release(dev_link_t *link)
        return;
 }
 
-static void reader_config(dev_link_t *link, int devno)
+static int reader_config(struct pcmcia_device *link, int devno)
 {
-       client_handle_t handle;
        struct reader_dev *dev;
        tuple_t tuple;
        cisparse_t parse;
-       config_info_t conf;
        u_char buf[64];
        int fail_fn, fail_rc;
        int rc;
 
-       handle = link->handle;
-
        tuple.DesiredTuple = CISTPL_CONFIG;
        tuple.Attributes = 0;
        tuple.TupleData = buf;
        tuple.TupleDataMax = sizeof(buf);
        tuple.TupleOffset = 0;
 
-       if ((fail_rc = pcmcia_get_first_tuple(handle, &tuple)) != CS_SUCCESS) {
+       if ((fail_rc = pcmcia_get_first_tuple(link, &tuple)) != CS_SUCCESS) {
                fail_fn = GetFirstTuple;
                goto cs_failed;
        }
-       if ((fail_rc = pcmcia_get_tuple_data(handle, &tuple)) != CS_SUCCESS) {
+       if ((fail_rc = pcmcia_get_tuple_data(link, &tuple)) != CS_SUCCESS) {
                fail_fn = GetTupleData;
                goto cs_failed;
        }
-       if ((fail_rc = pcmcia_parse_tuple(handle, &tuple, &parse))
+       if ((fail_rc = pcmcia_parse_tuple(link, &tuple, &parse))
                                                        != CS_SUCCESS) {
                fail_fn = ParseTuple;
                goto cs_failed;
        }
-       if ((fail_rc = pcmcia_get_configuration_info(handle, &conf))
-                                                       != CS_SUCCESS) {
-               fail_fn = GetConfigurationInfo;
-               goto cs_failed;
-       }
 
-       link->state |= DEV_CONFIG;
        link->conf.ConfigBase = parse.config.base;
        link->conf.Present = parse.config.rmask[0];
-       link->conf.Vcc = conf.Vcc;
 
        link->io.BasePort2 = 0;
        link->io.NumPorts2 = 0;
        link->io.Attributes2 = 0;
        tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       for (rc = pcmcia_get_first_tuple(handle, &tuple);
+       for (rc = pcmcia_get_first_tuple(link, &tuple);
             rc == CS_SUCCESS;
-            rc = pcmcia_get_next_tuple(handle, &tuple)) {
-               rc = pcmcia_get_tuple_data(handle, &tuple);
+            rc = pcmcia_get_next_tuple(link, &tuple)) {
+               rc = pcmcia_get_tuple_data(link, &tuple);
                if (rc != CS_SUCCESS)
                        continue;
-               rc = pcmcia_parse_tuple(handle, &tuple, &parse);
+               rc = pcmcia_parse_tuple(link, &tuple, &parse);
                if (rc != CS_SUCCESS)
                        continue;
 
@@ -585,13 +574,13 @@ static void reader_config(dev_link_t *link, int devno)
                        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
                link->io.IOAddrLines = parse.cftable_entry.io.flags
                                                & CISTPL_IO_LINES_MASK;
-               rc = pcmcia_request_io(handle, &link->io);
+               rc = pcmcia_request_io(link, &link->io);
 
-               dev_printk(KERN_INFO, &handle_to_dev(handle), "foo");
+               dev_printk(KERN_INFO, &handle_to_dev(link), "foo");
                if (rc == CS_SUCCESS)
                        break;
                else
-                       dev_printk(KERN_INFO, &handle_to_dev(handle),
+                       dev_printk(KERN_INFO, &handle_to_dev(link),
                                   "pcmcia_request_io failed 0x%x\n", rc);
        }
        if (rc != CS_SUCCESS)
@@ -599,10 +588,10 @@ static void reader_config(dev_link_t *link, int devno)
 
        link->conf.IntType = 00000002;
 
-       if ((fail_rc = pcmcia_request_configuration(handle,&link->conf))
+       if ((fail_rc = pcmcia_request_configuration(link,&link->conf))
                                                                !=CS_SUCCESS) {
                fail_fn = RequestConfiguration;
-               dev_printk(KERN_INFO, &handle_to_dev(handle),
+               dev_printk(KERN_INFO, &handle_to_dev(link),
                           "pcmcia_request_configuration failed 0x%x\n",
                           fail_rc);
                goto cs_release;
@@ -612,57 +601,31 @@ static void reader_config(dev_link_t *link, int devno)
        sprintf(dev->node.dev_name, DEVICE_NAME "%d", devno);
        dev->node.major = major;
        dev->node.minor = devno;
-       dev->node.next = NULL;
-       link->dev = &dev->node;
-       link->state &= ~DEV_CONFIG_PENDING;
+       dev->node.next = &dev->node;
 
        DEBUGP(2, dev, "device " DEVICE_NAME "%d at 0x%.4x-0x%.4x\n", devno,
              link->io.BasePort1, link->io.BasePort1+link->io.NumPorts1);
        DEBUGP(2, dev, "<- reader_config (succ)\n");
 
-       return;
+       return 0;
 
 cs_failed:
-       cs_error(handle, fail_fn, fail_rc);
+       cs_error(link, fail_fn, fail_rc);
 cs_release:
        reader_release(link);
-       link->state &= ~DEV_CONFIG_PENDING;
-}
-
-static int reader_suspend(struct pcmcia_device *p_dev)
-{
-       dev_link_t *link = dev_to_instance(p_dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
+       return -ENODEV;
 }
 
-static int reader_resume(struct pcmcia_device *p_dev)
-{
-       dev_link_t *link = dev_to_instance(p_dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
-static void reader_release(dev_link_t *link)
+static void reader_release(struct pcmcia_device *link)
 {
        cm4040_reader_release(link->priv);
-       pcmcia_release_configuration(link->handle);
-       pcmcia_release_io(link->handle, &link->io);
+       pcmcia_disable_device(link);
 }
 
-static int reader_attach(struct pcmcia_device *p_dev)
+static int reader_probe(struct pcmcia_device *link)
 {
        struct reader_dev *dev;
-       dev_link_t *link;
-       int i;
+       int i, ret;
 
        for (i = 0; i < CM_MAX_DEV; i++) {
                if (dev_table[i] == NULL)
@@ -679,8 +642,8 @@ static int reader_attach(struct pcmcia_device *p_dev)
        dev->timeout = CCID_DRIVER_MINIMUM_TIMEOUT;
        dev->buffer_status = 0;
 
-       link = &dev->link;
        link->priv = dev;
+       dev->p_dev = link;
 
        link->conf.IntType = INT_MEMORY_AND_IO;
        dev_table[i] = link;
@@ -692,11 +655,9 @@ static int reader_attach(struct pcmcia_device *p_dev)
        init_timer(&dev->poll_timer);
        dev->poll_timer.function = &cm4040_do_poll;
 
-       link->handle = p_dev;
-       p_dev->instance = link;
-
-       link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-       reader_config(link, i);
+       ret = reader_config(link, i);
+       if (ret)
+               return ret;
 
        class_device_create(cmx_class, NULL, MKDEV(major, i), NULL,
                            "cmx%d", i);
@@ -704,9 +665,8 @@ static int reader_attach(struct pcmcia_device *p_dev)
        return 0;
 }
 
-static void reader_detach(struct pcmcia_device *p_dev)
+static void reader_detach(struct pcmcia_device *link)
 {
-       dev_link_t *link = dev_to_instance(p_dev);
        struct reader_dev *dev = link->priv;
        int devno;
 
@@ -718,10 +678,7 @@ static void reader_detach(struct pcmcia_device *p_dev)
        if (devno == CM_MAX_DEV)
                return;
 
-       link->state &= ~DEV_PRESENT;
-
-       if (link->state & DEV_CONFIG)
-               reader_release(link);
+       reader_release(link);
 
        dev_table[devno] = NULL;
        kfree(dev);
@@ -753,10 +710,8 @@ static struct pcmcia_driver reader_driver = {
        .drv            = {
                .name   = "cm4040_cs",
        },
-       .probe          = reader_attach,
+       .probe          = reader_probe,
        .remove         = reader_detach,
-       .suspend        = reader_suspend,
-       .resume         = reader_resume,
        .id_table       = cm4040_ids,
 };
 
index e6b714b6390df158966a88a71dae92f09c318302..07213454c458c7038820cde11c409cb219f27ab1 100644 (file)
@@ -228,7 +228,7 @@ typedef struct _mgslpc_info {
        struct  _input_signal_events    input_signal_events;
 
        /* PCMCIA support */
-       dev_link_t            link;
+       struct pcmcia_device    *p_dev;
        dev_node_t            node;
        int                   stop;
 
@@ -484,7 +484,7 @@ static void mgslpc_wait_until_sent(struct tty_struct *tty, int timeout);
 
 /* PCMCIA prototypes */
 
-static void mgslpc_config(dev_link_t *link);
+static int mgslpc_config(struct pcmcia_device *link);
 static void mgslpc_release(u_long arg);
 static void mgslpc_detach(struct pcmcia_device *p_dev);
 
@@ -533,14 +533,14 @@ static void ldisc_receive_buf(struct tty_struct *tty,
        }
 }
 
-static int mgslpc_attach(struct pcmcia_device *p_dev)
+static int mgslpc_probe(struct pcmcia_device *link)
 {
     MGSLPC_INFO *info;
-    dev_link_t *link;
-    
+    int ret;
+
     if (debug_level >= DEBUG_LEVEL_INFO)
            printk("mgslpc_attach\n");
-       
+
     info = (MGSLPC_INFO *)kmalloc(sizeof(MGSLPC_INFO), GFP_KERNEL);
     if (!info) {
            printk("Error can't allocate device instance data\n");
@@ -565,25 +565,22 @@ static int mgslpc_attach(struct pcmcia_device *p_dev)
     info->imrb_value = 0xffff;
     info->pim_value = 0xff;
 
-    link = &info->link;
+    info->p_dev = link;
     link->priv = info;
-    
-    /* Initialize the dev_link_t structure */
+
+    /* Initialize the struct pcmcia_device structure */
 
     /* Interrupt setup */
     link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
     link->irq.IRQInfo1   = IRQ_LEVEL_ID;
     link->irq.Handler = NULL;
-    
+
     link->conf.Attributes = 0;
-    link->conf.Vcc = 50;
     link->conf.IntType = INT_MEMORY_AND_IO;
 
-    link->handle = p_dev;
-    p_dev->instance = link;
-
-    link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-    mgslpc_config(link);
+    ret = mgslpc_config(link);
+    if (ret)
+           return ret;
 
     mgslpc_add_device(info);
 
@@ -596,15 +593,13 @@ static int mgslpc_attach(struct pcmcia_device *p_dev)
 #define CS_CHECK(fn, ret) \
 do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
 
-static void mgslpc_config(dev_link_t *link)
+static int mgslpc_config(struct pcmcia_device *link)
 {
-    client_handle_t handle = link->handle;
     MGSLPC_INFO *info = link->priv;
     tuple_t tuple;
     cisparse_t parse;
     int last_fn, last_ret;
     u_char buf[64];
-    config_info_t conf;
     cistpl_cftable_entry_t dflt = { 0 };
     cistpl_cftable_entry_t *cfg;
     
@@ -617,27 +612,20 @@ static void mgslpc_config(dev_link_t *link)
     tuple.TupleData = buf;
     tuple.TupleDataMax = sizeof(buf);
     tuple.TupleOffset = 0;
-    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
-    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
-    CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
+    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
+    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
+    CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
     link->conf.ConfigBase = parse.config.base;
     link->conf.Present = parse.config.rmask[0];
-    
-    /* Configure card */
-    link->state |= DEV_CONFIG;
-
-    /* Look up the current Vcc */
-    CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &conf));
-    link->conf.Vcc = conf.Vcc;
 
     /* get CIS configuration entry */
 
     tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
+    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
 
     cfg = &(parse.cftable_entry);
-    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
-    CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
+    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
+    CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
 
     if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
     if (cfg->index == 0)
@@ -658,11 +646,10 @@ static void mgslpc_config(dev_link_t *link)
            link->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
            link->io.BasePort1 = io->win[0].base;
            link->io.NumPorts1 = io->win[0].len;
-           CS_CHECK(RequestIO, pcmcia_request_io(link->handle, &link->io));
+           CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
     }
 
     link->conf.Attributes = CONF_ENABLE_IRQ;
-    link->conf.Vcc = 50;
     link->conf.IntType = INT_MEMORY_AND_IO;
     link->conf.ConfigIndex = 8;
     link->conf.Present = PRESENT_OPTION;
@@ -670,9 +657,9 @@ static void mgslpc_config(dev_link_t *link)
     link->irq.Attributes |= IRQ_HANDLE_PRESENT;
     link->irq.Handler     = mgslpc_isr;
     link->irq.Instance    = info;
-    CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq));
+    CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
 
-    CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf));
+    CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
 
     info->io_base = link->io.BasePort1;
     info->irq_level = link->irq.AssignedIRQ;
@@ -680,7 +667,7 @@ static void mgslpc_config(dev_link_t *link)
     /* add to linked list of devices */
     sprintf(info->node.dev_name, "mgslpc0");
     info->node.major = info->node.minor = 0;
-    link->dev = &info->node;
+    link->dev_node = &info->node;
 
     printk(KERN_INFO "%s: index 0x%02x:",
           info->node.dev_name, link->conf.ConfigIndex);
@@ -690,13 +677,12 @@ static void mgslpc_config(dev_link_t *link)
            printk(", io 0x%04x-0x%04x", link->io.BasePort1,
                   link->io.BasePort1+link->io.NumPorts1-1);
     printk("\n");
-    
-    link->state &= ~DEV_CONFIG_PENDING;
-    return;
+    return 0;
 
 cs_failed:
-    cs_error(link->handle, last_fn, last_ret);
+    cs_error(link, last_fn, last_ret);
     mgslpc_release((u_long)link);
+    return -ENODEV;
 }
 
 /* Card has been removed.
@@ -705,58 +691,38 @@ cs_failed:
  */
 static void mgslpc_release(u_long arg)
 {
-    dev_link_t *link = (dev_link_t *)arg;
+       struct pcmcia_device *link = (struct pcmcia_device *)arg;
 
-    if (debug_level >= DEBUG_LEVEL_INFO)
-           printk("mgslpc_release(0x%p)\n", link);
-
-    /* Unlink the device chain */
-    link->dev = NULL;
-    link->state &= ~DEV_CONFIG;
+       if (debug_level >= DEBUG_LEVEL_INFO)
+               printk("mgslpc_release(0x%p)\n", link);
 
-    pcmcia_release_configuration(link->handle);
-    if (link->io.NumPorts1)
-           pcmcia_release_io(link->handle, &link->io);
-    if (link->irq.AssignedIRQ)
-           pcmcia_release_irq(link->handle, &link->irq);
+       pcmcia_disable_device(link);
 }
 
-static void mgslpc_detach(struct pcmcia_device *p_dev)
+static void mgslpc_detach(struct pcmcia_device *link)
 {
-    dev_link_t *link = dev_to_instance(p_dev);
-
-    if (debug_level >= DEBUG_LEVEL_INFO)
-           printk("mgslpc_detach(0x%p)\n", link);
+       if (debug_level >= DEBUG_LEVEL_INFO)
+               printk("mgslpc_detach(0x%p)\n", link);
 
-    if (link->state & DEV_CONFIG) {
-           ((MGSLPC_INFO *)link->priv)->stop = 1;
-           mgslpc_release((u_long)link);
-    }
+       ((MGSLPC_INFO *)link->priv)->stop =&nbs