Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 8 Aug 2008 18:15:23 +0000 (11:15 -0700)]
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (99 commits)
  pkt_sched: Fix actions referencing
  bnx2x: fix logical op
  tcp: (whitespace only) fix confusing indentation
  pkt_sched: Fix qdisc config when link is down.
  [Bluetooth] Add full quirk implementation for btusb driver
  [Bluetooth] Removal of unnecessary ignore module parameter
  [Bluetooth] Add parameters to control BNEP header compression
  ath9k: Revamp wireless mode usage
  ath9k: More unused macros
  ath9k: Remove a few unused macros and fix indentation
  ath9k: Use mac80211's band macros and remove enum hal_freq_band
  ath9k: Remove redundant data structure ath9k_txq_info
  ath9k: Cleanup data structures related to HW capabilities
  ath9k: work around gcc ICEs
  ath9k: Add new Atheros IEEE 802.11n driver
  ath5k: remove Atheros 11n devices from supported list
  list.h: add list_cut_position()
  list.h: Add list_splice_tail() and list_splice_tail_init()
  p54: swap short slot time dcf values
  rt2x00: Block all unsupported modes
  ...

317 files changed:
Documentation/DocBook/videobook.tmpl
Documentation/cciss.txt
Documentation/hwmon/dme1737
Documentation/hwmon/it87
Documentation/hwmon/w83627hf
Documentation/hwmon/w83791d
Documentation/video4linux/gspca.txt
Makefile
arch/ia64/Kconfig
arch/ia64/configs/generic_defconfig
arch/ia64/kernel/.gitignore
arch/ia64/kernel/ivt.S
arch/m68knommu/include/asm/Kbuild [moved from include/asm-m68knommu/Kbuild with 100% similarity]
arch/m68knommu/include/asm/MC68328.h [moved from include/asm-m68knommu/MC68328.h with 100% similarity]
arch/m68knommu/include/asm/MC68332.h [moved from include/asm-m68knommu/MC68332.h with 100% similarity]
arch/m68knommu/include/asm/MC68EZ328.h [moved from include/asm-m68knommu/MC68EZ328.h with 100% similarity]
arch/m68knommu/include/asm/MC68VZ328.h [moved from include/asm-m68knommu/MC68VZ328.h with 100% similarity]
arch/m68knommu/include/asm/a.out.h [moved from include/asm-m68knommu/a.out.h with 100% similarity]
arch/m68knommu/include/asm/anchor.h [moved from include/asm-m68knommu/anchor.h with 100% similarity]
arch/m68knommu/include/asm/atomic.h [moved from include/asm-m68knommu/atomic.h with 100% similarity]
arch/m68knommu/include/asm/auxvec.h [moved from include/asm-m68knommu/auxvec.h with 100% similarity]
arch/m68knommu/include/asm/bitops.h [moved from include/asm-m68knommu/bitops.h with 100% similarity]
arch/m68knommu/include/asm/bootinfo.h [moved from include/asm-m68knommu/bootinfo.h with 100% similarity]
arch/m68knommu/include/asm/bootstd.h [moved from include/asm-m68knommu/bootstd.h with 100% similarity]
arch/m68knommu/include/asm/bug.h [moved from include/asm-m68knommu/bug.h with 100% similarity]
arch/m68knommu/include/asm/bugs.h [moved from include/asm-m68knommu/bugs.h with 100% similarity]
arch/m68knommu/include/asm/byteorder.h [moved from include/asm-m68knommu/byteorder.h with 100% similarity]
arch/m68knommu/include/asm/cache.h [moved from include/asm-m68knommu/cache.h with 100% similarity]
arch/m68knommu/include/asm/cachectl.h [moved from include/asm-m68knommu/cachectl.h with 100% similarity]
arch/m68knommu/include/asm/cacheflush.h [moved from include/asm-m68knommu/cacheflush.h with 100% similarity]
arch/m68knommu/include/asm/checksum.h [moved from include/asm-m68knommu/checksum.h with 100% similarity]
arch/m68knommu/include/asm/coldfire.h [moved from include/asm-m68knommu/coldfire.h with 100% similarity]
arch/m68knommu/include/asm/commproc.h [moved from include/asm-m68knommu/commproc.h with 100% similarity]
arch/m68knommu/include/asm/cputime.h [moved from include/asm-m68knommu/cputime.h with 100% similarity]
arch/m68knommu/include/asm/current.h [moved from include/asm-m68knommu/current.h with 100% similarity]
arch/m68knommu/include/asm/dbg.h [moved from include/asm-m68knommu/dbg.h with 100% similarity]
arch/m68knommu/include/asm/delay.h [moved from include/asm-m68knommu/delay.h with 100% similarity]
arch/m68knommu/include/asm/device.h [moved from include/asm-m68knommu/device.h with 100% similarity]
arch/m68knommu/include/asm/div64.h [moved from include/asm-m68knommu/div64.h with 100% similarity]
arch/m68knommu/include/asm/dma-mapping.h [moved from include/asm-m68knommu/dma-mapping.h with 100% similarity]
arch/m68knommu/include/asm/dma.h [moved from include/asm-m68knommu/dma.h with 100% similarity]
arch/m68knommu/include/asm/elf.h [moved from include/asm-m68knommu/elf.h with 100% similarity]
arch/m68knommu/include/asm/elia.h [moved from include/asm-m68knommu/elia.h with 100% similarity]
arch/m68knommu/include/asm/emergency-restart.h [moved from include/asm-m68knommu/emergency-restart.h with 100% similarity]
arch/m68knommu/include/asm/entry.h [moved from include/asm-m68knommu/entry.h with 100% similarity]
arch/m68knommu/include/asm/errno.h [moved from include/asm-m68knommu/errno.h with 100% similarity]
arch/m68knommu/include/asm/fb.h [moved from include/asm-m68knommu/fb.h with 100% similarity]
arch/m68knommu/include/asm/fcntl.h [moved from include/asm-m68knommu/fcntl.h with 100% similarity]
arch/m68knommu/include/asm/flat.h [moved from include/asm-m68knommu/flat.h with 100% similarity]
arch/m68knommu/include/asm/fpu.h [moved from include/asm-m68knommu/fpu.h with 100% similarity]
arch/m68knommu/include/asm/futex.h [moved from include/asm-m68knommu/futex.h with 100% similarity]
arch/m68knommu/include/asm/hardirq.h [moved from include/asm-m68knommu/hardirq.h with 100% similarity]
arch/m68knommu/include/asm/hw_irq.h [moved from include/asm-m68knommu/hw_irq.h with 100% similarity]
arch/m68knommu/include/asm/hwtest.h [moved from include/asm-m68knommu/hwtest.h with 100% similarity]
arch/m68knommu/include/asm/io.h [moved from include/asm-m68knommu/io.h with 100% similarity]
arch/m68knommu/include/asm/ioctl.h [moved from include/asm-m68knommu/ioctl.h with 100% similarity]
arch/m68knommu/include/asm/ioctls.h [moved from include/asm-m68knommu/ioctls.h with 100% similarity]
arch/m68knommu/include/asm/ipcbuf.h [moved from include/asm-m68knommu/ipcbuf.h with 100% similarity]
arch/m68knommu/include/asm/irq.h [moved from include/asm-m68knommu/irq.h with 100% similarity]
arch/m68knommu/include/asm/irq_regs.h [moved from include/asm-m68knommu/irq_regs.h with 100% similarity]
arch/m68knommu/include/asm/kdebug.h [moved from include/asm-m68knommu/kdebug.h with 100% similarity]
arch/m68knommu/include/asm/kmap_types.h [moved from include/asm-m68knommu/kmap_types.h with 100% similarity]
arch/m68knommu/include/asm/linkage.h [moved from include/asm-m68knommu/linkage.h with 100% similarity]
arch/m68knommu/include/asm/local.h [moved from include/asm-m68knommu/local.h with 100% similarity]
arch/m68knommu/include/asm/m5206sim.h [moved from include/asm-m68knommu/m5206sim.h with 100% similarity]
arch/m68knommu/include/asm/m520xsim.h [moved from include/asm-m68knommu/m520xsim.h with 100% similarity]
arch/m68knommu/include/asm/m523xsim.h [moved from include/asm-m68knommu/m523xsim.h with 100% similarity]
arch/m68knommu/include/asm/m5249sim.h [moved from include/asm-m68knommu/m5249sim.h with 100% similarity]
arch/m68knommu/include/asm/m5272sim.h [moved from include/asm-m68knommu/m5272sim.h with 100% similarity]
arch/m68knommu/include/asm/m527xsim.h [moved from include/asm-m68knommu/m527xsim.h with 100% similarity]
arch/m68knommu/include/asm/m528xsim.h [moved from include/asm-m68knommu/m528xsim.h with 100% similarity]
arch/m68knommu/include/asm/m5307sim.h [moved from include/asm-m68knommu/m5307sim.h with 100% similarity]
arch/m68knommu/include/asm/m532xsim.h [moved from include/asm-m68knommu/m532xsim.h with 100% similarity]
arch/m68knommu/include/asm/m5407sim.h [moved from include/asm-m68knommu/m5407sim.h with 100% similarity]
arch/m68knommu/include/asm/m68360.h [moved from include/asm-m68knommu/m68360.h with 100% similarity]
arch/m68knommu/include/asm/m68360_enet.h [moved from include/asm-m68knommu/m68360_enet.h with 100% similarity]
arch/m68knommu/include/asm/m68360_pram.h [moved from include/asm-m68knommu/m68360_pram.h with 100% similarity]
arch/m68knommu/include/asm/m68360_quicc.h [moved from include/asm-m68knommu/m68360_quicc.h with 100% similarity]
arch/m68knommu/include/asm/m68360_regs.h [moved from include/asm-m68knommu/m68360_regs.h with 100% similarity]
arch/m68knommu/include/asm/machdep.h [moved from include/asm-m68knommu/machdep.h with 100% similarity]
arch/m68knommu/include/asm/math-emu.h [moved from include/asm-m68knommu/math-emu.h with 100% similarity]
arch/m68knommu/include/asm/mc146818rtc.h [moved from include/asm-m68knommu/mc146818rtc.h with 100% similarity]
arch/m68knommu/include/asm/mcfcache.h [moved from include/asm-m68knommu/mcfcache.h with 100% similarity]
arch/m68knommu/include/asm/mcfdma.h [moved from include/asm-m68knommu/mcfdma.h with 100% similarity]
arch/m68knommu/include/asm/mcfmbus.h [moved from include/asm-m68knommu/mcfmbus.h with 100% similarity]
arch/m68knommu/include/asm/mcfne.h [moved from include/asm-m68knommu/mcfne.h with 100% similarity]
arch/m68knommu/include/asm/mcfpci.h [moved from include/asm-m68knommu/mcfpci.h with 100% similarity]
arch/m68knommu/include/asm/mcfpit.h [moved from include/asm-m68knommu/mcfpit.h with 100% similarity]
arch/m68knommu/include/asm/mcfsim.h [moved from include/asm-m68knommu/mcfsim.h with 100% similarity]
arch/m68knommu/include/asm/mcfsmc.h [moved from include/asm-m68knommu/mcfsmc.h with 100% similarity]
arch/m68knommu/include/asm/mcftimer.h [moved from include/asm-m68knommu/mcftimer.h with 100% similarity]
arch/m68knommu/include/asm/mcfuart.h [moved from include/asm-m68knommu/mcfuart.h with 100% similarity]
arch/m68knommu/include/asm/mcfwdebug.h [moved from include/asm-m68knommu/mcfwdebug.h with 100% similarity]
arch/m68knommu/include/asm/md.h [moved from include/asm-m68knommu/md.h with 100% similarity]
arch/m68knommu/include/asm/mman.h [moved from include/asm-m68knommu/mman.h with 100% similarity]
arch/m68knommu/include/asm/mmu.h [moved from include/asm-m68knommu/mmu.h with 100% similarity]
arch/m68knommu/include/asm/mmu_context.h [moved from include/asm-m68knommu/mmu_context.h with 100% similarity]
arch/m68knommu/include/asm/module.h [moved from include/asm-m68knommu/module.h with 100% similarity]
arch/m68knommu/include/asm/movs.h [moved from include/asm-m68knommu/movs.h with 100% similarity]
arch/m68knommu/include/asm/msgbuf.h [moved from include/asm-m68knommu/msgbuf.h with 100% similarity]
arch/m68knommu/include/asm/mutex.h [moved from include/asm-m68knommu/mutex.h with 100% similarity]
arch/m68knommu/include/asm/nettel.h [moved from include/asm-m68knommu/nettel.h with 100% similarity]
arch/m68knommu/include/asm/openprom.h [moved from include/asm-m68knommu/openprom.h with 100% similarity]
arch/m68knommu/include/asm/oplib.h [moved from include/asm-m68knommu/oplib.h with 100% similarity]
arch/m68knommu/include/asm/page.h [moved from include/asm-m68knommu/page.h with 100% similarity]
arch/m68knommu/include/asm/page_offset.h [moved from include/asm-m68knommu/page_offset.h with 100% similarity]
arch/m68knommu/include/asm/param.h [moved from include/asm-m68knommu/param.h with 100% similarity]
arch/m68knommu/include/asm/pci.h [moved from include/asm-m68knommu/pci.h with 100% similarity]
arch/m68knommu/include/asm/percpu.h [moved from include/asm-m68knommu/percpu.h with 100% similarity]
arch/m68knommu/include/asm/pgalloc.h [moved from include/asm-m68knommu/pgalloc.h with 100% similarity]
arch/m68knommu/include/asm/pgtable.h [moved from include/asm-m68knommu/pgtable.h with 100% similarity]
arch/m68knommu/include/asm/poll.h [moved from include/asm-m68knommu/poll.h with 100% similarity]
arch/m68knommu/include/asm/posix_types.h [moved from include/asm-m68knommu/posix_types.h with 100% similarity]
arch/m68knommu/include/asm/processor.h [moved from include/asm-m68knommu/processor.h with 100% similarity]
arch/m68knommu/include/asm/ptrace.h [moved from include/asm-m68knommu/ptrace.h with 100% similarity]
arch/m68knommu/include/asm/quicc_simple.h [moved from include/asm-m68knommu/quicc_simple.h with 100% similarity]
arch/m68knommu/include/asm/resource.h [moved from include/asm-m68knommu/resource.h with 100% similarity]
arch/m68knommu/include/asm/rtc.h [moved from include/asm-m68knommu/rtc.h with 100% similarity]
arch/m68knommu/include/asm/scatterlist.h [moved from include/asm-m68knommu/scatterlist.h with 100% similarity]
arch/m68knommu/include/asm/sections.h [moved from include/asm-m68knommu/sections.h with 100% similarity]
arch/m68knommu/include/asm/segment.h [moved from include/asm-m68knommu/segment.h with 100% similarity]
arch/m68knommu/include/asm/sembuf.h [moved from include/asm-m68knommu/sembuf.h with 100% similarity]
arch/m68knommu/include/asm/setup.h [moved from include/asm-m68knommu/setup.h with 100% similarity]
arch/m68knommu/include/asm/shm.h [moved from include/asm-m68knommu/shm.h with 100% similarity]
arch/m68knommu/include/asm/shmbuf.h [moved from include/asm-m68knommu/shmbuf.h with 100% similarity]
arch/m68knommu/include/asm/shmparam.h [moved from include/asm-m68knommu/shmparam.h with 100% similarity]
arch/m68knommu/include/asm/sigcontext.h [moved from include/asm-m68knommu/sigcontext.h with 100% similarity]
arch/m68knommu/include/asm/siginfo.h [moved from include/asm-m68knommu/siginfo.h with 100% similarity]
arch/m68knommu/include/asm/signal.h [moved from include/asm-m68knommu/signal.h with 100% similarity]
arch/m68knommu/include/asm/smp.h [moved from include/asm-m68knommu/smp.h with 100% similarity]
arch/m68knommu/include/asm/socket.h [moved from include/asm-m68knommu/socket.h with 100% similarity]
arch/m68knommu/include/asm/sockios.h [moved from include/asm-m68knommu/sockios.h with 100% similarity]
arch/m68knommu/include/asm/spinlock.h [moved from include/asm-m68knommu/spinlock.h with 100% similarity]
arch/m68knommu/include/asm/stat.h [moved from include/asm-m68knommu/stat.h with 100% similarity]
arch/m68knommu/include/asm/statfs.h [moved from include/asm-m68knommu/statfs.h with 100% similarity]
arch/m68knommu/include/asm/string.h [moved from include/asm-m68knommu/string.h with 100% similarity]
arch/m68knommu/include/asm/system.h [moved from include/asm-m68knommu/system.h with 100% similarity]
arch/m68knommu/include/asm/termbits.h [moved from include/asm-m68knommu/termbits.h with 100% similarity]
arch/m68knommu/include/asm/termios.h [moved from include/asm-m68knommu/termios.h with 100% similarity]
arch/m68knommu/include/asm/thread_info.h [moved from include/asm-m68knommu/thread_info.h with 100% similarity]
arch/m68knommu/include/asm/timex.h [moved from include/asm-m68knommu/timex.h with 100% similarity]
arch/m68knommu/include/asm/tlb.h [moved from include/asm-m68knommu/tlb.h with 100% similarity]
arch/m68knommu/include/asm/tlbflush.h [moved from include/asm-m68knommu/tlbflush.h with 100% similarity]
arch/m68knommu/include/asm/topology.h [moved from include/asm-m68knommu/topology.h with 100% similarity]
arch/m68knommu/include/asm/traps.h [moved from include/asm-m68knommu/traps.h with 100% similarity]
arch/m68knommu/include/asm/types.h [moved from include/asm-m68knommu/types.h with 100% similarity]
arch/m68knommu/include/asm/uaccess.h [moved from include/asm-m68knommu/uaccess.h with 100% similarity]
arch/m68knommu/include/asm/ucontext.h [moved from include/asm-m68knommu/ucontext.h with 100% similarity]
arch/m68knommu/include/asm/unaligned.h [moved from include/asm-m68knommu/unaligned.h with 100% similarity]
arch/m68knommu/include/asm/unistd.h [moved from include/asm-m68knommu/unistd.h with 100% similarity]
arch/m68knommu/include/asm/user.h [moved from include/asm-m68knommu/user.h with 100% similarity]
arch/powerpc/.gitignore [deleted file]
arch/powerpc/platforms/iseries/Kconfig
arch/sparc/include/asm/ebus_32.h
arch/sparc/include/asm/ebus_64.h
arch/sparc/include/asm/of_platform.h
arch/sparc/include/asm/parport.h
arch/sparc/include/asm/sbus_32.h
arch/sparc/include/asm/sbus_64.h
arch/sparc/kernel/ioport.c
arch/sparc/kernel/time.c
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/ebus.c
arch/sparc64/kernel/pci_common.c
arch/sparc64/kernel/pci_psycho.c
arch/sparc64/kernel/pci_sabre.c
arch/sparc64/kernel/pci_schizo.c
arch/sparc64/kernel/power.c
arch/sparc64/kernel/prom.c
arch/sparc64/kernel/stacktrace.c
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/kernel/time.c
crypto/async_tx/async_xor.c
drivers/block/cciss.c
drivers/block/cciss.h
drivers/block/cciss_scsi.c
drivers/block/xen-blkfront.c
drivers/char/Kconfig
drivers/char/Makefile
drivers/char/amiserial.c
drivers/char/viocons.c [deleted file]
drivers/firewire/fw-cdev.c
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/ad7414.c [new file with mode: 0644]
drivers/hwmon/dme1737.c
drivers/hwmon/f71882fg.c
drivers/hwmon/hwmon-vid.c
drivers/hwmon/it87.c
drivers/hwmon/thmc50.c
drivers/hwmon/w83627hf.c
drivers/hwmon/w83791d.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/mad_rmpp.c
drivers/infiniband/core/ucma.c
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/cxgb3/iwch_provider.c
drivers/infiniband/hw/cxgb3/iwch_provider.h
drivers/infiniband/hw/cxgb3/iwch_qp.c
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/infiniband/hw/ipath/ipath_iba7220.c
drivers/infiniband/hw/ipath/ipath_intr.c
drivers/infiniband/hw/ipath/ipath_verbs.c
drivers/infiniband/hw/mlx4/cq.c
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/input/serio/i8042-sparcio.h
drivers/media/dvb/dvb-usb/cxusb.c
drivers/media/dvb/frontends/Kconfig
drivers/media/video/Kconfig
drivers/media/video/arv.c
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/etoms.c
drivers/media/video/gspca/gspca.c
drivers/media/video/gspca/gspca.h
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/sonixb.c
drivers/media/video/gspca/sonixj.c
drivers/media/video/gspca/spca505.c
drivers/media/video/gspca/spca506.c
drivers/media/video/gspca/spca508.c
drivers/media/video/gspca/spca561.c
drivers/media/video/gspca/vc032x.c
drivers/media/video/gspca/zc3xx.c
drivers/media/video/pxa_camera.c
drivers/media/video/sh_mobile_ceu_camera.c
drivers/media/video/soc_camera.c
drivers/media/video/soc_camera_platform.c
drivers/media/video/uvc/uvc_ctrl.c
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/uvc/uvc_video.c
drivers/media/video/v4l2-dev.c
drivers/media/video/vino.c
drivers/misc/Kconfig
drivers/watchdog/Kconfig
drivers/watchdog/Makefile
drivers/watchdog/acquirewdt.c
drivers/watchdog/advantechwdt.c
drivers/watchdog/alim1535_wdt.c
drivers/watchdog/alim7101_wdt.c
drivers/watchdog/ar7_wdt.c
drivers/watchdog/at32ap700x_wdt.c
drivers/watchdog/at91rm9200_wdt.c
drivers/watchdog/bfin_wdt.c
drivers/watchdog/booke_wdt.c
drivers/watchdog/cpu5wdt.c
drivers/watchdog/davinci_wdt.c
drivers/watchdog/ep93xx_wdt.c
drivers/watchdog/eurotechwdt.c
drivers/watchdog/geodewdt.c
drivers/watchdog/hpwdt.c
drivers/watchdog/i6300esb.c
drivers/watchdog/iTCO_vendor.h [new file with mode: 0644]
drivers/watchdog/iTCO_vendor_support.c
drivers/watchdog/iTCO_wdt.c
drivers/watchdog/ib700wdt.c
drivers/watchdog/ibmasr.c
drivers/watchdog/indydog.c
drivers/watchdog/iop_wdt.c
drivers/watchdog/it8712f_wdt.c
drivers/watchdog/ixp2000_wdt.c
drivers/watchdog/ixp4xx_wdt.c
drivers/watchdog/ks8695_wdt.c
drivers/watchdog/machzwd.c
drivers/watchdog/mixcomwd.c
drivers/watchdog/mpc5200_wdt.c
drivers/watchdog/mpc83xx_wdt.c [deleted file]
drivers/watchdog/mpc8xx_wdt.c
drivers/watchdog/mpc8xxx_wdt.c [new file with mode: 0644]
drivers/watchdog/mpcore_wdt.c
drivers/watchdog/mtx-1_wdt.c
drivers/watchdog/mv64x60_wdt.c
drivers/watchdog/omap_wdt.c
drivers/watchdog/pc87413_wdt.c
drivers/watchdog/pcwd.c
drivers/watchdog/pcwd_pci.c
drivers/watchdog/pcwd_usb.c
drivers/watchdog/pnx4008_wdt.c
drivers/watchdog/rm9k_wdt.c
drivers/watchdog/s3c2410_wdt.c
drivers/watchdog/sa1100_wdt.c
drivers/watchdog/sb_wdog.c
drivers/watchdog/sbc60xxwdt.c
drivers/watchdog/sbc7240_wdt.c
drivers/watchdog/sbc8360.c
drivers/watchdog/sbc_epx_c3.c
drivers/watchdog/sc1200wdt.c
drivers/watchdog/sc520_wdt.c
drivers/watchdog/scx200_wdt.c
drivers/watchdog/shwdt.c
drivers/watchdog/smsc37b787_wdt.c
drivers/watchdog/softdog.c
drivers/watchdog/txx9wdt.c
drivers/watchdog/w83627hf_wdt.c
drivers/watchdog/w83697hf_wdt.c
drivers/watchdog/w83877f_wdt.c
drivers/watchdog/w83977f_wdt.c
drivers/watchdog/wafer5823wdt.c
drivers/watchdog/wd501p.h
drivers/watchdog/wdrtas.c
drivers/watchdog/wdt.c
drivers/watchdog/wdt285.c
drivers/watchdog/wdt977.c
drivers/watchdog/wdt_pci.c
fs/bio.c
include/linux/mlx4/cq.h
include/linux/ptrace.h
include/linux/tracehook.h
include/media/soc_camera.h
include/rdma/rdma_cm.h
init/Kconfig
mm/hugetlb.c
scripts/patch-kernel
sound/soc/fsl/fsl_dma.c

index 8981779..0bc2594 100644 (file)
@@ -1648,7 +1648,7 @@ static struct video_buffer capture_fb;
 
   <chapter id="pubfunctions">
      <title>Public Functions Provided</title>
-!Edrivers/media/video/videodev.c
+!Edrivers/media/video/v4l2-dev.c
   </chapter>
 
 </book>
index 63e59b8..8244c64 100644 (file)
@@ -112,27 +112,18 @@ Hot plug support for SCSI tape drives
 
 Hot plugging of SCSI tape drives is supported, with some caveats.
 The cciss driver must be informed that changes to the SCSI bus
-have been made, in addition to and prior to informing the SCSI 
-mid layer.  This may be done via the /proc filesystem.  For example:
+have been made.  This may be done via the /proc filesystem.
+For example:
 
        echo "rescan" > /proc/scsi/cciss0/1
 
-This causes the adapter to query the adapter about changes to the 
-physical SCSI buses and/or fibre channel arbitrated loop and the 
+This causes the driver to query the adapter about changes to the
+physical SCSI buses and/or fibre channel arbitrated loop and the
 driver to make note of any new or removed sequential access devices
 or medium changers.  The driver will output messages indicating what 
 devices have been added or removed and the controller, bus, target and 
-lun used to address the device.  Once this is done, the SCSI mid layer 
-can be informed of changes to the virtual SCSI bus which the driver 
-presents to it in the usual way. For example: 
-
-       echo scsi add-single-device 3 2 1 0 > /proc/scsi/scsi
-to add a device on controller 3, bus 2, target 1, lun 0.   Note that
-the driver makes an effort to preserve the devices positions
-in the virtual SCSI bus, so if you are only moving tape drives 
-around on the same adapter and not adding or removing tape drives 
-from the adapter, informing the SCSI mid layer may not be necessary.
+lun used to address the device.  It then notifies the SCSI mid layer
+of these changes.
 
 Note that the naming convention of the /proc filesystem entries 
 contains a number in addition to the driver name.  (E.g. "cciss0" 
index b1fe009..001d2e7 100644 (file)
@@ -10,6 +10,10 @@ Supported chips:
     Prefix: 'sch311x'
     Addresses scanned: none, address read from Super-I/O config space
     Datasheet: http://www.nuhorizons.com/FeaturedProducts/Volume1/SMSC/311x.pdf
+  * SMSC SCH5027
+    Prefix: 'sch5027'
+    Addresses scanned: I2C 0x2c, 0x2d, 0x2e
+    Datasheet: Provided by SMSC upon request and under NDA
 
 Authors:
     Juerg Haefliger <juergh@gmail.com>
@@ -27,33 +31,31 @@ Module Parameters
                        following boards:
                        - VIA EPIA SN18000
 
-Note that there is no need to use this parameter if the driver loads without
-complaining. The driver will say so if it is necessary.
-
 
 Description
 -----------
 
 This driver implements support for the hardware monitoring capabilities of the
-SMSC DME1737 and Asus A8000 (which are the same) and SMSC SCH311x Super-I/O
-chips. These chips feature monitoring of 3 temp sensors temp[1-3] (2 remote
-diodes and 1 internal), 7 voltages in[0-6] (6 external and 1 internal) and up
-to 6 fan speeds fan[1-6]. Additionally, the chips implement up to 5 PWM
-outputs pwm[1-3,5-6] for controlling fan speeds both manually and
+SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, and SMSC
+SCH311x Super-I/O chips. These chips feature monitoring of 3 temp sensors
+temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and
+1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement
+up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and
 automatically.
 
-For the DME1737 and A8000, fan[1-2] and pwm[1-2] are always present. Fan[3-6]
-and pwm[3,5-6] are optional features and their availability depends on the
-configuration of the chip. The driver will detect which features are present
-during initialization and create the sysfs attributes accordingly.
+For the DME1737, A8000 and SCH5027, fan[1-2] and pwm[1-2] are always present.
+Fan[3-6] and pwm[3,5-6] are optional features and their availability depends on
+the configuration of the chip. The driver will detect which features are
+present during initialization and create the sysfs attributes accordingly.
 
 For the SCH311x, fan[1-3] and pwm[1-3] are always present and fan[4-6] and
 pwm[5-6] don't exist.
 
-The hardware monitoring features of the DME1737 and A8000 are only accessible
-via SMBus, while the SCH311x only provides access via the ISA bus. The driver
-will therefore register itself as an I2C client driver if it detects a DME1737
-or A8000 and as a platform driver if it detects a SCH311x chip.
+The hardware monitoring features of the DME1737, A8000, and SCH5027 are only
+accessible via SMBus, while the SCH311x only provides access via the ISA bus.
+The driver will therefore register itself as an I2C client driver if it detects
+a DME1737, A8000, or SCH5027 and as a platform driver if it detects a SCH311x
+chip.
 
 
 Voltage Monitoring
@@ -64,6 +66,7 @@ scaling resistors. The values returned by the driver therefore reflect true
 millivolts and don't need scaling. The voltage inputs are mapped as follows
 (the last column indicates the input ranges):
 
+DME1737, A8000:
        in0: +5VTR      (+5V standby)           0V - 6.64V
        in1: Vccp       (processor core)        0V - 3V
        in2: VCC        (internal +3.3V)        0V - 4.38V
@@ -72,6 +75,24 @@ millivolts and don't need scaling. The voltage inputs are mapped as follows
        in5: VTR        (+3.3V standby)         0V - 4.38V
        in6: Vbat       (+3.0V)                 0V - 4.38V
 
+SCH311x:
+       in0: +2.5V                              0V - 6.64V
+       in1: Vccp       (processor core)        0V - 2V
+       in2: VCC        (internal +3.3V)        0V - 4.38V
+       in3: +5V                                0V - 6.64V
+       in4: +12V                               0V - 16V
+       in5: VTR        (+3.3V standby)         0V - 4.38V
+       in6: Vbat       (+3.0V)                 0V - 4.38V
+
+SCH5027:
+       in0: +5VTR      (+5V standby)           0V - 6.64V
+       in1: Vccp       (processor core)        0V - 3V
+       in2: VCC        (internal +3.3V)        0V - 4.38V
+       in3: V2_IN                              0V - 1.5V
+       in4: V1_IN                              0V - 1.5V
+       in5: VTR        (+3.3V standby)         0V - 4.38V
+       in6: Vbat       (+3.0V)                 0V - 4.38V
+
 Each voltage input has associated min and max limits which trigger an alarm
 when crossed.
 
index f4ce1fd..3496b70 100644 (file)
@@ -6,12 +6,14 @@ Supported chips:
     Prefix: 'it87'
     Addresses scanned: from Super I/O config space (8 I/O ports)
     Datasheet: Publicly available at the ITE website
-               http://www.ite.com.tw/
+               http://www.ite.com.tw/product_info/file/pc/IT8705F_V.0.4.1.pdf
   * IT8712F
     Prefix: 'it8712'
     Addresses scanned: from Super I/O config space (8 I/O ports)
     Datasheet: Publicly available at the ITE website
-               http://www.ite.com.tw/
+               http://www.ite.com.tw/product_info/file/pc/IT8712F_V0.9.1.pdf
+               http://www.ite.com.tw/product_info/file/pc/Errata%20V0.1%20for%20IT8712F%20V0.9.1.pdf
+               http://www.ite.com.tw/product_info/file/pc/IT8712F_V0.9.3.pdf
   * IT8716F/IT8726F
     Prefix: 'it8716'
     Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -90,14 +92,13 @@ upper VID bits share their pins with voltage inputs (in5 and in6) so you
 can't have both on a given board.
 
 The IT8716F, IT8718F and later IT8712F revisions have support for
-2 additional fans. They are supported by the driver for the IT8716F and
-IT8718F but not for the IT8712F
+2 additional fans. The additional fans are supported by the driver.
 
 The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional
 16-bit tachometer counters for fans 1 to 3. This is better (no more fan
 clock divider mess) but not compatible with the older chips and
-revisions. For now, the driver only uses the 16-bit mode on the
-IT8716F and IT8718F.
+revisions. The 16-bit tachometer mode is enabled by the driver when one
+of the above chips is detected.
 
 The IT8726F is just bit enhanced IT8716F with additional hardware
 for AMD power sequencing. Therefore the chip will appear as IT8716F
index 880a59f..6ee36db 100644 (file)
@@ -40,10 +40,6 @@ Module Parameters
   (default is 1)
   Use 'init=0' to bypass initializing the chip.
   Try this if your computer crashes when you load the module.
-* reset: int
-  (default is 0)
-  The driver used to reset the chip on load, but does no more. Use
-  'reset=1' to restore the old behavior. Report if you need to do this.
 
 Description
 -----------
index f153b2f..a67d3b7 100644 (file)
@@ -22,6 +22,7 @@ Credits:
 
 Additional contributors:
     Sven Anders <anders@anduras.de>
+    Marc Hulsman <m.hulsman@tudelft.nl>
 
 Module Parameters
 -----------------
@@ -67,9 +68,8 @@ on until the temperature falls below the Hysteresis value.
 
 Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
 triggered if the rotation speed has dropped below a programmable limit. Fan
-readings can be divided by a programmable divider (1, 2, 4, 8 for fan 1/2/3
-and 1, 2, 4, 8, 16, 32, 64 or 128 for fan 4/5) to give the readings more
-range or accuracy.
+readings can be divided by a programmable divider (1, 2, 4, 8, 16,
+32, 64 or 128 for all fans) to give the readings more range or accuracy.
 
 Voltage sensors (also known as IN sensors) report their values in millivolts.
 An alarm is triggered if the voltage has crossed a programmable minimum
index bcaf4ab..78a863a 100644 (file)
@@ -226,6 +226,7 @@ sonixj              0c45:6130       Sonix Pccam
 sonixj         0c45:6138       Sn9c120 Mo4000
 sonixj         0c45:613b       Surfer SN-206
 sonixj         0c45:613c       Sonix Pccam168
+sonixj         0c45:6143       Sonix Pccam168
 sunplus                0d64:0303       Sunplus FashionCam DXG
 etoms          102c:6151       Qcam Sangha CIF
 etoms          102c:6251       Qcam xxxxxx VGA
index ea413fa..f3e2065 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -929,10 +929,10 @@ ifneq ($(KBUILD_SRC),)
                echo "  in the '$(srctree)' directory.";\
                /bin/false; \
        fi;
-       $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
-       $(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/errno.h ]; then  \
+       $(Q)if [ ! -d include2 ]; then                                  \
+           mkdir -p include2;                                          \
            ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm;     \
-           fi
+       fi
 endif
 
 # prepare2 creates a makefile if using a separate output directory
@@ -1492,7 +1492,7 @@ quiet_cmd_cscope-file = FILELST cscope.files
       cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files
 
 quiet_cmd_cscope = MAKE    cscope.out
-      cmd_cscope = cscope -b
+      cmd_cscope = cscope -b -f cscope.out
 
 cscope: FORCE
        $(call cmd,cscope-file)
index 451f2ff..48e496f 100644 (file)
@@ -171,8 +171,8 @@ config IA64_SGI_SN2
          to select this option.  If in doubt, select ia64 generic support
          instead.
 
-config IA64_SGI_UV`
-       bool "SGI-UV`"
+config IA64_SGI_UV
+       bool "SGI-UV"
        select NUMA
        select ACPI_NUMA
        select SWIOTLB
@@ -321,10 +321,10 @@ config SMP
          If you don't know what to do here, say N.
 
 config NR_CPUS
-       int "Maximum number of CPUs (2-1024)"
-       range 2 1024
+       int "Maximum number of CPUs (2-4096)"
+       range 2 4096
        depends on SMP
-       default "1024"
+       default "4096"
        help
          You should set this to the number of CPUs in your system, but
          keep in mind that a kernel compiled for, e.g., 2 CPUs will boot but
index 0210545..9f48397 100644 (file)
@@ -1,20 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22
-# Thu Jul 19 13:55:32 2007
+# Linux kernel version: 2.6.27-rc1
+# Mon Aug  4 15:38:01 2008
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
@@ -23,20 +19,34 @@ CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=20
-# CONFIG_CPUSETS is not set
+CONFIG_CGROUPS=y
+# CONFIG_CGROUP_DEBUG is not set
+# CONFIG_CGROUP_NS is not set
+# CONFIG_CGROUP_DEVICE is not set
+CONFIG_CPUSETS=y
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUP_CPUACCT is not set
+# CONFIG_RESOURCE_COUNTERS is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_PROC_PID_CPUSET=y
 # CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -44,6 +54,7 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
@@ -53,12 +64,30 @@ CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_USE_GENERIC_SMP_HELPERS=y
+# CONFIG_HAVE_CLK is not set
+CONFIG_PROC_PAGE_MONITOR=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
@@ -68,6 +97,8 @@ CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLOCK_COMPAT=y
 
 #
 # IO Schedulers
@@ -81,6 +112,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
 
 #
 # Processor type and features
@@ -91,22 +123,28 @@ CONFIG_ZONE_DMA=y
 CONFIG_QUICKLIST=y
 CONFIG_MMU=y
 CONFIG_SWIOTLB=y
+CONFIG_IOMMU_HELPER=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_HAVE_SETUP_PER_CPU_AREA=y
 CONFIG_DMI=y
 CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_IA64_UNCACHED_ALLOCATOR=y
 CONFIG_AUDIT_ARCH=y
 CONFIG_IA64_GENERIC=y
 # CONFIG_IA64_DIG is not set
 # CONFIG_IA64_HP_ZX1 is not set
 # CONFIG_IA64_HP_ZX1_SWIOTLB is not set
 # CONFIG_IA64_SGI_SN2 is not set
+# CONFIG_IA64_SGI_UV is not set
 # CONFIG_IA64_HP_SIM is not set
 # CONFIG_ITANIUM is not set
 CONFIG_MCKINLEY=y
@@ -116,22 +154,26 @@ CONFIG_MCKINLEY=y
 CONFIG_IA64_PAGE_SIZE_64KB=y
 CONFIG_PGTABLE_3=y
 # CONFIG_PGTABLE_4 is not set
+CONFIG_HZ=250
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
+# CONFIG_SCHED_HRTICK is not set
 CONFIG_IA64_L1_CACHE_SHIFT=7
 CONFIG_IA64_CYCLONE=y
 CONFIG_IOSAPIC=y
-# CONFIG_IA64_SGI_SN_XP is not set
 CONFIG_FORCE_MAX_ZONEORDER=17
+# CONFIG_VIRT_CPU_ACCOUNTING is not set
 CONFIG_SMP=y
-CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS=4096
 CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
 # CONFIG_SCHED_SMT is not set
 # CONFIG_PERMIT_BSP_REMOVE is not set
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_FLATMEM_MANUAL is not set
@@ -141,6 +183,8 @@ CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
 # CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
@@ -148,6 +192,7 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_NR_QUICK=1
 CONFIG_VIRT_TO_BUS=y
+CONFIG_MMU_NOTIFIER=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -162,12 +207,14 @@ CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
+CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 # CONFIG_IA64_MC_ERR_INJECT is not set
 CONFIG_SGI_SN=y
 # CONFIG_IA64_ESI is not set
+# CONFIG_IA64_HP_AML_NFW is not set
 
 #
 # SN Devices
@@ -179,6 +226,7 @@ CONFIG_CRASH_DUMP=y
 #
 # Firmware Drivers
 #
+# CONFIG_FIRMWARE_MEMMAP is not set
 CONFIG_EFI_VARS=y
 CONFIG_EFI_PCDP=y
 CONFIG_DMIID=y
@@ -189,24 +237,25 @@ CONFIG_BINFMT_MISC=m
 # Power management and ACPI
 #
 CONFIG_PM=y
-CONFIG_PM_LEGACY=y
 # CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
 CONFIG_ACPI=y
 CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_PROC_EVENT=y
 CONFIG_ACPI_BUTTON=m
 CONFIG_ACPI_FAN=m
-# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_DOCK=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=m
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=m
 CONFIG_ACPI_NUMA=y
+# CONFIG_ACPI_CUSTOM_DSDT is not set
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 CONFIG_ACPI_EC=y
+# CONFIG_ACPI_PCI_SLOT is not set
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_SYSTEM=y
 CONFIG_ACPI_CONTAINER=m
@@ -225,6 +274,7 @@ CONFIG_PCI_SYSCALL=y
 # CONFIG_PCIEPORTBUS is not set
 CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
 CONFIG_HOTPLUG_PCI=m
 # CONFIG_HOTPLUG_PCI_FAKE is not set
@@ -233,15 +283,7 @@ CONFIG_HOTPLUG_PCI_ACPI=m
 # CONFIG_HOTPLUG_PCI_CPCI is not set
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 # CONFIG_HOTPLUG_PCI_SGI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -254,6 +296,7 @@ CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -273,6 +316,7 @@ CONFIG_SYN_COOKIES=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_LRO=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -280,8 +324,6 @@ CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_IP_DCCP is not set
@@ -298,10 +340,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -309,6 +347,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
@@ -330,13 +369,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=m
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
-# CONFIG_CONNECTOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
 # CONFIG_MTD is not set
 # CONFIG_PARPORT is not set
 CONFIG_PNP=y
@@ -360,25 +403,35 @@ CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
 # CONFIG_EEPROM_93CX6 is not set
 CONFIG_SGI_IOC4=y
 # CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_SGI_XP=m
+# CONFIG_HP_ILO is not set
+CONFIG_SGI_GRU=m
+# CONFIG_SGI_GRU_DEBUG is not set
+CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
 CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
-# Please see Documentation/ide.txt for help/info on IDE drives
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
+CONFIG_IDE_TIMINGS=y
+CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
 CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=m
@@ -390,25 +443,26 @@ CONFIG_IDE_PROC_FS=y
 # IDE chipset support/bugfixes
 #
 # CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
 # CONFIG_BLK_DEV_IDEPNP is not set
+CONFIG_BLK_DEV_IDEDMA_SFF=y
+
+#
+# PCI IDE chipsets support
+#
 CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
 CONFIG_IDEPCI_PCIBUS_ORDER=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 CONFIG_BLK_DEV_GENERIC=y
 # CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
 CONFIG_BLK_DEV_CMD64X=y
 # CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
 # CONFIG_BLK_DEV_CS5520 is not set
 # CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
@@ -425,10 +479,7 @@ CONFIG_BLK_DEV_SGIIOC4=y
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_BLK_DEV_TC86C001 is not set
-# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
@@ -468,10 +519,8 @@ CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=y
 # CONFIG_SCSI_SAS_LIBSAS is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
@@ -481,6 +530,8 @@ CONFIG_SCSI_SAS_ATTRS=y
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -491,12 +542,14 @@ CONFIG_SCSI_SAS_ATTRS=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_STEX is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_IPR is not set
 CONFIG_SCSI_QLOGIC_1280=y
 # CONFIG_SCSI_QLA_FC is not set
 # CONFIG_SCSI_QLA_ISCSI is not set
@@ -505,7 +558,68 @@ CONFIG_SCSI_QLOGIC_1280=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
-# CONFIG_ATA is not set
+# CONFIG_SCSI_DH is not set
+CONFIG_ATA=y
+CONFIG_ATA_NONSTANDARD=y
+CONFIG_ATA_ACPI=y
+CONFIG_SATA_PMP=y
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SIL24 is not set
+CONFIG_ATA_SFF=y
+# CONFIG_SATA_SVW is not set
+CONFIG_ATA_PIIX=y
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_SATA_INIC162X is not set
+# CONFIG_PATA_ACPI is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD640_PCI is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_IT8213 is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NINJA32 is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_NS87415 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_SCH is not set
 CONFIG_MD=y
 CONFIG_BLK_DEV_MD=m
 CONFIG_MD_LINEAR=m
@@ -522,36 +636,52 @@ CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
 CONFIG_DM_ZERO=m
 CONFIG_DM_MULTIPATH=m
-# CONFIG_DM_MULTIPATH_EMC is not set
-# CONFIG_DM_MULTIPATH_RDAC is not set
 # CONFIG_DM_DELAY is not set
-
-#
-# Fusion MPT device support
-#
+# CONFIG_DM_UEVENT is not set
 CONFIG_FUSION=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=y
 CONFIG_FUSION_MAX_SGE=128
 # CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LOGGING is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_VETH is not set
 # CONFIG_NET_SB1000 is not set
 # CONFIG_ARCNET is not set
-# CONFIG_PHYLIB is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=m
 # CONFIG_HAPPYMEAL is not set
@@ -569,13 +699,16 @@ CONFIG_TULIP=m
 # CONFIG_DM9102 is not set
 # CONFIG_ULI526X is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
 # CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
 CONFIG_EEPRO100=m
 CONFIG_E100=m
 # CONFIG_FEALNX is not set
@@ -583,17 +716,22 @@ CONFIG_E100=m
 # CONFIG_NE2K_PCI is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
+# CONFIG_R6040 is not set
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 # CONFIG_SC92031 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
-# CONFIG_E1000_NAPI is not set
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+CONFIG_IGB=y
+# CONFIG_IGB_LRO is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -606,14 +744,20 @@ CONFIG_TIGON3=y
 # CONFIG_BNX2 is not set
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
 # CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_SFC is not set
 # CONFIG_TR is not set
 
 #
@@ -621,6 +765,7 @@ CONFIG_NETDEV_10000=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 
 #
 # USB Network Adapters
@@ -629,7 +774,6 @@ CONFIG_NETDEV_10000=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
@@ -637,8 +781,8 @@ CONFIG_NETDEV_10000=y
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
+# CONFIG_NETCONSOLE_DYNAMIC is not set
 CONFIG_NETPOLL=y
 # CONFIG_NETPOLL_TRAP is not set
 CONFIG_NET_POLL_CONTROLLER=y
@@ -660,7 +804,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -709,9 +852,11 @@ CONFIG_GAMEPORT=m
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_COMPUTONE is not set
 # CONFIG_ROCKETPORT is not set
@@ -719,15 +864,16 @@ CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_DIGIEPCA is not set
 # CONFIG_MOXA_INTELLIO is not set
 # CONFIG_MOXA_SMARTIO is not set
-# CONFIG_MOXA_SMARTIO_NEW is not set
 # CONFIG_ISI is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_SYNCLINK_GT is not set
 # CONFIG_N_HDLC is not set
+# CONFIG_RISCOM8 is not set
 # CONFIG_SPECIALIX is not set
 # CONFIG_SX is not set
 # CONFIG_RIO is not set
 # CONFIG_STALDRV is not set
+# CONFIG_NOZOMI is not set
 CONFIG_SGI_SNSC=y
 CONFIG_SGI_TIOCX=y
 CONFIG_SGI_MBCS=m
@@ -759,76 +905,100 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
 # CONFIG_HW_RANDOM is not set
 CONFIG_EFI_RTC=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-CONFIG_AGP=m
-CONFIG_AGP_I460=m
-CONFIG_AGP_HP_ZX1=m
-CONFIG_AGP_SGI_TIOCA=m
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_MGA=m
-CONFIG_DRM_SIS=m
-# CONFIG_DRM_VIA is not set
-# CONFIG_DRM_SAVAGE is not set
 CONFIG_RAW_DRIVER=m
 CONFIG_MAX_RAW_DEVS=256
 CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
 CONFIG_HPET_MMAP=y
 # CONFIG_HANGCHECK_TIMER is not set
 CONFIG_MMTIMER=y
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
 # CONFIG_I2C is not set
-
-#
-# SPI support
-#
 # CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
 # CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_I5K_AMB is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_THERMAL=m
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 CONFIG_DAB=y
 # CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
 #
+CONFIG_AGP=m
+CONFIG_AGP_I460=m
+CONFIG_AGP_HP_ZX1=m
+CONFIG_AGP_SGI_TIOCA=m
+CONFIG_DRM=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_FB is not set
 
 #
 # Console display driver support
@@ -836,15 +1006,7 @@ CONFIG_DAB=y
 CONFIG_VGA_CONSOLE=y
 # CONFIG_VGACON_SOFT_SCROLLBACK is not set
 CONFIG_DUMMY_CONSOLE=y
-
-#
-# Sound
-#
 CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -862,22 +1024,18 @@ CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_VERBOSE_PROCFS=y
 CONFIG_SND_VERBOSE_PRINTK=y
 # CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
+CONFIG_SND_VMASTER=y
 CONFIG_SND_MPU401_UART=m
 CONFIG_SND_OPL3_LIB=m
 CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_DRIVERS=y
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
 CONFIG_SND_MTPAV=m
 CONFIG_SND_SERIAL_U16550=m
 CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
+# CONFIG_SND_AC97_POWER_SAVE is not set
+CONFIG_SND_PCI=y
 # CONFIG_SND_AD1889 is not set
 # CONFIG_SND_ALS300 is not set
 # CONFIG_SND_ALI5451 is not set
@@ -886,10 +1044,12 @@ CONFIG_SND_MPU401=m
 # CONFIG_SND_AU8810 is not set
 # CONFIG_SND_AU8820 is not set
 # CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AW2 is not set
 # CONFIG_SND_AZT3328 is not set
 # CONFIG_SND_BT87X is not set
 # CONFIG_SND_CA0106 is not set
 # CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_OXYGEN is not set
 CONFIG_SND_CS4281=m
 CONFIG_SND_CS46XX=m
 CONFIG_SND_CS46XX_NEW_DSP=y
@@ -912,10 +1072,10 @@ CONFIG_SND_EMU10K1=m
 # CONFIG_SND_ES1938 is not set
 # CONFIG_SND_ES1968 is not set
 CONFIG_SND_FM801=m
-# CONFIG_SND_FM801_TEA575X_BOOL is not set
 # CONFIG_SND_HDA_INTEL is not set
 # CONFIG_SND_HDSP is not set
 # CONFIG_SND_HDSPM is not set
+# CONFIG_SND_HIFIER is not set
 # CONFIG_SND_ICE1712 is not set
 # CONFIG_SND_ICE1724 is not set
 # CONFIG_SND_INTEL8X0 is not set
@@ -933,29 +1093,19 @@ CONFIG_SND_FM801=m
 # CONFIG_SND_TRIDENT is not set
 # CONFIG_SND_VIA82XX is not set
 # CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VIRTUOSO is not set
 # CONFIG_SND_VX222 is not set
 # CONFIG_SND_YMFPCI is not set
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
+CONFIG_SND_USB=y
 # CONFIG_SND_USB_AUDIO is not set
 # CONFIG_SND_USB_CAIAQ is not set
-
-#
-# System on Chip audio support
-#
 # CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
 # CONFIG_SOUND_PRIME is not set
 CONFIG_AC97_BUS=m
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
 
 #
 # USB Input Devices
@@ -976,6 +1126,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=m
 # CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
 
 #
 # Miscellaneous USB options
@@ -984,17 +1135,17 @@ CONFIG_USB_DEVICEFS=y
 CONFIG_USB_DEVICE_CLASS=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_PERSIST is not set
 # CONFIG_USB_OTG is not set
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
 CONFIG_USB_EHCI_HCD=m
-# CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1008,6 +1159,7 @@ CONFIG_USB_UHCI_HCD=m
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1027,7 +1179,9 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
 # CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
@@ -1040,10 +1194,6 @@ CONFIG_USB_MON=y
 #
 # USB port drivers
 #
-
-#
-# USB Serial Converter support
-#
 # CONFIG_USB_SERIAL is not set
 
 #
@@ -1069,67 +1219,32 @@ CONFIG_USB_MON=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
+# CONFIG_USB_ISIGHTFW is not set
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
+# CONFIG_ACCESSIBILITY is not set
 CONFIG_INFINIBAND=m
 # CONFIG_INFINIBAND_USER_MAD is not set
 # CONFIG_INFINIBAND_USER_ACCESS is not set
 CONFIG_INFINIBAND_ADDR_TRANS=y
 CONFIG_INFINIBAND_MTHCA=m
 CONFIG_INFINIBAND_MTHCA_DEBUG=y
+# CONFIG_INFINIBAND_IPATH is not set
 # CONFIG_INFINIBAND_AMSO1100 is not set
 # CONFIG_MLX4_INFINIBAND is not set
+# CONFIG_INFINIBAND_NES is not set
 CONFIG_INFINIBAND_IPOIB=m
 # CONFIG_INFINIBAND_IPOIB_CM is not set
 CONFIG_INFINIBAND_IPOIB_DEBUG=y
 # CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
 # CONFIG_INFINIBAND_SRP is not set
 # CONFIG_INFINIBAND_ISER is not set
-
-#
-# Real Time Clock
-#
 # CONFIG_RTC_CLASS is not set
-
-#
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
-# Userspace I/O
-#
+# CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
-# CONFIG_MSPEC is not set
+CONFIG_MSPEC=m
 
 #
 # File systems
@@ -1145,7 +1260,6 @@ CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 # CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=y
 # CONFIG_REISERFS_CHECK is not set
@@ -1157,17 +1271,15 @@ CONFIG_REISERFS_FS_SECURITY=y
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=y
 # CONFIG_XFS_QUOTA is not set
-# CONFIG_XFS_SECURITY is not set
 # CONFIG_XFS_POSIX_ACL is not set
 # CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
 CONFIG_AUTOFS4_FS=y
 # CONFIG_FUSE_FS is not set
@@ -1205,7 +1317,6 @@ CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
 
 #
@@ -1220,32 +1331,30 @@ CONFIG_RAMFS=y
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
 CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=y
+CONFIG_SUNRPC_XPRT_RDMA=m
+CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
 CONFIG_SMB_NLS_DEFAULT=y
@@ -1281,10 +1390,6 @@ CONFIG_SGI_PARTITION=y
 # CONFIG_KARMA_PARTITION is not set
 CONFIG_EFI_PARTITION=y
 # CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=y
@@ -1325,22 +1430,24 @@ CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
 # CONFIG_DLM is not set
+CONFIG_HAVE_KVM=y
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
-# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
@@ -1358,16 +1465,12 @@ CONFIG_IRQ_PER_CPU=y
 # CONFIG_HP_SIMSCSI is not set
 
 #
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=2048
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
@@ -1375,10 +1478,14 @@ CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
@@ -1388,10 +1495,15 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
 # CONFIG_DEBUG_LIST is not set
-CONFIG_FORCED_INLINING=y
+# CONFIG_DEBUG_SG is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1405,41 +1517,85 @@ CONFIG_SYSVIPC_COMPAT=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
 CONFIG_CRYPTO_ALGAPI=y
 CONFIG_CRYPTO_BLKCIPHER=m
 CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 # CONFIG_CRYPTO_HMAC is not set
 # CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-CONFIG_CRYPTO_DES=m
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
 # CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_ARC4 is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
 # CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
 # CONFIG_CRYPTO_DEFLATE is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_LZO is not set
 CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
index c39627d..416a952 100644 (file)
@@ -1243,11 +1243,11 @@ ENTRY(speculation_vector)
 
        add r17=r17,r18                 // now add the offset
        ;;
-       MOV_FROM_IIP(r17)
+       MOV_TO_IIP(r17, r19)
        dep r16=0,r16,41,2              // clear EI
        ;;
 
-       MOV_FROM_IPSR(p0, r16)
+       MOV_TO_IPSR(p0, r16, r19)
        ;;
 
        RFI
diff --git a/arch/powerpc/.gitignore b/arch/powerpc/.gitignore
deleted file mode 100644 (file)
index a1a869c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include
index ea3e541..45ffd8e 100644 (file)
@@ -7,15 +7,6 @@ config PPC_ISERIES
 menu "iSeries device drivers"
        depends on PPC_ISERIES
 
-config VIOCONS
-       bool "iSeries Virtual Console Support (Obsolete)"
-       depends on !HVC_ISERIES
-       default n
-       help
-         This is the old virtual console driver for legacy iSeries.
-         You should use the iSeries Hypervisor Virtual Console
-         support instead.
-
 config VIODASD
        tristate "iSeries Virtual I/O disk support"
        help
@@ -38,5 +29,5 @@ endmenu
 
 config VIOPATH
        bool
-       depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
+       depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
        default y
index 29cb7df..f91f0b2 100644 (file)
@@ -12,9 +12,9 @@
 #ifndef _LINUX_IOPORT_H
 #include <linux/ioport.h>
 #endif
+#include <linux/of_device.h>
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 
 struct linux_ebus_child {
        struct linux_ebus_child         *next;
index fcc62b9..14c6a11 100644 (file)
@@ -8,9 +8,10 @@
 #ifndef __SPARC64_EBUS_H
 #define __SPARC64_EBUS_H
 
+#include <linux/of_device.h>
+
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 
 struct linux_ebus_child {
        struct linux_ebus_child         *next;
index 93a262c..2348ab9 100644 (file)
@@ -13,9 +13,6 @@
  *
  */
 
-/* This is just here during the transition */
-#include <linux/of_platform.h>
-
 extern struct bus_type ebus_bus_type;
 extern struct bus_type sbus_bus_type;
 
index 7818b25..d983062 100644 (file)
@@ -6,9 +6,10 @@
 #ifndef _ASM_SPARC64_PARPORT_H
 #define _ASM_SPARC64_PARPORT_H 1
 
+#include <linux/of_device.h>
+
 #include <asm/ebus.h>
 #include <asm/ns87303.h>
-#include <asm/of_device.h>
 #include <asm/prom.h>
 
 #define PARPORT_PC_MAX_PORTS   PARPORT_MAX
index 77b5d3a..a7b4fa2 100644 (file)
@@ -9,10 +9,10 @@
 
 #include <linux/dma-mapping.h>
 #include <linux/ioport.h>
+#include <linux/of_device.h>
 
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/scatterlist.h>
 
 /* We scan which devices are on the SBus using the PROM node device
index 0e16b6d..b606c14 100644 (file)
@@ -8,10 +8,10 @@
 
 #include <linux/dma-mapping.h>
 #include <linux/ioport.h>
+#include <linux/of_device.h>
 
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/iommu.h>
 #include <asm/scatterlist.h>
 
index 4879609..2a8a847 100644 (file)
 #include <linux/pci.h>         /* struct pci_dev */
 #include <linux/proc_fs.h>
 #include <linux/scatterlist.h>
+#include <linux/of_device.h>
 
 #include <asm/io.h>
 #include <asm/vaddrs.h>
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/sbus.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
index ab3dd0b..0762f5d 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/profile.h>
+#include <linux/of_device.h>
 
 #include <asm/oplib.h>
 #include <asm/timer.h>
@@ -40,7 +41,6 @@
 #include <asm/sun4paddr.h>
 #include <asm/page.h>
 #include <asm/pcic.h>
-#include <asm/of_device.h>
 #include <asm/irq_regs.h>
 
 #include "irq.h"
index c55f029..dd5c7bf 100644 (file)
@@ -9,9 +9,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/of_device.h>
 
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/io.h>
 #include <asm/auxio.h>
 
index 4d58d7c..60d36d1 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
+#include <linux/of_device.h>
 
 #include <asm/system.h>
 #include <asm/page.h>
 #include <asm/ebus.h>
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/bpp.h>
 #include <asm/irq.h>
 #include <asm/io.h>
index 19fa621..09a5ec2 100644 (file)
@@ -8,9 +8,9 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/device.h>
+#include <linux/of_device.h>
 
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/oplib.h>
 
 #include "pci_impl.h"
index 994dbe0..ef5fe29 100644 (file)
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of_device.h>
 
 #include <asm/iommu.h>
 #include <asm/irq.h>
 #include <asm/starfire.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/oplib.h>
 
 #include "pci_impl.h"
index 4c34195..ade5184 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of_device.h>
 
 #include <asm/apb.h>
 #include <asm/iommu.h>
@@ -18,7 +19,6 @@
 #include <asm/smp.h>
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 
 #include "pci_impl.h"
 #include "iommu_common.h"
index 615edd9..9248c67 100644 (file)
@@ -9,13 +9,13 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/of_device.h>
 
 #include <asm/iommu.h>
 #include <asm/irq.h>
 #include <asm/upa.h>
 #include <asm/pstate.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/oplib.h>
 
 #include "pci_impl.h"
index eae8ca2..3bb987a 100644 (file)
 #include <linux/pm.h>
 #include <linux/syscalls.h>
 #include <linux/reboot.h>
+#include <linux/of_device.h>
 
 #include <asm/system.h>
 #include <asm/auxio.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/io.h>
 #include <asm/sstate.h>
 #include <asm/reboot.h>
index ed03a18..3c048ac 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/lmb.h>
+#include <linux/of_device.h>
 
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/oplib.h>
 #include <asm/irq.h>
 #include <asm/asi.h>
index b3e3737..e9d7f06 100644 (file)
@@ -26,13 +26,15 @@ void save_stack_trace(struct stack_trace *trace)
 
                /* Bogus frame pointer? */
                if (fp < (thread_base + sizeof(struct thread_info)) ||
-                   fp >= (thread_base + THREAD_SIZE))
+                   fp > (thread_base + THREAD_SIZE - sizeof(struct sparc_stackf)))
                        break;
 
                sf = (struct sparc_stackf *) fp;
                regs = (struct pt_regs *) (sf + 1);
 
-               if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
+               if (((unsigned long)regs <=
+                    (thread_base + THREAD_SIZE - sizeof(*regs))) &&
+                   (regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
                        if (!(regs->tstate & TSTATE_PRIV))
                                break;
                        pc = regs->tpc;
index 97b77fb..3d11853 100644 (file)
 #include <asm/mmu_context.h>
 #include <asm/compat_signal.h>
 
-asmlinkage long sys32_chown16(const char __user * filename, u16 user, u16 group)
-{
-       return sys_chown(filename, low2highuid(user), low2highgid(group));
-}
-
-asmlinkage long sys32_lchown16(const char __user * filename, u16 user, u16 group)
-{
-       return sys_lchown(filename, low2highuid(user), low2highgid(group));
-}
-
-asmlinkage long sys32_fchown16(unsigned int fd, u16 user, u16 group)
-{
-       return sys_fchown(fd, low2highuid(user), low2highgid(group));
-}
-
-asmlinkage long sys32_setregid16(u16 rgid, u16 egid)
-{
-       return sys_setregid(low2highgid(rgid), low2highgid(egid));
-}
-
-asmlinkage long sys32_setgid16(u16 gid)
-{
-       return sys_setgid((gid_t)gid);
-}
-
-asmlinkage long sys32_setreuid16(u16 ruid, u16 euid)
-{
-       return sys_setreuid(low2highuid(ruid), low2highuid(euid));
-}
-
-asmlinkage long sys32_setuid16(u16 uid)
-{
-       return sys_setuid((uid_t)uid);
-}
-
-asmlinkage long sys32_setresuid16(u16 ruid, u16 euid, u16 suid)
-{
-       return sys_setresuid(low2highuid(ruid), low2highuid(euid),
-               low2highuid(suid));
-}
-
-asmlinkage long sys32_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid)
-{
-       int retval;
-
-       if (!(retval = put_user(high2lowuid(current->uid), ruid)) &&
-           !(retval = put_user(high2lowuid(current->euid), euid)))
-               retval = put_user(high2lowuid(current->suid), suid);
-
-       return retval;
-}
-
-asmlinkage long sys32_setresgid16(u16 rgid, u16 egid, u16 sgid)
-{
-       return sys_setresgid(low2highgid(rgid), low2highgid(egid),
-               low2highgid(sgid));
-}
-
-asmlinkage long sys32_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid)
-{
-       int retval;
-
-       if (!(retval = put_user(high2lowgid(current->gid), rgid)) &&
-           !(retval = put_user(high2lowgid(current->egid), egid)))
-               retval = put_user(high2lowgid(current->sgid), sgid);
-
-       return retval;
-}
-
-asmlinkage long sys32_setfsuid16(u16 uid)
-{
-       return sys_setfsuid((uid_t)uid);
-}
-
-asmlinkage long sys32_setfsgid16(u16 gid)
-{
-       return sys_setfsgid((gid_t)gid);
-}
-
-static int groups16_to_user(u16 __user *grouplist, struct group_info *group_info)
-{
-       int i;
-       u16 group;
-
-       for (i = 0; i < group_info->ngroups; i++) {
-               group = (u16)GROUP_AT(group_info, i);
-               if (put_user(group, grouplist+i))
-                       return -EFAULT;
-       }
-
-       return 0;
-}
-
-static int groups16_from_user(struct group_info *group_info, u16 __user *grouplist)
-{
-       int i;
-       u16 group;
-
-       for (i = 0; i < group_info->ngroups; i++) {
-               if (get_user(group, grouplist+i))
-                       return  -EFAULT;
-               GROUP_AT(group_info, i) = (gid_t)group;
-       }
-
-       return 0;
-}
-
-asmlinkage long sys32_getgroups16(int gidsetsize, u16 __user *grouplist)
-{
-       int i;
-
-       if (gidsetsize < 0)
-               return -EINVAL;
-
-       get_group_info(current->group_info);
-       i = current->group_info->ngroups;
-       if (gidsetsize) {
-               if (i > gidsetsize) {
-                       i = -EINVAL;
-                       goto out;
-               }
-               if (groups16_to_user(grouplist, current->group_info)) {
-                       i = -EFAULT;
-                       goto out;
-               }
-       }
-out:
-       put_group_info(current->group_info);
-       return i;
-}
-
-asmlinkage long sys32_setgroups16(int gidsetsize, u16 __user *grouplist)
-{
-       struct group_info *group_info;
-       int retval;
-
-       if (!capable(CAP_SETGID))
-               return -EPERM;
-       if ((unsigned)gidsetsize > NGROUPS_MAX)
-               return -EINVAL;
-
-       group_info = groups_alloc(gidsetsize);
-       if (!group_info)
-               return -ENOMEM;
-       retval = groups16_from_user(group_info, grouplist);
-       if (retval) {
-               put_group_info(group_info);
-               return retval;
-       }
-
-       retval = set_current_groups(group_info);
-       put_group_info(group_info);
-
-       return retval;
-}
-
-asmlinkage long sys32_getuid16(void)
-{
-       return high2lowuid(current->uid);
-}
-
-asmlinkage long sys32_geteuid16(void)
-{
-       return high2lowuid(current->euid);
-}
-
-asmlinkage long sys32_getgid16(void)
-{
-       return high2lowgid(current->gid);
-}
-
-asmlinkage long sys32_getegid16(void)
-{
-       return high2lowgid(current->egid);
-}
-
 /* 32-bit timeval and related flotsam.  */
 
 static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
index 1095bf4..0fdbf3b 100644 (file)
 sys_call_table32:
 /*0*/  .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
 /*5*/  .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
-/*10*/  .word sys_unlink, sunos_execv, sys_chdir, sys32_chown16, sys32_mknod
-/*15*/ .word sys_chmod, sys32_lchown16, sparc_brk, sys32_perfctr, sys32_lseek
-/*20*/ .word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16
+/*10*/  .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
+/*15*/ .word sys_chmod, sys_lchown16, sparc_brk, sys32_perfctr, sys32_lseek
+/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
 /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
 /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
        .word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile
 /*40*/ .word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid
-       .word sys32_umount, sys32_setgid16, sys32_getgid16, sys32_signal, sys32_geteuid16
-/*50*/ .word sys32_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
+       .word sys32_umount, sys_setgid16, sys_getgid16, sys32_signal, sys_geteuid16
+/*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
        .word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve
 /*60*/ .word sys32_umask, sys_chroot, compat_sys_newfstat, compat_sys_fstat64, sys_getpagesize
        .word sys32_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid
 /*70*/ .word sys_getegid, sys_mmap, sys_setreuid, sys_munmap, sys_mprotect
-       .word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16
-/*80*/ .word sys32_setgroups16, sys_getpgrp, sys32_setgroups, sys32_setitimer, sys32_ftruncate64
+       .word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys_getgroups16
+/*80*/ .word sys_setgroups16, sys_getpgrp, sys32_setgroups, sys32_setitimer, sys32_ftruncate64
        .word sys32_swapon, sys32_getitimer, sys_setuid, sys32_sethostname, sys_setgid
 /*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid
        .word sys_fsync, sys32_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
@@ -42,8 +42,8 @@ sys_call_table32:
        .word compat_sys_rt_sigtimedwait, sys32_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid
 /*110*/        .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall
        .word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd
-/*120*/        .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod
-       .word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate
+/*120*/        .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys_fchown16, sys_fchmod
+       .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate
 /*130*/        .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall
        .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64
 /*140*/        .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit
@@ -63,7 +63,7 @@ sys_call_table32:
 /*210*/        .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, compat_sys_sysinfo
        .word compat_sys_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
+       .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16
 /*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
index a0c6a97..cc16fdc 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
+#include <linux/of_device.h>
 
 #include <asm/oplib.h>
 #include <asm/mostek.h>
@@ -40,7 +41,6 @@
 #include <asm/irq.h>
 #include <asm/io.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/starfire.h>
 #include <asm/smp.h>
 #include <asm/sections.h>
index 65974c6..c029d3e 100644 (file)
@@ -263,11 +263,12 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
                if (unlikely(!tx)) {
                        async_tx_quiesce(&depend_tx);
 
-                       while (!tx)
+                       while (!tx) {
                                dma_async_issue_pending(chan);
                                tx = device->device_prep_dma_zero_sum(chan,
                                        dma_src, src_cnt, len, result,
                                        dma_prep_flags);
+                       }
                }
 
                async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param);
index 0ce0c27..b73116e 100644 (file)
@@ -159,7 +159,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
 static int cciss_getgeo(struct block_device *bdev, struct hd_geometry *geo);
 
 static int cciss_revalidate(struct gendisk *disk);
-static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk);
+static int rebuild_lun_table(ctlr_info_t *h, int first_time);
 static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
                           int clear_all);
 
@@ -171,7 +171,6 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
                        int withirq, sector_t total_size,
                        unsigned int block_size, InquiryData_struct *inq_buff,
                                   drive_info_struct *drv);
-static void cciss_getgeometry(int cntl_num);
 static void __devinit cciss_interrupt_mode(ctlr_info_t *, struct pci_dev *,
                                           __u32);
 static void start_io(ctlr_info_t *h);
@@ -929,8 +928,10 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
                        return 0;
                }
 
+       case CCISS_DEREGDISK:
+       case CCISS_REGNEWD:
        case CCISS_REVALIDVOLS:
-               return rebuild_lun_table(host, NULL);
+               return rebuild_lun_table(host, 0);
 
        case CCISS_GETLUNINFO:{
                        LogvolInfo_struct luninfo;
@@ -943,12 +944,6 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
                                return -EFAULT;
                        return 0;
                }
-       case CCISS_DEREGDISK:
-               return rebuild_lun_table(host, disk);
-
-       case CCISS_REGNEWD:
-               return rebuild_lun_table(host, NULL);
-
        case CCISS_PASSTHRU:
                {
                        IOCTL_Command_struct iocommand;
@@ -1134,7 +1129,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
                                if (ioc->Request.Type.Direction == XFER_WRITE) {
                                        if (copy_from_user
                                            (buff[sg_used], data_ptr, sz)) {
-                                               status = -ENOMEM;
+                                               status = -EFAULT;
                                                goto cleanup1;
                                        }
                                } else {
@@ -1330,15 +1325,84 @@ static void cciss_softirq_done(struct request *rq)
        spin_unlock_irqrestore(&h->lock, flags);
 }
 
+/* This function gets the serial number of a logical drive via
+ * inquiry page 0x83.  Serial no. is 16 bytes.  If the serial
+ * number cannot be had, for whatever reason, 16 bytes of 0xff
+ * are returned instead.
+ */
+static void cciss_get_serial_no(int ctlr, int logvol, int withirq,
+                               unsigned char *serial_no, int buflen)
+{
+#define PAGE_83_INQ_BYTES 64
+       int rc;
+       unsigned char *buf;
+
+       if (buflen > 16)
+               buflen = 16;
+       memset(serial_no, 0xff, buflen);
+       buf = kzalloc(PAGE_83_INQ_BYTES, GFP_KERNEL);
+       if (!buf)
+               return;
+       memset(serial_no, 0, buflen);
+       if (withirq)
+               rc = sendcmd_withirq(CISS_INQUIRY, ctlr, buf,
+                       PAGE_83_INQ_BYTES, 1, logvol, 0x83, TYPE_CMD);
+       else
+               rc = sendcmd(CISS_INQUIRY, ctlr, buf,
+                       PAGE_83_INQ_BYTES, 1, logvol, 0x83, NULL, TYPE_CMD);
+       if (rc == IO_OK)
+               memcpy(serial_no, &buf[8], buflen);
+       kfree(buf);
+       return;
+}
+
+static void cciss_add_disk(ctlr_info_t *h, struct gendisk *disk,
+                               int drv_index)
+{
+       disk->queue = blk_init_queue(do_cciss_request, &h->lock);
+       sprintf(disk->disk_name, "cciss/c%dd%d", h->ctlr, drv_index);
+       disk->major = h->major;
+       disk->first_minor = drv_index << NWD_SHIFT;
+       disk->fops = &cciss_fops;
+       disk->private_data = &h->drv[drv_index];
+
+       /* Set up queue information */
+       blk_queue_bounce_limit(disk->queue, h->pdev->dma_mask);
+
+       /* This is a hardware imposed limit. */
+       blk_queue_max_hw_segments(disk->queue, MAXSGENTRIES);
+
+       /* This is a limit in the driver and could be eliminated. */
+       blk_queue_max_phys_segments(disk->queue, MAXSGENTRIES);
+
+       blk_queue_max_sectors(disk->queue, h->cciss_max_sectors);
+
+       blk_queue_softirq_done(disk->queue, cciss_softirq_done);
+
+       disk->queue->queuedata = h;
+
+       blk_queue_hardsect_size(disk->queue,
+                               h->drv[drv_index].block_size);
+
+       /* Make sure all queue data is written out before */
+       /* setting h->drv[drv_index].queue, as setting this */
+       /* allows the interrupt handler to start the queue */
+       wmb();
+       h->drv[drv_index].queue = disk->queue;
+       add_disk(disk);
+}
+
 /* This function will check the usage_count of the drive to be updated/added.
- * If the usage_count is zero then the drive information will be updated and
- * the disk will be re-registered with the kernel.  If not then it will be
- * left alone for the next reboot.  The exception to this is disk 0 which
- * will always be left registered with the kernel since it is also the
- * controller node.  Any changes to disk 0 will show up on the next
- * reboot.
+ * If the usage_count is zero and it is a heretofore unknown drive, or,
+ * the drive's capacity, geometry, or serial number has changed,
+ * then the drive information will be updated and the disk will be
+ * re-registered with the kernel.  If these conditions don't hold,
+ * then it will be left alone for the next reboot.  The exception to this
+ * is disk 0 which will always be left registered with the kernel since it
+ * is also the controller node.  Any changes to disk 0 will show up on
+ * the next reboot.
  */
-static void cciss_update_drive_info(int ctlr, int drv_index)
+static void cciss_update_drive_info(int ctlr, int drv_index, int first_time)
 {
        ctlr_info_t *h = hba[ctlr];
        struct gendisk *disk;
@@ -1347,16 +1411,81 @@ static void cciss_update_drive_info(int ctlr, int drv_index)
        sector_t total_size;
        unsigned long flags = 0;
        int ret = 0;
+       drive_info_struct *drvinfo;
+       int was_only_controller_node;
+
+       /* Get information about the disk and modify the driver structure */
+       inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL);
+       drvinfo = kmalloc(sizeof(*drvinfo), GFP_KERNEL);
+       if (inq_buff == NULL || drvinfo == NULL)
+               goto mem_msg;
+
+       /* See if we're trying to update the "controller node"
+        * this will happen the when the first logical drive gets
+        * created by ACU.
+        */
+       was_only_controller_node = (drv_index == 0 &&
+                               h->drv[0].raid_level == -1);
 
-       /* if the disk already exists then deregister it before proceeding */
-       if (h->drv[drv_index].raid_level != -1) {
+       /* testing to see if 16-byte CDBs are already being used */
+       if (h->cciss_read == CCISS_READ_16) {
+               cciss_read_capacity_16(h->ctlr, drv_index, 1,
+                       &total_size, &block_size);
+
+       } else {
+               cciss_read_capacity(ctlr, drv_index, 1,
+                                   &total_size, &block_size);
+
+               /* if read_capacity returns all F's this volume is >2TB */
+               /* in size so we switch to 16-byte CDB's for all */
+               /* read/write ops */
+               if (total_size == 0xFFFFFFFFULL) {
+                       cciss_read_capacity_16(ctlr, drv_index, 1,
+                       &total_size, &block_size);
+                       h->cciss_read = CCISS_READ_16;
+                       h->cciss_write = CCISS_WRITE_16;
+               } else {
+                       h->cciss_read = CCISS_READ_10;
+                       h->cciss_write = CCISS_WRITE_10;
+               }
+       }
+
+       cciss_geometry_inquiry(ctlr, drv_index, 1, total_size, block_size,
+                              inq_buff, drvinfo);
+       drvinfo->block_size = block_size;
+       drvinfo->nr_blocks = total_size + 1;
+
+       cciss_get_serial_no(ctlr, drv_index, 1, drvinfo->serial_no,
+                       sizeof(drvinfo->serial_no));
+
+       /* Is it the same disk we already know, and nothing's changed? */
+       if (h->drv[drv_index].raid_level != -1 &&
+               ((memcmp(drvinfo->serial_no,
+                               h->drv[drv_index].serial_no, 16) == 0) &&
+               drvinfo->block_size == h->drv[drv_index].block_size &&
+               drvinfo->nr_blocks == h->drv[drv_index].nr_blocks &&
+               drvinfo->heads == h->drv[drv_index].heads &&
+               drvinfo->sectors == h->drv[drv_index].sectors &&
+               drvinfo->cylinders == h->drv[drv_index].cylinders))
+                       /* The disk is unchanged, nothing to update */
+                       goto freeret;
+
+       /* If we get here it's not the same disk, or something's changed,
+        * so we need to * deregister it, and re-register it, if it's not
+        * in use.
+        * If the disk already exists then deregister it before proceeding
+        * (unless it's the first disk (for the controller node).
+        */
+       if (h->drv[drv_index].raid_level != -1 && drv_index != 0) {
+               printk(KERN_WARNING "disk %d has changed.\n", drv_index);
                spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
                h->drv[drv_index].busy_configuring = 1;
                spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
 
-               /* deregister_disk sets h->drv[drv_index].queue = NULL */
-               /* which keeps the interrupt handler from starting */
-               /* the queue. */
+               /* deregister_disk sets h->drv[drv_index].queue = NULL
+                * which keeps the interrupt handler from starting
+                * the queue.
+                */
                ret = deregister_disk(h->gendisk[drv_index],
                                      &h->drv[drv_index], 0);
                h->drv[drv_index].busy_configuring = 0;
@@ -1364,81 +1493,37 @@ static void cciss_update_drive_info(int ctlr, int drv_index)
 
        /* If the disk is in use return */
        if (ret)
-               return;
+               goto freeret;
 
-       /* Get information about the disk and modify the driver structure */
-       inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL);
-       if (inq_buff == NULL)
-               goto mem_msg;
-
-       /* testing to see if 16-byte CDBs are already being used */
-       if (h->cciss_read == CCISS_READ_16) {
-               cciss_read_capacity_16(h->ctlr, drv_index, 1,
-                       &total_size, &block_size);
-               goto geo_inq;
-       }
-
-       cciss_read_capacity(ctlr, drv_index, 1,
-                           &total_size, &block_size);
-
-       /* if read_capacity returns all F's this volume is >2TB in size */
-       /* so we switch to 16-byte CDB's for all read/write ops */
-       if (total_size == 0xFFFFFFFFULL) {
-               cciss_read_capacity_16(ctlr, drv_index, 1,
-               &total_size, &block_size);
-               h->cciss_read = CCISS_READ_16;
-               h->cciss_write = CCISS_WRITE_16;
-       } else {
-               h->cciss_read = CCISS_READ_10;
-               h->cciss_write = CCISS_WRITE_10;
-       }
-geo_inq:
-       cciss_geometry_inquiry(ctlr, drv_index, 1, total_size, block_size,
-                              inq_buff, &h->drv[drv_index]);
+       /* Save the new information from cciss_geometry_inquiry
+        * and serial number inquiry.
+        */
+       h->drv[drv_index].block_size = drvinfo->block_size;
+       h->drv[drv_index].nr_blocks = drvinfo->nr_blocks;
+       h->drv[drv_index].heads = drvinfo->heads;
+       h->drv[drv_index].sectors = drvinfo->sectors;
+       h->drv[drv_index].cylinders = drvinfo->cylinders;
+       h->drv[drv_index].raid_level = drvinfo->raid_level;
+       memcpy(h->drv[drv_index].serial_no, drvinfo->serial_no, 16);
 
        ++h->num_luns;
        disk = h->gendisk[drv_index];
        set_capacity(disk, h->drv[drv_index].nr_blocks);
 
-       /* if it's the controller it's already added */
-       if (drv_index) {
-               disk->queue = blk_init_queue(do_cciss_request, &h->lock);
-               sprintf(disk->disk_name, "cciss/c%dd%d", ctlr, drv_index);
-               disk->major = h->major;
-               disk->first_minor = drv_index << NWD_SHIFT;
-               disk->fops = &cciss_fops;
-               disk->private_data = &h->drv[drv_index];
-
-               /* Set up queue information */
-               blk_queue_bounce_limit(disk->queue, hba[ctlr]->pdev->dma_mask);
-
-               /* This is a hardware imposed limit. */
-               blk_queue_max_hw_segments(disk->queue, MAXSGENTRIES);
-
-               /* This is a limit in the driver and could be eliminated. */
-               blk_queue_max_phys_segments(disk->queue, MAXSGENTRIES);
-
-               blk_queue_max_sectors(disk->queue, h->cciss_max_sectors);
-
-               blk_queue_softirq_done(disk->queue, cciss_softirq_done);
-
-               disk->queue->queuedata = hba[ctlr];
-
-               blk_queue_hardsect_size(disk->queue,
-                                       hba[ctlr]->drv[drv_index].block_size);
-
-               /* Make sure all queue data is written out before */
-               /* setting h->drv[drv_index].queue, as setting this */
-               /* allows the interrupt handler to start the queue */
-               wmb();
-               h->drv[drv_index].queue = disk->queue;
-               add_disk(disk);
-       }
+       /* If it's not disk 0 (drv_index != 0)
+        * or if it was disk 0, but there was previously
+        * no actual corresponding configured logical drive
+        * (raid_leve == -1) then we want to update the
+        * logical drive's information.
+        */
+       if (drv_index || first_time)
+               cciss_add_disk(h, disk, drv_index);
 
-      freeret:
+freeret:
        kfree(inq_buff);
+       kfree(drvinfo);
        return;
-      mem_msg:
+mem_msg:
        printk(KERN_ERR "cciss: out of memory\n");
        goto freeret;
 }
@@ -1448,21 +1533,91 @@ geo_inq:
  * where new drives will be added.  If the index to be returned is greater
  * than the highest_lun index for the controller then highest_lun is set
  * to this new index.  If there are no available indexes then -1 is returned.
+ * "controller_node" is used to know if this is a real logical drive, or just
+ * the controller node, which determines if this counts towards highest_lun.
  */
-static int cciss_find_free_drive_index(int ctlr)
+static int cciss_find_free_drive_index(int ctlr, int controller_node)
 {
        int i;
 
        for (i = 0; i < CISS_MAX_LUN; i++) {
                if (hba[ctlr]->drv[i].raid_level == -1) {
                        if (i > hba[ctlr]->highest_lun)
-                               hba[ctlr]->highest_lun = i;
+                               if (!controller_node)
+                                       hba[ctlr]->highest_lun = i;
                        return i;
                }
        }
        return -1;
 }
 
+/* cciss_add_gendisk finds a free hba[]->drv structure
+ * and allocates a gendisk if needed, and sets the lunid
+ * in the drvinfo structure.   It returns the index into
+ * the ->drv[] array, or -1 if none are free.
+ * is_controller_node indicates whether highest_lun should
+ * count this disk, or if it's only being added to provide
+ * a means to talk to the controller in case no logical
+ * drives have yet been configured.
+ */
+static int cciss_add_gendisk(ctlr_info_t *h, __u32 lunid, int controller_node)
+{
+       int drv_index;
+
+       drv_index = cciss_find_free_drive_index(h->ctlr, controller_node);
+       if (drv_index == -1)
+               return -1;
+       /*Check if the gendisk needs to be allocated */
+       if (!h->gendisk[drv_index]) {
+               h->gendisk[drv_index] =
+                       alloc_disk(1 << NWD_SHIFT);
+               if (!h->gendisk[drv_index]) {
+                       printk(KERN_ERR "cciss%d: could not "
+                               "allocate a new disk %d\n",
+                               h->ctlr, drv_index);
+                       return -1;
+               }
+       }
+       h->drv[drv_index].LunID = lunid;
+
+       /* Don't need to mark this busy because nobody */
+       /* else knows about this disk yet to contend */
+       /* for access to it. */
+       h->drv[drv_index].busy_configuring = 0;
+       wmb();
+       return drv_index;
+}
+
+/* This is for the special case of a controller which
+ * has no logical drives.  In this case, we still need
+ * to register a disk so the controller can be accessed
+ * by the Array Config Utility.
+ */
+static void cciss_add_controller_node(ctlr_info_t *h)
+{
+       struct gendisk *disk;
+       int drv_index;
+
+       if (h->gendisk[0] != NULL) /* already did this? Then bail. */
+               return;
+
+       drv_index = cciss_add_gendisk(h, 0, 1);
+       if (drv_index == -1) {
+               printk(KERN_WARNING "cciss%d: could not "
+                       "add disk 0.\n", h->ctlr);
+               return;
+       }
+       h->drv[drv_index].block_size = 512;
+       h->drv[drv_index].nr_blocks = 0;
+       h->drv[drv_index].heads = 0;
+       h->drv[drv_index].sectors = 0;
+       h->drv[drv_index].cylinders = 0;
+       h->drv[drv_index].raid_level = -1;
+       memset(h->drv[drv_index].serial_no, 0, 16);
+       disk = h->gendisk[drv_index];
+       cciss_add_disk(h, disk, drv_index);
+}
+
 /* This function will add and remove logical drives from the Logical
  * drive array of the controller and maintain persistency of ordering
  * so that mount points are preserved until the next reboot.  This allows
@@ -1470,15 +1625,12 @@ static int cciss_find_free_drive_index(int ctlr)
  * without a re-ordering of those drives.
  * INPUT
  * h           = The controller to perform the operations on
- * del_disk    = The disk to remove if specified.  If the value given
- *               is NULL then no disk is removed.
  */
-static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk)
+static int rebuild_lun_table(ctlr_info_t *h, int first_time)
 {
        int ctlr = h->ctlr;
        int num_luns;
        ReportLunData_struct *ld_buff = NULL;
-       drive_info_struct *drv = NULL;
        int return_code;
        int listlength = 0;
        int i;
@@ -1487,6 +1639,9 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk)
        __u32 lunid = 0;
        unsigned long flags;
 
+       if (!capable(CAP_SYS_RAWIO))
+               return -EPERM;
+
        /* Set busy_configuring flag for this operation */
        spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
        if (h->busy_configuring) {
@@ -1494,100 +1649,100 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk)
                return -EBUSY;
        }
        h->busy_configuring = 1;
+       spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
 
-       /* if del_disk is NULL then we are being called to add a new disk
-        * and update the logical drive table.  If it is not NULL then
-        * we will check if the disk is in use or not.
-        */
-       if (del_disk != NULL) {
-               drv = get_drv(del_disk);
-               drv->busy_configuring = 1;
-               spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
-               return_code = deregister_disk(del_disk, drv, 1);
-               drv->busy_configuring = 0;
-               h->busy_configuring = 0;
-               return return_code;
-       } else {
-               spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
-               if (!capable(CAP_SYS_RAWIO))
-                       return -EPERM;
+       ld_buff = kzalloc(sizeof(ReportLunData_struct), GFP_KERNEL);
+       if (ld_buff == NULL)
+               goto mem_msg;
 
-               ld_buff = kzalloc(sizeof(ReportLunData_struct), GFP_KERNEL);
-               if (ld_buff == NULL)
-                       goto mem_msg;
-
-               return_code = sendcmd_withirq(CISS_REPORT_LOG, ctlr, ld_buff,
-                                             sizeof(ReportLunData_struct), 0,
-                                             0, 0, TYPE_CMD);
-
-               if (return_code == IO_OK) {
-                       listlength =
-                               be32_to_cpu(*(__be32 *) ld_buff->LUNListLength);
-               } else {        /* reading number of logical volumes failed */
-                       printk(KERN_WARNING "cciss: report logical volume"
-                              " command failed\n");
-                       listlength = 0;
-                       goto freeret;
-               }
+       return_code = sendcmd_withirq(CISS_REPORT_LOG, ctlr, ld_buff,
+                                     sizeof(ReportLunData_struct), 0,
+                                     0, 0, TYPE_CMD);
 
-               num_luns = listlength / 8;      /* 8 bytes per entry */
-               if (num_luns > CISS_MAX_LUN) {
-                       num_luns = CISS_MAX_LUN;
-                       printk(KERN_WARNING "cciss: more luns configured"
-                              " on controller than can be handled by"
-                              " this driver.\n");
+       if (return_code == IO_OK)
+               listlength = be32_to_cpu(*(__be32 *) ld_buff->LUNListLength);
+       else {  /* reading number of logical volumes failed */
+               printk(KERN_WARNING "cciss: report logical volume"
+                      " command failed\n");
+               listlength = 0;
+               goto freeret;
+       }
+
+       num_luns = listlength / 8;      /* 8 bytes per entry */
+       if (num_luns > CISS_MAX_LUN) {
+               num_luns = CISS_MAX_LUN;
+               printk(KERN_WARNING "cciss: more luns configured"
+                      " on controller than can be handled by"
+                      " this driver.\n");
+       }
+
+       if (num_luns == 0)
+               cciss_add_controller_node(h);
+
+       /* Compare controller drive array to driver's drive array
+        * to see if any drives are missing on the controller due
+        * to action of Array Config Utility (user deletes drive)
+        * and deregister logical drives which have disappeared.
+        */
+       for (i = 0; i <= h->highest_lun; i++) {
+               int j;
+               drv_found = 0;
+               for (j = 0; j < num_luns; j++) {
+                       memcpy(&lunid, &ld_buff->LUN[j][0], 4);
+                       lunid = le32_to_cpu(lunid);
+                       if (h->drv[i].LunID == lunid) {
+                               drv_found = 1;
+                               break;
+                       }
                }
+               if (!drv_found) {
+                       /* Deregister it from the OS, it's gone. */
+                       spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
+                       h->drv[i].busy_configuring = 1;
+                       spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
+                       return_code = deregister_disk(h->gendisk[i],
+                               &h->drv[i], 1);
+                       h->drv[i].busy_configuring = 0;
+               }
+       }
+
+       /* Compare controller drive array to driver's drive array.
+        * Check for updates in the drive information and any new drives
+        * on the controller due to ACU adding logical drives, or changing
+        * a logical drive's size, etc.  Reregister any new/changed drives
+        */
+       for (i = 0; i < num_luns; i++) {
+               int j;
 
-               /* Compare controller drive array to drivers drive array.
-                * Check for updates in the drive information and any new drives
-                * on the controller.
+               drv_found = 0;
+
+               memcpy(&lunid, &ld_buff->LUN[i][0], 4);
+               lunid = le32_to_cpu(lunid);
+
+               /* Find if the LUN is already in the drive array
+                * of the driver.  If so then update its info
+                * if not in use.  If it does not exist then find
+                * the first free index and add it.
                 */
-               for (i = 0; i < num_luns; i++) {
-                       int j;
-
-                       drv_found = 0;
-
-                       lunid = (0xff &
-                                (unsigned int)(ld_buff->LUN[i][3])) << 24;
-                       lunid |= (0xff &
-                                 (unsigned int)(ld_buff->LUN[i][2])) << 16;
-                       lunid |= (0xff &
-                                 (unsigned int)(ld_buff->LUN[i][1])) << 8;
-                       lunid |= 0xff & (unsigned int)(ld_buff->LUN[i][0]);
-
-                       /* Find if the LUN is already in the drive array
-                        * of the controller.  If so then update its info
-                        * if not is use.  If it does not exist then find
-                        * the first free index and add it.
-                        */
-                       for (j = 0; j <= h->highest_lun; j++) {
-                               if (h->drv[j].LunID == lunid) {
-                                       drv_index = j;
-                                       drv_found = 1;
-                               }
+               for (j = 0; j <= h->highest_lun; j++) {
+                       if (h->drv[j].raid_level != -1 &&
+                               h->drv[j].LunID == lunid) {
+                               drv_index = j;
+                               drv_found = 1;
+                               break;
                        }
+               }
 
-                       /* check if the drive was found already in the array */
-                       if (!drv_found) {
-                               drv_index = cciss_find_free_drive_index(ctlr);
-                               if (drv_index == -1)
-                                       goto freeret;
-
-                               /*Check if the gendisk needs to be allocated */
-                               if (!h->gendisk[drv_index]){
-                                       h->gendisk[drv_index] = alloc_disk(1 << NWD_SHIFT);
-                                       if (!h->gendisk[drv_index]){
-                                               printk(KERN_ERR "cciss: could not allocate new disk %d\n", drv_index);
-                                               goto mem_msg;
-                                       }
-                               }
-                       }
-                       h->drv[drv_index].LunID = lunid;
-                       cciss_update_drive_info(ctlr, drv_index);
-               }               /* end for */
-       }                       /* end else */
+               /* check if the drive was found already in the array */
+               if (!drv_found) {
+                       drv_index = cciss_add_gendisk(h, lunid, 0);
+                       if (drv_index == -1)
+                               goto freeret;
+               }
+               cciss_update_drive_info(ctlr, drv_index, first_time);
+       }               /* end for */
 
-      freeret:
+freeret:
        kfree(ld_buff);
        h->busy_configuring = 0;
        /* We return -1 here to tell the ACU that we have registered/updated
@@ -1595,8 +1750,9 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk)
         * additional times.
         */
        return -1;
-      mem_msg:
+mem_msg:
        printk(KERN_ERR "cciss: out of memory\n");
+       h->busy_configuring = 0;
        goto freeret;
 }
 
@@ -1652,15 +1808,15 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
                 * other than disk 0 we will call put_disk.  We do not
                 * do this for disk 0 as we need it to be able to
                 * configure the controller.
-               */
+                */
                if (clear_all){
                        /* This isn't pretty, but we need to find the
                         * disk in our array and NULL our the pointer.
                         * This is so that we will call alloc_disk if
                         * this index is used again later.
-                       */
+                        */
                        for (i=0; i < CISS_MAX_LUN; i++){
-                               if(h->gendisk[i] == disk){
+                               if (h->gendisk[i] == disk) {
                                        h->gendisk[i] = NULL;
                                        break;
                                }
@@ -1688,7 +1844,7 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
                if (drv == h->drv + h->highest_lun) {
                        /* if so, find the new hightest lun */
                        int i, newhighest = -1;
-                       for (i = 0; i < h->highest_lun; i++) {
+                       for (i = 0; i <= h->highest_lun; i++) {
                                /* if the disk has size > 0, it is available */
                                if (h->drv[i].heads)
                                        newhighest = i;
@@ -3199,136 +3355,9 @@ err_out_free_res:
        return err;
 }
 
-/*
- * Gets information about the local volumes attached to the controller.
+/* Function to find the first free pointer into our hba[] array
+ * Returns -1 if no free entries are left.
  */
-static void cciss_getgeometry(int cntl_num)
-{
-       ReportLunData_struct *ld_buff;
-       InquiryData_struct *inq_buff;
-       int return_code;
-       int i;
-       int listlength = 0;
-       __u32 lunid = 0;
-       unsigned block_size;
-       sector_t total_size;
-
-       ld_buff = kzalloc(sizeof(ReportLunData_struct), GFP_KERNEL);
-       if (ld_buff == NULL) {
-               printk(KERN_ERR "cciss: out of memory\n");
-               return;
-       }
-       inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL);
-       if (inq_buff == NULL) {
-               printk(KERN_ERR "cciss: out of memory\n");
-               kfree(ld_buff);
-               return;
-       }
-       /* Get the firmware version */
-       return_code = sendcmd(CISS_INQUIRY, cntl_num, inq_buff,
-                             sizeof(InquiryData_struct), 0, 0, 0, NULL,
-                             TYPE_CMD);
-       if (return_code == IO_OK) {
-               hba[cntl_num]->firm_ver[0] = inq_buff->data_byte[32];
-               hba[cntl_num]->firm_ver[1] = inq_buff->data_byte[33];
-               hba[cntl_num]->firm_ver[2] = inq_buff->data_byte[34];
-               hba[cntl_num]->firm_ver[3] = inq_buff->data_byte[35];
-       } else {                /* send command failed */
-
-               printk(KERN_WARNING "cciss: unable to determine firmware"
-                      " version of controller\n");
-       }
-       /* Get the number of logical volumes */
-       return_code = sendcmd(CISS_REPORT_LOG, cntl_num, ld_buff,
-                             sizeof(ReportLunData_struct), 0, 0, 0, NULL,
-                             TYPE_CMD);
-
-       if (return_code == IO_OK) {
-#ifdef CCISS_DEBUG
-               printk("LUN Data\n--------------------------\n");
-#endif                         /* CCISS_DEBUG */
-
-               listlength |=
-                   (0xff & (unsigned int)(ld_buff->LUNListLength[0])) << 24;
-               listlength |=
-                   (0xff & (unsigned int)(ld_buff->LUNListLength[1])) << 16;
-               listlength |=
-                   (0xff & (unsigned int)(ld_buff->LUNListLength[2])) << 8;
-               listlength |= 0xff & (unsigned int)(ld_buff->LUNListLength[3]);
-       } else {                /* reading number of logical volumes failed */
-
-               printk(KERN_WARNING "cciss: report logical volume"
-                      " command failed\n");
-               listlength = 0;
-       }
-       hba[cntl_num]->num_luns = listlength / 8;       // 8 bytes pre entry
-       if (hba[cntl_num]->num_luns > CISS_MAX_LUN) {
-               printk(KERN_ERR
-                      "ciss:  only %d number of logical volumes supported\n",
-                      CISS_MAX_LUN);
-               hba[cntl_num]->num_luns = CISS_MAX_LUN;
-       }
-#ifdef CCISS_DEBUG
-       printk(KERN_DEBUG "Length = %x %x %x %x = %d\n",
-              ld_buff->LUNListLength[0], ld_buff->LUNListLength[1],
-              ld_buff->LUNListLength[2], ld_buff->LUNListLength[3],
-              hba[cntl_num]->num_luns);
-#endif                         /* CCISS_DEBUG */
-
-       hba[cntl_num]->highest_lun = hba[cntl_num]->num_luns - 1;
-       for (i = 0; i < CISS_MAX_LUN; i++) {
-               if (i < hba[cntl_num]->num_luns) {
-                       lunid = (0xff & (unsigned int)(ld_buff->LUN[i][3]))
-                           << 24;
-                       lunid |= (0xff & (unsigned int)(ld_buff->LUN[i][2]))
-                           << 16;
-                       lunid |= (0xff & (unsigned int)(ld_buff->LUN[i][1]))
-                           << 8;
-                       lunid |= 0xff & (unsigned int)(ld_buff->LUN[i][0]);
-
-                       hba[cntl_num]->drv[i].LunID = lunid;
-
-#ifdef CCISS_DEBUG
-                       printk(KERN_DEBUG "LUN[%d]:  %x %x %x %x = %x\n", i,
-                              ld_buff->LUN[i][0], ld_buff->LUN[i][1],
-                              ld_buff->LUN[i][2], ld_buff->LUN[i][3],
-                              hba[cntl_num]->drv[i].LunID);
-#endif                         /* CCISS_DEBUG */
-
-               /* testing to see if 16-byte CDBs are already being used */
-               if(hba[cntl_num]->cciss_read == CCISS_READ_16) {
-                       cciss_read_capacity_16(cntl_num, i, 0,
-                                           &total_size, &block_size);
-                       goto geo_inq;
-               }
-               cciss_read_capacity(cntl_num, i, 0, &total_size, &block_size);
-
-               /* If read_capacity returns all F's the logical is >2TB */
-               /* so we switch to 16-byte CDBs for all read/write ops */
-               if(total_size == 0xFFFFFFFFULL) {
-                       cciss_read_capacity_16(cntl_num, i, 0,
-                       &total_size, &block_size);
-                       hba[cntl_num]->cciss_read = CCISS_READ_16;
-                       hba[cntl_num]->cciss_write = CCISS_WRITE_16;
-               } else {
-                       hba[cntl_num]->cciss_read = CCISS_READ_10;
-                       hba[cntl_num]->cciss_write = CCISS_WRITE_10;
-               }
-geo_inq:
-                       cciss_geometry_inquiry(cntl_num, i, 0, total_size,
-                                              block_size, inq_buff,
-                                              &hba[cntl_num]->drv[i]);
-               } else {
-                       /* initialize raid_level to indicate a free space */
-                       hba[cntl_num]->drv[i].raid_level = -1;
-               }
-       }
-       kfree(ld_buff);
-       kfree(inq_buff);
-}
-
-/* Function to find the first free pointer into our hba[] array */
-/* Returns -1 if no free entries are left.  */
 static int alloc_cciss_hba(void)
 {
        int i;
@@ -3340,11 +3369,6 @@ static int alloc_cciss_hba(void)
                        p = kzalloc(sizeof(ctlr_info_t), GFP_KERNEL);
                        if (!p)
                                goto Enomem;
-                       p->gendisk[0] = alloc_disk(1 << NWD_SHIFT);
-                       if (!p->gendisk[0]) {
-                               kfree(p);
-                               goto Enomem;
-                       }
                        hba[i] = p;
                        return i;
                }
@@ -3472,11 +3496,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
               ((hba[i]->nr_cmds + BITS_PER_LONG -
                 1) / BITS_PER_LONG) * sizeof(unsigned long));
 
-#ifdef CCISS_DEBUG
-       printk(KERN_DEBUG "Scanning for drives on controller cciss%d\n", i);
-#endif                         /* CCISS_DEBUG */
-
-       cciss_getgeometry(i);
+       hba[i]->num_luns = 0;
+       hba[i]->highest_lun = -1;
+       for (j = 0; j < CISS_MAX_LUN; j++) {
+               hba[i]->drv[j].raid_level = -1;
+               hba[i]->drv[j].queue = NULL;
+               hba[i]->gendisk[j] = NULL;
+       }
 
        cciss_scsi_setup(i);
 
@@ -3489,76 +3515,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
 
        hba[i]->busy_initializing = 0;
 
-       do {
-               drive_info_struct *drv = &(hba[i]->drv[j]);
-               struct gendisk *disk = hba[i]->gendisk[j];
-               struct request_queue *q;
-
-               /* Check if the disk was allocated already */
-               if (!disk){
-                       hba[i]->gendisk[j] = alloc_disk(1 << NWD_SHIFT);
-                       disk = hba[i]->gendisk[j];
-               }
-
-               /* Check that the disk was able to be allocated */
-               if (!disk) {
-                       printk(KERN_ERR "cciss: unable to allocate memory for disk %d\n", j);
-                       goto clean4;
-               }
-
-               q = blk_init_queue(do_cciss_request, &hba[i]->lock);
-               if (!q) {
-                       printk(KERN_ERR
-                              "cciss:  unable to allocate queue for disk %d\n",
-                              j);
-                       goto clean4;
-               }
-               drv->queue = q;
-
-               blk_queue_bounce_limit(q, hba[i]->pdev->dma_mask);
-
-               /* This is a hardware imposed limit. */
-               blk_queue_max_hw_segments(q, MAXSGENTRIES);
-
-               /* This is a limit in the driver and could be eliminated. */
-               blk_queue_max_phys_segments(q, MAXSGENTRIES);
-
-               blk_queue_max_sectors(q, hba[i]->cciss_max_sectors);
-
-               blk_queue_softirq_done(q, cciss_softirq_done);
-
-               q->queuedata = hba[i];
-               sprintf(disk->disk_name, "cciss/c%dd%d", i, j);
-               disk->major = hba[i]->major;
-               disk->first_minor = j << NWD_SHIFT;
-               disk->fops = &cciss_fops;
-               disk->queue = q;
-               disk->private_data = drv;
-               disk->driverfs_dev = &pdev->dev;
-               /* we must register the controller even if no disks exist */
-               /* this is for the online array utilities */
-               if (!drv->heads && j)
-                       continue;
-               blk_queue_hardsect_size(q, drv->block_size);
-               set_capacity(disk, drv->nr_blocks);
-               j++;
-       } while (j <= hba[i]->highest_lun);
-
-       /* Make sure all queue data is written out before */
-       /* interrupt handler, triggered by add_disk,  */
-       /* is allowed to start them. */
-       wmb();
-
-       for (j = 0; j <= hba[i]->highest_lun; j++)
-               add_disk(hba[i]->gendisk[j]);
-
-       /* we must register the controller even if no disks exist */
-       if (hba[i]->highest_lun == -1)
-               add_disk(hba[i]->gendisk[0]);
-
+       rebuild_lun_table(hba[i], 1);
        return 1;
 
-      clean4:
+clean4:
 #ifdef CONFIG_CISS_SCSI_TAPE
        kfree(hba[i]->scsi_rejects.complete);
 #endif
@@ -3573,9 +3533,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
                                    hba[i]->errinfo_pool,
                                    hba[i]->errinfo_pool_dhandle);
        free_irq(hba[i]->intr[SIMPLE_MODE_INT], hba[i]);
-      clean2:
+clean2:
        unregister_blkdev(hba[i]->major, hba[i]->devname);
-      clean1:
+clean1:
        hba[i]->busy_initializing = 0;
        /* cleanup any queues that may have been initialized */
        for (j=0; j <= hba[i]->highest_lun; j++){
@@ -3654,7 +3614,9 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
                }
        }
 
+#ifdef CONFIG_CISS_SCSI_TAPE
        cciss_unregister_scsi(i);       /* unhook from SCSI subsystem */
+#endif
 
        cciss_shutdown(pdev);
 
index b70988d..24a7efa 100644 (file)
@@ -39,6 +39,8 @@ typedef struct _drive_info_struct
                                   *to prevent it from being opened or it's queue
                                   *from being started.
                                  */
+       __u8 serial_no[16]; /* from inquiry page 0x83, */
+                           /* not necc. null terminated. */
 } drive_info_struct;
 
 #ifdef CONFIG_CISS_SCSI_TAPE
index e4bf9a1..e1233aa 100644 (file)
@@ -358,23 +358,68 @@ find_bus_target_lun(int ctlr, int *bus, int *target, int *lun)
        }
        return (!found);        
 }
+struct scsi2map {
+       char scsi3addr[8];
+       int bus, target, lun;
+};
 
 static int 
 cciss_scsi_add_entry(int ctlr, int hostno, 
-               unsigned char *scsi3addr, int devtype)
+               unsigned char *scsi3addr, int devtype,
+               struct scsi2map *added, int *nadded)
 {
        /* assumes hba[ctlr]->scsi_ctlr->lock is held */ 
        int n = ccissscsi[ctlr].ndevices;
        struct cciss_scsi_dev_t *sd;
+       int i, bus, target, lun;
+       unsigned char addr1[8], addr2[8];
 
        if (n >= CCISS_MAX_SCSI_DEVS_PER_HBA) {
                printk("cciss%d: Too many devices, "
                        "some will be inaccessible.\n", ctlr);
                return -1;
        }
+
+       bus = target = -1;
+       lun = 0;
+       /* Is this device a non-zero lun of a multi-lun device */
+       /* byte 4 of the 8-byte LUN addr will contain the logical unit no. */
+       if (scsi3addr[4] != 0) {
+               /* Search through our list and find the device which */
+               /* has the same 8 byte LUN address, excepting byte 4. */
+               /* Assign the same bus and target for this new LUN. */
+               /* Use the logical unit number from the firmware. */
+               memcpy(addr1, scsi3addr, 8);
+               addr1[4] = 0;
+               for (i = 0; i < n; i++) {
+                       sd = &ccissscsi[ctlr].dev[i];
+                       memcpy(addr2, sd->scsi3addr, 8);
+                       addr2[4] = 0;
+                       /* differ only in byte 4? */
+                       if (memcmp(addr1, addr2, 8) == 0) {
+                               bus = sd->bus;
+                               target = sd->target;
+                               lun = scsi3addr[4];
+                               break;
+                       }
+               }
+       }
+
        sd = &ccissscsi[ctlr].dev[n];
-       if (find_bus_target_lun(ctlr, &sd->bus, &sd->target, &sd->lun) != 0)
-               return -1;
+       if (lun == 0) {
+               if (find_bus_target_lun(ctlr,
+                       &sd->bus, &sd->target, &sd->lun) != 0)
+                       return -1;
+       } else {
+               sd->bus = bus;
+               sd->target = target;
+               sd->lun = lun;
+       }
+       added[*nadded].bus = sd->bus;
+       added[*nadded].target = sd->target;
+       added[*nadded].lun = sd->lun;
+       (*nadded)++;
+
        memcpy(&sd->scsi3addr[0], scsi3addr, 8);
        sd->devtype = devtype;
        ccissscsi[ctlr].ndevices++;
@@ -390,7 +435,8 @@ cciss_scsi_add_entry(int ctlr, int hostno,
 }
 
 static void
-cciss_scsi_remove_entry(int ctlr, int hostno, int entry)
+cciss_scsi_remove_entry(int ctlr, int hostno, int entry,
+       struct scsi2map *removed, int *nremoved)
 {
        /* assumes hba[ctlr]->scsi_ctlr->lock is held */ 
        int i;
@@ -398,6 +444,10 @@ cciss_scsi_remove_entry(int ctlr, int hostno, int entry)
 
        if (entry < 0 || entry >= CCISS_MAX_SCSI_DEVS_PER_HBA) return;
        sd = ccissscsi[ctlr].dev[entry];
+       removed[*nremoved].bus    = sd.bus;
+       removed[*nremoved].target = sd.target;
+       removed[*nremoved].lun    = sd.lun;
+       (*nremoved)++;
        for (i=entry;i<ccissscsi[ctlr].ndevices-1;i++)
                ccissscsi[ctlr].dev[i] = ccissscsi[ctlr].dev[i+1];
        ccissscsi[ctlr].ndevices--;
@@ -417,6 +467,26 @@ cciss_scsi_remove_entry(int ctlr, int hostno, int entry)
        (a)[1] == (b)[1] && \
        (a)[0] == (b)[0])
 
+static void fixup_botched_add(int ctlr, char *scsi3addr)
+{
+       /* called when scsi_add_device fails in order to re-adjust */
+       /* ccissscsi[] to match the mid layer's view. */
+       unsigned long flags;
+       int i, j;
+       CPQ_TAPE_LOCK(ctlr, flags);
+       for (i = 0; i < ccissscsi[ctlr].ndevices; i++) {
+               if (memcmp(scsi3addr,
+                               ccissscsi[ctlr].dev[i].scsi3addr, 8) == 0) {
+                       for (j = i; j < ccissscsi[ctlr].ndevices-1; j++)
+                               ccissscsi[ctlr].dev[j] =
+                                       ccissscsi[ctlr].dev[j+1];
+                       ccissscsi[ctlr].ndevices--;
+                       break;
+               }
+       }
+       CPQ_TAPE_UNLOCK(ctlr, flags);
+}
+
 static int
 adjust_cciss_scsi_table(int ctlr, int hostno,
        struct cciss_scsi_dev_t sd[], int nsds)
@@ -429,13 +499,33 @@ adjust_cciss_scsi_table(int ctlr, int hostno,
        int i,j, found, changes=0;
        struct cciss_scsi_dev_t *csd;
        unsigned long flags;
+       struct scsi2map *added, *removed;
+       int nadded, nremoved;
+       struct Scsi_Host *sh = NULL;
+
+       added = kzalloc(sizeof(*added) * CCISS_MAX_SCSI_DEVS_PER_HBA,
+                       GFP_KERNEL);
+       removed = kzalloc(sizeof(*removed) * CCISS_MAX_SCSI_DEVS_PER_HBA,
+                       GFP_KERNEL);
+
+       if (!added || !removed) {
+               printk(KERN_WARNING "cciss%d: Out of memory in "
+                       "adjust_cciss_scsi_table\n", ctlr);
+               goto free_and_out;
+       }
 
        CPQ_TAPE_LOCK(ctlr, flags);
 
+       if (hostno != -1)  /* if it's not the first time... */
+               sh = ((struct cciss_scsi_adapter_data_t *)
+                       hba[ctlr]->scsi_ctlr)->scsi_host;
+
        /* find any devices in ccissscsi[] that are not in 
           sd[] and remove them from ccissscsi[] */
 
        i = 0;
+       nremoved = 0;
+       nadded = 0;
        while(i<ccissscsi[ctlr].ndevices) {
                csd = &ccissscsi[ctlr].dev[i];
                found=0;
@@ -455,8 +545,9 @@ adjust_cciss_scsi_table(int ctlr, int hostno,
                        /* printk("cciss%d: %s device c%db%dt%dl%d removed.\n",
                                ctlr, scsi_device_type(csd->devtype), hostno,
                                        csd->bus, csd->target, csd->lun); */
-                       cciss_scsi_remove_entry(ctlr, hostno, i);
-                       /* note, i not incremented */
+                       cciss_scsi_remove_entry(ctlr, hostno, i,
+                               removed, &nremoved);
+                       /* remove ^^^, hence i not incremented */
                } 
                else if (found == 1) { /* device is different kind */
                        changes++;
@@ -464,8 +555,15 @@ adjust_cciss_scsi_table(int ctlr, int hostno,
                                "(device type now %s).\n",
                                ctlr, hostno, csd->bus, csd->target, csd->lun,
                                        scsi_device_type(csd->devtype));
+                       cciss_scsi_remove_entry(ctlr, hostno, i,
+                               removed, &nremoved);
+                       /* remove ^^^, hence i not incremented */
+                       if (cciss_scsi_add_entry(ctlr, hostno,
+                               &sd[j].scsi3addr[0], sd[j].devtype,
+                               added, &nadded) != 0)
+                               /* we just removed one, so add can't fail. */
+                                       BUG();
                        csd->devtype = sd[j].devtype;
-                       i++;    /* so just move along. */
                } else          /* device is same as it ever was, */
                        i++;    /* so just move along. */
        }
@@ -489,7 +587,9 @@ adjust_cciss_scsi_table(int ctlr, int hostno,
                if (!found) {
                        changes++;
                        if (cciss_scsi_add_entry(ctlr, hostno, 
-                               &sd[i].scsi3addr[0], sd[i].devtype) != 0)
+
+                               &sd[i].scsi3addr[0], sd[i].devtype,
+                               added, &nadded) != 0)
                                break;
                } else if (found == 1) {
                        /* should never happen... */
@@ -501,9 +601,50 @@ adjust_cciss_scsi_table(int ctlr, int hostno,
        }
        CPQ_TAPE_UNLOCK(ctlr, flags);
 
-       if (!changes) 
-               printk("cciss%d: No device changes detected.\n", ctlr);
+       /* Don't notify scsi mid layer of any changes the first time through */
+       /* (or if there are no changes) scsi_scan_host will do it later the */
+       /* first time through. */
+       if (hostno == -1 || !changes)
+               goto free_and_out;
+
+       /* Notify scsi mid layer of any removed devices */
+       for (i = 0; i < nremoved; i++) {
+               struct scsi_device *sdev =
+                       scsi_device_lookup(sh, removed[i].bus,
+                               removed[i].target, removed[i].lun);
+               if (sdev != NULL) {
+                       scsi_remove_device(sdev);
+                       scsi_device_put(sdev);
+               } else {
+                       /* We don't expect to get here. */
+                       /* future cmds to this device will get selection */
+                       /* timeout as if the device was gone. */
+                       printk(KERN_WARNING "cciss%d: didn't find "
+                               "c%db%dt%dl%d\n for removal.",
+                               ctlr, hostno, removed[i].bus,
+                               removed[i].target, removed[i].lun);
+               }
+       }
+
+       /* Notify scsi mid layer of any added devices */
+       for (i = 0; i < nadded; i++) {
+               int rc;
+               rc = scsi_add_device(sh, added[i].bus,
+                       added[i].target, added[i].lun);
+               if (rc == 0)
+                       continue;
+               printk(KERN_WARNING "cciss%d: scsi_add_device "
+                       "c%db%dt%dl%d failed, device not added.\n",
+                       ctlr, hostno,
+                       added[i].bus, added[i].target, added[i].lun);
+               /* now we have to remove it from ccissscsi, */
+               /* since it didn't get added to scsi mid layer */
+               fixup_botched_add(ctlr, added[i].scsi3addr);
+       }
 
+free_and_out:
+       kfree(added);
+       kfree(removed);
        return 0;
 }
 
@@ -1355,32 +1496,6 @@ cciss_unregister_scsi(int ctlr)
 }
 
 static int 
-cciss_register_scsi(int ctlr)
-{
-       unsigned long flags;
-
-       CPQ_TAPE_LOCK(ctlr, flags);
-
-       /* Since this is really a block driver, the SCSI core may not be 
-          initialized at init time, in which case, calling scsi_register_host
-          would hang.  Instead, we do it later, via /proc filesystem
-          and rc scripts, when we know SCSI core is good to go. */
-
-       /* Only register if SCSI devices are detected. */
-       if (ccissscsi[ctlr].ndevices != 0) {
-               ((struct cciss_scsi_adapter_data_t *) 
-                       hba[ctlr]->scsi_ctlr)->registered = 1;
-               CPQ_TAPE_UNLOCK(ctlr, flags);
-               return cciss_scsi_detect(ctlr);
-       }
-       CPQ_TAPE_UNLOCK(ctlr, flags);
-       printk(KERN_INFO 
-               "cciss%d: No appropriate SCSI device detected, "
-               "SCSI subsystem not engaged.\n", ctlr);
-       return 0;
-}
-
-static int 
 cciss_engage_scsi(int ctlr)
 {
        struct cciss_scsi_adapter_data_t *sa;
@@ -1391,15 +1506,15 @@ cciss_engage_scsi(int ctlr)
        sa = (struct cciss_scsi_adapter_data_t *) hba[ctlr]->scsi_ctlr;
        stk = &sa->cmd_stack; 
 
-       if (((struct cciss_scsi_adapter_data_t *) 
-               hba[ctlr]->scsi_ctlr)->registered) {
+       if (sa->registered) {
                printk("cciss%d: SCSI subsystem already engaged.\n", ctlr);
                spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
                return ENXIO;
        }
+       sa->registered = 1;
        spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
        cciss_update_non_disk_devices(ctlr, -1);
-       cciss_register_scsi(ctlr);
+       cciss_scsi_detect(ctlr);
        return 0;
 }
 
@@ -1493,7 +1608,5 @@ static int  cciss_eh_abort_handler(struct scsi_cmnd *scsicmd)
 /* If no tape support, then these become defined out of existence */
 
 #define cciss_scsi_setup(cntl_num)
-#define cciss_unregister_scsi(ctlr)
-#define cciss_register_scsi(ctlr)
 
 #endif /* CONFIG_CISS_SCSI_TAPE */
index 9ae05c5..3ca643c 100644 (file)
@@ -154,8 +154,8 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg)
        return 0;
 }
 
-int blkif_ioctl(struct inode *inode, struct file *filep,
-               unsigned command, unsigned long argument)
+static int blkif_ioctl(struct inode *inode, struct file *filep,
+                      unsigned command, unsigned long argument)
 {
        struct blkfront_info *info =
                inode->i_bdev->bd_disk->private_data;
index d0ac944..caff851 100644 (file)
@@ -8,7 +8,7 @@ config VT
        bool "Virtual terminal" if EMBEDDED
        depends on !S390
        select INPUT
-       default y if !VIOCONS
+       default y
        ---help---
          If you say Y here, you will get support for terminal devices with
          display and keyboard devices. These are called "virtual" because you
index 8a161c3..6850f6d 100644 (file)
@@ -55,7 +55,6 @@ obj-$(CONFIG_RAW_DRIVER)      += raw.o
 obj-$(CONFIG_SGI_SNSC)         += snsc.o snsc_event.o
 obj-$(CONFIG_MSPEC)            += mspec.o
 obj-$(CONFIG_MMTIMER)          += mmtimer.o
-obj-$(CONFIG_VIOCONS)          += viocons.o
 obj-$(CONFIG_VIOTAPE)          += viotape.o
 obj-$(CONFIG_HVCS)             += hvcs.o
 obj-$(CONFIG_IBM_BSR)          += bsr.o
index 3530ff4..6e763e3 100644 (file)
@@ -1254,7 +1254,7 @@ static int rs_break(struct tty_struct *tty, int break_state)
        unsigned long flags;
 
        if (serial_paranoia_check(info, tty->name, "rs_break"))
-               return;
+               return -EINVAL;
 
        local_irq_save(flags);
        if (break_state == -1)
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
deleted file mode 100644 (file)
index 65fb848..0000000
+++ /dev/null
@@ -1,1171 +0,0 @@
-/* -*- linux-c -*-
- *
- *  drivers/char/viocons.c
- *
- *  iSeries Virtual Terminal
- *
- *  Authors: Dave Boutcher <boutcher@us.ibm.com>
- *           Ryan Arnold <ryanarn@us.ibm.com>
- *           Colin Devilbiss <devilbis@us.ibm.com>
- *           Stephen Rothwell
- *
- * (C) Copyright 2000, 2001, 2002, 2003, 2004 IBM Corporation
- *
- * This program is free software;  you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) anyu later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include <linux/kernel.h>
-#include <linux/proc_fs.h>
-#include <linux/errno.h>
-#include <linux/vmalloc.h>
-#include <linux/mm.h>
-#include <linux/console.h>
-#include <linux/module.h>
-#include <asm/uaccess.h>
-#include <linux/init.h>
-#include <linux/wait.h>
-#include <linux/spinlock.h>
-#include <asm/ioctls.h>
-#include <linux/kd.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/sysrq.h>
-
-#include <asm/firmware.h>
-#include <asm/iseries/vio.h>
-#include <asm/iseries/hv_lp_event.h>
-#include <asm/iseries/hv_call_event.h>
-#include <asm/iseries/hv_lp_config.h>
-#include <asm/iseries/hv_call.h>
-
-#ifdef CONFIG_VT
-#error You must turn off CONFIG_VT to use CONFIG_VIOCONS
-#endif
-
-#define VIOTTY_MAGIC (0x0DCB)
-#define VTTY_PORTS 10
-
-#define VIOCONS_KERN_WARN      KERN_WARNING "viocons: "
-#define VIOCONS_KERN_INFO      KERN_INFO "viocons: "
-
-static DEFINE_SPINLOCK(consolelock);
-static DEFINE_SPINLOCK(consoleloglock);
-
-static int vio_sysrq_pressed;
-
-#define VIOCHAR_NUM_BUF                16
-
-/*
- * Our port information.  We store a pointer to one entry in the
- * tty_driver_data
- */
-static struct port_info {
-       int magic;
-       struct tty_struct *tty;
-       HvLpIndex lp;
-       u8 vcons;
-       u64 seq;        /* sequence number of last HV send */
-       u64 ack;        /* last ack from HV */
-/*
- * When we get writes faster than we can send it to the partition,
- * buffer the data here. Note that used is a bit map of used buffers.
- * It had better have enough bits to hold VIOCHAR_NUM_BUF the bitops assume
- * it is a multiple of unsigned long
- */
-       unsigned long used;
-       u8 *buffer[VIOCHAR_NUM_BUF];
-       int bufferBytes[VIOCHAR_NUM_BUF];
-       int curbuf;
-       int bufferOverflow;
-       int overflowMessage;
-} port_info[VTTY_PORTS];
-
-#define viochar_is_console(pi) ((pi) == &port_info[0])
-#define viochar_port(pi)       ((pi) - &port_info[0])
-
-static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp);
-
-static struct tty_driver *viotty_driver;
-
-static void hvlog(char *fmt, ...)
-{
-       int i;
-       unsigned long flags;
-       va_list args;
-       static char buf[256];
-
-       spin_lock_irqsave(&consoleloglock, flags);
-       va_start(args, fmt);
-       i = vscnprintf(buf, sizeof(buf) - 1, fmt, args);
-       va_end(args);
-       buf[i++] = '\r';
-       HvCall_writeLogBuffer(buf, i);
-       spin_unlock_irqrestore(&consoleloglock, flags);
-}
-
-static void hvlogOutput(const char *buf, int count)
-{
-       unsigned long flags;
-       int begin;
-       int index;
-       static const char cr = '\r';
-
-       begin = 0;
-       spin_lock_irqsave(&consoleloglock, flags);
-       for (index = 0; index < count; index++) {
-               if (buf[index] == '\n') {
-                       /*
-                        * Start right after the last '\n' or at the zeroth
-                        * array position and output the number of characters
-                        * including the newline.
-                        */
-                       HvCall_writeLogBuffer(&buf[begin], index - begin + 1);
-                       begin = index + 1;
-                       HvCall_writeLogBuffer(&cr, 1);
-               }
-       }
-       if ((index - begin) > 0)
-               HvCall_writeLogBuffer(&buf[begin], index - begin);
-       spin_unlock_irqrestore(&consoleloglock, flags);
-}
-
-/*
- * Make sure we're pointing to a valid port_info structure.  Shamelessly
- * plagerized from serial.c
- */
-static inline int viotty_paranoia_check(struct port_info *pi,
-                                       char *name, const char *routine)
-{
-       static const char *bad_pi_addr = VIOCONS_KERN_WARN
-               "warning: bad address for port_info struct (%s) in %s\n";
-       static const char *badmagic = VIOCONS_KERN_WARN
-               "warning: bad magic number for port_info struct (%s) in %s\n";
-
-       if ((pi < &port_info[0]) || (viochar_port(pi) > VTTY_PORTS)) {
-               printk(bad_pi_addr, name, routine);
-               return 1;
-       }
-       if (pi->magic != VIOTTY_MAGIC) {
-               printk(badmagic, name, routine);
-               return 1;
-       }
-       return 0;
-}
-
-/*
- * Add data to our pending-send buffers.  
- *
- * NOTE: Don't use printk in here because it gets nastily recursive.
- * hvlog can be used to log to the hypervisor buffer
- */
-static int buffer_add(struct port_info *pi, const char *buf, size_t len)
-{
-       size_t bleft;
-       size_t curlen;
-       const char *curbuf;
-       int nextbuf;
-
-       curbuf = buf;
-       bleft = len;
-       while (bleft > 0) {
-               /*
-                * If there is no space left in the current buffer, we have
-                * filled everything up, so return.  If we filled the previous
-                * buffer we would already have moved to the next one.
-                */
-               if (pi->bufferBytes[pi->curbuf] == VIOCHAR_MAX_DATA) {
-                       hvlog ("\n\rviocons: No overflow buffer available for memcpy().\n");
-                       pi->bufferOverflow++;
-                       pi->overflowMessage = 1;
-                       break;
-               }
-
-               /*
-                * Turn on the "used" bit for this buffer.  If it's already on,
-                * that's fine.
-                */
-               set_bit(pi->curbuf, &pi->used);
-
-               /*
-                * See if this buffer has been allocated.  If not, allocate it.
-                */
-               if (pi->buffer[pi->curbuf] == NULL) {
-                       pi->buffer[pi->curbuf] =
-                           kmalloc(VIOCHAR_MAX_DATA, GFP_ATOMIC);
-                       if (pi->buffer[pi->curbuf] == NULL) {
-                               hvlog("\n\rviocons: kmalloc failed allocating spaces for buffer %d.",
-                                       pi->curbuf);
-                               break;
-                       }
-               }
-
-               /* Figure out how much we can copy into this buffer. */
-               if (bleft < (VIOCHAR_MAX_DATA - pi->bufferBytes[pi->curbuf]))
-                       curlen = bleft;
-               else
-                       curlen = VIOCHAR_MAX_DATA - pi->bufferBytes[pi->curbuf];
-
-               /* Copy the data into the buffer. */
-               memcpy(pi->buffer[pi->curbuf] + pi->bufferBytes[pi->curbuf],
-                               curbuf, curlen);
-
-               pi->bufferBytes[pi->curbuf] += curlen;
-               curbuf += curlen;
-               bleft -= curlen;
-
-               /*
-                * Now see if we've filled this buffer.  If not then
-                * we'll try to use it again later.  If we've filled it
-                * up then we'll advance the curbuf to the next in the
-                * circular queue.
-                */
-               if (pi->bufferBytes[pi->curbuf] == VIOCHAR_MAX_DATA) {
-                       nextbuf = (pi->curbuf + 1) % VIOCHAR_NUM_BUF;
-                       /*
-                        * Move to the next buffer if it hasn't been used yet
-                        */
-                       if (test_bit(nextbuf, &pi->used) == 0)
-                               pi->curbuf = nextbuf;
-               }
-       }
-       return len - bleft;
-}
-
-/*
- * Send pending data
- *
- * NOTE: Don't use printk in here because it gets nastily recursive.
- * hvlog can be used to log to the hypervisor buffer
- */
-static void send_buffers(struct port_info *pi)
-{
-       HvLpEvent_Rc hvrc;
-       int nextbuf;
-       struct viocharlpevent *viochar;
-       unsigned long flags;
-
-       spin_lock_irqsave(&consolelock, flags);
-
-       viochar = (struct viocharlpevent *)
-           vio_get_event_buffer(viomajorsubtype_chario);
-
-       /* Make sure we got a buffer */
-       if (viochar == NULL) {
-               hvlog("\n\rviocons: Can't get viochar buffer in sendBuffers().");
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-
-       if (pi->used == 0) {
-               hvlog("\n\rviocons: in sendbuffers(), but no buffers used.\n");
-               vio_free_event_buffer(viomajorsubtype_chario, viochar);
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-
-       /*
-        * curbuf points to the buffer we're filling.  We want to
-        * start sending AFTER this one.  
-        */
-       nextbuf = (pi->curbuf + 1) % VIOCHAR_NUM_BUF;
-
-       /*
-        * Loop until we find a buffer with the used bit on
-        */
-       while (test_bit(nextbuf, &pi->used) == 0)
-               nextbuf = (nextbuf + 1) % VIOCHAR_NUM_BUF;
-
-       initDataEvent(viochar, pi->lp);
-
-       /*
-        * While we have buffers with data, and our send window
-        * is open, send them
-        */
-       while ((test_bit(nextbuf, &pi->used)) &&
-              ((pi->seq - pi->ack) < VIOCHAR_WINDOW)) {
-               viochar->len = pi->bufferBytes[nextbuf];
-               viochar->event.xCorrelationToken = pi->seq++;
-               viochar->event.xSizeMinus1 =
-                       offsetof(struct viocharlpevent, data) + viochar->len;
-
-               memcpy(viochar->data, pi->buffer[nextbuf], viochar->len);
-
-               hvrc = HvCallEvent_signalLpEvent(&viochar->event);
-               if (hvrc) {
-                       /*
-                        * MUST unlock the spinlock before doing a printk
-                        */
-                       vio_free_event_buffer(viomajorsubtype_chario, viochar);
-                       spin_unlock_irqrestore(&consolelock, flags);
-
-                       printk(VIOCONS_KERN_WARN
-                              "error sending event! return code %d\n",
-                              (int)hvrc);
-                       return;
-               }
-
-               /*
-                * clear the used bit, zero the number of bytes in
-                * this buffer, and move to the next buffer
-                */
-               clear_bit(nextbuf, &pi->used);
-               pi->bufferBytes[nextbuf] = 0;
-               nextbuf = (nextbuf + 1) % VIOCHAR_NUM_BUF;
-       }
-
-       /*
-        * If we have emptied all the buffers, start at 0 again.
-        * this will re-use any allocated buffers
-        */
-       if (pi->used == 0) {
-               pi->curbuf = 0;
-
-               if (pi->overflowMessage)
-                       pi->overflowMessage = 0;
-
-               if (pi->tty) {
-                       tty_wakeup(pi->tty);
-               }
-       }
-
-       vio_free_event_buffer(viomajorsubtype_chario, viochar);
-       spin_unlock_irqrestore(&consolelock, flags);
-}
-
-/*
- * Our internal writer.  Gets called both from the console device and
- * the tty device.  the tty pointer will be NULL if called from the console.
- * Return total number of bytes "written".
- *
- * NOTE: Don't use printk in here because it gets nastily recursive.  hvlog
- * can be used to log to the hypervisor buffer
- */
-static int internal_write(struct port_info *pi, const char *buf, size_t len)
-{
-       HvLpEvent_Rc hvrc;
-       size_t bleft;
-       size_t curlen;
-       const char *curbuf;
-       unsigned long flags;
-       struct viocharlpevent *viochar;
-
-       /*
-        * Write to the hvlog of inbound data are now done prior to
-        * calling internal_write() since internal_write() is only called in
-        * the event that an lp event path is active, which isn't the case for
-        * logging attempts prior to console initialization.
-        *
-        * If there is already data queued for this port, send it prior to
-        * attempting to send any new data.
-        */
-       if (pi->used)
-               send_buffers(pi);
-
-       spin_lock_irqsave(&consolelock, flags);
-
-       viochar = vio_get_event_buffer(viomajorsubtype_chario);
-       if (viochar == NULL) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               hvlog("\n\rviocons: Can't get vio buffer in internal_write().");
-               return -EAGAIN;
-       }
-       initDataEvent(viochar, pi->lp);
-
-       curbuf = buf;
-       bleft = len;
-
-       while ((bleft > 0) && (pi->used == 0) &&
-              ((pi->seq - pi->ack) < VIOCHAR_WINDOW)) {
-               if (bleft > VIOCHAR_MAX_DATA)
-                       curlen = VIOCHAR_MAX_DATA;
-               else
-                       curlen = bleft;
-
-               viochar->event.xCorrelationToken = pi->seq++;
-               memcpy(viochar->data, curbuf, curlen);
-               viochar->len = curlen;
-               viochar->event.xSizeMinus1 =
-                   offsetof(struct viocharlpevent, data) + curlen;
-
-               hvrc = HvCallEvent_signalLpEvent(&viochar->event);
-               if (hvrc) {
-                       hvlog("viocons: error sending event! %d\n", (int)hvrc);
-                       goto out;
-               }
-               curbuf += curlen;
-               bleft -= curlen;
-       }
-
-       /* If we didn't send it all, buffer as much of it as we can. */
-       if (bleft > 0)
-               bleft -= buffer_add(pi, curbuf, bleft);
-out:
-       vio_free_event_buffer(viomajorsubtype_chario, viochar);
-       spin_unlock_irqrestore(&consolelock, flags);
-       return len - bleft;
-}
-
-static struct port_info *get_port_data(struct tty_struct *tty)
-{
-       unsigned long flags;
-       struct port_info *pi;
-
-       spin_lock_irqsave(&consolelock, flags);
-       if (tty) {
-               pi = (struct port_info *)tty->driver_data;
-               if (!pi || viotty_paranoia_check(pi, tty->name,
-                                            "get_port_data")) {
-                       pi = NULL;
-               }
-       } else
-               /*
-                * If this is the console device, use the lp from
-                * the first port entry
-                */
-               pi = &port_info[0];
-       spin_unlock_irqrestore(&consolelock, flags);
-       return pi;
-}
-
-/*
- * Initialize the common fields in a charLpEvent
- */
-static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp)
-{
-       struct HvLpEvent *hev = &viochar->event;
-
-       memset(viochar, 0, sizeof(struct viocharlpevent));
-
-       hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DEFERRED_ACK |
-               HV_LP_EVENT_INT;
-       hev->xType = HvLpEvent_Type_VirtualIo;
-       hev->xSubtype = viomajorsubtype_chario | viochardata;
-       hev->xSourceLp = HvLpConfig_getLpIndex();
-       hev->xTargetLp = lp;
-       hev->xSizeMinus1 = sizeof(struct viocharlpevent);
-       hev->xSourceInstanceId = viopath_sourceinst(lp);
-       hev->xTargetInstanceId = viopath_targetinst(lp);
-}
-
-/*
- * early console device write
- */
-static void viocons_write_early(struct console *co, const char *s, unsigned count)
-{
-       hvlogOutput(s, count);
-}
-
-/*
- * console device write
- */
-static void viocons_write(struct console *co, const char *s, unsigned count)
-{
-       int index;
-       int begin;
-       struct port_info *pi;
-
-       static const char cr = '\r';
-
-       /*
-        * Check port data first because the target LP might be valid but
-        * simply not active, in which case we want to hvlog the output.
-        */
-       pi = get_port_data(NULL);
-       if (pi == NULL) {
-               hvlog("\n\rviocons_write: unable to get port data.");
-               return;
-       }
-
-       hvlogOutput(s, count);
-
-       if (!viopath_isactive(pi->lp))
-               return;
-
-       /* 
-        * Any newline character found will cause a
-        * carriage return character to be emitted as well. 
-        */
-       begin = 0;
-       for (index = 0; index < count; index++) {
-               if (s[index] == '\n') {
-                       /* 
-                        * Newline found. Print everything up to and 
-                        * including the newline
-                        */
-                       internal_write(pi, &s[begin], index - begin + 1);
-                       begin = index + 1;
-                       /* Emit a carriage return as well */
-                       internal_write(pi, &cr, 1);
-               }
-       }
-
-       /* If any characters left to write, write them now */
-       if ((index - begin) > 0)
-               internal_write(pi, &s[begin], index - begin);
-}
-
-/*
- * Work out the device associate with this console
- */
-static struct tty_driver *viocons_device(struct console *c, int *index)
-{
-       *index = c->index;
-       return viotty_driver;
-}
-
-/*
- * console device I/O methods
- */
-static struct console viocons_early = {
-       .name = "viocons",
-       .write = viocons_write_early,
-       .flags = CON_PRINTBUFFER,
-       .index = -1,
-};
-
-static struct console viocons = {
-       .name = "viocons",
-       .write = viocons_write,
-       .device = viocons_device,
-       .flags = CON_PRINTBUFFER,
-       .index = -1,
-};
-
-/*
- * TTY Open method
- */
-static int viotty_open(struct tty_struct *tty, struct file *filp)
-{
-       int port;
-       unsigned long flags;
-       struct port_info *pi;
-
-       port = tty->index;
-
-       if ((port < 0) || (port >= VTTY_PORTS))
-               return -ENODEV;
-
-       spin_lock_irqsave(&consolelock, flags);
-
-       pi = &port_info[port];
-       /* If some other TTY is already connected here, reject the open */
-       if ((pi->tty) && (pi->tty != tty)) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(VIOCONS_KERN_WARN
-                      "attempt to open device twice from different ttys\n");
-               return -EBUSY;
-       }
-       tty->driver_data = pi;
-       pi->tty = tty;
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       return 0;
-}
-
-/*
- * TTY Close method
- */
-static void viotty_close(struct tty_struct *tty, struct file *filp)
-{
-       unsigned long flags;
-       struct port_info *pi;
-
-       spin_lock_irqsave(&consolelock, flags);
-       pi = (struct port_info *)tty->driver_data;
-
-       if (!pi || viotty_paranoia_check(pi, tty->name, "viotty_close")) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-       if (tty->count == 1)
-               pi->tty = NULL;
-       spin_unlock_irqrestore(&consolelock, flags);
-}
-
-/*
- * TTY Write method
- */
-static int viotty_write(struct tty_struct *tty, const unsigned char *buf,
-               int count)
-{
-       struct port_info *pi;
-
-       pi = get_port_data(tty);
-       if (pi == NULL) {
-               hvlog("\n\rviotty_write: no port data.");
-               return -ENODEV;
-       }
-
-       if (viochar_is_console(pi))
-               hvlogOutput(buf, count);
-
-       /*
-        * If the path to this LP is closed, don't bother doing anything more.
-        * just dump the data on the floor and return count.  For some reason
-        * some user level programs will attempt to probe available tty's and
-        * they'll attempt a viotty_write on an invalid port which maps to an
-        * invalid target lp.  If this is the case then ignore the
-        * viotty_write call and, since the viopath isn't active to this
-        * partition, return count.
-        */
-       if (!viopath_isactive(pi->lp))
-               return count;
-
-       return internal_write(pi, buf, count);
-}
-
-/*
- * TTY put_char method
- */
-static int viotty_put_char(struct tty_struct *tty, unsigned char ch)
-{
-       struct port_info *pi;
-
-       pi = get_port_data(tty);
-       if (pi == NULL)
-               return 0;
-
-       /* This will append '\r' as well if the char is '\n' */
-       if (viochar_is_console(pi))
-               hvlogOutput(&ch, 1);
-
-       if (viopath_isactive(pi->lp))
-               internal_write(pi, &ch, 1);
-       return 1;
-}
-
-/*
- * TTY write_room method
- */
-static int viotty_write_room(struct tty_struct *tty)
-{
-       int i;
-       int room = 0;
-       struct port_info *pi;
-       unsigned long flags;
-
-       spin_lock_irqsave(&consolelock, flags);
-       pi = (struct port_info *)tty->driver_data;
-       if (!pi || viotty_paranoia_check(pi, tty->name, "viotty_write_room")) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return 0;
-       }
-
-       /* If no buffers are used, return the max size. */
-       if (pi->used == 0) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return VIOCHAR_MAX_DATA * VIOCHAR_NUM_BUF;
-       }
-
-       /*
-        * We retain the spinlock because we want to get an accurate
-        * count and it can change on us between each operation if we
-        * don't hold the spinlock.
-        */
-       for (i = 0; ((i < VIOCHAR_NUM_BUF) && (room < VIOCHAR_MAX_DATA)); i++)
-               room += (VIOCHAR_MAX_DATA - pi->bufferBytes[i]);
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       if (room > VIOCHAR_MAX_DATA)
-               room = VIOCHAR_MAX_DATA;
-       return room;
-}
-
-/*
- * TTY chars_in_buffer method
- */
-static int viotty_chars_in_buffer(struct tty_struct *tty)
-{
-       return 0;
-}
-
-static int viotty_ioctl(struct tty_struct *tty, struct file *file,
-                       unsigned int cmd, unsigned long arg)
-{
-       switch (cmd) {
-       /*
-        * the ioctls below read/set the flags usually shown in the leds
-        * don't use them - they will go away without warning
-        */
-       case KDGETLED:
-       case KDGKBLED:
-               return put_user(0, (char *)arg);
-
-       case KDSKBLED:
-               return 0;
-       }
-       /* FIXME: WTF is this being called for ??? */
-       lock_kernel();
-       ret =  n_tty_ioctl(tty, file, cmd, arg);
-       unlock_kernel();
-       return ret;
-}
-
-/*
- * Handle an open charLpEvent.  Could be either interrupt or ack
- */
-static void vioHandleOpenEvent(struct HvLpEvent *event)
-{
-       unsigned long flags;
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       u8 port = cevent->virtual_device;
-       struct port_info *pi;
-       int reject = 0;
-
-       if (hvlpevent_is_ack(event)) {
-               if (port >= VTTY_PORTS)
-                       return;
-
-               spin_lock_irqsave(&consolelock, flags);
-               /* Got the lock, don't cause console output */
-
-               pi = &port_info[port];
-               if (event->xRc == HvLpEvent_Rc_Good) {
-                       pi->seq = pi->ack = 0;
-                       /*
-                        * This line allows connections from the primary
-                        * partition but once one is connected from the
-                        * primary partition nothing short of a reboot
-                        * of linux will allow access from the hosting
-                        * partition again without a required iSeries fix.
-                        */
-                       pi->lp = event->xTargetLp;
-               }
-
-               spin_unlock_irqrestore(&consolelock, flags);
-               if (event->xRc != HvLpEvent_Rc_Good)
-                       printk(VIOCONS_KERN_WARN
-                              "handle_open_event: event->xRc == (%d).\n",
-                              event->xRc);
-
-               if (event->xCorrelationToken != 0) {
-                       atomic_t *aptr= (atomic_t *)event->xCorrelationToken;
-                       atomic_set(aptr, 1);
-               } else
-                       printk(VIOCONS_KERN_WARN
-                              "weird...got open ack without atomic\n");
-               return;
-       }
-
-       /* This had better require an ack, otherwise complain */
-       if (!hvlpevent_need_ack(event)) {
-               printk(VIOCONS_KERN_WARN "viocharopen without ack bit!\n");
-               return;
-       }
-
-       spin_lock_irqsave(&consolelock, flags);
-       /* Got the lock, don't cause console output */
-
-       /* Make sure this is a good virtual tty */
-       if (port >= VTTY_PORTS) {
-               event->xRc = HvLpEvent_Rc_SubtypeError;
-               cevent->subtype_result_code = viorc_openRejected;
-               /*
-                * Flag state here since we can't printk while holding
-                * a spinlock.
-                */
-               reject = 1;
-       } else {
-               pi = &port_info[port];
-               if ((pi->lp != HvLpIndexInvalid) &&
-                               (pi->lp != event->xSourceLp)) {
-                       /*
-                        * If this is tty is already connected to a different
-                        * partition, fail.
-                        */
-                       event->xRc = HvLpEvent_Rc_SubtypeError;
-                       cevent->subtype_result_code = viorc_openRejected;
-                       reject = 2;
-               } else {
-                       pi->lp = event->xSourceLp;
-                       event->xRc = HvLpEvent_Rc_Good;
-                       cevent->subtype_result_code = viorc_good;
-                       pi->seq = pi->ack = 0;
-                       reject = 0;
-               }
-       }
-
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       if (reject == 1)
-               printk(VIOCONS_KERN_WARN "open rejected: bad virtual tty.\n");
-       else if (reject == 2)
-               printk(VIOCONS_KERN_WARN
-                       "open rejected: console in exclusive use by another partition.\n");
-
-       /* Return the acknowledgement */
-       HvCallEvent_ackLpEvent(event);
-}
-
-/*
- * Handle a close charLpEvent.  This should ONLY be an Interrupt because the
- * virtual console should never actually issue a close event to the hypervisor
- * because the virtual console never goes away.  A close event coming from the
- * hypervisor simply means that there are no client consoles connected to the
- * virtual console.
- *
- * Regardless of the number of connections masqueraded on the other side of
- * the hypervisor ONLY ONE close event should be called to accompany the ONE
- * open event that is called.  The close event should ONLY be called when NO
- * MORE connections (masqueraded or not) exist on the other side of the
- * hypervisor.
- */
-static void vioHandleCloseEvent(struct HvLpEvent *event)
-{
-       unsigned long flags;
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       u8 port = cevent->virtual_device;
-
-       if (hvlpevent_is_int(event)) {
-               if (port >= VTTY_PORTS) {
-                       printk(VIOCONS_KERN_WARN
-                                       "close message from invalid virtual device.\n");
-                       return;
-               }
-
-               /* For closes, just mark the console partition invalid */
-               spin_lock_irqsave(&consolelock, flags);
-               /* Got the lock, don't cause console output */
-
-               if (port_info[port].lp == event->xSourceLp)
-                       port_info[port].lp = HvLpIndexInvalid;
-
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(VIOCONS_KERN_INFO "close from %d\n", event->xSourceLp);
-       } else
-               printk(VIOCONS_KERN_WARN
-                               "got unexpected close acknowlegement\n");
-}
-
-/*
- * Handle a config charLpEvent.  Could be either interrupt or ack
- */
-static void vioHandleConfig(struct HvLpEvent *event)
-{
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-
-       HvCall_writeLogBuffer(cevent->data, cevent->len);
-
-       if (cevent->data[0] == 0x01)
-               printk(VIOCONS_KERN_INFO "window resized to %d: %d: %d: %d\n",
-                      cevent->data[1], cevent->data[2],
-                      cevent->data[3], cevent->data[4]);
-       else
-               printk(VIOCONS_KERN_WARN "unknown config event\n");
-}
-
-/*
- * Handle a data charLpEvent. 
- */
-static void vioHandleData(struct HvLpEvent *event)
-{
-       struct tty_struct *tty;
-       unsigned long flags;
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       struct port_info *pi;
-       int index;
-       int num_pushed;
-       u8 port = cevent->virtual_device;
-
-       if (port >= VTTY_PORTS) {
-               printk(VIOCONS_KERN_WARN "data on invalid virtual device %d\n",
-                               port);
-               return;
-       }
-
-       /*
-        * Hold the spinlock so that we don't take an interrupt that
-        * changes tty between the time we fetch the port_info
-        * pointer and the time we paranoia check.
-        */
-       spin_lock_irqsave(&consolelock, flags);
-       pi = &port_info[port];
-
-       /*
-        * Change 05/01/2003 - Ryan Arnold: If a partition other than
-        * the current exclusive partition tries to send us data
-        * events then just drop them on the floor because we don't
-        * want his stinking data.  He isn't authorized to receive
-        * data because he wasn't the first one to get the console,
-        * therefore he shouldn't be allowed to send data either.
-        * This will work without an iSeries fix.
-        */
-       if (pi->lp != event->xSourceLp) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-
-       tty = pi->tty;
-       if (tty == NULL) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(VIOCONS_KERN_WARN "no tty for virtual device %d\n",
-                               port);
-               return;
-       }
-
-       if (tty->magic != TTY_MAGIC) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(VIOCONS_KERN_WARN "tty bad magic\n");
-               return;
-       }
-
-       /*
-        * Just to be paranoid, make sure the tty points back to this port
-        */
-       pi = (struct port_info *)tty->driver_data;
-       if (!pi || viotty_paranoia_check(pi, tty->name, "vioHandleData")) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       /*
-        * Change 07/21/2003 - Ryan Arnold: functionality added to
-        * support sysrq utilizing ^O as the sysrq key.  The sysrq
-        * functionality will only work if built into the kernel and
-        * then only if sysrq is enabled through the proc filesystem.
-        */
-       num_pushed = 0;
-       for (index = 0; index < cevent->len; index++) {
-               /*
-                * Will be optimized away if !CONFIG_MAGIC_SYSRQ:
-                */
-               if (sysrq_on()) {
-                       /* 0x0f is the ascii character for ^O */
-                       if (cevent->data[index] == '\x0f') {
-                               vio_sysrq_pressed = 1;
-                               /*
-                                * continue because we don't want to add
-                                * the sysrq key into the data string.
-                                */
-                               continue;
-                       } else if (vio_sysrq_pressed) {
-                               handle_sysrq(cevent->data[index], tty);
-                               vio_sysrq_pressed = 0;
-                               /*
-                                * continue because we don't want to add
-                                * the sysrq sequence into the data string.
-                                */
-                               continue;
-                       }
-               }
-               /*
-                * The sysrq sequence isn't included in this check if
-                * sysrq is enabled and compiled into the kernel because
-                * the sequence will never get inserted into the buffer.
-                * Don't attempt to copy more data into the buffer than we
-                * have room for because it would fail without indication.
-                */
-               if(tty_insert_flip_char(tty, cevent->data[index], TTY_NORMAL) == 0) {
-                       printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
-                       break;
-               }
-               num_pushed++;
-       }
-
-       if (num_pushed)
-               tty_flip_buffer_push(tty);
-}
-
-/*
- * Handle an ack charLpEvent. 
- */
-static void vioHandleAck(struct HvLpEvent *event)
-{
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       unsigned long flags;
-       u8 port = cevent->virtual_device;
-
-       if (port >= VTTY_PORTS) {
-               printk(VIOCONS_KERN_WARN "data on invalid virtual device\n");
-               return;
-       }
-
-       spin_lock_irqsave(&consolelock, flags);
-       port_info[port].ack = event->xCorrelationToken;
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       if (port_info[port].used)
-               send_buffers(&port_info[port]);
-}
-
-/*
- * Handle charLpEvents and route to the appropriate routine
- */
-static void vioHandleCharEvent(struct HvLpEvent *event)
-{
-       int charminor;
-
-       if (event == NULL)
-               return;
-
-       charminor = event->xSubtype & VIOMINOR_SUBTYPE_MASK;
-       switch (charminor) {
-       case viocharopen:
-               vioHandleOpenEvent(event);
-               break;
-       case viocharclose:
-               vioHandleCloseEvent(event);
-               break;
-       case viochardata:
-               vioHandleData(event);
-               break;
-       case viocharack:
-               vioHandleAck(event);
-               break;
-       case viocharconfig:
-               vioHandleConfig(event);
-               break;
-       default:
-               if (hvlpevent_is_int(event) && hvlpevent_need_ack(event)) {
-                       event->xRc = HvLpEvent_Rc_InvalidSubtype;
-                       HvCallEvent_ackLpEvent(event);
-               }
-       }
-}
-
-/*
- * Send an open event
- */
-static int send_open(HvLpIndex remoteLp, void *sem)
-{
-       return HvCallEvent_signalLpEventFast(remoteLp,
-                       HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_chario | viocharopen,
-                       HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
-                       viopath_sourceinst(remoteLp),
-                       viopath_targetinst(remoteLp),
-                       (u64)(unsigned long)sem, VIOVERSION << 16,
-                       0, 0, 0, 0);
-}
-
-static const struct tty_operations serial_ops = {
-       .open = viotty_open,
-       .close = viotty_close,
-       .write = viotty_write,
-       .put_char = viotty_put_char,
-       .write_room = viotty_write_room,
-       .chars_in_buffer = viotty_chars_in_buffer,
-       .ioctl = viotty_ioctl,
-};
-
-static int __init viocons_init2(void)
-{
-       atomic_t wait_flag;
-       int rc;
-
-       if (!firmware_has_feature(FW_FEATURE_ISERIES))
-               return -ENODEV;
-
-       /* +2 for fudge */
-       rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
-                       viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
-       if (rc)
-               printk(VIOCONS_KERN_WARN "error opening to primary %d\n", rc);
-
-       if (viopath_hostLp == HvLpIndexInvalid)
-               vio_set_hostlp();
-
-       /*
-        * And if the primary is not the same as the hosting LP, open to the 
-        * hosting lp
-        */
-       if ((viopath_hostLp != HvLpIndexInvalid) &&
-           (viopath_hostLp != HvLpConfig_getPrimaryLpIndex())) {
-               printk(VIOCONS_KERN_INFO "open path to hosting (%d)\n",
-                               viopath_hostLp);
-               rc = viopath_open(viopath_hostLp, viomajorsubtype_chario,
-                               VIOCHAR_WINDOW + 2);    /* +2 for fudge */
-               if (rc)
-                       printk(VIOCONS_KERN_WARN
-                               "error opening to partition %d: %d\n",
-                               viopath_hostLp, rc);
-       }
-
-       if (vio_setHandler(viomajorsubtype_chario, vioHandleCharEvent) < 0)
-               printk(VIOCONS_KERN_WARN
-                               "error seting handler for console events!\n");
-
-       /*
-        * First, try to open the console to the hosting lp.
-        * Wait on a semaphore for the response.
-        */
-       atomic_set(&wait_flag, 0);
-       if ((viopath_isactive(viopath_hostLp)) &&
-           (send_open(viopath_hostLp, (void *)&wait_flag) == 0)) {
-               printk(VIOCONS_KERN_INFO "hosting partition %d\n",
-                       viopath_hostLp);
-               while (atomic_read(&wait_flag) == 0)
-                       mb();
-               atomic_set(&wait_flag, 0);
-       }
-
-       /*
-        * If we don't have an active console, try the primary
-        */
-       if ((!viopath_isactive(port_info[0].lp)) &&
-           (viopath_isactive(HvLpConfig_getPrimaryLpIndex())) &&
-           (send_open(HvLpConfig_getPrimaryLpIndex(), (void *)&wait_flag)
-            == 0)) {
-               printk(VIOCONS_KERN_INFO "opening console to primary partition\n");
-               while (atomic_read(&wait_flag) == 0)
-                       mb();
-       }
-
-       /* Initialize the tty_driver structure */
-       viotty_driver = alloc_tty_driver(VTTY_PORTS);
-       viotty_driver->owner = THIS_MODULE;
-       viotty_driver->driver_name = "vioconsole";
-       viotty_driver->name = "tty";
-       viotty_driver->name_base = 1;
-       viotty_driver->major = TTY_MAJOR;
-       viotty_driver->minor_start = 1;
-       viotty_driver->type = TTY_DRIVER_TYPE_CONSOLE;
-       viotty_driver->subtype = 1;
-       viotty_driver->init_termios = tty_std_termios;
-       viotty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
-       tty_set_operations(viotty_driver, &serial_ops);
-
-       if (tty_register_driver(viotty_driver)) {
-               printk(VIOCONS_KERN_WARN "couldn't register console driver\n");
-               put_tty_driver(viotty_driver);
-               viotty_driver = NULL;
-       }
-
-       unregister_console(&viocons_early);
-       register_console(&viocons);
-
-       return 0;
-}
-
-static int __init viocons_init(void)
-{
-       int i;
-
-       if (!firmware_has_feature(FW_FEATURE_ISERIES))
-               return -ENODEV;
-
-       printk(VIOCONS_KERN_INFO "registering console\n");
-       for (i = 0; i < VTTY_PORTS; i++) {
-               port_info[i].lp = HvLpIndexInvalid;
-               port_info[i].magic = VIOTTY_MAGIC;
-       }
-       HvCall_setLogBufferFormatAndCodepage(HvCall_LogBuffer_ASCII, 437);
-       add_preferred_console("viocons", 0, NULL);
-       register_console(&viocons_early);
-       return 0;
-}
-
-console_initcall(viocons_init);
-module_init(viocons_init2);
index bc81d6f..2e6d584 100644 (file)
@@ -369,22 +369,33 @@ complete_transaction(struct fw_card *card, int rcode,
        struct response *response = data;
        struct client *client = response->client;
        unsigned long flags;
+       struct fw_cdev_event_response *r = &response->response;
 
-       if (length < response->response.length)
-               response->response.length = length;
+       if (length < r->length)
+               r->length = length;
        if (rcode == RCODE_COMPLETE)
-               memcpy(response->response.data, payload,
-                      response->response.length);
+               memcpy(r->data, payload, r->length);
 
        spin_lock_irqsave(&client->lock, flags);
        list_del(&response->resource.link);
        spin_unlock_irqrestore(&client->lock, flags);
 
-       response->response.type   = FW_CDEV_EVENT_RESPONSE;
-       response->response.rcode  = rcode;
-       queue_event(client, &response->event, &response->response,
-                   sizeof(response->response) + response->response.length,
-                   NULL, 0);
+       r->type   = FW_CDEV_EVENT_RESPONSE;
+       r->rcode  = rcode;
+
+       /*
+        * In the case that sizeof(*r) doesn't align with the position of the
+        * data, and the read is short, preserve an extra copy of the data
+        * to stay compatible with a pre-2.6.27 bug.  Since the bug is harmless
+        * for short reads and some apps depended on it, this is both safe
+        * and prudent for compatibility.
+        */
+       if (r->length <= sizeof(*r) - offsetof(typeof(*r), data))
+               queue_event(client, &response->event, r, sizeof(*r),
+                           r->data, r->length);
+       else
+               queue_event(client, &response->event, r, sizeof(*r) + r->length,
+                           NULL, 0);
 }
 
 static int ioctl_send_request(struct client *client, void *buffer)
index c882fd0..bf4ebfb 100644 (file)
@@ -57,6 +57,16 @@ config SENSORS_ABITUGURU3
          This driver can also be built as a module.  If so, the module
          will be called abituguru3.
 
+config SENSORS_AD7414
+       tristate "Analog Devices AD7414"
+       depends on I2C && EXPERIMENTAL
+       help
+         If you say yes here you get support for the Analog Devices
+         AD7414 temperature monitoring chip.
+
+         This driver can also be built as a module. If so, the module
+         will be called ad7414.
+
 config SENSORS_AD7418
        tristate "Analog Devices AD7416, AD7417 and AD7418"
        depends on I2C && EXPERIMENTAL
@@ -124,7 +134,7 @@ config SENSORS_ADM1031
 
 config SENSORS_ADM9240
        tristate "Analog Devices ADM9240 and compatibles"
-       depends on I2C && EXPERIMENTAL
+       depends on I2C
        select HWMON_VID
        help
          If you say yes here you get support for Analog Devices ADM9240,
@@ -575,8 +585,8 @@ config SENSORS_DME1737
        select HWMON_VID
        help
          If you say yes here you get support for the hardware monitoring
-         and fan control features of the SMSC DME1737 (and compatibles
-         like the Asus A8000) and SCH311x Super-I/O chips.
+         and fan control features of the SMSC DME1737, SCH311x, SCH5027, and
+         Asus A8000 Super-I/O chips.
 
          This driver can also be built as a module.  If so, the module
          will be called dme1737.
index d098677..7943e5c 100644 (file)
@@ -15,6 +15,7 @@ obj-$(CONFIG_SENSORS_W83791D) += w83791d.o
 
 obj-$(CONFIG_SENSORS_ABITUGURU)        += abituguru.o
 obj-$(CONFIG_SENSORS_ABITUGURU3)+= abituguru3.o
+obj-$(CONFIG_SENSORS_AD7414)   += ad7414.o
 obj-$(CONFIG_SENSORS_AD7418)   += ad7418.o
 obj-$(CONFIG_SENSORS_ADM1021)  += adm1021.o
 obj-$(CONFIG_SENSORS_ADM1025)  += adm1025.o
diff --git a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c
new file mode 100644 (file)
index 0000000..ce8d94f
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * An hwmon driver for the Analog Devices AD7414
+ *
+ * Copyright 2006 Stefan Roese <sr at denx.de>, DENX Software Engineering
+ *
+ * Copyright (c) 2008 PIKA Technologies
+ *   Sean MacLennan <smaclennan@pikatech.com>
+ *
+ * Copyright (c) 2008 Spansion Inc.
+ *   Frank Edelhaeuser <frank.edelhaeuser at spansion.com>
+ *   (converted to "new style" I2C driver model, removed checkpatch.pl warnings)
+ *
+ * Based on ad7418.c
+ * Copyright 2006 Tower Technologies, Alessandro Zummo <a.zummo at towertech.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/jiffies.h>
+#include <linux/i2c.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include <linux/sysfs.h>
+
+
+/* AD7414 registers */
+#define AD7414_REG_TEMP                0x00
+#define AD7414_REG_CONF                0x01
+#define AD7414_REG_T_HIGH      0x02
+#define AD7414_REG_T_LOW       0x03
+
+static u8 AD7414_REG_LIMIT[] = { AD7414_REG_T_HIGH, AD7414_REG_T_LOW };
+
+struct ad7414_data {
+       struct device           *hwmon_dev;
+       struct mutex            lock;   /* atomic read data updates */
+       char                    valid;  /* !=0 if following fields are valid */
+       unsigned long           next_update;    /* In jiffies */
+       s16                     temp_input;     /* Register values */
+       s8                      temps[ARRAY_SIZE(AD7414_REG_LIMIT)];
+};
+
+/* REG: (0.25C/bit, two's complement) << 6 */
+static inline int ad7414_temp_from_reg(s16 reg)
+{
+       /* use integer division instead of equivalent right shift to
+        * guarantee arithmetic shift and preserve the sign
+        */
+       return ((int)reg / 64) * 250;
+}
+
+static inline int ad7414_read(struct i2c_client *client, u8 reg)
+{
+       if (reg == AD7414_REG_TEMP) {
+               int value = i2c_smbus_read_word_data(client, reg);
+               return (value < 0) ? value : swab16(value);
+       } else
+               return i2c_smbus_read_byte_data(client, reg);
+}
+
+static inline int ad7414_write(struct i2c_client *client, u8 reg, u8 value)
+{
+       return i2c_smbus_write_byte_data(client, reg, value);
+}
+
+struct ad7414_data *ad7414_update_device(struct device *dev)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct ad7414_data *data = i2c_get_clientdata(client);
+
+       mutex_lock(&data->lock);
+
+       if (time_after(jiffies, data->next_update) || !data->valid) {
+               int value, i;
+
+               dev_dbg(&client->dev, "starting ad7414 update\n");
+
+               value = ad7414_read(client, AD7414_REG_TEMP);
+               if (value < 0)
+                       dev_dbg(&client->dev, "AD7414_REG_TEMP err %d\n",
+                               value);
+               else
+                       data->temp_input = value;
+
+               for (i = 0; i < ARRAY_SIZE(AD7414_REG_LIMIT); ++i) {
+                       value = ad7414_read(client, AD7414_REG_LIMIT[i]);
+                       if (value < 0)
+                               dev_dbg(&client->dev, "AD7414 reg %d err %d\n",
+                                       AD7414_REG_LIMIT[i], value);
+                       else
+                               data->temps[i] = value;
+               }
+
+               data->next_update = jiffies + HZ + HZ / 2;
+               data->valid = 1;
+       }
+
+       mutex_unlock(&data->lock);
+
+       return data;
+}
+
+static ssize_t show_temp_input(struct device *dev,
+                              struct device_attribute *attr, char *buf)
+{
+       struct ad7414_data *data = ad7414_update_device(dev);
+       return sprintf(buf, "%d\n", ad7414_temp_from_reg(data->temp_input));
+}
+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp_input, NULL, 0);
+
+static ssize_t show_max_min(struct device *dev, struct device_attribute *attr,
+                         char *buf)
+{
+       int index = to_sensor_dev_attr(attr)->index;
+       struct ad7414_data *data = ad7414_update_device(dev);
+       return sprintf(buf, "%d\n", data->temps[index] * 1000);
+}
+
+static ssize_t set_max_min(struct device *dev,
+                          struct device_attribute *attr,
+                          const char *buf, size_t count)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct ad7414_data *data = i2c_get_clientdata(client);
+       int index = to_sensor_dev_attr(attr)->index;
+       u8 reg = AD7414_REG_LIMIT[index];
+       long temp = simple_strtol(buf, NULL, 10);
+
+       temp = SENSORS_LIMIT(temp, -40000, 85000);
+       temp = (temp + (temp < 0 ? -500 : 500)) / 1000;
+
+       mutex_lock(&data->lock);
+       data->temps[index] = temp;
+       ad7414_write(client, reg, temp);
+       mutex_unlock(&data->lock);
+       return count;
+}
+
+static SENSOR_DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO,
+                         show_max_min, set_max_min, 0);
+static SENSOR_DEVICE_ATTR(temp1_min, S_IWUSR | S_IRUGO,
+                         show_max_min, set_max_min, 1);
+
+static ssize_t show_alarm(struct device *dev, struct device_attribute *attr,
+                         char *buf)
+{
+       int bitnr = to_sensor_dev_attr(attr)->index;
+       struct ad7414_data *data = ad7414_update_device(dev);
+       int value = (data->temp_input >> bitnr) & 1;
+       return sprintf(buf, "%d\n", value);
+}
+
+static SENSOR_DEVICE_ATTR(temp1_min_alarm, S_IRUGO, show_alarm, NULL, 3);
+static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 4);
+
+static struct attribute *ad7414_attributes[] = {
+       &sensor_dev_attr_temp1_input.dev_attr.attr,
+       &sensor_dev_attr_temp1_max.dev_attr.attr,
+       &sensor_dev_attr_temp1_min.dev_attr.attr,
+       &sensor_dev_attr_temp1_max_alarm.dev_attr.attr,
+       &sensor_dev_attr_temp1_min_alarm.dev_attr.attr,
+       NULL
+};
+
+static const struct attribute_group ad7414_group = {
+       .attrs = ad7414_attributes,
+};
+
+static int ad7414_probe(struct i2c_client *client,
+                       const struct i2c_device_id *dev_id)
+{
+       struct ad7414_data *data;
+       int conf;
+       int err = 0;
+
+       if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA |
+                                    I2C_FUNC_SMBUS_READ_WORD_DATA))
+               goto exit;
+
+       data = kzalloc(sizeof(struct ad7414_data), GFP_KERNEL);
+       if (!data) {
+               err = -ENOMEM;
+               goto exit;
+       }
+
+       i2c_set_clientdata(client, data);
+       mutex_init(&data->lock);
+
+       dev_info(&client->dev, "chip found\n");
+
+       /* Make sure the chip is powered up. */
+       conf = i2c_smbus_read_byte_data(client, AD7414_REG_CONF);
+       if (conf < 0)
+               dev_warn(&client->dev,
+                        "ad7414_probe unable to read config register.\n");
+       else {
+               conf &= ~(1 << 7);
+               i2c_smbus_write_byte_data(client, AD7414_REG_CONF, conf);
+       }
+
+       /* Register sysfs hooks */
+       err = sysfs_create_group(&client->dev.kobj, &ad7414_group);
+       if (err)
+               goto exit_free;
+
+       data->hwmon_dev = hwmon_device_register(&client->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
+               goto exit_remove;
+       }
+
+       return 0;
+
+exit_remove:
+       sysfs_remove_group(&client->dev.kobj, &ad7414_group);
+exit_free:
+       kfree(data);
+exit:
+       return err;
+}
+
+static int __devexit ad7414_remove(struct i2c_client *client)
+{
+       struct ad7414_data *data = i2c_get_clientdata(client);
+
+       hwmon_device_unregister(data->hwmon_dev);
+       sysfs_remove_group(&client->dev.kobj, &ad7414_group);
+       kfree(data);
+       return 0;
+}